OLD | NEW |
1 // VERSION 2 | 1 // VERSION 2 |
2 /* | 2 /* |
3 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 3 * Copyright 2011 The LibYuv Project Authors. All rights reserved. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license | 5 * Use of this source code is governed by a BSD-style license |
6 * that can be found in the LICENSE file in the root of the source | 6 * that can be found in the LICENSE file in the root of the source |
7 * tree. An additional intellectual property rights grant can be found | 7 * tree. An additional intellectual property rights grant can be found |
8 * in the file PATENTS. All contributing project authors may | 8 * in the file PATENTS. All contributing project authors may |
9 * be found in the AUTHORS file in the root of the source tree. | 9 * be found in the AUTHORS file in the root of the source tree. |
10 */ | 10 */ |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 "por %%xmm1,%%xmm0 \n" | 559 "por %%xmm1,%%xmm0 \n" |
560 "packssdw %%xmm0,%%xmm0 \n" | 560 "packssdw %%xmm0,%%xmm0 \n" |
561 "lea 0x10(%0),%0 \n" | 561 "lea 0x10(%0),%0 \n" |
562 "movq %%xmm0,(%1) \n" | 562 "movq %%xmm0,(%1) \n" |
563 "lea 0x8(%1),%1 \n" | 563 "lea 0x8(%1),%1 \n" |
564 "sub $0x4,%2 \n" | 564 "sub $0x4,%2 \n" |
565 "jg 1b \n" | 565 "jg 1b \n" |
566 : "+r"(src), // %0 | 566 : "+r"(src), // %0 |
567 "+r"(dst), // %1 | 567 "+r"(dst), // %1 |
568 "+r"(pix) // %2 | 568 "+r"(pix) // %2 |
569 : "rm"(dither4) // %3 | 569 : "m"(dither4) // %3 |
570 : "memory", "cc", | 570 : "memory", "cc", |
571 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" | 571 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" |
572 ); | 572 ); |
573 } | 573 } |
574 | 574 |
575 #ifdef HAS_ARGBTORGB565DITHERROW_AVX2 | 575 #ifdef HAS_ARGBTORGB565DITHERROW_AVX2 |
576 void ARGBToRGB565DitherRow_AVX2(const uint8* src, uint8* dst, | 576 void ARGBToRGB565DitherRow_AVX2(const uint8* src, uint8* dst, |
577 const uint32 dither4, int pix) { | 577 const uint32 dither4, int pix) { |
578 asm volatile ( | 578 asm volatile ( |
579 "vbroadcastss %3,%%xmm6 \n" | 579 "vbroadcastss %3,%%xmm6 \n" |
(...skipping 23 matching lines...) Expand all Loading... |
603 "vpermq $0xd8,%%ymm0,%%ymm0 \n" | 603 "vpermq $0xd8,%%ymm0,%%ymm0 \n" |
604 "lea 0x20(%0),%0 \n" | 604 "lea 0x20(%0),%0 \n" |
605 "vmovdqu %%xmm0,(%1) \n" | 605 "vmovdqu %%xmm0,(%1) \n" |
606 "lea 0x10(%1),%1 \n" | 606 "lea 0x10(%1),%1 \n" |
607 "sub $0x8,%2 \n" | 607 "sub $0x8,%2 \n" |
608 "jg 1b \n" | 608 "jg 1b \n" |
609 "vzeroupper \n" | 609 "vzeroupper \n" |
610 : "+r"(src), // %0 | 610 : "+r"(src), // %0 |
611 "+r"(dst), // %1 | 611 "+r"(dst), // %1 |
612 "+r"(pix) // %2 | 612 "+r"(pix) // %2 |
613 : "rm"(dither4) // %3 | 613 : "m"(dither4) // %3 |
614 : "memory", "cc", | 614 : "memory", "cc", |
615 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" | 615 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" |
616 ); | 616 ); |
617 } | 617 } |
618 #endif // HAS_ARGBTORGB565DITHERROW_AVX2 | 618 #endif // HAS_ARGBTORGB565DITHERROW_AVX2 |
619 | 619 |
620 | 620 |
621 void ARGBToARGB1555Row_SSE2(const uint8* src, uint8* dst, int pix) { | 621 void ARGBToARGB1555Row_SSE2(const uint8* src, uint8* dst, int pix) { |
622 asm volatile ( | 622 asm volatile ( |
623 "pcmpeqb %%xmm4,%%xmm4 \n" | 623 "pcmpeqb %%xmm4,%%xmm4 \n" |
(...skipping 4960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5584 ); | 5584 ); |
5585 } | 5585 } |
5586 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 | 5586 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 |
5587 | 5587 |
5588 #endif // defined(__x86_64__) || defined(__i386__) | 5588 #endif // defined(__x86_64__) || defined(__i386__) |
5589 | 5589 |
5590 #ifdef __cplusplus | 5590 #ifdef __cplusplus |
5591 } // extern "C" | 5591 } // extern "C" |
5592 } // namespace libyuv | 5592 } // namespace libyuv |
5593 #endif | 5593 #endif |
OLD | NEW |