diff options
author | Adrian Grange <agrange@google.com> | 2014-06-06 14:03:52 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-06-06 14:03:52 -0700 |
commit | b447b9d97886cb41067464fd8d54c93a270ea360 (patch) | |
tree | 1de88f2e784a766dced0718a1436c342318c9937 /vp9 | |
parent | 5f72de91a8cf7c816f0ea746fd41a66155e4f2ba (diff) | |
parent | a4f747921ae9b0a11dc032ebc3a6364d2f6dd8b9 (diff) | |
download | libvpx-b447b9d97886cb41067464fd8d54c93a270ea360.tar libvpx-b447b9d97886cb41067464fd8d54c93a270ea360.tar.gz libvpx-b447b9d97886cb41067464fd8d54c93a270ea360.tar.bz2 libvpx-b447b9d97886cb41067464fd8d54c93a270ea360.zip |
Merge "Revert "Removing this_frame_stats member from TWO_PASS struct.""
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_firstpass.c | 12 | ||||
-rw-r--r-- | vp9/encoder/vp9_firstpass.h | 1 |
2 files changed, 8 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index dc3832b16..a49fe3df5 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -460,7 +460,6 @@ void vp9_first_pass(VP9_COMP *cpi) { TWO_PASS *twopass = &cpi->twopass; const MV zero_mv = {0, 0}; const YV12_BUFFER_CONFIG *first_ref_buf = lst_yv12; - FIRSTPASS_STATS fps; vp9_clear_system_state(); @@ -758,6 +757,8 @@ void vp9_first_pass(VP9_COMP *cpi) { vp9_clear_system_state(); { + FIRSTPASS_STATS fps; + fps.frame = cm->current_video_frame; fps.spatial_layer_id = cpi->svc.spatial_layer_id; fps.intra_error = (double)(intra_error >> 8); @@ -796,7 +797,8 @@ void vp9_first_pass(VP9_COMP *cpi) { fps.duration = (double)(cpi->source->ts_end - cpi->source->ts_start); // Don't want to do output stats with a stack variable! - output_stats(&fps, cpi->output_pkt_list); + twopass->this_frame_stats = fps; + output_stats(&twopass->this_frame_stats, cpi->output_pkt_list); accumulate_stats(&twopass->total_stats, &fps); } @@ -804,9 +806,9 @@ void vp9_first_pass(VP9_COMP *cpi) { // the prediction is good enough... but also don't allow it to lag too far. if ((twopass->sr_update_lag > 3) || ((cm->current_video_frame > 0) && - (fps.pcnt_inter > 0.20) && - ((fps.intra_error / - DOUBLE_DIVIDE_CHECK(fps.coded_error)) > 2.0))) { + (twopass->this_frame_stats.pcnt_inter > 0.20) && + ((twopass->this_frame_stats.intra_error / + DOUBLE_DIVIDE_CHECK(twopass->this_frame_stats.coded_error)) > 2.0))) { if (gld_yv12 != NULL) { vp8_yv12_copy_frame(lst_yv12, gld_yv12); } diff --git a/vp9/encoder/vp9_firstpass.h b/vp9/encoder/vp9_firstpass.h index c89cfaf8d..309638c1e 100644 --- a/vp9/encoder/vp9_firstpass.h +++ b/vp9/encoder/vp9_firstpass.h @@ -44,6 +44,7 @@ typedef struct { unsigned int section_intra_rating; unsigned int next_iiratio; FIRSTPASS_STATS total_stats; + FIRSTPASS_STATS this_frame_stats; const FIRSTPASS_STATS *stats_in; const FIRSTPASS_STATS *stats_in_start; const FIRSTPASS_STATS *stats_in_end; |