[Ffmpeg-devel] [PATCH] change gif demuxer to gif decoder
Baptiste Coudurier
baptiste.coudurier
Sun Oct 22 15:21:23 CEST 2006
Hi
Michael Niedermayer wrote:
>> [...]
>>
>> Those get_* might be located in another file though.
>
> yes
>
bitstream.h ? new bytestream.h ? Those functions need to be renamed
since it will conflict with libavformat. get_le*_buf ?
>> Does gif only use PAL8 ?
>
> i think so
>
>
>> gif_parse_next_image should be changed to a gif avcodec parser.
>
> yes
>
I'll do that soon, to remove gif_demuxer.
>> 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
>
Ok, mov stores palette in 'stsd
> though, ive no objections to a AVPacket flag to indicate a palette change
>
Ok, mov mess as usual, stores palette in 'stsd' atom. I'll then need to
recreate correct gif bitstream.
> [...]
>> + 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
>
Ok, I'll do that. May I commit ?
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel
mailing list