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

Diff of /trunk/xvidcore/src/image/x86_asm/interpolate8x8_xmm.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 29  Line 29 
29                  %ifdef MARK_FUNCS                  %ifdef MARK_FUNCS
30                          global _%1:function %1.endfunc-%1                          global _%1:function %1.endfunc-%1
31                          %define %1 _%1:function %1.endfunc-%1                          %define %1 _%1:function %1.endfunc-%1
32                            %define ENDFUNC .endfunc
33                  %else                  %else
34                          global _%1                          global _%1
35                          %define %1 _%1                          %define %1 _%1
36                            %define ENDFUNC
37                  %endif                  %endif
38          %else          %else
39                  %ifdef MARK_FUNCS                  %ifdef MARK_FUNCS
40                          global %1:function %1.endfunc-%1                          global %1:function %1.endfunc-%1
41                            %define ENDFUNC .endfunc
42                  %else                  %else
43                          global %1                          global %1
44                            %define ENDFUNC
45                  %endif                  %endif
46          %endif          %endif
47  %endmacro  %endmacro
# Line 130  Line 134 
134    COPY_H_SSE_RND0    COPY_H_SSE_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_SSE_RND1    COPY_H_SSE_RND1
# Line 141  Line 145 
145    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
146    COPY_H_SSE_RND1    COPY_H_SSE_RND1
147    ret    ret
148  .endfunc  ENDFUNC
149    
150  ;===========================================================================  ;===========================================================================
151  ;  ;
# Line 202  Line 206 
206    COPY_V_SSE_RND0    COPY_V_SSE_RND0
207    ret    ret
208    
209  .rounding1  .rounding1:
210   ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1   ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1
211    movq mm7, [mmx_one]    movq mm7, [mmx_one]
212    movq mm2, [eax]       ; loop invariant    movq mm2, [eax]       ; loop invariant
# Line 216  Line 220 
220    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
221    COPY_V_SSE_RND1    COPY_V_SSE_RND1
222    ret    ret
223  .endfunc  ENDFUNC
224    
225  ;===========================================================================  ;===========================================================================
226  ;  ;
# Line 346  Line 350 
350    COPY_HV_SSE_RND0    COPY_HV_SSE_RND0
351    ret    ret
352    
353  .rounding1  .rounding1:
354    COPY_HV_SSE_RND1    COPY_HV_SSE_RND1
355    add ecx, edx    add ecx, edx
356    COPY_HV_SSE_RND1    COPY_HV_SSE_RND1
# Line 355  Line 359 
359    add ecx, edx    add ecx, edx
360    COPY_HV_SSE_RND1    COPY_HV_SSE_RND1
361    ret    ret
362  .endfunc  ENDFUNC
363    
364  ;===========================================================================  ;===========================================================================
365  ;  ;
# Line 382  Line 386 
386    COPY_H_SSE_RND0    COPY_H_SSE_RND0
387    ret    ret
388    
389  .rounding1  .rounding1:
390   ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1   ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1
391    movq mm7, [mmx_one]    movq mm7, [mmx_one]
392    COPY_H_SSE_RND1    COPY_H_SSE_RND1
393    lea ecx, [ecx+2*edx]    lea ecx, [ecx+2*edx]
394    COPY_H_SSE_RND1    COPY_H_SSE_RND1
395    ret    ret
396  .endfunc  ENDFUNC
397    
398  ;===========================================================================  ;===========================================================================
399  ;  ;
# Line 417  Line 421 
421    COPY_V_SSE_RND0    COPY_V_SSE_RND0
422    ret    ret
423    
424  .rounding1  .rounding1:
425   ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1   ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1
426    movq mm7, [mmx_one]    movq mm7, [mmx_one]
427    movq mm2, [eax]       ; loop invariant    movq mm2, [eax]       ; loop invariant
# Line 427  Line 431 
431    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
432    COPY_V_SSE_RND1    COPY_V_SSE_RND1
433    ret    ret
434  .endfunc  ENDFUNC
435    
436  ;===========================================================================  ;===========================================================================
437  ;  ;
# Line 474  Line 478 
478    COPY_HV_SSE_RND0    COPY_HV_SSE_RND0
479    ret    ret
480    
481  .rounding1  .rounding1:
482    COPY_HV_SSE_RND1    COPY_HV_SSE_RND1
483    add ecx, edx    add ecx, edx
484    COPY_HV_SSE_RND1    COPY_HV_SSE_RND1
485    ret    ret
486  .endfunc  ENDFUNC
487    
488  ;===========================================================================  ;===========================================================================
489  ;  ;
# Line 547  Line 551 
551    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
552    ADD_FF 0, edx    ADD_FF 0, edx
553    EPILOG    EPILOG
554  .endfunc  ENDFUNC
555    
556  ;===========================================================================  ;===========================================================================
557  ;  ;
# Line 609  Line 613 
613    ADD_FH_RND0 0, edx    ADD_FH_RND0 0, edx
614    EPILOG    EPILOG
615    
616  .Loop1  .Loop1:
617    ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1    ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1
618    ; movq mm7, [mmx_one]    ; movq mm7, [mmx_one]
619    ADD_FH_RND1 0, edx    ADD_FH_RND1 0, edx
# Line 623  Line 627 
627    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
628    ADD_FH_RND1 0, edx    ADD_FH_RND1 0, edx
629    EPILOG    EPILOG
630  .endfunc  ENDFUNC
631    
632    
633  ;===========================================================================  ;===========================================================================
# Line 684  Line 688 
688    ADD_8_HF_RND0    ADD_8_HF_RND0
689    EPILOG    EPILOG
690    
691  .Loop1  .Loop1:
692    movq mm0, [eax] ; loop invariant    movq mm0, [eax] ; loop invariant
693    movq mm7, [mmx_one]    movq mm7, [mmx_one]
694    
# Line 699  Line 703 
703    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
704    ADD_8_HF_RND1    ADD_8_HF_RND1
705    EPILOG    EPILOG
706  .endfunc  ENDFUNC
707    
708  ; The trick is to correct the result of 'pavgb' with some combination of the  ; The trick is to correct the result of 'pavgb' with some combination of the
709  ; lsb's of the 4 input values i,j,k,l, and their intermediate 'pavgb' (s and t).  ; lsb's of the 4 input values i,j,k,l, and their intermediate 'pavgb' (s and t).
# Line 829  Line 833 
833    ADD_HH_RND0    ADD_HH_RND0
834    EPILOG    EPILOG
835    
836  .Loop1  .Loop1:
837    ADD_HH_RND1    ADD_HH_RND1
838    add ecx, edx    add ecx, edx
839    ADD_HH_RND1    ADD_HH_RND1
# Line 839  Line 843 
843    ADD_HH_RND1    ADD_HH_RND1
844    
845    EPILOG    EPILOG
846  .endfunc  ENDFUNC
847    
848    
849  %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