diff --git a/experiments/field_trials.py b/experiments/field_trials.py index 9d572b0837..9bdcb58a5c 100755 --- a/experiments/field_trials.py +++ b/experiments/field_trials.py @@ -856,9 +856,6 @@ POLICY_EXEMPT_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([ FieldTrial('WebRTC-Video-UseFrameRateForOverhead', 'b/166341943', date(2024, 4, 1)), - FieldTrial('WebRTC-Video-VariableStartScaleFactor', - '', - date(2024, 4, 1)), FieldTrial('WebRTC-VideoFrameTrackingIdAdvertised', 'webrtc:12594', INDEFINITE), @@ -887,7 +884,7 @@ POLICY_EXEMPT_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([ ]) # yapf: disable POLICY_EXEMPT_FIELD_TRIALS_DIGEST: str = \ - '680deace2615186c4d3cf9ed3bd3595b7b6c8ae8' + '263c7a29291a7c4472ff60c7c3b2520f6dd5cea8' REGISTERED_FIELD_TRIALS: FrozenSet[FieldTrial] = ACTIVE_FIELD_TRIALS.union( POLICY_EXEMPT_FIELD_TRIALS) diff --git a/media/BUILD.gn b/media/BUILD.gn index e3cae72d76..6568944cd3 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -128,7 +128,6 @@ rtc_library("rtc_media_base") { "../rtc_base/system:no_unique_address", "../rtc_base/system:rtc_export", "../rtc_base/third_party/sigslot", - "../system_wrappers:field_trial", "../video/config:encoder_config", ] absl_deps = [ diff --git a/media/base/video_adapter.cc b/media/base/video_adapter.cc index a8731af9f5..5eadbf8c07 100644 --- a/media/base/video_adapter.cc +++ b/media/base/video_adapter.cc @@ -23,7 +23,6 @@ #include "rtc_base/logging.h" #include "rtc_base/strings/string_builder.h" #include "rtc_base/time_utils.h" -#include "system_wrappers/include/field_trial.h" namespace { @@ -59,8 +58,7 @@ int roundUp(int value_to_round, int multiple, int max_value) { Fraction FindScale(int input_width, int input_height, int target_pixels, - int max_pixels, - bool variable_start_scale_factor) { + int max_pixels) { // This function only makes sense for a positive target. RTC_DCHECK_GT(target_pixels, 0); RTC_DCHECK_GT(max_pixels, 0); @@ -75,16 +73,14 @@ Fraction FindScale(int input_width, Fraction current_scale = Fraction{1, 1}; Fraction best_scale = Fraction{1, 1}; - if (variable_start_scale_factor) { - // Start scaling down by 2/3 depending on `input_width` and `input_height`. - if (input_width % 3 == 0 && input_height % 3 == 0) { - // 2/3 (then alternates 3/4, 2/3, 3/4,...). - current_scale = Fraction{6, 6}; - } - if (input_width % 9 == 0 && input_height % 9 == 0) { - // 2/3, 2/3 (then alternates 3/4, 2/3, 3/4,...). - current_scale = Fraction{36, 36}; - } + // Start scaling down by 2/3 depending on `input_width` and `input_height`. + if (input_width % 3 == 0 && input_height % 3 == 0) { + // 2/3 (then alternates 3/4, 2/3, 3/4,...). + current_scale = Fraction{6, 6}; + } + if (input_width % 9 == 0 && input_height % 9 == 0) { + // 2/3, 2/3 (then alternates 3/4, 2/3, 3/4,...). + current_scale = Fraction{36, 36}; } // The minimum (absolute) difference between the number of output pixels and @@ -144,8 +140,6 @@ VideoAdapter::VideoAdapter(int source_resolution_alignment) adaption_changes_(0), previous_width_(0), previous_height_(0), - variable_start_scale_factor_(!webrtc::field_trial::IsDisabled( - "WebRTC-Video-VariableStartScaleFactor")), source_resolution_alignment_(source_resolution_alignment), resolution_alignment_(source_resolution_alignment), resolution_request_target_pixel_count_(std::numeric_limits::max()), @@ -233,7 +227,7 @@ bool VideoAdapter::AdaptFrameResolution(int in_width, } const Fraction scale = FindScale(*cropped_width, *cropped_height, target_pixel_count, - max_pixel_count, variable_start_scale_factor_); + max_pixel_count); // Adjust cropping slightly to get correctly aligned output size and a perfect // scale factor. *cropped_width = roundUp(*cropped_width, diff --git a/media/base/video_adapter.h b/media/base/video_adapter.h index b3e69c492b..c1d311d891 100644 --- a/media/base/video_adapter.h +++ b/media/base/video_adapter.h @@ -122,7 +122,6 @@ class RTC_EXPORT VideoAdapter { int previous_width_ RTC_GUARDED_BY(mutex_); // Previous adapter output width. int previous_height_ RTC_GUARDED_BY(mutex_); // Previous adapter output height. - const bool variable_start_scale_factor_; // The fixed source resolution alignment requirement. const int source_resolution_alignment_;