npapi-vlc | branch: master | Felix Paul Kühne <[email protected]> | Sun Apr 
17 11:58:32 2016 +0300| [cbf3644ccc06f5d23a7729fc282be06704cafcfe] | committer: 
Felix Paul Kühne

windowless-mac: base colorspace selection on original video size, not rendering 
dimensions

> https://code.videolan.org/videolan/npapi-vlc/commit/cbf3644ccc06f5d23a7729fc282be06704cafcfe
---

 npapi/vlcwindowless_mac.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/npapi/vlcwindowless_mac.cpp b/npapi/vlcwindowless_mac.cpp
index a249a9a..d44394d 100644
--- a/npapi/vlcwindowless_mac.cpp
+++ b/npapi/vlcwindowless_mac.cpp
@@ -279,20 +279,20 @@ bool VlcWindowlessMac::handle_event(void *event)
                SInt32 minorVersion;
                Gestalt(gestaltSystemVersionMinor, &minorVersion);
                if (minorVersion >= 11) {
-                   fprintf(stderr, "Guessing color space based on video 
dimensions (height: %i)", cached_height);
+                   fprintf(stderr, "Guessing color space based on video 
dimensions (%ix%i)\n", m_media_source_width, m_media_source_height);
 
-                   if (cached_height >= 2000 || cached_width >= 3800) {
-                       fprintf(stderr, "Should use BT.2020 color space, but in 
reality it's BT.709");
-                       colorspace = 
CGColorSpaceCreateWithName(kCGColorSpaceITUR_709);
-                   } else if (cached_height > 576) {
-                       fprintf(stderr, "Using BT.709 color space");
+                   if (m_media_source_height >= 2000 || m_media_source_width 
>= 3800) {
+                       fprintf(stderr, "Using BT.2020 color space\n");
+                       colorspace = 
CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
+                   } else if (m_media_source_height > 576) {
+                       fprintf(stderr, "Using BT.709 color space\n");
                        colorspace = 
CGColorSpaceCreateWithName(kCGColorSpaceITUR_709);
                    } else {
-                       fprintf(stderr, "SD content, using linear RGB color 
space");
+                       fprintf(stderr, "SD content, using linear RGB color 
space\n");
                        colorspace = 
CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
                    }
                } else {
-                   fprintf(stderr, "OS does not support BT.709 or BT.2020 
color spaces, output may vary");
+                   fprintf(stderr, "WARNING: OS does not support BT.709 or 
BT.2020 color spaces, output may vary\n");
                    colorspace = 
CGColorSpaceCreateWithName(kCGColorSpaceGenericRGBLinear);
                }
             }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to