aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_unsharp.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-16 13:36:42 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-16 13:38:03 +0200
commitfaceb0af0aef90fafd827e47a912be40fff92844 (patch)
tree1d2508bf8e6111551a6f4cc603bf51aaeec92e7a /libavfilter/vf_unsharp.c
parent5c7a33a716101ad1ef94f1a49b7e7a99c7b72f94 (diff)
downloadffmpeg-faceb0af0aef90fafd827e47a912be40fff92844.tar.gz
lavfi/unsharp: use av_image_copy_plane().
Diffstat (limited to 'libavfilter/vf_unsharp.c')
-rw-r--r--libavfilter/vf_unsharp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index c482d6b1bc..94bc6019de 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -43,6 +43,7 @@
#include "internal.h"
#include "video.h"
#include "libavutil/common.h"
+#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
@@ -66,11 +67,7 @@ static void apply_unsharp( uint8_t *dst, int dst_stride,
const int32_t halfscale = fp->halfscale;
if (!amount) {
- if (dst_stride == src_stride)
- memcpy(dst, src, src_stride * height);
- else
- for (y = 0; y < height; y++, dst += dst_stride, src += src_stride)
- memcpy(dst, src, width);
+ av_image_copy_plane(dst, dst_stride, src, src_stride, width, height);
return;
}