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

Method and apparatus fo encoding audio signal Download PDF

Info

Publication number
KR102243217B1
KR102243217B1 KR1020130114685A KR20130114685A KR102243217B1 KR 102243217 B1 KR102243217 B1 KR 102243217B1 KR 1020130114685 A KR1020130114685 A KR 1020130114685A KR 20130114685 A KR20130114685 A KR 20130114685A KR 102243217 B1 KR102243217 B1 KR 102243217B1
Authority
KR
South Korea
Prior art keywords
signal
bits
quantized signal
audio signal
quantized
Prior art date
Application number
KR1020130114685A
Other languages
Korean (ko)
Other versions
KR20150034507A (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 OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; 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 OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; 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, there is provided an audio signal encoding method and apparatus for improving sound quality of an encoded signal using bits remaining in a specific audio frame.
In the audio signal encoding apparatus according to an embodiment of the present invention, in performing 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, that is, when bits remain, global A corrected quantized signal is output by adjusting a gain or restoring a signal masked by a masking threshold. The audio signal encoding apparatus according to an embodiment of the present invention may improve sound quality of the encoded audio signal by encoding the corrected quantized signal.

Description

오디오 신호 부호화 방법 및 장치 {METHOD AND APPARATUS FO ENCODING AUDIO SIGNAL}Audio signal encoding method and apparatus {METHOD AND APPARATUS FO ENCODING AUDIO SIGNAL}

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

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

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

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

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

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

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법은, 오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계; 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계; 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계; 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및 상기 제 2 양자화 신호를 부호화하는 단계를 포함한다.An audio signal encoding method according to an embodiment of the present invention includes: 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 quantized signal; Generating a second quantized signal by correcting the first quantized signal when the number of first used bits is smaller than the number of pre-allocated frame bits for the frame of the audio signal; And encoding the second quantized signal.

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법에 있어서, 상기 제 2 양자화 신호를 생성하는 단계는, 상기 글로벌 게인을 조정하는 단계; 및 상기 조정된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 포함할 수 있다.In an audio signal encoding method according to an embodiment of the present invention, generating the second quantized signal includes: 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, generating the second quantized signal comprises reducing 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 an audio signal encoding method according to an embodiment of the present invention, the generating of the second quantized signal includes: reducing and updating the global gain by a predetermined value; Quantizing the first frequency domain signal by applying the updated global gain; Calculating a second number of used bits used by the quantized signal by applying the updated global gain; Repeating the steps of updating the global gain, quantizing by applying the updated global gain, and calculating the second number of used bits until the second number of used bits exceeds the number of frame bits. ; And generating the second quantized signal by quantizing the first frequency domain signal by applying a global gain updated in a previous iteration when the second number of used bits exceeds the number of frame bits.

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

본 발명의 일 실시예에 따른 오디오 신호 부호화 방법은, 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 증가시키는 단계; 및 상기 증가된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 더 포함할 수 있다.In an audio signal encoding method according to an embodiment of the present invention, when the number of first used bits is greater than the number of frame bits previously allocated for the frame of the audio signal, the difference between the number of first used bits and the number of frame bits On the basis of, 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 사용 비트수를 계산하는 단계를 반복하는 단계를 더 포함할 수 있다.An audio signal encoding method according to an embodiment of the present invention includes: when the number of first used bits is greater than the number of pre-allocated frame bits for a frame of the audio signal, increasing and updating the global gain by a predetermined value; Quantizing the first frequency domain signal by applying the updated global gain; Calculating a second number of used bits used by the quantized signal by applying the updated global gain; And updating the global gain until the second number of used bits is less than or equal to the number of frame bits, quantizing by applying the updated global gain, and calculating the second number of used bits. It may further include a step of repeating.

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

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

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

한편, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치는, 오디오 신호를 제 1 주파수 영역 신호로 변환하는 주파수 변환부; 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 양자화부, 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 비트수 계산부, 및 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 보정부를 포함하는, 비트수 조절 양자화부; 및 상기 제 2 양자화 신호를 부호화하는 부호화부를 포함한다.Meanwhile, an audio signal encoding apparatus according to an embodiment of the present invention includes: a frequency converter configured to convert an audio signal into a first frequency domain signal; A quantization unit that generates a first quantized signal by quantizing the first frequency domain signal by applying a global gain, a bit number calculation unit that calculates a first number of used bits used by the first quantized signal, and the first A bit number adjustment quantization unit including a correction unit for generating a second quantization signal by correcting the first quantized signal when the number of used bits is less than the number of frame bits pre-allocated for the frame of the audio signal; 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, the correction unit, when the number of first used bits is smaller than the number of frame bits, adjusts the global gain and applies the adjusted global gain to The second quantized signal may 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, the correction unit, when the number of first used bits is smaller than the number of frame bits, based on a difference between the number of first used bits and the number of frame bits, The second quantized signal may be generated by reducing a 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 correction unit, when the number of first used bits is smaller than the number of frame bits, decreases the global gain by a predetermined value and updates the updated global gain. An operation of quantizing the first frequency domain signal by applying a gain, and an operation of calculating a second number of used bits used by the quantized signal by applying the updated global gain, the second number of used bits in the frame Repeat until the number of bits is exceeded, and when the number of second used bits exceeds the number of frame bits, the second quantized signal is quantized by applying a global gain updated in the previous iteration to quantize the first frequency domain signal. Can be generated.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 글로벌 게인을 소정값만큼 감소시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 갱신된 글로벌 게인이 소정 게인 이하가 될 때까지 반복할 수 있다.In the audio signal encoding apparatus according to an embodiment of the present invention, the correction unit includes an operation of reducing the global gain by a predetermined value and updating it, and an operation of quantizing the first frequency domain signal by applying the updated global gain. , And calculating the number of second used bits used by the quantized signal by applying the updated global gain may be repeated until the updated global gain becomes 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, the correction unit, when the number of first used bits is greater than the number of pre-allocated frame bits for the frame of the audio signal, the first number of used bits and the number of The second quantized signal may be generated by increasing the global gain based on the difference in the number of frame bits, and quantizing the first frequency domain signal by applying the increased global gain.

본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 있어서, 상기 보정부는, 상기 제 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 increases the global gain by a predetermined value when the number of first used bits is greater than the number of pre-allocated frame bits for the frame of the audio signal. An operation of performing an update to perform an update, 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. , It may be repeated until the second number of 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 is determined based on the psychoacoustic model. By applying a masking threshold, masking at least one of a plurality of bands included in the first frequency domain signal, quantizing the masked first frequency domain signal to generate the first quantized signal, and the correction The unit may generate the second quantized signal by adding a quantized signal for at least one of the masked at least one band to the first quantized signal.

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

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

한편, 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 있어서, 상기 방법은, 오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계; 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계; 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계; 및 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및 상기 제 2 양자화 신호를 부호화하는 단계를 포함한다.Meanwhile, in a computer-readable recording medium recording a program for executing an audio signal encoding method in a computer according to an embodiment of the present invention, the method includes: 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 quantized signal; And generating a second quantized signal by correcting the first quantized signal when the number of first used bits is smaller than the number of pre-allocated frame bits for 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 illustrating an audio signal encoding apparatus to which the present invention can be applied.
2 is a block diagram illustrating an audio signal encoding apparatus according to an embodiment of the present invention.
3 is a flowchart illustrating a method of encoding an audio signal according to an embodiment of the present invention.
4 is a flowchart illustrating a step of correcting a quantized signal according to the first embodiment of the present invention.
5 is a flowchart illustrating a step of correcting a quantized signal according to a second embodiment of the present invention.
6 is a flowchart illustrating a step of correcting a quantized signal according to a third embodiment of the present invention.
7 is a flowchart illustrating a step of correcting a quantized signal according to a fourth embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those of ordinary skill in the art can easily implement the present invention. However, the present invention may be implemented in various different forms and is not limited to the embodiments described herein. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and similar reference numerals are attached to similar parts throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is said to be "connected" with another part, this includes not only "directly connected" but also "electrically connected" with another element interposed therebetween. . In addition, when a part "includes" a certain component, it means that other components may be further included rather than excluding other components unless specifically stated to the contrary.

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

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

한편, 프레임이란, 오디오 신호를 부호화 또는 복호화하기 위한 데이터 단위를 일컫는 것으로서, 특정 샘플 수나 특정 시간에 한정되지 아니한다.Meanwhile, 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 is applied.

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

도 1 은 본 발명이 적용될 수 있는 오디오 신호 부호화 장치를 설명하기 위한 블록도이다.1 is a block diagram illustrating 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 converter 210, a quantization unit 120, an encoding unit 130, and a psychoacoustic model unit 140.

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

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

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

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

양자화부 (120) 는, 심리 음향 모델 (140) 에서 계산된 마스킹 임계치를 적용하여, 주파수 변환부 (110) 에서 변환된 주파수 영역 신호를 양자화한다. 양자화부 (120) 는 양자화된 신호에 대해 비트 할당을 수행한다.The quantization unit 120 quantizes the frequency domain signal transformed by the frequency converter 110 by applying the masking threshold calculated by the psychoacoustic model 140. The quantization unit 120 allocates bits for the quantized signal.

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

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

도 1 에 도시된 오디오 신호 부호화 장치가 비트 할당을 수행함에 있어서, 양자화부 (120) 는, 특정 오디오 프레임에 대해 사용된 총 비트수가, 한 프레임당 사용 가능한 최대 비트수를 초과하지 않도록 한다. 한 프레임당 사용 가능한 최대 비트수는, 출력 비트 레이트에 의해 결정되고, 모든 프레임에 대해 적용된다.When the audio signal encoding apparatus shown in FIG. 1 performs bit allocation, the quantization unit 120 prevents the total number of bits used for a specific audio frame from exceeding the maximum number of bits that can be used 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, when the total number of bits used for a specific audio frame is smaller than the maximum number of bits available per frame, there are bits remaining in the output bitstream. Since information on the audio signal is not included in the remaining bits, when more information is encoded using the remaining bits, sound quality of the encoded audio signal can be improved.

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

이하에서는, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치에 대해서 도 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 는 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치를 설명하기 위한 블록도이다.2 is a block diagram illustrating 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 embodiment of the present invention includes a frequency converter 210, a quantization unit 220 for adjusting the number of bits, 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 conversion unit 210, the encoding unit 230, and the psychoacoustic model unit 240 of FIG. 2 are the frequency converter 110, the encoding unit 130, and the psychoacoustic model unit 140 of FIG. 1 Since it corresponds to, the overlapping 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 transformation may use FFT (Fast Fourier Transform), MDCT (Modified Discrete Transform), wavelet packet transform (WPT), Frequency varying Modulated Lapped Transform (FV-MLT), and similar methods, but are not limited thereto. Does not.

비트수 조절 양자화부 (220) 는, 주파수 변환부 (210) 에서 변환된 주파수 영역 신호를 양자화하고, 양자화된 신호를 보정하여 출력한다. 비트수 조절 양자화부 (220) 는, 양자화부 (222), 비트수 계산부 (224), 및 보정부 (226) 를 포함한다.The number of bits control quantization unit 220 quantizes the frequency domain signal converted by the frequency conversion unit 210, corrects the quantized signal, and outputs the quantized signal. The number of bits 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 applying a global gain to quantize the first frequency domain signal. The global gain refers to a quantization scale factor value applied to the 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 input or may be a predetermined value according to an application. The application may mean an application program used to encode an audio signal. The application may determine the initial value of the global gain with an experimentally optimized value in consideration of audio quality and the like.

또한, 양자화부 (222) 는, 심리 음향 모델부 (240) 에서 결정된 마스킹 임계치를 적용하여, 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹할 수 있다. 양자화부 (222) 는, 마스킹 임계치에 의해 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성할 수 있다.Also, the quantization unit 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 may generate a first quantized signal by quantizing the first frequency domain signal masked by the masking threshold.

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

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

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

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

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

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

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

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

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

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

도 3 은 본 발명의 일 실시예에 따른 오디오 신호 부호화 방법을 설명하기 위한 흐름도이다.3 is a flowchart illustrating a method of encoding an audio signal 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 by the audio signal encoding apparatus 200 illustrated in FIG. 2. Accordingly, it can be seen that the contents described above with respect to the audio signal encoding apparatus 200 illustrated in FIG. 2 are also 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 the audio signal into a first frequency domain signal. The frequency transformation may use FFT (Fast Fourier Transform), MDCT (Modified Discrete Transform), wavelet packet transform (WPT), Frequency varying Modulated Lapped Transform (FV-MLT), and similar methods, but are not limited thereto. Does 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 all frequency bands of the first frequency domain signal. In addition, the audio signal encoding apparatus 200 may allocate and quantize necessary bits by adjusting a quantization scale factor for each band for each frequency band based on a global gain.

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

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

제 1 사용 비트수가 프레임 비트수보다 작지 않은 경우, 오디오 신호 부호화 장치 (200) 는, 단계 S320 에서 양자화된 제 1 양자화 신호를 부호화할 수 있다. 반면에, 제 1 사용 비트수가 프레임 비트수보다 작은 경우, 오디오 신호 부호화 장치 (200) 는 단계 S350 을 수행한다.When the number of first used bits is not smaller than the number of frame bits, the audio signal encoding apparatus 200 may encode the first quantized signal quantized in step S320. On the other hand, when the number of first used bits is smaller than the number of frame bits, 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 a second quantized signal by correcting the first quantized signal when the number of first used bits is less than the number of frame bits. The audio signal encoding apparatus 200 may output a corrected quantized signal by adjusting a global gain or restoring a signal masked by a masking threshold when the first number of used bits is smaller than the number of frame bits, that is, bits remain. I can.

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

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

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

글로벌 게인이 감소되면, 전체 주파수 대역에 대한 양자화 에러 (quantization error) 가 감소된다. 즉, 감소된 글로벌 게인이 적용된 제 2 양자화 신호는, 기존의 글로벌 게인이 적용된 제 1 양자화 신호보다 많은 비트수를 사용함으로써, 부호화되는 오디오 신호의 음질이 높아진다. 본 발명의 제 1 실시예와 관련하여서는 후에 도 4 를 참조하여 보다 구체적으로 살펴본다.When the global gain is reduced, the quantization error for the entire frequency band is reduced. That is, since 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, the sound quality of the encoded audio signal is improved. In connection with the first embodiment of the present invention, it will be described in more detail with reference to FIG. 4 later.

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

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

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

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

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

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

예를 들어, 제1 양자화 신호는, 소정 대역에서 마스킹 임계치 이하의 신호 값을 제거한 신호이며, 이때 제거된 신호는 제3 양자화 신호라 하자. 상기 제 2 양자화 신호는 제1 양자화 신호에 상기 제3 양자화 신호 중 적어도 하나의 대역에 대한 신호를 추가한 신호가 될 수 있다. For example, the first quantized signal is a signal obtained by removing a signal value less than or equal to the masking threshold in a predetermined band, and the removed signal is assumed to be a third quantized signal. The second quantized signal may be a signal obtained by adding a signal for at least one band among the third quantized signals to the first quantized 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 may output a second quantized signal that is not masked by the masking threshold, instead of the first quantized signal masked by the masking threshold. .

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

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

한편, 도 3 에 도시되지는 않았으나, 본 발명의 일 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 단계 S340 에서 제 1 사용 비트수가 프레임 비트수보다 크다고 판단된 경우, 제 1 사용 비트수와 프레임 비트수의 차이에 기초하여, 글로벌 게인을 증가시키는 단계를 더 포함할 수 있다. 오디오 신호 부호화 장치 (200) 는 증가된 글로벌 게인을 적용하여 제 1 주파수 영역 신호를 양자화함으로써 제 2 양자화 신호를 생성할 수 있다.Meanwhile, although not shown in FIG. 3, when it is determined in step S340 that the number of first used bits is greater than the number of frame bits, the audio signal encoding apparatus 200 according to an embodiment of the present invention It may further include increasing the global gain based on the difference in the number of frame bits. The audio signal encoding apparatus 200 may generate a 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 사용 비트수를 계산하는 단계를 반복할 수 있다.In addition, when it is determined in step S340 that the number of first used bits is greater than the number of frame bits, the audio signal encoding apparatus 200 according to an exemplary embodiment of the present invention may increase the global gain by a predetermined value and update it. The audio signal encoding apparatus 200 may quantize the first frequency domain signal by applying the updated global gain. The audio signal encoding apparatus 200 may calculate the number of second used bits used by the quantized signal by applying the updated global gain. The audio signal encoding apparatus 200 includes: updating a global gain by a predetermined value until the number of second used bits is less than or equal to the number of frame bits, quantizing by applying the updated global gain, and the second The step of calculating the number of used bits can be repeated.

도 4 는 본 발명의 제 1 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.4 is a flowchart illustrating 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 may generate a 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 reduces and updates the global gain by a predetermined value. In this case, the predetermined value by which the global gain is reduced is a predetermined value and may be set by a user's input, may be predetermined according to an application, or may be a predetermined value according to the number of frame bits. For example, the audio signal encoding apparatus 200 may update the global gain by decreasing it by one. Alternatively, the predetermined value by which the global gain is reduced may be a value determined based on a difference between the first number of used bits and the number of frame bits. In step S420, the audio signal encoding apparatus 200 quantizes the first frequency domain signal by applying the updated global gain. In step S430, the audio signal encoding apparatus 200 calculates the number of second used bits 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 number of second used bits is greater than the number of frame bits. That is, the audio signal encoding apparatus 200 quantizes the audio signal by applying the updated global gain to determine whether or not a bit to be allocated to the audio signal is insufficient.

단계 S450 에서 오디오 신호 부호화 장치 (200) 는, 제 2 사용 비트수가 프레임 비트수 보다 큰 경우, 즉, 할당될 비트가 부족해진 경우, 이전 반복에서 갱신된 글로벌 게인을 적용하여 양자화된 제 1 주파수 영역 신호를 제 2 양자화 신호로서 출력할 수 있다.In step S450, the audio signal encoding apparatus 200, when the second number of used bits is greater than the number of frame bits, that is, when the number of bits to be allocated becomes insufficient, the quantized first frequency domain by applying the global gain updated in the previous iteration. The signal can be output 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 the number of second used bits satisfies the repetition termination condition. When the updated global gain or the second number of used bits does not satisfy the repetition termination condition, the audio signal encoding apparatus 200 can output a second quantized signal having a suitable global gain and a suitable second number of used bits. Until, it is possible to repeat the preceding steps S410 to S450.

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

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

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

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

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

본 발명의 제 1 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 도 4 에 도시된 바와 같이, 글로벌 게인을 소정값만큼 감소시켜 갱신하는 동작을 반복함으로써 글로벌 게인을 조절하는 방법을 이용할 수 있다. 한편, 오디오 신호 부호화 장치 (200) 는, 남는 비트수에 기초하여 글로벌 게인을 감소시키는 방법을 이용함으로써 글로벌 게인 조절 속도를 더욱 향상시킬 수 있다.According to the first embodiment of the present invention, the audio signal encoding apparatus 200 may use a method of adjusting the global gain by repeating an operation of decreasing and updating the global gain by a predetermined value, as shown in FIG. 4. have. Meanwhile, the audio signal encoding apparatus 200 may 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 number of remaining bits, that is, the difference between the number of first used bits and the number of frame bits, the global gain to be adjusted may be calculated through the following method.

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

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

이하, 글로벌 게인이 1 만큼 증가함에 따라 주파수 데이터 1 개당 -3/16 bits 가 줄어드는 것으로 글로벌 게인의 변화에 따른 엔트로피 변화율이 추정된 경우를 예로 들어 설명한다. 그러나 본 발명은 이에 한정되지 않는다.Hereinafter, as the global gain increases by 1, -3/16 bits per frequency data decreases, and the case where the entropy change rate according to the change of the global gain is estimated 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 it is estimated that the rate of change of entropy according to the change of the global gain decreases as the global gain increases by 1, 3/16 bits decreases, and if the frame size is 128 bits, 3/16 * 128 = 24 bits decreases as the global gain decreases by 1. It can be seen that it is needed additionally.

예를 들어, 프레임 비트수가 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, it can be seen that 20 bits remain. In this case, the audio signal encoding apparatus 200 may reduce the global gain by 1 by looking at the difference between the first number of used bits and the number of frame bits as approximately 24 bits.

또 다른 예로서, 프레임 비트수가 600 인 경우, 제 1 사용 비트수가 550 이라면, 제 1 사용 비트수와 프레임 비트수 간의 차이는 50 이다. 이 경우, 오디오 신호 부호화 장치 (200) 는 제 1 사용 비트수와 프레임 비트수 간의 차이를 대략 48 비트로 보고 글로벌 게인을 2 만큼 감소시킬 수 있다.As another example, when the number of frame bits is 600, if 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 may reduce the global gain by 2 by looking at the difference between the first number of used bits and the number of frame bits 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 may reduce the global gain according to the difference between the first number of used bits and the number of frame bits. However, how much the global gain is to be reduced according to the difference between the number of first used bits and the number of frame bits is not limited to the above calculation formula.

도 5 는 본 발명의 제 2 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다. 5 is a flowchart illustrating 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 may generate a corrected quantized signal by restoring a signal masked by a masking threshold. According to the second embodiment of the present invention, when the number of bits used in a specific frame is less than the maximum number of bits that can be used for one frame, the number of bits can be adjusted by using an unmasked original frequency domain signal. .

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

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

또 다른 예로서, 오디오 신호 부호화 장치 (200) 는, 제 1 사용 비트수와 프레임 비트수의 차이가 소정 비트수 이상일 경우, 마스킹 임계치에 의해 마스킹된 모든 대역을 선택할 수 있다.As another example, the audio signal encoding apparatus 200 may 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 may generate a second quantized signal by adding a quantized signal for at least one band selected in step S510 to the first quantized signal.

본 발명의 제 2 실시예에 따라 출력되는 제 2 양자화 신호는, 마스킹 임계치에 의해 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 더 포함함으로써, 제 1 양자화 신호보다 많은 비트수를 사용하여 부호화된다. 따라서, 본 발명의 제 2 실시예에 따른 오디오 신호 부호화 장치 (200) 는, 남는 비트를 이용하도록 양자화 신호를 보정함으로써 오디오 신호의 음질을 높일 수 있다. The second quantized signal output according to the second embodiment of the present invention is encoded using a larger number of bits than the first quantized signal by further including a quantized signal for at least one band masked by a masking threshold. Accordingly, 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 quantized 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, an audio signal to be encoded by correcting a quantized signal using the remaining bits included in each frame and encoding the corrected quantized signal Sound quality can be improved.

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

한편, 본 발명의 다른 일 실시예에 따르면, 오디오 신호 부호화 장치 (200) 는, 부호화된 오디오 신호에 대하여 비트가 남는 경우 뿐만 아니라, 비트가 부족한 경우에도, 오디오 신호를 보정함으로써 부호화된 오디오 신호의 비트수를 조절할 수 있다. 따라서, 오디오 신호 부호화 장치 (200) 는, 비트 할당을 수행함에 있어서, 특정 오디오 프레임에 대해 사용된 총 비트수가 한 프레임당 사용 가능한 최대 비트수를 초과하지 않도록 할 수 있다.On the other hand, according to another embodiment of the present invention, the audio signal encoding apparatus 200 corrects the audio signal when bits remain in the encoded audio signal as well as when the bits are insufficient. You can adjust the number of beats. Accordingly, in performing bit allocation, the audio signal encoding apparatus 200 may prevent the total number of bits used for a specific audio frame from exceeding the maximum number of bits available per frame.

도 6 은 본 발명의 제 3 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.6 is a flowchart illustrating a step of correcting a quantized signal according to a 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 by the audio signal encoding apparatus 200 illustrated in FIG. 2. Accordingly, it can be seen that the contents described above with respect to the audio signal encoding apparatus 200 illustrated in FIG. 2 are also applied to the audio signal encoding method of FIG. 6 even if omitted below.

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

단계 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 the audio signal into a frequency domain signal. In step S620, the audio signal encoding apparatus 200 quantizes the frequency domain signal by applying a 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 pre-allocated frame bits 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 repetition end condition.

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

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

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

단계 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 repetition termination condition.

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

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

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

도 7 은 본 발명의 제 4 실시예에 따라 양자화된 신호를 보정하는 단계를 설명하기 위한 흐름도이다.7 is a flowchart illustrating a step of correcting a quantized signal according to a 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 the audio signal into a frequency domain signal.

단계 S710 에서, 오디오 신호 부호화 장치 (200) 는, 심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹할 수 있다.In operation 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 may calculate the number of used bits used by the quantized signal. In step S640, the audio signal encoding apparatus 200 may determine whether the number of used bits is smaller than the number of frame bits previously allocated for the frame of the audio signal.

단계 S720 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 프레임 비트수보다 작은 경우, 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는지 여부를 판단할 수 있다.In operation S720, when the number of used bits is less 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 repetition end condition.

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

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

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

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

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

단계 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 may generate a corrected quantized signal by restoring a frequency domain signal corresponding to a selected band from among the frequency domain signals masked in step S710.

한편, 단계 S660 에서 오디오 신호 부호화 장치 (200) 는, 사용 비트수가 프레임 비트수보다 작지 않은 경우, 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는지 여부를 판단할 수 있다. 적용된 글로벌 게인 및 사용 비트수 중 적어도 하나가 반복 종료 조건을 만족하는 경우, 오디오 신호 부호화 장치 (200) 는 단계 S620 에서 양자화된 신호를 부호화할 수 있다.(S670)Meanwhile, in step S660, when the number of used bits is not 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 repetition termination condition. When at least one of the applied global gain and the number of bits used satisfies the repetition termination condition, the audio signal encoding apparatus 200 may encode the quantized signal in step S620. (S670)

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

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

본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. An embodiment of the present invention may also be implemented in the form of a recording medium including instructions executable by a computer, such as a program module 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. Further, 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 computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, or other transmission mechanism, and includes any information delivery media.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The above description of the present invention is for illustrative purposes only, and those of ordinary skill in the art to which the present invention pertains will be able to understand that other specific forms can be easily modified without changing the technical spirit or essential features of the present invention. will be. Therefore, it should be understood that the embodiments described above are illustrative in all respects and are not limiting. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as being distributed may also be implemented in a combined form.

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

Claims (21)

오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계;
글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계;
상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계;
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및
상기 제 2 양자화 신호를 부호화하는 단계를 포함하고,
상기 제 1 양자화 신호를 생성하는 단계는,
심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 상기 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹하는 단계; 및
상기 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 상기 제 1 양자화 신호를 생성하는 단계를 포함하고,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 제 1 양자화 신호에, 상기 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 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 quantized signal;
Generating a second quantized signal by correcting the first quantized signal when the number of first used bits is less than the number of pre-allocated frame bits for the frame of the audio signal; And
Encoding the second quantized signal,
Generating the first quantized signal,
Masking at least one of the plurality of bands included in the first frequency domain signal by applying a masking threshold determined based on the psychoacoustic model; And
Generating the first quantized signal by quantizing the masked first frequency domain signal,
Generating the second quantized signal,
And generating the second quantized signal by adding a quantized signal for at least one of the masked at least one band to the first quantized signal.
삭제delete 삭제delete 삭제delete 삭제delete 제 1 항에 있어서,
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 증가시키는 단계; 및
상기 증가된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 단계를 더 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method of 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 number of first used bits is greater than the number of frame bits previously allocated for a 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 of claim 1,
Updating the global gain by increasing the global gain by a predetermined value when the number of first used bits is greater than the number of frame bits previously allocated for the frame of the audio signal;
Quantizing the first frequency domain signal by applying the updated global gain;
Calculating a second number of used bits used by the quantized signal by applying the updated global gain; And
Repeating the steps of updating the global gain, quantizing by applying the updated global gain, and calculating the second number of used bits until the second number of used bits becomes less than or equal to the number of frame bits. An audio signal encoding method further comprising the step of performing.
삭제delete 제 1 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 마스킹 임계치에 의해 마스킹된 대역별 에너지와 상기 각 대역에 대한 마스킹 임계치를 비교하는 단계;
상기 비교 결과에 기초하여 상기 마스킹된 적어도 하나의 대역 중 적어도 하나의 대역을 선택하는 단계; 및
상기 제 1 양자화 신호에 상기 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method of claim 1,
Generating the second quantized signal,
Comparing energy for each band masked by the masking threshold and a masking threshold for each band;
Selecting at least one of the masked at least one band based on the comparison result; And
And generating the second quantized signal by adding a quantized signal for the selected at least one band to the first quantized signal.
제 1 항에 있어서,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 제 1 사용 비트수와 상기 프레임 비트수의 차이가 소정값 이상일 경우, 상기 제 1 양자화 신호에, 상기 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는 오디오 신호 부호화 방법.
The method of claim 1,
Generating the second quantized signal,
When the difference between the first number of used bits and the number of frame bits is greater than or equal to a predetermined value, generating the second quantized signal by adding a quantized signal for the masked at least one band to the first quantized signal. Audio signal encoding method comprising a.
오디오 신호를 제 1 주파수 영역 신호로 변환하는 주파수 변환부;
글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 양자화부, 상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 비트수 계산부, 및 상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 보정부를 포함하는, 비트수 조절 양자화부; 및
상기 제 2 양자화 신호를 부호화하는 부호화부를 포함하고,
상기 양자화부는,
심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 상기 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹하고, 상기 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 상기 제 1 양자화 신호를 생성하고,
상기 보정부는,
상기 제 1 양자화 신호에 상기 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는, 오디오 신호 부호화 장치.
A frequency converter converting the audio signal into a first frequency domain signal;
A quantization unit that generates a first quantized signal by quantizing the first frequency domain signal by applying a global gain, a bit number calculation unit that calculates a first number of used bits used by the first quantized signal, and the first A bit number adjustment quantization unit including a correction unit for generating a second quantization signal by correcting the first quantized signal when the number of used bits is less than the number of frame bits pre-allocated for the frame of the audio signal; And
Including an encoding unit for encoding the second quantized signal,
The quantization unit,
The first quantization is performed by applying a masking threshold determined based on the psychoacoustic model, masking at least one of a plurality of bands included in the first frequency domain signal, and quantizing the masked first frequency domain signal. Generate a signal,
The correction unit,
And generating the second quantized signal by adding a quantized signal for at least one of the masked at least one band to the first quantized signal.
삭제delete 삭제delete 삭제delete 삭제delete 제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 제 1 사용 비트수와 상기 프레임 비트수의 차이에 기초하여, 상기 글로벌 게인을 증가시키고, 상기 증가된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
The method of claim 11,
The correction unit,
When the number of first used bits is larger than the number of frame bits previously allocated for the frame of the audio signal, based on the difference between the number of first used bits and the number of frame bits, the global gain is increased, and the increased And generating the second quantized signal by quantizing the first frequency domain signal by applying a global gain.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 큰 경우, 상기 글로벌 게인을 소정값만큼 증가시켜 갱신하는 동작, 상기 갱신된 글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화하는 동작, 및 상기 갱신된 글로벌 게인을 적용하여 양자화된 신호에 의해 사용된 제 2 사용 비트수를 계산하는 동작을, 상기 제 2 사용 비트수가 상기 프레임 비트수보다 작거나 같아질 때까지, 반복하는 것을 특징으로 하는 오디오 신호 부호화 장치.
The method of claim 11,
The correction unit,
When the number of first used bits is greater than the number of pre-allocated frame bits for the frame of the audio signal, an operation of increasing and updating the global gain by a predetermined value, and the first frequency domain signal by applying the updated global gain. The operation of quantizing and calculating the number of second used bits used by the quantized signal by applying the updated global gain, until the number of second used bits becomes less than or equal to the number of frame bits, An audio signal encoding apparatus, characterized in that it repeats.
삭제delete 제 11 항에 있어서,
상기 보정부는,
상기 마스킹 임계치에 의해 마스킹된 대역별 에너지와 상기 각 대역에 대한 마스킹 임계치를 비교하고, 상기 비교 결과에 기초하여 상기 마스킹된 적어도 하나의 대역 중 적어도 하나의 대역을 선택하고, 상기 제 1 양자화 신호에 상기 선택된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
The method of claim 11,
The correction unit,
Compare the energy for each band masked by the masking threshold and a masking threshold for each band, select at least one band from among the masked at least one band based on the comparison result, and the first quantized signal And generating the second quantized signal by adding a quantized signal for the at least one selected band.
제 11 항에 있어서,
상기 보정부는,
상기 제 1 사용 비트수와 상기 프레임 비트수의 차이가 소정값 이상일 경우, 상기 제 1 양자화 신호에 상기 마스킹된 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 것을 특징으로 하는 오디오 신호 부호화 장치.
The method of claim 11,
The correction unit,
When the difference between the first number of used bits and the number of frame bits is greater than or equal to a predetermined value, the second quantized signal is generated by adding a quantized signal for the masked at least one band to the first quantized signal. Audio signal encoding device.
오디오 신호 부호화 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 있어서,
상기 방법은,
오디오 신호를 제 1 주파수 영역 신호로 변환하는 단계;
글로벌 게인을 적용하여 상기 제 1 주파수 영역 신호를 양자화함으로써 제 1 양자화 신호를 생성하는 단계;
상기 제 1 양자화 신호에 의해 사용된 제 1 사용 비트수를 계산하는 단계; 및
상기 제 1 사용 비트수가 상기 오디오 신호의 프레임에 대해 미리 할당된 프레임 비트수보다 작은 경우, 상기 제 1 양자화 신호를 보정하여 제 2 양자화 신호를 생성하는 단계; 및
상기 제 2 양자화 신호를 부호화하는 단계를 포함하고,
상기 제 1 양자화 신호를 생성하는 단계는,
심리 음향 모델에 기초하여 결정된 마스킹 임계치를 적용하여, 상기 제 1 주파수 영역 신호에 포함되는 복수의 대역들 중에서 적어도 하나의 대역을 마스킹하는 단계; 및
상기 마스킹된 제 1 주파수 영역 신호를 양자화함으로써 상기 제 1 양자화 신호를 생성하는 단계를 포함하고,
상기 제 2 양자화 신호를 생성하는 단계는,
상기 제 1 양자화 신호에, 상기 마스킹된 적어도 하나의 대역 중에서 적어도 하나의 대역에 대한 양자화 신호를 추가하여 상기 제 2 양자화 신호를 생성하는 단계를 포함하는 것을 특징으로 하는, 컴퓨터로 읽을 수 있는 기록매체.
In a computer-readable recording medium recording a program for executing an audio signal encoding method on a computer,
The above method,
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 quantized signal; And
Generating a second quantized signal by correcting the first quantized signal when the number of first used bits is less than the number of pre-allocated frame bits for the frame of the audio signal; And
Encoding the second quantized signal,
Generating the first quantized signal,
Masking at least one of the plurality of bands included in the first frequency domain signal by applying a masking threshold determined based on the psychoacoustic model; And
Generating the first quantized signal by quantizing the masked first frequency domain signal,
Generating the second quantized signal,
And generating the second quantized signal by adding a quantized signal for at least one of the masked at least one band to the first quantized signal. .
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 KR20150034507A (en) 2015-04-03
KR102243217B1 true 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)

Families Citing this family (1)

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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100547113B1 (en) * 2003-02-15 2006-01-26 삼성전자주식회사 Audio data encoding apparatus and method
KR101393299B1 (en) * 2006-06-21 2014-05-09 삼성전자주식회사 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

Also Published As

Publication number Publication date
KR20150034507A (en) 2015-04-03

Similar Documents

Publication Publication Date Title
JP5267362B2 (en) Audio encoding apparatus, audio encoding method, audio encoding computer program, and video transmission apparatus
KR101162275B1 (en) A method and an apparatus for processing an audio signal
JP6452759B2 (en) Advanced quantizer
KR101859246B1 (en) Device and method for execution of huffman coding
JP5434592B2 (en) Audio encoding method, audio decoding method, audio encoding device, audio decoding device, program, and audio encoding / decoding system
KR102132798B1 (en) Noise signal processing and noise signal generation method, encoder, decoder and encoding and decoding system
EP3525206B1 (en) Encoding method and apparatus
JP2010538317A (en) Noise replenishment method and apparatus
JP5773124B2 (en) Signal analysis control and signal control system, apparatus, method and program
JP5633431B2 (en) Audio encoding apparatus, audio encoding method, and audio encoding computer program
US20120232909A1 (en) Method and system for two-step spreading for tonal artifact avoidance in audio coding
WO2010111876A1 (en) Method and device for signal denoising and system for audio frequency decoding
JP5609591B2 (en) Audio encoding apparatus, audio encoding method, and audio encoding computer program
KR20160120713A (en) Decoding device, encoding device, decoding method, encoding method, terminal device, and base station device
US20050075871A1 (en) Rate-distortion control scheme in audio encoding
JP2006018023A (en) Audio signal coding device, and coding program
JP2008261999A (en) Audio decoding device
KR102243217B1 (en) Method and apparatus fo encoding audio signal
JP5379871B2 (en) Quantization for audio coding
KR102231756B1 (en) Method and apparatus for encoding/decoding audio signal
JP6492915B2 (en) Encoding apparatus, encoding method, and program
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
KR102353050B1 (en) Signal reconstruction method and device in stereo signal encoding
US8626501B2 (en) Encoding apparatus, encoding method, decoding apparatus, decoding method, and program
KR20080008897A (en) Method for audio signal coding

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