In ksvc controller reuse unused frame configuration

vp9 encoder wrapper rely on that behaviour
to generate vp9-specific temporal references

Bug: webrtc:11999
Change-Id: I35536af4eca76450e2f72777e06ad3af872a5800
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211340
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33445}
diff --git a/modules/video_coding/svc/scalability_structure_key_svc.h b/modules/video_coding/svc/scalability_structure_key_svc.h
index 110c2a8..b66f6f8 100644
--- a/modules/video_coding/svc/scalability_structure_key_svc.h
+++ b/modules/video_coding/svc/scalability_structure_key_svc.h
@@ -32,8 +32,9 @@
   void OnRatesUpdated(const VideoBitrateAllocation& bitrates) override;
 
  private:
-  enum FramePattern {
+  enum FramePattern : int {
     kNone,
+    kKey,
     kDeltaT0,
     kDeltaT2A,
     kDeltaT1,
@@ -53,10 +54,16 @@
     active_decode_targets_.set(sid * num_temporal_layers_ + tid, value);
   }
   bool TemporalLayerIsActive(int tid) const;
+  static DecodeTargetIndication Dti(int sid,
+                                    int tid,
+                                    const LayerFrameConfig& config);
+
   std::vector<LayerFrameConfig> KeyframeConfig();
   std::vector<LayerFrameConfig> T0Config();
   std::vector<LayerFrameConfig> T1Config();
-  std::vector<LayerFrameConfig> T2Config();
+  std::vector<LayerFrameConfig> T2Config(FramePattern pattern);
+
+  FramePattern NextPattern(FramePattern last_pattern) const;
 
   const int num_spatial_layers_;
   const int num_temporal_layers_;