2 // a52_resample_init should find the requested converter (from type flags ->
3 // given number of channels) and set up some function pointers...
5 // a52_resample() should do the conversion.
11 #include "../config.h"
14 int (* a52_resample
) (float * _f
, int16_t * s16
)=NULL
;
16 #include "resample_c.c"
18 #if defined(ARCH_X86) || defined(ARCH_X86_64)
19 #include "resample_mmx.c"
23 #include "resample_altivec.c"
26 void* a52_resample_init(uint32_t mm_accel
,int flags
,int chans
){
29 #if defined(ARCH_X86) || defined(ARCH_X86_64)
30 if(mm_accel
&MM_ACCEL_X86_MMX
){
31 tmp
=a52_resample_MMX(flags
,chans
);
33 if(a52_resample
==NULL
) fprintf(stderr
, "Using MMX optimized resampler\n");
40 if(mm_accel
&MM_ACCEL_PPC_ALTIVEC
){
41 tmp
=a52_resample_altivec(flags
,chans
);
43 if(a52_resample
==NULL
) fprintf(stderr
, "Using AltiVec optimized resampler\n");
50 tmp
=a52_resample_C(flags
,chans
);
52 if(a52_resample
==NULL
) fprintf(stderr
, "No accelerated resampler found\n");
57 fprintf(stderr
, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags
, chans
);