JP3557164B2 - Audio signal encoding method and program storage medium for executing the method - Google Patents
Audio signal encoding method and program storage medium for executing the method Download PDFInfo
- Publication number
- JP3557164B2 JP3557164B2 JP2000282129A JP2000282129A JP3557164B2 JP 3557164 B2 JP3557164 B2 JP 3557164B2 JP 2000282129 A JP2000282129 A JP 2000282129A JP 2000282129 A JP2000282129 A JP 2000282129A JP 3557164 B2 JP3557164 B2 JP 3557164B2
- Authority
- JP
- Japan
- Prior art keywords
- quantization
- unit
- encoding
- code
- coefficient
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】
【産業上の利用分野】
この発明は、オーディオ信号を高能率にディジタル符号にする符号化方法及びその方法を実施するプログラムが記録された記憶媒体を提供するものであり、オーディオ信号の録音・再生や、オーディオ信号の通信路を使った伝送、放送などに利用できる。
【0002】
【従来の技術】
オーディオ信号を高能率に符号化する従来からの手法として、例えば図1に示す変換符号化方法がある。符号化装置10Aでは、離散信号サンプル列として入力されたオーディオ信号を、一定サンプル数の入力ごとに時間/周波数変換部11により時間/周波数変換を行って、周波数領域の一連の係数(以下、周波数領域係数と呼ぶ)にしてから符号化を行う。図1の例では、平坦化部12により周波数領域係数を平坦化処理を行ってからベクトル量子化部13で量子化を行ない、平坦化部12で平坦化に使用した平坦化情報を表す符号とベクトル量子化部13でのベクトル符号化による符号を多重化部14で多重化し、出力する。
【0003】
復号化装置10Bでは、逆多重化部15で受信した多重化符号を平坦化情報を表す符号とベクトル符号に分離し、ベクトル量子化復号化部16でベクトル符号から平坦化周波数領域係数を得て、平坦化情報を使って逆平坦化部17により平坦化周波数領域係数を逆平坦化して周波数領域係数を再生し、周波数/時間変換部18により再生周波数領域係数を時間領域信号に変換して出力する。
周波数領域重み付けインタリーブベクトル量子化(Transform−domain WeightedInterleave Vector Quantization,TWINVQ)方式はこの例に当てはまる。TWINVQ方式は、入力信号を時間/周波数変換した後、2段階の平坦化の手順を経た後に、ベクトル量子化により符号化を行っている。ベクトル量子化は、目標ベクトルとの距離が最小であるコードベクトルをコードブックから選択し、このコードベクトルを用いて復号化装置側でベクトルを再生する。このような符号化方法では、再生ベクトルと目標ベクトルとの距離は小さく高能率に符号化ができるが、ベクトル中の個々の要素についての目標値からの誤差を制御することは困難である。従って、ベクトル量子化を用いた符号化方式では、復号化装置側で再生した信号の周波数特性が、原信号の周波数特性から歪み、再生音質の劣化を招いてしまうことがある。スペクトルの形状が複雑な時、例えば入力信号に強いトーン性成分が含まれるときには、ベクトル量子化に大きな負担をかけるため、この性質が強く現れやすく、音質劣化の原因になってしまう。
【0004】
この問題を解決するための技術が、特願 2000−078370「オーディオ信号符号化方法及び復号化方法、これらの装置及びプログラム記憶媒体」において提案されている。ここでは、音源のスペクトルが複雑な形状をしている場合、周波数領域係数を強弱の2系統に分離し、おのおのの系統ごとに重み付けをしたベクトル量子化をすることにより、より細かいサンプルごとの量子化誤差の制御を可能にしている。しかし、この方法では、周波数領域係数の分離情報の符号化に比較的多くのビット数を必要とし、特に強弱の出現確率が均等に近くなってくる低周波数領域では非効率を招くことがある。
【0005】
別の解決策の手法として、ベクトル量子化に大きな影響を与える特定のサンプルだけ予め取り除いて符号化するものがあり、特願平7−261236「音響信号変換符号化方法及び復号化方法」及び7−248145「変換符号化方法及び変換復号化方法」において出願されている。前者の出願では、重要度の高いサンプルを予め取り除き、残りをベクトル量子化しているが、この方法では、取り除くサンプルの周波数軸上での位置の情報を符号化しなくてはならないので符号化の能率が悪い。後者の方法では、スペクトルに周期的なスパイクが生じるピッチ性の音源について、スパイクの基本周波数の整数倍に位置するサンプルを取り除いて別個符号化する。この方法では、符号化能率は良いが、トライアングルなどの非整数倍音構造をもつ音源に対しては効果が薄く、汎用性に乏しい。
【0006】
なお、TWINVQ方式については、岩上他「周波数領域重み付けインタリーブベクトル量子化(TWINVQ)による楽音符号化」電子情報通信学会論文誌Vol.J80−A, pp.830〜837及びISO/IEC 標準 1SO/IEC 14496−3 Information Technology: Coding of Audio−Visual Objects (MPEG−4 Audio)に詳細が記述されている。また、ベクトル量子化技術全般に関する詳細は、古井他著「ベクトル量子化と情報圧縮」(コロナ社、1998)に述べられている。
【0007】
【発明が解決しようとする課題】
この発明は、入力信号のスペクトルを符号化するオーディオ信号の変換符号化方法において、複雑な形状を持つスペクトルを、高い汎用性で能率よく符号化する方法を提供することを課題とする。
【0008】
【課題を解決するための手段】
符号器では、入力された信号の系列を一定時間ごとに周波数領域に変換し、得られた周波数領域の係数を、近傍同士をまとめた小帯域に分割する。小帯域ごとに、係数を符号化するモデルを決定し、その決定された方法で小帯域に属する係数を量子化及び符号化する。
【0009】
【作用】
例えば、符号化のモデルとしてベクトル量子化を用いた方法とスカラ量子化を用いた方法の2種類を持つ場合、ベクトル量子化は、少ないビット数でも高能率に量子化ができる反面、サンプルごとの歪みの制御が困難である。スカラ量子化は、サンプルごとの独立性は良いが、量子化ビット数が足りないと能率が大幅に劣化してしまう。この発明では、このように、相異なる性質を持つ符号化モデルを複数持ち、入力スペクトルの各小帯域ごとに最適なモデルを選択することにより、汎用性が高く高能率な符号化を可能にしている。
【0010】
【発明の実施の形態】
図2に本発明の第1の実施例を示す。図2の実施例において、符号化装置10Aは時間/周波数変換部10と、符号化モデル選択部20と、量子化・符号化部30と、多重化部40とにより構成され、例えば、オーディオ信号などの離散サンプル列を端子9に入力して、符号化したビット列を多重化部40から出力する。即ち、入力信号は時間/周波数変換部10において例えば変形離散コサイン変換(MDCT)により周波数領域係数に変換され、この周波数領域係数は符号化モデル選択部20において一連の周波数領域係数を複数の係数毎に区切った小帯域毎に予め決めた複数の符号化方法のどれを使用して符号化を行うかが選択指定され、その選択情報を量子化・符号化部30に与えると共に、選択情報の符号を多重化部40に与える。周波数領域係数は量子化・符号化部30において選択情報により指定された符号化方法により符号化され、その周波数領域係数の符号(以下、係数符号と呼ぶ)が多重化部40に与えられる。多重化部40は選択情報符号と係数符号を多重化し、ビット列として出力する。
【0011】
復号化装置10Bは逆多重化部50と、符号化モデルの選択情報再生部60と、係数再生部70と、周波数/時間変換部80とから構成され、入力された多重化符号ビット列を復号し、時間領域の離散サンプル列であるオーディオ信号を出力端子91から出力する。即ち、入力された多重化符号ビット列は逆多重化部50において符号化モデルの選択情報符号と係数符号とに分離され、選択情報符号は復号化モデル選択再生部60に与えられて選択情報に再生され、その選択情報は係数再生部70に与えられる。逆多重化部50からの係数符号は係数再生部70に与えられ、符号化装置10Aにおける符号化モデル選択部20により各小帯域に対し選択された符号化方法に対応する復号化方法が選択情報により選択され、係数符号に対する復号化が行われ、周波数領域係数が再生される。この周波数領域係数は周波数/時間変換部80により時間領域のサンプル系列に変換され、復号結果として端子91に出力される。
【0012】
次に符号化装置10Aの各部について図5に示す周波数領域係数に対する処理を参照して詳細に説明する。
時間/周波数変換部10
端子9に入力されたオーディオ信号の離散サンプル列は、時間/周波数変換部10に入力され、一定数Nの入力サンプル(1フレームとする)ごとに時間/周波数変換を行い、周波数領域のN個の係数に変換する。時間/周波数変換の方法としては、離散コサイン変換(DCT) や、変形離散コサイン変換(MDCT)を用いることができる。図5に示す例では、各丸印が1つの係数値を表し、ここでは2チャネルオーディオ信号がフレーム毎に交互に周波数領域係数に変換される場合を示している。
【0013】
変換方法として変形離散コサイン変換を用いる場合には、N個の入力ごとに過去2×N個の入力オーディオサンプルを変換してN個の周波数領域の係数を得る。時間/周波数変換処理を行う直前にハミング窓やハニング窓などの窓関数をかけても良い。Nの値は、時間/周波数変換アルゴリズムに適用できるどのようなものを適用しても良いが、128から2048 の間の値を使うと最も効果が高い。また、入力信号の性質に応じて適応的にNの値を切り替えても良い。例えば、通常時N=2048としておき、入力音が過渡的な時N=512,更に大きく過渡的であったときにはN=128 としても良い。適応的に切り替える場合、次のフレームのNの値を符号化して復号化装置に送る。
符号化モデル選択部20
時間/周波数変換部10で得られた周波数領域での一連の係数は、符号化モデル選択部20へ送られる。符号化モデル選択部20では、一連の周波数領域係数を例えば図5に示すように複数の係数毎にまとめることによって構成された小帯域ごとに、予め決めた複数の符号化方法のうち、どの符号化方法を用いるのが最適かを判断し、その符号化方法を選択する選択情報を出力する。図5に示す各小帯域に付けられた番号n(c)(ただしn=0,…,N−1及びc=0,1)の括弧内の番号cはチャネル番号を表している。この実施例では、符号化モデルとして、ベクトル量子化を用いるタイプとスカラ量子化を用いるタイプの2つが選択できる場合を示している。それぞれの符号化モデルの詳細は、後述する。
【0014】
小帯域を構成する周波数領域係数の数は、一定数でも良いし、その小帯域が属する周波数によって変化させても良い。後者の場合には、周波数の低い領域では係数の数を少なく、周波数の高い領域では係数の数を多くとると、後段での符号化を能率よく行うことができる。
符号化モデル選択部20におけるベクトル量子化タイプとスカラ量子化タイプの選択は、その小帯域の性質を利用して判断すれば良い。図3A,3B,3C,3Dのそれぞれに選択アルゴリズムの例を示す。例えば図3Aに示すように、各小帯域に含まれるM個の周波数領域係数xi, i=0,…,M−1の平坦度Sを次式
【0015】
【数1】
のように計算し(ステップS11)、平坦度Sを予め決めた閾値Sth と比較し(ステップS12)、SがSth よりより小さいとき、例えば閾値Sth=0.5 を下回るときにはスカラ量子化タイプを選択し(ステップS13)、そうでない時にはベクトル量子化タイプを選択し(ステップS14)、各小帯域に対し選択されたタイプを表す選択情報を出力する(ステップS15)。
【0016】
あるいは、図3Bに示すように、小帯域に含まれるM個の周波数領域係数xiを、その大きさで強弱の2系統xj,j=0,…,J−1及びxk,k=0,…,K−1(ただしj≠k, J+K=M)に分け(ステップS21)、それぞれの系統に属する係数のパワーPJ=Σ|xj|2とPK=Σ|xk|2の比PJ/PK を計算し(ステップS22)、このパワーの比を一定の値Cと比較し(ステップS23)、例えばC=2.0 を超えた場合にはスカラ量子化タイプを選択し(ステップS24)、そうでないときにはベクトル量子化タイプを選択し(ステップS25)、各小帯域に対し決定した選択情報を出力する(ステップS26)。
【0017】
あるいは、各入力フレームに対して得られた周波数領域係数の一連の小帯域のうち、低次側(低周波数側)の小帯域はスカラ量子化タイプ、高次側(高周波数側)の小帯域はベクトル量子化タイプで符号化を行うことを前提とし、低次側小帯域に対するスカラ量子化に必要なビット数が予め決めたある一定数に達する小帯域を、ベクトル量子化との切り替わりの点とする方法を用いても良い。即ち、図3Cに示すように、n=0, B=0を初期値とし(ステップS31)、n番目の小帯域n(c)に対しスカラ量子化を選択し、予め決めた量子化精度を満たすスカラ量子化ビット数bnを割り当て(ステップS32)、割り当てたビット数bnを累積し(ステップS33)、割り当てビット数の累積値Bが所定値BSより小さいか判定し(ステップS34)、小さければnを1増加させステップS32に戻り(ステップS35)、BがBS以上であれば残りの小帯域に対しベクトル量子化を選択する(ステップS36)。この図3Cの例では、選択情報を送る替わりにどの周波数又はどの小帯域から符号化方法が変わるかを表す情報を送ればよい。
【0018】
更に、小帯域ごとにどちらの符号化モデルを用いるか予め決めておいても良い。例えば図3Dに示すように、周波数F=4kHzよりも低い周波数に属する小帯域に対しスカラ量子化タイプを選択し(ステップS41)、それより高い周波数に属する小帯域に対してはベクトル量子化タイプを選択する(ステップS42)と予め決めても良い。この場合は、選択情報を復号化装置に送る必要はない。
なお、上記の選択方法のうち複数の方法を組み合わせても良い。例えば、図3DのステップS41に従って2kHzよりも低い周波数に属する小帯域に対しては必ずスカラ量子化タイプで行うこととし、2kHzから7kHzの間に属する小帯域に対しては、上記図3Bの方法により量子化方法を選択し、7kHzよりも高い周波数に属する小帯域に対しては図3DのステップS42に従って必ずベクトル量子化タイプを選択することとする、などの方法で決定しても良い。図3A及び3Bの場合は、各小帯域に対し、2つの符号化モデルのいずれの一方が適用されるかを指定する選択情報が生成される。
【0019】
このようにして決められた符号化モデルの選択情報は量子化・符号化部30に送るとともに、符号化されて選択情報符号QMSCとして多重化部40に送られる。この実施例では、選択できる符号化モデルは2種類であるため、選択情報は各小帯域ごとに高々1ビットあれば符号化できる。もちろん、符号化モデルは2種類より多くてもよい。また、エントロピー符号化やランレングス符号化などを用いて、選択情報を可逆圧縮しても良い。
量子化・符号化部30
量子化・符号化部30では、符号化モデル選択部20で決定された符号化方法を用いて、小帯域ごとに量子化及び符号化を行う。
【0020】
図4に量子化・符号化部30の詳細を示す。量子化・符号化部30は重み計算部31と、係数振り分け部32と、重み振り分け部33と、ベクトル量子化部34と、スカラ量子化部35と、可逆圧縮部36とから構成されている。重み計算部31では、入力された各小帯域の周波数領域係数に対し、量子化の重みを計算する。重みとしては、線形予測スペクトルを用いる方法、小帯域ごとに平均値あるいは最大値を求めこれを重みとする方法、あるいは、その組み合わせなどを用いることができる。
【0021】
重み計算部31で計算された重みは、重み振り分け部33に送られる。また、重みは、復号化装置10Bでも使用されるため、符号化して重み符号WCを他の符号と共に多重化部40を介して復号化装置10Bに送られる。線形予測スペクトルは、線形予測係数をLSP係数に変換し符号化することにより、高能率に符号化することができる。また、小帯域の代表値は、その値を量子化することにより符号化できる。量子化の方法としては、ベクトル量子化を用いても良いし、スカラ量子化しても良い。量子化した量子化インデックスはエントロピー符号化などの非可逆圧縮を加えて符号化しても良い。圧縮しない場合の符号は、量子化インデックスを2進数で表すことにより得られる。
【0022】
係数振り分け部32では、小帯域ごとの周波数領域係数を入力とし、符号化モデル選択部20より送られた符号化モデル選択情報に基づき、小帯域ごとに係数をベクトル量子化部34とスカラ量子化部35に振り分ける。符号化モデル情報は、小帯域ごとに定められた2値の値なので、この値に従って対応する符号化モデルに係数を振り分ければよい。図5の例では、選択情報に従ってチャネル0の小帯域0(0)〜3(0)はスカラ量子化に振り分けられ、小帯域4(0), 5(0)はベクトル量子化に振り分けられ、また、チャネル1の小帯域0(1), 1(1), 2(1), 4(1)がスカラ量子化に振り分けられ、小帯域3(1), 5(1)がベクトル量子化に振り分けられた場合を示している。
【0023】
重み振り分け部33では、係数振り分け部32と同じ方法で重みを振り分ける。ベクトル量子化部34では、係数振り分け部32及び重み振り分け部33より送られた重みを使って係数振り分け部32からの係数をベクトル量子化する。量子化に先立ち、入力された係数をまとめ1個以上の量子化ユニットを構成する。量子化ユニットは、全係数を全て格納して1つだけ構成しても良いし、図5で示した例のステレオ符号化の場合には、ベクトル量子化ユニットVQ−CU0 で示すようにチャネルごとに1つの量子化ユニットを構成しても良い。また、係数を一定数ごとに分割し、多数の量子化ユニットを構成しても良い。
【0024】
ベクトル量子化は、量子化ユニットごとに行われるが、量子化ユニットを一括してベクトル量子化しても良いし、分割してベクトル量子化しても良い。分割の方法としては、複数の領域に分ける方法、あるいは入力係数をインタリーブしてから分割する方法などを用いることができる。最適ベクトルの選択は、コードブック中のコードベクトルに重み振り分け部33からの重みを乗算し、目標となる係数ベクトルに最も近くなるものを選択することにより行う。ベクトル量子化の形態としては、通常のベクトル量子化の他、2つのコードブックから選択したコードベクトルの和を用いる共役構造ベクトル量子化、あるいは多段ベクトル量子化などの形態を用いても良い。このようにして決定されたコードベクトルインデックスを2進数で表すことにより符号化を行い、ベクトル量子化符号VQC を多重化部40に送る。
【0025】
スカラ量子化部35では、重み振り分け部33からの重みを使って係数振り分け部32からの小帯域ごとの周波数領域係数をスカラ量子化し、量子化インデックスは可逆圧縮部36へ送られる。量子化に先立ち、入力された係数をまとめ1個以上の量子化ユニットを構成する。1小帯域ごとに1ユニットを構成すると良好な結果が得られる。量子化値は、重み振り分け部32からの重みを掛け合わせて周波数領域係数と最も近づくような2進値を所望の量子化精度で決定する。この量子化の際に、量子化精度(例えばビット数)を決定する必要があるが、これは量子化ユニットごとに設定する。周波数領域係数のパワーとスペクトル形状に基づき決定された、最低限保証する必要がある量子化誤差から決定することが望ましい。
【0026】
ここで決定された量子化精度情報も何らかの形で符号化し復号器に送る必要がある。最も簡単な方法としては、量子化精度を満たすのに必要な量子化ビット数を符号化することが挙げられる。その他、可逆圧縮部36でエントロピー符号化を行う場合には、ハフマン符号化ならハフマン符号テーブル、算術符号化ならシンボルの出現頻度テーブルにより量子化精度を与えることができるので、このテーブルの種類を符号化することにより量子化精度情報を復号器に送ることができる。
【0027】
なお、前述のベクトル量子化における重み付け及び上述のスカラ量子化における重み付けは、図1で説明した平坦化部12による平坦化と本質的に同じである。即ち、図4に示したベクトル量子化におけるコードベクトル又はスカラ量子化における量子化値に重みを乗算する代わりに、周波数領域係数を重みで割り算し(即ち、平坦化し)、その割り算結果をベクトル量子化又はスカラ量子化しても処理手順が異なるだけで符号化結果は同じである。
【0028】
可逆圧縮部36では、スカラ量子化部35で得られた量子化インデックスに可逆圧縮符号化を行ない、圧縮スカラ量子化符号CSQCを多重化部40に供給する。可逆圧縮符号化に先立ち、1つ以上の量子化ユニットをまとめ、符号化ユニットを構成する。図5の例では、チャネル0の処理において2つの量子化ユニットSQU0,SQU1をまとめて1つの符号化ユニットSQCU0とし、2つの量子化ユニットSQU2,SQU3をまとめて1つの符号化ユニットSQCU1とし、チャネル1についても同様の処理を行っている。
【0029】
符号化ユニットは量子化ユニットを一定数ずつまとめて構成しても良いし、似た量子化精度をもつ量子化ユニット同士をまとめて符号化ユニットを構成しても良い。後者の場合、符号化ユニットの構成情報を符号化して復号器に送る必要がある。可逆圧縮の方法としては、ハフマン符号化や算術符号化などのエントロピー符号化の他、量子化値0が長く続く場合には、ランレングス符号化を用いても効果がある。エントロピー符号化を行う場合、ハフマン符号化なら、ハフマン符号テーブル、算術符号化ならシンボルの出現頻度のテーブルを与える必要がある。このテーブルは符号化ユニットごとに与える。
【0030】
多重化部40は符号化モデル選択情報符号QMSC、重み符号WC、ベクトル量子化符号VQC 、圧縮スカラ量子化符号CSQCを多重化し、多重化符号ビット列として出力し、例えば記憶媒体に書き込んだり、あるいは他の装置に送信する。
次にこの発明の符号化方法により符号化された符号を復号する復号化装置10Bについて説明する。
図2に示したように、入力された多重化符号ビット列は逆多重化部50において分離され、選択情報QMSC、重み符号WC、ベクトル量子化符号VQC 、圧縮スカラ量子化符号CSQCを得る。選択情報QMSCは符号化モデル選択再生部60において選択情報に再生され、係数再生部70に与えられる。
符号化モデル選択再生部60
符号化モデル選択再生部60では、符号化モデル選択符号QMSCのビット列が入力され、符号化モデル選択情報が再生される。符号化モデル選択情報が可逆圧縮されている場合、圧縮方法に対する復号化を行い、符号化モデル選択の2値情報を得る。可逆圧縮がかけられていない場合には、ビット列を2値の整数化して、符号化モデルの選択情報とする。このようにして得られた符号化モデルの選択情報は、係数再生部70に送られる。
係数再生部70
係数再生部70では、逆多重化部50から、符号化装置10Aにおける量子化・符号化部30の符号化出力である係数符号(ベクトル量子化符号VQC と、圧縮スカラ量子化符号CSQCと、重み符号WC)と選択情報が与えられ、選択情報により指定された符号化方法に対応する復号化を行って周波数領域係数を再生し、周波数/時間変換部80に与える。
【0031】
図6に係数再生部70の詳細を示す。係数再生部70は可逆圧縮復号化部71と、スカラ量子化再生部72と、周波数領域再構築部73と、ベクトル量子化再生部74と、重み再生部75と、重み付け部76とから構成されている。
逆多重化部50により分離された符号ビット列のうち、ベクトル量子化符号VQC のビット列は、ベクトル量子化再生部74において、2進数を整数表現することにより量子化インデックスに復元され、コードブックを参照して対応するベクトルを読み出し、そのベクトルを重みなし小帯域係数として再生する。符号化装置10Aにおけるベクトル量子化部34を複数のベクトル量子化により構成した場合には、符号化装置10Aのベクトル量子化部34と同じ規則を用いて再生されたベクトルをベクトル逆量子化により再構築し、重みなし小帯域係数を得る。再生された重みなし小帯域係数は、周波数領域再構築部73に送られる。
【0032】
逆多重化部50からの圧縮スカラ量子化符号CSQCのビット列は、可逆圧縮復号化部71において、符号化装置側で可逆圧縮符号化した手法に対応する復号化を行うことによりスカラ量子化インデックスを得、スカラ量子化再生部72に送られる。
スカラ量子化再生部72では、可逆圧縮復号化部71より受け取ったスカラ量子化インデックスを量子化ユニットごとにスカラ逆量子化して量子化値に復元することにより重みなし小帯域係数を再生する。再生した重みなし小帯域係数は、周波数領域再構築部73に送られる。
【0033】
周波数領域再構築部73では、スカラ量子化再生部72及びベクトル量子化再生部73より送られた量子化ユニットごとの重みなし小帯域係数を、符号化モデル選択情報再生部60より受け取った符号化モデル選択情報に従って重みなし周波数領域係数に再構築する。
重み再生部75では、逆多重化部50から重み符号WCのビット列を受け取り、重みを再生する。重み付け部76では、周波数領域再構築部73で構築した重みなし周波数領域係数に重み再生部75で得た重みを乗算して周波数領域係数を得る。
周波数/時間変換部80
周波数/時間変換部80では、整数再生部70からの周波数領域係数に対し周波数/時間変換を行いオーディオ信号を出力する。周波数/時間変換の方法としては、逆離散コサイン変換(IDCT)や、逆変形離散コサイン変換(IMDCT)を用いることができる。変換方法として逆変形離散コサイン変換を用いる場合には、N個の入力係数を変換して2N個の時間領域のサンプルを得る。このサンプルに、窓関数を掛けた後、現フレームの前半Nサンプルと一つ前のフレームの後半Nサンプル同士を加え合わせて得られたNサンプルを出力とする。
【0034】
Nの値は、時間/周波数変換アルゴリズムに適用できるどのようなものを適用しても良いが、128から2048 の間の値を使うと最も効果が高い。また、符号器で入力信号の性質に応じて適応的にNの値を切り替えた場合、例えば、通常時N=2048としておき、入力音が過渡的な時 N=512、更に大きく過渡的であったときにはN=128 とした場合、符号化装置から渡されたNの情報に従ってNの値を決定する。
【0035】
図7はこの発明による符号化方法及びこの符号化方法により符号化された符号を復号する復号化方法をコンピュータで実施する場合の構成を示し、コンピュータ100は、バス180を介して互いに接続されたCPU110,RAM120、ROM130,入出力インタフェース140、ハードディスク150を含んでいる。ROM130にはコンピュータ100を動作させる基本プログラムが格納されており、ハードディスク150には前述したこの発明による符号化方法及びこの符号化方法により符号化された符号を復号する復号化方法を実行するプログラムが予め格納されている。
【0036】
例えば符号化時にはCPU110はハードディスク150から符号化プログラムをRAM120にロードし、インタフェース140から入力されたオーディオ信号サンプルを符号化プログラムに従って処理することにより符号化し、インタフェース140から出力する。復号時には、復号プログラムをハードディスク150からRAM120にロードし、入力符号を復号プログラムに従って処理してオーディオ信号サンプルを出力する。
【0037】
この発明による符号化方法及びこの符号化方法により符号化された符号を復号する復号化方法を実行するプログラムは、内部バス180に駆動装置160を介して接続された外部ディスク装置170に記録されたものを使用してもよい。あるいは、インタフェース140を介して外部ネットワークからプログラムをダウンロードしてハードディスク150に格納したものでもよい。この発明による符号化方法を実行するプログラムが記録された記憶媒体としては、磁気記録媒体や、ICメモリや、コンパクトディスクなどのような形態の記憶媒体であってもよい。
【0038】
【発明の効果】
本発明を利用すると、低いビットレートでのオーディオ信号の符号化において、入力音の特性に適応した高能率な符号化を可能とする。
【図面の簡単な説明】
【図1】ベクトル量子化利用の変換符号化方法の一般的な形態を示すブロック図。
【図2】本発明の実施例の構成を示すブロック図。
【図3】Aは符号化モデル選択アルゴリズムの一例を示すフロー図、Bは他の選択アルゴリズムを示すフロー図、Cは更に他の選択アルゴリズムを示すフロー図、Dは更に他の選択アルゴリズムを示すフロー図。
【図4】本発明の実施例中の量子化・符号化部の詳細な構成を示すブロック図。
【図5】入力周波数領域係数と、小帯域と、符号化モデル選択と、量子化ユニットと、符号化ユニットの構成例を示す図。
【図6】本発明の実施例中の、係数再生部の詳細な構成を示すブロック図。
【図7】この発明の符号化方法及びこの符号化方法により符号化された符号を復号する復号化方法をプログラムにより実施するためのコンピュータの構成を示すブロック図。[0001]
[Industrial applications]
The present invention relates to an encoding method and a coding method for converting an audio signal into a digital code with high efficiency.WhoThe present invention provides a storage medium on which a program for implementing the method is recorded, and can be used for recording / reproducing of an audio signal, transmission of an audio signal using a communication channel, broadcasting, and the like.
[0002]
[Prior art]
As a conventional method of encoding an audio signal with high efficiency, for example, there is a transform encoding method shown in FIG. In the encoding device 10A, the audio signal input as a discrete signal sample sequence is subjected to time / frequency conversion by the time /
[0003]
In the decoding device 10B, the multiplexed code received by the
A frequency-domain weighted interleave vector quantization (Transform-domain Weighted Interleave Vector Quantization, TWINVQ) scheme applies to this example. In the TWINVQ method, after an input signal is subjected to time / frequency conversion, it is subjected to a two-stage flattening procedure, and then is encoded by vector quantization. In the vector quantization, a code vector having a minimum distance from a target vector is selected from a code book, and the decoding apparatus uses the code vector to reproduce the vector. In such an encoding method, although the distance between the reproduction vector and the target vector is small and encoding can be performed with high efficiency, it is difficult to control the error of each element in the vector from the target value. Therefore, in an encoding method using vector quantization, the frequency characteristics of a signal reproduced on the decoding device side may be distorted from the frequency characteristics of the original signal, resulting in deterioration of reproduced sound quality. When the shape of the spectrum is complicated, for example, when an input signal contains a strong tone component, a large load is imposed on the vector quantization, and this property is likely to appear strongly, which causes deterioration in sound quality.
[0004]
A technique for solving this problem has been proposed in Japanese Patent Application No. 2000-078370, "Audio signal encoding method and decoding method, devices and program storage medium". Here, when the spectrum of the sound source has a complex shape, the frequency domain coefficients are separated into two strong and weak systems, and weighted vector quantization is performed for each system, so that finer quantum The control of the formation error is enabled. However, this method requires a relatively large number of bits for encoding the separation information of the frequency domain coefficients, and may cause inefficiency especially in a low frequency domain in which the occurrence probabilities of the strengths become nearly equal.
[0005]
As another solution method, there is a method in which only a specific sample that has a large effect on vector quantization is removed in advance and encoded. Japanese Patent Application No. Hei 7-261236 “Audio signal conversion encoding method and decoding method” and 7 -248145 "Transform coding method and transform decoding method". In the former application, samples of high importance are removed in advance, and the rest are vector-quantized.However, in this method, information on the position of the samples to be removed on the frequency axis must be encoded. Is bad. In the latter method, for a pitch-type sound source in which a periodic spike occurs in the spectrum, a sample located at an integer multiple of the fundamental frequency of the spike is removed and separately encoded. This method has good coding efficiency, but has little effect on a sound source having a non-integer overtone structure such as a triangle, and is poor in versatility.
[0006]
The TWINVQ method is described in Iwagami et al., "Tone Coding by Frequency Domain Weighted Interleave Vector Quantization (TWINVQ)," IEICE Transactions Vol. J80-A, pp. Details are described in 830-837 and ISO / IEC standard ISO / IEC 14496-3 Information Technology: Coding of Audio-Visual Objects (MPEG-4 Audio). Further, details regarding the vector quantization technology in general are described in "Vector quantization and information compression" by Corui et al. (Corona Corp., 1998).
[0007]
[Problems to be solved by the invention]
The present invention relates to a method for transforming and encoding an audio signal, which encodes a spectrum of an input signal, in which a spectrum having a complicated shape is efficiently encoded with high versatility.The lawThe task is to provide.
[0008]
[Means for Solving the Problems]
The encoder converts the input signal sequence into the frequency domain at regular time intervals, and divides the obtained frequency domain coefficients into small bands in which neighbors are combined. For each small band, determine a model for coding the coefficient, and quantize and code the coefficient belonging to the small band in the determined method..
[0009]
[Action]
For example, when there are two types of coding models, a method using vector quantization and a method using scalar quantization, vector quantization can quantify efficiently with a small number of bits, but on the other hand, It is difficult to control distortion. The scalar quantization has good independence for each sample, but if the number of quantization bits is insufficient, the efficiency is greatly deteriorated. According to the present invention, as described above, by having a plurality of encoding models having different properties and selecting an optimal model for each small band of the input spectrum, it is possible to perform highly versatile and highly efficient encoding. I have.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 2 shows a first embodiment of the present invention. In the embodiment of FIG. 2, the encoding device 10A includes a time /
[0011]
The decoding device 10B includes a
[0012]
Next, each unit of the encoding device 10A will be described in detail with reference to the processing on the frequency domain coefficients shown in FIG.
Time /
The discrete sample sequence of the audio signal input to the terminal 9 is input to the time /
[0013]
When the modified discrete cosine transform is used as the transform method,
Encoding
A series of coefficients in the frequency domain obtained by the time /
[0014]
The number of frequency domain coefficients constituting the small band may be a fixed number or may be changed according to the frequency to which the small band belongs. In the latter case, if the number of coefficients is small in a low-frequency region and the number of coefficients is large in a high-frequency region, encoding at the subsequent stage can be performed efficiently.
The selection of the vector quantization type and the scalar quantization type in the encoding
[0015]
(Equation 1)
(Step S11), and the flatness S is set to a predetermined threshold value Sth Is compared with (step S12),th Is smaller than the threshold SthIf the value is less than 0.5, a scalar quantization type is selected (step S13). If not, a vector quantization type is selected (step S14), and selection information indicating the selected type is output for each small band. (Step S15).
[0016]
Alternatively, as shown in FIG. 3B, M frequency domain coefficients x included in the small bandiIs the size of the two strong and weak xj, J = 0,..., J−1 and xk, K = 0,..., K−1 (where j ≠ k, J + K = M) (step S21), and the power P of the coefficient belonging to each systemJ= Σ | xj|2And PK= Σ | xk|2Ratio PJ/ PK Is calculated (step S22), and this power ratio is compared with a constant value C (step S23). For example, when C = 2.0, a scalar quantization type is selected (step S24). If not, the vector quantization type is selected (step S25), and the selected information determined for each small band is output (step S26).
[0017]
Alternatively, of a series of small bands of frequency domain coefficients obtained for each input frame, a small band on the lower order side (lower frequency side) is a scalar quantization type, and a smaller band on the higher order side (higher frequency side). Is based on the assumption that encoding is performed using the vector quantization type, and the point at which the number of bits required for scalar quantization for the lower-order small band reaches a predetermined fixed number is determined at the point of switching to vector quantization. May be used. That is, as shown in FIG. 3C, n = 0 and B = 0 are set as initial values (step S31), scalar quantization is selected for the n-th small band n (c), and a predetermined quantization accuracy is determined. Scalar quantization bit number b to be satisfiedn(Step S32), and the number of allocated bits bnIs accumulated (step S33), and the accumulated value B of the number of allocated bits becomes a predetermined value BSIt is determined whether or not B is smaller (step S34). If smaller, n is incremented by 1 and the process returns to step S32 (step S35).SIf so, vector quantization is selected for the remaining small bands (step S36). In the example of FIG. 3C, instead of sending the selection information, information indicating which frequency or which small band the encoding method changes from may be sent.
[0018]
Further, which coding model to use for each small band may be determined in advance. For example, as shown in FIG. 3D, a scalar quantization type is selected for a small band belonging to a frequency lower than the frequency F = 4 kHz (step S41), and a vector quantization type is selected for a small band belonging to a higher frequency. May be selected in advance (step S42). In this case, select informationDecryptionThere is no need to send it to the gasifier.
Note that a plurality of the above selection methods may be combined. For example, a small band belonging to a frequency lower than 2 kHz is always performed by the scalar quantization type according to step S41 of FIG. 3D, and a small band belonging to 2 kHz to 7 kHz is subjected to the method of FIG. , The vector quantization type may be selected for small bands belonging to frequencies higher than 7 kHz according to step S42 in FIG. 3D. In the case of FIGS. 3A and 3B, selection information that specifies which one of the two encoding models is applied to each small band is generated.
[0019]
The coding model selection information determined in this way is sent to the quantization /
Quantization / encoding
The quantization /
[0020]
FIG. 4 shows details of the quantization /
[0021]
The weight calculated by the
[0022]
The
[0023]
The
[0024]
Although vector quantization is performed for each quantization unit, the quantization units may be vector-quantized collectively or may be divided and vector-quantized. As a method of division, a method of dividing into a plurality of areas, a method of dividing after interleaving input coefficients, or the like can be used. The selection of the optimum vector is performed by multiplying the code vector in the code book by the weight from the
[0025]
The
[0026]
It is necessary to encode the quantization precision information determined here in some form and send it to the decoder. The simplest method is to encode the number of quantization bits required to satisfy the quantization accuracy. In addition, when entropy coding is performed by the
[0027]
The weighting in the above-described vector quantization and the weighting in the above-described scalar quantization are essentially the same as the flattening by the flattening
[0028]
The
[0029]
The encoding unit may be configured by grouping a fixed number of quantization units, or may be configured by integrating quantization units having similar quantization accuracy. In the latter case, it is necessary to encode the configuration information of the encoding unit and send it to the decoder. As a method of lossless compression, in addition to entropy coding such as Huffman coding or arithmetic coding, when length of
[0030]
The multiplexing
Next, this inventionEncoding methodByDecode the encoded codeThe decoding device 10B will be described.
As shown in FIG. 2, the input multiplexed code bit sequence is demultiplexed in the
Encoding model selection / reproduction unit 60
The coding model selection / reproduction unit 60 receives the bit string of the coding model selection code QMSC and reproduces the coding model selection information. If the encoding model selection information is losslessly compressed, decoding is performed for the compression method, and binary information for encoding model selection is obtained. If the lossless compression has not been applied, the bit string is converted into a binary integer and used as coding model selection information. The coding model selection information obtained in this way is sent to the
In the
[0031]
FIG. 6 shows details of the
Of the code bit strings separated by the
[0032]
The bit string of the compressed scalar quantization code CSQC from the
The scalar
[0033]
In the frequency
The
Frequency /
The frequency /
[0034]
As the value of N, any value applicable to the time / frequency conversion algorithm may be applied, but a value between 128 and 2048 is most effective. Also, when the encoder adaptively switches the value of N according to the characteristics of the input signal, for example, N = 2048 in a normal state, and N = 512 when the input sound is transient, which is much more transient. If N = 128, the value of N is determined according to the information of N passed from the encoding device.
[0035]
FIG. 7 shows an encoding method according to the present invention andDecodes a code coded by this coding methodThe configuration when a decoding method is performed by a computer is shown. The
[0036]
For example, at the time of encoding, the
[0037]
Encoding method according to the present invention andDecodes a code coded by this coding methodAs a program for executing the decoding method, a program recorded on an
[0038]
【The invention's effect】
When the present invention is utilized, in encoding an audio signal at a low bit rate, it is possible to perform highly efficient encoding adapted to the characteristics of an input sound.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a general form of a transform encoding method using vector quantization.
FIG. 2 is a block diagram showing the configuration of an embodiment of the present invention.
3A is a flowchart illustrating an example of an encoding model selection algorithm, FIG. 3B is a flowchart illustrating another selection algorithm, FIG. 3C is a flowchart illustrating another selection algorithm, and FIG. Flow diagram.
FIG. 4 is a block diagram showing a detailed configuration of a quantization / encoding unit in the embodiment of the present invention.
FIG. 5 is a diagram showing a configuration example of an input frequency domain coefficient, a small band, a coding model selection, a quantization unit, and a coding unit.
FIG. 6 is a block diagram showing a detailed configuration of a coefficient reproducing unit in the embodiment of the present invention.
FIG. 7 shows the encoding of the present invention.Method and decoding code encoded by this encoding methodFIG. 18 is a block diagram showing a configuration of a computer for executing a decoding method by a program.
Claims (2)
(a) 上記離散サンプル列を一定数の入力サンプルごとに時間/周波数変換し、周波数領域係数を得るステップと、
(b) 上記周波数領域係数を複数の係数毎にまとめた小帯域に分割するステップと、
(c) 各上記小帯域に対し、その小帯域を構成する周波数領域係数の形状の平坦度が所定値より小さい場合に予め決めたスカラ量子化を利用した符号化方法を選択し、そうでない場合に予め決めたベクトル量子化を利用した符号化方法を選択する選択情報を生成し、上記選択情報を符号化して選択情報符号として出力するステップと、
(d) 各上記小帯域を上記選択情報に従って符号化して係数符号を生成し、出力するステップ、
とを含むことを特徴とするオーディオ信号符号化方法。An encoding method for inputting a discrete sample sequence of an audio signal and outputting a digital code,
(a) performing time / frequency conversion on the discrete sample sequence for each of a fixed number of input samples to obtain frequency domain coefficients;
(b) dividing the frequency domain coefficients into small bands grouped for each of a plurality of coefficients;
(c) For each of the above small bands , select a coding method using a predetermined scalar quantization when the flatness of the shape of the frequency domain coefficient constituting the small band is smaller than a predetermined value, otherwise, Generating selection information for selecting an encoding method using predetermined vector quantization, encoding the selection information, and outputting the selected information as a selection information code ;
(d) encoding each of the small bands according to the selection information to generate a coefficient code, and outputting the code;
And an audio signal encoding method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000282129A JP3557164B2 (en) | 2000-09-18 | 2000-09-18 | Audio signal encoding method and program storage medium for executing the method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000282129A JP3557164B2 (en) | 2000-09-18 | 2000-09-18 | Audio signal encoding method and program storage medium for executing the method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002091497A JP2002091497A (en) | 2002-03-27 |
JP3557164B2 true JP3557164B2 (en) | 2004-08-25 |
Family
ID=18766690
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000282129A Expired - Fee Related JP3557164B2 (en) | 2000-09-18 | 2000-09-18 | Audio signal encoding method and program storage medium for executing the method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3557164B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7240001B2 (en) | 2001-12-14 | 2007-07-03 | Microsoft Corporation | Quality improvement techniques in an audio encoder |
US8090577B2 (en) | 2002-08-08 | 2012-01-03 | Qualcomm Incorported | Bandwidth-adaptive quantization |
JP4009781B2 (en) * | 2003-10-27 | 2007-11-21 | カシオ計算機株式会社 | Speech processing apparatus and speech coding method |
US7562021B2 (en) * | 2005-07-15 | 2009-07-14 | Microsoft Corporation | Modification of codewords in dictionary used for efficient coding of digital media spectral data |
EP1984911A4 (en) * | 2006-01-18 | 2012-03-14 | Lg Electronics Inc | DEVICE AND METHOD FOR SIGNAL CODING AND DECODING |
KR101149449B1 (en) * | 2007-03-20 | 2012-05-25 | 삼성전자주식회사 | Method and apparatus for encoding audio signal, and method and apparatus for decoding audio signal |
US7885819B2 (en) | 2007-06-29 | 2011-02-08 | Microsoft Corporation | Bitstream syntax for multi-process audio decoding |
-
2000
- 2000-09-18 JP JP2000282129A patent/JP3557164B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2002091497A (en) | 2002-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4506039B2 (en) | Encoding apparatus and method, decoding apparatus and method, and encoding program and decoding program | |
AU2006332046B2 (en) | Scalable compressed audio bit stream and codec using a hierarchical filterbank and multichannel joint coding | |
JP5200028B2 (en) | Apparatus for encoding and decoding | |
US7689427B2 (en) | Methods and apparatus for implementing embedded scalable encoding and decoding of companded and vector quantized audio data | |
CN1905010B (en) | Apparatus and method for encoding audio data, and apparatus and method for decoding audio data | |
US7761290B2 (en) | Flexible frequency and time partitioning in perceptual transform coding of audio | |
JP4081447B2 (en) | Apparatus and method for encoding time-discrete audio signal and apparatus and method for decoding encoded audio data | |
JP3412081B2 (en) | Audio encoding / decoding method with adjustable bit rate, apparatus and recording medium recording the method | |
US7774205B2 (en) | Coding of sparse digital media spectral data | |
EP1047047B1 (en) | Audio signal coding and decoding methods and apparatus and recording media with programs therefor | |
US7333929B1 (en) | Modular scalable compressed audio data stream | |
CN101162584A (en) | Method and apparatus to encode and decode audio signal by using bandwidth extension technique | |
JP3434260B2 (en) | Audio signal encoding method and decoding method, these devices and program recording medium | |
KR102204136B1 (en) | Apparatus and method for encoding audio signal, apparatus and method for decoding audio signal | |
JP3344944B2 (en) | Audio signal encoding device, audio signal decoding device, audio signal encoding method, and audio signal decoding method | |
JP3557164B2 (en) | Audio signal encoding method and program storage medium for executing the method | |
JP2001044847A (en) | Lossless encoding method, lossless decoding method, these devices and their respective program recording media | |
JPH09106299A (en) | Acoustic signal conversion encoding method and decoding method | |
JP4191503B2 (en) | Speech musical sound signal encoding method, decoding method, encoding device, decoding device, encoding program, and decoding program | |
JPH10276095A (en) | Encoder/decoder | |
JP3361790B2 (en) | Audio signal encoding method, audio signal decoding method, audio signal encoding / decoding device, and recording medium recording program for implementing the method | |
JP4195598B2 (en) | Encoding method, decoding method, encoding device, decoding device, encoding program, decoding program | |
AU2011205144B2 (en) | Scalable compressed audio bit stream and codec using a hierarchical filterbank and multichannel joint coding | |
Kandadai et al. | Scalable audio compression at low bitrates | |
AU2011221401B2 (en) | Scalable compressed audio bit stream and codec using a hierarchical filterbank and multichannel joint coding |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20040420 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040514 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090521 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090521 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100521 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100521 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110521 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120521 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130521 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140521 Year of fee payment: 10 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |