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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-27 21:12:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 21:12:59 +0400
commit9c8f1e2ef487483bc374feaed9ff709e07638623 (patch)
tree1157b72533f1b2c2e2082d91562bd9a2da4290fb /source/blender/imbuf/intern/imageprocess.c
parent4237c0393a9d1f089f01dd7c4b223b1f61b15023 (diff)
imbuf, mathutils & readfile: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/imbuf/intern/imageprocess.c')
-rw-r--r--source/blender/imbuf/intern/imageprocess.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index ef787e8b799..fa5e951067d 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -274,8 +274,8 @@ void bilinear_interpolation_color(struct ImBuf *in, unsigned char *outI, float *
if (x2>in->x-1 || y2>in->y-1) row4= empty;
else row4= (float *)in->rect_float + in->x * y2 * 4 + 4*x2;
- a= u-floor(u);
- b= v-floor(v);
+ a= u-floorf(u);
+ b= v-floorf(v);
a_b= a*b; ma_b= (1.0f-a)*b; a_mb= a*(1.0f-b); ma_mb= (1.0f-a)*(1.0f-b);
outF[0]= ma_mb*row1[0] + a_mb*row3[0] + ma_b*row2[0]+ a_b*row4[0];
@@ -297,8 +297,8 @@ void bilinear_interpolation_color(struct ImBuf *in, unsigned char *outI, float *
if (x2>in->x-1 || y2>in->y-1) row4I= emptyI;
else row4I= (unsigned char *)in->rect + in->x * y2 * 4 + 4*x2;
- a= u-floor(u);
- b= v-floor(v);
+ a= u-floorf(u);
+ b= v-floorf(v);
a_b= a*b; ma_b= (1.0f-a)*b; a_mb= a*(1.0f-b); ma_mb= (1.0f-a)*(1.0f-b);
/* need to add 0.5 to avoid rounding down (causes darken with the smear brush)
@@ -348,8 +348,8 @@ void bilinear_interpolation_color_wrap(struct ImBuf *in, unsigned char *outI, fl
row3= (float *)in->rect_float + in->x * y1 * 4 + 4*x2;
row4= (float *)in->rect_float + in->x * y2 * 4 + 4*x2;
- a= u-floor(u);
- b= v-floor(v);
+ a= u-floorf(u);
+ b= v-floorf(v);
a_b= a*b; ma_b= (1.0f-a)*b; a_mb= a*(1.0f-b); ma_mb= (1.0f-a)*(1.0f-b);
outF[0]= ma_mb*row1[0] + a_mb*row3[0] + ma_b*row2[0]+ a_b*row4[0];
@@ -364,8 +364,8 @@ void bilinear_interpolation_color_wrap(struct ImBuf *in, unsigned char *outI, fl
row3I= (unsigned char *)in->rect + in->x * y1 * 4 + 4*x2;
row4I= (unsigned char *)in->rect + in->x * y2 * 4 + 4*x2;
- a= u-floor(u);
- b= v-floor(v);
+ a= u-floorf(u);
+ b= v-floorf(v);
a_b= a*b; ma_b= (1.0f-a)*b; a_mb= a*(1.0f-b); ma_mb= (1.0f-a)*(1.0f-b);
/* need to add 0.5 to avoid rounding down (causes darken with the smear brush)