annotate amrconv/param_dump.c @ 354:e4ce7972737f

libtwamr: add DHF tables
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 05 May 2024 21:34:23 +0000
parents 78d1a6513393
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
211
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This C module is common between amr-cod-parse and amr-ietf-parse
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * utilities. It contains the function that takes an array of
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * extracted codec parameters and prints them out as appropriate
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * for each mode.
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include <stdio.h>
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include <stdint.h>
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include "amr_defs.h"
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 void
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 dump_amr_params(params, mode)
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 uint16_t *params;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 unsigned mode;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 int i, j, n;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 switch (mode) {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 case MR475:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 printf(" %u %u %u\n", params[0], params[1], params[2]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 printf(" %u %u %u %u\n", params[3], params[4], params[5],
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 params[6]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 printf(" %u %u %u\n", params[7], params[8], params[9]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 printf(" %u %u %u %u\n", params[10], params[11], params[12],
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 params[13]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 printf(" %u %u %u\n", params[14], params[15], params[16]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 return;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 case MR515:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 case MR59:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 case MR67:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 case MR74:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 printf(" %u %u %u\n", params[0], params[1], params[2]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 n = 3;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 for (i = 0; i < 4; i++) {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 putchar(' ');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 for (j = 0; j < 4; j++)
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 printf(" %u", params[n++]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 putchar('\n');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 }
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 return;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 case MR795:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 printf(" %u %u %u\n", params[0], params[1], params[2]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 n = 3;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 for (i = 0; i < 4; i++) {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 putchar(' ');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 for (j = 0; j < 5; j++)
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 printf(" %u", params[n++]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 putchar('\n');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 }
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 return;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 case MR102:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 printf(" %u %u %u\n", params[0], params[1], params[2]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 n = 3;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 for (i = 0; i < 4; i++) {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 putchar(' ');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 for (j = 0; j < 9; j++)
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 printf(" %u", params[n++]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 putchar('\n');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 }
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 return;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 case MR122:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 printf(" %u %u %u %u %u\n", params[0], params[1], params[2],
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 params[3], params[4]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 n = 5;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 for (i = 0; i < 4; i++) {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 putchar(' ');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 for (j = 0; j < 13; j++)
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 printf(" %u", params[n++]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 putchar('\n');
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 }
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 return;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 case MRDTX:
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 printf(" %u %u %u %u %u\n", params[0], params[1], params[2],
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 params[3], params[4]);
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 return;
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 }
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 }