]> granicus.if.org Git - libvpx/commitdiff
fix warnings for building on win32 eider
authorScott Graham <scottmg@chromium.org>
Tue, 8 May 2012 18:45:35 +0000 (11:45 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Mon, 23 Jul 2012 21:23:44 +0000 (14:23 -0700)
Change-Id: If6e11ba3d681e831d7d98662c0abdd2ac16b3811

vp8/common/onyx.h
vp8/decoder/decodframe.c
vp8/decoder/onyxd_if.c
vp8/decoder/onyxd_int.h
vp8/decoder/threading.c
vp8/encoder/block.h
vp8/encoder/onyx_if.c
vp8/encoder/pickinter.c
vp8/encoder/ratectrl.c
vp8/encoder/rdopt.c
vp8/vp8_cx_iface.c

index 2e282f6d533ca9fd042c001a97fb61562204d430..2c8188a6329b7baad0cbf7dcb5bdb5ec723e5625 100644 (file)
@@ -106,7 +106,7 @@ extern "C"
         int Width;              // width of data passed to the compressor
         int Height;             // height of data passed to the compressor
         struct vpx_rational  timebase;
-        int target_bandwidth;    // bandwidth to be used in kilobits per second
+        unsigned int target_bandwidth;    // bandwidth to be used in kilobits per second
 
         int noise_sensitivity;   // parameter used for applying pre processing blur: recommendation 0
         int Sharpness;          // parameter used for sharpening output: recommendation 0:
index 62a068b82fc25fc9e3f9441aca7415c2252160fe..9662dbda76ad913066ba5a06ea452f7a53097534 100644 (file)
@@ -549,8 +549,8 @@ static void setup_token_decoder(VP8D_COMP *pbi,
 {
     vp8_reader *bool_decoder = &pbi->bc2;
     unsigned int partition_idx;
-    int fragment_idx;
-    int num_token_partitions;
+    unsigned int fragment_idx;
+    unsigned int num_token_partitions;
     const unsigned char *first_fragment_end = pbi->fragments[0] +
                                           pbi->fragment_sizes[0];
 
@@ -1132,7 +1132,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
 #if CONFIG_MULTITHREAD
     if (pbi->b_multithreaded_rd && pc->multi_token_partition != ONE_PARTITION)
     {
-        int i;
+        unsigned int i;
         vp8mt_decode_mb_rows(pbi, xd);
         vp8_yv12_extend_frame_borders(&pc->yv12_fb[pc->new_fb_idx]);    /*cm->frame_to_show);*/
         for (i = 0; i < pbi->decoding_thread_count; ++i)
index 2a9a11b4a3b001ecc4a7484f071a3bbb36e4c199..89e7cc238ae970f97be29e7c330cb54d6fff1fc0 100644 (file)
@@ -300,7 +300,7 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, unsigned long size, const unsi
     if (pbi->num_fragments == 0)
     {
         /* New frame, reset fragment pointers and sizes */
-        vpx_memset(pbi->fragments, 0, sizeof(pbi->fragments));
+        vpx_memset((void*)pbi->fragments, 0, sizeof(pbi->fragments));
         vpx_memset(pbi->fragment_sizes, 0, sizeof(pbi->fragment_sizes));
     }
     if (pbi->input_fragments && !(source == NULL && size == 0))
index 97cf0dceaaae7572a5b12bf5e1f239a14a172b37..7e484618c863742f36ece22c2e0d3bd5c5a1a214 100644 (file)
@@ -62,7 +62,7 @@ typedef struct VP8D_COMP
     volatile int b_multithreaded_rd;
     int max_threads;
     int current_mb_col_main;
-    int decoding_thread_count;
+    unsigned int decoding_thread_count;
     int allocated_decoding_thread_count;
 
     int mt_baseline_filter_level[MAX_MB_SEGMENTS];
index 47a0349df03229aa5fe1af43db540e27f99a715b..e898b305dd6577f8ee148f2fdeaa73e1a52877d5 100644 (file)
@@ -667,7 +667,7 @@ static THREAD_FUNCTION thread_decoding_proc(void *p_data)
 void vp8_decoder_create_threads(VP8D_COMP *pbi)
 {
     int core_count = 0;
-    int ithread;
+    unsigned int ithread;
 
     pbi->b_multithreaded_rd = 0;
     pbi->allocated_decoding_thread_count = 0;
@@ -881,7 +881,8 @@ void vp8_decoder_remove_threads(VP8D_COMP *pbi)
 void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
 {
     VP8_COMMON *pc = &pbi->common;
-    int i;
+    unsigned int i;
+    int j;
 
     int filter_level = pc->filter_level;
 
@@ -892,19 +893,19 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
         vpx_memset(pbi->mt_uabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (pc->yv12_fb[pc->lst_fb_idx].y_width>>1) +5);
         vpx_memset(pbi->mt_vabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (pc->yv12_fb[pc->lst_fb_idx].y_width>>1) +5);
 
-        for (i=1; i<pc->mb_rows; i++)
+        for (j=1; j<pc->mb_rows; j++)
         {
-            vpx_memset(pbi->mt_yabove_row[i] + VP8BORDERINPIXELS-1, (unsigned char)129, 1);
-            vpx_memset(pbi->mt_uabove_row[i] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
-            vpx_memset(pbi->mt_vabove_row[i] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
+            vpx_memset(pbi->mt_yabove_row[j] + VP8BORDERINPIXELS-1, (unsigned char)129, 1);
+            vpx_memset(pbi->mt_uabove_row[j] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
+            vpx_memset(pbi->mt_vabove_row[j] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
         }
 
         /* Set left_col to 129 initially */
-        for (i=0; i<pc->mb_rows; i++)
+        for (j=0; j<pc->mb_rows; j++)
         {
-            vpx_memset(pbi->mt_yleft_col[i], (unsigned char)129, 16);
-            vpx_memset(pbi->mt_uleft_col[i], (unsigned char)129, 8);
-            vpx_memset(pbi->mt_vleft_col[i], (unsigned char)129, 8);
+            vpx_memset(pbi->mt_yleft_col[j], (unsigned char)129, 16);
+            vpx_memset(pbi->mt_uleft_col[j], (unsigned char)129, 8);
+            vpx_memset(pbi->mt_vleft_col[j], (unsigned char)129, 8);
         }
 
         /* Initialize the loop filter for this frame. */
index a98fd50f0ddbc84a4241d083e71cf22f3a27ad69..edf612507501fd4ef07769b6ade94bca75d312c7 100644 (file)
@@ -107,7 +107,7 @@ typedef struct macroblock
 
     int skip;
 
-    int encode_breakout;
+    unsigned int encode_breakout;
 
     //char * gf_active_ptr;
     signed char *gf_active_ptr;
index 878cad48b6f9da2e539d19dedb79004d1fd1ccd9..7e39cf6762fe1780412f0b61a0eafd9d135ba33c 100644 (file)
@@ -4909,7 +4909,7 @@ int vp8_get_compressed_data(VP8_COMP *cpi, unsigned int *frame_flags, unsigned l
 
             if (cpi->oxcf.number_of_layers > 1)
             {
-                int i;
+                unsigned int i;
 
                 // Update frame rates for each layer
                 for (i=0; i<cpi->oxcf.number_of_layers; i++)
index 7f817131606296e3ccafa91bd11b035bfc399f89..ef26ebe7e6c34c6dc371885a62d4c0168571d630 100644 (file)
@@ -458,7 +458,7 @@ static void check_for_encode_breakout(unsigned int sse, MACROBLOCK* x)
     if (sse < x->encode_breakout)
     {
         // Check u and v to make sure skip is ok
-        int sse2 = 0;
+        unsigned int sse2 = 0;
 
         sse2 = VP8_UVSSE(x);
 
index 472e85f2b0dce10c072750c7d97c8106b685e98d..baa3d930d11902efbb3b3443286b88d748f97552 100644 (file)
@@ -357,7 +357,7 @@ static void calc_iframe_target_size(VP8_COMP *cpi)
 {
     // boost defaults to half second
     int kf_boost;
-    int target;
+    unsigned int target;
 
     // Clear down mmx registers to allow floating point in what follows
     vp8_clear_system_state();  //__asm emms;
index 27956b154ba95cfa5ec2413ec91161478806bc61..ede9c7794c3bd8e4a50c4cc70064289b471a3236 100644 (file)
@@ -1766,7 +1766,7 @@ static int evaluate_inter_mode_rd(int mdcounts[4],
     {
         unsigned int sse;
         unsigned int var;
-        int threshold = (xd->block[0].dequant[1]
+        unsigned int threshold = (xd->block[0].dequant[1]
                     * xd->block[0].dequant[1] >>4);
 
         if(threshold < x->encode_breakout)
@@ -1785,7 +1785,7 @@ static int evaluate_inter_mode_rd(int mdcounts[4],
                 (sse /2 > var && sse-var < 64))
             {
                 // Check u and v to make sure skip is ok
-                int sse2=  VP8_UVSSE(x);
+                unsigned int sse2 = VP8_UVSSE(x);
                 if (sse2 * 2 < threshold)
                 {
                     x->skip = 1;
index 4bc6760fee47432fb17f8a1b109e97a733845ae3..71e25c1e6761321d62ed8d26ca494a9161273292 100644 (file)
@@ -228,7 +228,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t      *ctx,
 
     if (cfg->ts_number_layers > 1)
     {
-        int i;
+        unsigned int i;
         RANGE_CHECK_HI(cfg, ts_periodicity, 16);
 
         for (i=1; i<cfg->ts_number_layers; i++)