| Index: webrtc/modules/video_coding/codecs/test/stats.cc
|
| diff --git a/webrtc/modules/video_coding/codecs/test/stats.cc b/webrtc/modules/video_coding/codecs/test/stats.cc
|
| index 478b2f490154917e4cf3fa6959488de2feed9086..31d9f3166d72fc62549b2391270a1a751317a1ad 100644
|
| --- a/webrtc/modules/video_coding/codecs/test/stats.cc
|
| +++ b/webrtc/modules/video_coding/codecs/test/stats.cc
|
| @@ -27,6 +27,7 @@ FrameStatistic::FrameStatistic()
|
| decode_return_code(0),
|
| encode_time_in_us(0),
|
| decode_time_in_us(0),
|
| + qp(-1),
|
| frame_number(0),
|
| packets_dropped(0),
|
| total_packets(0),
|
| @@ -72,6 +73,8 @@ void Stats::PrintSummary() {
|
| // Calculate min, max, average and total encoding time
|
| int total_encoding_time_in_us = 0;
|
| int total_decoding_time_in_us = 0;
|
| + int total_qp = 0;
|
| + int total_qp_count = 0;
|
| size_t total_encoded_frames_lengths = 0;
|
| size_t total_encoded_key_frames_lengths = 0;
|
| size_t total_encoded_nonkey_frames_lengths = 0;
|
| @@ -89,6 +92,10 @@ void Stats::PrintSummary() {
|
| total_encoded_nonkey_frames_lengths += it->encoded_frame_length_in_bytes;
|
| nbr_nonkeyframes++;
|
| }
|
| + if (it->qp >= 0) {
|
| + total_qp += it->qp;
|
| + ++total_qp_count;
|
| + }
|
| }
|
|
|
| FrameStatisticsIterator frame;
|
| @@ -170,6 +177,9 @@ void Stats::PrintSummary() {
|
| printf(" Max bit rate: %7d kbps (frame %d)\n", frame->bit_rate_in_kbps,
|
| frame->frame_number);
|
|
|
| + int avg_qp = (total_qp_count > 0) ? (total_qp / total_qp_count) : -1;
|
| + printf("Average QP: %d\n", avg_qp);
|
| +
|
| printf("\n");
|
| printf("Total encoding time : %7d ms.\n", total_encoding_time_in_us / 1000);
|
| printf("Total decoding time : %7d ms.\n", total_decoding_time_in_us / 1000);
|
|
|