Support layer skipping in key svc structures

Add KSvc structure for 3 spatial and 3 temporal layers to allow to cover
more scenarious

Bug: webrtc:11999
Change-Id: Id16d1acfb4ca5f98d1b17d8f66d54b31d22d0745
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188122
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32434}
This commit is contained in:
Danil Chapovalov
2020-10-16 16:14:58 +02:00
committed by Commit Bot
parent 609b047b07
commit 4b18e24967
12 changed files with 641 additions and 372 deletions

View File

@ -14,6 +14,7 @@
#include <vector>
#include "api/array_view.h"
#include "api/transport/rtp/dependency_descriptor.h"
#include "api/video/video_bitrate_allocation.h"
#include "common_video/generic_frame_descriptor/generic_frame_info.h"
@ -32,16 +33,22 @@ class ScalabilityStructureWrapper {
explicit ScalabilityStructureWrapper(ScalableVideoController& structure)
: structure_controller_(structure) {}
std::vector<GenericFrameInfo> GenerateFrames(int num_tempral_units,
bool restart);
std::vector<GenericFrameInfo> GenerateFrames(int num_temporal_units) {
return GenerateFrames(num_temporal_units, /*restart=*/false);
std::vector<GenericFrameInfo> frames;
GenerateFrames(num_temporal_units, frames);
return frames;
}
void GenerateFrames(int num_temporal_units,
std::vector<GenericFrameInfo>& frames);
// Returns false and ADD_FAILUREs for frames with invalid references.
// In particular validates no frame frame reference to frame before frames[0].
// In error messages frames are indexed starting with 0.
bool FrameReferencesAreValid(
rtc::ArrayView<const GenericFrameInfo> frames) const;
private:
ScalableVideoController& structure_controller_;
std::bitset<8> buffer_contains_frame_ = 0;
FrameDependenciesCalculator frame_deps_calculator_;
ChainDiffCalculator chain_diff_calculator_;
int64_t frame_id_ = 0;