Revision: 49685
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49685
Author:   nazgul
Date:     2012-08-08 11:15:36 +0000 (Wed, 08 Aug 2012)
Log Message:
-----------
Style cleanup: white space

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/seqeffects.c
    trunk/blender/source/blender/blenkernel/intern/sequencer.c

Modified: trunk/blender/source/blender/blenkernel/intern/seqeffects.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2012-08-08 
11:15:32 UTC (rev 49684)
+++ trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2012-08-08 
11:15:36 UTC (rev 49685)
@@ -58,7 +58,8 @@
 
 /* **** XXX **** */
 
-/* Glow effect */
+/*********************** Glow effect *************************/
+
 enum {
        GlowR = 0,
        GlowG = 1,
@@ -66,12 +67,9 @@
        GlowA = 3
 };
 
-static ImBuf *prepare_effect_imbufs(
-        SeqRenderData context,
-        struct ImBuf *ibuf1, struct ImBuf *ibuf2,
-        struct ImBuf *ibuf3)
+static ImBuf *prepare_effect_imbufs(SeqRenderData context, ImBuf *ibuf1, ImBuf 
*ibuf2, ImBuf *ibuf3)
 {
-       struct ImBuf *out;
+       ImBuf *out;
        int x = context.rectx;
        int y = context.recty;
 
@@ -114,9 +112,7 @@
        return out;
 }
 
-/* **********************************************************************
- * ALPHA OVER
- * ********************************************************************** */
+/*********************** Alpha Over *************************/
 
 static void init_alpha_over_or_under(Sequence *seq)
 {
@@ -127,23 +123,21 @@
        seq->seq1 = seq2;
 }
 
-static void do_alphaover_effect_byte(float facf0, float facf1, int x, int y, 
-                                     char *rect1, char *rect2, char *out)
+static void do_alphaover_effect_byte(float facf0, float facf1, int x, int y,  
char *rect1, char *rect2, char *out)
 {
        int fac2, mfac, fac, fac4;
        int xo, tempc;
        char *rt1, *rt2, *rt;
 
        xo = x;
-       rt1 = (char *)rect1;
-       rt2 = (char *)rect2;
-       rt = (char *)out;
+       rt1 = (char *) rect1;
+       rt2 = (char *) rect2;
+       rt = (char *) out;
 
-       fac2 = (int)(256.0f * facf0);
-       fac4 = (int)(256.0f * facf1);
+       fac2 = (int) (256.0f * facf0);
+       fac4 = (int) (256.0f * facf1);
 
        while (y--) {
-
                x = xo;
                while (x--) {
 
@@ -152,8 +146,8 @@
                        fac = fac2;
                        mfac = 256 - ( (fac2 * rt1[3]) >> 8);
 
-                       if (fac == 0) *( (unsigned int *)rt) = *( (unsigned int 
*)rt2);
-                       else if (mfac == 0) *( (unsigned int *)rt) = *( 
(unsigned int *)rt1);
+                       if (fac == 0) *( (unsigned int *) rt) = *( (unsigned 
int *) rt2);
+                       else if (mfac == 0) *( (unsigned int *) rt) = *( 
(unsigned int *) rt1);
                        else {
                                tempc = (fac * rt1[0] + mfac * rt2[0]) >> 8;
                                if (tempc > 255) rt[0] = 255; else rt[0] = 
tempc;
@@ -172,12 +166,11 @@
 
                x = xo;
                while (x--) {
-
                        fac = fac4;
                        mfac = 256 - ( (fac4 * rt1[3]) >> 8);
 
-                       if (fac == 0) *( (unsigned int *)rt) = *( (unsigned int 
*)rt2);
-                       else if (mfac == 0) *( (unsigned int *)rt) = *( 
(unsigned int *)rt1);
+                       if (fac == 0) *( (unsigned int *) rt) = *( (unsigned 
int *) rt2);
+                       else if (mfac == 0) *( (unsigned int *) rt) = *( 
(unsigned int *) rt1);
                        else {
                                tempc = (fac * rt1[0] + mfac * rt2[0]) >> 8;
                                if (tempc > 255) rt[0] = 255; else rt[0] = 
tempc;
@@ -193,8 +186,7 @@
        }
 }
 
-static void do_alphaover_effect_float(float facf0, float facf1, int x, int y, 
-                                      float *rect1, float *rect2, float *out)
+static void do_alphaover_effect_float(float facf0, float facf1, int x, int y,  
float *rect1, float *rect2, float *out)
 {
        float fac2, mfac, fac, fac4;
        int xo;
@@ -209,10 +201,8 @@
        fac4 = facf1;
 
        while (y--) {
-
                x = xo;
                while (x--) {
-
                        /* rt = rt1 over rt2  (alpha from rt1) */
 
                        fac = fac2;
@@ -233,12 +223,12 @@
                        rt1 += 4; rt2 += 4; rt += 4;
                }
 
-               if (y == 0) break;
+               if (y == 0)
+                       break;
                y--;
 
                x = xo;
                while (x--) {
-
                        fac = fac4;
                        mfac = 1.0f - (fac4 * rt1[3]);
 
@@ -259,11 +249,8 @@
        }
 }
 
-static ImBuf *do_alphaover_effect(
-        SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
-        float facf0, float facf1,
-        struct ImBuf *ibuf1, struct ImBuf *ibuf2,
-        struct ImBuf *ibuf3)
+static ImBuf *do_alphaover_effect(SeqRenderData context, Sequence 
*UNUSED(seq), float UNUSED(cfra), float facf0,
+                                                                 float facf1, 
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
 {
        struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
 
@@ -279,17 +266,13 @@
                        (char *) ibuf1->rect, (char *) ibuf2->rect,
                        (char *) out->rect);
        }
+
        return out;
 }
 
+/*********************** Alpha Under *************************/
 
-/* **********************************************************************
- * ALPHA UNDER
- * ********************************************************************** */
-
-static void do_alphaunder_effect_byte(
-        float facf0, float facf1, int x, int y, char *rect1,
-        char *rect2, char *out)
+static void do_alphaunder_effect_byte(float facf0, float facf1, int x, int y, 
char *rect1, char *rect2, char *out)
 {
        int fac2, mfac, fac, fac4;
        int xo;
@@ -304,22 +287,20 @@
        fac4 = (int)(256.0f * facf1);
 
        while (y--) {
-
                x = xo;
                while (x--) {
-
                        /* rt = rt1 under rt2  (alpha from rt2) */
 
                        /* this complex optimization is because the
                         * 'skybuf' can be crossed in
                         */
-                       if (rt2[3] == 0 && fac2 == 256) *( (unsigned int *)rt) 
= *( (unsigned int *)rt1);
-                       else if (rt2[3] == 255) *( (unsigned int *)rt) = *( 
(unsigned int *)rt2);
+                       if (rt2[3] == 0 && fac2 == 256) *( (unsigned int *) rt) 
= *( (unsigned int *) rt1);
+                       else if (rt2[3] == 255) *( (unsigned int *) rt) = *( 
(unsigned int *) rt2);
                        else {
                                mfac = rt2[3];
                                fac = (fac2 * (256 - mfac)) >> 8;
 
-                               if (fac == 0) *( (unsigned int *)rt) = *( 
(unsigned int *)rt2);
+                               if (fac == 0) *( (unsigned int *) rt) = *( 
(unsigned int *) rt2);
                                else {
                                        rt[0] = (fac * rt1[0] + mfac * rt2[0]) 
>> 8;
                                        rt[1] = (fac * rt1[1] + mfac * rt2[1]) 
>> 8;
@@ -330,14 +311,14 @@
                        rt1 += 4; rt2 += 4; rt += 4;
                }
 
-               if (y == 0) break;
+               if (y == 0)
+                       break;
                y--;
 
                x = xo;
                while (x--) {
-
-                       if (rt2[3] == 0 && fac4 == 256) *( (unsigned int *)rt) 
= *( (unsigned int *)rt1);
-                       else if (rt2[3] == 255) *( (unsigned int *)rt) = *( 
(unsigned int *)rt2);
+                       if (rt2[3] == 0 && fac4 == 256) *( (unsigned int *) rt) 
= *( (unsigned int *) rt1);
+                       else if (rt2[3] == 255) *( (unsigned int *) rt) = *( 
(unsigned int *) rt2);
                        else {
                                mfac = rt2[3];
                                fac = (fac4 * (256 - mfac)) >> 8;
@@ -355,10 +336,7 @@
        }
 }
 
-
-static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y, 
-                                       float *rect1, float *rect2,
-                                       float *out)
+static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y, 
 float *rect1, float *rect2, float *out)
 {
        float fac2, mfac, fac, fac4;
        int xo;
@@ -373,10 +351,8 @@
        fac4 = facf1;
 
        while (y--) {
-
                x = xo;
                while (x--) {
-
                        /* rt = rt1 under rt2  (alpha from rt2) */
 
                        /* this complex optimization is because the
@@ -405,15 +381,14 @@
                        rt1 += 4; rt2 += 4; rt += 4;
                }
 
-               if (y == 0) break;
+               if (y == 0)
+                       break;
                y--;
 
                x = xo;
                while (x--) {
-
                        if (rt2[3] <= 0 && fac4 >= 1.0f) {
                                memcpy(rt, rt1, 4 * sizeof(float));
- 
                        }
                        else if (rt2[3] >= 1.0f) {
                                memcpy(rt, rt2, 4 * sizeof(float));
@@ -437,38 +412,25 @@
        }
 }
 
-static ImBuf *do_alphaunder_effect(
-        SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
-        float facf0, float facf1,
-        struct ImBuf *ibuf1, struct ImBuf *ibuf2,
-        struct ImBuf *ibuf3)
+static ImBuf *do_alphaunder_effect(SeqRenderData context, Sequence 
*UNUSED(seq), float UNUSED(cfra),
+                                   float facf0, float facf1, ImBuf *ibuf1, 
ImBuf *ibuf2, ImBuf *ibuf3)
 {
-       struct ImBuf *out = prepare_effect_imbufs(
-               context, ibuf1, ibuf2, ibuf3);
+       struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
 
        if (out->rect_float) {
-               do_alphaunder_effect_float(
-                       facf0, facf1, context.rectx, context.recty,
-                       ibuf1->rect_float, ibuf2->rect_float,
-                       out->rect_float);
+               do_alphaunder_effect_float(facf0, facf1, context.rectx, 
context.recty, ibuf1->rect_float,
+                                          ibuf2->rect_float, out->rect_float);
        }
        else {
-               do_alphaunder_effect_byte(
-                       facf0, facf1, context.rectx, context.recty,
-                       (char *) ibuf1->rect, (char *) ibuf2->rect,
-                       (char *) out->rect);
+               do_alphaunder_effect_byte(facf0, facf1, context.rectx, 
context.recty,
+                                         (char *) ibuf1->rect, (char *) 
ibuf2->rect, (char *) out->rect);
        }
        return out;
 }
 
+/*********************** Cross *************************/
 
-/* **********************************************************************
- * CROSS
- * ********************************************************************** */
-
-static void do_cross_effect_byte(float facf0, float facf1, int x, int y, 
-                                 char *rect1, char *rect2,
-                                 char *out)
+static void do_cross_effect_byte(float facf0, float facf1, int x, int y, char 
*rect1, char *rect2, char *out)
 {
        int fac1, fac2, fac3, fac4;
        int xo;
@@ -479,16 +441,14 @@
        rt2 = rect2;
        rt = out;
 
-       fac2 = (int)(256.0f * facf0);
+       fac2 = (int) (256.0f * facf0);
        fac1 = 256 - fac2;
-       fac4 = (int)(256.0f * facf1);
+       fac4 = (int) (256.0f * facf1);
        fac3 = 256 - fac4;
 
        while (y--) {
-
                x = xo;
                while (x--) {
-
                        rt[0] = (fac1 * rt1[0] + fac2 * rt2[0]) >> 8;
                        rt[1] = (fac1 * rt1[1] + fac2 * rt2[1]) >> 8;
                        rt[2] = (fac1 * rt1[2] + fac2 * rt2[2]) >> 8;
@@ -497,12 +457,12 @@
                        rt1 += 4; rt2 += 4; rt += 4;
                }
 
-               if (y == 0) break;
+               if (y == 0)
+                       break;
                y--;
 
                x = xo;
                while (x--) {
-
                        rt[0] = (fac3 * rt1[0] + fac4 * rt2[0]) >> 8;
                        rt[1] = (fac3 * rt1[1] + fac4 * rt2[1]) >> 8;
                        rt[2] = (fac3 * rt1[2] + fac4 * rt2[2]) >> 8;
@@ -514,8 +474,7 @@
        }
 }
 
-static void do_cross_effect_float(float facf0, float facf1, int x, int y, 
-                                  float *rect1, float *rect2, float *out)
+static void do_cross_effect_float(float facf0, float facf1, int x, int y, 
float *rect1, float *rect2, float *out)
 {
        float fac1, fac2, fac3, fac4;
        int xo;
@@ -532,10 +491,8 @@
        fac3 = 1.0f - fac4;
 
        while (y--) {
-
                x = xo;
                while (x--) {
-
                        rt[0] = fac1 * rt1[0] + fac2 * rt2[0];
                        rt[1] = fac1 * rt1[1] + fac2 * rt2[1];
                        rt[2] = fac1 * rt1[2] + fac2 * rt2[2];
@@ -544,12 +501,12 @@
                        rt1 += 4; rt2 += 4; rt += 4;
                }
 
-               if (y == 0) break;
+               if (y == 0)
+                       break;
                y--;
 
                x = xo;
                while (x--) {
-
                        rt[0] = fac3 * rt1[0] + fac4 * rt2[0];
                        rt[1] = fac3 * rt1[1] + fac4 * rt2[1];

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to