[FFmpeg-devel] [PATCH] lavf/qtpalette: Ignore greyscale bit in 1-bit video

Mats Peterson matsp888 at yahoo.com
Wed Dec 30 07:55:36 CET 2015

The QuickTime File Format Specification states the following:

"Depth: A 16-bit integer that indicates the pixel depth of the
compressed image. Values of 1, 2, 4, 8 ,16, 24, and 32 indicate the
depth of color images. The value 32 should be used only if the image
contains an alpha channel. Values of 34, 36, and 40 indicate 2-, 4-, and
8-bit grayscale, respectively, for grayscale images."

There is no mention of value 33, i.e. 1-bit video (0x01) with the
greyscale bit (0x20) set. I therefore suggest that we ignore the
greyscale bit when processing 1-bit video. Another reason to do this is
that the sample file below will be displayed properly with blue colors
in QuickTime in Windows or Mac *in spite of* the greyscale bit being

Sample file:


Mats Peterson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-qtpalette-Ignore-greyscale-bit-in-1-bit-video.patch
Type: text/x-patch
Size: 1670 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151230/93ff02a4/attachment.bin>

More information about the ffmpeg-devel mailing list