[FFmpeg-soc] BFI

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Mar 29 10:09:16 CET 2008


On Sat, Mar 29, 2008 at 11:18:49AM +0530, Sisir Koppaka wrote:
> Hi,
> I'm passing the palette using extradata to the decoder.
> 1)Do I have to do this for every frame? BFI has the same palette for all the
> frames. Will extradata be refreshed to 0 after every frame by ffmpeg?

No, extradata must remain unchanged over all the time. But please note
(in case you are not aware) that extradata may not be endian specific
(since that would break remuxing), so it might still make sense to make
a copy in your decoder so you have the native-endian form ready (in case
you set the palette every frame).

> 2)I'm assuming that in the decoder, I have to put the palette into
> data[1](based on the code that I read) and the frame's actual contents into
> data[0]. Is this right?

Yes.

> 3) Do I have to set the palette in the decoder for every frame? Or will
> doing it the first time suffice?

If you set FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE and
always use the same AVFrame: no.
But you should only do this if there is a reason for it besides the
palette, e.g. because previous frames are reused or whatever.

Greetings,
Reimar Döffinger



More information about the FFmpeg-soc mailing list