OLD | NEW |
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 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" | 10 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 static const int kQpDeltaThresholdForSync = 8; | 28 static const int kQpDeltaThresholdForSync = 8; |
29 static const int kMinBitrateKbpsForQpBoost = 500; | 29 static const int kMinBitrateKbpsForQpBoost = 500; |
30 | 30 |
31 const double ScreenshareLayers::kMaxTL0FpsReduction = 2.5; | 31 const double ScreenshareLayers::kMaxTL0FpsReduction = 2.5; |
32 const double ScreenshareLayers::kAcceptableTargetOvershoot = 2.0; | 32 const double ScreenshareLayers::kAcceptableTargetOvershoot = 2.0; |
33 | 33 |
34 constexpr int ScreenshareLayers::kMaxNumTemporalLayers; | 34 constexpr int ScreenshareLayers::kMaxNumTemporalLayers; |
35 | 35 |
36 // Always emit a frame with certain interval, even if bitrate targets have | 36 // Always emit a frame with certain interval, even if bitrate targets have |
37 // been exceeded. This prevents needless keyframe requests. | 37 // been exceeded. This prevents needless keyframe requests. |
38 const int ScreenshareLayers::kMaxFrameIntervalMs = 3000; | 38 const int ScreenshareLayers::kMaxFrameIntervalMs = 2750; |
39 | 39 |
40 webrtc::TemporalLayers* ScreenshareTemporalLayersFactory::Create( | 40 webrtc::TemporalLayers* ScreenshareTemporalLayersFactory::Create( |
41 int simulcast_id, | 41 int simulcast_id, |
42 int num_temporal_layers, | 42 int num_temporal_layers, |
43 uint8_t initial_tl0_pic_idx) const { | 43 uint8_t initial_tl0_pic_idx) const { |
44 webrtc::TemporalLayers* tl; | 44 webrtc::TemporalLayers* tl; |
45 if (simulcast_id == 0) { | 45 if (simulcast_id == 0) { |
46 tl = new webrtc::ScreenshareLayers(num_temporal_layers, rand(), | 46 tl = new webrtc::ScreenshareLayers(num_temporal_layers, rand(), |
47 webrtc::Clock::GetRealTimeClock()); | 47 webrtc::Clock::GetRealTimeClock()); |
48 } else { | 48 } else { |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp", | 460 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp", |
461 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_); | 461 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_); |
462 RTC_HISTOGRAM_COUNTS_10000( | 462 RTC_HISTOGRAM_COUNTS_10000( |
463 "WebRTC.Video.Screenshare.Layer1.TargetBitrate", | 463 "WebRTC.Video.Screenshare.Layer1.TargetBitrate", |
464 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_); | 464 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_); |
465 } | 465 } |
466 } | 466 } |
467 } | 467 } |
468 | 468 |
469 } // namespace webrtc | 469 } // namespace webrtc |
OLD | NEW |