Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-01-09 22:17:37 +0300
committerTon Roosendaal <ton@blender.org>2006-01-09 22:17:37 +0300
commite62fed936e171b5d5ee71ed7caa23ea730d006ee (patch)
tree2515251448c1b5333496a3139aaac3ad5920d33b /source/blender/imbuf/intern/filter.c
parentbdef14bf81ef896ea0774df752fd606d763632b3 (diff)
Orange: more exr & imbuf cleanup
- Reading exr images now goes OK. I've unified the code for reading 'half' and 'float' (was nicely possible!). And removed useless copying of data around. - Fixed bug in allocating new rects, like for making mipmaps. flag issues. - filter code accidentally incremented wrong pointer (crash on mipmap too)
Diffstat (limited to 'source/blender/imbuf/intern/filter.c')
-rw-r--r--source/blender/imbuf/intern/filter.c66
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++;
}
}
}