diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2025-06-15 13:15:18 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-15 12:15:18 +0200 |
| commit | c3894d9288e99500df4fc4704bcc614ea8d520ec (patch) | |
| tree | 083ac23210b978f554e3a42aa6fc618e4a861d9e /src/protocols | |
| parent | 3db3baa19e55a039c1a64a29c8e9aaadea4e5f01 (diff) | |
config/monitor: Add monitor v2 HDR rules (#10623)
Diffstat (limited to 'src/protocols')
| -rw-r--r-- | src/protocols/types/ColorManagement.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; } }; |
