further fixes to ensure smooth transitions to clipped colours

This commit is contained in:
Alberto Griggio
2018-04-04 01:05:23 +02:00
parent acfdf220ec
commit 4344603a3d
3 changed files with 78 additions and 73 deletions

View File

@@ -1190,6 +1190,11 @@ void DCPProfile::step2ApplyTile(float* rc, float* gc, float* bc, int width, int
}
// with looktable and tonecurve we need to clip
if (as_in.data->apply_look_table || as_in.data->use_tone_curve) {
newr = max(newr, 0.f);
newg = max(newg, 0.f);
newb = max(newb, 0.f);
}
// newr = FCLIP(newr);
// newg = FCLIP(newg);
// newb = FCLIP(newb);
@@ -1215,9 +1220,7 @@ void DCPProfile::step2ApplyTile(float* rc, float* gc, float* bc, int width, int
Color::hsv2rgbdcp( h, s, v, cnewr, cnewg, cnewb);
setUnlessOOG(newr, cnewr);
setUnlessOOG(newg, cnewg);
setUnlessOOG(newb, cnewb);
setUnlessOOG(newr, newg, newb, cnewr, cnewg, cnewb);
}
if (as_in.data->use_tone_curve) {