On Thu, 14 Jun 2012, Mans Rullgard wrote: > --- a/libavcodec/x86/fmtconvert.asm > +++ b/libavcodec/x86/fmtconvert.asm > @@ -115,6 +115,85 @@ FLOAT_TO_INT16 sse, 0 > FLOAT_TO_INT16 3dnow, 0 > %undef cvtps2pi > > +;------------------------------------------------------------------------------ > +; void ff_float_to_int16_step(int16_t *dst, const float *src, long len, long > step); > +;------------------------------------------------------------------------------ > +%macro FLOAT_TO_INT16_STEP 2 > +cglobal float_to_int16_step_%1, 4,7,%2, dst, src, len, step, step3, v1, v2 > + add lenq, lenq > + lea srcq, [srcq+2*lenq] > + lea step3q, [stepq*3] > + neg lenq > +.loop: > +%ifidn %1, sse2 > + 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 > + psrldq m0, 4
The result of this instruction is unused. > + 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] --Loren Merritt _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel