3 #if defined(MMX) && !(defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64))
10 #define BUFFPOINTNB 16
11 #define BUFFPOINTMASK 0xffff
24 #include "libavutil/cpu.h"
28 return (av_get_cpu_flags() & AV_CPU_FLAG_SSE) >> 3;
33 const int *lbruS,
const int *lbruD,
int buffratio,
39 mmx_t *
brutS = (mmx_t*)lbruS;
40 mmx_t *
brutD = (mmx_t*)lbruD;
42 volatile mmx_t prevXY;
43 volatile mmx_t ratiox;
53 movq_m2r (ratiox, mm6);
63 while (loop < bufsize)
71 __asm__ __volatile__ (
81 mmx_r2r (pmulhuw, mm6, mm1);
82 pmullw_r2r (mm6, mm2);
96 movq_m2r (prevXY,mm1);
97 pcmpgtd_r2r (mm0, mm1);
103 punpckhdq_r2r (mm2,mm2);
104 punpckldq_r2r (mm1,mm1);
117 __asm__ __volatile__ (
130 "movd (%%ecx,%%eax,4),%%mm3\n"
165 __asm__ __volatile__ (
171 "punpcklbw %%mm5, %%mm3\n"
178 "punpcklbw %%mm5,%%mm3\n"
180 "movq (%%ecx,%%eax,4),%%mm0\n"
181 "punpckhbw %%mm5,%%mm4\n"
184 "movq (%%ecx,%%eax,4),%%mm2\n"
199 punpcklbw_r2r (mm7, mm0);
206 punpckhbw_r2r (mm7, mm1);
208 punpcklbw_r2r (mm7, mm5);
209 punpckhbw_r2r (mm7, mm3);
212 pmullw_r2r (mm5, mm0);
213 pmullw_r2r (mm3, mm1);
214 paddw_r2r (mm1, mm0);
218 punpcklbw_r2r (mm7, mm4);
219 punpckhbw_r2r (mm7, mm5);
225 punpcklbw_r2r (mm7, mm1);
226 punpckhbw_r2r (mm7, mm2);
229 pmullw_r2r (mm4, mm1);
230 pmullw_r2r (mm5, mm2);
233 paddw_r2r (mm1, mm0);
234 paddw_r2r (mm2, mm0);
238 packuswb_r2r (mm7, mm0);
240 movd_r2m (mm0,
expix2[loop]);
245 __asm__ __volatile__ (
"femms\n");
255 [[maybe_unused]]
int prevY,
256 [[maybe_unused]]
unsigned int *
expix1,
257 [[maybe_unused]]
unsigned int *
expix2,
258 [[maybe_unused]]
const int *
brutS,
259 [[maybe_unused]]
const int *
brutD,