renderer/cm: add more monitor cm options (#11861)
Adds more cm options for monitors: DCIP3, Apple P3, Adobe
This commit is contained in:
parent
4d82cc5957
commit
0959672591
3 changed files with 24 additions and 0 deletions
|
|
@ -2263,6 +2263,12 @@ bool CMonitorRuleParser::parseCM(const std::string& value) {
|
||||||
m_rule.cmType = CM_HDR;
|
m_rule.cmType = CM_HDR;
|
||||||
else if (value == "hdredid")
|
else if (value == "hdredid")
|
||||||
m_rule.cmType = CM_HDR_EDID;
|
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 {
|
else {
|
||||||
m_error += "invalid cm ";
|
m_error += "invalid cm ";
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -474,6 +474,21 @@ void CMonitor::applyCMType(eCMType cmType) {
|
||||||
.primariesNamed = NColorManagement::CM_PRIMARIES_BT2020,
|
.primariesNamed = NColorManagement::CM_PRIMARIES_BT2020,
|
||||||
.primaries = NColorManagement::getPrimaries(NColorManagement::CM_PRIMARIES_BT2020)};
|
.primaries = NColorManagement::getPrimaries(NColorManagement::CM_PRIMARIES_BT2020)};
|
||||||
break;
|
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:
|
case CM_EDID:
|
||||||
m_imageDescription = {.primariesNameSet = false,
|
m_imageDescription = {.primariesNameSet = false,
|
||||||
.primariesNamed = NColorManagement::CM_PRIMARIES_BT2020,
|
.primariesNamed = NColorManagement::CM_PRIMARIES_BT2020,
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,9 @@ enum eCMType : uint8_t {
|
||||||
CM_EDID, // primaries from edid (known to be inaccurate)
|
CM_EDID, // primaries from edid (known to be inaccurate)
|
||||||
CM_HDR, // wide color gamut and HDR PQ transfer function
|
CM_HDR, // wide color gamut and HDR PQ transfer function
|
||||||
CM_HDR_EDID, // same as CM_HDR with edid primaries
|
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 {
|
struct SMonitorRule {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue