summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUjinT34 <41110182+UjinT34@users.noreply.github.com>2025-09-29 15:22:42 +0300
committerGitHub <noreply@github.com>2025-09-29 13:22:42 +0100
commit09596725910aab2a9defed250348aebeee40f842 (patch)
tree86a44edf19448099d79b39ae310209641ef42b51 /src
parent4d82cc5957978aad3b291b711f9e9d7653362155 (diff)
renderer/cm: add more monitor cm options (#11861)
Adds more cm options for monitors: DCIP3, Apple P3, Adobe
Diffstat (limited to 'src')
-rw-r--r--src/config/ConfigManager.cpp6
-rw-r--r--src/helpers/Monitor.cpp15
-rw-r--r--src/helpers/Monitor.hpp3
3 files changed, 24 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index cbf1fcd5..206de193 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -2263,6 +2263,12 @@ bool CMonitorRuleParser::parseCM(const std::string& value) {
m_rule.cmType = CM_HDR;
else if (value == "hdredid")
m_rule.cmType = CM_HDR_EDID;
+ else if (value == "dcip3")
+ m_rule.cmType = CM_DCIP3;
+ else if (value == "dp3")
+ m_rule.cmType = CM_DP3;
+ else if (value == "adobe")
+ m_rule.cmType = CM_ADOBE;
else {
m_error += "invalid cm ";
return false;
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index c7e94fa5..f38f009f 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -474,6 +474,21 @@ void CMonitor::applyCMType(eCMType cmType) {
.primariesNamed = NColorManagement::CM_PRIMARIES_BT2020,
.primaries = NColorManagement::getPrimaries(NColorManagement::CM_PRIMARIES_BT2020)};
break;
+ case CM_DCIP3:
+ m_imageDescription = {.primariesNameSet = true,
+ .primariesNamed = NColorManagement::CM_PRIMARIES_DCI_P3,
+ .primaries = NColorManagement::getPrimaries(NColorManagement::CM_PRIMARIES_DCI_P3)};
+ break;
+ case CM_DP3:
+ m_imageDescription = {.primariesNameSet = true,
+ .primariesNamed = NColorManagement::CM_PRIMARIES_DISPLAY_P3,
+ .primaries = NColorManagement::getPrimaries(NColorManagement::CM_PRIMARIES_DISPLAY_P3)};
+ break;
+ case CM_ADOBE:
+ m_imageDescription = {.primariesNameSet = true,
+ .primariesNamed = NColorManagement::CM_PRIMARIES_ADOBE_RGB,
+ .primaries = NColorManagement::getPrimaries(NColorManagement::CM_PRIMARIES_ADOBE_RGB)};
+ break;
case CM_EDID:
m_imageDescription = {.primariesNameSet = false,
.primariesNamed = NColorManagement::CM_PRIMARIES_BT2020,
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index d628ac58..d112f747 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -42,6 +42,9 @@ enum eCMType : uint8_t {
CM_EDID, // primaries from edid (known to be inaccurate)
CM_HDR, // wide color gamut and HDR PQ transfer function
CM_HDR_EDID, // same as CM_HDR with edid primaries
+ CM_DCIP3, // movie theatre with greenish white point
+ CM_DP3, // applle P3 variant with blueish white point
+ CM_ADOBE, // adobe colorspace
};
struct SMonitorRule {