[MPlayer-DOCS] Better encoding description for lavc and x264

Loren Merritt lorenm at u.washington.edu
Sun Sep 26 04:24:25 CEST 2004


On Sun, 26 Sep 2004, Diego Biurrun wrote:
> Guillaume POIRIER writes:
>> Diego Biurrun writes:
>>> Guillaume POIRIER writes:
>>>> .B fullinter
>>>> Use all available interframe macroblock types (i16x16, i4x4, p16x16-4x4)
>>>
>>> I suppose the values in the () are not all macroblock types,
>>> therefore we should add "e.g.\&".

That list does cover all macroblock types, though I can understand the 
desire for a more verbose listing.

>> AFAIK, all macroblock types are: 16x8, 8x16, 8x8, 8x4, 4x8, 4x4, (Please
>> tell me if I'm wrong here) so either we provide them all, or we put a
>> "e.g.\&".
>
> Hmm, what does the "i" and "p" stand for then?

i = intra, p = predicted, b = bi-predicted
(Actually, intra blocks are also predicted (spatially), but the 
abbreviations are kept from earlier MPEGs when they weren't.)

>> I'd prefer an exhaustive list.
>
> I would as well.

My exhaustive list would say:
(i16x16, i4x4, p16x16, p16x8, p8x16, p8x8, p8x4, p4x8, p4x4, pskip)


My more exhaustive list would say:

Note: These are my interpretation. The H.264 spec has a different idea of 
what constitutes separate macroblock types.
x264 has implemented b16x16, but not the other b types. 
i_pcm is implemented but not enabled, because it doesn't help in practice, 
at least at sane bitrates.

i16x16: Predict the 16x16 macroblock based on neighboring pixels. DCT the 
residual (with 4x4 DCTs). Run another DCT on the collection of their DC 
components.

i4x4: Predict each 4x4 sub-block based on neighboring pixels (including 
the other 4x4 sub-blocks that have already been encoded). DCT the 
residuals.

i_pcm: No prediction, no DCT, no quantization. Just send the samples 
directly to the entropy coder.

p16x16: Predict the macroblock as a 16x16 motion compensated block from a 
previous frame. DCT the residual.

p8x16, p16x8, p8x8: Multiple smaller motion compensated blocks. (These are 
collectively called psub16x16 in x264.)

p_sub8x8: In a p8x8 macroblock, each 8x8 partition may (independently) be
subdivided further into 8x4, 4x8, or 4x4 motion blocks.

p_skip: a special case of p16x16, where the motion vector is left exactly 
as predicted, and the residual isn't coded. (e.g. for static backgrounds 
or pans)

b16x16, b16x8, b8x16, b8x8, b_skip: Same as the p types, but use the 
average of two motion compensated blocks from different reference frames.
(Unlike MPEG[124], these two references need not be just the previous and 
next P-frames. They may be e.g. both in the past.)

b_direct: Uses the predicted partition size and motion vectors (usually 
the same as the colocated block in the next P-frame), but unlike b_skip, 
still encodes the residual.

--Loren Merritt




More information about the MPlayer-DOCS mailing list