annotate liba52/resample_c.c @ 15140:0b29b871f5b4

credits for Jeff Clagg
author diego
date Wed, 13 Apr 2005 01:56:53 +0000
parents faf5af8e5481
children b393dffbbcc7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
1 // this code is based on a52dec/libao/audio_out_oss.c
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
2
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
3 static inline int16_t convert (int32_t i)
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 if (i > 0x43c07fff)
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
6 return 32767;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
7 else if (i < 0x43bf8000)
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
8 return -32768;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
9 else
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
10 return i - 0x43c00000;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
11 }
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
12
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
13 static int a52_resample_MONO_to_5_C(float * _f, int16_t * s16){
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
14 int i;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
15 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
16 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
17 s16[5*i] = s16[5*i+1] = s16[5*i+2] = s16[5*i+3] = 0;
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
18 s16[5*i+4] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
19 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
20 return 5*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
21 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
22
3967
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
23 static int a52_resample_MONO_to_1_C(float * _f, int16_t * s16){
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
24 int i;
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
25 int32_t * f = (int32_t *) _f;
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
26 for (i = 0; i < 256; i++) {
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
27 s16[i] = convert (f[i]);
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
28 }
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
29 return 1*256;
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
30 }
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
31
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
32 static int a52_resample_STEREO_to_2_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
33 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
34 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
35 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
36 s16[2*i] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
37 s16[2*i+1] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
38 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
39 return 2*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
40 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
41
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
42 static int a52_resample_3F_to_5_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
43 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
44 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
45 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
46 s16[5*i] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
47 s16[5*i+1] = convert (f[i+512]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
48 s16[5*i+2] = s16[5*i+3] = 0;
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
49 s16[5*i+4] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
50 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
51 return 5*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
52 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
53
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
54 static int a52_resample_2F_2R_to_4_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
55 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
56 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
57 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
58 s16[4*i] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
59 s16[4*i+1] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
60 s16[4*i+2] = convert (f[i+512]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
61 s16[4*i+3] = convert (f[i+768]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
62 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
63 return 4*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
64 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
65
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
66 static int a52_resample_3F_2R_to_5_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
67 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
68 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
69 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
70 s16[5*i] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
71 s16[5*i+1] = convert (f[i+512]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
72 s16[5*i+2] = convert (f[i+768]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
73 s16[5*i+3] = convert (f[i+1024]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
74 s16[5*i+4] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
75 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
76 return 5*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
77 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
78
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
79 static int a52_resample_MONO_LFE_to_6_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
80 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
81 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
82 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
83 s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0;
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
84 s16[6*i+4] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
85 s16[6*i+5] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
86 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
87 return 6*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
88 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
89
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
90 static int a52_resample_STEREO_LFE_to_6_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
91 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
92 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
93 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
94 s16[6*i] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
95 s16[6*i+1] = convert (f[i+512]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
96 s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0;
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
97 s16[6*i+5] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
98 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
99 return 6*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
100 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
101
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
102 static int a52_resample_3F_LFE_to_6_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
103 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
104 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
105 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
106 s16[6*i] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
107 s16[6*i+1] = convert (f[i+768]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
108 s16[6*i+2] = s16[6*i+3] = 0;
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
109 s16[6*i+4] = convert (f[i+512]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
110 s16[6*i+5] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
111 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
112 return 6*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
113 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
114
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
115 static int a52_resample_2F_2R_LFE_to_6_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
116 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
117 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
118 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
119 s16[6*i] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
120 s16[6*i+1] = convert (f[i+512]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
121 s16[6*i+2] = convert (f[i+768]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
122 s16[6*i+3] = convert (f[i+1024]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
123 s16[6*i+4] = 0;
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
124 s16[6*i+5] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
125 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
126 return 6*256;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
127 }
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
128
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
129 static int a52_resample_3F_2R_LFE_to_6_C(float * _f, int16_t * s16){
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
130 int i;
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
131 int32_t * f = (int32_t *) _f;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
132 for (i = 0; i < 256; i++) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
133 s16[6*i] = convert (f[i+256]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
134 s16[6*i+1] = convert (f[i+768]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
135 s16[6*i+2] = convert (f[i+1024]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
136 s16[6*i+3] = convert (f[i+1280]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
137 s16[6*i+4] = convert (f[i+512]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
138 s16[6*i+5] = convert (f[i]);
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
139 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
140 return 6*256;
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
141 }
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
142
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
143
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
144 static void* a52_resample_C(int flags, int ch){
3626
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
145 switch (flags) {
e22ff7ebdc05 runtime cpu detection for the resample stuff
michael
parents: 3578
diff changeset
146 case A52_MONO:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
147 if(ch==5) return a52_resample_MONO_to_5_C;
3967
faf5af8e5481 mono ac3 support
arpi
parents: 3909
diff changeset
148 if(ch==1) return a52_resample_MONO_to_1_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
149 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
150 case A52_CHANNEL:
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
151 case A52_STEREO:
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
152 case A52_DOLBY:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
153 if(ch==2) return a52_resample_STEREO_to_2_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
154 break;
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
155 case A52_3F:
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
156 if(ch==5) return a52_resample_3F_to_5_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
157 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
158 case A52_2F2R:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
159 if(ch==4) return a52_resample_2F_2R_to_4_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
160 break;
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
161 case A52_3F2R:
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
162 if(ch==5) return a52_resample_3F_2R_to_5_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
163 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
164 case A52_MONO | A52_LFE:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
165 if(ch==6) return a52_resample_MONO_LFE_to_6_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
166 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
167 case A52_CHANNEL | A52_LFE:
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
168 case A52_STEREO | A52_LFE:
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
169 case A52_DOLBY | A52_LFE:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
170 if(ch==6) return a52_resample_STEREO_LFE_to_6_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
171 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
172 case A52_3F | A52_LFE:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
173 if(ch==6) return a52_resample_3F_LFE_to_6_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
174 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
175 case A52_2F2R | A52_LFE:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
176 if(ch==6) return a52_resample_2F_2R_LFE_to_6_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
177 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
178 case A52_3F2R | A52_LFE:
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
179 if(ch==6) return a52_resample_3F_2R_LFE_to_6_C;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
180 break;
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
181 }
3909
ef32c8bdee81 c, mmx versions separated. a52 style runtime stuff
arpi
parents: 3908
diff changeset
182 return NULL;
3412
21d65a4ae3c9 resample.c added - float->int conversion and channel ordering
arpi
parents:
diff changeset
183 }