Add support for more scalability modes (1.5:1 resolution ratio).

Added modes:
- L2T2h
- L2T3h
- L3T1h
- L3T2h
- L3T3h

Bug: webrtc:13960
Change-Id: I046a9a1f90629f6d4a5a82d4434e7cc0fa983263
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273345
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37951}
This commit is contained in:
Åsa Persson
2022-08-30 11:32:24 +02:00
committed by WebRTC LUCI CQ
parent bcc31826ab
commit 319531efa6
4 changed files with 81 additions and 11 deletions

View File

@ -78,6 +78,13 @@ constexpr ScalableVideoController::StreamLayersConfig kConfigL2T2 = {
{1, 1},
{2, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL2T2h = {
/*num_spatial_layers=*/2,
/*num_temporal_layers=*/2,
/*uses_reference_scaling=*/true,
{2, 1},
{3, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL2T3 = {
/*num_spatial_layers=*/2,
/*num_temporal_layers=*/3,
@ -85,6 +92,13 @@ constexpr ScalableVideoController::StreamLayersConfig kConfigL2T3 = {
{1, 1},
{2, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL2T3h = {
/*num_spatial_layers=*/2,
/*num_temporal_layers=*/3,
/*uses_reference_scaling=*/true,
{2, 1},
{3, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL3T1 = {
/*num_spatial_layers=*/3,
/*num_temporal_layers=*/1,
@ -92,6 +106,13 @@ constexpr ScalableVideoController::StreamLayersConfig kConfigL3T1 = {
{1, 1, 1},
{4, 2, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL3T1h = {
/*num_spatial_layers=*/3,
/*num_temporal_layers=*/1,
/*uses_reference_scaling=*/true,
{4, 2, 1},
{9, 3, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL3T2 = {
/*num_spatial_layers=*/3,
/*num_temporal_layers=*/2,
@ -99,6 +120,13 @@ constexpr ScalableVideoController::StreamLayersConfig kConfigL3T2 = {
{1, 1, 1},
{4, 2, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL3T2h = {
/*num_spatial_layers=*/3,
/*num_temporal_layers=*/2,
/*uses_reference_scaling=*/true,
{4, 2, 1},
{9, 3, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL3T3 = {
/*num_spatial_layers=*/3,
/*num_temporal_layers=*/3,
@ -106,6 +134,13 @@ constexpr ScalableVideoController::StreamLayersConfig kConfigL3T3 = {
{1, 1, 1},
{4, 2, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigL3T3h = {
/*num_spatial_layers=*/3,
/*num_temporal_layers=*/3,
/*uses_reference_scaling=*/true,
{4, 2, 1},
{9, 3, 1}};
constexpr ScalableVideoController::StreamLayersConfig kConfigS2T1 = {
/*num_spatial_layers=*/2,
/*num_temporal_layers=*/1,
@ -158,20 +193,25 @@ constexpr NamedStructureFactory kFactories[] = {
{ScalabilityMode::kL2T1_KEY, Create<ScalabilityStructureL2T1Key>,
kConfigL2T1},
{ScalabilityMode::kL2T2, Create<ScalabilityStructureL2T2>, kConfigL2T2},
{ScalabilityMode::kL2T2h, CreateH<ScalabilityStructureL2T2>, kConfigL2T2h},
{ScalabilityMode::kL2T2_KEY, Create<ScalabilityStructureL2T2Key>,
kConfigL2T2},
{ScalabilityMode::kL2T2_KEY_SHIFT, Create<ScalabilityStructureL2T2KeyShift>,
kConfigL2T2},
{ScalabilityMode::kL2T3, Create<ScalabilityStructureL2T3>, kConfigL2T3},
{ScalabilityMode::kL2T3h, CreateH<ScalabilityStructureL2T3>, kConfigL2T3h},
{ScalabilityMode::kL2T3_KEY, Create<ScalabilityStructureL2T3Key>,
kConfigL2T3},
{ScalabilityMode::kL3T1, Create<ScalabilityStructureL3T1>, kConfigL3T1},
{ScalabilityMode::kL3T1h, CreateH<ScalabilityStructureL3T1>, kConfigL3T1h},
{ScalabilityMode::kL3T1_KEY, Create<ScalabilityStructureL3T1Key>,
kConfigL3T1},
{ScalabilityMode::kL3T2, Create<ScalabilityStructureL3T2>, kConfigL3T2},
{ScalabilityMode::kL3T2h, CreateH<ScalabilityStructureL3T2>, kConfigL3T2h},
{ScalabilityMode::kL3T2_KEY, Create<ScalabilityStructureL3T2Key>,
kConfigL3T2},
{ScalabilityMode::kL3T3, Create<ScalabilityStructureL3T3>, kConfigL3T3},
{ScalabilityMode::kL3T3h, CreateH<ScalabilityStructureL3T3>, kConfigL3T3h},
{ScalabilityMode::kL3T3_KEY, Create<ScalabilityStructureL3T3Key>,
kConfigL3T3},
{ScalabilityMode::kS2T1, Create<ScalabilityStructureS2T1>, kConfigS2T1},