aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_noise.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-05-26 10:52:57 +0000
committerPaul B Mahol <onemda@gmail.com>2013-05-26 10:52:57 +0000
commit40a87a6a69d95f288ff72348d817aea02acb8140 (patch)
tree6397d11f0c9ff18e1da040ca60986dda4c96caeb /libavfilter/vf_noise.c
parent4cf7b87551f2fd2d6f746acda15d33ded192624d (diff)
downloadffmpeg-40a87a6a69d95f288ff72348d817aea02acb8140.tar.gz
lavfi/noise: use av_image_copy_plane()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_noise.c')
-rw-r--r--libavfilter/vf_noise.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 62852c7b0e..12aca24fa6 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -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;
}