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 <algorithm> | 11 #include <algorithm> |
12 | 12 |
13 #include "webrtc/common_video/include/video_frame_buffer.h" | 13 #include "webrtc/common_video/include/video_frame_buffer.h" |
14 | 14 |
15 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
16 #include "webrtc/base/keep_ref_until_done.h" | 16 #include "webrtc/base/keep_ref_until_done.h" |
17 #include "libyuv/convert.h" | 17 #include "libyuv/convert.h" |
| 18 #include "libyuv/planar_functions.h" |
18 #include "libyuv/scale.h" | 19 #include "libyuv/scale.h" |
19 | 20 |
20 // Aligning pointer to 64 bytes for improved performance, e.g. use SIMD. | 21 // Aligning pointer to 64 bytes for improved performance, e.g. use SIMD. |
21 static const int kBufferAlignment = 64; | 22 static const int kBufferAlignment = 64; |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 | 25 |
25 namespace { | 26 namespace { |
26 | 27 |
27 int I420DataSize(int height, int stride_y, int stride_u, int stride_v) { | 28 int I420DataSize(int height, int stride_y, int stride_u, int stride_v) { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 void* WrappedI420Buffer::native_handle() const { | 338 void* WrappedI420Buffer::native_handle() const { |
338 return nullptr; | 339 return nullptr; |
339 } | 340 } |
340 | 341 |
341 rtc::scoped_refptr<VideoFrameBuffer> WrappedI420Buffer::NativeToI420Buffer() { | 342 rtc::scoped_refptr<VideoFrameBuffer> WrappedI420Buffer::NativeToI420Buffer() { |
342 RTC_NOTREACHED(); | 343 RTC_NOTREACHED(); |
343 return nullptr; | 344 return nullptr; |
344 } | 345 } |
345 | 346 |
346 } // namespace webrtc | 347 } // namespace webrtc |
OLD | NEW |