From 10c2d8d51177cda1c5fb84d4e49c90c77377e11b Mon Sep 17 00:00:00 2001 From: Emil Martinec Date: Sun, 2 Jan 2011 01:19:34 -0600 Subject: [PATCH] Fixing bug in autoexposure in conjunction with highlight reconstruction. --- rtengine/improcfun.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 8d5d2d638..ac6ff808c 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -653,7 +653,7 @@ void ImProcFunctions::getAutoExp (unsigned int* histogram, int histcompr, doubl awg = CurveFactory::igamma2 ((float)(awg/65535.0)) * 65535.0; //need to inverse gamma transform to get correct exposure compensation parameter bl = (int)((65535*bl)/awg); - br = log(65535.0 / (awg)) / log(2.0); + br = log(65535.0*corr / (awg)) / log(2.0); if (br<0) br = 0; }