Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Ensure that gamutmapped PQ gets scaled appropriately.

Wolthera van Hövell tot Westerflier543028e81238
diff --git a/plugins/color/lcms2engine/colorprofiles/LcmsPredefinedPipelineFunctions.cpp b/plugins/color/lcms2engine/colorprofiles/LcmsPredefinedPipelineFunctions.cpp
index 3a5bbc9200..c915bf788e 100644
--- a/plugins/color/lcms2engine/colorprofiles/LcmsPredefinedPipelineFunctions.cpp
+++ b/plugins/color/lcms2engine/colorprofiles/LcmsPredefinedPipelineFunctions.cpp
@@ -108,7 +108,7 @@ struct perceptualDummyHelper {
cmsInt32Number samplePQDummyClut(const cmsUInt16Number In[], cmsUInt16Number Out[], void *Cargo) {
struct perceptualDummyHelper *helper = (struct perceptualDummyHelper *) Cargo;
const float pqScale = 125.0; /// Important: this normalizes the pq signal.
- const float nominalPeak = 10000.0/helper->diffuseWhiteNits;/// See bt. 2390 pg. 52.
+ const float nominalPeak = 10000.0/(helper->diffuseWhiteNits * 3.7743);/// scaling the nits value by the HLG scaling factor.
float lin[3];
for (int i = 0; i < helper->channels; i++) {