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

Side by Side Diff: source/row_gcc.cc

Issue 1461693004: fix for I411 build error on 32 bit x86 (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 5 years, 1 month 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/version.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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 "movq " MEMACCESS([a_buf]) ",%%xmm5 \n" \ 1518 "movq " MEMACCESS([a_buf]) ",%%xmm5 \n" \
1519 "lea " MEMLEA(0x8, [a_buf]) ",%[a_buf] \n" 1519 "lea " MEMLEA(0x8, [a_buf]) ",%[a_buf] \n"
1520 1520
1521 // Read 2 UV from 411, upsample to 8 UV. 1521 // Read 2 UV from 411, upsample to 8 UV.
1522 // reading 4 bytes is an msan violation. 1522 // reading 4 bytes is an msan violation.
1523 // "movd " MEMACCESS([u_buf]) ",%%xmm0 \n" 1523 // "movd " MEMACCESS([u_buf]) ",%%xmm0 \n"
1524 // MEMOPREG(movd, 0x00, [u_buf], [v_buf], 1, xmm1) 1524 // MEMOPREG(movd, 0x00, [u_buf], [v_buf], 1, xmm1)
1525 // pinsrw fails with drmemory 1525 // pinsrw fails with drmemory
1526 // __asm pinsrw xmm0, [esi], 0 /* U */ 1526 // __asm pinsrw xmm0, [esi], 0 /* U */
1527 // __asm pinsrw xmm1, [esi + edi], 0 /* V */ 1527 // __asm pinsrw xmm1, [esi + edi], 0 /* V */
1528 #define READYUV411_EBX \ 1528 #define READYUV411_TEMP \
1529 "movzwl " MEMACCESS([u_buf]) ",%%ebx \n" \ 1529 "movzwl " MEMACCESS([u_buf]) ",%[temp] \n" \
1530 "movd %%ebx,%%xmm0 \n" \ 1530 "movd %[temp],%%xmm0 \n" \
1531 MEMOPREG(movzwl,0x00,[u_buf],[v_buf],1,ebx) " \n" \ 1531 MEMOPARG(movzwl,0x00,[u_buf],[v_buf],1,[temp]) " \n" \
1532 "movd %%ebx,%%xmm1 \n" \ 1532 "movd %[temp],%%xmm1 \n" \
1533 "lea " MEMLEA(0x2, [u_buf]) ",%[u_buf] \n" \ 1533 "lea " MEMLEA(0x2, [u_buf]) ",%[u_buf] \n" \
1534 "punpcklbw %%xmm1,%%xmm0 \n" \ 1534 "punpcklbw %%xmm1,%%xmm0 \n" \
1535 "punpcklwd %%xmm0,%%xmm0 \n" \ 1535 "punpcklwd %%xmm0,%%xmm0 \n" \
1536 "punpckldq %%xmm0,%%xmm0 \n" \ 1536 "punpckldq %%xmm0,%%xmm0 \n" \
1537 "movq " MEMACCESS([y_buf]) ",%%xmm4 \n" \ 1537 "movq " MEMACCESS([y_buf]) ",%%xmm4 \n" \
1538 "punpcklbw %%xmm4,%%xmm4 \n" \ 1538 "punpcklbw %%xmm4,%%xmm4 \n" \
1539 "lea " MEMLEA(0x8, [y_buf]) ",%[y_buf] \n" 1539 "lea " MEMLEA(0x8, [y_buf]) ",%[y_buf] \n"
1540 1540
1541 // Read 4 UV from NV12, upsample to 8 UV 1541 // Read 4 UV from NV12, upsample to 8 UV
1542 #define READNV12 \ 1542 #define READNV12 \
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 ); 1795 );
1796 } 1796 }
1797 #endif // HAS_I422ALPHATOARGBROW_SSSE3 1797 #endif // HAS_I422ALPHATOARGBROW_SSSE3
1798 1798
1799 void OMITFP I411ToARGBRow_SSSE3(const uint8* y_buf, 1799 void OMITFP I411ToARGBRow_SSSE3(const uint8* y_buf,
1800 const uint8* u_buf, 1800 const uint8* u_buf,
1801 const uint8* v_buf, 1801 const uint8* v_buf,
1802 uint8* dst_argb, 1802 uint8* dst_argb,
1803 const struct YuvConstants* yuvconstants, 1803 const struct YuvConstants* yuvconstants,
1804 int width) { 1804 int width) {
1805 int temp = 0;
1805 asm volatile ( 1806 asm volatile (
1806 YUVTORGB_SETUP(yuvconstants) 1807 YUVTORGB_SETUP(yuvconstants)
1807 "sub %[u_buf],%[v_buf] \n" 1808 "sub %[u_buf],%[v_buf] \n"
1808 "pcmpeqb %%xmm5,%%xmm5 \n" 1809 "pcmpeqb %%xmm5,%%xmm5 \n"
1809 LABELALIGN 1810 LABELALIGN
1810 "1: \n" 1811 "1: \n"
1811 READYUV411_EBX 1812 READYUV411_TEMP
1812 YUVTORGB(yuvconstants) 1813 YUVTORGB(yuvconstants)
1813 STOREARGB 1814 STOREARGB
1814 "sub $0x8,%[width] \n" 1815 "sub $0x8,%[width] \n"
1815 "jg 1b \n" 1816 "jg 1b \n"
1816 : [y_buf]"+r"(y_buf), // %[y_buf] 1817 : [y_buf]"+r"(y_buf), // %[y_buf]
1817 [u_buf]"+r"(u_buf), // %[u_buf] 1818 [u_buf]"+r"(u_buf), // %[u_buf]
1818 [v_buf]"+r"(v_buf), // %[v_buf] 1819 [v_buf]"+r"(v_buf), // %[v_buf]
1819 [dst_argb]"+r"(dst_argb), // %[dst_argb] 1820 [dst_argb]"+r"(dst_argb), // %[dst_argb]
1821 [temp]"+r"(temp), // %[temp]
1820 [width]"+rm"(width) // %[width] 1822 [width]"+rm"(width) // %[width]
1821 : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] 1823 : [yuvconstants]"r"(yuvconstants) // %[yuvconstants]
1822 : "memory", "cc", "ebx", NACL_R14 YUVTORGB_REGS 1824 : "memory", "cc", NACL_R14 YUVTORGB_REGS
1823 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" 1825 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
1824 ); 1826 );
1825 } 1827 }
1826 1828
1827 void OMITFP NV12ToARGBRow_SSSE3(const uint8* y_buf, 1829 void OMITFP NV12ToARGBRow_SSSE3(const uint8* y_buf,
1828 const uint8* uv_buf, 1830 const uint8* uv_buf,
1829 uint8* dst_argb, 1831 uint8* dst_argb,
1830 const struct YuvConstants* yuvconstants, 1832 const struct YuvConstants* yuvconstants,
1831 int width) { 1833 int width) {
1832 asm volatile ( 1834 asm volatile (
(...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after
5486 ); 5488 );
5487 } 5489 }
5488 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 5490 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3
5489 5491
5490 #endif // defined(__x86_64__) || defined(__i386__) 5492 #endif // defined(__x86_64__) || defined(__i386__)
5491 5493
5492 #ifdef __cplusplus 5494 #ifdef __cplusplus
5493 } // extern "C" 5495 } // extern "C"
5494 } // namespace libyuv 5496 } // namespace libyuv
5495 #endif 5497 #endif
OLDNEW
« no previous file with comments | « include/libyuv/version.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698