JP2004325633A - Method and program for encoding signal, and recording medium therefor - Google Patents

Method and program for encoding signal, and recording medium therefor Download PDF

Info

Publication number
JP2004325633A
JP2004325633A JP2003118250A JP2003118250A JP2004325633A JP 2004325633 A JP2004325633 A JP 2004325633A JP 2003118250 A JP2003118250 A JP 2003118250A JP 2003118250 A JP2003118250 A JP 2003118250A JP 2004325633 A JP2004325633 A JP 2004325633A
Authority
JP
Japan
Prior art keywords
correlation
indicating
stereo coding
equation
mid
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
JP2003118250A
Other languages
Japanese (ja)
Inventor
Kiyotaka Nagai
清隆 永井
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003118250A priority Critical patent/JP2004325633A/en
Publication of JP2004325633A publication Critical patent/JP2004325633A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To perform on/off control over mid-side stereophonic encoding or intensity stereoscopic encoding with high precision in order to generate stereophonic encoded data of improved sound quality. <P>SOLUTION: A flow of on/off control over mid-side stereophonic encoding includes steps 301 to 303 of calculating a quantity (c) indicating the correlation between pieces Li and Ri of spectral data of two channels, a step 304 of comparing the quantity (c) indicating the correlation with thresholds thr1 and thr2, and steps 305 and 306 of determining(deciding) whether the mid-side stereoscopic encoding is turned on or off. Consequently, the mid-side stereophonic encoding can precisely be controlled. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、ステレオ信号をスペクトルデータに変換し、ジョイントステレオ符号化を用いてスペクトルデータを高能率符号化する方法に関する。
【0002】
【従来の技術】
近年、ステレオ信号をスペクトルデータに変換し、ジョイントステレオ符号化を用いてスペクトルデータを符号化することにより、ビットレートを低減した信号符号化方法が提案されている。
【0003】
このジョイントステレオ符号化を採用したオーディオ高能率符号化規格としては、MPEG(Motion Picture Expert Group)−1オーディオ、MPEG−2BC(backwards−compatible)オーディオ、MPEG−2 AAC(Advanced Audio Coding)等が知られている。
【0004】
ジョイントステレオ符号化は、左右のチャンネルの相関を利用して、ビットレートを低減し、符号化効率を改善するための符号化方法であって、特にミッドサイドステレオ符号化とインテンシティステレオ符号化とが知られている。
【0005】
ミッドサイドステレオ符号化は、左右のチャンネルに相関がある場合に、左右のチャンネルを個別に符号化する代わりに、左右のチャンネルの和(ミッドあるいはセンター)と差(サイド)を正規化して符号化する方法である。左右のチャンネルの相関が大きい場合には、得られた和と差のエネルギー差が大きくなり、情報量が一方のチャンネルに偏るので、符号化に必要なビット数を削減し、符号化効率を改善することができる。また、削減したビットを音質に寄与する他のデータに割り当てることにより、音質を向上することができる。
【0006】
インテンシティステレオ符号化は、所定の周波数(通常3kHzから6kHz)以上では、聴覚的には、スペクトルの微細構造よりもスペクトルのエンベロープの方が重要であることを利用した符号化方法である。すなわち、前記所定の周波数以上では、スペクトルデータとしては左右のチャンネルのスペクトルデータの和のみを符号化し、エンベロープ情報については左右のチャンネルで個別に符号化することにより、スペクトルデータのデータ量を半減し、符号化効率を改善するものである。
【0007】
エンベロープ情報としては、前記和のスペクトルデータと各チャンネルのスペクトルデータのエネルギーの比を送る。インテンシティステレオ符号化では、ミッドサイドステレオ符号化よりも低いビットレートを実現することができる。しかしながら、スペクトルの微細構造を再現することができないので、広がり感、ステレオ感等の立体的音響感に劣化を生じることがある。
【0008】
インテンシティステレオ符号化方法としては、上記方法の他に、左右のチャンネルが同相であるか逆相であるかを示すフラグを符号化データとして伝送し、左右のチャンネルが同相である場合にはスペクトルデータの和を、逆相である場合には差を符号化することにより、音質を改善したインテンシティステレオ符号化方法も提案されている。この方法はMPEG−2 AACで採用されている。
【0009】
このようなジョイントステレオ符号化によって、ビットレートを低減し、符号化効率を改善するためには、左右のチャンネルのスペクトルデータ間の相関に応じて、ジョイントステレオ符号化のオン、オフを精度よく制御することが重要である。
【0010】
ジョイントステレオ符号化のオン、オフを制御する従来の方法としては、例えば、特許文献1、あるいは特許文献2に記載された方法が知られている。
【0011】
図6は、特許文献1に記載された従来のミッドサイドステレオ符号化(特許文献1ではセンター/サイドコード化と記載)制御方法に基づくステップを示すフローチャートである。
【0012】
同図において、ステップ601で左右のステレオチャンネルからの信号間のスペクトル間隔の尺度SDを(数4)で算出する。
【0013】
【数4】

Figure 2004325633
【0014】
ここで、LiとRiは、それぞれ左チャンネルと右チャンネルのスペクトルデータであり、添え字のiはスペクトル番号である。また、fsとfe(特許文献1ではf1とf2−1と記載)は、ミッドサイドステレオ符号化のオン、オフ判定を行うバンドの、それぞれ開始スペクトル番号と終了スペクトル番号である。
【0015】
ステップ602でステレオ信号のスペクトルエネルギーSEを(数5)で算出する。
【0016】
【数5】
Figure 2004325633
【0017】
ステップ603で左右のステレオチャンネルの信号間のスペクトル間隔の尺度を示す量dを(数6)で算出する。
【0018】
【数6】
Figure 2004325633
【0019】
ステップ604でdと閾値thrとを比較し、dが閾値より小さい場合には、ステップ605でミッドサイドステレオ(MS)符号化をオンとし、そうでない場合には、ステップ606でMSステレオ符号化オフとする。MSステレオ符号化オフの場合には、左右のチャンネルを個別に符号化(以下、ステレオチャンネル個別符号化、あるいは略してLR個別符号化と呼ぶ)する。
【0020】
また、特許文献2に記載された方法は、聴覚のマスキングモデルに基づいてマスキング閾値を算出し、ジョイントステレオ符号化とステレオチャンネル個別符号化に必要なビット数をそれぞれ算出し、両者を比較して、ビット数の小さい方の符号化方式を選択するものである。
【0021】
【特許文献1】
特表平7−501190号公報
【特許文献2】
特表平8−501666号公報
【0022】
【発明が解決しようとする課題】
しかしながら、特許文献1に記載の従来の符号化方法では、ジョイントステレオ符号化判定のオン、オフの制御に用いる左右のチャンネルのスペクトル間隔の尺度を示す量が、スペクトルデータの分布を適切に考慮した尺度となっていないので、ジョイントステレオ符号化の制御が不適切となり、音質が劣化することがあるという課題があった。
【0023】
以下、この課題について、実例を用いて詳細に説明する。
【0024】
図7は、ステレオチャンネル(LR)個別符号化とミッドサイド(MS)ステレオ符号化のスペクトルデータの4つの事例を示すものである。すべての事例で、左右のチャンネルのエネルギーの総和は一定であるとする。
【0025】
図7でLiとRiは、それぞれ左チャンネルと右チャンネルのスペクトルデータであり、iは各スペクトルデータのスペクトル番号である。図7の事例では、簡単のため、ミッドサイドステレオ符号化判定を行うバンドを構成するスペクトルの本数は2本としている。したがって、iの値は0、または1とする。LR個別符号化では、スペクトルデータとしてLiとRiとが符号化される。また、MSステレオ符号化では、スペクトルデータとして、LiとRiの代わりに、LiとRiの和Miと差Siとが、正規化されて符号化される。図7の事例では、MiとSiは、それぞれ(数7)と(数8)で算出されるものとする。
【0026】
【数7】
Figure 2004325633
【0027】
【数8】
Figure 2004325633
【0028】
以下、図7に示す4つの事例について順次説明する。
【0029】
(1)事例1
事例1は、LiとRiの値がすべて同一で、(数9)の値とした場合である。
【0030】
【数9】
Figure 2004325633
【0031】
そして、MiとSiは、(数7)と(数8)とにより、(数10)のように算出される。
【0032】
【数10】
Figure 2004325633
【0033】
そして、左右のステレオチャンネルの信号間のスペクトル間隔の尺度を示す量dは、(数4)、(数5)、(数6)より、(数11)と算出される。
【0034】
【数11】
Figure 2004325633
【0035】
事例1では、図7に示すように、LR個別符号化と比較して、MSステレオ符号化の方が、情報量の偏りが大きいので、符号化効率がよい。すなわち、事例1は、MSステレオ符号化をオンと判定すべき典型的な事例である。
【0036】
(2)事例2
事例2は、左チャンネルにのみ信号があり、LiとRiを(数12)の値とした場合である。
【0037】
【数12】
Figure 2004325633
【0038】
そして、MiとSiは、(数7)と(数8)とにより、(数13)と算出される。
【0039】
【数13】
Figure 2004325633
【0040】
左右のステレオチャンネルの信号間のスペクトル間隔の尺度を示す量dは、(数4)、(数5)、(数6)より、(数14)と算出される。
【0041】
【数14】
Figure 2004325633
【0042】
事例2では、図7に示すように、MSステレオ符号化と比較して、LR個別符号化の方が、情報量の偏りが大きいので、符号化効率がよい。すなわち、事例2はMSステレオ符号化をオフと判定すべき典型的な事例である。また、このことは、事例2は、事例1でのLiとMiとを入れ替え、RiとSiとを入れ替えたものであることからも裏付けられる。
【0043】
(3)事例3
次に、事例3は、LiとRiを(数15)の値とした場合である。
【0044】
【数15】
Figure 2004325633
【0045】
そして、MiとSiは(数7)と(数8)とにより、(数16)と算出される。
【0046】
【数16】
Figure 2004325633
【0047】
左右のステレオチャンネルの信号間のスペクトル間隔の尺度を示す量dは、(数4)、(数5)、(数6)より、(数17)と算出される。
【0048】
【数17】
Figure 2004325633
【0049】
事例3では、LiとMiの値、並びにRiとSiの値が同一である。したがって、LR個別符号化とMSステレオ符号化の符号化効率は同一となる事例である。
【0050】
(4)事例4
事例4は、LiとRiを(数18)の値とした場合である。
【0051】
【数18】
Figure 2004325633
【0052】
そして、MiとSiは、(数7)と(数8)により、(数19)と算出される。
【0053】
【数19】
Figure 2004325633
【0054】
左右のステレオチャンネルの信号間のスペクトル間隔の尺度を示す量dは、(数4)、(数5)、(数6)より、(数20)と算出される。
【0055】
【数20】
Figure 2004325633
【0056】
事例4では、L0=M1、L1=M0、R0=S1、R1=S0と対応することができるので、事例3と同様に、LR個別符号化とMSステレオ符号化の符号化効率は同一であるべきである。しかしながら、(数17)で与えられる事例3と(数20)で与えられる事例4の左右のステレオチャンネルの信号間のスペクトル間隔の尺度を示す量dの値は異なる。すなわち、特許文献1に記載の従来方法では、左右のステレオチャンネルの信号間のスペクトル間隔の尺度を示す量が、本来同一の値となるべき場合に異なる値となることがあった。この結果、MSステレオ符号化のオン、オフの制御が不適切となり、音質が劣化することがあるという課題があった。
【0057】
また、特許文献1に記載の従来方法では、インテンシティステレオ符号化で、2つのチャンネルのスペクトルデータの正の相関と負の相関とを識別することができないので、インテンシティステレオ符号化のオン、オフの制御が不適切となり、音質が劣化することがあるという課題があった。
【0058】
また、特許文献2に記載の従来方法では、聴覚のマスキングモデルに基いてマスキング閾値を算出し、前記マスキング閾値を用いて、ジョイントステレオ符号化とステレオチャンネル個別符号化という2つの場合のビット数を算出しなければならないので、処理量が大きいという課題があった。
【0059】
本発明は上記の問題点を解決するもので、ジョイントステレオ符号化(ミッドサイドステレオ符号化、あるいはインテンシティステレオ符号化)のオン、オフの制御を高精度に行うことにより、音質を改善したステレオ符号化データを生成することのできる信号符号化方法を提供することを目的とする。
【0060】
また、2つのチャンネルのスペクトルデータの正の相関と負の相関とを識別して、ジョイントステレオ符号化のオン、オフの制御を高精度に行うことができる信号符号化方法を提供することを目的とする。
【0061】
また、ジョイントステレオ符号化の高精度な制御を、比較的小さい処理量で実現することを目的とする。
【0062】
【課題を解決するための手段】
この課題を解決するために、本発明の信号符号化方法は、2つのチャンネルの信号をスペクトルデータに変換し、2つのチャンネルのスペクトルデータを、ミッドサイドステレオ符号化を用いて符号化する方法であって、2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)の相関を示す量cを(数1)で算出するステップと、相関を示す量cと閾値とを比較するステップと、比較の結果を用いて、ミッドサイドステレオ符号化のオン/オフを判定するステップと、を備えたことを特徴とする、または、2つのチャンネルの信号をスペクトルデータに変換し、前記2つのチャンネルのスペクトルデータを、インテンシティステレオ符号化を用いて符号化する方法であって、2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)の相関を示す量cを(数2)で算出するステップと、相関を示す量cと閾値とを比較するステップと、比較の結果を用いて、インテンシティステレオ符号化のオン/オフを判定するステップと、を備えたことを特徴とするものである。
【0063】
これにより、ジョイントステレオ符号化のオン/オフの制御を精度よく行うことができるので、符号化効率が高まり音質を改善することができる。
【0064】
【発明の実施の形態】
本発明の請求項1に記載の発明は、2つのチャンネルの信号をスペクトルデータに変換し、前記2つのチャンネルのスペクトルデータを、ミッドサイドステレオ符号化を用いて符号化する方法であって、2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)の相関を示す量cを(数1)で算出するステップと、(ここで、fsはミッドサイドステレオ符号化のオン/オフを判定するバンドの開始スペクトル番号、feは前記バンドの終了スペクトル番号である。)前記相関を示す量cと閾値とを比較するステップと、前記比較の結果を用いて、ミッドサイドステレオ符号化のオン/オフを判定するステップと、を備えたことを特徴とする信号符号化方法である。
【0065】
また、請求項2に記載の発明は、前記請求項1に係る発明において、前記相関を示す量cと正の第1の閾値とを比較するステップと、前記相関を示す量cと負の第2の閾値とを比較するステップと、前記相関を示す量cが前記第1の閾値より大きい場合、あるいは第2の閾値より小さい場合には、ミッドサイドステレオ符号化をオンとし、それ以外の場合には、ミッドサイドステレオ符号化をオフとするステップと、を備えたことを特徴とする。
【0066】
また、請求項3に記載の発明は、前記請求項1に係る発明において、前記相関を示す量cと正の閾値とを比較するステップと、前記相関を示す量cが前記閾値より大きい場合には、ミッドサイドステレオ符号化をオンとし、前記相関を示す量cが前記閾値以下の場合には、ミッドサイドステレオ符号化をオフとするステップと、を備えたことを特徴とする。
【0067】
また、請求項4に記載の発明は、前記請求項1に係る発明において、前記相関を示す量cと負の閾値とを比較するステップと、前記相関を示す量cが前記閾値より小さい場合には、ミッドサイドステレオ符号化をオンとし、前記相関を示す量cが前記閾値以上の場合には、ミッドサイドステレオ符号化をオフとするステップと、を備えたことを特徴とする。
【0068】
また、請求項5に記載の発明は、2つのチャンネルの信号をスペクトルデータに変換し、前記2つのチャンネルのスペクトルデータを、インテンシティステレオ符号化を用いて符号化する方法であって、2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)の相関を示す量cを(数2)で算出するステップと、(ここで、fsはインテンシティステレオ符号化のオン/オフを判定するバンドの開始スペクトル番号、feは前記バンドの終了スペクトル番号、sは(数3)により算出される変数である。)前記相関を示す量cと閾値とを比較するステップと、前記比較の結果を用いて、インテンシティステレオ符号化のオン/オフを判定するステップと、を備えたことを特徴とする信号符号化方法である。
【0069】
また、請求項6に記載の発明は、前記請求項5に係る発明において、前記相関を示す量cと正の第1の閾値とを比較するステップと、前記相関を示す量cと負の第2の閾値とを比較するステップと、前記相関を示す量cが前記第1の閾値より大きい場合、あるいは第2の閾値より小さい場合には、インテンシティステレオ符号化をオンとし、それ以外の場合には、インテンシティステレオ符号化をオフとするステップと、を備えたことを特徴とする。
【0070】
また、請求項7に記載の発明は、前記請求項5に係る発明において、前記相関を示す量cと正の閾値とを比較するステップと、前記相関を示す量cが前記閾値より大きい場合には、インテンシティステレオ符号化をオンとし、前記相関を示す量cが前記閾値以下の場合には、インテンシティステレオ符号化をオフとするステップと、を備えたことを特徴とする。
【0071】
また、請求項8に記載の発明は、前記請求項5に係る発明において、前記相関を示す量cと負の閾値とを比較するステップと、前記相関を示す量cが前記閾値より小さい場合には、インテンシティステレオ符号化をオンとし、前記相関を示す量cが前記閾値以上の場合には、インテンシティステレオ符号化をオフとするステップと、を備えたことを特徴とする。
【0072】
また、請求項9に記載の発明は、前記請求項1ないし8のいずれかに記載の信号符号化方法を、コンピュータまたはデジタルシグナルプロセッサに実行させるためのプログラムである。
【0073】
また、請求項10に記載の発明は、前記請求項1ないし8のいずれかに記載の信号符号化方法を、コンピュータまたはデジタルシグナルプロセッサに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体である。
【0074】
以下、本発明の実施の形態について、図面を参照しながら説明する。
【0075】
以下の説明では、最初に本発明の信号符号化方法による実施の形態に共通なポイントについてまとめて説明し、次に各実施の形態に関して固有の特徴的なポイントについて個々に説明する。
【0076】
図1は、本発明の実施の形態による信号符号化方法を実行するオーディオエンコーダの構成を示すブロック図である。図1に示すオーディオエンコーダは、フィルタバンク101、102、ステレオ符号化制御部110、インテンシティステレオデータ生成部120、ミッドサイドステレオデータ生成部130、量子化部140、符号化部150を含んで構成される。このように構成されたオーディオエンコーダの動作について説明する。
【0077】
入力された左チャンネル(Lch)の時間軸のオーディオ信号は、フィルタバンク101において所定の時間サンプルからなる時間ブロックに分割され、MDCT(Modified Discrete Cosine Transform,変形離散コサイン変換)により、スペクトルデータに変換される。次に、変換されたスペクトルデータは、人間の耳の臨界帯域特性を模擬したバンド単位にグループ化される。
【0078】
同様に、入力された右チャンネル(Rch)の時間軸のオーディオ信号は、フィルタバンク102において時間ブロックに分割され、MDCTによりスペクトルデータに変換される。次に、変換されたスペクトルデータはバンド単位にグループ化される。
【0079】
なお、本実施の形態では、オーディオ信号からスペクトルデータへの変換にMDCTを用いたが、DCT、ポリフェーズフィルタバンク、ハイブリッドフィルタバンク等の他の変換方法を用いてもよい。
【0080】
ステレオ符号化制御部110では、フィルタバンク101,102から出力される2つのチャンネルのスペクトルデータを比較して、ジョイントステレオ符号化(ミッドサイドステレオ符号化とインテンシティステレオ符号化)の制御を行う。本実施の形態では、ジョイントステレオ符号化の制御をバンド単位で行う。
【0081】
図2は、ステレオ符号化制御部110における制御手順を示すフローチャートである。
【0082】
ステップ201では、2つのチャンネルのスペクトルデータのインテンシティステレオ符号化としての相関を示す量に基づいて、インテンシティステレオ符号化のオン、オフの判定と、2つのチャンネルが同相か逆相かの判定(インテンシティステレオ符号化オンの場合)を行い、その結果を出力する。2つのチャンネルの相関が高く、インテンシティステレオ符号化に適している場合にインテンシティステレオ符号化をオンに判定する。
【0083】
ステップ202では、ステップ201のインテンシティステレオ符号化判定結果がオンであるか否かを判断して、オン(YES)の場合には処理を終了し、オフ(NO)の場合にはステップ203に進む。
【0084】
ステップ203では、2つのチャンネルのスペクトルデータのミッドサイドステレオ符号化としての相関を示す量に基づいて、ミッドサイド(MS)ステレオ符号化のオン、オフを判定し、結果を出力する。2つのチャンネルのスペクトルデータの相関が高く、MSステレオ符号化に適している場合に、MSステレオ符号化をオンに判定する。
【0085】
ステップ204では、ステップ203のMSステレオ符号化判定結果がオンであるか否かを判断して、オン(YES)の場合には処理を終了し、オフ(NO)の場合には、ステップ205に進む。
【0086】
ステップ205では、ステレオチャンネル(LR)個別符号化をオンとして、処理を終了する。
【0087】
以上のように、ステレオ符号化制御部110では、ジョイントステレオ符号化制御が必要なすべてのバンドに対して、図2に示した処理を行う。
【0088】
インテンシティステレオデータ生成部120では、ステレオ符号化制御部110からの判定結果に基づいて、インテンシティステレオ符号化オンのバンドに対しては、左チャンネルのインテンシティステレオ処理されたスペクトルデータと、左チャンネルに対する右チャンネルの指向性ゲイン(エネルギーの比)とを算出し、出力する。このとき、右チャンネルのスペクトルデータは零に設定される。なお、この零スペクトルデータは符号化データとしては伝送されない。また、インテンシティステレオ符号化オフのバンドに対しては、左右のチャンネルのスペクトルデータをそのまま出力する。
【0089】
左チャンネルのインテンシティステレオ処理されたスペクトルデータは、左チャンネルと右チャンネルのスペクトルデータの和(2つのチャンネルの位相関係が同相の場合)、あるいは差(2つのチャンネルの位相関係が逆相の場合)を、そのエネルギーが左チャンネルの元のエネルギーと等しくなるように補正して生成される。なお、信号に応じて、スペクトルデータの和と差を切り換えることができるのは、前述した2つのチャンネルの位相関係を示すフラグを符号化データとして伝送する場合である。
【0090】
ミッドサイドステレオデータ生成部130では、ステレオ符号化制御部110からの判定結果に基づいて、ミッドサイドステレオ符号化オンのバンドに対しては、ミッドサイドステレオ処理されたミッドスペクトルデータとサイドスペクトルデータを生成する。ミッドスペクトルデータMi(iはスペクトル番号)は左チャンネルと右チャンネルのスペクトルデータLiとRiの和を正規化した(数21)で生成され、左チャンネルのスペクトルデータとして出力される。また、サイドスペクトルデータSiは左チャンネルと右チャンネルのスペクトルデータの差を正規化した(数22)で生成され、右チャンネルのスペクトルデータとして出力される。
【0091】
【数21】
Figure 2004325633
【0092】
【数22】
Figure 2004325633
【0093】
インテンシティステレオ処理とミッドサイドステレオ処理を共に行わないバンドに対しては、左右のチャンネルの元のスペクトルデータがそのまま出力される。
【0094】
なお、インテンシティステレオ処理とミッドサイドステレオ処理とは排他的な関係にあり、一方の処理を選択すると他方の処理を選択することはできない。
【0095】
量子化部140では、ミッドサイドステレオデータ生成部130からのスペクトルデータを、バンド単位で、スペクトルデータのゲインを示すスケールファクタと、前記ゲインで正規化されたスペクトルデータとに分解して、量子化を行う。
【0096】
符号化部150では、量子化されたデータに対してハフマンコードによる可変長符号化を用いて符号化処理を行い、符号化データを生成し、出力する。
【0097】
量子化部140と符号化部150の処理は、符号化データに必要なビット数を利用可能なビット数以下に調整するため、繰り返して行われる。
【0098】
以下、本発明の特徴的なポイントであるジョイントステレオ符号化の制御方法に関して、各実施の形態毎に説明する。
【0099】
(実施の形態1)
図3は、本発明の実施の形態1による信号符号化方法におけるミッドサイドステレオ符号化制御方法のステップを示すフローチャートであり、図2に示したステップ203のミッドサイド(MS)ステレオ符号化判定の詳細を示すフローチャートである。
【0100】
図3において、ステップ301、302、303で、2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)の、ミッドサイドステレオ符号化としての相関を示す量cを算出する。
【0101】
まず、ステップ301で、LiとRiの積の総和aを(数23)で算出する。
【0102】
【数23】
Figure 2004325633
【0103】
ここで、fsとfeは、ミッドサイドステレオ符号化のオン、オフ判定を行うバンドの、それぞれ開始スペクトル番号と終了スペクトル番号である。
【0104】
ステップ302で、Liの二乗とRiの二乗との差の総和の絶対値bを(数24)で算出する。
【0105】
【数24】
Figure 2004325633
【0106】
ステップ303で、2つのチャンネルのスペクトルデータの相関を示す量cを(数25)で算出する。
【0107】
【数25】
Figure 2004325633
【0108】
以上の(数23)、(数24)、(数25)から求められる2つのチャンネルのスペクトルデータの相関を示す量cを用いることにより、正の相関と負の相関を識別することができる。すなわち、cが正の場合には正の相関があることを示し、cが負の場合には負の相関があることを示す。
【0109】
ステップ304で、cを正の第1の閾値thr1及び負の第2の閾値thr2と各々比較し、cが第1の閾値より大きい場合、あるいは第2の閾値より小さい場合(YES)には、ステップ305でミッドサイド(MS)ステレオ符号化をオンとし、そうでない場合(NO)には、ステップ306でMSステレオ符号化オフとする。なお、図3のステップ304に示す∨は、論理和を表す記号である。
【0110】
図7に示す4つの事例に対して、上記の(数23)、(数24)、(数25)を使って、相関を示す量cを算出すると、事例1では、c=∞となり、事例2では、c=0となり、事例3では、c=1/2となり、事例4では、c=1/2となる。
【0111】
以上のように、実施の形態1では、MSステレオ符号化判定に用いる相関を示す量cの値が、事例3と事例4との場合で一致している。すなわち、実施の形態1では、従来例において前述した課題が解決されている。
【0112】
実施の形態1で、例えば、thr1=1/2、thr2=−1/2に設定すれば、事例1ではMSステレオ符号化オン、事例2、事例3、事例4ではMSステレオ符号化オフと判定される。
【0113】
ここで、2つのチャンネルのスペクトルデータの相関を示す量cの意味について説明する。スペクトルデータLiとRi(ただし、fs≦i≦fe)を、Li,Riそれぞれを座標軸とするLi−Ri座標系上にプロットした場合について考える。次に、前記座標系の原点を通り、Li軸と角度αをなす直線で、前記プロットしたスペクトルデータ(Li,Ri)との距離の2乗和を最小にする直線を考える。角度αはLiとRiの相関の度合いを示す。例えば、α=π/4で強い正の相関、α=0で相関なし、α=−π/4で強い負の相関を表す。したがって、上記距離の2乗和を最小にする直線の角度αは、(Li,Ri)の分布を考慮した相関を示す量である。
【0114】
(Li,Ri)と直線との距離Eiは(数26)で求められるので、距離の2乗和Fは(数27)で求められる。
【0115】
【数26】
Figure 2004325633
【0116】
【数27】
Figure 2004325633
【0117】
そして、距離の2乗和Fを最小にする角度αは、(数28)を満足する。
【0118】
【数28】
Figure 2004325633
【0119】
(数27)と(数28)とから(数29)が求められる。
【0120】
【数29】
Figure 2004325633
【0121】
(数29)で、右辺の分母の絶対値をとることにより、(数30)が求められる。
【0122】
【数30】
Figure 2004325633
【0123】
(数23)、(数24)、(数25)、(数30)から(数31)が求められる。
【0124】
【数31】
Figure 2004325633
【0125】
(数31)に示すように、2つのチャンネルのスペクトルデータの相関を示す量cは、(Li,Ri)の分布を考慮した相関を示す直線の角度αと、1対1に対応している。
【0126】
以上のように本実施の形態によれば、図3に示したように、(Li,Ri)の分布を考慮した精度の高い相関を示す量cをミッドサイドステレオ符号化の制御に用いることにより、精度の高い制御を行うことができる。
【0127】
なお、本実施の形態において、ステップ304の分岐条件に等号を含むようにしてもよい。すなわち、ステップ304での分岐条件(c>thr1)∨(c<thr2)を(c≧thr1)∨(c≦thr2)としてもよい。
【0128】
なお、ミッドサイドステレオ符号化では、スペクトルデータの和と差とを正規化したものを共に符号化するので、実施の形態1では、正の相関があっても負の相関があってもミッドサイドステレオ符号化オンと判定した。しかしながら、例えば左右のチャンネルの割り当てビット数に制約があり、正の相関がある場合にのみ、すなわち相関を示す量cが正の閾値より大きい場合にのみ、ミッドサイドステレオ符号化をオンとするようににしてもよい。同様に、負の相関がある場合にのみ、すなわち相関を示す量cが負の閾値より小さい場合にのみミッドサイドステレオ符号化をオンとするようににしてもよい。
【0129】
以上のように実施の形態1では、図3に示すとおり、ステップ301、302、303で2つのチャンネルのスペクトルデータの相関を示す量を精度よく算出し、ステップ304で前記相関を示す量と閾値とを比較して、ミッドサイドステレオ符号化のオン、オフの判定を精度よく行うことにより、ミッドサイドステレオ符号化の音質を改善したステレオ符号化データを生成することができる。
【0130】
(実施の形態2)
図4は、本発明の実施の形態2による信号符号化方法におけるインテンシティステレオ符号化制御方法のステップを示すフローチャートであり、図2に示したステップ201のインテンシティステレオ符号化判定の詳細を示すフローチャートである。
【0131】
実施の形態2のインテンシティステレオ符号化では、左右のチャンネルが同相であるか逆相であるかを示すフラグを、符号化データとして伝送し、左右のチャンネルが同相である場合には、スペクトルデータの和を、逆相である場合にはスペクトルデータの差を、ゲイン補正して符号化する。
【0132】
図4に示すステップ401、402、403、404で、2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)のインテンシティステレオ符号化としての相関を示す量cを算出する。
【0133】
まず、ステップ401で左チャンネルのエネルギーに対する右チャンネルのエネルギーの比の平方根sを(数32)で算出する。
【0134】
【数32】
Figure 2004325633
【0135】
ここで、fsとfeは、インテンシティステレオ符号化のオン、オフ判定を行うバンドの、それぞれ開始スペクトル番号と終了スペクトル番号である。
【0136】
次に、ステップ402で、Liをsで補正した(Li/s)とRiの積の総和aを(数33)で算出する。Liを補正するのは、インテンシティステレオ符号化では、復号化時の右チャンネルのスペクトルデータは、インテンシティステレオ処理された左チャンネルのスペクトルデータをsで割ることによって算出するからである。
【0137】
【数33】
Figure 2004325633
【0138】
ステップ403で、Liをsで補正した(Li/s)の二乗とRiの二乗との差の総和の絶対値bを(数34)で算出する。
【0139】
【数34】
Figure 2004325633
【0140】
そして、ステップ404で、2つのチャンネルのスペクトルデータのインテンシティステレオ符号化としての相関を示す量cを(数35)で算出する。
【0141】
【数35】
Figure 2004325633
【0142】
インテンシティステレオ符号化では、ミッドサイドステレオ符号化とは異なり、2つのチャンネルのスペクトルデータの和あるいは差(正確には和あるいは差をゲイン補正したもの)の一方のみを符号化するので、正の相関と負の相関を識別する必要がある。しかしながら、特許文献1に記載された従来例では、正の相関と負の相関を識別することができなかった。実施の形態2では、正の相関と負の相関を識別することができる。すなわち、2つのチャンネルの相関を示す量cが正の場合には正の相関があることを示し、cが負の場合には負の相関があることを示す。実施の形態2では、正の相関と負の相関とを識別することができるので、精度の高いインテンシティステレオ符号化の制御を行うことができる。
【0143】
ステップ405で、相関を示す量cを、正の第1の閾値thr1と負の第2の閾値thr2のそれぞれと比較し、cが第1の閾値より大きい場合、あるいは第2の閾値より小さい場合(YES)には、ステップ406でインテンシティステレオ符号化をオンとし、そうでない場合(NO)には、ステップ407でインテンシティステレオ符号化オフとする。
【0144】
なお、ステップ405の分岐条件に等号を含むようにしてもよい。すなわち、ステップ405での分岐条件(c>thr1)∨(c<thr2)を(c≧thr1)∨(c≦thr2)としてもよい。
【0145】
次に、インテンシティステレオ符号化オンの場合には、相関を示す量cの値に基づいて、左右のチャンネルの位相関係が同相であるか逆相であるかを判定する。すなわち、ステップ408でcが零以上であるか否かを判断し、cが零以上である場合(YES)にはステップ410で2つのチャンネルは同相(LR同相)、また、cが負の場合(NO)にはステップ409で2つのチャンネルは逆相(LR逆相)、と判定して結果を出力する。
【0146】
以上のように実施の形態2では、ステップ401、402、403、404で2つのチャンネルのスペクトルデータのインテンシティステレオ符号化としての相関を示す量を精度よく算出し、ステップ405で前記相関を示す量と閾値とを比較して、インテンシティステレオ符号化のオン、オフの判定を行い、またステップ408で相関を示す量と零とを比較して、2つのチャンネルが同相であるか逆相であるか、の判定を行うことにより、インテンシティステレオ符号化の音質を改善したステレオ符号化データを生成することができる。
【0147】
(実施の形態3)
図5は、本発明の実施の形態3による信号符号化方法におけるインテンシティステレオ符号化制御方法のステップを示すフローチャートであり、図2に示すステップ201のインテンシティステレオ符号化判定の詳細を示すフローチャートである。
【0148】
実施の形態2と異なり、実施の形態3のインテンシティステレオ符号化では、左右のチャンネルが同相であるか、逆相であるかを示すフラグを、符号化データとして伝送しない。実施の形態3では、スペクトルデータとして、左右のチャンネルのスペクトルデータの和をゲイン補正したものが符号化される。
【0149】
図5において、ステップ501、502、503、504で、2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)のインテンシティステレオ符号化としての相関を示す量cを算出する。図5のステップ501、502、503、504は、それぞれ図4のステップ401、402、403、404と同一なので、説明を省略する。
【0150】
ステップ505で、相関を示す量cを、正の閾値thrと比較し、cが閾値より大きい場合(YES)には、ステップ506でインテンシティステレオ符号化をオンとし、そうでない場合(NO)には、ステップ507でインテンシティステレオ符号化オフとする。
【0151】
なお、ステップ505の分岐条件に等号を含むようにしてもよい。すなわち、ステップ505での分岐条件c>thrをc≧thrとしてもよい。
【0152】
また、c(=a/b)とthrを比較する代わりに、aとb×thrを比較するようにしてもよい。このようにすることにより、ステップ504で相関を示す量cの算出時に必要であったa÷bの割り算が不要となる。
【0153】
このように実施の形態3では、2つのチャンネルに正の相関がある場合にのみ、インテンシティステレオ符号化をオンにし、左右のチャンネルのスペクトルデータの和をゲイン補正して符号化する。これにより、2つのチャンネルに負の相関がある場合にインテンシティステレオ符号化をオンすることによる音質劣化を防止することができる。
【0154】
以上のように実施の形態3では、ステップ501、502、503、504で2つのチャンネルのスペクトルデータのインテンシティステレオ符号化としての相関を示す量を精度よく算出し、ステップ505で前記相関を示す量と閾値とを比較して、正の相関がある場合にインテンシティステレオ符号化をオンと判定することにより、精度の高いインテンシティステレオ符号化制御を行い、インテンシティステレオ符号化の音質を改善したステレオ符号化データを生成することができる。
【0155】
なお、実施の形態3では、2つのチャンネルに正の相関があることが多いとして、インテンシティステレオ符号化のスペクトルデータに、左右のチャンネルのスペクトルデータの和をゲイン補正したものを用いたが、2つのチャンネルに負の相関があることが多い場合には、左右のチャンネルのスペクトルデータの差をゲイン補正したものを用いるようにしてもよい。
【0156】
なお、上記実施の各形態では、本発明の信号符号化方法をステレオオーディオ信号に適用する例を示したが、ステレオ画像信号に適用することも可能である。
【0157】
また、上記各実施の形態における信号符号化方法は、コンピュータまたはデジタルシグナルプロセッサに実行させるためのプログラムとして実現することができ、これをコンピュータ読み取り可能な記録媒体に記録してもよい。
【0158】
【発明の効果】
以上のように本発明によれば、ジョイントステレオ符号化(ミッドサイドステレオ符号化、あるいはインテンシティステレオ符号化)のオン、オフの制御を高精度に行うことができる。これにより、ジョイントステレオ符号化の音質を改善したステレオ符号化データを生成することができる。
【0159】
また、本発明によれば、比較的小さい処理量で、ジョイントステレオ符号化の音質を改善したステレオ符号化データを生成することができる。また、本発明は、ジョイントステレオ符号化を用いる多くの符号化方式に適用可能で、広範囲に使用することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態による信号符号化方法を実施するオーディオエンコーダの構成を示すブロック図
【図2】同オーディオエンコーダにおけるステレオ符号化制御部の制御手順を示すフローチャート
【図3】本発明の実施の形態1による信号符号化方法におけるミッドサイドステレオ符号化制御方法の処理ステップを示すフローチャート
【図4】同実施の形態2による信号符号化方法におけるインテンシティステレオ符号化制御方法の処理ステップを示すフローチャート
【図5】同実施の形態3による信号符号化方法におけるインテンシティステレオ符号化制御方法の処理ステップを示すフローチャート
【図6】従来の信号符号化方法におけるミッドサイドステレオ符号化制御方法の処理ステップを示すフローチャート
【図7】LR個別符号化とMSステレオ符号化のスペクトルデータの事例を示す概念図
【符号の説明】
101,102 フィルタバンク
110 ステレオ符号化制御部
120 インテンシティステレオデータ生成部
130 ミッドサイドステレオデータ生成部
140 量子化部
150 符号化部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method for converting a stereo signal into spectral data and performing high efficiency coding on the spectral data using joint stereo coding.
[0002]
[Prior art]
In recent years, a signal encoding method has been proposed in which a bit rate is reduced by converting a stereo signal into spectral data and encoding the spectral data using joint stereo encoding.
[0003]
As high-efficiency audio coding standards that employ this joint stereo coding, MPEG (Motion Picture Expert Group) -1 audio, MPEG-2 BC (backwards-compatible) audio, MPEG-2 AAC (Advanced Audio Coding), and the like are known. Have been.
[0004]
Joint stereo coding is a coding method for reducing the bit rate and improving the coding efficiency by utilizing the correlation between the left and right channels. In particular, mid-side stereo coding and intensity stereo coding are used. It has been known.
[0005]
Mid-side stereo coding normalizes and encodes the sum (mid or center) and difference (side) of the left and right channels when the left and right channels have correlation, instead of encoding the left and right channels individually. How to When the correlation between the left and right channels is large, the energy difference between the obtained sum and the difference is large, and the amount of information is biased to one channel, so the number of bits required for coding is reduced and coding efficiency is improved. can do. In addition, sound quality can be improved by allocating the reduced bits to other data that contributes to sound quality.
[0006]
Intensity stereo coding is a coding method that utilizes the fact that the spectrum envelope is more important than the fine structure of the spectrum at a predetermined frequency (usually 3 kHz to 6 kHz) or higher. That is, above the predetermined frequency, only the sum of the spectral data of the left and right channels is encoded as the spectral data, and the envelope information is individually encoded in the left and right channels, thereby reducing the data amount of the spectral data by half. , To improve the coding efficiency.
[0007]
As the envelope information, the energy ratio between the sum spectrum data and the spectrum data of each channel is sent. Intensity stereo coding can achieve a lower bit rate than mid-side stereo coding. However, since the fine structure of the spectrum cannot be reproduced, a three-dimensional acoustic feeling such as a feeling of spreading and a feeling of stereo may be deteriorated.
[0008]
As the intensity stereo encoding method, in addition to the above method, a flag indicating whether the left and right channels are in phase or in opposite phases is transmitted as encoded data, and if the left and right channels are in phase, the spectrum is Intensity stereo encoding methods have also been proposed in which sound quality is improved by encoding the sum of data and the difference when the sum is in the opposite phase. This method has been adopted in MPEG-2 AAC.
[0009]
In order to reduce the bit rate and improve the coding efficiency by such joint stereo coding, the joint stereo coding on / off is accurately controlled according to the correlation between the spectral data of the left and right channels. It is important to.
[0010]
As a conventional method for controlling on / off of joint stereo coding, for example, a method described in Patent Literature 1 or Patent Literature 2 is known.
[0011]
FIG. 6 is a flowchart showing steps based on a conventional mid-side stereo coding (described as center / side coding in Patent Document 1) control method described in Patent Document 1.
[0012]
In the figure, in step 601, a measure SD of a spectrum interval between signals from left and right stereo channels is calculated by (Equation 4).
[0013]
(Equation 4)
Figure 2004325633
[0014]
Here, Li and Ri are the spectrum data of the left channel and the right channel, respectively, and the subscript i is the spectrum number. Also, fs and fe (described as f1 and f2-1 in Patent Document 1) are the start spectrum number and the end spectrum number of the band for which the determination of the mid-side stereo coding is on or off, respectively.
[0015]
In step 602, the spectral energy SE of the stereo signal is calculated by (Equation 5).
[0016]
(Equation 5)
Figure 2004325633
[0017]
In step 603, a quantity d indicating a measure of the spectrum interval between the left and right stereo channel signals is calculated by (Equation 6).
[0018]
(Equation 6)
Figure 2004325633
[0019]
In step 604, d is compared with a threshold thr. If d is smaller than the threshold, mid-side stereo (MS) coding is turned on in step 605; otherwise, MS stereo coding is turned off in step 606. And When the MS stereo coding is off, the left and right channels are individually coded (hereinafter referred to as stereo channel individual coding or LR individual coding for short).
[0020]
The method described in Patent Document 2 calculates a masking threshold based on an auditory masking model, calculates the number of bits required for joint stereo coding and stereo channel individual coding, and compares the two. , The encoding method with the smaller number of bits is selected.
[0021]
[Patent Document 1]
Japanese Patent Publication No. 7-501190
[Patent Document 2]
Japanese Patent Publication No. Hei 8-501666
[0022]
[Problems to be solved by the invention]
However, in the conventional coding method described in Patent Literature 1, the quantity indicating the scale of the spectrum interval between the left and right channels used for controlling the on / off of the joint stereo coding determination appropriately considers the distribution of the spectrum data. Since it is not a measure, there is a problem that the control of joint stereo coding becomes inappropriate and the sound quality may be degraded.
[0023]
Hereinafter, this problem will be described in detail using an actual example.
[0024]
FIG. 7 shows four cases of spectral data of stereo channel (LR) individual coding and mid-side (MS) stereo coding. In all cases, the sum of the energies of the left and right channels is assumed to be constant.
[0025]
In FIG. 7, Li and Ri are the spectrum data of the left channel and the right channel, respectively, and i is the spectrum number of each spectrum data. In the example of FIG. 7, for the sake of simplicity, the number of spectra constituting a band for performing mid-side stereo coding determination is two. Therefore, the value of i is set to 0 or 1. In the LR individual encoding, Li and Ri are encoded as spectrum data. In MS stereo coding, instead of Li and Ri, the sum Mi and difference Si of Li and Ri are normalized and coded as spectral data. In the example of FIG. 7, Mi and Si are calculated by (Equation 7) and (Equation 8), respectively.
[0026]
(Equation 7)
Figure 2004325633
[0027]
(Equation 8)
Figure 2004325633
[0028]
Hereinafter, the four cases shown in FIG. 7 will be sequentially described.
[0029]
(1) Case 1
Case 1 is a case where the values of Li and Ri are all the same, and the value of (Equation 9) is used.
[0030]
(Equation 9)
Figure 2004325633
[0031]
Then, Mi and Si are calculated from (Equation 7) and (Equation 8) as in (Equation 10).
[0032]
(Equation 10)
Figure 2004325633
[0033]
Then, the quantity d indicating the scale of the spectrum interval between the left and right stereo channel signals is calculated as (Equation 11) from (Equation 4), (Equation 5), and (Equation 6).
[0034]
(Equation 11)
Figure 2004325633
[0035]
In case 1, as shown in FIG. 7, the MS stereo coding has a greater amount of bias in the amount of information than the LR individual coding, so that the coding efficiency is better. That is, case 1 is a typical case in which MS stereo coding should be determined to be on.
[0036]
(2) Case 2
Case 2 is a case where there is a signal only in the left channel, and Li and Ri have the values of (Equation 12).
[0037]
(Equation 12)
Figure 2004325633
[0038]
Then, Mi and Si are calculated as (Equation 13) from (Equation 7) and (Equation 8).
[0039]
(Equation 13)
Figure 2004325633
[0040]
The quantity d indicating the measure of the spectral interval between the left and right stereo channel signals is calculated as (Equation 14) from (Equation 4), (Equation 5), and (Equation 6).
[0041]
[Equation 14]
Figure 2004325633
[0042]
In case 2, as shown in FIG. 7, the LR individual coding has a larger amount of bias in the amount of information than the MS stereo coding, so that the coding efficiency is better. That is, case 2 is a typical case in which MS stereo coding should be determined to be off. This is also supported by the fact that Case 2 is obtained by exchanging Li and Mi and exchanging Ri and Si in Case 1.
[0043]
(3) Case 3
Next, Case 3 is a case where Li and Ri are set to the value of (Equation 15).
[0044]
(Equation 15)
Figure 2004325633
[0045]
Then, Mi and Si are calculated as (Equation 16) from (Equation 7) and (Equation 8).
[0046]
(Equation 16)
Figure 2004325633
[0047]
The quantity d indicating the measure of the spectrum interval between the left and right stereo channel signals is calculated as (Equation 17) from (Equation 4), (Equation 5), and (Equation 6).
[0048]
[Equation 17]
Figure 2004325633
[0049]
In Case 3, the values of Li and Mi and the values of Ri and Si are the same. Therefore, this is a case where the coding efficiency of LR individual coding and that of MS stereo coding are the same.
[0050]
(4) Case 4
Case 4 is a case where Li and Ri are set to the value of (Equation 18).
[0051]
(Equation 18)
Figure 2004325633
[0052]
Then, Mi and Si are calculated as (Equation 19) from (Equation 7) and (Equation 8).
[0053]
[Equation 19]
Figure 2004325633
[0054]
The quantity d indicating the measure of the spectrum interval between the left and right stereo channel signals is calculated as (Equation 20) from (Equation 4), (Equation 5), and (Equation 6).
[0055]
(Equation 20)
Figure 2004325633
[0056]
In Case 4, since L0 = M1, L1 = M0, R0 = S1, and R1 = S0, the coding efficiency of LR individual coding and MS stereo coding is the same as in Case 3. Should. However, the value of the quantity d indicating the measure of the spectral spacing between the left and right stereo channel signals differs between Case 3 given by (Equation 17) and Case 4 given by (Equation 20). That is, in the conventional method described in Patent Literature 1, the amount indicating the measure of the spectral interval between the left and right stereo channel signals may have different values when they should originally be the same value. As a result, there has been a problem that the control of turning on and off the MS stereo coding becomes inappropriate and the sound quality may be deteriorated.
[0057]
Further, according to the conventional method described in Patent Document 1, it is not possible to distinguish between a positive correlation and a negative correlation of spectral data of two channels in intensity stereo coding. There is a problem that the off control becomes inappropriate and the sound quality may be degraded.
[0058]
In the conventional method described in Patent Document 2, a masking threshold is calculated based on an auditory masking model, and the number of bits in two cases, joint stereo coding and stereo channel individual coding, is calculated using the masking threshold. Since it has to be calculated, there is a problem that the processing amount is large.
[0059]
SUMMARY OF THE INVENTION The present invention solves the above-mentioned problem, and performs high-precision control of on / off of joint stereo coding (midside stereo coding or intensity stereo coding) to improve stereo quality. It is an object of the present invention to provide a signal encoding method capable of generating encoded data.
[0060]
It is another object of the present invention to provide a signal encoding method capable of distinguishing between a positive correlation and a negative correlation of spectral data of two channels and performing on / off control of joint stereo encoding with high accuracy. And
[0061]
It is another object of the present invention to realize highly accurate control of joint stereo coding with a relatively small processing amount.
[0062]
[Means for Solving the Problems]
In order to solve this problem, a signal encoding method according to the present invention is a method of converting a signal of two channels into spectral data and encoding the spectral data of two channels using mid-side stereo encoding. A step of calculating an amount c indicating the correlation between the spectral data Li and Ri (i is a spectrum number) of the two channels by (Equation 1); a step of comparing the amount c indicating the correlation with a threshold; Determining the on / off of the mid-side stereo coding using the result of the above, or converting a signal of two channels into spectrum data, A method of encoding data using intensity stereo encoding, comprising spectral data Li and Ri of two channels. i is a spectrum number), a step of calculating a quantity c indicating a correlation by (Equation 2), a step of comparing the quantity c indicating a correlation with a threshold, and turning on intensity stereo coding using the result of the comparison. / Off determining step.
[0063]
As a result, the on / off control of the joint stereo coding can be accurately performed, so that the coding efficiency is improved and the sound quality can be improved.
[0064]
BEST MODE FOR CARRYING OUT THE INVENTION
The invention according to claim 1 of the present invention is a method of converting signals of two channels into spectral data and encoding the spectral data of the two channels using mid-side stereo coding. Calculating a quantity c indicating the correlation between the spectral data Li and Ri (i is a spectrum number) of one channel by (Equation 1); (where fs is a band for determining on / off of mid-side stereo coding) And fe is the end spectrum number of the band.) Comparing the quantity c indicating the correlation with a threshold value, and using the result of the comparison to turn on / off the mid-side stereo coding. A signal encoding method.
[0065]
The invention according to claim 2 is the invention according to claim 1, wherein the step of comparing the amount c indicating the correlation and a first positive threshold value includes the step of comparing the amount c indicating the correlation and the negative Comparing with the threshold value of 2 if the quantity c indicating the correlation is larger than the first threshold value or smaller than the second threshold value, the mid-side stereo coding is turned on; Turning off the mid-side stereo coding.
[0066]
According to a third aspect of the present invention, in the first aspect of the present invention, the step of comparing the amount c indicating the correlation with a positive threshold value includes the step of: Turning on the mid-side stereo coding, and turning off the mid-side stereo coding when the amount c indicating the correlation is equal to or less than the threshold value.
[0067]
According to a fourth aspect of the present invention, in the first aspect of the present invention, the step of comparing the amount c indicating the correlation with a negative threshold value is performed when the amount c indicating the correlation is smaller than the threshold value. Turning on the mid-side stereo coding, and turning off the mid-side stereo coding when the correlation amount c is equal to or larger than the threshold value.
[0068]
According to a fifth aspect of the present invention, there is provided a method of converting signals of two channels into spectrum data and coding the spectrum data of the two channels using intensity stereo coding. Calculating the quantity c indicating the correlation between the channel spectral data Li and Ri (i is the spectrum number) by (Equation 2); (where fs is the band of the band for determining whether the intensity stereo coding is on / off) The start spectrum number, fe is the end spectrum number of the band, and s is a variable calculated by (Equation 3).) The step of comparing the quantity c indicating the correlation with a threshold value, and using the result of the comparison And determining whether the intensity stereo coding is on or off.
[0069]
According to a sixth aspect of the present invention, in the invention according to the fifth aspect, the step of comparing the amount c indicating the correlation with a first positive threshold value includes the step of comparing the amount c indicating the correlation with the negative first value. Comparing with the threshold value of 2 if the quantity c indicating the correlation is larger than the first threshold value or smaller than the second threshold value, the intensity stereo coding is turned on; otherwise, Turning off intensity stereo coding.
[0070]
According to a seventh aspect of the present invention, in the invention according to the fifth aspect, the step of comparing the quantity c indicating the correlation with a positive threshold value includes the step of: Turning on the intensity stereo coding, and turning off the intensity stereo coding when the amount c indicating the correlation is equal to or less than the threshold value.
[0071]
According to an eighth aspect of the present invention, in the invention according to the fifth aspect, the step of comparing the amount c indicating the correlation with a negative threshold value includes the step of comparing the amount c indicating the correlation is smaller than the threshold value. Turning on the intensity stereo coding, and turning off the intensity stereo coding when the correlation amount c is equal to or larger than the threshold value.
[0072]
According to a ninth aspect of the present invention, there is provided a program for causing a computer or a digital signal processor to execute the signal encoding method according to any one of the first to eighth aspects.
[0073]
According to a tenth aspect of the present invention, there is provided a computer-readable recording medium storing a program for causing a computer or a digital signal processor to execute the signal encoding method according to any one of the first to eighth aspects. is there.
[0074]
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0075]
In the following description, first, points common to the embodiments according to the signal encoding method of the present invention will be collectively described, and then characteristic points unique to each embodiment will be individually described.
[0076]
FIG. 1 is a block diagram illustrating a configuration of an audio encoder that executes a signal encoding method according to an embodiment of the present invention. The audio encoder shown in FIG. 1 includes filter banks 101 and 102, a stereo encoding control unit 110, an intensity stereo data generation unit 120, a mid-side stereo data generation unit 130, a quantization unit 140, and an encoding unit 150. Is done. The operation of the audio encoder configured as described above will be described.
[0077]
The input audio signal on the time axis of the left channel (Lch) is divided into time blocks composed of predetermined time samples in the filter bank 101, and is converted into spectrum data by MDCT (Modified Discrete Cosine Transform). Is done. Next, the converted spectral data is grouped into band units simulating the critical band characteristics of the human ear.
[0078]
Similarly, the input right-channel (Rch) audio signal on the time axis is divided into time blocks in the filter bank 102, and is converted into spectrum data by MDCT. Next, the converted spectral data is grouped in band units.
[0079]
Note that, in the present embodiment, MDCT is used to convert audio signals into spectral data, but other conversion methods such as DCT, polyphase filter bank, and hybrid filter bank may be used.
[0080]
The stereo coding control unit 110 controls the joint stereo coding (midside stereo coding and intensity stereo coding) by comparing the spectral data of the two channels output from the filter banks 101 and 102. In the present embodiment, joint stereo coding is controlled in band units.
[0081]
FIG. 2 is a flowchart showing a control procedure in stereo encoding control section 110.
[0082]
In step 201, on / off determination of intensity stereo coding and determination of whether two channels are in phase or out of phase based on the amount indicating the correlation as intensity stereo coding of the spectral data of the two channels. (When intensity stereo coding is on) and output the result. If the correlation between the two channels is high and is suitable for intensity stereo coding, the intensity stereo coding is determined to be on.
[0083]
In step 202, it is determined whether or not the intensity stereo coding determination result in step 201 is on. If the result is on (YES), the process ends. If the result is off (NO), the process returns to step 203. move on.
[0084]
In step 203, on / off of the mid-side (MS) stereo coding is determined based on the amount indicating the correlation of the spectral data of the two channels as the mid-side stereo coding, and the result is output. If the correlation between the spectral data of the two channels is high and suitable for MS stereo coding, MS stereo coding is determined to be ON.
[0085]
In step 204, it is determined whether or not the MS stereo coding determination result in step 203 is on. If the result is on (YES), the process ends. If it is off (NO), the process returns to step 205. move on.
[0086]
In step 205, the stereo channel (LR) individual encoding is turned on, and the process ends.
[0087]
As described above, stereo encoding control section 110 performs the processing shown in FIG. 2 on all bands that require joint stereo encoding control.
[0088]
In the intensity stereo data generation unit 120, based on the determination result from the stereo encoding control unit 110, for the band in which the intensity stereo encoding is ON, the left-channel intensity stereo processed spectrum data and the left The directivity gain (energy ratio) of the right channel with respect to the channel is calculated and output. At this time, the spectrum data of the right channel is set to zero. Note that this zero spectrum data is not transmitted as encoded data. In addition, the spectrum data of the left and right channels is output as it is for the band in which the intensity stereo coding is off.
[0089]
The spectral data of the left channel subjected to intensity stereo processing is the sum of the spectral data of the left channel and the spectral data of the right channel (when the phase relationship between the two channels is in phase) or the difference (when the phase relationship between the two channels is out of phase) ) Is generated with its energy corrected to be equal to the original energy of the left channel. The sum and difference of the spectrum data can be switched according to the signal when the flag indicating the phase relationship between the two channels is transmitted as encoded data.
[0090]
The mid-side stereo data generating unit 130, based on the determination result from the stereo coding control unit 110, applies mid-side stereo-processed mid-spectral data and side-spectrum data to the band of the mid-side stereo coding ON. Generate. The mid-spectrum data Mi (i is a spectrum number) is generated by normalizing the sum of the spectrum data Li and Ri of the left channel and the right channel (Equation 21), and is output as spectrum data of the left channel. Further, the side spectrum data Si is generated by normalizing the difference between the spectrum data of the left channel and the spectrum data of the right channel (Equation 22), and is output as the spectrum data of the right channel.
[0091]
(Equation 21)
Figure 2004325633
[0092]
(Equation 22)
Figure 2004325633
[0093]
For bands where neither intensity stereo processing nor mid-side stereo processing is performed, the original spectral data of the left and right channels is output as it is.
[0094]
Note that the intensity stereo processing and the mid-side stereo processing have an exclusive relationship, and if one processing is selected, the other processing cannot be selected.
[0095]
The quantization unit 140 decomposes the spectrum data from the mid-side stereo data generation unit 130 into a scale factor indicating a gain of the spectrum data and a spectrum data normalized by the gain in band units, and performs quantization. I do.
[0096]
The encoding unit 150 performs an encoding process on the quantized data by using variable length encoding based on Huffman code, and generates and outputs encoded data.
[0097]
The processes of the quantization unit 140 and the encoding unit 150 are repeatedly performed in order to adjust the number of bits necessary for the encoded data to the number of usable bits or less.
[0098]
Hereinafter, a control method of joint stereo coding which is a characteristic point of the present invention will be described for each embodiment.
[0099]
(Embodiment 1)
FIG. 3 is a flowchart showing the steps of the mid-side stereo encoding control method in the signal encoding method according to the first embodiment of the present invention. The mid-side (MS) stereo encoding determination in step 203 shown in FIG. It is a flowchart which shows details.
[0100]
In FIG. 3, in steps 301, 302, and 303, a quantity c indicating the correlation between the spectral data Li and Ri (i is a spectrum number) of two channels as mid-side stereo coding is calculated.
[0101]
First, in step 301, the sum a of the products of Li and Ri is calculated by (Equation 23).
[0102]
[Equation 23]
Figure 2004325633
[0103]
Here, fs and fe are the start spectrum number and the end spectrum number of the band for which the mid-side stereo coding is to be turned on / off.
[0104]
In step 302, the absolute value b of the sum of the differences between the square of Li and the square of Ri is calculated by (Equation 24).
[0105]
(Equation 24)
Figure 2004325633
[0106]
In step 303, the quantity c indicating the correlation between the spectral data of the two channels is calculated by (Equation 25).
[0107]
(Equation 25)
Figure 2004325633
[0108]
By using the quantity c indicating the correlation between the spectral data of the two channels obtained from (Equation 23), (Equation 24), and (Equation 25), a positive correlation and a negative correlation can be identified. That is, when c is positive, it indicates that there is a positive correlation, and when c is negative, it indicates that there is a negative correlation.
[0109]
In step 304, c is compared with a first positive threshold thr1 and a second negative threshold thr2. If c is larger than the first threshold or smaller than the second threshold (YES), At step 305, mid-side (MS) stereo coding is turned on, otherwise (NO), at step 306, MS stereo coding is turned off. Note that ∨ shown in step 304 of FIG. 3 is a symbol representing a logical sum.
[0110]
For the four cases shown in FIG. 7, when the quantity c indicating the correlation is calculated using the above (Equation 23), (Equation 24), and (Equation 25), in the case 1, c = 、. In case 2, c = 0, in case 3, c = 1/2, and in case 4, c = 1/2.
[0111]
As described above, in the first embodiment, the value of the quantity c indicating the correlation used for MS stereo coding determination is the same in case 3 and case 4. That is, in the first embodiment, the problem described above in the conventional example is solved.
[0112]
In the first embodiment, if, for example, thr1 = 、 and thr2 = −2 are set, it is determined that MS stereo coding is on in case 1, and MS stereo coding is off in cases 2, 3, and 4. Is done.
[0113]
Here, the meaning of the quantity c indicating the correlation between the spectral data of the two channels will be described. Consider a case where spectral data Li and Ri (where fs ≦ i ≦ fe) are plotted on a Li-Ri coordinate system using Li and Ri as coordinate axes. Next, a straight line passing through the origin of the coordinate system and forming an angle α with the Li axis, which minimizes the sum of squares of the distances from the plotted spectral data (Li, Ri) is considered. The angle α indicates the degree of correlation between Li and Ri. For example, α = π / 4 indicates a strong positive correlation, α = 0 indicates no correlation, and α = −π / 4 indicates a strong negative correlation. Therefore, the angle α of the straight line that minimizes the sum of squares of the distance is an amount indicating the correlation in consideration of the distribution of (Li, Ri).
[0114]
Since the distance Ei between (Li, Ri) and the straight line is obtained by (Equation 26), the sum of squares F of the distance is obtained by (Equation 27).
[0115]
(Equation 26)
Figure 2004325633
[0116]
[Equation 27]
Figure 2004325633
[0117]
The angle α that minimizes the sum of squares F of the distance satisfies (Equation 28).
[0118]
[Equation 28]
Figure 2004325633
[0119]
(Equation 29) is obtained from (Equation 27) and (Equation 28).
[0120]
(Equation 29)
Figure 2004325633
[0121]
In Expression 29, Expression 30 is obtained by taking the absolute value of the denominator on the right side.
[0122]
[Equation 30]
Figure 2004325633
[0123]
(Equation 31) is obtained from (Equation 23), (Equation 24), (Equation 25), and (Equation 30).
[0124]
[Equation 31]
Figure 2004325633
[0125]
As shown in (Equation 31), the quantity c indicating the correlation between the spectral data of the two channels corresponds one-to-one with the angle α of the straight line indicating the correlation in consideration of the distribution of (Li, Ri). .
[0126]
As described above, according to the present embodiment, as shown in FIG. 3, by using the quantity c indicating a highly accurate correlation in consideration of the distribution of (Li, Ri) for control of midside stereo coding. , Highly accurate control can be performed.
[0127]
In the present embodiment, the branch condition in step 304 may include an equal sign. That is, the branch condition (c> thr1) ∨ (c <thr2) in step 304 may be set to (c ≧ thr1) ∨ (c ≦ thr2).
[0128]
In the mid-side stereo coding, the sum of the spectral data and the normalized difference are both coded. Therefore, in the first embodiment, even if there is a positive correlation or a negative correlation, It was determined that stereo coding was on. However, for example, the number of bits allocated to the left and right channels is limited, and the mid-side stereo coding is turned on only when there is a positive correlation, that is, only when the correlation amount c is larger than a positive threshold. May be used. Similarly, the mid-side stereo coding may be turned on only when there is a negative correlation, that is, only when the amount c indicating the correlation is smaller than the negative threshold.
[0129]
As described above, in the first embodiment, as shown in FIG. 3, the amounts indicating the correlation between the spectral data of the two channels are accurately calculated in steps 301, 302, and 303, and the amount indicating the correlation and the threshold value are determined in step 304. By comparing ON and OFF, it is possible to accurately determine whether mid-side stereo encoding is on or off, thereby generating stereo encoded data with improved sound quality of mid-side stereo encoding.
[0130]
(Embodiment 2)
FIG. 4 is a flowchart showing steps of the intensity stereo coding control method in the signal coding method according to the second embodiment of the present invention, and shows details of the intensity stereo coding determination in step 201 shown in FIG. It is a flowchart.
[0131]
In the intensity stereo coding according to the second embodiment, a flag indicating whether the left and right channels are in phase or out of phase is transmitted as coded data. If the left and right channels are in phase, spectrum data is transmitted. , And if the phases are in opposite phases, the difference between the spectral data is coded with gain correction.
[0132]
In steps 401, 402, 403, and 404 shown in FIG. 4, a quantity c indicating a correlation as intensity stereo coding between spectral data Li and Ri (i is a spectral number) of two channels is calculated.
[0133]
First, in step 401, the square root s of the ratio of the energy of the right channel to the energy of the left channel is calculated by (Equation 32).
[0134]
(Equation 32)
Figure 2004325633
[0135]
Here, fs and fe are the start spectrum number and the end spectrum number of the band for which the intensity stereo coding is to be turned on / off.
[0136]
Next, at step 402, the sum a of the product of (Li / s) obtained by correcting Li by s and Ri is calculated by (Equation 33). The reason why Li is corrected is that in the intensity stereo coding, the spectrum data of the right channel at the time of decoding is calculated by dividing the spectrum data of the left channel subjected to the intensity stereo processing by s.
[0137]
[Equation 33]
Figure 2004325633
[0138]
In step 403, the absolute value b of the sum of the difference between the square of (Li / s) obtained by correcting Li by s and the square of Ri is calculated by (Equation 34).
[0139]
(Equation 34)
Figure 2004325633
[0140]
Then, in step 404, a quantity c indicating the correlation as intensity stereo coding of the spectral data of the two channels is calculated by (Equation 35).
[0141]
(Equation 35)
Figure 2004325633
[0142]
In the intensity stereo coding, unlike the mid-side stereo coding, only one of the sum or difference (more precisely, the sum or difference obtained by correcting the gain) of the spectral data of the two channels is coded. Need to distinguish between correlation and negative correlation. However, in the conventional example described in Patent Literature 1, a positive correlation and a negative correlation cannot be distinguished. In the second embodiment, a positive correlation and a negative correlation can be distinguished. That is, when the quantity c indicating the correlation between the two channels is positive, it indicates that there is a positive correlation, and when c is negative, it indicates that there is a negative correlation. In the second embodiment, since the positive correlation and the negative correlation can be distinguished, it is possible to control the intensity stereo coding with high accuracy.
[0143]
In step 405, the correlation amount c is compared with each of the first positive threshold value thr1 and the second negative threshold value thr2, and if c is larger than the first threshold value or smaller than the second threshold value If (YES), intensity stereo coding is turned on in step 406; otherwise (NO), intensity stereo coding is turned off in step 407.
[0144]
Note that the branch condition in step 405 may include an equal sign. That is, the branch condition (c> thr1) ∨ (c <thr2) at step 405 may be set to (c ≧ thr1) ∨ (c ≦ thr2).
[0145]
Next, when the intensity stereo coding is on, it is determined whether the phase relationship between the left and right channels is the same phase or the opposite phase based on the value of the quantity c indicating the correlation. That is, it is determined in step 408 whether or not c is greater than or equal to zero. If c is greater than or equal to zero (YES), the two channels are in phase (LR in phase) in step 410, and if c is negative. In (NO), in step 409, it is determined that the two channels are out of phase (LR out of phase), and the result is output.
[0146]
As described above, in the second embodiment, in steps 401, 402, 403, and 404, the amount indicating the correlation as the intensity stereo coding of the spectral data of the two channels is accurately calculated, and in step 405, the correlation is indicated. The amount and the threshold value are compared to determine whether the intensity stereo coding is on or off, and the amount indicating the correlation is compared with zero in step 408 to determine whether the two channels are in phase or in opposite phase. By determining whether or not there is, it is possible to generate stereo encoded data with improved sound quality of intensity stereo encoding.
[0147]
(Embodiment 3)
FIG. 5 is a flowchart showing steps of the intensity stereo encoding control method in the signal encoding method according to Embodiment 3 of the present invention, and is a flowchart showing details of the intensity stereo encoding determination in step 201 shown in FIG. It is.
[0148]
Unlike the second embodiment, in the intensity stereo coding of the third embodiment, a flag indicating whether the left and right channels are in phase or out of phase is not transmitted as encoded data. In the third embodiment, the spectrum data obtained by correcting the sum of the spectrum data of the left and right channels with gain is encoded.
[0149]
In FIG. 5, in steps 501, 502, 503, and 504, a quantity c indicating a correlation as intensity stereo coding between spectral data Li and Ri (i is a spectral number) of two channels is calculated. Steps 501, 502, 503, and 504 in FIG. 5 are the same as steps 401, 402, 403, and 404 in FIG.
[0150]
In step 505, the correlation amount c is compared with a positive threshold value thr. If c is larger than the threshold value (YES), intensity stereo coding is turned on in step 506; otherwise (NO). Turns off intensity stereo coding in step 507.
[0151]
Note that the branch condition in step 505 may include an equal sign. That is, the branch condition c> thr in step 505 may be set to c ≧ thr.
[0152]
Instead of comparing c (= a / b) with thr, a may be compared with b × thr. This eliminates the need to divide a ÷ b, which was necessary when calculating the quantity c indicating the correlation in step 504.
[0153]
As described above, in the third embodiment, only when there is a positive correlation between the two channels, the intensity stereo coding is turned on, and the sum of the spectral data of the left and right channels is gain-corrected and coded. This makes it possible to prevent sound quality degradation due to turning on intensity stereo coding when two channels have a negative correlation.
[0154]
As described above, in the third embodiment, in steps 501, 502, 503, and 504, the amount indicating the correlation as intensity stereo coding of the spectral data of two channels is accurately calculated, and in step 505, the correlation is indicated. By comparing the amount with the threshold value and determining that intensity stereo coding is ON when there is a positive correlation, high-precision intensity stereo coding control is performed, and the sound quality of intensity stereo coding is improved. Stereo coded data can be generated.
[0155]
In the third embodiment, it is assumed that the two channels often have a positive correlation, and the intensity data obtained by correcting the sum of the spectral data of the left and right channels is used as the spectral data of the intensity stereo coding. If there is often a negative correlation between the two channels, a gain-corrected difference between the spectral data of the left and right channels may be used.
[0156]
In each of the above embodiments, an example has been described in which the signal encoding method of the present invention is applied to a stereo audio signal, but it is also possible to apply the signal encoding method to a stereo image signal.
[0157]
Further, the signal encoding method in each of the above embodiments can be realized as a program to be executed by a computer or a digital signal processor, and this may be recorded on a computer-readable recording medium.
[0158]
【The invention's effect】
As described above, according to the present invention, on / off control of joint stereo coding (midside stereo coding or intensity stereo coding) can be performed with high accuracy. As a result, it is possible to generate stereo encoded data in which the sound quality of joint stereo encoding is improved.
[0159]
Further, according to the present invention, it is possible to generate stereo encoded data with improved sound quality of joint stereo encoding with a relatively small processing amount. Also, the present invention is applicable to many coding schemes using joint stereo coding and can be used in a wide range.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an audio encoder that implements a signal encoding method according to an embodiment of the present invention.
FIG. 2 is a flowchart showing a control procedure of a stereo coding control unit in the audio encoder.
FIG. 3 is a flowchart showing processing steps of a mid-side stereo encoding control method in the signal encoding method according to the first embodiment of the present invention.
FIG. 4 is a flowchart showing processing steps of an intensity stereo coding control method in the signal coding method according to the second embodiment;
FIG. 5 is a flowchart showing processing steps of an intensity stereo coding control method in the signal coding method according to the third embodiment;
FIG. 6 is a flowchart illustrating processing steps of a mid-side stereo encoding control method in a conventional signal encoding method.
FIG. 7 is a conceptual diagram showing an example of spectrum data of LR individual coding and MS stereo coding.
[Explanation of symbols]
101, 102 filter bank
110 stereo coding control unit
120 intensity stereo data generator
130 Mid-side stereo data generator
140 Quantization unit
150 encoding unit

Claims (10)

2つのチャンネルの信号をスペクトルデータに変換し、前記2つのチャンネルのスペクトルデータを、ミッドサイドステレオ符号化を用いて符号化する方法であって、
2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)の相関を示す量cを(数1)で算出するステップと、
Figure 2004325633
(ここで、fsはミッドサイドステレオ符号化のオン/オフを判定するバンドの開始スペクトル番号、feは前記バンドの終了スペクトル番号である。)
前記相関を示す量cと閾値とを比較するステップと、
前記比較の結果を用いて、ミッドサイドステレオ符号化のオン/オフを判定するステップと、を備えたことを特徴とする信号符号化方法。
A method of converting signals of two channels into spectral data, and encoding the spectral data of the two channels using mid-side stereo coding,
Calculating a quantity c indicating the correlation between the spectrum data Li and Ri (i is a spectrum number) of the two channels by (Equation 1);
Figure 2004325633
(Here, fs is the start spectrum number of the band for determining ON / OFF of the mid-side stereo coding, and fe is the end spectrum number of the band.)
Comparing the amount c indicating the correlation with a threshold value;
Determining on / off of mid-side stereo coding using the result of the comparison.
前記相関を示す量cと正の第1の閾値とを比較するステップと、
前記相関を示す量cと負の第2の閾値とを比較するステップと、
前記相関を示す量cが前記第1の閾値より大きい場合、あるいは第2の閾値より小さい場合には、ミッドサイドステレオ符号化をオンとし、それ以外の場合には、ミッドサイドステレオ符号化をオフとするステップと、を備えたことを特徴とする請求項1記載の信号符号化方法。
Comparing the quantity c indicating the correlation with a first positive threshold value;
Comparing the quantity c indicating the correlation with a negative second threshold value;
If the correlation amount c is larger than the first threshold or smaller than the second threshold, the mid-side stereo coding is turned on; otherwise, the mid-side stereo coding is turned off. The signal encoding method according to claim 1, further comprising:
前記相関を示す量cと正の閾値とを比較するステップと、
前記相関を示す量cが前記閾値より大きい場合には、ミッドサイドステレオ符号化をオンとし、前記相関を示す量cが前記閾値以下の場合には、ミッドサイドステレオ符号化をオフとするステップと、を備えたことを特徴とする請求項1記載の信号符号化方法。
Comparing the quantity c indicating the correlation with a positive threshold value;
Turning off the mid-side stereo coding when the correlation amount c is larger than the threshold, and turning off the mid-side stereo coding when the correlation amount c is equal to or less than the threshold. The signal encoding method according to claim 1, further comprising:
前記相関を示す量cと負の閾値とを比較するステップと、
前記相関を示す量cが前記閾値より小さい場合には、ミッドサイドステレオ符号化をオンとし、前記相関を示す量cが前記閾値以上の場合には、ミッドサイドステレオ符号化をオフとするステップと、を備えたことを特徴とする請求項1記載の信号符号化方法。
Comparing the quantity c indicating the correlation with a negative threshold value;
Turning off the mid-side stereo coding if the amount c indicating the correlation is smaller than the threshold, and turning off the mid-side stereo coding if the amount c indicating the correlation is equal to or larger than the threshold. The signal encoding method according to claim 1, further comprising:
2つのチャンネルの信号をスペクトルデータに変換し、前記2つのチャンネルのスペクトルデータを、インテンシティステレオ符号化を用いて符号化する方法であって、
2つのチャンネルのスペクトルデータLiとRi(iはスペクトル番号)の相関を示す量cを(数2)で算出するステップと、
Figure 2004325633
(ここで、fsはインテンシティステレオ符号化のオン/オフを判定するバンドの開始スペクトル番号、feは前記バンドの終了スペクトル番号、sは(数3)により算出される変数である。)
Figure 2004325633
前記相関を示す量cと閾値とを比較するステップと、
前記比較の結果を用いて、インテンシティステレオ符号化のオン/オフを判定するステップと、を備えたことを特徴とする信号符号化方法。
A method of converting signals of two channels into spectral data, and encoding the spectral data of the two channels using intensity stereo coding,
Calculating a quantity c indicating the correlation between the spectrum data Li and Ri (i is a spectrum number) of the two channels by (Equation 2);
Figure 2004325633
(Here, fs is the start spectrum number of the band for determining whether the intensity stereo coding is on / off, fe is the end spectrum number of the band, and s is a variable calculated by (Equation 3).)
Figure 2004325633
Comparing the amount c indicating the correlation with a threshold value;
Determining on / off of intensity stereo coding using the result of the comparison.
前記相関を示す量cと正の第1の閾値とを比較するステップと、
前記相関を示す量cと負の第2の閾値とを比較するステップと、
前記相関を示す量cが前記第1の閾値より大きい場合、あるいは第2の閾値より小さい場合には、インテンシティステレオ符号化をオンとし、それ以外の場合には、インテンシティステレオ符号化をオフとするステップと、を備えたことを特徴とする請求項5記載の信号符号化方法。
Comparing the quantity c indicating the correlation with a first positive threshold value;
Comparing the quantity c indicating the correlation with a negative second threshold value;
When the correlation amount c is larger than the first threshold value or smaller than the second threshold value, the intensity stereo coding is turned on; otherwise, the intensity stereo coding is turned off. The signal encoding method according to claim 5, further comprising:
前記相関を示す量cと正の閾値とを比較するステップと、
前記相関を示す量cが前記閾値より大きい場合には、インテンシティステレオ符号化をオンとし、前記相関を示す量cが前記閾値以下の場合には、インテンシティステレオ符号化をオフとするステップと、を備えたことを特徴とする請求項5記載の信号符号化方法。
Comparing the quantity c indicating the correlation with a positive threshold value;
Turning off intensity stereo coding if the amount c indicating the correlation is larger than the threshold, and turning off intensity stereo coding if the amount c indicating the correlation is equal to or smaller than the threshold. The signal encoding method according to claim 5, further comprising:
前記相関を示す量cと負の閾値とを比較するステップと、
前記相関を示す量cが前記閾値より小さい場合には、インテンシティステレオ符号化をオンとし、前記相関を示す量cが前記閾値以上の場合には、インテンシティステレオ符号化をオフとするステップと、を備えたことを特徴とする請求項5記載の信号符号化方法。
Comparing the quantity c indicating the correlation with a negative threshold value;
Turning off the intensity stereo coding if the amount c indicating the correlation is smaller than the threshold, and turning off the intensity stereo coding if the amount c indicating the correlation is equal to or larger than the threshold. The signal encoding method according to claim 5, further comprising:
請求項1ないし8のいずれかに記載の信号符号化方法を、コンピュータまたはデジタルシグナルプロセッサに実行させるためのプログラム。A program for causing a computer or a digital signal processor to execute the signal encoding method according to claim 1. 請求項1ないし8のいずれかに記載の信号符号化方法を、コンピュータまたはデジタルシグナルプロセッサに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium on which a program for causing a computer or a digital signal processor to execute the signal encoding method according to claim 1 is recorded.
JP2003118250A 2003-04-23 2003-04-23 Method and program for encoding signal, and recording medium therefor Pending JP2004325633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003118250A JP2004325633A (en) 2003-04-23 2003-04-23 Method and program for encoding signal, and recording medium therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003118250A JP2004325633A (en) 2003-04-23 2003-04-23 Method and program for encoding signal, and recording medium therefor

Publications (1)

Publication Number Publication Date
JP2004325633A true JP2004325633A (en) 2004-11-18

Family

ID=33497842

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003118250A Pending JP2004325633A (en) 2003-04-23 2003-04-23 Method and program for encoding signal, and recording medium therefor

Country Status (1)

Country Link
JP (1) JP2004325633A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006070757A1 (en) * 2004-12-28 2006-07-06 Matsushita Electric Industrial Co., Ltd. Audio encoding device and audio encoding method
WO2008016097A1 (en) * 2006-08-04 2008-02-07 Panasonic Corporation Stereo audio encoding device, stereo audio decoding device, and method thereof
WO2008069614A1 (en) * 2006-12-08 2008-06-12 Electronics And Telecommunications Research Institute Apparatus and method for coding audio data based on input signal distribution characteristics of each channel
WO2009142017A1 (en) * 2008-05-22 2009-11-26 パナソニック株式会社 Stereo signal conversion device, stereo signal inverse conversion device, and method thereof
WO2010121536A1 (en) * 2009-04-20 2010-10-28 华为技术有限公司 Method and apparatus for correcting channel delay parameters of multi-channel signal
JP2011013560A (en) * 2009-07-03 2011-01-20 Fujitsu Ltd Audio encoding device, method of the same, computer program for audio encoding, and video transmission device
CN102855876A (en) * 2011-07-01 2013-01-02 索尼公司 Audio encoder, audio encoding method and program
CN104541326A (en) * 2012-07-31 2015-04-22 英迪股份有限公司 Device and method for processing audio signal
JP2018533056A (en) * 2015-09-25 2018-11-08 ヴォイスエイジ・コーポレーション Method and system for using a long-term correlation difference between a left channel and a right channel to time-domain downmix a stereo audio signal into a primary channel and a secondary channel
JP2021526239A (en) * 2018-05-31 2021-09-30 華為技術有限公司Huawei Technologies Co.,Ltd. Stereo signal encoding method and equipment

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006070757A1 (en) * 2004-12-28 2006-07-06 Matsushita Electric Industrial Co., Ltd. Audio encoding device and audio encoding method
US7797162B2 (en) 2004-12-28 2010-09-14 Panasonic Corporation Audio encoding device and audio encoding method
WO2008016097A1 (en) * 2006-08-04 2008-02-07 Panasonic Corporation Stereo audio encoding device, stereo audio decoding device, and method thereof
US8150702B2 (en) 2006-08-04 2012-04-03 Panasonic Corporation Stereo audio encoding device, stereo audio decoding device, and method thereof
WO2008069614A1 (en) * 2006-12-08 2008-06-12 Electronics And Telecommunications Research Institute Apparatus and method for coding audio data based on input signal distribution characteristics of each channel
US8612239B2 (en) 2006-12-08 2013-12-17 Electronics & Telecommunications Research Institute Apparatus and method for coding audio data based on input signal distribution characteristics of each channel
WO2009142017A1 (en) * 2008-05-22 2009-11-26 パナソニック株式会社 Stereo signal conversion device, stereo signal inverse conversion device, and method thereof
WO2010121536A1 (en) * 2009-04-20 2010-10-28 华为技术有限公司 Method and apparatus for correcting channel delay parameters of multi-channel signal
US8976971B2 (en) 2009-04-20 2015-03-10 Huawei Technologies Co., Ltd. Method and apparatus for adjusting channel delay parameter of multi-channel signal
JP2011013560A (en) * 2009-07-03 2011-01-20 Fujitsu Ltd Audio encoding device, method of the same, computer program for audio encoding, and video transmission device
JP2013033189A (en) * 2011-07-01 2013-02-14 Sony Corp Audio encoder, audio encoding method and program
US20130003980A1 (en) * 2011-07-01 2013-01-03 Yasuhiro Toguri Audio encoder, audio encoding method and program
CN102855876A (en) * 2011-07-01 2013-01-02 索尼公司 Audio encoder, audio encoding method and program
US9672832B2 (en) * 2011-07-01 2017-06-06 Sony Corporation Audio encoder, audio encoding method and program
CN104541326A (en) * 2012-07-31 2015-04-22 英迪股份有限公司 Device and method for processing audio signal
JP2015528925A (en) * 2012-07-31 2015-10-01 インテレクチュアル ディスカバリー シーオー エルティディIntellectual Discovery Co.,Ltd. Audio signal processing apparatus and method
JP2018533056A (en) * 2015-09-25 2018-11-08 ヴォイスエイジ・コーポレーション Method and system for using a long-term correlation difference between a left channel and a right channel to time-domain downmix a stereo audio signal into a primary channel and a secondary channel
US10984806B2 (en) 2015-09-25 2021-04-20 Voiceage Corporation Method and system for encoding a stereo sound signal using coding parameters of a primary channel to encode a secondary channel
US11056121B2 (en) 2015-09-25 2021-07-06 Voiceage Corporation Method and system for encoding left and right channels of a stereo sound signal selecting between two and four sub-frames models depending on the bit budget
JP2021526239A (en) * 2018-05-31 2021-09-30 華為技術有限公司Huawei Technologies Co.,Ltd. Stereo signal encoding method and equipment
US11587572B2 (en) 2018-05-31 2023-02-21 Huawei Technologies Co., Ltd. Stereo signal encoding method and apparatus
JP7252263B2 (en) 2018-05-31 2023-04-04 華為技術有限公司 Stereo signal encoding method and apparatus

Similar Documents

Publication Publication Date Title
TWI752281B (en) Apparatus and method for encoding or decoding directional audio coding parameters using quantization and entropy coding
KR101143225B1 (en) Complex-transform channel coding with extended-band frequency coding
JP5485909B2 (en) Audio signal processing method and apparatus
CN109448741B (en) 3D audio coding and decoding method and device
JP4538324B2 (en) Audio signal encoding
WO2006075563A1 (en) Audio encoding device, audio encoding method, and audio encoding program
JPWO2004010415A1 (en) Audio decoding apparatus, decoding method, and program
JP2024012444A (en) Multi-channel signal encoding method, multi-channel signal decoding method, encoder, and decoder
JP2008511040A (en) Time envelope shaping for spatial audio coding using frequency domain Wiener filters
JP2004325633A (en) Method and program for encoding signal, and recording medium therefor
WO2006030754A1 (en) Audio encoding device, decoding device, method, and program
JP3811110B2 (en) Digital signal encoding method, decoding method, apparatus, program and recording medium
JP2006003580A (en) Device and method for coding audio signal
JPH0969781A (en) Audio data encoding device
JP4369140B2 (en) Audio high-efficiency encoding apparatus, audio high-efficiency encoding method, audio high-efficiency encoding program, and recording medium therefor
JP2003345398A (en) Audio signal encoding method
US6574602B1 (en) Dual channel phase flag determination for coupling bands in a transform coder for high quality audio
CN105336334B (en) Multi-channel sound signal coding method, decoding method and device
JP2003108192A (en) Audio signal encoding method
JPH1093441A (en) Digitized audio signal encoding method and its device
JP2003271199A (en) Encoding method and encoding system for audio signal
JP3257584B2 (en) Acoustic signal encoding method and acoustic signal encoding device
JP2002311994A (en) Method and device for coding stereophonic audio signal
JPWO2008004649A1 (en) Audio encoding apparatus, audio encoding method and program thereof
JP2002023798A (en) Speech encoding method