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

Side by Side Diff: source/scale_gcc.cc

Issue 2091913003: make count a memory variable for 32 bit (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 4 years, 6 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 | « no previous file | 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 /* 1 /*
2 * Copyright 2013 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2013 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 "paddusb %%xmm7,%%xmm1 \n" 871 "paddusb %%xmm7,%%xmm1 \n"
872 "pmaddubsw %%xmm0,%%xmm1 \n" 872 "pmaddubsw %%xmm0,%%xmm1 \n"
873 "pextrw $0x1,%%xmm2,%k3 \n" 873 "pextrw $0x1,%%xmm2,%k3 \n"
874 "pextrw $0x3,%%xmm2,%k4 \n" 874 "pextrw $0x3,%%xmm2,%k4 \n"
875 "paddw %9,%%xmm1 \n" // make pixels unsigned. 875 "paddw %9,%%xmm1 \n" // make pixels unsigned.
876 "psrlw $0x7,%%xmm1 \n" 876 "psrlw $0x7,%%xmm1 \n"
877 "packuswb %%xmm1,%%xmm1 \n" 877 "packuswb %%xmm1,%%xmm1 \n"
878 "movd %%xmm1,%k2 \n" 878 "movd %%xmm1,%k2 \n"
879 "mov %w2," MEMACCESS(0) " \n" 879 "mov %w2," MEMACCESS(0) " \n"
880 "lea " MEMLEA(0x2,0) ",%0 \n" 880 "lea " MEMLEA(0x2,0) ",%0 \n"
881 "sub $0x2,%5 \n" 881 "subl $0x2,%5 \n"
882 "jge 2b \n" 882 "jge 2b \n"
883 883
884 LABELALIGN 884 LABELALIGN
885 "29: \n" 885 "29: \n"
886 "addl $0x1,%5 \n" 886 "addl $0x1,%5 \n"
887 "jl 99f \n" 887 "jl 99f \n"
888 MEMOPARG(movzwl,0x00,1,3,1,k2) // movzwl (%1,%3,1),%k2 888 MEMOPARG(movzwl,0x00,1,3,1,k2) // movzwl (%1,%3,1),%k2
889 "movd %k2,%%xmm0 \n" 889 "movd %k2,%%xmm0 \n"
890 "psrlw $0x9,%%xmm2 \n" 890 "psrlw $0x9,%%xmm2 \n"
891 "pshufb %%xmm5,%%xmm2 \n" 891 "pshufb %%xmm5,%%xmm2 \n"
892 "psubb %8,%%xmm0 \n" // make pixels signed. 892 "psubb %8,%%xmm0 \n" // make pixels signed.
893 "pxor %%xmm6,%%xmm2 \n" 893 "pxor %%xmm6,%%xmm2 \n"
894 "paddusb %%xmm7,%%xmm2 \n" 894 "paddusb %%xmm7,%%xmm2 \n"
895 "pmaddubsw %%xmm0,%%xmm2 \n" 895 "pmaddubsw %%xmm0,%%xmm2 \n"
896 "paddw %9,%%xmm2 \n" // make pixels unsigned. 896 "paddw %9,%%xmm2 \n" // make pixels unsigned.
897 "psrlw $0x7,%%xmm2 \n" 897 "psrlw $0x7,%%xmm2 \n"
898 "packuswb %%xmm2,%%xmm2 \n" 898 "packuswb %%xmm2,%%xmm2 \n"
899 "movd %%xmm2,%k2 \n" 899 "movd %%xmm2,%k2 \n"
900 "mov %b2," MEMACCESS(0) " \n" 900 "mov %b2," MEMACCESS(0) " \n"
901 "99: \n" 901 "99: \n"
902 : "+r"(dst_ptr), // %0 902 : "+r"(dst_ptr), // %0
903 "+r"(src_ptr), // %1 903 "+r"(src_ptr), // %1
904 "=&a"(temp_pixel), // %2 904 "=&a"(temp_pixel), // %2
905 "=&r"(x0), // %3 905 "=&r"(x0), // %3
906 "=&r"(x1), // %4 906 "=&r"(x1), // %4
907 #if defined(__x86_64__)
907 "+rm"(dst_width) // %5 908 "+rm"(dst_width) // %5
909 #else
910 "+m"(dst_width) // %5
911 #endif
908 : "rm"(x), // %6 912 : "rm"(x), // %6
909 "rm"(dx), // %7 913 "rm"(dx), // %7
910 #if defined(__x86_64__) 914 #if defined(__x86_64__)
911 "x"(kFsub80), // %8 915 "x"(kFsub80), // %8
912 "x"(kFadd40) // %9 916 "x"(kFadd40) // %9
913 #else 917 #else
914 "m"(kFsub80), // %8 918 "m"(kFsub80), // %8
915 "m"(kFadd40) // %9 919 "m"(kFadd40) // %9
916 #endif 920 #endif
917 : "memory", "cc", NACL_R14 921 : "memory", "cc", NACL_R14
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 ); 1313 );
1310 return num; 1314 return num;
1311 } 1315 }
1312 1316
1313 #endif // defined(__x86_64__) || defined(__i386__) 1317 #endif // defined(__x86_64__) || defined(__i386__)
1314 1318
1315 #ifdef __cplusplus 1319 #ifdef __cplusplus
1316 } // extern "C" 1320 } // extern "C"
1317 } // namespace libyuv 1321 } // namespace libyuv
1318 #endif 1322 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698