From 71a7501bcf6ada5068d102c03ae597023e986538 Mon Sep 17 00:00:00 2001 From: Scott LaVarnway Date: Thu, 12 May 2011 11:20:41 -0400 Subject: [PATCH] Removed mv_bits_sadcost This sad cost is being generated but never used. Change-Id: I562eebdcb792b743770954feca365b5b37491ecd --- vp8/encoder/mcomp.c | 17 +---------------- vp8/encoder/onyx_if.c | 2 -- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/vp8/encoder/mcomp.c b/vp8/encoder/mcomp.c index 9189286..0cd165b 100644 --- a/vp8/encoder/mcomp.c +++ b/vp8/encoder/mcomp.c @@ -21,19 +21,6 @@ static int mv_ref_ct [31] [4] [2]; static int mv_mode_cts [4] [2]; #endif -static int mv_bits_sadcost[256]; - -void vp8cx_init_mv_bits_sadcost() -{ - int i; - - for (i = 0; i < 256; i++) - { - mv_bits_sadcost[i] = (int)sqrt(i * 16); - } -} - - int vp8_mv_bit_cost(int_mv *mv, int_mv *ref, int *mvcost[2], int Weight) { // MV costing is based on the distribution of vectors in the previous frame and as such will tend to @@ -1320,9 +1307,7 @@ int vp8_full_search_sad(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, thissad = fn_ptr->sdf(what, what_stride, check_here , in_what_stride, bestsad); this_mv.as_mv.col = c; - //thissad += (int)sqrt(mv_err_cost(&this_mv,ref_mv, mvcost,error_per_bit*14)); - //thissad += error_per_bit * mv_bits_sadcost[mv_bits(&this_mv, ref_mv, mvcost)]; - thissad += mvsad_err_cost(&this_mv, &fcenter_mv, mvsadcost, error_per_bit); //mv_bits(error_per_bit, &this_mv, ref_mv, mvsadcost); + thissad += mvsad_err_cost(&this_mv, &fcenter_mv, mvsadcost, error_per_bit); if (thissad < bestsad) { diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index adbb04b..273a739 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -46,7 +46,6 @@ #define RTCD(x) NULL #endif -extern void vp8cx_init_mv_bits_sadcost(); extern void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi); extern void vp8cx_set_alt_lf_level(VP8_COMP *cpi, int filt_val); extern void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi); @@ -231,7 +230,6 @@ void vp8_initialize() //vp8_dmachine_specific_config(); vp8_tokenize_initialize(); - vp8cx_init_mv_bits_sadcost(); init_done = 1; } } -- 2.7.4