htpp

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

commit ae25790e98aecec6fea23cf4d4d040a541f7b8b4
parent a60a58d4e0cf5a7e684e0c7243a5b619b34a5b9e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu,  4 Jun 2020 17:13:45 +0200

Apply the exposure to the "white" normalization factor

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

diff --git a/doc/htpp.1.txt b/doc/htpp.1.txt @@ -42,7 +42,7 @@ the third and the fifth components of each *htrdr-image*(5) pixel encode a color with respect to the CIE 1931 XYZ color space. *htpp* first tone maps these colors with the following filmic tone mapping operator [2]: - out-color = f(in-color * exposure) / f(white-scale) + out-color = f(in-color * exposure) / f(white-scale * exposure) with: diff --git a/src/htpp.c b/src/htpp.c @@ -494,7 +494,7 @@ filmic_tone_mapping const double F = 0.30; const double W = Ymax; #define TONE_MAP(X) ((((X)*(A*(X)+C*B)+D*E)/((X)*(A*(X)+B)+D*F))-E/F) - const double white_scale = TONE_MAP(W); + const double white_scale = TONE_MAP(W*exposure); ASSERT(pixel); pixel[PIXCPNT_X] = TONE_MAP(pixel[PIXCPNT_X]*exposure) / white_scale;