summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-16 07:12:32 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-16 07:12:32 +0000
commit3d834fb592a51e8ba6cced5863a4fa833deb1cd4 (patch)
treefded4b403140f146040504c7fc03cbc7b924cb7d /libmpdemux
parent410b24388556b1269cc2b8f22f93e83f53f12ecc (diff)
downloadmpv-3d834fb592a51e8ba6cced5863a4fa833deb1cd4.tar.bz2
mpv-3d834fb592a51e8ba6cced5863a4fa833deb1cd4.tar.xz
Interlaced gif support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21940 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_gif.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c
index d652e86db4..b246b6740d 100644
--- a/libmpdemux/demux_gif.c
+++ b/libmpdemux/demux_gif.c
@@ -167,8 +167,26 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
priv->palette[(y * 4) + 3] = 0;
}
- memcpy_transp_pic(dest, buf, w, h, priv->w, gif->Image.Width,
- transparency, transparent_col);
+ if (gif->Image.Interlace) {
+ uint8_t *s = buf;
+ memcpy_transp_pic(dest, s, w, h >> 3,
+ priv->w << 3, gif->Image.Width,
+ transparency, transparent_col);
+ s += (h >> 3) * w;
+ memcpy_transp_pic(dest + (gif->Image.Width << 2), s, w, h >> 3,
+ priv->w << 3, gif->Image.Width,
+ transparency, transparent_col);
+ s += (h >> 3) * w;
+ memcpy_transp_pic(dest + (gif->Image.Width << 1), s, w, h >> 2,
+ priv->w << 2, gif->Image.Width,
+ transparency, transparent_col);
+ s += (h >> 2) * w;
+ memcpy_transp_pic(dest + gif->Image.Width, s, w, h >> 1,
+ priv->w << 1, gif->Image.Width,
+ transparency, transparent_col);
+ } else
+ memcpy_transp_pic(dest, buf, w, h, priv->w, gif->Image.Width,
+ transparency, transparent_col);
if (refmode == 1) memcpy(priv->refimg, dp->buffer, priv->w * priv->h);
if (refmode == 2 && priv->useref) {