[FFmpeg-devel] [PATCH 1/2] lavf/riffenc: Improve spec compliance; Fix WMP playback of AVI with xxpc chunks

Mats Peterson matsp888 at yahoo.com
Sat Mar 12 07:12:24 CET 2016


New patch set. Forget the old one.

 From the Microsoft documentation for BITMAPINFOHEADER at
https://msdn.microsoft.com/en-us/library/windows/desktop/dd318229%28v=vs.85%29.aspx:

"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 40 for palettized video as well. And Windows Media Player 
won't display any video when using Microsoft Video 1 in 8 bpp mode or 
RLE4/RLE8 if this value is set to anything else than 40.

For non-palette extra data in huffyuv, ffvhuff, asv1 and asv2, the extra 
data will be included in biSize. There are possibly more codecs with 
special global headers, but we can fix that as they are discovered. 
Currently these are the only ones I know of.

Regarding the biClrUsed field, I'm setting it to 1 <<
bits_per_coded_sample if palettized video, since setting it to 0 won't 
work with Windows Media Player and AVI files with xxpc (palette change) 
chunks for some reason.

Mats
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-riffenc-Improve-spec-compliance-Fix-WMP-playbac.patch
Type: text/x-patch
Size: 23490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160312/b1695f36/attachment.bin>


More information about the ffmpeg-devel mailing list