aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-05-03 11:26:40 +0200
committerPaul B Mahol <onemda@gmail.com>2018-05-03 11:29:51 +0200
commitc8c2fb097777df4869b8840de6c8a443ffe08268 (patch)
treea560fe41ae6de985ec8e71a1b5c051fb8df52ed3
parent3a96534ed9dd09c773894e6ed4bb882a765d83a9 (diff)
downloadffmpeg-c8c2fb097777df4869b8840de6c8a443ffe08268.tar.gz
avfilter/vf_convolution: unbreak roberts filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavfilter/vf_convolution.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c
index 2fa030dc05..f973e48a9b 100644
--- a/libavfilter/vf_convolution.c
+++ b/libavfilter/vf_convolution.c
@@ -165,8 +165,8 @@ static void filter16_roberts(uint8_t *dstp, const uint8_t *src, int width,
int x;
for (x = 0; x < width; x++) {
- int suma = AV_RN16A(&c[0][2 * x]) * 1 + AV_RN16A(&c[4][2 * x]) * -1;
- int sumb = AV_RN16A(&c[1][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1;
+ int suma = AV_RN16A(&c[0][2 * x]) * 1 + AV_RN16A(&c[1][2 * x]) * -1;
+ int sumb = AV_RN16A(&c[4][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1;
dst[x] = av_clip(sqrt(suma*suma + sumb*sumb) * scale + delta, 0, peak);
}
@@ -215,8 +215,8 @@ static void filter_roberts(uint8_t *dst, const uint8_t *src, int width,
int x;
for (x = 0; x < width; x++) {
- int suma = c[0][x - 1] * 1 + c[4][x ] * -1;
- int sumb = c[1][x ] * 1 + c[3][x - 1] * -1;
+ int suma = c[0][x] * 1 + c[1][x] * -1;
+ int sumb = c[4][x] * 1 + c[3][x] * -1;
dst[x] = av_clip_uint8(sqrt(suma*suma + sumb*sumb) * scale + delta);
}