| 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 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2600 NV12ToARGBRow_AVX2(src_y, src_uv, row, yuvconstants, twidth); | 2600 NV12ToARGBRow_AVX2(src_y, src_uv, row, yuvconstants, twidth); |
| 2601 ARGBToRGB565Row_AVX2(row, dst_rgb565, twidth); | 2601 ARGBToRGB565Row_AVX2(row, dst_rgb565, twidth); |
| 2602 src_y += twidth; | 2602 src_y += twidth; |
| 2603 src_uv += twidth; | 2603 src_uv += twidth; |
| 2604 dst_rgb565 += twidth * 2; | 2604 dst_rgb565 += twidth * 2; |
| 2605 width -= twidth; | 2605 width -= twidth; |
| 2606 } | 2606 } |
| 2607 } | 2607 } |
| 2608 #endif | 2608 #endif |
| 2609 | 2609 |
| 2610 #if defined(HAS_YUY2TOARGBROW_AVX2) | |
| 2611 void YUY2ToARGBRow_AVX2(const uint8* src_yuy2, | |
| 2612 uint8* dst_argb, | |
| 2613 struct YuvConstants* yuvconstants, | |
| 2614 int width) { | |
| 2615 // Row buffers for intermediate YUV pixels. | |
| 2616 SIMD_ALIGNED32(uint8 row_y[MAXTWIDTH]); | |
| 2617 SIMD_ALIGNED32(uint8 row_u[MAXTWIDTH / 2]); | |
| 2618 SIMD_ALIGNED32(uint8 row_v[MAXTWIDTH / 2]); | |
| 2619 while (width > 0) { | |
| 2620 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; | |
| 2621 YUY2ToUV422Row_AVX2(src_yuy2, row_u, row_v, twidth); | |
| 2622 YUY2ToYRow_AVX2(src_yuy2, row_y, twidth); | |
| 2623 I422ToARGBRow_AVX2(row_y, row_u, row_v, dst_argb, yuvconstants, twidth); | |
| 2624 src_yuy2 += twidth * 2; | |
| 2625 dst_argb += twidth * 4; | |
| 2626 width -= twidth; | |
| 2627 } | |
| 2628 } | |
| 2629 #endif | |
| 2630 | |
| 2631 #if defined(HAS_UYVYTOARGBROW_AVX2) | |
| 2632 void UYVYToARGBRow_AVX2(const uint8* src_uyvy, | |
| 2633 uint8* dst_argb, | |
| 2634 struct YuvConstants* yuvconstants, | |
| 2635 int width) { | |
| 2636 // Row buffers for intermediate YUV pixels. | |
| 2637 SIMD_ALIGNED32(uint8 row_y[MAXTWIDTH]); | |
| 2638 SIMD_ALIGNED32(uint8 row_u[MAXTWIDTH / 2]); | |
| 2639 SIMD_ALIGNED32(uint8 row_v[MAXTWIDTH / 2]); | |
| 2640 while (width > 0) { | |
| 2641 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; | |
| 2642 UYVYToUV422Row_AVX2(src_uyvy, row_u, row_v, twidth); | |
| 2643 UYVYToYRow_AVX2(src_uyvy, row_y, twidth); | |
| 2644 I422ToARGBRow_AVX2(row_y, row_u, row_v, dst_argb, yuvconstants, twidth); | |
| 2645 src_uyvy += twidth * 2; | |
| 2646 dst_argb += twidth * 4; | |
| 2647 width -= twidth; | |
| 2648 } | |
| 2649 } | |
| 2650 #endif // !defined(LIBYUV_DISABLE_X86) | |
| 2651 | |
| 2652 #ifdef __cplusplus | 2610 #ifdef __cplusplus |
| 2653 } // extern "C" | 2611 } // extern "C" |
| 2654 } // namespace libyuv | 2612 } // namespace libyuv |
| 2655 #endif | 2613 #endif |
| OLD | NEW |