From 01ddba2397b28abb8167cac533e51789ecb3d88a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 7 May 2016 22:11:39 +0200 Subject: [PATCH] remove CLIP() from index when accessing gamma2curve LUT because gamma2curve LUT already clips internally --- rtengine/iplab2rgb.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 4510044aa..4d78a2a4f 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -117,9 +117,9 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) /* copy RGB */ //int R1=((int)gamma2curve[(R)]) - data[ix++] = ((int)Color::gamma2curve[CLIP(R)]) >> 8; - data[ix++] = ((int)Color::gamma2curve[CLIP(G)]) >> 8; - data[ix++] = ((int)Color::gamma2curve[CLIP(B)]) >> 8; + data[ix++] = ((int)Color::gamma2curve[R]) >> 8; + data[ix++] = ((int)Color::gamma2curve[G]) >> 8; + data[ix++] = ((int)Color::gamma2curve[B]) >> 8; } } } @@ -229,9 +229,9 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyz); - image->data[ix++] = (int)Color::gamma2curve[CLIP(R)] >> 8; - image->data[ix++] = (int)Color::gamma2curve[CLIP(G)] >> 8; - image->data[ix++] = (int)Color::gamma2curve[CLIP(B)] >> 8; + image->data[ix++] = (int)Color::gamma2curve[R] >> 8; + image->data[ix++] = (int)Color::gamma2curve[G] >> 8; + image->data[ix++] = (int)Color::gamma2curve[B] >> 8; } } }