Commit: 70aa33f069abf6a1ca1ed1542cb456cbf1b0c399
Author: Sergey Sharybin
Date:   Fri Oct 6 15:00:22 2017 +0500
Branches: master
https://developer.blender.org/rB70aa33f069abf6a1ca1ed1542cb456cbf1b0c399

Sequencer: Cleanup, use more BLI utilities where possible

===================================================================

M       source/blender/blenkernel/intern/seqeffects.c

===================================================================

diff --git a/source/blender/blenkernel/intern/seqeffects.c 
b/source/blender/blenkernel/intern/seqeffects.c
index 8753913d877..a2c45057bf7 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -1913,16 +1913,10 @@ static void RVBlurBitmap2_float(float *map, int width, 
int height, float blur, i
                        for (i = x - halfWidth; i < x + halfWidth; i++) {
                                if ((i >= 0) && (i < width)) {
                                        index = (i + y * width) * 4;
-                                       curColor[0] += map[index + GlowR] * 
filter[fx];
-                                       curColor[1] += map[index + GlowG] * 
filter[fx];
-                                       curColor[2] += map[index + GlowB] * 
filter[fx];
-                                       curColor[3] += map[index + GlowA] * 
filter[fx];
+                                       madd_v4_v4fl(curColor, map + index, 
filter[fx]);
 
                                        index = (width - 1 - i + y * width) * 4;
-                                       curColor2[0] += map[index + GlowR] * 
filter[fx];
-                                       curColor2[1] += map[index + GlowG] * 
filter[fx];
-                                       curColor2[2] += map[index + GlowB] * 
filter[fx];
-                                       curColor2[3] += map[index + GlowA] * 
filter[fx];
+                                       madd_v4_v4fl(curColor2, map + index, 
filter[fx]);
                                }
                                fx++;
                        }
@@ -1939,10 +1933,7 @@ static void RVBlurBitmap2_float(float *map, int width, 
int height, float blur, i
                        zero_v4(curColor);
                        for (i = x - halfWidth; i < x + halfWidth; i++) {
                                index = (i + y * width) * 4;
-                               curColor[0] += map[index + GlowR] * filter[fx];
-                               curColor[1] += map[index + GlowG] * filter[fx];
-                               curColor[2] += map[index + GlowB] * filter[fx];
-                               curColor[3] += map[index + GlowA] * filter[fx];
+                               madd_v4_v4fl(curColor, map + index, filter[fx]);
                                fx++;
                        }
                        index = (x + y * width) * 4;
@@ -1964,17 +1955,11 @@ static void RVBlurBitmap2_float(float *map, int width, 
int height, float blur, i
                                if ((i >= 0) && (i < height)) {
                                        /* Bottom */
                                        index = (x + i * width) * 4;
-                                       curColor[0] += map[index + GlowR] * 
filter[fy];
-                                       curColor[1] += map[index + GlowG] * 
filter[fy];
-                                       curColor[2] += map[index + GlowB] * 
filter[fy];
-                                       curColor[3] += map[index + GlowA] * 
filter[fy];
+                                       madd_v4_v4fl(curColor, map + index, 
filter[fy]);
 
                                        /* Top */
                                        index = (x + (height - 1 - i) * width) 
* 4;
-                                       curColor2[0] += map[index + GlowR] * 
filter[fy];
-                                       curColor2[1] += map[index + GlowG] * 
filter[fy];
-                                       curColor2[2] += map[index + GlowB] * 
filter[fy];
-                                       curColor2[3] += map[index + GlowA] * 
filter[fy];
+                                       madd_v4_v4fl(curColor2, map + index, 
filter[fy]);
                                }
                                fy++;
                        }
@@ -1991,10 +1976,7 @@ static void RVBlurBitmap2_float(float *map, int width, 
int height, float blur, i
                        zero_v4(curColor);
                        for (i = y - halfWidth; i < y + halfWidth; i++) {
                                index = (x + i * width) * 4;
-                               curColor[0] += map[index + GlowR] * filter[fy];
-                               curColor[1] += map[index + GlowG] * filter[fy];
-                               curColor[2] += map[index + GlowB] * filter[fy];
-                               curColor[3] += map[index + GlowA] * filter[fy];
+                               madd_v4_v4fl(curColor, map + index, filter[fy]);
                                fy++;
                        }
                        index = (x + y * width) * 4;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to