Skip to content

Conversation

danburzo
Copy link
Collaborator

@danburzo danburzo commented Jan 7, 2024

Adds the Perceptual Quantizer EOTF / EOTF-1 transfer functions.

They are defined on [0, 1] and [0, 10000] domains respectively, and excursions outside these intervals may cause undefined results. We add a guard clause in each to protect against negative input values (which would break Math.pow() with a fractional exponent), while maintaining the monotonicity of the functions. This protects against the occasional value outside the expected domain, that is expected from usual usage of the API.

A rough sketch of how these functions look (excuse the lack of axes):

Two graphs show the two perceptual quantizer functions

Also clarified Jzazbz’s transfer functions in relationship with PQ — not exactly PQ but close.

@danburzo danburzo merged commit 18d3358 into main Jan 7, 2024
@danburzo danburzo deleted the pq branch January 7, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant