diff mbox series

[FFmpeg-devel,2/2] avcodec/motion_est_template: Fix invalid shifts in no_sub_motion_search()

Message ID 20200123120312.10077-2-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/2] avcodec/mpegaudioenc_template: fix invalid shift of sample
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Michael Niedermayer Jan. 23, 2020, 12:03 p.m. UTC
Fixes: Ticket8167

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/motion_est_template.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 014038e54f..13e73f2653 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -157,8 +157,8 @@  static int no_sub_motion_search(MpegEncContext * s,
                                   int src_index, int ref_index,
                                   int size, int h)
 {
-    (*mx_ptr)<<=1;
-    (*my_ptr)<<=1;
+    (*mx_ptr) *= 2;
+    (*my_ptr) *= 2;
     return dmin;
 }