OLD | NEW |
1 ; | 1 ; |
2 ; jfmmxint.asm - accurate integer FDCT (MMX) | 2 ; jfmmxint.asm - accurate integer FDCT (MMX) |
3 ; | 3 ; |
4 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB | 4 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB |
5 ; | 5 ; |
6 ; Based on | 6 ; Based on |
7 ; x86 SIMD extension for IJG JPEG library | 7 ; x86 SIMD extension for IJG JPEG library |
8 ; Copyright (C) 1999-2006, MIYASAKA Masaru. | 8 ; Copyright (C) 1999-2006, MIYASAKA Masaru. |
9 ; For conditions of distribution and use, see copyright notice in jsimdext.inc | 9 ; For conditions of distribution and use, see copyright notice in jsimdext.inc |
10 ; | 10 ; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560) | 59 F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560) |
60 F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869) | 60 F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869) |
61 F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447) | 61 F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447) |
62 F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026) | 62 F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026) |
63 %endif | 63 %endif |
64 | 64 |
65 ; -------------------------------------------------------------------------- | 65 ; -------------------------------------------------------------------------- |
66 SECTION SEG_CONST | 66 SECTION SEG_CONST |
67 | 67 |
68 alignz 16 | 68 alignz 16 |
69 » global» EXTN(jconst_fdct_islow_mmx) | 69 » global» EXTN(jconst_fdct_islow_mmx) PRIVATE |
70 | 70 |
71 EXTN(jconst_fdct_islow_mmx): | 71 EXTN(jconst_fdct_islow_mmx): |
72 | 72 |
73 PW_F130_F054 times 2 dw (F_0_541+F_0_765), F_0_541 | 73 PW_F130_F054 times 2 dw (F_0_541+F_0_765), F_0_541 |
74 PW_F054_MF130 times 2 dw F_0_541, (F_0_541-F_1_847) | 74 PW_F054_MF130 times 2 dw F_0_541, (F_0_541-F_1_847) |
75 PW_MF078_F117 times 2 dw (F_1_175-F_1_961), F_1_175 | 75 PW_MF078_F117 times 2 dw (F_1_175-F_1_961), F_1_175 |
76 PW_F117_F078 times 2 dw F_1_175, (F_1_175-F_0_390) | 76 PW_F117_F078 times 2 dw F_1_175, (F_1_175-F_0_390) |
77 PW_MF060_MF089 times 2 dw (F_0_298-F_0_899),-F_0_899 | 77 PW_MF060_MF089 times 2 dw (F_0_298-F_0_899),-F_0_899 |
78 PW_MF089_F060 times 2 dw -F_0_899, (F_1_501-F_0_899) | 78 PW_MF089_F060 times 2 dw -F_0_899, (F_1_501-F_0_899) |
79 PW_MF050_MF256 times 2 dw (F_2_053-F_2_562),-F_2_562 | 79 PW_MF050_MF256 times 2 dw (F_2_053-F_2_562),-F_2_562 |
(...skipping 14 matching lines...) Expand all Loading... |
94 ; jsimd_fdct_islow_mmx (DCTELEM * data) | 94 ; jsimd_fdct_islow_mmx (DCTELEM * data) |
95 ; | 95 ; |
96 | 96 |
97 %define data(b) (b)+8 ; DCTELEM * data | 97 %define data(b) (b)+8 ; DCTELEM * data |
98 | 98 |
99 %define original_ebp ebp+0 | 99 %define original_ebp ebp+0 |
100 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] | 100 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] |
101 %define WK_NUM 2 | 101 %define WK_NUM 2 |
102 | 102 |
103 align 16 | 103 align 16 |
104 » global» EXTN(jsimd_fdct_islow_mmx) | 104 » global» EXTN(jsimd_fdct_islow_mmx) PRIVATE |
105 | 105 |
106 EXTN(jsimd_fdct_islow_mmx): | 106 EXTN(jsimd_fdct_islow_mmx): |
107 push ebp | 107 push ebp |
108 mov eax,esp ; eax = original ebp | 108 mov eax,esp ; eax = original ebp |
109 sub esp, byte 4 | 109 sub esp, byte 4 |
110 and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits | 110 and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits |
111 mov [esp],eax | 111 mov [esp],eax |
112 mov ebp,esp ; ebp = aligned ebp | 112 mov ebp,esp ; ebp = aligned ebp |
113 lea esp, [wk(0)] | 113 lea esp, [wk(0)] |
114 pushpic ebx | 114 pushpic ebx |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 ; pop ecx ; need not be preserved | 613 ; pop ecx ; need not be preserved |
614 poppic ebx | 614 poppic ebx |
615 mov esp,ebp ; esp <- aligned ebp | 615 mov esp,ebp ; esp <- aligned ebp |
616 pop esp ; esp <- original ebp | 616 pop esp ; esp <- original ebp |
617 pop ebp | 617 pop ebp |
618 ret | 618 ret |
619 | 619 |
620 ; For some reason, the OS X linker does not honor the request to align the | 620 ; For some reason, the OS X linker does not honor the request to align the |
621 ; segment unless we do this. | 621 ; segment unless we do this. |
622 align 16 | 622 align 16 |
OLD | NEW |