[FFmpeg-cvslog] avfilter/phase_template: Fix left-shift of negative numbers
Andreas Rheinhardt
git at videolan.org
Wed Nov 9 19:01:57 EET 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Nov 6 17:15:22 2022 +0100| [cf57147da1e8d93d51288dc40ae1bcd11bbc4a0b] | committer: Andreas Rheinhardt
avfilter/phase_template: Fix left-shift of negative numbers
Affected the filter-phase FATE-test.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf57147da1e8d93d51288dc40ae1bcd11bbc4a0b
---
libavfilter/phase_template.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
More information about the ffmpeg-cvslog
mailing list