comparison pcmu2efr/amrefr-out.c @ 19:2bdcd2ed9a1c

pcmu2efr: generate AMR-EFR version
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 12 May 2024 00:56:42 +0000
parents pcmu2efr/stdefr-out.c@528eef871e23
children
comparison
equal deleted inserted replaced
18:6bcb8e4ea669 19:2bdcd2ed9a1c
1 /*
2 * This program computes 160 possible EFR encoder outputs using AMR-EFR hybrid,
3 * and writes the result out to a gsmx file.
4 */
5
6 #include <stdio.h>
7 #include <stdint.h>
8 #include <stdlib.h>
9
10 extern uint8_t amr_efr[160][31];
11
12 main(argc, argv)
13 char **argv;
14 {
15 FILE *outf;
16
17 if (argc != 2) {
18 fprintf(stderr, "usage: %s gsmx-out-file\n", argv[0]);
19 exit(1);
20 }
21 generate_linear_inputs();
22 generate_amr_efr();
23 outf = fopen(argv[1], "w");
24 if (!outf) {
25 perror(argv[1]);
26 exit(1);
27 }
28 fwrite(amr_efr, 31, 160, outf);
29 fclose(outf);
30 exit(0);
31 }