Index: modules/video_coding/codecs/vp8/default_temporal_layers.h |
diff --git a/modules/video_coding/codecs/vp8/default_temporal_layers.h b/modules/video_coding/codecs/vp8/default_temporal_layers.h |
index e1a5987dec71134d5e4509d6cb2bd4ba5ec4f868..45867c5a0b477602b4bc9c0cf6df9d5fd57f15d1 100644 |
--- a/modules/video_coding/codecs/vp8/default_temporal_layers.h |
+++ b/modules/video_coding/codecs/vp8/default_temporal_layers.h |
@@ -1,14 +1,14 @@ |
/* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
-* |
-* Use of this source code is governed by a BSD-style license |
-* that can be found in the LICENSE file in the root of the source |
-* tree. An additional intellectual property rights grant can be found |
-* in the file PATENTS. All contributing project authors may |
-* be found in the AUTHORS file in the root of the source tree. |
-*/ |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
/* |
-* This file defines classes for doing temporal layers with VP8. |
-*/ |
+ * This file defines classes for doing temporal layers with VP8. |
+ */ |
#ifndef MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ |
#define MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ |
@@ -59,5 +59,32 @@ class DefaultTemporalLayers : public TemporalLayers { |
rtc::Optional<std::vector<uint32_t>> new_bitrates_kbps_; |
}; |
+class DefaultTemporalLayersChecker : public TemporalLayersChecker { |
+ public: |
+ DefaultTemporalLayersChecker(int number_of_temporal_layers, |
+ uint8_t initial_tl0_pic_idx); |
+ bool CheckOnFrameEncoded(bool frame_is_keyframe, |
+ CodecSpecificInfoVP8& codec_specific, |
+ TemporalLayers::FrameConfig& frame_config) override; |
+ |
+ private: |
+ struct BufferState { |
+ BufferState() |
+ : is_updated_this_cycle(false), is_keyframe(false), pattern_idx(0) {} |
+ |
+ bool is_updated_this_cycle; |
+ bool is_keyframe; |
+ uint8_t pattern_idx; |
+ }; |
+ const size_t num_layers_; |
+ const std::vector<unsigned int> temporal_ids_; |
+ const std::vector<std::vector<uint8_t>> temporal_dependencies_; |
+ BufferState last_; |
+ BufferState arf_; |
+ BufferState golden_; |
+ uint8_t tl0_pic_idx_; |
+ uint8_t pattern_idx_; |
+}; |
+ |
} // namespace webrtc |
#endif // MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ |