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 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2588 void NV12ToRGB565Row_AVX2(const uint8* src_y, | 2588 void NV12ToRGB565Row_AVX2(const uint8* src_y, |
2589 const uint8* src_uv, | 2589 const uint8* src_uv, |
2590 uint8* dst_rgb565, | 2590 uint8* dst_rgb565, |
2591 const struct YuvConstants* yuvconstants, | 2591 const struct YuvConstants* yuvconstants, |
2592 int width) { | 2592 int width) { |
2593 // Row buffer for intermediate ARGB pixels. | 2593 // Row buffer for intermediate ARGB pixels. |
2594 SIMD_ALIGNED32(uint8 row[MAXTWIDTH * 4]); | 2594 SIMD_ALIGNED32(uint8 row[MAXTWIDTH * 4]); |
2595 while (width > 0) { | 2595 while (width > 0) { |
2596 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; | 2596 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; |
2597 NV12ToARGBRow_AVX2(src_y, src_uv, row, yuvconstants, twidth); | 2597 NV12ToARGBRow_AVX2(src_y, src_uv, row, yuvconstants, twidth); |
| 2598 #if defined(HAS_ARGBTORGB565ROW_AVX2) |
2598 ARGBToRGB565Row_AVX2(row, dst_rgb565, twidth); | 2599 ARGBToRGB565Row_AVX2(row, dst_rgb565, twidth); |
| 2600 #else |
| 2601 ARGBToRGB565Row_SSE2(row, dst_rgb565, twidth); |
| 2602 #endif |
2599 src_y += twidth; | 2603 src_y += twidth; |
2600 src_uv += twidth; | 2604 src_uv += twidth; |
2601 dst_rgb565 += twidth * 2; | 2605 dst_rgb565 += twidth * 2; |
2602 width -= twidth; | 2606 width -= twidth; |
2603 } | 2607 } |
2604 } | 2608 } |
2605 #endif | 2609 #endif |
2606 | 2610 |
2607 #ifdef __cplusplus | 2611 #ifdef __cplusplus |
2608 } // extern "C" | 2612 } // extern "C" |
2609 } // namespace libyuv | 2613 } // namespace libyuv |
2610 #endif | 2614 #endif |
OLD | NEW |