Commit 62e03dd8 authored by Felix Paul Kühne's avatar Felix Paul Kühne

videotoolbox: full range video decoding is H264 only

parent 06c5a102
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment