[FFmpeg-devel] [PATCH] fix interlaced gif

Reimar Döffinger Reimar.Doeffinger
Mon Mar 3 14:27:22 CET 2008


On Mon, Mar 03, 2008 at 01:39:49PM +0100, Baptiste Coudurier wrote:
> Hi Reimar,
> Reimar D?ffinger wrote:
> > Hello,
> > attached patch fixes decoding of http://samples.mplayerhq.hu/GIF/7up.gif
> > If there are no objections I will apply soon.
> > 
> > Greetings,
> > Reimar D?ffinger
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > Index: libavformat/gifdec.c
> > ===================================================================
> > --- libavformat/gifdec.c	(revision 12287)
> > +++ libavformat/gifdec.c	(working copy)
> > @@ -364,11 +364,8 @@
> >                  y1 += 8;
> >                  ptr += linesize * 8;
> >                  if (y1 >= height) {
> > -                    y1 = 4;
> > -                    if (pass == 0)
> > -                        ptr = ptr1 + linesize * 4;
> > -                    else
> > -                        ptr = ptr1 + linesize * 2;
> > +                    y1 = pass == 0 ? 4 : 2;
> > +                    ptr = ptr1 + linesize * y1;
> >                      pass++;
> >                  }
> >                  break;
> > 
> 
> Patch ok.

Good, applied.
As I think this will imply quite a performance cost, would it be
desirable to split this properly into a gif demuxer and decoder?

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list