| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jquant.asm - sample data conversion and quantization (MMX) | 2 ; jquant.asm - sample data conversion and quantization (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 17 matching lines...) Expand all Loading... |
| 28 ; GLOBAL(void) | 28 ; GLOBAL(void) |
| 29 ; jsimd_convsamp_mmx (JSAMPARRAY sample_data, JDIMENSION start_col, | 29 ; jsimd_convsamp_mmx (JSAMPARRAY sample_data, JDIMENSION start_col, |
| 30 ; DCTELEM *workspace); | 30 ; DCTELEM *workspace); |
| 31 ; | 31 ; |
| 32 | 32 |
| 33 %define sample_data ebp+8 ; JSAMPARRAY sample_data | 33 %define sample_data ebp+8 ; JSAMPARRAY sample_data |
| 34 %define start_col ebp+12 ; JDIMENSION start_col | 34 %define start_col ebp+12 ; JDIMENSION start_col |
| 35 %define workspace ebp+16 ; DCTELEM *workspace | 35 %define workspace ebp+16 ; DCTELEM *workspace |
| 36 | 36 |
| 37 align 16 | 37 align 16 |
| 38 global EXTN(jsimd_convsamp_mmx) | 38 global EXTN(jsimd_convsamp_mmx) PRIVATE |
| 39 | 39 |
| 40 EXTN(jsimd_convsamp_mmx): | 40 EXTN(jsimd_convsamp_mmx): |
| 41 push ebp | 41 push ebp |
| 42 mov ebp,esp | 42 mov ebp,esp |
| 43 push ebx | 43 push ebx |
| 44 ; push ecx ; need not be preserved | 44 ; push ecx ; need not be preserved |
| 45 ; push edx ; need not be preserved | 45 ; push edx ; need not be preserved |
| 46 push esi | 46 push esi |
| 47 push edi | 47 push edi |
| 48 | 48 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 %define RECIPROCAL(m,n,b) MMBLOCK(DCTSIZE*0+(m),(n),(b),SIZEOF_DCTELEM) | 133 %define RECIPROCAL(m,n,b) MMBLOCK(DCTSIZE*0+(m),(n),(b),SIZEOF_DCTELEM) |
| 134 %define CORRECTION(m,n,b) MMBLOCK(DCTSIZE*1+(m),(n),(b),SIZEOF_DCTELEM) | 134 %define CORRECTION(m,n,b) MMBLOCK(DCTSIZE*1+(m),(n),(b),SIZEOF_DCTELEM) |
| 135 %define SCALE(m,n,b) MMBLOCK(DCTSIZE*2+(m),(n),(b),SIZEOF_DCTELEM) | 135 %define SCALE(m,n,b) MMBLOCK(DCTSIZE*2+(m),(n),(b),SIZEOF_DCTELEM) |
| 136 %define SHIFT(m,n,b) MMBLOCK(DCTSIZE*3+(m),(n),(b),SIZEOF_DCTELEM) | 136 %define SHIFT(m,n,b) MMBLOCK(DCTSIZE*3+(m),(n),(b),SIZEOF_DCTELEM) |
| 137 | 137 |
| 138 %define coef_block ebp+8 ; JCOEFPTR coef_block | 138 %define coef_block ebp+8 ; JCOEFPTR coef_block |
| 139 %define divisors ebp+12 ; DCTELEM *divisors | 139 %define divisors ebp+12 ; DCTELEM *divisors |
| 140 %define workspace ebp+16 ; DCTELEM *workspace | 140 %define workspace ebp+16 ; DCTELEM *workspace |
| 141 | 141 |
| 142 align 16 | 142 align 16 |
| 143 global EXTN(jsimd_quantize_mmx) | 143 global EXTN(jsimd_quantize_mmx) PRIVATE |
| 144 | 144 |
| 145 EXTN(jsimd_quantize_mmx): | 145 EXTN(jsimd_quantize_mmx): |
| 146 push ebp | 146 push ebp |
| 147 mov ebp,esp | 147 mov ebp,esp |
| 148 ; push ebx ; unused | 148 ; push ebx ; unused |
| 149 ; push ecx ; unused | 149 ; push ecx ; unused |
| 150 ; push edx ; need not be preserved | 150 ; push edx ; need not be preserved |
| 151 push esi | 151 push esi |
| 152 push edi | 152 push edi |
| 153 | 153 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 pop esi | 265 pop esi |
| 266 ; pop edx ; need not be preserved | 266 ; pop edx ; need not be preserved |
| 267 ; pop ecx ; unused | 267 ; pop ecx ; unused |
| 268 ; pop ebx ; unused | 268 ; pop ebx ; unused |
| 269 pop ebp | 269 pop ebp |
| 270 ret | 270 ret |
| 271 | 271 |
| 272 ; For some reason, the OS X linker does not honor the request to align the | 272 ; For some reason, the OS X linker does not honor the request to align the |
| 273 ; segment unless we do this. | 273 ; segment unless we do this. |
| 274 align 16 | 274 align 16 |
| OLD | NEW |