Remove unused framerate parameter from simulcast bitrate allocator.
It's not removed from VideoBitrateAllocationParameters as that struct is part of the API. Bug: webrtc:9883 Change-Id: I69f683e3c1dc3a0edc1711f6289514b86b05ad77 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149815 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28935}
This commit is contained in:
@ -69,8 +69,7 @@ VideoBitrateAllocation SimulcastRateAllocator::Allocate(
|
|||||||
VideoBitrateAllocation allocated_bitrates_bps;
|
VideoBitrateAllocation allocated_bitrates_bps;
|
||||||
DistributeAllocationToSimulcastLayers(parameters.total_bitrate.bps(),
|
DistributeAllocationToSimulcastLayers(parameters.total_bitrate.bps(),
|
||||||
&allocated_bitrates_bps);
|
&allocated_bitrates_bps);
|
||||||
DistributeAllocationToTemporalLayers(std::ceil(parameters.framerate),
|
DistributeAllocationToTemporalLayers(&allocated_bitrates_bps);
|
||||||
&allocated_bitrates_bps);
|
|
||||||
return allocated_bitrates_bps;
|
return allocated_bitrates_bps;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +186,6 @@ void SimulcastRateAllocator::DistributeAllocationToSimulcastLayers(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SimulcastRateAllocator::DistributeAllocationToTemporalLayers(
|
void SimulcastRateAllocator::DistributeAllocationToTemporalLayers(
|
||||||
uint32_t framerate,
|
|
||||||
VideoBitrateAllocation* allocated_bitrates_bps) const {
|
VideoBitrateAllocation* allocated_bitrates_bps) const {
|
||||||
const int num_spatial_streams =
|
const int num_spatial_streams =
|
||||||
std::max(1, static_cast<int>(codec_.numberOfSimulcastStreams));
|
std::max(1, static_cast<int>(codec_.numberOfSimulcastStreams));
|
||||||
@ -237,10 +235,10 @@ void SimulcastRateAllocator::DistributeAllocationToTemporalLayers(
|
|||||||
} else {
|
} else {
|
||||||
if (conference_screenshare_mode) {
|
if (conference_screenshare_mode) {
|
||||||
tl_allocation = ScreenshareTemporalLayerAllocation(
|
tl_allocation = ScreenshareTemporalLayerAllocation(
|
||||||
target_bitrate_kbps, max_bitrate_kbps, framerate, simulcast_id);
|
target_bitrate_kbps, max_bitrate_kbps, simulcast_id);
|
||||||
} else {
|
} else {
|
||||||
tl_allocation = DefaultTemporalLayerAllocation(
|
tl_allocation = DefaultTemporalLayerAllocation(
|
||||||
target_bitrate_kbps, max_bitrate_kbps, framerate, simulcast_id);
|
target_bitrate_kbps, max_bitrate_kbps, simulcast_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RTC_DCHECK_GT(tl_allocation.size(), 0);
|
RTC_DCHECK_GT(tl_allocation.size(), 0);
|
||||||
@ -262,7 +260,6 @@ void SimulcastRateAllocator::DistributeAllocationToTemporalLayers(
|
|||||||
std::vector<uint32_t> SimulcastRateAllocator::DefaultTemporalLayerAllocation(
|
std::vector<uint32_t> SimulcastRateAllocator::DefaultTemporalLayerAllocation(
|
||||||
int bitrate_kbps,
|
int bitrate_kbps,
|
||||||
int max_bitrate_kbps,
|
int max_bitrate_kbps,
|
||||||
int framerate,
|
|
||||||
int simulcast_id) const {
|
int simulcast_id) const {
|
||||||
const size_t num_temporal_layers = NumTemporalStreams(simulcast_id);
|
const size_t num_temporal_layers = NumTemporalStreams(simulcast_id);
|
||||||
std::vector<uint32_t> bitrates;
|
std::vector<uint32_t> bitrates;
|
||||||
@ -294,11 +291,10 @@ std::vector<uint32_t>
|
|||||||
SimulcastRateAllocator::ScreenshareTemporalLayerAllocation(
|
SimulcastRateAllocator::ScreenshareTemporalLayerAllocation(
|
||||||
int bitrate_kbps,
|
int bitrate_kbps,
|
||||||
int max_bitrate_kbps,
|
int max_bitrate_kbps,
|
||||||
int framerate,
|
|
||||||
int simulcast_id) const {
|
int simulcast_id) const {
|
||||||
if (simulcast_id > 0) {
|
if (simulcast_id > 0) {
|
||||||
return DefaultTemporalLayerAllocation(bitrate_kbps, max_bitrate_kbps,
|
return DefaultTemporalLayerAllocation(bitrate_kbps, max_bitrate_kbps,
|
||||||
framerate, simulcast_id);
|
simulcast_id);
|
||||||
}
|
}
|
||||||
std::vector<uint32_t> allocation;
|
std::vector<uint32_t> allocation;
|
||||||
allocation.push_back(bitrate_kbps);
|
allocation.push_back(bitrate_kbps);
|
||||||
|
@ -39,16 +39,13 @@ class SimulcastRateAllocator : public VideoBitrateAllocator {
|
|||||||
uint32_t total_bitrate_bps,
|
uint32_t total_bitrate_bps,
|
||||||
VideoBitrateAllocation* allocated_bitrates_bps);
|
VideoBitrateAllocation* allocated_bitrates_bps);
|
||||||
void DistributeAllocationToTemporalLayers(
|
void DistributeAllocationToTemporalLayers(
|
||||||
uint32_t framerate,
|
|
||||||
VideoBitrateAllocation* allocated_bitrates_bps) const;
|
VideoBitrateAllocation* allocated_bitrates_bps) const;
|
||||||
std::vector<uint32_t> DefaultTemporalLayerAllocation(int bitrate_kbps,
|
std::vector<uint32_t> DefaultTemporalLayerAllocation(int bitrate_kbps,
|
||||||
int max_bitrate_kbps,
|
int max_bitrate_kbps,
|
||||||
int framerate,
|
|
||||||
int simulcast_id) const;
|
int simulcast_id) const;
|
||||||
std::vector<uint32_t> ScreenshareTemporalLayerAllocation(
|
std::vector<uint32_t> ScreenshareTemporalLayerAllocation(
|
||||||
int bitrate_kbps,
|
int bitrate_kbps,
|
||||||
int max_bitrate_kbps,
|
int max_bitrate_kbps,
|
||||||
int framerate,
|
|
||||||
int simulcast_id) const;
|
int simulcast_id) const;
|
||||||
int NumTemporalStreams(size_t simulcast_id) const;
|
int NumTemporalStreams(size_t simulcast_id) const;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user