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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 1325153009: Add histogram for percentage of sent frames that are limited in resolution due to quality. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed bool Created 5 years, 2 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
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video_frame.h » ('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 2aea976ae7d3288e7c0c9a71fcd7a95ba7270c3f..00edd065ced1afc3cd19db5bffed604c89f6a02f 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -70,6 +70,17 @@ void SendStatisticsProxy::UpdateHistograms() {
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.KeyFramesSentInPermille",
key_frames_permille);
}
+ int quality_limited =
+ quality_limited_frame_counter_.Percent(kMinRequiredSamples);
+ if (quality_limited != -1) {
+ RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.QualityLimitedResolutionInPercent",
+ quality_limited);
+ }
+ int downscales = quality_downscales_counter_.Avg(kMinRequiredSamples);
+ if (downscales != -1) {
+ RTC_HISTOGRAM_ENUMERATION("WebRTC.Video.QualityLimitedResolutionDownscales",
+ downscales, 20);
+ }
}
void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) {
@@ -170,6 +181,16 @@ void SendStatisticsProxy::OnSendEncodedImage(
key_frame_counter_.Add(encoded_image._frameType == kKeyFrame);
+ if (encoded_image.adapt_reason_.quality_resolution_downscales != -1) {
+ bool downscaled =
+ encoded_image.adapt_reason_.quality_resolution_downscales > 0;
+ quality_limited_frame_counter_.Add(downscaled);
+ if (downscaled) {
+ quality_downscales_counter_.Add(
+ encoded_image.adapt_reason_.quality_resolution_downscales);
+ }
+ }
+
// 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.
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698