6 Digital test sequences
3GPP46.010Full rate speechRelease 17TranscodingTS
This clause provides information on the digital test sequences that have been designed to help in the verification of implementations of the RPE‑LTP codec. Copies of these sequences are available (see annex A3). As the codec homing procedure (see clause 4) is an optional feature two sets of test vectors are provided, one set without codec homing frames and a second set with codec homing frames. In addition A-law and -law compressed testsequences are provided ffor each set as a further option for TRAU testing.
6.1 Input and output signals
Table 6.1 defines the input and output signals for the test sequences. The words defined in this table use 16 bits. The left or right justification is indicated in the table. The codewords described in the table correspond to one frame of coder input or decoder output signal; i.e. for 20 ms of input signal the 76 codewords are obtained at the output of the coder and 76 codewords provided at the input of the decoder will yield 20 ms of output signal in the decoder. Three types of files are provided:
- speech encoder input samples, sop[..] *.INP
- coded parameters (encoded speech data) *.COD
- speech decoder output samples, srop[..] *.OUT
6.2 Configuration for the application of the test sequences
Two configurations are appropriate in order to test an implementation of the RPE‑LTP codec. The first is for testing the coder part of the RPE‑LTP algorithm which means that a sop[..] signal (on files: *.INP) is provided at the input of the encoder which responds with frames of coded parameters. The encoder output has to be checked against reference files (files: *.COD). The other configuration is for testing the decoder part of the RPE‑LTP algorithm. In this case, frames of coded parameters (see table 5.1, files: *.COD) are sent to the RPE‑LTP decoder which responds with the srop[..] signal. These samples have to be checked against reference files (files: *.OUT).
6.2.1 Configuration 1 (encoder only)
A reset signal (RS) shall be applied to the RPE‑LTP encoder under test to set all internal variables to the exact states specified in clause 5 of this recommendation prior to the start of an input test sequence in order to obtain the correct output values for this test. But please note, this reset signal is only required for a codec implementation without codec homing porcedure. If codec homing is implemented the reset of the internal state variables is done by the means of software. This test shall be done in real-time with a sampling rate of 8 kHz at the input of the encoder under test (see figure 6.1). All the necessary hardware and software should be installed by the user in order to capture in real time the output coded parameters of the RPE‑LTP encoder and to compare them to the dedicated reference file.
Codec homing not implemented:
In the case of a correct hardware implementation undergoing test, all speech encoder output frames must be identical to the corresponding frames in the *.COD file.
Codec homing implemented:
Each *H.INP file includes two homing frames at the start of the test sequence. The function of these is to reset the speech encoder state variables to their initial value. In the case of a correct hardware implementation undergoing test, the first speech encoder output frame is undefined and need not be identical to the first frame in the *H.COD file. All subsequent speech encoder output frames must be identical to the corresponding frames in the *H.COD file.
Figure 6.1: Configuration 1: RPE‑LTP encoder under test
6.2.2 Configuration 2 (decoder only)
Figure 6.2 shows a RPE‑LTP decoder under test. In the same way as described in the coder part, a reset signal (RS) shall be used before the processing of the first frame of coded parameters. But please note that also for the decoder this reset signal is only required if the codec homing procedure is not implemented. The decoder shall be tested for a continuous output with a sampling rate of 8 kHz. At the input of the decoder, the 76 parameters shall be sent in a time interval of 20 ms.
Codec homing not implemented:
In the case of a correct hardware implementation undergoing testing, all speech decoder output frames must be identical to the corresponding frames in the *.OUT file.
Codec homing implemented:
Each *H.COD file includes two homing frames at the start of the test sequence. The function of these is to reset the speech decoder state variables to their initial value. In the case of a correct hardware implementation undergoing testing, the first speech decoder output frame is undefined and need not be identical to first frame in the *H.OUT file. All subsequent speech decoder output frames must be identical to the corresponding frames in the *H.OUT file.
Figure 6.2: Configuration 2: RPE‑LTP decoder under test
6.3 Test sequences
The letter `H´ at the end of a file name denotes a test sequences with codec homing frames.
6.3.1 Test sequences for configuration 1
For configuration 1, four different input test sequence are provided:
SRQ01/SEQ01H Sequence for testing the overflow controls in the encoder;
SEQ02/SEQ02H Sequence for testing the LPC part of the encoder;
SEQ03/SEQ03H Sequence for testing the LTP part of the encoder;
SEQ04/SEQ04H Sequence for testing various critical parts of the algorithm.
Sequence SEQ01/SEQ01H uses a large number of saturated samples. The residual LPC signal reaches very high values, which has two effects on the processing:
‑ occurrence of a large number of overflows in addition/subtraction operations. Table 6.2 describes each overflow point and the number of occurrences for each.
‑ the excitation RPE samples have a large dynamic range and the 64 codewords of the sub‑block maximum are each obtained at least once on output.
Sequence SEQ02/SEQ02H focuses successively on each reflection coefficient calculated in the Schur recursion. Table 6.3 shows which frames deal with which reflection coefficient and its dynamic range. The Log.‑Area codewords output by the coder cover the full range of their possible values except the 2nd LARc that does not reach the value 0 and 63 (min and max). The maximum value (63) is however obtained in sequence 4.
Sequence SEQ03/SEQ03H tests the long term predictor part of the algorithm. It has been generated by exciting a sharply resonant filter with a periodic train of impulses; this produces a pitched signal. Each part corresponding to a given pitch is 128 ms (4 blocks of 256 words) long. The pitch periods have been randomly drawn in the range [2,15] ms and the random order is shown in table 6.4.
Sequence SEQ04/SEQ04H accounts for various remaining non tested points of the algorithm where implementing errors may be suspected. Tables 6.5 and 6.6 summarize the critical points that this sequence has been designed to check (i.e. where the three previous sequences were ineffective). Table 6.5 shows the list of tested points where errors can be detected. Each tested error is described and the frame number corresponding to the first occurrence of a divergence between the exact and the degraded algorithm is also indicated.
Table 6.6 illustrates three paths of the algorithm that are never explored during the processing of the three previous sequences; the table shows which condition leads to each path and the number of associated occurrences in sequence SEQ04/SEQ04H.
Notice finally one point where special care shall be taken:
‑ A small degradation (i.e. +/‑ 1) of DLB[2] (the third decision level of the LTP gain quantizer (see table 5.3a) is unable to provide any noticeable effect on the output of the four sequences described above).
6.3.2 Test sequences for configuration 2
Five different input test sequence are provided for this configuration. Four sequences obtained in configuration 1 at the output of the encoder (coded parameters) are used as input for the decoder under test in configuration 2.
Table 6.7 gives the list of tested overflow points and their occurrence on sequence SEQ01/SEQ01H for this configuration.
Sequence SEQ05/SEQ05H is provided to scan all possible codes for each parameter. This sequence is an artificial sequence and does not correspond to any encoder output. The codewords have been randomly generated and cover the entire range of codewords values. Moreover, the delay value Nr belonging to [40,120] in an error‑free transmission condition, takes in this sequence its value in [0,127]. In this case the decoder behaviour on non‑allowed values of Nr will be tested.
Table 6.1a: Signals used in digital test sequences (*.INP)
Name |
Description |
Justification |
ENCODER INPUT |
||
sop[k] |
13 bits: encoder input signal. |
left |
Table 6.1b: Signals used in digital test sequences (*.COD)
Name |
Description |
Justification |
ENCODER OUTPUT / DECODER INPUT |
||
LARc[1] |
6 bits : 1st Log.-Area Ratio |
right |
LARc[2] |
6 bits : 2nd Log.-Area Ratio |
right |
LARc[3] |
5 bits : 3rd Log.-Area Ratio |
right |
LARc[4] |
5 bits : 4th Log.-Area Ratio |
right |
LARc[5] |
4 bits : 5th Log.-Area Ratio |
right |
LARc[6] |
4 bits : 6th Log.-Area Ratio |
right |
LARc[7] |
3 bits : 7th Log.-Area Ratio |
right |
LARc[8] |
3 bits : 8th Log.-Area Ratio |
right |
Sub-frame no 1 |
||
Nc |
7 bits : LTP lag |
right |
bc |
2 bits : LTP gain |
right |
Mc |
2 bits : RPE grid position |
right |
xmaxc |
6 bits : Block amplitude |
right |
xMc[0..12] |
3 bits : RPE pulses index 0 to 12 |
right |
Sub-frame no 2 |
||
Nc |
7 bits : LTP lag |
right |
bc |
2 bits : LTP gain |
right |
Mc |
2 bits : RPE grid position |
right |
xmaxc |
6 bits : Block amplitude |
right |
xMc[0..12] |
3 bits : RPE pulses index 0 to 12 |
right |
Sub-frame no 3 |
||
Nc |
7 bits : LTP lag |
right |
bc |
2 bits : LTP gain |
right |
Mc |
2 bits : RPE grid position |
right |
xmaxc |
6 bits : Block amplitude |
right |
xMc[0..12] |
3 bits : RPE pulses index 0 to 12 |
right |
Sub-frame no 4 |
||
Nc |
7 bits : LTP lag |
right |
bc |
2 bits : LTP gain |
right |
Mc |
2 bits : RPE grid position |
right |
xmaxc |
6 bits : Block amplitude |
right |
xMc[0..12] |
3 bits : RPE pulses index 0 to 12 |
right |
Table 6.1c: Signals used in digital test sequences (*.OUT)
Name |
Description |
Justification |
DECODER OUTPUT |
||
srop[k] |
13 bits: decoder output signal. The 3 LSB’s of the 16 bits are equal to 0 |
left |
Table 6.2: List of tested overflow points for sequence 1 (coder part)
Overflow point |
No of occurrences |
Short term analysis filter (5.2.10) |
|
1st add |
1059 |
2nd add |
134 |
LTP parameters computation (5.2.11) |
|
Abs( d[k] ) |
5 |
Long term analysis filter (5.2.12) |
|
sub |
11 |
Weighting filter (5.2.13) |
|
scaling the result (both x2 and x4) |
302 |
APCM quantizer (5.2.15) |
|
Find max abs of xm: Abs |
49 |
Update of Array dp of the long term analysis filter (5.2.18) |
|
add |
126 |
Table 6.3
Reflection Coeff. |
Frames |
Dynamic range |
1 |
1‑135 |
‑32564,32558 |
2 |
136‑311 |
‑32356,32242 |
3 |
316‑423 |
‑32157,32744 |
4 |
424‑524 |
‑31594,31960 |
5 |
525‑633 |
‑31697,31735 |
6 |
634‑738 |
‑30055,31575 |
7 |
739‑839 |
‑29090,31386 |
8 |
840‑944 |
‑31052,31208 |
Table 6.3 gives the position of the frames dedicated to the study of each reflection coefficient and dynamic range of the coefficient for sequence 2 in configuration 2.
Table 6.4: Pitch periods of sequence 3 (configuration 1)
86 |
56 |
68 |
120 |
52 |
93 |
20 |
66 |
82 |
115 |
114 |
60 |
42 |
45 |
17 |
64 |
16 |
88 |
83 |
63 |
90 |
73 |
23 |
77 |
100 |
33 |
29 |
106 |
35 |
67 |
57 |
103 |
116 |
30 |
71 |
69 |
81 |
47 |
32 |
97 |
65 |
62 |
111 |
49 |
109 |
25 |
96 |
50 |
54 |
91 |
85 |
99 |
70 |
76 |
46 |
26 |
34 |
104 |
108 |
107 |
22 |
119 |
48 |
58 |
37 |
72 |
110 |
27 |
24 |
36 |
87 |
51 |
59 |
38 |
21 |
44 |
113 |
39 |
61 |
53 |
18 |
40 |
94 |
105 |
55 |
112 |
75 |
98 |
118 |
41 |
80 |
31 |
74 |
28 |
84 |
89 |
79 |
43 |
101 |
95 |
19 |
78 |
117 |
92 |
102 |
Table 6.5: Errors specially detected by sequence 4/Config 1
Error checked : |
No of the |
|
Test point |
incorrect / correct |
1st frame |
statement / statement |
with error |
|
Autocorrelation function |
k=0 to 158/k=0 to 159 |
27 |
(5.2.4) |
||
Computation of the reflect. |
if( P[0] <= / if( P[0] < |
514 |
coefficients (5.2.5) |
abs(P[1]) ) / abs(P[1]) ) |
|
Quantization and coding |
A[4] + 1 /A[4] |
21 |
of the LARs (5.2.7) |
A[5] – 1 /A[5] |
35 |
A[5] + 1 /A[5] |
430 |
|
A[6] – 1 /A[6] |
427 |
|
A[8] – 1 /A[8] |
8 |
|
MAC[2] – 1 / MAC[2] |
24 |
|
MAC[2] + 1 / MAC[2] |
516 |
|
Comput. of the rp from the |
11058 / 11059 |
19 |
interp. LARp (5.2.9) |
20069 / 20070 |
25 |
Calc. of the LTP parameters |
||
->Search of the opt scaling |
k= 0 to 38 / k= 0 to 39 |
32 |
(5.2.11) |
||
->Coding of the LTP gain |
mult_r/ mult |
373 |
(5.2.11) |
DLB[0] + 1 / DLB[0] |
511 |
DLB[1] + 1 / DLB[1] |
373 |
|
ADPCM inverse quantizer |
FAC[2] + 1 / FAC[2] |
422 |
(5.2.16) |
FAC[3] – 1 / FAC[3] |
179 |
FAC[4] + 1 / FAC[4] |
74 |
|
FAC[5] – 1 / FAC[5] |
439 |
|
FAC[5] + 1 / FAC[5] |
74 |
|
FAC[6] – 1 / FAC[6] |
479 |
|
FAC[6] + 1 / FAC[6] |
330 |
|
FAC[7] – 1 / FAC[7] |
139 |
Table 6.6: Paths specially explored by sequence 4/Config 1
Test point |
Number of |
occurrences |
|
Autocorrelation function (5.2.4) |
8 |
condition smax == 0 |
|
Computation of the reflection coefficients : |
|
-> condition L_ACF[0] == 0 (5.2.5) |
8 |
-> condition P[0] < abs(P[1])(5.2.5) |
4 |
Table 6.7: List of tested overflows points for sequence 1 (decoder part)
Overflow Point |
Nb of occurrences |
||
Sequence 1 |
Sequence 2 |
Sequence 3 |
|
Long term synthesis filter |
|||
(5.3.2) : add |
126 |
0 |
0 |
Short term synthesis filter : |
|||
(5.3.4) |
|||
1st add: |
4499 |
0 |
0 |
2nd add: |
405 |
1 |
0 |
De-emphasize filter |
|||
(5.3.5): add |
89 |
0 |
0 |
Scaling of the output signal |
|||
(5.3.6): add |
16691 |
339 |
19 |
6.3.3 Additional Test sequences for Codec Homing
The test sequences decribed below are only required if the codec homing procedure is implemented.
6.3.3.1 Codec homing frames
In addition to the test sequences described above, two homing sequences are provided to assist in codec testing. SEQ06H.INP contains one encoder‑homing‑frame. SEQ06H.COD contains one decoder‑homing‑frame.
6.3.3.2 Sequence for an extensive test of the decoder homing
If the decoder receives a complete decoder-homing-frame (which is not marked as a bad frame), then it is sufficient that the following frame contains only the LARs and the first subframe data of the decoder-homing-frame to cause a decoder reset and the output of the encoder-homing-frame. To check this behaviour the test sequence HOMING01.COD/OUT was produced. As the test sequences SEQ01H…05H the sequence HOMING01 contains 2 complete decoder-homing-frames at the beginning and inside there is a mixture of complete and fractional (incomplete) decoder-homing-frames.
6.3.3.3 Sequences for finding the 20 ms framing of the GSM full rate speech encoder
When testing the decoder, alignment of the test sequences used to the decoder framing is achieved by the air interface (MS test) or can be reached easily on the Abis‑interface (test on network side).
When testing the encoder, usually there is no information available about where the encoder starts its 20 ms segments of speech input to the encoder.
In the following, a procedure is described to find the 20 ms framing of the encoder using special synchronization sequences. This procedure can be used for MS as well as for network side.
Synchronization can be achieved in two steps. First, bit synchronization has to be found. In a second step, frame synchronization can be determined. This procedure takes advantage of the codec homing feature of the full rate codec, which puts the codec in a defined home state after the reception of the first homing frame. On the reception of further homing frames, the output of the codec is predefined which can be use as a trigger reference.
– Bit synchronization
The input to the speech encoder is a series of 13 bit long words (104 kbits/s, 13 bit linear PCM). When starting to test the speech encoder, no knowledge is available of bit synchronization, i.e., where the encoder expects its least significant bits, and where it expects the most significant bits.
The encoder-homing-frame consists of 160 samples, all set to zero with the exception of the least significant bit, which is set to one (0 0000 0000 0001 binary, or 0x0008 hex if written into 16 bit words left justified). If two such encoder-homing-frames are input to the encoder consecutively, the decoder-homing-frame is expected at the output as a reaction of the second encoder-homing-frame.
Since there are only 13 possibilities for bit synchronization, after a maximum of 13 trials bit synchronization can be reached. In each0 trial three consecutive encoder-homing-frames are input to the encoder. If the decoder-homing-frame is not detected at the output, the relative bit position of the three input frames is shifted by one and another trial is performed. As soon as the decoder-homing-frame is detected at the output, bit synchronization is found, and the first step can be terminated.
The reason why three consecutive encoder-homing-frames are needed is that frame synchronization is not known at this stage. To be sure that the encoder reads two complete homing frames, three frames have to be input. Wherever the encoder has its 20 ms segmentation, it will always read at least two complete encoder-homing-frames.
An example of the 13 different frame triplets is given in sequence BITSYNC.INP.
– Frame synchronization
Once bit synchronization is found, frame synchronization can be found by inputting one special frame that delivers 160 different output frames, depending on the 160 different positions that this frame can possibly have with respect to the encoder framing.
This special synchronization frame was found by taking one input frame and shifting it through the positions 0 to 159. The corresponding 160 encoded speech frames were calculated and it was verified that all 160 output frames were different. When shifting the input synchronization frame, the samples at the beginning were set to 0x0008 hex, which corresponds to the samples of the encoder-homing-frame.
Before inputting this special synchronization frame to the encoder, again the encoder has to be reset by one encoder-homing-frame. A second encoder-homing-frame is needed to provoke a decoder-homing-frame at the output that can be used as a trigger reference. Since the framing of the encoder is not known at that stage, three encoder-homing-frames have to precede the special synchronization frame to ensure that the encoder reads at least two homing frames, and at least one decoder-homing-frame is produced at the output, serving as a trigger for recording.
The special synchronization frame preceded by the three encoder-homing-frames are given in SEQSYNC.INP. The corresponding 160 different output frames are given in SYNC000.COD through SYNC159.COD. The three digit number in the filename indicates the number of samples by which the input is retarded with respect to the encoder framing. By a corresponding shift in the opposite direction, alignment with the encoder framing can be attained.
6.3.3.4 Formats and sizes of the synchronization sequences
BIT SYNC.INP:
This sequence consists of 13 frame triplets. It has the format of the speech encoder input test sequences (13 bit left justified with the three least significant bits set to zero).
The size of it is therefore:
SIZE (BITSYNC.INP) = 13 * 3 * 160 * 2 bytes = 12 480 bytes
SEQSYNC.INP:
This sequence consists of 3 encoder reset frames and the special synchronization frame. It has the format of the speech encoder input test sequences (13 bit left justified with the three least significant bits set to zero).
The size of it is therefore:
SIZE (SEQSYNC.INP) = 4 * 160 * 2 bytes = 1 280 bytes
SYNCXXX.COD:
These sequences consists of 1 encoder output frame each. They have the format of the speech encoder output test sequences (16 bit words right justified).
The size of them is therefore:
SIZE (SYNCXXX.COD) = 76 * 2 bytes = 152 bytes
Optional 8 bit Test Sequences
In addition to the test sequences with and without homing as described above, two complete sets of test sequences with A-law and -law compressed are provided. These sequences allow the test of TRAU equipment by means of the A-Interface. On the A-Interface speech data is available as a 64 kbps PCM data stream of compressed samples with 8 bits each.
The usage of these 8 bit test sequences is exactly the same as described above for the 13 bit linear test sequences except that the A-Interface is used instead of feeding/taking them directly into/from the speech codec. Therefore bit synchronization is not necessary, too.
Provided are the encoder input sequences _x.INP, the encoder output sequences _x.COD and the decoder output sequences _x.OUT.
The _x.INP sequences are used at the encoder input and result in the _x.COD sequences at the encoder output.
The linear decoder input sequences .COD (without -x in their names) have to be used to force the 8 bit compressed decoder output sequences -x.OUT.
The format of the _x.INP and _x.OUT sequences is such that 160 samples of a speech frame are contained in one byte each. This results in a file size of half the size of the 13 bit linear test sequences.
The format of the *.cod files remains unchanged.
Annex A (informative):
Codec performance