• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 #ifndef MODULES_VIDEO_CODING_CODECS_AV1_SCALABILITY_STRUCTURE_L3T3_H_
11 #define MODULES_VIDEO_CODING_CODECS_AV1_SCALABILITY_STRUCTURE_L3T3_H_
12 
13 #include <vector>
14 
15 #include "absl/types/optional.h"
16 #include "api/transport/rtp/dependency_descriptor.h"
17 #include "common_video/generic_frame_descriptor/generic_frame_info.h"
18 #include "modules/video_coding/codecs/av1/scalable_video_controller.h"
19 
20 namespace webrtc {
21 
22 // https://aomediacodec.github.io/av1-rtp-spec/#a63-l3t3-full-svc
23 class ScalabilityStructureL3T3 : public ScalableVideoController {
24  public:
25   ~ScalabilityStructureL3T3() override;
26 
27   StreamLayersConfig StreamConfig() const override;
28   FrameDependencyStructure DependencyStructure() const override;
29 
30   std::vector<LayerFrameConfig> NextFrameConfig(bool restart) override;
31   absl::optional<GenericFrameInfo> OnEncodeDone(
32       LayerFrameConfig config) override;
33 
34  private:
35   enum FramePattern {
36     kKeyFrame,
37     kDeltaFrameT2A,
38     kDeltaFrameT1,
39     kDeltaFrameT2B,
40     kDeltaFrameT0,
41   };
42   LayerFrameConfig KeyFrameConfig() const;
43 
44   FramePattern next_pattern_ = kKeyFrame;
45 };
46 
47 }  // namespace webrtc
48 
49 #endif  // MODULES_VIDEO_CODING_CODECS_AV1_SCALABILITY_STRUCTURE_L3T3_H_
50