Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: source/row_gcc.cc

Issue 1348763005: port I444 to ARGB to matrix (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/libyuv/row.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 "pcmpeqb %%xmm5,%%xmm5 \n" \ 1577 "pcmpeqb %%xmm5,%%xmm5 \n" \
1578 "punpcklbw %%xmm2,%%xmm1 \n" \ 1578 "punpcklbw %%xmm2,%%xmm1 \n" \
1579 "punpcklbw %%xmm0,%%xmm5 \n" \ 1579 "punpcklbw %%xmm0,%%xmm5 \n" \
1580 "movdqa %%xmm5,%%xmm0 \n" \ 1580 "movdqa %%xmm5,%%xmm0 \n" \
1581 "punpcklwd %%xmm1,%%xmm5 \n" \ 1581 "punpcklwd %%xmm1,%%xmm5 \n" \
1582 "punpckhwd %%xmm1,%%xmm0 \n" \ 1582 "punpckhwd %%xmm1,%%xmm0 \n" \
1583 "movdqu %%xmm5," MEMACCESS([dst_rgba]) " \n" \ 1583 "movdqu %%xmm5," MEMACCESS([dst_rgba]) " \n" \
1584 "movdqu %%xmm0," MEMACCESS2(0x10, [dst_rgba]) " \n" \ 1584 "movdqu %%xmm0," MEMACCESS2(0x10, [dst_rgba]) " \n" \
1585 "lea " MEMLEA(0x20, [dst_rgba]) ",%[dst_rgba] \n" 1585 "lea " MEMLEA(0x20, [dst_rgba]) ",%[dst_rgba] \n"
1586 1586
1587 void OMITFP I444ToARGBRow_SSSE3(const uint8* y_buf, 1587 void OMITFP I444ToARGBMatrixRow_SSSE3(const uint8* y_buf,
1588 const uint8* u_buf, 1588 const uint8* u_buf,
1589 const uint8* v_buf, 1589 const uint8* v_buf,
1590 uint8* dst_argb, 1590 uint8* dst_argb,
1591 int width) { 1591 struct YuvConstants* YuvConstants,
1592 int width) {
1592 asm volatile ( 1593 asm volatile (
1593 "sub %[u_buf],%[v_buf] \n" 1594 "sub %[u_buf],%[v_buf] \n"
1594 "pcmpeqb %%xmm5,%%xmm5 \n" 1595 "pcmpeqb %%xmm5,%%xmm5 \n"
1595 LABELALIGN 1596 LABELALIGN
1596 "1: \n" 1597 "1: \n"
1597 READYUV444 1598 READYUV444
1598 YUVTORGB(kYuvConstants) 1599 YUVTORGB(YuvConstants)
1599 STOREARGB 1600 STOREARGB
1600 "sub $0x8,%[width] \n" 1601 "sub $0x8,%[width] \n"
1601 "jg 1b \n" 1602 "jg 1b \n"
1602 : [y_buf]"+r"(y_buf), // %[y_buf] 1603 : [y_buf]"+r"(y_buf), // %[y_buf]
1603 [u_buf]"+r"(u_buf), // %[u_buf] 1604 [u_buf]"+r"(u_buf), // %[u_buf]
1604 [v_buf]"+r"(v_buf), // %[v_buf] 1605 [v_buf]"+r"(v_buf), // %[v_buf]
1605 [dst_argb]"+r"(dst_argb), // %[dst_argb] 1606 [dst_argb]"+r"(dst_argb), // %[dst_argb]
1606 [width]"+rm"(width) // %[width] 1607 [width]"+rm"(width) // %[width]
1607 : [kYuvConstants]"r"(&kYuvConstants.kUVToB) // %[kYuvConstants] 1608 : [YuvConstants]"r"(YuvConstants) // %[kYuvConstants]
1608 : "memory", "cc", NACL_R14 1609 : "memory", "cc", NACL_R14
1609 "xmm0", "xmm1", "xmm2", "xmm3", "xmm5" 1610 "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"
1610 ); 1611 );
1612 }
1613
1614 void OMITFP I444ToABGRMatrixRow_SSSE3(const uint8* y_buf,
1615 const uint8* u_buf,
1616 const uint8* v_buf,
1617 uint8* dst_abgr,
1618 struct YuvConstants* YuvConstants,
1619 int width) {
1620 asm volatile (
1621 "sub %[u_buf],%[v_buf] \n"
1622 "pcmpeqb %%xmm5,%%xmm5 \n"
1623 LABELALIGN
1624 "1: \n"
1625 READYUV444
1626 YUVTORGB(YuvConstants)
1627 STOREABGR
1628 "sub $0x8,%[width] \n"
1629 "jg 1b \n"
1630 : [y_buf]"+r"(y_buf), // %[y_buf]
1631 [u_buf]"+r"(u_buf), // %[u_buf]
1632 [v_buf]"+r"(v_buf), // %[v_buf]
1633 [dst_abgr]"+r"(dst_abgr), // %[dst_abgr]
1634 [width]"+rm"(width) // %[width]
1635 : [YuvConstants]"r"(YuvConstants) // %[kYuvConstants]
1636 : "memory", "cc", NACL_R14
1637 "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"
1638 );
1611 } 1639 }
1612 1640
1613 // TODO(fbarchard): Consider putting masks into constants. 1641 // TODO(fbarchard): Consider putting masks into constants.
1614 void OMITFP I422ToRGB24Row_SSSE3(const uint8* y_buf, 1642 void OMITFP I422ToRGB24Row_SSSE3(const uint8* y_buf,
1615 const uint8* u_buf, 1643 const uint8* u_buf,
1616 const uint8* v_buf, 1644 const uint8* v_buf,
1617 uint8* dst_rgb24, 1645 uint8* dst_rgb24,
1618 int width) { 1646 int width) {
1619 asm volatile ( 1647 asm volatile (
1620 "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" 1648 "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 const uint8* v_buf, 1732 const uint8* v_buf,
1705 uint8* dst_argb, 1733 uint8* dst_argb,
1706 struct YuvConstants* YuvConstants, 1734 struct YuvConstants* YuvConstants,
1707 int width) { 1735 int width) {
1708 asm volatile ( 1736 asm volatile (
1709 "sub %[u_buf],%[v_buf] \n" 1737 "sub %[u_buf],%[v_buf] \n"
1710 "pcmpeqb %%xmm5,%%xmm5 \n" 1738 "pcmpeqb %%xmm5,%%xmm5 \n"
1711 LABELALIGN 1739 LABELALIGN
1712 "1: \n" 1740 "1: \n"
1713 READYUV422 1741 READYUV422
1714 YUVTORGB(kYuvConstants) 1742 YUVTORGB(YuvConstants)
1715 STOREARGB 1743 STOREARGB
1716 "sub $0x8,%[width] \n" 1744 "sub $0x8,%[width] \n"
1717 "jg 1b \n" 1745 "jg 1b \n"
1718 : [y_buf]"+r"(y_buf), // %[y_buf] 1746 : [y_buf]"+r"(y_buf), // %[y_buf]
1719 [u_buf]"+r"(u_buf), // %[u_buf] 1747 [u_buf]"+r"(u_buf), // %[u_buf]
1720 [v_buf]"+r"(v_buf), // %[v_buf] 1748 [v_buf]"+r"(v_buf), // %[v_buf]
1721 [dst_argb]"+r"(dst_argb), // %[dst_argb] 1749 [dst_argb]"+r"(dst_argb), // %[dst_argb]
1722 [width]"+rm"(width) // %[width] 1750 [width]"+rm"(width) // %[width]
1723 : [kYuvConstants]"r"(YuvConstants) // %[kYuvConstants] 1751 : [YuvConstants]"r"(YuvConstants) // %[kYuvConstants]
1724 : "memory", "cc", NACL_R14 1752 : "memory", "cc", NACL_R14
1725 "xmm0", "xmm1", "xmm2", "xmm3", "xmm5" 1753 "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"
1726 ); 1754 );
1727 } 1755 }
1728 1756
1729 void OMITFP I411ToARGBRow_SSSE3(const uint8* y_buf, 1757 void OMITFP I411ToARGBRow_SSSE3(const uint8* y_buf,
1730 const uint8* u_buf, 1758 const uint8* u_buf,
1731 const uint8* v_buf, 1759 const uint8* v_buf,
1732 uint8* dst_argb, 1760 uint8* dst_argb,
1733 int width) { 1761 int width) {
(...skipping 3615 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 ); 5377 );
5350 } 5378 }
5351 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 5379 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3
5352 5380
5353 #endif // defined(__x86_64__) || defined(__i386__) 5381 #endif // defined(__x86_64__) || defined(__i386__)
5354 5382
5355 #ifdef __cplusplus 5383 #ifdef __cplusplus
5356 } // extern "C" 5384 } // extern "C"
5357 } // namespace libyuv 5385 } // namespace libyuv
5358 #endif 5386 #endif
OLDNEW
« no previous file with comments | « include/libyuv/row.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698