Skip to content

Commit

Permalink
Verify if BT.2100 HLG OOTF is present
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Sep 9, 2024
1 parent bbb08e3 commit 280e0b8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sources/lut-calibrator/ColorSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ namespace ColorSpaceMath
double3 coefs{ 0.2627, 0.6780, 0.0593 };
double luma = linalg::dot(input, coefs);
luma = linalg::pow(luma, gamma - 1.0);
return input * luma;
if (gamma != 0)
return input * luma;
else
return input;
}

double3 OOTF_HLG(double _input, double gamma)
Expand All @@ -237,7 +240,10 @@ namespace ColorSpaceMath
double3 coefs{ 0.2627, 0.6780, 0.0593 };
double luma = linalg::dot(input, coefs);
luma = linalg::pow(luma, gamma - 1.0);
return input * luma;
if (gamma != 0)
return input * luma;
else
return input;
}

double3 from_bt2020_to_XYZ(double3 x)
Expand Down

0 comments on commit 280e0b8

Please sign in to comment.