Commit 932913f0 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_edgedetect: fix undefined behaviour

Fixes #8287
parent 7b94b222
......@@ -216,7 +216,7 @@ static int get_rounded_direction(int gx, int gy)
if (gx < 0)
gx = -gx, gy = -gy;
gy <<= 16;
gy *= (1 << 16);
tanpi8gx = 27146 * gx;
tan3pi8gx = 158218 * gx;
if (gy > -tan3pi8gx && gy < -tanpi8gx) return DIRECTION_45UP;
......
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