[vlc-devel] [PATCH] video_out/mac: Enable bt2020 color space

Jean-Baptiste Kempf jb at videolan.org
Mon Oct 3 11:30:57 CEST 2016


On 03 Oct, Steve Lhomme wrote :
> On Mon, Oct 3, 2016 at 10:10 AM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> > On 03 Oct, Steve Lhomme wrote :
> >> On Sun, Oct 2, 2016 at 8:53 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> >> > On 02 Oct, Vittorio Giovara wrote :
> >> >> On Sun, Oct 2, 2016 at 11:38 AM, Felix Paul Kühne <fkuehne at videolan.org> wrote:
> >> >> > Hey Vittorio,
> >> >> >
> >> >> > This patch needs a ifdef in case kCGColorSpaceITUR_2020 is not defined (as it was introduced in macOS 10.11 and we still want to support the 10.10 SDK) similar to what we do for other constants like in the VideoToolbox decoder.
> >> >>
> >> >> Hi Felix,
> >> >> would something like
> >> >>
> >> >> #if MAC_OS_X_VERSION_MAX_ALLOWED < 1011
> >> >> const CFStringRef kCGColorSpaceITUR_2020 = CFSTR("kCGColorSpaceITUR_2020");
> >> >> #endif
> >> >>
> >> >> in both files be enough?
> >> >
> >> > I think so.
> >> >
> >> >
> >> > But what happens at runtime, if you don't have this supported?
> >>
> >> The colors will not match. At runtime you should check if the call is
> >> going to work or not and if not you have to do color conversion (to
> >> what your display can handle best) in software.
> >
> > Then, in that case, shouldn't we dither?
> 
> It's more translations of the color components. If macOS just uses
> OpenGL it should be doable with a pixel shader matrix with some
> clipping.

Exactly my point. If we don't do it right, because the OS doesn't
support it, we should insert a shader.

With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the vlc-devel mailing list