[Ffmpeg-devel] AVPaletteControl removal from libavf (was Re: [MPlayer-dev-eng] [PATCH] (bit hackish) palette support for libav*)
Tue Jan 30 16:43:17 CET 2007
On Tue, Jan 30, 2007 at 02:54:40PM +0100, Reimar Doeffinger wrote:
> On Tue, Jan 30, 2007 at 02:30:06PM +0100, Michael Niedermayer wrote:
> > On Tue, Jan 30, 2007 at 01:56:00PM +0100, Reimar Doeffinger wrote:
> > > > also i would pass the palette like a normal video frame into the decoder
> > > > instead of using AVCodecContext
> > >
> > > Sure, that would be preferable, but how to tell the decoder this is a
> > > palette? Adding a flag parameter to the decode function? That would make
> > > for quite a huge patch a (and a lot of work to make it)...
> > > Advantage: that way could also be used for some other kinds of "extradata".
> > my hope would be that the decoder could figure out that a packet contains a
> > palette witout any additional info
> Thus probably duplicating complexity from the demuxer in this case. And
> I don't have any idea how this should be possible e.g. in the case of
> raw video e.g. in AVI.
for raw video the size of the packet could be used ...
anyway we can also pass a flag around but that as you know need
avcodec_decode_video() to be changed (like passing a AVPacket into it)
so code would look like
pkt.flags= ispalette ? ...
avcodec_decode_video(..., &pkt, ...);
> If course, that has only one palette that could
> be passed via extradata, but that does not seems like a clean solution
> to me.
well, if the palette is stored in AVIs "extradata" then it will be passed
as extradata, if OTOH its stored in some palette chunk somewhere in the
file then you cannot seek in this file and id say the file is broken
so IMO extradata is where the palette should be in this case
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the ffmpeg-devel