[MPlayer-cvslog] r22042 - trunk/libmpdemux/demux_gif.c
reimar
subversion at mplayerhq.hu
Sun Jan 28 14:51:24 CET 2007
Author: reimar
Date: Sun Jan 28 14:51:24 2007
New Revision: 22042
Modified:
trunk/libmpdemux/demux_gif.c
Log:
Fix number of rows in interlaced mode.
Modified: trunk/libmpdemux/demux_gif.c
==============================================================================
--- trunk/libmpdemux/demux_gif.c (original)
+++ trunk/libmpdemux/demux_gif.c Sun Jan 28 14:51:24 2007
@@ -176,19 +176,23 @@
if (gif->Image.Interlace) {
uint8_t *s = buf;
- memcpy_transp_pic(dest, s, w, h >> 3,
+ int ih = (h - 0 + 7) >> 3;
+ memcpy_transp_pic(dest, s, w, ih,
priv->w << 3, gif->Image.Width,
transparency, transparent_col);
- s += (h >> 3) * w;
- memcpy_transp_pic(dest + (priv->w << 2), s, w, h >> 3,
+ s += ih * w;
+ ih = (h - 4 + 7) >> 3;
+ memcpy_transp_pic(dest + (priv->w << 2), s, w, ih,
priv->w << 3, gif->Image.Width,
transparency, transparent_col);
- s += (h >> 3) * w;
- memcpy_transp_pic(dest + (priv->w << 1), s, w, h >> 2,
+ s += ih * w;
+ ih = (h - 2 + 3) >> 2;
+ memcpy_transp_pic(dest + (priv->w << 1), s, w, ih,
priv->w << 2, gif->Image.Width,
transparency, transparent_col);
- s += (h >> 2) * w;
- memcpy_transp_pic(dest + priv->w, s, w, h >> 1,
+ s += ih * w;
+ ih = (h - 1 + 1) >> 1;
+ memcpy_transp_pic(dest + priv->w, s, w, ih,
priv->w << 1, gif->Image.Width,
transparency, transparent_col);
} else
More information about the MPlayer-cvslog
mailing list