Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 1264693003: Add QP stats for sent video streams to StatsReport. Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: added comment Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index 551b4b562a43904f6cfe1105d65455b2610126b9..4e3d96752584e7026a691971132e57f9f59a06a2 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -62,6 +62,12 @@ void SendStatisticsProxy::UpdateHistograms() {
int encode_ms = encode_time_counter_.Avg(kMinRequiredSamples);
if (encode_ms != -1)
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.EncodeTimeInMs", encode_ms);
+
+ for (const auto& it : qp_counters_) {
+ int qp = it.second.vp8.Avg(kMinRequiredSamples);
+ if (qp != -1)
+ RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.Vp8.Qp", qp);
+ }
}
void SendStatisticsProxy::OutgoingRate(const int video_channel,
@@ -162,6 +168,12 @@ void SendStatisticsProxy::OnSendEncodedImage(
stats->height = encoded_image._encodedHeight;
update_times_[ssrc].resolution_update_ms = clock_->TimeInMilliseconds();
+ if (encoded_image.qp_ != -1 && encoded_image._length > 0) {
+ if (rtp_video_header->codec == kRtpVideoVp8) {
+ qp_counters_[ssrc].vp8.Add(encoded_image.qp_);
+ }
+ }
+
// TODO(asapersson): This is incorrect if simulcast layers are encoded on
// different threads and there is no guarantee that one frame of all layers
// are encoded before the next start.

Powered by Google App Engine
This is Rietveld 408576698