aest 0.1.0
Collection of C++ utility libraries
Loading...
Searching...
No Matches
aest::colors::tf::PQ Struct Referenceexport

The Perceptual Quantizer of SMPTE ST 2084 and ITU-R BT.2100, the absolute HDR transfer function of HDR10 and Dolby Vision. More...

Static Public Member Functions

static float encode (const float value)
 Encodes linear light into a PQ signal.
static float decode (const float value)
 Decodes a PQ signal to linear light.
static constexpr float clamp (const float value)
 Brings a signal value into the encoded range.

Static Public Attributes

static constexpr std::string_view PREFIX = "PQ"
 Prefix of the color space name.
static constexpr bool IS_HDR = true
 PQ is an HDR signal.

Detailed Description

The Perceptual Quantizer of SMPTE ST 2084 and ITU-R BT.2100, the absolute HDR transfer function of HDR10 and Dolby Vision.

Linear 1.0 is REFERENCE_WHITE_NITS, 203 cd/m², so it encodes to about 58%; the signal 1.0 is 10000 cd/m², linear 49.26. Channels are clamped to the 0-1 range.

See also
SMPTE ST 2084, ITU-R BT.2100

Definition at line 278 of file Transfer.cppm.

Member Function Documentation

◆ clamp()

constexpr float aest::colors::tf::PQ::clamp ( const float value)
inlinestaticconstexpr

Brings a signal value into the encoded range.

Parameters
[in]valueThe signal value
Returns
value clamped to the 0-1 range

Definition at line 316 of file Transfer.cppm.

◆ decode()

float aest::colors::tf::PQ::decode ( const float value)
inlinestatic

Decodes a PQ signal to linear light.

Parameters
[in]valueThe PQ signal in the 0-1 range
Returns
The linear value, 1 being 203 cd/m².
Note
Not constexpr: std::pow is constexpr only since C++26.

Definition at line 304 of file Transfer.cppm.

◆ encode()

float aest::colors::tf::PQ::encode ( const float value)
inlinestatic

Encodes linear light into a PQ signal.

Parameters
[in]valueThe linear value, 0 or greater, 1 being 203 cd/m²
Returns
The PQ signal, in the 0-1 range up to 10000 cd/m².
Note
Not constexpr: std::pow is constexpr only since C++26.

Definition at line 292 of file Transfer.cppm.

Member Data Documentation

◆ IS_HDR

bool aest::colors::tf::PQ::IS_HDR = true
staticconstexpr

PQ is an HDR signal.

Definition at line 284 of file Transfer.cppm.

◆ PREFIX

std::string_view aest::colors::tf::PQ::PREFIX = "PQ"
staticconstexpr

Prefix of the color space name.

Definition at line 281 of file Transfer.cppm.


The documentation for this struct was generated from the following file: