Commit e0a338c4 authored by Christian Duvivier's avatar Christian Duvivier

Fix a bunch of warnings.

Change-Id: I883b4f63559c1cf66a25016e946b1b1ae98a20da
parent 31fd84d8
......@@ -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
......
......@@ -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));
......
......@@ -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++)
......
......@@ -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
......
......@@ -9,6 +9,7 @@
*/
#include "vp8/common/pred_common.h"
#include "vp8/common/seg_common.h"
// TBD prediction functions for various bitstream signals
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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);
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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 )
{
......
......@@ -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);
}
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......@@ -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};
......
......@@ -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
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment