]> granicus.if.org Git - libvpx/commitdiff
vp8/encoder: quiet some -Wshorten-64-to-32 warnings
authorJames Zern <jzern@google.com>
Tue, 20 Sep 2016 01:32:12 +0000 (18:32 -0700)
committerJames Zern <jzern@google.com>
Tue, 20 Sep 2016 01:35:59 +0000 (18:35 -0700)
this code is similar to other existing uses and/or vp9

Change-Id: I56e646931379759d9f7332ea6d746060007c75ee

vp8/encoder/onyx_if.c
vp8/encoder/pickinter.c

index f61cfbe903292c8887e7fe1a61e8cb69ed1858a5..36d892716377dce77cbf208c231542d70533fb24 100644 (file)
@@ -4384,7 +4384,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, unsigned long *size,
 
   /* Update rate control heuristics */
   cpi->total_byte_count += (*size);
-  cpi->projected_frame_size = (*size) << 3;
+  cpi->projected_frame_size = (int)(*size) << 3;
 
   if (cpi->oxcf.number_of_layers > 1) {
     unsigned int i;
index f0050d201f122c613a77e19dc2848e59d47944cb..7b68d35f50f33a515e8dfbaff121a06be9e462bd 100644 (file)
@@ -570,7 +570,7 @@ static int evaluate_inter_mode(unsigned int *sse, int rate2, int *distortion2,
     // No adjustment if block is considered to be skin area.
     if (x->is_skin) rd_adj = 100;
 
-    this_rd = ((int64_t)this_rd) * rd_adj / 100;
+    this_rd = (int)(((int64_t)this_rd) * rd_adj / 100);
   }
 
   check_for_encode_breakout(*sse, x);