mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Add L2T3 K-SVC structure
Bug: webrtc:11999 Change-Id: I1bfb8674b95be8155035117c771b5e4c4bfc29c5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208260 Reviewed-by: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33299}
This commit is contained in:
parent
753c76a705
commit
c9b9930c97
4 changed files with 33 additions and 0 deletions
|
@ -54,6 +54,7 @@ constexpr NamedStructureFactory kFactories[] = {
|
|||
{"L2T2", Create<ScalabilityStructureL2T2>},
|
||||
{"L2T2_KEY", Create<ScalabilityStructureL2T2Key>},
|
||||
{"L2T2_KEY_SHIFT", Create<ScalabilityStructureL2T2KeyShift>},
|
||||
{"L2T3_KEY", Create<ScalabilityStructureL2T3Key>},
|
||||
{"L3T1", Create<ScalabilityStructureL3T1>},
|
||||
{"L3T3", Create<ScalabilityStructureL3T3>},
|
||||
{"L3T3_KEY", Create<ScalabilityStructureL3T3Key>},
|
||||
|
|
|
@ -304,6 +304,29 @@ FrameDependencyStructure ScalabilityStructureL2T2Key::DependencyStructure()
|
|||
return structure;
|
||||
}
|
||||
|
||||
ScalabilityStructureL2T3Key::~ScalabilityStructureL2T3Key() = default;
|
||||
|
||||
FrameDependencyStructure ScalabilityStructureL2T3Key::DependencyStructure()
|
||||
const {
|
||||
FrameDependencyStructure structure;
|
||||
structure.num_decode_targets = 6;
|
||||
structure.num_chains = 2;
|
||||
structure.decode_target_protected_by_chain = {0, 0, 0, 1, 1, 1};
|
||||
auto& templates = structure.templates;
|
||||
templates.resize(10);
|
||||
templates[0].S(0).T(0).Dtis("SSSSSS").ChainDiffs({0, 0});
|
||||
templates[1].S(0).T(0).Dtis("SSS---").ChainDiffs({8, 7}).FrameDiffs({8});
|
||||
templates[2].S(0).T(1).Dtis("-DS---").ChainDiffs({4, 3}).FrameDiffs({4});
|
||||
templates[3].S(0).T(2).Dtis("--D---").ChainDiffs({2, 1}).FrameDiffs({2});
|
||||
templates[4].S(0).T(2).Dtis("--D---").ChainDiffs({6, 5}).FrameDiffs({2});
|
||||
templates[5].S(1).T(0).Dtis("---SSS").ChainDiffs({1, 1}).FrameDiffs({1});
|
||||
templates[6].S(1).T(0).Dtis("---SSS").ChainDiffs({1, 8}).FrameDiffs({8});
|
||||
templates[7].S(1).T(1).Dtis("----DS").ChainDiffs({5, 4}).FrameDiffs({4});
|
||||
templates[8].S(1).T(2).Dtis("-----D").ChainDiffs({3, 2}).FrameDiffs({2});
|
||||
templates[9].S(1).T(2).Dtis("-----D").ChainDiffs({7, 6}).FrameDiffs({2});
|
||||
return structure;
|
||||
}
|
||||
|
||||
ScalabilityStructureL3T3Key::~ScalabilityStructureL3T3Key() = default;
|
||||
|
||||
FrameDependencyStructure ScalabilityStructureL3T3Key::DependencyStructure()
|
||||
|
|
|
@ -94,6 +94,14 @@ class ScalabilityStructureL2T2Key : public ScalabilityStructureKeySvc {
|
|||
FrameDependencyStructure DependencyStructure() const override;
|
||||
};
|
||||
|
||||
class ScalabilityStructureL2T3Key : public ScalabilityStructureKeySvc {
|
||||
public:
|
||||
ScalabilityStructureL2T3Key() : ScalabilityStructureKeySvc(2, 3) {}
|
||||
~ScalabilityStructureL2T3Key() override;
|
||||
|
||||
FrameDependencyStructure DependencyStructure() const override;
|
||||
};
|
||||
|
||||
class ScalabilityStructureL3T3Key : public ScalabilityStructureKeySvc {
|
||||
public:
|
||||
ScalabilityStructureL3T3Key() : ScalabilityStructureKeySvc(3, 3) {}
|
||||
|
|
|
@ -304,6 +304,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
SvcTestParam{"L2T2", /*num_temporal_units=*/4},
|
||||
SvcTestParam{"L2T2_KEY", /*num_temporal_units=*/4},
|
||||
SvcTestParam{"L2T2_KEY_SHIFT", /*num_temporal_units=*/4},
|
||||
SvcTestParam{"L2T3_KEY", /*num_temporal_units=*/8},
|
||||
SvcTestParam{"L3T3_KEY", /*num_temporal_units=*/8}),
|
||||
[](const testing::TestParamInfo<SvcTestParam>& info) {
|
||||
return info.param.name;
|
||||
|
|
Loading…
Reference in a new issue