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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-11-17 17:38:39 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-17 17:38:39 +0400
commit5392ff780b0124cbe6b27d36095ee6cc1175aeb6 (patch)
tree08a790a8fe081e1c809ff14c43de2cce1b821e89 /source/blender/blenlib/intern/math_interp.c
parent13ea663590f088e81e7924764434320b31575c86 (diff)
Fix #33210: Diffuse Pass in scale node leads to problems
Was own mistake in render layers interpolation changes.
Diffstat (limited to 'source/blender/blenlib/intern/math_interp.c')
-rw-r--r--source/blender/blenlib/intern/math_interp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c
index 59a1c1f649c..5a9e8244a46 100644
--- a/source/blender/blenlib/intern/math_interp.c
+++ b/source/blender/blenlib/intern/math_interp.c
@@ -134,12 +134,12 @@ BLI_INLINE void bicubic_interpolation(const unsigned char *byte_buffer, const fl
w = wx * wy[m + 1];
if (float_output) {
- const float *float_data = float_buffer + width * y1 * 4 + 4 * x1;
+ const float *float_data = float_buffer + width * y1 * components + components * x1;
vector_from_float(float_data, data, components);
}
else {
- const unsigned char *byte_data = byte_buffer + width * y1 * 4 + 4 * x1;
+ const unsigned char *byte_data = byte_buffer + width * y1 * components + components * x1;
vector_from_byte(byte_data, data, components);
}
@@ -173,12 +173,12 @@ BLI_INLINE void bicubic_interpolation(const unsigned char *byte_buffer, const fl
float data[4];
if (float_output) {
- const float *float_data = float_buffer + width * y1 * 4 + 4 * x1;
+ const float *float_data = float_buffer + width * y1 * components + components * x1;
vector_from_float(float_data, data, components);
}
else {
- const unsigned char *byte_data = byte_buffer + width * y1 * 4 + 4 * x1;
+ const unsigned char *byte_data = byte_buffer + width * y1 * components + components * x1;
vector_from_byte(byte_data, data, components);
}
@@ -270,16 +270,16 @@ BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer, const f
/* sample including outside of edges of image */
if (x1 < 0 || y1 < 0) row1 = empty;
- else row1 = float_buffer + width * y1 * 4 + 4 * x1;
+ else row1 = float_buffer + width * y1 * components + components * x1;
if (x1 < 0 || y2 > height - 1) row2 = empty;
- else row2 = float_buffer + width * y2 * 4 + 4 * x1;
+ else row2 = float_buffer + width * y2 * components + components * x1;
if (x2 > width - 1 || y1 < 0) row3 = empty;
- else row3 = float_buffer + width * y1 * 4 + 4 * x2;
+ else row3 = float_buffer + width * y1 * components + components * x2;
if (x2 > width - 1 || y2 > height - 1) row4 = empty;
- else row4 = float_buffer + width * y2 * 4 + 4 * x2;
+ else row4 = float_buffer + width * y2 * components + components * x2;
a = u - floorf(u);
b = v - floorf(v);
@@ -306,16 +306,16 @@ BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer, const f
/* sample including outside of edges of image */
if (x1 < 0 || y1 < 0) row1 = empty;
- else row1 = byte_buffer + width * y1 * 4 + 4 * x1;
+ else row1 = byte_buffer + width * y1 * components + components * x1;
if (x1 < 0 || y2 > height - 1) row2 = empty;
- else row2 = byte_buffer + width * y2 * 4 + 4 * x1;
+ else row2 = byte_buffer + width * y2 * components + components * x1;
if (x2 > width - 1 || y1 < 0) row3 = empty;
- else row3 = byte_buffer + width * y1 * 4 + 4 * x2;
+ else row3 = byte_buffer + width * y1 * components + components * x2;
if (x2 > width - 1 || y2 > height - 1) row4 = empty;
- else row4 = byte_buffer + width * y2 * 4 + 4 * x2;
+ else row4 = byte_buffer + width * y2 * components + components * x2;
a = u - floorf(u);
b = v - floorf(v);