lavfi/noise: use av_image_copy_plane()
[ffmpeg.git] / libavfilter / vf_noise.c
index 62852c7b0e777c4abd5465933c25a9fff9ee9f27..12aca24fa65f65aae8b8a7acd0af33f47906f209 100644 (file)
@@ -338,14 +338,8 @@ static void noise(uint8_t *dst, const uint8_t *src,
     int shift, y;
 
     if (!noise) {
-        if (dst != src) {
-            for (y = 0; y < height; y++) {
-                memcpy(dst, src, width);
-                dst += dst_linesize;
-                src += src_linesize;
-            }
-        }
-
+        if (dst != src)
+            av_image_copy_plane(dst, dst_linesize, src, src_linesize, width, height);
         return;
     }