// Adjustment limits for min and max q
qrange_adj = VPXMAX(1, (top_index - bottom_index) / 2);
- bottom_index = VPXMAX(bottom_index - qrange_adj / 2,
- cpi->oxcf.best_allowed_q);
- top_index = VPXMIN(cpi->oxcf.worst_allowed_q,
- top_index + qrange_adj / 2);
+ bottom_index =
+ VPXMAX(bottom_index - qrange_adj / 2, cpi->oxcf.best_allowed_q);
+ top_index =
+ VPXMIN(cpi->oxcf.worst_allowed_q, top_index + qrange_adj / 2);
}
#endif
// TODO(agrange) Scale cpi->max_mv_magnitude if frame-size has changed.
#ifdef AGRESSIVE_VBR
if (two_pass_first_group_inter(cpi)) {
cpi->twopass.active_worst_quality =
- VPXMIN(q + qrange_adj, cpi->oxcf.worst_allowed_q);
+ VPXMIN(q + qrange_adj, cpi->oxcf.worst_allowed_q);
}
#endif
fpfile = fopen("firstpass.stt", "a");
fprintf(fpfile,
- "%12.0lf %12.4lf %12.0lf %12.0lf %12.0lf %12.0lf %12.4lf"
+ "%12.0lf %12.4lf %12.0lf %12.0lf %12.0lf %12.0lf %12.4lf %12.4lf"
"%12.4lf %12.4lf %12.4lf %12.4lf %12.4lf %12.4lf %12.4lf %12.4lf"
- "%12.4lf %12.4lf %12.4lf %12.4lf %12.0lf %12.0lf %12.0lf %12.4lf"
+ "%12.4lf %12.4lf %12.4lf %12.4lf %12.4lf %12.0lf %12.0lf %12.0lf"
+ "%12.4lf"
"\n",
stats->frame, stats->weight, stats->intra_error, stats->coded_error,
stats->sr_coded_error, stats->frame_noise_energy, stats->pcnt_inter,
stats->pcnt_motion, stats->pcnt_second_ref, stats->pcnt_neutral,
+ stats->pcnt_intra_low, stats->pcnt_intra_high,
stats->intra_skip_pct, stats->intra_smooth_pct,
stats->inactive_zone_rows, stats->inactive_zone_cols, stats->MVr,
stats->mvr_abs, stats->MVc, stats->mvc_abs, stats->MVrv,
section->pcnt_neutral = 0.0;
section->intra_skip_pct = 0.0;
section->intra_smooth_pct = 0.0;
+ section->pcnt_intra_low = 0.0;
+ section->pcnt_intra_high = 0.0;
section->inactive_zone_rows = 0.0;
section->inactive_zone_cols = 0.0;
section->MVr = 0.0;
section->pcnt_neutral += frame->pcnt_neutral;
section->intra_skip_pct += frame->intra_skip_pct;
section->intra_smooth_pct += frame->intra_smooth_pct;
+ section->pcnt_intra_low += frame->pcnt_intra_low;
+ section->pcnt_intra_high += frame->pcnt_intra_high;
section->inactive_zone_rows += frame->inactive_zone_rows;
section->inactive_zone_cols += frame->inactive_zone_cols;
section->MVr += frame->MVr;
section->pcnt_neutral -= frame->pcnt_neutral;
section->intra_skip_pct -= frame->intra_skip_pct;
section->intra_smooth_pct -= frame->intra_smooth_pct;
+ section->pcnt_intra_low -= frame->pcnt_intra_low;
+ section->pcnt_intra_high -= frame->pcnt_intra_high;
section->inactive_zone_rows -= frame->inactive_zone_rows;
section->inactive_zone_cols -= frame->inactive_zone_cols;
section->MVr -= frame->MVr;
fps->pcnt_inter = (double)(fp_acc_data->intercount) / num_mbs;
fps->pcnt_second_ref = (double)(fp_acc_data->second_ref_count) / num_mbs;
fps->pcnt_neutral = (double)(fp_acc_data->neutral_count) / num_mbs;
+ fps->pcnt_intra_low = (double)(fp_acc_data->intra_count_low) / num_mbs;
+ fps->pcnt_intra_high = (double)(fp_acc_data->intra_count_high) / num_mbs;
fps->intra_skip_pct = (double)(fp_acc_data->intra_skip_count) / num_mbs;
fps->intra_smooth_pct = (double)(fp_acc_data->intra_smooth_count) / num_mbs;
fps->inactive_zone_rows = (double)(fp_acc_data->image_data_start_row);
this_tile->fp_data.intercount += fp_acc_data->intercount;
this_tile->fp_data.second_ref_count += fp_acc_data->second_ref_count;
this_tile->fp_data.neutral_count += fp_acc_data->neutral_count;
+ this_tile->fp_data.intra_count_low += fp_acc_data->intra_count_low;
+ this_tile->fp_data.intra_count_high += fp_acc_data->intra_count_high;
this_tile->fp_data.intra_skip_count += fp_acc_data->intra_skip_count;
this_tile->fp_data.mvcount += fp_acc_data->mvcount;
this_tile->fp_data.sum_mvr += fp_acc_data->sum_mvr;
fp_acc_data->frame_noise_energy += (int64_t)SECTION_NOISE_DEF;
}
} else { // Intra < inter error
- if (this_intra_error < scale_sse_threshold(cm, LOW_I_THRESH))
+ int scaled_low_intra_thresh = scale_sse_threshold(cm, LOW_I_THRESH);
+ if (this_intra_error < scaled_low_intra_thresh) {
fp_acc_data->frame_noise_energy += fp_estimate_block_noise(x, bsize);
- else
+ fp_acc_data->intra_count_low += 1.0;
+ } else {
fp_acc_data->frame_noise_energy += (int64_t)SECTION_NOISE_DEF;
+ fp_acc_data->intra_count_high += 1.0;
+ }
}
} else {
fp_acc_data->sr_coded_error += (int64_t)this_error;
rc->source_alt_ref_pending = 0;
}
- // Limit maximum boost based on interval length.
#ifdef AGRESSIVE_VBR
+ // Limit maximum boost based on interval length.
rc->gfu_boost = VPXMIN((int)rc->gfu_boost, i * 140);
#else
rc->gfu_boost = VPXMIN((int)rc->gfu_boost, i * 200);