Merge "ENTROPY_STATS -> VP8_ENTROPY_STATS in vp8/." into experimental
This commit is contained in:
commit
716f0c4ee7
@ -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;
|
||||
|
@ -16,7 +16,7 @@ unsigned __int64 Sectionbits[500];
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENTROPY_STATS
|
||||
#ifdef VP8_ENTROPY_STATS
|
||||
unsigned int active_section = 0;
|
||||
#endif
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user