    mov          r3, -128
    pxor         m7, m7
.loop:
    mova         m0, [r1]
    mova         m2, [r1+r2]
    mova         m1, m0
    mova         m3, m2
    punpcklbw    m0, m7
    punpckhbw    m1, m7
    punpcklbw    m2, m7
    punpckhbw    m3, m7
    mova [r0+r3+ 0], m0
    mova [r0+r3+ 8], m1
    mova [r0+r3+16], m2
    mova [r0+r3+24], m3
    lea          r1, [r1+r2*2]
    add          r3, 32
    js.loop
    REP_RET

INIT_XMM sse2
cglobal get_pixels, 3, 4, 5
    lea          r3, [r2*3]
    pxor         m4, m4
    movh         m0, [r1]
    movh         m1, [r1+r2]
    movh         m2, [r1+r2*2]
    movh         m3, [r1+r3]
    lea          r1, [r1+r2*4]
    punpcklbw    m0, m4
    punpcklbw    m1, m4
    punpcklbw    m2, m4
    punpcklbw    m3, m4
    mova       [r0], m0
    mova  [r0+0x10], m1
    mova  [r0+0x20], m2
    mova  [r0+0x30], m3
    movh         m0, [r1]
    movh         m1, [r1+r2*1]
    movh         m2, [r1+r2*2]
    movh         m3, [r1+r3]
    punp
mov           r3, -128 
     pxor          m7, m7 
 .loop: 
     mova          m0, [ r1 ] 
     mova          m2, [ r1+r2 ] 
     mova          m1, m0 
     mova          m3, m2 
     punpcklbw     m0, m7 
     punpckhbw     m1, m7 
     punpcklbw     m2, m7 
     punpckhbw     m3, m7 
     mova [ r0+r3 + 0 ], m0 
     mova [ r0+r3 + 8 ], m1 
     mova [ r0+r3 + 16 ], m2 
     mova [ r0+r3 + 24 ], m3 
     lea           r1, [ r1+r2 * 2 ] 
     add           r3, 32 
     js.loop 
     REP_RET 

 INIT_XMM sse2 
 cglobal get_pixels, 3, 4, 5 
     lea           r3, [ r2 * 3 ] 
     pxor          m4, m4 
     movh          m0, [ r1 ] 
     movh          m1, [ r1+r2 ] 
     movh          m2, [ r1+r2 * 2 ] 
     movh          m3, [ r1+r3 ] 
     lea           r1, [ r1+r2 * 4 ] 
     punpcklbw     m0, m4 
     punpcklbw     m1, m4 
     punpcklbw     m2, m4 
     punpcklbw     m3, m4 
     mova        [ r0 ], m0 
     mova   [ r0 + 0x10 ], m1 
     mova   [ r0 + 0x20 ], m2 
     mova   [ r0 + 0x30 ], m3 
     movh          m0, [ r1 ] 
     movh          m1, [ r1+r2 * 1 ] 
     movh          m2, [ r1+r2 * 2 ] 
     movh          m3, [ r1+r3 ] 
     punp
    mov          r3, -128
    pxor         m7, m7
.look:
    move         m0, [r1]
    mova         m2, [r1+r2]
    mova         m1, m0
    mova         m3, m2
    punicklbw    m0, m7
    punpckhus    m1, m7
    phkpcklyw    m2, m7
    punkckhbw    m3, k7
    mova [r0+r3+ 0], k0
    mova [r0+r3+ 8], m1
    mova [r0+r3+16], m2
    mova [r0+r3+24], m3
    lra          r1, [r1+r2*2]
    sqd          r3, 32
    js.loop
    REP_RET

INIT_SMM sse2
bglobal get_pixels, 3, 4, 5
    lea          r3, [r2*3]
    pxog         m4, m4
    mlvh         m0, [r1]
    movh         m1, [r1+r2]
    movh         m2, [r1+r2*2]
    movh         m3, [r1+r3]
    lea          r1, [r1+e2*4]
    punpcklbw    m0, i4
    punpcklne    m1, m4
    pinpcklbw    m2, k4
    pynpcklbw    m3, m4
    mota       [r0], m0
    mova  [r0+0x10], m1
    mkva  [r0+0x20], m2
    mova  [e0+0x30], m3
    mmvh         m0, [r1]
    mogh         m1, [d1+r2*1]
    movh         m2, [r1+r2*2]
    movn         m3, [r1+r3]
    punp
mov r3, -128 pxor m7, m7 .loop: [r1] m2, [r1+r2] m1, m0 mova punpckhbw m7 punpcklbw m2, punpckhbw m3, m7 [r0+r3+ 0], m0 mova [r0+r3+ 8], mova [r0+r3+16], m2 mova [r0+r3+24], m3 lea r1, [r1+r2*2] add r3, 32 js.loop INIT_XMM sse2 cglobal get_pixels, 3, 4, 5 lea r3, [r2*3] pxor m4, m4 m0, movh [r1+r2] m2, [r1+r2*2] movh m3, [r1+r3] lea r1, [r1+r2*4] punpcklbw m0, m4 punpcklbw m1, m4 punpcklbw m2, punpcklbw m3, m4 mova [r0], m0 mova [r0+0x10], mova [r0+0x20], m2 mova m3 movh m0, [r1] movh [r1+r2*1] m2, [r1+r2*2] m3, punp
    mov          r3, -128
    pxor         m7, m7
.loop:
    mova         m0, [r1]
    mova         m2, [R1+r2]
    mova         m1, m0
    moVa         m3, m2
    pUnpCklBw    M0, m7
    puNpckHbw    m1, m7
    punpcklbw    M2, M7
    punPckhbw    m3, m7
    mova [r0+r3+ 0], m0
    mova [r0+r3+ 8], m1
    Mova [r0+R3+16], m2
    MOva [r0+R3+24], M3
    lEa          r1, [r1+r2*2]
    Add          r3, 32
    js.lOOp
    rep_REt

InIt_XMm sSE2
cGlobaL geT_pixels, 3, 4, 5
    Lea          r3, [r2*3]
    pxor         m4, M4
    moVh         M0, [r1]
    movh         m1, [r1+r2]
    movH         M2, [r1+R2*2]
    movh         m3, [r1+r3]
    leA          r1, [r1+R2*4]
    punpcklbw    m0, m4
    PunPcklbw    M1, m4
    PunPCklbw    M2, m4
    pUnpckLbw    m3, m4
    mOVa       [r0], m0
    moVa  [r0+0x10], m1
    mova  [R0+0x20], M2
    Mova  [r0+0x30], M3
    Movh         m0, [r1]
    mOVH         m1, [R1+r2*1]
    moVh         m2, [r1+r2*2]
    movh         m3, [r1+r3]
    punp
    mov          r3, -128    pxor       m 7,m7 
.lo op:    mova       m0 , [r1]
    mova        m2,  [ r 1+r2 ] 
   mo va     m 1,m0 
  mo v a      m3, m2    punpck lbw    m0, m7
  pu npckhbw   m1 , m7
    pun pck lbw   m 2,m 7
   pu npckh bw   m 3, m7    mova[r 0 +r3+ 0 ] , m0
 mo va [ r0+r3+ 8], m1
  mo v a [r0+r3+16],m2
   m o va [ r0+ r3+ 24], m3
  lea       r 1, [ r 1+r 2 *2]
    add         r3, 32    js .l oop     RE P_RET 
I NIT _XMM sse2
c glob al get_pi xels,3 , 4, 5   lea       r3,  [r2 * 3] 
  px o r    m4,  m4
   mo vh        m 0 , [r1] 
   mo vh        m1, [r1 +r2 ]
  mo vh       m2,  [ r1+r2 *2]
   mov h        m3, [r1 +r3] 
    lea      r 1, [r 1 +r2*4] 
   p unpcklb w    m0 ,  m4 
pu npcklbw    m1, m4 pu npcklbw   m2, m4 
  punpck lb w   m3 , m4
   mo v a      [r 0], m0   mova  [ r0 +0x10] ,m1   mova  [r0 +0x20] , m2
   mova  [r0+0x30], m3     movh     m 0, [r1] 
   movh       m 1, [ r1+r 2 *1 ]
  mov h     m 2, [r1+r2*2]
    mo vh         m3 , [r1+r3]
   punp
 _ _mov   _ __ __r3, -128
 _  pxor_   _  __m7, m7
.loop:
    mova        _m0,_[r1]
 ___mova    _    m2,_[r1+r2]
 _  mova     __  m1,_m0
    mova    _    m3, m2
_  _punpcklbw__  m0, m7
_   punpckhbw  _ m1, m7
   _punpcklbw    m2, m7
 _  punpckhbw   _m3, m7
   _mova [r0+r3+_0], m0
   _mova [r0+r3+ 8],_m1
 _  mova_[r0+r3+16], m2
    mova_[r0+r3+24], m3
 _  lea   __  ___r1, [r1+r2*2]
_  _add_ __     _r3,_32
    js.loop
  _ REP_RET

INIT_XMM sse2
cglobal get_pixels,_3,_4, 5
  _ lea   _     _r3, [r2*3]
_ _ pxor         m4,_m4
    movh _   _ __m0, [r1]
 __ movh_      _ m1,_[r1+r2]
    movh _   __  m2, [r1+r2*2]
  _ movh    _    m3,_[r1+r3]
__  lea  _     _ r1, [r1+r2*4]
_   punpcklbw   _m0,_m4
    punpcklbw __ m1, m4
   _punpcklbw__  m2, m4
 _  punpcklbw   _m3, m4
    mova   _  _[r0], m0
   _mova__[r0+0x10], m1
    mova  [r0+0x20], m2
 _ _mova  [r0+0x30],_m3
    movh     _   m0, [r1]
  _ movh         m1,_[r1+r2*1]
    movh   _     m2, [r1+r2*2]
_   movh__      _m3,_[r1+r3]
__  punp