REP_RET
%endmacro
+%macro INT16_TO_FLOAT 1
+cglobal int16_to_float_%1, 3, 3, 4, dst, src, len
+ mov srcq, [srcq]
+ mov dstq, [dstq]
+%ifidn %1, a
+ test dstq, mmsize-1
+ jne int16_to_float_u_int %+ SUFFIX
+ test srcq, mmsize-1
+ jne int16_to_float_u_int %+ SUFFIX
+%else
+int16_to_float_u_int %+ SUFFIX
+%endif
+ add dstq, lenq
+ shr lenq, 1
+ add srcq, lenq
+ neg lenq
+ mova m3, [flt2pm31]
+.next:
+ mov%1 m2, [srcq+lenq]
+ pxor m0, m0
+ pxor m1, m1
+ punpcklwd m0, m2
+ punpckhwd m1, m2
+ cvtdq2ps m0, m0
+ cvtdq2ps m1, m1
+ mulps m0, m3
+ mulps m1, m3
+ mov%1 [ dstq+2*lenq], m0
+ mov%1 [mmsize + dstq+2*lenq], m1
+ add lenq, mmsize
+ jl .next
+ REP_RET
+%endmacro
+
INIT_MMX mmx
INT16_TO_INT32 u
INIT_XMM sse2
INT32_TO_FLOAT u
INT32_TO_FLOAT a
+INT16_TO_FLOAT u
+INT16_TO_FLOAT a
MULTI_CAPS_FUNC_DECL(sse)
void ff_int32_to_float_a_sse2(uint8_t **dst, const uint8_t **src, int len);
+void ff_int16_to_float_a_sse2(uint8_t **dst, const uint8_t **src, int len);
void swri_audio_convert_init_x86(struct AudioConvert *ac,
enum AVSampleFormat out_fmt,
if(mm_flags & AV_CPU_FLAG_SSE2) {
if( out_fmt == AV_SAMPLE_FMT_FLT && in_fmt == AV_SAMPLE_FMT_S32 || out_fmt == AV_SAMPLE_FMT_FLTP && in_fmt == AV_SAMPLE_FMT_S32P)
ac->simd_f = ff_int32_to_float_a_sse2;
+ if( out_fmt == AV_SAMPLE_FMT_FLT && in_fmt == AV_SAMPLE_FMT_S16 || out_fmt == AV_SAMPLE_FMT_FLTP && in_fmt == AV_SAMPLE_FMT_S16P)
+ ac->simd_f = ff_int16_to_float_a_sse2;
}
}