[vlc-commits] video_output/macosx: Enable bt2020 color space
Vittorio Giovara
git at videolan.org
Mon Oct 3 18:45:56 CEST 2016
vlc | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Sat Oct 1 21:45:16 2016 -0400| [2595dd600db0bfbf3de128c2e728e143407d72b1] | committer: Vittorio Giovara
video_output/macosx: Enable bt2020 color space
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2595dd600db0bfbf3de128c2e728e143407d72b1
---
modules/video_output/caopengllayer.m | 6 +++++-
modules/video_output/macosx.m | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index ab10594..7ad6cc5 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -45,6 +45,10 @@
#define OSX_EL_CAPITAN (NSAppKitVersionNumber >= 1404)
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1011
+const CFStringRef kCGColorSpaceITUR_2020 = CFSTR("kCGColorSpaceITUR_2020");
+#endif
+
/*****************************************************************************
* Vout interface
*****************************************************************************/
@@ -214,7 +218,7 @@ static int Open (vlc_object_t *p_this)
case COLOR_PRIMARIES_BT2020:
{
msg_Dbg(vd, "Using BT.2020 color space");
- sys->cgColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_709);
+ sys->cgColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
break;
}
case COLOR_PRIMARIES_DCI_P3:
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index dc535da..2c3dcd3 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -51,6 +51,10 @@
#define OSX_EL_CAPITAN (NSAppKitVersionNumber >= 1404)
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1011
+const CFStringRef kCGColorSpaceITUR_2020 = CFSTR("kCGColorSpaceITUR_2020");
+#endif
+
/**
* Forward declarations
*/
@@ -184,7 +188,7 @@ static int Open (vlc_object_t *this)
case COLOR_PRIMARIES_BT2020:
{
msg_Dbg(vd, "Using BT.2020 color space");
- sys->cgColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_709);
+ sys->cgColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
break;
}
case COLOR_PRIMARIES_DCI_P3:
More information about the vlc-commits
mailing list