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:
Erik Språng
2018-07-04 10:07:40 +02:00
committed by Commit Bot
parent c05bd738d6
commit d92288f5ba
6 changed files with 105 additions and 46 deletions

View File

@ -471,9 +471,15 @@ class TestVideoSenderWithVp8 : public TestVideoSender {
#define MAYBE_FixedTemporalLayersStrategy FixedTemporalLayersStrategy
#endif
TEST_F(TestVideoSenderWithVp8, MAYBE_FixedTemporalLayersStrategy) {
const int low_b = codec_bitrate_kbps_ * kLayerRateAllocation[2][0];
const int mid_b = codec_bitrate_kbps_ * kLayerRateAllocation[2][1];
const int high_b = codec_bitrate_kbps_ * kLayerRateAllocation[2][2];
const int low_b =
codec_bitrate_kbps_ *
webrtc::SimulcastRateAllocator::GetTemporalRateAllocation(3, 0);
const int mid_b =
codec_bitrate_kbps_ *
webrtc::SimulcastRateAllocator::GetTemporalRateAllocation(3, 1);
const int high_b =
codec_bitrate_kbps_ *
webrtc::SimulcastRateAllocator::GetTemporalRateAllocation(3, 2);
{
Vp8StreamInfo expected = {{7.5, 15.0, 30.0}, {low_b, mid_b, high_b}};
EXPECT_THAT(SimulateWithFramerate(30.0), MatchesVp8StreamInfo(expected));