[FFmpeg-user] Use of "-color_range"

Tim Nicholson tim.nicholson at bbc.co.uk
Tue Jul 5 16:19:20 CEST 2011


On 05/07/11 14:59, Mark Himsley wrote:
> On 05/07/11 07:43, Tim Nicholson wrote:
>> On 04/07/11 22:01, Mark Himsley wrote:
[...]
>>> Hi Tim,
>>>
>>> The source says:
>>>
>>> 0 == unspecified
>>> 1 == "MPEG" range
>>> 2 == "JPEG" range
>>>
>> > Therefore, I'd expect 1 to be "broadcast" 16-235, and 2 to be "full"
>>> 0-255. I haven't tested this, just grepped through the source.
>>>
>>
>>
>> Bother! Missed that in my "find", which file was that in?
>
> ./libavcodec/avcodec.h line 502
>
> enum AVColorRange{
> AVCOL_RANGE_UNSPECIFIED=0,
> AVCOL_RANGE_MPEG =1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges
> AVCOL_RANGE_JPEG =2, ///< the normal 2^n-1 "JPEG" YUV ranges
> AVCOL_RANGE_NB , ///< Not part of ABI
> };
>

Ahh, you see color_range transmogrifying into ColorRange threw me off 
the scent...

>
>> I presume that you are presuming MPEG => yuv=> 16-235 and JPEG => RGB
>> =>0-255, which is a bit woolly for such an important parameter.
>
> No. JPEG does not mandate RGB.
>

That's what I mean by woolley, its presumed in this case when it would 
be far better to use a more rigorous definition. :(

-- 
Tim

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					


More information about the ffmpeg-user mailing list