Wire up field trials for some experimental screenshare settings
Bug: b/132074409 Change-Id: I83d5334255bad4fcf585b9850506bbfe1914ba57 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147868 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28758}
This commit is contained in:
@ -35,6 +35,7 @@
|
||||
#include "modules/video_coding/utility/simulcast_rate_allocator.h"
|
||||
#include "modules/video_coding/utility/simulcast_utility.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/experiments/experimental_screenshare_settings.h"
|
||||
#include "rtc_base/experiments/field_trial_parser.h"
|
||||
#include "rtc_base/experiments/field_trial_units.h"
|
||||
#include "rtc_base/logging.h"
|
||||
@ -280,6 +281,8 @@ LibvpxVp8Encoder::LibvpxVp8Encoder(
|
||||
: libvpx_(std::move(interface)),
|
||||
experimental_cpu_speed_config_arm_(CpuSpeedExperiment::GetConfigs()),
|
||||
rate_control_settings_(RateControlSettings::ParseFromFieldTrials()),
|
||||
screenshare_max_qp_(
|
||||
ExperimentalScreenshareSettings::ParseFromFieldTrials().MaxQp()),
|
||||
encoded_complete_callback_(nullptr),
|
||||
inited_(false),
|
||||
timestamp_(0),
|
||||
@ -584,6 +587,9 @@ int LibvpxVp8Encoder::InitEncode(const VideoCodec* inst,
|
||||
qp_max_ = std::max(rate_control_settings_.LibvpxVp8QpMax().value(),
|
||||
static_cast<int>(vpx_configs_[0].rc_min_quantizer));
|
||||
}
|
||||
if (codec_.mode == VideoCodecMode::kScreensharing && screenshare_max_qp_) {
|
||||
qp_max_ = *screenshare_max_qp_;
|
||||
}
|
||||
vpx_configs_[0].rc_max_quantizer = qp_max_;
|
||||
vpx_configs_[0].rc_undershoot_pct = 100;
|
||||
vpx_configs_[0].rc_overshoot_pct = 15;
|
||||
|
||||
@ -103,6 +103,7 @@ class LibvpxVp8Encoder : public VideoEncoder {
|
||||
const absl::optional<std::vector<CpuSpeedExperiment::Config>>
|
||||
experimental_cpu_speed_config_arm_;
|
||||
const RateControlSettings rate_control_settings_;
|
||||
const absl::optional<int> screenshare_max_qp_;
|
||||
|
||||
EncodedImageCallback* encoded_complete_callback_;
|
||||
VideoCodec codec_;
|
||||
|
||||
Reference in New Issue
Block a user