From 7b4f7279592ab2689c3ff091cfd401ccfb3bd047 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Apr 2015 16:08:37 -0700 Subject: [PATCH 1/7] vp8_print_modes_and_motion_vectors: remove dead stores Change-Id: I438cbf4970fa2220fb73b0b41a29e654836d4e3b --- vp8/common/debugmodes.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/vp8/common/debugmodes.c b/vp8/common/debugmodes.c index 46064e61d..159fddc6a 100644 --- a/vp8/common/debugmodes.c +++ b/vp8/common/debugmodes.c @@ -81,7 +81,6 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f fprintf(mvs, "\n"); /* print out the block modes */ - mb_index = 0; fprintf(mvs, "Mbs for Frame %d\n", frame); { int b_row; @@ -129,7 +128,6 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f /* print out the block modes */ - mb_index = 0; fprintf(mvs, "MVs for Frame %d\n", frame); { int b_row; From 970acffa8fb52e40064f329d0fe43eb6f4402b5c Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Apr 2015 16:15:51 -0700 Subject: [PATCH 2/7] multiframe_quality_enhance_block: remove dead stores Change-Id: I33ca9cddfdd54c3d8a23c1cb978986a537a20bf2 --- vp8/common/mfqe.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vp8/common/mfqe.c b/vp8/common/mfqe.c index 069332660..edd6ca09b 100644 --- a/vp8/common/mfqe.c +++ b/vp8/common/mfqe.c @@ -153,11 +153,11 @@ static void multiframe_quality_enhance_block actd = (vp8_variance16x16(yd, yd_stride, VP8_ZEROS, 0, &sse)+128)>>8; act = (vp8_variance16x16(y, y_stride, VP8_ZEROS, 0, &sse)+128)>>8; #ifdef USE_SSD - sad = (vp8_variance16x16(y, y_stride, yd, yd_stride, &sse)); + vp8_variance16x16(y, y_stride, yd, yd_stride, &sse); sad = (sse + 128)>>8; - usad = (vp8_variance8x8(u, uv_stride, ud, uvd_stride, &sse)); + vp8_variance8x8(u, uv_stride, ud, uvd_stride, &sse); usad = (sse + 32)>>6; - vsad = (vp8_variance8x8(v, uv_stride, vd, uvd_stride, &sse)); + vp8_variance8x8(v, uv_stride, vd, uvd_stride, &sse); vsad = (sse + 32)>>6; #else sad = (vp8_sad16x16(y, y_stride, yd, yd_stride, UINT_MAX) + 128) >> 8; @@ -170,11 +170,11 @@ static void multiframe_quality_enhance_block actd = (vp8_variance8x8(yd, yd_stride, VP8_ZEROS, 0, &sse)+32)>>6; act = (vp8_variance8x8(y, y_stride, VP8_ZEROS, 0, &sse)+32)>>6; #ifdef USE_SSD - sad = (vp8_variance8x8(y, y_stride, yd, yd_stride, &sse)); + vp8_variance8x8(y, y_stride, yd, yd_stride, &sse); sad = (sse + 32)>>6; - usad = (vp8_variance4x4(u, uv_stride, ud, uvd_stride, &sse)); + vp8_variance4x4(u, uv_stride, ud, uvd_stride, &sse); usad = (sse + 8)>>4; - vsad = (vp8_variance4x4(v, uv_stride, vd, uvd_stride, &sse)); + vp8_variance4x4(v, uv_stride, vd, uvd_stride, &sse); vsad = (sse + 8)>>4; #else sad = (vp8_sad8x8(y, y_stride, yd, yd_stride, UINT_MAX) + 32) >> 6; From 04c53d23937e68550a8f0c983b6d720ed3f0b712 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Apr 2015 16:18:23 -0700 Subject: [PATCH 3/7] find_next_key_frame: remove dead init & store Change-Id: I8c7f5b9718ef14e4397a263aa9f52a9edcf7d1cd --- vp8/encoder/firstpass.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c index 85767ef0d..84b9faec6 100644 --- a/vp8/encoder/firstpass.c +++ b/vp8/encoder/firstpass.c @@ -2969,7 +2969,6 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) */ decay_accumulator = 1.0; boost_score = 0.0; - loop_decay_rate = 1.00; /* Starting decay rate */ for (i = 0 ; i < cpi->twopass.frames_to_key ; i++) { @@ -3213,7 +3212,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) int new_width = cpi->oxcf.Width; int new_height = cpi->oxcf.Height; - int projected_buffer_level = (int)cpi->buffer_level; + int projected_buffer_level; int tmp_q; double projected_bits_perframe; From 0c5a140a027261411d3546c90da1d80439213690 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Apr 2015 16:21:43 -0700 Subject: [PATCH 4/7] rdopt: remove dead stores Change-Id: Ia8a20c6751cc6d63c60bb00b99c78faca1e61051 --- vp8/encoder/rdopt.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 29da926ce..582c8bc6c 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -1661,7 +1661,6 @@ void vp8_mv_pred mv.as_mv.row = mvx[vcnt/2]; mv.as_mv.col = mvy[vcnt/2]; - find = 1; /* sr is set to 0 to allow calling function to decide the search * range. */ @@ -2293,7 +2292,6 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, mode_mv[NEWMV].as_int = d->bmi.mv.as_int; /* Further step/diamond searches as necessary */ - n = 0; further_steps = (cpi->sf.max_step_search_steps - 1) - step_param; n = num00; @@ -2560,8 +2558,6 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, intra_rd_penalty, cpi, x); if (this_rd < best_mode.rd || x->skip) { - /* Note index of best mode so far */ - best_mode_index = mode_index; *returnrate = rd.rate2; *returndistortion = rd.distortion2; update_best_mode(&best_mode, this_rd, &rd, other_cost, x); From acb219be25ef3cdd5f07c8a63388f76980f271e6 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Apr 2015 16:36:14 -0700 Subject: [PATCH 5/7] vp8_decode_frame: remove dead increment Change-Id: Ie9a6fac02796d24e6f4a15416d0b4c19010547df --- vp8/decoder/decodeframe.c | 1 - 1 file changed, 1 deletion(-) diff --git a/vp8/decoder/decodeframe.c b/vp8/decoder/decodeframe.c index ab03c909d..4f404bd66 100644 --- a/vp8/decoder/decodeframe.c +++ b/vp8/decoder/decodeframe.c @@ -1069,7 +1069,6 @@ int vp8_decode_frame(VP8D_COMP *pbi) pc->vert_scale = clear[6] >> 6; } data += 7; - clear += 7; } else { From 30205e14b7aaf0f4036d9ece01d46e54baa6227f Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Apr 2015 16:37:53 -0700 Subject: [PATCH 6/7] vp8cx_pick_filter_level*: remove dead inits Change-Id: I28026b86d03264b9f4e2fc8ac1d3c74aa3954208 --- vp8/encoder/picklpf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vp8/encoder/picklpf.c b/vp8/encoder/picklpf.c index f0c8f28fc..a55a1ea16 100644 --- a/vp8/encoder/picklpf.c +++ b/vp8/encoder/picklpf.c @@ -142,7 +142,7 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) int min_filter_level = get_min_filter_level(cpi, cm->base_qindex); int max_filter_level = get_max_filter_level(cpi, cm->base_qindex); int filt_val; - int best_filt_val = cm->filter_level; + int best_filt_val; YV12_BUFFER_CONFIG * saved_frame = cm->frame_to_show; /* Replace unfiltered frame buffer with a new one */ @@ -274,8 +274,7 @@ void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) int filter_step; int filt_high = 0; - /* Start search at previous frame filter level */ - int filt_mid = cm->filter_level; + int filt_mid; int filt_low = 0; int filt_best; int filt_direction = 0; From 5afa7d1f874bf77762f4de25914651532a855dd5 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Apr 2015 16:39:17 -0700 Subject: [PATCH 7/7] vp8_regular_quantize_b_sse2: remove dead init Change-Id: Ide5eefadbb3cab38743a69f744a003abb37a6506 --- vp8/encoder/x86/quantize_sse2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp8/encoder/x86/quantize_sse2.c b/vp8/encoder/x86/quantize_sse2.c index 291d21992..f56e64672 100644 --- a/vp8/encoder/x86/quantize_sse2.c +++ b/vp8/encoder/x86/quantize_sse2.c @@ -35,7 +35,7 @@ void vp8_regular_quantize_b_sse2(BLOCK *b, BLOCKD *d) { char eob = 0; - short *zbin_boost_ptr = b->zrun_zbin_boost; + short *zbin_boost_ptr; short *qcoeff_ptr = d->qcoeff; DECLARE_ALIGNED_ARRAY(16, short, x, 16); DECLARE_ALIGNED_ARRAY(16, short, y, 16);