8 Homing sequences
26.1903GPPAdaptive Multi-Rate - Wideband (AMR-WB) speech codecSpeech codec speech processing functionsTranscoding functionsTS
8.1 Functional description
The adaptive multi-rate wideband speech codec is described in a bit‑exact arithmetic to allow easy type approval as well as general testing of correct operation of the adaptive multi-rate wideband speech codec.
The response of the codec to a predefined input sequence can only be foreseen if the internal state variables of the codec are in a predefined state at the beginning of the experiment. Therefore, the codec has to be put in a so called home state before a bit‑exact test can be performed. This is usually done by a reset (a procedure in which the internal state variables of the codec are set to their defined initial values). The codec mode of the speech encoder and speech decoder shall be set to the tested codec mode by external means at reset.
To allow a reset of the codec in remote locations, special homing frames have been defined for the encoder and the decoder, thus enabling a codec homing by inband signalling.
The codec homing procedure is defined in such a way, that in either direction (encoder or decoder) the homing functions are called after the processing of the homing frame. The output corresponding to the first homing frame is therefore dependent on the used codec mode and the codec state when receiving that frame and hence usually not known. The response of the encoder to any further homing frame is by definition the corresponding decoder homing frame for the used codec mode. The response of the decoder to any further homing frame is by definition the encoder homing frame. This procedure allows homing of both the encoder and decoder from either side, if a loop back configuration is implemented, taking proper framing into account.
8.2 Definitions
Encoder homing frame: The encoder homing frame consists of 320 identical samples, each 13 bits long, with the least significant bit set to "one" and all other bits set to "zero". When written to 16‑bit words with left justification, the samples have a value of 0008 hex. The speech decoder has to produce this frame as a response to the second and any further decoder homing frame if at least two decoder homing frames were input to the decoder consecutively. The encoder homing frame is identical for all codec modes.
Decoder homing frame: There exist nine different decoder homing frames, which correspond to the nine AMR-WB codec modes. Using one of these codec modes, the corresponding decoder homing frame is the natural response of the speech encoder to the second and any further encoder homing frame if at least two encoder homing frames were input to the encoder consecutively. In [4], for each decoder homing frame the parameter values are given.
8.3 Encoder homing
Whenever the adaptive multi-rate wideband speech encoder receives at its input an encoder homing frame exactly aligned with its internal speech frame segmentation, the following events take place:
Step 1: The speech encoder performs its normal operation including VAD and SCR and produces in accordance with the used codec mode a speech parameter frame at its output which is in general unknown. But if the speech encoder was in its home state at the beginning of that frame, then the resulting speech parameter frame is identical to that decoder homing frame, which corresponds to the used codec mode (this is the way how the decoder homing frames were constructed).
Step 2: After successful termination of that operation the speech encoder provokes the homing functions for all sub‑modules including VAD and SCR and sets all state variables into their home state. On the reception of the next input frame, the speech encoder will start from its home state.
NOTE: Applying a sequence of N encoder homing frames will cause at least N‑1 decoder homing frames at the output of the speech encoder.
8.4 Decoder homing
Whenever the speech decoder receives at its input a decoder homing frame, which corresponds to the used codec mode, then the following events take place:
Step 1: The speech decoder performs its normal operation and produces a speech frame at its output which is in general unknown. But if the speech decoder was in its home state at the beginning of that frame, then the resulting speech frame is replaced by the encoder homing frame. This would not naturally be the case but is forced by this definition here.
Step 2: After successful termination of that operation the speech decoder provokes the homing functions for all sub‑modules including the comfort noise generator and sets all state variables into their home state. On the reception of the next input frame, the speech decoder will start from its home state.
NOTE 1: Applying a sequence of N decoder homing frames will cause at least N‑1 encoder homing frames at the output of the speech decoder.
NOTE 2: By definition (!) the first frame of each decoder test sequence must differ from the decoder homing frame at least in one bit position within the parameters for LPC and first subframe. Therefore, if the decoder is in its home state, it is sufficient to check only these parameters to detect a subsequent decoder homing frame. This definition is made to support a delay‑optimized implementation in the TRAU uplink direction.
Figure 1 Simplified block diagram of the CELP synthesis model
Figure 2 Detailed block diagram of the ACELP encoder
Figure 3 Detailed block diagram of the ACELP decoder