| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 width, height); | 260 width, height); |
| 261 } | 261 } |
| 262 | 262 |
| 263 // Rotate 180 is a horizontal and vertical flip. | 263 // Rotate 180 is a horizontal and vertical flip. |
| 264 LIBYUV_API | 264 LIBYUV_API |
| 265 void RotateUV180(const uint8* src, int src_stride, | 265 void RotateUV180(const uint8* src, int src_stride, |
| 266 uint8* dst_a, int dst_stride_a, | 266 uint8* dst_a, int dst_stride_a, |
| 267 uint8* dst_b, int dst_stride_b, | 267 uint8* dst_b, int dst_stride_b, |
| 268 int width, int height) { | 268 int width, int height) { |
| 269 int i; | 269 int i; |
| 270 void (*MirrorRowUV)(const uint8* src, uint8* dst_u, uint8* dst_v, int width) = | 270 void (*MirrorUVRow)(const uint8* src, uint8* dst_u, uint8* dst_v, int width) = |
| 271 MirrorUVRow_C; | 271 MirrorUVRow_C; |
| 272 #if defined(HAS_MIRRORUVROW_NEON) | 272 #if defined(HAS_MIRRORUVROW_NEON) |
| 273 if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(width, 8)) { | 273 if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(width, 8)) { |
| 274 MirrorRowUV = MirrorUVRow_NEON; | 274 MirrorUVRow = MirrorUVRow_NEON; |
| 275 } | 275 } |
| 276 #endif | 276 #endif |
| 277 #if defined(HAS_MIRRORROW_UV_SSSE3) | 277 #if defined(HAS_MIRRORUVROW_SSSE3) |
| 278 if (TestCpuFlag(kCpuHasSSSE3) && IS_ALIGNED(width, 16)) { | 278 if (TestCpuFlag(kCpuHasSSSE3) && IS_ALIGNED(width, 16)) { |
| 279 MirrorRowUV = MirrorUVRow_SSSE3; | 279 MirrorUVRow = MirrorUVRow_SSSE3; |
| 280 } | 280 } |
| 281 #endif | 281 #endif |
| 282 #if defined(HAS_MIRRORUVROW_MIPS_DSPR2) | 282 #if defined(HAS_MIRRORUVROW_MIPS_DSPR2) |
| 283 if (TestCpuFlag(kCpuHasMIPS_DSPR2) && | 283 if (TestCpuFlag(kCpuHasMIPS_DSPR2) && |
| 284 IS_ALIGNED(src, 4) && IS_ALIGNED(src_stride, 4)) { | 284 IS_ALIGNED(src, 4) && IS_ALIGNED(src_stride, 4)) { |
| 285 MirrorRowUV = MirrorUVRow_MIPS_DSPR2; | 285 MirrorUVRow = MirrorUVRow_MIPS_DSPR2; |
| 286 } | 286 } |
| 287 #endif | 287 #endif |
| 288 | 288 |
| 289 dst_a += dst_stride_a * (height - 1); | 289 dst_a += dst_stride_a * (height - 1); |
| 290 dst_b += dst_stride_b * (height - 1); | 290 dst_b += dst_stride_b * (height - 1); |
| 291 | 291 |
| 292 for (i = 0; i < height; ++i) { | 292 for (i = 0; i < height; ++i) { |
| 293 MirrorRowUV(src, dst_a, dst_b, width); | 293 MirrorUVRow(src, dst_a, dst_b, width); |
| 294 src += src_stride; | 294 src += src_stride; |
| 295 dst_a -= dst_stride_a; | 295 dst_a -= dst_stride_a; |
| 296 dst_b -= dst_stride_b; | 296 dst_b -= dst_stride_b; |
| 297 } | 297 } |
| 298 } | 298 } |
| 299 | 299 |
| 300 LIBYUV_API | 300 LIBYUV_API |
| 301 int RotatePlane(const uint8* src, int src_stride, | 301 int RotatePlane(const uint8* src, int src_stride, |
| 302 uint8* dst, int dst_stride, | 302 uint8* dst, int dst_stride, |
| 303 int width, int height, | 303 int width, int height, |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 default: | 482 default: |
| 483 break; | 483 break; |
| 484 } | 484 } |
| 485 return -1; | 485 return -1; |
| 486 } | 486 } |
| 487 | 487 |
| 488 #ifdef __cplusplus | 488 #ifdef __cplusplus |
| 489 } // extern "C" | 489 } // extern "C" |
| 490 } // namespace libyuv | 490 } // namespace libyuv |
| 491 #endif | 491 #endif |
| OLD | NEW |