ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanaga...@gmail.com> | Sat Sep 
26 16:24:01 2015 +0200| [4885bde3187a2bb0cae85b67796e07db233bf77f] | committer: 
Vittorio Giovara

motion_est_template: Fix undefined left shift of negative number

This fixes a -Wshift-negative-value warning reported with clang 3.7+.

Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4885bde3187a2bb0cae85b67796e07db233bf77f
---

 libavcodec/motion_est_template.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 01936c6..33f3dcb 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -704,7 +704,8 @@ static int sab_diamond_search(MpegEncContext * s, int 
*best, int dmin,
 
         key += (1<<(ME_MAP_MV_BITS-1)) + (1<<(2*ME_MAP_MV_BITS-1));
 
-        if((key&((-1)<<(2*ME_MAP_MV_BITS))) != map_generation) continue;
+        if ((key & (-(1 << (2 * ME_MAP_MV_BITS)))) != map_generation)
+            continue;
 
         minima[j].height= score_map[i];
         minima[j].x= key & ((1<<ME_MAP_MV_BITS)-1); key>>=ME_MAP_MV_BITS;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to