diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-06 13:00:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-06 13:00:22 +0300 |
commit | 70aa33f069abf6a1ca1ed1542cb456cbf1b0c399 (patch) | |
tree | 9eef1ddbee176515c91c0f7fa90b768deb0c3743 | |
parent | 00eac066f34a5dd27853030fa689ce86baa02cd9 (diff) |
Sequencer: Cleanup, use more BLI utilities where possible
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 30 |
1 files changed, 6 insertions, 24 deletions
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; |