core/colorspace: match default luminances with the Wayland protocol
It wasn't feasible to do it before, because it made SDR black far too bright, but with black point compensation the result looks as users expect it
This commit is contained in:
parent
0d0135e237
commit
6f79597f13
2 changed files with 8 additions and 8 deletions
|
@ -141,15 +141,15 @@ void TestColorspaces::testColorPipeline_data()
|
||||||
QTest::addRow("sRGB -> rec.2020 relative colorimetric")
|
QTest::addRow("sRGB -> rec.2020 relative colorimetric")
|
||||||
<< ColorDescription(NamedColorimetry::BT709, TransferFunction(TransferFunction::gamma22), TransferFunction::defaultReferenceLuminanceFor(TransferFunction::gamma22), 0, std::nullopt, std::nullopt)
|
<< ColorDescription(NamedColorimetry::BT709, TransferFunction(TransferFunction::gamma22), TransferFunction::defaultReferenceLuminanceFor(TransferFunction::gamma22), 0, std::nullopt, std::nullopt)
|
||||||
<< ColorDescription(NamedColorimetry::BT2020, TransferFunction(TransferFunction::PerceptualQuantizer), 500, 0, std::nullopt, std::nullopt)
|
<< ColorDescription(NamedColorimetry::BT2020, TransferFunction(TransferFunction::PerceptualQuantizer), 500, 0, std::nullopt, std::nullopt)
|
||||||
<< QVector3D(0.044, 0.044, 0.044)
|
<< QVector3D(0.06729, 0.06729, 0.06729)
|
||||||
<< QVector3D(0.517, 0.517, 0.517)
|
<< QVector3D(0.51667, 0.51667, 0.51667)
|
||||||
<< QVector3D(0.677, 0.677, 0.677)
|
<< QVector3D(0.67658, 0.67658, 0.67658)
|
||||||
<< RenderingIntent::RelativeColorimetric;
|
<< RenderingIntent::RelativeColorimetric;
|
||||||
QTest::addRow("sRGB -> scRGB relative colorimetric")
|
QTest::addRow("sRGB -> scRGB relative colorimetric")
|
||||||
<< ColorDescription(NamedColorimetry::BT709, TransferFunction(TransferFunction::gamma22), TransferFunction::defaultReferenceLuminanceFor(TransferFunction::gamma22), 0, std::nullopt, std::nullopt)
|
<< ColorDescription(NamedColorimetry::BT709, TransferFunction(TransferFunction::gamma22), TransferFunction::defaultReferenceLuminanceFor(TransferFunction::gamma22), 0, std::nullopt, std::nullopt)
|
||||||
<< ColorDescription(NamedColorimetry::BT709, TransferFunction(TransferFunction::linear, 0, 80), 80, 0, std::nullopt, std::nullopt)
|
<< ColorDescription(NamedColorimetry::BT709, TransferFunction(TransferFunction::linear, 0, 80), 80, 0, std::nullopt, std::nullopt)
|
||||||
<< QVector3D(0.0001, 0.0001, 0.0001)
|
<< QVector3D(0.00025, 0.00025, 0.00025)
|
||||||
<< QVector3D(0.2177376408240310, 0.2177376408240310, 0.2177376408240310)
|
<< QVector3D(0.217833, 0.217833, 0.217833)
|
||||||
<< QVector3D(1, 1, 1)
|
<< QVector3D(1, 1, 1)
|
||||||
<< RenderingIntent::RelativeColorimetric;
|
<< RenderingIntent::RelativeColorimetric;
|
||||||
}
|
}
|
||||||
|
|
|
@ -377,7 +377,7 @@ double TransferFunction::defaultMinLuminanceFor(Type type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Type::sRGB:
|
case Type::sRGB:
|
||||||
case Type::gamma22:
|
case Type::gamma22:
|
||||||
return 0.01;
|
return 0.02;
|
||||||
case Type::linear:
|
case Type::linear:
|
||||||
return 0;
|
return 0;
|
||||||
case Type::PerceptualQuantizer:
|
case Type::PerceptualQuantizer:
|
||||||
|
@ -391,7 +391,7 @@ double TransferFunction::defaultMaxLuminanceFor(Type type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Type::sRGB:
|
case Type::sRGB:
|
||||||
case Type::gamma22:
|
case Type::gamma22:
|
||||||
return 100;
|
return 80;
|
||||||
case Type::linear:
|
case Type::linear:
|
||||||
return 1;
|
return 1;
|
||||||
case Type::PerceptualQuantizer:
|
case Type::PerceptualQuantizer:
|
||||||
|
@ -409,7 +409,7 @@ double TransferFunction::defaultReferenceLuminanceFor(Type type)
|
||||||
return 80;
|
return 80;
|
||||||
case Type::sRGB:
|
case Type::sRGB:
|
||||||
case Type::gamma22:
|
case Type::gamma22:
|
||||||
return 100;
|
return 80;
|
||||||
}
|
}
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue