MP3 coding principles

Source: Internet
Author: User

Address: http://www.eefocus.com/jjbearustc/blog/07-09/3460_8d0d0.html#articletop

MP3 encoding mainly consists of three functional modules,It includes a hybrid filter group (sub-band filter and mdct), a psychological acoustic model, and a quantization code (bit and bit Factor Allocation and Harman encoding ).

1. hybrid filter group. This part includes the sub-band filter group and mdct. The sub-band filter group code maps the sample signal from the time domain to the frequency domain, and the specified audio signal is decomposed into 32 sub-bands through the band-pass filter component. The 32 sub-bands output by the sub-band filter set are of equal bandwidth, while the critical bandwidth obtained from the psychological acoustic model is not of equal bandwidth,Therefore, in order to match the proportional factor bands for encoding with the critical band, mdct transformation is required for each subband signal.. After the output of the sub-band filter group is sent to the mdct filter group, each group is subdivided into 18 frequency lines, producing 576 frequency lines. Then, the Information Hiding ratio of the sub-band signal calculated in the acoustic model is used to determine the number of BITs allocated to 576 lines.

2. Acoustic Model. The psychological acoustic model uses the masking feature of the human ears auditory system to remove a large number of irrelevant signals to compress audio data. In order to accurately calculate the masking threshold, the signal must have a better resolution in the frequency domain. Therefore, the signal must undergo Fourier transformation before using the acoustic model. MPEG-I provides two kinds of psychological acoustic models. The first model is simple in calculation, and provides proper precision in high bit rate encoding. The second model is more complex and generally used in low bit rate encoding. The psychological Acoustic Model 2 is generally used in MP3 encoding.The purpose of the psychological acoustic model is to obtain the masking domain values of each sub-band and control the quantization process.. The realization process of the psychological acoustic model is generally to first use FFT to find the spectrum characteristics of the signal, and find the tone components at each frequency point based on the spectrum characteristics (some are called music components) non-tone components (or noise components). The masking domain values of each tone component and non-tone component at other frequency points are determined based on the masking domain curve. Finally, the overall masking domain of each frequency point is obtained, it is converted to the encoding sub-band. If the noise produced after the spectral value Quantization of the sub-band filter set can be controlled below the masking Domain value, the decoded results of the compressed data are not differentiated from the original signal. The masking capability of a given signal depends on its frequency and response. Therefore, the final output of the psychological acoustic model isMasking ratio SMR(Signal-to-maskradio), that is, the ratio of signal strength to masking threshold.

3. quantization encoding. Quantization encoding uses a three-layer iterative loop model to implement Bit Allocation and quantization. These three layers include:Frame loop, outer loop and Inner Loop. Reset all iteration variables in a frame loop, calculate the maximum number of BITs that can be provided to each data segment, and then call the outer iteration model. The outer iteration model first uses the inner iteration model, the inner iteration model quantifies the input vectors and enables the quantization output to be encoded within a certain number of bits. He/He coding has a limit on the maximum value of quantification. Therefore, it is necessary to determine whether all quantization values exceed the limit. If the limit is exceeded, the inner iteration cycle needs to increase the quantization step and re-quantify. Then determine the number of digits of the Harman encoding so that the number of BITs occupied is smaller than the maximum number of BITs provided by each encoding calculated by the frame loop. Otherwise, increase the quantization step and re-quantify it. After quantification is met, the final proportional factor value is stored out of the outer loop, and the bits used to store each data segment are calculated in the frame loop.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.