Delete expired field trial WebRTC-Video-VariableStartScaleFactor

Bug: chromium:40218400
Change-Id: Ia3b8a90a0416ea99ff99f163ba8b2490dd01593d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346660
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@google.com>
Cr-Commit-Position: refs/heads/main@{#42112}
This commit is contained in:
Danil Chapovalov 2024-04-18 12:27:21 +02:00 committed by WebRTC LUCI CQ
parent 56e6309749
commit 02b5b024b6
4 changed files with 11 additions and 22 deletions

View file

@ -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)

View file

@ -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 = [

View file

@ -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,7 +73,6 @@ 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,...).
@ -85,7 +82,6 @@ Fraction FindScale(int input_width,
// 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
// the target pixel count.
@ -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<int>::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,

View file

@ -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_;