34 |
%macro cglobal 1 |
%macro cglobal 1 |
35 |
%ifdef PREFIX |
%ifdef PREFIX |
36 |
%ifdef MARK_FUNCS |
%ifdef MARK_FUNCS |
37 |
global _%1:function |
global _%1:function %1.endfunc-%1 |
38 |
%define %1 _%1:function |
%define %1 _%1:function %1.endfunc-%1 |
39 |
|
%define ENDFUNC .endfunc |
40 |
%else |
%else |
41 |
global _%1 |
global _%1 |
42 |
%define %1 _%1 |
%define %1 _%1 |
43 |
|
%define ENDFUNC |
44 |
%endif |
%endif |
45 |
%else |
%else |
46 |
%ifdef MARK_FUNCS |
%ifdef MARK_FUNCS |
47 |
global %1:function |
global %1:function %1.endfunc-%1 |
48 |
|
%define ENDFUNC .endfunc |
49 |
%else |
%else |
50 |
global %1 |
global %1 |
51 |
|
%define ENDFUNC |
52 |
%endif |
%endif |
53 |
%endif |
%endif |
54 |
%endmacro |
%endmacro |
381 |
|
|
382 |
ALIGN 16 |
ALIGN 16 |
383 |
|
|
384 |
.q1loop |
.q1loop: |
385 |
quant_intra1 0 |
quant_intra1 0 |
386 |
mov ebp, [esp + 16 + 16] ; dcscalar |
mov ebp, [esp + 16 + 16] ; dcscalar |
387 |
movsx eax, word [byte ecx] ; DC |
movsx eax, word [byte ecx] ; DC |
400 |
|
|
401 |
quant_intra1 3 |
quant_intra1 3 |
402 |
psubw mm5, mm4 ;C8 |
psubw mm5, mm4 ;C8 |
403 |
mov esi, [dword esp + 12] ; pop back the register value |
mov esi, [esp + 12] ; pop back the register value |
404 |
mov edi, [esp + 4] ; pop back the register value |
mov edi, [esp + 4] ; pop back the register value |
405 |
sar eax, 16 |
sar eax, 16 |
406 |
lea ebx, [byte eax + 1] ; workaround for eax < 0 |
lea ebx, [byte eax + 1] ; workaround for eax < 0 |
414 |
|
|
415 |
xor eax, eax |
xor eax, eax |
416 |
ret |
ret |
417 |
|
ENDFUNC |
418 |
|
|
419 |
|
|
420 |
|
|
550 |
ret |
ret |
551 |
|
|
552 |
ALIGN 16 |
ALIGN 16 |
553 |
.q1loop |
.q1loop: |
554 |
movq mm6, [byte ebx] |
movq mm6, [byte ebx] |
555 |
|
|
556 |
quantinter1 0 |
quantinter1 0 |
571 |
pop ebx |
pop ebx |
572 |
|
|
573 |
ret |
ret |
574 |
|
ENDFUNC |
575 |
|
|
576 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
577 |
; |
; |
723 |
|
|
724 |
xor eax, eax |
xor eax, eax |
725 |
ret |
ret |
726 |
|
ENDFUNC |
727 |
|
|
728 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
729 |
; |
; |
759 |
pmaxsw mm2, mm3 ;|c| ;B4 (2nd) |
pmaxsw mm2, mm3 ;|c| ;B4 (2nd) |
760 |
pmullw mm2, [edi] ;*= 2Q ;B8 (3rd+) |
pmullw mm2, [edi] ;*= 2Q ;B8 (3rd+) |
761 |
psraw mm3, 15 ; sign(c) ;B7 (2nd) |
psraw mm3, 15 ; sign(c) ;B7 (2nd) |
762 |
mov edx, [dword esp+ 4+12] ; data |
mov edx, [esp+ 4+12] ; data |
763 |
|
|
764 |
ALIGN 8 |
ALIGN 8 |
765 |
|
|
786 |
|
|
787 |
xor eax, eax |
xor eax, eax |
788 |
ret |
ret |
789 |
|
ENDFUNC |
790 |
|
|
791 |
|
|
792 |
|
%ifidn __OUTPUT_FORMAT__,elf |
793 |
|
section ".note.GNU-stack" noalloc noexec nowrite progbits |
794 |
|
%endif |
795 |
|
|