iccvid: Allow top-down videos to be played upside down
Bruno Jesus
00cpxxx at gmail.com
Wed Feb 18 15:31:34 CST 2015
In my opinion this is better than not having videos played at all, and
it may attract other people attention to the real problem and possible
solutions on where to invert the buffer after decoding or maybe
decoding directly to the right buffer position inside decode_cinepak.
Related to bug https://bugs.winehq.org/show_bug.cgi?id=29852
-------------- next part --------------
diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c
index 4a59dae..9a2cb71 100644
--- a/dlls/iccvid/iccvid.c
+++ b/dlls/iccvid/iccvid.c
@@ -772,7 +772,7 @@ static LRESULT ICCVID_DecompressQuery( ICCVID_Info *info, LPBITMAPINFO in, LPBIT
if( in->bmiHeader.biPlanes != out->bmiHeader.biPlanes )
return ICERR_BADFORMAT;
- if( in->bmiHeader.biHeight != out->bmiHeader.biHeight )
+ if( in->bmiHeader.biHeight != abs(out->bmiHeader.biHeight) )
return ICERR_BADFORMAT;
if( in->bmiHeader.biWidth != out->bmiHeader.biWidth )
return ICERR_BADFORMAT;
@@ -855,6 +855,9 @@ static LRESULT ICCVID_DecompressBegin( ICCVID_Info *info, LPBITMAPINFO in, LPBIT
TRACE("bit_per_pixel = %d\n", info->bits_per_pixel);
+ if (out->bmiHeader.biHeight < 0)
+ ERR("Top-down videos are not supported, frames will be decoded upside down.\n");
+
if( info->cvinfo )
free_cvinfo( info->cvinfo );
info->cvinfo = decode_cinepak_init();
More information about the wine-patches
mailing list