OLD | NEW |
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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 "movdqa %%xmm2,%%xmm1 \n" | 860 "movdqa %%xmm2,%%xmm1 \n" |
861 "paddd %%xmm3,%%xmm2 \n" | 861 "paddd %%xmm3,%%xmm2 \n" |
862 MEMOPARG(movzwl,0x00,1,3,1,k2) // movzwl (%1,%3,1),%k2 | 862 MEMOPARG(movzwl,0x00,1,3,1,k2) // movzwl (%1,%3,1),%k2 |
863 "movd %k2,%%xmm0 \n" | 863 "movd %k2,%%xmm0 \n" |
864 "psrlw $0x9,%%xmm1 \n" | 864 "psrlw $0x9,%%xmm1 \n" |
865 MEMOPARG(movzwl,0x00,1,4,1,k2) // movzwl (%1,%4,1),%k2 | 865 MEMOPARG(movzwl,0x00,1,4,1,k2) // movzwl (%1,%4,1),%k2 |
866 "movd %k2,%%xmm4 \n" | 866 "movd %k2,%%xmm4 \n" |
867 "pshufb %%xmm5,%%xmm1 \n" | 867 "pshufb %%xmm5,%%xmm1 \n" |
868 "punpcklwd %%xmm4,%%xmm0 \n" | 868 "punpcklwd %%xmm4,%%xmm0 \n" |
869 "psubb %8,%%xmm0 \n" // make pixels signed. | 869 "psubb %8,%%xmm0 \n" // make pixels signed. |
870 "pxor %%xmm6,%%xmm1 \n" // 128 -f = (f ^ 127 ) + 1 | 870 "pxor %%xmm6,%%xmm1 \n" // 128 - f = (f ^ 127 ) + 1 |
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" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 ); | 1313 ); |
1314 return num; | 1314 return num; |
1315 } | 1315 } |
1316 | 1316 |
1317 #endif // defined(__x86_64__) || defined(__i386__) | 1317 #endif // defined(__x86_64__) || defined(__i386__) |
1318 | 1318 |
1319 #ifdef __cplusplus | 1319 #ifdef __cplusplus |
1320 } // extern "C" | 1320 } // extern "C" |
1321 } // namespace libyuv | 1321 } // namespace libyuv |
1322 #endif | 1322 #endif |
OLD | NEW |