diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index e666b6c7e1c86c04cf9b3b4cdbb6f1260bfcaa0c..38319690431e10983e162e7fa8cc404341fb575c 100644 --- a/vp8/encoder/bitstream.c +++ b/vp8/encoder/bitstream.c @@ -50,7 +50,7 @@ const int vp8cx_base_skip_false_prob[128] = unsigned __int64 Sectionbits[500]; #endif -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS int intra_mode_stats[10][10][10]; static unsigned int tree_update_hist [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES] [2]; extern unsigned int active_section; @@ -531,7 +531,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) vp8_convert_rfct_to_prob(cpi); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 1; #endif @@ -580,7 +580,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) xd->mb_to_top_edge = -((mb_row * 16)) << 3; xd->mb_to_bottom_edge = ((pc->mb_rows - 1 - mb_row) * 16) << 3; -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 9; #endif @@ -593,7 +593,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) if (rf == INTRA_FRAME) { vp8_write(w, 0, cpi->prob_intra_coded); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 6; #endif write_ymode(w, mode, pc->fc.ymode_prob); @@ -633,13 +633,13 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) vp8_mv_ref_probs(mv_ref_p, ct); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS accum_mv_refs(mode, ct); #endif } -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 3; #endif @@ -649,7 +649,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) { case NEWMV: -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 5; #endif @@ -692,7 +692,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) if (blockmode == NEW4X4) { -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 11; #endif write_mv(w, &blockmv.as_mv, &best_mv, (const MV_CONTEXT *) mvc); @@ -769,7 +769,7 @@ static void write_kfmodes(VP8_COMP *cpi) const B_PREDICTION_MODE L = left_block_mode(m, i); const int bm = m->bmi[i].as_mode; -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS ++intra_mode_stats [A] [L] [bm]; #endif @@ -1154,7 +1154,7 @@ void vp8_update_coef_probs(VP8_COMP *cpi) #endif -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS ++ tree_update_hist [i][j][k][t] [u]; #endif @@ -1175,7 +1175,7 @@ void vp8_update_coef_probs(VP8_COMP *cpi) while (++t < ENTROPY_NODES); /* Accum token counts for generation of default statistics */ -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS t = 0; do @@ -1521,7 +1521,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest if (pc->frame_type != KEY_FRAME) vp8_write_bit(bc, pc->refresh_last_frame); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS if (pc->frame_type == INTER_FRAME) active_section = 0; @@ -1544,7 +1544,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest vp8_update_coef_probs(cpi); #endif -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 2; #endif @@ -1555,7 +1555,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest { write_kfmodes(cpi); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 8; #endif } @@ -1563,7 +1563,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest { pack_inter_mode_mvs(cpi); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 1; #endif } @@ -1681,7 +1681,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest #endif } -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS void print_tree_update_probs() { int i, j, k, l; diff --git a/vp8/encoder/boolhuff.c b/vp8/encoder/boolhuff.c index 74770a276a02e8dfbc2b4fcf8419d8331e33cc7c..3b0c03a142de2d6c1a35b42e4bd6f6e3605ae573 100644 --- a/vp8/encoder/boolhuff.c +++ b/vp8/encoder/boolhuff.c @@ -16,7 +16,7 @@ unsigned __int64 Sectionbits[500]; #endif -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS unsigned int active_section = 0; #endif diff --git a/vp8/encoder/boolhuff.h b/vp8/encoder/boolhuff.h index 83090630672a31f755989af592383904810f447c..39ab586b52b369aca0973de504880961c47e0612 100644 --- a/vp8/encoder/boolhuff.h +++ b/vp8/encoder/boolhuff.h @@ -67,7 +67,7 @@ static void vp8_encode_bool(BOOL_CODER *br, int bit, int probability) unsigned int lowvalue = br->lowvalue; register unsigned int shift; -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS #if defined(SECTIONBITS_OUTPUT) if (bit) diff --git a/vp8/encoder/encodemv.c b/vp8/encoder/encodemv.c index 0c43d0692174b13ca7aa126efa003718dc2f4aab..2a74ff4ae3a1313a47b23733850627e4054cf08e 100644 --- a/vp8/encoder/encodemv.c +++ b/vp8/encoder/encodemv.c @@ -16,7 +16,7 @@ #include <math.h> -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS extern unsigned int active_section; #endif @@ -359,7 +359,7 @@ void vp8_write_mvprobs(VP8_COMP *cpi) vp8_writer *const w = cpi->bc; MV_CONTEXT *mvc = cpi->common.fc.mvc; int flags[2] = {0, 0}; -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 4; #endif write_component_probs( @@ -374,7 +374,7 @@ void vp8_write_mvprobs(VP8_COMP *cpi) if (flags[0] || flags[1]) vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cpi->common.fc.mvc, flags); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS active_section = 5; #endif } diff --git a/vp8/encoder/mcomp.c b/vp8/encoder/mcomp.c index a34af64280702b800485f701860420b370e55d43..2c59872f76caa9648af6b00cab78d4e865f4264f 100644 --- a/vp8/encoder/mcomp.c +++ b/vp8/encoder/mcomp.c @@ -18,7 +18,7 @@ #include <math.h> #include "vp8/common/findnearmv.h" -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS static int mv_ref_ct [31] [4] [2]; static int mv_mode_cts [4] [2]; #endif @@ -1912,7 +1912,7 @@ int vp8_refining_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d, + mv_err_cost(&this_mv, center_mv, mvcost, x->errorperbit); } -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS void print_mode_context(void) { FILE *f = fopen("modecont.c", "w"); @@ -1965,8 +1965,8 @@ void print_mode_context(void) fclose(f); } -/* MV ref count ENTROPY_STATS stats code */ -#ifdef ENTROPY_STATS +/* MV ref count VP8_ENTROPY_STATS stats code */ +#ifdef VP8_ENTROPY_STATS void init_mv_ref_counts() { vpx_memset(mv_ref_ct, 0, sizeof(mv_ref_ct)); @@ -2020,6 +2020,6 @@ void accum_mv_refs(MB_PREDICTION_MODE m, const int ct[4]) } } -#endif/* END MV ref count ENTROPY_STATS stats code */ +#endif/* END MV ref count VP8_ENTROPY_STATS stats code */ #endif diff --git a/vp8/encoder/mcomp.h b/vp8/encoder/mcomp.h index 890113f9a433b6a6e7decad114baf43b88129854..e36c51543cb0d3d5ebc16a6c36b5330c002efb09 100644 --- a/vp8/encoder/mcomp.h +++ b/vp8/encoder/mcomp.h @@ -15,7 +15,7 @@ #include "block.h" #include "vp8/common/variance.h" -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS extern void init_mv_ref_counts(); extern void accum_mv_refs(MB_PREDICTION_MODE, const int near_mv_ref_cts[4]); #endif diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 92f9818577436368e5e665c480e9da8c92256179..124b1cb3591b818e3eaa9d262c16113096e562e7 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -111,7 +111,7 @@ extern int skip_false_count; #endif -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS extern int intra_mode_stats[10][10][10]; #endif @@ -1806,7 +1806,7 @@ struct VP8_COMP* vp8_create_compressor(VP8_CONFIG *oxcf) else cpi->cyclic_refresh_map = (signed char *) NULL; -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS init_context_counters(); #endif @@ -1924,7 +1924,7 @@ struct VP8_COMP* vp8_create_compressor(VP8_CONFIG *oxcf) cpi->mb.rd_thresh_mult[i] = 128; } -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS init_mv_ref_counts(); #endif @@ -2061,7 +2061,7 @@ void vp8_remove_compressor(VP8_COMP **ptr) #endif -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS print_context_counters(); print_tree_update_probs(); print_mode_context(); @@ -2243,7 +2243,7 @@ void vp8_remove_compressor(VP8_COMP **ptr) } #endif -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS { int i, j, k; FILE *fmode = fopen("modecontext.c", "w"); diff --git a/vp8/encoder/tokenize.c b/vp8/encoder/tokenize.c index 3b5268b6135934a125a14c72f8fd489eef9a2510..11559a72083c3ebf9b9715bb9e0b3c2ee0c401e6 100644 --- a/vp8/encoder/tokenize.c +++ b/vp8/encoder/tokenize.c @@ -20,7 +20,7 @@ /* Global event counters used for accumulating statistics across several compressions, then generating context.c = initial stats. */ -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS]; #endif void vp8_stuff_mb(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t) ; @@ -413,7 +413,7 @@ void vp8_tokenize_mb(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t) } -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS void init_context_counters(void) { diff --git a/vp8/encoder/tokenize.h b/vp8/encoder/tokenize.h index c2d1438f9c2e88369f542d654164ab2f056ba821..1e6cea1146573bbd5b702c7e6d587dd03900c1cb 100644 --- a/vp8/encoder/tokenize.h +++ b/vp8/encoder/tokenize.h @@ -33,7 +33,7 @@ typedef struct int rd_cost_mby(MACROBLOCKD *); -#ifdef ENTROPY_STATS +#ifdef VP8_ENTROPY_STATS void init_context_counters(); void print_context_counters();