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

Side by Side Diff: webrtc/media/base/videocommon.h

Issue 1934503002: Delete unused video capture code for cropping, non-square pixels, and ARGB. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 int* scaled_width, int* scaled_height); 140 int* scaled_width, int* scaled_height);
141 141
142 // For low fps, max pixels limit is set to Retina MacBookPro 15" resolution of 142 // For low fps, max pixels limit is set to Retina MacBookPro 15" resolution of
143 // 2880 x 1800 as of 4/18/2013. 143 // 2880 x 1800 as of 4/18/2013.
144 // For high fps, maximum pixels limit is set based on common 24" monitor 144 // For high fps, maximum pixels limit is set based on common 24" monitor
145 // resolution of 2048 x 1280 as of 6/13/2013. The Retina resolution is 145 // resolution of 2048 x 1280 as of 6/13/2013. The Retina resolution is
146 // therefore reduced to 1440 x 900. 146 // therefore reduced to 1440 x 900.
147 void ComputeScale(int frame_width, int frame_height, int fps, 147 void ComputeScale(int frame_width, int frame_height, int fps,
148 int* scaled_width, int* scaled_height); 148 int* scaled_width, int* scaled_height);
149 149
150 // Compute the frame size that conversion should crop to based on aspect ratio.
151 // Ensures size is multiple of 2 due to I420 and conversion limitations.
152 void ComputeCrop(int cropped_format_width, int cropped_format_height,
153 int frame_width, int frame_height,
154 int pixel_width, int pixel_height,
155 int rotation,
156 int* cropped_width, int* cropped_height);
157
158 // Compute the frame size that makes pixels square pixel aspect ratio.
159 void ComputeScaleToSquarePixels(int in_width, int in_height,
160 int pixel_width, int pixel_height,
161 int* scaled_width, int* scaled_height);
162
163 ////////////////////////////////////////////////////////////////////////////// 150 //////////////////////////////////////////////////////////////////////////////
164 // Definition of VideoFormat. 151 // Definition of VideoFormat.
165 ////////////////////////////////////////////////////////////////////////////// 152 //////////////////////////////////////////////////////////////////////////////
166 153
167 // VideoFormat with Plain Old Data for global variables. 154 // VideoFormat with Plain Old Data for global variables.
168 struct VideoFormatPod { 155 struct VideoFormatPod {
169 int width; // Number of pixels. 156 int width; // Number of pixels.
170 int height; // Number of pixels. 157 int height; // Number of pixels.
171 int64_t interval; // Nanoseconds. 158 int64_t interval; // Nanoseconds.
172 uint32_t fourcc; // Color space. FOURCC_ANY means that any color space is OK. 159 uint32_t fourcc; // Color space. FOURCC_ANY means that any color space is OK.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 format.width * format.height * format.framerate(); 231 format.width * format.height * format.framerate();
245 } 232 }
246 233
247 // Get a string presentation in the form of "fourcc width x height x fps" 234 // Get a string presentation in the form of "fourcc width x height x fps"
248 std::string ToString() const; 235 std::string ToString() const;
249 }; 236 };
250 237
251 } // namespace cricket 238 } // namespace cricket
252 239
253 #endif // WEBRTC_MEDIA_BASE_VIDEOCOMMON_H_ // NOLINT 240 #endif // WEBRTC_MEDIA_BASE_VIDEOCOMMON_H_ // NOLINT
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698