| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jdmrgss2.asm - merged upsampling/color conversion (SSE2) | 2 ; jdmrgss2.asm - merged upsampling/color conversion (SSE2) |
| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 add edi, byte SIZEOF_XMMWORD ; outptr | 469 add edi, byte SIZEOF_XMMWORD ; outptr |
| 470 movdqa xmmA,xmmD | 470 movdqa xmmA,xmmD |
| 471 sub ecx, byte SIZEOF_XMMWORD/4 | 471 sub ecx, byte SIZEOF_XMMWORD/4 |
| 472 .column_st15: | 472 .column_st15: |
| 473 %ifdef STRICT_MEMORY_ACCESS | 473 %ifdef STRICT_MEMORY_ACCESS |
| 474 ; Store two pixels (8 bytes) of xmmA to the output when it has enough | 474 ; Store two pixels (8 bytes) of xmmA to the output when it has enough |
| 475 ; space. | 475 ; space. |
| 476 cmp ecx, byte SIZEOF_XMMWORD/8 | 476 cmp ecx, byte SIZEOF_XMMWORD/8 |
| 477 jb short .column_st7 | 477 jb short .column_st7 |
| 478 movq MMWORD [edi], xmmA | 478 movq MMWORD [edi], xmmA |
| 479 » add» edi, byte SIZEOF_XMMWORD/8*4 | 479 » add» edi, byte SIZEOF_XMMWORD/2 |
| 480 sub ecx, byte SIZEOF_XMMWORD/8 | 480 sub ecx, byte SIZEOF_XMMWORD/8 |
| 481 psrldq xmmA, SIZEOF_XMMWORD/8*4 | 481 psrldq xmmA, SIZEOF_XMMWORD/8*4 |
| 482 .column_st7: | 482 .column_st7: |
| 483 ; Store one pixel (4 bytes) of xmmA to the output when it has enough | 483 ; Store one pixel (4 bytes) of xmmA to the output when it has enough |
| 484 ; space. | 484 ; space. |
| 485 test ecx, ecx | 485 test ecx, ecx |
| 486 jz short .endcolumn | 486 jz short .endcolumn |
| 487 movd DWORD [edi], xmmA | 487 movd DWORD [edi], xmmA |
| 488 %else | 488 %else |
| 489 cmp ecx, byte SIZEOF_XMMWORD/16 | 489 cmp ecx, byte SIZEOF_XMMWORD/16 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 pop esi | 606 pop esi |
| 607 ; pop edx ; need not be preserved | 607 ; pop edx ; need not be preserved |
| 608 ; pop ecx ; need not be preserved | 608 ; pop ecx ; need not be preserved |
| 609 pop ebx | 609 pop ebx |
| 610 pop ebp | 610 pop ebp |
| 611 ret | 611 ret |
| 612 | 612 |
| 613 ; For some reason, the OS X linker does not honor the request to align the | 613 ; For some reason, the OS X linker does not honor the request to align the |
| 614 ; segment unless we do this. | 614 ; segment unless we do this. |
| 615 align 16 | 615 align 16 |
| OLD | NEW |