cm->error.setjmp = 0;
-#ifdef MODE_TEST_HIT_STATS
- vp9_zero(cpi->mode_test_hits);
-#endif
-
return 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);
extern "C" {
#endif
-// #define MODE_TEST_HIT_STATS
-
#define DEFAULT_GF_INTERVAL 10
#define MAX_MODES 30
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();
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,
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,