From 55500d26b7b5b7ea73164657d96f9a69666957ba Mon Sep 17 00:00:00 2001 From: Yves Gerey Date: Mon, 11 Mar 2019 11:34:15 +0000 Subject: [PATCH] Revert "Fix LibvpxVp8Encoder::FrameDropThreshold" This reverts commit 159e53a66eceb79003741ba0d990c502595c27bb. Reason for revert: Might break downstream Android projects. Original change's description: > Fix LibvpxVp8Encoder::FrameDropThreshold > > Bug: webrtc:10387 > Change-Id: I17b575546d6718f905429ac45705cb923ee52c10 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126232 > Commit-Queue: Elad Alon > Reviewed-by: Ilya Nikolaevskiy > Cr-Commit-Position: refs/heads/master@{#27032} TBR=ilnik@webrtc.org,eladalon@webrtc.org,sprang@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:10387 Change-Id: I08055d1b0234dccd4166a4eaf8eff56f909f99a8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126721 Reviewed-by: Yves Gerey Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Yves Gerey Cr-Commit-Position: refs/heads/master@{#27055} --- modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc | 7 ++++--- video/quality_scaling_tests.cc | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc index 98d5e3c44d..4eedb85cb9 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc @@ -695,9 +695,10 @@ uint32_t LibvpxVp8Encoder::FrameDropThreshold(size_t spatial_idx) const { // setting, as eg. ScreenshareLayers does not work as intended with frame // dropping on and DefaultTemporalLayers will have performance issues with // frame dropping off. - RTC_CHECK_LT(spatial_idx, frame_buffer_controllers_.size()); - enable_frame_dropping = - frame_buffer_controllers_[spatial_idx]->SupportsEncoderFrameDropping(); + if (frame_buffer_controllers_.size() <= spatial_idx) { + enable_frame_dropping = + frame_buffer_controllers_[spatial_idx]->SupportsEncoderFrameDropping(); + } return enable_frame_dropping ? 30 : 0; } diff --git a/video/quality_scaling_tests.cc b/video/quality_scaling_tests.cc index 19b9e8c36c..4f68eb1cc1 100644 --- a/video/quality_scaling_tests.cc +++ b/video/quality_scaling_tests.cc @@ -169,9 +169,7 @@ TEST_F(QualityScalingTest, NoAdaptDownForHighQpWithResizeOff_Vp8) { kFrameDropping, kExpectAdapt); } -// TODO(bugs.webrtc.org/10388): Fix and re-enable. -TEST_F(QualityScalingTest, - DISABLED_NoAdaptDownForHighQpWithFrameDroppingOff_Vp8) { +TEST_F(QualityScalingTest, NoAdaptDownForHighQpWithFrameDroppingOff_Vp8) { // VP8 QP thresholds, low:1, high:1 -> high QP. test::ScopedFieldTrials field_trials(kPrefix + "1,1,0,0,0,0" + kEnd);