diff options
author | Marco Paniconi <marpan@google.com> | 2014-02-24 15:04:38 -0800 |
---|---|---|
committer | Marco Paniconi <marpan@google.com> | 2014-02-24 15:37:22 -0800 |
commit | c30cc9f2e4a61d0c8ffcd490bcaafd803267cc9f (patch) | |
tree | dc1d68437fa5cb3a598d57434abc752549dbe5c6 /examples | |
parent | 8cc54d576f64bb78a8d20b9147e09036bfebb2dc (diff) | |
download | libvpx-c30cc9f2e4a61d0c8ffcd490bcaafd803267cc9f.tar libvpx-c30cc9f2e4a61d0c8ffcd490bcaafd803267cc9f.tar.gz libvpx-c30cc9f2e4a61d0c8ffcd490bcaafd803267cc9f.tar.bz2 libvpx-c30cc9f2e4a61d0c8ffcd490bcaafd803267cc9f.zip |
vpx_temporal_scalable_patterns: fix to encoding_bitrate computation.
Change-Id: I56fcb82c4334c7591b765b55b3c2912778af6db5
Diffstat (limited to 'examples')
-rw-r--r-- | examples/vpx_temporal_scalable_patterns.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/vpx_temporal_scalable_patterns.c b/examples/vpx_temporal_scalable_patterns.c index 32e88e33f..29a266d29 100644 --- a/examples/vpx_temporal_scalable_patterns.c +++ b/examples/vpx_temporal_scalable_patterns.c @@ -81,7 +81,7 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc, vpx_codec_enc_cfg_t *cfg, int frame_cnt) { unsigned int i = 0; - int check_num_frames = 0; + int tot_num_frames = 0; printf("Total number of processed frames: %d\n\n", frame_cnt -1); printf("Rate control layer stats for %d layer(s):\n\n", cfg->ts_number_layers); @@ -89,8 +89,9 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc, const int num_dropped = (i > 0) ? (rc->layer_input_frames[i] - rc->layer_enc_frames[i]) : (rc->layer_input_frames[i] - rc->layer_enc_frames[i] - 1); + tot_num_frames += rc->layer_input_frames[i]; rc->layer_encoding_bitrate[i] = 0.001 * rc->layer_framerate[i] * - rc->layer_encoding_bitrate[i] / rc->layer_tot_enc_frames[i]; + rc->layer_encoding_bitrate[i] / tot_num_frames; rc->layer_avg_frame_size[i] = rc->layer_avg_frame_size[i] / rc->layer_enc_frames[i]; rc->layer_avg_rate_mismatch[i] = 100.0 * rc->layer_avg_rate_mismatch[i] / @@ -105,10 +106,9 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc, "and perc dropped frames: %d %d %f \n", rc->layer_input_frames[i], rc->layer_enc_frames[i], 100.0 * num_dropped / rc->layer_input_frames[i]); - check_num_frames += rc->layer_input_frames[i]; printf("\n"); } - if ((frame_cnt - 1) != check_num_frames) + if ((frame_cnt - 1) != tot_num_frames) die("Error: Number of input frames not equal to output! \n"); } |