Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Perceptual Quantizer (PQ) transfer functions #218

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Adds Perceptual Quantizer (PQ) transfer functions #218

merged 1 commit into from
Jan 7, 2024

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