Commit faa09008 authored by Janne Grunau's avatar Janne Grunau Committed by Ronald S. Bultje

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.
parent 3fdb6cc9
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment