[Ffmpeg-devel] H.264 decoding bug in either lavc/JM (x264 too?)

Tuukka Toivonen tuukkat
Mon Aug 1 13:51:04 CEST 2005

(first a warning to all x264 users: do not use --b-pyramid with --direct 
spatial until this is fixed in x264!)

On Wed, 27 Jul 2005, Michael Niedermayer wrote:
>On Monday 25 July 2005 18:25, Loren Merritt wrote:
>> Possible cause:
>> h264.c:1207 should fall back to h->ref_list[1][0].motion_val[1][b4_xy] if
>> h->ref_list[1][0] is a B-frame and the colocated block is L1 predicted.

Tested, works (h264.c rev 1.148). I encoded 12 videos, each 640x480, 250 
frames. With older revision most (I think all) videos exhibited the 
problem, with rev 1.148 each video was exactly same as decoded with JM 9.6.

Now the same bug should be fixed in x264. I started looking how to do it,
but it would take some time from me.

Anyway, here's a good test video that gives broken results from x264


when encoded with options

x264 -b 3 --no-b-adapt --b-pyramid --no-cabac --nf --qp 35 --direct spatial \
-m 1 --no-chroma-me -v bug1-640x480.yuv -o bug1-640x480.264

Decode this with JM 9.6 or _latest_cvs_ version of lavc, and some
horrible MV bugs are visible, in particular in frame 45:

mplayer -rawvideo on:w=640:h=480:format=i420 \

(note that mplayer/lavc before the bug was fixed decoded it just fine)

I used x264 rev 277, x86, optimizations enabled.

More information about the ffmpeg-devel mailing list