[Ffmpeg-devel] H.264 decoding bug in either lavc/JM (x264 too?)
Tuukka Toivonen
tuukkat
Fri Jul 22 11:30:39 CEST 2005
I encoded a video clip using x264 and decoded with both
Mplayer (lavc) and JM 9.6. The two decoded videos differ
slightly on some frames. I think this is bug, as
H.264 should be bit exact, shouldn't it?
Here's frame-by-frame comparison:
Comparing size 640x480
ssd_y ssd_u ssd_v ssd psnr_y psnr_u psnr_v psnr
Frame 0 0 0 0 0 inf inf inf inf
Frame 1 0 0 0 0 inf inf inf inf
Frame 2 0 0 0 0 inf inf inf inf
Frame 3 0 0 0 0 inf inf inf inf
Frame 4 9342 1 8 9351 63.3006 96.9844 87.9535 65.0573
Frame 5 0 0 0 0 inf inf inf inf
Frame 6 0 0 0 0 inf inf inf inf
Frame 7 0 0 0 0 inf inf inf inf
Frame 8 0 0 0 0 inf inf inf inf
Frame 9 0 0 0 0 inf inf inf inf
Frame 10 66739 150 46 66935 54.7612 75.2235 80.3568 56.5094
Frame 11 0 0 0 0 inf inf inf inf
Frame 12 0 0 0 0 inf inf inf inf
Frame 13 0 0 0 0 inf inf inf inf
Frame 14 0 0 0 0 inf inf inf inf
Frame 15 0 0 0 0 inf inf inf inf
Frame 16 668 0 4 672 74.7573 inf 90.9638 76.4922
Frame 17 0 0 0 0 inf inf inf inf
Frame 18 0 0 0 0 inf inf inf inf
Frame 19 69884 55 25 69964 54.5612 79.5808 83.0050 56.3172
Frame 20 0 0 0 0 inf inf inf inf
Frame 21 0 0 0 0 inf inf inf inf
Frame 22 11 0 0 11 92.5911 inf inf 94.3520
I used latest CVS Mplayer and latest SVN x264 (but same results were same
with slightly older versions).
x264 command line:
--bframes 2 --8x8dct --b-pyramid --qp 26 --direct spatial
The problem occurs only if using all three options --8x8dct, --b-pyramid,
and --direct spatial. Most other options seem not to matter.
The funny thing is that the image quality is actually a bit better with
Mplayer decoded video than with JM decoded video, which would indicate
that the bug would be in JM. However, as JM should be quite mature, I
would rather guess there's a bug in both x264 and in Mplayer.
(Tell me if it's otherwise, so I can go to bug JM developers :)
Test files:
http://www.ee.oulu.fi/~tuukkat/tmp/bug/
(Frame #11 below is frame 10 above, as my yuvcmp
counts from 0, Mplayer apparently from 1)
bug.tgz - includes all
diff-fr11.png - Frame #11 difference picture, contrast enhanced
diff.yuv - Difference YUV file, contrast enhanced
differs.txt - Frame-by-frame PSNR between two decoded videos
jm-fr11.png - Frame #11 decoded with JM 9.6
mpl-fr11.png - Frame #11 decoded with Mplayer
test-640x480.yuv - Original test video
test.264 - Bitstream produced with x264
test_dec-mpl.yuv - Decoded video with Mplayer
test_dec.yuv - Decoded video with JM 9.6
testme.sh - Command lines used
More information about the ffmpeg-devel
mailing list