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

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: add unit tests Created 5 years, 1 month 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
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index 5c2052a207868d9c6b2e5c7bd4e7edbb0a83d7e1..efd53fc043c97557349e12822f63d491330c2ebc 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -126,6 +126,11 @@ void SendStatisticsProxy::UpdateHistograms() {
RTC_HISTOGRAM_COUNTS_100000(
"WebRTC.Video.SendSideDelayMaxInMs", max_delay_ms);
}
+ for (const auto& it : qp_counters_) {
+ int qp = it.second.vp8.Avg(kMinRequiredSamples);
+ if (qp != -1)
+ RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Encoded.Vp8.Qp", qp);
+ }
}
void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) {
@@ -243,6 +248,13 @@ void SendStatisticsProxy::OnSendEncodedImage(
encoded_image.adapt_reason_.bw_resolutions_disabled);
}
}
+ if (encoded_image.qp_ != -1 && rtp_video_header != nullptr) {
+ if (rtp_video_header->codec == kRtpVideoVp8) {
+ qp_counters_[ssrc].vp8.Add(encoded_image.qp_);
+ qp_filters_[ssrc].qp.Apply(1.0f, encoded_image.qp_);
+ stats->qp = round(qp_filters_[ssrc].qp.filtered());
+ }
+ }
// TODO(asapersson): This is incorrect if simulcast layers are encoded on
// different threads and there is no guarantee that one frame of all layers
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698