lavfi/noise: use av_image_copy_plane()
authorPaul B Mahol <onemda@gmail.com>
Sun, 26 May 2013 10:52:57 +0000 (10:52 +0000)
committerPaul B Mahol <onemda@gmail.com>
Sun, 26 May 2013 10:52:57 +0000 (10:52 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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;
     }