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

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

Issue 2924993002: Move temporal-layer properties to FrameConfig. (Closed)
Patch Set: improve unittests Created 3 years, 5 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) 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 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ 9 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_
10 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ 10 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Returns true iff the configuration was actually modified. 47 // Returns true iff the configuration was actually modified.
48 bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override; 48 bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override;
49 49
50 void PopulateCodecSpecific(bool base_layer_sync, 50 void PopulateCodecSpecific(bool base_layer_sync,
51 const TemporalLayers::FrameConfig& tl_config, 51 const TemporalLayers::FrameConfig& tl_config,
52 CodecSpecificInfoVP8* vp8_info, 52 CodecSpecificInfoVP8* vp8_info,
53 uint32_t timestamp) override; 53 uint32_t timestamp) override;
54 54
55 void FrameEncoded(unsigned int size, int qp) override; 55 void FrameEncoded(unsigned int size, int qp) override;
56 56
57 int GetTemporalLayerId(
58 const TemporalLayers::FrameConfig& tl_config) const override;
59
60 uint8_t Tl0PicIdx() const override; 57 uint8_t Tl0PicIdx() const override;
61 58
62 private: 59 private:
63 enum class TemporalLayerState : int { kDrop, kTl0, kTl1, kTl1Sync }; 60 enum class TemporalLayerState : int { kDrop, kTl0, kTl1, kTl1Sync };
64 61
65 bool TimeToSync(int64_t timestamp) const; 62 bool TimeToSync(int64_t timestamp) const;
66 uint32_t GetCodecTargetBitrateKbps() const; 63 uint32_t GetCodecTargetBitrateKbps() const;
67 64
68 Clock* const clock_; 65 Clock* const clock_;
69 66
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 int64_t num_overshoots_ = 0; 118 int64_t num_overshoots_ = 0;
122 int64_t tl0_qp_sum_ = 0; 119 int64_t tl0_qp_sum_ = 0;
123 int64_t tl1_qp_sum_ = 0; 120 int64_t tl1_qp_sum_ = 0;
124 int64_t tl0_target_bitrate_sum_ = 0; 121 int64_t tl0_target_bitrate_sum_ = 0;
125 int64_t tl1_target_bitrate_sum_ = 0; 122 int64_t tl1_target_bitrate_sum_ = 0;
126 } stats_; 123 } stats_;
127 }; 124 };
128 } // namespace webrtc 125 } // namespace webrtc
129 126
130 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ 127 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698