[vlc-devel] [vlc-commits] screen:win32: screen capture is in sRGB and full range

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 3 10:44:31 CEST 2018


Unlike the other colorimetry values, this one has no undefined value 
since it's a boolean. So we can't know if a value has been set or not.

It could be done at the video_format_Init() but that's going to be a 
heavy lookup for each call. Also in this case it's created with 
es_format_Init() which initializes with a 0 chroma so the detection 
would need to be done there too.

On 03/08/2018 10:19, Jean-Baptiste Kempf wrote:
> Why is fullrange not the default, for RGB?
>
> On Fri, 3 Aug 2018, at 07:20, Steve Lhomme wrote:
>> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Aug  3
>> 07:18:31 2018 +0200| [24627b49a8e239748a0bd6c60e0a93f8841cf590] |
>> committer: Steve Lhomme
>>
>> screen:win32: screen capture is in sRGB and full range
>>
>> The same should probably be done on other screen capture sources but the actual
>> values may be check with an API for some of them. The Windows HDC API doesn't
>> provide that.
>>
>> Fixes #20956
>>
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24627b49a8e239748a0bd6c60e0a93f8841cf590
>> ---
>>
>>   modules/access/screen/win32.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/modules/access/screen/win32.c b/modules/access/screen/win32.c
>> index 478602ab83..c80dcc9df6 100644
>> --- a/modules/access/screen/win32.c
>> +++ b/modules/access/screen/win32.c
>> @@ -135,6 +135,8 @@ int screen_InitCapture( demux_t *p_demux )
>>       p_sys->fmt.video.i_bits_per_pixel = i_bits_per_pixel;
>>       p_sys->fmt.video.i_sar_num = p_sys->fmt.video.i_sar_den = 1;
>>       p_sys->fmt.video.i_chroma         = i_chroma;
>> +    p_sys->fmt.video.transfer         = TRANSFER_FUNC_SRGB;
>> +    p_sys->fmt.video.b_color_range_full = true;
>>   
>>       switch( i_chroma )
>>       {
>>
>> _______________________________________________
>> vlc-commits mailing list
>> vlc-commits at videolan.org
>> https://mailman.videolan.org/listinfo/vlc-commits
>
> -- 
> Jean-Baptiste Kempf -  President
> +33 672 704 734
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list