htpp

htrdr-image post-processing
git clone git://git.meso-star.fr/htpp.git
Log | Files | Refs | README | LICENSE

commit c9640681dcbeee20d52f1627ed95270aadd13650
parent 4514baace016476895d4cecea332b79d100e995f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  6 Dec 2019 15:13:06 +0100

Upd how image exposure is handled

The pixel is now multiplied by the exposure priorly to its tone mapping.

Diffstat:
Mdoc/htpp.1.txt | 2+-
Msrc/htpp.c | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/htpp.1.txt b/doc/htpp.1.txt @@ -35,7 +35,7 @@ standard input. *htpp* tone maps the high dynamic range colors of the _input_ image with the following filmic tone mapping operator [2]: - out-color = f(in-color) / f(white-scale) * exposure + out-color = f(in-color * exposure) / f(white-scale) with: diff --git a/src/htpp.c b/src/htpp.c @@ -277,9 +277,9 @@ filmic_tone_mapping(double pixel[3], const double exposure, const double Ymax) const double white_scale = TONE_MAP(W); ASSERT(pixel); - pixel[0] = TONE_MAP(pixel[0]) / white_scale * exposure; - pixel[1] = TONE_MAP(pixel[1]) / white_scale * exposure; - pixel[2] = TONE_MAP(pixel[2]) / white_scale * exposure; + pixel[0] = TONE_MAP(pixel[0]*exposure) / white_scale; + pixel[1] = TONE_MAP(pixel[1]*exposure) / white_scale; + pixel[2] = TONE_MAP(pixel[2]*exposure) / white_scale; #undef TONE_MAP return pixel; }