Add stats for average QP per frame for VP8 (for received video streams):

"WebRTC.Video.Decoded.VP8.Qp"

BUG=chromium:512752

Review URL: https://codereview.webrtc.org/1340623002

Cr-Commit-Position: refs/heads/master@{#10349}
This commit is contained in:
asapersson
2015-10-20 23:55:26 -07:00
committed by Commit bot
parent 47dcb23393
commit 86b016027d
16 changed files with 180 additions and 39 deletions

View File

@ -25,6 +25,7 @@
#include "webrtc/modules/video_coding/main/source/media_optimization.h"
#include "webrtc/modules/video_coding/main/source/receiver.h"
#include "webrtc/modules/video_coding/main/source/timing.h"
#include "webrtc/modules/video_coding/utility/include/qp_parser.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
@ -237,6 +238,7 @@ class VideoReceiver {
VCMProcessTimer _receiveStatsTimer;
VCMProcessTimer _retransmissionTimer;
VCMProcessTimer _keyRequestTimer;
QpParser qp_parser_;
};
} // namespace vcm

View File

@ -302,7 +302,12 @@ int32_t VideoReceiver::Decode(uint16_t maxWaitTimeMs) {
if (pre_decode_image_callback_) {
EncodedImage encoded_image(frame->EncodedImage());
pre_decode_image_callback_->Encoded(encoded_image, NULL, NULL);
int qp = -1;
if (qp_parser_.GetQp(*frame, &qp)) {
encoded_image.qp_ = qp;
}
pre_decode_image_callback_->Encoded(
encoded_image, frame->CodecSpecific(), NULL);
}
#ifdef DEBUG_DECODER_BIT_STREAM