Mercurial > mplayer.hg
annotate liba52/resample.c @ 10509:d9d24093db2e
Export flags needed for softpulldown filter.
author | ranma |
---|---|
date | Sun, 03 Aug 2003 12:04:57 +0000 |
parents | 2dbd637ffe05 |
children | 459ba3f14302 |
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" |
4247
2dbd637ffe05
mangle for win32 in liba52 (includes dummy mangle.h pointing to the one in main)
atmos4
parents:
3909
diff
changeset
|
12 #include "mangle.h" |
3567 | 13 |
3626 | 14 int (* a52_resample) (float * _f, int16_t * s16)=NULL; |
15 | |
3909 | 16 #include "resample_c.c" |
17 | |
3626 | 18 #ifdef ARCH_X86 |
3909 | 19 #include "resample_mmx.c" |
3567 | 20 #endif |
3412
21d65a4ae3c9
resample.c added - float->int conversion and channel ordering
arpi
parents:
diff
changeset
|
21 |
3909 | 22 void* a52_resample_init(uint32_t mm_accel,int flags,int chans){ |
23 void* tmp; | |
3626 | 24 |
25 #ifdef ARCH_X86 | |
3909 | 26 if(mm_accel&MM_ACCEL_X86_MMX){ |
27 tmp=a52_resample_MMX(flags,chans); | |
28 if(tmp){ | |
29 if(a52_resample==NULL) fprintf(stderr, "Using MMX optimized resampler\n"); | |
30 a52_resample=tmp; | |
31 return tmp; | |
32 } | |
33 } | |
34 #endif | |
3626 | 35 |
3909 | 36 tmp=a52_resample_C(flags,chans); |
37 if(tmp){ | |
38 if(a52_resample==NULL) fprintf(stderr, "No accelerated resampler found\n"); | |
39 a52_resample=tmp; | |
40 return tmp; | |
3626 | 41 } |
42 | |
3909 | 43 fprintf(stderr, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans); |
44 return NULL; | |
3626 | 45 } |