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

Side by Side Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 2469763002: Refactor VideoDenoiser to use a buffer pool, replacing explicit double buffering. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 int crop_width, 107 int crop_width,
108 int crop_height); 108 int crop_height);
109 109
110 // The common case of a center crop, when needed to adjust the 110 // The common case of a center crop, when needed to adjust the
111 // aspect ratio without distorting the image. 111 // aspect ratio without distorting the image.
112 void CropAndScaleFrom(const rtc::scoped_refptr<VideoFrameBuffer>& src); 112 void CropAndScaleFrom(const rtc::scoped_refptr<VideoFrameBuffer>& src);
113 113
114 // Scale all of |src| to the size of |this| buffer, with no cropping. 114 // Scale all of |src| to the size of |this| buffer, with no cropping.
115 void ScaleFrom(const rtc::scoped_refptr<VideoFrameBuffer>& src); 115 void ScaleFrom(const rtc::scoped_refptr<VideoFrameBuffer>& src);
116 116
117 // Create a new buffer with identical strides, and copy the pixel data.
118 static rtc::scoped_refptr<I420Buffer> CopyKeepStride(
119 const rtc::scoped_refptr<VideoFrameBuffer>& buffer);
120
121 // Returns a rotated versions of |src|. Native buffers are not 117 // Returns a rotated versions of |src|. Native buffers are not
122 // supported. The reason this function doesn't return an I420Buffer, 118 // supported. The reason this function doesn't return an I420Buffer,
123 // is that it returns |src| unchanged in case |rotation| is zero. 119 // is that it returns |src| unchanged in case |rotation| is zero.
124 static rtc::scoped_refptr<VideoFrameBuffer> Rotate( 120 static rtc::scoped_refptr<VideoFrameBuffer> Rotate(
125 const rtc::scoped_refptr<VideoFrameBuffer>& src, 121 const rtc::scoped_refptr<VideoFrameBuffer>& src,
126 VideoRotation rotation); 122 VideoRotation rotation);
127 123
128 protected: 124 protected:
129 ~I420Buffer() override; 125 ~I420Buffer() override;
130 126
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 const uint8_t* const v_plane_; 194 const uint8_t* const v_plane_;
199 const int y_stride_; 195 const int y_stride_;
200 const int u_stride_; 196 const int u_stride_;
201 const int v_stride_; 197 const int v_stride_;
202 rtc::Callback0<void> no_longer_used_cb_; 198 rtc::Callback0<void> no_longer_used_cb_;
203 }; 199 };
204 200
205 } // namespace webrtc 201 } // namespace webrtc
206 202
207 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 203 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698