http://bugs.winehq.org/show_bug.cgi?id=22344
Summary: Die Völker: upside down Cinepak intro video with greenish colors Product: Wine Version: 1.1.42 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: iccvid AssignedTo: wine-bugs@winehq.org ReportedBy: hoehle@users.sourceforge.net
Created an attachment (id=27338) --> (http://bugs.winehq.org/attachment.cgi?id=27338) +iccvid,+msvideo log (with wine-1.1.18)
Wine with a native amstream and quartz renders the first intro video (intro.avi) of "Die Völker / The Alien Nations" upside down and in wrong colours, with a strong green stain. Bug #17893 explains why WINEDLLOVERRIDE is needed. Actually, there are two issues with the Cinepak codec:
A) The iccvid codec refuses a BITMAPINFOHEADER with negative height. B) Native amstream tries hard to find a suitable transform. Alas, the codec does not refuse to convert into YUY2 or similar uncompressed formats, which I believe explains the greenish colour.
This log snippet about A) shows the use of a negative height in the header of the uncompressed format, which indicates a top-down DIB according to MSDN http://msdn.microsoft.com/en-us/library/dd183376.aspx trace:iccvid:ICCVID_DecompressQuery in: planes = 1 bpp = 24 height = 360 width = 640 compr = "cvid" trace:iccvid:ICCVID_DecompressQuery out: planes = 1 bpp = 24 height = -360 width = 640 compr = "\x00\x00\x00\x00"
This log snippet about B) shows how native amstream queries about decompressing into YUY2 and other similar fcc formats like UYVY (see log). trace:iccvid:ICCVID_DecompressQuery in: planes = 1 bpp = 24 height = 360 width = 640 compr = "cvid" trace:iccvid:ICCVID_DecompressQuery out: planes = 1 bpp = 16 height = 360 width = 640 compr = "YUY2"
This video displays fine using Wine's built-in mciavi.
What's obscure to me is why is this video rendered upside down with native amstream and quartz? Negative heights are returned by the iccvid codec with BADFORMAT, so it is a priori not responsible for the inversion. a) Is this a bug in native amstream, forgetting that it did not obtain a top-down decompressor? b) Is Wine's understanding of top-down the opposite of what native uses? c) Is the codec's understanding of bottom-up wrong?
What made me curious is the need to change the FFmpeg msvideo1 code for Wine: the original code would render videos upside down. And iccvid similarly contains #ifdef ORIGINAL code to invert the orientation.