[vlc-commits] videotoolbox: full range video decoding is H264 only

Felix Paul Kühne git at videolan.org
Mon Aug 24 15:38:34 CEST 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Aug 24 15:38:23 2015 +0200| [62e03dd8778ce09b3ec21e85a61559e3e28f6bdd] | committer: Felix Paul Kühne

videotoolbox: full range video decoding is H264 only

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

 modules/codec/videotoolbox.m |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 422dd51..7fdef9e 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -473,9 +473,17 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
                          kCVPixelBufferOpenGLESCompatibilityKey,
                          kCFBooleanTrue);
 #endif
-    VTDictionarySetInt32(dpba,
-                         kCVPixelBufferPixelFormatTypeKey,
-                         kCVPixelFormatType_420YpCbCr8BiPlanarFullRange);
+
+    /* full range allows a broader range of colors but is H264 only */
+    if (p_sys->codec == kCMVideoCodecType_H264) {
+        VTDictionarySetInt32(dpba,
+                             kCVPixelBufferPixelFormatTypeKey,
+                             kCVPixelFormatType_420YpCbCr8BiPlanarFullRange);
+    } else {
+        VTDictionarySetInt32(dpba,
+                             kCVPixelBufferPixelFormatTypeKey,
+                             kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange);
+    }
     VTDictionarySetInt32(dpba,
                          kCVPixelBufferWidthKey,
                          i_video_width);



More information about the vlc-commits mailing list