diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-06 12:36:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-06 12:36:41 +0300 |
commit | 00eac066f34a5dd27853030fa689ce86baa02cd9 (patch) | |
tree | fa261881943ccad20863a3a3685650ed7d7bcb03 /source/blender | |
parent | d56f835bffaab78b6ae13db7b61c522a69098a88 (diff) |
Sequencer: Use BLI math functions where possible
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index a712b1b201e..8753913d877 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -1927,17 +1927,10 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i fx++; } index = (x + y * width) * 4; - temp[index + GlowR] = curColor[0]; - temp[index + GlowG] = curColor[1]; - temp[index + GlowB] = curColor[2]; - temp[index + GlowA] = curColor[3]; + copy_v4_v4(temp + index, curColor); index = (width - 1 - x + y * width) * 4; - temp[index + GlowR] = curColor2[0]; - temp[index + GlowG] = curColor2[1]; - temp[index + GlowB] = curColor2[2]; - temp[index + GlowA] = curColor2[3]; - + copy_v4_v4(temp + index, curColor2); } /* Do the main body */ @@ -1953,10 +1946,7 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i fx++; } index = (x + y * width) * 4; - temp[index + GlowR] = curColor[0]; - temp[index + GlowG] = curColor[1]; - temp[index + GlowB] = curColor[2]; - temp[index + GlowA] = curColor[3]; + copy_v4_v4(temp + index, curColor); } } @@ -1989,16 +1979,10 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i fy++; } index = (x + y * width) * 4; - temp[index + GlowR] = curColor[0]; - temp[index + GlowG] = curColor[1]; - temp[index + GlowB] = curColor[2]; - temp[index + GlowA] = curColor[3]; + copy_v4_v4(temp + index, curColor); index = (x + (height - 1 - y) * width) * 4; - temp[index + GlowR] = curColor2[0]; - temp[index + GlowG] = curColor2[1]; - temp[index + GlowB] = curColor2[2]; - temp[index + GlowA] = curColor2[3]; + copy_v4_v4(temp + index, curColor2); } /* Do the main body */ @@ -2014,10 +1998,7 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i fy++; } index = (x + y * width) * 4; - temp[index + GlowR] = curColor[0]; - temp[index + GlowG] = curColor[1]; - temp[index + GlowB] = curColor[2]; - temp[index + GlowA] = curColor[3]; + copy_v4_v4(temp + index, curColor); } } |