31 |
%ifdef MARK_FUNCS |
%ifdef MARK_FUNCS |
32 |
global _%1:function %1.endfunc-%1 |
global _%1:function %1.endfunc-%1 |
33 |
%define %1 _%1:function %1.endfunc-%1 |
%define %1 _%1:function %1.endfunc-%1 |
34 |
|
%define ENDFUNC .endfunc |
35 |
%else |
%else |
36 |
global _%1 |
global _%1 |
37 |
%define %1 _%1 |
%define %1 _%1 |
38 |
|
%define ENDFUNC |
39 |
%endif |
%endif |
40 |
%else |
%else |
41 |
%ifdef MARK_FUNCS |
%ifdef MARK_FUNCS |
42 |
global %1:function %1.endfunc-%1 |
global %1:function %1.endfunc-%1 |
43 |
|
%define ENDFUNC .endfunc |
44 |
%else |
%else |
45 |
global %1 |
global %1 |
46 |
|
%define ENDFUNC |
47 |
%endif |
%endif |
48 |
%endif |
%endif |
49 |
%endmacro |
%endmacro |
156 |
COPY_H_SSE_RND0 1 |
COPY_H_SSE_RND0 1 |
157 |
ret |
ret |
158 |
|
|
159 |
.rounding1 |
.rounding1: |
160 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
161 |
mov ecx, [esp+ 4] ; Dst |
mov ecx, [esp+ 4] ; Dst |
162 |
movq mm7, [mmx_one] |
movq mm7, [mmx_one] |
168 |
lea ecx,[ecx+2*edx] |
lea ecx,[ecx+2*edx] |
169 |
COPY_H_SSE_RND1 |
COPY_H_SSE_RND1 |
170 |
ret |
ret |
171 |
.endfunc |
ENDFUNC |
172 |
|
|
173 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
174 |
; |
; |
228 |
ret |
ret |
229 |
|
|
230 |
ALIGN 8 |
ALIGN 8 |
231 |
.rounding1 |
.rounding1: |
232 |
pcmpeqb mm0, mm0 |
pcmpeqb mm0, mm0 |
233 |
psubusb mm0, [eax] |
psubusb mm0, [eax] |
234 |
add eax, edx |
add eax, edx |
292 |
movq [ecx], mm4 |
movq [ecx], mm4 |
293 |
movq [ecx+edx], mm5 |
movq [ecx+edx], mm5 |
294 |
ret |
ret |
295 |
.endfunc |
ENDFUNC |
296 |
|
|
297 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
298 |
; |
; |
415 |
ret |
ret |
416 |
|
|
417 |
ALIGN 16 |
ALIGN 16 |
418 |
.rounding1 |
.rounding1: |
419 |
COPY_HV_SSE_RND1 |
COPY_HV_SSE_RND1 |
420 |
lea ecx,[ecx+2*edx] |
lea ecx,[ecx+2*edx] |
421 |
COPY_HV_SSE_RND1 |
COPY_HV_SSE_RND1 |
424 |
lea ecx,[ecx+2*edx] |
lea ecx,[ecx+2*edx] |
425 |
COPY_HV_SSE_RND1 |
COPY_HV_SSE_RND1 |
426 |
ret |
ret |
427 |
.endfunc |
ENDFUNC |
428 |
|
|
429 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
430 |
; |
; |
450 |
COPY_H_SSE_RND0 1 |
COPY_H_SSE_RND0 1 |
451 |
ret |
ret |
452 |
|
|
453 |
.rounding1 |
.rounding1: |
454 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
455 |
mov ecx, [esp+ 4] ; Dst |
mov ecx, [esp+ 4] ; Dst |
456 |
movq mm7, [mmx_one] |
movq mm7, [mmx_one] |
458 |
lea ecx, [ecx+2*edx] |
lea ecx, [ecx+2*edx] |
459 |
COPY_H_SSE_RND1 |
COPY_H_SSE_RND1 |
460 |
ret |
ret |
461 |
.endfunc |
ENDFUNC |
462 |
|
|
463 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
464 |
; |
; |
505 |
ret |
ret |
506 |
|
|
507 |
ALIGN 8 |
ALIGN 8 |
508 |
.rounding1 |
.rounding1: |
509 |
pcmpeqb mm0, mm0 |
pcmpeqb mm0, mm0 |
510 |
psubusb mm0, [eax] ; eax==line0 |
psubusb mm0, [eax] ; eax==line0 |
511 |
add eax, edx ; eax==line1 |
add eax, edx ; eax==line1 |
547 |
|
|
548 |
ret |
ret |
549 |
|
|
550 |
.endfunc |
ENDFUNC |
551 |
|
|
552 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
553 |
; |
; |
582 |
ret |
ret |
583 |
|
|
584 |
ALIGN 16 |
ALIGN 16 |
585 |
.rounding1 |
.rounding1: |
586 |
COPY_HV_SSE_RND1 |
COPY_HV_SSE_RND1 |
587 |
lea ecx,[ecx+2*edx] |
lea ecx,[ecx+2*edx] |
588 |
COPY_HV_SSE_RND1 |
COPY_HV_SSE_RND1 |
589 |
ret |
ret |
590 |
.endfunc |
ENDFUNC |
591 |
|
|
592 |
|
|
593 |
%ifidn __OUTPUT_FORMAT__,elf |
%ifidn __OUTPUT_FORMAT__,elf |