From f6f60e5fff8d5c9b13fbf65f494eba651050ccb9 Mon Sep 17 00:00:00 2001 From: Cosmin Stejerean Date: Fri, 10 May 2024 17:41:30 -0700 Subject: [PATCH] fix: set yuv full range flag to 1 for VP9 with sRGB (#1398) If color_space is VPX_COLOR_SPACE_SRGB, the specs says that color_range should be 1 i.e. yuv_full_range = true. However, yuv_full_range was initialized as false and wasn't set in the branch for color_space is VPX_COLOR_SPACE_SRGB. Fixes #990 --------- Co-authored-by: Joey Parrish --- packager/media/codecs/vp9_parser.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/packager/media/codecs/vp9_parser.cc b/packager/media/codecs/vp9_parser.cc index 1e2499cc82..12fc472a90 100644 --- a/packager/media/codecs/vp9_parser.cc +++ b/packager/media/codecs/vp9_parser.cc @@ -285,6 +285,7 @@ bool ReadBitDepthAndColorSpace(BitReader* reader, } } else { // Assume 4:4:4 for colorspace SRGB. + yuv_full_range = true; chroma_subsampling = VPCodecConfigurationRecord::CHROMA_444; if (codec_config->profile() & 1) { bool reserved;