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. |