Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <janne-vlc@jannau.net>2018-11-14 14:21:21 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2018-11-14 15:01:12 +0300
commitfaa090082febba0719d650238ce0cc51565551ed (patch)
tree5482985e713bcb92a8190d8a8b4cde8115a02964 /src/mc_tmpl.c
parent3fdb6cc9bdec93f2cb39afdf8ccceffe248340e6 (diff)
mc: ensure order of evaluation of macro arguments in FILTER_BILIN
Fixes undefined shifts in put_bilin_scaled_c with clusterfuzz-testcase-minimized-dav1d_fuzzer_mt-5732654503165952. Credits to oss-fuzz.
Diffstat (limited to 'src/mc_tmpl.c')
-rw-r--r--src/mc_tmpl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mc_tmpl.c b/src/mc_tmpl.c
index add9b0c..04e6fa8 100644
--- a/src/mc_tmpl.c
+++ b/src/mc_tmpl.c
@@ -335,7 +335,7 @@ filter_fns(sharp_regular, FILTER_8TAP_SHARP, FILTER_8TAP_REGULAR)
filter_fns(sharp_smooth, FILTER_8TAP_SHARP, FILTER_8TAP_SMOOTH)
#define FILTER_BILIN(src, x, mxy, stride) \
- (16 * src[x] + (mxy * (src[x + stride] - src[x])))
+ (16 * src[x] + ((mxy) * (src[x + stride] - src[x])))
#define FILTER_BILIN_RND(src, x, mxy, stride, sh) \
((FILTER_BILIN(src, x, mxy, stride) + ((1 << sh) >> 1)) >> sh)