00001
00002
00003
00004
00005
00006
00007 #include "a52.h"
00008 #include "mm_accel.h"
00009 #include "config.h"
00010 #include "../libpostproc/mangle.h"
00011
00012 int (* a52_resample) (float * _f, int16_t * s16)=NULL;
00013
00014 #include "resample_c.c"
00015
00016 #ifdef ARCH_X86
00017 #include "resample_mmx.c"
00018 #endif
00019
00020 void* a52_resample_init(uint32_t mm_accel,int flags,int chans){
00021 void* tmp;
00022
00023 #ifdef ARCH_X86
00024 if(mm_accel&MM_ACCEL_X86_MMX){
00025 tmp=a52_resample_MMX(flags,chans);
00026 if(tmp){
00027 if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "Using MMX optimized resampler\n");
00028 a52_resample=tmp;
00029 return tmp;
00030 }
00031 }
00032 #endif
00033
00034 tmp=a52_resample_C(flags,chans);
00035 if(tmp){
00036 if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "No accelerated resampler found\n");
00037 a52_resample=tmp;
00038 return tmp;
00039 }
00040
00041 av_log(NULL, AV_LOG_ERROR, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans);
00042 return NULL;
00043 }