diff options
author | Deb Mukherjee <debargha@google.com> | 2012-10-22 12:19:00 -0700 |
---|---|---|
committer | Deb Mukherjee <debargha@google.com> | 2012-10-22 15:23:41 -0700 |
commit | 78808ad9fb101cbd06652b383f94f4409f2eba2d (patch) | |
tree | c3b30623e2574df50af9f06e973667923895a662 /vp8/encoder/onyx_if.c | |
parent | 12c1b180f8f30ecf75f9a24a60cc421d2cf8fd5a (diff) | |
download | libvpx-78808ad9fb101cbd06652b383f94f4409f2eba2d.tar libvpx-78808ad9fb101cbd06652b383f94f4409f2eba2d.tar.gz libvpx-78808ad9fb101cbd06652b383f94f4409f2eba2d.tar.bz2 libvpx-78808ad9fb101cbd06652b383f94f4409f2eba2d.zip |
Merge of the newmventropy experiment
Removes the old mv encoding code.
Change-Id: I1026d48cc5ac15ccb776f98463e929254c3dc7da
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r-- | vp8/encoder/onyx_if.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 8f0a52be8..7c1fe43e3 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -138,12 +138,10 @@ extern int skip_false_count; extern int intra_mode_stats[VP8_BINTRAMODES][VP8_BINTRAMODES][VP8_BINTRAMODES]; #endif -#if CONFIG_NEWMVENTROPY #ifdef NMV_STATS extern void init_nmvstats(); extern void print_nmvstats(); #endif -#endif #ifdef SPEEDSTATS unsigned int frames_at_speed[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; @@ -1689,8 +1687,6 @@ void vp8_change_config(VP8_PTR ptr, VP8_CONFIG *oxcf) { #define M_LOG2_E 0.693147180559945309417 #define log2f(x) (log (x) / (float) M_LOG2_E) -#if CONFIG_NEWMVENTROPY - static void cal_nmvjointsadcost(int *mvjointsadcost) { mvjointsadcost[0] = 600; mvjointsadcost[1] = 300; @@ -1728,40 +1724,6 @@ static void cal_nmvsadcosts_hp(int *mvsadcost[2]) { } while (++i <= MV_MAX); } -#else - -static void cal_mvsadcosts(int *mvsadcost[2]) { - int i = 1; - - mvsadcost [0] [0] = 300; - mvsadcost [1] [0] = 300; - - do { - double z = 256 * (2 * (log2f(8 * i) + .6)); - mvsadcost [0][i] = (int) z; - mvsadcost [1][i] = (int) z; - mvsadcost [0][-i] = (int) z; - mvsadcost [1][-i] = (int) z; - } while (++i <= mvfp_max); -} - -static void cal_mvsadcosts_hp(int *mvsadcost[2]) { - int i = 1; - - mvsadcost [0] [0] = 300; - mvsadcost [1] [0] = 300; - - do { - double z = 256 * (2 * (log2f(8 * i) + .6)); - mvsadcost [0][i] = (int) z; - mvsadcost [1][i] = (int) z; - mvsadcost [0][-i] = (int) z; - mvsadcost [1][-i] = (int) z; - } while (++i <= mvfp_max_hp); -} - -#endif /* CONFIG_NEWMVENTROPY */ - VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf) { int i; volatile union { @@ -1877,11 +1839,9 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf) { vp8_zero(inter_uv_modes); vp8_zero(inter_b_modes); #endif -#if CONFIG_NEWMVENTROPY #ifdef NMV_STATS init_nmvstats(); #endif -#endif /*Initialize the feed-forward activity masking.*/ cpi->activity_avg = 90 << 12; @@ -1947,7 +1907,6 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf) { cpi->gf_rate_correction_factor = 1.0; cpi->twopass.est_max_qcorrection_factor = 1.0; -#if CONFIG_NEWMVENTROPY cal_nmvjointsadcost(cpi->mb.nmvjointsadcost); cpi->mb.nmvcost[0] = &cpi->mb.nmvcosts[0][MV_MAX]; cpi->mb.nmvcost[1] = &cpi->mb.nmvcosts[1][MV_MAX]; @@ -1960,19 +1919,6 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf) { cpi->mb.nmvsadcost_hp[0] = &cpi->mb.nmvsadcosts_hp[0][MV_MAX]; cpi->mb.nmvsadcost_hp[1] = &cpi->mb.nmvsadcosts_hp[1][MV_MAX]; cal_nmvsadcosts_hp(cpi->mb.nmvsadcost_hp); -#else - cpi->mb.mvcost[0] = &cpi->mb.mvcosts[0][mv_max + 1]; - cpi->mb.mvcost[1] = &cpi->mb.mvcosts[1][mv_max + 1]; - cpi->mb.mvsadcost[0] = &cpi->mb.mvsadcosts[0][mvfp_max + 1]; - cpi->mb.mvsadcost[1] = &cpi->mb.mvsadcosts[1][mvfp_max + 1]; - cal_mvsadcosts(cpi->mb.mvsadcost); - - cpi->mb.mvcost_hp[0] = &cpi->mb.mvcosts_hp[0][mv_max_hp + 1]; - cpi->mb.mvcost_hp[1] = &cpi->mb.mvcosts_hp[1][mv_max_hp + 1]; - cpi->mb.mvsadcost_hp[0] = &cpi->mb.mvsadcosts_hp[0][mvfp_max_hp + 1]; - cpi->mb.mvsadcost_hp[1] = &cpi->mb.mvsadcosts_hp[1][mvfp_max_hp + 1]; - cal_mvsadcosts_hp(cpi->mb.mvsadcost_hp); -#endif /* CONFIG_NEWMVENTROPY */ for (i = 0; i < KEY_FRAME_CONTEXT; i++) { cpi->prior_key_frame_distance[i] = (int)cpi->output_frame_rate; @@ -2099,12 +2045,10 @@ void vp8_remove_compressor(VP8_PTR *ptr) { print_mode_context(); } #endif -#if CONFIG_NEWMVENTROPY #ifdef NMV_STATS if (cpi->pass != 1) print_nmvstats(); #endif -#endif #if CONFIG_INTERNAL_STATS @@ -3728,14 +3672,8 @@ static void encode_frame_to_data_rate vp8_copy(cpi->common.fc.mbsplit_counts, cpi->mbsplit_count); vp8_adapt_mode_probs(&cpi->common); -#if CONFIG_NEWMVENTROPY cpi->common.fc.NMVcount = cpi->NMVcount; vp8_adapt_nmv_probs(&cpi->common, cpi->mb.e_mbd.allow_high_precision_mv); -#else - vp8_copy(cpi->common.fc.MVcount, cpi->MVcount); - vp8_copy(cpi->common.fc.MVcount_hp, cpi->MVcount_hp); - vp8_adapt_mv_probs(&cpi->common); -#endif /* CONFIG_NEWMVENTROPY */ vp8_update_mode_context(&cpi->common); } |