2011-01-30 17:06:46 +02:00
|
|
|
;******************************************************************************
|
|
|
|
;* x86 optimized Format Conversion Utils
|
|
|
|
;* Copyright (c) 2008 Loren Merritt
|
|
|
|
;*
|
2011-03-18 19:35:10 +02:00
|
|
|
;* This file is part of Libav.
|
2011-01-30 17:06:46 +02:00
|
|
|
;*
|
2011-03-18 19:35:10 +02:00
|
|
|
;* Libav is free software; you can redistribute it and/or
|
2011-01-30 17:06:46 +02:00
|
|
|
;* modify it under the terms of the GNU Lesser General Public
|
|
|
|
;* License as published by the Free Software Foundation; either
|
|
|
|
;* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
;*
|
2011-03-18 19:35:10 +02:00
|
|
|
;* Libav is distributed in the hope that it will be useful,
|
2011-01-30 17:06:46 +02:00
|
|
|
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
;* Lesser General Public License for more details.
|
|
|
|
;*
|
|
|
|
;* You should have received a copy of the GNU Lesser General Public
|
2011-03-18 19:35:10 +02:00
|
|
|
;* License along with Libav; if not, write to the Free Software
|
2011-05-14 22:32:31 +03:00
|
|
|
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2011-01-30 17:06:46 +02:00
|
|
|
;******************************************************************************
|
|
|
|
|
2012-07-15 12:48:21 +03:00
|
|
|
%include "libavutil/x86/x86util.asm"
|
2011-01-30 17:06:46 +02:00
|
|
|
|
2011-05-20 18:33:38 +03:00
|
|
|
SECTION_TEXT
|
2011-01-30 17:06:46 +02:00
|
|
|
|
2012-07-15 20:55:21 +03:00
|
|
|
%macro CVTPS2PI 2
|
|
|
|
%if cpuflag(sse)
|
|
|
|
cvtps2pi %1, %2
|
|
|
|
%elif cpuflag(3dnow)
|
|
|
|
pf2id %1, %2
|
|
|
|
%endif
|
|
|
|
%endmacro
|
|
|
|
|
2011-10-10 06:52:03 +03:00
|
|
|
;---------------------------------------------------------------------------------
|
|
|
|
; void int32_to_float_fmul_scalar(float *dst, const int *src, float mul, int len);
|
|
|
|
;---------------------------------------------------------------------------------
|
2012-07-15 16:42:17 +03:00
|
|
|
%macro INT32_TO_FLOAT_FMUL_SCALAR 1
|
2012-01-23 12:45:58 +03:00
|
|
|
%if UNIX64
|
2012-07-15 16:42:17 +03:00
|
|
|
cglobal int32_to_float_fmul_scalar, 3, 3, %1, dst, src, len
|
2011-10-10 06:52:03 +03:00
|
|
|
%else
|
2012-07-15 16:42:17 +03:00
|
|
|
cglobal int32_to_float_fmul_scalar, 4, 4, %1, dst, src, mul, len
|
2011-11-01 23:57:41 +03:00
|
|
|
%endif
|
2012-01-23 12:45:58 +03:00
|
|
|
%if WIN64
|
2011-11-01 23:57:41 +03:00
|
|
|
SWAP 0, 2
|
2012-01-23 12:45:58 +03:00
|
|
|
%elif ARCH_X86_32
|
2011-10-10 06:52:03 +03:00
|
|
|
movss m0, mulm
|
|
|
|
%endif
|
|
|
|
SPLATD m0
|
|
|
|
shl lenq, 2
|
|
|
|
add srcq, lenq
|
|
|
|
add dstq, lenq
|
|
|
|
neg lenq
|
|
|
|
.loop:
|
2012-07-15 16:42:17 +03:00
|
|
|
%if cpuflag(sse2)
|
2011-10-10 06:52:03 +03:00
|
|
|
cvtdq2ps m1, [srcq+lenq ]
|
|
|
|
cvtdq2ps m2, [srcq+lenq+16]
|
|
|
|
%else
|
|
|
|
cvtpi2ps m1, [srcq+lenq ]
|
|
|
|
cvtpi2ps m3, [srcq+lenq+ 8]
|
|
|
|
cvtpi2ps m2, [srcq+lenq+16]
|
|
|
|
cvtpi2ps m4, [srcq+lenq+24]
|
|
|
|
movlhps m1, m3
|
|
|
|
movlhps m2, m4
|
|
|
|
%endif
|
|
|
|
mulps m1, m0
|
|
|
|
mulps m2, m0
|
|
|
|
mova [dstq+lenq ], m1
|
|
|
|
mova [dstq+lenq+16], m2
|
|
|
|
add lenq, 32
|
|
|
|
jl .loop
|
|
|
|
REP_RET
|
|
|
|
%endmacro
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
INIT_XMM sse
|
|
|
|
INT32_TO_FLOAT_FMUL_SCALAR 5
|
|
|
|
INIT_XMM sse2
|
|
|
|
INT32_TO_FLOAT_FMUL_SCALAR 3
|
2011-10-10 06:52:03 +03:00
|
|
|
|
|
|
|
|
2011-10-10 02:12:09 +03:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
; void ff_float_to_int16(int16_t *dst, const float *src, long len);
|
|
|
|
;------------------------------------------------------------------------------
|
2012-07-15 16:42:17 +03:00
|
|
|
%macro FLOAT_TO_INT16 1
|
|
|
|
cglobal float_to_int16, 3, 3, %1, dst, src, len
|
2011-10-10 02:12:09 +03:00
|
|
|
add lenq, lenq
|
|
|
|
lea srcq, [srcq+2*lenq]
|
|
|
|
add dstq, lenq
|
|
|
|
neg lenq
|
|
|
|
.loop:
|
2012-07-15 16:42:17 +03:00
|
|
|
%if cpuflag(sse2)
|
2011-10-10 02:12:09 +03:00
|
|
|
cvtps2dq m0, [srcq+2*lenq ]
|
|
|
|
cvtps2dq m1, [srcq+2*lenq+16]
|
|
|
|
packssdw m0, m1
|
|
|
|
mova [dstq+lenq], m0
|
|
|
|
%else
|
2012-07-15 20:55:21 +03:00
|
|
|
CVTPS2PI m0, [srcq+2*lenq ]
|
|
|
|
CVTPS2PI m1, [srcq+2*lenq+ 8]
|
|
|
|
CVTPS2PI m2, [srcq+2*lenq+16]
|
|
|
|
CVTPS2PI m3, [srcq+2*lenq+24]
|
2011-10-10 02:12:09 +03:00
|
|
|
packssdw m0, m1
|
|
|
|
packssdw m2, m3
|
|
|
|
mova [dstq+lenq ], m0
|
|
|
|
mova [dstq+lenq+8], m2
|
|
|
|
%endif
|
|
|
|
add lenq, 16
|
|
|
|
js .loop
|
2012-07-15 16:42:17 +03:00
|
|
|
%if mmsize == 8
|
2011-10-10 02:12:09 +03:00
|
|
|
emms
|
|
|
|
%endif
|
|
|
|
REP_RET
|
|
|
|
%endmacro
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
INIT_XMM sse2
|
|
|
|
FLOAT_TO_INT16 2
|
|
|
|
INIT_MMX sse
|
|
|
|
FLOAT_TO_INT16 0
|
|
|
|
INIT_MMX 3dnow
|
|
|
|
FLOAT_TO_INT16 0
|
2011-10-10 02:12:09 +03:00
|
|
|
|
2012-06-14 17:03:08 +03:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
; void ff_float_to_int16_step(int16_t *dst, const float *src, long len, long step);
|
|
|
|
;------------------------------------------------------------------------------
|
2012-07-15 16:42:17 +03:00
|
|
|
%macro FLOAT_TO_INT16_STEP 1
|
|
|
|
cglobal float_to_int16_step, 4, 7, %1, dst, src, len, step, step3, v1, v2
|
2012-06-14 17:03:08 +03:00
|
|
|
add lenq, lenq
|
|
|
|
lea srcq, [srcq+2*lenq]
|
|
|
|
lea step3q, [stepq*3]
|
|
|
|
neg lenq
|
|
|
|
.loop:
|
2012-07-15 16:42:17 +03:00
|
|
|
%if cpuflag(sse2)
|
2012-06-14 17:03:08 +03:00
|
|
|
cvtps2dq m0, [srcq+2*lenq ]
|
|
|
|
cvtps2dq m1, [srcq+2*lenq+16]
|
|
|
|
packssdw m0, m1
|
|
|
|
movd v1d, m0
|
|
|
|
psrldq m0, 4
|
|
|
|
movd v2d, m0
|
|
|
|
psrldq m0, 4
|
|
|
|
mov [dstq], v1w
|
|
|
|
mov [dstq+stepq*4], v2w
|
|
|
|
shr v1d, 16
|
|
|
|
shr v2d, 16
|
|
|
|
mov [dstq+stepq*2], v1w
|
|
|
|
mov [dstq+step3q*2], v2w
|
|
|
|
lea dstq, [dstq+stepq*8]
|
|
|
|
movd v1d, m0
|
|
|
|
psrldq m0, 4
|
|
|
|
movd v2d, m0
|
|
|
|
mov [dstq], v1w
|
|
|
|
mov [dstq+stepq*4], v2w
|
|
|
|
shr v1d, 16
|
|
|
|
shr v2d, 16
|
|
|
|
mov [dstq+stepq*2], v1w
|
|
|
|
mov [dstq+step3q*2], v2w
|
|
|
|
lea dstq, [dstq+stepq*8]
|
|
|
|
%else
|
2012-07-15 20:55:21 +03:00
|
|
|
CVTPS2PI m0, [srcq+2*lenq ]
|
|
|
|
CVTPS2PI m1, [srcq+2*lenq+ 8]
|
|
|
|
CVTPS2PI m2, [srcq+2*lenq+16]
|
|
|
|
CVTPS2PI m3, [srcq+2*lenq+24]
|
2012-06-14 17:03:08 +03:00
|
|
|
packssdw m0, m1
|
|
|
|
packssdw m2, m3
|
|
|
|
movd v1d, m0
|
|
|
|
psrlq m0, 32
|
|
|
|
movd v2d, m0
|
|
|
|
mov [dstq], v1w
|
|
|
|
mov [dstq+stepq*4], v2w
|
|
|
|
shr v1d, 16
|
|
|
|
shr v2d, 16
|
|
|
|
mov [dstq+stepq*2], v1w
|
|
|
|
mov [dstq+step3q*2], v2w
|
|
|
|
lea dstq, [dstq+stepq*8]
|
|
|
|
movd v1d, m2
|
|
|
|
psrlq m2, 32
|
|
|
|
movd v2d, m2
|
|
|
|
mov [dstq], v1w
|
|
|
|
mov [dstq+stepq*4], v2w
|
|
|
|
shr v1d, 16
|
|
|
|
shr v2d, 16
|
|
|
|
mov [dstq+stepq*2], v1w
|
|
|
|
mov [dstq+step3q*2], v2w
|
|
|
|
lea dstq, [dstq+stepq*8]
|
|
|
|
%endif
|
|
|
|
add lenq, 16
|
|
|
|
js .loop
|
2012-07-15 16:42:17 +03:00
|
|
|
%if mmsize == 8
|
2012-06-14 17:03:08 +03:00
|
|
|
emms
|
|
|
|
%endif
|
|
|
|
REP_RET
|
|
|
|
%endmacro
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
INIT_XMM sse2
|
|
|
|
FLOAT_TO_INT16_STEP 2
|
|
|
|
INIT_MMX sse
|
|
|
|
FLOAT_TO_INT16_STEP 0
|
|
|
|
INIT_MMX 3dnow
|
|
|
|
FLOAT_TO_INT16_STEP 0
|
2011-10-10 02:12:09 +03:00
|
|
|
|
2011-10-10 07:43:08 +03:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
; void ff_float_to_int16_interleave2(int16_t *dst, const float **src, long len);
|
|
|
|
;-------------------------------------------------------------------------------
|
2012-07-15 16:42:17 +03:00
|
|
|
%macro FLOAT_TO_INT16_INTERLEAVE2 0
|
|
|
|
cglobal float_to_int16_interleave2, 3, 4, 2, dst, src0, src1, len
|
2011-10-10 07:43:08 +03:00
|
|
|
lea lenq, [4*r2q]
|
|
|
|
mov src1q, [src0q+gprsize]
|
|
|
|
mov src0q, [src0q]
|
|
|
|
add dstq, lenq
|
|
|
|
add src0q, lenq
|
|
|
|
add src1q, lenq
|
|
|
|
neg lenq
|
|
|
|
.loop:
|
2012-07-15 16:42:17 +03:00
|
|
|
%if cpuflag(sse2)
|
2011-10-10 07:43:08 +03:00
|
|
|
cvtps2dq m0, [src0q+lenq]
|
|
|
|
cvtps2dq m1, [src1q+lenq]
|
|
|
|
packssdw m0, m1
|
|
|
|
movhlps m1, m0
|
|
|
|
punpcklwd m0, m1
|
|
|
|
mova [dstq+lenq], m0
|
|
|
|
%else
|
2012-07-15 20:55:21 +03:00
|
|
|
CVTPS2PI m0, [src0q+lenq ]
|
|
|
|
CVTPS2PI m1, [src0q+lenq+8]
|
|
|
|
CVTPS2PI m2, [src1q+lenq ]
|
|
|
|
CVTPS2PI m3, [src1q+lenq+8]
|
2011-10-10 07:43:08 +03:00
|
|
|
packssdw m0, m1
|
|
|
|
packssdw m2, m3
|
|
|
|
mova m1, m0
|
|
|
|
punpcklwd m0, m2
|
|
|
|
punpckhwd m1, m2
|
|
|
|
mova [dstq+lenq ], m0
|
|
|
|
mova [dstq+lenq+8], m1
|
|
|
|
%endif
|
|
|
|
add lenq, 16
|
|
|
|
js .loop
|
2012-07-15 16:42:17 +03:00
|
|
|
%if mmsize == 8
|
2011-10-10 07:43:08 +03:00
|
|
|
emms
|
|
|
|
%endif
|
|
|
|
REP_RET
|
|
|
|
%endmacro
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
INIT_MMX 3dnow
|
|
|
|
FLOAT_TO_INT16_INTERLEAVE2
|
|
|
|
INIT_MMX sse
|
|
|
|
FLOAT_TO_INT16_INTERLEAVE2
|
|
|
|
INIT_XMM sse2
|
|
|
|
FLOAT_TO_INT16_INTERLEAVE2
|
2011-10-10 07:43:08 +03:00
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
%macro FLOAT_TO_INT16_INTERLEAVE6 0
|
2011-01-30 17:06:46 +02:00
|
|
|
; void float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len)
|
2012-07-15 16:42:17 +03:00
|
|
|
cglobal float_to_int16_interleave6, 2, 8, 0, dst, src, src1, src2, src3, src4, src5, len
|
2012-01-23 12:45:58 +03:00
|
|
|
%if ARCH_X86_64
|
2011-01-30 17:06:46 +02:00
|
|
|
mov lend, r2d
|
|
|
|
%else
|
|
|
|
%define lend dword r2m
|
|
|
|
%endif
|
|
|
|
mov src1q, [srcq+1*gprsize]
|
|
|
|
mov src2q, [srcq+2*gprsize]
|
|
|
|
mov src3q, [srcq+3*gprsize]
|
|
|
|
mov src4q, [srcq+4*gprsize]
|
|
|
|
mov src5q, [srcq+5*gprsize]
|
|
|
|
mov srcq, [srcq]
|
|
|
|
sub src1q, srcq
|
|
|
|
sub src2q, srcq
|
|
|
|
sub src3q, srcq
|
|
|
|
sub src4q, srcq
|
|
|
|
sub src5q, srcq
|
|
|
|
.loop:
|
2012-07-15 20:55:21 +03:00
|
|
|
CVTPS2PI mm0, [srcq]
|
|
|
|
CVTPS2PI mm1, [srcq+src1q]
|
|
|
|
CVTPS2PI mm2, [srcq+src2q]
|
|
|
|
CVTPS2PI mm3, [srcq+src3q]
|
|
|
|
CVTPS2PI mm4, [srcq+src4q]
|
|
|
|
CVTPS2PI mm5, [srcq+src5q]
|
2011-01-30 17:06:46 +02:00
|
|
|
packssdw mm0, mm3
|
|
|
|
packssdw mm1, mm4
|
|
|
|
packssdw mm2, mm5
|
2012-08-02 01:55:34 +03:00
|
|
|
PSWAPD mm3, mm0
|
2011-01-30 17:06:46 +02:00
|
|
|
punpcklwd mm0, mm1
|
|
|
|
punpckhwd mm1, mm2
|
|
|
|
punpcklwd mm2, mm3
|
2012-08-02 01:55:34 +03:00
|
|
|
PSWAPD mm3, mm0
|
2011-01-30 17:06:46 +02:00
|
|
|
punpckldq mm0, mm2
|
|
|
|
punpckhdq mm2, mm1
|
|
|
|
punpckldq mm1, mm3
|
|
|
|
movq [dstq ], mm0
|
|
|
|
movq [dstq+16], mm2
|
|
|
|
movq [dstq+ 8], mm1
|
|
|
|
add srcq, 8
|
|
|
|
add dstq, 24
|
|
|
|
sub lend, 2
|
|
|
|
jg .loop
|
|
|
|
emms
|
|
|
|
RET
|
|
|
|
%endmacro ; FLOAT_TO_INT16_INTERLEAVE6
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
INIT_MMX sse
|
|
|
|
FLOAT_TO_INT16_INTERLEAVE6
|
|
|
|
INIT_MMX 3dnow
|
|
|
|
FLOAT_TO_INT16_INTERLEAVE6
|
|
|
|
INIT_MMX 3dnowext
|
|
|
|
FLOAT_TO_INT16_INTERLEAVE6
|
2011-04-25 00:50:17 +03:00
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; void ff_float_interleave6(float *dst, const float **src, unsigned int len);
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
%macro FLOAT_INTERLEAVE6 1
|
|
|
|
cglobal float_interleave6, 2, 8, %1, dst, src, src1, src2, src3, src4, src5, len
|
2012-01-23 12:45:58 +03:00
|
|
|
%if ARCH_X86_64
|
2011-04-25 00:50:17 +03:00
|
|
|
mov lend, r2d
|
|
|
|
%else
|
|
|
|
%define lend dword r2m
|
|
|
|
%endif
|
|
|
|
mov src1q, [srcq+1*gprsize]
|
|
|
|
mov src2q, [srcq+2*gprsize]
|
|
|
|
mov src3q, [srcq+3*gprsize]
|
|
|
|
mov src4q, [srcq+4*gprsize]
|
|
|
|
mov src5q, [srcq+5*gprsize]
|
|
|
|
mov srcq, [srcq]
|
|
|
|
sub src1q, srcq
|
|
|
|
sub src2q, srcq
|
|
|
|
sub src3q, srcq
|
|
|
|
sub src4q, srcq
|
|
|
|
sub src5q, srcq
|
|
|
|
.loop:
|
2012-07-15 16:42:17 +03:00
|
|
|
%if cpuflag(sse)
|
2011-04-25 00:50:17 +03:00
|
|
|
movaps m0, [srcq]
|
|
|
|
movaps m1, [srcq+src1q]
|
|
|
|
movaps m2, [srcq+src2q]
|
|
|
|
movaps m3, [srcq+src3q]
|
|
|
|
movaps m4, [srcq+src4q]
|
|
|
|
movaps m5, [srcq+src5q]
|
|
|
|
|
2011-05-22 00:36:23 +03:00
|
|
|
SBUTTERFLYPS 0, 1, 6
|
|
|
|
SBUTTERFLYPS 2, 3, 6
|
|
|
|
SBUTTERFLYPS 4, 5, 6
|
2011-04-25 00:50:17 +03:00
|
|
|
|
|
|
|
movaps m6, m4
|
|
|
|
shufps m4, m0, 0xe4
|
|
|
|
movlhps m0, m2
|
|
|
|
movhlps m6, m2
|
|
|
|
movaps [dstq ], m0
|
|
|
|
movaps [dstq+16], m4
|
|
|
|
movaps [dstq+32], m6
|
|
|
|
|
|
|
|
movaps m6, m5
|
|
|
|
shufps m5, m1, 0xe4
|
|
|
|
movlhps m1, m3
|
|
|
|
movhlps m6, m3
|
|
|
|
movaps [dstq+48], m1
|
|
|
|
movaps [dstq+64], m5
|
|
|
|
movaps [dstq+80], m6
|
|
|
|
%else ; mmx
|
|
|
|
movq m0, [srcq]
|
|
|
|
movq m1, [srcq+src1q]
|
|
|
|
movq m2, [srcq+src2q]
|
|
|
|
movq m3, [srcq+src3q]
|
|
|
|
movq m4, [srcq+src4q]
|
|
|
|
movq m5, [srcq+src5q]
|
|
|
|
|
|
|
|
SBUTTERFLY dq, 0, 1, 6
|
|
|
|
SBUTTERFLY dq, 2, 3, 6
|
|
|
|
SBUTTERFLY dq, 4, 5, 6
|
|
|
|
movq [dstq ], m0
|
|
|
|
movq [dstq+ 8], m2
|
|
|
|
movq [dstq+16], m4
|
|
|
|
movq [dstq+24], m1
|
|
|
|
movq [dstq+32], m3
|
|
|
|
movq [dstq+40], m5
|
|
|
|
%endif
|
|
|
|
add srcq, mmsize
|
|
|
|
add dstq, mmsize*6
|
|
|
|
sub lend, mmsize/4
|
|
|
|
jg .loop
|
2012-07-15 16:42:17 +03:00
|
|
|
%if mmsize == 8
|
2011-04-25 00:50:17 +03:00
|
|
|
emms
|
|
|
|
%endif
|
|
|
|
REP_RET
|
|
|
|
%endmacro
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
INIT_MMX mmx
|
|
|
|
FLOAT_INTERLEAVE6 0
|
|
|
|
INIT_XMM sse
|
|
|
|
FLOAT_INTERLEAVE6 7
|
2011-04-25 00:50:17 +03:00
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; void ff_float_interleave2(float *dst, const float **src, unsigned int len);
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
%macro FLOAT_INTERLEAVE2 1
|
|
|
|
cglobal float_interleave2, 3, 4, %1, dst, src, len, src1
|
2011-04-25 00:50:17 +03:00
|
|
|
mov src1q, [srcq+gprsize]
|
|
|
|
mov srcq, [srcq ]
|
|
|
|
sub src1q, srcq
|
2012-08-06 02:09:48 +03:00
|
|
|
.loop:
|
2012-07-15 16:42:17 +03:00
|
|
|
mova m0, [srcq ]
|
|
|
|
mova m1, [srcq+src1q ]
|
|
|
|
mova m3, [srcq +mmsize]
|
|
|
|
mova m4, [srcq+src1q+mmsize]
|
2011-04-25 00:50:17 +03:00
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
mova m2, m0
|
2011-04-25 00:50:17 +03:00
|
|
|
PUNPCKLDQ m0, m1
|
|
|
|
PUNPCKHDQ m2, m1
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
mova m1, m3
|
2011-04-25 00:50:17 +03:00
|
|
|
PUNPCKLDQ m3, m4
|
|
|
|
PUNPCKHDQ m1, m4
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
mova [dstq ], m0
|
|
|
|
mova [dstq+1*mmsize], m2
|
|
|
|
mova [dstq+2*mmsize], m3
|
|
|
|
mova [dstq+3*mmsize], m1
|
2011-04-25 00:50:17 +03:00
|
|
|
|
|
|
|
add srcq, mmsize*2
|
|
|
|
add dstq, mmsize*4
|
|
|
|
sub lend, mmsize/2
|
|
|
|
jg .loop
|
2012-07-15 16:42:17 +03:00
|
|
|
%if mmsize == 8
|
2011-04-25 00:50:17 +03:00
|
|
|
emms
|
|
|
|
%endif
|
|
|
|
REP_RET
|
|
|
|
%endmacro
|
|
|
|
|
2012-07-15 16:42:17 +03:00
|
|
|
INIT_MMX mmx
|
2011-04-25 00:50:17 +03:00
|
|
|
%define PUNPCKLDQ punpckldq
|
|
|
|
%define PUNPCKHDQ punpckhdq
|
2012-07-15 16:42:17 +03:00
|
|
|
FLOAT_INTERLEAVE2 0
|
|
|
|
INIT_XMM sse
|
2011-04-25 00:50:17 +03:00
|
|
|
%define PUNPCKLDQ unpcklps
|
|
|
|
%define PUNPCKHDQ unpckhps
|
2012-07-15 16:42:17 +03:00
|
|
|
FLOAT_INTERLEAVE2 5
|