• 沒有找到結果。

Window Decision

在文檔中 AAC中訊窗轉換方法之設計 (頁 20-25)

Chapter 3 Design of Window Switch Method in AAC

3.1 Window Decision

The design of window decision is the most important part of window switch.

Because the short window has a higher time resolution, and the long window has a higher frequency resolution. The transient signal needs short windows to control the pre-echo effect and the stationary signal needs long window to resolve the lines in the signal spectrum in order to extract the redundancy. If the transient signal uses long window, the pre-echo phenomenon will happen. If the stationary signal uses short window, the low frequency resolution will make the encoded signal not precise enough in the frequency domain.

This section proposes a design of window decision by three kinds of information:

the global energy ratio, the zero-crossing ratio and the tonal attack. Window decision decides the window type of next frame. After deciding next window type, the current window type will be switched by comparing with next and prior window type.

Therefore, in the last subsection, the window type switch method will also be discussed.

3.1.1 Global Energy Ratio

Transient signals usually occur when the time domain energy has rapid change.

Therefore, the energy ratio is a kind of important information to detect transient signal.

Traditionally, the energy ratio detection method [4] only considers the energy ratio between two sliding short windows. Generally, the pre-echo effect is generated by the signal with global max energy. But, the energy ratio between two sliding windows will ignore the gradually increasing signal. Figure 6 is an example of speech signal.

Figure 6 (a) represents a transient signal which is increasing gradually. Figure 6 (b) is the value of traditional energy ratio. The max energy ratio in Figure 6 (b) is about 2.1.

However, if the transient threshold is set at 2, the misjudgment will happen easily.

Figure 6 (c) illustrates the variation of global max ratio. The global energy ratio method can provide a noticeable value of ratio and overcome the problem in traditional energy ratio method.

Figure 6: (a) Transient signal segment, (b) energy ratio of two sliding short windows, (c) values of global energy ratio.

In common with the traditional energy ratio method, we calculate a energy

Then the maximum energy Max_En and minimum energy Min_En in a set of short windows’ energy En(i) are found. The global energy ratio is defined as,

En

When the Global_En_Ratio is greater than a threshold Te, the signal is regard as a transient signal. The implement of this method is as easy as the traditional energy ratio method. However, this method is more general and it also can prevent the post-echo problem.

3.1.2 Zero-Crossing Ratio

As traditional energy ratio method, the global energy ratio can’t detect the signal which has segments with rapid changes in spectral content. However, zero-crossing rates can represent the main frequency content of signal. Figure 7 shows a transient signal with stable global energy ratio, but this signal has rapid change in spectral content. Zero-crossing ratio can detect this kind of transient signal.

Figure 7: A transient signal with rapid changes in spectral content.

The zero-crossing rate of each window is defined as,

256

Then the maximum zero-crossing rate Max_Ze and minimum zero-crossing rate Min_Ze in a set of short windows’ zero-crossing rate are found. The zero-crossing ratio is defined as,

Ze

When the Ze_Ratio is greater than a threshold Tz, the signal is regard as a transient signal. This method has lower complexity than the method introduced in subsection 2.3.3. This method can detect the transient in violin and speech signal.

3.1.3 Tonal Attack

The short window has lower frequency resolution than that of the long window.

Figure 8 (a) is an example of pure tone signal, and this signal will be regard as a transient signal by the global energy ratio. In Figure 8 (c), transforming the tonal signal by a shorter transform will make the side band energy increase. We define the tonal attack effect when the signal has a tonal band which is analyzed by the psychoacoustic model of long window. In other words, if there is a band with tonality greater than a threshold T, the encoder doesn’t use short windows in this frame to keep the frequency resolution.

Figure 8: (a) A pure tone signal, (b) the frequency transformed by 2048-sample transform, (c) the frequency transformed by 256-sample transform.

Window decision method is composed of above three kinds of information.

Figure 9 illustrates the window decision execution which uses global energy ratio and zero-crossing ratio to detect transient signal and then avoid the erroneous detection of

Figure 9: Window Decision Flowchart.

3.1.4 Window Type Switch Method

The start window should be used to bridge long and short window types. But window decision only decides the usage of long or short window type. Therefore, window decision should decide the window type of next frame in advance. The switch of current window type considers both prior and next window types. If the next frame is different from the prior one, the current frame must switch to the start or stop window type.

Figure 10: Window type switch analysis table and algorithm.

Figure 10 shows the analysis of all possible situations of the window type switch.

Long window, short windows, start window and stop window are represented by L, S, L_S, and S_L respectively. By removing some impossible situations, we can get a simple switching algorithm.

在文檔中 AAC中訊窗轉換方法之設計 (頁 20-25)

相關文件