[FFmpeg-devel] [PATCH] lavc/rawdec: Use AV_PIX_FMT_PAL8 for 1 bpp raw video in AVI

Mats Peterson matsp888 at yahoo.com
Tue Jan 26 16:48:01 CET 2016


On 01/26/2016 11:43 AM, Mats Peterson wrote:
> Michael, the 'test1.bmp' file in the 'bmp' directory in the FATE test
> suite contains a palette with green and blue colors, and when opening it
> in Paint in Windows XP, it will be displayed with the colors in the
> palette, not just black & white. This leads me to believe we should use
> pal8 and not monow for raw 1 bpp video in AVI after all.
>
> Please see the attached "test suite", it contains a README file with
> further information.
>
> This patch can't be applied until the raw yuv420p output differences
> between using monow and pal8 as the source (output values being 0x10 and
> 0xEB for pal8, and 0x00 and 0xFF for monow) are solved. Or if you just
> rewrite the 1 bpp test in some way.
>
> Mats
>

 From https://en.wikipedia.org/wiki/BMP_file_format#Pixel_format:

"The 1-bit per pixel (1bpp) format supports 2 distinct colors, (for 
example: black and white). The pixel values are stored in each bit, with 
the first (left-most) pixel in the most-significant bit of the first 
byte.[5] Each bit is an index into a table of 2 colors. An unset bit 
will refer to the first color table entry, and a set bit will refer to 
the last (second) color table entry."

I don't know whether this Wikipedia article has a lot of authority 
really, but please note the "for example black and white".

Mats



More information about the ffmpeg-devel mailing list