OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 CopyRow(src + src_stride_0, dst + dst_stride, width); | 220 CopyRow(src + src_stride_0, dst + dst_stride, width); |
221 src += src_stride_0 + src_stride_1; | 221 src += src_stride_0 + src_stride_1; |
222 dst += dst_stride * 2; | 222 dst += dst_stride * 2; |
223 } | 223 } |
224 if (height & 1) { | 224 if (height & 1) { |
225 CopyRow(src, dst, width); | 225 CopyRow(src, dst, width); |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 // Support function for NV12 etc UV channels. | 229 // Support function for NV12 etc UV channels. |
230 // Width and height are plane sizes (typically half pixel width) | 230 // Width and height are plane sizes (typically half pixel width). |
231 static void SplitPlane(const uint8* src_uv, int src_stride_uv, | 231 static void SplitPlane(const uint8* src_uv, int src_stride_uv, |
232 uint8* dst_u, int dst_stride_u, | 232 uint8* dst_u, int dst_stride_u, |
233 uint8* dst_v, int dst_stride_v, | 233 uint8* dst_v, int dst_stride_v, |
234 int width, int height) { | 234 int width, int height) { |
235 int y; | 235 int y; |
236 void (*SplitUVRow)(const uint8* src_uv, uint8* dst_u, uint8* dst_v, | 236 void (*SplitUVRow)(const uint8* src_uv, uint8* dst_u, uint8* dst_v, |
237 int width) = SplitUVRow_C; | 237 int width) = SplitUVRow_C; |
238 // Negative height means invert the image. | 238 // Negative height means invert the image. |
239 if (height < 0) { | 239 if (height < 0) { |
240 height = -height; | 240 height = -height; |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1524 dst_u += dst_stride_u; | 1524 dst_u += dst_stride_u; |
1525 dst_v += dst_stride_v; | 1525 dst_v += dst_stride_v; |
1526 } | 1526 } |
1527 return 0; | 1527 return 0; |
1528 } | 1528 } |
1529 | 1529 |
1530 #ifdef __cplusplus | 1530 #ifdef __cplusplus |
1531 } // extern "C" | 1531 } // extern "C" |
1532 } // namespace libyuv | 1532 } // namespace libyuv |
1533 #endif | 1533 #endif |
OLD | NEW |