# Psychaocoustic Models for Perceptual Audio Coding--A Tutorial Review
## 2 Monaural Perceptual Effects and Models
### Classic Models for Perceptual Audio Coding  
The first audio coding standards for generic signals (i.e., for all types of audio material) were MPEG-1 [16; 30], MPEG-2 [1], and MPEG-2 Advanced Audio Coding (AAC) [2; 31]. As is customary for MPEG, the standards normatively specify bitstream format and decoder operation, which leaves room for encoder optimization, and thus improved codec performance, while retaining full compatibility, even after the publication of the standard. Consequently, these standards only provide suggestions for perceptual models that are published as _informative annexes_ and may be implemented and modified as deemed appropriate by the implementer. The MPEG-1 Audio standard specifies two psychoacoustic models:  
* Perceptual model 1 is intended mainly for use with the Layer I and II codecs that employ a 32-band pseudo Quadrature Mirror Filter (pQMF) filterbank (also known as \"polymbase filterbank\"). It uses a windowed Discrete Fourier Transform (DFT) to perform a high-resolution spectral analysis of the input audio signals (512 samples Hann window length for Layer I, 1024 samples Hann window for Layer II). Then, the signal energy is computed in frequency bands that are designed to resemble the _Bark perceptual frequency scale_[26] by appropriate grouping of the DFT coefficients. A minimum level for maskers in each band is required to be considered as relevant, thus modeling the psychoacoustic _Threshold in Quiet_. The model distinguishes between _tonal_ and _non-tonal masker components_ by examining whether a spectral contribution belongs to a spectral peak according to certain specified rules and uses specific masking index functions for tonal and non-tonal components. Separate partial masking thresholds are then calculated for tonal and non-tonal components, with each one considering _inter-band masking_ by spreading the energy contributions to the adjacent lower or higher bands with appropriate definitions for the lower and higher slopes of the masking function. Finally, the individually computed masking thresholds are combined together with the threshold in quiet into a single global masking threshold, mapped to the 32 sub-bands of the codec pQMF filterbank and output to the codec's bit allocation procedure as sub-band _Signal-To-Mask Ratios_. * Perceptual model 2 is intended mainly for use with the Layer III codec (aka \"mp3\") and appears in similar form as the MPEG-2 AAC psychoacoustic model. A 1024-samples Hann-windowed DFT is used and its output is grouped into frequency bands inspired by the Bark scale. A major difference in Perceptual Model 1 lies in the fact that the computation of the tonality is based on a so-called _unpredictability measure_, i.e., a figure which measures how well the complex DFT coefficients within a frequency band can be predicted (in radius and angle, i.e., in polar coordinates) from their counterparts from the preceding block. Both quantities--the single coefficient energies and the coefficient-by-coefficient unpredictability measure--are grouped into perceptual spectral bands  
Figure 4: Illustration of temporal masking effects. and convolved with a _spreading function_ that models inter-band masking. From this, a tonality value for each spectral band is calculated and the required tonality-dependent _Signal-To-Mask Ratio_ is determined. Finally, the model considers the _threshold in quiet_ and adjusts the result for the avoidance of _pre-echoes_[10; 32] to generate the final _Signal-To-Mask Ratio_ output for each spectral band of the codec. The basic psychoacoustic features included in both psychoacoustic models can be summarized as follows:  
* Use of a _perceptual_ (here, Bark-type) _frequency scale_ for masking computations;
* Modeling of _intra-band and inter-band masking;_
* Use of tonality metrics to distinguish the stronger masking ability of noise-like maskers from the weaker masking ability of tone-like signal components. Both tonality metrics are based on signal processing rather than actually being rooted in HAS perception.