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

avfilter/tonemap_*: add ACES Reference Gamut Compression #438

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Aug 14, 2024

Changes

The tone-mapping mode operates in source colorspace (the LUM and ITP mode) will produce out of gamut colors when converting from BT.2020 to BT.709 and currently we are hard clipping it to into [0,1] range. This may produce oversaturated colors in certain scenes.

This adds the ACES Reference Gamut Compression to tonemap modes that operates in the source colorspace to persevere more color info and produce a BT.709 result that looks closer the to the original BT.2020 results.

More sophisticated way of gamut compressing/clipping like the one posted by Björn Ottosson exists but this method is chosen for the ease of implementation and relatively lightweight for compute, and still produces subjectively appealing results.

An example of this gamut compressing method(use a wide gamut display if you can):

Original BT.2020

image

Current hard-clipped BT.709

image

ACES Reference Gamut Compression:

image

Issues

@gnattu gnattu requested a review from a team August 14, 2024 12:52
@gnattu gnattu merged commit acea697 into jellyfin-7.0 Aug 15, 2024
27 checks passed
@gnattu gnattu deleted the 7.0-gamut-compression branch August 15, 2024 14:11
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.

3 participants