[svn] / trunk / xvidcore / src / image / x86_asm / interpolate8x8_3dn.asm Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/image/x86_asm/interpolate8x8_3dn.asm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1792, Tue Sep 2 12:23:30 2008 UTC revision 1793, Tue Nov 11 20:46:24 2008 UTC
# Line 30  Line 30 
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
# Line 130  Line 134 
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
# Line 141  Line 145 
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  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 204  Line 208 
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
# Line 218  Line 222 
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  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 322  Line 326 
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
# Line 349  Line 353 
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
# Line 358  Line 362 
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  ;  ;
# Line 385  Line 389 
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  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 422  Line 426 
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
# Line 432  Line 436 
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  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 455  Line 459 
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
# Line 478  Line 482 
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

Legend:
Removed from v.1792  
changed lines
  Added in v.1793

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4