[Ffmpeg-devel] H264 decoding problem

Guillaume POIRIER poirierg
Fri Oct 13 09:33:08 CEST 2006


Hi,

On 10/12/06, Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
>
> On Thu, Oct 12, 2006 at 10:44:04PM +0200, Guillaume POIRIER wrote:
> > Hi,
> >
> > On 10/10/06, Klaas-Pieter Vlieg <vlieg at eurescom.de> wrote:
> > >As of Ffmpeg R6602 decoding of the file h264-psp.avi on X86 is broken.
> > >The problem was introduced with Michael's handwritten version of cabac.h
> > >(R6602)
> > >
> > >Sample h264-psp.avi in upload.mplayerhq.hu/MPlayer/incoming/h264-psp/
> >
> > Ok, I can confirm that the bug was introduced in R6602.
> > The offensive patch is in attachment.
> >
> > I've uploaded the code generated by GCC4.2 (3.4.6 is supposed to choke
> > on the same bug too) with r6602.
> > /home/guillaume/Prgm/gcc/bin/gcc -DHAVE_AV_CONFIG_H
> > -I/home/guillaume/Prgm/ffmpeg-test-6602
> > -I/home/guillaume/Prgm/ffmpeg-test-6602/libavutil -fomit-frame-pointer
> > -march=pentium4 -g -Wdeclaration-after-statement -Wall -Wno-switch
> > -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Winline -O3
> > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE    -S -o
> > h264.s h264.c
> >
> > You can can everything here: http://poirierg.googlepages.com/ffmpegtarball
> >
> > Hopefully this should help Michael narrow down the bug
>
> could you try to add "memory" to the clobber list as the gcc devels
> suggested and see if that fixes it?

Yep, that did it. Congrats!


> and try to compile with -fnostrict-aliasing or whatever its called

-fno-strict-aliasing :)

Well it compiles and produces a binary that decodes CABAC just fine
with and without that option.

Thanks a lot Michael for the speed of the fix, and for the work on
optimizing CABAC.

If you have time, I think it would be quite interesting if you could
write a blog entry on the approach you followed to optimize cabac.

Guillaume
-- 
With DADVSI (http://en.wikipedia.org/wiki/DADVSI), France finally has
a lead on USA on selling out individuals right to corporations!
Vive la France!




More information about the ffmpeg-devel mailing list