6.5.2 Stereo

26.2903GPPAudio codec processing functionsExtended Adaptive Multi-Rate - Wideband (AMR-WB+) codecRelease 17Transcoding functionsTS

The stereo error concealment is controlled by the bad frame indicators bfik , k = 0…3. In response to the bad frame indicators of the present super frame together with some bad frame indicator history proper actions are taken mitigating the perceptual impact of bad frames. Particular error mitigation actions are taken on the stereo low-band, the mid-band, and the high-band.

6.5.2.1 Low-band

Balance factor

The balance factor to be used for the derivation of the side signal is not available depending on bfik and on the stereo TCX frame length, i.e. if

bfik = 1, k = 0…3 in case of 256-sample stereo TCX frames,

bfik = 1, k = 0, 2 in case of 512-sample stereo TCX frames, or

bfik = 1, k = 0 in case of 1024-sample stereo TCX frames,

In this case, the balance factor is derived from the balance factor of the previous stereo TCX frame, however, attenuated by 0.9.

For the case of a future frame loss, the balance factor of the present stereo TCX frame is stored in a history buffer.

Side signal error signal

The side signal error signal is derived using the TCX decoder and the associated bad frame concealment described above (6.6.1.3). Input to the TCX bad frame concealment is a flag, signalling if any of the frames associated with the present stereo TCX frame is bad.

Side signal

Stereo TCX frames of size 512 samples and 1024 samples are reconstructed as in the case without bad frames, however using the balance factor and side signal error signal derived as specified above.

Bad stereo TCX frames of size 256 samples are, however, reconstructed differently. A parametric model with transfer function

, P=8

is applied to the windowed mono signal for reconstructing a substitution signal for the side signal. The filter coefficients are taken from a state memory and are always derived during preceding stereo TCX frames if the associated bfik flags are equal to zero. The coefficients are calculated by solving the following equation system:

,

where is a Toeplitz matrix of autocorrelations rmm of the windowed mono signal:

,

and where is a vector of cross-correlations rms of the windowed mono signal and the side signal:

.

Left/right signal reconstruction

The side signal used for left/right signal reconstruction is attenuated in case of severe frame loss conditions of an estimated frame loss rate of greater than 1%. Using an estimate of the present average frame loss rate, an attenuation factor  is derived according to the following formula:

,

where, in addition,  is limited to be within the range of 0…1.

Before reconstructing left and right signals, the side signal is multiplied with factor .

The average frame loss rate is estimated according to the following algorithm.

A first estimate f is calculated according to

, N=500,

where wj is a weighting factor defined as

,

and bfi_buf is a buffer comprising the N most recent flags bfik.

The final frame loss rate estimate is then obtained by AR-1 filtering:

,

where is the frame loss estimate calculated during processing of the preceding frame.

6.5.2.2 Mid-band

The mid-band synthesis is performed on every frame. When a frame is lost the parameters of the mid-band decoder are extrapolated by using the predictive decoders fed with a zero error signal. This implies that the error will propagate to few frames which does not impact the overall quality. The extrapolated parameters are the filter coefficients and the channel gains and are computed as: