[vlc-commits] es: assume the color range is full for YUV sources when unknown

Steve Lhomme git at videolan.org
Mon Dec 17 13:20:35 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Dec 13 09:21:36 2018 +0100| [e0fd9d2a4aba705efdcb32cb38717b7b15ec1989] | committer: Steve Lhomme

es: assume the color range is full for YUV sources when unknown

This is done when we need to guess the best pick for all color space values.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e0fd9d2a4aba705efdcb32cb38717b7b15ec1989
---

 include/vlc_es.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index 9f0a6b040f..217c921357 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -455,6 +455,14 @@ static inline void video_format_AdjustColorSpace( video_format_t *p_fmt )
         else
             p_fmt->space = COLOR_SPACE_BT601;
     }
+
+    if ( p_fmt->color_range == COLOR_RANGE_UNDEF )
+    {
+        if ( vlc_fourcc_IsYUV(p_fmt->i_chroma) )
+            p_fmt->color_range = COLOR_RANGE_LIMITED;
+        else
+            p_fmt->color_range = COLOR_RANGE_FULL;
+    }
 }
 
 /**



More information about the vlc-commits mailing list