shithub: libvpx

Download patch

ref: 6f3172295052d485dd633ac1218d64b9c2b01f3a
parent: 00170953b1b9920a92717097b3606281b5fe3f08
author: hui su <[email protected]>
date: Tue Oct 13 06:16:51 EDT 2015

Fix compiler warnings

Change-Id: I761256a8100d83abf1b937f3739580237e3fad2a

--- a/vp10/encoder/bitstream.c
+++ b/vp10/encoder/bitstream.c
@@ -1355,10 +1355,10 @@
 
 void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size) {
   uint8_t *data = dest;
-  size_t first_part_size, uncompressed_hdr_size;
+  size_t first_part_size, uncompressed_hdr_size, data_sz;
   struct vpx_write_bit_buffer wb = {data, 0};
   struct vpx_write_bit_buffer saved_wb;
-  unsigned int max_tile, data_sz;
+  unsigned int max_tile;
 #if CONFIG_MISC_FIXES
   VP10_COMMON *const cm = &cpi->common;
   const int n_log2_tiles = cm->log2_tile_rows + cm->log2_tile_cols;
--- a/vp10/encoder/bitstream.h
+++ b/vp10/encoder/bitstream.h
@@ -18,7 +18,7 @@
 
 #include "vp10/encoder/encoder.h"
 
-void vp10_pack_bitstream(VP10_COMP *cpi, uint8_t *dest, size_t *size);
+void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size);
 
 static INLINE int vp10_preserve_existing_gf(VP10_COMP *cpi) {
   return !cpi->multi_arf_allowed && cpi->refresh_golden_frame &&
--- a/vpx_dsp/psnrhvs.c
+++ b/vpx_dsp/psnrhvs.c
@@ -191,7 +191,7 @@
       for (i = 0; i < 8; i++) {
         for (j = 0; j < 8; j++) {
           float err;
-          err = fabs(dct_s_coef[i * 8 + j] - dct_d_coef[i * 8 + j]);
+          err = fabs((float)(dct_s_coef[i * 8 + j] - dct_d_coef[i * 8 + j]));
           if (i != 0 || j != 0)
             err = err < s_mask / mask[i][j] ? 0 : err - s_mask / mask[i][j];
           ret += (err * _csf[i][j]) * (err * _csf[i][j]);