FreeCalypso > hg > vband-misc
annotate pcma2efr/gen160.c @ 51:914eeb3ab866
efr-sid OS#6538: generate test frames in hex form
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 12 Aug 2024 03:06:17 +0000 |
parents | 4f47447fd17f |
children |
rev | line source |
---|---|
15
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
28
4f47447fd17f
pcma2efr: starting with DHF check
Mychaela Falconia <falcon@freecalypso.org>
parents:
22
diff
changeset
|
2 * The code in this module generates 160 versions of linearized seqsynca, |
15
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * shifted by one sample each, intended for feeding to EFR and AMR encoders. |
22
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
4 * |
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
5 * Update: the new version generates a linear array of 480 16-bit PCM samples, |
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
6 * where the first 160 are 0x0008, followed by two copies of linearized |
28
4f47447fd17f
pcma2efr: starting with DHF check
Mychaela Falconia <falcon@freecalypso.org>
parents:
22
diff
changeset
|
7 * seqsynca. |
15
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 */ |
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include <stdint.h> |
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
28
4f47447fd17f
pcma2efr: starting with DHF check
Mychaela Falconia <falcon@freecalypso.org>
parents:
22
diff
changeset
|
12 extern const uint8_t seqsynca_last_frame[160]; |
4f47447fd17f
pcma2efr: starting with DHF check
Mychaela Falconia <falcon@freecalypso.org>
parents:
22
diff
changeset
|
13 extern const uint16_t pcma_decode_table[256]; |
15
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
22
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
15 uint16_t linear_input_array[480]; |
15
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 void |
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 generate_linear_inputs(void) |
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 { |
22
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
20 unsigned n; |
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
21 uint16_t lin; |
15
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
22
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
23 for (n = 0; n < 160; n++) { |
28
4f47447fd17f
pcma2efr: starting with DHF check
Mychaela Falconia <falcon@freecalypso.org>
parents:
22
diff
changeset
|
24 lin = pcma_decode_table[seqsynca_last_frame[n]]; |
22
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
25 linear_input_array[n] = 0x0008; |
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
26 linear_input_array[160+n] = lin; |
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
27 linear_input_array[320+n] = lin; |
f4420403219a
pcmu2efr: change linear input gen to support 2nd frame
Mychaela Falconia <falcon@freecalypso.org>
parents:
15
diff
changeset
|
28 } |
15
528eef871e23
pcmu2efr project started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 } |