Skip to content

Instantly share code, notes, and snippets.

@pedrocr
Created May 9, 2015 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrocr/d8d1284fd2fa83162c4d to your computer and use it in GitHub Desktop.
Save pedrocr/d8d1284fd2fa83162c4d to your computer and use it in GitHub Desktop.
interpolation warning fix
diff --git a/src/common/interpolation.c b/src/common/interpolation.c
index 78b837e..ca24008 100644
--- a/src/common/interpolation.c
+++ b/src/common/interpolation.c
@@ -786,9 +786,9 @@ float dt_interpolation_compute_sample(const struct dt_interpolation *itor, const
{
int clip_x = clip(ix + j, 0, width - 1, bordermode);
const float *ipixel = in + clip_y * linestride + clip_x * samplestride;
- h += kernelh[j] * ipixel[0];
+ h += kernelh[j%8] * ipixel[0];
}
- s += kernelv[i] * h;
+ s += kernelv[i%8] * h;
}
r = s / (normh * normv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment