Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/sequencer.c
| Show First 20 Lines • Show All 2,372 Lines • ▼ Show 20 Lines | static void color_balance_byte_byte(StripColorBalance *cb_, | ||||
| while (cp < e) { | while (cp < e) { | ||||
| float p[4]; | float p[4]; | ||||
| int c; | int c; | ||||
| straight_uchar_to_premul_float(p, cp); | straight_uchar_to_premul_float(p, cp); | ||||
| for (c = 0; c < 3; c++) { | for (c = 0; c < 3; c++) { | ||||
| float t = color_balance_fl(p[c], cb.lift[c], cb.gain[c], cb.gamma[c], mul); | float t = color_balance_fl(p[c], cb.lift[c], cb.gain[c], cb.gamma[c], mul); | ||||
| CLAMP(t, -FLT_MAX, FLT_MAX); | |||||
| if (m) { | if (m) { | ||||
| float m_normal = (float)m[c] / 255.0f; | float m_normal = (float)m[c] / 255.0f; | ||||
| p[c] = p[c] * (1.0f - m_normal) + t * m_normal; | p[c] = p[c] * (1.0f - m_normal) + t * m_normal; | ||||
| } | } | ||||
| else { | else { | ||||
| p[c] = t; | p[c] = t; | ||||
| ▲ Show 20 Lines • Show All 3,650 Lines • Show Last 20 Lines | |||||