OLD | NEW |
1 ; | 1 ; |
2 ; jdmrgext.asm - merged upsampling/color conversion (MMX) | 2 ; jdmrgext.asm - merged upsampling/color conversion (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 22 matching lines...) Expand all Loading... |
33 %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf | 33 %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf |
34 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr | 34 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr |
35 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 35 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
36 | 36 |
37 %define original_ebp ebp+0 | 37 %define original_ebp ebp+0 |
38 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] | 38 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] |
39 %define WK_NUM 3 | 39 %define WK_NUM 3 |
40 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 40 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
41 | 41 |
42 align 16 | 42 align 16 |
43 global EXTN(jsimd_h2v1_merged_upsample_mmx) | 43 global EXTN(jsimd_h2v1_merged_upsample_mmx) PRIVATE |
44 | 44 |
45 EXTN(jsimd_h2v1_merged_upsample_mmx): | 45 EXTN(jsimd_h2v1_merged_upsample_mmx): |
46 push ebp | 46 push ebp |
47 mov eax,esp ; eax = original ebp | 47 mov eax,esp ; eax = original ebp |
48 sub esp, byte 4 | 48 sub esp, byte 4 |
49 and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits | 49 and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits |
50 mov [esp],eax | 50 mov [esp],eax |
51 mov ebp,esp ; ebp = aligned ebp | 51 mov ebp,esp ; ebp = aligned ebp |
52 lea esp, [wk(0)] | 52 lea esp, [wk(0)] |
53 pushpic eax ; make a room for GOT address | 53 pushpic eax ; make a room for GOT address |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 ; JDIMENSION in_row_group_ctr, | 402 ; JDIMENSION in_row_group_ctr, |
403 ; JSAMPARRAY output_buf); | 403 ; JSAMPARRAY output_buf); |
404 ; | 404 ; |
405 | 405 |
406 %define output_width(b) (b)+8 ; JDIMENSION output_width | 406 %define output_width(b) (b)+8 ; JDIMENSION output_width |
407 %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf | 407 %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf |
408 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr | 408 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr |
409 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 409 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
410 | 410 |
411 align 16 | 411 align 16 |
412 global EXTN(jsimd_h2v2_merged_upsample_mmx) | 412 global EXTN(jsimd_h2v2_merged_upsample_mmx) PRIVATE |
413 | 413 |
414 EXTN(jsimd_h2v2_merged_upsample_mmx): | 414 EXTN(jsimd_h2v2_merged_upsample_mmx): |
415 push ebp | 415 push ebp |
416 mov ebp,esp | 416 mov ebp,esp |
417 push ebx | 417 push ebx |
418 ; push ecx ; need not be preserved | 418 ; push ecx ; need not be preserved |
419 ; push edx ; need not be preserved | 419 ; push edx ; need not be preserved |
420 push esi | 420 push esi |
421 push edi | 421 push edi |
422 | 422 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 pop esi | 455 pop esi |
456 ; pop edx ; need not be preserved | 456 ; pop edx ; need not be preserved |
457 ; pop ecx ; need not be preserved | 457 ; pop ecx ; need not be preserved |
458 pop ebx | 458 pop ebx |
459 pop ebp | 459 pop ebp |
460 ret | 460 ret |
461 | 461 |
462 ; For some reason, the OS X linker does not honor the request to align the | 462 ; For some reason, the OS X linker does not honor the request to align the |
463 ; segment unless we do this. | 463 ; segment unless we do this. |
464 align 16 | 464 align 16 |
OLD | NEW |