Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tone_mapping: fix ST2094-40 for D != T
The D > T branch had a number of fatal issues. One, the `p / N` calculation was accidentally rounded due to performing integer division. Two, the knee point was picked way too high (0.5 / 0.5). And three, even the basis knee was possibly way too bright due to being implicitly scaled up to the target brightness. Solve all three problems with a combination of approaches: 1. Picking a perceptually linear knee that doesn't explode as D > T 2. Constraining the basis knee to ensure we don't raise brightness 3. Mix towards linear slightly more aggressively to reduce the effects of the basis OOTF on the image appearance as D -> T Meanwhile, the D < T branch resulted in very inconsistent behavior as a result of wild deviations in the basis knee function, and also the lack of slope intercept. Fix both problems by a combination of approaches: 1. Make the knee more clip()-like (1:1 mapping) at low luminances, but constrain this to prevent the P[1] slope from exploding 2. Also mix in a linear intercept for P[1] as D -> 0
- Loading branch information