JPH0854899A - Encoding device - Google Patents

Encoding device

Info

Publication number
JPH0854899A
JPH0854899A JP6189294A JP18929494A JPH0854899A JP H0854899 A JPH0854899 A JP H0854899A JP 6189294 A JP6189294 A JP 6189294A JP 18929494 A JP18929494 A JP 18929494A JP H0854899 A JPH0854899 A JP H0854899A
Authority
JP
Japan
Prior art keywords
scaling factor
quantization
value
quantized
encoding
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.)
Pending
Application number
JP6189294A
Other languages
Japanese (ja)
Inventor
Shiyuuichi Kawama
修一 河間
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP6189294A priority Critical patent/JPH0854899A/en
Publication of JPH0854899A publication Critical patent/JPH0854899A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the quantizing efficiency of data by optimizing the quantization of a scaling factor. CONSTITUTION:A scaling factor quantizing.encoding section 5 obtains a maximum quantization value FQ' which does not exceed a scaling factor F based on the factor F in the corresponding band range from a scaling factor extracting section 4 and a bit distribution number B from a bit distribution section 3. If the code of normalized values does not exceed the code assigned range determined by the number B during the normalization of the factor F by its quantized value FQ, FQ' is made to be the scaling factor quantized value FQ. Moreover, if FQ' exceeds the code assigned range, (FQ'+dFQ) (where dFQ is the quantization width of a scaling factor) is made to be the scaling factor quantized value FQ. Thus, a scaling factor is optimally quantized so that the input range of a quantizer in a quantizing-encoding section 7 is effectively used.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、楽音データあるいは
音声データ等のディジタルデータをスケーリングファク
タで正規化して符号化する符号化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coding apparatus for normalizing digital data such as tone data or voice data by a scaling factor and coding the digital data.

【0002】[0002]

【従来の技術】楽音や音声は、そのダイナミックレンジ
や周波数レンジが広いために、高音質でPCM(パルス
符号化)によってディジタル化する際には、ビット長が
16で、44.1kHzか48kHzでサンプリングするの
が一般的である。このときのビットレートは高く、70
5.6kbps(44.1kHz)あるいは768kbps(48kHz)
である。そこで、このビットレートを1/4〜1/8程度
まで低ビットレート化するために、上記PCMディジタ
ルデータを高能率で圧縮する符号化装置がある。
2. Description of the Related Art Musical sounds and voices have a wide dynamic range and a wide frequency range. Therefore, when digitized by PCM (pulse coding) with high sound quality, the bit length is 16 and is 44.1 kHz or 48 kHz. It is common to sample. The bit rate at this time is high, 70
5.6kbps (44.1kHz) or 768kbps (48kHz)
Is. Therefore, there is an encoding device that compresses the PCM digital data with high efficiency in order to reduce the bit rate to about 1/4 to 1/8.

【0003】この符号化装置では、入力データのダイナ
ミックレンジを落とさずに、どの振幅レベルでも量子化
時の精度を落とさないで符号化するために、所定時間の
フレーム単位で入力データの絶対値の最大値を検出し、
その最大値をスケーリングファクタとして量子化する。
そして、フレーム内の入力データを上記量子化したスケ
ーリングファクタで割って、全データを絶対値で1(あ
るいは特定の数値)以下の数値に正規化する。こうし
て、正規化することによって、レベルの小さな周波数成
分もレベルの大きな周波数成分と同等に扱うことができ
るので、帯域間のレベル差が大きい帯域分割型符号化方
式に特に有効である。尚、上記正規化はフレーム毎に且
つ各周波数帯域毎に行われる。この帯域分割型符号化方
式の代表例が、国際標準であるMPEG1/Audio(正式
にはISO/IEC11172−3)である。帯域の分割
数は一定である。
In this encoding apparatus, in order to perform encoding without lowering the dynamic range of the input data and without degrading the precision in quantization at any amplitude level, the absolute value of the input data is calculated in frame units for a predetermined time. Find the maximum value,
The maximum value is quantized as a scaling factor.
Then, the input data in the frame is divided by the quantized scaling factor to normalize all the data to an absolute value of 1 (or a specific value) or less. In this way, by normalizing, the frequency component with a small level can be treated in the same manner as the frequency component with a large level, which is particularly effective for a band division type coding system in which the level difference between bands is large. The above normalization is performed for each frame and for each frequency band. A typical example of this band division type encoding system is MPEG1 / Audio (formally ISO / IEC11172-3) which is an international standard. The number of band divisions is constant.

【0004】上述のように、上記符号化装置において
は、量子化されたスケーリングファクタで入力データを
割ってデータを“1"以下の数値に正規化するので、ス
ケーリングファクタの量子化の範囲は、データのダイナ
ミックレンジ以上必要なのである。そこで、スケーリン
グファクタの量子化では、スケーリングファクタを越え
る最も小さい量子化値を探索するのが一般的である。こ
れにより、正規化した入力データは必ず“1"以下の数
値にすることができる。
As described above, in the above coding apparatus, since the input data is divided by the quantized scaling factor to normalize the data to a numerical value of "1" or less, the range of quantization of the scaling factor is It needs more than the dynamic range of the data. Therefore, in the quantization of the scaling factor, it is general to search for the smallest quantized value that exceeds the scaling factor. As a result, the normalized input data can always have a numerical value of "1" or less.

【0005】また、一般的には、このスケーリングファ
クタの量子化はデシベル換算で等間隔で行われる。ま
た、MPEG1/Audioでは、各帯域とも、スケーリン
グファクタの量子化の範囲は126dBであり、量子化
ビット数に6ビットを割り当てている。
In general, quantization of this scaling factor is performed at equal intervals in decibel conversion. In MPEG1 / Audio, the quantization range of the scaling factor is 126 dB for each band, and 6 bits are assigned to the number of quantization bits.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記従
来のスケーリングファクタの量子化を行う符号化装置に
は以下のような問題がある。すなわち、上記正規化した
入力データを量子化器に配分されたビット数で量子化す
る際に、正規化した入力データの絶対値の最大値が
“1"より小さいほど(つまり、スケーリングファクタ自
身の量子化誤差が大きいほど)有効に量子化されず、そ
の誤差が大きくなる。この具体例を図10に示す。
However, the conventional coding apparatus for quantizing the scaling factor has the following problems. That is, when the normalized input data is quantized by the number of bits allocated to the quantizer, the smaller the maximum absolute value of the normalized input data is, the smaller the value is (1) (that is, the scaling factor itself). (The larger the quantization error is), the quantization is not performed effectively, and the error becomes large. A specific example of this is shown in FIG.

【0007】図10は、7段(量子化ビット数=3)のミ
ッドトレッド型量子化器(原点に階段の踏み面部(トレッ
ド)があるためにこう呼ばれている)の量子化特性を示
す。横軸は入力信号の振幅であり、縦軸は量子化後の振
幅を示す。各踏み面部には符号(3ビット2進数表現)が
割り当てられている。上記従来の符号化装置ではスケー
リングファクタを越える最も小さい量子化値をスケーリ
ングファクタ量子化値とするので、スケーリングファク
タ自身の量子化誤差が−1.9dB(0.804)と大きく
なるような場合が生ずる。ところで、上記量子化器の入
力として、上述のようにスケーリングファクタ自身の量
子化誤差が−1.9dB(0.804)と大きくなるような
信号を入力した際における量子化範囲は、図中破線で囲
まれた矩形の領域(イ)となる。
FIG. 10 shows the quantization characteristics of a seven-stage (quantization bit number = 3) mid-tread type quantizer (which is called because there is a tread surface of a stairway at the origin). . The horizontal axis represents the amplitude of the input signal, and the vertical axis represents the amplitude after quantization. A code (3-bit binary number expression) is assigned to each tread. In the above-mentioned conventional coding apparatus, the smallest quantized value that exceeds the scaling factor is used as the scaling factor quantized value. Therefore, the quantized error of the scaling factor itself may be as large as -1.9 dB (0.804). Occurs. By the way, the quantization range when a signal such that the quantization error of the scaling factor itself is as large as -1.9 dB (0.804) is input as the input of the quantizer is as shown by the broken line in the figure. It becomes a rectangular area (a) surrounded by.

【0008】この量子化範囲とは、入力信号を量子化し
て得られた量子化値が正規化の範囲内に収まり、且つ、
量子化値に符号を割り当てることができるような入力信
号の振幅(−7/6〜7/6)と量子化値の振幅(−1〜1)
とで囲まれた範囲(以下、符号割り当て範囲と言う)内に
収まる範囲のことである。したがって、上述のように、
スケーリングファクタ自身の量子化誤差が−1.9dB
(0.804)と大きくなるような信号が7段(量子化ビッ
ト数=3)のミッドトレッド型量子化器に入力された場
合には、符号“011"が割り当てられている最大の段
および符号“101"が割り当てられている最小の段が
使用されず、この量子化器は実質5段の量子化器として
動作することになる。
This quantization range means that the quantized value obtained by quantizing the input signal is within the normalization range, and
Amplitude of input signal (−7/6 to 7/6) and amplitude of quantized value (−1 to 1) that can assign codes to quantized values
It is a range within the range enclosed by and (hereinafter referred to as the code allocation range). Therefore, as mentioned above,
Quantization error of scaling factor itself is -1.9 dB
When a signal that becomes as large as (0.804) is input to a seven-stage (quantization bit number = 3) midtread quantizer, the maximum stage to which the code “011” is assigned and The smallest stage assigned the code "101" is not used, and this quantizer operates substantially as a 5-stage quantizer.

【0009】これでは、量子化を有効に行っているとは
言えず、粗い量子化を行ってしまうことになる。そのた
め、入力信号の振幅に対する量子化幅の割合が相対的に
大きくなる。そして、データの量子化誤差の最大値は量
子化器の量子化幅の1/2であるから、データの量子化
誤差も大きくなってしまうのである。
In this case, it cannot be said that the quantization is effectively performed, and coarse quantization will be performed. Therefore, the ratio of the quantization width to the amplitude of the input signal becomes relatively large. Since the maximum value of the data quantization error is 1/2 of the quantization width of the quantizer, the data quantization error also becomes large.

【0010】ところで、従来は、上記スケーリングファ
クタの量子化とデータの量子化とは独立に行われてい
る。したがって、データの量子化に際して、図10に領
域(イ)で示すように、入力波形の範囲が上記量子化ビッ
ト数で定まる上記符号割り当て範囲(つまり、量子化器
本来の能力範囲)より狭くなっても何も対策は行われな
いのである。
By the way, conventionally, the quantization of the scaling factor and the quantization of the data are performed independently. Therefore, when the data is quantized, the range of the input waveform becomes narrower than the code allocation range (that is, the original capability range of the quantizer) determined by the number of quantization bits, as shown by the area (a) in FIG. However, no measures are taken.

【0011】そこで、この発明の目的は、スケーリング
ファクタの量子化を最適化することによって、データの
量子化効率を上げ、量子化誤差を抑えて、圧縮した音響
データの音質をより良くする符号化装置を提供すること
にある。
Therefore, an object of the present invention is to improve the sound quality of compressed acoustic data by optimizing the quantization of the scaling factor to improve the data quantization efficiency and suppress the quantization error. To provide a device.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するた
め、請求項1に係る発明は、スケーリングファクタ抽出
部で抽出されたスケーリングファクタをスケーリングフ
ァクタ量子化・符号化部で量子化して符号化し,得られた
スケーリングファクタ量子化値を用いて正規化部で入力
データを正規化し,この入力データの正規化値を量子化・
符号化部で量子化して符号化する符号化装置において、
上記スケーリングファクタ抽出部は,1フレーム内にお
ける所定数の入力データの絶対値の最大値をスケーリン
グファクタとして抽出すると共に、上記スケーリングフ
ァクタ量子化・符号化部は、上記スケーリングファクタ
の値を越えない最大量子化値および上記スケーリングフ
ァクタを越える最小量子化値を求めると共に,上記求め
たスケーリングファクタの値を越えない最大量子化値を
スケーリングファクタ量子化値の候補として出力する量
子化・符号化手段と、上記量子化・符号化部における量子
化ビット数によって定まる符号を割り当てることが可能
な範囲を上記スケーリングファクタ量子化値の候補が超
えるか否かを所定の手順で判定すると共に,上記候補が
上記範囲を越えないと判定した場合には上記候補をスケ
ーリングファクタ量子化値として出力する一方,上記候
補が上記範囲を越えると判定した場合には,上記量子化・
符号化手段に対して上記スケーリングファクタを越える
最小量子化値の算出を指令する指令信号を出力し,上記
量子化・符号化手段によって得られた上記スケーリング
ファクタを越える最小量子化値をスケーリングファクタ
量子化値として出力する判定手段を有することを特徴と
している。
To achieve the above object, the invention according to claim 1 quantizes and encodes the scaling factor extracted by the scaling factor extraction unit by the scaling factor quantization / encoding unit, The normalization unit normalizes the input data using the obtained scaling factor quantized value, and quantizes the normalized value of this input data.
In an encoding device that quantizes and encodes in an encoding unit,
The scaling factor extraction unit extracts a maximum value of absolute values of a predetermined number of input data in one frame as a scaling factor, and the scaling factor quantization / encoding unit does not exceed the value of the scaling factor. Quantization / encoding means that obtains a quantized value and a minimum quantized value that exceeds the scaling factor, and that outputs a maximum quantized value that does not exceed the obtained scaling factor value as a scaling factor quantized value candidate, In a predetermined procedure, it is determined whether or not the scaling factor quantized value candidates exceed the range in which the code determined by the number of quantization bits in the quantization / encoding unit can be assigned. If it is determined that the value does not exceed While output as of value, if the candidate is determined to exceed the above range, the quantization and
A command signal for instructing the encoding means to calculate the minimum quantization value exceeding the scaling factor is output, and the minimum quantization value exceeding the scaling factor obtained by the quantization / encoding means is set to the scaling factor quantum. It is characterized in that it has a determination means for outputting the converted value.

【0013】また、請求項2に係る発明は、スケーリン
グファクタ抽出部で抽出されたスケーリングファクタを
スケーリングファクタ量子化・符号化部で量子化して符
号化し,得られたスケーリングファクタ量子化値を用い
て正規化部で入力データを正規化し,この入力データの
正規化値を量子化・符号化部で量子化して符号化する符
号化装置において、上記スケーリングファクタ抽出部は
1フレーム内における所定数の入力データの絶対値の最
大値をスケーリングファクタとして抽出すると共に、上
記量子化・符号化部における量子化ビット数で定まる符
号を割り当てることが可能な範囲の閾値と当該量子化ビ
ット数とを対応付けてなるテーブルを格納するテーブル
格納部を備えて、上記スケーリングファクタ量子化・符
号化部は、上記スケーリングファクタの値を越えない最
大量子化値および上記スケーリングファクタを越える最
小量子化値を求めると共に,上記求めたスケーリングフ
ァクタの値を越えない最大量子化値をスケーリングファ
クタ量子化値の候補として出力する量子化・符号化手段
と、上記量子化・符号化部における量子化ビット数によ
って定まる符号を割り当てることが可能な範囲を上記ス
ケーリングファクタ量子化値の候補が超えるか否かを上
記テーブルを参照して判定すると共に,上記候補が上記
範囲を越えないと判定した場合には上記候補をスケーリ
ングファクタ量子化値として出力する一方,上記候補が
上記範囲を越えると判定した場合には,上記量子化・符号
化手段に対して上記スケーリングファクタを越える最小
量子化値の算出を指令する指令信号を出力し、上記量子
化・符号化手段によって得られた上記スケーリングファ
クタを越える最小量子化値をスケーリングファクタ量子
化値として出力する判定手段を有することを特徴として
いる。
According to a second aspect of the present invention, the scaling factor extracted by the scaling factor extraction unit is quantized and encoded by the scaling factor quantization / encoding unit, and the obtained scaling factor quantized value is used. In a coding device that normalizes input data in a normalization unit and quantizes and codes a normalized value of this input data in a quantization / coding unit, the scaling factor extraction unit is configured to input a predetermined number of inputs in one frame. The maximum value of the absolute value of the data is extracted as a scaling factor, and the threshold value in the range in which the code determined by the quantization bit number in the quantization / encoding unit can be assigned and the quantization bit number are associated with each other. The scaling factor quantization / encoding unit includes a table storage unit for storing the table The maximum quantized value that does not exceed the value of the ring factor and the minimum quantized value that exceeds the above scaling factor are obtained, and the maximum quantized value that does not exceed the value of the obtained scaling factor is output as a candidate for the quantized scaling factor value. With reference to the above table, it is determined whether or not the scaling factor quantized value candidates exceed the range in which the code determined by the quantizing / encoding means and the quantizing bit number in the quantizing / encoding unit can be assigned. If it is determined that the candidate does not exceed the above range, the candidate is output as a scaling factor quantized value, while if it is determined that the candidate exceeds the above range, the quantization or Outputs a command signal for instructing the encoding means to calculate the minimum quantized value exceeding the above scaling factor. It is characterized by having a determining means for outputting the minimum quantization value exceeding the scaling factor obtained by the quantization and encoding means as the scaling factor quantization value.

【0014】また、請求項3に係る発明は、スケーリン
グファクタ抽出部で抽出されたスケーリングファクタを
スケーリングファクタ量子化・符号化部で量子化して符
号化し,得られたスケーリングファクタ量子化値を用い
て正規化部で入力データを正規化し,この入力データの
正規化値を量子化・符号化部で量子化して符号化する符
号化装置において、上記スケーリングファクタ抽出部
は,1フレーム内における所定数の入力データの絶対値
の最大値をスケーリングファクタとして抽出すると共
に、上記スケーリングファクタの量子化値に上記量子化
・符号化部における量子化ビット数で定まる符号を割り
当てることが可能な範囲の閾値である第1閾値を加算し
てなる第2閾値と,上記スケーリングファクタの値が上
記第2閾値を越えないようにする最小の上記量子化値お
よびその符号とを対応付けてなるテーブルを,上記量子
化ビット数毎に格納するテーブル格納部を備えて、上記
スケーリングファクタ量子化・符号化部は、上記テーブ
ルを参照して、上記スケーリングファクタを越える最小
の上記第2閾値を検索すると共に,上記検索された第2
閾値に対応付けられている量子化値をスケーリングファ
クタ量子化値として出力する量子化値検索手段を有する
ことを特徴としている。
According to a third aspect of the present invention, the scaling factor extracted by the scaling factor extraction unit is quantized and encoded by the scaling factor quantization / encoding unit, and the obtained scaling factor quantized value is used. In the encoding device that normalizes the input data in the normalization unit and quantizes and encodes the normalized value of the input data in the quantization / encoding unit, the scaling factor extraction unit includes a predetermined number of frames in one frame. It is a threshold value in a range in which the maximum absolute value of input data is extracted as a scaling factor and a code determined by the number of quantization bits in the quantization / encoding unit can be assigned to the quantized value of the scaling factor. Make sure that the value of the scaling factor and the second threshold value obtained by adding the first threshold value do not exceed the second threshold value. A table storing unit for storing the minimum quantized value and the code corresponding to each other is provided for each of the quantized bit numbers, and the scaling factor quantization / encoding unit refers to the table. To retrieve the minimum second threshold value exceeding the scaling factor, and to retrieve the second retrieved threshold value.
It is characterized by having a quantized value search means for outputting a quantized value associated with a threshold as a scaling factor quantized value.

【0015】[0015]

【作用】請求項1に係る発明では、スケーリングファク
タ抽出部によって、1フレーム内における所定数の入力
データの絶対値の最大値がスケーリングファクタとして
抽出される。そして、スケーリングファクタ量子化・符
号化部の量子化・符号化手段によって、上記スケーリン
グファクタを越えない最大量子化値が求められ、スケー
リングファクタ量子化値の候補として出力される。そう
すると、上記スケーリングファクタ量子化・符号化部に
おける判定手段によって、上記量子化・符号化手段から
のスケーリングファクタ量子化値の候補が量子化・符号
化部における量子化ビット数によって定まる符号を割り
当てることが可能な範囲を超えるか否かが所定の手順で
判定される。そして、上記候補が上記範囲を超えないと
判定すると、上記候補がスケーリングファクタ量子化値
として出力される。
According to the first aspect of the present invention, the scaling factor extraction unit extracts the maximum absolute value of a predetermined number of input data in one frame as the scaling factor. Then, the quantizing / encoding means of the scaling factor quantizing / encoding unit obtains the maximum quantized value that does not exceed the above scaling factor, and outputs it as a candidate for the quantized scaling factor. Then, the determination means in the scaling factor quantization / encoding unit assigns a code in which the candidates for the scaling factor quantization value from the quantization / encoding unit are determined by the number of quantization bits in the quantization / encoding unit. Is determined by a predetermined procedure. When it is determined that the candidate does not exceed the range, the candidate is output as the scaling factor quantized value.

【0016】一方、上記候補が上記範囲を越えると判定
すると、上記量子化・符号化手段に対して、上記スケー
リングファクタを越える最小量子化値の算出を指令する
指令信号が出力される。そして、上記量子化・符号化手
段によって得られた上記スケーリングファクタを越える
最小量子化値がスケーリングファクタ量子化値として出
力される。
On the other hand, when it is determined that the candidate exceeds the range, a command signal for instructing the quantization / encoding means to calculate the minimum quantized value exceeding the scaling factor is output. Then, the minimum quantized value exceeding the scaling factor obtained by the quantizing / encoding means is output as the scaling factor quantized value.

【0017】以後、正規化部によって上記判定手段から
出力されるスケーリングファクタ量子化値を用いて上記
入力データが正規化され、この入力データの正規化値が
上記量子化・符号化部によって量子化されて符号化され
る。その際に、上記量子化・符号化部によって入力デー
タを量子化して得られる量子化値は、上記量子化・符号
化部において符号を割り当てることが可能な範囲を越え
ない最も広い量子化範囲内に収まる。
Thereafter, the normalization unit normalizes the input data using the scaling factor quantized value output from the determining means, and the normalization value of the input data is quantized by the quantization / encoding unit. And encoded. At this time, the quantized value obtained by quantizing the input data by the quantizing / encoding unit is within the widest quantized range within which the code can be assigned in the quantizing / encoding unit. Fits in.

【0018】また、請求項2に係る発明では、スケーリ
ングファクタ抽出部によって、1フレーム内における所
定数の入力データの絶対値の最大値がスケーリングファ
クタとして抽出される。そして、スケーリングファクタ
量子化・符号化部の量子化・符号化手段によって、上記ス
ケーリングファクタを越えない最大量子化値が求めら
れ、スケーリングファクタ量子化値の候補として出力さ
れる。そうすると、上記スケーリングファクタ量子化・
符号化部における判定手段によって、テーブル格納部に
格納されているテーブルが参照されて、上記候補が量子
化・符号化部における量子化ビット数によって定まる符
号を割り当てることが可能な範囲を超えるか否かが判定
される。そして、上記候補が上記範囲を超えないと判定
すると、上記候補がスケーリングファクタ量子化値とし
て出力される。
According to the second aspect of the invention, the scaling factor extraction unit extracts the maximum absolute value of a predetermined number of input data in one frame as the scaling factor. Then, the quantizing / encoding means of the scaling factor quantizing / encoding unit obtains the maximum quantized value that does not exceed the above scaling factor, and outputs it as a candidate for the quantized scaling factor. Then, the scaling factor quantization
Whether the table stored in the table storage unit is referred to by the determination unit in the encoding unit and whether the above candidate exceeds a range in which the code determined by the number of quantization bits in the quantization / encoding unit can be assigned. Is determined. When it is determined that the candidate does not exceed the range, the candidate is output as the scaling factor quantized value.

【0019】一方、上記候補が上記範囲を越えると判定
すると、上記量子化・符号化手段に対して、上記スケー
リングファクタを越える最小量子化値の算出を指令する
指令信号が出力される。そして、上記量子化・符号化手
段によって得られた上記スケーリングファクタを越える
最小量子化値がスケーリングファクタ量子化値として出
力される。
On the other hand, when it is determined that the candidate exceeds the range, a command signal for instructing the quantization / encoding means to calculate the minimum quantized value exceeding the scaling factor is output. Then, the minimum quantized value exceeding the scaling factor obtained by the quantizing / encoding means is output as the scaling factor quantized value.

【0020】また、請求項3に係る発明では、スケーリ
ングファクタ抽出部によって、1フレーム内における所
定数の入力データの絶対値の最大値がスケーリングファ
クタとして抽出される。そうすると、上記スケーリング
ファクタ量子化・符号化部における量子化値検索手段に
よって、テーブル格納部に格納されているテーブルが参
照されて、上記スケーリングファクタを越える最小の第
2閾値が検索され、上記第2閾値に対応付けられている
量子化値が得られる。そして、この得られた量子化値が
スケーリングファクタ量子化値として出力される。
According to the third aspect of the invention, the scaling factor extraction unit extracts the maximum absolute value of a predetermined number of input data in one frame as the scaling factor. Then, the quantization value search means in the scaling factor quantization / encoding unit refers to the table stored in the table storage unit to search for the minimum second threshold value exceeding the scaling factor, and the second threshold value. The quantized value associated with the threshold value is obtained. Then, the obtained quantized value is output as the scaling factor quantized value.

【0021】[0021]

【実施例】以下、この発明を図示の実施例により詳細に
説明する。本実施例では帯域分割型符号化装置を例に説
明するが、この発明は、他のスケーリングファクタを利
用する符号化装置にも適用できる。
The present invention will be described in detail below with reference to the embodiments shown in the drawings. In the present embodiment, a band division type coding device will be described as an example, but the present invention can also be applied to a coding device using another scaling factor.

【0022】<第1実施例>図1は、本実施例の符号化
装置の一実施例を示すブロック図である。ディジタルの
楽音データや音声データ(以下、単に入力データと言う)
が入力端子1に入力され、N個の帯域通過フィルタから
なる帯域分割部2によりN組の帯域のデータとなる。
尚、各帯域を1≦n≦Nの数値で表す。また、上記入力
データのビット数は16ビットであるとする。但し、図
1においては、簡略化のために、帯域“1"と帯域“n"
と帯域“N"の3つの帯域で代表している。
<First Embodiment> FIG. 1 is a block diagram showing an embodiment of an encoding apparatus according to the present embodiment. Digital tone data and voice data (hereinafter simply referred to as input data)
Is input to the input terminal 1 and becomes data of N sets of bands by the band division unit 2 including N band pass filters.
Each band is represented by a numerical value of 1 ≦ n ≦ N. The number of bits of the input data is 16 bits. However, in FIG. 1, the band “1” and the band “n” are shown for simplification.
It is represented by three bands of "," and "N".

【0023】こうして得られたN組の帯域のデータのう
ち、帯域nのデータは、フレーム単位(データ数にして
Iサンプルずつの単位)でまとめられ、スケーリングフ
ァクタ抽出部4nでデータDn(i)(0≦i≦I−1)の絶
対値の最大値fnを抽出し、この最大値fnをスケーリン
グファクタとする。尚、スケーリングファクタfnのデ
シベル値をFn(=20log10n)と表わす。ビット配分
部3は、各帯域毎にデータを量子化する際のビット数の
配分を以下のようにして決定する。すなわち、FFT
(高速フーリエ変換)や各帯域のパワー等を使用して、入
力データの周波数領域でのパワー分布を解析し、人間の
聴覚特性(特にマスキング特性)を適用して、各帯域毎に
量子化誤差がマスクされるのに必要なビット数を計算す
るのである。こうしてビット配分部3によって求められ
た帯域nのビット配分数Bnは、帯域nのスケーリング
ファクタ量子化・符号化部5n,帯域nの量子化・符号化部
nおよびマルチプレクサ8に送出される。尚、図1に
おいては上記ビット配分部3に入力データを直接入力し
ているが、帯域分割部2における各帯域毎の出力データ
を入力してもよい。
Of the N sets of band data thus obtained, the band n data are grouped in frame units (units of I samples in terms of the number of data), and the scaling factor extraction unit 4 n outputs the data D n ( i) The maximum value f n of absolute values of (0 ≦ i ≦ I−1) is extracted, and this maximum value f n is used as a scaling factor. The decibel value of the scaling factor f n is represented by F n (= 20log 10 f n ). The bit allocation unit 3 determines the allocation of the number of bits when quantizing data for each band as follows. That is, FFT
(Fast Fourier transform) and the power of each band are used to analyze the power distribution of the input data in the frequency domain, apply human auditory characteristics (especially masking characteristics), and quantize error for each band. Compute the number of bits needed to be masked. The bit allocation number B n of the band n obtained by the bit allocation unit 3 in this way is sent to the scaling factor quantization / encoding unit 5 n of the band n, the quantization / encoding unit 7 n of the band n, and the multiplexer 8. It Although the input data is directly input to the bit allocation unit 3 in FIG. 1, the output data for each band in the band division unit 2 may be input.

【0024】上記スケーリングファクタ量子化・符号化
部5nは、スケーリングファクタ抽出部4nからのスケー
リングファクタFnとビット配分部3からのビット配分
数Bnとに基づいてスケーリングファクタFnを量子化お
よび符号化し、得られたスケーリングファクタ量子化値
FQnとその符号FCnとをマルチプレクサ8に送出す
る。また、スケーリングファクタ量子化値FQnを正規
化部6nに送出する。尚、本実施例の特徴である上記ス
ケーリングファクタ量子化・符号化部5nの動作について
は、後に詳細に説明する。
[0024] The scaling factor quantization and coding unit 5 n is quantized scaling factors F n on the basis of the bit allocation number B n from the scaling factor F n and the bit allocation portion 3 from the scaling factor extracting unit 4 n The obtained scaling factor quantized value FQ n and its code FC n are sent to the multiplexer 8. Also, the scaling factor quantized value FQ n is sent to the normalization unit 6 n . The operation of the scaling factor quantizer / encoder 5 n , which is a feature of this embodiment, will be described in detail later.

【0025】上記正規化部6nでは、帯域分割部2で得
られた帯域nのデータDn(i)をスケーリングファクタ量
子化値FQnの真数値fQn(=10FQn/20)で除して“±
1"の範囲内に在る数値Nn(i)に正規化する。そして、
この正規化データNn(i)を量子化・符号化部7nで量子化
及び符号化する。その際に、量子化・符号化部7nは、図
10と同様のミッドトレッド型量子化器を有し、この量
子化器はビット配分部3によって与えられたビット配分
数Bnに応じた段数“2Bn−1"を持ち、量子化幅dQn
は、 dQn=1/{2(Bn-1)−1} …(1) である。
In the normalizing unit 6 n , the data D n (i) of the band n obtained by the band dividing unit 2 is divided by the true value fQ n (= 10 FQn / 20 ) of the scaling factor quantized value FQ n. Then “±
Normalize to a number N n (i) within the range of 1 ", and
This normalized data N n (i) is quantized and encoded by the quantization / encoding unit 7 n . At this time, the quantizing / encoding unit 7 n has a midtread type quantizer similar to that shown in FIG. 10, and this quantizer responds to the bit allocation number B n given by the bit allocation unit 3. The number of stages is “2 Bn −1” and the quantization width is dQ n
Is a dQ n = 1 / {2 ( Bn-1) -1} ... (1).

【0026】上記量子化・符号化部7nは、上記量子化幅
dQnで正規化データNn(i)を量子化および符号化し、
符号Cnを求める。 Cn(i)=round(Nn(i)/dQn) …(2) ここで、「round(x)」は、xの小数点以下第1位を四捨
五入することによってxを整数化する関数である。尚、
符号Cn(i)はビット配分数Bnで表現され、マルチプレ
クサ8に送出される。
The quantization / encoding unit 7 n quantizes and encodes the normalized data N n (i) with the quantization width dQ n ,
The code C n is obtained. In C n (i) = round ( N n (i) / dQ n) ... (2) where, "round english (us) (x)" is a function that integer to x by rounding the first decimal place of x Is. still,
The code C n (i) is expressed by the bit allocation number B n and is sent to the multiplexer 8.

【0027】上記マルチプレクサ8は、各帯域nのデー
タDn(i)の符号Cn(i),ビット配分数Bnおよびスケーリ
ングファクタの符号FCnを、ある決まったフォーマッ
トに従ってフレーム単位でまとめ上げてビットストリー
ムにする。このビットストリームは、出力端子9から外
部に伝送される。
The multiplexer 8 collects the code C n (i) of the data D n (i) of each band n, the bit allocation number B n and the code FC n of the scaling factor in frame units according to a certain format. Into a bitstream. This bit stream is transmitted from the output terminal 9 to the outside.

【0028】次に、上記スケーリングファクタ量子化・
符号化部5nによる量子化および符号化の動作を詳細に
説明する。スケーリングファクタ量子化・符号化部5
nは、一般的には量子化・符号化手段のみを有して、上述
したように、スケーリングファクタFnを越える最小の
スケーリングファクタ量子化値FQnを探索することに
よってスケーリングファクタFnを量子化する。すなわ
ち、 Fn≦FQn=Fl+FCn×dFQ (0≦FCn≦2SB−1) …(3) ここで、 Fl:スケーリングファクタ量子化値の下限
値 dFQ:スケーリングファクタFnの量子化幅 SB:スケーリングファクタFnの量子化ビット数 を満たす最小のFQnおよびFCnを探索するのである。
尚、式(3)は、デシベル次元である。
Next, the scaling factor quantization
Quantization and coding operations by the coding unit 5 n will be described in detail. Scaling factor quantization / encoding unit 5
In general, n has only quantization / coding means, and as described above, the scaling factor F n is quantized by searching for the minimum scaling factor quantized value FQ n that exceeds the scaling factor F n . Turn into. That is, F n ≦ FQ n = Fl + FC n × dFQ (0 ≦ FC n ≦ 2 SB −1) (3) Here, Fl: lower limit value of scaling factor quantized value dFQ: quantization width of scaling factor F n SB: is to explore the minimum FQ n and FC n satisfying the number of quantization bits of the scaling factor F n.
The expression (3) is a decibel dimension.

【0029】ところが、本実施例においては、以下のよ
うにしてスケーリングファクタFnを量子化するのであ
る。図2は、本実施例におけるスケーリングファクタ量
子化・符号化部5nの詳細なブロック図である。量子化・
符号化手段41nは、 Fn≧FQ'n=Fl+FC'n×dFQ (0≦FC'n≦2SB−1) …(4) を満たす最大のFQ'nおよびFC'nを探索する。あるい
は、従来と同様に式(3)に基づいてスケーリングファク
タ量子化値FQnおよびその符号FCnを求め、 FQ'n=FQn−dFQ FC'n=FCn−1 によってFQ'nおよびFC'nを求めてもよい。こうして
求められた量子化値FQ'nおよびその符号FC'nは、ス
ケーリングファクタ量子化値FQnおよびその符号FCn
の候補として、判定手段42nに送出される。
However, in this embodiment, the scaling factor F n is quantized as follows. FIG. 2 is a detailed block diagram of the scaling factor quantizer / encoder 5 n in this embodiment. Quantization
The encoding means 41 n searches for maximum FQ ′ n and FC ′ n that satisfy F n ≧ FQ ′ n = Fl + FC ′ n × dFQ (0 ≦ FC ′ n ≦ 2 SB −1) (4). Alternatively, determine the scaling factor quantization values FQ n and its sign FC n based on similarly to the conventional equation (3), FQ 'n = FQ n -dFQ FC' n = FQ by FC n -1 'n and FC 'You may ask for n . The quantized value FQ ′ n and its code FC ′ n thus obtained are the scaling factor quantized value FQ n and its code FC n.
Is sent to the determination means 42 n as a candidate for

【0030】上記判定手段42nは、上記スケーリング
ファクタFnの真数値fnを上記スケーリングファクタ量
子化値の候補FQ'nの真数値fQ'n(=10FQ'n/20)で
正規化した(割った)値(スケーリングファクタFnの量
子化誤差でもある)を、式(2)に従って符号化する(但
し、式(2)中の正規化データNn(i)をfn/fQ'nに置き
換える)。こうして得られた符号がビット配分数Bnで定
まる割り当て可能な符号の最大値2(Bn-1)を越えるか否
かを判定する。その結果、越えない(すなわち、上記符
号割り当て範囲を超えない)と判定すれば、上記量子化
値FQ'nをスケーリングファクタ量子化値FQnと確定
する。また、上記FC'nをスケーリングファクタFn
符号FCnと確定するのである。そして、上記確定され
たスケーリングファクタ量子化値FQnとスケーリング
ファクタFnの符号FCnとを出力する。
The determining means 42 n normalizes the true value f n of the scaling factor F n with the true value fQ ' n (= 10 FQ'n / 20 ) of the candidate scaling factor quantized value FQ' n . The divided value (which is also the quantization error of the scaling factor F n ) is encoded according to the equation (2) (however, the normalized data N n (i) in the equation (2) is f n / fQ. 'replace with n ). Code thus obtained is greater than or equal to a maximum value 2 (Bn-1) of the assignable codes determined by the bit allocation number B n. As a result, it does not exceed (i.e., the code assignment does not exceed the range) be determined that, to determine the quantized value FQ 'n and a scaling factor quantization value FQ n. Also, it is to determine the FC 'n the code FC n scaling factor F n. Then, the determined scaling factor quantized value FQ n and the code FC n of the scaling factor F n are output.

【0031】しかしながら、上記スケーリングファクタ
nの正規化値を式(2)に従って符号化して得られた符
号が上記最大値2(Bn-1)を越えると判定すれば、上記量
子化・符号化手段41nへ、式(3)を満たす最小の量子化
値FQnおよびその符号FCnの算出を指令する指令信号
を出力する。そして、量子化・符号化手段41nから送出
されてくるスケーリングファクタFnを越える最小の量
子化値(すなわち、(FQ'n+dFQ))とその符号(すな
わち、(FC'n+1))とをスケーリングファクタ量子化
値FQnとその符号FCnと確定するのである。そして、
上記確定されたスケーリングファクタ量子化値FQn
スケーリングファクタFnの符号FCnとを出力する。
However, if it is determined that the code obtained by encoding the normalized value of the scaling factor F n according to the equation (2) exceeds the maximum value 2 (Bn-1) , the quantization / encoding is performed. A command signal for commanding calculation of the minimum quantized value FQ n and its code FC n that satisfy the equation (3) is output to the means 41 n . Then, the minimum quantized value (that is, (FQ ' n + dFQ)) that exceeds the scaling factor F n sent from the quantization / encoding means 41 n and its code (that is, (FC' n +1)) Is determined as the scaling factor quantized value FQ n and its code FC n . And
The determined scaling factor quantized value FQ n and the code FC n of the scaling factor F n are output.

【0032】つまり、本実施例におけるスケーリングフ
ァクタ量子化・符号化部5nは、通常のスケーリングファ
クタの量子化で得られる量子化値よりデータDn(i)の量
子化幅dFQだけ小さいスケーリングファクタ量子化値
を量子化・符号化手段41nによって選んだ際に、このス
ケーリングファクタ量子化値がビット配分数Bnで定ま
る上記符号割り当て範囲を越えるか否かを判定手段42
nで調べることによって、スケーリングファクタ量子化
値FQnを最適に選ぶのである。
That is, the scaling factor quantization / encoding unit 5 n in this embodiment has a scaling factor smaller than the quantization value obtained by the normal quantization of the scaling factor by the quantization width dFQ of the data D n (i). When the quantization value is selected by the quantization / encoding means 41 n , it is determined whether the scaling factor quantization value exceeds the code allocation range defined by the bit allocation number B n.
The scaling factor quantized value FQ n is optimally selected by examining n .

【0033】上述のことを、図10に従って具体的に説
明する。今、スケーリングファクタFnの量子化幅dF
Qを“2dB"とし、式(3)に従った従来のスケーリング
ファクタの量子化の際における量子化誤差が−1.9dB
(0.804)であるとする。先ず、上述したように、式
(4)によって、従来のスケーリングファクタ量子化値よ
りも量子化幅dFQだけ小さい量子化値がスケーリング
ファクタ量子化値の候補FQ'nとして選ばれる。そうす
ると、スケーリングファクタFnの量子化誤差は、従来
の量子化誤差(−1.9dB(0.804))に量子化幅dF
Qが加算された値、 −1.9dB(0.804)+2dB=0.1dB(1.012) となる。したがって、スケーリングファクタFnの正規
化値の絶対値は“1"を越えることになる。
The above will be described in detail with reference to FIG. Now, the quantization width dF of the scaling factor F n
When Q is set to “2 dB”, the quantization error in the conventional quantization of the scaling factor according to the equation (3) is −1.9 dB.
(0.804). First, as mentioned above,
By (4), a quantized value smaller than the conventional scaling factor quantized value by the quantization width dFQ is selected as the scaling factor quantized value candidate FQ ′ n . Then, the quantization error of the scaling factor F n is equal to the conventional quantization error (-1.9 dB (0.804)) and the quantization width dF.
The value obtained by adding Q is −1.9 dB (0.804) +2 dB = 0.1 dB (1.012). Therefore, the absolute value of the normalized value of the scaling factor F n will exceed "1".

【0034】ところが、このスケーリングファクタFn
の正規化値の絶対値“1.012"は量子化出力値が
“1"(最大符号が割り当てられる段)を越える入力値の
境界“7/6"よりは小さい(換言すれば、上記符号割り
当て範囲を越えない)ので、スケーリングファクタFn
量子化値の候補FQ'nがスケーリングファクタ量子化値
FQnと確定されるのである。その際における量子化範
囲は、図10中における一点鎖線で囲まれた矩形の領域
(ロ)である。この場合、従来の量子化範囲(矩形領域
(イ))よりも量子化幅dFQの分だけ広くなっているた
めに、符号“011"が割り当てられている最大の段お
よび符号“101"が割り当てられている最小の段も使
用されて量子化され、従来よりも量子化誤差が少なくな
るのである。
However, this scaling factor F n
The absolute value "1.012" of the normalized value of is smaller than the boundary "7/6" of the input value where the quantized output value exceeds "1" (the stage to which the maximum code is assigned) (in other words, the above code since over not) the allocation range, the candidate FQ 'n quantized value of the scaling factor F n is determined a scaling factor quantization value FQ n. The quantization range at that time is the rectangular area surrounded by the alternate long and short dash line in FIG.
It is (b). In this case, the conventional quantization range (rectangular area
Since it is wider than (a)) by the quantization width dFQ, the maximum stage to which the code “011” is allocated and the minimum stage to which the code “101” is allocated are also used. The quantization error is smaller than that in the past.

【0035】尚、上記スケーリングファクタFnの正規
化値の絶対値が量子化出力値が“1"を越える入力値の
境界“7/6"より大きい(換言すれば、上記符号割り当
て範囲を越える)場合には、スケーリングファクタFn
量子化値の候補FQ'nより1ステップ大きい(すなわ
ち、スケーリングファクタFnの量子化幅dFQを加え
た)値をスケーリングファクタ量子化値FQnと確定する
のである。その際における量子化範囲は、従来の量子化
範囲になるのである。
The absolute value of the normalized value of the scaling factor F n is larger than the boundary "7/6" of the input values whose quantized output value exceeds "1" (in other words, it exceeds the code allocation range). ) in this case, one step from the candidate FQ 'n quantized value of the scaling factor F n greater (i.e., plus quantization width dFQ scaling factors F n) value determined a scaling factor quantization value FQ n the Of. The quantization range at that time becomes the conventional quantization range.

【0036】上記帯域分割部2から出力される他の帯域
のデータも上記帯域nのデータの場合と全く同様に処理
される。
Data of other bands output from the band division unit 2 are processed in exactly the same manner as the case of the data of the band n.

【0037】次に、復号化について説明する。図3は、
本実施例の符号化装置によって得られた符号を復号化す
る復号化装置の一実施例を示すブロック図である。図1
に示す符号化装置の出力端子9から出力されたビットス
トリームは、図示しない伝送路(無線系,有線系,蓄積系
(半導体メモリ等)がある)を通して復号化装置の入力端
子11に入力される。
Next, the decoding will be described. FIG.
It is a block diagram which shows one Example of the decoding apparatus which decodes the code | cord obtained by the encoding apparatus of a present Example. FIG.
The bit stream output from the output terminal 9 of the encoding device shown in FIG.
(There is a semiconductor memory or the like) through the input terminal 11 of the decoding device.

【0038】上記入力端子11に入力されたビットスト
リームから、デマルチプレクサ12によって、各帯域n
別に符号Cn(i),ビット配分数Bnおよびスケーリングフ
ァクタの符号FCnがフレーム単位で取り出される。ス
ケーリングファクタ復号化・逆量子化部13nには、スケ
ーリングファクタの符号FCnが入力される。そうする
と、スケーリングファクタ復号化・逆量子化部13nは、
式(3)によってスケーリングファクタ量子化値FQn
求めて逆正規化部15nに送出する。また、復号化・逆量
子化部14nは、入力される符号Cn(i)およびビット配
分数Bnに基づいて、上記符号化装置における量子化・符
号化部7nと逆の動作によって逆量子化してデータNQn
(i)を求める。具体的には、ビット配分数Bnを用いて、
式(1)によって量子化幅dQnを求め、この求められた
量子化幅dQnを用いて、式(5)によって逆量子化して
データNQn(i)を算出する。 NQn(i)=Cn(i)×dQn …(5)
From the bit stream input to the input terminal 11, the demultiplexer 12 outputs each band n.
Separately, the code C n (i), the bit allocation number B n, and the scaling factor code FC n are extracted in frame units. The scaling factor code FC n is input to the scaling factor decoding / inverse quantization unit 13 n . Then, the scaling factor decoding / inverse quantization unit 13 n
The scaling factor quantized value FQ n is obtained by the equation (3) and sent to the denormalization unit 15 n . The decoding / dequantization unit 14 n performs an operation reverse to that of the quantization / encoding unit 7 n in the above-described encoding device, based on the input code C n (i) and the bit allocation number B n . Dequantized data NQ n
Find (i). Specifically, using the bit allocation number B n ,
The quantization width dQ n is obtained by the equation (1), and the obtained quantization width dQ n is dequantized by the equation (5) to calculate the data NQ n (i). NQ n (i) = C n (i) × dQ n (5)

【0039】こうして得られたデータNQn(i)は正規化
されたままの状態である。そこで、逆正規化部15n
送出され、逆正規化部15nによってスケーリングファ
クタ量子化値FQnの真数値fQn倍されて、帯域nのデ
ータDQn(i)が得られる。こうして得られた全帯域のデ
ータDQ1(i)〜DQN(i)(0≦i≦I−1)が帯域合成部
16によって合成されて、ディジタルの楽音データある
いは音声データに復元され、出力端子17から出力され
るのである。
The data NQ n (i) thus obtained remains in the normalized state. Therefore, the data is sent to the denormalization unit 15 n , and the denormalization unit 15 n multiplies the scaling factor quantized value FQ n by the true value fQ n to obtain the data DQ n (i) in the band n. The data DQ 1 (i) to DQ N (i) (0 ≦ i ≦ I-1) of the entire band thus obtained are combined by the band synthesizing unit 16 and restored to digital musical sound data or voice data and output. It is output from the terminal 17.

【0040】このように、本実施例においては、上記符
号化装置におけるスケーリングファクタ抽出部4nで、
帯域毎に、データDn(i)の絶対値の最大値をスケーリン
グファクタFnとして抽出する。また、上記スケーリン
グファクタ量子化・符号化部5nの量子化・符号化手段4
nによって式(4)を満たす最大のスケーリングファク
タ量子化値FQ'nおよびその符号FC'nを探索する。そ
して、判定手段42nによって、スケーリングファクタ
抽出部4nからのスケーリングファクタFnの真数値fn
をその量子化値FQ'nの真数値fQ'nで正規化した値
を、式(2)に従って符号化する。そして、この得られた
符号がビット配分数Bnで定まる上記符号割り当て範囲
を越えないと判定すれば、上記量子化値FQ'nをスケー
リングファクタ量子化値FQnとし、上記FC'nをスケ
ーリングファクタFnの符号FCnとする。
As described above, in the present embodiment, the scaling factor extraction unit 4 n in the above encoding device
The maximum absolute value of the data D n (i) is extracted as the scaling factor F n for each band. The quantization / encoding means 4 of the scaling factor quantization / encoding unit 5 n is also used.
1 n by searching the maximum scaling factor quantization value FQ 'n and the code FC' n satisfying the equation (4). Then, the determination unit 42 n, exact numeric f n of the scaling factor F n from scaling factor extracting unit 4 n
Is normalized by the exact value fQ ' n of the quantized value FQ' n , and is encoded according to the equation (2). Then, if it is determined that the obtained code does not exceed the code assignment range determined by the bit allocation number B n, the quantization value FQ 'a n and a scaling factor quantization value FQ n, the FC' scaling n the code FC n factors F n.

【0041】一方、上記スケーリングファクタFnの真
数値fnの正規化値を式(2)に従って符号化した際の符
号が上記符号割り当て範囲を越えると判定した場合に
は、量子化・符号化手段41nによって式(3)を満たす最
小の量子化値(FQ'n+dFQ)を求めてスケーリングフ
ァクタ量子化値FQnとする一方、スケーリングファク
タFnの符号FCnを(FC'n+1)とするのである。
On the other hand, when it is determined that the code when the normalized value of the exact value f n of the scaling factor F n is encoded according to the equation (2) exceeds the code allocation range, quantization / encoding is performed. minimum quantization value satisfying the equation (3) by means 41 n (FQ 'n + dFQ ) one of a scaling factor quantization value FQ n seek, the code FC n scaling factor F n (FC' n +1) And

【0042】すなわち、本実施例においては、スケーリ
ングファクタFnを越えない最も大きい量子化値をスケ
ーリングファクタ量子化値の候補とした際に、その候補
がビット配分数Bnによって定まる量子化・符号化部7n
での上記符号割り当て範囲を超えない場合には、上記候
補をスケーリングファクタ量子化値FQnとする。一
方、越える場合には、スケーリングファクタFnを越え
る最も小さい量子化値をスケーリングファクタ量子化値
FQnとするのである。こうすることによって、上記ス
ケーリングファクタ量子化値FQnで正規化した正規化
データNn(i)を量子化する際に、得られる量子化値が上
記符号割り当て範囲を超えない最も広い量子化範囲内に
収まるようにスケーリングファクタFを量子化できる
のである。したがって、データD(i)の量子化が有
効に行われて量子化誤差が低減され、より高い音質の符
号化復号化データを得ることができるのである。
That is, in the present embodiment, when the largest quantized value that does not exceed the scaling factor F n is selected as the scaling factor quantized value candidate, that candidate is quantized / coded by the bit allocation number B n . Conversion part 7 n
If it does not exceed the code allocation range in, the candidate is set as the scaling factor quantized value FQ n . On the other hand, when it exceeds, the smallest quantized value exceeding the scaling factor F n is set as the scaling factor quantized value FQ n . By doing so, when quantizing the normalized data N n (i) that is normalized with the scaling factor quantized value FQ n , the obtained quantized value is the widest quantized range that does not exceed the code allocation range. The scaling factor F n can be quantized to fit within. Therefore, the quantization of the data D n (i) is effectively performed, the quantization error is reduced, and the encoded and decoded data with higher sound quality can be obtained.

【0043】尚、上記実施例における量子化・符号化部
nに内蔵される量子化器は、図10に示すようなミッ
ドトレッド型量子化器である。このミッドトレッド型量
子化器は量子化幅が総て同じであり線形(均一)である。
しかしながら、この発明における量子化器は、非ミッド
トレッド型であり、非線形であり、非均一であっても、
式(4)を満たす最大の量子化値FQ'nがビット配分数B
nで定まる上記符号割り当て範囲を超えるか否かの判定
ができれば、上述と同様のことができるのである。
The quantizer incorporated in the quantizer / encoder 7 n in the above embodiment is a mid-treader quantizer as shown in FIG. The midtread type quantizer has a uniform quantization width and is linear (uniform).
However, the quantizer in this invention is non-midtread, non-linear, and non-uniform,
The maximum quantized value FQ ′ n that satisfies the equation (4) is the bit allocation number B
If it is possible to determine whether or not the code allocation range defined by n is exceeded, the same as described above can be performed.

【0044】<第2実施例>本実施例は、第1実施例と
同じ効果をテーブルを使用して得る実施例である。つま
り、予め、ビット配分数Bnで定まる上記符号割り当て
範囲の閾値TQを求めてテーブル化しておく。そして、
上記テーブルを参照して、スケーリングファクタFn
量子化した際に量子化値が上記符号割り当て範囲を越え
るか否かを判定するのである。
<Second Embodiment> This embodiment is an embodiment in which the same effect as that of the first embodiment is obtained by using a table. That is, the threshold value TQ of the code allocation range determined by the bit allocation number B n is obtained in advance and tabulated. And
By referring to the table, it is determined whether or not the quantized value exceeds the code allocation range when the scaling factor F n is quantized.

【0045】以下、第1実施例と同様に、ミッドトレッ
ド型量子化器の場合を例に、具体的に説明する。図4
は、本実施例における符号化装置のブロック図である。
本実施例における入力端子21,帯域分割部22,ビット
配分部23,スケーリングファクタ抽出部24n,正規化
部26n,量子化・符号化部27n,マルチプレクサ28お
よび出力端子29は、第1実施例における入力端子1,
帯域分割部2,ビット配分部3,スケーリングファクタ抽
出部4n,正規化部6n,量子化・符号化部7n,マルチプレ
クサ8および出力端子9と全く同じであるから説明を省
略する。
Similar to the first embodiment, the midtread quantizer will be specifically described below as an example. FIG.
FIG. 3 is a block diagram of an encoding device according to the present embodiment.
The input terminal 21, the band division unit 22, the bit allocation unit 23, the scaling factor extraction unit 24 n , the normalization unit 26 n , the quantization / encoding unit 27 n , the multiplexer 28 and the output terminal 29 in this embodiment are the first Input terminal 1 in the embodiment,
The band dividing unit 2, the bit allocating unit 3, the scaling factor extracting unit 4 n , the normalizing unit 6 n , the quantizing / encoding unit 7 n , the multiplexer 8 and the output terminal 9 are exactly the same, and the description thereof will be omitted.

【0046】上記符号化装置は、上述のテーブルを格納
するテーブル格納部30を有して、以下に詳述するよう
にして、スケーリングファクタ量子化・符号化部25n
よって、スケーリングファクタFnの量子化および符号
化を行うのである。
The above-mentioned encoding device has a table storage unit 30 for storing the above-mentioned table, and the scaling factor quantization / encoding unit 25 n causes the scaling factor F n of the scaling factor F n to be described in detail below. It quantizes and encodes.

【0047】上記ミッドトレッド型量子化器において
は、上記ビット配分数Bnで定まる上記符号割り当て範
囲の閾値tqは、データの量子化ビット数Bを用いて、 tq=(2B−1)/(2B−2) …(6) と表せる。例えば、図10に示すように、量子化ビット
数Bが“3"である場合には、tq=7/6となる。そこ
で、式(6)に基づいて求めた量子化ビット数Bと閾値tq
との関係をテーブル化しておく。その際に、閾値tqをデ
シベル値TQとしておく。そして、第1実施例の場合と
同様に、スケーリングファクタFnの真数値fnをスケー
リングファクタ量子化値の候補FQ'nの真数値fQ'n
正規化した値fn/fQ'nのデシベル表現(Fn−FQ'n)
(これは、スケーリングファクタFnの量子化誤差でもあ
る)が閾値TQを越えるか否かを判定することによっ
て、スケーリングファクタ量子化値を決定するのであ
る。
In the midtread quantizer, the threshold value tq of the code allocation range determined by the bit allocation number B n is tq = (2 B -1) /, using the quantization bit number B of data. It can be expressed as (2 B -2) ... (6). For example, as shown in FIG. 10, when the quantization bit number B is “3”, tq = 7/6. Therefore, the quantization bit number B and the threshold value tq calculated based on the equation (6)
Make a table of the relationship with. At that time, the threshold value tq is set to a decibel value TQ. Then, similarly to the first embodiment, the scaling factor quantization value true numerical f n of the scaling factor F n candidate FQ n in the normalized values f n / fQ 'n' exact numeric fQ of n ' decibel expression (F n -FQ 'n)
The scaling factor quantized value is determined by determining whether (which is also the quantization error of the scaling factor F n ) exceeds the threshold TQ.

【0048】ここで、本実施例においては、fn/fQ'n
の演算処理を無くしてスケーリングファクタ量子化・符
号化部25nの構成を簡素化するために、真数表現によ
るfn/fQ'nをデシベル表現の量子化誤差(Fn−F
Q'n)に変えて、スケーリングファクタ量子化・符号化部
25nは量子化誤差(Fn−FQ'n)を算出するようにして
いる。また、それの応じて、上記テーブルを図6に示す
ようにデシベル表現にしてテーブル格納部30に格納し
ておくのである。尚、図6においては、量子化ビット数
Bの範囲を2≦B≦16としている。
Here, in the present embodiment, f n / fQ ' n
In order to simplify the configuration of the scaling factor quantization / encoding unit 25 n by eliminating the calculation processing of F n / fQ ′ n by an exact number expression, the quantization error (F n −F
Instead of Q ′ n ), the scaling factor quantization / encoding unit 25 n calculates a quantization error (F n −FQ ′ n ). In response to this, the table is stored in the table storage unit 30 in decibel representation as shown in FIG. In FIG. 6, the range of the quantization bit number B is 2 ≦ B ≦ 16.

【0049】上記構成の符号化装置は次のように動作す
る。図5は、本実施例におけるスケーリングファクタ量
子化・符号化部25nの詳細なブロック図である。量子化
・符号化手段51nは、第1実施例と同様にして、スケー
リングファクタ抽出部24nで抽出されたスケーリング
ファクタFnに基づいて、式(4)を満たす最大の量子化
値FQ'nおよびその符号FC'nを探索する。そして、上
記スケーリングファクタ量子化値FQnの候補FQ'n
その符号FC'nを判定手段52nに送出する。
The encoding device having the above configuration operates as follows. FIG. 5 is a detailed block diagram of the scaling factor quantizer / encoder 25 n in this embodiment. The quantizing / encoding means 51 n has the maximum quantized value FQ ′ satisfying the expression (4) based on the scaling factor F n extracted by the scaling factor extracting unit 24 n , as in the first embodiment. Search for n and its code FC ' n . Then, it sends a 'the code FC and n' n candidates FQ of the scaling factor quantization values FQ n to the determining means 52 n.

【0050】上記判定手段52nは、上記量子化・符号化
手段51nからの候補FQ'nとスケーリングファクタ抽
出部24nからのスケーリングファクタFnとに基づい
て、スケーリングファクタFnの量子化誤差(Fn−FQ'
n)を算出する。そして、ビット配分部23から配分され
たビット配分数Bnに基づいてテーブル格納部30に格
納されたテーブル(図6参照)を検索して、帯域nにおけ
る上記符号割り当て範囲の閾値TQnを求める。そし
て、上記算出されたスケーリングファクタFnの量子化
誤差(Fn−FQ'n)と閾値TQnとの大小関係を調べ、 Fn−FQ'n<TQn であれば、データDn(i)の絶対値の最大値を量子化して
もその量子化値が上記符号割り当て範囲を越えないの
で、スケーリングファクタ量子化値の候補FQ'nをスケ
ーリングファクタ量子化値FQnと確定して出力するの
である。一方、 Fn−FQ'n≧TQn であれば、データDn(i)の絶対値の最大値を量子化して
もその量子化値が上記符号割り当て範囲を越えるので、
上記量子化・符号化手段51nへ、式(3)を満たす最小の
量子化値FQn及びその符号FCnの算出を指令する指令
信号を出力する。そして、量子化・符号化手段51nから
送出されてくる算出値に基づいて、スケーリングファク
タ量子化値FQnを(FQ'n+dFQ)として出力するの
である。
[0050] The determination means 52 n, based on the scaling factor F n from candidates FQ 'n and a scaling factor extractor 24 n from the quantization and coding unit 51 n, the quantization of the scaling factor F n error (F n -FQ '
n ) is calculated. Then, the table (see FIG. 6) stored in the table storage unit 30 is searched based on the bit allocation number B n distributed from the bit allocation unit 23 to obtain the threshold TQ n of the code allocation range in the band n. . Then, 'examined the magnitude relation (n and threshold TQ n, F n -fq quantization error scaling factor F n, which is the calculated F n -fq)' if n <TQ n, data D n ( since the quantized values also quantize the maximum value of the absolute values of i) it does not exceed the code assignment range, to accept the candidate FQ 'n scaling factors quantized values and scaling factor quantization value FQ n output To do. On the other hand, if F n −FQ ′ n ≧ TQ n , the quantized value exceeds the code allocation range even if the maximum absolute value of the data D n (i) is quantized.
A command signal for instructing the calculation of the minimum quantized value FQ n and its code FC n that satisfy the equation (3) is output to the quantization / encoding means 51 n . Then, the scaling factor quantized value FQ n is output as (FQ ′ n + dFQ) based on the calculated value sent from the quantization / encoding means 51 n .

【0051】上述のように、上記実施例においては、ス
ケーリンファクタ量子化・符号化部25nの判定手段52
nは、スケーリンファクタ量子化値の候補FQ'nが上記
符号割り当て範囲を越えるか否かの判定処理をテーブル
を参照して行うので、上記判定処理を容易に行うことが
できる。したがって、上記判定手段52nの構成を簡単
にすることができる。
As described above, in the above embodiment, the determining means 52 of the scale factor quantizing / encoding unit 25 n.
n Since candidate FQ 'n of skating phosphide factor quantization value performed by referring to the table of the determination process whether exceeds the above code assignment range, it is possible to easily perform the determination process. Therefore, the configuration of the determination means 52 n can be simplified.

【0052】<第3実施例>本実施例は、第1実施例と
同じ効果をテーブルを使用して得る他の実施例である。
図7は、本実施例における符号化装置における符号化部
のブロック図である。本実施例における入力端子31,
帯域分割部32,ビット配分部33,スケーリングファク
タ抽出部34n,正規化部36n,量子化・符号化部37n,
マルチプレクサ38および出力端子39は、第1実施例
における入力端子1,帯域分割部2,ビット配分部3,ス
ケーリングファクタ抽出部4n,正規化部6n,量子化・符
号化部7n,マルチプレクサ8および出力端子9と全く同
じである。また、本実施例におけるテーブル格納部40
に格納するテーブルは以下のようなテーブルである。
<Third Embodiment> This embodiment is another embodiment in which the same effect as that of the first embodiment is obtained by using a table.
FIG. 7 is a block diagram of an encoding unit in the encoding device according to the present embodiment. The input terminal 31, in the present embodiment,
Band division unit 32, bit allocation unit 33, scaling factor extraction unit 34 n , normalization unit 36 n , quantization / encoding unit 37 n ,
The multiplexer 38 and the output terminal 39 are the input terminal 1, the band division unit 2, the bit allocation unit 3, the scaling factor extraction unit 4 n , the normalization unit 6 n , the quantization / encoding unit 7 n , and the multiplexer in the first embodiment. 8 and the output terminal 9 are exactly the same. Further, the table storage unit 40 in the present embodiment.
The table stored in is the following table.

【0053】式(3)に式(6)で表される上記符号割り当
て範囲の閾値TQ(以下、第1閾値と言う)を加算するこ
とによって、式(7)が得られる。 Fn<FQn+TQn=Fl+FCn×dFQ+TQn=TFn …(7) そして、スケーリングファクタFnが式(7)における第
2閾値TFnを越えない最小のスケーリングファクタ量
子化値FQnとその符号FCnを探索すれば、データD
n(i)の絶対値の最大値を量子化した際にその量子化値が
上記符号割り当て範囲を越えないようにスケーリングフ
ァクタFnを量子化できるのである。
The equation (7) is obtained by adding the threshold TQ (hereinafter referred to as the first threshold) of the code allocation range represented by the equation (6) to the equation (3). F n <FQ n + TQ n = Fl + FC n × dFQ + TQ n = TF n ... (7) Then, the minimum scaling factor quantization value does not exceed the second threshold value TF n in the scaling factor F n is Equation (7) FQ n If the code FC n is searched, the data D
the quantized value when the maximum value of the absolute value and quantization of n (i) is able quantization scaling factor F n so as not to exceed the code allocation range.

【0054】そこで、本実施例においては、式(7)を満
たす最小のスケーリングファクタ量子化値FQnおよび
その符号FCnとその際の第2閾値TFnとを対応付けて
ビット配分数Bn毎にテーブル化して、テーブル格納部
40に格納するのである。図9は、上記テーブルの一例
を示し、Fl=−30dB、dFQ=2dB、SB=6ビ
ットであり、データのビット配分数B=3の場合におけ
るスケーリングファクタ量子化値FQおよびその符号F
Cと第2閾値TFとの関係を示す。但し、帯域を示す添
字“n"は省略している。
Therefore, in this embodiment, the minimum scaling factor quantized value FQ n that satisfies the equation (7) and its code FC n and the second threshold value TF n at that time are associated with each other and the bit allocation number B n is associated. Each table is stored in the table storage unit 40. FIG. 9 shows an example of the above table, where Fl = −30 dB, dFQ = 2 dB, SB = 6 bits, and the scaling factor quantized value FQ and its code F when the data bit allocation number B = 3.
The relationship between C and the second threshold value TF is shown. However, the subscript "n" indicating the band is omitted.

【0055】上記構成の符号化装置におけるスケーリン
グファクタ量子化・符号化35nは、次のように動作す
る。図8は、上記スケーリングファクタ量子化・符号化
部35nの詳細なブロック図である。ここで、ビット配
分部33からの帯域nのビット配分数Bnは“3"である
とする。そうすると、量子化値検索手段61nは、スケ
ーリングファクタ抽出部34nで求められたスケーリン
グファクタFnとテーブル格納部40に格納されたビッ
ト配分数Bn=3に対応するテーブル(図9参照)の第2
閾値TFnとを比較し、スケーリングファクタFnより大
きく、且つ、最も近い第2閾値TFnを検索する。
The scaling factor quantization / encoding 35 n in the encoding device having the above-mentioned configuration operates as follows. FIG. 8 is a detailed block diagram of the scaling factor quantizer / encoder 35 n . Here, it is assumed that the bit allocation number B n of the band n from the bit allocation unit 33 is “3”. Then, the quantized value search means 61 n has a table corresponding to the scaling factor F n calculated by the scaling factor extraction unit 34 n and the bit allocation number B n = 3 stored in the table storage unit 40 (see FIG. 9). Second
Comparing the threshold value TF n, greater than the scaling factor F n, and searches the nearest second threshold TF n.

【0056】例えば、上記得られたスケーリングファク
タFn=2.1dBであるとすると、第2閾値TFn=3.
339dBが得られる。その際に、テーブルにおける当
該第2閾値TFn=3.339dBと同じ行に在るFQn
2dBとFCn=16とが、目的とするスケーリングファ
クタ量子化値FQnとその符号FCnである。そこで、上
記量子化値検索手段61nは、こうして求めたスケーリ
ングファクタ量子化値FQnとその符号FCnを出力する
のである。
For example, assuming that the scaling factor F n = 2.1 dB obtained above, the second threshold value TF n = 3.
339 dB is obtained. At that time, FQ n = in the same row as the second threshold value TF n = 3.339 dB in the table.
2 dB and FC n = 16 are the target scaling factor quantized value FQ n and its code FC n . Therefore, the quantized value retrieving means 61 n outputs the scaling factor quantized value FQ n thus obtained and its code FC n .

【0057】本実施例においては、上記スケーリングフ
ァクタ量子化・符号化部35nは、量子化値検索手段61
nによってテーブル格納部40に格納されたテーブルを
引くだけで、データDn(i)の絶対値の最大値を量子化し
た際に上記符号割り当て範囲を越えないようなスケーリ
ングファクタ量子化値FQnとその符号FCnとを得るこ
とができる。したがって、スケーリングファクタ量子化
・符号化部35nは演算処理を必要とはせず、第1実施例
におけるスケーリングファクタ量子化・符号化部5nの処
理や第2実施例におけるスケーリングファクタ量子化・
符号化部25nの処理に比較して、少ない処理によって
目的を達成できるのである。したがって、上記スケーリ
ンファクタ量子化・符号化部35nの構成の簡素化を図る
ことができる。
In the present embodiment, the scaling factor quantizing / encoding unit 35 n uses the quantized value search means 61.
The scaling factor quantized value FQ n that does not exceed the code allocation range when the maximum absolute value of the data D n (i) is quantized by simply drawing the table stored in the table storage unit 40 by n. And its code FC n can be obtained. Therefore, the scaling factor quantization / encoding unit 35 n does not require arithmetic processing, and the processing of the scaling factor quantization / encoding unit 5 n in the first embodiment and the scaling factor quantization / encoding unit in the second embodiment.
Compared with the processing of the encoding unit 25 n, the objective can be achieved with less processing. Therefore, it is possible to simplify the configuration of the scale factor quantization / encoding unit 35 n .

【0058】但し、上記ビット配分数Bn毎に、図9に
示すようなテーブルを作成してテーブル格納部40に格
納する必要があるので、テーブル格納部40には大きな
テーブルを格納できる容量が必要である。例えば、上記
データDn(i)を量子化する際のビット配分数Bnが取り
得る範囲を2≦Bn≦16とし、スケーリングファクタ
nを量子化する際の量子化ビット数SBを“6"とすれ
ば、テーブル格納部40には第2閾値TFnを15×6
4=960個格納する必要がある。
However, since it is necessary to create a table as shown in FIG. 9 for each bit allocation number B n and store it in the table storage unit 40, the table storage unit 40 has a capacity for storing a large table. is necessary. For example, the range of the bit allocation number B n when quantizing the data D n (i) is set to 2 ≦ B n ≦ 16, and the quantization bit number SB when quantizing the scaling factor F n is “ 6 ″, the second threshold value TF n in the table storage unit 40 is 15 × 6.
It is necessary to store 4 = 960 pieces.

【0059】尚、第3実施例においては、スケーリング
ファクタ量子化・符号化部25nは、テーブル格納部40
に格納されたテーブルを引くことによって、式(7)を満
たす最小のスケーリングファクタ量子化値FQnとその
符号FCnを得るようにしている。しかしながら、この
発明はこれに限定されるものではなく、スケーリングフ
ァクタ量子化・符号化部35nを図2のように構成して、
直接式(7)を計算することによって、式(7)を満たす最
小のスケーリングファクタ量子化値FQnとその符号F
nを得ても何等差し支えない。
In the third embodiment, the scaling factor quantizing / encoding unit 25 n includes the table storage unit 40.
The minimum scaling factor quantized value FQ n and its code FC n satisfying the expression (7) are obtained by drawing the table stored in However, the present invention is not limited to this, and the scaling factor quantizing / encoding unit 35 n is configured as shown in FIG.
By directly calculating the equation (7), the minimum scaling factor quantized value FQ n and its sign F that satisfy the equation (7) are obtained.
There is no problem in obtaining C n .

【0060】[0060]

【発明の効果】以上より明らかなように、請求項1に係
る発明の符号化装置は、スケーリングファクタ抽出部に
よって入力データの絶対値の最大値をスケーリングファ
クタとして抽出し、量子化・符号化手段によって上記ス
ケーリングファクタの値を越えない最大量子化値を求め
て候補とし、判定手段によって、上記候補が量子化・符
号化部における符号を割り当てることが可能な範囲を越
えないと判定した場合には上記候補をスケーリングファ
クタ量子化値として出力する一方、越えると判定した場
合には上記量子化・符号化手段によって得られた上記ス
ケーリングファクタの値を越える最小量子化値をスケー
リングファクタ量子化値として出力するので、得られた
スケーリングファクタ量子化値で正規化した入力データ
を量子化する際に得られる量子化値が上記範囲を越えな
い最も広い量子化範囲内に収まるように、上記スケーリ
ングファクタを最適に量子化できる。
As is clear from the above, in the encoding device according to the first aspect of the invention, the scaling factor extraction unit extracts the maximum absolute value of the input data as a scaling factor, and the quantization / encoding means. If the maximum quantized value that does not exceed the value of the scaling factor is determined as a candidate by the determining means, and the determination means determines that the candidate does not exceed the range to which the code in the quantization / encoding unit can be assigned, While outputting the candidate as a scaling factor quantized value, if it is determined to exceed, output the minimum quantized value that exceeds the value of the scaling factor obtained by the quantizing / encoding means as a scaling factor quantized value. Therefore, when quantizing the input data normalized by the obtained scaling factor quantization value, Quantization values to fit within the broadest quantization range not exceeding the above range can be optimally quantize the scaling factor to be.

【0061】したがって、この発明によれば、量子化・
符号化部によって入力データを量子化する際における入
力データの振幅に対する量子化幅の相対割合を小さくし
て量子化効率を上げることができる。その結果、入力デ
ータの量子化誤差を押えて、音響データを圧縮した際の
音質がよくなる。
Therefore, according to the present invention, the quantization
It is possible to improve the quantization efficiency by reducing the relative ratio of the quantization width to the amplitude of the input data when the input unit quantizes the input data. As a result, the quantization error of the input data is suppressed and the sound quality when the acoustic data is compressed is improved.

【0062】また、請求項2に係る発明の符号化装置
は、判定手段によって、テーブル格納部に格納されたテ
ーブルを参照して、量子化・符号化手段で得られたスケ
ーリングファクタ量子化値の候補が量子化・符号化部に
おける符号を割り当てることが可能な範囲を越えるか否
かを判定し、越えないと判定した場合には上記候補をス
ケーリングファクタ量子化値として出力する一方、越え
ると判定した場合には上記量子化・符号化手段によって
得られたスケーリングファクタの値を越える最小量子化
値をスケーリングファクタ量子化値として出力するの
で、上記スケーリングファクタの最適量子化をテーブル
を用いて効率良く実行できる。
Further, in the encoding device of the invention according to claim 2, the determining means refers to the table stored in the table storage section to determine the scaling factor quantized value obtained by the quantizing / encoding means. It is determined whether or not the candidate exceeds the range in which the code in the quantization / encoding unit can be assigned, and if it is determined that the code does not exceed, the candidate is output as a scaling factor quantized value, while it is determined to exceed it. In this case, the minimum quantized value that exceeds the value of the scaling factor obtained by the quantization / encoding means is output as the scaling factor quantized value, so that the optimum quantization of the above scaling factor is efficiently used by using a table. I can do it.

【0063】また、請求項3に係る発明の符号化装置
は、スケーリングファクタ抽出部によって入力データの
絶対値の最大値をスケーリングファクタとして抽出し、
量子化値検索手段によって、テーブル格納部に格納され
たテーブルを参照して、上記スケーリングファクタの量
子化値に量子化・符号化部における符号を割り当てるこ
とが可能な範囲の閾値である第1閾値を加えた値を第2
閾値とした際に、上記スケーリングファクタを越える最
小の上記第2閾値を検索し、この検索された第2閾値に
対応付けられている量子化値をスケーリングファクタ量
子化値として出力するので、上記スケーリングファクタ
の最適量子化を上記テーブルを引くだけででき、更に効
率良く実行できる。
In the encoding device according to the third aspect of the present invention, the scaling factor extraction unit extracts the maximum absolute value of the input data as a scaling factor,
A first threshold value that is a threshold value in a range in which the quantization value search unit refers to the table stored in the table storage unit and can assign the code in the quantization / encoding unit to the quantization value of the scaling factor. Second value
When the threshold value is set, the minimum second threshold value that exceeds the scaling factor is searched, and the quantized value associated with the searched second threshold value is output as the scaling factor quantized value. The optimum quantization of factors can be performed simply by looking up the above table, and can be executed more efficiently.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明の符号化装置における一実施例を示す
ブロック図である。
FIG. 1 is a block diagram showing an embodiment of an encoding device of the present invention.

【図2】図1におけるスケーリングファクタ量子化・符
号化部の詳細なブロック図である。
FIG. 2 is a detailed block diagram of a scaling factor quantization / encoding unit in FIG.

【図3】図1に示す符号化装置によって得られた符号を
復号する復号化装置の一実施例を示すブロック図であ
る。
3 is a block diagram showing an embodiment of a decoding device that decodes the code obtained by the coding device shown in FIG. 1. FIG.

【図4】図1とは異なる符号化装置のブロック図であ
る。
FIG. 4 is a block diagram of an encoding device different from that in FIG.

【図5】図4におけるスケーリングファクタ量子化・符
号化部の詳細なブロック図である。
5 is a detailed block diagram of a scaling factor quantizer / encoder in FIG. 4. FIG.

【図6】図4におけるテーブル格納部に格納されるテー
ブルの一例を示す図である。
FIG. 6 is a diagram showing an example of a table stored in a table storage section in FIG.

【図7】図1および図4とは異なる符号化装置のブロッ
ク図である。
FIG. 7 is a block diagram of an encoding device different from FIGS. 1 and 4.

【図8】図7におけるスケーリングファクタ量子化・符
号化部の詳細なブロック図である。
8 is a detailed block diagram of a scaling factor quantizer / encoder in FIG. 7. FIG.

【図9】図7におけるテーブル格納部に格納されるテー
ブルの一例を示す図である。
9 is a diagram showing an example of a table stored in a table storage section in FIG.

【図10】量子化器における量子化範囲の説明図であ
る。
FIG. 10 is an explanatory diagram of a quantization range in a quantizer.

【符号の説明】[Explanation of symbols]

2,22,32…帯域分割部、 3,23,33…ビ
ット配分部、4,24,34…スケーリングファクタ抽出
部、5,25,35…スケーリングファクタ量子化・符号
化部、6,26,36…正規化部、 7,27,3
7…量子化・符号化部、8,28,38…マルチプレク
サ、 30,40…テーブル格納部、41,51…量子化
・符号化手段、 42,52…判定手段、61…量子化
値検索手段。
2, 22, 32 ... Band division section, 3, 23, 33 ... Bit allocation section, 4, 24, 34 ... Scaling factor extraction section, 5, 25, 35 ... Scaling factor quantization / encoding section, 6, 26, 36 ... Normalization unit, 7, 27, 3
Reference numeral 7 ... Quantization / encoding section, 8, 28, 38 ... Multiplexer, 30, 40 ... Table storage section, 41, 51 ... Quantization / encoding means, 42, 52 ... Judging means, 61 ... Quantization value searching means .

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 スケーリングファクタ抽出部で抽出され
たスケーリングファクタをスケーリングファクタ量子化
・符号化部で量子化して符号化し、得られたスケーリン
グファクタ量子化値を用いて正規化部で入力データを正
規化し、この入力データの正規化値を量子化・符号化部
で量子化して符号化する符号化装置において、 上記スケーリングファクタ抽出部は、1フレーム内にお
ける所定数の入力データの絶対値の最大値をスケーリン
グファクタとして抽出すると共に、 上記スケーリングファクタ量子化・符号化部は、 上記スケーリングファクタの値を越えない最大量子化値
および上記スケーリングファクタを越える最小量子化値
を求めると共に、上記求めたスケーリングファクタの値
を越えない最大量子化値をスケーリングファクタ量子化
値の候補として出力する量子化・符号化手段と、 上記量子化・符号化部における量子化ビット数によって
定まる符号を割り当てることが可能な範囲を上記スケー
リングファクタ量子化値の候補が超えるか否かを所定の
手順で判定すると共に、上記候補が上記範囲を越えない
と判定した場合には上記候補をスケーリングファクタ量
子化値として出力する一方、上記候補が上記範囲を越え
ると判定した場合には、上記量子化・符号化手段に対し
て上記スケーリングファクタを越える最小量子化値の算
出を指令する指令信号を出力し、上記量子化・符号化手
段によって得られた上記スケーリングファクタを越える
最小量子化値をスケーリングファクタ量子化値として出
力する判定手段を有することを特徴とする符号化装置。
1. A scaling factor extracted by a scaling factor extraction unit is quantized and encoded by a scaling factor quantization / encoding unit, and an input data is normalized by a normalization unit using the obtained scaling factor quantized value. In the encoding device that converts the normalized value of the input data into a quantization / encoding unit and encodes the normalized value, the scaling factor extraction unit includes a maximum absolute value of a predetermined number of input data in one frame. And the scaling factor quantizing / encoding unit obtains a maximum quantized value that does not exceed the value of the scaling factor and a minimum quantized value that exceeds the scaling factor, and the obtained scaling factor. The maximum quantized value that does not exceed the value of Whether or not the scaling factor quantized value candidate exceeds the range in which the code determined by the quantization / encoding means which outputs as the candidate of the quantized value and the quantization bit number in the quantization / encoding unit can be assigned. If it is determined that the above candidate does not exceed the above range, the above candidate is output as a scaling factor quantized value, while if it is determined that the above candidate exceeds the above range, Outputting a command signal for instructing the quantization / encoding means to calculate a minimum quantization value that exceeds the scaling factor, and the minimum quantization exceeding the scaling factor obtained by the quantization / encoding means. An encoding device comprising: a determining unit that outputs a value as a scaling factor quantized value.
【請求項2】 スケーリングファクタ抽出部で抽出され
たスケーリングファクタをスケーリングファクタ量子化
・符号化部で量子化して符号化し、得られたスケーリン
グファクタ量子化値を用いて正規化部で入力データを正
規化し、この入力データの正規化値を量子化・符号化部
で量子化して符号化する符号化装置において、 上記スケーリングファクタ抽出部は、1フレーム内にお
ける所定数の入力データの絶対値の最大値をスケーリン
グファクタとして抽出すると共に、 上記量子化・符号化部における量子化ビット数で定まる
符号を割り当てることが可能な範囲の閾値と当該量子化
ビット数とを対応付けてなるテーブルを格納するテーブ
ル格納部を備えて、 上記スケーリングファクタ量子化・符号化部は、 上記スケーリングファクタの値を越えない最大量子化値
および上記スケーリングファクタを越える最小量子化値
を求めると共に、上記求めたスケーリングファクタの値
を越えない最大量子化値をスケーリングファクタ量子化
値の候補として出力する量子化・符号化手段と、 上記量子化・符号化部における量子化ビット数によって
定まる符号を割り当てることが可能な範囲を上記スケー
リングファクタ量子化値の候補が超えるか否かを上記テ
ーブルを参照して判定すると共に、上記候補が上記範囲
を越えないと判定した場合には上記候補をスケーリング
ファクタ量子化値として出力する一方、上記候補が上記
範囲を越えると判定した場合には、上記量子化・符号化
手段に対して上記スケーリングファクタを越える最小量
子化値の算出を指令する指令信号を出力し、上記量子化
・符号化手段によって得られた上記スケーリングファク
タを越える最小量子化値をスケーリングファクタ量子化
値として出力する判定手段を有することを特徴とする符
号化装置。
2. The scaling factor extracted by the scaling factor extraction unit is quantized and encoded by the scaling factor quantization / encoding unit, and the obtained scaling factor quantized value is used to normalize the input data by the normalization unit. In the encoding device that converts the normalized value of the input data into a quantization / encoding unit and encodes the normalized value, the scaling factor extraction unit includes a maximum absolute value of a predetermined number of input data in one frame. Is stored as a scaling factor, and a table storage that stores a table in which a threshold value in a range in which a code determined by the number of quantization bits in the quantization / encoding unit can be assigned and the number of quantization bits are associated with each other The scaling factor quantization / encoding unit is provided with a value of the scaling factor. Quantization / encoding that finds a maximum quantized value that does not exceed and a minimum quantized value that exceeds the scaling factor, and that outputs a maximum quantized value that does not exceed the value of the obtained scaling factor as a scaling factor quantized value candidate. Means, while determining with reference to the table whether the candidate of the scaling factor quantized value exceeds the range in which the code determined by the number of quantization bits in the quantization / encoding unit can be assigned, If it is determined that the candidate does not exceed the range, the candidate is output as a scaling factor quantized value, while if it is determined that the candidate exceeds the range, the quantization / encoding means Output a command signal for instructing the calculation of the minimum quantized value that exceeds the above scaling factor, Encoding apparatus characterized by comprising determination means for outputting the minimum quantization value exceeding the scaling factor obtained by the encoding means as a scaling factor quantization value.
【請求項3】 スケーリングファクタ抽出部で抽出され
たスケーリングファクタをスケーリングファクタ量子化
・符号化部で量子化して符号化し、得られたスケーリン
グファクタ量子化値を用いて正規化部で入力データを正
規化し、この入力データの正規化値を量子化・符号化部
で量子化して符号化する符号化装置において、 上記スケーリングファクタ抽出部は、1フレーム内にお
ける所定数の入力データの絶対値の最大値をスケーリン
グファクタとして抽出すると共に、 上記スケーリングファクタの量子化値に上記量子化・符
号化部における量子化ビット数で定まる符号を割り当て
ることが可能な範囲の閾値である第1閾値を加算してな
る第2閾値と、上記スケーリングファクタの値が上記第
2閾値を越えないようにする最小の上記量子化値及びそ
の符号とを対応付けてなるテーブルを、上記量子化ビッ
ト数毎に格納するテーブル格納部を備えて、 上記スケーリングファクタ量子化・符号化部は、 上記テーブルを参照して、上記スケーリングファクタを
越える最小の上記第2閾値を検索すると共に、上記検索
された第2閾値に対応付けられている量子化値をスケー
リングファクタ量子化値として出力する量子化値検索手
段を有することを特徴とする符号化装置。
3. The scaling factor extracted by the scaling factor extraction unit is quantized and encoded by the scaling factor quantization / encoding unit, and the normalization unit normalizes the input data using the obtained scaling factor quantized value. In the encoding device that converts the normalized value of the input data into a quantization / encoding unit and encodes the normalized value, the scaling factor extraction unit includes a maximum absolute value of a predetermined number of input data in one frame. Is extracted as a scaling factor, and a first threshold value that is a threshold value in a range in which a code determined by the number of quantization bits in the quantization / encoding unit can be assigned to the quantized value of the scaling factor is added. A second threshold and a minimum of the quantization that prevents the value of the scaling factor from exceeding the second threshold. And a table in which the codes are associated with each other are provided for each quantization bit number, and the scaling factor quantization / encoding unit refers to the table and stores the scaling factor. A code having a quantized value search means for searching the minimum second threshold value that is exceeded and outputting the quantized value associated with the searched second threshold value as a scaling factor quantized value. Device.
JP6189294A 1994-08-11 1994-08-11 Encoding device Pending JPH0854899A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6189294A JPH0854899A (en) 1994-08-11 1994-08-11 Encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6189294A JPH0854899A (en) 1994-08-11 1994-08-11 Encoding device

Publications (1)

Publication Number Publication Date
JPH0854899A true JPH0854899A (en) 1996-02-27

Family

ID=16238929

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6189294A Pending JPH0854899A (en) 1994-08-11 1994-08-11 Encoding device

Country Status (1)

Country Link
JP (1) JPH0854899A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002014700A (en) * 2000-06-30 2002-01-18 Canon Inc Method and device for processing audio signal, and storage medium
WO2002052732A1 (en) * 2000-12-22 2002-07-04 Sony Corporation Encoder and decoder
CN1089174C (en) * 1996-07-29 2002-08-14 中国科学院自动化研究所 Radar image card

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1089174C (en) * 1996-07-29 2002-08-14 中国科学院自动化研究所 Radar image card
JP2002014700A (en) * 2000-06-30 2002-01-18 Canon Inc Method and device for processing audio signal, and storage medium
WO2002052732A1 (en) * 2000-12-22 2002-07-04 Sony Corporation Encoder and decoder
US7016502B2 (en) 2000-12-22 2006-03-21 Sony Corporation Encoder and decoder
KR100844810B1 (en) * 2000-12-22 2008-07-09 소니 가부시끼 가이샤 Encoder and decoder

Similar Documents

Publication Publication Date Title
EP2006840B1 (en) Entropy coding by adapting coding between level and run-length/level modes
JP3131542B2 (en) Encoding / decoding device
KR100348368B1 (en) A digital acoustic signal coding apparatus, a method of coding a digital acoustic signal, and a recording medium for recording a program of coding the digital acoustic signal
JP5175028B2 (en) Digital signal encoding method and apparatus, and decoding method and apparatus
JP5688861B2 (en) Entropy coding to adapt coding between level mode and run length / level mode
KR100462611B1 (en) Audio coding method with harmonic extraction and apparatus thereof.
US6593872B2 (en) Signal processing apparatus and method, signal coding apparatus and method, and signal decoding apparatus and method
KR100968057B1 (en) Encoding method and device, and decoding method and device
JPH0846518A (en) Information coding and decoding method, information coder and decoder and information recording medium
JP3353868B2 (en) Audio signal conversion encoding method and decoding method
JP4359949B2 (en) Signal encoding apparatus and method, and signal decoding apparatus and method
JPH0854899A (en) Encoding device
JP2000151413A (en) Method for allocating adaptive dynamic variable bit in audio encoding
JP3465341B2 (en) Audio signal encoding method
JPH0537395A (en) Band-division encoding method
JPH0918348A (en) Acoustic signal encoding device and acoustic signal decoding device
JP4871420B2 (en) Encoding method, encoding apparatus, decoding method, decoding apparatus, and program
JPH0750589A (en) Sub-band coding device
JPH0934493A (en) Acoustic signal encoding device, decoding device, and acoustic signal processing device
JP2001109497A (en) Audio signal encoding device and audio signal encoding method
JP2004015537A (en) Audio signal encoding device
JPH07154268A (en) Band division encoder
JPH08237131A (en) Coder decoder
JPH0746137A (en) Highly efficient sound encoder
JPH0822298A (en) Coding device and decoding device