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

Side by Side Diff: webrtc/modules/video_coding/utility/quality_scaler.h

Issue 1824083002: Make Android min-resolution rotation-agnostic. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: some fixes Created 4 years, 9 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 /* 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 26 matching lines...) Expand all
37 void ReportDroppedFrame(); 37 void ReportDroppedFrame();
38 void Reset(int framerate, int bitrate, int width, int height); 38 void Reset(int framerate, int bitrate, int width, int height);
39 void OnEncodeFrame(const VideoFrame& frame); 39 void OnEncodeFrame(const VideoFrame& frame);
40 Resolution GetScaledResolution() const; 40 Resolution GetScaledResolution() const;
41 const VideoFrame& GetScaledFrame(const VideoFrame& frame); 41 const VideoFrame& GetScaledFrame(const VideoFrame& frame);
42 int GetTargetFramerate() const; 42 int GetTargetFramerate() const;
43 int downscale_shift() const { return downscale_shift_; } 43 int downscale_shift() const { return downscale_shift_; }
44 44
45 private: 45 private:
46 void AdjustScale(bool up); 46 void AdjustScale(bool up);
47 void UpdateTargetResolution(int frame_width, int frame_height);
47 void ClearSamples(); 48 void ClearSamples();
48 49
49 Scaler scaler_; 50 Scaler scaler_;
50 VideoFrame scaled_frame_; 51 VideoFrame scaled_frame_;
51 52
52 size_t num_samples_; 53 size_t num_samples_;
53 int framerate_; 54 int framerate_;
54 int target_framerate_; 55 int target_framerate_;
55 int low_qp_threshold_; 56 int low_qp_threshold_;
56 int high_qp_threshold_; 57 int high_qp_threshold_;
57 MovingAverage<int> framedrop_percent_; 58 MovingAverage<int> framedrop_percent_;
58 MovingAverage<int> average_qp_; 59 MovingAverage<int> average_qp_;
59 Resolution res_; 60 Resolution res_;
60 61
61 int downscale_shift_; 62 int downscale_shift_;
62 int framerate_down_; 63 int framerate_down_;
63 bool use_framerate_reduction_; 64 bool use_framerate_reduction_;
64 int min_width_; 65 int min_width_;
65 int min_height_; 66 int min_height_;
66 }; 67 };
67 68
68 } // namespace webrtc 69 } // namespace webrtc
69 70
70 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_ 71 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
OLDNEW
« no previous file with comments | « webrtc/api/java/jni/androidmediaencoder_jni.cc ('k') | webrtc/modules/video_coding/utility/quality_scaler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698