[FFmpeg-cvslog] lavfi/noise: use av_image_copy_plane()
Paul B Mahol
git at videolan.org
Sun May 26 12:57:11 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun May 26 10:52:57 2013 +0000| [40a87a6a69d95f288ff72348d817aea02acb8140] | committer: Paul B Mahol
lavfi/noise: use av_image_copy_plane()
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40a87a6a69d95f288ff72348d817aea02acb8140
---
libavfilter/vf_noise.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 62852c7..12aca24 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;
}
More information about the ffmpeg-cvslog
mailing list