From c3894d9288e99500df4fc4704bcc614ea8d520ec Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Sun, 15 Jun 2025 13:15:18 +0300 Subject: config/monitor: Add monitor v2 HDR rules (#10623) --- src/protocols/types/ColorManagement.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocols') diff --git a/src/protocols/types/ColorManagement.hpp b/src/protocols/types/ColorManagement.hpp index 2dd1c075..52f3f1b7 100644 --- a/src/protocols/types/ColorManagement.hpp +++ b/src/protocols/types/ColorManagement.hpp @@ -181,7 +181,7 @@ namespace NColorManagement { return primaries; } - float getTFMinLuminance() const { + float getTFMinLuminance(float sdrMinLuminance = -1.0f) const { switch (transferFunction) { case CM_TRANSFER_FUNCTION_EXT_LINEAR: return 0; case CM_TRANSFER_FUNCTION_ST2084_PQ: @@ -196,11 +196,11 @@ namespace NColorManagement { case CM_TRANSFER_FUNCTION_EXT_SRGB: case CM_TRANSFER_FUNCTION_ST428: case CM_TRANSFER_FUNCTION_SRGB: - default: return SDR_MIN_LUMINANCE; + default: return sdrMinLuminance >= 0 ? sdrMinLuminance : SDR_MIN_LUMINANCE; } }; - float getTFMaxLuminance() const { + float getTFMaxLuminance(int sdrMaxLuminance = -1) const { switch (transferFunction) { case CM_TRANSFER_FUNCTION_ST2084_PQ: return HDR_MAX_LUMINANCE; case CM_TRANSFER_FUNCTION_HLG: return HLG_MAX_LUMINANCE; @@ -214,7 +214,7 @@ namespace NColorManagement { case CM_TRANSFER_FUNCTION_EXT_SRGB: case CM_TRANSFER_FUNCTION_ST428: case CM_TRANSFER_FUNCTION_SRGB: - default: return SDR_MAX_LUMINANCE; + default: return sdrMaxLuminance >= 0 ? sdrMaxLuminance : SDR_MAX_LUMINANCE; } }; -- cgit v1.2.3