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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/screenshare_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
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 17 matching lines...) Expand all
28 static const double kAcceptableTargetOvershoot; 28 static const double kAcceptableTargetOvershoot;
29 static const int kMaxFrameIntervalMs; 29 static const int kMaxFrameIntervalMs;
30 30
31 ScreenshareLayers(int num_temporal_layers, 31 ScreenshareLayers(int num_temporal_layers,
32 uint8_t initial_tl0_pic_idx, 32 uint8_t initial_tl0_pic_idx,
33 Clock* clock); 33 Clock* clock);
34 virtual ~ScreenshareLayers(); 34 virtual ~ScreenshareLayers();
35 35
36 // Returns the recommended VP8 encode flags needed. May refresh the decoder 36 // Returns the recommended VP8 encode flags needed. May refresh the decoder
37 // and/or update the reference buffers. 37 // and/or update the reference buffers.
38 TemporalReferences UpdateLayerConfig(uint32_t timestamp) override; 38 TemporalLayers::FrameConfig UpdateLayerConfig(uint32_t timestamp) override;
39 39
40 // Update state based on new bitrate target and incoming framerate. 40 // Update state based on new bitrate target and incoming framerate.
41 // Returns the bitrate allocation for the active temporal layers. 41 // Returns the bitrate allocation for the active temporal layers.
42 std::vector<uint32_t> OnRatesUpdated(int bitrate_kbps, 42 std::vector<uint32_t> OnRatesUpdated(int bitrate_kbps,
43 int max_bitrate_kbps, 43 int max_bitrate_kbps,
44 int framerate) override; 44 int framerate) override;
45 45
46 // Update the encoder configuration with target bitrates or other parameters. 46 // Update the encoder configuration with target bitrates or other parameters.
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 CodecSpecificInfoVP8* vp8_info, 52 CodecSpecificInfoVP8* vp8_info,
52 uint32_t timestamp) override; 53 uint32_t timestamp) override;
53 54
54 void FrameEncoded(unsigned int size, int qp) override; 55 void FrameEncoded(unsigned int size, int qp) override;
55 56
56 int CurrentLayerId() const override; 57 int GetTemporalLayerId(
58 const TemporalLayers::FrameConfig& tl_config) const override;
57 59
58 uint8_t Tl0PicIdx() const override; 60 uint8_t Tl0PicIdx() const override;
59 61
60 private: 62 private:
61 bool TimeToSync(int64_t timestamp) const; 63 bool TimeToSync(int64_t timestamp) const;
62 uint32_t GetCodecTargetBitrateKbps() const; 64 uint32_t GetCodecTargetBitrateKbps() const;
63 65
64 Clock* const clock_; 66 Clock* const clock_;
65 67
66 int number_of_temporal_layers_; 68 int number_of_temporal_layers_;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 int64_t num_overshoots_ = 0; 119 int64_t num_overshoots_ = 0;
118 int64_t tl0_qp_sum_ = 0; 120 int64_t tl0_qp_sum_ = 0;
119 int64_t tl1_qp_sum_ = 0; 121 int64_t tl1_qp_sum_ = 0;
120 int64_t tl0_target_bitrate_sum_ = 0; 122 int64_t tl0_target_bitrate_sum_ = 0;
121 int64_t tl1_target_bitrate_sum_ = 0; 123 int64_t tl1_target_bitrate_sum_ = 0;
122 } stats_; 124 } stats_;
123 }; 125 };
124 } // namespace webrtc 126 } // namespace webrtc
125 127
126 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ 128 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698