OLD | NEW |
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 |
11 #include "webrtc/common_video/interface/video_frame_buffer.h" | 11 #include "webrtc/common_video/include/video_frame_buffer.h" |
12 | 12 |
13 #include "webrtc/base/bind.h" | 13 #include "webrtc/base/bind.h" |
14 #include "webrtc/base/checks.h" | 14 #include "webrtc/base/checks.h" |
15 | 15 |
16 // Aligning pointer to 64 bytes for improved performance, e.g. use SIMD. | 16 // Aligning pointer to 64 bytes for improved performance, e.g. use SIMD. |
17 static const int kBufferAlignment = 64; | 17 static const int kBufferAlignment = 64; |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 namespace { | 20 namespace { |
21 | 21 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 buffer->stride(kVPlane) * uv_offset_y + uv_offset_x; | 235 buffer->stride(kVPlane) * uv_offset_y + uv_offset_x; |
236 return new rtc::RefCountedObject<WrappedI420Buffer>( | 236 return new rtc::RefCountedObject<WrappedI420Buffer>( |
237 cropped_width, cropped_height, | 237 cropped_width, cropped_height, |
238 y_plane, buffer->stride(kYPlane), | 238 y_plane, buffer->stride(kYPlane), |
239 u_plane, buffer->stride(kUPlane), | 239 u_plane, buffer->stride(kUPlane), |
240 v_plane, buffer->stride(kVPlane), | 240 v_plane, buffer->stride(kVPlane), |
241 rtc::Bind(&NoLongerUsedCallback, buffer)); | 241 rtc::Bind(&NoLongerUsedCallback, buffer)); |
242 } | 242 } |
243 | 243 |
244 } // namespace webrtc | 244 } // namespace webrtc |
OLD | NEW |