30 #define COMMON_CORE_INT16_MMX2 \
31 x86_reg len= -2*c->filter_length;\
33 "movq "MANGLE(ff_resample_int16_rounder)", %%mm0 \n\t"\
35 "movq (%1, %0), %%mm1 \n\t"\
36 "pmaddwd (%2, %0), %%mm1 \n\t"\
37 "paddd %%mm1, %%mm0 \n\t"\
40 "pshufw $0x0E, %%mm0, %%mm1 \n\t"\
41 "paddd %%mm1, %%mm0 \n\t"\
42 "psrad $15, %%mm0 \n\t"\
43 "packssdw %%mm0, %%mm0 \n\t"\
44 "movd %%mm0, (%3) \n\t"\
46 : "r" (((uint8_t*)(src+sample_index))-len),\
47 "r" (((uint8_t*)filter)-len),\
51 #define COMMON_CORE_INT16_SSSE3 \
52 x86_reg len= -2*c->filter_length;\
54 "movdqa "MANGLE(ff_resample_int16_rounder)", %%xmm0 \n\t"\
56 "movdqu (%1, %0), %%xmm1 \n\t"\
57 "pmaddwd (%2, %0), %%xmm1 \n\t"\
58 "paddd %%xmm1, %%xmm0 \n\t"\
61 "phaddd %%xmm0, %%xmm0 \n\t"\
62 "phaddd %%xmm0, %%xmm0 \n\t"\
63 "psrad $15, %%xmm0 \n\t"\
64 "packssdw %%xmm0, %%xmm0 \n\t"\
65 "movd %%xmm0, (%3) \n\t"\
67 : "r" (((uint8_t*)(src+sample_index))-len),\
68 "r" (((uint8_t*)filter)-len),\