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 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3525 lea edx, [edx + 64] | 3525 lea edx, [edx + 64] |
3526 sub ecx, 16 | 3526 sub ecx, 16 |
3527 jg convertloop | 3527 jg convertloop |
3528 | 3528 |
3529 vzeroupper | 3529 vzeroupper |
3530 ret | 3530 ret |
3531 } | 3531 } |
3532 } | 3532 } |
3533 #endif // HAS_ARGBCOPYALPHAROW_AVX2 | 3533 #endif // HAS_ARGBCOPYALPHAROW_AVX2 |
3534 | 3534 |
| 3535 #ifdef HAS_ARGBEXTRACTALPHAROW_SSE2 |
| 3536 // width in pixels |
| 3537 __declspec(naked) |
| 3538 void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width) { |
| 3539 __asm { |
| 3540 mov eax, [esp + 4] // src_argb |
| 3541 mov edx, [esp + 8] // dst_a |
| 3542 mov ecx, [esp + 12] // width |
| 3543 |
| 3544 extractloop: |
| 3545 movdqu xmm0, [eax] |
| 3546 movdqu xmm1, [eax + 16] |
| 3547 lea eax, [eax + 32] |
| 3548 psrld xmm0, 24 |
| 3549 psrld xmm1, 24 |
| 3550 packssdw xmm0, xmm1 |
| 3551 packuswb xmm0, xmm0 |
| 3552 movq qword ptr [edx], xmm0 |
| 3553 lea edx, [edx + 8] |
| 3554 sub ecx, 8 |
| 3555 jg extractloop |
| 3556 |
| 3557 ret |
| 3558 } |
| 3559 } |
| 3560 #endif // HAS_ARGBEXTRACTALPHAROW_SSE2 |
| 3561 |
3535 #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2 | 3562 #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2 |
3536 // width in pixels | 3563 // width in pixels |
3537 __declspec(naked) | 3564 __declspec(naked) |
3538 void ARGBCopyYToAlphaRow_SSE2(const uint8* src, uint8* dst, int width) { | 3565 void ARGBCopyYToAlphaRow_SSE2(const uint8* src, uint8* dst, int width) { |
3539 __asm { | 3566 __asm { |
3540 mov eax, [esp + 4] // src | 3567 mov eax, [esp + 4] // src |
3541 mov edx, [esp + 8] // dst | 3568 mov edx, [esp + 8] // dst |
3542 mov ecx, [esp + 12] // count | 3569 mov ecx, [esp + 12] // count |
3543 pcmpeqb xmm0, xmm0 // generate mask 0xff000000 | 3570 pcmpeqb xmm0, xmm0 // generate mask 0xff000000 |
3544 pslld xmm0, 24 | 3571 pslld xmm0, 24 |
(...skipping 2687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6232 } | 6259 } |
6233 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 | 6260 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 |
6234 | 6261 |
6235 #endif // defined(_M_X64) | 6262 #endif // defined(_M_X64) |
6236 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) | 6263 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) |
6237 | 6264 |
6238 #ifdef __cplusplus | 6265 #ifdef __cplusplus |
6239 } // extern "C" | 6266 } // extern "C" |
6240 } // namespace libyuv | 6267 } // namespace libyuv |
6241 #endif | 6268 #endif |
OLD | NEW |