OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 void EnableTemporalDecimation(bool enable); | 26 void EnableTemporalDecimation(bool enable); |
27 | 27 |
28 void SetTargetFramerate(int frame_rate); | 28 void SetTargetFramerate(int frame_rate); |
29 | 29 |
30 bool DropFrame(); | 30 bool DropFrame(); |
31 | 31 |
32 void UpdateIncomingframe_rate(); | 32 void UpdateIncomingframe_rate(); |
33 | 33 |
34 // Get Decimated Frame Rate/Dimensions. | 34 // Get Decimated Frame Rate/Dimensions. |
35 uint32_t Decimatedframe_rate(); | 35 uint32_t GetDecimatedFrameRate(); |
36 | 36 |
37 // Get input frame rate. | 37 // Get input frame rate. |
38 uint32_t Inputframe_rate(); | 38 uint32_t Inputframe_rate(); |
39 | 39 |
40 private: | 40 private: |
41 void ProcessIncomingframe_rate(int64_t now); | 41 void ProcessIncomingframe_rate(int64_t now); |
42 | 42 |
43 enum { kFrameCountHistory_size = 90}; | 43 enum { kFrameCountHistory_size = 90}; |
44 enum { kFrameHistoryWindowMs = 2000}; | 44 enum { kFrameHistoryWindowMs = 2000}; |
45 | 45 |
46 // Temporal decimation. | 46 // Temporal decimation. |
47 int32_t overshoot_modifier_; | 47 int32_t overshoot_modifier_; |
48 uint32_t drop_count_; | 48 uint32_t drop_count_; |
49 uint32_t keep_count_; | 49 uint32_t keep_count_; |
50 uint32_t target_frame_rate_; | 50 uint32_t target_frame_rate_; |
51 float incoming_frame_rate_; | 51 float incoming_frame_rate_; |
52 int64_t incoming_frame_times_[kFrameCountHistory_size]; | 52 int64_t incoming_frame_times_[kFrameCountHistory_size]; |
53 bool enable_temporal_decimation_; | 53 bool enable_temporal_decimation_; |
54 }; | 54 }; |
55 | 55 |
56 } // namespace webrtc | 56 } // namespace webrtc |
57 | 57 |
58 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DECIMATOR_H_ | 58 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DECIMATOR_H_ |
OLD | NEW |