From fe45da4f047ee622ce1f15713ce03f5e10380729 Mon Sep 17 00:00:00 2001 From: philipel Date: Wed, 31 Oct 2018 15:56:16 +0100 Subject: [PATCH] Remove WebRTC-VP8-GfBoost field trial. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a cleanup CL related to the work tracked by 9946. Bug: webrtc:9946 Change-Id: I3d879196af83856ece1418fa786aab03a3dd3c8c Reviewed-on: https://webrtc-review.googlesource.com/c/108820 Reviewed-by: Åsa Persson Commit-Queue: Philip Eliasson Cr-Commit-Position: refs/heads/master@{#25466} --- .../codecs/vp8/libvpx_vp8_encoder.cc | 26 ------------------- .../codecs/vp8/libvpx_vp8_encoder.h | 1 - 2 files changed, 27 deletions(-) diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc index 655f5f01a3..b199f65748 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc @@ -23,14 +23,11 @@ #include "rtc_base/checks.h" #include "rtc_base/timeutils.h" #include "rtc_base/trace_event.h" -#include "system_wrappers/include/field_trial.h" #include "third_party/libyuv/include/libyuv/convert.h" #include "third_party/libyuv/include/libyuv/scale.h" namespace webrtc { namespace { -const char kVp8GfBoostFieldTrial[] = "WebRTC-VP8-GfBoost"; - // QP is obtained from VP8-bitstream for HW, so the QP corresponds to the // bitstream range of [0, 127] and not the user-level range of [0,63]. constexpr int kLowVp8QpThreshold = 29; @@ -61,20 +58,6 @@ static int GCD(int a, int b) { return b; } -bool GetGfBoostPercentageFromFieldTrialGroup(int* boost_percentage) { - std::string group = webrtc::field_trial::FindFullName(kVp8GfBoostFieldTrial); - if (group.empty()) - return false; - - if (sscanf(group.c_str(), "Enabled-%d", boost_percentage) != 1) - return false; - - if (*boost_percentage < 0 || *boost_percentage > 100) - return false; - - return true; -} - static_assert(Vp8EncoderConfig::kMaxPeriodicity == VPX_TS_MAX_PERIODICITY, "Vp8EncoderConfig::kMaxPeriodicity must be kept in sync with the " "constant in libvpx."); @@ -159,7 +142,6 @@ LibvpxVp8Encoder::LibvpxVp8Encoder() LibvpxVp8Encoder::LibvpxVp8Encoder(std::unique_ptr interface) : libvpx_(std::move(interface)), - use_gf_boost_(webrtc::field_trial::IsEnabled(kVp8GfBoostFieldTrial)), encoded_complete_callback_(nullptr), inited_(false), timestamp_(0), @@ -641,14 +623,6 @@ int LibvpxVp8Encoder::InitAndSetControlSettings() { libvpx_->codec_control( &(encoders_[i]), VP8E_SET_SCREEN_CONTENT_MODE, codec_.mode == VideoCodecMode::kScreensharing ? 2u : 0u); - // Apply boost on golden frames (has only effect when resilience is off). - if (use_gf_boost_ && configurations_[0].g_error_resilient == 0) { - int gf_boost_percent; - if (GetGfBoostPercentageFromFieldTrialGroup(&gf_boost_percent)) { - libvpx_->codec_control(&(encoders_[i]), VP8E_SET_GF_CBR_BOOST_PCT, - gf_boost_percent); - } - } } inited_ = true; return WEBRTC_VIDEO_CODEC_OK; diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h index 40bfb0834b..7fffbab767 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h @@ -86,7 +86,6 @@ class LibvpxVp8Encoder : public VideoEncoder { uint32_t FrameDropThreshold(size_t spatial_idx) const; const std::unique_ptr libvpx_; - const bool use_gf_boost_; EncodedImageCallback* encoded_complete_callback_; VideoCodec codec_;