msvidc32/msvideo1 question: upside down buffers?

Maarten Lankhorst m.b.lankhorst at gmail.com
Tue Apr 6 11:46:12 CDT 2010


Hi Joerg,

On 06-04-10 17:47, Joerg-Cyril.Hoehle at t-systems.com wrote:
> does anybody know why msvideo_decode_8bit(), when imported
> from the FFmpeg project in 2004, was changed such that the
> pixels[] array became filled upside down?  See how
> #ifdef ORIGINAL,
>    which shows the original FFmpeg code, differs from the
> #else
>    branch in msvideo1.c
>
> Do buffers in Wine work upside down and backwards?
> Why can't Wine use exactly FFmpeg's code?
>
> I'm asking because no similar set of changes was applied to
> msvideo_decode_16bit().  I have files that are rendered
> incorrectly and even suspect of crashing Wine because of
> this.  I could write a patch but need to know.
>    
See BITMAPINFOHEADER documentation for biHeight:

http://msdn.microsoft.com/en-us/library/dd183376%28VS.85%29.aspx

However not all codecs handle negative height properly, and just ignore 
the information the sign gives. This is probably why ffmpeg puts it 
upside down internally.

Cheers,
Maarten



More information about the wine-devel mailing list