Resolve a couple of TODOs in firstpass.c

Resolved two TODO items.

Force a minimum value of 1.0 for frame duration as per section duration.

Column inactive zone is currently set to 0 as most of the serious issues
relating to inactive regions relate to letter boxing.

Change-Id: Ifbab3acf2c089d7305620a7ff7ed7c3536cc9235
This commit is contained in:
paulwilkins 2016-04-25 12:38:10 +01:00
parent 4b590058c8
commit 015c43f0c1

View File

@ -1124,7 +1124,8 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
fps.intra_skip_pct = (double)intra_skip_count / num_mbs;
fps.intra_smooth_pct = (double)intra_smooth_count / num_mbs;
fps.inactive_zone_rows = (double)image_data_start_row;
fps.inactive_zone_cols = (double)0; // TODO(paulwilkins): fix
// Currently set to 0 as most issues relate to letter boxing.
fps.inactive_zone_cols = (double)0;
if (mvcount > 0) {
fps.MVr = (double)sum_mvr / mvcount;
@ -1150,10 +1151,9 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
fps.pcnt_motion = 0.0;
}
// TODO(paulwilkins): Handle the case when duration is set to 0, or
// something less than the full time between subsequent values of
// cpi->source_time_stamp.
fps.duration = (double)(source->ts_end - source->ts_start);
// Dont allow a value of 0 for duration.
// (Section duration is also defaulted to minimum of 1.0).
fps.duration = VPXMAX(1.0, (double)(source->ts_end - source->ts_start));
// Don't want to do output stats with a stack variable!
twopass->this_frame_stats = fps;