clean up unused variable warnings

Change-Id: I9467d7a50eac32d8e8f3a2f26db818e47c93c94b
This commit is contained in:
Johann 2011-05-09 11:16:31 -04:00
parent 5c756005aa
commit a7d4d3c550
14 changed files with 19 additions and 56 deletions

View File

@ -111,8 +111,6 @@ int main(int argc, char **argv) {
vpx_codec_ctx_t codec; vpx_codec_ctx_t codec;
vpx_codec_enc_cfg_t cfg; vpx_codec_enc_cfg_t cfg;
int frame_cnt = 0; int frame_cnt = 0;
unsigned char file_hdr[IVF_FILE_HDR_SZ];
unsigned char frame_hdr[IVF_FRAME_HDR_SZ];
vpx_image_t raw; vpx_image_t raw;
vpx_codec_err_t res; vpx_codec_err_t res;
long width; long width;

View File

@ -21,7 +21,7 @@ res = vpx_codec_dec_init(&codec, interface, NULL,
if(res == VPX_CODEC_INCAPABLE) { if(res == VPX_CODEC_INCAPABLE) {
printf("NOTICE: Postproc not supported by %s\n", printf("NOTICE: Postproc not supported by %s\n",
vpx_codec_iface_name(interface)); vpx_codec_iface_name(interface));
res = vpx_codec_dec_init(&codec, interface, NULL, 0); res = vpx_codec_dec_init(&codec, interface, NULL, flags);
} }
if(res) if(res)
die_codec(&codec, "Failed to initialize decoder"); die_codec(&codec, "Failed to initialize decoder");

View File

@ -143,7 +143,6 @@ void Ebml_SerializeUTF8(EbmlGlobal *glob, unsigned long class_id, wchar_t *s)
void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char *data, unsigned long data_length) void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char *data, unsigned long data_length)
{ {
unsigned char size = 4;
Ebml_WriteID(glob, class_id); Ebml_WriteID(glob, class_id);
Ebml_WriteLen(glob, data_length); Ebml_WriteLen(glob, data_length);
Ebml_Write(glob, data, data_length); Ebml_Write(glob, data, data_length);

View File

@ -24,10 +24,6 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
#if CONFIG_RUNTIME_CPU_DETECT #if CONFIG_RUNTIME_CPU_DETECT
VP8_COMMON_RTCD *rtcd = &ctx->rtcd; VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
int flags = x86_simd_caps(); int flags = x86_simd_caps();
int mmx_enabled = flags & HAS_MMX;
int xmm_enabled = flags & HAS_SSE;
int wmt_enabled = flags & HAS_SSE2;
int SSSE3Enabled = flags & HAS_SSSE3;
/* Note: /* Note:
* *
@ -39,7 +35,7 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
/* Override default functions with fastest ones for this CPU. */ /* Override default functions with fastest ones for this CPU. */
#if HAVE_MMX #if HAVE_MMX
if (mmx_enabled) if (flags & HAS_MMX)
{ {
rtcd->idct.idct1 = vp8_short_idct4x4llm_1_mmx; rtcd->idct.idct1 = vp8_short_idct4x4llm_1_mmx;
rtcd->idct.idct16 = vp8_short_idct4x4llm_mmx; rtcd->idct.idct16 = vp8_short_idct4x4llm_mmx;
@ -83,7 +79,7 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
#endif #endif
#if HAVE_SSE2 #if HAVE_SSE2
if (wmt_enabled) if (flags & HAS_SSE2)
{ {
rtcd->recon.recon2 = vp8_recon2b_sse2; rtcd->recon.recon2 = vp8_recon2b_sse2;
rtcd->recon.recon4 = vp8_recon4b_sse2; rtcd->recon.recon4 = vp8_recon4b_sse2;
@ -122,7 +118,7 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
#if HAVE_SSSE3 #if HAVE_SSSE3
if (SSSE3Enabled) if (flags & HAS_SSSE3)
{ {
rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_ssse3; rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_ssse3;
rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_ssse3; rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_ssse3;

View File

@ -26,7 +26,6 @@ extern void vp8_dequantize_b_loop_v6(short *Q, short *DQC, short *DQ);
void vp8_dequantize_b_neon(BLOCKD *d) void vp8_dequantize_b_neon(BLOCKD *d)
{ {
int i;
short *DQ = d->dqcoeff; short *DQ = d->dqcoeff;
short *Q = d->qcoeff; short *Q = d->qcoeff;
short *DQC = d->dequant; short *DQC = d->dequant;
@ -38,7 +37,6 @@ void vp8_dequantize_b_neon(BLOCKD *d)
#if HAVE_ARMV6 #if HAVE_ARMV6
void vp8_dequantize_b_v6(BLOCKD *d) void vp8_dequantize_b_v6(BLOCKD *d)
{ {
int i;
short *DQ = d->dqcoeff; short *DQ = d->dqcoeff;
short *Q = d->qcoeff; short *Q = d->qcoeff;
short *DQC = d->dequant; short *DQC = d->dequant;

View File

@ -91,7 +91,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int m
{ {
int eobtotal = 0; int eobtotal = 0;
int i, do_clamp = xd->mode_info_context->mbmi.need_to_clamp_mvs; int i, do_clamp = xd->mode_info_context->mbmi.need_to_clamp_mvs;
VP8_COMMON *pc = &pbi->common;
if (xd->mode_info_context->mbmi.mb_skip_coeff) if (xd->mode_info_context->mbmi.mb_skip_coeff)
{ {
@ -478,7 +477,6 @@ void vp8_decoder_create_threads(VP8D_COMP *pbi)
void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows) void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows)
{ {
VP8_COMMON *const pc = & pbi->common;
int i; int i;
if (pbi->b_multithreaded_rd) if (pbi->b_multithreaded_rd)
@ -699,7 +697,6 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
int mb_row; int mb_row;
VP8_COMMON *pc = &pbi->common; VP8_COMMON *pc = &pbi->common;
int ibc = 0;
int num_part = 1 << pbi->common.multi_token_partition; int num_part = 1 << pbi->common.multi_token_partition;
int i; int i;
volatile int *last_row_current_mb_col = NULL; volatile int *last_row_current_mb_col = NULL;

View File

@ -238,7 +238,7 @@ static void optimize_b(MACROBLOCK *mb, int ib, int type,
int i0; int i0;
int rc; int rc;
int x; int x;
int sz; int sz = 0;
int next; int next;
int rdmult; int rdmult;
int rddiv; int rddiv;

View File

@ -297,8 +297,6 @@ void vp8_initialize_rd_consts(VP8_COMP *cpi, int Qvalue)
void vp8_auto_select_speed(VP8_COMP *cpi) void vp8_auto_select_speed(VP8_COMP *cpi)
{ {
int used = cpi->oxcf.cpu_used;
int milliseconds_for_compress = (int)(1000000 / cpi->oxcf.frame_rate); int milliseconds_for_compress = (int)(1000000 / cpi->oxcf.frame_rate);
milliseconds_for_compress = milliseconds_for_compress * (16 - cpi->oxcf.cpu_used) / 16; milliseconds_for_compress = milliseconds_for_compress * (16 - cpi->oxcf.cpu_used) / 16;
@ -319,10 +317,10 @@ void vp8_auto_select_speed(VP8_COMP *cpi)
/* /*
// this is done during parameter valid check // this is done during parameter valid check
if( used > 16) if( cpi->oxcf.cpu_used > 16)
used = 16; cpi->oxcf.cpu_used = 16;
if( used < -16) if( cpi->oxcf.cpu_used < -16)
used = -16; cpi->oxcf.cpu_used = -16;
*/ */
if (cpi->avg_pick_mode_time < milliseconds_for_compress && (cpi->avg_encode_time - cpi->avg_pick_mode_time) < milliseconds_for_compress) if (cpi->avg_pick_mode_time < milliseconds_for_compress && (cpi->avg_encode_time - cpi->avg_pick_mode_time) < milliseconds_for_compress)

View File

@ -125,8 +125,8 @@ long dssim(unsigned char *s,int sp, unsigned char *r,int rp,
{ {
unsigned long sum_s=0,sum_r=0,sum_sq_s=0,sum_sq_r=0,sum_sxr=0; unsigned long sum_s=0,sum_r=0,sum_sq_s=0,sum_sq_r=0,sum_sxr=0;
long long ssim3; long long ssim3;
long long ssim_n,ssim_n1,ssim_n2; long long ssim_n1,ssim_n2;
long long ssim_d,ssim_d1,ssim_d2; long long ssim_d1,ssim_d2;
long long ssim_t1,ssim_t2; long long ssim_t1,ssim_t2;
long long c1, c2; long long c1, c2;
@ -245,4 +245,4 @@ double vp8_calc_ssimg
ssim_all = (a * 4 + b + c) /6; ssim_all = (a * 4 + b + c) /6;
return ssim_all; return ssim_all;
} }

View File

@ -149,10 +149,8 @@ static int vp8_temporal_filter_find_matching_mb_c
) )
{ {
MACROBLOCK *x = &cpi->mb; MACROBLOCK *x = &cpi->mb;
int thissme;
int step_param; int step_param;
int further_steps; int further_steps;
int n = 0;
int sadpb = x->sadperbit16; int sadpb = x->sadperbit16;
int bestsme = INT_MAX; int bestsme = INT_MAX;
int num00 = 0; int num00 = 0;
@ -243,7 +241,6 @@ static void vp8_temporal_filter_iterate_c
unsigned int filter_weight; unsigned int filter_weight;
int mb_cols = cpi->common.mb_cols; int mb_cols = cpi->common.mb_cols;
int mb_rows = cpi->common.mb_rows; int mb_rows = cpi->common.mb_rows;
int MBs = cpi->common.MBs;
int mb_y_offset = 0; int mb_y_offset = 0;
int mb_uv_offset = 0; int mb_uv_offset = 0;
DECLARE_ALIGNED_ARRAY(16, unsigned int, accumulator, 16*16 + 8*8 + 8*8); DECLARE_ALIGNED_ARRAY(16, unsigned int, accumulator, 16*16 + 8*8 + 8*8);
@ -269,8 +266,7 @@ static void vp8_temporal_filter_iterate_c
for (mb_col = 0; mb_col < mb_cols; mb_col++) for (mb_col = 0; mb_col < mb_cols; mb_col++)
{ {
int i, j, k, w; int i, j, k;
int weight_cap;
int stride; int stride;
vpx_memset(accumulator, 0, 384*sizeof(unsigned int)); vpx_memset(accumulator, 0, 384*sizeof(unsigned int));
@ -436,7 +432,6 @@ void vp8_temporal_filter_prepare_c
int frames_to_blur_forward = 0; int frames_to_blur_forward = 0;
int frames_to_blur = 0; int frames_to_blur = 0;
int start_frame = 0; int start_frame = 0;
unsigned int filtered = 0;
int strength = cpi->oxcf.arnr_strength; int strength = cpi->oxcf.arnr_strength;

View File

@ -138,12 +138,6 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
{ {
#if CONFIG_RUNTIME_CPU_DETECT #if CONFIG_RUNTIME_CPU_DETECT
int flags = x86_simd_caps(); int flags = x86_simd_caps();
int mmx_enabled = flags & HAS_MMX;
int xmm_enabled = flags & HAS_SSE;
int wmt_enabled = flags & HAS_SSE2;
int SSE3Enabled = flags & HAS_SSE3;
int SSSE3Enabled = flags & HAS_SSSE3;
int SSE4_1Enabled = flags & HAS_SSE4_1;
/* Note: /* Note:
* *
@ -154,7 +148,7 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
/* Override default functions with fastest ones for this CPU. */ /* Override default functions with fastest ones for this CPU. */
#if HAVE_MMX #if HAVE_MMX
if (mmx_enabled) if (flags & HAS_MMX)
{ {
cpi->rtcd.variance.sad16x16 = vp8_sad16x16_mmx; cpi->rtcd.variance.sad16x16 = vp8_sad16x16_mmx;
cpi->rtcd.variance.sad16x8 = vp8_sad16x8_mmx; cpi->rtcd.variance.sad16x8 = vp8_sad16x8_mmx;
@ -205,7 +199,7 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
#endif #endif
#if HAVE_SSE2 #if HAVE_SSE2
if (wmt_enabled) if (flags & HAS_SSE2)
{ {
cpi->rtcd.variance.sad16x16 = vp8_sad16x16_wmt; cpi->rtcd.variance.sad16x16 = vp8_sad16x16_wmt;
cpi->rtcd.variance.sad16x8 = vp8_sad16x8_wmt; cpi->rtcd.variance.sad16x8 = vp8_sad16x8_wmt;
@ -263,7 +257,7 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
#endif #endif
#if HAVE_SSE3 #if HAVE_SSE3
if (SSE3Enabled) if (flags & HAS_SSE3)
{ {
cpi->rtcd.variance.sad16x16 = vp8_sad16x16_sse3; cpi->rtcd.variance.sad16x16 = vp8_sad16x16_sse3;
cpi->rtcd.variance.sad16x16x3 = vp8_sad16x16x3_sse3; cpi->rtcd.variance.sad16x16x3 = vp8_sad16x16x3_sse3;
@ -282,7 +276,7 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
#endif #endif
#if HAVE_SSSE3 #if HAVE_SSSE3
if (SSSE3Enabled) if (flags & HAS_SSSE3)
{ {
cpi->rtcd.variance.sad16x16x3 = vp8_sad16x16x3_ssse3; cpi->rtcd.variance.sad16x16x3 = vp8_sad16x16x3_ssse3;
cpi->rtcd.variance.sad16x8x3 = vp8_sad16x8x3_ssse3; cpi->rtcd.variance.sad16x8x3 = vp8_sad16x8x3_ssse3;
@ -305,7 +299,7 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
#if HAVE_SSE4_1 #if HAVE_SSE4_1
if (SSE4_1Enabled) if (flags & HAS_SSE4_1)
{ {
cpi->rtcd.variance.sad16x16x8 = vp8_sad16x16x8_sse4; cpi->rtcd.variance.sad16x16x8 = vp8_sad16x16x8_sse4;
cpi->rtcd.variance.sad16x8x8 = vp8_sad16x8x8_sse4; cpi->rtcd.variance.sad16x8x8 = vp8_sad16x8x8_sse4;

View File

@ -618,8 +618,8 @@ static vpx_codec_err_t vp8_set_postproc(vpx_codec_alg_priv_t *ctx,
int ctr_id, int ctr_id,
va_list args) va_list args)
{ {
vp8_postproc_cfg_t *data = va_arg(args, vp8_postproc_cfg_t *);
#if CONFIG_POSTPROC #if CONFIG_POSTPROC
vp8_postproc_cfg_t *data = va_arg(args, vp8_postproc_cfg_t *);
if (data) if (data)
{ {

View File

@ -573,12 +573,10 @@ file_is_webm(struct input_ctx *input,
{ {
unsigned int i, n; unsigned int i, n;
int track_type = -1; int track_type = -1;
uint64_t tstamp=0;
nestegg_io io = {nestegg_read_cb, nestegg_seek_cb, nestegg_tell_cb, nestegg_io io = {nestegg_read_cb, nestegg_seek_cb, nestegg_tell_cb,
input->infile}; input->infile};
nestegg_video_params params; nestegg_video_params params;
nestegg_packet * pkt;
if(nestegg_init(&input->nestegg_ctx, io, NULL)) if(nestegg_init(&input->nestegg_ctx, io, NULL))
goto fail; goto fail;

View File

@ -146,7 +146,6 @@ static int y4m_parse_tags(y4m_input *_y4m,char *_tags){
mpeg2 and jpeg cases (thus requiring no vertical resampling).*/ mpeg2 and jpeg cases (thus requiring no vertical resampling).*/
static void y4m_42xmpeg2_42xjpeg_helper(unsigned char *_dst, static void y4m_42xmpeg2_42xjpeg_helper(unsigned char *_dst,
const unsigned char *_src,int _c_w,int _c_h){ const unsigned char *_src,int _c_w,int _c_h){
int pli;
int y; int y;
int x; int x;
for(y=0;y<_c_h;y++){ for(y=0;y<_c_h;y++){
@ -178,8 +177,6 @@ static void y4m_convert_42xmpeg2_42xjpeg(y4m_input *_y4m,unsigned char *_dst,
int c_h; int c_h;
int c_sz; int c_sz;
int pli; int pli;
int y;
int x;
/*Skip past the luma data.*/ /*Skip past the luma data.*/
_dst+=_y4m->pic_w*_y4m->pic_h; _dst+=_y4m->pic_w*_y4m->pic_h;
/*Compute the size of each chroma plane.*/ /*Compute the size of each chroma plane.*/
@ -396,8 +393,6 @@ static void y4m_convert_422jpeg_420jpeg(y4m_input *_y4m,unsigned char *_dst,
int dst_c_w; int dst_c_w;
int dst_c_h; int dst_c_h;
int dst_c_sz; int dst_c_sz;
int tmp_sz;
int pic_sz;
int pli; int pli;
/*Skip past the luma data.*/ /*Skip past the luma data.*/
_dst+=_y4m->pic_w*_y4m->pic_h; _dst+=_y4m->pic_w*_y4m->pic_h;
@ -461,12 +456,9 @@ static void y4m_convert_422_420jpeg(y4m_input *_y4m,unsigned char *_dst,
int c_w; int c_w;
int c_h; int c_h;
int c_sz; int c_sz;
int dst_c_w;
int dst_c_h; int dst_c_h;
int dst_c_sz; int dst_c_sz;
int pli; int pli;
int y;
int x;
/*Skip past the luma data.*/ /*Skip past the luma data.*/
_dst+=_y4m->pic_w*_y4m->pic_h; _dst+=_y4m->pic_w*_y4m->pic_h;
/*Compute the size of each chroma plane.*/ /*Compute the size of each chroma plane.*/
@ -821,8 +813,6 @@ void y4m_input_close(y4m_input *_y4m){
int y4m_input_fetch_frame(y4m_input *_y4m,FILE *_fin,vpx_image_t *_img){ int y4m_input_fetch_frame(y4m_input *_y4m,FILE *_fin,vpx_image_t *_img){
char frame[6]; char frame[6];
int pic_sz; int pic_sz;
int frame_c_w;
int frame_c_h;
int c_w; int c_w;
int c_h; int c_h;
int c_sz; int c_sz;