[x264-devel] Re: reg: macroblock_cache

Loren Merritt lorenm at u.washington.edu
Tue Feb 27 18:32:34 CET 2007


On Tue, 27 Feb 2007, karthik wrote:

> can anyone explain what is the purpose of x264_maroblock_cache_ref or 
> the mb.cache.ref data. what is the role of a cache here?

The purpose of mb.cache is so that various properties of individual 4x4 
blocks (including their ref index) can be accessed in a uniform 
manner. e.g. if you want to access the left neighbor of the current block, 
then just subtract 1 from the current block's position. Without mb.cache, 
anything that dealt with neighbors would have to check whether it crossed 
a macroblock boundary or an 8x8 block boundary, and compute an index 
within the appropriate macroblock. (btw, JM doesn't have an equivalent of 
mb.cache, and spends some ridiculously huge fraction of its cpu-time 
computing such neighbor relationships.)

mb.cache.ref in particular wouldn't strictly have to use a cache of 4x4 
blocks, since ref can't be divided smaller than 8x8. But I chose to use 
the same structure as all the other mb.cache entries for simplicity.

--Loren Merritt

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list