]> granicus.if.org Git - libvpx/commitdiff
vp9_mcomp,get_cost_surf_min: quiet conversion warning
authorJames Zern <jzern@google.com>
Tue, 6 Jun 2017 05:52:58 +0000 (22:52 -0700)
committerJames Zern <jzern@google.com>
Tue, 6 Jun 2017 05:52:58 +0000 (22:52 -0700)
visual studio will warn if a 32-bit shift is implicitly converted to 64.
in this case integer storage is enough for the result.
since:
f3a9ae5ba Fix ubsan failure in vp9_mcomp.c.

Change-Id: I7e0e199ef8d3c64e07b780c8905da8c53c1d09fc

vp9/encoder/vp9_mcomp.c

index bcc6838b0894b0f6eb22521f3c6359df98038c0b..f0e0370db39c2579d04bd3cd05f6ef89522a48ec 100644 (file)
@@ -383,7 +383,7 @@ static void get_cost_surf_min(int *cost_list, int *ir, int *ic, int bits) {
   const int64_t y0 = cost_list[1] - 2 * (int64_t)cost_list[0] + cost_list[3];
   const int64_t x1 = (int64_t)cost_list[4] - cost_list[2];
   const int64_t y1 = cost_list[4] - 2 * (int64_t)cost_list[0] + cost_list[2];
-  const int64_t b = 1 << (bits - 1);
+  const int b = 1 << (bits - 1);
   *ic = (int)divide_and_round(x0 * b, y0);
   *ir = (int)divide_and_round(x1 * b, y1);
 }