AltiVec support in postproc/ + altivec optimizations for yuv2yuvX patch by (Romain...
[ffmpeg.git] / postproc / swscale_template.c
index ebdb6c3..6a8117f 100644 (file)
 #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
 }