KR100640833B1 - Method for encording digital audio - Google Patents

Method for encording digital audio Download PDF

Info

Publication number
KR100640833B1
KR100640833B1 KR1020050046264A KR20050046264A KR100640833B1 KR 100640833 B1 KR100640833 B1 KR 100640833B1 KR 1020050046264 A KR1020050046264 A KR 1020050046264A KR 20050046264 A KR20050046264 A KR 20050046264A KR 100640833 B1 KR100640833 B1 KR 100640833B1
Authority
KR
South Korea
Prior art keywords
loop
quantization
bits
function
value
Prior art date
Application number
KR1020050046264A
Other languages
Korean (ko)
Inventor
오현오
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR1020050046264A priority Critical patent/KR100640833B1/en
Application granted granted Critical
Publication of KR100640833B1 publication Critical patent/KR100640833B1/en

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/002Dynamic bit allocation
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • G10L19/032Quantisation or dequantisation of spectral components

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A method for encoding digital audio is provided to reduce the number of repetition of quantization loop in which non-linear quantization and Huffman encoding are performed. A quantization loop performing process in a method for encoding digital audio includes the steps of: receiving the number of used bits and the size of early quant(300); non-linear quantizing an MDCT coefficient for the size of input quant, and encoding the quantized coefficients and calculating the number of used bits(310); and judging whether the number of bits calculated at the previous step is smaller than the number of usable bits at this step and larger than the number of bits subtracting an offset value calculated in a predetermined linear function from the number of usable bits(320).

Description

디지털 오디오의 부호화 방법{Method for encording digital audio}Method for encoding digital audio {Method for encording digital audio}

도 1은 MP3 형식의 오디오 부호화 과정의 흐름도1 is a flowchart of an audio encoding process in MP3 format

도 2는 AAC 형식의 오디오 부호화 과정의 흐름도2 is a flowchart of an audio encoding process in AAC format

도 3은 오디오 부호화 과정에서 비트 할당 및 양자화를 위한 이중 구조를 나타낸 흐름도3 is a flowchart illustrating a dual structure for bit allocation and quantization in an audio encoding process

도 4는 종래의 양자화 루프의 계산 방법을 나타낸 흐름도4 is a flowchart illustrating a method of calculating a conventional quantization loop.

도 5는 양자화 스텝 크기와 당해 양자화 루프에서 사용된 비트수의 관계를 나타낸 실험 결과 그래프5 is an experimental result graph showing the relationship between the quantization step size and the number of bits used in the quantization loop.

도 6은 본 발명에 따른 양자화 루프의 계산 방법을 나타낸 흐름도6 is a flowchart illustrating a method of calculating a quantization loop according to the present invention.

본 발명은 디지털 오디오의 부호화 방법에 관한 것으로서, 보다 상세하게는 디지털 오디오의 부호화과정 중 많은 연산량을 요구하여 실시간 처리 및 저전력 설계를 어렵게 하는 비트 할당 및 양자화를 위한 반복 루프 과정의 계산량과 수행 소요시간을 대폭 줄일 수 있는 디지털 오디오의 부호화 방법에 관한 것이다. The present invention relates to a method of encoding digital audio, and more particularly, a computational amount and execution time of an iterative loop process for bit allocation and quantization, which require a large amount of computation during the encoding process of digital audio, thereby making real time processing and low power design difficult. The present invention relates to a digital audio encoding method which can greatly reduce the number of times.

기존의 아날로그 오디오에 비해 훨씬 깨끗한 음질과 넓은 대역폭을 갖는 디 지털 오디오는 CD나 DVD등을 비롯, 디지털 TV나 디지털 멀티미디어 방송(DMB) 및 디지털 오디오 방송(DAB) 등으로 그 응용분야가 확대됨에 따라 더욱 관심이 고조되고 있다. 디지털 오디오는 또한 영화나 컴퓨터와 같은 여러가지 매체에서 호환되어 출력될 수 있어서 계속해서 그 응용범위가 확장될 것으로 전망된다. 그러나 아날로그 오디오 신호를 샘플링해서 고음질의 디지털 오디오 신호를 얻는 경우 처리하는 과정에서 데이터량이 크게 증가하므로 많은 메모리와 전송대역을 차지하는 단점이 있다. 특히 디지털 TV나 DMB, DAB, 네트워크 통신망과 같이 전송 채널을 이용하는 경우에는 방대한 데이터량을 효과적으로 압축하지 않고는 실시간 전송이 불가능하다.Digital audio, which has much cleaner sound quality and wider bandwidth than conventional analog audio, has been applied to digital TV, digital multimedia broadcasting (DMB) and digital audio broadcasting (DAB) as well as CD and DVD. There is a growing interest. Digital audio can also be output in a variety of media, such as movies and computers, and is expected to continue to expand its application. However, when the analog audio signal is sampled to obtain a high quality digital audio signal, a large amount of data increases during processing, which takes up a lot of memory and a transmission band. In particular, when using transmission channels such as digital TV, DMB, DAB, and network communication network, real-time transmission is impossible without effectively compressing a large amount of data.

디지털 오디오 신호를 효과적으로 압축하는 오디오 부호화 방식은 80년대에 접어들면서부터 미국의 AT&T, Dolby Lab과 유럽의 IRT, Philips, CCETT, 그리고 일본의 Sony 등의 여러 연구소에서 개발되어 왔다. 이러한 오디오 압축 기술 중에서 현재 세계적으로 널리 사용되고 있는 것은 유럽의 MUSICAM(Masking pattern adapted Universal Subband Integrated Coding And Multiplexing) 및 ASPEC 방식에 기반을 둔 MPEG 방식과 미국의 Dolby Lab에서 제안한 AC-3 방식등이 있다. 고음질 오디오 부호화 알고리즘은 오디오 신호를 부호화한 후 복호화했을 때 CD수준의 고음질을 제공하고 원음과 비교하여 지각적으로 손실이 없어야 한다. 이들 부호화 알고리즘은 공통적으로 신호의 지각적 중복성을 제거하기 위해 사람 귀의 청각적 특성을 이용한 압축방식과 신호의 통계적 중복성을 제거하기 위한 기존의 데이터 압축방식을 결합한 형태를 갖는다.Audio coding, which effectively compresses digital audio signals, has been developed by AT & T, Dolby Labs in the US and IRT, Philips, CCETT in Europe, and Sony in Japan since the 1980s. Among the audio compression technologies currently used worldwide, MPEG based on MUSICAM (Masking pattern adapted Universal Subband Integrated Coding And Multiplexing) and ASPEC method, and AC-3 method proposed by Dolby Lab of USA. High quality audio coding algorithm should provide CD quality high quality sound after encoding and decoding audio signal and should not have perceptual loss compared with original sound. These coding algorithms commonly combine a compression method using the auditory characteristics of the human ear to remove perceptual redundancy of a signal and a conventional data compression method to remove statistical redundancy of a signal.

MPEG-1,2의 제 3 계층 오디오 부호화 알고리즘(이하 MP3)은 CD 수준의 오디오 신호를 10:1 이상 압축하여도 원음과 청각적으로 구분이 없는 복원음을 재생할 수 있는 고음질 오디오 부호화 기술로 1991년(MPEG-1)과 1994년(MPEG-2)에 각각 국제 표준안이 완성되었다. 특히 MP3는 인터넷을 이용한 오디오 재생 등에 널리 사용되면서 성능을 인정 받고 시장 수요가 급격히 증가하고 있으며 휴대형 MP3 재생기가 개발되면서 CD 재생기 및 카세트 재생기를 대체한 휴대형 디지털 오디오 기기로 널리 사용되고 있다.The third layer audio encoding algorithm (MP3) of MPEG-1,2 is a high quality audio encoding technology that can reproduce the original sound and the acoustically insensitive reconstructed sound even when the CD level audio signal is compressed by 10: 1 or more. In year (MPEG-1) and 1994 (MPEG-2), international standards were completed respectively. In particular, as MP3 is widely used for audio playback using the Internet, the performance is recognized and the market demand is rapidly increasing. As a portable MP3 player is developed, it is widely used as a portable digital audio device replacing a CD player and a cassette player.

MP3 복호화 알고리즘의 경우는 연산 과정이 부호화 알고리즘에 비해 비교적 간단하여, 상기 알고리즘을 처리하는 저전력 프로세서과 실시간 처리가 가능한 ASIC 칩들이 많이 개발되어 사용되고 있지만, 상대적으로 월등히 많은 연산량을 필요로 하는 부호화기의 경우는 그렇지 못하다. 하지만 휴대형 MP3 시장이 본격화 및 다양화되면서, 점차적으로 고음질의 녹음, 즉 휴대 오디오 기기에서의 고음질 오디오 부호화 기능에 대한 수요가 증가하고 있다. 특히, 가장 널리 사용되고 있는 MP3 방식으로의 부호화는 그 활용성이 매우 높다고 할 수 있다. In the case of the MP3 decoding algorithm, the operation process is relatively simpler than that of the encoding algorithm, and many low-power processors and ASIC chips capable of real-time processing have been developed and used. However, in the case of an encoder requiring a relatively large amount of computation, It is not. However, as the portable MP3 market expands and diversifies, there is an increasing demand for high-quality recording, that is, high-quality audio encoding in a portable audio device. In particular, the most widely used MP3 encoding can be said to be very useful.

한편, MPEG-2,4 AAC (Advanced Audio Coding)는 기존 MP3까지의 부호화 방식이 가진 한계를 극복하고, 새롭게 개발된 오디오 압축 신호처리 기술들을 접목하여 개발된 MPEG의 고음질 오디오 부호화 방식으로 1997년에 MPEG-2 AAC라는 이름으로 표준화가 완성되었으며, MPEG-4 에서도 그대로 수용되어 사용되고 있다. MPEG-2,4 AAC는 MP3에 비해 높은 압축 효율과 고음질을 제공하여 방송 및 통신용 오디오 부호화 기술로 채택되어 사용된다. AAC는 MP3 부호화 방법의 장점을 최대한 수용하고 있기 때문에, 부호화 및 복호화 과정에서 MP3와 유사한 과정을 많이 내포하고 있다. 또한, 역시 복호화 과정에 비해 부호화 과정이 월등히 많은 연산량을 요구하기 때문에, 부호화기의 저전력 설계에는 어려운 점이 많다.On the other hand, MPEG-2,4 AAC (Advanced Audio Coding) is MPEG's high-quality audio coding method developed in 1997 by overcoming the limitations of the existing MP3 coding method and incorporating newly developed audio compression signal processing technology. The standardization was completed under the name of MPEG-2 AAC, and it is used as it is in MPEG-4. MPEG-2,4 AAC provides high compression efficiency and high sound quality compared to MP3 and is used as audio coding technology for broadcasting and communication. Since the AAC fully accommodates the advantages of the MP3 encoding method, the AAC includes many similar processes to the MP3 in the encoding and decoding process. In addition, since the encoding process requires much more computation than the decoding process, there are many difficulties in the low power design of the encoder.

이와 같은 MP3 및 AAC의 부호화 과정이 복호화 과정에 비해 복잡한 이유는 심리 음향 모델에 의한 능동적 비트 할당이 많은 연산량을 차지하기 때문이다. 심리 음향 모델의 경우는 DSP(digital signal processor)로 구현하기에 비효율적인 지수, 로그 연산을 많이 포함하고 있으며, 이를 바탕으로 수행되는 비트 할당 과정은 최적의 잡음 정형(noise shaping)이 이루어질 때까지 여러 차례 비선형 양자화와 허프만 부호화를 반복 수행해야 하기 때문에 결과적으로 많은 수행시간을 요구한다. MP3 및 AAC에서 심리음향 모델 연산과 비트할당 부분이 차지하는 연산량은 보통 전체 연산량의 80%에 이를 정도로 많으며, 특히 비트 할당 과정은 입력 데이터의 특성에 따라 연산량이 크게 달라지기 때문에, 오디오 신호의 실시간 처리에 많은 어려움이 따른다. The encoding process of the MP3 and AAC is more complicated than the decoding process because active bit allocation by the psychoacoustic model occupies a large amount of computation. The psychoacoustic model includes many exponential and logarithmic operations, which are inefficient to implement with a digital signal processor (DSP), and the bit allocation process performed on the basis of this process is performed until the optimal noise shaping is achieved. In turn, nonlinear quantization and Huffman coding have to be performed repeatedly, resulting in a large execution time. In MP3 and AAC, the operation amount of the psychoacoustic model calculation and bit allocation portion is usually about 80% of the total calculation amount. Especially, the bit allocation process varies greatly depending on the characteristics of the input data. Comes with many difficulties.

도1을 참조하여 종래의 MP3 오디오 부호화 알고리즘의 기본 구조를 설명하면 다음과 같다. MP3에서는 먼저 오디오 신호의 통계적인 중복성을 제거하기 위하여 입력 신호를 32개의 가중 중첩 가산 방식 등간격 필터뱅크에 통과시켜 서브밴드 샘플로 변환하고, 상기 변환된 서브밴드 샘플에 대해 다시 MDCT(Modified Discrete Cosine Transform)를 수행함으로써 주파수 해상도를 높이는 하이브리드(hybrid) 변환 부호화 방식이 사용된다. 이와 동시에 오디오 신호에 대해 FFT(Fast Fourier Transform)를 수행하고, 심리 음향 모델내에서 인간의 청각 특성에 의한 지각적인 중복성을 제거하기 위하여 귀에 들리지 않는 잡음 레벨인 마스킹 임계값(masking threshold)을 얻는다. 각 프레임에서의 마스킹 임계값을 근거로 하여 양자화 잡음이 신호에 의해 마스킹 될 수 있도록 MDCT 스펙트럼의 양자화 비트를 할당하는데, 비트 할당과 양자화(단계 121), 그리고 허프만 부호화 과정(단계 125)은 반복 루프를 통해 처리된다(100). 잡음을 완전히 마스킹 시킬 수 없을 때에는 주관적 잡음을 최소화하도록 스케일 팩터 밴드 별로 비트를 할당하고 양자화된 MDCT 스펙트럼은 허프만 부호화되어 부가 정보와 함께 부호화하여(단계 190) 비트열로 만들어진다.Referring to Figure 1, the basic structure of a conventional MP3 audio encoding algorithm will be described. In MP3, first, the input signal is passed through 32 weighted superposition-added equally spaced filter banks to convert to subband samples to remove statistical redundancy of the audio signal. By performing a transform, a hybrid transform encoding method for increasing frequency resolution is used. At the same time, an FFT (Fast Fourier Transform) is performed on the audio signal, and a masking threshold, which is an inaudible noise level, is obtained to remove perceptual redundancy due to human auditory characteristics in the psychoacoustic model. Based on the masking threshold in each frame, the quantization bits of the MDCT spectrum are allocated so that the quantization noise can be masked by the signal.The bit allocation and quantization (step 121) and the Huffman coding process (step 125) are repeated loops. Is processed through (100). When the noise cannot be completely masked, bits are allocated per scale factor band to minimize subjective noise, and the quantized MDCT spectrum is Huffman coded and encoded together with additional information (step 190) to form a bit string.

도 2를 참조하여 종래의 AAC 부호화 알고리즘의 기본 구조 과정을 설명하면 다음과 같다. 심리음향 모델을 통해 주파수 영역에서 마스킹 임계치를 얻고 이를 바탕으로 양자화 잡음이 귀에 들리지 않도록 잡음을 정형하는 비트 할당을 수행하는 구조는 상기한 MP3와 동일하다. 다만, AAC의 부호화는 주파수 변환 과정이 MP3에 비해 높은 주파수 해상도를 갖는 2048 point에 대해 MDCT 필터 뱅크를 수행하고, 시간 영역에서 잡음을 정형하는 기술인 TNS(Temporal Noise Shaping)을 사용하며, 프레임과 프레임 사이의 통계적 중복성을 제거하기 위한 예측(Prediction)을 사용하는 것이 MP3와 크게 다르다. 또한 AAC 부호화기에서는 전송될 비트율에 따라 표본화 주파수를 가변시킬 수 있는 전처리기를 포함하고 있다. Referring to Figure 2 describes the basic structure of the conventional AAC coding algorithm as follows. The masking threshold is obtained in the frequency domain through the psychoacoustic model, and the structure of performing bit allocation to shape the noise so that the quantization noise is inaudible is the same as that of the MP3. However, AAC encoding performs MDCT filter bank on 2048 points with higher frequency resolution compared to MP3, and uses temporal noise shaping (TNS), a technique for shaping noise in the time domain. The use of prediction to remove statistical redundancy between them is very different from MP3. The AAC encoder also includes a preprocessor that can vary the sampling frequency according to the bit rate to be transmitted.

MP3에서는 도 1에서와 같은 일련의 처리 과정을 시간 영역에서 576 샘플에 해당하는 단위로 진행하는 데, 이 단위를 그래뉼(granule)이라 한다. 2 개의 그래뉼은 하나의 프레임(frame)을 형성한다. 상기 프레임은 독립적으로 복호화를 수행할 수 있는 최소의 단위가 된다. 한편, AAC에서는 도 2의 과정을 시간 영역에서 1024 샘플에 해당하는 단위로 진행하며, 이를 프레임이라 한다. 따라서 MP3에서의 프레임과 AAC에서의 프레임은 그 길이와 의미가 서로 다른데, 본 명세서에서는 이후 설명의 편의상 프레임이라는 용어로 통칭하도록 한다. 따라서, 본 명세서에서 언급하는 프레임 단위는 MP3에 대해서는 그래뉼 단위를 의미한다.In MP3, a series of processing processes as shown in FIG. 1 are performed in units corresponding to 576 samples in the time domain, which is called granules. The two granules form one frame. The frame becomes a minimum unit capable of independently decoding. Meanwhile, in the AAC, the process of FIG. 2 is performed in units corresponding to 1024 samples in the time domain, which is called a frame. Therefore, the frame in MP3 and the frame in AAC have different lengths and meanings. In the present specification, for convenience of description, the term 'frame' will be referred to collectively. Therefore, the frame unit referred to in the present specification means a granule unit for MP3.

도 3을 참조하여 도 1 및 도 2에 포함된 반복 루프에서 비트할당을 통한 양자화와 허프만 부호화가 수행되는 과정을 설명하면 다음과 같다. 반복 루프는 양자화 잡음과 마스킹 임계치를 비교하여 잡음 정형을 수행하는 왜곡 제어 루프(외부 루프)(단계 100)와 양자화(단계 121) 및 부호화(단계 125)를 위한 비트 할당 결과와 사용 가능한 비트 수를 비교하여 진행하는 양자화 루프(내부 루프)(단계 120)의 이중 구조(이를 Nested loop라 부른다)를 포함하여 구성된다. 상기 반복 루프의 입력으로는 양자화의 대상인 MDCT 계수, 심리음향모델의 출력인 마스킹 임계치, 그리고 압축 비트율에 의해 결정되는 사용가능한 비트수 (ba)가 있다. 상기 반복 루프 중 먼저 내부의 양자화 루프에서는 MDCT 계수에 대한 비선형 양자화를 수행하게 되는데, 비선형 양자화를 위한 수식은 다음과 같다. Referring to FIG. 3, a process of performing quantization and Huffman coding through bit allocation in the iterative loop included in FIGS. 1 and 2 will now be described. The iterative loop compares the quantization noise and the masking threshold to determine the distortion allocation loop (outer loop) (step 100) and bit allocation results and number of bits available for quantization (step 121) and encoding (step 125). It comprises a dual structure of a quantization loop (inner loop) (step 120), which proceeds in comparison (called a nested loop). Inputs of the iterative loop include MDCT coefficients as quantization targets, masking thresholds as outputs of the psychoacoustic model, and the number of available bits b a determined by the compression bit rate. First of all, the inner quantization loop performs nonlinear quantization of MDCT coefficients. The equation for nonlinear quantization is as follows.

Figure 112005028959608-pat00001
Figure 112005028959608-pat00001

수학식 1에서 n는 0,1,2,...,N-1인 MDCT 계수 인덱스(index)이며, 여기서 N은 MP3의 경우 576, AAC의 경우 1024가 된다. xr(n)는 실수 값을 갖는 MDCT 계수이 며, is(n)는 양자화된 MDCT 계수를 의미한다. 수학식 1에서 quant는 실제로 양자화 스텝 크기(step size) 혹은 글로벌 게인(global gain)이라고 부른다. 실제 quant 값에 의해 해당 프레임의 부호화에 사용된 비트 수와 양자화 잡음이 결정되므로 양자화 루프에서 제어 대상이 되는 값이다.In Equation 1, n is an MDCT coefficient index of 0, 1, 2, ..., N-1, where N is 576 for MP3 and 1024 for AAC. xr (n) is an MDCT coefficient having a real value, and is (n) is a quantized MDCT coefficient. In Equation 1, quant is actually called a quantization step size or global gain. The actual quant value determines the number of bits used for encoding the frame and the quantization noise, so it is the value to be controlled in the quantization loop.

비선형 양자화 과정(단계 121)을 통해 양자화된 MDCT 계수에 대해 허프만 부호화가 수행(단계 125)되며, 이 과정을 통해 해당 프레임이 부호화되고, 사용된 비트수 bu값이 계산된다. 상기 계산된 bu값이 사용 가능한 비트수 ba보다 클 경우에는 비트수를 초과 사용했음을 의미하므로, 양자화 스텝 크기를 조정하여 다시 양자화와 허프만 부호화를 수행해야 하며, 조건을 만족한 경우 내부 루프(120)를 탈출할 수 있다(단계 127). 내부의 양자화 루프를 통해 양자화와 허프만 부호화가 이루어지면, 외부의 왜곡제어 루프에서는 양자화된 MDCT 계수로부터 역양자화를 수행하고, 역양자화된 MDCT 계수와 원래의 실수 MDCT 계수와의 차이로부터 왜곡, 즉 양자화 잡음 값을 계산한다. 이렇게 계산된 왜곡은 스케일팩터 밴드라 부르는 주파수 영역에서의 단위별로 심리음향 모델의 출력인 마스킹 임계치와 비교되고(단계 155), 상기 비교 결과 왜곡 값이 마스킹 임계치보다 큰 경우에 대해서는(이는 해당 왜곡이 사람의 귀에 거슬리는 소리로 인지되는 것을 의미함) 해당 밴드에 대한 스케일팩터 값을 갱신하여(단계 157) 다시 내부의 양자화 루프로 돌려보내게 된다. 그리고 내부 루프에서는 스케일팩터에 의해 새롭게 결정된 MDCT 계수 xr(n) 값들에 대해 다시 비선형 양자화와 허프만 부호화를 수행하는 반복 루프를 수행하게 된다. 이를 통해 모든 밴드에 대한 왜곡과 마스킹 임계치에 대한 조건을 만족하게 되면 전체 반복 루프의 수행이 완료된다. 상기와 같이 외부 루프의 탈출 조건과 내부 루프의 탈출 조건을 만족하기까지 많은 반복 수행이 이뤄지기 때문에 비트 할당과 양자화를 위한 반복 루프는 많은 연산량을 갖게 된다. Huffman coding is performed on the quantized MDCT coefficients (step 125) through a nonlinear quantization process (step 121), through which the corresponding frame is encoded and the number of bits b u used is calculated. If the calculated value b u is greater than the number of available bits b a , the number of bits is exceeded. Therefore, the quantization step size should be adjusted to perform quantization and Huffman coding again. 120 may escape (step 127). When quantization and Huffman coding are performed through an internal quantization loop, the external distortion control loop performs inverse quantization from quantized MDCT coefficients, and distortion, that is, quantization, from the difference between the dequantized MDCT coefficients and the original real MDCT coefficients. Calculate the noise value. The calculated distortion is compared with the masking threshold, which is the output of the psychoacoustic model, in units of a frequency domain called a scale factor band (step 155), and the comparison results in the case where the distortion value is larger than the masking threshold (this distortion is It is perceived as annoying sound to the human ear) and the scale factor value for the band is updated (step 157) and returned to the internal quantization loop. In the inner loop, the iterative loop performs nonlinear quantization and Huffman coding on the MDCT coefficients xr (n) values newly determined by the scale factor. Through this, if the conditions for distortion and masking threshold for all bands are satisfied, the entire iteration loop is completed. As described above, since many iterations are performed until the exit condition of the outer loop and the exit condition of the inner loop are satisfied, the iteration loop for bit allocation and quantization has a large amount of computation.

상기 과정 중 내부의 양자화 루프에서 매 루프마다 양자화와 허프만 부호화를 재실시해야만 하는 이유는 허프만 부호화 때문인데, 허프만 부호화란 부호화하고자 하는 데이터(심볼)가 발생하는 확률에 따라 길이(비트수)가 다른 코드워드(codeword)를 사용하여 부호화는 방식이다. 따라서, 실제 사용된 비트수는 양자화 스텝 등의 인자들에 의해 결정되는 것이 아니라 양자화와 허프만 부호화를 수행한 이후에만 알 수 있으므로, 최적 값을 얻을 때까지 수차례 양자화와 허프만 부호화를 반복 수행해야만 하고, 따라서 상기 과정을 처리하는 데 많은 연산량을 요구하는 문제점이 있다.The reason that the quantization and Huffman coding must be repeated for each loop in the internal quantization loop is because of Huffman coding. Huffman coding means that the length (the number of bits) varies depending on the probability of generating the data (symbol) to be encoded. Encoding using a codeword is a method. Therefore, the actual number of bits used is not determined by factors such as the quantization step, but can be known only after performing quantization and Huffman coding. Therefore, the quantization and Huffman coding must be repeated several times until an optimal value is obtained. Therefore, there is a problem that requires a large amount of computation to process the process.

도 4를 참조하여 제어 대상인 양자화 스텝 크기 s(i)와 사용된 비트수 ba의 관점에서 양자화 루프 알고리즘을 설명하면 다음과 같다. 양자화 루프에 현재 프레임에서의 사용 가능한 비트수 ba 와 양자화 스텝(quant)에 대한 초기값 s(0)가 입력된다(단계 200). 매 루프에서는 함수 B(*)로 표현된 과정을 통해 MDCT 계수들을 양자화 하는데 필요한 비트수 bu를 계산하며(210), 상기 bu는 상기 함수 B(*)와 다음과 같은 관계를 갖는다.Referring to FIG. 4, the quantization loop algorithm is described in terms of the quantization step size s (i) to be controlled and the number of bits b a used as follows. In the quantization loop, the number of bits b a available in the current frame and the initial value s (0) for the quantization step quant are input (step 200). In each loop, the number of bits b u required to quantize MDCT coefficients is calculated through a process represented by a function B (*) (210), and b u has the following relationship with the function B (*).

Figure 112005028959608-pat00002
Figure 112005028959608-pat00002

여기서, i는 루프의 인덱스이다. 함수 B(*)는 실제로 현재의 양자화 스텝값 s(i)를 활용하여 MDCT 계수를 비선형 양자화하고, 양자화된 계수들에 대해 허프만 부호화를 수행한 후, 사용된 비트수를 계산하는 일련의 과정이다. 그리고, 상기 함수 값 B(*)는 상기 사용된 비트수 bu로 입력된다(단계 210). 도 4에서 양자화 루프 과정은 조건 Cnd-I(단계 220)과 조건 Cnd-Ⅱ(단계 240)가 만족될 때가지 반복하게 된다. 조건 Cnd-I과 조건 Cnd-Ⅱ는 각가 다음 식과 같다.Where i is the index of the loop. Function B (*) is actually a series of processes that nonlinear quantize MDCT coefficients using the current quantization step value s (i), perform Huffman coding on the quantized coefficients, and then calculate the number of bits used. . The function value B (*) is input to the used number of bits b u (step 210). In FIG. 4, the quantization loop process is repeated until condition Cnd-I (step 220) and condition Cnd-II (step 240) are satisfied. The conditions Cnd-I and Cnd-II are as follows.

Figure 112005028959608-pat00003
Figure 112005028959608-pat00003

Figure 112005028959608-pat00004
Figure 112005028959608-pat00004

즉, 수학식 3의 조건 Cnd-I은 현재의 루프에서 계산된 값 bu(i)가 사용가능한 비트수 ba보다 작거나 같은지 여부를 확인한다(단계 220). 만약 이 조건을 만족하지 못하면, 현재 프레임에서 사용가능한 비트수를 초과한 것이므로, 함수 UPDI(*)에 의해 양자화 스텝 크기가 조정되고(단계 230), 다시 루프를 수행하게 한다. 조건 Cnd-I이 만족된 경우, 조건 Cnd-Ⅱ에서는 조건 Cnd-I을 만족한 현재의 양자화 스텝 크기보다 하나 작은 양자화 스텝, s(i)-1에 대해서도 B(*) 함수를 수행하여, 이때 의 출력 bu값이 ba와 비교하여 큰 지 여부를 확인한다(단계 240). 조건 Cnd-Ⅱ는 앞서 조건 Cnd-I을 만족한 양자화 스텝이 최적의 값인지 여부를 판단하기 위해 수행된다. 조건 Cnd-Ⅱ를 만족하지 못한 경우에는 함수 UPD(*)에 의해 양자화 스텝 크기를 조정하고(단계 250), 다시 루프를 수행하게 된다. 조건 Cnd-I과 조건 Cnd-Ⅱ를 모두 만족할 때까지 루프를 수행하면, 최종적으로 최적의 양자화 스텝 크기 값과 사용된 비트수, 실제 양자화된 MDCT 계수, 그리고 사용된 허프만 코드북 인덱스 등의 출력을 얻을 수 있다.That is, the condition Cnd-I of Equation 3 checks whether the value b u (i) calculated in the current loop is less than or equal to the available number of bits b a (step 220). If this condition is not satisfied, the number of bits available in the current frame is exceeded, and the quantization step size is adjusted by the function UPD I (*) (step 230), and the loop is performed again. When the condition Cnd-I is satisfied, the condition Cnd-II performs a B (*) function on the quantization step s (i) -1 which is one smaller than the current quantization step size that satisfies the condition Cnd-I. The output b u value is compared with ba to determine whether it is large (step 240). Condition Cnd-II is performed to determine whether the quantization step satisfying the condition Cnd-I is an optimal value. If the condition Cnd-II is not satisfied, the quantization step size is adjusted by the function UPD II (*) (step 250), and the loop is performed again. By looping until both conditions Cnd-I and Cnd-II are satisfied, we finally get outputs such as the optimal quantization step size value, the number of bits used, the actual quantized MDCT coefficients, and the Huffman codebook index used. Can be.

상기한 양자화 루프의 과정을 관찰하면, 루프의 반복 회수는 양자화 스텝에 대한 초기값 s(0)와 양자화 스텝 크기를 갱신하는 함수 UPDI 및 UPD의 성능에 의존하는 것을 알 수 있다. Observing the above-described process of the quantization loop, it can be seen that the number of iterations of the loop depends on the performance of the functions UPD I and UPD II updating the initial value s (0) for the quantization step and the quantization step size.

ISO/IEC 11172-3 MPEG 규격에 따른 가장 기본적인 구현 방법은 양자화 스텝 크기의 초기값 s(0)를 최소값으로 설정하고, 갱신 함수 UPDI을 다음 식과 같이 설정하는 것이다.The most basic implementation method according to the ISO / IEC 11172-3 MPEG standard is to set the initial value s (0) of the quantization step size to a minimum value and the update function UPD I as follows.

Figure 112005028959608-pat00005
Figure 112005028959608-pat00005

즉, 가장 작은 양자화 스텝 크기로부터 하나씩 증가시키며, 조건 Cnd-I을 만족할 때까지 루프를 진행한다. 가장 작은 값으로부터 한 계단씩 양자화 스텝을 증가시키기 때문에, 조건 Cnd-I을 만족하면, 조건 Cnd-Ⅱ는 자동으로 만족하게 된다. 이와 같은 방법은 가장 쉽게 최적값을 찾을 수 있는 확실한 방법이지만, 실시간 처리의 관점에서 볼 때는 매우 비효율적인 방법이다. 최종적으로 얻게될 출력 양자화 스텝 값이 매우 큰 값인 경우, 루프의 회수가 그에 비례하여 증가하고, 이는 곧 연산량이 그만큼 증가하는 결과를 초래하게 된다. 예를 들어, MP3의 경우 가질 수 있는 양자화 스텝 값이 0~255까지 이므로, 최악의 경우 256회의 루프를 수행해야 하는데, 이는 사실상 실시간 처리가 불가능한 연산량이다. That is, it increments by one from the smallest quantization step size and loops until the condition Cnd-I is satisfied. Since the quantization step is increased by one step from the smallest value, when the condition Cnd-I is satisfied, the condition Cnd-II is automatically satisfied. While this is the surest way to find the optimal value most easily, it is very inefficient in terms of real-time processing. If the final quantization step value to be obtained is a very large value, the number of loops increases proportionally, which results in an increase in the amount of computation. For example, in the case of MP3, since the quantization step can have a value from 0 to 255, in the worst case, 256 loops should be performed, which is an amount of computation that is impossible in real time.

가능한 효율적 방법으로 이전 프레임에 대한 양자화 스텝 크기를 초기값 s(0)로 사용하는 방법이 있다. 이는 이웃하는 프레임간의 양자화 스텝 크기는 대체로 크게 변화하지 않는다는 특성을 이용한 것으로, 이와 같은 특성이 유지되는 구간에 대해서는 크게 효과를 나타낼 수 있다. 그러나, 만일 오디오 신호의 크기가 갑자기 크게 변화하는 경우, 양자화 스텝 크기도 급격히 변화하게 된다. 즉, 이에 따라 양자화 루프의 반복회수도 비례하여 증가하게 되며, 따라서 연산량도 증가한다. 실시간 오디오 부호화 시스템의 경우, 평균적인 연산량이 아닌 최대 연산 요구량을 기준으로 시스템의 연산능력을 결정해야 하므로 이와 같은 방법은 평균적인 의미에서는 개선이 되었지만, 최악의 경우에 대해서는 개선효과가 없다는 문제점이 있다. One possible efficient method is to use the quantization step size for the previous frame as the initial value s (0). This uses the property that the quantization step size between neighboring frames does not change significantly, and can have a great effect on a section in which such a property is maintained. However, if the magnitude of the audio signal suddenly changes greatly, the quantization step size also changes abruptly. That is, the number of repetitions of the quantization loop also increases in proportion, thus increasing the amount of computation. In the real-time audio coding system, since the computational capability of the system is determined based on the maximum computational demand, not the average computational amount, this method has been improved in the average sense, but there is a problem in that the worst case has no improvement. .

또한, 양자화 루프의 반복회수 증가로 연산량이 증가하면 디지털 오디오의 부호화과정에 많은 전력이 소모되는 문제점도 발생한다.In addition, when the amount of computation increases due to the increased number of iterations of the quantization loop, a problem arises in that a lot of power is consumed in the encoding process of the digital audio.

본 발명은 상기와 같은 문제점을 해결하기 위한 것으로서, 본 발명의 목적은 디지털 오디오의 부호화과정 중 연산량이 많이 소요되는 비트 할당을 위한 반복 루프 내 양자화 루프에 대한 연산량을 크게 줄일 수 있는 디지털 오디오의 부호화 방법을 제공하는 것이다. SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to encode digital audio, which can greatly reduce the amount of computation for a quantization loop in a repeating loop for bit allocation, which requires a large amount of computation during the encoding process of digital audio. To provide a way.

본 발명의 다른 목적은 상기 오디오 부호화의 연산량을 줄여 상기 과정을 수행할 수 있는 오디오 부호화 장치의 전력소모를 줄이면서도 음질에는 영향을 미치지 않은 새로운 디지털 오디오의 부호화 방법을 제공하는 것이다. Another object of the present invention is to provide a new digital audio encoding method which reduces the computational amount of the audio encoding and reduces the power consumption of the audio encoding apparatus capable of performing the above process but does not affect the sound quality.

상기 목적을 달성하기 위하여, 본 발명은 오디오 신호에 대한 비트 할당과 양자화를 위해 양자화 루프 수행 과정을 포함하는 디지털 오디오의 부호화 방법에 있어서, 상기 양자화 루프 수행 과정은 (a) 사용된 비트 수와 초기 양자화 스텝 크기를 입력받는 단계; (b) 입력된 양자화 스텝 크기에 대한 MDCT 계수를 비선형 양자화하고, 상기 양자화된 계수들에 대해 부호화를 수행하여 사용된 비트수를 계산하는 단계; (c) 상기 (b) 과정에서 계산된 비트수가 당해 루프 단계에서 사용 가능한 비트수이하이고, 상기 사용 가능한 비트수로부터 소정의 일차함수관계에서 구한 오프셋 값을 감산한 비트수를 초과하는지 여부를 판단하는 단계; 및 (d) 상기 (c) 단계의 판단결과 상기 (b) 단계에서 계산된 비트수가 상기한 조건을 만족시키는 경우 양자화 루프를 탈출하고, 그렇지 않은 경우는 다음 루프의 양자화 스텝 크기를 갱신하는 단계를 수행한 후 상기 (b)단계로 되돌아 가는 단계를 포함하는 것을 특징으로 하는 디지털 오디오의 부호화 방법을 제공한다.In order to achieve the above object, the present invention provides a coding method of digital audio including a step of performing a quantization loop for bit allocation and quantization of an audio signal, wherein the step of performing the quantization loop is (a) the number of bits used and the initial stage. Receiving a quantization step size; (b) nonlinear quantizing the MDCT coefficients with respect to the input quantization step size, and performing encoding on the quantized coefficients to calculate the number of bits used; (c) It is determined whether the number of bits calculated in the step (b) is less than or equal to the number of bits available in the loop step, and the number of bits obtained by subtracting the offset value obtained in a predetermined first function relation from the available number of bits is exceeded. Doing; And (d) exiting the quantization loop if the number of bits calculated in step (b) satisfies the above condition, otherwise updating the quantization step size of the next loop. After performing the step of returning to step (b) it provides a digital audio encoding method comprising the step of.

상기 (c) 단계의 일차함수는 양자화 스텝의 크기에 대한 사용된 비트수의 관 계를 근사시킨 함수이다. 그리고, 상기 (c) 단계의 상기 오프셋 값은 임의로 설정될 수도 있으나, 임의의 양자화 스텝 크기의 변화에 대한 상기 일차함수의 변화값을 오프셋 값으로 하는 것이 바람직하다. The linear function of step (c) is a function approximating the relationship of the number of bits used to the size of the quantization step. And, the offset value of step (c) may be arbitrarily set, but it is preferable to set the change value of the first function with respect to the change of the arbitrary quantization step size as an offset value.

본 발명에서 상기 (d) 단계의 당해 루프의 바로 다음 루프의 양자화 스텝 크기를 갱신하는 단계는, (d1) 상기 (a) 단계에서 구한 사용된 비트수로부터 상기 오프셋 값에 1이하인 팩터를 곱한 값을 감산하여 다음 루프의 사용될 비트수를 추정하는 단계; 및 (d2) 상기 (d1) 단계에서 추정된 다음 루프에 사용될 비트수에 대한 상기 (c) 단계의 일차함수의 역함수의 결과값으로부터 당해 루프에 사용된 비트수에 대한 상기 (c) 단계의 일차함수의 역함수의 결과값을 감산한 값을, 당해 루프의 양자화 스텝 크기에 더하여 다음 루프의 양자화 스텝 크기를 갱신하는 단계를 포함하는 것이 바람직하다. In the present invention, the updating of the quantization step size of the loop immediately following the loop of step (d) includes: (d1) multiplying the offset value by a factor of 1 or less from the number of bits used in step (a). Subtracting to estimate the number of bits to be used in the next loop; And (d2) the first step of step (c) with respect to the number of bits used in the loop from the result of the inverse of the first function of step (c) with respect to the number of bits to be used in the next loop estimated in step (d1). And adding the value obtained by subtracting the result of the inverse function of the function to the quantization step size of the loop to update the quantization step size of the next loop.

또한, 상기 (a) 단계에서 입력 받는 초기 양자화 스텝의 크기는 당해 루프가 최최의 루프가 아닌 경우 이전 프레임의 최종 양자화 스텝 크기값으로 하는 것이 바람직하다. 프레임간의 오디오 신호의 크기가 급격히 변화하지 않은 경우 이전 프레임의 최종 양자화 스텝 크기를 초기 양자호 스텝의 크기로 하면 더욱 양자화 루프 수행 회수를 줄일 수 있다.In addition, it is preferable that the size of the initial quantization step received in the step (a) is the final quantization step size value of the previous frame when the loop is not the maximum loop. When the magnitude of the audio signal between frames does not change rapidly, the number of quantization loops can be further reduced by using the final quantization step size of the previous frame as the size of the initial quantization code step.

상기 양자화 스텝 크기와 사용된 비트 수를 일차함수로 근사시켰을 때 다음 루프에서 사용될 비트 수는 상기 일차함수의 관계에서부터 당해 루프의 사용된 비트 수로부터 추정될 수 있다. 따라서, 본 발명은 종래에서처럼 루프 인덱스를 하나씩 증가시키지 않고 사용될 비트 수를 일정한 관계식에 의해 추정할 수 있어서 양 자화루프 탈출조건을 신속히 만족시키도록 할 수 있다. 따라서, 상기 양자화 루프를 연산하는 계산량과 시간을 상당히 줄일 수 있다.  When the quantization step size and the number of bits used are approximated to the first function, the number of bits to be used in the next loop can be estimated from the number of used bits of the loop from the relationship of the first function. Therefore, the present invention can estimate the number of bits to be used by a constant relation without increasing the loop index by one as in the related art, so that the quantized loop escape condition can be satisfied quickly. Thus, the computation amount and time for computing the quantization loop can be significantly reduced.

도 5를 참조하여 본 발명에 따른 디지털 오디오의 부호화 방법에 대해 설명하면 다음과 같다. A method of encoding digital audio according to the present invention will now be described with reference to FIG. 5.

본 발명에 따른 디지털 오디오의 부호화 방법에 있어서 양자화 루프 방법은 함수 B(*)의 입력인 s(i)(양자화 스텝 크기)와 출력 bu(i)(사용된 비트수)에 대한 통계적 관계로부터 출발한다. 도 5는 함수 B(*)의 입력 s(i)와 출력 bu(i)의 관계를 나타낸 실험결과를 그래프로 표시한 것이다. 도 5의 그래프를 얻기 위해 입력값 s(i)를 최소값부터 최대값까지 증가시키면서 함수 B(*)에 대입하여 해당하는 내부 양자화 루프의 과정에 대한 출력 bu(i)를 얻는다. 그리고, 다양한 입력 오디오 신호에 대해 상기 입력과 출력의 쌍에 해당하는 점을 그래프상에 표시하였다. 도 5에서 표시된 점은 여러가지 오디오 신호에 대한 결과 중 그 일부에 대한 결과를 나타낸 것이다. 도 5에서 알 수 있듯이, s(i)와 bu(i)의 관계는 구간별로 거의 선형적 관계가 성립된다(선형관계는 도 5에 굵은 선으로 표시). 이것은 실제 함수 B(*)가 사용된 비트수에 대해 일련의 예측할 수 없는 비선형적 특성을 갖고 있음에도 불구하고, 그 결과는 대체적으로 선형적 관계를 갖는다는 것을 의미하는 것이다. 이와 같은 선형적 특성을 바탕으로 다음과 같은 관계식을 설정할 수 있다. In the method of encoding digital audio according to the present invention, the quantization loop method is based on a statistical relationship between s (i) (quantization step size), which is the input of function B (*), and output b u (i) (number of bits used). depart. 5 is a graph showing experimental results showing the relationship between the input s (i) and the output b u (i) of the function B (*). In order to obtain the graph of FIG. 5, the input value s (i) is increased from the minimum value to the maximum value and substituted into the function B (*) to obtain the output b u (i) for the process of the corresponding inner quantization loop. The points corresponding to the input and output pairs for various input audio signals are displayed on a graph. The points shown in FIG. 5 show the results for some of the results for the various audio signals. As can be seen in FIG. 5, the relationship between s (i) and b u (i) is substantially linear for each section (linear relationship is indicated by a thick line in FIG. 5). This means that although the actual function B (*) has a series of unpredictable nonlinear characteristics with respect to the number of bits used, the result is generally linear. Based on these linear characteristics, the following relation can be established.

Figure 112005028959608-pat00006
Figure 112005028959608-pat00006

수학식 6에서 ck는 알려지지 않은 상수로 k번째 프레임내에서 고정될 수 있는 미지수 값이다. 그리고 a는 선형식인 수학식 6의 양의 값을 갖는 기울기이다. 상기 수학식 6에 대해 i+1번째 반복 루프에서의 관계식은 다음 식처럼 나타낼 수 있다.In Equation 6, c k is an unknown constant, which is an unknown value that can be fixed in the k-th frame. And a is a slope having a positive value of Equation 6, which is linear. With respect to Equation 6, the relation in the i + 1 iteration loop can be expressed as the following equation.

Figure 112005028959608-pat00007
Figure 112005028959608-pat00007

상기 수학식 6과 수학식 7로부터 다음과 같은 수학식 8을 유도할 수 있다.The following Equation 8 can be derived from Equations 6 and 7 below.

Figure 112005028959608-pat00008
Figure 112005028959608-pat00008

수학식 8은 도 5의 선형관계를 이용하여 현재 루프의 s(i) , bu(i) 및 다음 루프에서의 예상되는 출력 bu(i+1)로부터 다음 루프에서 사용할 입력 s(i+1)를 얻을 수 있음을 나타낸다. 수학식 8에서 s(i+1)은 bu(i+1)값이 예측될 수 있으면, i+1 루프의 양자화 스텝 크기는 i루프의 양자화 스텝 크기와, bu(i)값과 bu(i+1)값에 대한 각각의 도 5의 일차함수 B(*)의 역함수의 값의 차이의 합으로 표현할 수 있다(일차함수가 s값에 대한 bu값으로 나타나므로, bu값의 변화량을 알면 그 일차함수의 역함수 관계로부터 s값의 변화량을 구할수 있다),Equation 8 uses the linear relationship of FIG. 5 to input s (i + for use in the next loop from s (i), b u (i) of the current loop and the expected output b u (i + 1) in the next loop. 1) can be obtained. In Equation 8, if s (i + 1) can be predicted by the value of b u (i + 1), the quantization step size of the i + 1 loop is equal to the quantization step size of the i loop, and the value of b u (i) and b. u (i + 1), because each of the values can also be expressed as the inverse of the sum of the difference between the value of the linear function b (*) 5 (a linear function is shown in b u values for the s value, b u value If we know the change of, we can get the change of s value from the inverse relation of the linear function),

즉, 수학식 8에서 bu(i+1)을 사용 예상되는 비트수 bd로 대체하면, 다음과 같은 수학식 9를 얻을 수 있다. That is, by replacing b u (i + 1) with the expected number of bits b d in Equation 8, Equation 9 can be obtained.

Figure 112005028959608-pat00009
Figure 112005028959608-pat00009

수학식 9에서 기울기 변수 a는 실험을 통해 찾아낼 수 있는 값으로써, 현재의 s(i) 값이 존재하는 구간에 따라 다른 값을 가질 수 있으며, MP3에서의 경우 50~200 사이의 값을 택하는 것이 바람직하다. 상기 bd는 i+1 루프에서 현재 프레임에서 사용 가능한 비트수 ba를 최대한 사용하여 양자화가 진행된 경우에 갖게 될 비트수를 추정한 값으로, 수학식 10과 같이 계산될 수 있다. In Equation 9, the slope variable a is a value that can be found through an experiment, and may have a different value depending on a section in which the current s (i) value exists, and in MP3, a value between 50 and 200 is selected. It is desirable to. The b d is a value obtained by estimating the number of bits to be obtained when the quantization is performed by using the maximum number of bits b a available in the current frame in the i + 1 loop, and may be calculated as shown in Equation 10.

Figure 112005028959608-pat00010
Figure 112005028959608-pat00010

도 5에서 보인 B(*)함수를 선형적 관계로 추정했기 때문에 수학식 10에서 bd 는 i 루프의 양자화 스텝 크기에 대한 최대 사용 가능한 비트수 ba 로부터 선형적으로 예측될 수 있는 것을 의미한다. 즉, i+1 루프의 bd의 값은 i 루프 ba 값으로부터 함수 B(*)의 가정된 선형함수를 따라 일정한 간격(수학식 10에서 offset)을 두고 예측될 수 있다. 그리고, 수학식 0.5는 일 예이며 1이하의 팩터를 곱하여 추정하는 것이 바람직하다.Since the B (*) function shown in FIG. 5 is estimated in a linear relationship, b d in Equation 10 means that it can be linearly predicted from the maximum number of available bits b a for the quantization step size of the i loop. . That is, the value of b d of the i + 1 loop may be predicted from the value of the i loop b a at regular intervals (offset in Equation 10) along the assumed linear function of the function B (*). Equation 0.5 is an example and is preferably estimated by multiplying a factor of 1 or less.

따라서, 양자화 스텝에 대한 갱신은 현재의 스텝 크기 s(i)에 의해 사용된 비트수 bu(i)와 다음 루프에서 출력이 예상되는 비트수 bd 사이의 선형적 거리에 대한 비율로 얻어질 수 있으므로, 능동적으로 상기 bd의 최적값을 찾을 수 있다. 이것은 또한 수학식 9의 기울기 변수에 해당하는 a를 조절하면, 양자화 루프의 최대 반복회수를 조절할 수 있으며, 따라서 허용된 연산량에 따라 탄력적으로 적용할 수 있다는 것을 의미한다. Thus, the update to the quantization step is to be obtained as the ratio of the linear distance between the number of bits b u (i) used by the current step size s (i) and the number of bits b d the output is expected in the next loop. Therefore, the optimum value of b d can be found actively. This also means that by adjusting a corresponding to the slope variable of Equation 9, the maximum number of iterations of the quantization loop can be adjusted, and thus it can be flexibly applied according to the allowed computation amount.

상기한 양자화 스텝 갱신 방법과 함께, 본 발명은 앙자화 루프의 새로운 탈출 조건을 제공한다. 새로운 루프 탈출 조건은 도 4에서 조건 Cnd-Ⅱ 에 대한 확인을 위해 실제로 함수 B(*)의 수행회수가 증가하는 문제를 피하기 위한 것으로, 다음 식과 같은 조건을 만족하는 bu(i) 값이 얻어지면, 양자화 루프를 빠져 나오도록 한다.In conjunction with the quantization step update method described above, the present invention provides a new escape condition of the angularization loop. The new loop escape condition is to avoid the problem of actually increasing the number of executions of the function B (*) to confirm the condition Cnd-II in FIG. 4, and when a bu (i) value satisfying the following condition is obtained, , Exit the quantization loop.

Figure 112005028959608-pat00011
Figure 112005028959608-pat00011

즉, 수학식 11은 offset이라는 상수에 의해 bu 값의 하한 조건을 설정해주는 것이다. 수학식 11을 만족하게 되면 종래의 루프 탈출 조건 Cnd-Ⅱ가 만족되는 것이므로 오프셋(offset)값을 미리 설정할 수 있다. 만약 수학식 11의 오프셋(offset)값이 도5의 일차함수의 역함수에 따라 정해지면 수학식 9의 기울기 변수 a에 따라 그 크기가 달라질 것이다. 이 경우에는 기울기 변수 a와 수학식 11의 오프셋(offset)값의 조절을 통해서 양자화 루프의 최대 반복 회수를 조절할 수 있다. 또한, 상기 오프셋 값을 도 5의 일차함수의 역함수값으로 추정하지 않고, ba 및 비트율에 따라 다른 임의의 값을 사용할 수도 있다. That is, Equation 11 sets the lower limit condition of the value b u by a constant called offset. If Equation 11 is satisfied, the conventional loop escape condition Cnd-II is satisfied, and an offset value can be set in advance. If the offset value of Equation 11 is determined according to the inverse function of the first order function of FIG. 5, the magnitude of the offset value will vary according to the inclination variable a of Equation 9. In this case, the maximum number of repetitions of the quantization loop may be controlled by adjusting the slope variable a and the offset value of Equation 11. In addition, instead of estimating the offset value as the inverse function of the primary function of FIG. 5, other values may be used depending on b a and bit rate.

도 6을 참조하여, 본 발명에 따른 디지털 오디오의 부호화 방법의 개선된 양자화 루프의 알고리즘을 설명하면 다음과 같다. Referring to FIG. 6, an algorithm of an improved quantization loop of a coding method of digital audio according to the present invention will be described.

양자화 루프에 현재 프레임에서의 사용 가능한 비트수 ba 와 양자화 스텝(quant)에 대한 초기값 s(0)가 입력된다(단계 300). 매 루프에서는 함수 B(*)로 표현된 과정을 통해 MDCT 계수들을 양자화 하는데 필요한 비트수 bu를 계산한다(단계 310). 그리고, 수학식 11에 표현된 조건 Cnd-prop를 만족하는지 여부를 판단한다(단계 320). 상기 판단 조건을 만족하지 않으면 수학식 9에 의해 i+1 루프의 양자화 스텝의 크기를 구한다(단계 330). 그리고, 다시 320 조건을 만족할 때까지 상기 단계 310, 320, 330이 반복된다. 그리고, 상기 반복 회수를 더욱 감소시키기 위해서 양자화 스텝 크기의 초기값 s(0)는 이전 프레임의 최종 양자화 스텝 크기값을 사용하는 것이 바람직하다. The number of bits ba available in the current frame and the initial value s (0) for the quantization step quant are input to the quantization loop (step 300). In each loop, the number of bits bu needed to quantize MDCT coefficients is calculated through a process represented by function B (*) (step 310). Then, it is determined whether the condition Cnd-prop expressed in Equation 11 is satisfied (step 320). If the determination condition is not satisfied, the magnitude of the quantization step of the i + 1 loop is calculated by Equation 9 (step 330). Then, the steps 310, 320, and 330 are repeated until the condition 320 is satisfied again. In order to further reduce the number of repetitions, it is preferable that the initial value s (0) of the quantization step size uses the final quantization step size value of the previous frame.

본 발명에 따른 디지털 오디오의 부호화 방법을 사용하게 되면, 평균 1.8회, 최대 4회의 반복 회수만으로 양자화 루프를 수행할 수 있어서 종래의 평균 3.9회, 최대 40회 이상의 반복이 필요한 경우에 비해 최대 10분의 1의 적은 연산량으로 오디오 부호화 과정을 구현할 수 있다. 본 발명에 따른 디지털 오디오의 부호화방법에 있어서 반복 루프에서의 양자화 스텝 갱신 방법과 양자화 루프의 탈출 조건은 이러한 기술이 사용되는 어떤 오디오 부호화 장치에도 적용될 수 있다. When the digital audio coding method according to the present invention is used, the quantization loop can be performed with an average of 1.8 times and a maximum of 4 times of repetition, so that a maximum of 10 minutes is required compared to a case where a conventional average of 3.9 times and a maximum of 40 times or more are required. An audio encoding process can be implemented with a small amount of computation of 1. In the digital audio encoding method according to the present invention, the quantization step update method in the iterative loop and the escape condition of the quantization loop can be applied to any audio encoding apparatus in which this technique is used.

상기에서 설명한 본 발명에 따른 디지털 오디오의 부호화 방법의 효과를 설명하면 다음과 같다.The effects of the encoding method of digital audio according to the present invention described above are as follows.

첫째, 본 발명에 의한 디지털 오디오의 부호화 방법은 상기 부호화 과정 중 비선형 양자화와 허프만 부호화가 수행되는 양자화 루프의 반복 회수를 획기적으로 줄일 수 있다. 따라서, 종래에 양자화 루프의 반복 회수가 증가하여 연산량이 크게 증가하는 문제점을 크게 개선할 수 있다. First, the encoding method of digital audio according to the present invention can significantly reduce the number of iterations of a quantization loop in which nonlinear quantization and Huffman encoding are performed during the encoding process. Therefore, it is possible to greatly improve the conventional problem that the number of iterations of the quantization loop is increased and the amount of computation is greatly increased.

둘째, 본 발명에 의한 디지털 오디오의 부호화 방법은 종래의 방법에 비해 전체 연산량에서 절반 이상의 감소 효과를 기대할 수 있으며, 따라서 실시간 디지털 오디오 부호화 장치의 저전력 설계가 가능하다. Second, the digital audio encoding method according to the present invention can expect a more than half reduction effect on the total amount of computation compared to the conventional method, and thus it is possible to design a low power of the real-time digital audio encoding apparatus.

셋째, 본 발명에 따른 디지털 오디오의 부호화 방법 중 양자화 루프는 디지털 오디오 부호화기 음질 성능에는 거의 영향을 미치지 않으며, 관련된 인자를 조정함으로써 최대 반복 회수와 음질 성능을 조절할 수 있다.Third, the quantization loop of the digital audio encoding method according to the present invention has little effect on the sound quality performance of the digital audio encoder, and the maximum number of repetitions and the sound quality can be adjusted by adjusting the related factors.

Claims (5)

오디오 신호에 대한 비트 할당과 양자화를 위해 양자화 루프 수행 과정을 포함하는 디지털 오디오의 부호화 방법에 있어서, 상기 양자화 루프 수행 과정은 In the encoding method of digital audio, the process of performing quantization loop for bit allocation and quantization of an audio signal, (a) 사용된 비트 수와 초기 양자화 스텝 크기를 입력받는 단계;(a) receiving a number of bits used and an initial quantization step size; (b) 입력된 양자화 스텝 크기에 대한 MDCT 계수를 비선형 양자화하고, 상기 양자화된 계수들에 대해 부호화를 수행하여 사용된 비트수를 계산하는 단계;(b) nonlinear quantizing the MDCT coefficients with respect to the input quantization step size, and performing encoding on the quantized coefficients to calculate the number of bits used; (c) 상기 (b) 과정에서 계산된 비트수가 당해 루프 단계에서 사용 가능한 비트수이하이고, 상기 사용 가능한 비트수로부터 소정의 일차함수관계에서 구한 오프셋 값을 감산한 비트수를 초과하는지 여부를 판단하는 단계; 및(c) It is determined whether the number of bits calculated in the step (b) is less than or equal to the number of bits available in the loop step, and the number of bits obtained by subtracting the offset value obtained in a predetermined first function relation from the available number of bits is exceeded. Doing; And (d) 상기 (c) 단계의 판단결과 상기 (b) 단계에서 계산된 비트수가 상기한 조건을 만족시키는 경우 양자화 루프를 탈출하고, 그렇지 않은 경우는 다음 루프의 양자화 스텝 크기를 갱신하는 단계를 수행한 후 상기 (b)단계로 되돌아 가는 단계를 포함하는 것을 특징으로 하는 디지털 오디오의 부호화 방법.(d) exiting the quantization loop if the number of bits calculated in step (b) satisfies the above condition; otherwise, updating the quantization step size of the next loop. And then returning to the step (b). 제 1항에 있어서,The method of claim 1, 상기 (c) 단계의 일차함수는 양자화 스텝의 크기에 대한 사용된 비트수의 관계를 근사시킨 일차함수인 것을 특징을 하는 디지털 오디오의 부호화 방법.And (c) the primary function is a linear function that approximates the relationship between the number of bits used and the size of the quantization step. 제 2항에 있어서,The method of claim 2, 상기 (c) 단계의 상기 오프셋 값은 임의의 양자화 스텝 크기의 변화에 대한 상기 일차함수의 변화값을 오프셋 값으로 하는 것을 특징으로 하는 디지털 오디오의 부호화 방법.And the offset value of step (c) is a change value of the first function with respect to a change in an arbitrary quantization step size as an offset value. 제 3항에 있어서,The method of claim 3, wherein 상기 (d) 단계의 당해 루프의 바로 다음 루프의 양자화 스텝 크기를 갱신하는 단계는,Updating the quantization step size of the loop immediately following the loop of step (d), (d1) 상기 (a) 단계에서 구한 사용된 비트수로부터 상기 오프셋 값에 1이하인 팩터를 곱한 값을 감산하여 다음 루프의 사용될 비트수를 추정하는 단계; 및(d1) estimating the number of bits to be used in the next loop by subtracting the offset value multiplied by a factor of 1 or less from the number of bits used in step (a); And (d2) 상기 (d1) 단계에서 추정된 다음 루프에 사용될 비트수에 대한 상기 (c) 단계의 일차함수의 역함수의 결과값으로부터 당해 루프에 사용된 비트수에 대한 상기 (c) 단계의 일차함수의 역함수의 결과값을 감산한 값을, 당해 루프의 양자화 스텝 크기에 더하여 다음 루프의 양자화 스텝 크기를 갱신하는 단계를 포함하는 것을 특징으로 하는 디지털 오디오의 부호화 방법.(d2) the first function of step (c) with respect to the number of bits used in the loop from the result of the inverse of the first function of step (c) with respect to the number of bits to be used in the next loop estimated in step (d1) And updating the quantization step size of the next loop by adding the value obtained by subtracting the result of the inverse function of the loop to the quantization step size of the loop. 제 1항에 있어서,The method of claim 1, 상기 (a) 단계에서 입력 받는 초기 양자화 스텝의 크기는 당해 루프가 최초의 루프가 아닌 경우 이전 프레임의 최종 양자화 스텝 크기 값을 입력하는 것을 특징으로 하는 디지털 오디오의 부호화 방법.And the initial quantization step size received in step (a) is input of a final quantization step size value of a previous frame when the loop is not the first loop.
KR1020050046264A 2005-05-31 2005-05-31 Method for encording digital audio KR100640833B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050046264A KR100640833B1 (en) 2005-05-31 2005-05-31 Method for encording digital audio

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050046264A KR100640833B1 (en) 2005-05-31 2005-05-31 Method for encording digital audio

Publications (1)

Publication Number Publication Date
KR100640833B1 true KR100640833B1 (en) 2006-11-02

Family

ID=37649783

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050046264A KR100640833B1 (en) 2005-05-31 2005-05-31 Method for encording digital audio

Country Status (1)

Country Link
KR (1) KR100640833B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101340459B1 (en) 2011-10-25 2013-12-11 아주대학교산학협력단 An accelerator supporting multiple loop escape

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100378796B1 (en) 2001-04-03 2003-04-03 엘지전자 주식회사 Digital audio encoder and decoding method
KR100396749B1 (en) 2000-07-20 2003-09-02 엘지전자 주식회사 Encoding method for digital audio

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100396749B1 (en) 2000-07-20 2003-09-02 엘지전자 주식회사 Encoding method for digital audio
KR100378796B1 (en) 2001-04-03 2003-04-03 엘지전자 주식회사 Digital audio encoder and decoding method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101340459B1 (en) 2011-10-25 2013-12-11 아주대학교산학협력단 An accelerator supporting multiple loop escape

Similar Documents

Publication Publication Date Title
US7613603B2 (en) Audio coding device with fast algorithm for determining quantization step sizes based on psycho-acoustic model
JP5539203B2 (en) Improved transform coding of speech and audio signals
US8615391B2 (en) Method and apparatus to extract important spectral component from audio signal and low bit-rate audio signal coding and/or decoding method and apparatus using the same
KR100348368B1 (en) A digital acoustic signal coding apparatus, a method of coding a digital acoustic signal, and a recording medium for recording a program of coding the digital acoustic signal
US7337118B2 (en) Audio coding system using characteristics of a decoded signal to adapt synthesized spectral components
US10121480B2 (en) Method and apparatus for encoding audio data
RU2585990C2 (en) Device and method for encoding by huffman method
RU2670797C9 (en) Method and apparatus for generating from a coefficient domain representation of hoa signals a mixed spatial/coefficient domain representation of said hoa signals
US8032371B2 (en) Determining scale factor values in encoding audio data with AAC
US20040162720A1 (en) Audio data encoding apparatus and method
JP2002517019A (en) System and method for entropy encoding quantized transform coefficients of a signal
RU2505921C2 (en) Method and apparatus for encoding and decoding audio signals (versions)
EP1514263A1 (en) Audio coding system using characteristics of a decoded signal to adapt synthesized spectral components
KR101363206B1 (en) Audio signal encoding employing interchannel and temporal redundancy reduction
KR20050006028A (en) Scale factor based bit shifting in fine granularity scalability audio coding
JP2007504503A (en) Low bit rate audio encoding
KR100378796B1 (en) Digital audio encoder and decoding method
US20060004565A1 (en) Audio signal encoding device and storage medium for storing encoding program
KR100640833B1 (en) Method for encording digital audio
Yen et al. A low-complexity MP3 algorithm that uses a new rate control and a fast dequantization
KR100396749B1 (en) Encoding method for digital audio
Bhaskar Low rate coding of audio by a predictive transform coder for efficient satellite transmission
JP2000206990A (en) Device and method for coding digital acoustic signals and medium which records digital acoustic signal coding program
Krasner et al. Efficient Encoding and Decoding of Speech.
JPH06291679A (en) Threshold value control quantization determining method for audio signal

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120926

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20130924

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20140924

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee