From: hui su Date: Tue, 12 Apr 2016 17:18:12 +0000 (-0700) Subject: Add vp10_ prefix to full_to_model_counts and fill_token_costs X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0792748646b93d1dea669ecf264ab4f8ed568d99;p=libvpx Add vp10_ prefix to full_to_model_counts and fill_token_costs Change-Id: I5e6c644fb09f7a80c88142dfdfa05cf5be260241 --- diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c index da1885d3e..7f3b6a2d6 100644 --- a/vp10/encoder/bitstream.c +++ b/vp10/encoder/bitstream.c @@ -2313,8 +2313,8 @@ static void update_coef_probs(VP10_COMP *cpi, vp10_writer* w) { vp10_copy(eob_counts_copy, cm->counts.eob_branch); for (i = 1; i <= cpi->common.coef_probs_update_idx; ++i) { for (tx_size = TX_4X4; tx_size <= max_tx_size; ++tx_size) - full_to_model_counts(cm->counts.coef[tx_size], - subframe_stats->coef_counts_buf[i][tx_size]); + vp10_full_to_model_counts(cm->counts.coef[tx_size], + subframe_stats->coef_counts_buf[i][tx_size]); vp10_copy(cm->counts.eob_branch, subframe_stats->eob_counts_buf[i]); vp10_partial_adapt_probs(cm, 0, 0); vp10_copy(subframe_stats->coef_probs_buf[i], cm->fc->coef_probs); diff --git a/vp10/encoder/encodeframe.c b/vp10/encoder/encodeframe.c index 88e94867e..e6e0b4643 100644 --- a/vp10/encoder/encodeframe.c +++ b/vp10/encoder/encodeframe.c @@ -4318,8 +4318,8 @@ static void encode_rd_sb_row(VP10_COMP *cpi, SUBFRAME_STATS *subframe_stats = &cpi->subframe_stats; for (t = TX_4X4; t <= TX_32X32; ++t) - full_to_model_counts(cpi->td.counts->coef[t], - cpi->td.rd_counts.coef_counts[t]); + vp10_full_to_model_counts(cpi->td.counts->coef[t], + cpi->td.rd_counts.coef_counts[t]); vp10_partial_adapt_probs(cm, mi_row, mi_col); ++cm->coef_probs_update_idx; vp10_copy(subframe_stats->coef_probs_buf[cm->coef_probs_update_idx], @@ -4328,7 +4328,7 @@ static void encode_rd_sb_row(VP10_COMP *cpi, cpi->td.rd_counts.coef_counts); vp10_copy(subframe_stats->eob_counts_buf[cm->coef_probs_update_idx], cm->counts.eob_branch); - fill_token_costs(x->token_costs, cm->fc->coef_probs); + vp10_fill_token_costs(x->token_costs, cm->fc->coef_probs); } } #endif // CONFIG_ENTROPY diff --git a/vp10/encoder/encoder.c b/vp10/encoder/encoder.c index a39575b77..f412ac0f2 100644 --- a/vp10/encoder/encoder.c +++ b/vp10/encoder/encoder.c @@ -3406,13 +3406,9 @@ static void full_to_model_count(unsigned int *model_count, model_count[EOB_MODEL_TOKEN] = full_count[EOB_TOKEN]; } -#if CONFIG_ENTROPY -void full_to_model_counts(vp10_coeff_count_model *model_count, - vp10_coeff_count *full_count) { -#else -static void full_to_model_counts(vp10_coeff_count_model *model_count, - vp10_coeff_count *full_count) { -#endif // CONFIG_ENTROPY + +void vp10_full_to_model_counts(vp10_coeff_count_model *model_count, + vp10_coeff_count *full_count) { int i, j, k, l; for (i = 0; i < PLANE_TYPES; ++i) @@ -4403,8 +4399,8 @@ static void encode_frame_to_data_rate(VP10_COMP *cpi, vp10_update_reference_frames(cpi); for (t = TX_4X4; t <= TX_32X32; t++) - full_to_model_counts(cpi->td.counts->coef[t], - cpi->td.rd_counts.coef_counts[t]); + vp10_full_to_model_counts(cpi->td.counts->coef[t], + cpi->td.rd_counts.coef_counts[t]); if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) { #if CONFIG_ENTROPY diff --git a/vp10/encoder/encoder.h b/vp10/encoder/encoder.h index bf7815f48..b9847ef9a 100644 --- a/vp10/encoder/encoder.h +++ b/vp10/encoder/encoder.h @@ -630,10 +630,8 @@ int vp10_set_size_literal(VP10_COMP *cpi, unsigned int width, int vp10_get_quantizer(struct VP10_COMP *cpi); -#if CONFIG_ENTROPY -void full_to_model_counts(vp10_coeff_count_model *model_count, - vp10_coeff_count *full_count); -#endif // CONFIG_ENTROPY +void vp10_full_to_model_counts(vp10_coeff_count_model *model_count, + vp10_coeff_count *full_count); static INLINE int frame_is_kf_gf_arf(const VP10_COMP *cpi) { return frame_is_intra_only(&cpi->common) || diff --git a/vp10/encoder/rd.c b/vp10/encoder/rd.c index ce9fad73d..dc34f1f54 100644 --- a/vp10/encoder/rd.c +++ b/vp10/encoder/rd.c @@ -152,13 +152,8 @@ static void fill_mode_costs(VP10_COMP *cpi) { #endif // CONFIG_EXT_INTRA } -#if CONFIG_ENTROPY -void fill_token_costs(vp10_coeff_cost *c, - vp10_coeff_probs_model (*p)[PLANE_TYPES]) { -#else -static void fill_token_costs(vp10_coeff_cost *c, - vp10_coeff_probs_model (*p)[PLANE_TYPES]) { -#endif // CONFIG_ENTROPY +void vp10_fill_token_costs(vp10_coeff_cost *c, + vp10_coeff_probs_model (*p)[PLANE_TYPES]) { int i, j, k, l; TX_SIZE t; for (t = TX_4X4; t <= TX_32X32; ++t) @@ -397,7 +392,7 @@ void vp10_initialize_rd_consts(VP10_COMP *cpi) { #endif } if (cpi->oxcf.pass != 1) { - fill_token_costs(x->token_costs, cm->fc->coef_probs); + vp10_fill_token_costs(x->token_costs, cm->fc->coef_probs); if (cpi->sf.partition_search_type != VAR_BASED_PARTITION || cm->frame_type == KEY_FRAME) { diff --git a/vp10/encoder/rd.h b/vp10/encoder/rd.h index 80749dcce..7aad9ebf0 100644 --- a/vp10/encoder/rd.h +++ b/vp10/encoder/rd.h @@ -341,10 +341,8 @@ void vp10_update_rd_thresh_fact(const VP10_COMMON *const cm, int (*fact)[MAX_MODES], int rd_thresh, int bsize, int best_mode_index); -#if CONFIG_ENTROPY -void fill_token_costs(vp10_coeff_cost *c, - vp10_coeff_probs_model (*p)[PLANE_TYPES]); -#endif // CONFIG_ENTROPY +void vp10_fill_token_costs(vp10_coeff_cost *c, + vp10_coeff_probs_model (*p)[PLANE_TYPES]); static INLINE int rd_less_than_thresh(int64_t best_rd, int thresh, int thresh_fact) {