avfilter/phase_template: Fix left-shift of negative numbers

Affected the filter-phase FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Andreas Rheinhardt 2 years ago
parent e72e8ec515
commit cf57147da1
  1. 2
      libavfilter/phase_template.c

@ -46,7 +46,7 @@
*
* (The result is actually multiplied by 25)
*/
#define DIFF(a, as, b, bs) ((t) = ((*(a) - (b)[bs]) << 2) + (a)[(as) << 1] - (b)[-(bs)], (t) * (t))
#define DIFF(a, as, b, bs) ((t) = ((*(a) - (b)[bs]) * 4) + (a)[(as) * 2] - (b)[-(bs)], (t) * (t))
/*
* Find which field combination has the smallest average squared difference

Loading…
Cancel
Save