23 |
; * |
; * |
24 |
; ***************************************************************************/ |
; ***************************************************************************/ |
25 |
|
|
|
BITS 32 |
|
|
|
|
26 |
;============================================================================= |
;============================================================================= |
27 |
; Macros and other preprocessor constants |
; Macros and other preprocessor constants |
28 |
;============================================================================= |
;============================================================================= |
29 |
|
|
30 |
%macro cglobal 1 |
%include "nasm.inc" |
|
%ifdef PREFIX |
|
|
global _%1 |
|
|
%define %1 _%1 |
|
|
%else |
|
|
global %1 |
|
|
%endif |
|
|
%endmacro |
|
31 |
|
|
32 |
%define BITS_INV_ACC 5 ; 4 or 5 for IEEE |
%define BITS_INV_ACC 5 ; 4 or 5 for IEEE |
33 |
%define SHIFT_INV_ROW 16 - BITS_INV_ACC |
%define SHIFT_INV_ROW 16 - BITS_INV_ACC |
45 |
; Local Data (Read Only) |
; Local Data (Read Only) |
46 |
;============================================================================= |
;============================================================================= |
47 |
|
|
48 |
%ifdef FORMAT_COFF |
DATA |
|
SECTION .rodata data |
|
|
%else |
|
|
SECTION .rodata data align=16 |
|
|
%endif |
|
49 |
|
|
50 |
ALIGN 16 |
ALIGN SECTION_ALIGN |
51 |
tab_i_04: |
tab_i_04: |
52 |
dw 16384, 21407, 16384, 8867 ; movq-> w05 w04 w01 w00 |
dw 16384, 21407, 16384, 8867 ; movq-> w05 w04 w01 w00 |
53 |
dw 16384, -8867, 16384, -21407 ; w13 w12 w09 w08 |
dw 16384, -8867, 16384, -21407 ; w13 w12 w09 w08 |
145 |
; Code |
; Code |
146 |
;============================================================================= |
;============================================================================= |
147 |
|
|
148 |
SECTION .text |
SECTION .rotext align=SECTION_ALIGN |
149 |
|
|
150 |
cglobal idct_sse2_dmitry |
cglobal idct_sse2_dmitry |
151 |
|
|
304 |
; void idct_sse2_dmitry(int16_t coeff[64]); |
; void idct_sse2_dmitry(int16_t coeff[64]); |
305 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
306 |
|
|
307 |
ALIGN 16 |
ALIGN SECTION_ALIGN |
308 |
idct_sse2_dmitry: |
idct_sse2_dmitry: |
309 |
|
|
310 |
mov eax, [esp + 4] |
mov _ECX, prm1 |
311 |
|
|
312 |
DCT_8_INV_ROW_1_SSE2 eax+ 0, eax+ 0, tab_i_04, rounder_2_0 |
DCT_8_INV_ROW_1_SSE2 _ECX+ 0, _ECX+ 0, tab_i_04, rounder_2_0 |
313 |
DCT_8_INV_ROW_1_SSE2 eax+ 16, eax+ 16, tab_i_17, rounder_2_1 |
DCT_8_INV_ROW_1_SSE2 _ECX+ 16, _ECX+ 16, tab_i_17, rounder_2_1 |
314 |
DCT_8_INV_ROW_1_SSE2 eax+ 32, eax+ 32, tab_i_26, rounder_2_2 |
DCT_8_INV_ROW_1_SSE2 _ECX+ 32, _ECX+ 32, tab_i_26, rounder_2_2 |
315 |
DCT_8_INV_ROW_1_SSE2 eax+ 48, eax+ 48, tab_i_35, rounder_2_3 |
DCT_8_INV_ROW_1_SSE2 _ECX+ 48, _ECX+ 48, tab_i_35, rounder_2_3 |
316 |
DCT_8_INV_ROW_1_SSE2 eax+ 64, eax+ 64, tab_i_04, rounder_2_4 |
DCT_8_INV_ROW_1_SSE2 _ECX+ 64, _ECX+ 64, tab_i_04, rounder_2_4 |
317 |
DCT_8_INV_ROW_1_SSE2 eax+ 80, eax+ 80, tab_i_35, rounder_2_5 |
DCT_8_INV_ROW_1_SSE2 _ECX+ 80, _ECX+ 80, tab_i_35, rounder_2_5 |
318 |
DCT_8_INV_ROW_1_SSE2 eax+ 96, eax+ 96, tab_i_26, rounder_2_6 |
DCT_8_INV_ROW_1_SSE2 _ECX+ 96, _ECX+ 96, tab_i_26, rounder_2_6 |
319 |
DCT_8_INV_ROW_1_SSE2 eax+112, eax+112, tab_i_17, rounder_2_7 |
DCT_8_INV_ROW_1_SSE2 _ECX+112, _ECX+112, tab_i_17, rounder_2_7 |
320 |
|
|
321 |
DCT_8_INV_COL_4_SSE2 eax, eax |
DCT_8_INV_COL_4_SSE2 _ECX, _ECX |
322 |
|
|
323 |
ret |
ret |
324 |
|
ENDFUNC |
325 |
|
|
326 |
|
|
327 |
|
%ifidn __OUTPUT_FORMAT__,elf |
328 |
|
section ".note.GNU-stack" noalloc noexec nowrite progbits |
329 |
|
%endif |
330 |
|
|