You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1KB

  1. // a52_resample_init should find the requested converter (from type flags ->
  2. // given number of channels) and set up some function pointers...
  3. // a52_resample() should do the conversion.
  4. #include "a52.h"
  5. #include "mm_accel.h"
  6. #include "config.h"
  7. #include "../libpostproc/mangle.h"
  8. int (* a52_resample) (float * _f, int16_t * s16)=NULL;
  9. #include "resample_c.c"
  10. #ifdef ARCH_X86
  11. #include "resample_mmx.c"
  12. #endif
  13. void* a52_resample_init(uint32_t mm_accel,int flags,int chans){
  14. void* tmp;
  15. #ifdef ARCH_X86
  16. if(mm_accel&MM_ACCEL_X86_MMX){
  17. tmp=a52_resample_MMX(flags,chans);
  18. if(tmp){
  19. if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "Using MMX optimized resampler\n");
  20. a52_resample=tmp;
  21. return tmp;
  22. }
  23. }
  24. #endif
  25. tmp=a52_resample_C(flags,chans);
  26. if(tmp){
  27. if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "No accelerated resampler found\n");
  28. a52_resample=tmp;
  29. return tmp;
  30. }
  31. av_log(NULL, AV_LOG_ERROR, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans);
  32. return NULL;
  33. }