Remove WebRTC-LowLatencyRenderer field trial
There is no active use of it, and the fields are enabled by default in the uses of it. Change-Id: Ibfdb3f1befca886cb4b2f4b2ae4d6235aafafe3d Fixed: webrtc:13998 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256262 Reviewed-by: Johannes Kron <kron@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36655}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
a0ee64c57e
commit
f6adc647ba
@ -33,18 +33,12 @@ VCMDecodedFrameCallback::VCMDecodedFrameCallback(
|
||||
: _clock(clock),
|
||||
_timing(timing),
|
||||
_timestampMap(kDecoderFrameMemoryLength),
|
||||
_extra_decode_time("t", absl::nullopt),
|
||||
low_latency_renderer_enabled_("enabled", true),
|
||||
low_latency_renderer_include_predecode_buffer_("include_predecode_buffer",
|
||||
true) {
|
||||
_extra_decode_time("t", absl::nullopt) {
|
||||
ntp_offset_ =
|
||||
_clock->CurrentNtpInMilliseconds() - _clock->TimeInMilliseconds();
|
||||
|
||||
ParseFieldTrial({&_extra_decode_time},
|
||||
field_trials.Lookup("WebRTC-SlowDownDecoder"));
|
||||
ParseFieldTrial({&low_latency_renderer_enabled_,
|
||||
&low_latency_renderer_include_predecode_buffer_},
|
||||
field_trials.Lookup("WebRTC-LowLatencyRenderer"));
|
||||
}
|
||||
|
||||
VCMDecodedFrameCallback::~VCMDecodedFrameCallback() {}
|
||||
@ -123,19 +117,15 @@ void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
|
||||
decodedImage.set_packet_infos(frameInfo->packet_infos);
|
||||
decodedImage.set_rotation(frameInfo->rotation);
|
||||
|
||||
if (low_latency_renderer_enabled_) {
|
||||
absl::optional<int> max_composition_delay_in_frames =
|
||||
_timing->MaxCompositionDelayInFrames();
|
||||
if (max_composition_delay_in_frames) {
|
||||
// Subtract frames that are in flight.
|
||||
if (low_latency_renderer_include_predecode_buffer_) {
|
||||
*max_composition_delay_in_frames -= timestamp_map_size;
|
||||
*max_composition_delay_in_frames =
|
||||
std::max(0, *max_composition_delay_in_frames);
|
||||
}
|
||||
decodedImage.set_max_composition_delay_in_frames(
|
||||
max_composition_delay_in_frames);
|
||||
}
|
||||
absl::optional<int> max_composition_delay_in_frames =
|
||||
_timing->MaxCompositionDelayInFrames();
|
||||
if (max_composition_delay_in_frames) {
|
||||
// Subtract frames that are in flight.
|
||||
*max_composition_delay_in_frames -= timestamp_map_size;
|
||||
*max_composition_delay_in_frames =
|
||||
std::max(0, *max_composition_delay_in_frames);
|
||||
decodedImage.set_max_composition_delay_in_frames(
|
||||
max_composition_delay_in_frames);
|
||||
}
|
||||
|
||||
RTC_DCHECK(frameInfo->decodeStart);
|
||||
|
@ -66,16 +66,6 @@ class VCMDecodedFrameCallback : public DecodedImageCallback {
|
||||
int64_t ntp_offset_;
|
||||
// Set by the field trial WebRTC-SlowDownDecoder to simulate a slow decoder.
|
||||
FieldTrialOptional<TimeDelta> _extra_decode_time;
|
||||
|
||||
// Set by the field trial WebRTC-LowLatencyRenderer. The parameter `enabled`
|
||||
// determines if the low-latency renderer algorithm should be used for the
|
||||
// case min playout delay=0 and max playout delay>0.
|
||||
FieldTrialParameter<bool> low_latency_renderer_enabled_;
|
||||
// Set by the field trial WebRTC-LowLatencyRenderer. The parameter
|
||||
// `include_predecode_buffer` determines if the predecode buffer should be
|
||||
// taken into account when calculating maximum number of frames in composition
|
||||
// queue.
|
||||
FieldTrialParameter<bool> low_latency_renderer_include_predecode_buffer_;
|
||||
};
|
||||
|
||||
class VCMGenericDecoder {
|
||||
|
@ -22,6 +22,8 @@ namespace {
|
||||
|
||||
// Default pacing that is used for the low-latency renderer path.
|
||||
constexpr TimeDelta kZeroPlayoutDelayDefaultMinPacing = TimeDelta::Millis(8);
|
||||
constexpr TimeDelta kLowLatencyRendererMaxPlayoutDelay = TimeDelta::Millis(500);
|
||||
|
||||
} // namespace
|
||||
|
||||
VCMTiming::VCMTiming(Clock* clock, const FieldTrialsView& field_trials)
|
||||
@ -36,12 +38,9 @@ VCMTiming::VCMTiming(Clock* clock, const FieldTrialsView& field_trials)
|
||||
current_delay_(TimeDelta::Zero()),
|
||||
prev_frame_timestamp_(0),
|
||||
num_decoded_frames_(0),
|
||||
low_latency_renderer_enabled_("enabled", true),
|
||||
zero_playout_delay_min_pacing_("min_pacing",
|
||||
kZeroPlayoutDelayDefaultMinPacing),
|
||||
last_decode_scheduled_(Timestamp::Zero()) {
|
||||
ParseFieldTrial({&low_latency_renderer_enabled_},
|
||||
field_trials.Lookup("WebRTC-LowLatencyRenderer"));
|
||||
ParseFieldTrial({&zero_playout_delay_min_pacing_},
|
||||
field_trials.Lookup("WebRTC-ZeroPlayoutDelay"));
|
||||
}
|
||||
@ -165,12 +164,9 @@ void VCMTiming::SetLastDecodeScheduledTimestamp(
|
||||
|
||||
Timestamp VCMTiming::RenderTimeInternal(uint32_t frame_timestamp,
|
||||
Timestamp now) const {
|
||||
constexpr TimeDelta kLowLatencyRendererMaxPlayoutDelay =
|
||||
TimeDelta::Millis(500);
|
||||
if (min_playout_delay_.IsZero() &&
|
||||
(max_playout_delay_.IsZero() ||
|
||||
(low_latency_renderer_enabled_ &&
|
||||
max_playout_delay_ <= kLowLatencyRendererMaxPlayoutDelay))) {
|
||||
max_playout_delay_ <= kLowLatencyRendererMaxPlayoutDelay)) {
|
||||
// Render as soon as possible or with low-latency renderer algorithm.
|
||||
return Timestamp::Zero();
|
||||
}
|
||||
|
@ -141,11 +141,6 @@ class VCMTiming {
|
||||
uint32_t prev_frame_timestamp_ RTC_GUARDED_BY(mutex_);
|
||||
absl::optional<TimingFrameInfo> timing_frame_info_ RTC_GUARDED_BY(mutex_);
|
||||
size_t num_decoded_frames_ RTC_GUARDED_BY(mutex_);
|
||||
// Set by the field trial WebRTC-LowLatencyRenderer. The parameter enabled
|
||||
// determines if the low-latency renderer algorithm should be used for the
|
||||
// case min playout delay=0 and max playout delay>0.
|
||||
FieldTrialParameter<bool> low_latency_renderer_enabled_
|
||||
RTC_GUARDED_BY(mutex_);
|
||||
absl::optional<int> max_composition_delay_in_frames_ RTC_GUARDED_BY(mutex_);
|
||||
// Set by the field trial WebRTC-ZeroPlayoutDelay. The parameter min_pacing
|
||||
// determines the minimum delay between frames scheduled for decoding that is
|
||||
|
@ -244,9 +244,6 @@ VideoReceiveStream2::VideoReceiveStream2(
|
||||
rtp_stream_sync_(call->worker_thread(), this),
|
||||
max_wait_for_keyframe_ms_(DetermineMaxWaitForFrame(config_, true)),
|
||||
max_wait_for_frame_ms_(DetermineMaxWaitForFrame(config_, false)),
|
||||
low_latency_renderer_enabled_("enabled", true),
|
||||
low_latency_renderer_include_predecode_buffer_("include_predecode_buffer",
|
||||
true),
|
||||
maximum_pre_stream_decoders_("max", kDefaultMaximumPreStreamDecoders),
|
||||
decode_sync_(decode_sync),
|
||||
decode_queue_(task_queue_factory_->CreateTaskQueue(
|
||||
@ -286,9 +283,6 @@ VideoReceiveStream2::VideoReceiveStream2(
|
||||
true);
|
||||
}
|
||||
|
||||
ParseFieldTrial({&low_latency_renderer_enabled_,
|
||||
&low_latency_renderer_include_predecode_buffer_},
|
||||
call_->trials().Lookup("WebRTC-LowLatencyRenderer"));
|
||||
ParseFieldTrial(
|
||||
{
|
||||
&maximum_pre_stream_decoders_,
|
||||
@ -975,18 +969,16 @@ void VideoReceiveStream2::UpdatePlayoutDelays() const {
|
||||
if (minimum_delay_ms >= 0) {
|
||||
timing_->set_min_playout_delay(TimeDelta::Millis(minimum_delay_ms));
|
||||
if (frame_minimum_playout_delay_ms_ == 0 &&
|
||||
frame_maximum_playout_delay_ms_ > 0 && low_latency_renderer_enabled_) {
|
||||
frame_maximum_playout_delay_ms_ > 0) {
|
||||
// TODO(kron): Estimate frame rate from video stream.
|
||||
constexpr double kFrameRate = 60.0;
|
||||
// Convert playout delay in ms to number of frames.
|
||||
int max_composition_delay_in_frames = std::lrint(
|
||||
static_cast<double>(frame_maximum_playout_delay_ms_ * kFrameRate) /
|
||||
rtc::kNumMillisecsPerSec);
|
||||
if (low_latency_renderer_include_predecode_buffer_) {
|
||||
// Subtract frames in buffer.
|
||||
max_composition_delay_in_frames = std::max<int16_t>(
|
||||
max_composition_delay_in_frames - frame_buffer_->Size(), 0);
|
||||
}
|
||||
// Subtract frames in buffer.
|
||||
max_composition_delay_in_frames = std::max<int16_t>(
|
||||
max_composition_delay_in_frames - frame_buffer_->Size(), 0);
|
||||
timing_->SetMaxCompositionDelayInFrames(
|
||||
absl::make_optional(max_composition_delay_in_frames));
|
||||
}
|
||||
|
@ -309,16 +309,6 @@ class VideoReceiveStream2
|
||||
std::vector<std::unique_ptr<EncodedFrame>> buffered_encoded_frames_
|
||||
RTC_GUARDED_BY(decode_queue_);
|
||||
|
||||
// Set by the field trial WebRTC-LowLatencyRenderer. The parameter `enabled`
|
||||
// determines if the low-latency renderer algorithm should be used for the
|
||||
// case min playout delay=0 and max playout delay>0.
|
||||
FieldTrialParameter<bool> low_latency_renderer_enabled_;
|
||||
// Set by the field trial WebRTC-LowLatencyRenderer. The parameter
|
||||
// `include_predecode_buffer` determines if the predecode buffer should be
|
||||
// taken into account when calculating maximum number of frames in composition
|
||||
// queue.
|
||||
FieldTrialParameter<bool> low_latency_renderer_include_predecode_buffer_;
|
||||
|
||||
// Set by the field trial WebRTC-PreStreamDecoders. The parameter `max`
|
||||
// determines the maximum number of decoders that are created up front before
|
||||
// any video frame has been received.
|
||||
|
Reference in New Issue
Block a user