From d37cd9768258aa976bfd0df69a5ae9dded04a30c Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Wed, 7 Dec 2011 13:03:57 -0800 Subject: [PATCH] Removed #if CONFIG_I8X8 This commit removed the macro CONFIG_I8X8, which was used to indicate the 8x8 intra prediction experiment, made the change fully merged in. Change-Id: Iafa4443781ce6e83f5591c12ba615a0e92ce0ea0 --- configure | 1 - vp8/common/blockd.h | 8 ++--- vp8/common/entropymode.c | 31 ----------------- vp8/common/entropymode.h | 4 --- vp8/common/findnearmv.h | 4 --- vp8/common/generic/systemdependent.c | 6 ---- vp8/common/invtrans.c | 2 -- vp8/common/loopfilter.c | 11 +----- vp8/common/onyxc_int.h | 3 +- vp8/common/recon.c | 2 -- vp8/common/recon.h | 13 -------- vp8/common/reconintra.c | 2 -- vp8/decoder/decodemv.c | 16 +++------ vp8/decoder/decodframe.c | 45 +++++++++---------------- vp8/decoder/detokenize.c | 4 --- vp8/decoder/threading.c | 2 -- vp8/encoder/bitstream.c | 14 +++----- vp8/encoder/block.h | 2 -- vp8/encoder/encodeframe.c | 19 +++-------- vp8/encoder/encodeintra.c | 2 -- vp8/encoder/encodemb.c | 9 ----- vp8/encoder/modecosts.c | 3 -- vp8/encoder/onyx_if.c | 39 +++------------------- vp8/encoder/onyx_int.h | 30 ++++++++--------- vp8/encoder/quantize.c | 4 --- vp8/encoder/rdopt.c | 50 ++++++---------------------- vp8/encoder/tokenize.c | 4 --- 27 files changed, 61 insertions(+), 269 deletions(-) diff --git a/configure b/configure index 7942af9ba..29073938f 100755 --- a/configure +++ b/configure @@ -223,7 +223,6 @@ EXPERIMENT_LIST=" segfeatures t8x8 csm - i8x8 qimode uvintra newnear diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h index 751f58f79..4989b34af 100644 --- a/vp8/common/blockd.h +++ b/vp8/common/blockd.h @@ -86,9 +86,7 @@ typedef enum V_PRED, /* vertical prediction */ H_PRED, /* horizontal prediction */ TM_PRED, /* Truemotion prediction */ -#if CONFIG_I8X8 I8X8_PRED, /* 8x8 based prediction, each 8x8 has its own prediction mode */ -#endif B_PRED, /* block based prediction, each block has its own prediction mode */ NEARESTMV, @@ -345,10 +343,8 @@ static void update_blockd_bmi(MACROBLOCKD *xd) int i; int is_4x4; is_4x4 = (xd->mode_info_context->mbmi.mode == SPLITMV) || -#if CONFIG_I8X8 - (xd->mode_info_context->mbmi.mode==I8X8_PRED)|| -#endif - (xd->mode_info_context->mbmi.mode == B_PRED); + (xd->mode_info_context->mbmi.mode == I8X8_PRED) || + (xd->mode_info_context->mbmi.mode == B_PRED); if (is_4x4) { diff --git a/vp8/common/entropymode.c b/vp8/common/entropymode.c index 15fbc41b6..5b1a6d35c 100644 --- a/vp8/common/entropymode.c +++ b/vp8/common/entropymode.c @@ -12,7 +12,6 @@ #include "entropymode.h" #include "entropy.h" #include "vpx_mem/vpx_mem.h" -#if CONFIG_I8X8 #if CONFIG_QIMODE const unsigned int kf_y_mode_cts[8][VP8_YMODES] = @@ -31,10 +30,6 @@ static const unsigned int kf_y_mode_cts[VP8_YMODES] = { 49, 22, 23, 11, 23, 128} #endif /* TODO: calibrate the baseline distribution */ static const unsigned int y_mode_cts [VP8_YMODES] = { 8080, 1908, 1582, 1007, 2000, 5874}; -#else -static const unsigned int kf_y_mode_cts[VP8_YMODES] = { 1607, 915, 812, 811, 5455}; -static const unsigned int y_mode_cts [VP8_YMODES] = { 8080, 1908, 1582, 1007, 5874}; -#endif #if CONFIG_UVINTRA static const unsigned int uv_mode_cts [VP8_UV_MODES] ={ 162, 41, 41, 12}; @@ -53,9 +48,7 @@ static const unsigned int uv_mode_cts [VP8_UV_MODES] = { 59483, 13605, 16492, 4 #endif -#if CONFIG_I8X8 static const unsigned int i8x8_mode_cts [VP8_UV_MODES] = {93, 69, 81, 13}; -#endif #if CONFIG_UVINTRA @@ -169,7 +162,6 @@ const vp8_tree_index vp8_bmode_tree[18] = /* INTRAMODECONTEXTNODE value */ /* Again, these trees use the same probability indices as their explicitly-programmed predecessors. */ -#if CONFIG_I8X8 const vp8_tree_index vp8_ymode_tree[10] = { -DC_PRED, 2, @@ -194,23 +186,6 @@ const vp8_tree_index vp8_i8x8_mode_tree[6] = -V_PRED, 4, -H_PRED, -TM_PRED }; -#else -const vp8_tree_index vp8_ymode_tree[8] = -{ - -DC_PRED, 2, - 4, 6, - -V_PRED, -H_PRED, - -TM_PRED, -B_PRED -}; - -const vp8_tree_index vp8_kf_ymode_tree[8] = -{ - -B_PRED, 2, - 4, 6, - -DC_PRED, -V_PRED, - -H_PRED, -TM_PRED -}; -#endif const vp8_tree_index vp8_uv_mode_tree[6] = { -DC_PRED, 2, @@ -245,9 +220,7 @@ struct vp8_token_struct vp8_bmode_encodings [VP8_BINTRAMODES]; struct vp8_token_struct vp8_ymode_encodings [VP8_YMODES]; struct vp8_token_struct vp8_kf_ymode_encodings [VP8_YMODES]; struct vp8_token_struct vp8_uv_mode_encodings [VP8_UV_MODES]; -#if CONFIG_I8X8 struct vp8_token_struct vp8_i8x8_mode_encodings [VP8_UV_MODES]; -#endif struct vp8_token_struct vp8_mbsplit_encodings [VP8_NUMMBSPLITS]; struct vp8_token_struct vp8_mv_ref_encoding_array [VP8_MVREFS]; @@ -314,13 +287,11 @@ void vp8_init_mbmode_probs(VP8_COMMON *x) 256, 1 ); #endif -#if CONFIG_I8X8 vp8_tree_probs_from_distribution( VP8_UV_MODES, vp8_i8x8_mode_encodings, vp8_i8x8_mode_tree, x->i8x8_mode_prob, bct, i8x8_mode_cts, 256, 1 ); -#endif vpx_memcpy(x->fc.sub_mv_ref_prob, sub_mv_ref_prob, sizeof(sub_mv_ref_prob)); } @@ -373,9 +344,7 @@ void vp8_entropy_mode_init() vp8_tokens_from_tree(vp8_ymode_encodings, vp8_ymode_tree); vp8_tokens_from_tree(vp8_kf_ymode_encodings, vp8_kf_ymode_tree); vp8_tokens_from_tree(vp8_uv_mode_encodings, vp8_uv_mode_tree); -#if CONFIG_I8X8 vp8_tokens_from_tree(vp8_i8x8_mode_encodings, vp8_i8x8_mode_tree); -#endif vp8_tokens_from_tree(vp8_mbsplit_encodings, vp8_mbsplit_tree); vp8_tokens_from_tree_offset(vp8_mv_ref_encoding_array, diff --git a/vp8/common/entropymode.h b/vp8/common/entropymode.h index c4dda3ac1..7f5bdf901 100644 --- a/vp8/common/entropymode.h +++ b/vp8/common/entropymode.h @@ -38,9 +38,7 @@ extern const vp8_tree_index vp8_bmode_tree[]; extern const vp8_tree_index vp8_ymode_tree[]; extern const vp8_tree_index vp8_kf_ymode_tree[]; extern const vp8_tree_index vp8_uv_mode_tree[]; -#if CONFIG_I8X8 extern const vp8_tree_index vp8_i8x8_mode_tree[]; -#endif extern const vp8_tree_index vp8_mbsplit_tree[]; extern const vp8_tree_index vp8_mv_ref_tree[]; extern const vp8_tree_index vp8_sub_mv_ref_tree[]; @@ -48,9 +46,7 @@ extern const vp8_tree_index vp8_sub_mv_ref_tree[]; extern struct vp8_token_struct vp8_bmode_encodings [VP8_BINTRAMODES]; extern struct vp8_token_struct vp8_ymode_encodings [VP8_YMODES]; extern struct vp8_token_struct vp8_kf_ymode_encodings [VP8_YMODES]; -#if CONFIG_I8X8 extern struct vp8_token_struct vp8_i8x8_mode_encodings [VP8_UV_MODES]; -#endif extern struct vp8_token_struct vp8_uv_mode_encodings [VP8_UV_MODES]; extern struct vp8_token_struct vp8_mbsplit_encodings [VP8_NUMMBSPLITS]; diff --git a/vp8/common/findnearmv.h b/vp8/common/findnearmv.h index b26f9873b..30570a10d 100644 --- a/vp8/common/findnearmv.h +++ b/vp8/common/findnearmv.h @@ -137,9 +137,7 @@ static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b) return B_HE_PRED; case TM_PRED: return B_TM_PRED; -#if CONFIG_I8X8 case I8X8_PRED: -#endif case B_PRED: return (cur_mb->bmi + b + 3)->as_mode; default: @@ -167,9 +165,7 @@ static B_PREDICTION_MODE above_block_mode(const MODE_INFO return B_HE_PRED; case TM_PRED: return B_TM_PRED; -#if CONFIG_I8X8 case I8X8_PRED: -#endif case B_PRED: return (cur_mb->bmi + b + 12)->as_mode; default: diff --git a/vp8/common/generic/systemdependent.c b/vp8/common/generic/systemdependent.c index 961916314..445cd3f09 100644 --- a/vp8/common/generic/systemdependent.c +++ b/vp8/common/generic/systemdependent.c @@ -90,9 +90,7 @@ void vp8_machine_specific_config(VP8_COMMON *ctx) #endif /* CONFIG_DUALPRED */ rtcd->recon.copy8x4 = vp8_copy_mem8x4_c; rtcd->recon.recon = vp8_recon_b_c; -#if CONFIG_I8X8 rtcd->recon.recon_uv = vp8_recon_uv_b_c; -#endif rtcd->recon.recon2 = vp8_recon2b_c; rtcd->recon.recon4 = vp8_recon4b_c; rtcd->recon.recon_mb = vp8_recon_mb_c; @@ -107,14 +105,10 @@ void vp8_machine_specific_config(VP8_COMMON *ctx) vp8_build_intra_predictors_mbuv_s; rtcd->recon.intra4x4_predict = vp8_intra4x4_predict; - -#if CONFIG_I8X8 rtcd->recon.intra8x8_predict = vp8_intra8x8_predict; rtcd->recon.intra_uv4x4_predict = vp8_intra_uv4x4_predict; -#endif - rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c; rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c; diff --git a/vp8/common/invtrans.c b/vp8/common/invtrans.c index c734df42f..11361c16c 100644 --- a/vp8/common/invtrans.c +++ b/vp8/common/invtrans.c @@ -77,9 +77,7 @@ void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x int i; if (x->mode_info_context->mbmi.mode != B_PRED && -#if CONFIG_I8X8 x->mode_info_context->mbmi.mode != I8X8_PRED && -#endif x->mode_info_context->mbmi.mode != SPLITMV) { /* do 2nd order transform on the dc block */ diff --git a/vp8/common/loopfilter.c b/vp8/common/loopfilter.c index 11853310d..aa205f10e 100644 --- a/vp8/common/loopfilter.c +++ b/vp8/common/loopfilter.c @@ -137,9 +137,7 @@ static void lf_init_lut(loop_filter_info_n *lfi) lfi->mode_lf_lut[H_PRED] = 1; lfi->mode_lf_lut[TM_PRED] = 1; lfi->mode_lf_lut[B_PRED] = 0; -#if CONFIG_I8X8 lfi->mode_lf_lut[I8X8_PRED]=0; -#endif lfi->mode_lf_lut[ZEROMV] = 1; lfi->mode_lf_lut[NEARESTMV] = 2; lfi->mode_lf_lut[NEARMV] = 2; @@ -323,9 +321,7 @@ void vp8_loop_filter_frame for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) { int skip_lf = (mode_info_context->mbmi.mode != B_PRED && -#if CONFIG_I8X8 mode_info_context->mbmi.mode != I8X8_PRED && -#endif mode_info_context->mbmi.mode != SPLITMV && mode_info_context->mbmi.mb_skip_coeff); @@ -437,10 +433,7 @@ void vp8_loop_filter_frame_yonly for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) { int skip_lf = (mode_info_context->mbmi.mode != B_PRED && -#if CONFIG_I8X8 mode_info_context->mbmi.mode != I8X8_PRED && -#endif - mode_info_context->mbmi.mode != SPLITMV && mode_info_context->mbmi.mb_skip_coeff); @@ -578,9 +571,7 @@ void vp8_loop_filter_partial_frame for (mb_col = 0; mb_col < mb_cols; mb_col++) { int skip_lf = (mode_info_context->mbmi.mode != B_PRED && -#if CONFIG_I8X8 - mode_info_context->mbmi.mode != I8X8_PRED && -#endif + mode_info_context->mbmi.mode != I8X8_PRED && mode_info_context->mbmi.mode != SPLITMV && mode_info_context->mbmi.mb_skip_coeff); diff --git a/vp8/common/onyxc_int.h b/vp8/common/onyxc_int.h index 04f8507d6..544557626 100644 --- a/vp8/common/onyxc_int.h +++ b/vp8/common/onyxc_int.h @@ -208,9 +208,8 @@ typedef struct VP8Common #else vp8_prob kf_uv_mode_prob [VP8_UV_MODES-1]; #endif -#if CONFIG_I8X8 + vp8_prob i8x8_mode_prob [VP8_UV_MODES-1]; -#endif #if CONFIG_MULCONTEXT FRAME_CONTEXT lfc_a; /* last alt ref entropy */ diff --git a/vp8/common/recon.c b/vp8/common/recon.c index 724d0a3cf..279fbe82f 100644 --- a/vp8/common/recon.c +++ b/vp8/common/recon.c @@ -44,7 +44,6 @@ void vp8_recon_b_c } } -#if CONFIG_I8X8 void vp8_recon_uv_b_c ( unsigned char *pred_ptr, @@ -75,7 +74,6 @@ void vp8_recon_uv_b_c pred_ptr += 8; } } -#endif void vp8_recon4b_c ( unsigned char *pred_ptr, diff --git a/vp8/common/recon.h b/vp8/common/recon.h index b82e9a720..9b5682701 100644 --- a/vp8/common/recon.h +++ b/vp8/common/recon.h @@ -71,12 +71,10 @@ extern prototype_copy_block(vp8_recon_copy8x4); #endif extern prototype_recon_block(vp8_recon_recon); -#if CONFIG_I8X8 #ifndef vp8_recon_recon_uv #define vp8_recon_recon_uv vp8_recon_uv_b_c #endif extern prototype_recon_block(vp8_recon_recon_uv); -#endif extern prototype_recon_block(vp8_recon_recon); #ifndef vp8_recon_recon2 @@ -105,13 +103,11 @@ extern prototype_recon_macroblock(vp8_recon_recon_mby); extern prototype_build_intra_predictors\ (vp8_recon_build_intra_predictors_mby); -#if CONFIG_I8X8 #ifndef vp8_recon_build_intra8x8_predictors_mby #define vp8_recon_build_intra8x8_predictors_mby vp8_build_intra8x8_predictors_mby #endif extern prototype_build_intra_predictors\ (vp8_recon_build_intra8x8_predictors_mby); -#endif #ifndef vp8_recon_build_intra_predictors_mby_s #define vp8_recon_build_intra_predictors_mby_s vp8_build_intra_predictors_mby_s @@ -125,13 +121,11 @@ extern prototype_build_intra_predictors\ extern prototype_build_intra_predictors\ (vp8_recon_build_intra_predictors_mbuv); -#if CONFIG_I8X8 #ifndef vp8_recon_build_intra8x8_predictors_mbuv #define vp8_recon_build_intra8x8_predictors_mbuv vp8_build_intra8x8_predictors_mbuv #endif extern prototype_build_intra_predictors\ (vp8_recon_build_intra8x8_predictors_mbuv); -#endif #ifndef vp8_recon_build_intra_predictors_mbuv_s #define vp8_recon_build_intra_predictors_mbuv_s vp8_build_intra_predictors_mbuv_s @@ -145,7 +139,6 @@ extern prototype_build_intra_predictors\ extern prototype_intra4x4_predict\ (vp8_recon_intra4x4_predict); -#if CONFIG_I8X8 #ifndef vp8_recon_intra8x8_predict #define vp8_recon_intra8x8_predict vp8_intra8x8_predict #endif @@ -158,8 +151,6 @@ extern prototype_intra4x4_predict\ extern prototype_intra4x4_predict\ (vp8_recon_intra_uv4x4_predict); -#endif - typedef prototype_copy_block((*vp8_copy_block_fn_t)); typedef prototype_recon_block((*vp8_recon_fn_t)); typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t)); @@ -175,9 +166,7 @@ typedef struct vp8_recon_rtcd_vtable #endif /* CONFIG_DUALPRED */ vp8_copy_block_fn_t copy8x4; vp8_recon_fn_t recon; -#if CONFIG_I8X8 vp8_recon_fn_t recon_uv; -#endif vp8_recon_fn_t recon2; vp8_recon_fn_t recon4; vp8_recon_mb_fn_t recon_mb; @@ -187,10 +176,8 @@ typedef struct vp8_recon_rtcd_vtable vp8_build_intra_pred_fn_t build_intra_predictors_mbuv_s; vp8_build_intra_pred_fn_t build_intra_predictors_mbuv; vp8_intra4x4_pred_fn_t intra4x4_predict; -#if CONFIG_I8X8 vp8_intra4x4_pred_fn_t intra8x8_predict; vp8_intra4x4_pred_fn_t intra_uv4x4_predict; -#endif } vp8_recon_rtcd_vtable_t; #if CONFIG_RUNTIME_CPU_DETECT diff --git a/vp8/common/reconintra.c b/vp8/common/reconintra.c index 52ef050dc..21a5b3f53 100644 --- a/vp8/common/reconintra.c +++ b/vp8/common/reconintra.c @@ -551,7 +551,6 @@ void vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x) break; } } -#if CONFIG_I8X8 void vp8_intra8x8_predict(BLOCKD *x, int mode, unsigned char *predictor) @@ -731,4 +730,3 @@ void vp8_intra_uv4x4_predict(BLOCKD *x, Current code assumes that a uv 4x4 block use same mode as corresponding Y 8x8 area */ -#endif diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index 75d47dc18..2696c2f43 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -42,14 +42,12 @@ static int vp8_kfread_ymode(vp8_reader *bc, const vp8_prob *p) return i; } -#if CONFIG_I8X8 static int vp8_read_i8x8_mode(vp8_reader *bc, const vp8_prob *p) { const int i = vp8_treed_read(bc, vp8_i8x8_mode_tree, p); return i; } -#endif static int vp8_read_uv_mode(vp8_reader *bc, const vp8_prob *p) @@ -139,7 +137,6 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, } while (++i < 16); } -#if CONFIG_I8X8 if((m->mbmi.mode = y_mode) == I8X8_PRED) { int i; @@ -155,13 +152,12 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, } } else -#endif #if CONFIG_UVINTRA - m->mbmi.uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(bc, - pbi->common.kf_uv_mode_prob[m->mbmi.mode]); + m->mbmi.uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(bc, + pbi->common.kf_uv_mode_prob[m->mbmi.mode]); #else - m->mbmi.uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(bc, - pbi->common.kf_uv_mode_prob); + m->mbmi.uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(bc, + pbi->common.kf_uv_mode_prob); #endif } @@ -787,7 +783,6 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, while (++j < 16); } -#if CONFIG_I8X8 if(mbmi->mode == I8X8_PRED) { int i; @@ -803,8 +798,7 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, } } else -#endif - mbmi->uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(bc, pbi->common.fc.uv_mode_prob); + mbmi->uv_mode = (MB_PREDICTION_MODE)vp8_read_uv_mode(bc, pbi->common.fc.uv_mode_prob); } } diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c index b9fefa94e..75ba1f00f 100644 --- a/vp8/decoder/decodframe.c +++ b/vp8/decoder/decodframe.c @@ -208,10 +208,8 @@ void clamp_mvs(MACROBLOCKD *xd) } } -#if CONFIG_I8X8 -extern const int vp8_i8x8_block[4]; -#endif +extern const int vp8_i8x8_block[4]; static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, unsigned int mb_idx) { @@ -267,9 +265,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, mode = xd->mode_info_context->mbmi.mode; if (eobtotal == 0 && mode != B_PRED && mode != SPLITMV -#if CONFIG_I8X8 && mode != I8X8_PRED -#endif &&!vp8dx_bool_error(xd->current_bc) ) { @@ -301,22 +297,17 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, /* do prediction */ if (xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME) { -#if CONFIG_I8X8 if(mode != I8X8_PRED) { -#endif - RECON_INVOKE(&pbi->common.rtcd.recon, build_intra_predictors_mbuv)(xd); - - if (mode != B_PRED) - { - RECON_INVOKE(&pbi->common.rtcd.recon, - build_intra_predictors_mby)(xd); - } else { - vp8_intra_prediction_down_copy(xd); + RECON_INVOKE(&pbi->common.rtcd.recon, build_intra_predictors_mbuv)(xd); + if (mode != B_PRED) + { + RECON_INVOKE(&pbi->common.rtcd.recon, + build_intra_predictors_mby)(xd); + } else { + vp8_intra_prediction_down_copy(xd); + } } -#if CONFIG_I8X8 - } -#endif } else { @@ -344,7 +335,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, #endif /* dequantization and idct */ -#if CONFIG_I8X8 if (mode == I8X8_PRED) { for (i = 0; i < 4; i++) @@ -392,9 +382,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, *(b->base_dst) + b->dst, 8, b->dst_stride); } } - else -#endif - if (mode == B_PRED) + else if (mode == B_PRED) { for (i = 0; i < 16; i++) { @@ -500,13 +488,11 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, } else #endif -#if CONFIG_I8X8 if(xd->mode_info_context->mbmi.mode!=I8X8_PRED) -#endif - DEQUANT_INVOKE (&pbi->dequant, idct_add_uv_block) - (xd->qcoeff+16*16, xd->block[16].dequant, - xd->predictor+16*16, xd->dst.u_buffer, xd->dst.v_buffer, - xd->dst.uv_stride, xd->eobs+16); + DEQUANT_INVOKE (&pbi->dequant, idct_add_uv_block) + (xd->qcoeff+16*16, xd->block[16].dequant, + xd->predictor+16*16, xd->dst.u_buffer, xd->dst.v_buffer, + xd->dst.uv_stride, xd->eobs+16); } @@ -593,9 +579,8 @@ decode_mb_row(VP8D_COMP *pbi, VP8_COMMON *pc, int mb_row, MACROBLOCKD *xd) } #endif -#if CONFIG_I8X8 update_blockd_bmi(xd); -#endif + xd->dst.y_buffer = pc->yv12_fb[dst_fb_idx].y_buffer + recon_yoffset; xd->dst.u_buffer = pc->yv12_fb[dst_fb_idx].u_buffer + recon_uvoffset; xd->dst.v_buffer = pc->yv12_fb[dst_fb_idx].v_buffer + recon_uvoffset; diff --git a/vp8/decoder/detokenize.c b/vp8/decoder/detokenize.c index ef57b4f4e..fd134156b 100644 --- a/vp8/decoder/detokenize.c +++ b/vp8/decoder/detokenize.c @@ -90,9 +90,7 @@ void vp8_reset_mb_tokens_context(MACROBLOCKD *x) { /* Clear entropy contexts for Y2 blocks */ if (x->mode_info_context->mbmi.mode != B_PRED && -#if CONFIG_I8X8 x->mode_info_context->mbmi.mode != I8X8_PRED && -#endif x->mode_info_context->mbmi.mode != SPLITMV) { vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); @@ -669,9 +667,7 @@ int vp8_decode_mb_tokens(VP8D_COMP *dx, MACROBLOCKD *xd) scan = vp8_default_zig_zag1d; qcoeff_ptr = &xd->qcoeff[0]; if (xd->mode_info_context->mbmi.mode != B_PRED && -#if CONFIG_I8X8 xd->mode_info_context->mbmi.mode != I8X8_PRED && -#endif xd->mode_info_context->mbmi.mode != SPLITMV) { i = 24; diff --git a/vp8/decoder/threading.c b/vp8/decoder/threading.c index f5c916f34..b86592368 100644 --- a/vp8/decoder/threading.c +++ b/vp8/decoder/threading.c @@ -898,9 +898,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd) if (pbi->common.filter_level) { int skip_lf = (xd->mode_info_context->mbmi.mode != B_PRED && -#if CONFIG_I8X8 xd->mode_info_context->mbmi.mode != I8X8_PRED && -#endif xd->mode_info_context->mbmi.mode != SPLITMV && xd->mode_info_context->mbmi.mb_skip_coeff); diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index 955cc3133..0ddc0c71b 100644 --- a/vp8/encoder/bitstream.c +++ b/vp8/encoder/bitstream.c @@ -148,12 +148,11 @@ static void kfwrite_ymode(vp8_writer *bc, int m, const vp8_prob *p) vp8_write_token(bc, vp8_kf_ymode_tree, p, vp8_kf_ymode_encodings + m); } -#if CONFIG_I8X8 static void write_i8x8_mode(vp8_writer *bc, int m, const vp8_prob *p) { vp8_write_token(bc,vp8_i8x8_mode_tree, p, vp8_i8x8_mode_encodings + m); } -#endif + static void write_uv_mode(vp8_writer *bc, int m, const vp8_prob *p) { vp8_write_token(bc, vp8_uv_mode_tree, p, vp8_uv_mode_encodings + m); @@ -1140,7 +1139,6 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) write_bmode(w, m->bmi[j].as_mode, pc->fc.bmode_prob); while (++j < 16); } -#if CONFIG_I8X8 if(mode == I8X8_PRED) { write_i8x8_mode(w, m->bmi[0].as_mode, pc->i8x8_mode_prob); @@ -1149,9 +1147,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) write_i8x8_mode(w, m->bmi[10].as_mode, pc->i8x8_mode_prob); } else -#endif - - write_uv_mode(w, mi->uv_mode, pc->fc.uv_mode_prob); + write_uv_mode(w, mi->uv_mode, pc->fc.uv_mode_prob); } else { @@ -1399,7 +1395,6 @@ static void write_kfmodes(VP8_COMP *cpi) } while (++i < 16); } -#if CONFIG_I8X8 if(ym == I8X8_PRED) { write_i8x8_mode(bc, m->bmi[0].as_mode, c->i8x8_mode_prob); @@ -1409,11 +1404,10 @@ static void write_kfmodes(VP8_COMP *cpi) m++; } else -#endif #if CONFIG_UVINTRA - write_uv_mode(bc, (m++)->mbmi.uv_mode, c->kf_uv_mode_prob[ym]); + write_uv_mode(bc, (m++)->mbmi.uv_mode, c->kf_uv_mode_prob[ym]); #else - write_uv_mode(bc, (m++)->mbmi.uv_mode, c->kf_uv_mode_prob); + write_uv_mode(bc, (m++)->mbmi.uv_mode, c->kf_uv_mode_prob); #endif } //printf("\n"); diff --git a/vp8/encoder/block.h b/vp8/encoder/block.h index 12209ab4c..f992630a3 100644 --- a/vp8/encoder/block.h +++ b/vp8/encoder/block.h @@ -98,9 +98,7 @@ typedef struct int mbmode_cost[2][MB_MODE_COUNT]; int intra_uv_mode_cost[2][MB_MODE_COUNT]; unsigned int bmode_costs[10][10][10]; -#if CONFIG_I8X8 unsigned int i8x8_mode_costs[MB_MODE_COUNT]; -#endif unsigned int inter_bmode_costs[B_MODE_COUNT]; // These define limits to motion vector components to prevent them from extending outside the UMV borders diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 9474b999d..1b1afa0c8 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -1435,7 +1435,7 @@ static void sum_intra_stats(VP8_COMP *cpi, MACROBLOCK *x) } while (++b < 16); } -#if CONFIG_I8X8 + if(m==I8X8_PRED) { i8x8_modes[xd->block[0].bmi.as_mode]++; @@ -1443,7 +1443,6 @@ static void sum_intra_stats(VP8_COMP *cpi, MACROBLOCK *x) i8x8_modes[xd->block[8].bmi.as_mode]++; i8x8_modes[xd->block[10].bmi.as_mode]++; } -#endif #endif ++cpi->ymode_count[m]; @@ -1488,24 +1487,18 @@ int vp8cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t) vp8_update_zbin_extra(cpi, x); } -#if CONFIG_I8X8 if(x->e_mbd.mode_info_context->mbmi.mode == I8X8_PRED) { vp8_encode_intra8x8mby(IF_RTCD(&cpi->rtcd), x); vp8_encode_intra8x8mbuv(IF_RTCD(&cpi->rtcd), x); } - else -#endif - if (x->e_mbd.mode_info_context->mbmi.mode == B_PRED) + else if (x->e_mbd.mode_info_context->mbmi.mode == B_PRED) vp8_encode_intra4x4mby(IF_RTCD(&cpi->rtcd), x); else - { vp8_encode_intra16x16mby(IF_RTCD(&cpi->rtcd), x); - } -#if CONFIG_I8X8 - if(x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED) -#endif - vp8_encode_intra16x16mbuv(IF_RTCD(&cpi->rtcd), x); + + if(x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED) + vp8_encode_intra16x16mbuv(IF_RTCD(&cpi->rtcd), x); sum_intra_stats(cpi, x); vp8_tokenize_mb(cpi, &x->e_mbd, t); #if CONFIG_T8X8 @@ -1701,13 +1694,11 @@ int vp8cx_encode_inter_macroblock vp8_encode_intra16x16mbuv(IF_RTCD(&cpi->rtcd), x); vp8_encode_intra4x4mby(IF_RTCD(&cpi->rtcd), x); } -#if CONFIG_I8X8 else if(xd->mode_info_context->mbmi.mode == I8X8_PRED) { vp8_encode_intra8x8mby(IF_RTCD(&cpi->rtcd), x); vp8_encode_intra8x8mbuv(IF_RTCD(&cpi->rtcd), x); } -#endif else { vp8_encode_intra16x16mbuv(IF_RTCD(&cpi->rtcd), x); diff --git a/vp8/encoder/encodeintra.c b/vp8/encoder/encodeintra.c index 3bd52c9b7..2064491a6 100644 --- a/vp8/encoder/encodeintra.c +++ b/vp8/encoder/encodeintra.c @@ -250,7 +250,6 @@ void vp8_encode_intra16x16mbuv(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) vp8_recon_intra_mbuv(IF_RTCD(&rtcd->common->recon), &x->e_mbd); } -#if CONFIG_I8X8 void vp8_encode_intra8x8(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x, int ib) { @@ -328,4 +327,3 @@ void vp8_encode_intra8x8mbuv(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) vp8_encode_intra_uv4x4(rtcd, x, i+20, mode); } } -#endif diff --git a/vp8/encoder/encodemb.c b/vp8/encoder/encodemb.c index 2178e5bae..82ac021fd 100644 --- a/vp8/encoder/encodemb.c +++ b/vp8/encoder/encodemb.c @@ -719,9 +719,7 @@ static void optimize_mb(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd) tl = (ENTROPY_CONTEXT *)&t_left; has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 &&x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED -#endif && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC; @@ -771,9 +769,7 @@ void vp8_optimize_mby(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd) tl = (ENTROPY_CONTEXT *)&t_left; has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 &&x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED -#endif && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC; @@ -1088,10 +1084,7 @@ void optimize_mb_8x8(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd) tl = (ENTROPY_CONTEXT *)&t_left; has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 &&x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED -#endif - && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); type = has_2nd_order ? 0 : 3; @@ -1190,9 +1183,7 @@ void vp8_optimize_mby_8x8(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd) tl = (ENTROPY_CONTEXT *)&t_left; has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 && x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED -#endif && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); type = has_2nd_order ? 0 : 3; diff --git a/vp8/encoder/modecosts.c b/vp8/encoder/modecosts.c index 2f239b6b5..36fea9f9f 100644 --- a/vp8/encoder/modecosts.c +++ b/vp8/encoder/modecosts.c @@ -52,10 +52,7 @@ void vp8_init_mode_costs(VP8_COMP *c) #else vp8_cost_tokens(c->mb.intra_uv_mode_cost[0], x->kf_uv_mode_prob, vp8_uv_mode_tree); #endif -#if CONFIG_I8X8 vp8_cost_tokens(c->mb.i8x8_mode_costs, x->i8x8_mode_prob,vp8_i8x8_mode_tree); -#endif - } diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index cc3a17579..4c30c399f 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -845,9 +845,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_V_PRED ] = 1000; sf->thresh_mult[THR_H_PRED ] = 1000; sf->thresh_mult[THR_B_PRED ] = 2000; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = 2000; -#endif sf->thresh_mult[THR_TM ] = 1000; sf->thresh_mult[THR_NEWMV ] = 1000; @@ -886,9 +884,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_V_PRED ] = 1000; sf->thresh_mult[THR_H_PRED ] = 1000; sf->thresh_mult[THR_B_PRED ] = 2500; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = 2500; -#endif sf->thresh_mult[THR_TM ] = 1000; sf->thresh_mult[THR_NEARESTG ] = 1000; @@ -974,9 +970,8 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_V_PRED ] = 1500; sf->thresh_mult[THR_H_PRED ] = 1500; sf->thresh_mult[THR_B_PRED ] = 5000; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = 5000; -#endif + if (cpi->ref_frame_flags & VP8_LAST_FLAG) { sf->thresh_mult[THR_NEWMV ] = 2000; @@ -1028,9 +1023,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_V_PRED ] = 2000; sf->thresh_mult[THR_H_PRED ] = 2000; sf->thresh_mult[THR_B_PRED ] = 7500; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = 7500; -#endif if (cpi->ref_frame_flags & VP8_LAST_FLAG) { @@ -1090,10 +1083,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) cpi->mode_check_freq[THR_V_PRED] = 0; cpi->mode_check_freq[THR_H_PRED] = 0; cpi->mode_check_freq[THR_B_PRED] = 0; -#if CONFIG_I8X8 cpi->mode_check_freq[THR_I8X8_PRED] = 0; -#endif - cpi->mode_check_freq[THR_NEARG] = 0; cpi->mode_check_freq[THR_NEWG] = 0; cpi->mode_check_freq[THR_NEARA] = 0; @@ -1112,10 +1102,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) cpi->mode_check_freq[THR_V_PRED] = 2; cpi->mode_check_freq[THR_H_PRED] = 2; cpi->mode_check_freq[THR_B_PRED] = 2; -#if CONFIG_I8X8 cpi->mode_check_freq[THR_I8X8_PRED]=2; -#endif - if (cpi->ref_frame_flags & VP8_GOLD_FLAG) { @@ -1176,9 +1163,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_V_PRED ] = 1000; sf->thresh_mult[THR_H_PRED ] = 1000; sf->thresh_mult[THR_B_PRED ] = 2500; -#if CONFIG_I8X8 - sf->thresh_mult[THR_I8X8_PRED] = 2500; -#endif + sf->thresh_mult[THR_I8X8_PRED] = 2500; sf->thresh_mult[THR_NEARESTG ] = 1000; sf->thresh_mult[THR_ZEROG ] = 1000; sf->thresh_mult[THR_NEARG ] = 1000; @@ -1220,9 +1205,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_V_PRED ] = 2000; sf->thresh_mult[THR_H_PRED ] = 2000; sf->thresh_mult[THR_B_PRED ] = 5000; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = 5000; -#endif if (cpi->ref_frame_flags & VP8_LAST_FLAG) { @@ -1269,9 +1252,8 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_V_PRED ] = 2000; sf->thresh_mult[THR_H_PRED ] = 2000; sf->thresh_mult[THR_B_PRED ] = 5000; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = 5000; -#endif + if (cpi->ref_frame_flags & VP8_LAST_FLAG) { sf->thresh_mult[THR_NEWMV ] = 2000; @@ -1320,10 +1302,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) cpi->mode_check_freq[THR_V_PRED] = 2; cpi->mode_check_freq[THR_H_PRED] = 2; cpi->mode_check_freq[THR_B_PRED] = 2; -#if CONFIG_I8X8 cpi->mode_check_freq[THR_I8X8_PRED]=2; -#endif - if (cpi->ref_frame_flags & VP8_GOLD_FLAG) { @@ -1371,9 +1350,8 @@ void vp8_set_speed_features(VP8_COMP *cpi) cpi->mode_check_freq[THR_V_PRED] = 4; cpi->mode_check_freq[THR_H_PRED] = 4; cpi->mode_check_freq[THR_B_PRED] = 4; -#if CONFIG_I8X8 cpi->mode_check_freq[THR_I8X8_PRED]=4; -#endif + if (cpi->ref_frame_flags & VP8_GOLD_FLAG) { cpi->mode_check_freq[THR_NEARG] = 2; @@ -1388,10 +1366,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) sf->thresh_mult[THR_TM ] = 2000; sf->thresh_mult[THR_B_PRED ] = 5000; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = 5000; -#endif - if (cpi->ref_frame_flags & VP8_GOLD_FLAG) { @@ -1420,9 +1395,7 @@ void vp8_set_speed_features(VP8_COMP *cpi) { // Disable split MB intra prediction mode sf->thresh_mult[THR_B_PRED] = INT_MAX; -#if CONFIG_I8X8 sf->thresh_mult[THR_I8X8_PRED] = INT_MAX; -#endif } if (Speed > 6) @@ -2720,12 +2693,8 @@ void vp8_remove_compressor(VP8_PTR *ptr) sprintf(modes_stats_file, "modes_q%03d.stt",cpi->common.base_qindex); f = fopen(modes_stats_file, "w"); fprintf(f, "intra_mode in Intra Frames:\n"); -#if CONFIG_I8X8 fprintf(f, "Y: %8d, %8d, %8d, %8d, %8d, %8d\n", y_modes[0], y_modes[1], y_modes[2], y_modes[3], y_modes[4], y_modes[5]); fprintf(f, "I8:%8d, %8d, %8d, %8d\n", i8x8_modes[0], i8x8_modes[1], i8x8_modes[2], i8x8_modes[3]); -#else - fprintf(f, "Y: %8d, %8d, %8d, %8d, %8d\n", y_modes[0], y_modes[1], y_modes[2], y_modes[3], y_modes[4]); -#endif fprintf(f, "UV:%8d, %8d, %8d, %8d\n", uv_modes[0], uv_modes[1], uv_modes[2], uv_modes[3]); fprintf(f, "Y-UV:\n"); { diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h index ce36cdb96..9f026dc90 100644 --- a/vp8/encoder/onyx_int.h +++ b/vp8/encoder/onyx_int.h @@ -43,9 +43,9 @@ #define AF_THRESH2 100 #define ARF_DECAY_THRESH 12 #if CONFIG_DUALPRED -#define MAX_MODES (32 + CONFIG_I8X8) +#define MAX_MODES 33 #else /* CONFIG_DUALPRED */ -#define MAX_MODES (20 + CONFIG_I8X8) +#define MAX_MODES 21 #endif /* CONFIG_DUALPRED */ #define MIN_THRESHMULT 32 @@ -190,26 +190,24 @@ typedef enum THR_SPLITA = 18, THR_B_PRED = 19, -#if CONFIG_I8X8 THR_I8X8_PRED = 20, -#endif #if CONFIG_DUALPRED - THR_DUAL_ZEROLG = 20 + CONFIG_I8X8, - THR_DUAL_NEARESTLG = 21 + CONFIG_I8X8, - THR_DUAL_NEARLG = 22 + CONFIG_I8X8, + THR_DUAL_ZEROLG = 21, + THR_DUAL_NEARESTLG = 22, + THR_DUAL_NEARLG = 23, - THR_DUAL_ZEROLA = 23 + CONFIG_I8X8, - THR_DUAL_NEARESTLA = 24 + CONFIG_I8X8, - THR_DUAL_NEARLA = 25 + CONFIG_I8X8, + THR_DUAL_ZEROLA = 24, + THR_DUAL_NEARESTLA = 25, + THR_DUAL_NEARLA = 26, - THR_DUAL_ZEROGA = 26 + CONFIG_I8X8, - THR_DUAL_NEARESTGA = 27 + CONFIG_I8X8, - THR_DUAL_NEARGA = 28 + CONFIG_I8X8, + THR_DUAL_ZEROGA = 27, + THR_DUAL_NEARESTGA = 28, + THR_DUAL_NEARGA = 29, - THR_DUAL_NEWLG = 29 + CONFIG_I8X8, - THR_DUAL_NEWLA = 30 + CONFIG_I8X8, - THR_DUAL_NEWGA = 31 + CONFIG_I8X8, + THR_DUAL_NEWLG = 30, + THR_DUAL_NEWLA = 31, + THR_DUAL_NEWGA = 32, #endif /* CONFIG_DUALPRED */ } THR_MODES; diff --git a/vp8/encoder/quantize.c b/vp8/encoder/quantize.c index 78f7dd4c6..926a1cc79 100644 --- a/vp8/encoder/quantize.c +++ b/vp8/encoder/quantize.c @@ -286,9 +286,7 @@ void vp8_quantize_mby_c(MACROBLOCK *x) { int i; int has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 && x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED -#endif && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); for (i = 0; i < 16; i++) @@ -302,9 +300,7 @@ void vp8_quantize_mb_c(MACROBLOCK *x) { int i; int has_2nd_order=(x->e_mbd.mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 && x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED -#endif && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); for (i = 0; i < 24+has_2nd_order; i++) diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index f4a44baa7..c3d4145df 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -103,9 +103,7 @@ const MB_PREDICTION_MODE vp8_mode_order[MAX_MODES] = SPLITMV, B_PRED, -#if CONFIG_I8X8 I8X8_PRED, -#endif #if CONFIG_DUALPRED /* dual prediction modes */ @@ -157,9 +155,7 @@ const MV_REFERENCE_FRAME vp8_ref_frame_order[MAX_MODES] = ALTREF_FRAME, INTRA_FRAME, -#if CONFIG_I8X8 INTRA_FRAME, -#endif #if CONFIG_DUALPRED /* dual prediction modes */ @@ -186,9 +182,7 @@ const MV_REFERENCE_FRAME vp8_second_ref_frame_order[MAX_MODES] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -#if CONFIG_I8X8 0, -#endif /* dual prediction modes */ GOLDEN_FRAME, @@ -881,7 +875,6 @@ static int rd_pick_intra16x16mby_mode(VP8_COMP *cpi, x->e_mbd.mode_info_context->mbmi.mode = mode_selected; return best_rd; } -#if CONFIG_I8X8 static int rd_pick_intra8x8block( VP8_COMP *cpi, MACROBLOCK *x, @@ -1030,7 +1023,6 @@ int rd_pick_intra8x8mby_modes(VP8_COMP *cpi, *Distortion = distortion; return RDCOST(mb->rdmult, mb->rddiv, cost, distortion); } -#endif static int rd_cost_mbuv(MACROBLOCK *mb) { @@ -2014,7 +2006,6 @@ static void rd_update_mvcount(VP8_COMP *cpi, MACROBLOCK *x, int_mv *best_ref_mv) } } -#if CONFIG_I8X8 static void set_i8x8_block_modes(MACROBLOCK *x, int *modes) { int i; @@ -2033,9 +2024,6 @@ static void set_i8x8_block_modes(MACROBLOCK *x, int *modes) xd->block[i].bmi = xd->mode_info_context->bmi[i]; } } -#endif - - void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int recon_uvoffset, int *returnrate, int *returndistortion, int *returnintra, @@ -2054,9 +2042,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int MB_PREDICTION_MODE this_mode; int num00; int best_mode_index = 0; -#if CONFIG_I8X8 int mode8x8[4]; -#endif unsigned char segment_id = xd->mode_info_context->mbmi.segment_id; int i; @@ -2309,7 +2295,6 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int } } break; -#if CONFIG_I8X8 case I8X8_PRED: { int tmp_rd; @@ -2339,7 +2324,6 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int } } break; -#endif case SPLITMV: { @@ -2842,9 +2826,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int vpx_memcpy(&best_partition, x->partition_info, sizeof(PARTITION_INFO)); if ((this_mode == B_PRED) -#if CONFIG_I8X8 ||(this_mode == I8X8_PRED) -#endif || (this_mode == SPLITMV)) for (i = 0; i < 16; i++) { @@ -2984,12 +2966,10 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int } } -#if CONFIG_I8X8 if (best_mbmode.mode == I8X8_PRED) { set_i8x8_block_modes(x, mode8x8); } -#endif if (best_mbmode.mode == SPLITMV) { @@ -3021,12 +3001,10 @@ void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) int rate4x4_tokenonly = 0; int rate16x16_tokenonly = 0; int rateuv_tokenonly = 0; -#if CONFIG_I8X8 int error8x8, rate8x8_tokenonly=0; int rate8x8, dist8x8; int mode16x16; int mode8x8[4]; -#endif x->e_mbd.mode_info_context->mbmi.ref_frame = INTRA_FRAME; @@ -3036,7 +3014,6 @@ void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) error16x16 = rd_pick_intra16x16mby_mode(cpi, x, &rate16x16, &rate16x16_tokenonly, &dist16x16); -#if CONFIG_I8X8 mode16x16 = x->e_mbd.mode_info_context->mbmi.mode; error8x8 = rd_pick_intra8x8mby_modes(cpi, x, &rate8x8, &rate8x8_tokenonly, @@ -3045,7 +3022,6 @@ void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) mode8x8[1]= x->e_mbd.mode_info_context->bmi[2].as_mode; mode8x8[2]= x->e_mbd.mode_info_context->bmi[8].as_mode; mode8x8[3]= x->e_mbd.mode_info_context->bmi[10].as_mode; -#endif #if CONFIG_T8X8 if ( get_seg_tx_type( xd, @@ -3065,24 +3041,19 @@ void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) &dist4x4, error16x16); #endif -#if CONFIG_I8X8 if(error8x8> error16x16) { -#endif - if (error4x4 < error16x16) - { - x->e_mbd.mode_info_context->mbmi.mode = B_PRED; - rate += rate4x4; - } - else - { -#if CONFIG_I8X8 - x->e_mbd.mode_info_context->mbmi.mode = mode16x16; -#endif - rate += rate16x16; + if (error4x4 < error16x16) + { + x->e_mbd.mode_info_context->mbmi.mode = B_PRED; + rate += rate4x4; + } + else + { + x->e_mbd.mode_info_context->mbmi.mode = mode16x16; + rate += rate16x16; - } -#if CONFIG_I8X8 + } } else { @@ -3099,6 +3070,5 @@ void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) rate += rate8x8; } } -#endif *rate_ = rate; } diff --git a/vp8/encoder/tokenize.c b/vp8/encoder/tokenize.c index 0f8525e20..f14ad0794 100644 --- a/vp8/encoder/tokenize.c +++ b/vp8/encoder/tokenize.c @@ -499,9 +499,7 @@ void vp8_tokenize_mb(VP8_COMP *cpi, MACROBLOCKD *x, TOKENEXTRA **t) skip_inc = 0; has_y2_block = (x->mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 && x->mode_info_context->mbmi.mode != I8X8_PRED -#endif && x->mode_info_context->mbmi.mode != SPLITMV); x->mode_info_context->mbmi.mb_skip_coeff = @@ -1029,9 +1027,7 @@ void vp8_fix_contexts(MACROBLOCKD *x) { /* Clear entropy contexts for Y2 blocks */ if (x->mode_info_context->mbmi.mode != B_PRED -#if CONFIG_I8X8 && x->mode_info_context->mbmi.mode != I8X8_PRED -#endif && x->mode_info_context->mbmi.mode != SPLITMV) { vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));