From 5d3c815c2fe289224a44d8bb8de60b319e616d2c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 25 Sep 2018 18:22:01 +0200 Subject: Revert "Compositor: Added Weighted Standard Curve evaluation" This reverts commit b8c9df6f21587014cb6f11aa5bed6f9c1044e6ee. The code is not correct with regards to color management, and its purpose was not documented. --- source/blender/blenkernel/intern/colortools.c | 38 --------------------------- 1 file changed, 38 deletions(-) (limited to 'source/blender/blenkernel/intern/colortools.c') diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index c090569421d..1bdca5500f3 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -954,25 +954,6 @@ static void curvemapping_evaluateRGBF_filmlike(const CurveMapping *cumap, float vecout[channel_offset[2]] = v2; } -static float curvemapping_weighted_standard_triangle(float a, float b, float a1) -{ - if (a != b) { - float b1; - float a2 = a1 - a; - - if (b < a) { - b1 = b + a2 * b / a ; - } - else { - b1 = b + a2 * (65535.0f - b) / (65535.0f - a); - } - - return b1; - } - - return a1; -} - /** same as #curvemapping_evaluate_premulRGBF * but black/bwmul are passed as args for the compositor * where they can change per pixel. @@ -999,25 +980,6 @@ void curvemapping_evaluate_premulRGBF_ex( vecout[2] = curvemap_evaluateF(&cumap->cm[2], b); break; } - case CURVE_TONE_WEIGHTED_STANDARD: - { - float r1 = curvemap_evaluateF(&cumap->cm[0], r); - float g1 = curvemapping_weighted_standard_triangle(r, r1, g); - float b1 = curvemapping_weighted_standard_triangle(r, r1, b); - - float g2 = curvemap_evaluateF(&cumap->cm[1], g); - float r2 = curvemapping_weighted_standard_triangle(g, g2, r); - float b2 = curvemapping_weighted_standard_triangle(g, g2, b); - - float b3 = curvemap_evaluateF(&cumap->cm[2], b); - float r3 = curvemapping_weighted_standard_triangle(b, b3, r); - float g3 = curvemapping_weighted_standard_triangle(b, b3, g); - - vecout[0] = r1 * 0.50f + r2 * 0.25f + r3 * 0.25f; - vecout[1] = g1 * 0.25f + g2 * 0.50f + g3 * 0.25f; - vecout[2] = b1 * 0.25f + b2 * 0.25f + b3 * 0.50f; - break; - } case CURVE_TONE_FILMLIKE: { if (r >= g) { -- cgit v1.2.3