Skip to content

gamut-icc: offer the BT.1886 display-EOTF reading of H.273 transfer 1/6/14/15 alongside the literal inverse-OETF one #586

Description

@justin13888

PR #542 gives H.273 TransferCharacteristics 1, 6, 14 and 15 a parametricCurveType that is the exact inverse of Table 3's opto-electronic function, Lc = ((V + α − 1) / α)^(1/0.45) with α = 1.099296826809442, β = 0.018053968510807. That is the spec-literal reading and it is what libjxl, libavif and Little-CMS all write, so it stays the default.

ITU-T H.273 (07/2024) §8.2 NOTE 1 sanctions a second reading:

In the cases of Rec. ITU-R BT.709-6 and Rec. ITU-R BT.2020-2 (as could be indicated by TransferCharacteristics equal to 1, 6, 14 or 15), although the value is defined in terms of a reference opto-electronic transfer characteristic function, a suggested corresponding reference electro-optical transfer characteristic function for flat panel displays used in HDTV studio production has been specified in Rec. ITU-R BT.1886-0.

For a display-class profile — which is exactly the class IccProfile::from_cicp builds — the BT.1886 EOTF is arguably the transfer a display profile should carry. With reference black at zero, BT.1886 is pure gamma 2.4.

The two readings are far apart. At mid-grey V = 0.5:

reading PCS Y
inverse OETF (what the crate writes) 0.259719
BT.1886 EOTF, V^2.4 0.189465
for reference, the sRGB code point (13) 0.214041

The literal reading is 1.371× the BT.1886 one, 0.0703 in absolute Y.

What would need deciding

  • Whether the alternative is an opt-in on from_cicp (a policy argument or a second constructor) or a BuiltinProfile variant. A plain-data policy enum fits the C-portability convention in AGENTS.md better than a second entry point.
  • Whether the cicpType tag still records the same code point under the alternative reading (it should — the signalling is unchanged; only the TRC the profile derives from it changes).
  • Whether gamut-color's transfer module should own the BT.1886 EOTF so the constant is not restated in gamut-icc.

Not a defect in #542: the shipped behaviour is the literal reading, and it now says so in the module docs together with these numbers.

Refs #424, #542.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions