OLD | NEW |
---|---|
1 /* | 1 /* |
the sun
2016/11/24 10:36:59
Rename file to i420_buffer.cc
nisse-webrtc
2016/11/25 08:58:03
I think that should be done in this cl if and only
| |
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/common_video/include/video_frame_buffer.h" | 10 #include "webrtc/common_video/include/video_frame_buffer.h" |
11 | 11 |
(...skipping 13 matching lines...) Loading... | |
25 namespace webrtc { | 25 namespace webrtc { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 int I420DataSize(int height, int stride_y, int stride_u, int stride_v) { | 29 int I420DataSize(int height, int stride_y, int stride_u, int stride_v) { |
30 return stride_y * height + (stride_u + stride_v) * ((height + 1) / 2); | 30 return stride_y * height + (stride_u + stride_v) * ((height + 1) / 2); |
31 } | 31 } |
32 | 32 |
33 } // namespace | 33 } // namespace |
34 | 34 |
35 VideoFrameBuffer::~VideoFrameBuffer() {} | |
36 | |
37 I420Buffer::I420Buffer(int width, int height) | 35 I420Buffer::I420Buffer(int width, int height) |
38 : I420Buffer(width, height, width, (width + 1) / 2, (width + 1) / 2) { | 36 : I420Buffer(width, height, width, (width + 1) / 2, (width + 1) / 2) { |
39 } | 37 } |
40 | 38 |
41 I420Buffer::I420Buffer(int width, | 39 I420Buffer::I420Buffer(int width, |
42 int height, | 40 int height, |
43 int stride_y, | 41 int stride_y, |
44 int stride_u, | 42 int stride_u, |
45 int stride_v) | 43 int stride_v) |
46 : width_(width), | 44 : width_(width), |
(...skipping 295 matching lines...) Loading... | |
342 void* WrappedI420Buffer::native_handle() const { | 340 void* WrappedI420Buffer::native_handle() const { |
343 return nullptr; | 341 return nullptr; |
344 } | 342 } |
345 | 343 |
346 rtc::scoped_refptr<VideoFrameBuffer> WrappedI420Buffer::NativeToI420Buffer() { | 344 rtc::scoped_refptr<VideoFrameBuffer> WrappedI420Buffer::NativeToI420Buffer() { |
347 RTC_NOTREACHED(); | 345 RTC_NOTREACHED(); |
348 return nullptr; | 346 return nullptr; |
349 } | 347 } |
350 | 348 |
351 } // namespace webrtc | 349 } // namespace webrtc |
OLD | NEW |