Skip to content

Commit 148d9fc

Browse files
committed
Select correct color matrix for 10-bit SDR
1 parent ea39c77 commit 148d9fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/streaming/video/ffmpeg-renderers/d3d11va.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ void D3D11VARenderer::bindColorConversion(AVFrame* frame)
709709
bool fullRange = isFrameFullRange(frame);
710710
int colorspace = getFrameColorspace(frame);
711711
bool yuv444 = (m_DecoderParams.videoFormat & VIDEO_FORMAT_MASK_YUV444);
712-
int bits = (colorspace == COLORSPACE_REC_2020) ? 10 : 8;
712+
int bits = (m_DecoderParams.videoFormat & VIDEO_FORMAT_MASK_10BIT) ? 10 : 8;
713713

714714
if (yuv444) {
715715
// We'll need to use one of the 4:4:4 shaders for this pixel format

app/streaming/video/ffmpeg-renderers/vt_metal.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ bool updateColorSpaceForFrame(AVFrame* frame)
264264
if (colorspace != m_LastColorSpace || fullRange != m_LastFullRange || m_HdrMetadataChanged) {
265265
CGColorSpaceRef newColorSpace;
266266
ParamBuffer paramBuffer;
267-
int bits = (colorspace == COLORSPACE_REC_2020) ? 10 : 8;
267+
int bits = (m_VideoFormat & VIDEO_FORMAT_MASK_10BIT) ? 10 : 8;
268268

269269
// Stop the display link before changing the Metal layer
270270
stopDisplayLink();

0 commit comments

Comments
 (0)