summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2016-04-26 12:57:08 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-04-26 12:57:09 +0000
commit779840c9f4854430813fa88833d3db99e99ebb36 (patch)
tree2d9e28222bd2b844904b9deb1496565c0f8d7440 /vp9
parent7a4c2c7671f1b0a583ce79d316910f96b1004772 (diff)
parent015c43f0c1b0325632283f371a42974968b5655a (diff)
downloadlibvpx-779840c9f4854430813fa88833d3db99e99ebb36.tar
libvpx-779840c9f4854430813fa88833d3db99e99ebb36.tar.gz
libvpx-779840c9f4854430813fa88833d3db99e99ebb36.tar.bz2
libvpx-779840c9f4854430813fa88833d3db99e99ebb36.zip
Merge "Resolve a couple of TODOs in firstpass.c"
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_firstpass.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 7c59c8e9b..e25b64202 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -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;