diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-11-06 17:15:22 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-11-09 17:39:00 +0100 |
commit | cf57147da1e8d93d51288dc40ae1bcd11bbc4a0b (patch) | |
tree | 65c6b4d06c7a7886b164335eb962d079848ca88e /libavfilter/phase_template.c | |
parent | e72e8ec515faffb4819ea355b47e6bee382a0456 (diff) | |
download | ffmpeg-cf57147da1e8d93d51288dc40ae1bcd11bbc4a0b.tar.gz |
avfilter/phase_template: Fix left-shift of negative numbers
Affected the filter-phase FATE-test.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/phase_template.c')
-rw-r--r-- | libavfilter/phase_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/phase_template.c b/libavfilter/phase_template.c index 491612b826..8450670234 100644 --- a/libavfilter/phase_template.c +++ b/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 |