Skip to content
  • wm4's avatar
    avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL · d6fc031c
    wm4 authored
    PSEUDOPAL pixel formats are not paletted, but carried a palette with the
    intention of allowing code to treat unpaletted formats as paletted. The
    palette simply mapped the byte values to the resulting RGB values,
    making it some sort of LUT for RGB conversion.
    
    It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8,
    GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap
    formats. The last one, GRAY8, is more common, but its treatment is
    grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming
    from typical Y video planes was not mapped to the correct RGB values.
    This cannot be fixed, because AVFrame.color_range can be freely changed
    at runtime, and there is nothing to ensure the pseudo palette is
    updated.
    
    Also, nothing actually used the PSEUDOPAL palette data, except xwdenc
    (trivially changed in the previous commit). All other code had to treat
    it as a special case, just to ignore or to propagate palette data.
    ...
    d6fc031c