OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 16 matching lines...) Expand all Loading... |
27 QualityScaler(); | 27 QualityScaler(); |
28 void Init(int low_qp_threshold, | 28 void Init(int low_qp_threshold, |
29 int high_qp_threshold, | 29 int high_qp_threshold, |
30 bool use_framerate_reduction); | 30 bool use_framerate_reduction); |
31 void SetMinResolution(int min_width, int min_height); | 31 void SetMinResolution(int min_width, int min_height); |
32 void ReportFramerate(int framerate); | 32 void ReportFramerate(int framerate); |
33 void ReportQP(int qp); | 33 void ReportQP(int qp); |
34 void ReportDroppedFrame(); | 34 void ReportDroppedFrame(); |
35 void Reset(int framerate, int bitrate, int width, int height); | 35 void Reset(int framerate, int bitrate, int width, int height); |
36 void OnEncodeFrame(const VideoFrame& frame); | 36 void OnEncodeFrame(const VideoFrame& frame); |
37 Resolution GetScaledResolution() const; | 37 const Resolution& GetScaledResolution() const; |
38 const VideoFrame& GetScaledFrame(const VideoFrame& frame); | 38 const VideoFrame& GetScaledFrame(const VideoFrame& frame); |
39 int GetTargetFramerate() const; | 39 int GetTargetFramerate() const; |
40 int downscale_shift() const { return downscale_shift_; } | 40 int downscale_shift() const { return downscale_shift_; } |
41 | 41 |
42 private: | 42 private: |
43 void AdjustScale(bool up); | 43 void AdjustScale(bool up); |
44 void ClearSamples(); | 44 void ClearSamples(); |
45 | 45 |
46 Scaler scaler_; | 46 Scaler scaler_; |
47 VideoFrame scaled_frame_; | 47 VideoFrame scaled_frame_; |
(...skipping 10 matching lines...) Expand all Loading... |
58 int downscale_shift_; | 58 int downscale_shift_; |
59 int framerate_down_; | 59 int framerate_down_; |
60 bool use_framerate_reduction_; | 60 bool use_framerate_reduction_; |
61 int min_width_; | 61 int min_width_; |
62 int min_height_; | 62 int min_height_; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace webrtc | 65 } // namespace webrtc |
66 | 66 |
67 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_ | 67 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_ |
OLD | NEW |