[FFmpeg-devel] [PATCH]Either set both display_width and display_height to pixeLwidth and pixel_height or none

Don Moir donmoir at comcast.net
Thu Apr 4 05:53:06 CEST 2013


----- Original Message ----- 
From: "Hendrik Leppkes" <h.leppkes at gmail.com>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
Sent: Wednesday, April 03, 2013 4:12 AM
Subject: Re: [FFmpeg-devel] [PATCH]Either set both display_width and display_height to pixeLwidth and pixel_height or none



>>
>> According to the Matroska Spec, DisplayWidth/DisplayHeight have a default
>> value of PixelWidth/PixelHeight respectively, so its perfectly valid to
>> only encode one of them in the file to override only one.
>> ie. i can imaging having a file with Pixel W/H of 1440x1080, and a
>> DisplayWidth of 1920, giving a result of 1920x1080 for Display W/H, taking
>> the default into account.
>>
>> So the current code appears correct.

>yes, but the file is not valid, it seems to store a 0 display width
>not "no value"

>> The one limitation to this rule is that the defaults only apply if
>> DisplayUnit has the value 0, which is not checked by avformat, maybe this
>> is the case here?

If the DisplayUnit value is not checked then you have no way of knowing how to interpret DisplayWidth and DisplayHeight as far as I 
can tell.

If it is DisplayUnit is zero then pixel width and height should be used for DisplayWidth/height regardless of what is read it 
appears.

WebM only supports DisplayUnit zero.

DisplayWidth/Height based on DisplayUnit (0: pixels, 1: centimeters, 2: inches, 3 aspect ratio).





More information about the ffmpeg-devel mailing list