Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(983)

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h

Issue 2853073004: Derive current layer from TL frame config. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
2 * 2 *
3 * Use of this source code is governed by a BSD-style license 3 * Use of this source code is governed by a BSD-style license
4 * that can be found in the LICENSE file in the root of the source 4 * that can be found in the LICENSE file in the root of the source
5 * tree. An additional intellectual property rights grant can be found 5 * tree. An additional intellectual property rights grant can be found
6 * in the file PATENTS. All contributing project authors may 6 * in the file PATENTS. All contributing project authors may
7 * be found in the AUTHORS file in the root of the source tree. 7 * be found in the AUTHORS file in the root of the source tree.
8 */ 8 */
9 /* 9 /*
10 * This file defines classes for doing temporal layers with VP8. 10 * This file defines classes for doing temporal layers with VP8.
(...skipping 10 matching lines...) Expand all
21 namespace webrtc { 21 namespace webrtc {
22 22
23 class DefaultTemporalLayers : public TemporalLayers { 23 class DefaultTemporalLayers : public TemporalLayers {
24 public: 24 public:
25 DefaultTemporalLayers(int number_of_temporal_layers, 25 DefaultTemporalLayers(int number_of_temporal_layers,
26 uint8_t initial_tl0_pic_idx); 26 uint8_t initial_tl0_pic_idx);
27 virtual ~DefaultTemporalLayers() {} 27 virtual ~DefaultTemporalLayers() {}
28 28
29 // Returns the recommended VP8 encode flags needed. May refresh the decoder 29 // Returns the recommended VP8 encode flags needed. May refresh the decoder
30 // and/or update the reference buffers. 30 // and/or update the reference buffers.
31 TemporalReferences UpdateLayerConfig(uint32_t timestamp) override; 31 TemporalLayers::FrameConfig UpdateLayerConfig(uint32_t timestamp) override;
32 32
33 // Update state based on new bitrate target and incoming framerate. 33 // Update state based on new bitrate target and incoming framerate.
34 // Returns the bitrate allocation for the active temporal layers. 34 // Returns the bitrate allocation for the active temporal layers.
35 std::vector<uint32_t> OnRatesUpdated(int bitrate_kbps, 35 std::vector<uint32_t> OnRatesUpdated(int bitrate_kbps,
36 int max_bitrate_kbps, 36 int max_bitrate_kbps,
37 int framerate) override; 37 int framerate) override;
38 38
39 bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override; 39 bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override;
40 40
41 void PopulateCodecSpecific(bool frame_is_keyframe, 41 void PopulateCodecSpecific(bool frame_is_keyframe,
42 const TemporalLayers::FrameConfig& tl_config,
42 CodecSpecificInfoVP8* vp8_info, 43 CodecSpecificInfoVP8* vp8_info,
43 uint32_t timestamp) override; 44 uint32_t timestamp) override;
44 45
45 void FrameEncoded(unsigned int size, int qp) override {} 46 void FrameEncoded(unsigned int size, int qp) override {}
46 47
47 int CurrentLayerId() const override; 48 int GetTemporalLayerId(
49 const TemporalLayers::FrameConfig& references) const override;
48 50
49 uint8_t Tl0PicIdx() const override; 51 uint8_t Tl0PicIdx() const override;
50 52
51 private: 53 private:
52 const size_t num_layers_; 54 const size_t num_layers_;
53 const std::vector<unsigned int> temporal_ids_; 55 const std::vector<unsigned int> temporal_ids_;
54 const std::vector<TemporalReferences> temporal_pattern_; 56 const std::vector<TemporalLayers::FrameConfig> temporal_pattern_;
55 57
56 uint8_t tl0_pic_idx_; 58 uint8_t tl0_pic_idx_;
57 uint8_t pattern_idx_; 59 uint8_t pattern_idx_;
58 uint32_t timestamp_; 60 uint32_t timestamp_;
59 bool last_base_layer_sync_; 61 bool last_base_layer_sync_;
60 rtc::Optional<std::vector<uint32_t>> new_bitrates_kbps_; 62 rtc::Optional<std::vector<uint32_t>> new_bitrates_kbps_;
61 }; 63 };
62 64
63 } // namespace webrtc 65 } // namespace webrtc
64 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ 66 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698