33 |
|
|
34 |
%macro cglobal 1 |
%macro cglobal 1 |
35 |
%ifdef PREFIX |
%ifdef PREFIX |
36 |
|
%ifdef MARK_FUNCS |
37 |
|
global _%1:function %1.endfunc-%1 |
38 |
|
%define %1 _%1:function %1.endfunc-%1 |
39 |
|
%else |
40 |
global _%1 |
global _%1 |
41 |
%define %1 _%1 |
%define %1 _%1 |
42 |
|
%endif |
43 |
|
%else |
44 |
|
%ifdef MARK_FUNCS |
45 |
|
global %1:function %1.endfunc-%1 |
46 |
%else |
%else |
47 |
global %1 |
global %1 |
48 |
%endif |
%endif |
49 |
|
%endif |
50 |
%endmacro |
%endmacro |
51 |
|
|
52 |
;============================================================================= |
;============================================================================= |
54 |
;============================================================================= |
;============================================================================= |
55 |
|
|
56 |
%ifdef FORMAT_COFF |
%ifdef FORMAT_COFF |
57 |
SECTION .rodata data |
SECTION .rodata |
58 |
%else |
%else |
59 |
SECTION .rodata data align=16 |
SECTION .rodata align=16 |
60 |
%endif |
%endif |
61 |
|
|
62 |
align 4 |
align 4 |
165 |
; uint32_t quant_h263_intra_3dne(int16_t * coeff, |
; uint32_t quant_h263_intra_3dne(int16_t * coeff, |
166 |
; const int16_t const * data, |
; const int16_t const * data, |
167 |
; const uint32_t quant, |
; const uint32_t quant, |
168 |
; const uint32_t dcscalar); |
; const uint32_t dcscalar, |
169 |
|
; const uint16_t *mpeg_matrices); |
170 |
; |
; |
171 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
172 |
;This is Athlon-optimized code (ca 70 clk per call) |
;This is Athlon-optimized code (ca 70 clk per call) |
396 |
|
|
397 |
quant_intra1 3 |
quant_intra1 3 |
398 |
psubw mm5, mm4 ;C8 |
psubw mm5, mm4 ;C8 |
399 |
mov esi, [dword esp + 12] ; pop back the register value |
mov esi, [esp + 12] ; pop back the register value |
400 |
mov edi, [esp + 4] ; pop back the register value |
mov edi, [esp + 4] ; pop back the register value |
401 |
sar eax, 16 |
sar eax, 16 |
402 |
lea ebx, [byte eax + 1] ; workaround for eax < 0 |
lea ebx, [byte eax + 1] ; workaround for eax < 0 |
410 |
|
|
411 |
xor eax, eax |
xor eax, eax |
412 |
ret |
ret |
413 |
|
.endfunc |
414 |
|
|
415 |
|
|
416 |
|
|
419 |
; |
; |
420 |
; uint32_t quant_h263_inter_3dne(int16_t * coeff, |
; uint32_t quant_h263_inter_3dne(int16_t * coeff, |
421 |
; const int16_t const * data, |
; const int16_t const * data, |
422 |
; const uint32_t quant); |
; const uint32_t quant, |
423 |
|
; const uint16_t *mpeg_matrices); |
424 |
; |
; |
425 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
426 |
;This is Athlon-optimized code (ca 90 clk per call) |
;This is Athlon-optimized code (ca 90 clk per call) |
567 |
pop ebx |
pop ebx |
568 |
|
|
569 |
ret |
ret |
570 |
|
.endfunc |
571 |
|
|
572 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
573 |
; |
; |
574 |
; uint32_t dequant_h263_intra_3dne(int16_t *data, |
; uint32_t dequant_h263_intra_3dne(int16_t *data, |
575 |
; const int16_t const *coeff, |
; const int16_t const *coeff, |
576 |
; const uint32_t quant, |
; const uint32_t quant, |
577 |
; const uint32_t dcscalar); |
; const uint32_t dcscalar, |
578 |
|
; const uint16_t *mpeg_matrices); |
579 |
; |
; |
580 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
581 |
|
|
719 |
|
|
720 |
xor eax, eax |
xor eax, eax |
721 |
ret |
ret |
722 |
|
.endfunc |
723 |
|
|
724 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
725 |
; |
; |
726 |
; uint32_t dequant_h263_inter_3dne(int16_t * data, |
; uint32_t dequant_h263_inter_3dne(int16_t * data, |
727 |
; const int16_t * const coeff, |
; const int16_t * const coeff, |
728 |
; const uint32_t quant); |
; const uint32_t quant, |
729 |
|
; const uint16_t *mpeg_matrices); |
730 |
; |
; |
731 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
732 |
|
|
755 |
pmaxsw mm2, mm3 ;|c| ;B4 (2nd) |
pmaxsw mm2, mm3 ;|c| ;B4 (2nd) |
756 |
pmullw mm2, [edi] ;*= 2Q ;B8 (3rd+) |
pmullw mm2, [edi] ;*= 2Q ;B8 (3rd+) |
757 |
psraw mm3, 15 ; sign(c) ;B7 (2nd) |
psraw mm3, 15 ; sign(c) ;B7 (2nd) |
758 |
mov edx, [dword esp+ 4+12] ; data |
mov edx, [esp+ 4+12] ; data |
759 |
|
|
760 |
ALIGN 8 |
ALIGN 8 |
761 |
|
|
782 |
|
|
783 |
xor eax, eax |
xor eax, eax |
784 |
ret |
ret |
785 |
|
.endfunc |
786 |
|
|