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

Mats Peterson matsp888 at yahoo.com
Sun Mar 13 15:19:19 CET 2016


On 03/13/2016 01:11 PM, Michael Niedermayer wrote:
> On Sun, Mar 13, 2016 at 09:33:41AM +0100, Mats Peterson wrote:
>> I hope this one is an acceptable compromise. Original description follows:
>>
>>  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.
>>
>> 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
>>
>> --
>> Mats Peterson
>> http://matsp888.no-ip.org/~mats/
>
>>   b/libavformat/riffenc.c                     |   12 ++++++------
>>   b/tests/ref/lavf-fate/avi_cram              |    2 +-
>>   b/tests/ref/vsynth/vsynth1-bpp1             |    2 +-
>>   b/tests/ref/vsynth/vsynth2-bpp1             |    2 +-
>>   b/tests/ref/vsynth/vsynth3-bpp1             |    2 +-
>>   b/tests/ref/vsynth/vsynth_lena-bpp1         |    2 +-
>>   tests/ref/vsynth/vsynth_lena-ffv1-v3-yuv420 |    4 ----
>>   7 files changed, 11 insertions(+), 15 deletions(-)
>> cb7685dc61b70066287c456fde23317dd799048d  0001-lavf-riffenc-Improve-spec-compliance-Fix-WMP-playbac.patch
>>  From 1abbf6d514963e94578160fabc829d8bdd6d72c0 Mon Sep 17 00:00:00 2001
>> From: Mats Peterson <matsp888 at yahoo.com>
>> Date: Sun, 13 Mar 2016 08:59:22 +0100
>> Subject: [PATCH 1/2 v2] lavf/riffenc: Improve spec compliance; Fix WMP playback of AVI with xxpc chunks
>
> applied
>
> thanks
>
> [...]
>

Thanks, Michael.

Mats



More information about the ffmpeg-devel mailing list