summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/nlmeans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/nlmeans.c b/libhb/nlmeans.c
index 3d096745e..3da7d7721 100644
--- a/libhb/nlmeans.c
+++ b/libhb/nlmeans.c
@@ -652,7 +652,7 @@ static void nlmeans_plane(NLMeansFunctions *functions,
struct PixelSum *tmp_data = calloc(dst_w * dst_h, sizeof(struct PixelSum));
// Allocate integral image
- const int integral_stride = dst_w + 2 * 16;
+ const int integral_stride = ((dst_w + 15) / 16 * 16) + 2 * 16;
uint32_t* const integral_mem = calloc(integral_stride * (dst_h+1), sizeof(uint32_t));
uint32_t* const integral = integral_mem + integral_stride + 16;