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 |
134 |
COPY_H_3DN_RND0 |
COPY_H_3DN_RND0 |
135 |
ret |
ret |
136 |
|
|
137 |
.rounding1 |
.rounding1: |
138 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
139 |
movq mm7, [mmx_one] |
movq mm7, [mmx_one] |
140 |
COPY_H_3DN_RND1 |
COPY_H_3DN_RND1 |
145 |
lea ecx, [ecx+2*edx] |
lea ecx, [ecx+2*edx] |
146 |
COPY_H_3DN_RND1 |
COPY_H_3DN_RND1 |
147 |
ret |
ret |
148 |
.endfunc |
ENDFUNC |
149 |
|
|
150 |
|
|
151 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
208 |
COPY_V_3DN_RND0 |
COPY_V_3DN_RND0 |
209 |
ret |
ret |
210 |
|
|
211 |
.rounding1 |
.rounding1: |
212 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
213 |
movq mm7, [mmx_one] |
movq mm7, [mmx_one] |
214 |
movq mm2, [eax] ; loop invariant |
movq mm2, [eax] ; loop invariant |
222 |
lea ecx, [ecx+2*edx] |
lea ecx, [ecx+2*edx] |
223 |
COPY_V_3DN_RND1 |
COPY_V_3DN_RND1 |
224 |
ret |
ret |
225 |
.endfunc |
ENDFUNC |
226 |
|
|
227 |
|
|
228 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
326 |
%endmacro |
%endmacro |
327 |
|
|
328 |
ALIGN 16 |
ALIGN 16 |
329 |
interpolate8x8_halfpel_hv_3dn |
interpolate8x8_halfpel_hv_3dn: |
330 |
mov eax, [esp+16] ; rounding |
mov eax, [esp+16] ; rounding |
331 |
mov ecx, [esp+ 4] ; Dst |
mov ecx, [esp+ 4] ; Dst |
332 |
test eax, eax |
test eax, eax |
353 |
COPY_HV_3DN_RND0 |
COPY_HV_3DN_RND0 |
354 |
ret |
ret |
355 |
|
|
356 |
.rounding1 |
.rounding1: |
357 |
COPY_HV_3DN_RND1 |
COPY_HV_3DN_RND1 |
358 |
add ecx, edx |
add ecx, edx |
359 |
COPY_HV_3DN_RND1 |
COPY_HV_3DN_RND1 |
362 |
add ecx, edx |
add ecx, edx |
363 |
COPY_HV_3DN_RND1 |
COPY_HV_3DN_RND1 |
364 |
ret |
ret |
365 |
.endfunc |
ENDFUNC |
366 |
|
|
367 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
368 |
; |
; |
389 |
COPY_H_3DN_RND0 |
COPY_H_3DN_RND0 |
390 |
ret |
ret |
391 |
|
|
392 |
.rounding1 |
.rounding1: |
393 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
394 |
movq mm7, [mmx_one] |
movq mm7, [mmx_one] |
395 |
COPY_H_3DN_RND1 |
COPY_H_3DN_RND1 |
396 |
lea ecx, [ecx+2*edx] |
lea ecx, [ecx+2*edx] |
397 |
COPY_H_3DN_RND1 |
COPY_H_3DN_RND1 |
398 |
ret |
ret |
399 |
.endfunc |
ENDFUNC |
400 |
|
|
401 |
|
|
402 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
426 |
COPY_V_3DN_RND0 |
COPY_V_3DN_RND0 |
427 |
ret |
ret |
428 |
|
|
429 |
.rounding1 |
.rounding1: |
430 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 |
431 |
movq mm7, [mmx_one] |
movq mm7, [mmx_one] |
432 |
movq mm2, [eax] ; loop invariant |
movq mm2, [eax] ; loop invariant |
436 |
lea ecx, [ecx+2*edx] |
lea ecx, [ecx+2*edx] |
437 |
COPY_V_3DN_RND1 |
COPY_V_3DN_RND1 |
438 |
ret |
ret |
439 |
.endfunc |
ENDFUNC |
440 |
|
|
441 |
|
|
442 |
;----------------------------------------------------------------------------- |
;----------------------------------------------------------------------------- |
459 |
; with s=(i+j+1)/2, t=(k+l+1)/2, ij = i^j, kl = k^l, st = s^t. |
; with s=(i+j+1)/2, t=(k+l+1)/2, ij = i^j, kl = k^l, st = s^t. |
460 |
|
|
461 |
ALIGN 16 |
ALIGN 16 |
462 |
interpolate8x4_halfpel_hv_3dn |
interpolate8x4_halfpel_hv_3dn: |
463 |
mov eax, [esp+16] ; rounding |
mov eax, [esp+16] ; rounding |
464 |
mov ecx, [esp+ 4] ; Dst |
mov ecx, [esp+ 4] ; Dst |
465 |
test eax, eax |
test eax, eax |
482 |
COPY_HV_3DN_RND0 |
COPY_HV_3DN_RND0 |
483 |
ret |
ret |
484 |
|
|
485 |
.rounding1 |
.rounding1: |
486 |
COPY_HV_3DN_RND1 |
COPY_HV_3DN_RND1 |
487 |
add ecx, edx |
add ecx, edx |
488 |
COPY_HV_3DN_RND1 |
COPY_HV_3DN_RND1 |
489 |
ret |
ret |
490 |
.endfunc |
ENDFUNC |
491 |
|
|
492 |
|
|
493 |
%ifidn __OUTPUT_FORMAT__,elf |
%ifidn __OUTPUT_FORMAT__,elf |