KR20150034507A - Method and apparatus fo encoding audio signal - Google Patents

Method and apparatus fo encoding audio signal Download PDF

Info

Publication number
KR20150034507A
KR20150034507A KR20130114685A KR20130114685A KR20150034507A KR 20150034507 A KR20150034507 A KR 20150034507A KR 20130114685 A KR20130114685 A KR 20130114685A KR 20130114685 A KR20130114685 A KR 20130114685A KR 20150034507 A KR20150034507 A KR 20150034507A
Authority
KR
South Korea
Prior art keywords
signal
global gain
bits
audio signal
frame
Prior art date
Application number
KR20130114685A
Other languages
Korean (ko)
Other versions
KR102243217B1 (en
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 KR1020130114685A priority Critical patent/KR102243217B1/en
Publication of KR20150034507A publication Critical patent/KR20150034507A/en
Application granted granted Critical
Publication of KR102243217B1 publication Critical patent/KR102243217B1/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/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
    • 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

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

According to an embodiment of the present invention, provided are a method and a device for encoding an audio signal which can improve the sound quality of an encoded signal using the remaining bits in a specific audio frame. In performing bit allocation, the device for encoding an audio signal according to an embodiment of the present invention outputs a corrected quantized signal by adjusting a global gain or reconstructing a signal masked by a masking threshold when the total number of bits used in a specific audio frame is smaller than the maximum number of bits available for each frame, that is, when the bits are left. The device for encoding an audio signal according to an embodiment of the present invention can improve the sound quality of an encoded audio signal by encoding the corrected quantized signal.

Description

오디오 신호 부호화 방법 및 장치 {METHOD AND APPARATUS FO ENCODING AUDIO SIGNAL}TECHNICAL FIELD [0001] The present invention relates to an audio signal encoding method,

본 발명은 오디오 신호 부호화 방법 및 장치에 관한 것이다. 보다 상세하게는, 특정 프레임에서 남는 비트를 이용하여 부호화된 신호의 음질을 향상시키는 오디오 신호 부호화 방법 및 장치에 관한 것이다.The present invention relates to an audio signal encoding method and apparatus. And more particularly, to an audio signal encoding method and apparatus for improving the sound quality of a signal encoded using a bit remaining in a specific frame.

오디오 신호를 부호화 하는데 있어서, 짧은 지연 시간 (latency time) 을 확보하기 위해서는 부호화의 기본 단위인 프레임의 길이가 짧아야 하고, 높은 음질을 확보하기 위해서는 충분한 주파수 분해능이 필요하기 때문에 프레임의 길이가 길어야 한다. 따라서 짧은 지연 시간과 높은 음질은 동시에 만족시키기 어렵다.In encoding an audio signal, in order to secure a short latency time, a length of a frame, which is a basic unit of encoding, must be short and a sufficient frequency resolution is required to secure a high sound quality. Therefore, it is difficult to satisfy both the short delay time and the high sound quality at the same time.

종래 기술의 경우, 지연 시간과 음질에 대한 요구 조건을 동시에 만족시키기 위해서, 사용하고자 하는 어플리케이션에 따라서 프레임의 길이를 조절함으로써, 허용 가능한 범위 내의 지연 시간 또는 음질을 갖도록 오디오 신호를 부호화하는 방법이 이용된다. 또는, 오디오 신호의 완벽한 복원 (Perfect reconstruction) 을 포기하고, 특정한 형태의 윈도우 함수를 사용하는 방법이 이용된다.In the prior art, a method of encoding an audio signal so as to have a delay time or a sound quality within an allowable range by adjusting the length of a frame according to an application to be used in order to simultaneously satisfy a delay time and a requirement for sound quality do. Alternatively, a method of abandoning perfect reconstruction of an audio signal and using a specific type of window function is used.

한편, 지각 음향 부호화 (perceptual audio coding) 방법의 경우, 심리 음향 모델로부터 도출되는 마스킹 임계치 (masking threshold) 를 이용하여 오디오 신호를 양자화 (quantization) 하고, 양자화된 신호에 대해 비트 할당 (bit allocation) 을 수행함으로써 지연 시간과 음질에 대한 요구 조건을 모두 만족시킬 수 있다.Meanwhile, in the perceptual audio coding method, an audio signal is quantized using a masking threshold derived from a psychoacoustic model, and a bit allocation is performed on a quantized signal It is possible to satisfy both requirements for delay time and sound quality.

지각 음향 부호화 장치의 경우, 오디오 신호 및 주파수 대역에 따라 청자가 인지할 수 없는 양자화 노이즈의 크기를 결정하게 된다. 오디오 신호를 부호화하는데 있어서, 지각 음향 부호화 장치는, 양자화 노이즈의 크기를 고려하여 양자화 스텝을 결정한다. 또한, 지각 음향 부호화 장치는, 비트 할당을 수행함에 있어서, 특정 오디오 프레임에 대해 사용된 총 비트수가, 한 프레임당 사용 가능한 최대 비트수를 초과하지 않도록 한다. 한 프레임당 사용 가능한 최대 비트수는, 출력 비트 레이트에 의해 결정되고, 모든 프레임에 대해 적용된다.In the perceptual sound encoding apparatus, the size of the quantization noise, which can not be recognized by the listener, is determined according to the audio signal and the frequency band. In encoding an audio signal, the perceptual acoustic coding apparatus determines a quantization step in consideration of the magnitude of the quantization noise. In addition, the perceptual sound encoding apparatus performs bit allocation so that the total number of bits used for a specific audio frame does not exceed the maximum number of bits available per frame. The maximum number of bits available per frame is determined by the output bit rate and is applied to all frames.

한편, 지각 음향 부호화 장치가 비트 할당을 수행함에 있어서, 특정 오디오 프레임에 대해 사용된 총 비트수가 출력 비트 레이트에 의해 결정되는 한 프레임당 사용 가능한 최대 비트수보다 작은 경우, 출력되는 비트스트림 (bitstream) 에 남는 비트가 존재하게 된다. 남는 비트 내에는 오디오 신호에 대한 정보가 포함되지 않으므로, 남는 비트를 활용하여 보다 많은 정보를 부호화할 경우, 부호화되는 오디오 신호의 음질을 향상시킬 수 있다. 따라서, 특정 프레임의 오디오 신호를 부호화함에 있어서 남는 비트를 활용하는 방법이 요구된다. When the perceptual sound encoding apparatus performs bit allocation, when the total number of bits used for a specific audio frame is smaller than the maximum number of bits available per frame determined by the output bit rate, A bit remains in the bitstream. Since the information on the audio signal is not included in the remaining bits, when more information is encoded using the remaining bits, the audio quality of the encoded audio signal can be improved. Therefore, there is a need for a method that utilizes the remaining bits in encoding an audio signal of a specific frame.

본 발명의 일 실시예는, 특정 프레임의 오디오 신호를 부호화함에 있어서 남는 비트가 존재하는 경우, 남는 비트를 이용하여 음질을 향상시키는 오디오 신호 부호화 방법 및 장치를 제공한다.An embodiment of the present invention provides an audio signal encoding method and apparatus for improving sound quality by using remaining bits when remaining bits exist in encoding an audio signal of a specific frame.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법은, 오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계; 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계; 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계; 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및 상기 제 2 양자화 신호를 부호화하는 단계를 포함한다.According to another aspect of the present invention, there is provided an audio signal encoding method comprising: converting an audio signal into a first frequency domain signal; Generating a first quantized signal by quantizing the first frequency domain signal by applying a global gain; Calculating a first number of used bits used by the first quantization signal; Generating a second quantized signal by correcting the first quantized signal if the first number of used bits is smaller than the number of frame bits previously allocated to the frame of the audio signal; And encoding the second quantized signal.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 글로벌 게인을 조정하는 단계; 및 상기 조정된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 포함할 수 있다.In the audio signal encoding method according to an embodiment of the present invention, the step of generating the second quantization signal may include: adjusting the global gain; And generating the second quantized signal by quantizing the first frequency domain signal by applying the adjusted global gain.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 감소시키는 단계; 및 상기 감소된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 포함할 수 있다.In the audio signal encoding method according to an embodiment of the present invention, the step of generating the second quantized signal may include a step of decreasing the global gain based on a difference between the first number of used bits and the number of frame bits ; And generating the second quantized signal by quantizing the first frequency domain signal by applying the reduced global gain.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 단계; 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 단계; 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 단계; 상기 제 2 사용 비트수가 상기 프레임 비트수를 초과할 때까지, 상기 글로벌 게인을 갱신하는 단계, 상기 갱신된 글로벌 게인을 적용하여 양자화하는 단계 및 상기 제 2 사용 비트수를 계산하는 단계를 반복하는 단계; 및 상기 제 2 사용 비트수가 상기 프레임 비트수를 초과하는 경우, 이전 반복에서 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 포함할 수 있다.In the audio signal encoding method according to an embodiment of the present invention, the step of generating the second quantized signal may include: updating the global gain by decreasing the global gain by a predetermined value; Quantizing the first frequency-domain signal by applying the updated global gain; Applying the updated global gain to calculate a second number of used bits used by the quantized signal; Repeating the steps of updating the global gain until the number of second used bits exceeds the frame bit number, quantizing applying the updated global gain, and calculating the second number of used bits ; And generating the second quantized signal by quantizing the first frequency domain signal by applying a global gain updated in the previous iteration if the second used bit number exceeds the frame bit number.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 단계; 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 단계; 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 단계; 및 상기 갱신된 글로벌 게인이 소정 게인 이하가 될 때까지, 상기 글로벌 게인을 갱신하는 단계, 상기 갱신된 글로벌 게인을 적용하여 양자화하는 단계 및 상기 제 2 사용 비트수를 계산하는 단계를 반복하는 단계를 포함할 수 있다.In the audio signal encoding method according to an embodiment of the present invention, the step of generating the second quantized signal may include: updating the global gain by decreasing the global gain by a predetermined value; Quantizing the first frequency-domain signal by applying the updated global gain; Applying the updated global gain to calculate a second number of used bits used by the quantized signal; And repeating the steps of updating the global gain until the updated global gain is less than or equal to a predetermined gain, quantizing by applying the updated global gain, and calculating the second used bit number .

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법은, 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 증가시키는 단계; 및 상기 증가된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 더 포함할 수 있다.The audio signal encoding method according to an embodiment of the present invention is characterized in that when the first use bit number is larger than the frame bit number allocated to the frame of the audio signal in advance, a difference between the first use bit number and the frame bit number Increasing the global gain; And generating the second quantized signal by quantizing the first frequency domain signal by applying the increased global gain.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법은, 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 글로벌 게인을 소정값만큼 증가시켜 갱신하는 단계; 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 단계; 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 단계; 및 상기 제 2 사용 비트수가 상기 프레임 비트수보다 작거나 같아질 때까지, 상기 글로벌 게인을 갱신하는 단계, 상기 갱신된 글로벌 게인을 적용하여 양자화하는 단계 및 상기 제 2 사용 비트수를 계산하는 단계를 반복하는 단계를 더 포함할 수 있다.According to another aspect of the present invention, there is provided a method of encoding an audio signal, the method comprising the steps of: increasing the global gain by a predetermined value when the first use bit number is greater than a frame bit number allocated to a frame of the audio signal in advance; Quantizing the first frequency-domain signal by applying the updated global gain; Applying the updated global gain to calculate a second number of used bits used by the quantized signal; And updating the global gain until the second number of used bits is less than or equal to the frame bit number, quantizing applying the updated global gain, and calculating the second number of used bits And may further include repeating steps.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 1 양자화 신호를 생성하는 단계는, 심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 상기 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹하는 단계; 및 상기 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 상기 제 1 양자화 신호를 생성하는 단계를 포함하고, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 제 1 양자화 신호에, 상기 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함할 수 있다.In the method of encoding an audio signal according to an exemplary embodiment of the present invention, the step of generating the first quantized signal may include applying a masking threshold determined based on a psychoacoustic model to a plurality of Masking at least one of the bands; And generating the first quantized signal by quantizing the masked first frequency domain signal, wherein generating the second quantized signal further comprises adding to the first quantized signal the at least one masked band And generating a second quantized signal by adding a quantized signal for at least one band among the plurality of bands.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 마스킹 임계치에 의해 마스킹된 대역별 에너지와 상기 각 대역에 대한 마스킹 임계치를 비교하는 단계; 상기 비교 결과에 기초하여 상기 마스킹된 적어도 하나의 대역 중 적어도 하나의 대역을 선택하는 단계; 및 상기 제 1 양자화 신호에 상기 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함할 수 있다.In the audio signal encoding method according to an embodiment of the present invention, the step of generating the second quantized signal may include comparing energy per band masked by the masking threshold and a masking threshold for each band, Selecting at least one of the at least one masked band based on the comparison result; And generating the second quantized signal by adding a quantization signal for the selected at least one band to the first quantized signal.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이가 소정값 이상일 경우, 상기 제 1 양자화 신호에, 상기 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함할 수 있다.In the method of encoding an audio signal according to an embodiment of the present invention, the step of generating the second quantized signal may include: when the difference between the first number of used bits and the number of frame bits is equal to or larger than a predetermined value, And generating a second quantized signal by adding a quantized signal for the masked at least one band.

한편, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치는, 오디오 신호를 제 1 주파수 영역 신호로 변환하는 주파수 변환부; 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 양자화부, 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 비트수 계산부, 및 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 보정부를 포함하는, 비트수 조절 양자화부; 및 상기 제 2 양자화 신호를 부호화하는 부호화부를 포함한다.According to another aspect of the present invention, there is provided an apparatus for encoding an audio signal, the apparatus including: a frequency transform unit for transforming an audio signal into a first frequency domain signal; A quantizer for generating a first quantized signal by quantizing the first frequency-domain signal by applying a global gain, a bit number calculator for calculating a first number of used bits used by the first quantized signal, And a correction unit that corrects the first quantized signal to generate a second quantized signal if the number of used bits is smaller than the number of frame bits allocated to the frame of the audio signal in advance. And an encoding unit encoding the second quantized signal.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 제 1 사용 비트수가 상기 프레임 비트수보다 작은 경우, 상기 글로벌 게인을 조정하고, 상기 조정된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, when the first usage bit number is smaller than the frame bit number, the correction unit adjusts the global gain, and uses the adjusted global gain, The second quantized signal can be generated by quantizing one frequency domain signal.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 제 1 사용 비트수가 상기 프레임 비트수보다 작은 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여 상기 글로벌 게인을 감소시키고, 상기 감소된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, when the first use bit number is smaller than the frame bit number, the correcting unit corrects, based on the difference between the first use bit number and the frame bit number, The second quantization signal may be generated by reducing the global gain and quantizing the first frequency domain signal by applying the reduced global gain.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 제 1 사용 비트수가 상기 프레임 비트수보다 작은 경우, 상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 제 2 사용 비트수가 상기 프레임 비트수를 초과할 때까지 반복하고, 상기 제 2 사용 비트수가 상기 프레임 비트수를 초과하는 경우, 이전 반복에서 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, the correcting unit may perform an operation of reducing and updating the global gain by a predetermined value when the first use bit number is smaller than the frame bit number, Quantizing the first frequency domain signal by applying a gain to the quantized signal and applying an updated global gain to calculate a second number of used bits used by the quantized signal, And when the second used bit number exceeds the frame bit number, applying the global gain updated in the previous iteration to quantize the first frequency domain signal by quantizing the second quantized signal Can be generated.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 갱신된 글로벌 게인이 소정 게인 이하가 될 때까지 반복할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, the correction unit may include: an operation of reducing the global gain by a predetermined value, updating the global gain by a predetermined value, quantizing the first frequency- And computing the second number of used bits used by the quantized signal by applying the updated global gain until the updated global gain is less than or equal to a predetermined gain.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 증가시키고, 상기 증가된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, when the first usage bit number is larger than the frame bit number allocated in advance for the frame of the audio signal, The second quantization signal may be generated by increasing the global gain and quantizing the first frequency domain signal by applying the increased global gain based on the difference in the number of frame bits.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 글로벌 게인을 소정값만큼 증가시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 제 2 사용 비트수가 상기 프레임 비트수보다 작거나 같아질 때까지, 반복할 수 있다.본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 양자화부는, 심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 상기 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹하고, 상기 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 상기 제 1 양자화 신호를 생성하고, 상기 보정부는, 상기 제 1 양자화 신호에 상기 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, the correction unit may increase the global gain by a predetermined value if the first use bit number is larger than the frame bit number allocated in advance for the frame of the audio signal An operation of quantizing the first frequency-domain signal by applying the updated global gain, and an operation of calculating a second number of used bits used by the quantized signal by applying the updated global gain , And the number of second used bits is less than or equal to the number of frame bits. In the audio signal encoding apparatus according to an embodiment of the present invention, the quantization unit may determine Applying a masking threshold to at least one of a plurality of bands included in the first frequency- And generating the first quantized signal by quantizing the masked first frequency-domain signal, wherein the correcting unit corrects the quantized signal for at least one band among the at least one band by masking the first quantized signal, The second quantization signal can be generated.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 마스킹 임계치에 의해 마스킹된 대역별 에너지와 상기 각 대역에 대한 마스킹 임계치를 비교하고, 상기 비교 결과에 기초하여 상기 마스킹된 적어도 하나의 대역 중 적어도 하나의 대역을 선택하고, 상기 제 1 양자화 신호에 상기 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, the correcting unit compares energy per band masked by the masking threshold with a masking threshold value for each band, and based on the comparison result, At least one of the at least one band may be selected and the second quantization signal may be generated by adding a quantization signal for the selected at least one band to the first quantization signal.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이가 소정값 이상일 경우, 상기 제 1 양자화 신호에 상기 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, when the difference between the first number of used bits and the number of frame bits is equal to or larger than a predetermined value, the correcting unit may add the masked at least one The second quantization signal can be generated by adding a quantization signal for the band.

한편, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 있어서, 상기 방법은, 오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계; 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계; 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계; 및 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및 상기 제 2 양자화 신호를 부호화하는 단계를 포함한다.According to another aspect of the present invention, there is provided a computer-readable recording medium storing a program for causing a computer to execute an audio signal encoding method, the method comprising: converting an audio signal into a first frequency domain signal; Generating a first quantized signal by quantizing the first frequency domain signal by applying a global gain; Calculating a first number of used bits used by the first quantization signal; And generating a second quantized signal by correcting the first quantized signal if the first number of used bits is smaller than the number of frame bits previously allocated to the frame of the audio signal. And encoding the second quantized signal.

도 1 은 본 발명이 적용될 수 있는 오디오 신호 부호화 장치를 설명하기 위한 블록도이다.
도 2 는 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치를 설명하기 위한 블록도이다.
도 3 은 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법을 설명하기 위한 흐름도이다.
도 4 는 본 발명의 제 1 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.
도 5 는 본 발명의 제 2 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.
도 6 은 본 발명의 제 3 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.
도 7 은 본 발명의 제 4 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.
1 is a block diagram for explaining an audio signal encoding apparatus to which the present invention can be applied.
2 is a block diagram for explaining an audio signal encoding apparatus according to an embodiment of the present invention.
3 is a flowchart illustrating an audio signal encoding method according to an embodiment of the present invention.
4 is a flowchart for explaining a step of correcting a quantized signal according to the first embodiment of the present invention.
5 is a flowchart for explaining a step of correcting a quantized signal according to a second embodiment of the present invention.
6 is a flowchart for explaining a step of correcting a quantized signal according to the third embodiment of the present invention.
7 is a flowchart for explaining a step of correcting a quantized signal according to the fourth embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between . Also, when an element is referred to as "comprising ", it means that it can include other elements as well, without departing from the other elements unless specifically stated otherwise.

또한, 본 발명에서 다음 용어는 다음과 같은 기준으로 해석될 수 있고, 기재되지 않은 용어라도 하기 취지에 따라 해석될 수 있다. 정보 (information) 는 값 (value), 파라미터 (parameter), 계수 (coefficients), 성분 (elements) 등을 모두 포함하는 용어로서, 경우에 따라 의미는 달리 해석될 수 있으며, 본 발명은 이에 한정되지 아니한다.Further, in the present invention, the following terms can be interpreted according to the following criteria, and terms not described may be interpreted according to the following. The term information includes all of values, parameters, coefficients, elements, and the like. In some cases, the meaning may be interpreted differently, and the present invention is not limited thereto .

한편, 오디오 신호(audio signal)란, 광의로는, 비디오 신호와 구분되는 개념으로서, 재생 시 청각으로 식별할 수 있는 신호를 의미할 수 있다. 오디오 신호는, 협의로는, 음성(speech) 신호와 구분되는 개념으로서, 음성 특성이 없거나 적은 신호를 의미한다. 본 발명에서의 오디오 신호는 광의로 해석되어야 하며 음성 신호와 구분되어 사용될 때 협의의 오디오 신호로 이해될 수 있다.On the other hand, an audio signal is a concept distinguished from a video signal in a broad sense, and can be a signal that can be audibly identified during reproduction. An audio signal is, in agreement, a concept distinguished from a speech signal, which means a signal having no or little speech characteristics. The audio signal in the present invention should be interpreted as optical and can be understood as a narrow audio signal when used separately from the audio signal.

한편, 프레임이란, 오디오 신호를 부호화 또는 복호화하기 위한 데이터 단위를 일컫는 것으로서, 특정 샘플 수나 특정 시간에 한정되지 아니한다.On the other hand, a frame refers to a data unit for encoding or decoding an audio signal, and is not limited to a specific number of samples or a specific time.

본 발명에 따른 오디오 신호 부호화 방법 및 장치는, 나아가 이 장치 및 방법이 적용된 오디오 신호 처리 장치 및 방법이 될 수 있다.The audio signal encoding method and apparatus according to the present invention may further be an audio signal processing apparatus and method to which the apparatus and method are applied.

이하 첨부된 도면을 참고하여 본 발명을 상세히 설명하기로 한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

도 1 은 본 발명이 적용될 수 있는 오디오 신호 부호화 장치를 설명하기 위한 블록도이다.1 is a block diagram for explaining an audio signal encoding apparatus to which the present invention can be applied.

도 1 을 참조하면, 본 발명이 적용될 수 있는 오디오 신호 부호화 장치는, 주파수 변환부 (210), 양자화부 (120), 부호화부 (130), 및 심리 음향 모델부 (140) 를 포함한다.Referring to FIG. 1, an audio signal encoding apparatus to which the present invention can be applied includes a frequency transform unit 210, a quantization unit 120, an encoding unit 130, and a psychoacoustic model unit 140.

주파수 변환부 (110) 는 입력 오디오 신호를 수신한 후, 이에 대해 주파수 변환을 수행하여 주파수 영역 신호를 생성한다.The frequency converter 110 receives the input audio signal and performs frequency conversion on the input audio signal to generate a frequency domain signal.

심리 음향 모델부 (140) 에서는 사람의 청각 특성을 반영하여 마스킹 임계치 (masking threshold) 를 계산한다. 심리 음향 모델부 (140) 는, 입력된 오디오 신호에 대해 마스킹 효과를 적용하여 마스킹 임계치를 계산한다. In the psychoacoustic model unit 140, a masking threshold is calculated by reflecting a human auditory characteristic. The psychoacoustic modeling unit 140 calculates a masking threshold by applying a masking effect to the input audio signal.

마스킹(masking) 효과란, 심리 음향 이론에 의한 것으로, 크기가 큰 신호에 인접한 작은 신호들은 큰 신호에 의해서 가려지기 때문에 인간의 청각 구조가 이를 잘 인지하지 못한다는 특성을 이용하는 것이다. 예를 들어, 시끄러운 버스가 지나가는 버스 정류장에서와 같이 소음이 심한 공간에서는, 조용한 공간에서 들릴 수 있는 대화 소리가 들리지 않게 된다. The masking effect is based on the psychoacoustic theory. The small signal adjacent to a large signal is masked by a large signal, so that the human auditory structure does not recognize it. For example, in a noisy environment, such as at a bus stop where noisy buses pass, you will not hear a conversation that can be heard in a quiet space.

마스킹 임계치란, 청자가 들을 수 있는 한계값을 의미할 수 있다. 마스킹 효과에 의하면, 마스킹 임계치 아래에 위치한 오디오 신호는 청자가 들을 수 없다.The masking threshold value may mean a threshold value that a listener can hear. According to the masking effect, the audio signal located below the masking threshold can not be heard by the listener.

양자화부 (120) 는, 심리 음향 모델 (140) 에서 계산된 마스킹 임계치를 적용하여, 주파수 변환부 (110) 에서 변환된 주파수 영역 신호를 양자화한다. 양자화부 (120) 는 양자화된 신호에 대해 비트 할당을 수행한다.The quantization unit 120 applies the masking threshold value calculated in the psychoacoustic model 140 to quantize the frequency domain signal converted by the frequency conversion unit 110. The quantization unit 120 performs bit allocation on the quantized signal.

예를 들어, 양자화부 (120) 는 마스킹 임계치가 낮아 노이즈(noise)가 들리기 쉬운 주파수 대역에 대해서는 비트수를 많이 할당하고, 마스킹 임계치가 높은 주파수 대역에 대해서는 비트수를 적게 할당할 수 있다. 또한, 양자화부 (120) 는, 마스킹 임계치 아래에 위치한 사용자가 들을 수 없는 주파수 대역을 제외하고 나머지 신호에 대해서만 양자화하고, 비트 할당을 수행할 수 있다.For example, the quantization unit 120 may allocate a large number of bits for a frequency band where noise is likely to be heard due to a low masking threshold, and may allocate a small number of bits for a frequency band having a high masking threshold. In addition, the quantization unit 120 may quantize only the remaining signals except the frequency band that can not be heard by the user located below the masking threshold, and perform bit allocation.

부호화부 (130) 는, 양자화된 오디오 신호에 대해 무잡음 부호화 (Noiseless coding) 및 비트스트림 패킹 (Bitstream Packing) 등의 과정을 거쳐 비트스트림을 출력한다.The encoding unit 130 outputs a bitstream to the quantized audio signal through processes such as noise-free coding and bitstream packing.

도 1 에 도시된 오디오 신호 부호화 장치가 비트 할당을 수행함에 있어서, 양자화부 (120) 는, 특정 오디오 프레임에 대해 사용된 총 비트수가, 한 프레임당 사용 가능한 최대 비트수를 초과하지 않도록 한다. 한 프레임당 사용 가능한 최대 비트수는, 출력 비트 레이트에 의해 결정되고, 모든 프레임에 대해 적용된다.When the audio signal encoding apparatus shown in FIG. 1 performs bit allocation, the quantization unit 120 ensures that the total number of bits used for a specific audio frame does not exceed the maximum number of bits available per frame. The maximum number of bits available per frame is determined by the output bit rate and is applied to all frames.

이 때, 특정 오디오 프레임에 대해 사용된 총 비트수가, 한 프레임당 사용 가능한 최대 비트수보다 작은 경우, 출력되는 비트 스트림 (bitstream) 에 남는 비트가 존재하게 된다. 남는 비트 내에는 오디오 신호에 대한 정보가 포함되지 않으므로, 남는 비트를 활용하여 보다 많은 정보를 부호화할 경우, 부호화되는 오디오 신호의 음질을 향상시킬 수 있다. At this time, if the total number of bits used for a specific audio frame is smaller than the maximum number of bits available per frame, there is a bit left in the output bitstream. Since the information on the audio signal is not included in the remaining bits, when more information is encoded using the remaining bits, the audio quality of the encoded audio signal can be improved.

따라서, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법 및 장치에 의하면, 남는 비트를 이용하여, 오디오 신호에 대한 보다 많은 정보를 부호화함으로써 음질을 향상시킬 수 있다.Therefore, according to the method and apparatus for encoding an audio signal according to an embodiment of the present invention, more information about an audio signal can be encoded using remaining bits to improve sound quality.

이하에서는, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 대해서 도 2 를 참조하여 자세히 살펴보기로 한다. Hereinafter, an audio signal encoding apparatus according to an embodiment of the present invention will be described in detail with reference to FIG.

도 2 는 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치를 설명하기 위한 블록도이다.2 is a block diagram for explaining an audio signal encoding apparatus according to an embodiment of the present invention.

도 2 를 참조하면, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 주파수 변환부 (210), 비트수 조절 양자화부 (220), 부호화부 (230) 를 포함한다. 또한, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 심리 음향 모델부 (240) 를 더 포함할 수 있다.Referring to FIG. 2, an apparatus 200 for encoding an audio signal according to an exemplary embodiment of the present invention includes a frequency transform unit 210, a bit number adjustment quantization unit 220, and an encoding unit 230. In addition, the audio signal encoding apparatus 200 according to an embodiment of the present invention may further include a psychoacoustic model unit 240.

도 2 의 주파수 변환부 (210), 부호화부 (230), 및 심리 음향 모델부 (240) 는, 도 1 의 주파수 변환부 (110), 부호화부 (130), 및 심리 음향 모델부 (140) 에 대응되므로 중복되는 설명은 생략한다.The frequency converting unit 210, the encoding unit 230 and the psychoacoustic model unit 240 of FIG. 2 correspond to the frequency conversion unit 110, the encoding unit 130, and the psychoacoustic model unit 140 of FIG. So that redundant description will be omitted.

주파수 변환부 (210) 는, 입력된 오디오 신호를 제 1 주파수 영역 신호로 변환한다. 주파수 변환은 FFT (Fast Fourier Transform), MDCT (Modified Discrete Transform), 웨이블릿 변환(wavelet packet transform: WPT), Frequency varying Modulated Lapped Transform (FV-MLT) 및 이와 유사한 방식이 이용될 수 있으며, 이에 한정되지 않는다.The frequency converter 210 converts the input audio signal into a first frequency domain signal. The frequency conversion may be performed using a Fast Fourier Transform (FFT), a Modified Discrete Transform (MDCT), a Wavelet Transform (WPT), a Frequency varying Modulated Lapped Transform (FV-MLT) Do not.

비트수 조절 양자화부 (220) 는, 주파수 변환부 (210) 에서 변환된 주파수 영역 신호를 양자화하고, 양자화된 신호를 보정하여 출력한다. 비트수 조절 양자화부 (220) 는, 양자화부 (222), 비트수 계산부 (224), 및 보정부 (226) 를 포함한다.The bit number adjustment quantization unit 220 quantizes the frequency domain signal converted by the frequency conversion unit 210, corrects the quantized signal, and outputs the corrected signal. The bit number adjustment quantization unit 220 includes a quantization unit 222, a bit number calculation unit 224, and a correction unit 226.

양자화부 (222) 는, 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성한다. 글로벌 게인이란, 주파수 영역 신호를 양자화하는데 있어서, 주파수 영역 신호에 포함되는 전대역에 대해 적용되는 양자화 스케일 팩터 (scale factor) 값을 의미한다. 스케일 팩터란, 양자화 스텝 사이즈를 의미한다.The quantization unit 222 generates a first quantized signal by quantizing the first frequency domain signal by applying a global gain. The global gain means a quantization scale factor applied to an entire band included in the frequency domain signal in quantizing the frequency domain signal. The scale factor means a quantization step size.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치가 사용하는 글로벌 게인의 초기값은, 사용자의 입력에 의해 설정되거나, 어플리케이션 (application) 에 따라 미리 결정된 값일 수 있다. 어플리케이션이란, 오디오 신호를 부호화하기 위해 사용되는 응용 프로그램을 의미할 수 있다. 어플리케이션은 오디오 품질 등을 고려하여 실험적으로 최적화된 값으로 글로벌 게인의 초기값을 결정할 수 있다. The initial value of the global gain used by the audio signal encoding apparatus according to an embodiment of the present invention may be set by a user's input or may be a predetermined value according to an application. An application may refer to an application program used for encoding an audio signal. The application can determine the initial value of the global gain with an experimentally optimized value in consideration of the audio quality and the like.

또한, 양자화부 (222) 는, 심리 음향 모델부 (240) 에서 결정된 마스킹 임계치를 적용하여, 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹할 수 있다. 양자화부 (222) 는, 마스킹 임계치에 의해 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성할 수 있다.The quantizer 222 may mask at least one of a plurality of bands included in the first frequency domain signal by applying a masking threshold determined by the psychoacoustic model unit 240. [ The quantization unit 222 can generate the first quantized signal by quantizing the first frequency domain signal masked by the masking threshold.

심리 음향 모델부 (240) 는, 입력된 오디오 신호에 대해 마스킹 효과를 적용하여 마스킹 임계치 (masking threshold) 를 결정할 수 있다.The psychoacoustic modeling unit 240 may determine a masking threshold by applying a masking effect to the input audio signal.

마스킹 임계치란, 청자가 들을 수 있는 한계값을 의미할 수 있다. 마스킹 효과에 의하면, 마스킹 임계치 아래에 위치한 오디오 신호는 청자가 들을 수 없다.The masking threshold value may mean a threshold value that a listener can hear. According to the masking effect, the audio signal located below the masking threshold can not be heard by the listener.

예를 들어, 심리 음향 모델을 적용함에 있어서, 오디오 신호가 분할된 하나의 윈도우에 포함되는 복수의 주파수 변환 계수 대역 (frequency scale factor band) 에는 에너지가 가장 큰 신호가 중간에 존재하고, 이 신호보다 훨씬 작은 크기의 신호가 주변에 몇 개 존재하는 경우를 참조하여 설명한다. 이 경우, 가장 큰 신호가 마스커 (masker) 가 되고, 이 마스커를 기준으로 마스킹 커브 (masking curve) 가 그려진다. 이 마스킹 커브에 의해서 가려지는 작은 신호는 마스킹된 신호 (masked signal) 또는 마스키 (maskee) 가 될 수 있다. 이 마스킹된 신호를 제외하고 나머지 신호만을 유효한 신호로 남겨두는 것을 마스킹(masking)이라 한다. For example, in applying a psychoacoustic model, a plurality of frequency scale factor bands included in one window into which audio signals are divided exist in the middle of a signal having the largest energy, A description will be made with reference to a case where a signal of a much smaller size exists in the vicinity. In this case, the largest signal becomes a masker, and a masking curve is drawn based on the masker. The small signal masked by this masking curve can be a masked signal or a mask. It is called masking that only the remaining signals except the masked signal are left as valid signals.

심리 음향 모델은 다양한 알고리즘을 이용하여 인간의 청각 시스템을 모델링한다. 이미 알려진 다양한 심리 음향 모델은 본 발명의 실시예와 함께 이용될 수 있다.The psychoacoustic model models the human auditory system using various algorithms. Various psychoacoustic models already known can be used with embodiments of the present invention.

양자화부 (222) 는, 예를 들어, 마스킹 임계치보다 에너지가 낮은 주파수 대역은 사용자가 들을 수 없다고 판단하고, 사용자가 들을 수 없다고 판단된 주파수 대역을 마스킹할 수 있다. 즉, 양자화부 (222) 는, 마스킹 임계치보다 에너지가 낮은 주파수 대역을 제외하고 나머지 신호에 대해서만 양자화하고, 비트 할당을 수행할 수 있다.The quantization unit 222 may, for example, determine that the frequency band lower than the masking threshold value is not audible to the user, and mask the frequency band that the user is determined not to be able to hear. That is, the quantization unit 222 can quantize only the remaining signals except for the frequency band lower in energy than the masking threshold value, and perform bit allocation.

비트수 계산부 (224) 는, 양자화부 (222) 에서 양자화된 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산한다.The bit number calculation unit 224 calculates the first use bit number used by the first quantization signal quantized by the quantization unit 222. [

보정부 (226) 는, 제 1 사용 비트수가 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 제 1 양자화 신호를 보정한다. 보정부 (226) 는, 제 1 사용 비트수가 프레임 비트수보다 작은 경우, 즉 비트가 남는 경우, 글로벌 게인을 조정하거나, 마스킹 임계치에 의해 마스킹된 신호를 복원함으로써 제 1 양자화 신호를 보정할 수 있다. 보정부 (226) 는 제 1 양자화 신호를 보정함으로써 제 2 양자화 신호를 생성하고 출력할 수 있다.The correction unit 226 corrects the first quantization signal when the first use bit number is smaller than the frame bit number allocated in advance for the frame of the audio signal. The correction unit 226 can correct the first quantized signal by adjusting the global gain or restoring the masked signal by the masking threshold if the first used bit number is smaller than the frame bit number, . The correction unit 226 can generate and output the second quantized signal by correcting the first quantized signal.

또한, 보정부 (226) 는, 제 1 사용 비트수가 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우에도, 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성할 수 있다. 보정부 (226) 는, 제 1 사용 비트수가 프레임 비트수보다 큰 경우, 즉 비트가 부족한 경우, 글로벌 게인을 조정함으로써 제 1 양자화 신호를 보정할 수 있다.The correction unit 226 can also generate the second quantized signal by correcting the first quantized signal even when the first used bit number is larger than the frame bit number previously allocated to the frame of the audio signal. The correction unit 226 can correct the first quantized signal by adjusting the global gain when the first use bit number is larger than the frame bit number, that is, when the bit is insufficient.

또한, 보정부 (226) 는, 제 1 사용 비트수가 프레임 비트수와 동일한 경우, 별도의 보정없이 제 1 양자화 신호를 제 2 양자화 신호로서 출력할 수 있다.The correction unit 226 can output the first quantized signal as the second quantized signal without any correction when the first used bit number is equal to the frame bit number.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 가, 제 1 사용 비트수가 프레임 비트수보다 작은 경우, 보정된 양자화 신호를 출력함으로써, 부호화된 오디오 신호의 음질을 향상시키는 구체적인 방법과 관련하여서 이하 도 3 을 참조하여 자세히 살펴보기로 한다. The audio signal encoding apparatus 200 according to an embodiment of the present invention is related to a specific method for improving the sound quality of a coded audio signal by outputting a corrected quantization signal when the first use bit number is smaller than the frame bit number And will be described in detail with reference to FIG.

도 3 은 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법을 설명하기 위한 흐름도이다.3 is a flowchart illustrating an audio signal encoding method according to an embodiment of the present invention.

도 3 을 참조하면, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법은 도 2 에 도시된 오디오 신호 부호화 장치 (200) 에서 처리되는 단계들로 구성된다. 따라서, 이하에 생략된 내용이라 하더라도 도 2 에 도시된 오디오 신호 부호화 장치 (200) 에 관하여 상술된 내용은 도 3 의 오디오 신호 부호화 방법에도 적용됨을 알 수 있다.Referring to FIG. 3, an audio signal encoding method according to an embodiment of the present invention includes steps processed in the audio signal encoding apparatus 200 shown in FIG. Therefore, it is understood that the above-described contents of the audio signal encoding apparatus 200 shown in FIG. 2 are applied to the audio signal encoding method of FIG. 3, even if omitted below.

단계 S310 에서 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 오디오 신호를 제 1 주파수 영역 신호로 변환한다. 주파수 변환은 FFT (Fast Fourier Transform), MDCT (Modified Discrete Transform), 웨이블릿 변환(wavelet packet transform: WPT), Frequency varying Modulated Lapped Transform (FV-MLT) 및 이와 유사한 방식이 이용될 수 있으며, 이에 한정되지 않는다.In step S310, the audio signal encoding apparatus 200 according to an embodiment of the present invention converts an audio signal into a first frequency domain signal. The frequency conversion may be performed using a Fast Fourier Transform (FFT), a Modified Discrete Transform (MDCT), a Wavelet Transform (WPT), a Frequency varying Modulated Lapped Transform (FV-MLT) Do not.

단계 S320 에서 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성한다. 오디오 신호 부호화 장치 (200) 는, 제 1 주파수 영역 신호의 전체 주파수 대역에 공통으로 사용되는 양자화 스케일 팩터로서, 글로벌 게인을 이용한다. 또한, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 기초로 각 주파수 대역마다 대역별 양자화 스케일 팩터를 조정함으로써 필요한 비트들을 할당하고 양자화할 수 있다.In step S320, the audio signal encoding apparatus 200 generates a first quantized signal by quantizing the first frequency-domain signal by applying a global gain. The audio signal encoding apparatus 200 uses a global gain as a quantization scale factor commonly used for the entire frequency band of the first frequency domain signal. In addition, the audio signal encoding apparatus 200 can allocate and quantize necessary bits by adjusting the quantization scale factor for each frequency band on the basis of the global gain.

단계 S330 에서 오디오 신호 부호화 장치 (200) 는, 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산한다.In step S330, the audio signal encoding apparatus 200 calculates the first number of used bits used by the first quantization signal.

단계 S340 에서 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수가 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은지를 판단한다.In step S340, the audio signal encoding apparatus 200 determines whether the first use bit number is smaller than the frame bit number allocated in advance for the frame of the audio signal.

제 1 사용 비트수가 프레임 비트수보다 작지 않은 경우, 오디오 신호 부호화 장치 (200) 는, 단계 S320 에서 양자화된 제 1 양자화 신호를 부호화할 수 있다. 반면에, 제 1 사용 비트수가 프레임 비트수보다 작은 경우, 오디오 신호 부호화 장치 (200) 는 단계 S350 을 수행한다.If the first used bit number is not smaller than the frame bit number, the audio signal encoding apparatus 200 can encode the first quantized signal quantized in step S320. On the other hand, if the first use bit number is smaller than the frame bit number, the audio signal encoding apparatus 200 performs step S350.

단계 S350 에서 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수가 프레임 비트수보다 작은 경우 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성한다. 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수가 프레임 비트수보다 작은 경우, 즉 비트가 남는 경우, 글로벌 게인을 조정하거나, 마스킹 임계치에 의해 마스킹된 신호를 복원함으로써 보정된 양자화 신호를 출력할 수 있다.In step S350, the audio signal encoding apparatus 200 generates the second quantization signal by correcting the first quantization signal when the first use bit number is smaller than the frame bit number. The audio signal encoding apparatus 200 outputs the corrected quantized signal by adjusting the global gain or restoring the masked signal by using the masking threshold when the first use bit number is smaller than the frame bit number, .

본 발명의 제 1 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 조정하고, 조정된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화함으로써 제 2 양자화 신호를 생성할 수 있다.According to the first embodiment of the present invention, the audio signal encoding apparatus 200 can generate the second quantization signal by adjusting the global gain and applying the adjusted global gain to quantize the first frequency domain signal.

이 때, 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수와 프레임 비트수의 차이에 기초하여, 글로벌 게인을 감소시키고, 감소된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화함으로써 제 2 양자화 신호를 생성할 수 있다.At this time, the audio signal encoding apparatus 200 reduces the global gain based on the difference between the first used bit number and the frame bit number, quantizes the first frequency domain signal by applying the reduced global gain, A quantization signal can be generated.

또한, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 소정값만큼 감소시켜 갱신하고, 갱신된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화할 수 있다. 예를 들어, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인, 즉, 전대역에 대해 적용되는 양자화 스텝 사이즈를 1 만큼 감소시켜 갱신할 수 있다. 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산할 수 있다. 오디오 신호 부호화 장치 (200) 는, 상술한 글로벌 게인을 갱신하는 단계, 갱신된 글로벌 게인을 적용하여 양자화하는 단계 및 제 2 사용 비트수를 계산하는 단계를 반복함으로써 제 2 양자화 신호를 생성할 수 있다.Also, the audio signal encoding apparatus 200 can reduce the global gain by a predetermined value, update the first gain, and apply the updated global gain to quantize the first frequency-domain signal. For example, the audio signal encoding apparatus 200 can update the global gain, that is, the quantization step size applied to the entire band by decrementing by one. The audio signal encoding apparatus 200 can calculate the second use bit number used by the quantized signal by applying the updated global gain. The audio signal encoding apparatus 200 can generate the second quantization signal by repeating the steps of updating the global gain, applying the updated global gain, quantizing, and calculating the second used bit number .

글로벌 게인이 감소되면, 전체 주파수 대역에 대한 양자화 에러 (quantization error) 가 감소된다. 즉, 감소된 글로벌 게인이 적용된 제 2 양자화 신호는, 기존의 글로벌 게인이 적용된 제 1 양자화 신호보다 많은 비트수를 사용함으로써, 부호화되는 오디오 신호의 음질이 높아진다. 본 발명의 제 1 실시예와 관련하여서는 후에 도 4 를 참조하여 보다 구체적으로 살펴본다.If the global gain is reduced, the quantization error for the entire frequency band is reduced. That is, the second quantized signal to which the reduced global gain is applied uses a larger number of bits than the first quantized signal to which the existing global gain is applied, thereby enhancing the sound quality of the encoded audio signal. The first embodiment of the present invention will be described in more detail with reference to FIG.

한편, 본 발명의 제 2 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 마스킹 임계치에 의해 마스킹된 신호를 복원함으로써 제 2 양자화 신호를 생성할 수 있다.Meanwhile, according to the second embodiment of the present invention, the audio signal encoding apparatus 200 can generate the second quantization signal by restoring the masked signal by the masking threshold value.

본 발명의 제 2 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 단계 S320 에서 제 1 주파수 영역 신호를 양자화함에 있어서, 심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여 제 1 주파수 영역 신호를 양자화할 수 있다. 제 2 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 단계 S320 에서, 마스킹 임계치를 이용하여, 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹할 수 있다. 오디오 신호 부호화 장치 (200) 는, 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성할 수 있다.In the audio signal encoding apparatus 200 according to the second embodiment of the present invention, in quantizing the first frequency domain signal in step S320, the masking threshold determined based on the psychoacoustic model is applied to quantize the first frequency domain signal can do. The audio signal encoding apparatus 200 according to the second embodiment may mask at least one band among a plurality of bands included in the first frequency domain signal using the masking threshold in step S320. The audio signal encoding apparatus 200 can generate the first quantized signal by quantizing the masked first frequency domain signal.

오디오 신호 부호화 장치 (200) 는, 제 1 양자화 신호에, 마스킹 임계치에 의해 마스킹된 대역들 중 적어도 하나의 대역에 대한 양자화 신호를 추가함으로써 제 1 양자화 신호를 보정할 수 있다. 오디오 신호 부호화 장치 (200) 는, 보정된 제 1 양자화 신호를 제 2 양자화 신호로서 출력할 수 있다.The audio signal encoding apparatus 200 can correct the first quantization signal by adding a quantization signal to at least one of the bands masked by the masking threshold to the first quantization signal. The audio signal encoding apparatus 200 can output the corrected first quantization signal as the second quantization signal.

이 때, 오디오 신호 부호화 장치 (200) 는, 제 1 주파수 영역 신호에 포함되는 각 주파수 대역별 에너지와 마스킹 임계치를 비교하여, 비교 결과에 기초하여 제 2 양자화 신호를 생성할 수 있다. 보다 구체적으로, 오디오 신호 부호화 장치 (200) 는, 마스킹 임계치에 의해 마스킹된 주파수 대역들의 대역별 에너지와 해당 대역에 대한 마스킹 임계치를 비교할 수 있다. 오디오 신호 부호화 장치 (200) 는, 비교 결과에 기초하여 마스킹된 적어도 하나의 대역 중 적어도 하나의 대역을 선택할 수 있다.At this time, the audio signal encoding apparatus 200 may compare the energy of each frequency band included in the first frequency domain signal with the masking threshold value, and generate the second quantization signal based on the comparison result. More specifically, the audio signal encoding apparatus 200 can compare the energy per band of the frequency bands masked by the masking threshold with the masking threshold for the band. The audio signal encoding apparatus 200 can select at least one of the at least one band masked based on the comparison result.

예를 들어, 오디오 신호 부호화 장치 (200) 는, 주파수 대역에 대한 에너지와 해당 대역에 대한 마스킹 임계치의 차이가 가장 작은 대역을 우선적으로 선택할 수 있다. 오디오 신호 부호화 장치 (200) 는, 제 1 양자화 신호에, 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 제 2 양자화 신호를 생성할 수 있다. 제 2 양자화 신호는, 마스킹 임계치에 의해 마스킹된 주파수 대역들 중에서 선택된 적어도 하나의 주파수 대역에 대한 양자화 신호를 포함함으로써, 남는 비트를 이용하여 부호화되는 오디오 신호의 음질을 높일 수 있다.For example, the audio signal encoding apparatus 200 can preferentially select a band having the smallest difference between the energy for the frequency band and the masking threshold value for the band. The audio signal encoding apparatus 200 can generate a second quantization signal by adding a quantization signal for at least one selected band to the first quantization signal. The second quantization signal includes a quantization signal for at least one frequency band selected from among frequency bands masked by the masking threshold, thereby enhancing the sound quality of the audio signal encoded using the remaining bits.

또한, 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수와 프레임 비트수의 차이에 기초하여, 마스킹된 신호가 복원된 제 2 양자화 신호를 생성할 수 있다. 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수와 프레임 비트수의 차이가 소정값 이상일 경우, 제 1 양자화 신호에, 마스킹 임계치에 의해 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 제 2 양자화 신호를 생성 할 수 있다.Further, the audio signal encoding apparatus 200 can generate the second quantized signal in which the masked signal is reconstructed, based on the difference between the first used bit number and the frame bit number. The audio signal encoding apparatus 200 adds a quantization signal for at least one band masked by the masking threshold to the first quantization signal when the difference between the first use bit number and the frame bit number is equal to or larger than a predetermined value, 2 quantization signal.

예를 들어, 제1 양자화 신호는, 소정 대역에서 마스킹 임계치 이하의 신호 값을 제거한 신호이며, 이때 제거된 신호는 제3 양자화 신호라 하자. 상기 제 2 양자화 신호는 제1 양자화 신호에 상기 제3 양자화 신호 중 적어도 하나의 대역에 대한 신호를 추가한 신호가 될 수 있다. For example, the first quantized signal is a signal obtained by removing a signal value below a masking threshold value in a predetermined band, and the removed signal is referred to as a third quantized signal. The second quantization signal may be a signal obtained by adding a signal for at least one of the third quantization signals to a first quantization signal.

즉, 오디오 신호 부호화 장치 (200) 는, 미리 결정된 비트수 이상의 비트수가 남는 경우, 마스킹 임계치에 의해 마스킹된 제 1 양자화 신호 대신에, 마스킹 임계치에 의해 마스킹되지 않은 제 2 양자화 신호를 출력할 수 있다. That is, when the number of bits equal to or greater than the predetermined number of bits remains, the audio signal encoding apparatus 200 can output the second quantized signal that is not masked by the masking threshold in place of the first quantized signal masked by the masking threshold .

본 발명의 제 2 실시예에 따라 출력되는 제 2 양자화 신호는, 마스킹 임계치에 의해 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 더 포함함으로써, 제 1 양자화 신호보다 많은 비트수를 사용하여 부호화된다. 따라서, 본 발명의 제 2 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 남는 비트를 이용하도록 양자화 신호를 보정함으로써 오디오 신호의 음질을 높일 수 있다. 본 발명의 제 2 실시예와 관련하여서는 후에 도 5 를 참조하여 보다 구체적으로 살펴본다.The second quantization signal output according to the second embodiment of the present invention is encoded using more bits than the first quantization signal by further including a quantization signal for at least one band masked by the masking threshold. Therefore, the audio signal encoding apparatus 200 according to the second embodiment of the present invention can enhance the sound quality of the audio signal by correcting the quantization signal to use the remaining bits. The second embodiment of the present invention will be described later in detail with reference to FIG.

단계 S360 에서 오디오 신호 부호화 장치 (200) 는, 제 2 양자화 신호를 부호화한다. 예를 들어, 오디오 신호 부호화 장치 (200) 는 제 2 양자화 신호에 대해 무잡음 부호화 및 비트스트림 패킹 등의 과정을 거쳐 비트스트림을 출력할 수 있다.In step S360, the audio signal encoding apparatus 200 encodes the second quantization signal. For example, the audio signal encoding apparatus 200 may output a bitstream through a process such as noise-free coding and bitstream packing with respect to a second quantization signal.

한편, 도 3 에 도시되지는 않았으나, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 단계 S340 에서 제 1 사용 비트수가 프레임 비트수보다 크다고 판단된 경우, 제 1 사용 비트수와 프레임 비트수의 차이에 기초하여, 글로벌 게인을 증가시키는 단계를 더 포함할 수 있다. 오디오 신호 부호화 장치 (200) 는 증가된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화함으로써 제 2 양자화 신호를 생성할 수 있다.3, when it is determined in step S340 that the number of first used bits is greater than the number of frame bits, the apparatus 200 for encoding an audio signal according to an exemplary embodiment of the present invention calculates a first number of used bits And increasing the global gain based on the difference in the number of frame bits. The audio signal encoding apparatus 200 can generate the second quantized signal by quantizing the first frequency domain signal by applying the increased global gain.

또한, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 단계 S340 에서 제 1 사용 비트수가 프레임 비트수보다 크다고 판단된 경우, 글로벌 게인을 소정값만큼 증가시켜 갱신할 수 있다. 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화할 수 있다. 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산할 수 있다. 오디오 신호 부호화 장치 (200) 는, 제 2 사용 비트수가 프레임 비트수보다 작거나 같아질 때까지, 글로벌 게인을 소정값만큼 갱신하는 단계, 갱신된 글로벌 게인을 적용하여 양자화하는 단계, 및 상기 제 2 사용 비트수를 계산하는 단계를 반복할 수 있다.If it is determined in step S340 that the number of first used bits is larger than the number of frame bits, the audio signal encoding apparatus 200 may update the global gain by a predetermined value. The audio signal encoding apparatus 200 can quantize the first frequency domain signal by applying the updated global gain. The audio signal encoding apparatus 200 can calculate the second use bit number used by the quantized signal by applying the updated global gain. The audio signal encoding apparatus 200 further includes a step of updating the global gain by a predetermined value until the second usage bit number becomes smaller than or equal to the frame bit number, quantizing by applying the updated global gain, The step of calculating the number of used bits can be repeated.

도 4 는 본 발명의 제 1 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.4 is a flowchart for explaining a step of correcting a quantized signal according to the first embodiment of the present invention.

본 발명의 제 1 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 조정하고, 조정된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화함으로써 보정된 양자화 신호를 생성할 수 있다.According to the first embodiment of the present invention, the audio signal encoding apparatus 200 can generate the corrected quantized signal by adjusting the global gain and quantizing the first frequency domain signal by applying the adjusted global gain.

단계 S410 에서 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 소정 값만큼 감소시켜 갱신한다. 이 때, 글로벌 게인이 감소되는 소정값은, 미리 결정된 값으로서, 사용자의 입력에 의해 설정되거나, 어플리케이션에 따라 미리 결정되거나, 프레임 비트수에 따라 미리 결정된 값일 수 있다. 예를 들어, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 1 만큼 감소시켜 갱신할 수 있다. 또는, 글로벌 게인이 감소되는 소정값은, 제 1 사용 비트수와 프레임 비트수 간의 차이에 기초하여 결정된 값일 수 있다. 단계 S420 에서 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화한다. 단계 S430 에서 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산한다.In step S410, the audio signal encoding apparatus 200 updates the global gain by decrementing the global gain by a predetermined value. At this time, the predetermined value at which the global gain is decreased may be a predetermined value, set by the user's input, predetermined in accordance with the application, or a predetermined value according to the number of frame bits. For example, the audio signal encoding apparatus 200 can update the global gain by decrementing by 1. Alternatively, the predetermined value for which the global gain is reduced may be a value determined based on the difference between the first used bit number and the frame bit number. In step S420, the audio signal encoding apparatus 200 applies the updated global gain to quantize the first frequency-domain signal. In step S430, the audio signal encoding apparatus 200 calculates the second used bit number used by the quantized signal by applying the updated global gain.

단계 S440 에서 오디오 신호 부호화 장치 (200) 는, 제 2 사용 비트수가 프레임 비트수 보다 큰지를 판단한다. 즉, 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인을 적용하여 오디오 신호를 양자화함으로써, 오디오 신호에 대해 할당될 비트가 부족해졌는지를 판단한다.In step S440, the audio signal encoding apparatus 200 determines whether the second usage bit number is larger than the frame bit number. That is, the audio signal encoding apparatus 200 quantizes the audio signal by applying the updated global gain to determine whether the bit to be allocated to the audio signal is insufficient.

단계 S450 에서 오디오 신호 부호화 장치 (200) 는, 제 2 사용 비트수가 프레임 비트수 보다 큰 경우, 즉, 할당될 비트가 부족해진 경우, 이전 반복에서 갱신된 글로벌 게인을 적용하여 양자화된 제 1 주파수 영역 신호를 제 2 양자화 신호로서 출력할 수 있다.In step S450, when the number of second used bits is larger than the number of frame bits, that is, when the number of bits to be allocated is insufficient, the audio signal encoding apparatus 200 applies the global gain updated in the previous iteration to the quantized first frequency region Signal as a second quantized signal.

단계 S460 에서 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인 또는 제 2 사용 비트수가 반복 종료 조건을 만족하는지 여부를 판단한다. 갱신된 글로벌 게인 또는 제 2 사용 비트수가 반복 종료 조건을 만족하지 않는 경우, 오디오 신호 부호화 장치 (200) 는, 적합한 글로벌 게인 및 적합한 제 2 사용 비트수를 갖는 제 2 양자화 신호를 출력할 수 있을 때까지, 앞선 단계 S410 내지 S450 을 반복할 수 있다.In step S460, the audio signal encoding apparatus 200 determines whether the updated global gain or second use bit number satisfies the repeat end condition. When the updated global gain or the second use bit number does not satisfy the repeat end condition, the audio signal encoding apparatus 200 can output the second quantization signal having the appropriate global gain and the second suitable use bit number , The preceding steps S410 to S450 can be repeated.

일 예로서, 반복 종료 조건은, 갱신된 글로벌 게인이 소정 게인 이하가 되는 경우를 포함할 수 있다. 소정 게인은 사용자에 의해 입력된 값이거나, 어플리케이션에 따라 미리 결정된 값이거나, 프레임에 따라 계산되는 값일 수 있다. As an example, the repeat termination condition may include a case where the updated global gain becomes equal to or less than a predetermined gain. The predetermined gain may be a value input by a user, a predetermined value depending on an application, or a value calculated according to a frame.

오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인이 소정 게인 이하가 되는 경우 글로벌 게인이 더 이상 감소되지 않도록 반복을 종료할 수 있다. 글로벌 게인이 감소되면, 전체 주파수 대역들에 대한 양자화 에러가 감소된다. 그러나, 글로벌 게인이 계속 작아지게 되면, 오디오 신호 부호화 장치 (200) 의 연산량이 증가하게 된다. 따라서, 오디오 신호 부호화 장치 (200) 는 갱신된 글로벌 게인의 최소값을 미리 설정하여 둘 수 있다. 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인의 최소값으로서, 실험적으로 최적화된 값을 미리 설정하여 둘 수 있다. The audio signal encoding apparatus 200 can end the repetition so that the global gain is no longer reduced when the updated global gain becomes equal to or smaller than a predetermined gain. If the global gain is reduced, the quantization error for the entire frequency bands is reduced. However, if the global gain continues to decrease, the amount of computation of the audio signal encoding apparatus 200 increases. Therefore, the audio signal encoding apparatus 200 can set the minimum value of the updated global gain in advance. The audio signal encoding apparatus 200 may set an experimentally optimized value as a minimum value of the updated global gain in advance.

오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인이 소정 게인 이하가 되면, 갱신된 글로벌 게인을 적용하여 양자화된 신호를 제 2 양자화 신호로서 출력할 수 있다.The audio signal encoding apparatus 200 can output the quantized signal as the second quantization signal by applying the updated global gain when the updated global gain becomes a predetermined gain or less.

다른 예로서, 반복 종료 조건은, 제 2 사용 비트수가 프레임 비트수와 동일한 경우를 포함할 수 있다. 오디오 신호 부호화 장치 (200) 는, 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 총 비트수가, 프레임당 사용 가능한 최대 비트수와 동일한 경우, 프레임 당 할당된 비트를 모두 활용함으로써 부호화된 오디오 신호가 최고의 음질을 갖게 된 것으로 판단할 수 있다.As another example, the iteration end condition may include a case where the second use bit number is equal to the frame bit number. When the total number of bits used by the quantized signal by applying the updated global gain is equal to the maximum number of bits available per frame, the audio signal encoding apparatus 200 uses all bits allocated per frame, It can be judged that the signal has the highest sound quality.

따라서, 오디오 신호 부호화 장치 (200) 는, 제 2 사용 비트수가 프레임 비트수와 동일하게 되면, 갱신된 글로벌 게인을 적용하여 양자화된 신호를 제 2 양자화 신호로서 출력할 수 있다.Accordingly, when the second use bit number becomes equal to the frame bit number, the audio signal encoding apparatus 200 can output the quantized signal as the second quantization signal by applying the updated global gain.

본 발명의 제 1 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 도 4 에 도시된 바와 같이, 글로벌 게인을 소정값만큼 감소시켜 갱신하는 동작을 반복함으로써 글로벌 게인을 조절하는 방법을 이용할 수 있다. 한편, 오디오 신호 부호화 장치 (200) 는, 남는 비트수에 기초하여 글로벌 게인을 감소시키는 방법을 이용함으로써 글로벌 게인 조절 속도를 더욱 향상시킬 수 있다.According to the first embodiment of the present invention, the audio signal encoding apparatus 200 can use a method of adjusting the global gain by repeating the operation of reducing and updating the global gain by a predetermined value as shown in Fig. 4 have. On the other hand, the audio signal encoding apparatus 200 can further improve the global gain adjustment speed by using a method of reducing the global gain based on the number of remaining bits.

남는 비트수, 즉, 제 1 사용 비트수와 프레임 비트수 간의 차이에 기초하여, 조절되어야 할 글로벌 게인은 다음과 같은 방법을 통해 계산될 수 있다.Based on the difference between the number of remaining bits, that is, the number of first used bits and the number of frame bits, the global gain to be adjusted can be calculated by the following method.

먼저, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 글로벌 게인이 소정값만큼 증가하거나 감소함에 따라, 양자화된 신호에 의해 사용되는 사용 비트수의 증가 또는 감소율, 즉, 엔트로피 변화율을 추정할 수 있다. 예를 들어, 글로벌 게인, 즉, 전대역에 대해 적용되는 양자화 스텝 사이즈가 1 만큼 증가하거나 1 만큼 감소함에 따라, 양자화된 신호에 의해 사용되는 사용 비트수의 증가 또는 감소율을 추정할 수 있다.As the global gain increases or decreases by a predetermined value, the apparatus 200 for encoding an audio signal according to an embodiment of the present invention increases or decreases the number of used bits used by a quantized signal, that is, Can be estimated. For example, it is possible to estimate the increase or decrease rate of the number of used bits used by the quantized signal as the global gain, that is, the quantization step size applied to the whole band is increased by 1 or decremented by 1. [

오디오 신호 부호화 장치 (200) 는, 글로벌 게인의 변화에 따른 엔트로피 변화율을 추정함에 있어서, 글로벌 게인이 1 만큼 변화할 때 주파수 데이터 (spectral data) 1 개당 비트수의 변화율을 추정할 수 있다. 따라서, 글로벌 게인이 1만큼 변화함에 따른 사용 비트수의 변화를 추정하기 위해서, 오디오 신호 부호화 장치 (200) 는 전체 주파수 데이터의 수, 즉, 프레임 사이즈를 고려하여야 한다.The audio signal encoding apparatus 200 can estimate the rate of change of the number of bits per spectral data when the global gain changes by one in estimating the rate of change of entropy according to the change of the global gain. Therefore, in order to estimate a change in the number of used bits as the global gain changes by 1, the audio signal encoding apparatus 200 should consider the number of all frequency data, i.e., the frame size.

이하, 글로벌 게인이 1 만큼 증가함에 따라 주파수 데이터 1 개당 -3/16 bits 가 줄어드는 것으로 글로벌 게인의 변화에 따른 엔트로피 변화율이 추정된 경우를 예로 들어 설명한다. 그러나 본 발명은 이에 한정되지 않는다.Hereinafter, an example in which the rate of change of entropy due to a change in global gain is estimated by decreasing -3/16 bits per frequency data as the global gain increases by one will be described as an example. However, the present invention is not limited thereto.

글로벌 게인의 변화에 따른 엔트로피 변화율이 글로벌 게인이 1 만큼 증가함에 따라 3/16 bits 가 줄어드는 것으로 추정된 경우, 프레임 사이즈가 128 비트라면 글로벌 게인이 1 감소함에 따라 3/16*128 = 24 bits 가 추가로 필요함을 알 수 있다.If the global gain is estimated to be reduced by 3/16 bits as the global gain increases by 1, if the frame size is 128 bits, the global gain decreases by 1, resulting in 3/16 * 128 = 24 bits It can be seen that it is necessary.

예를 들어, 프레임 비트수가 600 이고 제 1 사용 비트수가 580 이라면, 제 1 사용 비트수와 프레임 비트수 간의 차이는 20 비트이다. 즉, 20 비트가 남는 것을 알 수 있다. 이 경우, 오디오 신호 부호화 장치 (200) 는 제 1 사용 비트수와 프레임 비트수 간의 차이를 대략 24 비트로 보고 글로벌 게인을 1 만큼 감소시킬 수 있다.For example, if the number of frame bits is 600 and the number of first used bits is 580, the difference between the number of first used bits and the number of frame bits is 20 bits. That is, 20 bits remain. In this case, the audio signal encoding apparatus 200 can reduce the global gain by one by using the difference between the first used bit number and the frame bit number as approximately 24 bits.

또 다른 예로서, 프레임 비트수가 600 인 경우, 제 1 사용 비트수가 550 이라면, 제 1 사용 비트수와 프레임 비트수 간의 차이는 50 이다. 이 경우, 오디오 신호 부호화 장치 (200) 는 제 1 사용 비트수와 프레임 비트수 간의 차이를 대략 48 비트로 보고 글로벌 게인을 2 만큼 감소시킬 수 있다.As another example, if the number of frame bits is 600 and the number of first used bits is 550, the difference between the number of first used bits and the number of frame bits is 50. In this case, the audio signal encoding apparatus 200 can reduce the global gain by 2 by using the difference between the first used bit number and the frame bit number as approximately 48 bits.

상술한 바와 같이, 본 발명의 제 1 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수와 프레임 비트수 간의 차이에 따라 글로벌 게인을 감소시킬 수 있다. 다만, 제 1 사용 비트수와 프레임 비트수 간의 차이에 따라 얼마만큼의 글로벌 게인을 감소시킬지 여부는 상기 계산식에 한정되지 않는다.As described above, the audio signal encoding apparatus 200 according to the first embodiment of the present invention can reduce the global gain according to the difference between the first used bit number and the frame bit number. However, whether the global gain is to be reduced according to the difference between the first used bit number and the frame bit number is not limited to the above calculation formula.

도 5 는 본 발명의 제 2 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다. 5 is a flowchart for explaining a step of correcting a quantized signal according to a second embodiment of the present invention.

본 발명의 제 2 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 마스킹 임계치에 의해 마스킹된 신호를 복원함으로써 보정된 양자화 신호를 생성할 수 있다. 본 발명의 제 2 실시예는, 특정 프레임에서 사용된 비트수가 하나의 프레임에 대해 사용될 수 있는 최대 비트수보다 작은 경우, 마스킹되지 않은 원본 주파수 영역 신호를 이용함으로써, 비트수 조절을 수행할 수 있다. According to the second embodiment of the present invention, the audio signal encoding apparatus 200 can generate a corrected quantized signal by restoring the masked signal by the masking threshold value. The second embodiment of the present invention can perform bit number adjustment by using the unmasked original frequency domain signal if the number of bits used in a particular frame is less than the maximum number of bits that can be used for one frame .

단계 S510 에서 오디오 신호 부호화 장치 (200) 는, 마스킹 임계치에 의해 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역을 선택한다.In step S510, the audio signal encoding apparatus 200 selects at least one of the at least one band masked by the masking threshold.

예를 들어, 오디오 신호 부호화 장치 (200) 는, 각 주파수 대역의 에너지와 마스킹 임계치를 비교하여, 비교 결과에 기초하여 적어도 하나의 대역을 선택할 수 있다. 오디오 신호 부호화 장치 (200) 는, 마스킹 임계치에 의해 마스킹된 적어도 하나의 주파수 대역에 대한 대역별 에너지와, 해당 대역에 대한 마스킹 임계치 간의 차이가 가장 작은 대역을 우선적으로 선택할 수 있다.For example, the audio signal encoding apparatus 200 can compare the energy of each frequency band with the masking threshold value, and select at least one band based on the comparison result. The audio signal encoding apparatus 200 can preferentially select the band having the smallest difference between the energy per band for at least one frequency band masked by the masking threshold and the masking threshold for the band.

또 다른 예로서, 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수와 프레임 비트수의 차이가 소정 비트수 이상일 경우, 마스킹 임계치에 의해 마스킹된 모든 대역을 선택할 수 있다.As another example, the audio signal encoding apparatus 200 can select all bands masked by the masking threshold when the difference between the number of first used bits and the number of frame bits is equal to or greater than a predetermined number of bits.

단계 S520 에서, 오디오 신호 부호화 장치 (200) 는, 제 1 양자화 신호에, 단계 S510 에서 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가함으로써 제 2 양자화 신호를 생성할 수 있다.In step S520, the audio signal encoding apparatus 200 can generate the second quantization signal by adding the quantization signal for the at least one band selected in step S510 to the first quantization signal.

본 발명의 제 2 실시예에 따라 출력되는 제 2 양자화 신호는, 마스킹 임계치에 의해 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 더 포함함으로써, 제 1 양자화 신호보다 많은 비트수를 사용하여 부호화된다. 따라서, 본 발명의 제 2 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 남는 비트를 이용하도록 양자화 신호를 보정함으로써 오디오 신호의 음질을 높일 수 있다. The second quantization signal output according to the second embodiment of the present invention is encoded using more bits than the first quantization signal by further including a quantization signal for at least one band masked by the masking threshold. Therefore, the audio signal encoding apparatus 200 according to the second embodiment of the present invention can improve the sound quality of the audio signal by correcting the quantization signal to use the remaining bits.

상술한 바와 같이, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법 및 장치에 의하면, 각 프레임에 포함되는 남는 비트를 활용하여 양자화 신호를 보정하고, 보정된 양자화 신호를 부호화함으로써, 부호화되는 오디오 신호의 음질을 높일 수 있다.As described above, according to the method and apparatus for encoding an audio signal according to an embodiment of the present invention, the quantized signal is corrected by utilizing the remaining bits included in each frame, and the corrected quantized signal is encoded, Can be increased.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법 및 장치에 의하면, 각 프레임 신호의 특성 및 남는 비트수에 따라 글로벌 게인을 조절하고, 남는 비트수에 기초하여 마스킹되지 않은 원본 주파수 영역 신호를 이용함으로써 고음질의 부호화된 오디오 신호를 만들 수 있다. 따라서, 지각 음향 부호화 장치가 저지연 오디오 부호화 방법을 이용함으로 인하여, 프레임 비트수가 충분하지 못하여 발생하는 음질 열화와 같은 문제를 본 발명을 통해 해결할 수 있다.According to the method and apparatus for encoding an audio signal according to an embodiment of the present invention, the global gain is adjusted according to the characteristics of each frame signal and the number of remaining bits, and an original masked frequency domain signal is used based on the number of remaining bits A high-quality encoded audio signal can be produced. Therefore, since the perceptual sound encoding apparatus uses the low-delay audio encoding method, problems such as deterioration in sound quality caused by insufficient number of frame bits can be solved through the present invention.

한편, 본 발명의 다른 일 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 부호화된 오디오 신호에 대하여 비트가 남는 경우 뿐만 아니라, 비트가 부족한 경우에도, 오디오 신호를 보정함으로써 부호화된 오디오 신호의 비트수를 조절할 수 있다. 따라서, 오디오 신호 부호화 장치 (200) 는, 비트 할당을 수행함에 있어서, 특정 오디오 프레임에 대해 사용된 총 비트수가 한 프레임당 사용 가능한 최대 비트수를 초과하지 않도록 할 수 있다.Meanwhile, according to another embodiment of the present invention, the audio signal encoding apparatus 200 corrects the audio signal not only when the bit remains in the encoded audio signal but also when the bit is insufficient, The number of bits can be adjusted. Accordingly, the audio signal encoding apparatus 200 can perform bit allocation so that the total number of bits used for a specific audio frame does not exceed the maximum number of bits available per frame.

도 6 은 본 발명의 제 3 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.6 is a flowchart for explaining a step of correcting a quantized signal according to the third embodiment of the present invention.

도 6 을 참조하면, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법은 도 2 에 도시된 오디오 신호 부호화 장치 (200) 에서 처리되는 단계들로 구성된다. 따라서, 이하에 생략된 내용이라 하더라도 도 2 에 도시된 오디오 신호 부호화 장치 (200) 에 관하여 상술된 내용은 도 6 의 오디오 신호 부호화 방법에도 적용됨을 알 수 있다.Referring to FIG. 6, an audio signal encoding method according to an embodiment of the present invention includes steps processed in the audio signal encoding apparatus 200 shown in FIG. Therefore, even if the contents are omitted in the following description, it can be understood that the above-described contents of the audio signal encoding apparatus 200 shown in FIG. 2 also apply to the audio signal encoding method of FIG.

도 6 의 단계 S610 내지 S640 는, 도 3 의 단계 S310 내지 S340 에 대응된다. 따라서, 이하에 생략된 내용이라 하더라도 도 3 에 도시된 오디오 신호 부호화 방법에 관하여 상술된 내용은 도 6 의 오디오 신호 부호화 방법에도 적용됨을 알 수 있다.Steps S610 to S640 of Fig. 6 correspond to steps S310 to S340 of Fig. Therefore, even if the contents are omitted in the following description, it can be understood that the above-described contents of the audio signal encoding method shown in FIG. 3 also apply to the audio signal encoding method of FIG.

단계 S610 에서 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 오디오 신호를 주파수 영역 신호로 변환한다. 단계 S620 에서 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 적용하여 주파수 영역 신호를 양자화한다. 단계 S630 에서 오디오 신호 부호화 장치 (200) 는, 양자화된 신호에 의해 사용된 사용 비트수를 계산한다. 단계 S640 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은지를 판단한다.In step S610, the audio signal encoding apparatus 200 according to an embodiment of the present invention converts an audio signal into a frequency domain signal. In step S620, the audio signal encoding apparatus 200 quantizes the frequency domain signal by applying global gain. In step S630, the audio signal encoding apparatus 200 calculates the number of used bits used by the quantized signal. In step S640, the audio signal encoding apparatus 200 determines whether the number of used bits is smaller than the number of frame bits allocated in advance for the frame of the audio signal.

단계 S350 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 프레임 비트수보다 작은 경우, 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는지 여부를 판단한다.In step S350, when the number of used bits is smaller than the number of frame bits, the audio signal encoding apparatus 200 determines whether at least one of the applied global gain and the number of used bits satisfies the repeat end condition.

예를 들어, 오디오 신호 부호화 장치 (200) 는, 적용된 글로벌 게인이 소정 게인 이하인 경우 또는 사용 비트수와 프레임 비트수의 차이가 소정 비트수 이하인 경우, 반복 종료 조건을 만족하는 것으로 판단할 수 있다. 반복 종료 조건과 관련된 소정 게인 및 소정 비트수는, 사용자에 의해 입력된 값이거나, 어플리케이션에 따라 미리 결정된 값이거나, 프레임에 따라 계산되는 값일 수 있다.For example, when the applied global gain is equal to or less than a predetermined gain, or when the difference between the number of used bits and the number of frame bits is equal to or smaller than the predetermined number of bits, the audio signal encoding apparatus 200 can determine that the repeated termination condition is satisfied. The predetermined gain and the predetermined number of bits associated with the iteration end condition may be a value input by the user, a predetermined value depending on the application, or a value calculated according to the frame.

적용된 글로벌 게인 또는 사용 비트수가 반복 종료 조건을 만족하는 경우, 오디오 신호 부호화 장치 (200) 는 단계 S620 에서 양자화된 신호를 부호화한다.(S670)When the applied global gain or the number of used bits satisfies the iteration end condition, the audio signal encoding apparatus 200 codes the quantized signal in step S620 (S670)

적용된 글로벌 게인 또는 사용 비트수가 반복 종료 조건을 만족하지 않는 경우, 오디오 신호 부호화 장치 (200) 는 글로벌 게인을 소정값만큼 감소시켜 갱신한다.(S655) 일 예로서, 오디오 신호 부호화 장치 (200) 는, 사용 비트수와 프레임 비트수의 차이에 기초하여, 글로벌 게인을 얼마나 감소시킬지 결정할 수 있다. 다른 예로서, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 1 만큼 감소시켜 갱신할 수 있다. 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 갱신한 후, 단계 S620 으로 돌아가 갱신된 글로벌 게인을 적용하여 주파수 영역 신호를 양자화한다If the applied global gain or the number of used bits does not satisfy the iteration end condition, the audio signal encoding apparatus 200 updates the global gain by a predetermined value (S655). As an example, the audio signal encoding apparatus 200 , It is possible to determine how to reduce the global gain based on the difference between the number of used bits and the number of frame bits. As another example, the audio signal encoding apparatus 200 can update the global gain by decrementing by 1. After updating the global gain, the audio signal encoding apparatus 200 returns to step S620 and applies the updated global gain to quantize the frequency domain signal

단계 S660 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 프레임 비트수보다 작지 않은 경우, 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는지 여부를 판단한다.In step S660, when the number of used bits is not smaller than the number of frame bits, the audio signal encoding apparatus 200 determines whether at least one of the applied global gain and the number of used bits satisfies the repeat end condition.

예를 들어, 오디오 신호 부호화 장치 (200) 는, 적용된 글로벌 게인이 소정 게인 이상인 경우, 사용 비트수와 프레임 비트수의 차이가 소정 비트수 이하인 경우, 또는 사용 비트수와 프레임 비트수가 동일한 경우에, 반복 종료 조건을 만족하는 것으로 판단할 수 있다. 반복 종료 조건과 관련된 소정 게인 및 소정 비트수는, 사용자에 의해 입력된 값이거나, 어플리케이션에 따라 미리 결정된 값이거나, 프레임에 따라 계산되는 값일 수 있다.For example, when the applied global gain is equal to or greater than a predetermined gain, the difference between the number of used bits and the number of frame bits is equal to or less than a predetermined number of bits, or when the number of used bits and the number of frame bits are equal, It can be determined that the repeated termination condition is satisfied. The predetermined gain and the predetermined number of bits associated with the iteration end condition may be a value input by the user, a predetermined value depending on the application, or a value calculated according to the frame.

적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는 경우, 오디오 신호 부호화 장치 (200) 는 단계 S620 에서 양자화된 신호를 부호화한다.(S670)If at least one of the applied global gain and the number of used bits satisfies the iteration end condition, the audio signal encoding apparatus 200 codes the quantized signal in step S620 (step S670)

적용된 글로벌 게인 또는 사용 비트수가 반복 종료 조건을 만족하지 않는 경우, 오디오 신호 부호화 장치 (200) 는 글로벌 게인을 소정값만큼 증가시켜 갱신한다.(S665) 일 예로서, 오디오 신호 부호화 장치 (200) 는, 사용 비트수와 프레임 비트수의 차이에 기초하여, 글로벌 게인을 얼마나 증가시킬지 결정할 수 있다. 다른 예로서, 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 1 만큼 증가시켜 갱신할 수 있다. 오디오 신호 부호화 장치 (200) 는, 글로벌 게인을 갱신한 후, 단계 S620 으로 돌아가 갱신된 글로벌 게인을 적용하여 주파수 영역 신호를 양자화한다.If the applied global gain or the number of used bits does not satisfy the repetition end condition, the audio signal encoding apparatus 200 updates the global gain by a predetermined value (S665). As an example, the audio signal encoding apparatus 200 , It is possible to determine how to increase the global gain based on the difference between the number of used bits and the number of frame bits. As another example, the audio signal encoding apparatus 200 can increase the global gain by one. After updating the global gain, the audio signal encoding apparatus 200 returns to step S620 and applies the updated global gain to quantize the frequency domain signal.

도 7 은 본 발명의 제 4 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.7 is a flowchart for explaining a step of correcting a quantized signal according to the fourth embodiment of the present invention.

단계 S610 에서 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 오디오 신호를 주파수 영역 신호로 변환한다. In step S610, the audio signal encoding apparatus 200 according to an embodiment of the present invention converts an audio signal into a frequency domain signal.

단계 S710 에서, 오디오 신호 부호화 장치 (200) 는, 심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹할 수 있다.In step S710, the audio signal encoding apparatus 200 may mask at least one of a plurality of bands included in the frequency domain signal by applying a masking threshold determined based on the psychoacoustic model.

단계 S620 에서, 오디오 신호 부호화 장치 (200) 는 마스킹 임계치에 의해 마스킹된 주파수 대역을 제외하고 나머지 주파수 영역 신호에 대해서만 양자화할 수 있다. 단계 S630 에서 오디오 신호 부호화 장치 (200) 는, 양자화된 신호에 의해 사용된 사용 비트수를 계산할 수 있다. 단계 S640 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은지를 판단할 수 있다.In step S620, the audio signal encoding apparatus 200 may quantize only the remaining frequency-domain signals except for the frequency band masked by the masking threshold. In step S630, the audio signal encoding apparatus 200 can calculate the number of used bits used by the quantized signal. In step S640, the audio signal encoding apparatus 200 can determine whether the number of used bits is smaller than the number of frame bits allocated in advance for the frame of the audio signal.

단계 S720 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 프레임 비트수보다 작은 경우, 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는지 여부를 판단할 수 있다.In step S720, when the number of used bits is smaller than the number of frame bits, the audio signal encoding apparatus 200 may determine whether at least one of the applied global gain and the number of used bits satisfies the repeat end condition.

예를 들어, 오디오 신호 부호화 장치 (200) 는, 적용된 글로벌 게인이 소정 게인 이하인 경우 또는 사용 비트수와 프레임 비트수의 차이가 소정 비트수 이하인 경우, 반복 종료 조건을 만족하는 것으로 판단할 수 있다. 반복 종료 조건과 관련된 소정 게인 및 소정 비트수는, 사용자에 의해 입력된 값이거나, 어플리케이션에 따라 미리 결정된 값이거나, 프레임에 따라 계산되는 값일 수 있다.For example, when the applied global gain is equal to or less than a predetermined gain, or when the difference between the number of used bits and the number of frame bits is equal to or smaller than the predetermined number of bits, the audio signal encoding apparatus 200 can determine that the repeated termination condition is satisfied. The predetermined gain and the predetermined number of bits associated with the iteration end condition may be a value input by the user, a predetermined value depending on the application, or a value calculated according to the frame.

적용된 글로벌 게인 또는 사용 비트수가 반복 종료 조건을 만족하는 경우, 오디오 신호 부호화 장치 (200) 는 단계 S620 에서 양자화된 신호를 부호화할 수 있다.(S670)If the applied global gain or the number of used bits satisfies the iterative termination condition, the audio signal encoding apparatus 200 can encode the quantized signal in step S620 (S670)

적용된 글로벌 게인 또는 사용 비트수가 반복 종료 조건을 만족하지 않는 경우, 단계 S723 에서 오디오 신호 부호화 장치 (200) 는, 단계 S710 에서 마스킹 임계치에 의해 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역을 선택할 수 있다.If the applied global gain or use bit number does not satisfy the iteration end condition, the audio signal encoding apparatus 200 in step S723 can select at least one of the at least one band masked by the masking threshold in step S710 .

예를 들어, 오디오 신호 부호화 장치 (200) 는, 각 주파수 대역의 에너지와 마스킹 임계치를 비교하여, 비교 결과에 기초하여 적어도 하나의 대역을 선택할 수 있다. 오디오 신호 부호화 장치 (200) 는, 마스킹 임계치에 의해 마스킹된 적어도 하나의 주파수 대역에 대한 대역별 에너지와, 해당 대역에 대한 마스킹 임계치 간의 차이가 가장 작은 대역을 우선적으로 선택할 수 있다.For example, the audio signal encoding apparatus 200 can compare the energy of each frequency band with the masking threshold value, and select at least one band based on the comparison result. The audio signal encoding apparatus 200 can preferentially select the band having the smallest difference between the energy per band for at least one frequency band masked by the masking threshold and the masking threshold for the band.

또 다른 예로서, 오디오 신호 부호화 장치 (200) 는, 사용 비트수와 프레임 비트수의 차이가 소정 비트수 이상일 경우, 마스킹 임계치에 의해 마스킹된 모든 대역을 선택할 수 있다.As another example, when the difference between the number of used bits and the number of frame bits is equal to or greater than the predetermined number of bits, the audio signal encoding apparatus 200 can select all bands masked by the masking threshold.

단계 S725 에서, 오디오 신호 부호화 장치 (200) 는, 선택된 대역에 대한 주파수 영역 신호가 추가된 주파수 영역 신호를 양자화할 수 있다. 즉, 오디오 신호 부호화 장치 (200) 는, 단계 S710 에서 마스킹된 주파수 영역 신호 중에서 선택된 대역에 대응되는 주파수 영역 신호를 복원함으로써 보정된 양자화 신호를 생성할 수 있다.In step S725, the audio signal encoding apparatus 200 may quantize the frequency domain signal to which the frequency domain signal for the selected band is added. That is, the audio signal encoding apparatus 200 can generate the corrected quantized signal by restoring the frequency domain signal corresponding to the selected band among the masked frequency domain signals in step S710.

한편, 단계 S660 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 프레임 비트수보다 작지 않은 경우, 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는지 여부를 판단할 수 있다. 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는 경우, 오디오 신호 부호화 장치 (200) 는 단계 S620 에서 양자화된 신호를 부호화할 수 있다.(S670)On the other hand, in step S660, when the number of used bits is not smaller than the number of frame bits, the audio signal encoding apparatus 200 can determine whether at least one of the applied global gain and the number of used bits satisfies the repeat end condition. If at least one of the applied global gain and the number of used bits satisfies the iteration end condition, the audio signal encoding apparatus 200 may encode the quantized signal in step S620.

적용된 글로벌 게인 또는 사용 비트수가 반복 종료 조건을 만족하지 않는 경우, 오디오 신호 부호화 장치 (200) 는 글로벌 게인을 소정값만큼 증가시켜 갱신할 수 있다.(S665) If the applied global gain or the number of used bits does not satisfy the repeat termination condition, the audio signal encoding apparatus 200 can update the global gain by increasing the global gain by a predetermined value (S665)

상술한 바와 같이, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법 및 장치에 의하면, 부호화된 오디오 신호에 대하여 비트가 남는 경우 뿐만 아니라, 비트가 부족한 경우에도, 오디오 신호를 보정함으로써 부호화된 오디오 신호의 비트수를 조절할 수 있다. 따라서, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법 및 장치에 의하면, 오디오 신호가 각 프레임 별로 적합한 비트수를 사용하여 부호화됨으로써 부호화되는 오디오 신호의 음질을 높일 수 있다.As described above, according to the method and apparatus for encoding an audio signal according to an embodiment of the present invention, not only when a bit remains for an encoded audio signal but also when the bit is insufficient, Can be adjusted. Therefore, according to the method and apparatus for encoding an audio signal according to an embodiment of the present invention, audio quality of an audio signal to be encoded can be enhanced by encoding an audio signal using a suitable number of bits for each frame.

본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. One embodiment of the present invention may also be embodied in the form of a recording medium including instructions executable by a computer, such as program modules, being executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes any information delivery media, including computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, or other transport mechanism.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.It will be understood by those skilled in the art that the foregoing description of the present invention is for illustrative purposes only and that those of ordinary skill in the art can readily understand that various changes and modifications may be made without departing from the spirit or essential characteristics of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is defined by the appended claims rather than the detailed description and all changes or modifications derived from the meaning and scope of the claims and their equivalents are to be construed as being included within the scope of the present invention do.

Claims (21)

오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계;
글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계;
상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계;
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및
상기 제 2 양자화 신호를 부호화하는 단계를 포함하는 것을 특징으로 하는, 오디오 신호 부호화 방법.
Converting the audio signal into a first frequency domain signal;
Generating a first quantized signal by quantizing the first frequency domain signal by applying a global gain;
Calculating a first number of used bits used by the first quantization signal;
Generating a second quantized signal by correcting the first quantized signal if the first number of used bits is smaller than the number of frame bits previously allocated to the frame of the audio signal; And
And encoding the second quantized signal.
제 1 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 글로벌 게인을 조정하는 단계; 및
상기 조정된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method according to claim 1,
Wherein generating the second quantized signal comprises:
Adjusting the global gain; And
And generating the second quantized signal by quantizing the first frequency domain signal by applying the adjusted global gain.
제 1 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 감소시키는 단계; 및
상기 감소된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method according to claim 1,
Wherein generating the second quantized signal comprises:
Decreasing the global gain based on a difference between the first number of used bits and the number of frame bits; And
And generating the second quantized signal by quantizing the first frequency domain signal by applying the reduced global gain.
제 1 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 단계;
상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 단계;
상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 단계;
상기 제 2 사용 비트수가 상기 프레임 비트수를 초과할 때까지, 상기 글로벌 게인을 갱신하는 단계, 상기 갱신된 글로벌 게인을 적용하여 양자화하는 단계 및 상기 제 2 사용 비트수를 계산하는 단계를 반복하는 단계; 및
상기 제 2 사용 비트수가 상기 프레임 비트수를 초과하는 경우, 이전 반복에서 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method according to claim 1,
Wherein generating the second quantized signal comprises:
Updating the global gain by a predetermined value;
Quantizing the first frequency-domain signal by applying the updated global gain;
Applying the updated global gain to calculate a second number of used bits used by the quantized signal;
Repeating the steps of updating the global gain until the number of second used bits exceeds the frame bit number, quantizing applying the updated global gain, and calculating the second number of used bits ; And
And generating the second quantized signal by quantizing the first frequency domain signal by applying a global gain updated in the previous iteration if the second used bit number exceeds the frame bit number Audio signal encoding method.
제 1 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 단계;
상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 단계;
상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 단계; 및
상기 갱신된 글로벌 게인이 소정 게인 이하가 될 때까지, 상기 글로벌 게인을 갱신하는 단계, 상기 갱신된 글로벌 게인을 적용하여 양자화하는 단계 및 상기 제 2 사용 비트수를 계산하는 단계를 반복하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method according to claim 1,
Wherein generating the second quantized signal comprises:
Updating the global gain by a predetermined value;
Quantizing the first frequency-domain signal by applying the updated global gain;
Applying the updated global gain to calculate a second number of used bits used by the quantized signal; And
Repeating the steps of updating the global gain until the updated global gain is less than or equal to a predetermined gain, quantizing by applying the updated global gain, and calculating the second number of used bits The audio signal encoding method comprising:
제 1 항에 있어서,
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 증가시키는 단계; 및
상기 증가된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 더 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method according to claim 1,
Increasing the global gain based on a difference between the first number of used bits and the number of frame bits when the first number of used bits is greater than the number of frame bits previously allocated to the frame of the audio signal; And
And generating the second quantized signal by quantizing the first frequency domain signal by applying the increased global gain.
제 1 항에 있어서,
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 글로벌 게인을 소정값만큼 증가시켜 갱신하는 단계;
상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 단계;
상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 단계; 및
상기 제 2 사용 비트수가 상기 프레임 비트수보다 작거나 같아질 때까지, 상기 글로벌 게인을 갱신하는 단계, 상기 갱신된 글로벌 게인을 적용하여 양자화하는 단계 및 상기 제 2 사용 비트수를 계산하는 단계를 반복하는 단계를 더 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method according to claim 1,
Updating the global gain by a predetermined value if the first used bit number is larger than the frame bit number allocated to the frame of the audio signal in advance;
Quantizing the first frequency-domain signal by applying the updated global gain;
Applying the updated global gain to calculate a second number of used bits used by the quantized signal; And
Updating the global gain until the second number of used bits is less than or equal to the frame bit number, quantizing by applying the updated global gain, and calculating the second number of used bits Further comprising the step of decoding the audio signal.
제 1 항에 있어서,
상기 제 1 양자화 신호를 생성하는 단계는,
심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 상기 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹하는 단계; 및
상기 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 상기 제 1 양자화 신호를 생성하는 단계를 포함하고,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 제 1 양자화 신호에, 상기 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method according to claim 1,
Wherein generating the first quantized signal comprises:
Masking at least one of a plurality of bands included in the first frequency domain signal by applying a determined masking threshold based on a psychoacoustic model; And
Generating the first quantized signal by quantizing the masked first frequency domain signal,
Wherein generating the second quantized signal comprises:
And generating a second quantized signal by adding a quantized signal for at least one band among the at least one masked band to the first quantized signal.
제 8 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 마스킹 임계치에 의해 마스킹된 대역별 에너지와 상기 각 대역에 대한 마스킹 임계치를 비교하는 단계;
상기 비교 결과에 기초하여 상기 마스킹된 적어도 하나의 대역 중 적어도 하나의 대역을 선택하는 단계; 및
상기 제 1 양자화 신호에 상기 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
9. The method of claim 8,
Wherein generating the second quantized signal comprises:
Comparing the masked energy by the masking threshold and a masking threshold for each band;
Selecting at least one of the at least one masked band based on the comparison result; And
And generating the second quantization signal by adding a quantization signal for the selected at least one band to the first quantization signal.
제 8 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 제 1 사용 비트수와 상기 프레임 비트수의 차이가 소정값 이상일 경우, 상기 제 1 양자화 신호에, 상기 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
9. The method of claim 8,
Wherein generating the second quantized signal comprises:
Generating the second quantized signal by adding a quantized signal for the masked at least one band to the first quantized signal when the difference between the first used bit number and the frame bit number is equal to or greater than a predetermined value, The audio signal encoding method comprising:
오디오 신호를 제 1 주파수 영역 신호로 변환하는 주파수 변환부;
글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 양자화부, 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 비트수 계산부, 및 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 보정부를 포함하는, 비트수 조절 양자화부; 및
상기 제 2 양자화 신호를 부호화하는 부호화부를 포함하는 것을 특징으로 하는, 오디오 신호 부호화 장치.
A frequency converter for converting an audio signal into a first frequency domain signal;
A quantizer for generating a first quantized signal by quantizing the first frequency-domain signal by applying a global gain, a bit number calculator for calculating a first number of used bits used by the first quantized signal, And a correction unit that corrects the first quantized signal to generate a second quantized signal if the number of used bits is smaller than the number of frame bits allocated to the frame of the audio signal in advance. And
And an encoding unit for encoding the second quantized signal.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수가 상기 프레임 비트수보다 작은 경우, 상기 글로벌 게인을 조정하고, 상기 조정된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
And generates the second quantized signal by adjusting the global gain and quantizing the first frequency domain signal by applying the adjusted global gain when the first used bit number is smaller than the frame bit number Audio signal encoding apparatus.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수가 상기 프레임 비트수보다 작은 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여 상기 글로벌 게인을 감소시키고, 상기 감소된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
Wherein if the first used bit number is smaller than the frame bit number, the global gain is decreased based on a difference between the first used bit number and the frame bit number, and the reduced global gain is applied, And generates the second quantized signal by quantizing the signal.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수가 상기 프레임 비트수보다 작은 경우, 상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 제 2 사용 비트수가 상기 프레임 비트수를 초과할 때까지 반복하고,
상기 제 2 사용 비트수가 상기 프레임 비트수를 초과하는 경우, 이전 반복에서 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
An operation of decreasing the global gain by a predetermined value and updating the global gain when the first use bit number is smaller than the frame bit number, quantizing the first frequency domain signal by applying the updated global gain, Applying a global gain to calculate a second number of used bits used by the quantized signal until the second number of used bits exceeds the number of frame bits,
And generates the second quantized signal by quantizing the first frequency domain signal by applying a global gain updated in the previous iteration if the second used bit number exceeds the frame bit number. .
제 11 항에 있어서,
상기 보정부는,
상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 갱신된 글로벌 게인이 소정 게인 이하가 될 때까지 반복하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
An operation of reducing the global gain by a predetermined value, an operation of quantizing the first frequency-domain signal by applying the updated global gain, and an operation of quantizing the second frequency- Wherein the operation of calculating the number of used bits is repeated until the updated global gain becomes a predetermined gain or less.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 증가시키고, 상기 증가된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
Increases the global gain based on a difference between the first number of used bits and the number of frame bits when the first used bit number is larger than the frame bit number previously allocated to the frame of the audio signal, And generates the second quantized signal by quantizing the first frequency-domain signal by applying a global gain.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 글로벌 게인을 소정값만큼 증가시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 제 2 사용 비트수가 상기 프레임 비트수보다 작거나 같아질 때까지, 반복하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
And updating the global gain by a predetermined value when the first use bit number is larger than the frame bit number allocated to the frame of the audio signal in advance, And calculating the second number of used bits used by the quantized signal by applying the updated global gain until the second number of used bits becomes equal to or less than the number of frame bits, And repeating the decoding of the audio signal.
제 11 항에 있어서,
상기 양자화부는,
심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 상기 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹하고, 상기 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 상기 제 1 양자화 신호를 생성하고,
상기 보정부는,
상기 제 1 양자화 신호에 상기 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein the quantization unit comprises:
Applying a masking threshold determined based on a psychoacoustic model to mask at least one of a plurality of bands included in the first frequency domain signal and quantizing the masked first frequency domain signal, Signal,
Wherein,
And generates the second quantized signal by adding a quantization signal for at least one band out of the masked at least one band to the first quantized signal.
제 11 항에 있어서,
상기 보정부는,
상기 마스킹 임계치에 의해 마스킹된 대역별 에너지와 상기 각 대역에 대한 마스킹 임계치를 비교하고, 상기 비교 결과에 기초하여 상기 마스킹된 적어도 하나의 대역 중 적어도 하나의 대역을 선택하고, 상기 제 1 양자화 신호에 상기 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
Comparing the masked threshold energy for each band with the masking threshold for each band and selecting at least one of the masked at least one band based on the comparison result, And generates the second quantization signal by adding a quantization signal for the selected at least one band.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수와 상기 프레임 비트수의 차이가 소정값 이상일 경우, 상기 제 1 양자화 신호에 상기 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
12. The method of claim 11,
Wherein,
And adding the quantized signal for the at least one band masked to the first quantized signal to generate the second quantized signal when the difference between the first used bit number and the frame bit number is greater than or equal to a predetermined value The audio signal encoding apparatus comprising:
오디오 신호 부호화 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 있어서,
상기 방법은,
오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계;
글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계;
상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계; 및
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및
상기 제 2 양자화 신호를 부호화하는 단계를 포함하는 것을 특징으로 하는, 컴퓨터로 읽을 수 있는 기록매체.
A computer-readable recording medium storing a program for causing a computer to execute an audio signal encoding method,
The method comprises:
Converting the audio signal into a first frequency domain signal;
Generating a first quantized signal by quantizing the first frequency domain signal by applying a global gain;
Calculating a first number of used bits used by the first quantization signal; And
Generating a second quantized signal by correcting the first quantized signal if the first number of used bits is smaller than the number of frame bits previously allocated to the frame of the audio signal; And
And encoding the second quantized signal. ≪ Desc / Clms Page number 19 >
KR1020130114685A 2013-09-26 2013-09-26 Method and apparatus fo encoding audio signal KR102243217B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130114685A KR102243217B1 (en) 2013-09-26 2013-09-26 Method and apparatus fo encoding audio signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130114685A KR102243217B1 (en) 2013-09-26 2013-09-26 Method and apparatus fo encoding audio signal

Publications (2)

Publication Number Publication Date
KR20150034507A true KR20150034507A (en) 2015-04-03
KR102243217B1 KR102243217B1 (en) 2021-04-22

Family

ID=53031308

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130114685A KR102243217B1 (en) 2013-09-26 2013-09-26 Method and apparatus fo encoding audio signal

Country Status (1)

Country Link
KR (1) KR102243217B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767955A (en) * 2020-07-22 2021-05-07 腾讯科技(深圳)有限公司 Audio encoding method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040073862A (en) * 2003-02-15 2004-08-21 삼성전자주식회사 Audio data encoding apparatus and method
KR20070121568A (en) * 2006-06-21 2007-12-27 삼성전자주식회사 Method and apparatus for encoding an audio data
KR20090122142A (en) * 2008-05-23 2009-11-26 엘지전자 주식회사 A method and apparatus for processing an audio signal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040073862A (en) * 2003-02-15 2004-08-21 삼성전자주식회사 Audio data encoding apparatus and method
KR20070121568A (en) * 2006-06-21 2007-12-27 삼성전자주식회사 Method and apparatus for encoding an audio data
KR20090122142A (en) * 2008-05-23 2009-11-26 엘지전자 주식회사 A method and apparatus for processing an audio signal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767955A (en) * 2020-07-22 2021-05-07 腾讯科技(深圳)有限公司 Audio encoding method and device, storage medium and electronic equipment
CN112767955B (en) * 2020-07-22 2024-01-23 腾讯科技(深圳)有限公司 Audio encoding method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
KR102243217B1 (en) 2021-04-22

Similar Documents

Publication Publication Date Title
US11621009B2 (en) Audio processing for voice encoding and decoding using spectral shaper model
US8612219B2 (en) SBR encoder with high frequency parameter bit estimating and limiting
CN102436820B (en) High frequency band signal coding and decoding methods and devices
RU2752127C2 (en) Improved quantizer
JP5267362B2 (en) Audio encoding apparatus, audio encoding method, audio encoding computer program, and video transmission apparatus
JP6368029B2 (en) Noise signal processing method, noise signal generation method, encoder, decoder, and encoding and decoding system
JP2014016625A (en) Audio coding system, audio decoder, audio coding method, and audio decoding method
WO2009029036A1 (en) Method and device for noise filling
WO2009142466A2 (en) Method and apparatus for processing audio signals
US8838442B2 (en) Method and system for two-step spreading for tonal artifact avoidance in audio coding
JP2010537261A (en) Time masking in audio coding based on spectral dynamics of frequency subbands
WO2012005210A1 (en) Encoding method, decoding method, device, program, and recording medium
WO2010111876A1 (en) Method and device for signal denoising and system for audio frequency decoding
JP2018041091A (en) Signal processing method and device
KR102243217B1 (en) Method and apparatus fo encoding audio signal
KR102231756B1 (en) Method and apparatus for encoding/decoding audio signal
RU2662921C2 (en) Device and method for the audio signal envelope encoding, processing and decoding by the aggregate amount representation simulation using the distribution quantization and encoding
RU2660633C2 (en) Device and method for the audio signal envelope encoding, processing and decoding by the audio signal envelope division using the distribution quantization and encoding
JP2012519309A (en) Quantization for audio coding
RU2823174C2 (en) Improved quantizer
US8626501B2 (en) Encoding apparatus, encoding method, decoding apparatus, decoding method, and program
TWI587287B (en) Apparatus and method for comfort noise generation mode selection

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right