[FFmpeg-devel] [PATCH]Flip zerocodec

Derek Buitenhuis derek.buitenhuis at gmail.com
Sat Dec 1 18:54:10 CET 2012

On 01/12/2012 10:57 AM, Reimar Döffinger wrote:
>> Patch is wrong. The problem has nothing to do with ZeroCodec really.
>> The way several VFW codecs signal bottup-up RGB is to use a negative height.
> No, bottom-up is the default Windows bitmap format.
> It signals usage of non-default layout (i.e. not bottom-up) by negative
> height.

Whether the VFW codec (ZeroCodec) gets bottom-up RGB depends on the OS, last time I tested.

>> This is handled incorrectly/insanely (read: extradata hacks for specific a codec)
>> in our AVI demuxer, AFAIK.
> It adds BottomUp at the end of extradata for RAW formats.
> I would guess there is no real reason this check couldn't be extended to
> cover ZeroCodec.
> It's line 640 in avidec.c

OK. But I'm not sure it'll help (see below.)

>> Furthermore, depending on which OS is used to decode or encode ZeroCodec, it
>> will be flagged correctly or incorrectly, and may or may not be bottum-up RGB.
> For AVI we generally consider whatever WMP does as correct...

The original ZeroCodec binary is buggy. It will encode/decode differently on different
OSes. There is *no* correct behavior. It is simply not possible.

- Derek

More information about the ffmpeg-devel mailing list