From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/video/config/simulcast.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'third_party/libwebrtc/video/config/simulcast.cc') diff --git a/third_party/libwebrtc/video/config/simulcast.cc b/third_party/libwebrtc/video/config/simulcast.cc index 2bd4ac04c3..7a78ef8d05 100644 --- a/third_party/libwebrtc/video/config/simulcast.cc +++ b/third_party/libwebrtc/video/config/simulcast.cc @@ -350,10 +350,9 @@ std::vector GetNormalSimulcastLayers( bool base_heavy_tl3_rate_alloc, const webrtc::FieldTrialsView& trials) { std::vector layers(layer_count); - const bool enable_lowres_bitrate_interpolation = EnableLowresBitrateInterpolation(trials); - + const int num_temporal_layers = DefaultNumberOfTemporalLayers(trials); // Format width and height has to be divisible by |2 ^ num_simulcast_layers - // 1|. width = NormalizeSimulcastSize(width, layer_count); @@ -366,7 +365,7 @@ std::vector GetNormalSimulcastLayers( // TODO(pbos): Fill actual temporal-layer bitrate thresholds. layers[s].max_qp = max_qp; layers[s].num_temporal_layers = - temporal_layers_supported ? DefaultNumberOfTemporalLayers(trials) : 1; + temporal_layers_supported ? num_temporal_layers : 1; layers[s].max_bitrate_bps = FindSimulcastMaxBitrate(width, height, enable_lowres_bitrate_interpolation) @@ -375,7 +374,6 @@ std::vector GetNormalSimulcastLayers( FindSimulcastTargetBitrate(width, height, enable_lowres_bitrate_interpolation) .bps(); - int num_temporal_layers = DefaultNumberOfTemporalLayers(trials); if (s == 0) { // If alternative temporal rate allocation is selected, adjust the // bitrate of the lowest simulcast stream so that absolute bitrate for -- cgit v1.2.3