20#include "libavutil/cpu.h"
24 return (av_get_cpu_flags() & AV_CPU_FLAG_MMX);
39 for (
int loop=0; loop<bufsize; loop++)
44 int myPos = loop << 1;
45 int myPos2 = myPos + 1;
46 int brutSmypos =
brutS[myPos];
51 brutSmypos =
brutS[myPos2];
58 if ((py>=(
int)ay) || (px>=(
int)ax))
68 int posplusprevX = pos +
prevX;
73 movq_m2r(
expix1[pos], mm0);
77 punpcklbw_r2r(mm7, mm0);
81 punpckhbw_r2r(mm7, mm1);
84 punpcklbw_r2r(mm5, mm6);
87 punpcklbw_r2r(mm5, mm6);
88 punpckhbw_r2r(mm5, mm4);
91 punpcklbw_r2r(mm7, mm6);
92 punpckhbw_r2r(mm7, mm3);
101 punpcklbw_r2r(mm7, mm4);
102 punpckhbw_r2r(mm7, mm5);
106 movq_m2r(
expix1[posplusprevX], mm1);
110 punpcklbw_r2r(mm7, mm1);
111 punpckhbw_r2r(mm7, mm2);
114 pmullw_r2r(mm4, mm1);
115 pmullw_r2r(mm5, mm2);
123 packuswb_r2r(mm7, mm0);
124 movd_r2m(mm0,
expix2[loop]);
136 [[maybe_unused]]
int prevY,
137 [[maybe_unused]]
const unsigned int *
expix1,
138 [[maybe_unused]]
unsigned int *
expix2,
139 [[maybe_unused]]
const int *
brutS,
140 [[maybe_unused]]
const int *
brutD,
GoomCoefficients precalCoef
modif d'optim by Jeko : precalcul des 4 coefs résultant des 2 pos
int buffratio
modif by jeko : fixedpoint : buffration = (16:16) (donc 0<=buffration<=2^16)
static constexpr uint8_t BUFFPOINTNB
void zoom_filter_mmx(int prevX, int prevY, const unsigned int *expix1, unsigned int *expix2, const int *brutS, const int *brutD, int buffratio, const GoomCoefficients &precalCoef)
int zoom_filter_mmx_supported()
static constexpr uint8_t PERTEMASK
static constexpr uint8_t PERTEDEC
std::array< std::array< int, 16 >, 16 > GoomCoefficients