[FFmpeg-devel] [PATCH] Enable PAFF decoding

Loren Merritt lorenm
Fri Oct 12 19:21:21 CEST 2007


On Fri, 12 Oct 2007, Neil Brown wrote:
> On Wednesday October 10, lorenm at u.washington.edu wrote:
>>
>> PAFF + spatial direct isn't implemented either.
>
> Ahhh...
> I tried to read up on "spatial direct" mode in the spec, and
> completely failed to understand it.  Is there a "25 words or less"
> laymans version somewhere?

Spatial direct is a macroblock type in B-frames where no motion vectors 
are coded. Instead, the mvs are derived as: median of neighboring 
mvs, except in the case where the collocated block in the L1 
reference frame is inter predicted with a mv of magnitude <= 1/4 pixel, in 
which case the direct block uses mv=(0,0).

PAFF + temporal direct is probably broken too, since it still says 
if(FRAME_MBAFF) around the mixed mode support. That code is probably ok 
aside from the if, but you might have to modify the initialization of 
map_col_to_list0_field in PAFF.

> Could this explain why the first couple of frames aren't being decoded
> correctly?  How could I check?

If I- or P-frames are decoded incorrectly, then this isn't the cause.
Other than that, make a stream without direct macroblocks. But JM doesn't 
have an option to turn off direct (only to select between spatial and 
temporal), and x264 does have such an option but doesn't do PAFF, so good 
luck.

--Loren Merritt




More information about the ffmpeg-devel mailing list