diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 5cd72532d5b4e358127d2212aec878032fd49f5b..cd4e3d67025e46d6dc69fe54d45d38a980e33e8b 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -69,13 +69,6 @@ static int gfboost_qadjust(int qindex) { (1.32 * q) + 79.3); } -static int kfboost_qadjust(int qindex) { - const double q = vp9_convert_qindex_to_q(qindex); - return (int)((0.00000973 * q * q * q) + - (-0.00613 * q * q) + - (1.316 * q) + 121.2); -} - // Resets the first pass file to the given position using a relative seek from // the current position. static void reset_fpf_position(struct twopass_rc *p, @@ -826,12 +819,6 @@ void vp9_first_pass(VP9_COMP *cpi) { ++cm->current_video_frame; } -// Estimate a cost per mb attributable to overheads such as the coding of modes -// and motion vectors. This currently makes simplistic assumptions for testing. -static double bitcost(double prob) { - return -(log(prob) / log(2.0)); -} - static double calc_correction_factor(double err_per_mb, double err_divisor, double pt_low, @@ -2131,7 +2118,7 @@ void vp9_rc_get_first_pass_params(VP9_COMP *cpi) { VP9_COMMON *const cm = &cpi->common; if (!cpi->refresh_alt_ref_frame && (cm->current_video_frame == 0 || - cm->frame_flags & FRAMEFLAGS_KEY)) { + (cm->frame_flags & FRAMEFLAGS_KEY))) { cm->frame_type = KEY_FRAME; } else { cm->frame_type = INTER_FRAME; diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 8430e4b644be709806d1caf5026412e11da48513..f72e1e11a5c2723bb2b490f5963a6a907d4e67c9 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -1272,7 +1272,7 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) { int target; if (!cpi->refresh_alt_ref_frame && (cm->current_video_frame == 0 || - cm->frame_flags & FRAMEFLAGS_KEY || + (cm->frame_flags & FRAMEFLAGS_KEY) || rc->frames_to_key == 0 || (cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) { cm->frame_type = KEY_FRAME; @@ -1378,7 +1378,7 @@ void vp9_rc_get_one_pass_cbr_params(VP9_COMP *cpi) { RATE_CONTROL *const rc = &cpi->rc; int target; if ((cm->current_video_frame == 0 || - cm->frame_flags & FRAMEFLAGS_KEY || + (cm->frame_flags & FRAMEFLAGS_KEY) || rc->frames_to_key == 0 || (cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) { cm->frame_type = KEY_FRAME; diff --git a/vp9/encoder/vp9_ssim.c b/vp9/encoder/vp9_ssim.c index a5f18e6313b7c6f9c029b7e51427f4726ddee88d..1435191d026979e0a2d868bb31ec99d0d1bf324f 100644 --- a/vp9/encoder/vp9_ssim.c +++ b/vp9/encoder/vp9_ssim.c @@ -65,12 +65,6 @@ static double similarity(unsigned long sum_s, unsigned long sum_r, return ssim_n * 1.0 / ssim_d; } -static double ssim_16x16(uint8_t *s, int sp, uint8_t *r, int rp) { - unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0; - vp9_ssim_parms_16x16(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, - &sum_sxr); - return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 256); -} static double ssim_8x8(uint8_t *s, int sp, uint8_t *r, int rp) { unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0; vp9_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, diff --git a/vp9/encoder/vp9_subexp.c b/vp9/encoder/vp9_subexp.c index fd82fa3b2a07cc9eddd9be342ff26f8b92df60e1..9796d647624484bad283b2d8b6ee05b6403ee7af 100644 --- a/vp9/encoder/vp9_subexp.c +++ b/vp9/encoder/vp9_subexp.c @@ -18,15 +18,6 @@ static int update_bits[255]; -static int split_index(int i, int n, int modulus) { - int max1 = (n - 1 - modulus / 2) / modulus + 1; - if (i % modulus == modulus / 2) - i = i / modulus; - else - i = max1 + i - (i + modulus - modulus / 2) / modulus; - return i; -} - static int recenter_nonneg(int v, int m) { if (v > (m << 1)) return v; diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c index a293dd8812a3709057772f6260fd2e04eb56e1f8..bb5f1c23bdd07a76b9f58bec2481caf5e9828243 100644 --- a/vp9/encoder/vp9_tokenize.c +++ b/vp9/encoder/vp9_tokenize.c @@ -298,13 +298,6 @@ static void is_skippable(int plane, int block, args->skippable[0] &= (!args->x->plane[plane].eobs[block]); } -static int sb_is_skippable(MACROBLOCK *x, BLOCK_SIZE bsize) { - int result = 1; - struct is_skippable_args args = {x, &result}; - vp9_foreach_transformed_block(&x->e_mbd, bsize, is_skippable, &args); - return result; -} - int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { int result = 1; struct is_skippable_args args = {x, &result}; diff --git a/vp9/encoder/x86/vp9_variance_mmx.c b/vp9/encoder/x86/vp9_variance_mmx.c index a3d011401dd7ece354c7baf55802c9daab47ef02..c4d17fc0f74c7ac3beffba4cc630d30784f0f518 100644 --- a/vp9/encoder/x86/vp9_variance_mmx.c +++ b/vp9/encoder/x86/vp9_variance_mmx.c @@ -13,7 +13,6 @@ #include "vp9/common/vp9_pragmas.h" #include "vpx_ports/mem.h" -extern unsigned int vp9_get_mb_ss_mmx(const int16_t *src_ptr); extern unsigned int vp9_get8x8var_mmx ( const unsigned char *src_ptr, diff --git a/vp9/encoder/x86/vp9_variance_sse2.c b/vp9/encoder/x86/vp9_variance_sse2.c index 79e42c4cd4ac9f90e7cecae97503ddf32b09b29c..9e65694a86a8525aa257325243b9cf810923fcd0 100644 --- a/vp9/encoder/x86/vp9_variance_sse2.c +++ b/vp9/encoder/x86/vp9_variance_sse2.c @@ -24,10 +24,6 @@ extern unsigned int vp9_get4x4var_mmx int *Sum ); -unsigned int vp9_get_mb_ss_sse2 -( - const int16_t *src_ptr -); unsigned int vp9_get16x16var_sse2 ( const unsigned char *src_ptr,