Add experimental shortened 2-temporal-layer setting
Also adjust to base-layer fraction for the shortened 3-tl pattern to be 60%, just like the 2-tl setting. This CL removes direct use of the allocation matrix and moves it behind a static getter. Bug: webrtc:9477 Change-Id: Ifd7d1edffa0555024fd252834357b926997d13b5 Reviewed-on: https://webrtc-review.googlesource.com/86681 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23834}
This commit is contained in:
@ -24,16 +24,6 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Ratio allocation between temporal streams:
|
||||
// Values as required for the VP8 codec (accumulating).
|
||||
static const float
|
||||
kLayerRateAllocation[kMaxSimulcastStreams][kMaxTemporalStreams] = {
|
||||
{1.0f, 1.0f, 1.0f, 1.0f}, // 1 layer
|
||||
{0.6f, 1.0f, 1.0f, 1.0f}, // 2 layers {60%, 40%}
|
||||
{0.4f, 0.6f, 1.0f, 1.0f}, // 3 layers {40%, 20%, 40%}
|
||||
{0.25f, 0.4f, 0.6f, 1.0f} // 4 layers {25%, 15%, 20%, 40%}
|
||||
};
|
||||
|
||||
class SimulcastRateAllocator : public VideoBitrateAllocator {
|
||||
public:
|
||||
explicit SimulcastRateAllocator(const VideoCodec& codec);
|
||||
@ -42,6 +32,8 @@ class SimulcastRateAllocator : public VideoBitrateAllocator {
|
||||
uint32_t framerate) override;
|
||||
const VideoCodec& GetCodec() const;
|
||||
|
||||
static float GetTemporalRateAllocation(int num_layers, int temporal_id);
|
||||
|
||||
private:
|
||||
void DistributeAllocationToSimulcastLayers(
|
||||
uint32_t total_bitrate_bps,
|
||||
|
||||
Reference in New Issue
Block a user