Skip to content

Commit

Permalink
colorspace: use normalization factor 58.37/48 for ST.428-1 gamma
Browse files Browse the repository at this point in the history
  • Loading branch information
sekrit-twc committed Jun 30, 2023
1 parent f80b515 commit 9833300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zimg/colorspace/gamma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ float st_2084_inverse_eotf(float x) noexcept

float st_428_eotf(float x) noexcept
{
return x < 0.0f ? 0.0f : zimg_x_powf(x, 2.6f);
return x < 0.0f ? 0.0f : 52.37f / 48.0f * zimg_x_powf(x, 2.6f);
}

float st_428_inverse_eotf(float x) noexcept
{
return x < 0.0f ? 0.0f : zimg_x_powf(x, 1.0f / 2.6f);
return x < 0.0f ? 0.0f : zimg_x_powf(x * (48.0f / 52.37f), 1.0f / 2.6f);
}

// Applies a per-channel correction instead of the iterative method specified in Rec.2100.
Expand Down

0 comments on commit 9833300

Please sign in to comment.