Use field trial list in CpuSpeedExperiment.
Removes the need for specifying a fixed number of parameters. Bug: none Change-Id: I1324861807cb4929963aedccb6c2755b9c6ea3fc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180421 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32055}
This commit is contained in:
@ -291,7 +291,6 @@ vpx_enc_frame_flags_t LibvpxVp8Encoder::EncodeFlags(
|
||||
LibvpxVp8Encoder::LibvpxVp8Encoder(std::unique_ptr<LibvpxInterface> interface,
|
||||
VP8Encoder::Settings settings)
|
||||
: libvpx_(std::move(interface)),
|
||||
experimental_cpu_speed_config_arm_(CpuSpeedExperiment::GetConfigs()),
|
||||
rate_control_settings_(RateControlSettings::ParseFromFieldTrials()),
|
||||
requested_resolution_alignment_override_(
|
||||
GetRequestedResolutionAlignmentOverride()),
|
||||
@ -733,9 +732,8 @@ int LibvpxVp8Encoder::GetCpuSpeed(int width, int height) {
|
||||
if (number_of_cores_ <= 3)
|
||||
return -12;
|
||||
|
||||
if (experimental_cpu_speed_config_arm_) {
|
||||
return CpuSpeedExperiment::GetValue(width * height,
|
||||
*experimental_cpu_speed_config_arm_);
|
||||
if (experimental_cpu_speed_config_arm_.GetValue(width * height).has_value()) {
|
||||
return experimental_cpu_speed_config_arm_.GetValue(width * height).value();
|
||||
}
|
||||
|
||||
if (width * height <= 352 * 288)
|
||||
|
||||
@ -95,8 +95,7 @@ class LibvpxVp8Encoder : public VideoEncoder {
|
||||
|
||||
const std::unique_ptr<LibvpxInterface> libvpx_;
|
||||
|
||||
const absl::optional<std::vector<CpuSpeedExperiment::Config>>
|
||||
experimental_cpu_speed_config_arm_;
|
||||
const CpuSpeedExperiment experimental_cpu_speed_config_arm_;
|
||||
const RateControlSettings rate_control_settings_;
|
||||
|
||||
// EncoderInfo::requested_resolution_alignment override from field trial.
|
||||
|
||||
Reference in New Issue
Block a user