[Bf-blender-cvs] [00eac066f34] master: Sequencer: Use BLI math functions where possible

Sergey Sharybin noreply at git.blender.org
Fri Oct 6 11:36:51 CEST 2017


Commit: 00eac066f34a5dd27853030fa689ce86baa02cd9
Author: Sergey Sharybin
Date:   Fri Oct 6 14:36:26 2017 +0500
Branches: master
https://developer.blender.org/rB00eac066f34a5dd27853030fa689ce86baa02cd9

Sequencer: Use BLI math functions 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 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);
 		}
 	}



More information about the Bf-blender-cvs mailing list