Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/sequencer.c
| Show First 20 Lines • Show All 2,336 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| float x = (((in - 1.0f) * lift) + 1.0f) * gain; | float x = (((in - 1.0f) * lift) + 1.0f) * gain; | ||||
| /* prevent NaN */ | /* prevent NaN */ | ||||
| if (x < 0.f) { | if (x < 0.f) { | ||||
| x = 0.f; | x = 0.f; | ||||
| } | } | ||||
| return powf(x, gamma) * mul; | x = powf(x, gamma) * mul; | ||||
| CLAMP(x, FLT_MIN, FLT_MAX); | |||||
| return x; | |||||
| } | } | ||||
| static void make_cb_table_float(float lift, float gain, float gamma, float *table, float mul) | static void make_cb_table_float(float lift, float gain, float gamma, float *table, float mul) | ||||
| { | { | ||||
| int y; | int y; | ||||
| for (y = 0; y < 256; y++) { | for (y = 0; y < 256; y++) { | ||||
| float v = color_balance_fl((float)y * (1.0f / 255.0f), lift, gain, gamma, mul); | float v = color_balance_fl((float)y * (1.0f / 255.0f), lift, gain, gamma, mul); | ||||
| ▲ Show 20 Lines • Show All 3,685 Lines • Show Last 20 Lines | |||||