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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 1311533012: Add histogram for percentage of sent frames that are limited in resolution due to bandwidth. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | webrtc/video/send_statistics_proxy.h » ('j') | webrtc/video/send_statistics_proxy.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
index 3b6df7550fcc3fa7deb127c8f0172f9d6703ef67..36f4b3a99e2920ea7fcb7a02e85312c85ac376bc 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -131,6 +131,14 @@ bool ValidSimulcastResolutions(const VideoCodec& codec, int num_streams) {
}
return true;
}
+
+bool SendingAllStreams(std::vector<bool>& streams) {
+ for (bool stream : streams) {
+ if (!stream)
+ return false;
+ }
+ return true;
stefan-webrtc 2015/09/16 07:49:27 I think you could replace this with return std::fi
+}
} // namespace
const float kTl1MaxTimeToDropFrames = 20.0f;
@@ -944,6 +952,11 @@ void VP8EncoderImpl::PopulateCodecSpecific(
int VP8EncoderImpl::GetEncodedPartitions(const VideoFrame& input_image,
bool only_predicting_from_key_frame) {
+ bool bw_limited_resolution = false;
+ bool bw_limited_resolution_available = encoders_.size() > 1;
+ if (bw_limited_resolution_available)
+ bw_limited_resolution = !SendingAllStreams(send_stream_);
stefan-webrtc 2015/09/16 07:49:27 Same reasoning as in the quality CL. Would it be u
åsapersson 2015/09/17 14:12:03 Done.
+
int stream_idx = static_cast<int>(encoders_.size()) - 1;
int result = WEBRTC_VIDEO_CODEC_OK;
for (size_t encoder_idx = 0; encoder_idx < encoders_.size();
@@ -994,6 +1007,10 @@ int VP8EncoderImpl::GetEncodedPartitions(const VideoFrame& input_image,
encoded_images_[encoder_idx]._timeStamp = input_image.timestamp();
encoded_images_[encoder_idx].capture_time_ms_ =
input_image.render_time_ms();
+ encoded_images_[encoder_idx].adapt_reason_.bw_limited_resolution_available =
+ bw_limited_resolution_available;
+ encoded_images_[encoder_idx].adapt_reason_.bw_limited_resolution =
+ bw_limited_resolution;
int qp = -1;
vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER_64, &qp);
« no previous file with comments | « no previous file | webrtc/video/send_statistics_proxy.h » ('j') | webrtc/video/send_statistics_proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698