[FFmpeg-devel] PixFmtInfo cleanup

Stefano Sabatini stefano.sabatini-lala
Sat Mar 14 01:30:24 CET 2009


On date Thursday 2009-03-05 00:51:47 +0100, Michael Niedermayer encoded:
[...]

After another look:

* currently pixdesc.[hc] contains things like:
  PIX_FMT_RGB656_LE

  I think you meant:
  PIX_FMT_RGB656LE

  (without the underscore) instead, as it is more consistent with the
  others PIX_FMT_* and other stuff in libav*.


* Either the PIX_FMT_RGB565_LE description:

    [PIX_FMT_RGB565_LE] = {
        .nb_channels  = 3,
        .log2_chroma_w= 0,
        .log2_chroma_h= 0,
        .comp = {

//               shift
//                 v
            {0,1,1,0,4},
            {0,1,1,5,5},
            {0,1,2,3,4},
        },

is wrong, either the definition of shift:
uint16_t shift        :3;            ///< number of lsb that must be shifted away to get the value

in this case it should be the number of *most* significant bits to
shift away.

Also what's the interpretation of offset_plus1 if the value is 0?
Only example is

     [PIX_FMT_RGB565_BE] = {
        .nb_channels  = 3,
        .log2_chroma_w= 0,
        .log2_chroma_h= 0,
        .comp = {
            {0,1,1, 0,4},
            {0,1,1, 5,5},
            {0,1,0, 3,4},
//               ^
//            offset_plus1
        },
        .flags = PIX_FMT_BE,
    },

when I'd rather expect the same values of the corresponding LE case.

Thanks, regards.
-- 
FFmpeg = Funny Fiendish Mysterious Programmable Elegant Game




More information about the ffmpeg-devel mailing list