Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/seqeffects.c
| Show First 20 Lines • Show All 1,557 Lines • ▼ Show 20 Lines | BLI_INLINE void apply_blend_function_byte(float facf0, | ||||
| unsigned char *rt1, *rt2, *rt; | unsigned char *rt1, *rt2, *rt; | ||||
| unsigned int achannel; | unsigned int achannel; | ||||
| xo = x; | xo = x; | ||||
| rt1 = rect1; | rt1 = rect1; | ||||
| rt2 = rect2; | rt2 = rect2; | ||||
| rt = out; | rt = out; | ||||
| while (y--) { | while (y--) { | ||||
| for (x = xo; x > 0; x--) { | for (x = xo; x > 0; x--) { | ||||
| achannel = rt1[3]; | achannel = rt2[3]; | ||||
| rt1[3] = (unsigned int)achannel * facf0; | rt2[3] = (unsigned int)achannel * facf0; | ||||
| blend_function(rt, rt1, rt2); | blend_function(rt, rt1, rt2); | ||||
| rt1[3] = achannel; | rt2[3] = achannel; | ||||
| rt[3] = rt1[3]; | rt[3] = rt1[3]; | ||||
| rt1 += 4; | rt1 += 4; | ||||
| rt2 += 4; | rt2 += 4; | ||||
| rt += 4; | rt += 4; | ||||
| } | } | ||||
| if (y == 0) { | if (y == 0) { | ||||
| break; | break; | ||||
| } | } | ||||
| y--; | y--; | ||||
| for (x = xo; x > 0; x--) { | for (x = xo; x > 0; x--) { | ||||
| achannel = rt1[3]; | achannel = rt2[3]; | ||||
| rt1[3] = (unsigned int)achannel * facf1; | rt2[3] = (unsigned int)achannel * facf1; | ||||
| blend_function(rt, rt1, rt2); | blend_function(rt, rt1, rt2); | ||||
| rt1[3] = achannel; | rt2[3] = achannel; | ||||
| rt[3] = rt1[3]; | rt[3] = rt1[3]; | ||||
| rt1 += 4; | rt1 += 4; | ||||
| rt2 += 4; | rt2 += 4; | ||||
| rt += 4; | rt += 4; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Show All 10 Lines | BLI_INLINE void apply_blend_function_float(float facf0, | ||||
| float *rt1, *rt2, *rt; | float *rt1, *rt2, *rt; | ||||
| float achannel; | float achannel; | ||||
| xo = x; | xo = x; | ||||
| rt1 = rect1; | rt1 = rect1; | ||||
| rt2 = rect2; | rt2 = rect2; | ||||
| rt = out; | rt = out; | ||||
| while (y--) { | while (y--) { | ||||
| for (x = xo; x > 0; x--) { | for (x = xo; x > 0; x--) { | ||||
| achannel = rt1[3]; | achannel = rt2[3]; | ||||
| rt1[3] = achannel * facf0; | rt2[3] = achannel * facf0; | ||||
| blend_function(rt, rt1, rt2); | blend_function(rt, rt1, rt2); | ||||
| rt1[3] = achannel; | rt2[3] = achannel; | ||||
| rt[3] = rt1[3]; | rt[3] = rt1[3]; | ||||
| rt1 += 4; | rt1 += 4; | ||||
| rt2 += 4; | rt2 += 4; | ||||
| rt += 4; | rt += 4; | ||||
| } | } | ||||
| if (y == 0) { | if (y == 0) { | ||||
| break; | break; | ||||
| } | } | ||||
| y--; | y--; | ||||
| for (x = xo; x > 0; x--) { | for (x = xo; x > 0; x--) { | ||||
| achannel = rt1[3]; | achannel = rt2[3]; | ||||
| rt1[3] = achannel * facf1; | rt2[3] = achannel * facf1; | ||||
| blend_function(rt, rt1, rt2); | blend_function(rt, rt1, rt2); | ||||
| rt1[3] = achannel; | rt2[3] = achannel; | ||||
| rt[3] = rt1[3]; | rt[3] = rt1[3]; | ||||
| rt1 += 4; | rt1 += 4; | ||||
| rt2 += 4; | rt2 += 4; | ||||
| rt += 4; | rt += 4; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,662 Lines • Show Last 20 Lines | |||||