Revert "Disable frame dropping from codec settings."

This reverts commit 34aba3cefd9519a8da6700f725a9e2d99ee2ef61.

Reason for revert: Has unintended consequences for vp8 simulcast screenshare.

Original change's description:
> Disable frame dropping from codec settings.
>
> This was broken in https://webrtc-review.googlesource.com/c/src/+/99062/
>
> Bug: webrtc:9734
> Change-Id: Ibce41a732cb2e943354c87fbb05be0dd218acf27
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242366
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35568}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9734
Change-Id: I8a4758f6e915f40f89cc45f9530838b6cf6d1a49
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242964
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35591}
This commit is contained in:
Erik Språng
2021-12-29 10:39:06 +00:00
committed by WebRTC LUCI CQ
parent 84fb0026a2
commit 5e180749a1
2 changed files with 5 additions and 1 deletions

View File

@ -864,7 +864,6 @@ uint32_t LibvpxVp8Encoder::FrameDropThreshold(size_t spatial_idx) const {
RTC_DCHECK(frame_buffer_controller_);
RTC_DCHECK_LT(spatial_idx, frame_buffer_controller_->StreamCount());
enable_frame_dropping =
enable_frame_dropping &&
frame_buffer_controller_->SupportsEncoderFrameDropping(spatial_idx);
return enable_frame_dropping ? 30 : 0;
}

View File

@ -76,6 +76,9 @@ class TestVp8Impl : public VideoCodecUnitTest {
webrtc::test::CodecSettings(kVideoCodecVP8, codec_settings);
codec_settings->width = kWidth;
codec_settings->height = kHeight;
codec_settings->VP8()->denoisingOn = true;
codec_settings->VP8()->frameDroppingOn = false;
codec_settings->VP8()->automaticResizeOn = false;
codec_settings->VP8()->complexity = VideoCodecComplexity::kComplexityNormal;
}
@ -405,6 +408,7 @@ TEST_F(TestVp8Impl, EncoderWith2TemporalLayers) {
}
TEST_F(TestVp8Impl, ScalingDisabledIfAutomaticResizeOff) {
codec_settings_.VP8()->frameDroppingOn = true;
codec_settings_.VP8()->automaticResizeOn = false;
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
encoder_->InitEncode(&codec_settings_, kSettings));
@ -415,6 +419,7 @@ TEST_F(TestVp8Impl, ScalingDisabledIfAutomaticResizeOff) {
}
TEST_F(TestVp8Impl, ScalingEnabledIfAutomaticResizeOn) {
codec_settings_.VP8()->frameDroppingOn = true;
codec_settings_.VP8()->automaticResizeOn = true;
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
encoder_->InitEncode(&codec_settings_, kSettings));