Lines Matching refs:file

52 void dump_modes(FILE *file, CELTMode **modes, int nb_modes)  in dump_modes()  argument
56 fprintf(file, "/* The contents of this file was automatically generated by dump_modes.c\n"); in dump_modes()
57 fprintf(file, " with arguments:"); in dump_modes()
61 fprintf(file, " %d %d",mode->Fs,mode->shortMdctSize*mode->nbShortMdcts); in dump_modes()
63 fprintf(file, "\n It contains static definitions for some pre-defined modes. */\n"); in dump_modes()
64 fprintf(file, "#include \"modes.h\"\n"); in dump_modes()
65 fprintf(file, "#include \"rate.h\"\n"); in dump_modes()
66 fprintf(file, "\n#ifdef HAVE_ARM_NE10\n"); in dump_modes()
67 fprintf(file, "#define OVERRIDE_FFT 1\n"); in dump_modes()
68 fprintf(file, "#include \"%s\"\n", ARM_NE10_ARCH_FILE_NAME); in dump_modes()
69 fprintf(file, "#endif\n"); in dump_modes()
71 fprintf(file, "\n"); in dump_modes()
85 fprintf(file, "#ifndef DEF_EBANDS%d_%d\n", mode->Fs, mdctSize); in dump_modes()
86 fprintf(file, "#define DEF_EBANDS%d_%d\n", mode->Fs, mdctSize); in dump_modes()
87 …fprintf (file, "static const opus_int16 eBands%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->nbEBands… in dump_modes()
89 fprintf (file, "%d, ", mode->eBands[j]); in dump_modes()
90 fprintf (file, "};\n"); in dump_modes()
91 fprintf(file, "#endif\n"); in dump_modes()
92 fprintf(file, "\n"); in dump_modes()
95 fprintf(file, "#ifndef DEF_WINDOW%d\n", mode->overlap); in dump_modes()
96 fprintf(file, "#define DEF_WINDOW%d\n", mode->overlap); in dump_modes()
97 fprintf (file, "static const opus_val16 window%d[%d] = {\n", mode->overlap, mode->overlap); in dump_modes()
99 fprintf (file, WORD16 ",%c", mode->window[j],(j+6)%5==0?'\n':' '); in dump_modes()
100 fprintf (file, "};\n"); in dump_modes()
101 fprintf(file, "#endif\n"); in dump_modes()
102 fprintf(file, "\n"); in dump_modes()
106 fprintf(file, "#ifndef DEF_ALLOC_VECTORS%d_%d\n", mode->Fs, mdctSize); in dump_modes()
107 fprintf(file, "#define DEF_ALLOC_VECTORS%d_%d\n", mode->Fs, mdctSize); in dump_modes()
108 …fprintf (file, "static const unsigned char allocVectors%d_%d[%d] = {\n", mode->Fs, mdctSize, mode-… in dump_modes()
112 fprintf (file, "%2d, ", mode->allocVectors[j*mode->nbEBands+k]); in dump_modes()
113 fprintf (file, "\n"); in dump_modes()
115 fprintf (file, "};\n"); in dump_modes()
116 fprintf(file, "#endif\n"); in dump_modes()
117 fprintf(file, "\n"); in dump_modes()
120 fprintf(file, "#ifndef DEF_LOGN%d\n", framerate); in dump_modes()
121 fprintf(file, "#define DEF_LOGN%d\n", framerate); in dump_modes()
122 fprintf (file, "static const opus_int16 logN%d[%d] = {\n", framerate, mode->nbEBands); in dump_modes()
124 fprintf (file, "%d, ", mode->logN[j]); in dump_modes()
125 fprintf (file, "};\n"); in dump_modes()
126 fprintf(file, "#endif\n"); in dump_modes()
127 fprintf(file, "\n"); in dump_modes()
130 fprintf(file, "#ifndef DEF_PULSE_CACHE%d\n", mode->Fs/mdctSize); in dump_modes()
131 fprintf(file, "#define DEF_PULSE_CACHE%d\n", mode->Fs/mdctSize); in dump_modes()
132 …fprintf (file, "static const opus_int16 cache_index%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxLM+… in dump_modes()
134 fprintf (file, "%d,%c", mode->cache.index[j],(j+16)%15==0?'\n':' '); in dump_modes()
135 fprintf (file, "};\n"); in dump_modes()
136 …fprintf (file, "static const unsigned char cache_bits%d[%d] = {\n", mode->Fs/mdctSize, mode->cache… in dump_modes()
138 fprintf (file, "%d,%c", mode->cache.bits[j],(j+16)%15==0?'\n':' '); in dump_modes()
139 fprintf (file, "};\n"); in dump_modes()
140 …fprintf (file, "static const unsigned char cache_caps%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxL… in dump_modes()
142 fprintf (file, "%d,%c", mode->cache.caps[j],(j+16)%15==0?'\n':' '); in dump_modes()
143 fprintf (file, "};\n"); in dump_modes()
145 fprintf(file, "#endif\n"); in dump_modes()
146 fprintf(file, "\n"); in dump_modes()
149 fprintf(file, "#ifndef FFT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); in dump_modes()
150 fprintf(file, "#define FFT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); in dump_modes()
151 fprintf (file, "static const kiss_twiddle_cpx fft_twiddles%d_%d[%d] = {\n", in dump_modes()
154 …fprintf (file, "{" WORD16 ", " WORD16 "},%c", mode->mdct.kfft[0]->twiddles[j].r, mode->mdct.kfft[0… in dump_modes()
155 fprintf (file, "};\n"); in dump_modes()
163 fprintf(file, "#ifndef FFT_BITREV%d\n", mode->mdct.kfft[k]->nfft); in dump_modes()
164 fprintf(file, "#define FFT_BITREV%d\n", mode->mdct.kfft[k]->nfft); in dump_modes()
165 fprintf (file, "static const opus_int16 fft_bitrev%d[%d] = {\n", in dump_modes()
168 fprintf (file, "%d,%c", mode->mdct.kfft[k]->bitrev[j],(j+16)%15==0?'\n':' '); in dump_modes()
169 fprintf (file, "};\n"); in dump_modes()
171 fprintf(file, "#endif\n"); in dump_modes()
172 fprintf(file, "\n"); in dump_modes()
178 fprintf(file, "#ifndef FFT_STATE%d_%d_%d\n", mode->Fs, mdctSize, k); in dump_modes()
179 fprintf(file, "#define FFT_STATE%d_%d_%d\n", mode->Fs, mdctSize, k); in dump_modes()
180 fprintf (file, "static const kiss_fft_state fft_state%d_%d_%d = {\n", in dump_modes()
182 fprintf (file, "%d, /* nfft */\n", mode->mdct.kfft[k]->nfft); in dump_modes()
183 fprintf (file, WORD16 ", /* scale */\n", mode->mdct.kfft[k]->scale); in dump_modes()
185 fprintf (file, "%d, /* scale_shift */\n", mode->mdct.kfft[k]->scale_shift); in dump_modes()
187 fprintf (file, "%d, /* shift */\n", mode->mdct.kfft[k]->shift); in dump_modes()
188 fprintf (file, "{"); in dump_modes()
190 fprintf (file, "%d, ", mode->mdct.kfft[k]->factors[j]); in dump_modes()
191 fprintf (file, "}, /* factors */\n"); in dump_modes()
192 fprintf (file, "fft_bitrev%d, /* bitrev */\n", mode->mdct.kfft[k]->nfft); in dump_modes()
193 fprintf (file, "fft_twiddles%d_%d, /* bitrev */\n", mode->Fs, mdctSize); in dump_modes()
195 fprintf (file, "#ifdef OVERRIDE_FFT\n"); in dump_modes()
196 fprintf (file, "(arch_fft_state *)&cfg_arch_%d,\n", mode->mdct.kfft[k]->nfft); in dump_modes()
197 fprintf (file, "#else\n"); in dump_modes()
198 fprintf (file, "NULL,\n"); in dump_modes()
199 fprintf(file, "#endif\n"); in dump_modes()
201 fprintf (file, "};\n"); in dump_modes()
203 fprintf(file, "#endif\n"); in dump_modes()
204 fprintf(file, "\n"); in dump_modes()
207 fprintf(file, "#endif\n"); in dump_modes()
208 fprintf(file, "\n"); in dump_modes()
212 fprintf(file, "#ifndef MDCT_TWIDDLES%d\n", mdctSize); in dump_modes()
213 fprintf(file, "#define MDCT_TWIDDLES%d\n", mdctSize); in dump_modes()
214 fprintf (file, "static const opus_val16 mdct_twiddles%d[%d] = {\n", in dump_modes()
217 fprintf (file, WORD16 ",%c", mode->mdct.trig[j],(j+6)%5==0?'\n':' '); in dump_modes()
218 fprintf (file, "};\n"); in dump_modes()
220 fprintf(file, "#endif\n"); in dump_modes()
221 fprintf(file, "\n"); in dump_modes()
225 fprintf(file, "static const CELTMode mode%d_%d_%d = {\n", mode->Fs, mdctSize, mode->overlap); in dump_modes()
226 fprintf(file, INT32 ", /* Fs */\n", mode->Fs); in dump_modes()
227 fprintf(file, "%d, /* overlap */\n", mode->overlap); in dump_modes()
228 fprintf(file, "%d, /* nbEBands */\n", mode->nbEBands); in dump_modes()
229 fprintf(file, "%d, /* effEBands */\n", mode->effEBands); in dump_modes()
230 fprintf(file, "{"); in dump_modes()
232 fprintf(file, WORD16 ", ", mode->preemph[j]); in dump_modes()
233 fprintf(file, "}, /* preemph */\n"); in dump_modes()
235 fprintf(file, "eband5ms, /* eBands */\n"); in dump_modes()
237 fprintf(file, "eBands%d_%d, /* eBands */\n", mode->Fs, mdctSize); in dump_modes()
239 fprintf(file, "%d, /* maxLM */\n", mode->maxLM); in dump_modes()
240 fprintf(file, "%d, /* nbShortMdcts */\n", mode->nbShortMdcts); in dump_modes()
241 fprintf(file, "%d, /* shortMdctSize */\n", mode->shortMdctSize); in dump_modes()
243 fprintf(file, "%d, /* nbAllocVectors */\n", mode->nbAllocVectors); in dump_modes()
245 fprintf(file, "band_allocation, /* allocVectors */\n"); in dump_modes()
247 fprintf(file, "allocVectors%d_%d, /* allocVectors */\n", mode->Fs, mdctSize); in dump_modes()
249 fprintf(file, "logN%d, /* logN */\n", framerate); in dump_modes()
250 fprintf(file, "window%d, /* window */\n", mode->overlap); in dump_modes()
251 fprintf(file, "{%d, %d, {", mode->mdct.n, mode->mdct.maxshift); in dump_modes()
253 fprintf(file, "&fft_state%d_%d_%d, ", mode->Fs, mdctSize, k); in dump_modes()
254 fprintf (file, "}, mdct_twiddles%d}, /* mdct */\n", mdctSize); in dump_modes()
256 fprintf(file, "{%d, cache_index%d, cache_bits%d, cache_caps%d}, /* cache */\n", in dump_modes()
258 fprintf(file, "};\n"); in dump_modes()
260 fprintf(file, "\n"); in dump_modes()
261 fprintf(file, "/* List of all the available modes */\n"); in dump_modes()
262 fprintf(file, "#define TOTAL_MODES %d\n", nb_modes); in dump_modes()
263 fprintf(file, "static const CELTMode * const static_mode_list[TOTAL_MODES] = {\n"); in dump_modes()
269 fprintf(file, "&mode%d_%d_%d,\n", mode->Fs, mdctSize, mode->overlap); in dump_modes()
271 fprintf(file, "};\n"); in dump_modes()
274 void dump_header(FILE *file, CELTMode **modes, int nb_modes) in dump_header() argument
280 fprintf (file, "/* This header file is generated automatically*/\n"); in dump_header()
295 fprintf (file, "#define CHANNELS(mode) %d\n", channels); in dump_header()
297 fprintf (file, "#define DISABLE_STEREO\n"); in dump_header()
301 fprintf (file, "#define FRAMESIZE(mode) %d\n", frame_size); in dump_header()
305 fprintf (file, "#define OVERLAP(mode) %d\n", overlap); in dump_header()
318 FILE *file; in main() local
340 file = fopen(BASENAME ".h", "w"); in main()
344 dump_modes(file, m, nb); in main()
345 fclose(file); in main()