From 8109651c79d03bdbb0d4806a7eb7d7cecbc9457d Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Tue, 18 Jul 2023 11:20:10 +0800 Subject: [PATCH] [VPP] Correct the HDR meta data According to the description about mfxExtMasteringDisplayColourVolume, `MaxDisplayMasteringLuminance` is in units of 1 candela per square meter, `MinDisplayMasteringLuminance` is in units of 0.0001 candela per square meter. So only data.maxMasteringLuminance is multiplied by kLuminanceFixedPoint Signed-off-by: Haihao Xiang --- _studio/shared/src/mfx_vpp_vaapi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_studio/shared/src/mfx_vpp_vaapi.cpp b/_studio/shared/src/mfx_vpp_vaapi.cpp index 99dd4401fb..0f30b84d61 100644 --- a/_studio/shared/src/mfx_vpp_vaapi.cpp +++ b/_studio/shared/src/mfx_vpp_vaapi.cpp @@ -1621,8 +1621,12 @@ mfxStatus VAAPIVideoProcessing::Execute(mfxExecuteParams *pParams) {data.displayPrimariesY[0], data.displayPrimariesY[1], data.displayPrimariesY[2]}, data.whitePoint[0], data.whitePoint[1], + // According to the description about mfxExtMasteringDisplayColourVolume, + // `MaxDisplayMasteringLuminance` is in units of 1 candela per square meter. + // `MinDisplayMasteringLuminance` is in units of 0.0001 candela per square meter + // so only data.maxMasteringLuminance is multiplied by kLuminanceFixedPoint data.maxMasteringLuminance * kLuminanceFixedPoint, - data.minMasteringLuminance * kLuminanceFixedPoint, + data.minMasteringLuminance, data.maxContentLightLevel, data.maxFrameAverageLightLevel };