Revert "Reland "Enable quality scaling when allowed""
This reverts commit 0021fe77937f386e6021a5451e3b0d78d7950815. Reason for revert: Broken on linux_tsan bot: https://ci.chromium.org/ui/p/webrtc/builders/ci/Linux%20Tsan%20v2/25329/overview Original change's description: > Reland "Enable quality scaling when allowed" > > This reverts commit eb449a979bc561a8b256cca434e582f3889375e2. > > Reason for revert: Added QP parsing in https://webrtc.googlesource.com/src/+/8639673f0c098efc294a7593fa3bd98e28ab7508 > > Original change's description: > Before this CL quality scaling was conditioned on scaling settings > provided by encoder. That should not be a requirement since encoder > may not be aware of quality scaling which is a WebRTC feature. In M90 > chromium HW encoders do not provide scaling settings (chromium:1179020). > The default scaling settings provided by these encoders are not correct > (b/181537172). > > This CL adds is_quality_scaling_allowed to VideoEncoderConfig. The flag > is set to true in singlecast with normal video feed (not screen sharing) > mode. If quality scaling is allowed it is enabled no matter whether > scaling settings are present in encoder info or not. Setting from > QualityScalingExperiment are used in case if not provided by encoder. > > Bug: chromium:1179020 > Bug: webrtc:12511 > Change-Id: I97911fde9005ec25028a640a3f007d12f2bbc2e5 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211349 > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#33438} TBR=brandtr@webrtc.org,ilnik@webrtc.org,ssilkin@webrtc.org,rubber-stamper@appspot.gserviceaccount.com Change-Id: Id7633a1e98f95762e81487887f83a0c35f89195c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1179020 Bug: webrtc:12511 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211352 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33439}
This commit is contained in:
committed by
Commit Bot
parent
0021fe7793
commit
31c5c9da35
@ -7992,65 +7992,4 @@ TEST_F(VideoStreamEncoderTest, QpAbsentParsingDisabled_QpAbsent) {
|
||||
video_stream_encoder_->Stop();
|
||||
}
|
||||
|
||||
TEST_F(VideoStreamEncoderTest,
|
||||
QualityScalingNotAllowed_QualityScalingDisabled) {
|
||||
VideoEncoderConfig video_encoder_config = video_encoder_config_.Copy();
|
||||
|
||||
// Disable scaling settings in encoder info.
|
||||
fake_encoder_.SetQualityScaling(false);
|
||||
// Disable quality scaling in encoder config.
|
||||
video_encoder_config.is_quality_scaling_allowed = false;
|
||||
ConfigureEncoder(std::move(video_encoder_config));
|
||||
|
||||
video_stream_encoder_->OnBitrateUpdatedAndWaitForManagedResources(
|
||||
DataRate::BitsPerSec(kTargetBitrateBps),
|
||||
DataRate::BitsPerSec(kTargetBitrateBps),
|
||||
DataRate::BitsPerSec(kTargetBitrateBps), 0, 0, 0);
|
||||
|
||||
test::FrameForwarder source;
|
||||
video_stream_encoder_->SetSource(
|
||||
&source, webrtc::DegradationPreference::MAINTAIN_FRAMERATE);
|
||||
EXPECT_THAT(source.sink_wants(), UnlimitedSinkWants());
|
||||
EXPECT_FALSE(stats_proxy_->GetStats().bw_limited_resolution);
|
||||
|
||||
source.IncomingCapturedFrame(CreateFrame(1, 1280, 720));
|
||||
WaitForEncodedFrame(1);
|
||||
video_stream_encoder_->TriggerQualityLow();
|
||||
EXPECT_FALSE(stats_proxy_->GetStats().bw_limited_resolution);
|
||||
|
||||
video_stream_encoder_->Stop();
|
||||
}
|
||||
|
||||
#if !defined(WEBRTC_IOS)
|
||||
// TODO(bugs.webrtc.org/12401): Disabled because WebRTC-Video-QualityScaling is
|
||||
// disabled by default on iOS.
|
||||
TEST_F(VideoStreamEncoderTest, QualityScalingAllowed_QualityScalingEnabled) {
|
||||
VideoEncoderConfig video_encoder_config = video_encoder_config_.Copy();
|
||||
|
||||
// Disable scaling settings in encoder info.
|
||||
fake_encoder_.SetQualityScaling(false);
|
||||
// Enable quality scaling in encoder config.
|
||||
video_encoder_config.is_quality_scaling_allowed = true;
|
||||
ConfigureEncoder(std::move(video_encoder_config));
|
||||
|
||||
video_stream_encoder_->OnBitrateUpdatedAndWaitForManagedResources(
|
||||
DataRate::BitsPerSec(kTargetBitrateBps),
|
||||
DataRate::BitsPerSec(kTargetBitrateBps),
|
||||
DataRate::BitsPerSec(kTargetBitrateBps), 0, 0, 0);
|
||||
|
||||
test::FrameForwarder source;
|
||||
video_stream_encoder_->SetSource(
|
||||
&source, webrtc::DegradationPreference::MAINTAIN_FRAMERATE);
|
||||
EXPECT_THAT(source.sink_wants(), UnlimitedSinkWants());
|
||||
EXPECT_FALSE(stats_proxy_->GetStats().bw_limited_resolution);
|
||||
|
||||
source.IncomingCapturedFrame(CreateFrame(1, 1280, 720));
|
||||
WaitForEncodedFrame(1);
|
||||
video_stream_encoder_->TriggerQualityLow();
|
||||
EXPECT_TRUE(stats_proxy_->GetStats().bw_limited_resolution);
|
||||
|
||||
video_stream_encoder_->Stop();
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user