googBandwidthLimitedResolution stat is not always set depending on configuration.
Currently |bw_resolutions_disabled| is set per VP8EncoderImpl instance and reported via OnEncodedImage callback. Instead move logic to SendStatisticsProxy to determine if resolution is bw limited or not based on info that is reported to SendStatisticsProxy::OnEncodedImage. Bug: webrtc:8643 Change-Id: I6c148e3507a0f04a793775b9f84ce54028b64d0f Reviewed-on: https://webrtc-review.googlesource.com/31460 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21249}
This commit is contained in:
@ -254,8 +254,6 @@ TEST_F(TestVp8Impl, OnEncodedImageReportsInfo) {
|
||||
EXPECT_EQ(kWidth, static_cast<int>(encoded_cb_.encoded_frame_._encodedWidth));
|
||||
EXPECT_EQ(kHeight,
|
||||
static_cast<int>(encoded_cb_.encoded_frame_._encodedHeight));
|
||||
EXPECT_EQ(-1, // Disabled for single stream.
|
||||
encoded_cb_.encoded_frame_.adapt_reason_.bw_resolutions_disabled);
|
||||
}
|
||||
|
||||
// We only test the encoder here, since the decoded frame rotation is set based
|
||||
|
||||
@ -115,15 +115,6 @@ bool ValidSimulcastTemporalLayers(const VideoCodec& codec, int num_streams) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int NumStreamsDisabled(const std::vector<bool>& streams) {
|
||||
int num_disabled = 0;
|
||||
for (bool stream : streams) {
|
||||
if (!stream)
|
||||
++num_disabled;
|
||||
}
|
||||
return num_disabled;
|
||||
}
|
||||
|
||||
bool GetGfBoostPercentageFromFieldTrialGroup(int* boost_percentage) {
|
||||
std::string group = webrtc::field_trial::FindFullName(kVp8GfBoostFieldTrial);
|
||||
if (group.empty())
|
||||
@ -874,9 +865,6 @@ void VP8EncoderImpl::PopulateCodecSpecific(
|
||||
int VP8EncoderImpl::GetEncodedPartitions(
|
||||
const TemporalLayers::FrameConfig tl_configs[],
|
||||
const VideoFrame& input_image) {
|
||||
int bw_resolutions_disabled =
|
||||
(encoders_.size() > 1) ? NumStreamsDisabled(send_stream_) : -1;
|
||||
|
||||
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();
|
||||
@ -949,9 +937,6 @@ int VP8EncoderImpl::GetEncodedPartitions(
|
||||
codec_.simulcastStream[stream_idx].height;
|
||||
encoded_images_[encoder_idx]._encodedWidth =
|
||||
codec_.simulcastStream[stream_idx].width;
|
||||
// Report once per frame (lowest stream always sent).
|
||||
encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled =
|
||||
(stream_idx == 0) ? bw_resolutions_disabled : -1;
|
||||
int qp_128 = -1;
|
||||
vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER,
|
||||
&qp_128);
|
||||
|
||||
Reference in New Issue
Block a user