JP2017021257A - Encoder, encoding method, and program - Google Patents

Encoder, encoding method, and program Download PDF

Info

Publication number
JP2017021257A
JP2017021257A JP2015140119A JP2015140119A JP2017021257A JP 2017021257 A JP2017021257 A JP 2017021257A JP 2015140119 A JP2015140119 A JP 2015140119A JP 2015140119 A JP2015140119 A JP 2015140119A JP 2017021257 A JP2017021257 A JP 2017021257A
Authority
JP
Japan
Prior art keywords
masking threshold
quantization
unit
correction
missing
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2015140119A
Other languages
Japanese (ja)
Other versions
JP6586804B2 (en
Inventor
舞子 平原
Maiko Hirahara
舞子 平原
周作 伊藤
Shusaku Ito
周作 伊藤
土永 義照
Yoshiteru Tsuchinaga
義照 土永
美由紀 白川
Miyuki Shirakawa
美由紀 白川
洋平 岸
Yohei Kishi
洋平 岸
猛 大谷
Takeshi Otani
猛 大谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2015140119A priority Critical patent/JP6586804B2/en
Publication of JP2017021257A publication Critical patent/JP2017021257A/en
Application granted granted Critical
Publication of JP6586804B2 publication Critical patent/JP6586804B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an encoder, an encoding method, and a program that keep down deterioration in audio quality when an audio signal is encoded by using a masking threshold value based on a hearing characteristic.SOLUTION: An encoder converts an audio signal into a frequency spectrum for each frame and quantizes and encodes the frequency spectrum. The encoder comprises: a threshold value generation unit for generating an initial masking threshold value when the frequency spectrum is quantized; a threshold value correction unit for correcting the initial masking threshold value on the basis of the amount of bits given to the quantization of the frequency spectrum and a condition whether a missing band due to quantization is permitted or not; and a threshold value determination unit for determining which is used for quantization, a first masking threshold value corrected according to a condition that a missing band due to quantization is permitted on the basis of the degree of variation of the frequency spectrum in a plurality of consecutive frames or a second masking threshold value corrected according to a condition that a missing band due to quantization is not permitted.SELECTED DRAWING: Figure 1

Description

本発明は、符号化装置、符号化方法、及びプログラムに関する。   The present invention relates to an encoding device, an encoding method, and a program.

オーディオ信号や音声信号(以下、まとめて「オーディオ信号」という)の符号化方式には、Advanced Audio Cording(AAC)方式等、人間の聴覚特性を利用して情報量を低減する方式がある。この種の符号化方式では、オーディオ信号を少ないビット数で量子化した場合に増える量子化誤差を所定のマスキング閾値以下に抑えることで、知覚できる雑音を増やすことなく符号化に必要なビット数(すなわち情報量)を低減する。   As a coding method of an audio signal or a sound signal (hereinafter collectively referred to as “audio signal”), there is a method of reducing the amount of information using human auditory characteristics such as an Advanced Audio Cording (AAC) method. In this type of encoding method, the number of bits required for encoding without increasing perceivable noise by suppressing the quantization error that increases when an audio signal is quantized with a small number of bits to a predetermined masking threshold or less (no increase in perceivable noise) That is, the amount of information) is reduced.

マスキング閾値の理想的な値は、人間が知覚することのできない量子化誤差量の上限値である。そのため、マスキング閾値は、聴覚心理モデルに基づいて算出している。以下、聴覚心理モデルに基づいて算出した理想的なマスキング閾値を初期マスキング閾値という。   The ideal value of the masking threshold is the upper limit value of the quantization error amount that cannot be perceived by humans. Therefore, the masking threshold is calculated based on the psychoacoustic model. Hereinafter, an ideal masking threshold calculated based on the psychoacoustic model is referred to as an initial masking threshold.

ところが、64kbps以下等の低ビットレート条件での符号化においては、使用可能なビット数が少ないため、量子化誤差を初期マスキング閾値以下に抑えられない場合が多い。量子化誤差を初期マスキング閾値以下に抑えられない場合、ビットレート条件に基づいて初期マスキング閾値を補正する(例えば、非特許文献1を参照)。   However, in coding under a low bit rate condition such as 64 kbps or less, the number of usable bits is small, and the quantization error cannot often be suppressed below the initial masking threshold. If the quantization error cannot be suppressed below the initial masking threshold, the initial masking threshold is corrected based on the bit rate condition (see, for example, Non-Patent Document 1).

また、低ビットレート条件での符号化において限られた量のビットを効率よく利用する方法として、周波数スペクトルの各帯域に優先順位をつけ量子化(符号化)に使用するビット量を帯域間で調整する方法が知られている(例えば、特許文献1を参照)。   In addition, as a method of efficiently using a limited amount of bits in encoding under a low bit rate condition, priorities are assigned to each band of the frequency spectrum, and the bit amount used for quantization (encoding) is changed between the bands. A method of adjusting is known (see, for example, Patent Document 1).

更に、低ビットレート条件での符号化における音質劣化を防止する方法として、隣接する複数個のスケールファクタから求めたスケールファクタ代表値に基づいてビット量の割り当てを決定し、量子化する方法が知られている(例えば、特許文献2を参照)。   Furthermore, as a method for preventing deterioration in sound quality in encoding under a low bit rate condition, a method is known in which bit amount allocation is determined based on a scale factor representative value obtained from a plurality of adjacent scale factors, and quantization is performed. (For example, see Patent Document 2).

特開平6−164409号公報JP-A-6-164409 特開平6−318875号公報JP-A-6-318875

"3GPP TS 26.403 V9.0.0",[online],3GPP,平成27年3月8日検索,インターネット〈URL: http://www.arib.or.jp/IMT-2000/V900Jul11/5_Appendix/Rel9/26/26403-900.pdf〉"3GPP TS 26.403 V9.0.0", [online], 3GPP, March 8, 2015 search, Internet <URL: http://www.arib.or.jp/IMT-2000/V900Jul11/5_Appendix/Rel9/ 26 / 26403-900.pdf>

マスキング閾値の補正方法は、量子化により帯域が欠落することを許容する条件で行う方法と、帯域の欠落を許容しない条件で行う方法とに大別される。   Masking threshold correction methods are roughly classified into a method that is performed under a condition that allows a band to be lost due to quantization, and a method that is performed under a condition that does not allow a band to be lost.

帯域の欠落を許容する条件でマスキング閾値を補正した場合、補正量が多くなると、人間が知覚可能な音を含む帯域が量子化により欠落してしまうことがある。量子化(符号化)により知覚可能な音を含む帯域が欠落すると、符号化されたオーディオ信号を再生(復号化)したときに再生音を聴く人に違和感を与える。そのため、欠落する帯域が増えると音質の劣化につながる。このような帯域の欠落による音質の劣化は、例えば周波数スペクトルのピーク位置が激しく変動するオーディオ信号において顕著となる。   When the masking threshold is corrected under a condition that allows the loss of bands, if the correction amount increases, a band including sound that can be perceived by humans may be lost due to quantization. If a band including a sound that can be perceived by quantization (encoding) is lost, when the encoded audio signal is reproduced (decoded), a person who listens to the reproduced sound is uncomfortable. For this reason, when the number of missing bands increases, the sound quality deteriorates. Such deterioration of sound quality due to lack of a band becomes remarkable in an audio signal in which the peak position of the frequency spectrum fluctuates significantly, for example.

一方、帯域の欠落を許容しない条件でマスキング閾値を補正する場合、各帯域のマスキング閾値に上限値を設定して行う。そのため、補正量が上限値に達して更なる補正をできない帯域が生じた場合、その帯域の補正量を増やせない(言い換えると割り当てるビット数を減らせない)分、他の帯域の補正量を増やすこととなる。したがって、初期マスキング閾値と上限値との差が大きい帯域のマスキング閾値が過度に補正され、当該帯域の符号化に割り当てるビットが少なくなってしまう。初期マスキング閾値と上限値との差が大きい帯域は、音質的に重要な帯域である。すなわち、帯域の欠落を許容しない条件でマスキング閾値を補正した場合、音質的に重要な帯域に割り当てるビット数が少なくなり、音質の劣化につながる。このようなマスキング閾値の過度の補正による音質の劣化は、例えば、ハープシコード等の周波数スペクトルのピーク位置の変動が緩やかなオーディオ信号において顕著となる。   On the other hand, when the masking threshold value is corrected under a condition that does not allow the loss of bands, an upper limit value is set for the masking threshold value of each band. Therefore, when the correction amount reaches the upper limit and a band that cannot be further corrected is generated, the correction amount of that band cannot be increased (in other words, the number of allocated bits cannot be reduced), and the correction amount of other bands is increased. It becomes. Therefore, the masking threshold value for the band having a large difference between the initial masking threshold value and the upper limit value is excessively corrected, and the number of bits allocated for encoding the band is reduced. A band having a large difference between the initial masking threshold and the upper limit value is a band important for sound quality. That is, when the masking threshold is corrected under conditions that do not allow band loss, the number of bits allocated to a band important for sound quality decreases, leading to deterioration of sound quality. Such deterioration of sound quality due to excessive correction of the masking threshold becomes significant in an audio signal in which the fluctuation of the peak position of the frequency spectrum such as harpsichord is gentle.

一つの側面において、本発明は、聴覚特性に基づくマスキング閾値を用いてオーディオ信号を符号化する際の音質の劣化を抑制することを目的とする。   In one aspect, an object of the present invention is to suppress deterioration in sound quality when an audio signal is encoded using a masking threshold based on auditory characteristics.

本発明の1つの態様の符号化装置は、オーディオ信号をフレーム毎に周波数スペクトルに変換し、当該周波数スペクトルを量子化して符号化する符号化装置であって、閾値生成部と、閾値補正部と、閾値決定部と、を備える。前記閾値生成部は、前記周波数スペクトルに基づいて当該周波数スペクトルを量子化する際の初期マスキング閾値を生成する。前記閾値補正部は、前記周波数スペクトルの量子化に与えられたビット量と量子化による帯域の欠落を許容するか否かの条件に基づいて前記初期マスキング閾値を補正する。前記閾値決定部は、量子化による帯域の欠落を許容する条件で補正した第1のマスキング閾値と、量子化による帯域の欠落を許容しない条件で補正した第2のマスキング閾値とのいずれを量子化に用いるか決定する。ここで、前記閾値決定部は、連続する複数の前記フレームにおける前記周波数スペクトルの変化の程度に基づいて、前記第1のマスキング閾値と前記第2のマスキング閾値とのいずれを量子化に用いるか決定する。   An encoding device according to one aspect of the present invention is an encoding device that converts an audio signal into a frequency spectrum for each frame and quantizes and encodes the frequency spectrum, and includes a threshold generation unit, a threshold correction unit, And a threshold value determination unit. The threshold generation unit generates an initial masking threshold when quantizing the frequency spectrum based on the frequency spectrum. The threshold correction unit corrects the initial masking threshold based on a bit amount given to the quantization of the frequency spectrum and a condition as to whether or not band loss due to the quantization is allowed. The threshold value determination unit quantizes either the first masking threshold value corrected under a condition that allows loss of a band due to quantization or the second masking threshold value corrected under a condition that does not allow a loss of band due to quantization. Decide whether to use it. Here, the threshold value determination unit determines which of the first masking threshold value and the second masking threshold value is used for quantization based on the degree of change of the frequency spectrum in a plurality of consecutive frames. To do.

上述の態様によれば、聴覚特性に基づくマスキング閾値を用いてオーディオ信号を符号化する際の音質の劣化を抑制することができる。   According to the above-described aspect, it is possible to suppress deterioration in sound quality when an audio signal is encoded using a masking threshold based on auditory characteristics.

本発明の第1の実施形態に係る符号化装置の機能ブロック図である。It is a functional block diagram of the encoding apparatus which concerns on the 1st Embodiment of this invention. 第1の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the correction threshold value determination part in the encoding apparatus which concerns on 1st Embodiment. 第1の実施形態に係る符号化装置における符号化処理を示すフローチャート(その1)である。It is a flowchart (the 1) which shows the encoding process in the encoding apparatus which concerns on 1st Embodiment. 第1の実施形態に係る符号化装置における符号化処理を示すフローチャート(その2)である。It is a flowchart (the 2) which shows the encoding process in the encoding apparatus which concerns on 1st Embodiment. 第1の実施形態に係る符号化装置における符号化処理を示すフローチャート(その3)である。It is a flowchart (the 3) which shows the encoding process in the encoding apparatus which concerns on 1st Embodiment. 第1の補正部で補正されたマスキング閾値と周波数スペクトルとの関係の一例を示すグラフである。It is a graph which shows an example of the relationship between the masking threshold corrected by the 1st correction part, and a frequency spectrum. 第2の補正部で補正されたマスキング閾値と周波数スペクトルとの関係の一例を示すグラフである。It is a graph which shows an example of the relationship between the masking threshold corrected by the 2nd correction part, and a frequency spectrum. 符号化装置として動作させるコンピュータのハードウェア構成の例を示す模式図である。FIG. 25 is a schematic diagram illustrating an example of a hardware configuration of a computer that operates as an encoding device. 本発明の第2の実施形態に係る符号化装置の機能ブロック図である。It is a functional block diagram of the encoding apparatus which concerns on the 2nd Embodiment of this invention. 第2の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the correction threshold value determination part in the encoding apparatus which concerns on 2nd Embodiment. 第2の実施形態に係る符号化処理におけるマスキング閾値の補正処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the correction process of the masking threshold value in the encoding process which concerns on 2nd Embodiment. 本発明の第3の実施形態に係る符号化装置の機能ブロック図である。It is a functional block diagram of the encoding apparatus which concerns on the 3rd Embodiment of this invention. 第3の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the correction threshold value determination part in the encoding apparatus which concerns on 3rd Embodiment. 第3の実施形態に係る符号化処理におけるマスキング閾値の補正処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the correction process of the masking threshold value in the encoding process which concerns on 3rd Embodiment. 第3の実施形態に係る符号化装置の変形例を示すブロック図である。It is a block diagram which shows the modification of the encoding apparatus which concerns on 3rd Embodiment. 第3の実施形態の変形例における符号化処理の一部を示すフローチャートである。It is a flowchart which shows a part of encoding process in the modification of 3rd Embodiment. 本発明の第4の実施形態に係る符号化装置の機能ブロック図である。It is a functional block diagram of the encoding apparatus which concerns on the 4th Embodiment of this invention. 第4の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the correction threshold value determination part in the encoding apparatus which concerns on 4th Embodiment. 第4の実施形態に係る符号化処理の一部を示すフローチャートである。It is a flowchart which shows a part of encoding process which concerns on 4th Embodiment. 第4の実施形態に係る符号化処理の他の一部を示すフローチャートである。It is a flowchart which shows a part of other encoding process based on 4th Embodiment. 本発明の第5の実施形態に係る符号化装置の機能ブロック図である。It is a functional block diagram of the encoding apparatus which concerns on the 5th Embodiment of this invention. 第5の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the correction threshold value determination part in the encoding apparatus which concerns on 5th Embodiment. 第5の実施形態に係る符号化処理の一部を示すフローチャートである。It is a flowchart which shows a part of encoding process which concerns on 5th Embodiment. 第5の実施形態に係る符号化処理の他の一部を示すフローチャートである。It is a flowchart which shows another part of the encoding process which concerns on 5th Embodiment.

[第1の実施形態]
図1は、本発明の第1の実施形態に係る符号化装置の機能ブロック図である。
[First Embodiment]
FIG. 1 is a functional block diagram of an encoding apparatus according to the first embodiment of the present invention.

図1に示すように、本実施形態に係る符号化装置1は、ブロック切替部10と、MDCT処理部11と、マスキング閾値生成部12と、聴覚特性算出部13と、マスキング閾値補正部14と、量子化部15と、符号化部16と、多重化部17とを備える。また、符号化装置1は、記憶部18を備える。   As shown in FIG. 1, the encoding device 1 according to the present embodiment includes a block switching unit 10, an MDCT processing unit 11, a masking threshold generation unit 12, an auditory characteristic calculation unit 13, and a masking threshold correction unit 14. A quantization unit 15, an encoding unit 16, and a multiplexing unit 17. In addition, the encoding device 1 includes a storage unit 18.

ブロック切替部10は、入力信号(オーディオ信号)の特性に基づいて、入力信号に対しModified Discrete Cosine Transform(MDCT)処理を行う際のブロック長を切り替える。例えば、AAC方式での符号化においては、長ブロック(1024点)又は短ブロック(128点)にブロック長を切り替える。   The block switching unit 10 switches the block length when performing Modified Discrete Cosine Transform (MDCT) processing on the input signal based on the characteristics of the input signal (audio signal). For example, in AAC encoding, the block length is switched to a long block (1024 points) or a short block (128 points).

MDCT処理部11は、入力信号に対し長ブロック又は短ブロックに応じた窓長のMDCT処理を行い、入力信号を周波数スペクトルに変換する。例えば、AAC方式での符号化においては、ブロック長が長ブロックであれば窓長2048のMDCT処理を行い、短ブロックであれば窓長256のMDCT処理を行う。   The MDCT processing unit 11 performs MDCT processing with a window length corresponding to the long block or the short block on the input signal, and converts the input signal into a frequency spectrum. For example, in AAC coding, if the block length is a long block, MDCT processing with a window length of 2048 is performed, and if the block length is short, MDCT processing with a window length of 256 is performed.

マスキング閾値生成部12は、入力信号に対して聴覚心理分析を行い、当該入力信号から得た周波数スペクトルの量子化において最適なマスキング閾値(初期マスキング閾値)sfbThr0(sfb)を生成する。初期マスキング閾値sfbThr0(sfb)は、帯域(AAC方式におけるスケールファクタバンドsfb。以下「帯域sfb」ともいう)毎に生成する。また、マスキング閾値生成部12は、周波数スペクトルの各帯域sfbにおける電力値(入力パワー)mdct_pow(sfb)と初期マスキング閾値sfbThr0(sfb)とに基づいて、符号化対象の帯域sfbを決定する。更に、マスキング閾値生成部12は、符号化対象の帯域sfbを決定した後、初期マスキング閾値を用いた量子化が可能か否か、言い換えると初期マスキング閾値を補正する必要があるか否かを判断する。初期マスキング閾値を用いた量子化が可能な場合、マスキング閾値生成部12は、初期マスキング閾値を量子化部15に渡す。一方、初期マスキング閾値を用いて量子化できない場合、マスキング閾値生成部12は、初期マスキング閾値sfbThr0(sfb)を、聴覚特性算出部13及びマスキング閾値補正部14の第1の補正部141に渡すとともに、記憶部18に記憶させる。 The masking threshold generation unit 12 performs auditory psychological analysis on the input signal, and generates an optimal masking threshold (initial masking threshold) sfbThr 0 (sfb) in the quantization of the frequency spectrum obtained from the input signal. The initial masking threshold sfbThr 0 (sfb) is generated for each band (scale factor band sfb in the AAC scheme; hereinafter also referred to as “band sfb”). Further, the masking threshold value generator 12 determines the band sfb to be encoded based on the power value (input power) mdct_pow (sfb) and the initial masking threshold value sfbThr 0 (sfb) in each frequency band sfb. Further, after determining the band sfb to be encoded, the masking threshold generation unit 12 determines whether quantization using the initial masking threshold is possible, in other words, whether the initial masking threshold needs to be corrected. To do. When quantization using the initial masking threshold is possible, the masking threshold generation unit 12 passes the initial masking threshold to the quantization unit 15. On the other hand, when quantization cannot be performed using the initial masking threshold, the masking threshold generation unit 12 passes the initial masking threshold sfbThr 0 (sfb) to the auditory characteristic calculation unit 13 and the first correction unit 141 of the masking threshold correction unit 14. At the same time, it is stored in the storage unit 18.

聴覚特性算出部13は、マスキング閾値の補正に必要な聴覚特性を算出する。本実施形態の聴覚特性算出部13は、聴覚特性として、各帯域sfbの信号対マスク比(Signal Mask Ratio;SMR)を算出する。また、聴覚特性算出部13は、算出した信号対マスク比smr(sfb)を、マスキング閾値補正部14の第1の補正部141に渡すとともに、記憶部18に記憶させる。   The auditory characteristic calculator 13 calculates the auditory characteristic necessary for correcting the masking threshold. The auditory characteristic calculation unit 13 of the present embodiment calculates a signal mask ratio (SMR) of each band sfb as the auditory characteristic. The auditory characteristic calculation unit 13 passes the calculated signal-to-mask ratio smr (sfb) to the first correction unit 141 of the masking threshold correction unit 14 and stores it in the storage unit 18.

マスキング閾値補正部14は、聴覚特性(信号対マスク比smr(sfb))及びビットレート条件に基づいて初期マスキング閾値を補正する。本実施形態のマスキング閾値補正部14は、第1の補正部141と、第2の補正部142と、補正閾値決定部143と、を備える。   The masking threshold correction unit 14 corrects the initial masking threshold based on the auditory characteristics (signal to mask ratio smr (sfb)) and the bit rate condition. The masking threshold value correction unit 14 of the present embodiment includes a first correction unit 141, a second correction unit 142, and a correction threshold value determination unit 143.

第1の補正部141は、量子化による帯域の欠落を許容する条件で初期マスキング閾値を補正する。第2の補正部142は、量子化による帯域の欠落を許容しない条件で初期マスキング閾値を補正する。補正閾値決定部143は、第1の補正部141で補正されたマスキング閾値sfbThr1(sfb)と、第2の補正部142で補正されたマスキング閾値sfbThr2(sfb)とのどちらを量子化に用いるか決定する。以下、第1の補正部141で補正されたマスキング閾値sfbThr1(sfb)を第1の補正閾値ともいい、第2の補正142で補正されたマスキング閾値sfbThr2(sfb)を第2の補正閾値ともいう。 The first correction unit 141 corrects the initial masking threshold under a condition that allows loss of a band due to quantization. The second correction unit 142 corrects the initial masking threshold under a condition that does not allow band loss due to quantization. The correction threshold value determination unit 143 quantizes either the masking threshold value sfbThr 1 (sfb) corrected by the first correction unit 141 or the masking threshold value sfbThr 2 (sfb) corrected by the second correction unit 142. Decide whether to use it. Hereinafter, the masking threshold sfbThr 1 (sfb) corrected by the first correction unit 141 is also referred to as a first correction threshold, and the masking threshold sfbThr 2 (sfb) corrected by the second correction 142 is the second correction threshold. Also called.

マスキング閾値補正部14では、まず、第1の補正部141で初期マスキング閾値sfbThr0(sfb)を第1の補正閾値sfbThr1(sfb)に補正する。そして、補正閾値決定部143において第1の補正閾値sfbThr1(sfb)を採用するか否かを判定する。補正閾値決定部143は、後述するように、第1の補正閾値についての欠落SFB変動率に基づいて、第1の補正閾値を採用するか否かを決定する。そして、第1の補正閾値を採用すると判定した場合、補正閾値決定部143は、第1の補正閾値を量子化に用いるマスキング閾値に決定し、第1の補正閾値を量子化部15に渡す。一方、第1の補正閾値を採用しないと判定した場合、補正閾値決定部143は、第2の補正閾値を量子化に用いると決定し、第2の補正部142に初期マスキング閾値を補正させる。第2の補正部142は、初期マスキング閾値を第2の補正閾値sfbThr2(sfb)に補正した後、第2の補正閾値sfbThr2(sfb)を量子化部15に渡す。 In the masking threshold correction unit 14, first, the first correction unit 141 corrects the initial masking threshold sfbThr 0 (sfb) to the first correction threshold sfbThr 1 (sfb). Then, the correction threshold value determination unit 143 determines whether or not to adopt the first correction threshold value sfbThr 1 (sfb). As will be described later, the correction threshold value determination unit 143 determines whether or not to adopt the first correction threshold value based on the missing SFB variation rate for the first correction threshold value. When it is determined that the first correction threshold value is adopted, the correction threshold value determination unit 143 determines the first correction threshold value as a masking threshold value used for quantization, and passes the first correction threshold value to the quantization unit 15. On the other hand, when it is determined that the first correction threshold value is not adopted, the correction threshold value determination unit 143 determines that the second correction threshold value is used for quantization, and causes the second correction unit 142 to correct the initial masking threshold value. The second correction unit 142 corrects the initial masking threshold value to the second correction threshold value sfbThr 2 (sfb), and then passes the second correction threshold value sfbThr 2 (sfb) to the quantization unit 15.

量子化部15は、初期マスキング閾値sfbThr0(sfb)、第1の補正閾値sfbThr1(sfb)、及び第2の補正閾値sfbThr2(sfb)のいずれかを用いて、周波数スペクトルにおける符号化対象の帯域を量子化する。 The quantization unit 15 uses one of the initial masking threshold value sfbThr 0 (sfb), the first correction threshold value sfbThr 1 (sfb), and the second correction threshold value sfbThr 2 (sfb) to be encoded in the frequency spectrum. Quantize the band.

符号化部16は、周波数スペクトルを量子化して得られた値を符号化する。AAC方式での符号化の場合、符号化部16は量子化して得られた値をハフマン符号化する。   The encoding unit 16 encodes a value obtained by quantizing the frequency spectrum. In the case of encoding in the AAC scheme, the encoding unit 16 performs Huffman encoding on the value obtained by quantization.

多重化部17は、符号化されたオーディオ信号を多重化して符号化ストリームを生成する。   The multiplexing unit 17 multiplexes the encoded audio signal to generate an encoded stream.

記憶部18は、初期マスキング閾値sfbThr0(sfb)及び信号対マスク比smr(sfb)等のマスキング閾値の補正に用いる情報を、読み出し及び書き換えが可能な状態で記憶する。 The storage unit 18 stores information used for correction of the masking threshold, such as the initial masking threshold sfbThr 0 (sfb) and the signal-to-mask ratio smr (sfb), in a state where it can be read and rewritten.

図2は、第1の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。   FIG. 2 is a block diagram illustrating a configuration example of the correction threshold value determination unit in the encoding device according to the first embodiment.

図2に示すように、補正閾値決定部143は、欠落SFB変動率算出部143aと、欠落SFB情報保持部143bと、判定部143cと、を有する。   As illustrated in FIG. 2, the correction threshold value determination unit 143 includes a missing SFB fluctuation rate calculation unit 143a, a missing SFB information holding unit 143b, and a determination unit 143c.

欠落SFB変動率算出部143aは、第1の補正閾値sfbThr1(sfb)及び周波数スペクトルの電力値mdct_pow(sfb)に基づいて、量子化により欠落する帯域sfbの変動率Vsfbを算出する。以下、欠落SFB変動率算出部143aで算出した変動率Vsfbを、欠落SFB変動率という。 The missing SFB fluctuation rate calculation unit 143a calculates the fluctuation rate Vsfb of the band sfb missing due to quantization based on the first correction threshold value sfbThr 1 (sfb) and the frequency spectrum power value mdct_pow (sfb). Hereinafter, the fluctuation rate Vsfb calculated by the missing SFB fluctuation rate calculation unit 143a is referred to as a missing SFB fluctuation rate.

本実施形態における欠落SFB変動率Vsfbは、現時点の符号化対象のフレーム(Tフレーム)で欠落する帯域における数フレームに渡り連続して欠落している帯域の割合を表す。欠落する帯域は、第1の補正閾値sfbThr1(sfb)と周波数スペクトルの電力値mdct_pow(sfb)との関係がsfbThr1(sfb)>mdct_pow(sfb)である帯域である。また、本実施形態では、Tフレームで欠落する帯域について、Tフレームより時間的に前のフレームにおいて同じ帯域又はその前後の帯域が欠落している場合、連続して欠落していると判断する。 The missing SFB fluctuation rate Vsfb in the present embodiment represents a ratio of a band that is continuously missing over several frames in a band that is missing in a current encoding target frame (T frame). The missing band is a band in which the relationship between the first correction threshold value sfbThr 1 (sfb) and the power value mdct_pow (sfb) of the frequency spectrum is sfbThr 1 (sfb)> mdct_pow (sfb). Further, in the present embodiment, regarding a band that is missing in a T frame, if the same band or a band before and after the same band is missing in a frame temporally prior to the T frame, it is determined that the band is missing continuously.

欠落SFB情報保持部143bは、欠落SFB変動率Vsfbの算出に用いる数フレーム分の欠落SFB情報を保持する。欠落SFB情報は、各フレームにおける欠落する帯域の集合である。本実施形態では、図2に示すように、T−1フレーム(Tフレームの1フレーム前)の欠落SFB情報と、T−2フレーム(Tフレームの2フレーム前)の欠落SFB情報とを保持する。   The missing SFB information holding unit 143b holds missing SFB information for several frames used for calculating the missing SFB fluctuation rate Vsfb. The missing SFB information is a set of missing bands in each frame. In this embodiment, as shown in FIG. 2, the missing SFB information of the T-1 frame (one frame before the T frame) and the missing SFB information of the T-2 frame (two frames before the T frame) are retained. .

判定部143cは、算出した欠落SFB変動率Vsfbに基づいて、量子化する際のマスキング閾値に第1の補正閾値sfbThr1(sfb)を採用するか否かを判定する。判定部143cは、欠落SFB変動率Vsfbが予め定めた閾値TH以下の場合、量子化する際のマスキング閾値に第1の補正閾値を採用すると判定する。すなわち、第1の補正閾値を量子化に用いると決定する。この場合、判定部143は、第1の補正閾値を量子化部15に渡す。 The determination unit 143c determines whether or not to adopt the first correction threshold value sfbThr 1 (sfb) as a masking threshold value for quantization based on the calculated missing SFB fluctuation rate Vsfb. Determining unit 143c, when missing SFB variation rate Vsfb the threshold TH 1 below a predetermined determines to adopt the first correction threshold masking threshold when quantizing. That is, it is determined that the first correction threshold is used for quantization. In this case, the determination unit 143 passes the first correction threshold value to the quantization unit 15.

一方、欠落SFB変動率Vsfbが閾値よりも小さい場合、判定部143は、第1の補正閾値を採用しない、すなわち第2の補正閾値sfbThr2(sfb)を量子化に用いると決定する。この場合、判定部143cは、第2の補正部142に初期マスキング閾値を補正させる。 On the other hand, when the missing SFB fluctuation rate Vsfb is smaller than the threshold value, the determination unit 143 determines not to employ the first correction threshold value, that is, to use the second correction threshold value sfbThr 2 (sfb) for quantization. In this case, the determination unit 143c causes the second correction unit 142 to correct the initial masking threshold.

このように、本実施形態に係る符号化装置1では、帯域の欠落を許容する条件で補正した第1の補正閾値sfbThr1(sfb)が所定の採用条件を満たしている場合、第1の補正閾値を用いて周波数スペクトルを量子化する。一方、第1の補正閾値が所定の採用条件を満たしていない場合、帯域の欠落を許容しない条件で補正した第2の補正閾値sfbThr2(sfb)を用いて周波数スペクトルを量子化する。 As described above, in the encoding device 1 according to the present embodiment, when the first correction threshold value sfbThr 1 (sfb) corrected under the condition that allows band loss is satisfied, the first correction is performed. The frequency spectrum is quantized using a threshold value. On the other hand, when the first correction threshold value does not satisfy the predetermined adoption condition, the frequency spectrum is quantized using the second correction threshold value sfbThr 2 (sfb) corrected under a condition that does not allow band loss.

以下、本実施形態に係る符号化装置1における符号化処理の内容を説明する。
図3Aは、第1の実施形態に係る符号化装置における符号化処理を示すフローチャート(その1)である。図3Bは、第1の実施形態に係る符号化装置における符号化処理を示すフローチャート(その2)である。図3Cは、第1の実施形態に係る符号化装置における符号化処理を示すフローチャート(その3)である。
Hereinafter, the content of the encoding process in the encoding device 1 according to the present embodiment will be described.
FIG. 3A is a flowchart (part 1) illustrating an encoding process in the encoding device according to the first embodiment. FIG. 3B is a flowchart (part 2) illustrating the encoding process in the encoding device according to the first embodiment. FIG. 3C is a flowchart (part 3) illustrating the encoding process in the encoding device according to the first embodiment.

本実施形態の符号化装置1は、入力信号(オーディオ信号)におけるフレーム等の符号化単位のデータのそれぞれに対し、図3A〜図3Cに示すような符号化処理を行う。   The encoding apparatus 1 according to the present embodiment performs encoding processing as shown in FIGS. 3A to 3C on each encoding unit data such as a frame in an input signal (audio signal).

符号化装置1は、図3Aに示すように、まず、1フレーム分の入力信号を周波数スペクトルに変換し、各帯域sfbの電力値mdct_pow(sfb)を算出する(ステップS10)。ステップS10の処理は、ブロック切替部10及びMDCT処理部11が行う。   As shown in FIG. 3A, the encoding device 1 first converts an input signal for one frame into a frequency spectrum, and calculates a power value mdct_pow (sfb) of each band sfb (step S10). The block switching unit 10 and the MDCT processing unit 11 perform the process in step S10.

ブロック切替部10は、MDCT処理のブロック長を長ブロック及び短ブロックのいずれにするかを選択して切り替える。ブロック長は、既知の選択方法、例えば入力信号の電力変動比と予測利得変動比とに基づいて選択する。   The block switching unit 10 selects and switches whether the block length of the MDCT processing is a long block or a short block. The block length is selected based on a known selection method, for example, an input signal power fluctuation ratio and a predicted gain fluctuation ratio.

また、MDCT処理部11は、ブロック切替部10で選択したブロック長に応じた窓長のMDCT処理を行い、入力信号を周波数スペクトルに変換する。その後、MDCT処理部11は、得られた周波数スペクトルに基づき、各帯域sfbの電力値mdct_pow(sfb)を算出する。MDCT処理及び電力値の算出は、それぞれ既知の変換方法及び算出方法のいずれかを用いて行う。   The MDCT processing unit 11 performs an MDCT process with a window length corresponding to the block length selected by the block switching unit 10 and converts the input signal into a frequency spectrum. Thereafter, the MDCT processing unit 11 calculates the power value mdct_pow (sfb) of each band sfb based on the obtained frequency spectrum. The MDCT process and the calculation of the power value are performed using either a known conversion method or calculation method, respectively.

符号化装置1は、次に、周波数スペクトルを量子化する際の初期マスキング閾値sbfThr0(sfb)を生成する(ステップS12)。ステップS12の処理は、マスキング閾値生成部12が行う。 Next, the encoding device 1 generates an initial masking threshold sbfThr 0 (sfb) for quantizing the frequency spectrum (step S12). The process of step S12 is performed by the masking threshold value generator 12.

マスキング閾値生成部12は、入力信号に対して聴覚心理分析を行い、帯域sfb毎に初期マスキング閾値sfbThr0(sfb)を求める。初期マスキング閾値sfbThr0(sfb)は、各帯域sfbにおける最小可聴レベルやマスキング効果等に基づき、既知の算出方法のいずれかを用いて算出する。 The masking threshold value generation unit 12 performs auditory psychological analysis on the input signal and obtains an initial masking threshold value sfbThr 0 (sfb) for each band sfb. The initial masking threshold value sfbThr 0 (sfb) is calculated using any known calculation method based on the minimum audible level, the masking effect, etc. in each band sfb.

また、マスキング閾値生成部12は、初期マスキング閾値sfbThr0(sfb)を生成すると、次に、初期マスキング閾値sfbThr0(sfb)と周波数スペクトルの電力値mdct_pow(sfb)とに基づいて符号化対象の帯域を決定する(ステップS14)。ステップS14の処理において、マスキング閾値生成部12は、周波数スペクトルの全帯域のうち、sfbThr0(sfb)<mdct_pow(sfb)である帯域のみを符号化対象とする。 In addition, when the masking threshold generation unit 12 generates the initial masking threshold sfbThr 0 (sfb), the masking threshold generation unit 12 then generates an encoding target based on the initial masking threshold sfbThr 0 (sfb) and the frequency spectrum power value mdct_pow (sfb). A band is determined (step S14). In the process of step S14, the masking threshold value generation unit 12 sets only the band of sfbThr 0 (sfb) <mdct_pow (sfb) among all the bands of the frequency spectrum as the encoding target.

符号化対象の帯域を決定した後、マスキング閾値生成部12は、初期マスキング閾値を補正するか否かを判定するため、初期PE値及び目標PE値を算出する(ステップS16)。本実施形態では、初期PE値が目標PE値より大きいか否かにより、マスキング閾値を補正するか否かを判定する(ステップS18)。   After determining the encoding target band, the masking threshold value generator 12 calculates an initial PE value and a target PE value in order to determine whether or not to correct the initial masking threshold value (step S16). In the present embodiment, it is determined whether or not to correct the masking threshold based on whether or not the initial PE value is larger than the target PE value (step S18).

ここで、PE値とは、音響パラメータの1つである知覚エントロピー(Perceptual Entropy)の値であり、雑音を知覚することがないよう量子化するのに必要なビット数を表す。初期PE値は、符号化対象の帯域における電力値mdct_pow(sfb)と初期マスキング閾値sfbThr0(sfb)とに基づいて算出されるPE値である。また、目標PE値は、符号化に使用可能なビット数に基づいて算出されるPE値である。初期PE値及び目標PE値は、既知の算出方法のいずれか(例えば、非特許文献1に記載された算出方法)を用いて算出する。 Here, the PE value is a value of perceptual entropy which is one of acoustic parameters, and represents the number of bits necessary for quantization so as not to perceive noise. The initial PE value is a PE value calculated based on the power value mdct_pow (sfb) and the initial masking threshold sfbThr 0 (sfb) in the band to be encoded. The target PE value is a PE value calculated based on the number of bits that can be used for encoding. The initial PE value and the target PE value are calculated using any known calculation method (for example, the calculation method described in Non-Patent Document 1).

知覚エントロピーの値は、上記のように量子化に必要なビット数と関係があり、初期PE値が目標PE値よりも大きい場合、初期マスキング閾値を用いた量子化で使用するビット量が使用可能なビット数を超えると判断できる。一方、初期PE値が目標PE値以下である場合、初期マスキング閾値を用いた量子化で使用するビット量が使用可能なビット数内に収まると判断できる。よって、初期PE値と目標PE値との大小関係に基づいて初期マスキング閾値を用いた量子化が可能であるか否か、すなわち初期マスキング閾値を補正する必要があるか否かを判断できる。   The perceptual entropy value is related to the number of bits required for quantization as described above. If the initial PE value is larger than the target PE value, the amount of bits used for quantization using the initial masking threshold can be used. It can be determined that the number of bits exceeds the maximum. On the other hand, when the initial PE value is less than or equal to the target PE value, it can be determined that the amount of bits used in quantization using the initial masking threshold falls within the number of usable bits. Therefore, it can be determined whether quantization using the initial masking threshold is possible based on the magnitude relationship between the initial PE value and the target PE value, that is, whether the initial masking threshold needs to be corrected.

初期PE値が目標PE値以下の場合(ステップS18;No)、マスキング閾値生成部12は、マスキング閾値を補正しないと判定し、量子化部15に初期マスキング閾値sfbThr0(sfb)を渡す。この場合、符号化装置1は、図3Cに示すように、初期マスキング閾値sfbThr0(sfb)を用いて周波数スペクトルを量子化する(ステップS30)。ステップS30の量子化は、量子化部15が行う。量子化部15は、既知の量子化方法のいずれかを用いて周波数スペクトルを量子化する。 When the initial PE value is less than or equal to the target PE value (step S18; No), the masking threshold value generation unit 12 determines that the masking threshold value is not corrected, and passes the initial masking threshold value sfbThr 0 (sfb) to the quantization unit 15. In this case, as illustrated in FIG. 3C, the encoding apparatus 1 quantizes the frequency spectrum using the initial masking threshold sfbThr 0 (sfb) (step S30). The quantization unit 15 performs the quantization in step S30. The quantization unit 15 quantizes the frequency spectrum using any of the known quantization methods.

一方、初期PE値が目標PE値より大きい場合(ステップS18;Yes)、マスキング閾値生成部12は、マスキング閾値を補正すると判定する。この場合、マスキング閾値生成部12は、初期マスキング閾値sfbThr0(sfb)を聴覚特性算出部13に渡す。また、マスキング閾値生成部12は、初期マスキング閾値sfbThr0(sfb)及び目標PE値を、マスキング閾値補正部14の第1の補正部141に渡すとともに、記憶部18に記憶させる。その後、符号化装置1は、図3Bに示したステップS20〜S28のようなマスキング閾値の補正処理を行う。 On the other hand, when the initial PE value is larger than the target PE value (step S18; Yes), the masking threshold value generator 12 determines to correct the masking threshold value. In this case, the masking threshold generation unit 12 passes the initial masking threshold sfbThr 0 (sfb) to the auditory characteristic calculation unit 13. Further, the masking threshold value generation unit 12 passes the initial masking threshold value sfbThr 0 (sfb) and the target PE value to the first correction unit 141 of the masking threshold value correction unit 14 and causes the storage unit 18 to store them. Thereafter, the encoding apparatus 1 performs a masking threshold value correction process as in steps S20 to S28 illustrated in FIG. 3B.

マスキング閾値を補正する場合、符号化装置1は、次に、周波数スペクトル等に基づき聴覚特性を算出する(ステップS20)。ステップS20の処理は、聴覚特性算出部16が行う。   When correcting the masking threshold, the encoding apparatus 1 next calculates an auditory characteristic based on the frequency spectrum or the like (step S20). The process of step S20 is performed by the auditory characteristic calculation unit 16.

聴覚特性算出部16は、各帯域sfbにおける信号対マスク比smr(sfb)、すなわち各帯域における電力値mdct_pow(sfb)と初期マスキング閾値sfbThr0(sfb)との差分値を算出する。信号対マスク比smr(sfb)を算出すると、聴覚特性算出部16は、算出した信号対マスク比smr(sfb)を、マスキング閾値補正部14の第1の補正部141に渡すとともに、記憶部18に記憶させる。 The auditory characteristic calculator 16 calculates a signal-to-mask ratio smr (sfb) in each band sfb, that is, a difference value between the power value mdct_pow (sfb) and the initial masking threshold value sfbThr 0 (sfb) in each band. When the signal-to-mask ratio smr (sfb) is calculated, the auditory characteristic calculation unit 16 passes the calculated signal-to-mask ratio smr (sfb) to the first correction unit 141 of the masking threshold correction unit 14 and also stores the storage unit 18. Remember me.

聴覚特性(信号対マスク比)の算出が終わると、符号化装置1は、次に、聴覚特性等に基づいて、量子化による帯域の欠落を許容する条件で初期マスキング閾値を補正する(ステップS22)。ステップS22は、マスキング閾値補正部14の第1の補正部141が行う。   When the calculation of the auditory characteristic (signal to mask ratio) is completed, the encoding apparatus 1 next corrects the initial masking threshold based on the auditory characteristic and the like under a condition that allows band loss due to quantization (step S22). ). Step S22 is performed by the first correction unit 141 of the masking threshold correction unit 14.

第1の補正部141は、例えば、下記式(1)を用い、電力値mdct_pow(sfb)と補正後のマスキング閾値sfbThr1(sfb)とに基づいて算出されるPE値が目標PE値になるようマスキング閾値を補正する。 For example, the first correction unit 141 uses the following formula (1), and the PE value calculated based on the power value mdct_pow (sfb) and the corrected masking threshold value sfbThr 1 (sfb) becomes the target PE value. The masking threshold is corrected as follows.

Figure 2017021257
Figure 2017021257

式(1)において、rは補正パラメータである(非特許文献1を参照)。   In Equation (1), r is a correction parameter (see Non-Patent Document 1).

また、第1の補正部141は、帯域の欠落を許容するため、補正後のマスキング閾値sfbThr1(sfb)に上限値を設定せずにステップS22の補正処理を行う。また、第1の補正部141は、マスキング閾値の補正を終えると、補正されたマスキング閾値(第1の補正閾値sfbThr1(sfb))を、補正閾値決定部143の欠落SFB変動率算出部143a、及び判定部143cに送る。 Further, the first correction unit 141 performs the correction process in step S22 without setting an upper limit value for the corrected masking threshold value sfbThr 1 (sfb) in order to allow a loss of the band. When the first correction unit 141 completes the correction of the masking threshold value, the corrected masking threshold value (first correction threshold value sfbThr 1 (sfb)) is used as the missing SFB fluctuation rate calculation unit 143a of the correction threshold value determination unit 143. And to the determination unit 143c.

初期マスキング閾値を第1の補正閾値に補正する処理が終わると、符号化装置1は、次に、補正されたマスキング閾値(第1の補正閾値)の欠落SFB変動率Vsfbを算出する(ステップS24)。ステップS24は、欠落SFB変動率算出部143aが行う。   When the process of correcting the initial masking threshold to the first correction threshold is completed, the encoding apparatus 1 next calculates the missing SFB variation rate Vsfb of the corrected masking threshold (first correction threshold) (step S24). ). Step S24 is performed by the missing SFB fluctuation rate calculation unit 143a.

欠落SFB変動率算出部143aは、ステップS24の処理として、まず、現在の符号化対象フレーム(Tフレーム)に対する第1の補正閾値sfbThr1(sfb)と電力値mdct_pow(sfb)とを用いて欠落する帯域を抽出する。次に、欠落SFB変動率算出部143aは、欠落SFB情報保持部143bからT−1フレームの欠落SFB情報及びT−2フレームの欠落SFB情報を読み出し、Tフレームの欠落する帯域毎に、各欠落SFB情報に含まれる欠落する帯域と照合する。そして、Tフレームにおける1つの欠落する帯域と同じ帯域又はその前後の帯域が各欠落SFB情報に含まれる場合、その1つの欠落する帯域を連続して欠落する帯域と判定する。その後、欠落SFB変動率算出部143aは、連続して欠落する帯域の数をTフレームの欠落する帯域の総数で除した値を欠落SFB変動率Vsfbとして判定部143cに渡す。また、欠落SFB変動率算出部143aは、欠落SFB変動率Vsfbの算出を終えると、欠落SFB情報保持部143bで保持する情報を更新する。すなわち、T−1フレームの欠落SFB情報をT−2フレームの欠落SFB情報として保持し、Tフレームの欠落SFB情報をT−1フレームの欠落SFB情報として保持する。 The missing SFB fluctuation rate calculation unit 143a first uses the first correction threshold sfbThr 1 (sfb) and the power value mdct_pow (sfb) for the current encoding target frame (T frame) as the process of step S24. Band to be extracted. Next, the missing SFB fluctuation rate calculation unit 143a reads the missing SFB information of the T-1 frame and the missing SFB information of the T-2 frame from the missing SFB information holding unit 143b, and performs each missing for each band in which the T frame is missing. It collates with the missing band included in the SFB information. If each missing SFB information includes the same band as the one missing band in the T frame or the bands before and after that, it is determined that the one missing band is a continuously missing band. Thereafter, the missing SFB fluctuation rate calculation unit 143a passes the value obtained by dividing the number of continuously missing bands by the total number of missing bands in the T frame to the determination unit 143c as the missing SFB fluctuation rate Vsfb. Further, when the calculation of the missing SFB fluctuation rate Vsfb is completed, the missing SFB fluctuation rate calculation unit 143a updates the information held in the missing SFB information holding unit 143b. That is, the missing SFB information of the T-1 frame is held as the missing SFB information of the T-2 frame, and the missing SFB information of the T frame is held as the missing SFB information of the T-1 frame.

なお、欠落SFB変動率Vsfbは、上記の方法に限らず、他の方法で算出してもよい。また、オーディオ信号における先頭の数フレームを符号化するときのように、1フレーム前及び2フレーム前の欠落SFB情報を保持していない場合、欠落SFB変動率算出部143aは、予め定めた値を欠落SFB変動率Vsfbとする。この予め定めた値は、例えば、次のステップで欠落SFB変動率Vsfbと比較する閾値THよりも小さな値とする。 Note that the missing SFB fluctuation rate Vsfb is not limited to the above method, and may be calculated by another method. Further, when the missing SFB information of the previous frame and the previous frame is not held as in encoding the first few frames in the audio signal, the missing SFB fluctuation rate calculation unit 143a sets a predetermined value. The missing SFB fluctuation rate Vsfb. The predetermined value is, for example, to a value smaller than the threshold value TH 1 to be compared with the missing SFB variation rate Vsfb in the next step.

欠落SFB変動率Vsfbの算出を終えると、符号化装置1は、次に、第1の補正閾値及び第2の補正閾値のどちらを量子化に用いるかを決定するため、欠落SFB変動率Vsfbと予め定めた閾値THとを比較する(ステップS26)。ステップS26は、判定部143cが行う。Vsfb>THの場合(ステップS26;Yes)、判定部143cは、量子化する際のマスキング閾値に第1の補正閾値を採用すると判定し、第1の補正閾値を量子化部15に渡す。これにより、量子化に用いるマスキング閾値が第1の補正閾値sfbThr1(sfb)に決定される。この場合、図3Cに示すように、量子化部15は、第1の補正閾値、すなわち帯域の欠落を許容する条件で補正したマスキング閾値を用いて周波数スペクトルを量子化する(ステップS32)。一方、Vsfb≦THの場合(ステップS26;No)、判定部143cは、量子化する際のマスキング閾値に第1の補正閾値を採用しないと判定し、第2の補正部142にマスキング閾値を補正させる。これにより、量子化に用いるマスキング閾値が第2の補正閾値sfbThr2(sfb)に決定される。 When the calculation of the missing SFB fluctuation rate Vsfb is finished, the encoding apparatus 1 next determines the missing SFB fluctuation rate Vsfb in order to determine which of the first correction threshold value and the second correction threshold value is used for quantization. comparing the threshold value TH 1 determined in advance (step S26). Step S26 is performed by the determination unit 143c. When Vsfb> TH 1 (step S26; Yes), the determination unit 143c determines that the first correction threshold is adopted as the masking threshold for quantization, and passes the first correction threshold to the quantization unit 15. Thereby, the masking threshold used for quantization is determined to be the first correction threshold sfbThr 1 (sfb). In this case, as illustrated in FIG. 3C, the quantization unit 15 quantizes the frequency spectrum using the first correction threshold, that is, the masking threshold corrected under the condition that allows the loss of the band (step S32). On the other hand, when Vsfb ≦ TH 1 (step S26; No), the determination unit 143c determines that the first correction threshold is not adopted as the masking threshold for quantization, and sets the masking threshold to the second correction unit 142. Let me correct it. Thereby, the masking threshold value used for quantization is determined to be the second correction threshold value sfbThr 2 (sfb).

第2の補正部142は、判定部143cからのマスキング閾値の補正を指示する信号を受け取ると、聴覚特性等に基づいて、量子化による帯域の欠落を許容しない条件でマスキング閾値を補正する(ステップS28)。ステップS28は、ステップS22と同様、式(1)を用い、補正後のマスキング閾値と電力値とから算出されるPE値が目標PE値になるようマスキング閾値を補正する。ただし、ステップS28では、帯域の欠落を許容しない条件で初期マスキング閾値を補正する。そのため、第2の補正部142は、補正後のマスキング閾値sfbThr2(sfb)に帯域が欠落しない上限値を設定してステップS28の補正処理を行う。量子化により欠落する帯域は、マスキング閾値が周波数スペクトルの電力値mdct_pow(sfb)よりも大きい帯域である。そのため、補正後のマスキング閾値sfbThr2(sfb)の上限値は、周波数スペクトルの電力値mdct_pow(sfb)以下の値に設定する。 When the second correction unit 142 receives a signal instructing correction of the masking threshold value from the determination unit 143c, the second correction unit 142 corrects the masking threshold value under a condition that does not allow band loss due to quantization based on auditory characteristics or the like (step S102). S28). In step S28, similarly to step S22, the masking threshold value is corrected using Equation (1) so that the PE value calculated from the corrected masking threshold value and the power value becomes the target PE value. However, in step S28, the initial masking threshold value is corrected under a condition that does not allow band loss. Therefore, the second correction unit 142 sets the upper limit value at which no band is lost to the corrected masking threshold value sfbThr 2 (sfb), and performs the correction process in step S28. The band lost due to quantization is a band whose masking threshold is larger than the power value mdct_pow (sfb) of the frequency spectrum. Therefore, the upper limit value of the masking threshold value sfbThr 2 (sfb) after correction is set to a value equal to or lower than the power value mdct_pow (sfb) of the frequency spectrum.

第2の補正部142は、マスキング閾値の補正を終えると、補正されたマスキング閾値(第2の補正閾値)を量子化部15に渡す。この場合、図3Cに示すように、量子化部15は、帯域の欠落を許容しない条件で補正したマスキング閾値を用いて周波数スペクトルを量子化する(ステップS34)。   After completing the correction of the masking threshold, the second correction unit 142 passes the corrected masking threshold (second correction threshold) to the quantization unit 15. In this case, as shown in FIG. 3C, the quantizing unit 15 quantizes the frequency spectrum using the masking threshold corrected under the condition that the loss of the band is not allowed (step S34).

こうして初期マスキング閾値sfbThr0(sfb)、第1の補正閾値sfbThr1(sfb)、及び第2の補正閾値sfbThr2(sfb)のいずれかを用いて周波数スペクトルを量子化すると、量子化部15は、量子化された値を符号化部16に渡す。すると、符号化部16は、固定ハフマン符号化等の既知の符号化方法を用いて、量子化された値を符号化する(ステップS36)。そして、符号化を終えると、符号化部16は、符号化したデータを多重化部17に渡す。これにより、入力信号(オーディオ信号)の1フレーム分の符号化処理が終了する。 When the frequency spectrum is quantized using one of the initial masking threshold value sfbThr 0 (sfb), the first correction threshold value sfbThr 1 (sfb), and the second correction threshold value sfbThr 2 (sfb), the quantization unit 15 Then, the quantized value is passed to the encoding unit 16. Then, the encoding unit 16 encodes the quantized value using a known encoding method such as fixed Huffman encoding (step S36). When the encoding is completed, the encoding unit 16 passes the encoded data to the multiplexing unit 17. Thereby, the encoding process for one frame of the input signal (audio signal) is completed.

符号化処理を終えると、符号化装置1(多重化部17)は、符号化されたオーディオ信号(オーディオデータ)にヘッダ情報等を付加した符号化ストリームを生成して出力する。   When the encoding process is completed, the encoding device 1 (multiplexer 17) generates and outputs an encoded stream in which header information or the like is added to the encoded audio signal (audio data).

本実施形態で算出する欠落SFB変動率Vsfbは、現時点の符号化対象のフレームにおいて欠落する帯域における、3つの連続するフレームで欠落する帯域sfbの数の割合である。そのため、複数のフレームで連続して欠落する帯域の割合が大きいほど、欠落SFB変動率Vsfbが大きくなる。すなわち、複数のフレームで連続して欠落する帯域の割合が小さいほど、欠落SFB変動率Vsfbは小さくなる。   The missing SFB fluctuation rate Vsfb calculated in the present embodiment is a ratio of the number of bands sfb missing in three consecutive frames in the missing bands in the current encoding target frame. Therefore, the missing SFB fluctuation rate Vsfb increases as the proportion of the band missing continuously in a plurality of frames increases. That is, the smaller the proportion of bands that are continuously missing in a plurality of frames, the smaller the missing SFB fluctuation rate Vsfb.

周波数スペクトルのピーク位置(電力値のパターン)が激しく変化するオーディオ信号では、欠落する帯域も激しく変化するため、連続する数フレームにおいて欠落する帯域はフレーム毎にばらばらである。そのため、周波数スペクトルのピーク位置が激しく変化するオーディオ信号を、欠落を許容する条件で補正したマスキング閾値を用いて量子化すると、例えば、連続して聞こえる原音が途切れて聞こえる等の音質の劣化につながる。よって、この種のオーディオ信号を量子化する際には、帯域の欠落を許容しない条件で補正したマスキング閾値を用いて量子化することが好ましい。   In an audio signal in which the peak position (power value pattern) of the frequency spectrum changes drastically, the missing band also changes drastically, and therefore, the missing band in several consecutive frames varies from frame to frame. Therefore, quantizing an audio signal whose frequency spectrum peak position changes drastically using a masking threshold value corrected under conditions that allow omissions, for example, leads to deterioration in sound quality such that the original sound that is continuously heard is interrupted. . Therefore, when this type of audio signal is quantized, it is preferable to quantize using a masking threshold corrected under conditions that do not allow band loss.

周波数スペクトルのピーク位置が激しく変化し連続する数フレームにおいて欠落する帯域がばらばらのオーディオ信号は、複数のフレームで連続して欠落する帯域の割合が小さい。そのため、上記の方法で算出した欠落SFB変動率Vsfbは小さくなる。したがって、本実施形態では、オーディオ信号の欠落SFB変動率Vsfbが所定の閾値THよりも小さい場合、欠落を許容しない条件で補正したマスキング閾値を量子化に用いる。これにより、周波数スペクトルのピーク位置が激しく変化するオーディオ信号は、欠落を許容しない条件で補正したマスキング閾値を用いて量子化することができる。よって、連続して聞こえる原音が符号化後は途切れて聞こえる等の音質の劣化を抑制できる。 An audio signal in which the peak position of the frequency spectrum changes drastically and the bands that are lost in several consecutive frames are separated has a small ratio of the bands that are continuously lost in a plurality of frames. Therefore, the missing SFB fluctuation rate Vsfb calculated by the above method becomes small. Thus, in this embodiment, if the missing SFB variation rate Vsfb audio signal is smaller than a predetermined threshold value TH 1, using the masking threshold corrected under a condition that does not allow missing quantization. As a result, an audio signal whose peak position of the frequency spectrum changes drastically can be quantized using a masking threshold corrected under a condition that does not allow omission. Therefore, it is possible to suppress deterioration in sound quality such that the original sound that can be heard continuously is interrupted after encoding.

一方、欠落を許容しない条件で補正したマスキング閾値は、音質の面で重要な帯域が過度に補正されている。このような過度に補正されたマスキング閾値を用いて量子化すると、知覚可能な量子化誤差が発生しやすく、音質の劣化につながる。このような過度の補正による音質の劣化は、ハープシコード等の周波数スペクトルのピーク位置の変化が緩やかなオーディオ信号、欠落を許容しない条件で補正したマスキング閾値を用いて量子化した場合に顕著となる。   On the other hand, in the masking threshold value corrected under the condition that the omission is not allowed, a band important in terms of sound quality is excessively corrected. If quantization is performed using such an overcorrected masking threshold, a perceptible quantization error is likely to occur, leading to deterioration of sound quality. Such deterioration of sound quality due to excessive correction becomes prominent when quantization is performed using an audio signal in which the peak position of a frequency spectrum such as a harpsichord is moderately changed, or a masking threshold value corrected under conditions that do not allow omission.

周波数スペクトルのピーク位置の変化が緩やかなオーディオ信号は、欠落する帯域の変動も緩やかであり、連続する数フレームに渡って欠落する帯域が多い。そのため、周波数スペクトルのピーク位置の変化が緩やかなオーディオ信号は、上記の方法で算出した欠落SFB変動率Vsfbが大きくなる。本実施形態では、オーディオ信号の欠落SFB変動率Vsfbが所定の閾値TH以上の場合、欠落を許容する条件で補正したマスキング閾値を量子化に用いる。したがって、周波数スペクトルのピーク位置の変化が緩やかなオーディオ信号は、欠落を許容する条件で補正したマスキング閾値を用いて量子化される。よって、音質的に重要な帯域のマスキング閾値が過度に補正されることによる音質の劣化を抑制できる。 An audio signal with a gradual change in the peak position of the frequency spectrum has a gradual fluctuation in the missing band, and there are many missing bands over several consecutive frames. For this reason, an audio signal with a gradual change in the peak position of the frequency spectrum has a large missing SFB fluctuation rate Vsfb calculated by the above method. In this embodiment, if the missing SFB variation rate Vsfb of the audio signal of a predetermined threshold value TH 1 or more, using the masking threshold corrected in conditions permitting missing quantization. Therefore, an audio signal with a gradual change in the peak position of the frequency spectrum is quantized using a masking threshold value corrected under conditions that allow omission. Therefore, it is possible to suppress deterioration in sound quality due to excessive correction of the masking threshold of a band important for sound quality.

上記のマスキング閾値の補正処理について、図4A及び図4Bを参照しながら具体的に説明する。   The masking threshold value correction process will be specifically described with reference to FIGS. 4A and 4B.

図4Aは、第1の補正部で補正されたマスキング閾値と周波数スペクトルとの関係の一例を示すグラフである。   FIG. 4A is a graph showing an example of the relationship between the masking threshold corrected by the first correction unit and the frequency spectrum.

1フレーム分の入力信号に対しステップS10〜S14の処理を行うと、例えば、図4Aに示すような、周波数スペクトルの各帯域sfbの電力値mdct_pow(sfb)及び初期マスキング閾値sfbThr0(sfb)が得られる。なお、図4Aには、T−2フレーム、T−1フレーム、及びTフレームの連続する3フレーム分の周波数スペクトルの各帯域sfbの電力値mdct_pow(sfb)及び初期マスキング閾値sfbThr0(sfb)を示している。この3フレームのうち、下段のTフレームが現時点で符号化対象のフレームである。また、中段のT−1フレームはTフレームの1つ前のフレームであり、上段のT−2フレームはTフレームの2つ前のフレームである。図4Aに示したグラフでは、下段のTフレームと上段のT−2フレームとは電力値mdct_pow(sfb)及び初期マスキング閾値sfbThr0(sfb)の概形がほぼ同じであるが、中断のT−1フレームは概形が全く異なる。 When the processing of steps S10 to S14 is performed on the input signal for one frame, for example, the power value mdct_pow (sfb) and the initial masking threshold value sfbThr 0 (sfb) of each band sfb of the frequency spectrum as shown in FIG. 4A are obtained. can get. In FIG. 4A, the power value mdct_pow (sfb) and the initial masking threshold value sfbThr 0 (sfb) of each band sfb of the frequency spectrum for three consecutive frames of T-2 frame, T-1 frame, and T frame are shown. Show. Of these three frames, the lower T frame is the current frame to be encoded. The middle T-1 frame is a frame immediately before the T frame, and the upper T-2 frame is a frame two frames before the T frame. In the graph shown in FIG. 4A, the lower T frame and the upper T-2 frame have approximately the same shape of the power value mdct_pow (sfb) and the initial masking threshold sfbThr 0 (sfb). The outline of one frame is completely different.

初期マスキング閾値sfbThr0(sfb)は、上記のように、対応する周波数スペクトルの量子化に最適なマスキング閾値である。そのため、ステップS16,S18の処理により初期マスキング閾値sfbThr0(sfb)を用いた量子化が可能であると判定した場合、符号化装置1は、初期マスキング閾値sfbThr0(sfb)を用いて周波数スペクトルを量子化する(ステップS30)。 As described above, the initial masking threshold value sfbThr 0 (sfb) is an optimal masking threshold value for quantization of the corresponding frequency spectrum. Therefore, when it is determined that the quantization using the initial masking threshold sfbThr 0 (sfb) is possible by the processing in steps S16 and S18, the encoding device 1 uses the initial masking threshold sfbThr 0 (sfb) to perform frequency spectrum analysis. Is quantized (step S30).

しかしながら、低ビットレート条件で符号化する場合、すなわち周波数スペクトルの符号化に使用可能なビット数が少ない場合、量子化誤差を初期マスキング閾値以下にできないことが多い。量子化誤差を初期マスキング閾値以下にできない場合、符号化装置1は、ビットレート条件や聴覚特性等に基づいて、音質がなるべく劣化しない範囲でマスキング閾値を大きくする(緩める)補正を行う。   However, when encoding is performed under a low bit rate condition, that is, when the number of bits that can be used for encoding a frequency spectrum is small, the quantization error often cannot be made lower than the initial masking threshold. When the quantization error cannot be made equal to or less than the initial masking threshold, the encoding apparatus 1 performs correction for increasing (relaxing) the masking threshold within a range where the sound quality is not deteriorated as much as possible based on the bit rate condition, auditory characteristics, and the like.

本実施形態の符号化装置1では、上述のように、まず、量子化による帯域の欠落を許容する条件でマスキング閾値を補正する(ステップS22)。この際、図4Aに示した3つのフレームにおける補正後のマスキング閾値(第1の補正閾値)sfbThr1(sfb)は、それぞれ実線の折れ線で示した概形となる。そして、Tフレームの量子化に第1の補正閾値sfbThr1(sfb)を用いるか否かは、欠落SFB変動率Vsfbに基づいて決定する。 In the encoding apparatus 1 according to the present embodiment, as described above, first, the masking threshold is corrected under a condition that allows loss of a band due to quantization (step S22). At this time, the corrected masking threshold values ( first correction threshold values) sfbThr 1 (sfb) in the three frames shown in FIG. 4A have the outlines indicated by the solid broken lines. Whether to use the first correction threshold value sfbThr 1 (sfb) for the quantization of the T frame is determined based on the missing SFB fluctuation rate Vsfb.

Tフレームの量子化に第1の補正閾値sfbThr1(sfb)を用いた場合に欠落する帯域は、sfbThr1(sfb)>mdct_pow(sfb)となる帯域である。図4Aの下段に示した例において、量子化により欠落する帯域は、帯域sfb5、sfb9、及びsfb12の3つである。一方、T−1フレームで欠落するのは帯域sfb3、sfb8であり、T−2フレームで欠落するのは帯域sfb5、sfb9、及びsfb12である。 The band that is lost when the first correction threshold sfbThr 1 (sfb) is used for the quantization of the T frame is a band that satisfies sfbThr 1 (sfb)> mdct_pow (sfb). In the example shown in the lower part of FIG. 4A, there are three bands sfb5, sfb9, and sfb12 that are lost due to quantization. On the other hand, the bands sfb3 and sfb8 are missing in the T-1 frame, and the bands sfb5, sfb9, and sfb12 are missing in the T-2 frame.

T−1フレームでは帯域sfb5及びその前後の帯域sfb4及びsfb6の3つの帯域が欠落していない。また、T−1フレームでは、帯域sfb12及びその前の帯域sfb11が欠落していない。一方、T−1フレームでは帯域sfb9の前の帯域sfb8が欠落しており、T−2フレームでは帯域sfb9が欠落している。すなわち、図4Aに示した例において、Tフレームの欠落する3つの帯域sfb5,sfb9,sfb12のうち、3フレームに渡り連続して欠落していると判断されるのは帯域sfb9のみである。したがって、図4Aに示した例におけるTフレームについての欠落SFB変動率Vsfbは、1/3となる。よって、ステップS26で欠落SFB変動率Vsfbと比較する閾値THが1/3よりも小さい値であれば、ステップS26の判定は「Yes」となり、Tフレームの周波数スペクトルは第1の補正閾値sfbThr1(sfb)を用いて量子化することになる。一方、閾値THが1/3以上の値であれば、ステップS26の判定は「No」となり、Tフレームの周波数スペクトルは第2の補正閾値sfbThr2(sfb)を用いて量子化することになる。 In the T-1 frame, three bands of the band sfb5 and the bands sfb4 and sfb6 before and after the band sfb5 are not missing. In the T-1 frame, the band sfb12 and the previous band sfb11 are not lost. On the other hand, the band sfb8 before the band sfb9 is missing in the T-1 frame, and the band sfb9 is missing in the T-2 frame. That is, in the example shown in FIG. 4A, it is only the band sfb9 that is determined to be continuously missing over three frames among the three bands sfb5, sfb9, and sfb12 in which the T frame is missing. Therefore, the missing SFB fluctuation rate Vsfb for the T frame in the example shown in FIG. 4A is 1/3. Therefore, if a value smaller than the threshold value TH 1 is 1/3 compared to the missing SFB variation rate Vsfb in step S26, the determination in step S26 is "Yes", the frequency spectrum of the T frame first correction threshold sfbThr 1 (sfb) is used for quantization. On the other hand, if the value of the threshold value TH 1 is 1/3 or more, the determination is "No" in step S26, the frequency spectrum of the T frame to be quantized using the second correction threshold sfbThr 2 (sfb) Become.

図4Bは、第2の補正部で補正されたマスキング閾値と周波数スペクトルとの関係の一例を示すグラフである。   FIG. 4B is a graph showing an example of the relationship between the masking threshold corrected by the second correction unit and the frequency spectrum.

第2の補正部142でマスキング閾値を補正した場合の補正されたマスキング閾値sfbThr2(sfb)は、例えば、図4Bに実線の折れ線で示したような概形になる。なお、図4Bには、図4Aの下段に示したTフレームに対する初期マスキング閾値を第2の補正部142で補正した例を示している。また、図4Bには、比較のため第1の補正閾値sfbThr1(sfb)を二点鎖線で示している。 The corrected masking threshold value sfbThr 2 (sfb) when the masking threshold value is corrected by the second correction unit 142 has, for example, an outline as shown by a solid line in FIG. 4B. FIG. 4B shows an example in which the second masking unit 142 corrects the initial masking threshold for the T frame shown in the lower part of FIG. 4A. In FIG. 4B, the first correction threshold value sfbThr 1 (sfb) is indicated by a two-dot chain line for comparison.

第2の補正閾値sfbThr2(sfb)は、帯域の欠落を許容しない条件で補正したマスキング閾値である。したがって、図4Bに示したように、第1の補正閾値では欠落する帯域sfb5、sfb9、及びsfb12を含む全ての帯域で、sfbThr2(sfb)<mdct_pow(sfb)となっている。ただし、帯域sfb5、sfb9、及びsfb12の欠落を防ぐため、これらの帯域のビット数を低減できない分、他の帯域でマスキング閾値の補正量を多くしてビット数を減らしている。そのため、帯域sfb1及びsfb2についてのマスキング閾値が過剰に補正されることとなる。 The second correction threshold value sfbThr 2 (sfb) is a masking threshold value corrected under a condition that does not allow band loss. Therefore, as shown in FIG. 4B, sfbThr 2 (sfb) <mdct_pow (sfb) is satisfied in all the bands including the bands sfb5, sfb9, and sfb12 that are missing in the first correction threshold. However, in order to prevent the loss of the bands sfb5, sfb9, and sfb12, the number of bits in these bands cannot be reduced, and the number of bits is reduced by increasing the masking threshold correction amount in other bands. Therefore, the masking threshold for the bands sfb1 and sfb2 is excessively corrected.

オーディオ信号の符号化においては、初期マスキング閾値を用いて量子化することが理想的である。そのため、マスキング閾値を補正する場合、補正後のマスキング閾値の概形と初期マスキング閾値の概形との類似度が高くなるようにすることが好ましい。しかしながら、帯域の欠落を許容しない条件でマスキング閾値を補正した場合、図4Bに示したように、初期マスキング閾値との概形の類似度のずれが大きくなる。よって、周波数スペクトルのピーク位置の変動が緩やかなオーディオ信号の場合、例えば図4BのTフレームと似たスペクトルパターンが続くオーディオ信号の場合、過剰に補正された帯域での量子化誤差が知覚されるようになり、音質の劣化につながる。そのため、周波数スペクトルのピーク位置の変動が緩やかで欠落SFB変動率Vsfbが閾値THより大きい場合、欠落を許容する条件で補正したマスキング閾値を用いて量子化する。これにより、帯域の欠落を許容しない条件で補正したマスキング閾値を用いた量子化した場合に生じうる音質の劣化を抑制する。 In encoding an audio signal, it is ideal to quantize using an initial masking threshold. Therefore, when correcting the masking threshold, it is preferable that the similarity between the outline of the corrected masking threshold and the outline of the initial masking threshold is high. However, when the masking threshold is corrected under a condition that does not allow the loss of the band, as shown in FIG. 4B, the deviation of the approximate similarity with the initial masking threshold increases. Therefore, in the case of an audio signal in which the fluctuation of the peak position of the frequency spectrum is gentle, for example, in the case of an audio signal in which a spectrum pattern similar to the T frame in FIG. 4B continues, a quantization error in an excessively corrected band is perceived. It leads to deterioration of sound quality. Therefore, fluctuation gentle missing SFB volatility Vsfb the peak position of the frequency spectrum is greater than the threshold value TH 1, is quantized using the masking threshold corrected in conditions permitting missing. This suppresses deterioration in sound quality that may occur when quantization is performed using a masking threshold corrected under conditions that do not allow band loss.

上記のような符号化処理を行う本実施形態の符号化装置1は、例えばコンピュータと、コンピュータに上記の符号化処理を実行させるプログラムとにより実現可能である。以下、コンピュータとプログラムにより実現される符号化装置1について、図5を参照しながら説明する。   The encoding apparatus 1 of the present embodiment that performs the encoding process as described above can be realized by, for example, a computer and a program that causes the computer to execute the encoding process. Hereinafter, the encoding apparatus 1 realized by a computer and a program will be described with reference to FIG.

図5は、符号化装置として動作させるコンピュータのハードウェア構成の例を示す模式図である。   FIG. 5 is a schematic diagram illustrating an example of a hardware configuration of a computer that operates as an encoding apparatus.

図5に示すように、符号化装置として動作させるコンピュータ5は、Central Processing Unit(CPU)50と、主記憶装置51と、補助記憶装置52と、入力装置53と、出力装置54と、を備える。また、コンピュータ5は、Digital Signal Processor(DSP)55と、記憶媒体駆動装置56と、インタフェース装置57と、を更に備える。コンピュータ5におけるこれらの要素50〜57は、バス59により相互に接続されており、要素間でのデータの受け渡しが可能になっている。   As shown in FIG. 5, the computer 5 that operates as an encoding device includes a Central Processing Unit (CPU) 50, a main storage device 51, an auxiliary storage device 52, an input device 53, and an output device 54. . The computer 5 further includes a digital signal processor (DSP) 55, a storage medium driving device 56, and an interface device 57. These elements 50 to 57 in the computer 5 are connected to each other by a bus 59 so that data can be exchanged between the elements.

CPU 50は、オペレーティングシステムを含む各種のプログラムを実行することによりコンピュータ5の全体の動作を制御する演算処理装置である。   The CPU 50 is an arithmetic processing unit that controls the overall operation of the computer 5 by executing various programs including an operating system.

主記憶装置51は、Read Only Memory(ROM)51a及びRandom Access Memory(RAM)51bを有する。ROM 51aには、例えばコンピュータ5の起動時にCPU 50が読み出す所定の基本制御プログラム等が予め記録されている。また、RAM 51bは、CPU 50が各種のプログラムを実行する際に、必要に応じて作業用記憶領域として使用する。本実施形態においては、例えば符号化するオーディオ信号、マスキング閾値等の一時的な記憶にRAM 51bを使用する。   The main storage device 51 includes a read only memory (ROM) 51a and a random access memory (RAM) 51b. In the ROM 51a, for example, a predetermined basic control program read by the CPU 50 when the computer 5 is started is recorded in advance. The RAM 51b is used as a working storage area as necessary when the CPU 50 executes various programs. In the present embodiment, the RAM 51b is used for temporary storage of, for example, an audio signal to be encoded and a masking threshold.

補助記憶装置52は、Hard Disk Drive(HDD)やSolid State Drive(SSD)等の主記憶装置51に比べて大容量の記憶装置である。補助記憶装置52には、CPU 50によって実行される各種のプログラムや各種のデータ等を記憶させる。補助記憶装置52に記憶させるプログラムとしては、例えば、オーディオ信号の符号化や再生を行うオーディオプレイヤーのプログラムが挙げられる。また、補助記憶装置52に記憶させるデータとしては、例えば、上記のプレイヤーにより符号化されたオーディオ信号のデータが挙げられる。   The auxiliary storage device 52 is a storage device with a larger capacity than the main storage device 51 such as a hard disk drive (HDD) or a solid state drive (SSD). The auxiliary storage device 52 stores various programs executed by the CPU 50, various data, and the like. Examples of the program stored in the auxiliary storage device 52 include an audio player program that encodes and reproduces an audio signal. The data stored in the auxiliary storage device 52 includes, for example, audio signal data encoded by the player.

入力装置53は、例えばキーボード装置やマウス装置であり、コンピュータ5のオペレータにより操作されると、その操作内容に対応付けられている入力情報をCPU 50に送信する。   The input device 53 is, for example, a keyboard device or a mouse device. When the input device 53 is operated by an operator of the computer 5, the input device 53 transmits input information associated with the operation content to the CPU 50.

出力装置54は、例えば液晶ディスプレイやスピーカである。液晶ディスプレイは、CPU 50等から送信される表示データに従って各種のテキスト、画像等を表示する。また、スピーカは、CPU 50やDSP 55等から送信される音声データやオーディオデータを出力する。   The output device 54 is, for example, a liquid crystal display or a speaker. The liquid crystal display displays various texts, images, and the like according to display data transmitted from the CPU 50 or the like. The speaker outputs audio data and audio data transmitted from the CPU 50, DSP 55, and the like.

DSP 55は、CPU 50からの制御信号等に従ってオーディオ信号の符号化処理、復号化(再生)処理等を行う演算処理装置である。   The DSP 55 is an arithmetic processing unit that performs audio signal encoding processing, decoding (reproduction) processing, and the like in accordance with control signals from the CPU 50.

記憶媒体駆動装置56は、図示しない可搬型記憶媒体に記録されているプログラムやデータの読み出し、補助記憶装置52に記憶されたデータ等の可搬型記憶媒体への書き込みを行う。可搬型記憶媒体としては、例えば、USB規格のコネクタが備えられているフラッシュメモリが利用可能である。また、可搬型記憶媒体としては、Compact Disk(CD)、Digital Versatile Disc(DVD)、Blu-ray Disc(Blu-rayは登録商標)等の光ディスクも利用可能である。   The storage medium driving device 56 reads programs and data recorded in a portable storage medium (not shown) and writes data stored in the auxiliary storage device 52 to the portable storage medium. As the portable storage medium, for example, a flash memory equipped with a USB standard connector can be used. Further, as a portable storage medium, an optical disc such as a Compact Disk (CD), a Digital Versatile Disc (DVD), and a Blu-ray Disc (Blu-ray is a registered trademark) can be used.

インタフェース装置57は、例えばオーディオ入出力装置や通信制御装置である。オーディオ入出力装置は、例えばコンピュータ5とマイクやオーディオ装置とを接続してオーディオ信号の入力や出力を行う。通信制御装置は、コンピュータ5とインターネット等の通信ネットワークとを通信可能に接続し、通信ネットワークを介した外部通信装置等との通信によりオーディオデータ等の送受信を行う。   The interface device 57 is, for example, an audio input / output device or a communication control device. The audio input / output device inputs and outputs an audio signal by connecting the computer 5 to a microphone or an audio device, for example. The communication control device communicatively connects the computer 5 and a communication network such as the Internet, and transmits and receives audio data and the like by communication with an external communication device or the like via the communication network.

このコンピュータ5は、CPU 50が補助記憶装置52から上述した符号化処理を含むプログラムを読み出し、DSP 55、主記憶装置51、補助記憶装置52等と協働してオーディオ信号の符号化処理を実行する。この際、CPU 50は、符号化処理における演算処理をDSP 55に実行させる。DSP 55は、オーディオ信号を周波数スペクトルに変換し、初期マスキング閾値を生成する。オーディオ信号は、例えば音楽CD等の可搬型記憶媒体から読み出して入力してもよいし、インタフェース装置57を介した通信でコンピュータ5に入力してもよい。また、DSP 55は、初期PE値及び目標PE値を算出し、それらの大小関係から初期マスキング閾値を用いたオーディオ信号の量子化が可能か否かを判定する。そして、初期マスキング閾値を用いて量子化することができない場合、DSP 55は、聴覚特性を算出し、量子化による帯域の欠落を許容する条件でマスキング閾値を補正する。更に、DSP 55は、補正されたマスキング閾値(第1の補正閾値)に基づいて欠落SFB変動率Vsfbを算出し、第1の補正閾値を量子化に用いるか否かを判定する。そして、第1の補正閾値を量子化に用いると決定した場合、第1の補正閾値を用いて周波数スペクトルを量子化する。一方、第1の補正閾値を量子化に用いないと決定した場合、帯域の欠落を許容しない条件で初期マスキング閾値を補正し、補正後のマスキング閾値を用いて周波数スペクトルを量子化する。また、量子化の後、DSP 55は、続けて符号化及び多重化を行う。加えて、DSP 55は、上記の処理の実行中、初期マスキング閾値、目標PE値、及び聴覚特性(信号対マスク比)等をRAM 51bや補助記憶装置52に記憶させる処理、及びRAM 51bや補助記憶装置52から読み出す処理を行う。   In this computer 5, the CPU 50 reads out the program including the above-described encoding process from the auxiliary storage device 52, and executes the encoding process of the audio signal in cooperation with the DSP 55, the main storage device 51, the auxiliary storage device 52, and the like. To do. At this time, the CPU 50 causes the DSP 55 to execute arithmetic processing in the encoding process. The DSP 55 converts the audio signal into a frequency spectrum and generates an initial masking threshold. The audio signal may be read from a portable storage medium such as a music CD, for example, or may be input to the computer 5 by communication via the interface device 57. Further, the DSP 55 calculates an initial PE value and a target PE value, and determines whether or not the audio signal can be quantized using the initial masking threshold from the magnitude relationship between them. If the quantization cannot be performed using the initial masking threshold, the DSP 55 calculates the auditory characteristic and corrects the masking threshold under a condition that allows the lack of a band due to the quantization. Further, the DSP 55 calculates the missing SFB fluctuation rate Vsfb based on the corrected masking threshold (first correction threshold), and determines whether or not the first correction threshold is used for quantization. When it is determined that the first correction threshold is used for quantization, the frequency spectrum is quantized using the first correction threshold. On the other hand, when it is determined that the first correction threshold value is not used for quantization, the initial masking threshold value is corrected under a condition that does not allow band loss, and the frequency spectrum is quantized using the corrected masking threshold value. Further, after quantization, the DSP 55 performs encoding and multiplexing. In addition, the DSP 55 stores the initial masking threshold, the target PE value, the auditory characteristic (signal-to-mask ratio), and the like in the RAM 51b and the auxiliary storage device 52, and the RAM 51b and auxiliary during the above processing. Processing to read from the storage device 52 is performed.

コンピュータ5で符号化したオーディオ信号のデータ(オーディオデータ)は、例えば、補助記憶装置52に記憶させておき、必要に応じてコンピュータ5で復号化(再生)する。また、インタフェース装置57として通信制御装置を備えたコンピュータ5であれば、例えば、オーディオデータを、通信ネットワークを介して他のコンピュータ等に提供(配信)することができる。   Audio signal data (audio data) encoded by the computer 5 is stored in, for example, the auxiliary storage device 52, and is decoded (reproduced) by the computer 5 as necessary. Further, if the computer 5 includes a communication control device as the interface device 57, for example, audio data can be provided (distributed) to another computer or the like via a communication network.

なお、符号化装置1として用いるコンピュータ5は、図5に示した構成に限らず、CPU 50においてオーディオ信号の符号化処理を行う構成であってもよい。また、符号化装置1として用いるコンピュータ5は、種々のプログラムを実行することにより複数の機能を実現する汎用型のものに限らず、オーディオ信号の符号化、復号化に特化されたオーディオ装置でもよい。   Note that the computer 5 used as the encoding device 1 is not limited to the configuration shown in FIG. 5, and may be configured such that the CPU 50 performs audio signal encoding processing. In addition, the computer 5 used as the encoding device 1 is not limited to a general-purpose computer that realizes a plurality of functions by executing various programs, but may be an audio device specialized for encoding and decoding audio signals. Good.

以上説明したように、第1の実施形態によれば、量子化に用いるマスキング閾値を補正する際に、まず、第1の補正部141において量子化による帯域の欠落を許容する条件でマスキング閾値を補正する。そして、第1の補正部141で補正したマスキング閾値を量子化に用いた場合に欠落する帯域sfbの変動率(時間連続性)に基づいて、帯域の欠落を許容する条件及び許容しない条件のいずれの条件で補正したマスキング閾値を量子化に用いるか決定する。そのため、符号化対象のオーディオ信号の特性に応じて、帯域の欠落を許容して補正したマスキングと許容しない補正したマスキング閾値のうち音質が劣化しにくいほうのマスキング閾値を用いて量子化することができる。例えば、周波数スペクトルのピーク位置の変動が激しいオーディオ信号を符号化する場合には欠落を許容しない条件で補正したマスキング閾値を用いて量子化することで、連続音の途切れ等による音質の劣化を抑制できる。一方、周波数スペクトルのピーク位置の変動が緩やかなオーディオ信号を符号化する場合には欠落を許容する条件で補正したマスキング閾値を用いて量子化することで、マスキング閾値が過剰に補正され量子化誤差が大きくなることによる音質の劣化を抑制できる。   As described above, according to the first embodiment, when the masking threshold used for quantization is corrected, first, the masking threshold is set under the condition that the first correction unit 141 allows the loss of the band due to quantization. to correct. Then, based on the fluctuation rate (time continuity) of the band sfb that is lost when the masking threshold corrected by the first correction unit 141 is used for quantization, either of the conditions that allow the band to be lost or the conditions that do not allow it It is determined whether the masking threshold corrected under the above conditions is used for quantization. Therefore, it is possible to perform quantization using a masking threshold value that is less susceptible to deterioration in sound quality, between masking corrected by allowing band loss and corrected masking threshold not allowed depending on the characteristics of the audio signal to be encoded. it can. For example, when encoding an audio signal with significant fluctuations in the peak position of the frequency spectrum, it is quantized using a masking threshold corrected under conditions that do not allow omissions, thereby suppressing deterioration in sound quality due to continuous sound interruptions, etc. it can. On the other hand, when encoding an audio signal with a gradual fluctuation in the peak position of the frequency spectrum, quantization is performed using the masking threshold corrected under the conditions that allow omission, so that the masking threshold is excessively corrected, resulting in quantization error. It is possible to suppress deterioration of sound quality due to an increase in.

また、帯域の欠落を許容する条件で補正したマスキング閾値と、欠落を許容しない条件で補正したマスキング閾値とのどちらを量子化に用いるかを、欠落SFB変動率Vsfbに基づいて判定している。欠落SFB変動率Vsfbは、上記のように、現時点の符号化対象のフレームにおいて欠落する帯域sfbのうち数フレームの間連続して欠落する帯域の割合である。そのため、入力信号(オーディオ信号)の特性等を解析することなく、帯域の欠落を許容する条件で補正したマスキング閾値と、欠落を許容しない条件で補正したマスキング閾値とのどちらを量子化に用いるかを容易に判定することができる。   Further, it is determined based on the missing SFB fluctuation rate Vsfb which one of the masking threshold corrected under the condition allowing the loss of the band and the masking threshold corrected under the condition not allowing the missing is used for the quantization. As described above, the missing SFB fluctuation rate Vsfb is a ratio of a band that is continuously lost for several frames out of the band sfb that is missing in the current encoding target frame. For this reason, which of the masking threshold value corrected under conditions that allow band loss and the masking threshold value corrected under conditions that do not allow loss are used for quantization without analyzing the characteristics of the input signal (audio signal) or the like? Can be easily determined.

更に、本実施形態では、符号化処理の最中に、符号化装置1がリアルタイムかつ自動的に、欠落を許容するマスキング閾値と許容しないマスキング閾値とのどちらを量子化に用いるかを決定する。また、欠落した帯域の数及び欠落の連続性から算出した欠落SFB変動率に基づいてマスキング閾値を決定するので、少ない計算量で音質劣化をより抑制できるマスキング閾値を決定し、量子化することができる。そのため、本実施形態の符号化装置及び符号化方法は、ライブ放送等の入力されたオーディオ信号を逐次符号化しながら出力(配信)する用途への適用が容易である。   Further, in the present embodiment, during the encoding process, the encoding apparatus 1 automatically determines in real time and automatically whether to use a masking threshold that allows missing or a masking threshold that does not allow for quantization. Also, since the masking threshold is determined based on the missing SFB fluctuation rate calculated from the number of missing bands and the continuity of the missing, it is possible to determine and quantize a masking threshold that can further suppress deterioration in sound quality with a small amount of calculation. it can. Therefore, the encoding apparatus and the encoding method of the present embodiment can be easily applied to a purpose of outputting (distributing) an input audio signal such as a live broadcast while sequentially encoding it.

なお、本実施形態では1つ前のフレーム及び2つ前のフレームについての欠落SFB情報を用いて欠落する帯域の変動率を判定しているが、これに限らず、更に多くのフレームについての欠落SFB情報を用いて欠落する帯域の変動率を判定してもよい。加えて、欠落する帯域の変動率は、欠落する帯域における複数フレームで連続して欠落する帯域の割合に限らず、他の算出方法で算出しても良い。   In the present embodiment, the missing band change rate is determined using the missing SFB information for the previous frame and the previous two frames. However, the present invention is not limited to this, and missing for more frames. The fluctuation rate of the missing band may be determined using the SFB information. In addition, the fluctuation rate of the missing band is not limited to the ratio of the missing band continuously in a plurality of frames in the missing band, and may be calculated by other calculation methods.

また、本実施形態では、図1に示したように、マスキング閾値を補正する補正部として、第1の補正部141と第2の補正部142との2つの補正部を設けている。しかしながら、マスキング閾値の補正は、これに限らず、1つの補正部で行ってもよいことはもちろんである。その場合、マスキング閾値の補正は、1つの初期マスキング閾値に対する1回目の補正は帯域の欠落を許容する条件で行うようにする。一方、補正閾値決定部143から2回目の補正の指示を受けた場合には、帯域の欠落を許容しない条件で行うようにする。   In the present embodiment, as illustrated in FIG. 1, two correction units including a first correction unit 141 and a second correction unit 142 are provided as correction units that correct the masking threshold. However, the correction of the masking threshold is not limited to this, and it is needless to say that the correction may be performed by one correction unit. In that case, the correction of the masking threshold is performed under the condition that the first correction for one initial masking threshold is allowed to lack a band. On the other hand, when the second correction instruction is received from the correction threshold value determination unit 143, it is performed under a condition that does not allow the loss of the band.

また、ステップS20で算出する聴覚特性は、信号対マスク比に限らず、他の特性であってもよい。   Further, the auditory characteristic calculated in step S20 is not limited to the signal-to-mask ratio, and may be another characteristic.

更に、符号化装置1は、図1に示したようなオーディオ信号の符号化のみを行う装置に限らず、映像信号の符号化を行う装置であってもよい。映像信号の符号化を行う装置では、図1に示した構成に加え、動画像の符号化を行う構成を備える。このような装置では、入力された映像信号の符号化を動画像の符号化と音声の符号化とに分けて行った後、符号化した動画像と音声とを多重化する。   Furthermore, the encoding apparatus 1 is not limited to an apparatus that only encodes an audio signal as shown in FIG. 1, and may be an apparatus that encodes a video signal. An apparatus for encoding a video signal has a configuration for encoding a moving image in addition to the configuration shown in FIG. In such an apparatus, encoding of an input video signal is divided into moving image encoding and audio encoding, and then the encoded moving image and audio are multiplexed.

[第2の実施形態]
図6は、本発明の第2の実施形態に係る符号化装置の機能ブロック図である。図7は、第2の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。
[Second Embodiment]
FIG. 6 is a functional block diagram of an encoding apparatus according to the second embodiment of the present invention. FIG. 7 is a block diagram illustrating a configuration example of the correction threshold value determination unit in the encoding device according to the second embodiment.

図6に示すように、本実施形態に係る符号化装置1は、ブロック切替部10と、MDCT処理部11と、マスキング閾値生成部12と、聴覚特性算出部13と、マスキング閾値補正部14と、量子化部15と、符号化部16と、多重化部17とを備える。また、本実施形態に係る符号化装置1におけるマスキング閾値補正部14は、第1の補正部141と、第2の補正部142と、補正閾値決定部143とを備える。   As illustrated in FIG. 6, the encoding device 1 according to the present embodiment includes a block switching unit 10, an MDCT processing unit 11, a masking threshold generation unit 12, an auditory characteristic calculation unit 13, and a masking threshold correction unit 14. A quantization unit 15, an encoding unit 16, and a multiplexing unit 17. Further, the masking threshold correction unit 14 in the encoding device 1 according to the present embodiment includes a first correction unit 141, a second correction unit 142, and a correction threshold determination unit 143.

本実施形態におけるこれらの構成要素の機能は、第1の実施形態で説明したとおりである。ただし、第1の実施形態とは異なり、補正閾値決定部143には、第1の補正部141で補正したマスキング閾値(第1の補正閾値)sfbThr1(sfb)と、第2の補正部142で補正したマスキング閾値(第2の補正閾値)sfbThr2(sfb)とが入力される。そして、補正閾値決定部143は、第1の補正閾値sfbThr1(sfb)と第2の補正閾値sfbThr2(sfb)とのどちらを量子化に用いるかを決定した後、量子化に用いるほうの補正閾値のみを量子化部15に渡す。 The functions of these components in the present embodiment are as described in the first embodiment. However, unlike the first embodiment, the correction threshold value determination unit 143 includes a masking threshold value (first correction threshold value) sfbThr 1 (sfb) corrected by the first correction unit 141, and a second correction unit 142. And the masking threshold value (second correction threshold value) sfbThr 2 (sfb) corrected in step. Then, the correction threshold value determination unit 143 determines which one of the first correction threshold value sfbThr 1 (sfb) and the second correction threshold value sfbThr 2 (sfb) is used for quantization, and then uses it for quantization. Only the correction threshold value is passed to the quantization unit 15.

本実施形態における補正閾値決定部143は、図7に示すように、欠落SFB変動率算出部143aと、欠落SFB情報保持部143bと、判定部143cと、を有する。このうち、欠落SFB変動率算出部143a及び欠落SFB情報保持部143bは、第1の実施形態で説明したとおりである。一方、判定部143cは、第1の補正部141で補正した第1の補正閾値sfbThr1(sfb)、及び欠落SFB変動率算出部143aで算出した欠落SFB変動率Vsfbに加え、第2の補正部142で補正した第2の補正閾値sfbThr2(sfb)が入力される。判定部143cは、欠落SFB変動率Vsfbと閾値THとに基づいて第1の補正閾値sfbThr1(sfb)を採用すると判定した場合、第1の補正閾値を量子化部15に渡す。一方、第1の補正閾値sfbThr1(sfb)を採用しないと判定した場合、第2の補正閾値sfbThr2(sfb)を量子化部15に渡す。 As illustrated in FIG. 7, the correction threshold value determination unit 143 according to the present embodiment includes a missing SFB fluctuation rate calculation unit 143a, a missing SFB information holding unit 143b, and a determination unit 143c. Among these, the missing SFB fluctuation rate calculation unit 143a and the missing SFB information holding unit 143b are as described in the first embodiment. On the other hand, in addition to the first correction threshold sfbThr 1 (sfb) corrected by the first correction unit 141 and the missing SFB fluctuation rate Vsfb calculated by the missing SFB fluctuation rate calculation unit 143a, the determination unit 143c performs the second correction. The second correction threshold value sfbThr 2 (sfb) corrected by the unit 142 is input. When determining that the first correction threshold value sfbThr 1 (sfb) is to be adopted based on the missing SFB fluctuation rate Vsfb and the threshold value TH 1 , the determination unit 143 c passes the first correction threshold value to the quantization unit 15. On the other hand, when it is determined that the first correction threshold value sfbThr 1 (sfb) is not adopted, the second correction threshold value sfbThr 2 (sfb) is passed to the quantization unit 15.

本実施形態の符号化装置1を用いた符号化処理では、まず、図3Aに示したステップS10〜ステップS16の処理、及びステップS18の判定を行う。そして、初期PE値が目標PE値以下の場合(ステップS18;No)、図3Cに示したように、初期マスキング閾値sfbThr0(sfb)を用いて周波数スペクトルを量子化する(ステップS30)。 In the encoding process using the encoding apparatus 1 of the present embodiment, first, the processes in steps S10 to S16 and the determination in step S18 shown in FIG. 3A are performed. When the initial PE value is equal to or less than the target PE value (step S18; No), as shown in FIG. 3C, the frequency spectrum is quantized using the initial masking threshold sfbThr 0 (sfb) (step S30).

一方、初期PE値が目標PE値よりも大きい場合(ステップS18;Yes)、本実施形態の符号化装置1では、続けて、図8に示したマスキング閾値の補正処理を行う。なお、マスキング閾値の補正処理を行う場合、マスキング閾値生成部12は、聴覚特性算出部13に初期マスキング閾値sfbThr0(sfb)を渡す。また、初期マスキング閾値生成部12は、マスキング閾値補正部14の第1の補正部141及び第2の補正部142のそれぞれに、初期マスキング閾値及び目標PE値を渡す。 On the other hand, when the initial PE value is larger than the target PE value (step S18; Yes), the encoding apparatus 1 according to the present embodiment subsequently performs the masking threshold value correction process shown in FIG. When the masking threshold value correction process is performed, the masking threshold value generation unit 12 passes the initial masking threshold value sfbThr 0 (sfb) to the auditory characteristic calculation unit 13. In addition, the initial masking threshold value generation unit 12 passes the initial masking threshold value and the target PE value to the first correction unit 141 and the second correction unit 142 of the masking threshold value correction unit 14, respectively.

図8は、第2の実施形態に係る符号化処理におけるマスキング閾値の補正処理の手順を示すフローチャートである。   FIG. 8 is a flowchart illustrating a procedure of masking threshold correction processing in the encoding processing according to the second embodiment.

マスキング閾値の補正処理では、図8に示すように、まず、周波数スペクトル等に基づき聴覚特性を算出する(ステップS20)。ステップS20は、聴覚特性算出部13が行う。聴覚特性算出部13は、聴覚特性として信号対マスク比を算出し、第1の補正部141及び第2の補正部142に渡す。   In the masking threshold correction process, as shown in FIG. 8, first, auditory characteristics are calculated based on a frequency spectrum or the like (step S20). Step S20 is performed by the auditory characteristic calculation unit 13. The auditory characteristic calculation unit 13 calculates a signal-to-mask ratio as the auditory characteristic and passes it to the first correction unit 141 and the second correction unit 142.

次に、符号化装置1のマスキング閾値補正部14が、第1の補正部141によるマスキング閾値の補正と、第2の補正部142によるマスキング閾値の補正とを並行して行う。第1の補正部141は、聴覚特性(信号対マスク比)を受け取ると、帯域の欠落を許容する条件で初期マスキング閾値を補正する(ステップS22)。また、第1の補正部141は、マスキング閾値の補正を終えると、補正したマスキング閾値を補正閾値決定部143の欠落SFB変動率算出部143a及び判定部143cに渡す。すると、欠落SFB変動率算出部143aは、補正されたマスキング閾値sfbThr1(sfb)を用いて欠落SFB変動率Vsfbを算出する(ステップS24)。欠落SFB変動率算出部143aは、第1の実施形態で説明した方法により欠落SFB変動率Vsfbを算出する。そして、欠落SFB変動率算出部143aは、算出した欠落SFB変動率Vsfbを判定部143cに渡す。 Next, the masking threshold correction unit 14 of the encoding device 1 performs the masking threshold correction by the first correction unit 141 and the masking threshold correction by the second correction unit 142 in parallel. When the first correction unit 141 receives the auditory characteristic (signal to mask ratio), the first correction unit 141 corrects the initial masking threshold under a condition that allows the loss of the band (step S22). In addition, when the correction of the masking threshold is completed, the first correction unit 141 passes the corrected masking threshold to the missing SFB fluctuation rate calculation unit 143a and the determination unit 143c of the correction threshold determination unit 143. Then, the missing SFB fluctuation rate calculation unit 143a calculates the missing SFB fluctuation rate Vsfb using the corrected masking threshold sfbThr 1 (sfb) (step S24). The missing SFB fluctuation rate calculation unit 143a calculates the missing SFB fluctuation rate Vsfb by the method described in the first embodiment. Then, the missing SFB fluctuation rate calculation unit 143a passes the calculated missing SFB fluctuation rate Vsfb to the determination unit 143c.

一方、第2の補正部142は、聴覚特性(信号対マスク比)を受け取ると、帯域の欠落を許容する条件で初期マスキング閾値を補正する(ステップS28)。また、第2の補正部142は、マスキング閾値の補正を終えると、補正したマスキング閾値を補正閾値決定部143の判定部143cに渡す。   On the other hand, when the second correction unit 142 receives the auditory characteristic (signal-to-mask ratio), the second correction unit 142 corrects the initial masking threshold under a condition that allows loss of the band (step S28). In addition, when the correction of the masking threshold is completed, the second correction unit 142 passes the corrected masking threshold to the determination unit 143c of the correction threshold determination unit 143.

判定部143cは、第1の補正閾値sfbThr1(sfb)、第2の補正閾値sfbThr2(sfb)、及び欠落SFB変動率Vsfbを受け取ると、欠落SFB変動率Vsfbと閾値THとを比較する(ステップS26)。そして、Vsfb>THの場合(ステップS26;Yes)、判定部143cは、第1の補正閾値sfbThr(sfb)を採用すると判定し、第1の補正閾値を量子化部15に渡す。これにより、量子化に用いるマスキング閾値が第1の補正閾値sfbThr1(sfb)に決定する。よって、量子化部15は、図3Cに示したように、第1の補正閾値、すなわち帯域の欠落を許容する条件で補正したマスキング閾値を用いて周波数スペクトルを量子化する(ステップS32)。 Determining unit 143c, the first correction threshold sfbThr 1 (sfb), a second correction threshold sfbThr 2 (sfb), and receives the missing SFB volatility Vsfb, comparing the missing SFB volatility Vsfb with the threshold TH 1 (Step S26). If Vsfb> TH 1 (step S26; Yes), the determination unit 143c determines that the first correction threshold value sfbThr 1 (sfb) is adopted, and passes the first correction threshold value to the quantization unit 15. Thereby, the masking threshold value used for quantization is determined to be the first correction threshold value sfbThr 1 (sfb). Therefore, as illustrated in FIG. 3C, the quantization unit 15 quantizes the frequency spectrum using the first correction threshold, that is, the masking threshold corrected under the condition that allows the loss of the band (step S <b> 32).

一方、Vsfb≦THの場合(ステップS26;No)、判定部143cは、第2の補正閾値sfbThr2(sfb)を量子化に用いると判定し、第2の補正閾値を量子化部15に渡す。これにより、量子化に用いるマスキング閾値が第2の補正閾値sfbThr2(sfb)に決定する。よって、量子化部15は、図3Cに示したように、第2の補正閾値、すなわち帯域の欠落を許容しない条件で補正したマスキング閾値を用いて周波数スペクトルを量子化する(ステップS34)。 On the other hand, when Vsfb ≦ TH 1 (step S26; No), the determination unit 143c determines that the second correction threshold value sfbThr 2 (sfb) is used for quantization, and the second correction threshold value is input to the quantization unit 15. hand over. Thereby, the masking threshold value used for quantization is determined to be the second correction threshold value sfbThr 2 (sfb). Therefore, as illustrated in FIG. 3C, the quantization unit 15 quantizes the frequency spectrum using the second correction threshold, that is, the masking threshold corrected under a condition that does not allow band loss (step S <b> 34).

こうして初期マスキング閾値sfbThr0(sfb)、第1の補正閾値sfbThr1(sfb)、及び第2の補正閾値sfbThr2(sfb)のいずれかを用いた周波数スペクトルを量子化すると、量子化部15は、量子化された値を符号化部16に渡す。すると、符号化部16は、図3Cに示したように、固定ハフマン符号化等の既知の符号化方法を用いて、量子化された値を符号化する(ステップS36)。そして、符号化を終えると、符号化部16は、符号化したデータを多重化部17に渡す。これにより、入力信号(オーディオ信号)の1フレーム分の符号化処理が終了する。 When the frequency spectrum using any one of the initial masking threshold value sfbThr 0 (sfb), the first correction threshold value sfbThr 1 (sfb), and the second correction threshold value sfbThr 2 (sfb) is thus quantized, the quantization unit 15 Then, the quantized value is passed to the encoding unit 16. Then, the encoding unit 16 encodes the quantized value using a known encoding method such as fixed Huffman encoding as shown in FIG. 3C (step S36). When the encoding is completed, the encoding unit 16 passes the encoded data to the multiplexing unit 17. Thereby, the encoding process for one frame of the input signal (audio signal) is completed.

符号化処理を終えると、符号化装置1(多重化部17)は、符号化されたオーディオ信号(オーディオデータ)にヘッダ情報等を付加した符号化ストリームを生成して出力する。   When the encoding process is completed, the encoding device 1 (multiplexer 17) generates and outputs an encoded stream in which header information or the like is added to the encoded audio signal (audio data).

このように、本実施形態の符号化装置1における符号化処理においても、量子化に用いるマスキング閾値を補正する際に、帯域の欠落を許容する条件及び許容しない条件のいずれの条件で補正したマスキング閾値を量子化に用いるか決定する。この際、符号化装置1は、第1の実施形態と同様、帯域の欠落を許容する条件で補正したマスキング閾値を量子化に用いた場合に欠落する帯域sfbの変動率(時間連続性)に基づいて、帯域の欠落を許容するか否かを決定する。そのため、符号化対象のオーディオ信号の特性に応じて、帯域の欠落を許容して補正したマスキングと許容しない補正したマスキング閾値のうち音質が劣化しにくいほうのマスキング閾値を用いて量子化することができる。   As described above, also in the encoding process in the encoding apparatus 1 of the present embodiment, when correcting the masking threshold used for quantization, masking corrected under any of the conditions allowing or not allowing band loss is performed. Decide whether to use the threshold for quantization. At this time, as in the first embodiment, the encoding device 1 uses the fluctuation rate (time continuity) of the band sfb that is lost when the masking threshold corrected under the condition that allows band loss is used for quantization. Based on this, it is determined whether or not to allow a loss of bandwidth. Therefore, it is possible to perform quantization using a masking threshold value that is less susceptible to deterioration in sound quality, between masking corrected by allowing band loss and corrected masking threshold not allowed depending on the characteristics of the audio signal to be encoded. it can.

また、本実施形態では、初期マスキング閾値を補正する場合、第1の補正部141における欠落を許容する条件でのマスキング閾値の補正と、第2の補正部142における欠落を許容しない条件でのマスキング閾値の補正とを並行して行う。そのため、欠落SFB変動率Vsfbと閾値THとの比較(ステップS26)の結果、第2の補正部142で補正したマスキング閾値を量子化に用いると決定した場合に、量子化を速やかに行うことができる。すなわち、本実施形態によれば、第1の補正部141で補正されたマスキング閾値が採用条件を満たしていない場合の符号化処理の遅延を抑制することができる。よって、本実施形態に係る符号化装置及び符号化方法は、AAC-Enhanced Low Delay(AAC−ELD)等の低遅延符号化方式における音質劣化の抑制に適しているといえる。 In this embodiment, when the initial masking threshold value is corrected, the masking threshold value is corrected under the condition that the first correction unit 141 allows the loss and the second correction unit 142 does not allow the deletion. The correction of the threshold value is performed in parallel. Therefore, when it is determined that the masking threshold corrected by the second correction unit 142 is used for quantization as a result of comparison between the missing SFB variation rate Vsfb and the threshold TH 1 (step S26), the quantization is performed quickly. Can do. That is, according to the present embodiment, it is possible to suppress a delay in the encoding process when the masking threshold corrected by the first correction unit 141 does not satisfy the adoption condition. Therefore, it can be said that the encoding apparatus and the encoding method according to the present embodiment are suitable for suppressing deterioration in sound quality in a low delay encoding method such as AAC-Enhanced Low Delay (AAC-ELD).

なお、本実施形態の符号化装置1は、第1の実施形態と同様、コンピュータと、コンピュータに実行させるプログラムにより実現可能である。この際、符号化装置1として動作させるコンピュータは、図5に示したようなハードウェア構成であればよい。また、プログラムは、図3A、図8、及び図3Cに示した符号化処理をコンピュータに実行させる内容であればよい。   Note that the encoding apparatus 1 of the present embodiment can be realized by a computer and a program executed by the computer, as in the first embodiment. At this time, the computer that operates as the encoding apparatus 1 may have a hardware configuration as shown in FIG. Moreover, the program should just be the content which makes a computer perform the encoding process shown to FIG. 3A, FIG. 8, and FIG. 3C.

[第3の実施形態]
図9は、本発明の第3の実施形態に係る符号化装置の機能ブロック図である。図10は、第3の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。
[Third Embodiment]
FIG. 9 is a functional block diagram of an encoding apparatus according to the third embodiment of the present invention. FIG. 10 is a block diagram illustrating a configuration example of the correction threshold value determination unit in the encoding device according to the third embodiment.

図9に示すように、本実施形態に係る符号化装置1は、ブロック切替部10と、MDCT処理部11と、マスキング閾値生成部12と、聴覚特性算出部13と、マスキング閾値補正部14と、量子化部15と、符号化部16と、多重化部17とを備える。また、符号化装置1は、記憶部18を備える。更に、本実施形態に係る符号化装置1におけるマスキング閾値補正部14は、第1の補正部141と、第2の補正部142と、補正閾値決定部144と、を有する。   As illustrated in FIG. 9, the encoding device 1 according to the present embodiment includes a block switching unit 10, an MDCT processing unit 11, a masking threshold generation unit 12, an auditory characteristic calculation unit 13, and a masking threshold correction unit 14. A quantization unit 15, an encoding unit 16, and a multiplexing unit 17. In addition, the encoding device 1 includes a storage unit 18. Furthermore, the masking threshold value correction unit 14 in the encoding device 1 according to the present embodiment includes a first correction unit 141, a second correction unit 142, and a correction threshold value determination unit 144.

本実施形態の符号化装置1において、補正閾値決定部144を除く各部の機能は、第1の実施形態で説明したとおりである。   In the encoding device 1 of the present embodiment, the functions of the respective units other than the correction threshold value determination unit 144 are as described in the first embodiment.

本実施形態における補正閾値決定部144は、図10に示すように、量子化部144aと、欠落MDCT変動率算出部144bと、欠落MDCT情報保持部144cと、判定部144dと、を有する。   As illustrated in FIG. 10, the correction threshold value determination unit 144 according to the present embodiment includes a quantization unit 144a, a missing MDCT fluctuation rate calculation unit 144b, a missing MDCT information holding unit 144c, and a determination unit 144d.

量子化部144aは、ビットレート条件、信号対マスク比、及び第1の補正部141で補正したマスキング閾値sfbThr1(sfb)を用いて周波数スペクトルを量子化する。 The quantization unit 144a quantizes the frequency spectrum using the bit rate condition, the signal-to-mask ratio, and the masking threshold value sfbThr 1 (sfb) corrected by the first correction unit 141.

欠落MDCT変動率算出部144bは、量子化部144aでの量子化の結果と、欠落MDCT情報保持部144cが保持する情報とに基づき、欠落MDCT変動率Vmdctを算出する。欠落MDCT変動率Vmdctは、量子化により欠落した帯域の変動率をMDCT係数単位で算出した値である。この欠落MDCT変動率Vmdctは、現時点の符号化対象のフレーム(Tフレーム)に対する量子化で欠落した帯域における数フレームに渡り連続して欠落している帯域の割合を表す。すなわち、欠落MDCT変動率Vmdctは、第1の実施形態における欠落SFB変動率Vsfbと同様の算出方法で算出する。   The missing MDCT fluctuation rate calculation unit 144b calculates the missing MDCT fluctuation rate Vmdct based on the quantization result in the quantization unit 144a and the information held by the missing MDCT information holding unit 144c. The missing MDCT fluctuation rate Vmdct is a value obtained by calculating the fluctuation rate of the band missing due to quantization in units of MDCT coefficients. This missing MDCT fluctuation rate Vmdct represents a ratio of a band that is continuously missing over several frames in a band that is missing due to quantization with respect to a current encoding target frame (T frame). That is, the missing MDCT fluctuation rate Vmdct is calculated by the same calculation method as the missing SFB fluctuation rate Vsfb in the first embodiment.

欠落MDCT情報保持部144cは、欠落MDCT変動率Vmdctの算出に用いる数フレーム分の欠落MDCT情報を保持する。欠落MDCT情報は、各フレームにおける量子化で欠落した帯域の集合である。なお、欠落MDCT情報における欠落した帯域は、量子化後のMDCT係数単位の帯域である。本実施形態では、欠落MDCT情報保持部144cは、図10に示すように、T−1フレーム(Tフレームの1フレーム前)の欠落MDCT情報と、T−2フレーム(Tフレームの2フレーム前)の欠落MDCT情報とを保持する。   The missing MDCT information holding unit 144c holds missing MDCT information for several frames used for calculating the missing MDCT fluctuation rate Vmdct. Missing MDCT information is a set of bands missing due to quantization in each frame. Note that the missing band in the missing MDCT information is the band of the MDCT coefficient unit after quantization. In the present embodiment, the missing MDCT information holding unit 144c, as shown in FIG. 10, includes missing MDCT information of T-1 frame (one frame before T frame) and T-2 frame (two frames before T frame). Of missing MDCT information.

判定部144dは、算出した欠落MDCT変動率Vmdctに基づいて、量子化する際のマスキング閾値に第1の補正閾値sfbThr1(sfb)を採用するか否かを判定する。判定部144dは、欠落MDCT変動率Vmdctが予め定めた閾値THより大きい場合、量子化する際のマスキング閾値に第1の補正閾値sfbThr1(sfb)を採用すると判定する。すなわち、この場合、判定部144dは、第1の補正閾値を量子化に用いると決定する。この場合、判定部144dは、第1の補正閾値を量子化部15に渡す。 The determination unit 144d determines whether or not to adopt the first correction threshold value sfbThr 1 (sfb) as a masking threshold value for quantization based on the calculated missing MDCT fluctuation rate Vmdct. Determining unit 144d, when the missing MDCT variation rate Vmdct is larger than the threshold TH 2 a predetermined, to adopt a first correction threshold sfbThr masking threshold when quantizing 1 (sfb) determines. That is, in this case, the determination unit 144d determines to use the first correction threshold value for quantization. In this case, the determination unit 144d passes the first correction threshold value to the quantization unit 15.

一方、欠落MDCT変動率Vmdctが閾値TH以下の場合、判定部144dは、第1の補正閾値sfbThr1(sfb)を採用しない、すなわち第2の補正閾値sfbThr2(sfb)を量子化に用いると決定する。この場合、判定部144dは、第2の補正部142に初期マスキング閾値sfbThr0(sfb)を補正させる。 On the other hand, if the missing MDCT variation rate Vmdct the threshold TH 2 or less, the determination unit 144d does not adopt the first correction threshold sfbThr 1 (sfb), used in quantization i.e. second correction threshold sfbThr 2 (sfb) And decide. In this case, the determination unit 144d causes the second correction unit 142 to correct the initial masking threshold value sfbThr 0 (sfb).

このように、本実施形態に係る符号化装置1では、帯域の欠落を許容する条件で補正した第1の補正閾値を用いて周波数スペクトルを量子化し、その結果が所定の条件を満たしている場合、第1の補正閾値を量子化に用いると決定する。一方、第1の補正閾値を用いて量子化した結果が所定の条件を満たしていない場合、帯域の欠落を許容しない条件で補正した第2の補正閾値を量子化に用いると決定する。すなわち、本実施形態に係る符号化装置1では、第1の補正閾値を用いて量子化した周波数スペクトルの値に基づいて、第1の補正閾値及び第2の補正閾値のどちらを量子化に用いるか決定する。   As described above, in the encoding device 1 according to the present embodiment, the frequency spectrum is quantized using the first correction threshold value corrected under a condition that allows band loss, and the result satisfies a predetermined condition. , The first correction threshold is determined to be used for quantization. On the other hand, if the result of quantization using the first correction threshold does not satisfy the predetermined condition, it is determined that the second correction threshold corrected under the condition that does not allow band loss is used for quantization. That is, in the encoding device 1 according to the present embodiment, either the first correction threshold or the second correction threshold is used for quantization based on the value of the frequency spectrum quantized using the first correction threshold. Decide whether or not.

本実施形態の符号化装置1を用いた符号化処理では、まず、図3Aに示したステップS10〜ステップS16の処理、及びステップS18の判定を行う。そして、初期PE値が目標PE値以下の場合(ステップS18;No)、図3Cに示したように、初期マスキング閾値sfbThr0(sfb)を用いて周波数スペクトルを量子化する(ステップS30)。 In the encoding process using the encoding apparatus 1 of the present embodiment, first, the processes in steps S10 to S16 and the determination in step S18 shown in FIG. 3A are performed. When the initial PE value is equal to or less than the target PE value (step S18; No), as shown in FIG. 3C, the frequency spectrum is quantized using the initial masking threshold sfbThr 0 (sfb) (step S30).

一方、初期PE値が目標PE値よりも大きい場合(ステップS18;Yes)、本実施形態の符号化装置1では、続けて、図11に示したマスキング閾値の補正処理を行う。なお、マスキング閾値の補正処理を行う場合、初期マスキング閾値生成部12は、初期マスキング閾値を、聴覚特性算出部13に渡す。また、初期マスキング閾値生成部12は、初期マスキング閾値及び目標PE値を、マスキング閾値補正部14の第1の補正部141に渡すとともに、記憶部18に記憶させる。   On the other hand, when the initial PE value is larger than the target PE value (step S18; Yes), the encoding apparatus 1 of the present embodiment continues to perform the masking threshold value correction process shown in FIG. When performing the masking threshold correction process, the initial masking threshold generation unit 12 passes the initial masking threshold to the auditory characteristic calculation unit 13. Further, the initial masking threshold value generation unit 12 passes the initial masking threshold value and the target PE value to the first correction unit 141 of the masking threshold value correction unit 14 and causes the storage unit 18 to store the initial masking threshold value and the target PE value.

図11は、第3の実施形態に係る符号化処理におけるマスキング閾値の補正処理の手順を示すフローチャートである。   FIG. 11 is a flowchart illustrating a procedure of masking threshold correction processing in the encoding processing according to the third embodiment.

マスキング閾値の補正処理では、図11に示すように、まず、周波数スペクトル等に基づき聴覚特性を算出する(ステップS20)。ステップS20は、聴覚特性算出部13が行う。聴覚特性算出部13は、聴覚特性として信号対マスク比を算出し、算出した信号対マスク比を、第1の補正部141に渡すとともに記憶部18に記憶させる。   In the masking threshold correction process, as shown in FIG. 11, auditory characteristics are first calculated based on a frequency spectrum or the like (step S20). Step S20 is performed by the auditory characteristic calculation unit 13. The auditory characteristic calculation unit 13 calculates a signal-to-mask ratio as the auditory characteristic, and passes the calculated signal-to-mask ratio to the first correction unit 141 and stores it in the storage unit 18.

第1の補正部141は、聴覚特性(信号対マスク比)を受け取ると、帯域の欠落を許容する条件で初期マスキング閾値を補正する(ステップS22)。第1の補正部141は、マスキング閾値の補正を終えると、補正したマスキング閾値(第1の補正閾値)を補正閾値決定部144の量子化部144a及び判定部144dに渡す。すると、補正閾値決定部144の量子化部144aは、第1の補正閾値sfbThr1(sfb)を用いて周波数スペクトルを量子化する(ステップS23)。量子化部144aは、周波数スペクトルの量子化を終えると、その結果を欠落MDCT変動率算出部144b及び判定部144dに渡す。 When the first correction unit 141 receives the auditory characteristic (signal to mask ratio), the first correction unit 141 corrects the initial masking threshold under a condition that allows the loss of the band (step S22). When completing the correction of the masking threshold, the first correction unit 141 passes the corrected masking threshold (first correction threshold) to the quantization unit 144a and the determination unit 144d of the correction threshold determination unit 144. Then, the quantization unit 144a of the correction threshold value determination unit 144 quantizes the frequency spectrum using the first correction threshold value sfbThr 1 (sfb) (step S23). When the quantization unit 144a finishes the quantization of the frequency spectrum, the quantization unit 144a passes the result to the missing MDCT fluctuation rate calculation unit 144b and the determination unit 144d.

欠落MDCT変動率算出部144bは、量子化の結果を受け取ると、その結果に基づいて欠落MDCT変動率Vmdctを算出する(ステップS25)。欠落MDCT変動率算出部144aは、第1の実施形態で説明した欠落SFB変動率Vsfbの算出方法と同様の方法で、第1の補正閾値sfbThr1(sfb)を用いて量子化された周波数スペクトルにおける欠落MDCT変動率Vmdctを算出する。ただし、ステップS25では、SFB単位ではなく、量子化後のMDCT係数単位で欠落する帯域を抽出して変動率を算出する。そして、欠落MDCT変動率算出部144bは、算出した欠落MDCT変動率Vmdctを判定部144dに渡す。また、欠落MDCT変動率算出部144bは、欠落MDCT変動率Vmdctの算出を終えると、欠落MDCT情報保持部144cで保持する情報を更新する。すなわち、T−1フレームの欠落MDCT情報をT−2フレームの欠落MDCT情報として保持し、Tフレームの欠落MDCT情報をT−1フレームの欠落MDCT情報として保持する。 When the missing MDCT fluctuation rate calculation unit 144b receives the quantization result, the missing MDCT fluctuation rate calculation unit 144b calculates the missing MDCT fluctuation rate Vmdct based on the result (step S25). The missing MDCT fluctuation rate calculation unit 144a is a frequency spectrum quantized using the first correction threshold sfbThr 1 (sfb) in the same manner as the method for calculating the missing SFB fluctuation rate Vsfb described in the first embodiment. The missing MDCT fluctuation rate Vmdct at is calculated. However, in step S25, the fluctuation rate is calculated by extracting a missing band not in SFB units but in quantized MDCT coefficient units. Then, the missing MDCT fluctuation rate calculation unit 144b passes the calculated missing MDCT fluctuation rate Vmdct to the determination unit 144d. In addition, when the missing MDCT fluctuation rate calculation unit 144b finishes calculating the missing MDCT fluctuation rate Vmdct, the missing MDCT fluctuation rate calculation unit 144b updates the information held by the missing MDCT information holding unit 144c. That is, the missing MDCT information of the T-1 frame is held as missing MDCT information of the T-2 frame, and the missing MDCT information of T frame is held as the missing MDCT information of the T-1 frame.

なお、オーディオ信号における先頭の数フレームを符号化するときのように、1フレーム前及び2フレーム前の欠落MDCT情報を保持していない場合、欠落MDCT変動率算出部144bは、予め定めた値を欠落MDCT変動率Vmdctとする。この予め定めた値は、例えば、次のステップで欠落MDCT変動率Vmdctと比較する閾値THよりも小さな値とする。 Note that, when the missing MDCT information of the previous frame and the previous frame is not held as in encoding the first few frames in the audio signal, the missing MDCT fluctuation rate calculation unit 144b sets a predetermined value. The missing MDCT fluctuation rate Vmdct. The predetermined value is, for example, to a value smaller than the threshold value TH 2 to be compared with the missing MDCT variation rate Vmdct in the next step.

欠落MDCT変動率Vmdctを受け取った判定部144dは、欠落MDCT変動率Vmdctと予め定めた閾値THとを比較する(ステップS27)。そして、Vmdct>THの場合(ステップS27;Yes)、判定部144dは、量子化する際のマスキング閾値に第1の補正閾値sfbThr1(sfb)を採用すると判定し、第1の補正閾値を量子化部15に渡す。これにより、量子化に用いるマスキング閾値が第1の補正閾値sfbThr1(sfb)に決定される。この場合、図3Cに示したように、量子化部15は、第1の補正閾値、すなわち帯域の欠落を許容する条件で補正したマスキング閾値を用いて周波数スペクトルを量子化する(ステップS32)。一方、Vmdct≦THの場合(ステップS27;No)、判定部144dは、量子化する際のマスキング閾値に第1の補正閾値sfbThr1(sfb)を採用しないと判定し、第2の補正部142にマスキング閾値を補正させる。これにより、量子化に用いるマスキング閾値が第2の補正閾値sfbThr2(sfb)に決定される。第2の補正部142は、聴覚特性等に基づいて、量子化による帯域の欠落を許容しない条件でマスキング閾値を補正し(ステップS28)、補正されたマスキング閾値(第2の補正閾値)を量子化部15に渡す。この場合、図3Cに示したように、量子化部15は、帯域の欠落を許容しない条件で補正した第2の補正閾値sfbThr2(sfb)を用いて周波数スペクトルを量子化する(ステップS34)。 Missing MDCT variation rate determining section 144d for receiving the Vmdct compares the threshold value TH 2 determined in advance and the missing MDCT volatility Vmdct (step S27). If Vmdct> TH 2 (step S27; Yes), the determination unit 144d determines that the first correction threshold value sfbThr 1 (sfb) is adopted as the masking threshold value for quantization, and sets the first correction threshold value. The data is passed to the quantization unit 15. Thereby, the masking threshold used for quantization is determined to be the first correction threshold sfbThr 1 (sfb). In this case, as illustrated in FIG. 3C, the quantization unit 15 quantizes the frequency spectrum using the first correction threshold, that is, the masking threshold corrected under a condition that allows the loss of the band (step S32). On the other hand, if Vmdct ≦ TH 2 (step S27; No), the determination unit 144d determines that the first correction threshold value sfbThr 1 (sfb) is not adopted as the masking threshold value for quantization, and the second correction unit 142 causes the masking threshold to be corrected. Thereby, the masking threshold value used for quantization is determined to be the second correction threshold value sfbThr 2 (sfb). The second correction unit 142 corrects the masking threshold under conditions that do not allow the loss of bands due to quantization based on auditory characteristics or the like (step S28), and the corrected masking threshold (second correction threshold) is quantized. To the conversion unit 15. In this case, as illustrated in FIG. 3C, the quantization unit 15 quantizes the frequency spectrum using the second correction threshold value sfbThr 2 (sfb) corrected under a condition that does not allow the loss of the band (step S34). .

こうして初期マスキング閾値sfbThr0(sfb)、第1の補正閾値sfbThr1(sfb)、及び第2の補正閾値sfbThr2(sfb)のいずれかを用いて周波数スペクトルを量子化すると、量子化部15は、量子化された値を符号化部16に渡す。すると、符号化部16は、固定ハフマン符号化等の既知の符号化方法を用いて、量子化された値を符号化する(ステップS36)。そして、符号化を終えると、符号化部16は、符号化したデータを多重化部17に渡す。これにより、入力信号(オーディオ信号)の1フレーム分の符号化処理が終了する。 When the frequency spectrum is quantized using one of the initial masking threshold value sfbThr 0 (sfb), the first correction threshold value sfbThr 1 (sfb), and the second correction threshold value sfbThr 2 (sfb), the quantization unit 15 Then, the quantized value is passed to the encoding unit 16. Then, the encoding unit 16 encodes the quantized value using a known encoding method such as fixed Huffman encoding (step S36). When the encoding is completed, the encoding unit 16 passes the encoded data to the multiplexing unit 17. Thereby, the encoding process for one frame of the input signal (audio signal) is completed.

符号化処理を終えると、符号化装置1(多重化部17)は、符号化されたオーディオ信号(オーディオデータ)にヘッダ情報等を付加した符号化ストリームを生成して出力する。   When the encoding process is completed, the encoding device 1 (multiplexer 17) generates and outputs an encoded stream in which header information or the like is added to the encoded audio signal (audio data).

本実施形態で算出する欠落MDCT変動率Vmdctと第1の実施形態における欠落SFB変動率Vsfbとは、帯域を量子化後のMDCT係数単位にするかSFB単位にするかが異なるだけで、算出方法自体は同じである。そのため、本実施形態においても、複数のフレームで連続して欠落する帯域の割合が大きいほど、欠落MDCT変動率Vmdctが大きくなる。すなわち、複数のフレームで連続して欠落する帯域の割合が小さいほど、欠落MDCT変動率Vmdctは小さくなる。そのため、欠落MDCT変動率Vmdctが閾値TH以下の場合、符号化するオーディオ信号は周波数スペクトルのピーク位置が激しく変化していると判断できる。したがって、本実施形態の符号化処理では、欠落MDCT変動率Vmdctが閾値TH以下の場合、欠落を許容しない条件で補正した第2の補正閾値sfbThr2(sfb)を用いて量子化する。これにより、周波数スペクトルのピーク位置が激しく変化するオーディオ信号において連続して聞こえる原音が符号化後は途切れて聞こえる等の音質の劣化を抑制できる。 The missing MDCT variation rate Vmdct calculated in the present embodiment and the missing SFB variation rate Vsfb in the first embodiment differ only in whether the band is in the MDCT coefficient unit after quantization or in the SFB unit. It is the same. Therefore, also in the present embodiment, the missing MDCT variation rate Vmdct increases as the proportion of the band continuously missing in a plurality of frames increases. In other words, the smaller the proportion of bands that are continuously missing in a plurality of frames, the smaller the missing MDCT variation rate Vmdct. Therefore, if the missing MDCT variation rate Vmdct the threshold TH 2 below, the audio signal to be encoded can be determined the peak position of the frequency spectrum is changing drastically. Therefore, in the encoding process of the present embodiment, if the missing MDCT variation rate Vmdct the threshold TH 2 hereinafter be quantized using a second correction threshold sfbThr corrected under a condition that does not allow missing 2 (sfb). As a result, it is possible to suppress deterioration in sound quality such that an original sound that can be heard continuously in an audio signal whose frequency spectrum peak position changes drastically is interrupted after encoding.

また、本実施形態の符号化処理では、欠落MDCT変動率Vmdctが閾値THより大きい場合、欠落を許容する条件で補正した第1の補正閾値sfbThr1(sfb)を用いて量子化する。そのため、ハープシコード等の周波数スペクトルのピーク位置の変化が緩やかなオーディオ信号を符号化する際に音質的に重要な帯域のマスキング閾値が過度に補正されることによる音質の劣化を抑制できる。 Also, the encoding process of the present embodiment, if the missing MDCT variation rate Vmdct is greater than the threshold value TH 2, quantized using a first correction threshold sfbThr corrected in conditions permitting missing 1 (sfb). Therefore, it is possible to suppress deterioration in sound quality due to excessive correction of the masking threshold of a band important for sound quality when an audio signal such as a harpsichord in which the peak position of the frequency spectrum is gradually changed is encoded.

更に、本実施形態では、欠落MDCT変動率Vmdctに基づいて、第1の補正部141で補正したマスキング閾値と第2の補正部142で補正したマスキング閾値のどちらを量子化に用いるかを決定する。第1の実施形態で使用した欠落SFB変動率Vsfbは、周波数スペクトルにおけるMDCT係数を複数のスケールファクタバンドsfbに分け、スケールファクタバンドsfb単位で算出した値である。一方、本実施形態の欠落MDCT変動率Vmdctは、上記のように、第1の補正部141で補正したマスキング閾値を用いて量子化された周波数スペクトルにおいて欠落している帯域の変動率をMDCT係数単位で算出した値である。そのため、本実施形態によれば、欠落SFB変動率Vsfbに比べて欠落した帯域の変動率をより細かい粒度で算出することができ、第1の補正閾値sfbThr1(sfb)を採用するか否かの判定精度を高くすることができる。よって、帯域の欠落による音質の劣化をより抑制することができる。 Further, in the present embodiment, based on the missing MDCT fluctuation rate Vmdct, it is determined which of the masking threshold corrected by the first correction unit 141 and the masking threshold corrected by the second correction unit 142 is used for quantization. . The missing SFB fluctuation rate Vsfb used in the first embodiment is a value calculated by dividing the MDCT coefficient in the frequency spectrum into a plurality of scale factor bands sfb and in units of scale factor bands sfb. On the other hand, as described above, the missing MDCT variation rate Vmdct of the present embodiment represents the variation rate of the missing band in the frequency spectrum quantized using the masking threshold corrected by the first correction unit 141 as described above. It is a value calculated in units. Therefore, according to the present embodiment, the fluctuation rate of the missing band can be calculated with a finer granularity than the missing SFB fluctuation rate Vsfb, and whether or not the first correction threshold value sfbThr 1 (sfb) is adopted. The determination accuracy can be increased. Therefore, it is possible to further suppress deterioration in sound quality due to lack of bands.

なお、本実施形態の符号化装置1は、第1の実施形態と同様、コンピュータと、コンピュータに実行させるプログラムにより実現可能である。この際、符号化装置1として動作させるコンピュータは、図5に示したようなハードウェア構成であればよい。また、プログラムは、図3A、図11、及び図3Cに示した符号化処理をコンピュータに実行させる内容であればよい。   Note that the encoding apparatus 1 of the present embodiment can be realized by a computer and a program executed by the computer, as in the first embodiment. At this time, the computer that operates as the encoding apparatus 1 may have a hardware configuration as shown in FIG. Moreover, the program should just be the content which makes a computer perform the encoding process shown to FIG. 3A, FIG. 11, and FIG. 3C.

[第3の実施形態の変形例]
本実施形態に係る符号化装置1の補正閾値決定部144は、図10に示したような構成に限らず、図12に示したような構成であってもよい。
[Modification of Third Embodiment]
The correction threshold value determination unit 144 of the encoding device 1 according to the present embodiment is not limited to the configuration illustrated in FIG. 10 and may have a configuration illustrated in FIG.

図12は、第3の実施形態に係る符号化装置の変形例を示すブロック図である。図13は、第3の実施形態の変形例における符号化処理の一部を示すフローチャートである。   FIG. 12 is a block diagram illustrating a modification of the encoding device according to the third embodiment. FIG. 13 is a flowchart showing a part of the encoding process in the modified example of the third embodiment.

図12に示した補正閾値決定部144では、第1の補正部141で補正したマスキング閾値(第1の補正閾値)ではなく、量子化部144aで量子化された周波数スペクトルの値が判定部144dに入力される。そして、判定部144dは、図11に示したステップS26の判定により欠落MDCT変動率Vmdctに基づいて第1の補正閾値sfbThr1(sfb)を量子化に用いると決定した場合、量子化部144aで量子化された周波数スペクトルの値を符号化部16に渡す。よって、第1の補正閾値sfbThr1(sfb)を量子化に用いると決定した場合、符号化装置1は、図13に示すように、次に量子化された値を用いた符号化(ステップS36)を行う。 In the correction threshold value determination unit 144 illustrated in FIG. 12, the value of the frequency spectrum quantized by the quantization unit 144a is not the masking threshold value (first correction threshold value) corrected by the first correction unit 141, but the determination unit 144d. Is input. When the determination unit 144d determines that the first correction threshold sfbThr 1 (sfb) is used for quantization based on the missing MDCT variation rate Vmdct by the determination in step S26 illustrated in FIG. 11, the quantization unit 144a The quantized frequency spectrum value is passed to the encoding unit 16. Therefore, when it is determined that the first correction threshold sfbThr 1 (sfb) is used for quantization, the encoding apparatus 1 performs encoding using the quantized value (step S36), as shown in FIG. )I do.

一方、図11に示したステップS26の判定により第2の補正閾値sfbThr2(sfb)を量子化に用いると決定した場合、判定部144dは、第2の補正部142にマスキング閾値を補正させる(ステップS28)。 On the other hand, when the determination in step S26 shown in FIG. 11 determines that the second correction threshold sfbThr 2 (sfb) is used for quantization, the determination unit 144d causes the second correction unit 142 to correct the masking threshold ( Step S28).

補正閾値決定部144の量子化部144aは、上述のように、外部に設けられた量子化部15と同様の処理を行って周波数スペクトルを量子化する。そのため、ビットレート条件、初期マスキング閾値、及び周波数スペクトルが同じであれば、量子化部144aで量子化した結果は、マスキング閾値補正部14の外部に設けた量子化部15で量子化した結果と同じになる。したがって、第1の補正閾値sfbThr1(sfb)を量子化に用いる場合、判定部144dにおける判定の前に補正閾値決定部144の量子化部144aで量子化した値を符号化することで、図3Cに示したステップS32の処理を省略することができる。よって、ここで例示した変形例によれば、第1の補正閾値sfbThr1(sfb)を量子化に用いると決定した場合に、決定後に第1の補正閾値sfbThr1(sfb)を用いた量子化を再度行うことによる処理効率の低下を抑制することができる。 As described above, the quantization unit 144a of the correction threshold value determination unit 144 performs the same processing as the quantization unit 15 provided outside, and quantizes the frequency spectrum. Therefore, if the bit rate condition, the initial masking threshold, and the frequency spectrum are the same, the result of quantization by the quantization unit 144a is the result of quantization by the quantization unit 15 provided outside the masking threshold correction unit 14. Be the same. Therefore, when the first correction threshold value sfbThr 1 (sfb) is used for quantization, the value quantized by the quantization unit 144a of the correction threshold value determination unit 144 is encoded before the determination by the determination unit 144d. The process of step S32 shown in 3C can be omitted. Therefore, according to the modified example illustrated here, when the first correction threshold SfbThr 1 a (sfb) was determined using the quantization, the first correction threshold sfbThr 1 (sfb) Quantization Using after decision It is possible to suppress a decrease in processing efficiency due to performing again.

[第4の実施形態]
図14は、本発明の第4の実施形態に係る符号化装置の機能ブロック図である。図15は、第4の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。
[Fourth Embodiment]
FIG. 14 is a functional block diagram of an encoding apparatus according to the fourth embodiment of the present invention. FIG. 15 is a block diagram illustrating a configuration example of a correction threshold value determination unit in the encoding device according to the fourth embodiment.

図14に示すように、本実施形態に係る符号化装置1は、ブロック切替部10と、MDCT処理部11と、マスキング閾値生成部12と、聴覚特性算出部13と、マスキング閾値補正部14と、量子化部15と、符号化部16と、多重化部17とを備える。   As illustrated in FIG. 14, the encoding device 1 according to the present embodiment includes a block switching unit 10, an MDCT processing unit 11, a masking threshold generation unit 12, an auditory characteristic calculation unit 13, and a masking threshold correction unit 14. A quantization unit 15, an encoding unit 16, and a multiplexing unit 17.

本実施形態の符号化装置1において、マスキング閾値補正部14を除く各部の機能は、第1の実施形態で説明したとおりである。ただし、量子化部15は、初期マスキング閾値sfbThr(sfb)を用いて周波数スペクトルを量子化する場合にのみ使用される。 In the encoding apparatus 1 according to the present embodiment, the functions of the respective units other than the masking threshold correction unit 14 are as described in the first embodiment. However, the quantization unit 15 is used only when the frequency spectrum is quantized using the initial masking threshold sfbThr 0 (sfb).

本実施形態におけるマスキング閾値補正部14は、第1の補正部141と、第2の補正部142と、補正閾値決定部144と、第1の量子化部145と、第2の量子化部146と、を備える。   The masking threshold value correction unit 14 in the present embodiment includes a first correction unit 141, a second correction unit 142, a correction threshold value determination unit 144, a first quantization unit 145, and a second quantization unit 146. And comprising.

第1の補正部141は、量子化による帯域の欠落を許容する条件でマスキング閾値を補正する。また、第2の補正部142は、量子化による帯域の欠落を許容しない条件でマスキング閾値を補正する。   The first correction unit 141 corrects the masking threshold under a condition that allows loss of a band due to quantization. In addition, the second correction unit 142 corrects the masking threshold under a condition that does not allow band loss due to quantization.

第1の量子化部145は、第1の補正部141で補正したマスキング閾値(第1の補正閾値)を用いて周波数スペクトルを量子化する。また、第2の量子化部146は、第2の補正部142で補正したマスキング閾値(第2の補正閾値)を用いて周波数スペクトルを量子化する。   The first quantization unit 145 quantizes the frequency spectrum by using the masking threshold (first correction threshold) corrected by the first correction unit 141. Further, the second quantization unit 146 quantizes the frequency spectrum using the masking threshold (second correction threshold) corrected by the second correction unit 142.

補正閾値決定部144は、第1の量子化部145で量子化された周波数スペクトルの値と、第2の量子化部146で量子化された周波数スペクトルの値とのいずれを符号化に用いるかを決定する。この補正閾値決定部144は、図15に示すように、欠落MDCT変動率算出部144bと、欠落MDCT情報保持部144cと、判定部144dと、を有する。   Which one of the frequency spectrum value quantized by the first quantizing unit 145 and the frequency spectrum value quantized by the second quantizing unit 146 is used for encoding by the correction threshold value determining unit 144? To decide. As illustrated in FIG. 15, the correction threshold value determination unit 144 includes a missing MDCT fluctuation rate calculation unit 144b, a missing MDCT information holding unit 144c, and a determination unit 144d.

欠落MDCT変動率算出部144b及び欠落MDCT情報保持部144cは、第3の実施形態で説明したとおりである。   The missing MDCT fluctuation rate calculation unit 144b and the missing MDCT information holding unit 144c are as described in the third embodiment.

判定部144dは、欠落MDCT変動率算出部144bで算出した欠落MDCT変動率Vmdctに基づいて、第1の量子化部145で量子化された周波数スペクトルの値、又は第2の量子化部146で量子化された周波数スペクトルの値を符号化部16に渡す。   Based on the missing MDCT fluctuation rate Vmdct calculated by the missing MDCT fluctuation rate calculation unit 144b, the determination unit 144d uses the frequency spectrum value quantized by the first quantization unit 145 or the second quantization unit 146. The quantized frequency spectrum value is passed to the encoding unit 16.

このように、本実施形態に係る符号化装置1は、第1の補正部141で補正したマスキング閾値を用いた量子化と、第2の補正部142で補正したマスキング閾値を用いた量子化とを行った後、どちらの量子化の結果を採用するかを決定する。すなわち、本実施形態に係る符号化装置1は、どちらの量子化の結果を採用するか決定することで、第1の補正部141で補正したマスキング閾値と第2の補正部142で補正したマスキング閾値とのどちらを量子化に用いるかを間接的に決定する。   As described above, the encoding apparatus 1 according to the present embodiment performs quantization using the masking threshold corrected by the first correction unit 141 and quantization using the masking threshold corrected by the second correction unit 142. After performing the above, it is determined which quantization result is to be adopted. That is, the encoding apparatus 1 according to the present embodiment determines which quantization result to use, thereby determining the masking threshold corrected by the first correction unit 141 and the masking corrected by the second correction unit 142. It is indirectly determined which of the threshold value is used for quantization.

本実施形態の符号化装置1を用いた符号化処理では、まず、図3Aに示したステップS10〜ステップS16の処理、及びステップS18の判定を行う。そして、初期PE値が目標PE値以下の場合(ステップS18;No)、初期マスキング閾値sfbThr0(sfb)を用いて周波数スペクトルを量子化する。 In the encoding process using the encoding apparatus 1 of the present embodiment, first, the processes in steps S10 to S16 and the determination in step S18 shown in FIG. 3A are performed. When the initial PE value is equal to or less than the target PE value (step S18; No), the frequency spectrum is quantized using the initial masking threshold sfbThr 0 (sfb).

一方、初期PE値が目標PE値よりも大きい場合(ステップS18;Yes)、本実施形態の符号化装置1は、続けて、図16A及び図16Bに示したマスキング閾値の補正処理を含む各種の処理を行う。なお、マスキング閾値の補正処理を行う場合、マスキング閾値生成部12は、聴覚特性算出部13に初期マスキング閾値sfbThr0(sfb)を渡す。また、マスキング閾値生成部12は、マスキング閾値補正部14の第1の補正部141及び第2の補正部142のそれぞれに、初期マスキング閾値及び目標PE値を渡す。 On the other hand, when the initial PE value is larger than the target PE value (step S18; Yes), the encoding apparatus 1 according to the present embodiment continues to perform various processes including the masking threshold correction processing illustrated in FIGS. 16A and 16B. Process. When the masking threshold value correction process is performed, the masking threshold value generation unit 12 passes the initial masking threshold value sfbThr 0 (sfb) to the auditory characteristic calculation unit 13. In addition, the masking threshold value generation unit 12 passes the initial masking threshold value and the target PE value to each of the first correction unit 141 and the second correction unit 142 of the masking threshold value correction unit 14.

図16Aは、第4の実施形態に係る符号化処理の一部を示すフローチャートである。図16Bは、第4の実施形態に係る符号化処理の他の一部を示すフローチャートである。   FIG. 16A is a flowchart showing a part of the encoding process according to the fourth embodiment. FIG. 16B is a flowchart illustrating another part of the encoding process according to the fourth embodiment.

本実施形態の符号化装置1においてマスキング閾値を補正する場合、図16Aに示すように、まず、周波数スペクトル等に基づき聴覚特性を算出する(ステップS20)。ステップS20は、聴覚特性算出部13が行う。聴覚特性算出部13は、聴覚特性として信号対マスク比smr(sfb)を算出し、第1の補正部141及び第2の補正部142に渡す。   When correcting the masking threshold in the encoding apparatus 1 of the present embodiment, as shown in FIG. 16A, first, auditory characteristics are calculated based on a frequency spectrum or the like (step S20). Step S20 is performed by the auditory characteristic calculation unit 13. The auditory characteristic calculation unit 13 calculates a signal-to-mask ratio smr (sfb) as the auditory characteristic and passes it to the first correction unit 141 and the second correction unit 142.

次に、符号化装置1のマスキング閾値補正部14が、第1の補正部141によるマスキング閾値の補正及び第1の量子化部145による量子化と、第2の補正部142によるマスキング閾値の補正及び第2の量子化部146による量子化とを並行して行う。   Next, the masking threshold value correction unit 14 of the encoding device 1 corrects the masking threshold value by the first correction unit 141, the quantization by the first quantization unit 145, and the masking threshold value correction by the second correction unit 142. And the quantization by the 2nd quantization part 146 is performed in parallel.

第1の補正部141は、聴覚特性(信号対マスク比)を受け取ると、帯域の欠落を許容する条件で初期マスキング閾値を補正する(ステップS22)。第1の補正部141は、マスキング閾値の補正を終えると、補正された第1の補正閾値sfbThr1(sfb)を第1の量子化部145に渡す。 When the first correction unit 141 receives the auditory characteristic (signal to mask ratio), the first correction unit 141 corrects the initial masking threshold under a condition that allows the loss of the band (step S22). After completing the correction of the masking threshold value, the first correction unit 141 passes the corrected first correction threshold value sfbThr 1 (sfb) to the first quantization unit 145.

第1の量子化部145は、受け取ったマスキング閾値(第1の補正閾値)を用いて周波数スペクトルを量子化する(ステップS23)。第1の量子化部145は、量子化を終えると、量子化された周波数スペクトルの値を補正閾値決定部144の欠落MDCT変動率算出部144b及び判定部144dに渡す。   The first quantizing unit 145 quantizes the frequency spectrum using the received masking threshold (first correction threshold) (step S23). After completing the quantization, the first quantizing unit 145 passes the quantized frequency spectrum value to the missing MDCT fluctuation rate calculating unit 144b and the determining unit 144d of the correction threshold value determining unit 144.

欠落MDCT変動率算出部144bは、第1の補正閾値sfbThr1(sfb)を用いた量子化の結果に基づき、欠落MDCT変動率Vmdctを算出する(ステップS25)。ステップS25は、前述のように、現時点(Tフレーム)の量子化の結果において欠落している帯域と、欠落MDCT情報保持部144bで保持しているT−1フレーム及びT−2フレームの欠落した帯域の情報とを比較して算出する。欠落MDCT変動率算出部144bは、算出した欠落MDCT変動率Vmdctを判定部144dに渡す。 The missing MDCT fluctuation rate calculation unit 144b calculates a missing MDCT fluctuation rate Vmdct based on the result of quantization using the first correction threshold sfbThr 1 (sfb) (step S25). In step S25, as described above, the missing band in the quantization result at the present time (T frame) and the missing T-1 frame and T-2 frame held in the missing MDCT information holding unit 144b are lost. It is calculated by comparing with the band information. The missing MDCT fluctuation rate calculation unit 144b passes the calculated missing MDCT fluctuation rate Vmdct to the determination unit 144d.

一方、第2の補正部142は、聴覚特性(信号対マスク比)を受け取ると、帯域の欠落を許容しない条件で初期マスキング閾値を補正する(ステップS28)。第2の補正部142は、マスキング閾値の補正を終えると、補正したマスキング閾値を第2の量子化部146に渡す。   On the other hand, when the second correction unit 142 receives the auditory characteristic (signal-to-mask ratio), the second correction unit 142 corrects the initial masking threshold under a condition that does not allow the loss of the band (step S28). After completing the correction of the masking threshold value, the second correction unit 142 passes the corrected masking threshold value to the second quantization unit 146.

第2の量子化部146は、受け取ったマスキング閾値を用いて周波数スペクトルを量子化する(ステップS34)。第2の量子化部146は、量子化を終えると、量子化された周波数スペクトルの値を補正閾値決定部144の判定部144dに渡す。   The second quantizing unit 146 quantizes the frequency spectrum using the received masking threshold (step S34). When the second quantization unit 146 finishes the quantization, the second quantization unit 146 passes the quantized frequency spectrum value to the determination unit 144d of the correction threshold value determination unit 144.

判定部144dは、第1の補正閾値を用いた量子化の結果、第2の補正閾値を用いた量子化の結果、及び欠落MDCT変動率Vmdctを受け取ると、欠落MDCT変動率Vmdctと閾値THとを比較する(ステップS27)。そして、Vmdct>THの場合(ステップS27;Yes)、判定部144dは、第1の補正閾値sfbThr1(sfb)を採用すると判定し、第1の補正閾値を用いて量子化した結果を符号化部16に渡す。これにより、事後的に、量子化に用いるマスキング閾値が第1の補正閾値sfbThr1(sfb)に決定する。また、判定部144dは、第1の補正閾値を用いて周波数スペクトルを量子化した結果を符号化部16に渡す。そのため、図16Bに示したように、ステップS27の判定の後、続けて量子化された値を符号化する(ステップS36)。 Determining unit 144d, the first correction threshold quantization using the result, the result of the quantization using the second correction threshold, and receives the missing MDCT volatility Vmdct, missing MDCT volatility Vmdct and the threshold TH 2 Are compared (step S27). When Vmdct> TH 2 (step S27; Yes), the determination unit 144d determines that the first correction threshold value sfbThr 1 (sfb) is adopted, and encodes the result quantized using the first correction threshold value. To the conversion unit 16. Thereby, the masking threshold value used for quantization is determined as the first correction threshold value sfbThr 1 (sfb) afterwards. Further, the determination unit 144d passes the result obtained by quantizing the frequency spectrum using the first correction threshold value to the encoding unit 16. Therefore, as shown in FIG. 16B, after the determination in step S27, the quantized value is subsequently encoded (step S36).

一方、Vmdct≦THの場合(ステップS27;No)、判定部144dは、第2の補正閾値sfbThr2(sfb)を量子化に採用すると判定し、第2の補正閾値を用いて量子化した結果を符号化部16に渡す。これにより、事後的に、量子化に用いるマスキング閾値が第2の補正閾値sfbThr2(sfb)に決定する。また、判定部144dは、第2の補正閾値を用いて周波数スペクトルを量子化した結果を符号化部16に渡す。そのため、符号化装置1は、図16Bに示したように、ステップS26の判定の後、続けて符号化部16により量子化された値を符号化する(ステップS36)。 On the other hand, when Vmdct ≦ TH 2 (step S27; No), the determination unit 144d determines that the second correction threshold value sfbThr 2 (sfb) is adopted for quantization, and performs quantization using the second correction threshold value. The result is passed to the encoding unit 16. As a result, the masking threshold value used for quantization is subsequently determined as the second correction threshold value sfbThr 2 (sfb). Further, the determination unit 144d passes the result of quantizing the frequency spectrum using the second correction threshold value to the encoding unit 16. Therefore, as illustrated in FIG. 16B, the encoding device 1 continues to encode the value quantized by the encoding unit 16 after the determination in step S26 (step S36).

符号化部16は、固定ハフマン符号化等の既知の符号化方法を用いて、量子化された値を符号化する。そして、符号化を終えると、符号化部16は、符号化したデータを多重化部17に渡す。これにより、入力信号(オーディオ信号)の1フレーム分の符号化処理が終了する。   The encoding unit 16 encodes the quantized value using a known encoding method such as fixed Huffman encoding. When the encoding is completed, the encoding unit 16 passes the encoded data to the multiplexing unit 17. Thereby, the encoding process for one frame of the input signal (audio signal) is completed.

符号化処理を終えると、符号化装置1(多重化部17)は、符号化されたオーディオ信号(オーディオデータ)にヘッダ情報等を付加した符号化ストリームを生成して出力する。   When the encoding process is completed, the encoding device 1 (multiplexer 17) generates and outputs an encoded stream in which header information or the like is added to the encoded audio signal (audio data).

このように、本実施形態では、第1の補正部141によるマスキング閾値の補正及び第1の量子化部145による量子化と、第2の補正部142によるマスキング閾値の補正及び第2の量子化部146による量子化とを並行して行う。そのため、第1の補正部141で補正したマスキング閾値を採用しないことが決定した後、第2の補正部142で補正したマスキング閾値を用いて量子化された周波数スペクトルの値を用いた符号化処理を速やかに開始することができる。よって、本実施形態の符号化装置1及び符号化方法によれば、第2の補正部142で補正したマスキング閾値を用いて量子化する場合の処理効率の低下を抑制することができる。   Thus, in this embodiment, the correction of the masking threshold by the first correction unit 141 and the quantization by the first quantization unit 145, and the correction of the masking threshold by the second correction unit 142 and the second quantization are performed. The quantization by the unit 146 is performed in parallel. Therefore, after determining that the masking threshold corrected by the first correction unit 141 is not adopted, the encoding process using the frequency spectrum value quantized using the masking threshold corrected by the second correction unit 142 is performed. Can be started immediately. Therefore, according to the encoding device 1 and the encoding method of the present embodiment, it is possible to suppress a decrease in processing efficiency when quantization is performed using the masking threshold corrected by the second correction unit 142.

また、本実施形態では、量子化後のMDCT係数単位の帯域で欠落する帯域の変動率Vmdctを算出している。そのため、SFB単位で欠落する帯域の変動率Vsfbを算出する場合に比べて欠落した帯域の変動率をより細かい粒度で算出することができ、第1の補正閾値を採用するか否かの判定精度を高くすることができる。よって、帯域の欠落による音質の劣化をより抑制することができる。   In the present embodiment, the fluctuation rate Vmdct of the band that is missing in the band of the MDCT coefficient unit after quantization is calculated. Therefore, the fluctuation rate of the missing band can be calculated with a finer granularity than the case of calculating the fluctuation rate Vsfb of the missing band in SFB units, and the determination accuracy of whether or not to adopt the first correction threshold value Can be high. Therefore, it is possible to further suppress deterioration in sound quality due to lack of bands.

なお、本実施形態の符号化装置1は、第1の実施形態と同様、コンピュータと、コンピュータに実行させるプログラムにより実現可能である。この際、符号化装置1として動作させるコンピュータは、図5に示したようなハードウェア構成であればよい。また、プログラムは、図3A、図16A、及び図16Bに示した符号化処理をコンピュータに実行させる内容であればよい。   Note that the encoding apparatus 1 of the present embodiment can be realized by a computer and a program executed by the computer, as in the first embodiment. At this time, the computer that operates as the encoding apparatus 1 may have a hardware configuration as shown in FIG. Moreover, the program should just be the content which makes a computer perform the encoding process shown to FIG. 3A, FIG. 16A, and FIG. 16B.

[第5の実施形態]
図17は、本発明の第5の実施形態に係る符号化装置の機能ブロック図である。図18は、第5の実施形態に係る符号化装置における補正閾値決定部の構成例を示すブロック図である。
[Fifth Embodiment]
FIG. 17 is a functional block diagram of an encoding apparatus according to the fifth embodiment of the present invention. FIG. 18 is a block diagram illustrating a configuration example of a correction threshold value determination unit in the encoding device according to the fifth embodiment.

図17に示すように、本実施形態に係る符号化装置1は、ブロック切替部10と、MDCT処理部11と、マスキング閾値生成部12と、聴覚特性算出部13と、マスキング閾値補正部14と、量子化部15と、符号化部16と、多重化部17とを備える。また、符号化装置1は、補正閾値決定部19を備える。   As illustrated in FIG. 17, the encoding device 1 according to the present embodiment includes a block switching unit 10, an MDCT processing unit 11, a masking threshold generation unit 12, an auditory characteristic calculation unit 13, and a masking threshold correction unit 14. A quantization unit 15, an encoding unit 16, and a multiplexing unit 17. In addition, the encoding device 1 includes a correction threshold value determination unit 19.

本実施形態の符号化装置1において、補正閾値決定部19を除く各部の機能は、第1の実施形態で説明したとおりである。なお、図17に示した符号化装置1では、補正閾値決定部19をマスキング閾値補正部14の外部に設けている。そのため、マスキング閾値補正部14は、マスキング閾値を補正する第1の補正部141及び第2の補正部142のみを有する。   In the encoding device 1 of the present embodiment, the functions of the respective units other than the correction threshold value determination unit 19 are as described in the first embodiment. In the encoding device 1 shown in FIG. 17, the correction threshold value determination unit 19 is provided outside the masking threshold value correction unit 14. Therefore, the masking threshold correction unit 14 includes only the first correction unit 141 and the second correction unit 142 that correct the masking threshold.

本実施形態の符号化装置1における補正閾値決定部19は、第1〜第4の実施形態の補正閾値決定部143,144とは異なり、第1の補正部141と第2の補正部142とのどちらにマスキング閾値を補正させるかを決定する。また、本実施形態の補正閾値決定部19は、周波数スペクトルの電力値mdct_pow(sfb)の自己相関値に基づいて、マスキング閾値を補正させる補正部を決定する。   The correction threshold value determination unit 19 in the encoding device 1 of the present embodiment is different from the correction threshold value determination units 143 and 144 of the first to fourth embodiments, and includes a first correction unit 141 and a second correction unit 142. To determine which of the masking threshold values is to be corrected. Further, the correction threshold value determination unit 19 of the present embodiment determines a correction unit that corrects the masking threshold value based on the autocorrelation value of the power value mdct_pow (sfb) of the frequency spectrum.

本実施形態の補正閾値決定部19は、図18に示すように、自己相関値算出部19aと、スペクトル電力値保持部19bと、判定部19cと、を有する。   As shown in FIG. 18, the correction threshold value determination unit 19 of the present embodiment includes an autocorrelation value calculation unit 19a, a spectrum power value holding unit 19b, and a determination unit 19c.

自己相関値算出部19aは、周波数スペクトルの電力値(スペクトル電力値)mdct_pow(sfb)の自己相関値correを算出する。本実施形態では、下記の式(2)により自己相関値correを算出する。   The autocorrelation value calculation unit 19a calculates the autocorrelation value corre of the power value (spectrum power value) mdct_pow (sfb) of the frequency spectrum. In the present embodiment, the autocorrelation value corre is calculated by the following equation (2).

Figure 2017021257
Figure 2017021257

式(2)において、corre(sfb)は、帯域sfbのスペクトル電力値mdct_pow(sfb)の自己相関値である。また、mdct_pow(sfb)は、現時点の符号化対象のフレーム(Tフレーム)のスペクトル電力値である。また、mdct_powT−1(sfb)は、現時点の符号化対象のフレームの1つ前のフレーム(T−1フレーム)のスペクトル電力値である。また、mdct_powT−2(sfb)は、現時点の符号化対象のフレームの2つ前のフレーム(T−2フレーム)のスペクトル電力値である。 In equation (2), corre (sfb) is an autocorrelation value of the spectrum power value mdct_pow (sfb) of the band sfb. Further, mdct_pow T (sfb) is a spectrum power value of a current encoding target frame (T frame). Also, mdct_pow T-1 (sfb) is the spectrum power value of the frame immediately before the current encoding target frame (T-1 frame). Further, mdct_pow T-2 (sfb) is a spectrum power value of a frame (T-2 frame) two frames before the current encoding target frame.

スペクトル電力値保持部19bは、自己相関値correの算出に用いるT−1フレームのスペクトル電力値及びT−2フレームのスペクトル電力値を保持する。   The spectrum power value holding unit 19b holds the spectrum power value of the T-1 frame and the spectrum power value of the T-2 frame used for calculating the autocorrelation value corre.

判定部19cは、算出した自己相関値correに基づいて、第1の補正部141と第2の補正部142とのどちらにマスキング閾値を補正させるかを決定する。   The determination unit 19c determines which of the first correction unit 141 and the second correction unit 142 should correct the masking threshold based on the calculated autocorrelation value corre.

本実施形態の符号化装置1を用いた符号化処理では、まず、図3Aに示したステップS10〜ステップS16の処理、及びステップS18の判定を行う。そして、初期PE値が目標PE値以下の場合(ステップS18;No)、初期マスキング閾値sfbThr0(sfb)を用いて周波数スペクトルを量子化する(ステップS30)。 In the encoding process using the encoding apparatus 1 of the present embodiment, first, the processes in steps S10 to S16 and the determination in step S18 shown in FIG. 3A are performed. If the initial PE value is equal to or less than the target PE value (step S18; No), the frequency spectrum is quantized using the initial masking threshold sfbThr 0 (sfb) (step S30).

一方、初期PE値が目標PE値よりも大きい場合(ステップS18;Yes)、本実施形態の符号化装置1では、続けて、図19A及び図19Bに示したマスキング閾値の補正処理を含む各種の処理を行う。なお、マスキング閾値の補正処理を行う場合、マスキング閾値生成部12は、聴覚特性算出部13に初期マスキング閾値を渡す。また、マスキング閾値生成部12は、マスキング閾値補正部14の第1の補正部141及び第2の補正部142のそれぞれに、初期マスキング閾値及び目標PE値を渡す。   On the other hand, when the initial PE value is larger than the target PE value (step S18; Yes), the encoding device 1 of the present embodiment continues to perform various processes including the masking threshold correction processing shown in FIGS. 19A and 19B. Process. When the masking threshold value correction process is performed, the masking threshold value generation unit 12 passes the initial masking threshold value to the auditory characteristic calculation unit 13. In addition, the masking threshold value generation unit 12 passes the initial masking threshold value and the target PE value to each of the first correction unit 141 and the second correction unit 142 of the masking threshold value correction unit 14.

図19Aは、第5の実施形態に係る符号化処理の一部を示すフローチャートである。図19Bは、第5の実施形態に係る符号化処理の他の一部を示すフローチャートである。   FIG. 19A is a flowchart showing a part of the encoding process according to the fifth embodiment. FIG. 19B is a flowchart showing another part of the encoding process according to the fifth embodiment.

本実施形態の符号化装置1においてマスキング閾値を補正する場合、図19Aに示すように、まず、周波数スペクトル等に基づき聴覚特性を算出する(ステップS20)。ステップS20は、聴覚特性算出部13が行う。聴覚特性算出部13は、聴覚特性として信号対マスク比を算出し、第1の補正部141及び第2の補正部142に渡す。   When correcting the masking threshold in the encoding device 1 of the present embodiment, as shown in FIG. 19A, first, auditory characteristics are calculated based on a frequency spectrum or the like (step S20). Step S20 is performed by the auditory characteristic calculation unit 13. The auditory characteristic calculation unit 13 calculates a signal-to-mask ratio as the auditory characteristic and passes it to the first correction unit 141 and the second correction unit 142.

また、マスキング閾値を補正する場合、符号化装置1では、聴覚特性の算出と並行して、第1の補正部141と第2の補正部142とのどちらでマスキング閾値を補正するかを決定する処理が行われる(ステップS40〜S46)。   When correcting the masking threshold, the encoding apparatus 1 determines which of the first correction unit 141 and the second correction unit 142 corrects the masking threshold in parallel with the calculation of the auditory characteristic. Processing is performed (steps S40 to S46).

このマスキング閾値を補正する補正部を決定する処理では、まず、スペクトル電力値mdct_pow(sfb)の自己相関値correを算出する(ステップS40)。ステップS40は、補正閾値決定部19の自己相関値算出部19aが行う。   In the process of determining a correction unit that corrects the masking threshold, first, the autocorrelation value corre of the spectral power value mdct_pow (sfb) is calculated (step S40). Step S40 is performed by the autocorrelation value calculation unit 19a of the correction threshold value determination unit 19.

自己相関値算出部19aは、スペクトル電力値保持部19bからT−1フレームのスペクトル電力値及びT−2フレームのスペクトル電力値を読み出し、式(2)を用いて自己相関値correを算出する。自己相関値算出部19aは、算出した自己相関値correを判定部19cに渡す。また、自己相関値算出部19aは、自己相関値correの算出を終えると、スペクトル電力値保持部19bで保持する電力値を更新する。すなわち、T−1フレームの電力値をT−2フレームの電力値として保持し、Tフレームの電力値をT−1フレームの電力値として保持する。   The autocorrelation value calculation unit 19a reads the spectrum power value of the T-1 frame and the spectrum power value of the T-2 frame from the spectrum power value holding unit 19b, and calculates the autocorrelation value corre using Expression (2). The autocorrelation value calculation unit 19a passes the calculated autocorrelation value corre to the determination unit 19c. In addition, when the autocorrelation value calculation unit 19a finishes calculating the autocorrelation value corre, the autocorrelation value calculation unit 19a updates the power value held by the spectrum power value holding unit 19b. That is, the power value of the T-1 frame is held as the power value of the T-2 frame, and the power value of the T frame is held as the power value of the T-1 frame.

自己相関値correを受け取った判定部19cは、自己相関値correと予め定めた閾値TH3との大小関係を判定する(ステップS42)。そして、corre>THの場合(ステップS42;Yes)、判定部19cは、第1の補正部141によるマスキング閾値の補正を選択する(ステップS44)。この場合、判定部19cは、第1の補正部141にのみマスキング閾値の補正を指示する信号を送る。 The determination unit 19c that has received the autocorrelation value corre determines the magnitude relationship between the autocorrelation value corre and a predetermined threshold value TH3 (step S42). If corre> TH 3 (step S42; Yes), the determination unit 19c selects masking threshold correction by the first correction unit 141 (step S44). In this case, the determination unit 19c sends a signal instructing only the first correction unit 141 to correct the masking threshold.

一方、corre≦THの場合(ステップS42;No)、判定部19cは、第2の補正部142によるマスキング閾値の補正を選択する(ステップS46)。この場合、判定部19cは、第2の補正部142にのみマスキング閾値の補正を指示する信号を送る。 On the other hand, when corre ≦ TH 3 (step S42; No), the determination unit 19c selects the correction of the masking threshold by the second correction unit 142 (step S46). In this case, the determination unit 19c sends a signal instructing only the second correction unit 142 to correct the masking threshold.

こうして、第1の補正部141又は第2の補正部142にマスキング閾値の補正を指示する信号が送られると、その信号を受け取ったほうの補正部のみが、マスキング閾値を補正する(ステップS48)。第1の補正部141でマスキング閾値を補正する場合、ステップS48は、量子化による帯域の欠落を許容する条件で行う。一方、第2の補正部142でマスキング閾値を補正する場合、ステップS48は、量子化による帯域の欠落を許容しない条件で行う。また、第1の補正部141及び第2の補正部142のいずれでマスキング閾値を補正する場合も、例えば、上記の式(1)を用いて補正後のマスキング閾値と電力値とから算出されるPE値が目標PE値になるように初期マスキング閾値を補正する。   Thus, when a signal instructing correction of the masking threshold value is sent to the first correction unit 141 or the second correction unit 142, only the correction unit that receives the signal corrects the masking threshold value (step S48). . When the masking threshold is corrected by the first correction unit 141, step S48 is performed under a condition that allows band loss due to quantization. On the other hand, when the masking threshold value is corrected by the second correction unit 142, step S48 is performed under a condition that does not allow band loss due to quantization. Further, when the masking threshold value is corrected by either the first correction unit 141 or the second correction unit 142, for example, the correction value is calculated from the corrected masking threshold value and the power value using the above equation (1). The initial masking threshold is corrected so that the PE value becomes the target PE value.

第1の補正部141は、マスキング閾値の補正が終わると、補正したマスキング閾値(第1の補正閾値)を量子化部15に渡す。同様に、第2の補正部142は、マスキング閾値の補正が終わると、補正したマスキング閾値(第2の補正閾値)を量子化部15に渡す。   When the correction of the masking threshold is completed, the first correction unit 141 passes the corrected masking threshold (first correction threshold) to the quantization unit 15. Similarly, when the correction of the masking threshold is completed, the second correction unit 142 passes the corrected masking threshold (second correction threshold) to the quantization unit 15.

本実施形態の符号化装置1では、現時点の符号化対象のフレーム(周波数スペクトル)についての初期マスキング閾値を補正する場合、第1の補正部141又は第2の補正部142のいずれか一方のみで補正する。よって、マスキング閾値を補正した場合、量子化部15は、図19Bに示すように、第1又は第2の補正閾値を用いて周波数スペクトルを量子化する(ステップS50)。また、マスキング閾値を補正しない場合、量子化部15は、初期マスキング閾値を用いて周波数スペクトルを量子化する(ステップS30)。   In the encoding apparatus 1 of the present embodiment, when correcting the initial masking threshold for the current encoding target frame (frequency spectrum), only one of the first correction unit 141 and the second correction unit 142 is used. to correct. Therefore, when the masking threshold is corrected, the quantization unit 15 quantizes the frequency spectrum using the first or second correction threshold as shown in FIG. 19B (step S50). If the masking threshold is not corrected, the quantization unit 15 quantizes the frequency spectrum using the initial masking threshold (step S30).

こうして初期マスキング閾値sfbThr0(sfb)、第1の補正閾値sfbThr1(sfb)、及び第2の補正閾値sfbThr2(sfb)のいずれかを用いて周波数スペクトルを量子化すると、量子化部15は、量子化された値を符号化部16に渡す。すると、符号化部16は、固定ハフマン符号化等の既知の符号化方法を用いて、量子化された値を符号化する(ステップS36)。そして、符号化を終えると、符号化部16は、符号化したデータを多重化部17に渡す。これにより、入力信号(オーディオ信号)の1フレーム分の符号化処理が終了する。 When the frequency spectrum is quantized using one of the initial masking threshold value sfbThr 0 (sfb), the first correction threshold value sfbThr 1 (sfb), and the second correction threshold value sfbThr 2 (sfb), the quantization unit 15 Then, the quantized value is passed to the encoding unit 16. Then, the encoding unit 16 encodes the quantized value using a known encoding method such as fixed Huffman encoding (step S36). When the encoding is completed, the encoding unit 16 passes the encoded data to the multiplexing unit 17. Thereby, the encoding process for one frame of the input signal (audio signal) is completed.

符号化処理を終えると、符号化装置1(多重化部17)は、符号化されたオーディオ信号(オーディオデータ)にヘッダ情報等を付加した符号化ストリームを生成して出力する。   When the encoding process is completed, the encoding device 1 (multiplexer 17) generates and outputs an encoded stream in which header information or the like is added to the encoded audio signal (audio data).

式(2)から算出される自己相関値correは、フレーム間での電力値の相関が高いほど、言い換えるとフレーム間での電力値の差が小さいほど、大きな値となる。よって、複数の連続したフレームにおける周波数スペクトルのピーク位置の変化が激しい場合は、自己相関値correが小さくなる。本実施形態では、上述した各実施形態と同様、周波数スペクトルのピーク位置の変化が激しい場合、帯域の欠落を許容しない条件で補正したマスキング閾値で周波数スペクトルを量子化する。そのため、上記のように、自己相関値correが閾値TH以下の場合(ステップS42;No)、判定部19cは、第2の補正部142によるマスキング閾値の補正を選択する(ステップS46)。これにより、周波数スペクトルのピーク位置の変化が激しいオーディオ信号を符号化した場合に、原音では連続して聞こえる音が途切れて聞こえる等の音質の劣化を抑制できる。 The autocorrelation value corre calculated from the equation (2) becomes larger as the correlation between the power values between frames is higher, in other words, as the difference between the power values between frames is smaller. Therefore, when the change in the peak position of the frequency spectrum in a plurality of consecutive frames is severe, the autocorrelation value corre becomes small. In the present embodiment, as in each of the embodiments described above, when the change in the peak position of the frequency spectrum is severe, the frequency spectrum is quantized with a masking threshold corrected under a condition that does not allow the loss of the band. Therefore, as described above, when the autocorrelation value corre is threshold TH 3 or less (step S42; No), the determination unit 19c selects a correction of the masking threshold by the second correction unit 142 (step S46). As a result, when an audio signal in which a change in the peak position of the frequency spectrum is severe is encoded, it is possible to suppress deterioration in sound quality such that the sound that can be heard continuously is interrupted in the original sound.

一方、ハープシコード等の連続したフレームにおける周波数スペクトルのピーク位置の変化が緩やかな場合は、自己相関値correが大きくなる。そのため、自己相関値correが閾値よりも大きい場合(ステップS42;Yes)、判定部19cは、第1の補正部141によるマスキング閾値の補正を選択する(ステップS44)。これにより、周波数スペクトルのピーク位置の変化が緩やかなオーディオ信号を符号化した場合に、音質的に重要な帯域のマスキング閾値が過度に補正され量子化誤差(量子化雑音)が知覚可能になることによる音質の劣化を抑制できる。   On the other hand, when the change in the peak position of the frequency spectrum in successive frames such as harpsichords is gentle, the autocorrelation value corre increases. Therefore, when the autocorrelation value corre is larger than the threshold (step S42; Yes), the determination unit 19c selects the correction of the masking threshold by the first correction unit 141 (step S44). As a result, when an audio signal with a gradual change in the peak position of the frequency spectrum is encoded, the masking threshold of a sound quality important band is excessively corrected and quantization error (quantization noise) can be perceived. It is possible to suppress the deterioration of the sound quality due to.

また、本実施形態の符号化処理では、マスキング閾値の補正処理を第1の補正部141及び第2の補正部142のいずれかで1回だけ行えばよい。しかも、第1の補正部141及び第2の補正部142のいずれで補正するかは、スペクトル電力値mdct_pow(sfb)の自己相関値correに基づいて選択する。そのため、第1の補正閾値を用いた量子化により欠落する帯域の変動率を算出し、その変動率に基づいて量子化に用いるマスキング閾値を決定する上述の各実施形態と比べて、処理量を減らすことができる。   In the encoding process of this embodiment, the masking threshold correction process may be performed only once by either the first correction unit 141 or the second correction unit 142. Moreover, which of the first correction unit 141 and the second correction unit 142 performs correction is selected based on the autocorrelation value corre of the spectral power value mdct_pow (sfb). Therefore, the amount of processing is reduced compared to the above-described embodiments in which the fluctuation rate of the band that is lost due to quantization using the first correction threshold is calculated, and the masking threshold used for quantization is determined based on the fluctuation rate. Can be reduced.

また、本実施形態の符号化処理では、上記のように、マスキング閾値を補正する場合に自己相関値correを算出するとともにスペクトル電力値保持部19bで保持する電力値を更新している。しかしながら、本実施形態に係る符号化処理では、これに限らず、マスキング閾値を補正するか否かによらず、図3AのステップS10を行う毎にスペクトル電力値保持部19bで保持する電力値を更新してもよい。   Further, in the encoding process of the present embodiment, as described above, when correcting the masking threshold, the autocorrelation value corre is calculated and the power value held in the spectrum power value holding unit 19b is updated. However, the encoding process according to the present embodiment is not limited to this. Regardless of whether or not the masking threshold value is corrected, the power value held by the spectrum power value holding unit 19b every time step S10 in FIG. 3A is performed. It may be updated.

なお、本実施形態の符号化装置1は、第1の実施形態と同様、コンピュータと、コンピュータに実行させるプログラムにより実現可能である。この際、符号化装置1として動作させるコンピュータは、図5に示したようなハードウェア構成であればよい。また、プログラムは、図3A、図19A、及び図19Bに示した符号化処理をコンピュータに実行させる内容であればよい。   Note that the encoding apparatus 1 of the present embodiment can be realized by a computer and a program executed by the computer, as in the first embodiment. At this time, the computer that operates as the encoding apparatus 1 may have a hardware configuration as shown in FIG. Moreover, the program should just be the content which makes a computer perform the encoding process shown to FIG. 3A, FIG. 19A, and FIG. 19B.

以上記載した各実施例を含む実施形態に関し、更に以下の付記を開示する。
(付記1)
オーディオ信号をフレーム毎に周波数スペクトルに変換し、当該周波数スペクトルを量子化して符号化する符号化装置であって、
前記周波数スペクトルに基づいて当該周波数スペクトルを量子化する際の初期マスキング閾値を生成する閾値生成部と、
前記周波数スペクトルの量子化に与えられたビット量と量子化による帯域の欠落を許容するか否かの条件に基づいて前記初期マスキング閾値を補正する閾値補正部と、
連続する複数の前記フレームにおける前記周波数スペクトルの変化の程度に基づいて、量子化による帯域の欠落を許容する条件で補正した第1のマスキング閾値と、量子化による帯域の欠落を許容しない条件で補正した第2のマスキング閾値とのいずれを量子化に用いるか決定する閾値決定部と、
を備えることを特徴とする符号化装置。
(付記2)
前記閾値決定部は、前記第1のマスキング閾値を用いて前記周波数スペクトルを量子化した場合に欠落する帯域を抽出し、前記周波数スペクトルの変化の程度として複数の前記フレームにおける前記欠落する帯域の変動率を求め、当該変動率に基づいて、前記第1のマスキング閾値と前記第2のマスキング閾値とのいずれを量子化に用いるか決定する、
ことを特徴とする付記1に記載の符号化装置。
(付記3)
前記第1のマスキング閾値を用いて前記周波数スペクトルを量子化する量子化部を更に備え、
前記閾値決定部は、前記量子化部による量子化で欠落した帯域を抽出し、前記周波数スペクトルの変化の程度として複数の前記フレームにおける前記欠落した帯域の変動率を求め、当該変動率に基づいて、前記第1のマスキング閾値を量子化に用いるか否かを判定する、
ことを特徴とする付記1に記載の符号化装置。
(付記4)
量子化された周波数スペクトルの値を符号化する符号化部を更に備え、
前記閾値決定部は、前記第1のマスキング閾値を量子化に用いると判定した場合、前記符号化部に、前記量子化部で量子化された前記周波数スペクトルの値を符号化させる、
ことを特徴とする付記3に記載の符号化装置。
(付記5)
前記閾値決定部は、複数の前記フレームにおける前記欠落する帯域の変動率を算出する算出部と、
算出した前記変動率に基づいて前記第1のマスキング閾値を量子化に用いるか否かを判定する判定部と、を有する、
ことを特徴とする付記2〜4のいずれかに記載の符号化装置。
(付記6)
前記算出部は、現時点の符号化対象のフレームにおいて欠落する帯域の数と、当該欠落する帯域のうち他のフレームでも欠落している帯域の数とから、欠落する帯域の変動率を算出する、
ことを特徴とする付記5に記載の符号化装置。
(付記7)
前記算出部は、現時点の符号化対象のフレームにおいて欠落する帯域及びその前後の帯域が他のフレームでも欠落している場合、前記欠落する帯域を他のフレームでも欠落している帯域として係数する、
ことを特徴とする付記5に記載の符号化装置。
(付記8)
前記閾値決定部は、前記周波数スペクトルの変化の程度として複数の前記フレームにおける前記周波数スペクトルから自己相関値を算出する算出部と、
前記自己相関値に基づいて、量子化による帯域の欠落を許容する条件と、量子化による帯域の欠落を許容しない条件とのいずれで前記初期マスキング閾値を補正させるか判定する判定部と、を有する、
ことを特徴とする付記1に記載の符号化装置。
(付記9)
前記閾値補正部は、量子化による帯域の欠落を許容する条件で前記初期マスキング閾値を補正する第1の補正部と、量子化による帯域の欠落を許容しない条件で前記初期マスキング閾値を補正する第2の補正部と、を有する
ことを特徴とする付記1に記載の符号化装置。
(付記10)
前記閾値生成部は、聴覚心理モデルに基づいて前記初期マスキング閾値を生成する、
ことを特徴とする付記1に記載の符号化装置。
(付記11)
コンピュータが、
オーディオ信号の周波数スペクトルに基づいて生成した初期マスキング閾値が当該周波数スペクトルを量子化するための条件を満たしていない場合に、
前記オーディオ信号の連続する複数のフレームにおける前記周波数スペクトルの変化の程度に基づいて、量子化による帯域の欠落を許容する条件で補正した第1のマスキング閾値と、量子化による帯域の欠落を許容しない条件で補正した第2のマスキング閾値とのいずれを量子化に用いるか決定する処理、
を実行することを特徴とする符号化方法。
(付記12)
前記コンピュータが、
前記初期マスキング閾値を前記第1のマスキング閾値に補正した後、
前記第1のマスキング閾値を用いて前記周波数スペクトルを量子化した場合に欠落する帯域を抽出し、
前記周波数スペクトルの変化の程度として複数の前記フレームにおける前記欠落する帯域の変動率を算出し、
算出した前記変動率に基づいて、前記第1のマスキング閾値を量子化に用いるか否かを判定する、
ことを特徴とする付記11に記載の符号化方法。
(付記13)
前記コンピュータが、
前記初期マスキング閾値を前記第1のマスキング閾値に補正し、
前記第1のマスキング閾値を用いて前記周波数スペクトルを量子化した後、
量子化された前記周波数スペクトルにおいて欠落した帯域を抽出し、
前記周波数スペクトルの変化の程度として複数の前記フレームにおける前記欠落した帯域の変動率を算出し、
算出した前記変動率相関に基づいて、前記第1のマスキング閾値を量子化に用いるか否かを判定する、
ことを特徴とする付記11に記載の符号化方法。
(付記14)
前記コンピュータが、
前記第1のマスキング閾値を量子化に用いると判定した場合、当該判定前に前記第1のマスキング閾値を用いて量子化した前記周波数スペクトルの値を符号化する、
ことを特徴とする付記13に記載の符号化方法。
(付記15)
前記コンピュータが、
前記初期マスキング閾値を前記第1のマスキング閾値に補正する処理、及び前記初期マスキング閾値を前記第2のマスキング閾値に補正する処理を並行して行う、
ことを特徴とする付記11〜14のいずれかに記載の符号化方法。
(付記16)
前記コンピュータが、
複数の前記フレームにおける前記周波数スペクトルの自己相関値を算出し、
前記自己相関値に基づいて、前記初期マスキング閾値を前記第1のマスキング閾値及び前記第2のマスキング閾値のいずれに補正するかを決定する、
ことを特徴とする付記11に記載の符号化方法。
(付記17)
オーディオ信号の周波数スペクトルを量子化する際の初期マスキング閾値を生成し、
生成した初期マスキング閾値が当該周波数スペクトルを量子化するための条件を満たしていない場合に、前記オーディオ信号の連続する複数のフレームにおける前記周波数スペクトルの変化の程度に基づいて、量子化による帯域の欠落を許容する条件で補正した第1のマスキング閾値と、量子化による帯域の欠落を許容しない条件で補正した第2のマスキング閾値とのいずれを量子化に用いるか決定し、
前記初期マスキング閾値、前記第1のマスキング閾値、及び前記第2のマスキング閾値のいずれかを用いて前記周波数スペクトルを量子化し、
量子化した前記周波数スペクトルの値を符号化する処理、
をコンピュータに実行させるためのプログラム。
The following additional notes are further disclosed with respect to the embodiments including the examples described above.
(Appendix 1)
An encoding device that converts an audio signal into a frequency spectrum for each frame and quantizes and encodes the frequency spectrum,
A threshold generating unit that generates an initial masking threshold when quantizing the frequency spectrum based on the frequency spectrum;
A threshold correction unit that corrects the initial masking threshold based on whether or not to allow loss of a band due to quantization and the amount of bits given to quantization of the frequency spectrum;
Based on the degree of change in the frequency spectrum in a plurality of consecutive frames, the first masking threshold value corrected under conditions that allow band loss due to quantization, and correction under conditions that do not allow band loss due to quantization A threshold value determining unit that determines which of the second masking threshold values to be used for quantization;
An encoding device comprising:
(Appendix 2)
The threshold determination unit extracts a band that is missing when the frequency spectrum is quantized using the first masking threshold, and changes the missing band in a plurality of the frames as a degree of change in the frequency spectrum. Determining a rate and determining which of the first masking threshold and the second masking threshold to use for quantization based on the variation rate;
The encoding device according to appendix 1, wherein
(Appendix 3)
A quantization unit that quantizes the frequency spectrum using the first masking threshold;
The threshold value determination unit extracts a band missing due to quantization by the quantization unit, obtains a variation rate of the missing band in the plurality of frames as a degree of change of the frequency spectrum, and based on the variation rate Determining whether to use the first masking threshold for quantization;
The encoding device according to appendix 1, wherein
(Appendix 4)
An encoding unit for encoding the quantized frequency spectrum value;
When the threshold value determining unit determines to use the first masking threshold value for quantization, the encoding unit causes the encoding unit to encode the value of the frequency spectrum quantized by the quantization unit.
The encoding apparatus according to Supplementary Note 3, wherein
(Appendix 5)
The threshold determination unit calculates a fluctuation rate of the missing band in the plurality of frames;
A determination unit that determines whether to use the first masking threshold for quantization based on the calculated variation rate,
The encoding device according to any one of appendices 2 to 4, characterized in that:
(Appendix 6)
The calculation unit calculates the fluctuation rate of the missing band from the number of bands that are missing in the current encoding target frame and the number of bands that are missing in other frames among the missing bands.
The encoding apparatus according to supplementary note 5, wherein:
(Appendix 7)
The calculation unit, when the band missing in the current encoding target frame and the band before and after it are missing in other frames, coefficient the missing band as a band missing in other frames,
The encoding apparatus according to supplementary note 5, wherein:
(Appendix 8)
The threshold value determination unit calculates an autocorrelation value from the frequency spectrum in the plurality of frames as the degree of change in the frequency spectrum;
A determination unit that determines whether to correct the initial masking threshold based on the autocorrelation value based on a condition that allows a missing band due to quantization or a condition that does not allow a missing band due to quantization; ,
The encoding device according to appendix 1, wherein
(Appendix 9)
The threshold correction unit corrects the initial masking threshold under a condition that allows a missing band due to quantization, and a first corrector corrects the initial masking threshold under a condition that does not allow a missing band due to quantization. 2. The encoding device according to appendix 1, wherein the encoding device includes two correction units.
(Appendix 10)
The threshold generation unit generates the initial masking threshold based on an auditory psychological model.
The encoding device according to appendix 1, wherein
(Appendix 11)
Computer
When the initial masking threshold generated based on the frequency spectrum of the audio signal does not satisfy the condition for quantizing the frequency spectrum,
Based on the degree of change in the frequency spectrum in a plurality of consecutive frames of the audio signal, the first masking threshold corrected under the condition that allows band loss due to quantization and the band loss due to quantization are not allowed A process of determining which of the second masking threshold corrected by the condition is used for quantization;
The encoding method characterized by performing these.
(Appendix 12)
The computer is
After correcting the initial masking threshold to the first masking threshold,
Extracting a band that is missing when the frequency spectrum is quantized using the first masking threshold;
Calculating the rate of change of the missing band in the plurality of frames as the degree of change in the frequency spectrum;
Determining whether to use the first masking threshold for quantization based on the calculated variation rate;
The encoding method according to supplementary note 11, wherein
(Appendix 13)
The computer is
Correcting the initial masking threshold to the first masking threshold;
After quantizing the frequency spectrum with the first masking threshold,
Extracting a missing band in the quantized frequency spectrum;
Calculating a rate of change of the missing band in the plurality of frames as the degree of change in the frequency spectrum;
Determining whether to use the first masking threshold for quantization based on the calculated fluctuation rate correlation;
The encoding method according to supplementary note 11, wherein
(Appendix 14)
The computer is
If it is determined that the first masking threshold is used for quantization, the value of the frequency spectrum quantized using the first masking threshold before the determination is encoded.
The encoding method according to supplementary note 13, characterized by:
(Appendix 15)
The computer is
A process of correcting the initial masking threshold to the first masking threshold and a process of correcting the initial masking threshold to the second masking threshold are performed in parallel.
The encoding method according to any one of appendices 11 to 14, characterized in that:
(Appendix 16)
The computer is
Calculating an autocorrelation value of the frequency spectrum in a plurality of the frames;
Determining whether to correct the initial masking threshold to the first masking threshold or the second masking threshold based on the autocorrelation value;
The encoding method according to supplementary note 11, wherein
(Appendix 17)
Generate an initial masking threshold for quantizing the frequency spectrum of the audio signal;
If the generated initial masking threshold does not satisfy the condition for quantizing the frequency spectrum, the band loss due to quantization is based on the degree of change of the frequency spectrum in a plurality of consecutive frames of the audio signal. To determine which one of the first masking threshold value corrected under the condition that allows the quantization and the second masking threshold value corrected under the condition that does not allow the loss of the band due to the quantization are used for the quantization,
Quantizing the frequency spectrum using any of the initial masking threshold, the first masking threshold, and the second masking threshold;
A process of encoding the quantized frequency spectrum value;
A program that causes a computer to execute.

1 符号化装置
10 ブロック切替部
11 MDCT処理部
12 マスキング閾値生成部
13 聴覚特性算出部
14 マスキング閾値補正部
141 第1の補正部
142 第2の補正部
143 補正閾値決定部
143a 欠落SFB変動率算出部
143b 欠落SFB情報保持部
143c 判定部
144 補正閾値決定部
144a 量子化部
144b 欠落MDCT変動率算出部
144c 欠落MDCT情報保持部
144d 判定部
15 量子化部
16 符号化部
17 多重化部
18 記憶部
19 補正閾値決定部
19a 自己相関値算出部
19b スペクトル電力値保持部
19c 判定部
DESCRIPTION OF SYMBOLS 1 Encoding apparatus 10 Block switching part 11 MDCT process part 12 Masking threshold value generation part 13 Auditory characteristic calculation part 14 Masking threshold value correction part 141 1st correction part 142 2nd correction part 143 Correction threshold value determination part 143a Missing SFB fluctuation rate calculation Unit 143b missing SFB information holding unit 143c determining unit 144 correction threshold determining unit 144a quantizing unit 144b missing MDCT fluctuation rate calculating unit 144c missing MDCT information holding unit 144d determining unit 15 quantizing unit 16 encoding unit 17 multiplexing unit 18 storage unit 19 correction threshold value determination unit 19a autocorrelation value calculation unit 19b spectrum power value holding unit 19c determination unit

Claims (8)

オーディオ信号をフレーム毎に周波数スペクトルに変換し、当該周波数スペクトルを量子化して符号化する符号化装置であって、
前記周波数スペクトルに基づいて当該周波数スペクトルを量子化する際の初期マスキング閾値を生成する閾値生成部と、
前記周波数スペクトルの量子化に与えられたビット量と量子化による帯域の欠落を許容するか否かの条件に基づいて前記初期マスキング閾値を補正する閾値補正部と、
連続する複数の前記フレームにおける前記周波数スペクトルの変化の程度に基づいて、量子化による帯域の欠落を許容する条件で補正した第1のマスキング閾値と、量子化による帯域の欠落を許容しない条件で補正した第2のマスキング閾値とのいずれを量子化に用いるか決定する閾値決定部と、
を備えることを特徴とする符号化装置。
An encoding device that converts an audio signal into a frequency spectrum for each frame and quantizes and encodes the frequency spectrum,
A threshold generating unit that generates an initial masking threshold when quantizing the frequency spectrum based on the frequency spectrum;
A threshold correction unit that corrects the initial masking threshold based on whether or not to allow loss of a band due to quantization and the amount of bits given to quantization of the frequency spectrum;
Based on the degree of change in the frequency spectrum in a plurality of consecutive frames, the first masking threshold value corrected under conditions that allow band loss due to quantization, and correction under conditions that do not allow band loss due to quantization A threshold value determining unit that determines which of the second masking threshold values to be used for quantization;
An encoding device comprising:
前記閾値決定部は、前記第1のマスキング閾値を用いて前記周波数スペクトルを量子化した場合に欠落する帯域を抽出し、前記周波数スペクトルの変化の程度として複数の前記フレームにおける前記欠落する帯域の変動率を求め、当該変動率に基づいて、前記第1のマスキング閾値と前記第2のマスキング閾値とのいずれを量子化に用いるか決定する、
ことを特徴とする請求項1に記載の符号化装置。
The threshold determination unit extracts a band that is missing when the frequency spectrum is quantized using the first masking threshold, and changes the missing band in a plurality of the frames as a degree of change in the frequency spectrum. Determining a rate and determining which of the first masking threshold and the second masking threshold to use for quantization based on the variation rate;
The encoding apparatus according to claim 1.
前記第1のマスキング閾値を用いて前記周波数スペクトルを量子化する量子化部を更に備え、
前記閾値決定部は、前記量子化部による量子化で欠落した帯域を抽出し、前記周波数スペクトルの変化の程度として複数の前記フレームにおける前記欠落した帯域の変動率を求め、当該変動率に基づいて、前記第1のマスキング閾値を量子化に用いるか否かを判定する、
ことを特徴とする請求項1に記載の符号化装置。
A quantization unit that quantizes the frequency spectrum using the first masking threshold;
The threshold value determination unit extracts a band missing due to quantization by the quantization unit, obtains a variation rate of the missing band in the plurality of frames as a degree of change of the frequency spectrum, and based on the variation rate Determining whether to use the first masking threshold for quantization;
The encoding apparatus according to claim 1.
前記閾値決定部は、複数の前記フレームにおける前記欠落する帯域の変動率を算出する算出部と、
算出した前記変動率に基づいて前記第1のマスキング閾値を量子化に用いるか否かを判定する判定部と、を有する、
ことを特徴とする請求項2又は3に記載の符号化装置。
The threshold determination unit calculates a fluctuation rate of the missing band in the plurality of frames;
A determination unit that determines whether to use the first masking threshold for quantization based on the calculated variation rate,
The encoding apparatus according to claim 2 or 3, characterized in that
前記算出部は、現時点の符号化対象のフレームにおいて欠落する帯域の数と、当該欠落する帯域のうち他のフレームでも欠落している帯域の数とから、欠落する帯域の変動率を算出する、
ことを特徴とする請求項4に記載の符号化装置。
The calculation unit calculates the fluctuation rate of the missing band from the number of bands that are missing in the current encoding target frame and the number of bands that are missing in other frames among the missing bands.
The encoding apparatus according to claim 4.
前記閾値決定部は、複数の前記フレームにおける前記周波数スペクトルから自己相関値を算出する算出部と、
前記自己相関値に基づいて、量子化による帯域の欠落を許容する条件と、量子化による帯域の欠落を許容しない条件とのいずれで前記初期マスキング閾値を補正させるか判定する判定部と、を有する、
ことを特徴とする請求項1に記載の符号化装置。
The threshold value determination unit calculates an autocorrelation value from the frequency spectrum in the plurality of frames,
A determination unit that determines whether to correct the initial masking threshold based on the autocorrelation value based on a condition that allows a missing band due to quantization or a condition that does not allow a missing band due to quantization; ,
The encoding apparatus according to claim 1.
コンピュータが、
オーディオ信号の周波数スペクトルに基づいて生成した初期マスキング閾値が当該周波数スペクトルを量子化するための条件を満たしていない場合に、
前記オーディオ信号の連続する複数のフレームにおける前記周波数スペクトルの変化の程度に基づいて、量子化による帯域の欠落を許容する条件で補正した第1のマスキング閾値と、量子化による帯域の欠落を許容しない条件で補正した第2のマスキング閾値とのいずれを量子化に用いるか決定する処理、
を実行することを特徴とする符号化方法。
Computer
When the initial masking threshold generated based on the frequency spectrum of the audio signal does not satisfy the condition for quantizing the frequency spectrum,
Based on the degree of change in the frequency spectrum in a plurality of consecutive frames of the audio signal, the first masking threshold corrected under the condition that allows band loss due to quantization and the band loss due to quantization are not allowed A process of determining which of the second masking threshold corrected by the condition is used for quantization;
The encoding method characterized by performing these.
オーディオ信号の周波数スペクトルを量子化する際の初期マスキング閾値を生成し、
生成した初期マスキング閾値が当該周波数スペクトルを量子化するための条件を満たしていない場合に、前記オーディオ信号の連続する複数のフレームにおける前記周波数スペクトルの変化の程度に基づいて、量子化による帯域の欠落を許容する条件で補正した第1のマスキング閾値と、量子化による帯域の欠落を許容しない条件で補正した第2のマスキング閾値とのいずれを量子化に用いるか決定し、
前記初期マスキング閾値、前記第1のマスキング閾値、及び前記第2のマスキング閾値のいずれかを用いて前記周波数スペクトルを量子化し、
量子化した前記周波数スペクトルの値を符号化する処理、
をコンピュータに実行させるためのプログラム。
Generate an initial masking threshold for quantizing the frequency spectrum of the audio signal;
If the generated initial masking threshold does not satisfy the condition for quantizing the frequency spectrum, the band loss due to quantization is based on the degree of change of the frequency spectrum in a plurality of consecutive frames of the audio signal. To determine which one of the first masking threshold value corrected under the condition that allows the quantization and the second masking threshold value corrected under the condition that does not allow the loss of the band due to the quantization are used for the quantization,
Quantizing the frequency spectrum using any of the initial masking threshold, the first masking threshold, and the second masking threshold;
A process of encoding the quantized frequency spectrum value;
A program that causes a computer to execute.
JP2015140119A 2015-07-14 2015-07-14 Encoding apparatus, encoding method, and program Active JP6586804B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015140119A JP6586804B2 (en) 2015-07-14 2015-07-14 Encoding apparatus, encoding method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015140119A JP6586804B2 (en) 2015-07-14 2015-07-14 Encoding apparatus, encoding method, and program

Publications (2)

Publication Number Publication Date
JP2017021257A true JP2017021257A (en) 2017-01-26
JP6586804B2 JP6586804B2 (en) 2019-10-09

Family

ID=57889671

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015140119A Active JP6586804B2 (en) 2015-07-14 2015-07-14 Encoding apparatus, encoding method, and program

Country Status (1)

Country Link
JP (1) JP6586804B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05248972A (en) * 1992-03-06 1993-09-28 Sony Corp Audio signal processing method
JPH08166799A (en) * 1994-12-15 1996-06-25 Sony Corp Method and device for high-efficiency coding
JPH1173726A (en) * 1997-08-29 1999-03-16 Pioneer Electron Corp Signal processor
JP2002533790A (en) * 1998-12-24 2002-10-08 ソニー エレクトロニクス インク Adaptive bit allocator and audio encoder
JP2016206244A (en) * 2015-04-15 2016-12-08 富士通株式会社 Encoding device, encoding method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05248972A (en) * 1992-03-06 1993-09-28 Sony Corp Audio signal processing method
JPH08166799A (en) * 1994-12-15 1996-06-25 Sony Corp Method and device for high-efficiency coding
JPH1173726A (en) * 1997-08-29 1999-03-16 Pioneer Electron Corp Signal processor
JP2002533790A (en) * 1998-12-24 2002-10-08 ソニー エレクトロニクス インク Adaptive bit allocator and audio encoder
JP2016206244A (en) * 2015-04-15 2016-12-08 富士通株式会社 Encoding device, encoding method, and program

Also Published As

Publication number Publication date
JP6586804B2 (en) 2019-10-09

Similar Documents

Publication Publication Date Title
RU2586011C2 (en) Apparatus and method for encoding and decoding method device and program
KR101835910B1 (en) Encoding device and method, decoding device and method, and computer readable recording medium
JP5942358B2 (en) Encoding apparatus and method, decoding apparatus and method, and program
KR101162275B1 (en) A method and an apparatus for processing an audio signal
KR100814673B1 (en) audio coding
RU2689438C2 (en) Encoding device and encoding method, decoding device and decoding method and program
RU2604338C2 (en) Signal processing device, method and program
US20110137659A1 (en) Frequency Band Extension Apparatus and Method, Encoding Apparatus and Method, Decoding Apparatus and Method, and Program
US20180197555A1 (en) Decoding apparatus and method, and program
JP4548348B2 (en) Speech coding apparatus and speech coding method
KR100813193B1 (en) Method and device for quantizing a data signal
KR20030076576A (en) Enhancing the performance of coding systems that use high frequency reconstruction methods
JP2012215599A (en) Encoding apparatus and method, and program
CN112185397A (en) System for maintaining reversible dynamic range control information associated with a parametric audio encoder
CN114550732B (en) Coding and decoding method and related device for high-frequency audio signal
JP4444297B2 (en) Audio encoding
JP5609591B2 (en) Audio encoding apparatus, audio encoding method, and audio encoding computer program
JP6061121B2 (en) Audio encoding apparatus, audio encoding method, and program
JP6492915B2 (en) Encoding apparatus, encoding method, and program
JP6586804B2 (en) Encoding apparatus, encoding method, and program
JP5098492B2 (en) Signal processing apparatus, signal processing method, and program
JP5724338B2 (en) Encoding device, encoding method, decoding device, decoding method, and program
KR20070037771A (en) Audio coding system
JP2010034794A (en) Audio coding apparatus, audio coding program and audio coding method
JP2009103974A (en) Masking level calculating device, encoder, masking level calculating method and masking level calculation program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180413

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190322

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190402

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190426

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190813

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190826

R150 Certificate of patent or registration of utility model

Ref document number: 6586804

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150