[Ffmpeg-devel] [PATCH] change gif demuxer to gif decoder
Michael Niedermayer
michaelni
Sat Oct 21 21:11:37 CEST 2006
Hi
On Sat, Oct 21, 2006 at 06:01:21PM +0200, Baptiste Coudurier wrote:
> Hi
>
> This patch change gif demuxer to gif decoder.
:))))
> I tried to keep the old
> code as much as I could to to not mess with diff. Of course code needs
> cleaning. I'll perform svn cp on file. We can then use gif with image2
> format. One step more to remove AVImage.
>
> Those get_* might be located in another file though.
yes
>
> Does gif only use PAL8 ?
i think so
>
> gif_parse_next_image should be changed to a gif avcodec parser.
yes
>
> Still miss a proper AVPalette system to make that work with gif in mov.
> I was thinking about adding an AVPalette field (buffer, or pointer ?) to
> AVPacket and add a pkt flag to mention palette change then it's up to
> application to detect it and update AVCodecContext AVPaletteControl
> appropriatly. Does that sound good ?
no, gif has its own syntax to store the palette, that should be used
so there just would be AVPackets containing the gif bitstream from which
part is the palette which the decoder then puts in AVFrame
AVPaletteControl is deprecated as it is not threadsafe
though, ive no objections to a AVPacket flag to indicate a palette change
[...]
> + picture->data[0] = s->image_buf;
> + picture->linesize[0] = s->image_linesize;
> + picture->data[1] = s->image_palette;
> + picture->linesize[1] = 4;
AVCodecContext.get_buffer() should be used to allocate the image so that
the user app can control where the image is stored avoids memcpy in many
cases, but that can be changed in a seperate commit
[...]
--
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