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

Side by Side Diff: webrtc/api/video/i420_buffer.cc

Issue 2622263002: Delete deprecated and transitional stuff related to video frame refactoring. (Closed)
Patch Set: Fix include order. Add dependency in api/video_codecs/BUILD.gn. Created 3 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
« no previous file with comments | « webrtc/api/video/i420_buffer.h ('k') | webrtc/api/video/video_frame.h » ('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 #include "webrtc/api/video/i420_buffer.h" 10 #include "webrtc/api/video/i420_buffer.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 src.DataU(), src.StrideU(), 124 src.DataU(), src.StrideU(),
125 src.DataV(), src.StrideV(), 125 src.DataV(), src.StrideV(),
126 buffer->MutableDataY(), buffer->StrideY(), buffer->MutableDataU(), 126 buffer->MutableDataY(), buffer->StrideY(), buffer->MutableDataU(),
127 buffer->StrideU(), buffer->MutableDataV(), buffer->StrideV(), 127 buffer->StrideU(), buffer->MutableDataV(), buffer->StrideV(),
128 src.width(), src.height(), 128 src.width(), src.height(),
129 static_cast<libyuv::RotationMode>(rotation))); 129 static_cast<libyuv::RotationMode>(rotation)));
130 130
131 return buffer; 131 return buffer;
132 } 132 }
133 133
134 // static
135 rtc::scoped_refptr<VideoFrameBuffer> I420Buffer::Rotate(
136 rtc::scoped_refptr<VideoFrameBuffer> src,
137 VideoRotation rotation) {
138 if (rotation == webrtc::kVideoRotation_0) {
139 return src;
140 } else {
141 return Rotate(*src, rotation);
142 }
143 }
144
145 void I420Buffer::InitializeData() { 134 void I420Buffer::InitializeData() {
146 memset(data_.get(), 0, 135 memset(data_.get(), 0,
147 I420DataSize(height_, stride_y_, stride_u_, stride_v_)); 136 I420DataSize(height_, stride_y_, stride_u_, stride_v_));
148 } 137 }
149 138
150 int I420Buffer::width() const { 139 int I420Buffer::width() const {
151 return width_; 140 return width_;
152 } 141 }
153 142
154 int I420Buffer::height() const { 143 int I420Buffer::height() const {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 src, 239 src,
251 (src.width() - crop_width) / 2, (src.height() - crop_height) / 2, 240 (src.width() - crop_width) / 2, (src.height() - crop_height) / 2,
252 crop_width, crop_height); 241 crop_width, crop_height);
253 } 242 }
254 243
255 void I420Buffer::ScaleFrom(const VideoFrameBuffer& src) { 244 void I420Buffer::ScaleFrom(const VideoFrameBuffer& src) {
256 CropAndScaleFrom(src, 0, 0, src.width(), src.height()); 245 CropAndScaleFrom(src, 0, 0, src.width(), src.height());
257 } 246 }
258 247
259 } // namespace webrtc 248 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/video/i420_buffer.h ('k') | webrtc/api/video/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698