[FFmpeg-soc] BFI

Sisir Koppaka sisir.koppaka at gmail.com
Sat Mar 22 05:41:43 CET 2008


On Sat, Mar 22, 2008 at 9:38 AM, Mike Melanson <mike at multimedia.cx> wrote:

> Sisir Koppaka wrote:
> > But the size of the BFI palette is 256*3 right? Did you mean to say that
> > there is a 256-color palette for R, G and B individually? In that case,
> > wouldn't R,G and B have a depth of 256 instead of 64?  Also, I'm setting
> the
> > palette once in the demuxer? How often do we have to set the palette?
> like
> > for every frame in the decoder?
>
> In C, the palette generally looks like this:
>
> unsigned char palette[256][3];
>
> So that makes 256*3 = 768 bytes.
>
> When you a (commonly) 320x200 video frame of PIX_FMT_PAL8 data, that is
> 64000 pixels = 64000 bytes. To find the color that a particular pixel
> represents, use the byte to index into palette[]. That will give you the
> R, G, and B values for that pixel. Each of those R, G, and B values will
> max out at 64. Multiply by 4, naively, to scale up to a full 8-bit range.
>
> As for the palette communication, I have to admit that I can't remember
> off the top of my head how that's supposed to work right now. If Kostya
> is monitoring the conversation, hopefully, he will jump in.
>
> How is the BFI demuxer coming? Are you dispatching video and audio? Can
> you hear the audio yet?
>

Am working on the demuxer and parts of the decoder...got stuck up  in the
video  maze and  forgot to compile...now that I do, I get quite some
errors....one of them's a missing ; :) quite some debugging to do :)

-----------------
Sisir Koppaka



More information about the FFmpeg-soc mailing list