summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/nlmeans.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libhb/nlmeans.c b/libhb/nlmeans.c
index 153043659..9770fe0f4 100644
--- a/libhb/nlmeans.c
+++ b/libhb/nlmeans.c
@@ -616,10 +616,7 @@ static void nlmeans_prefilter(BorderedPlane *src,
// Duplicate plane
uint8_t *mem_pre = malloc(bw * bh * sizeof(uint8_t));
uint8_t *image_pre = mem_pre + border + bw * border;
- for (int y = 0; y < h; y++)
- {
- memcpy(mem_pre + y * bw, mem + y * bw, bw);
- }
+ memcpy(mem_pre, mem, bw * bh * sizeof(uint8_t));
// Filter plane; should already have at least 2px extra border on each side
if (filter_type & NLMEANS_PREFILTER_MODE_CSM5X5)