merge with Dev
This commit is contained in:
@@ -2471,6 +2471,14 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
const AdobeToneCurve& adobeTC = static_cast<const AdobeToneCurve&>((const ToneCurve&) * this);
|
||||
|
||||
for (size_t i = start; i < end; ++i) {
|
||||
const bool oog_r = OOG(rc[i]);
|
||||
const bool oog_g = OOG(gc[i]);
|
||||
const bool oog_b = OOG(bc[i]);
|
||||
|
||||
if (oog_r && oog_g && oog_b) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float r = CLIP(rc[i]);
|
||||
float g = CLIP(gc[i]);
|
||||
float b = CLIP(bc[i]);
|
||||
@@ -2492,12 +2500,18 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
|
||||
if (ar >= 65535.f && ag >= 65535.f && ab >= 65535.f) {
|
||||
// clip fast path, will also avoid strange colours of clipped highlights
|
||||
rc[i] = gc[i] = bc[i] = 65535.f;
|
||||
//rc[i] = gc[i] = bc[i] = 65535.f;
|
||||
if (!oog_r) rc[i] = 65535.f;
|
||||
if (!oog_g) gc[i] = 65535.f;
|
||||
if (!oog_b) bc[i] = 65535.f;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ar <= 0.f && ag <= 0.f && ab <= 0.f) {
|
||||
rc[i] = gc[i] = bc[i] = 0;
|
||||
//rc[i] = gc[i] = bc[i] = 0;
|
||||
if (!oog_r) rc[i] = 0.f;
|
||||
if (!oog_g) gc[i] = 0.f;
|
||||
if (!oog_b) bc[i] = 0.f;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2537,10 +2551,9 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
g = newg;
|
||||
b = newb;
|
||||
}
|
||||
|
||||
rc[i] = r;
|
||||
gc[i] = g;
|
||||
bc[i] = b;
|
||||
if (!oog_r) rc[i] = r;
|
||||
if (!oog_g) gc[i] = g;
|
||||
if (!oog_b) bc[i] = b;
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -2648,9 +2661,9 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
b = newb;
|
||||
}
|
||||
|
||||
rc[i] = r;
|
||||
gc[i] = g;
|
||||
bc[i] = b;
|
||||
if (!oog_r) rc[i] = r;
|
||||
if (!oog_g) gc[i] = g;
|
||||
if (!oog_b) bc[i] = b;
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -2711,10 +2724,9 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
g = newg;
|
||||
b = newb;
|
||||
}
|
||||
|
||||
rc[i] = r;
|
||||
gc[i] = g;
|
||||
bc[i] = b;
|
||||
if (!oog_r) rc[i] = r;
|
||||
if (!oog_g) gc[i] = g;
|
||||
if (!oog_b) bc[i] = b;
|
||||
}
|
||||
}
|
||||
float PerceptualToneCurve::cf_range[2];
|
||||
|
Reference in New Issue
Block a user