30 |
%ifdef MARK_FUNCS |
%ifdef MARK_FUNCS |
31 |
global _%1:function %1.endfunc-%1 |
global _%1:function %1.endfunc-%1 |
32 |
%define %1 _%1:function %1.endfunc-%1 |
%define %1 _%1:function %1.endfunc-%1 |
33 |
|
%define ENDFUNC .endfunc |
34 |
%else |
%else |
35 |
global _%1 |
global _%1 |
36 |
%define %1 _%1 |
%define %1 _%1 |
37 |
|
%define ENDFUNC |
38 |
%endif |
%endif |
39 |
%else |
%else |
40 |
%ifdef MARK_FUNCS |
%ifdef MARK_FUNCS |
41 |
global %1:function %1.endfunc-%1 |
global %1:function %1.endfunc-%1 |
42 |
|
%define ENDFUNC .endfunc |
43 |
%else |
%else |
44 |
global %1 |
global %1 |
45 |
|
%define ENDFUNC |
46 |
%endif |
%endif |
47 |
%endif |
%endif |
48 |
%endmacro |
%endmacro |
108 |
; Inverse DCT tables |
; Inverse DCT tables |
109 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
110 |
|
|
111 |
align 16 |
ALIGN 16 |
112 |
iTab1: |
iTab1: |
113 |
dw 0x4000, 0x539f, 0x4000, 0x22a3 |
dw 0x4000, 0x539f, 0x4000, 0x22a3 |
114 |
dw 0x4000, 0xdd5d, 0x4000, 0xac61 |
dw 0x4000, 0xdd5d, 0x4000, 0xac61 |
149 |
dw 0x3b21, 0x14c3, 0x979e, 0xc4df |
dw 0x3b21, 0x14c3, 0x979e, 0xc4df |
150 |
dw 0x14c3, 0x587e, 0x587e, 0x979e |
dw 0x14c3, 0x587e, 0x587e, 0x979e |
151 |
|
|
152 |
align 16 |
ALIGN 16 |
153 |
Walken_Idct_Rounders: |
Walken_Idct_Rounders: |
154 |
dd 65536, 65536, 65536, 65536 |
dd 65536, 65536, 65536, 65536 |
155 |
dd 3597, 3597, 3597, 3597 |
dd 3597, 3597, 3597, 3597 |
404 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
405 |
; IEEE1180 and Walken compatible version |
; IEEE1180 and Walken compatible version |
406 |
|
|
407 |
align 16 |
ALIGN 16 |
408 |
idct_sse2_skal: |
idct_sse2_skal: |
409 |
|
|
410 |
mov ecx, [esp+ 4] ; Src |
mov ecx, [esp+ 4] ; Src |
412 |
TEST_ROW ecx, .Row0_Round |
TEST_ROW ecx, .Row0_Round |
413 |
iMTX_MULT 0, iTab1, Walken_Idct_Rounders + 16*0, 11 |
iMTX_MULT 0, iTab1, Walken_Idct_Rounders + 16*0, 11 |
414 |
jmp .Row1 |
jmp .Row1 |
415 |
.Row0_Round |
.Row0_Round: |
416 |
movdqa xmm0, [Walken_Idct_Rounders + 16*8 + 8*0] |
movdqa xmm0, [Walken_Idct_Rounders + 16*8 + 8*0] |
417 |
movdqa [ecx ], xmm0 |
movdqa [ecx ], xmm0 |
418 |
|
|
419 |
.Row1 |
.Row1: |
420 |
TEST_ROW ecx+16, .Row1_Round |
TEST_ROW ecx+16, .Row1_Round |
421 |
iMTX_MULT 1, iTab2, Walken_Idct_Rounders + 16*1, 11 |
iMTX_MULT 1, iTab2, Walken_Idct_Rounders + 16*1, 11 |
422 |
jmp .Row2 |
jmp .Row2 |
423 |
.Row1_Round |
.Row1_Round: |
424 |
movdqa xmm0, [Walken_Idct_Rounders + 16*8 + 16*1] |
movdqa xmm0, [Walken_Idct_Rounders + 16*8 + 16*1] |
425 |
movdqa [ecx+16 ], xmm0 |
movdqa [ecx+16 ], xmm0 |
426 |
|
|
427 |
.Row2 |
.Row2: |
428 |
TEST_ROW ecx+32, .Row2_Round |
TEST_ROW ecx+32, .Row2_Round |
429 |
iMTX_MULT 2, iTab3, Walken_Idct_Rounders + 16*2, 11 |
iMTX_MULT 2, iTab3, Walken_Idct_Rounders + 16*2, 11 |
430 |
jmp .Row3 |
jmp .Row3 |
431 |
.Row2_Round |
.Row2_Round: |
432 |
movdqa xmm0, [Walken_Idct_Rounders + 16*8 + 16*2] |
movdqa xmm0, [Walken_Idct_Rounders + 16*8 + 16*2] |
433 |
movdqa [ecx+32 ], xmm0 |
movdqa [ecx+32 ], xmm0 |
434 |
|
|
435 |
.Row3 |
.Row3: |
436 |
TEST_ROW ecx+48, .Row4 |
TEST_ROW ecx+48, .Row4 |
437 |
iMTX_MULT 3, iTab4, Walken_Idct_Rounders + 16*3, 11 |
iMTX_MULT 3, iTab4, Walken_Idct_Rounders + 16*3, 11 |
438 |
|
|
439 |
.Row4 |
.Row4: |
440 |
TEST_ROW ecx+64, .Row5 |
TEST_ROW ecx+64, .Row5 |
441 |
iMTX_MULT 4, iTab1, Walken_Idct_Rounders + 16*4, 11 |
iMTX_MULT 4, iTab1, Walken_Idct_Rounders + 16*4, 11 |
442 |
|
|
443 |
.Row5 |
.Row5: |
444 |
TEST_ROW ecx+80, .Row6 |
TEST_ROW ecx+80, .Row6 |
445 |
iMTX_MULT 5, iTab4, Walken_Idct_Rounders + 16*5, 11 |
iMTX_MULT 5, iTab4, Walken_Idct_Rounders + 16*5, 11 |
446 |
|
|
447 |
.Row6 |
.Row6: |
448 |
TEST_ROW ecx+96, .Row7 |
TEST_ROW ecx+96, .Row7 |
449 |
iMTX_MULT 6, iTab3, Walken_Idct_Rounders + 16*6, 11 |
iMTX_MULT 6, iTab3, Walken_Idct_Rounders + 16*6, 11 |
450 |
|
|
451 |
.Row7 |
.Row7: |
452 |
TEST_ROW ecx+112, .End |
TEST_ROW ecx+112, .End |
453 |
iMTX_MULT 7, iTab2, Walken_Idct_Rounders + 16*7, 11 |
iMTX_MULT 7, iTab2, Walken_Idct_Rounders + 16*7, 11 |
454 |
.End |
.End: |
455 |
|
|
456 |
iLLM_PASS ecx |
iLLM_PASS ecx |
457 |
|
|
458 |
ret |
ret |
459 |
.endfunc |
ENDFUNC |
460 |
|
|
461 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
462 |
; Helper macro fLLM_PASS |
; Helper macro fLLM_PASS |
622 |
fMTX_MULT 6, fTab3, Fdct_Rnd1 |
fMTX_MULT 6, fTab3, Fdct_Rnd1 |
623 |
fMTX_MULT 7, fTab2, Fdct_Rnd1 |
fMTX_MULT 7, fTab2, Fdct_Rnd1 |
624 |
ret |
ret |
625 |
.endfunc |
ENDFUNC |
626 |
|
|
627 |
|
|
628 |
|
%ifidn __OUTPUT_FORMAT__,elf |
629 |
|
section ".note.GNU-stack" noalloc noexec nowrite progbits |
630 |
|
%endif |
631 |
|
|