avfilter/tonemap_*: add ACES Reference Gamut Compression #438
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Current hard-clipped BT.709
ACES Reference Gamut Compression:
Issues