Cleanup WebRTC-Vp9ExternalRefCtrl field trial
This field trial was enabled by default for a long while. Bug: webrtc:42234783 Change-Id: If050f88a3649c43d895110f4f68160f020f854e2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376421 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43885}
This commit is contained in:
parent
0b48e61230
commit
d964a5444a
@ -886,9 +886,6 @@ POLICY_EXEMPT_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([
|
||||
FieldTrial('WebRTC-VideoRateControl',
|
||||
42220259,
|
||||
INDEFINITE),
|
||||
FieldTrial('WebRTC-Vp9ExternalRefCtrl',
|
||||
42234783,
|
||||
date(2024, 4, 1)),
|
||||
FieldTrial('WebRTC-Vp9InterLayerPred',
|
||||
NO_BUG, # chromium:949536
|
||||
INDEFINITE),
|
||||
@ -902,7 +899,7 @@ POLICY_EXEMPT_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([
|
||||
]) # yapf: disable
|
||||
|
||||
POLICY_EXEMPT_FIELD_TRIALS_DIGEST: str = \
|
||||
'32ec47da125c13ceb01a908627c7c10aada3d4dd'
|
||||
'936929707bc1d3db75b6702394ca3b69ef328410'
|
||||
|
||||
REGISTERED_FIELD_TRIALS: FrozenSet[FieldTrial] = ACTIVE_FIELD_TRIALS.union(
|
||||
POLICY_EXEMPT_FIELD_TRIALS)
|
||||
|
||||
@ -274,7 +274,6 @@ LibvpxVp9Encoder::LibvpxVp9Encoder(const Environment& env,
|
||||
"WebRTC-Vp9IssueKeyFrameOnLayerDeactivation")),
|
||||
is_svc_(false),
|
||||
inter_layer_pred_(InterLayerPredMode::kOn),
|
||||
external_ref_control_(false), // Set in InitEncode because of tests.
|
||||
trusted_rate_controller_(RateControlSettings(env.field_trials())
|
||||
.LibvpxVp9TrustedRateController()),
|
||||
first_frame_in_picture_(true),
|
||||
@ -285,8 +284,6 @@ LibvpxVp9Encoder::LibvpxVp9Encoder(const Environment& env,
|
||||
is_flexible_mode_(false),
|
||||
variable_framerate_controller_(variable_framerate_screenshare::kMinFps),
|
||||
quality_scaler_experiment_(ParseQualityScalerConfig(env.field_trials())),
|
||||
external_ref_ctrl_(
|
||||
!env.field_trials().IsDisabled("WebRTC-Vp9ExternalRefCtrl")),
|
||||
performance_flags_(ParsePerformanceFlagsFromTrials(env.field_trials())),
|
||||
num_steady_state_frames_(0),
|
||||
config_changed_(true),
|
||||
@ -687,13 +684,6 @@ int LibvpxVp9Encoder::InitEncode(const VideoCodec* inst,
|
||||
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
|
||||
}
|
||||
|
||||
// External reference control is required for different frame rate on spatial
|
||||
// layers because libvpx generates rtp incompatible references in this case.
|
||||
external_ref_control_ = external_ref_ctrl_ ||
|
||||
(num_spatial_layers_ > 1 &&
|
||||
codec_.mode == VideoCodecMode::kScreensharing) ||
|
||||
inter_layer_pred_ == InterLayerPredMode::kOn;
|
||||
|
||||
if (num_temporal_layers_ == 1) {
|
||||
gof_.SetGofInfoVP9(kTemporalStructureMode1);
|
||||
config_->temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING;
|
||||
@ -726,7 +716,6 @@ int LibvpxVp9Encoder::InitEncode(const VideoCodec* inst,
|
||||
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
|
||||
}
|
||||
|
||||
if (external_ref_control_) {
|
||||
config_->temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
if (num_temporal_layers_ > 1 && num_spatial_layers_ > 1 &&
|
||||
codec_.mode == VideoCodecMode::kScreensharing) {
|
||||
@ -734,7 +723,6 @@ int LibvpxVp9Encoder::InitEncode(const VideoCodec* inst,
|
||||
// frame rates on spatial layers is not implemented yet.
|
||||
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
|
||||
}
|
||||
}
|
||||
ref_buf_ = {};
|
||||
|
||||
return InitAndSetControlSettings();
|
||||
@ -1207,7 +1195,7 @@ int LibvpxVp9Encoder::Encode(const VideoFrame& input_image,
|
||||
vpx_svc_ref_frame_config_t ref_config = Vp9References(layer_frames_);
|
||||
libvpx_->codec_control(encoder_, VP9E_SET_SVC_REF_FRAME_CONFIG,
|
||||
&ref_config);
|
||||
} else if (external_ref_control_) {
|
||||
} else {
|
||||
vpx_svc_ref_frame_config_t ref_config =
|
||||
SetReferences(force_key_frame_, layer_id.spatial_layer_id);
|
||||
|
||||
|
||||
@ -158,7 +158,6 @@ class LibvpxVp9Encoder : public VideoEncoder {
|
||||
bool layer_deactivation_requires_key_frame_;
|
||||
bool is_svc_;
|
||||
InterLayerPredMode inter_layer_pred_;
|
||||
bool external_ref_control_;
|
||||
const bool trusted_rate_controller_;
|
||||
vpx_svc_frame_drop_t svc_drop_frame_;
|
||||
bool first_frame_in_picture_;
|
||||
@ -197,7 +196,6 @@ class LibvpxVp9Encoder : public VideoEncoder {
|
||||
} quality_scaler_experiment_;
|
||||
static QualityScalerExperiment ParseQualityScalerConfig(
|
||||
const FieldTrialsView& trials);
|
||||
const bool external_ref_ctrl_;
|
||||
|
||||
// Flags that can affect speed vs quality tradeoff, and are configureable per
|
||||
// resolution ranges.
|
||||
|
||||
@ -735,8 +735,6 @@ TEST(Vp9ImplTest, SpatialUpswitchNotAtGOFBoundary) {
|
||||
TEST_F(TestVp9Impl, DisableEnableBaseLayerTriggersKeyFrame) {
|
||||
// Configure encoder to produce N spatial layers. Encode frames for all
|
||||
// layers. Then disable all but the last layer. Then reenable all back again.
|
||||
test::ScopedFieldTrials override_field_trials(
|
||||
"WebRTC-Vp9ExternalRefCtrl/Enabled/");
|
||||
const size_t num_spatial_layers = 3;
|
||||
const size_t num_temporal_layers = 3;
|
||||
// Must not be multiple of temporal period to exercise all code paths.
|
||||
@ -1954,18 +1952,14 @@ TEST_F(TestVp9Impl, EncoderInfoFpsAllocationFlexibleMode) {
|
||||
}
|
||||
|
||||
class Vp9ImplWithLayeringTest
|
||||
: public ::testing::TestWithParam<std::tuple<int, int, bool>> {
|
||||
: public ::testing::TestWithParam<std::tuple<int, int>> {
|
||||
protected:
|
||||
Vp9ImplWithLayeringTest()
|
||||
: num_spatial_layers_(std::get<0>(GetParam())),
|
||||
num_temporal_layers_(std::get<1>(GetParam())),
|
||||
override_field_trials_(std::get<2>(GetParam())
|
||||
? "WebRTC-Vp9ExternalRefCtrl/Enabled/"
|
||||
: "") {}
|
||||
num_temporal_layers_(std::get<1>(GetParam())) {}
|
||||
|
||||
const uint8_t num_spatial_layers_;
|
||||
const uint8_t num_temporal_layers_;
|
||||
const test::ScopedFieldTrials override_field_trials_;
|
||||
};
|
||||
|
||||
TEST_P(Vp9ImplWithLayeringTest, FlexibleMode) {
|
||||
@ -2032,8 +2026,7 @@ TEST_P(Vp9ImplWithLayeringTest, FlexibleMode) {
|
||||
INSTANTIATE_TEST_SUITE_P(All,
|
||||
Vp9ImplWithLayeringTest,
|
||||
::testing::Combine(::testing::Values(1, 2, 3),
|
||||
::testing::Values(1, 2, 3),
|
||||
::testing::Bool()));
|
||||
::testing::Values(1, 2, 3)));
|
||||
|
||||
class TestVp9ImplFrameDropping : public TestVp9Impl {
|
||||
protected:
|
||||
|
||||
@ -192,7 +192,6 @@ class FieldTrials : public FieldTrialsView {
|
||||
~FieldTrials() override = default;
|
||||
std::string Lookup(absl::string_view key) const override {
|
||||
static constexpr absl::string_view kBinaryFieldTrials[] = {
|
||||
"WebRTC-Vp9ExternalRefCtrl",
|
||||
"WebRTC-Vp9IssueKeyFrameOnLayerDeactivation",
|
||||
};
|
||||
for (size_t i = 0; i < ABSL_ARRAYSIZE(kBinaryFieldTrials); ++i) {
|
||||
|
||||
@ -1008,8 +1008,7 @@ TEST(FullStackTest, Vp9ksvc_3sl_Low) {
|
||||
|
||||
TEST(FullStackTest, Vp9ksvc_3sl_Low_Bw_Limited) {
|
||||
webrtc::test::ScopedFieldTrials override_trials(
|
||||
AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"
|
||||
"WebRTC-Vp9ExternalRefCtrl/Enabled/"));
|
||||
AppendFieldTrials("WebRTC-Vp9IssueKeyFrameOnLayerDeactivation/Enabled/"));
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging simulcast;
|
||||
simulcast.config->link_capacity = DataRate::KilobitsPerSec(500);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user