Orange: more exr & imbuf cleanup
[blender.git] / source / blender / imbuf / intern / filter.c
index e51f85ab2d6c76c76b808c5de48fbef8380b9cc5..9e62a9edfb5c6ab7678f3b7f48e06d5484c637b1 100644 (file)
@@ -67,21 +67,21 @@ static void filtrow(unsigned char *point, int x)
 
 static void filtrowf(float *point, int x)
 {
-        float c1,c2,c3,error;
-
-        if (x>1){
-                c1 = c2 = *point;
-                error = 2;
-                for(x--;x>0;x--){
-                        c3 = point[4];
-                        c1 += (c2 * 2) + c3 + error;
-                        *point = c1 / 4.0;
-                        point += 4;
-                        c1=c2;
-                        c2=c3;
-                }
-                *point = (c1 + (c2 * 2) + c2 + error) / 4.0;
-        }
+       float c1,c2,c3,error;
+       
+       if (x>1){
+               c1 = c2 = *point;
+               error = 2;
+               for(x--;x>0;x--){
+                       c3 = point[4];
+                       c1 += (c2 * 2) + c3 + error;
+                       *point = c1 / 4.0;
+                       point += 4;
+                       c1=c2;
+                       c2=c3;
+               }
+               *point = (c1 + (c2 * 2) + c2 + error) / 4.0;
+       }
 }
 
 
@@ -111,23 +111,23 @@ static void filtcolum(unsigned char *point, int y, int skip)
 
 static void filtcolumf(float *point, int y, int skip)
 {
-        float c1,c2,c3,error, *point2;
-
-        if (y>1){
-                c1 = c2 = *point;
-                point2 = point;
-                error = 2;
-                for(y--;y>0;y--){
-                        point2 += skip;
-                        c3 = *point2;
-                        c1 += (c2 * 2) + c3 +error;
-                        *point = c1 / 4;
-                        point=point2;
-                        c1=c2;
-                        c2=c3;
-                }
-                *point = (c1 + (c2 * 2) + c2 + error) / 4;
-        }
+       float c1,c2,c3,error, *point2;
+       
+       if (y>1){
+               c1 = c2 = *point;
+               point2 = point;
+               error = 2;
+               for(y--;y>0;y--){
+                       point2 += skip;
+                       c3 = *point2;
+                       c1 += (c2 * 2) + c3 +error;
+                       *point = c1 / 4;
+                       point=point2;
+                       c1=c2;
+                       c2=c3;
+               }
+               *point = (c1 + (c2 * 2) + c2 + error) / 4;
+       }
 }
 
 void IMB_filtery(struct ImBuf *ibuf)
@@ -162,7 +162,7 @@ void IMB_filtery(struct ImBuf *ibuf)
                        filtcolumf(pointf,y,skip);
                        pointf++;
                        filtcolumf(pointf,y,skip);
-                       point++;
+                       pointf++;
                }
        }
 }