[cvs] / xvidcore / src / utils / x86_asm / mem_transfer_mmx.asm Repository:
ViewVC logotype

Diff of /xvidcore/src/utils/x86_asm/mem_transfer_mmx.asm

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

revision 1.13, Sat Jul 24 11:46:08 2004 UTC revision 1.19, Tue Nov 11 20:46:24 2008 UTC
# Line 29  Line 29 
29    
30  %macro cglobal 1  %macro cglobal 1
31          %ifdef PREFIX          %ifdef PREFIX
32                    %ifdef MARK_FUNCS
33                            global _%1:function %1.endfunc-%1
34                            %define %1 _%1:function %1.endfunc-%1
35                            %define ENDFUNC .endfunc
36                    %else
37                  global _%1                  global _%1
38                  %define %1 _%1                  %define %1 _%1
39                            %define ENDFUNC
40                    %endif
41            %else
42                    %ifdef MARK_FUNCS
43                            global %1:function %1.endfunc-%1
44                            %define ENDFUNC .endfunc
45          %else          %else
46                  global %1                  global %1
47                            %define ENDFUNC
48                    %endif
49          %endif          %endif
50  %endmacro  %endmacro
51    
# Line 62  Line 75 
75  cglobal transfer_8to16subro_mmx  cglobal transfer_8to16subro_mmx
76  cglobal transfer_8to16sub2_mmx  cglobal transfer_8to16sub2_mmx
77  cglobal transfer_8to16sub2_xmm  cglobal transfer_8to16sub2_xmm
78    cglobal transfer_8to16sub2ro_xmm
79  cglobal transfer_16to8add_mmx  cglobal transfer_16to8add_mmx
80  cglobal transfer8x8_copy_mmx  cglobal transfer8x8_copy_mmx
81    cglobal transfer8x4_copy_mmx
82    
83  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
84  ;  ;
# Line 102  Line 117 
117    COPY_8_TO_16 2    COPY_8_TO_16 2
118    COPY_8_TO_16 3    COPY_8_TO_16 3
119    ret    ret
120    ENDFUNC
121    
122  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
123  ;  ;
# Line 137  Line 153 
153    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
154    COPY_16_TO_8 3    COPY_16_TO_8 3
155    ret    ret
156    ENDFUNC
157    
158  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
159  ;  ;
# Line 200  Line 217 
217    
218    pop ebx    pop ebx
219    ret    ret
220    ENDFUNC
221    
222    
223  ALIGN 16  ALIGN 16
# Line 218  Line 236 
236    
237    pop ebx    pop ebx
238    ret    ret
239    ENDFUNC
240    
241    
242  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 316  Line 335 
335    pop esi    pop esi
336    pop ebx    pop ebx
337    ret    ret
338    ENDFUNC
339    
340  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
341  ;  ;
# Line 383  Line 403 
403    pop esi    pop esi
404    pop ebx    pop ebx
405    ret    ret
406    ENDFUNC
407    
408    
409    ;-----------------------------------------------------------------------------
410    ;
411    ; void transfer_8to16sub2ro_xmm(int16_t * const dct,
412    ;                               const uint8_t * const cur,
413    ;                               const uint8_t * ref1,
414    ;                               const uint8_t * ref2,
415    ;                               const uint32_t stride)
416    ;
417    ;-----------------------------------------------------------------------------
418    
419    %macro COPY_8_TO_16_SUB2RO_SSE 1
420      movq mm0, [eax]      ; cur
421      movq mm2, [eax+edx]
422      movq mm1, mm0
423      movq mm3, mm2
424    
425      punpcklbw mm0, mm7
426      punpcklbw mm2, mm7
427      movq mm4, [ebx]     ; ref1
428      pavgb mm4, [esi]     ; ref2
429      punpckhbw mm1, mm7
430      punpckhbw mm3, mm7
431      movq mm5, [ebx+edx] ; ref
432      pavgb mm5, [esi+edx] ; ref2
433    
434      movq mm6, mm4
435      punpcklbw mm4, mm7
436      punpckhbw mm6, mm7
437      psubsw mm0, mm4
438      psubsw mm1, mm6
439      lea esi, [esi+2*edx]
440      movq mm6, mm5
441      punpcklbw mm5, mm7
442      punpckhbw mm6, mm7
443      psubsw mm2, mm5
444      lea eax, [eax+2*edx]
445      psubsw mm3, mm6
446      lea ebx, [ebx+2*edx]
447    
448      movq [ecx+%1*32+ 0], mm0 ; dst
449      movq [ecx+%1*32+ 8], mm1
450      movq [ecx+%1*32+16], mm2
451      movq [ecx+%1*32+24], mm3
452    %endmacro
453    
454    ALIGN 16
455    transfer_8to16sub2ro_xmm:
456      pxor mm7, mm7
457      mov ecx, [esp  + 4] ; Dst
458      mov eax, [esp  + 8] ; Cur
459      push ebx
460      mov ebx, [esp+4+12] ; Ref1
461      push esi
462      mov esi, [esp+8+16] ; Ref2
463      mov edx, [esp+8+20] ; Stride
464    
465      COPY_8_TO_16_SUB2RO_SSE 0
466      COPY_8_TO_16_SUB2RO_SSE 1
467      COPY_8_TO_16_SUB2RO_SSE 2
468      COPY_8_TO_16_SUB2RO_SSE 3
469    
470      pop esi
471      pop ebx
472      ret
473    ENDFUNC
474    
475    
476  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
477  ;  ;
# Line 427  Line 516 
516    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
517    COPY_16_TO_8_ADD 3    COPY_16_TO_8_ADD 3
518    ret    ret
519    ENDFUNC
520    
521  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
522  ;  ;
# Line 459  Line 549 
549    lea ecx,[ecx+2*edx]    lea ecx,[ecx+2*edx]
550    COPY_8_TO_8    COPY_8_TO_8
551    ret    ret
552    ENDFUNC
553    
554    ;-----------------------------------------------------------------------------
555    ;
556    ; void transfer8x4_copy_mmx(uint8_t * const dst,
557    ;                                       const uint8_t * const src,
558    ;                                       const uint32_t stride);
559    ;
560    ;
561    ;-----------------------------------------------------------------------------
562    
563    ALIGN 16
564    transfer8x4_copy_mmx:
565      mov ecx, [esp+ 4] ; Dst
566      mov eax, [esp+ 8] ; Src
567      mov edx, [esp+12] ; Stride
568    
569      COPY_8_TO_8
570      lea ecx,[ecx+2*edx]
571      COPY_8_TO_8
572      ret
573    ENDFUNC
574    
575    
576    %ifidn __OUTPUT_FORMAT__,elf
577    section ".note.GNU-stack" noalloc noexec nowrite progbits
578    %endif
579    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.19

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