From 76355590628322f5484f8085e6370cecbac2eb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 22 Sep 2016 21:22:35 +0200 Subject: [PATCH] Add Ingo's missing optimization (#3432) --- rtengine/iplab2rgb.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 9a3e710e7..419854523 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -101,15 +101,7 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) //float L1=rL[j],a1=ra[j],b1=rb[j];//for testing - fy = (0.00862069 * rL[j]) / 327.68 + 0.137932; // (L+16)/116 - fx = (0.002 * ra[j]) / 327.68 + fy; - fz = fy - (0.005 * rb[j]) / 327.68; - LL = rL[j] / 327.68; - - x_ = 65535.0 * Color::f2xyz(fx) * Color::D50x; - // y_ = 65535.0 * Color::f2xyz(fy); - z_ = 65535.0 * Color::f2xyz(fz) * Color::D50z; - y_ = (LL > Color::epskap) ? 65535.0 * fy * fy * fy : 65535.0 * LL / Color::kappa; + Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_ ); Color::xyz2srgb(x_, y_, z_, R, G, B);