summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est_template.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-09-19 13:18:16 -0400
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-19 23:52:16 +0200
commit11b563ed8f7c1a9183ba77680d9040fc384733d5 (patch)
tree1547e7cb27dcd7cacd3aaf8cdc87f0cfdc7db67b /libavcodec/motion_est_template.c
parent39ca7641c8c8ce7031dc67584067dc1faecd6a2d (diff)
avcodec/motion_est_template: fix undefined left shift of negative number
This fixes -Wshift-negative-value reported with clang 3.7+, e.g http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r--libavcodec/motion_est_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 25bab9ddfb..2141771fa9 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -702,7 +702,7 @@ 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;