[FFmpeg-devel] [PATCH] Fix non-rounding up to next 16-bit aligned bug in IFF decoder

Sebastian Vater cdgs.basty
Mon May 3 17:12:46 CEST 2010


M?ns Rullg?rd a ?crit :
> Sebastian Vater <cdgs.basty at googlemail.com> writes:
>
>   
>> Just tested on PowerPC big-endian machine:
>> Converting to BMP and gwenviewing the BMP worked fine.
>>     
>
> That's not how you test decoders.  The correct way is to do something
> like this:
>
> $ ./ffmpeg -i input -f rawvideo - | md5sum
>
> If the md5sum changes, there's an error somewhere.  A small error will
> not be obvious through visual inspection only.
>   

I did that both with:

$ ./ffmpeg -i input -f rawvideo - | md5sum


and with:

$ ./ffmpeg -i input - | md5sum


If I ommit rawvideo, the two md5sum's match on be/le...

When I use rawvideo, they differ only in the palette data at the end.
The palette data is written as ARGB on a be CPU and BGRA on le CPU.

But this error hasn't anything to do with my patches, the very original
code showed this behaviour, too.

The code causing this behaviour is:
    for (i=0; i < count; i++) {
        pal[i] = 0xFF000000 | AV_RB24( avctx->extradata + i*3 );
    }

-- 

Best regards,
                   :-) Basty/CDGS (-:




More information about the ffmpeg-devel mailing list