]> granicus.if.org Git - libvpx/commitdiff
Fix a bunch of warnings.
authorChristian Duvivier <cduvivier@google.com>
Fri, 15 Jun 2012 01:14:43 +0000 (18:14 -0700)
committerChristian Duvivier <cduvivier@google.com>
Tue, 19 Jun 2012 00:30:36 +0000 (17:30 -0700)
Change-Id: I883b4f63559c1cf66a25016e946b1b1ae98a20da

20 files changed:
vp8/common/alloccommon.c
vp8/common/entropy.c
vp8/common/idctllm.c
vp8/common/implicit_segmentation.c
vp8/common/pred_common.c
vp8/decoder/decodframe.c
vp8/encoder/bitstream.c
vp8/encoder/bitstream.h
vp8/encoder/encodeframe.c
vp8/encoder/encodeintra.c
vp8/encoder/encodemb.c
vp8/encoder/firstpass.c
vp8/encoder/modecosts.c
vp8/encoder/onyx_if.c
vp8/encoder/quantize.h
vp8/encoder/ratectrl.c
vp8/encoder/ratectrl.h
vp8/encoder/rdopt.c
vp8/encoder/rdopt.h
vp8/encoder/treewriter.h

index 2830c3e15d946d79145e72a4a28132a0d17aa464..5c7aa2e5e88543f12a40e250cf740cd68a8bab0d 100644 (file)
@@ -37,9 +37,6 @@ static void update_mode_info_border( VP8_COMMON *cpi, MODE_INFO *mi_base )
 }
 static void update_mode_info_in_image( VP8_COMMON *cpi, MODE_INFO *mi )
 {
-    int stride = cpi->mode_info_stride;
-    int rows = cpi->mb_rows;
-    int cols = cpi->mb_cols;
     int i, j;
 
     // For each in image mode_info element set the in image flag to 1
index 0b0a2357fe85ce3c82c6cd325d315b02ec7c2e92..387742266d777e1b425caaf6812e886e069015c2 100644 (file)
@@ -179,7 +179,6 @@ const vp8_prob updprobs[4] = {128, 136, 120, 112};
 
 void vp8_default_coef_probs(VP8_COMMON *pc)
 {
-    int h;
     vpx_memcpy(pc->fc.coef_probs, default_coef_probs,
                    sizeof(default_coef_probs));
 
index b2523ba7cfc3ff6203c2620f45eb774d6b721cc7..75ce8d44d0db10d3922cfa0ed0b8fc755d068edd 100644 (file)
@@ -389,7 +389,7 @@ void vp8_short_idct8x8_c(short *coefs, short *block, int pitch)
 
 void vp8_short_ihaar2x2_c(short *input, short *output, int pitch)
 {
-   int i, x;
+   int i;
    short *ip = input; //0,1, 4, 8
    short *op = output;
    for (i = 0; i < 16; i++)
index 3f72f8455243ddd67f226c2ff584423c5857e1e7..68bb31cca2f29984c9b26e5b1f3142ca10e1f588 100644 (file)
@@ -11,7 +11,9 @@
 #include "vp8/common/onyxc_int.h"
 
 #define MAX_REGIONS 24000
+#ifndef NULL
 #define NULL 0
+#endif
 
 #define min_mbs_in_region 3
 
index f7222a7ecf581bf1b079e3b6907aae354d03f0bf..02a62657533039506cfc2fb6eaf3a205b13d1fb8 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include "vp8/common/pred_common.h"
+#include "vp8/common/seg_common.h"
 
 // TBD prediction functions for various bitstream signals
 
index 0bfef9dddc764bdb57ecec03732bedd9252b1192..d720c007d7cb43792f8fece5061ccf7e055f1762 100644 (file)
@@ -1004,10 +1004,10 @@ int vp8_decode_frame(VP8D_COMP *pbi)
     MACROBLOCKD *const xd  = & pbi->mb;
     const unsigned char *data = (const unsigned char *)pbi->Source;
     const unsigned char *data_end = data + pbi->source_sz;
-    ptrdiff_t first_partition_length_in_bytes;
+    ptrdiff_t first_partition_length_in_bytes = 0;
 
     int mb_row;
-    int i, j, k, l;
+    int i, j;
     int corrupt_tokens = 0;
 
     /* start with no corruption of current frame */
index 05734a591b4f4cd8124433c8a1bac908e73eab65..ee805110b59e99e20afd54cac603103b9dea70a6 100644 (file)
@@ -22,6 +22,7 @@
 #include "vpx/vpx_encoder.h"
 #include "vpx_mem/vpx_mem.h"
 #include "bitstream.h"
+#include "segmentation.h"
 
 #include "vp8/common/seg_common.h"
 #include "vp8/common/pred_common.h"
@@ -1397,7 +1398,9 @@ void build_coeff_contexts(VP8_COMP *cpi)
             int k = 0;
             do
             {
+#ifdef ENTROPY_STATS
                 int t;
+#endif
 #if CONFIG_EXPANDED_COEF_CONTEXT
                 if (k >=3 && ((i == 0 && j == 1) || (i > 0 && j == 0)))
                     continue;
@@ -1444,7 +1447,9 @@ void build_coeff_contexts(VP8_COMP *cpi)
                     /* calc probs and branch cts for this frame only */
                     //vp8_prob new_p           [ENTROPY_NODES];
                     //unsigned int branch_ct   [ENTROPY_NODES] [2];
+#ifdef ENTROPY_STATS
                     int t = 0;      /* token/prob index */
+#endif
 #if CONFIG_EXPANDED_COEF_CONTEXT
                     if (k >=3 && ((i == 0 && j == 1) || (i > 0 && j == 0)))
                         continue;
index 39fa642a598c8c81da6ff733b71069c024f6b614..78fb26f66aa18c1c7daf5cc5848a245931642f80 100644 (file)
@@ -23,3 +23,5 @@ void vp8cx_pack_tokens_armv5(vp8_writer *w, const TOKENEXTRA *p, int xcount,
 # define pack_tokens(a,b,c)                  pack_tokens_c(a,b,c)
 #endif
 #endif
+
+void update_skip_probs(VP8_COMP *cpi);
index 2dfdd4cbd5fe3bdb2b9e40e31059ff140c53f665..a92bdbcda278eda0ecd49d9731067515f0348d67 100644 (file)
@@ -707,7 +707,7 @@ static void encode_sb ( VP8_COMP *cpi,
                         MACROBLOCKD *xd,
                         TOKENEXTRA **tp )
 {
-    int i, j;
+    int i;
     int map_index;
     int mb_row, mb_col;
     int recon_yoffset, recon_uvoffset;
@@ -1301,7 +1301,6 @@ void vp8_encode_frame(VP8_COMP *cpi)
     if (cpi->sf.RD)
     {
         int frame_type, pred_type;
-        int redo = 0;
         int single_diff, comp_diff, hybrid_diff;
 
         /*
@@ -1608,9 +1607,6 @@ void vp8cx_encode_inter_macroblock
 {
     VP8_COMMON *cm = &cpi->common;
     MACROBLOCKD *const xd = &x->e_mbd;
-    int intra_error = 0;
-    int rate;
-    int distortion;
     unsigned char *segment_id = &xd->mode_info_context->mbmi.segment_id;
     int seg_ref_active;
     unsigned char ref_pred_flag;
index 16c4b35cbfc67c569f5b7c0a7b1e03020a184e26..bb7a1aa7437fa1aaaa925df55e541f036aa5b659 100644 (file)
@@ -100,8 +100,8 @@ void vp8_encode_intra4x4mby(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *mb)
 {
     int i;
 
-    MACROBLOCKD *x = &mb->e_mbd;
 #if 0
+    MACROBLOCKD *x = &mb->e_mbd;
     // Intra modes requiring top-right MB reconstructed data have been disabled
     vp8_intra_prediction_down_copy(x);
 #endif
index 81c69d9f85383eac8c585d1f0f74e11297687678..345bab007a1e6f75ae55260c2d158c96164a10d6 100644 (file)
@@ -1071,7 +1071,6 @@ void vp8_optimize_mby_8x8(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd)
 {
     int b;
     int type;
-    int has_2nd_order;
 
     ENTROPY_CONTEXT_PLANES t_above, t_left;
     ENTROPY_CONTEXT *ta;
index dad028757a8ba65221c1c0b560ac8616658d8efb..77076ff5f6ed71ed87cdcf376d824df3d7e60026 100644 (file)
@@ -65,9 +65,6 @@ extern void vp8_alloc_compressor_data(VP8_COMP *cpi);
 #define POW1 (double)cpi->oxcf.two_pass_vbrbias/100.0
 #define POW2 (double)cpi->oxcf.two_pass_vbrbias/100.0
 
-static int vscale_lookup[7] = {0, 1, 1, 2, 2, 3, 3};
-static int hscale_lookup[7] = {0, 0, 1, 1, 2, 2, 3};
-
 static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame);
 
 static int select_cq_level( int qindex )
@@ -971,10 +968,7 @@ static int estimate_max_q(VP8_COMP *cpi,
     double sr_correction;
     double err_per_mb = section_err / num_mbs;
     double err_correction_factor;
-    double corr_high;
     double speed_correction = 1.0;
-    double inter_pct = (fpstats->pcnt_inter / fpstats->count);
-    double intra_pct = 1.0 - inter_pct;
     int overhead_bits_per_mb;
 
     if (section_target_bandwitdh <= 0)
@@ -1106,12 +1100,9 @@ static int estimate_cq( VP8_COMP *cpi,
     double err_correction_factor;
     double sr_err_diff;
     double sr_correction;
-    double corr_high;
     double speed_correction = 1.0;
     double clip_iiratio;
     double clip_iifactor;
-    double inter_pct = (fpstats->pcnt_inter / fpstats->count);
-    double intra_pct = 1.0 - inter_pct;
     int overhead_bits_per_mb;
 
 
@@ -1288,8 +1279,6 @@ static double get_prediction_decay_rate( VP8_COMP *cpi,
 {
     double prediction_decay_rate;
     double second_ref_decay;
-    double motion_decay;
-    double motion_pct = next_frame->pcnt_motion;
     double mb_sr_err_diff;
 
     // Initial basis is the % mbs inter coded
@@ -1625,7 +1614,6 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
     FIRSTPASS_STATS next_frame;
     FIRSTPASS_STATS *start_pos;
     int i;
-    double r;
     double boost_score = 0.0;
     double old_boost_score = 0.0;
     double gf_group_err = 0.0;
@@ -2605,9 +2593,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
     {
         int kf_boost = boost_score;
         int allocation_chunks;
-        int Counter = cpi->twopass.frames_to_key;
         int alt_kf_bits;
-        YV12_BUFFER_CONFIG *lst_yv12 = &cpi->common.yv12_fb[cpi->common.lst_fb_idx];
 
         if ( kf_boost < 300 )
         {
index c6198c2213de311e89ce583e9281f1b9a214ce10..e7d0711246b9deef243609d9073960d1f8ce6c26 100644 (file)
@@ -48,7 +48,6 @@ void vp8_init_mode_costs(VP8_COMP *c)
                     x->fc.uv_mode_prob[VP8_YMODES-1], vp8_uv_mode_tree);
     vp8_cost_tokens(c->mb.intra_uv_mode_cost[0],
                     x->kf_uv_mode_prob[VP8_YMODES-1], vp8_uv_mode_tree);
-    vp8_cost_tokens(c->mb.i8x8_mode_costs,
+    vp8_cost_tokens((int *)c->mb.i8x8_mode_costs,
                     x->fc.i8x8_mode_prob,vp8_i8x8_mode_tree);
-
 }
index 58165bab0bf8b1c2a41695e7aa4e6ebd4372290e..aa46fb073be8c027e5cbbd8e0f7f8abe76c71dce 100644 (file)
@@ -37,6 +37,8 @@
 #include "mbgraph.h"
 #include "vp8/common/pred_common.h"
 #include "vp8/encoder/rdopt.h"
+#include "bitstream.h"
+#include "ratectrl.h"
 
 #if ARCH_ARM
 #include "vpx_ports/arm.h"
@@ -2609,7 +2611,6 @@ void write_yuv_frame_to_file(YV12_BUFFER_CONFIG *frame)
 
     // write the frame
     int i;
-    char filename[255];
     FILE *fp = fopen("encode_recon.yuv", "a");
 
     for (i = 0; i < frame->y_height; i++)
@@ -3161,7 +3162,6 @@ static void encode_frame_to_data_rate
     if (cm->frame_type != KEY_FRAME)
     {
 #if CONFIG_ENHANCED_INTERP
-        double e = 0; //compute_edge_pixel_proportion(cpi->Source);
         /* TODO: Decide this more intelligently */
         if (sf->search_best_filter)
         {
@@ -4101,8 +4101,6 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
 #endif
     VP8_COMP *cpi = (VP8_COMP *) ptr;
     VP8_COMMON *cm = &cpi->common;
-    struct vpx_usec_timer  tsctimer;
-    struct vpx_usec_timer  ticktimer;
     struct vpx_usec_timer  cmptimer;
     YV12_BUFFER_CONFIG    *force_src_buffer = NULL;
 
index 3d11634b58241793e2dc7eebd48f76992cc9c31f..5cde006bc22a9b2082f169e4ce9f4154220d587b 100644 (file)
@@ -55,6 +55,7 @@ extern prototype_quantize_block(vp8_quantize_quantb_2x2);
 #define vp8_quantize_mb vp8_quantize_mb_c
 #endif
 extern prototype_quantize_mb(vp8_quantize_mb);
+void vp8_quantize_mb_8x8(MACROBLOCK *x);
 
 #ifndef vp8_quantize_mbuv
 #define vp8_quantize_mbuv vp8_quantize_mbuv_c
index 9243af97873c0a6e95579ccc89f6a66568c8ed67..6d510e9d92648ba1c5543c28edda0591aa7dcb2b 100644 (file)
@@ -22,7 +22,7 @@
 #include "vpx_mem/vpx_mem.h"
 #include "vp8/common/systemdependent.h"
 #include "encodemv.h"
-
+#include "vp8/common/quant_common.h"
 
 #define MIN_BPB_FACTOR          0.005
 #define MAX_BPB_FACTOR          50
@@ -96,7 +96,7 @@ static const unsigned int prior_key_frame_weight[KEY_FRAME_CONTEXT] = { 1, 2, 3,
 double vp8_convert_qindex_to_q( int qindex )
 {
     // Convert the index to a real Q value (scaled down to match old Q values)
-    return (double)vp8_ac_yquant( qindex, 0 ) / 4.0;
+    return (double)vp8_ac_yquant( qindex ) / 4.0;
 }
 
 int vp8_gfboost_qadjust( int qindex )
@@ -328,7 +328,6 @@ static int estimate_bits_at_q(int frame_kind, int Q, int MBs,
 static void calc_iframe_target_size(VP8_COMP *cpi)
 {
     // boost defaults to half second
-    int kf_boost;
     int target;
 
     // Clear down mmx registers to allow floating point in what follows
@@ -366,7 +365,6 @@ static void calc_gf_params(VP8_COMP *cpi)
 static void calc_pframe_target_size(VP8_COMP *cpi)
 {
     int min_frame_target;
-    int Adjustment;
 
     min_frame_target = 0;
 
index 85d36fd6bfaee4c5de6f008e9de3dd6130bff790..76eff47a0a32a904dc96dab20d6416f9b5961690 100644 (file)
@@ -30,5 +30,6 @@ extern int vp8_pick_frame_size(VP8_COMP *cpi);
 extern double vp8_convert_qindex_to_q( int qindex );
 extern int vp8_gfboost_qadjust( int qindex );
 extern int vp8_bits_per_mb( FRAME_TYPE frame_type, int qindex  );
+void vp8_setup_inter_frame(VP8_COMP *cpi);
 
 #endif
index 0caa4c73d9a6ed21eed1da82a8322ec3cc643dab..e8ddd66d5075947b78c500dbfd7571b47923e7e8 100644 (file)
@@ -806,7 +806,6 @@ static void macro_block_yrd_8x8( MACROBLOCK *mb,
     MACROBLOCKD *const x = &mb->e_mbd;
     BLOCK   *const mb_y2 = mb->block + 24;
     BLOCKD *const x_y2  = x->block + 24;
-    short *Y2DCPtr = mb_y2->src_diff;
     int d;
 
     ENCODEMB_INVOKE(&rtcd->encodemb, submby)(
@@ -1166,8 +1165,8 @@ static int rd_pick_intra8x8block(
     int distortion;
     BLOCK  *be=x->block + ib;
     BLOCKD *b=x->e_mbd.block + ib;
-    ENTROPY_CONTEXT ta0, ta1, besta0, besta1;
-    ENTROPY_CONTEXT tl0, tl1, bestl0, bestl1;
+    ENTROPY_CONTEXT ta0, ta1, besta0 = 0, besta1 = 0;
+    ENTROPY_CONTEXT tl0, tl1, bestl0 = 0, bestl1 = 0;
 
 
     /*
@@ -2503,7 +2502,7 @@ void vp8_cal_sad(VP8_COMP *cpi, MACROBLOCKD *xd, MACROBLOCK *x, int recon_yoffse
     }
 }
 
-/*static */void rd_update_mvcount(VP8_COMP *cpi, MACROBLOCK *x, int_mv *best_ref_mv)
+void rd_update_mvcount(VP8_COMP *cpi, MACROBLOCK *x, int_mv *best_ref_mv)
 {
     if (x->e_mbd.mode_info_context->mbmi.mode == SPLITMV)
     {
@@ -2792,7 +2791,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
     int rate2, distortion2;
     int uv_intra_rate, uv_intra_distortion, uv_intra_rate_tokenonly;
     int uv_intra_skippable = 0;
-    int uv_intra_rate_8x8, uv_intra_distortion_8x8, uv_intra_rate_tokenonly_8x8;
+    int uv_intra_rate_8x8 = 0, uv_intra_distortion_8x8 = 0, uv_intra_rate_tokenonly_8x8 = 0;
     int uv_intra_skippable_8x8=0;
     int rate_y, UNINITIALIZED_IS_SAFE(rate_uv);
     int distortion_uv;
@@ -2804,7 +2803,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
     //int intermodecost[MAX_MODES];
 
     MB_PREDICTION_MODE uv_intra_mode;
-    MB_PREDICTION_MODE uv_intra_mode_8x8;
+    MB_PREDICTION_MODE uv_intra_mode_8x8 = 0;
 
     int_mv mvp;
     int near_sadidx[8] = {0, 1, 2, 3, 4, 5, 6, 7};
index a7de498244dbb2e2d81e6321b45c847f365af38b..0a1920a1a6e9d83c24b5edb804972df41c82ba8c 100644 (file)
@@ -35,5 +35,6 @@ extern void vp8_mv_pred
 extern void vp8_cal_sad(VP8_COMP *cpi, MACROBLOCKD *xd, MACROBLOCK *x, int recon_yoffset, int near_sadidx[]);
 extern void vp8_init_me_luts();
 extern void vp8_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb, int_mv *mv);
+void rd_update_mvcount(VP8_COMP *cpi, MACROBLOCK *x, int_mv *best_ref_mv);
 
 #endif
index 42612a2e5485c04723c300b7632c72e3ed80d648..5fd6138d3d1267b30f6cab5b4613c9adff5b9f73 100644 (file)
@@ -127,4 +127,6 @@ void vp8_cost_tokens(
     int *Costs, const vp8_prob *, vp8_tree
 );
 
+void vp8_cost_tokens_skip(int *c, const vp8_prob *p, vp8_tree t);
+
 #endif