#ifdef HAVE_MMXEXT
#include "i386/quant.h"
#endif
+#ifdef ARCH_PPC
+# include "ppc/quant.h"
+#endif
#define QUANT_ONE( coef, mf ) \
{ \
pf->dequant_4x4 = dequant_4x4;
pf->dequant_8x8 = dequant_8x8;
-#ifdef HAVE_MMXEXT
-
/* determine the biggest coefficient in all quant8_mf tables */
for( j = 0; j < 2; j++ )
for( i = 0; i < 6*8*8; i++ )
maxQdc = q;
}
+#ifdef HAVE_MMXEXT
+
/* select quant_8x8 based on CPU and maxQ8 */
if( maxQ8 < (1<<15) && cpu&X264_CPU_MMX )
pf->quant_8x8_core = x264_quant_8x8_core15_mmx;
pf->dequant_8x8 = x264_dequant_8x8_mmx;
}
#endif /* HAVE_MMXEXT */
+
+#ifdef ARCH_PPC
+ if( cpu&X264_CPU_ALTIVEC ) {
+ if( maxQ8 < (1<<16) )
+ {
+ pf->quant_8x8_core = x264_quant_8x8_altivec;
+ }
+ if( maxQ4 < (1<<16) )
+ {
+ pf->quant_4x4_core = x264_quant_4x4_altivec;
+ }
+ if( maxQdc < (1<<16) )
+ {
+ pf->quant_4x4_dc_core = x264_quant_4x4_dc_altivec;
+ }
+ }
+#endif /* ARCH_PPC */
}