Mercurial > mplayer.hg
annotate liba52/resample.c @ 3946:c00db356082f
headers cleanup
author | arpi |
---|---|
date | Wed, 02 Jan 2002 17:11:09 +0000 |
parents | ef32c8bdee81 |
children | 2dbd637ffe05 |
rev | line source |
---|---|
3412
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
1 |
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
2 // a52_resample_init should find the requested converter (from type flags -> |
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
3 // given number of channels) and set up some function pointers... |
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
4 |
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
5 // a52_resample() should do the conversion. |
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
6 |
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
7 #include <inttypes.h> |
3626 | 8 #include <stdio.h> |
3412
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
9 #include "a52.h" |
3908 | 10 #include "mm_accel.h" |
3567 | 11 #include "../config.h" |
12 | |
3626 | 13 int (* a52_resample) (float * _f, int16_t * s16)=NULL; |
14 | |
3909 | 15 #include "resample_c.c" |
16 | |
3626 | 17 #ifdef ARCH_X86 |
3909 | 18 #include "resample_mmx.c" |
3567 | 19 #endif |
3412
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
20 |
3909 | 21 void* a52_resample_init(uint32_t mm_accel,int flags,int chans){ |
22 void* tmp; | |
3626 | 23 |
24 #ifdef ARCH_X86 | |
3909 | 25 if(mm_accel&MM_ACCEL_X86_MMX){ |
26 tmp=a52_resample_MMX(flags,chans); | |
27 if(tmp){ | |
28 if(a52_resample==NULL) fprintf(stderr, "Using MMX optimized resampler\n"); | |
29 a52_resample=tmp; | |
30 return tmp; | |
31 } | |
32 } | |
33 #endif | |
3626 | 34 |
3909 | 35 tmp=a52_resample_C(flags,chans); |
36 if(tmp){ | |
37 if(a52_resample==NULL) fprintf(stderr, "No accelerated resampler found\n"); | |
38 a52_resample=tmp; | |
39 return tmp; | |
3626 | 40 } |
41 | |
3909 | 42 fprintf(stderr, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans); |
43 return NULL; | |
3626 | 44 } |