OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 int src_width, int src_height, | 123 int src_width, int src_height, |
124 uint8_t* dst_y, int dst_stride_y, | 124 uint8_t* dst_y, int dst_stride_y, |
125 uint8_t* dst_uv, int dst_stride_uv, | 125 uint8_t* dst_uv, int dst_stride_uv, |
126 int dst_width, int dst_height); | 126 int dst_width, int dst_height); |
127 | 127 |
128 // Helper class for directly converting and scaling NV12 to I420. The Y-plane | 128 // Helper class for directly converting and scaling NV12 to I420. The Y-plane |
129 // will be scaled directly to the I420 destination, which makes this faster | 129 // will be scaled directly to the I420 destination, which makes this faster |
130 // than separate NV12->I420 + I420->I420 scaling. | 130 // than separate NV12->I420 + I420->I420 scaling. |
131 class NV12ToI420Scaler { | 131 class NV12ToI420Scaler { |
132 public: | 132 public: |
133 NV12ToI420Scaler(); | |
134 ~NV12ToI420Scaler(); | |
135 void NV12ToI420Scale(const uint8_t* src_y, int src_stride_y, | 133 void NV12ToI420Scale(const uint8_t* src_y, int src_stride_y, |
136 const uint8_t* src_uv, int src_stride_uv, | 134 const uint8_t* src_uv, int src_stride_uv, |
137 int src_width, int src_height, | 135 int src_width, int src_height, |
138 uint8_t* dst_y, int dst_stride_y, | 136 uint8_t* dst_y, int dst_stride_y, |
139 uint8_t* dst_u, int dst_stride_u, | 137 uint8_t* dst_u, int dst_stride_u, |
140 uint8_t* dst_v, int dst_stride_v, | 138 uint8_t* dst_v, int dst_stride_v, |
141 int dst_width, int dst_height); | 139 int dst_width, int dst_height); |
142 private: | 140 private: |
143 std::vector<uint8_t> tmp_uv_planes_; | 141 std::vector<uint8_t> tmp_uv_planes_; |
144 }; | 142 }; |
145 | 143 |
146 } // namespace webrtc | 144 } // namespace webrtc |
147 | 145 |
148 #endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ | 146 #endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_ |
OLD | NEW |