diff options
Diffstat (limited to 'source/blender/imbuf/intern/filter.c')
-rw-r--r-- | source/blender/imbuf/intern/filter.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index e51f85ab2d6..9e62a9edfb5 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -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++; } } } |