Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
курсач / материалы / es_201980v040102p.pdf
Скачиваний:
0
Добавлен:
13.05.2026
Размер:
1.25 Mб
Скачать

40

ETSI ES 201 980 V4.1.2 (2017-04)

The Parametric Stereo (PS) data is conveyed in the SBR extended data field. PS signals a unique ID in the SBR extended data field defined by the bitstream element bs_extension_id. To be successfully decoded, PS needs to receive data from single channel elements in the bitstream, i.e. from a mono bitstream.

The function sbr_extension() used in sbr_channel_pair_base_element() and sbr_channel_pair_element() described in MPEG-4 Audio, clause "Payloads for the audio object type SBR", is defined as follows.

Table 13: Syntax of sbr_extension()

Syntax

No. of bits

Note

sbr_extension(bs_extension_id, num_bits_left)

 

 

{

 

 

switch( bs_extension_id )

 

 

{

 

 

case MPEG_PARAMETRIC_STEREO:

 

 

num_bits_left -= ps_data();

 

1, 2

break;

 

 

default:

 

 

bs_fill_bits;

num_bits_left

bslbf, 3

num_bits_left = 0;

 

1

break;

 

 

}

 

 

}

NOTE 1: The variable num_bits_left is the same as used in the sbr_pair_base_element() and sbr_channel_pair_element().

NOTE 2: ps_data() is defined in table 8.9 in MPEG-4 [2] and returns the total number of bits read. NOTE 3: bs_extension_id is defined in table 14.

bs_extension_id

Holds an ID of the extended data element.

 

 

 

Table 14: Definition of bs_extension_id

 

 

 

 

 

 

bs_extension_id

 

Meaning

 

Note

0

 

Shall not be used

 

 

1

 

Reserved ID for future use

 

 

2

 

MPEG PARAMETRIC STEREO

 

 

3

 

Reserved ID for future use

 

 

5.4.4AAC error concealment

5.4.4.0Introduction

The AAC core decoder includes a concealment function that increases the delay of the decoder by one frame.

There are various tests inside the core decoder, starting with the CRC test and ending in a variety of plausibility checks. If such a check indicates an invalid bit stream, then concealment is applied. Concealment is also applied when the channel decoder indicates a distorted data frame.

Concealment works on the spectral data just before the final frequency to time conversion. In case a single frame is corrupted, concealment interpolates between the preceding and the following valid frames to create the spectral data for the missing frame. If multiple frames are corrupted, concealment implements first a fade out based on slightly modified spectral values from the last valid frame. If the decoder recovers from the error condition, the concealment algorithm performs a fade-in on valid spectral values. Fade in might be delayed (suppressed) to deal with error conditions, where only a valid frame here and there is perceived.

5.4.4.1Interpolation of one corrupt frame

In the following, the current frame is frame number n, the corrupt frame to be interpolated is the frame n-1 and the frame before has the number n-2. Frame number n-2 is the preceding valid frame which spectral values have been stored during the processing in the previous call to the decoder.

The determination of window sequence and the window shape of the corrupt frame is described in table 15.

ETSI

 

41

ETSI ES 201 980 V4.1.2 (2017-04)

Table 15: Interpolated window sequences and window shapes

 

 

 

 

window sequence n-2

window sequence n

window sequence n-1

window shape n-1

ONLY_LONG_SEQUENCE

ONLY_LONG_SEQUENCE

 

 

or

or

 

 

LONG_START_SEQUENCE

LONG_START_SEQUENCE

ONLY_LONG_SEQUENCE

0

or

or

 

 

LONG_STOP_SEQUENCE

LONG_STOP_SEQUENCE

 

 

ONLY_LONG_SEQUENCE

 

 

 

or

 

 

 

LONG_START_SEQUENCE

EIGHT_SHORT_SEQUENCE

LONG_START_SEQUENCE

1

or

 

 

 

LONG_STOP_SEQUENCE

 

 

 

EIGHT_SHORT_SEQUENCE

EIGHT_SHORT_SEQUENCE

EIGHT_SHORT_SEQUENCE

1

 

ONLY_LONG_SEQUENCE

 

 

EIGHT_SHORT SEQUENCE

or

 

 

LONG_START_SEQUENCE

LONG_STOP_SEQUENCE

0

 

or

 

 

 

LONG_STOP_SEQUENCE

 

 

NOTE: The window sequences are depicted in ISO/IEC 14496-3 [2], table 4.109 - Window Sequences.

The scalefactor band energies of frames n-2 and n are calculated. If the window sequence in one of these frames is an EIGHT_SHORT_SEQUENCE and the final window sequence for frame n-1 is one of the long transform windows, the scalefactor band energies are calculated for long block scalefactor bands by mapping the frequency line index of short block spectral coefficients to a long block representation. The new interpolated spectrum is built on a perscalefactorband basis by reusing the spectrum of the older frame n-2 and multiplying a factor to each spectral coefficient. An exception is made in the case of a short window sequence in frame n-2 and a long window sequence in frame n, here the spectrum of the actual frame n is modified by the interpolation factor. This factor is constant over the range of each scalefactor band and is derived from the scalefactor band energy differences of frames n-2 and n. Finally noise substitution is applied by flipping the sign of the interpolated spectral coefficients randomly.

5.4.4.2Fade-out and fade-in

Fade-out and fade-in behaviour, i.e. the attenuation ramp, might be fixed or adjustable by the user. The spectral coefficients from the last frame are attenuated by a factor corresponding to the fade-out characteristics and then passed to the frequency to-time mapping. Depending on the attenuation ramp, the concealment switches to muting after a number of consecutive invalid frames, which means the complete spectrum will be set to 0.

After recovering from the error condition, the decoder fades in again depending on a ramp-up function possibly different from the ramp-down characteristics. If the concealment has switched to muting, fade-in might be suppressed for a configurable number of frames to avoid annoying output of non-consecutive single valid frames.

5.4.4.3Concealment granularity

In case the spectral data is only partly destroyed, i.e. the CRC test and the plausibility checks are OK, error concealment might be applied in a finer granularity. The use of the error robustness tools HCR and VCB11 allow the decoder to detect invalid spectral lines. In case only a few lines are destroyed, the AAC concealment strategy above might be applied only to the corresponding scalefactor bands or to the destroyed lines.

5.4.4.4SBR error concealment

The SBR error concealment algorithm is based on using previous envelope and noise-floor values with an applied decay, as a substitute for the corrupt data. In the flowchart of figure 9 the basic operation of the SBR error concealment algorithm is outlined. If the frame error flag is set, error concealment bitstream data is generated to be used instead of the corrupt bitstream data. The concealment data is generated according to the following.

The time frequency grids are set to:

LE = 1

tE (0) = t 'E (L 'E ) numTimeSlots

ETSI

42

ETSI ES 201 980 V4.1.2 (2017-04)

tE (1) = numTimeSlots

r(l ) = HI ,0 l < LE bs_pointer = 0

LQ = 1

tQ = tE (0),tE (1)

The delta coding direction for both the envelope data and noise-floor data are set to be in the time-direction. The envelope data is calculated according to:

step

,Eprev (k,l ) > target

k < n(r(l )),0 l < LE

EDelta (k,l ) =

 

,0

step

,otherwise

 

where:

 

 

 

 

2

,if bs _ amp _ res = 1

step =

 

 

 

1

,otherwise

 

panOffset(bs _ amp _ res) ,if

bs _ coupling = 1

target =

 

 

 

0

 

,otherwise

And where bs_amp_res and bs_coupling are set to the values of the previous frame.

The noise floor data is calculated according to:

0

l < LQ

QDelta (k,l ) = 0 ,

k < NQ

0

Furthermore, the inverse-filtering levels in bs_invf_mode are set to the values of the previous frame, and all elements in bs_add_harmonic are set to zero.

If the frame error is not set, the present time grid and envelope data may need modification if the previous frame was corrupt. If the previous frame was corrupt the time grid of the present frame is modified in order to make sure that there is a continuous transition between the frames. The envelope data for the first envelope is modified according to:

Emod (k,0) = E(k,0) + a log2

 

tE (1) tE (0)

 

 

k < F(r(l ),0)

 

 

 

, 0

 

 

tE (1) estimated _ start _ pos

 

 

where:

estimated _ start _ pos = t 'E (L'E ) numberTimeSlots .

After the delta coded data has been decoded, a plausibility check is performed to make sure that the decoded data is within reasonable limits. The required limits are:

For the envelope data the logarithmic values shall fulfil:

35

,ampRes = 0

E(k,l )

 

70

,ampRes =1

otherwise the frame will be considered corrupt.

 

ETSI

43

ETSI ES 201 980 V4.1.2 (2017-04)

The time grids are also verified according to the following rules (if any of the below is true the frame is considered to be corrupt):

-LE <1

-LE > 5

-LQ > 2

-tE (0) < 0

-tE (0) tE (LE )

-tE (0) > 3

-tE (LE ) <16

-tE (LE ) >19

-tE (l) tE (l +1),0 ≤ l < LE

-lA > LE

-LE =1 AND LQ >1

-tQ (0) tE (0)

-tQ (LQ ) tE (LE )

-tQ (l ) tQ (l +1),0 ≤ l < LQ

-all elements of tQ are not among the elements of tE

If the plausibility check fails, the frame error flag is set and the error concealment outlined above is applied.

ETSI

Соседние файлы в папке материалы