[FFmpeg-devel] [PATCH 2/3] lavf/riffenc: Improve spec compliance

Mats Peterson matsp888 at yahoo.com
Wed Mar 9 23:33:55 CET 2016

 From the Microsoft documentation for BITMAPINFOHEADER at

"biSize: Specifies the number of bytes required by the structure. This 
value does not include the size of the color table or the size of the 
color masks, if they are appended to the end of structure."

So, biSize is always 40. Also, Windows Media Player won't detect video 
encoded with Microsoft Video 1 in 8 bpp mode if this value is anything 
else than 40. I don't know about other codecs, they probably work. 
Anyway, we should stick with the specs, and not include the palette size 
in that field.

Regarding the biClrUsed field, I'm setting it to 1 << 
bits_per_coded_sample if palettized video, since setting it to 0 is 
another case where it won't work with Windows Media Player and Microsoft 
Video 1 in 8 bpp mode.


Mats Peterson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavf-riffenc-Improve-spec-compliance.patch
Type: text/x-patch
Size: 1436 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160309/f9e73d3a/attachment.bin>

More information about the ffmpeg-devel mailing list