annotate liba52/resample_c.c @ 2946:ac94d509884e libavcodec

dvbsub encoder, patch by Wolfram Gloger < wmglo AH dent POIS med POIS uni-muenchen POIS de > Original thread: Date: 8 Oct 2005 09:35:38 -0000 Subject: [Ffmpeg-devel] [PATCH] dvdsub encoder -- 2nd version
author gpoirier
date Mon, 14 Nov 2005 22:17:29 +0000
parents 6a6dbba3da95
children e2aafe2aa2df
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1193
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
1 // this code is based on a52dec/libao/audio_out_oss.c
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
2
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
3 static inline int16_t convert (int32_t i)
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
4 {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
5 if (i > 0x43c07fff)
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
6 return 32767;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
7 else if (i < 0x43bf8000)
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
8 return -32768;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
9 else
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
10 return i - 0x43c00000;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
11 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
12
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
13 static int a52_resample_MONO_to_5_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
14 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
15 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
16 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
17 s16[5*i] = s16[5*i+1] = s16[5*i+2] = s16[5*i+3] = 0;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
18 s16[5*i+4] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
19 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
20 return 5*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
21 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
22
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
23 static int a52_resample_MONO_to_1_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
24 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
25 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
26 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
27 s16[i] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
28 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
29 return 1*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
30 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
31
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
32 static int a52_resample_STEREO_to_2_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
33 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
34 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
35 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
36 s16[2*i] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
37 s16[2*i+1] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
38 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
39 return 2*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
40 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
41
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
42 static int a52_resample_3F_to_5_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
43 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
44 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
45 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
46 s16[5*i] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
47 s16[5*i+1] = convert (f[i+512]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
48 s16[5*i+2] = s16[5*i+3] = 0;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
49 s16[5*i+4] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
50 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
51 return 5*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
52 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
53
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
54 static int a52_resample_2F_2R_to_4_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
55 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
56 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
57 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
58 s16[4*i] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
59 s16[4*i+1] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
60 s16[4*i+2] = convert (f[i+512]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
61 s16[4*i+3] = convert (f[i+768]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
62 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
63 return 4*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
64 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
65
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
66 static int a52_resample_3F_2R_to_5_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
67 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
68 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
69 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
70 s16[5*i] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
71 s16[5*i+1] = convert (f[i+512]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
72 s16[5*i+2] = convert (f[i+768]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
73 s16[5*i+3] = convert (f[i+1024]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
74 s16[5*i+4] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
75 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
76 return 5*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
77 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
78
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
79 static int a52_resample_MONO_LFE_to_6_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
80 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
81 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
82 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
83 s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
84 s16[6*i+4] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
85 s16[6*i+5] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
86 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
87 return 6*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
88 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
89
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
90 static int a52_resample_STEREO_LFE_to_6_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
91 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
92 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
93 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
94 s16[6*i] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
95 s16[6*i+1] = convert (f[i+512]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
96 s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
97 s16[6*i+5] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
98 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
99 return 6*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
100 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
101
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
102 static int a52_resample_3F_LFE_to_6_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
103 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
104 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
105 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
106 s16[6*i] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
107 s16[6*i+1] = convert (f[i+768]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
108 s16[6*i+2] = s16[6*i+3] = 0;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
109 s16[6*i+4] = convert (f[i+512]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
110 s16[6*i+5] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
111 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
112 return 6*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
113 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
114
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
115 static int a52_resample_2F_2R_LFE_to_6_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
116 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
117 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
118 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
119 s16[6*i] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
120 s16[6*i+1] = convert (f[i+512]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
121 s16[6*i+2] = convert (f[i+768]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
122 s16[6*i+3] = convert (f[i+1024]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
123 s16[6*i+4] = 0;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
124 s16[6*i+5] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
125 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
126 return 6*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
127 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
128
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
129 static int a52_resample_3F_2R_LFE_to_6_C(float * _f, int16_t * s16){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
130 int i;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
131 int32_t * f = (int32_t *) _f;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
132 for (i = 0; i < 256; i++) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
133 s16[6*i] = convert (f[i+256]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
134 s16[6*i+1] = convert (f[i+768]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
135 s16[6*i+2] = convert (f[i+1024]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
136 s16[6*i+3] = convert (f[i+1280]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
137 s16[6*i+4] = convert (f[i+512]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
138 s16[6*i+5] = convert (f[i]);
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
139 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
140 return 6*256;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
141 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
142
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
143
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
144 static void* a52_resample_C(int flags, int ch){
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
145 switch (flags) {
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
146 case A52_MONO:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
147 if(ch==5) return a52_resample_MONO_to_5_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
148 if(ch==1) return a52_resample_MONO_to_1_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
149 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
150 case A52_CHANNEL:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
151 case A52_STEREO:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
152 case A52_DOLBY:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
153 if(ch==2) return a52_resample_STEREO_to_2_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
154 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
155 case A52_3F:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
156 if(ch==5) return a52_resample_3F_to_5_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
157 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
158 case A52_2F2R:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
159 if(ch==4) return a52_resample_2F_2R_to_4_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
160 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
161 case A52_3F2R:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
162 if(ch==5) return a52_resample_3F_2R_to_5_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
163 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
164 case A52_MONO | A52_LFE:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
165 if(ch==6) return a52_resample_MONO_LFE_to_6_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
166 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
167 case A52_CHANNEL | A52_LFE:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
168 case A52_STEREO | A52_LFE:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
169 case A52_DOLBY | A52_LFE:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
170 if(ch==6) return a52_resample_STEREO_LFE_to_6_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
171 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
172 case A52_3F | A52_LFE:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
173 if(ch==6) return a52_resample_3F_LFE_to_6_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
174 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
175 case A52_2F2R | A52_LFE:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
176 if(ch==6) return a52_resample_2F_2R_LFE_to_6_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
177 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
178 case A52_3F2R | A52_LFE:
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
179 if(ch==6) return a52_resample_3F_2R_LFE_to_6_C;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
180 break;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
181 }
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
182 return NULL;
6a6dbba3da95 Utility functions (CRC calc & float->int converters)
arpi_esp
parents:
diff changeset
183 }