summaryrefslogtreecommitdiff
path: root/postproc/swscale_template.c
diff options
context:
space:
mode:
authorRomain Dolbeau <dolbeau@irisa.fr>2004-03-11 17:58:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-03-11 17:58:11 +0000
commita2faa401924b7d3c6d21169762f4340a1331ef48 (patch)
tree863d209e48b22c941164ee5a14ff892da3094b6d /postproc/swscale_template.c
parent08abe0fd66a03b50238654c93a172a059d09ac18 (diff)
AltiVec support in postproc/ + altivec optimizations for yuv2yuvX patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
Originally committed as revision 12018 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale_template.c')
-rw-r--r--postproc/swscale_template.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c
index ebdb6c33d1..6a8117f2fb 100644
--- a/postproc/swscale_template.c
+++ b/postproc/swscale_template.c
@@ -59,6 +59,10 @@
#define MOVNTQ(a,b) "movq " #a ", " #b " \n\t"
#endif
+#ifdef HAVE_ALTIVEC
+#include "swscale_altivec_template.c"
+#endif
+
#define YSCALEYUV2YV12X(x, offset) \
"xorl %%eax, %%eax \n\t"\
"movq "VROUNDER_OFFSET"(%0), %%mm3\n\t"\
@@ -766,9 +770,15 @@ static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t *
: "%eax", "%edx", "%esi"
);
#else
+#ifdef HAVE_ALTIVEC
+yuv2yuvX_altivec_real(lumFilter, lumSrc, lumFilterSize,
+ chrFilter, chrSrc, chrFilterSize,
+ dest, uDest, vDest, dstW, chrDstW);
+#else //HAVE_ALTIVEC
yuv2yuvXinC(lumFilter, lumSrc, lumFilterSize,
chrFilter, chrSrc, chrFilterSize,
dest, uDest, vDest, dstW, chrDstW);
+#endif //!HAVE_ALTIVEC
#endif
}