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

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

Issue 2924993002: Move temporal-layer properties to FrameConfig. (Closed)
Patch Set: remove timestamp check, input frame doesn't repeat Created 3 years, 6 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
OLDNEW
1 /* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 1 /* Copyright (c) 2011 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 the interface for doing temporal layers with VP8. 10 * This file defines the interface for doing temporal layers with VP8.
(...skipping 29 matching lines...) Expand all
40 FrameConfig(BufferFlags last, 40 FrameConfig(BufferFlags last,
41 BufferFlags golden, 41 BufferFlags golden,
42 BufferFlags arf, 42 BufferFlags arf,
43 FreezeEntropy); 43 FreezeEntropy);
44 44
45 bool drop_frame; 45 bool drop_frame;
46 BufferFlags last_buffer_flags; 46 BufferFlags last_buffer_flags;
47 BufferFlags golden_buffer_flags; 47 BufferFlags golden_buffer_flags;
48 BufferFlags arf_buffer_flags; 48 BufferFlags arf_buffer_flags;
49 49
50 // TODO(pbos): Consider breaking these out of here and returning only a 50 int encoder_layer_id;
51 // pattern index that needs to be returned to fill CodecSpecificInfoVP8 or 51 int packetizer_temporal_idx;
sprang_webrtc 2017/06/13 11:39:22 Please add a comment explaining what the differenc
pbos-webrtc 2017/06/15 21:59:09 Done.
52 // EncodeFlags. 52
53 bool layer_sync; 53 bool layer_sync;
54
54 bool freeze_entropy; 55 bool freeze_entropy;
55 56
56 int pattern_idx;
57
58 private: 57 private:
59 FrameConfig(BufferFlags last, 58 FrameConfig(BufferFlags last,
60 BufferFlags golden, 59 BufferFlags golden,
61 BufferFlags arf, 60 BufferFlags arf,
62 bool freeze_entropy); 61 bool freeze_entropy);
63 }; 62 };
64 63
65 // Factory for TemporalLayer strategy. Default behavior is a fixed pattern 64 // Factory for TemporalLayer strategy. Default behavior is a fixed pattern
66 // of temporal layers. See default_temporal_layers.cc 65 // of temporal layers. See default_temporal_layers.cc
67 virtual ~TemporalLayers() {} 66 virtual ~TemporalLayers() {}
(...skipping 16 matching lines...) Expand all
84 bool is_keyframe, 83 bool is_keyframe,
85 const TemporalLayers::FrameConfig& tl_config, 84 const TemporalLayers::FrameConfig& tl_config,
86 CodecSpecificInfoVP8* vp8_info, 85 CodecSpecificInfoVP8* vp8_info,
87 uint32_t timestamp) = 0; 86 uint32_t timestamp) = 0;
88 87
89 virtual void FrameEncoded(unsigned int size, int qp) = 0; 88 virtual void FrameEncoded(unsigned int size, int qp) = 0;
90 89
91 // Returns the current tl0_pic_idx, so it can be reused in future 90 // Returns the current tl0_pic_idx, so it can be reused in future
92 // instantiations. 91 // instantiations.
93 virtual uint8_t Tl0PicIdx() const = 0; 92 virtual uint8_t Tl0PicIdx() const = 0;
94 virtual int GetTemporalLayerId(
95 const TemporalLayers::FrameConfig& tl_config) const = 0;
96 }; 93 };
97 94
98 class TemporalLayersListener; 95 class TemporalLayersListener;
99 class TemporalLayersFactory { 96 class TemporalLayersFactory {
100 public: 97 public:
101 TemporalLayersFactory() : listener_(nullptr) {} 98 TemporalLayersFactory() : listener_(nullptr) {}
102 virtual ~TemporalLayersFactory() {} 99 virtual ~TemporalLayersFactory() {}
103 virtual TemporalLayers* Create(int simulcast_id, 100 virtual TemporalLayers* Create(int simulcast_id,
104 int temporal_layers, 101 int temporal_layers,
105 uint8_t initial_tl0_pic_idx) const; 102 uint8_t initial_tl0_pic_idx) const;
(...skipping 17 matching lines...) Expand all
123 public: 120 public:
124 TemporalLayersListener() {} 121 TemporalLayersListener() {}
125 virtual ~TemporalLayersListener() {} 122 virtual ~TemporalLayersListener() {}
126 123
127 virtual void OnTemporalLayersCreated(int simulcast_id, 124 virtual void OnTemporalLayersCreated(int simulcast_id,
128 TemporalLayers* layers) = 0; 125 TemporalLayers* layers) = 0;
129 }; 126 };
130 127
131 } // namespace webrtc 128 } // namespace webrtc
132 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ 129 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698