[Ffmpeg-devel] [PATCH] GIF encoder

Michael Niedermayer michaelni
Wed Nov 1 23:22:24 CET 2006


Hi

On Wed, Nov 01, 2006 at 11:12:07PM +0100, Baptiste Coudurier wrote:
> Michael Niedermayer wrote:
> > Hi
> > 
> > On Wed, Nov 01, 2006 at 09:11:27PM +0100, Baptiste Coudurier wrote:
> >> Hi
> >>
> >> GIF encoder ported from lavf to lavc.
> >> Very simple encoder (no compression), if someone is motivated to code
> >> LZW compression it would be nice.
> >>
> >> Now we can remove AVImageFormat from lavf without regression.
> > 
> > what about animated gifs, do they work too with your encoder?
> > 
> > and do the regression tests pass if the new encoder is used instead
> > of the old? if not why not?
> 
> In fact, goal is to remove AVImageFormat, old gif muxer/demuxer in lavf
> are still present and they provide animated gif support.
> Now with encoder, image format can be dropped in favor of image2.

yes but what is missing for animated gif support? it cant be much ...

the idea that we would have a libavformat/gif.c which could do animated
gif while libavcodec/gif.c wouldnt be able to is a lttle strange ...

but if you dont want to support it its still better to be able to finally
kill AVImageFormat at least even if we have to keep libavformat/gif.c ...


> 
> > if yes to both then apply it
> > 
> > [...]
> >> -    put_byte(pb, 0x00); /* end of image block */
> >> -
> >> +    bytestream_put_byte(bytestream, 0x00); /* end of image block */
> >> +    bytestream_put_byte(bytestream, 0x3b);
> >>      return 0;
> >>  }
> > 
> > this looks different?
> > 
> 
> In fact line was moved from gif_write to gif_image_write_image, but I
> can let it in encode_frame if you want.

doesnt help, libavformat/gif.c wrote it only at the end of the movie
IIRC

note you can easily detect the end of the movie by missusing CODEC_CAP_DELAY
and writing the 0x3b if theres no input pic

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list