From 3f95a230c7e54104201b3f6c577dfa9251b4642a Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Tue, 27 May 2014 17:09:28 -0700 Subject: [PATCH] Removing this_frame_stats member from TWO_PASS struct. Change-Id: Id8877fad1f1e88b145e7c40c43174109b9c4f373 --- vp9/encoder/vp9_firstpass.c | 12 +++++------- vp9/encoder/vp9_firstpass.h | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 0b9a5ac7a..155c64124 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -495,6 +495,7 @@ 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(); @@ -789,8 +790,6 @@ 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); @@ -830,8 +829,7 @@ 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! - twopass->this_frame_stats = fps; - output_stats(&twopass->this_frame_stats, cpi->output_pkt_list); + output_stats(&fps, cpi->output_pkt_list); accumulate_stats(&twopass->total_stats, &fps); } @@ -839,9 +837,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) && - (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))) { + (fps.pcnt_inter > 0.20) && + ((fps.intra_error / + DOUBLE_DIVIDE_CHECK(fps.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 309638c1e..c89cfaf8d 100644 --- a/vp9/encoder/vp9_firstpass.h +++ b/vp9/encoder/vp9_firstpass.h @@ -44,7 +44,6 @@ 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;