[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.15, Sun Aug 29 10:02:38 2004 UTC revision 1.17, Tue Sep 13 12:12:15 2005 UTC
# Line 71  Line 71 
71  cglobal transfer_8to16subro_mmx  cglobal transfer_8to16subro_mmx
72  cglobal transfer_8to16sub2_mmx  cglobal transfer_8to16sub2_mmx
73  cglobal transfer_8to16sub2_xmm  cglobal transfer_8to16sub2_xmm
74    cglobal transfer_8to16sub2ro_xmm
75  cglobal transfer_16to8add_mmx  cglobal transfer_16to8add_mmx
76  cglobal transfer8x8_copy_mmx  cglobal transfer8x8_copy_mmx
77    cglobal transfer8x4_copy_mmx
78    
79  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
80  ;  ;
# Line 399  Line 401 
401    ret    ret
402  .endfunc  .endfunc
403    
404    
405    ;-----------------------------------------------------------------------------
406    ;
407    ; void transfer_8to16sub2ro_xmm(int16_t * const dct,
408    ;                               const uint8_t * const cur,
409    ;                               const uint8_t * ref1,
410    ;                               const uint8_t * ref2,
411    ;                               const uint32_t stride)
412    ;
413    ;-----------------------------------------------------------------------------
414    
415    %macro COPY_8_TO_16_SUB2RO_SSE 1
416      movq mm0, [eax]      ; cur
417      movq mm2, [eax+edx]
418      movq mm1, mm0
419      movq mm3, mm2
420    
421      punpcklbw mm0, mm7
422      punpcklbw mm2, mm7
423      movq mm4, [ebx]     ; ref1
424      pavgb mm4, [esi]     ; ref2
425      punpckhbw mm1, mm7
426      punpckhbw mm3, mm7
427      movq mm5, [ebx+edx] ; ref
428      pavgb mm5, [esi+edx] ; ref2
429    
430      movq mm6, mm4
431      punpcklbw mm4, mm7
432      punpckhbw mm6, mm7
433      psubsw mm0, mm4
434      psubsw mm1, mm6
435      lea esi, [esi+2*edx]
436      movq mm6, mm5
437      punpcklbw mm5, mm7
438      punpckhbw mm6, mm7
439      psubsw mm2, mm5
440      lea eax, [eax+2*edx]
441      psubsw mm3, mm6
442      lea ebx, [ebx+2*edx]
443    
444      movq [ecx+%1*32+ 0], mm0 ; dst
445      movq [ecx+%1*32+ 8], mm1
446      movq [ecx+%1*32+16], mm2
447      movq [ecx+%1*32+24], mm3
448    %endmacro
449    
450    ALIGN 16
451    transfer_8to16sub2ro_xmm:
452      pxor mm7, mm7
453      mov ecx, [esp  + 4] ; Dst
454      mov eax, [esp  + 8] ; Cur
455      push ebx
456      mov ebx, [esp+4+12] ; Ref1
457      push esi
458      mov esi, [esp+8+16] ; Ref2
459      mov edx, [esp+8+20] ; Stride
460    
461      COPY_8_TO_16_SUB2RO_SSE 0
462      COPY_8_TO_16_SUB2RO_SSE 1
463      COPY_8_TO_16_SUB2RO_SSE 2
464      COPY_8_TO_16_SUB2RO_SSE 3
465    
466      pop esi
467      pop ebx
468      ret
469    .endfunc
470    
471    
472  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
473  ;  ;
474  ; void transfer_16to8add_mmx(uint8_t * const dst,  ; void transfer_16to8add_mmx(uint8_t * const dst,
# Line 477  Line 547 
547    ret    ret
548  .endfunc  .endfunc
549    
550    ;-----------------------------------------------------------------------------
551    ;
552    ; void transfer8x4_copy_mmx(uint8_t * const dst,
553    ;                                       const uint8_t * const src,
554    ;                                       const uint32_t stride);
555    ;
556    ;
557    ;-----------------------------------------------------------------------------
558    
559    ALIGN 16
560    transfer8x4_copy_mmx:
561      mov ecx, [esp+ 4] ; Dst
562      mov eax, [esp+ 8] ; Src
563      mov edx, [esp+12] ; Stride
564    
565      COPY_8_TO_8
566      lea ecx,[ecx+2*edx]
567      COPY_8_TO_8
568      ret
569    .endfunc
570    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.17

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