From: Yue Chen Date: Fri, 22 Jan 2016 01:08:52 +0000 (-0800) Subject: Relocate supertx prob update X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb29aec42cca548b1d1fa4aba42909283bee3474;p=libvpx Relocate supertx prob update Move it from vp10_adapt_intra_frame_probs() to vp10_adapt_inter_frame_probs() because intra frames do not use supertx. Change-Id: I28c7391944848666054d4b990ac17a8ae08aaaee --- diff --git a/vp10/common/entropymode.c b/vp10/common/entropymode.c index 3e1068065..579745101 100644 --- a/vp10/common/entropymode.c +++ b/vp10/common/entropymode.c @@ -1326,6 +1326,16 @@ void vp10_adapt_inter_frame_probs(VP10_COMMON *cm) { counts->inter_mode[i], fc->inter_mode_probs[i]); #endif +#if CONFIG_SUPERTX + for (i = 0; i < PARTITION_SUPERTX_CONTEXTS; ++i) { + int j; + for (j = 1; j < TX_SIZES; ++j) { + fc->supertx_prob[i][j] = mode_mv_merge_probs(pre_fc->supertx_prob[i][j], + counts->supertx[i][j]); + } + } +#endif // CONFIG_SUPERTX + for (i = 0; i < BLOCK_SIZE_GROUPS; i++) vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->y_mode_prob[i], counts->y_mode[i], fc->y_mode_prob[i]); @@ -1420,16 +1430,6 @@ void vp10_adapt_intra_frame_probs(VP10_COMMON *cm) { } #endif // CONFIG_EXT_TX -#if CONFIG_SUPERTX - for (i = 0; i < PARTITION_SUPERTX_CONTEXTS; ++i) { - int j; - for (j = 1; j < TX_SIZES; ++j) { - fc->supertx_prob[i][j] = mode_mv_merge_probs(pre_fc->supertx_prob[i][j], - counts->supertx[i][j]); - } - } -#endif // CONFIG_SUPERTX - if (cm->seg.temporal_update) { for (i = 0; i < PREDICTION_PROBS; i++) fc->seg.pred_probs[i] = mode_mv_merge_probs(pre_fc->seg.pred_probs[i], diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index f05dcd357..b1d8dc33d 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1104,7 +1104,7 @@ static void update_state(VP9_COMP *cpi, ThreadData *td, THR_D63_PRED /*D63_PRED*/, THR_TM /*TM_PRED*/, }; - ++cpi->mode_chosen_counts[kf_mode_index[mbmi->mode]]; + ++cpi->mode_chosen_counts[kf_mode_index[xdmi->mode]]; } else { // Note how often each mode chosen as best ++cpi->mode_chosen_counts[ctx->best_mode_index];