Commit cc5eee12 authored by Dmitry Kovalev's avatar Dmitry Kovalev Committed by Gerrit Code Review

Merge "Removing MODE_TEST_HIT_STATS."

parents 1354d0bb 4788d453
......@@ -1050,10 +1050,6 @@ VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf) {
cm->error.setjmp = 0;
#ifdef MODE_TEST_HIT_STATS
vp9_zero(cpi->mode_test_hits);
#endif
return cpi;
}
......@@ -1112,34 +1108,6 @@ void vp9_remove_compressor(VP9_COMP *cpi) {
#endif
#ifdef MODE_TEST_HIT_STATS
if (cpi->pass != 1) {
double norm_per_pixel_mode_tests = 0;
double norm_counts[BLOCK_SIZES];
int i;
int sb64_per_frame;
int norm_factors[BLOCK_SIZES] =
{256, 128, 128, 64, 32, 32, 16, 8, 8, 4, 2, 2, 1};
FILE *f = fopen("mode_hit_stats.stt", "a");
// On average, how many mode tests do we do
for (i = 0; i < BLOCK_SIZES; ++i) {
norm_counts[i] = (double)cpi->mode_test_hits[i] /
(double)norm_factors[i];
norm_per_pixel_mode_tests += norm_counts[i];
}
// Convert to a number per 64x64 and per frame
sb64_per_frame = ((cpi->common.height + 63) / 64) *
((cpi->common.width + 63) / 64);
norm_per_pixel_mode_tests =
norm_per_pixel_mode_tests /
(double)(cpi->common.current_video_frame * sb64_per_frame);
fprintf(f, "%6.4f\n", norm_per_pixel_mode_tests);
fclose(f);
}
#endif
#if 0
{
printf("\n_pick_loop_filter_level:%d\n", cpi->time_pick_lpf / 1000);
......
......@@ -40,8 +40,6 @@
extern "C" {
#endif
// #define MODE_TEST_HIT_STATS
#define DEFAULT_GF_INTERVAL 10
#define MAX_MODES 30
......@@ -517,11 +515,6 @@ typedef struct VP9_COMP {
int this_frame_weight;
int max_arf_level;
#endif
#ifdef MODE_TEST_HIT_STATS
// Debug / test stats
int64_t mode_test_hits[BLOCK_SIZES];
#endif
} VP9_COMP;
void vp9_initialize_enc();
......
......@@ -3330,12 +3330,6 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
for (i = 0; i < TX_MODES; ++i)
tx_cache[i] = INT64_MAX;
#ifdef MODE_TEST_HIT_STATS
// TEST/DEBUG CODE
// Keep a rcord of the number of test hits at each size
cpi->mode_test_hits[bsize]++;
#endif
if (ref_frame == INTRA_FRAME) {
TX_SIZE uv_tx;
intra_super_block_yrd(cpi, x, &rate_y, &distortion_y, &skippable, NULL,
......@@ -3874,12 +3868,6 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
xd->plane[i].pre[1] = yv12_mb[second_ref_frame][i];
}
#ifdef MODE_TEST_HIT_STATS
// TEST/DEBUG CODE
// Keep a rcord of the number of test hits at each size
cpi->mode_test_hits[bsize]++;
#endif
if (ref_frame == INTRA_FRAME) {
int rate;
if (rd_pick_intra_sub_8x8_y_mode(cpi, x, &rate, &rate_y,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment