JP3589746B2 - MPEG audio decoder - Google Patents
MPEG audio decoder Download PDFInfo
- Publication number
- JP3589746B2 JP3589746B2 JP17034195A JP17034195A JP3589746B2 JP 3589746 B2 JP3589746 B2 JP 3589746B2 JP 17034195 A JP17034195 A JP 17034195A JP 17034195 A JP17034195 A JP 17034195A JP 3589746 B2 JP3589746 B2 JP 3589746B2
- Authority
- JP
- Japan
- Prior art keywords
- information
- sample
- ram
- vector
- data
- 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 - Lifetime
Links
- 239000013598 vector Substances 0.000 claims description 248
- 238000000034 method Methods 0.000 claims description 100
- 230000008569 process Effects 0.000 claims description 95
- 238000013139 quantization Methods 0.000 claims description 42
- 238000004364 calculation method Methods 0.000 claims description 24
- 230000015572 biosynthetic process Effects 0.000 claims description 20
- 238000003786 synthesis reaction Methods 0.000 claims description 20
- 238000000605 extraction Methods 0.000 claims description 8
- 230000002596 correlated effect Effects 0.000 claims description 4
- 230000015654 memory Effects 0.000 abstract description 55
- 230000000875 corresponding effect Effects 0.000 description 23
- 238000010586 diagram Methods 0.000 description 22
- 238000006243 chemical reaction Methods 0.000 description 14
- 239000000284 extract Substances 0.000 description 9
- 230000006835 compression Effects 0.000 description 7
- 238000007906 compression Methods 0.000 description 7
- 101000969688 Homo sapiens Macrophage-expressed gene 1 protein Proteins 0.000 description 6
- 102100021285 Macrophage-expressed gene 1 protein Human genes 0.000 description 6
- 238000007796 conventional method Methods 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 238000001914 filtration Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000001174 ascending effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012067 mathematical method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
【0001】
【産業上の利用分野】
本発明は、MPEGによって圧縮されたオーディオデータをデコードするMPEGオーディオデコーダに関するものである。
【0002】
【従来の技術】
近年、MPEG(Moving Picture Image Coding Experts Group )オーディオと称されるディジタル音声信号の圧縮技術が開発されてきている。現在、このMPEGオーディオにはMPEG1が規格化されている。このMPEG1の規格には、要求される音質や回路規模によってレイヤI,レイヤII,レイヤIII の3つの方式が用意されている。
【0003】
また、MPEGオーディオにおいては、音声信号のチャネルモードとして、シングルチャネル、デュアルチャネル、ステレオ、ジョイントステレオなどの各モードが規定されている。さらに、MPEGオーディオでは、各レイヤの各チャネルモード毎に使用可能な伝送レート(ビットレート)や、再生後の音声信号の出力レート(サンプリング周波数)が種々規定されている。
【0004】
例えば、ステレオモードでは、オーディオデータはレイヤIでは32個、レイヤIIでは最大30個のサブバンドに分割され、各サブバンドには2個のチャネルが含まれている。
【0005】
図15は、MPEG1のレイヤIIによって圧縮されたオーディオデータのビットストリームを示す図である。この図15に示したように、オーディオ圧縮データの1フレームは、ヘッダ情報(HEADER)、CRC(Cyclic Redundancy Check )情報、アロケーション(Allocation)情報、scfsi 情報、スケールファクタ(Scale Factor)情報およびサンプルもしくはサンプルコード(Sample / Sample Code)情報(以下では、これらをまとめてサンプルデータという)で構成され、この順番でMPEGオーディオデコーダに入力されるようになっている。
【0006】
ここで、上記ヘッダ情報は、ビットレートやサンプリング周波数、あるいはステレオ/モノラルのチャネルモード等のような基本的な情報によって構成されるものである。また、CRC情報は、ビットストリーム中にエラーがないかどうかを調べるためのものである。
【0007】
また、アロケーション情報、スケールファクタ情報およびサンプルデータは、オーディオ圧縮データ本体を構成する情報である。上記アロケーション情報およびスケールファクタ情報によってサンプルデータが加工されることにより、オーディオ圧縮データが復号され、PCMデータが生成されるようになっている。
【0008】
すなわち、アロケーション情報は、復号時における逆量子化演算の際に用いられる情報であり、後に入力されるサンプルデータが何ビット幅であるかという情報と、そのサンプルデータがサンプル情報なのかサンプルコード情報なのかという情報とを含んでいる。これらの情報は、ISO/IEC 11172 MPEG1オーディオ レイヤIIの規格に従って、アロケーション情報の値とサブバンド番号とをもとにして表1のようなテーブル情報を参照することにより知ることができる。
【0009】
【表1】
【0010】
表1において、nbalで示される項目は、アロケーション情報のビット幅を示すものであり、アロケーション情報が4ビット幅のとき(サブバンドsb0〜sb10)は、アロケーション情報は0〜15の16個の値をとる。また、アロケーション情報が3ビット幅のとき(サブバンドsb11〜sb22)は、アロケーション情報は0〜7の8個の値をとる。また、アロケーション情報が2ビット幅のとき(サブバンドsb23〜sb29)は、アロケーション情報は0〜3の4個の値をとる。
【0011】
例えば、サブバンド番号がsb=2で、アロケーション情報の値が5である場合は、サンプルデータのとり得る値は63通りであり、サンプルデータのビット幅は6ビットであることが分かる。また、サブバンド番号がsb=20で、アロケーション情報の値が5である場合は、サンプルデータのとり得る値は15通りであり、サンプルデータのビット幅は4ビットであることが分かる。
【0012】
また、サンプルデータのとり得る値が3通り、5通りまたは9通りである場合は、サンプルデータは、サンプルコードという形で入力されている。したがって、表1を参考にしてサンプルデータのとり得る値が何通りであるかを見ることによって、そのサンプルデータがサンプル情報なのかサンプルコード情報なのかを知ることもできる。
【0013】
ここで、サンプルコードとは、各サブバンド単位で、時間軸方向に連続して存在する3個のサンプル情報を1つのコードにまとめたものである。例えば、1つのサンプル情報のとり得る値が3通りである場合、通常は3個のサンプル情報で6ビットとなるが、1つのコードにまとめると5ビットで済む。また、1つのサンプル情報のとり得る値が5通りまたは9通りである場合、通常は3個のサンプル情報でそれぞれ9ビット、12ビットとなるが、1つのコードにまとめると、それぞれ7ビット、10ビットで済む。
【0014】
また、スケールファクタ情報は、上記逆量子化演算の後の逆スケーリング演算の際に用いられる情報であり、おおよその出力レベルを与えるスケーリング係数値を表すものである。ここで、上述のサンプル情報は、レイヤIIの場合、1フレーム単位で見ると各サブバンドの各チャネル毎に時間軸方向に36個存在している。そして、上記36個のサンプル情報は、連続する12個毎に異なるスケールファクタの値をとり得る。
【0015】
すなわち、時間軸方向で見て0〜11番目、12〜23番目、24〜35番目のサンプル情報に対するスケールファクタ情報を、それぞれスケールファクタ0,スケールファクタ1,スケールファクタ2とすると、次の表2に示すように、スケールファクタ0〜2にはそれぞれa,b,cの何れかのスケールファクタ値が与えられる。
【0016】
【表2】
【0017】
また、scfsi 情報は、上述のスケールファクタ情報が各サブバンドの各チャネルに何個存在するか(1〜3個)を示すパラメータであり、レイヤIIにおいてのみ用いられる。すなわち、上記 scfsi情報は、表2に示した4パターンのうち、何れのパターンに該当するかを示している。
【0018】
以上のようなビットストリームを有するオーディオ圧縮データのデコード処理は、次のようにして行われる。すなわち、まず、上述した逆量子化処理および逆スケーリング処理によってサブバンドサンプル情報が求められる。次に、このサブバンドサンプル情報を用いて合成サブバンドフィルタ処理が行われることにより、PCMデータが生成される。
【0019】
一般に、従来のMPEGオーディオデコーダにおいては、入力される図15のようなビットストリームや、上述のような一連の処理過程で得られるデータを一時記憶しておくためのバッファメモリが幾つか設けられている。例えば、上記ビットストリーム中の各情報を一時記憶しておくためのバッファメモリや、上記合成サブバンドフィルタ処理の過程でサブバンドサンプル情報から求められるVベクタと呼ばれる情報を一次記憶しておくためのVベクタRAMと呼ばれるバッファメモリがある。
【0020】
上述のサブバンドサンプル情報Sは、次の演算式に従って求められる。
S=factor×C×(S”+D) (式1)
ここで、(式1)中のfactor(ファクタ)は、スケールファクタ情報の値に応じて特定される演算値であり、上記スケールファクタ情報の値をindex (インデックス)で表すとすると、
ファクタ=21−index/3 (式2)
で与えられる。表3に、スケールファクタ情報の値(インデックス)と上記ファクタの値との関係を示す。
【0021】
【表3】
【0022】
また、上記(式1)中の値S”は、サンプル情報の最上位ビット(MSB)を反転したものである。また、同じく(式1)中の値C,Dは、所定の逆量子化係数であり、次の表4に示すような値が用いられる。この表4から分かるように、係数C,Dは、サンプル情報のとり得る値が何通りであるかによって、異なる値が用いられる。すなわち、アロケーション情報の値に応じて、表4に示した何れかの係数値が用いられる。
【0023】
【表4】
【0024】
上記(式1)に示したサブバンドサンプル情報Sを求める演算では、まず最初にC×(S”+D)で示される逆量子化演算が行われ、その後でファクタの値を乗ずる逆スケーリング演算が行われる。なお、上記ファクタの値や係数C,Dの値は、それぞれ表3および表4に示したようなテーブル情報としてあらかじめ記憶されているものが用いられる。
【0025】
ところで、以上のようにして求められたサブバンドサンプル情報SからPCMデータを求める合成サブバンドフィルタ処理を行うために、オーディオデータを32個のサブバンドに分割するには膨大な演算量が必要である。そこで、この問題を解決するために、ポリフェーズ・フィルタ・バンクと呼ばれる技術が用いられることがある。上記ポリフェーズ・フィルタ・バンクでは、巧妙な数学的手法で上記32バンドを一度に処理することによりエリアシングもキャンセルされ、かつ非常に効率よく計算ができるように設計されている。
【0026】
しかし、このようにポリフェーズ・フィルタ・バンクを用いて32個のPCMデータを一度に生成すると、上記生成したPCMデータを絶え間なく出力するためにデコーダの出力段にPCMデータ用のメモリが必要なので、設置しなければならないメモリ容量が大きくなってしまう問題があった。
【0027】
そこで、出力用のメモリを設けなくても済むようにする合成サブバンドフィルタ処理も提案されている。
図16は、レイヤI,IIにおける合成サブバンドフィルタ処理の内容を示すフローチャートである。図16において、最初にステップP11で、各サブバンドごとに求められた32個のサブバンドサンプル情報Sが図示しない内部メモリに入力される。
【0028】
そして、ステップP12で、上述したVベクタRAMのアドレスが64ワード分シフトされる。これにより、図17に示すように、VベクタRAMの第0アドレスから第63アドレスまでが空にされ、これから算出するVベクタの記憶領域が確保される。
【0029】
次に、ステップP13で、上記ステップP11で入力された32個のサブバンドサンプル情報Sから64個のVベクタが算出される。なお、これらのVベクタは、次の(式3)に示す演算式に従って求められる。このようにして求められたVベクタは、VベクタRAMの新たに確保された記憶領域に一時記憶される。
【0030】
【数1】
【0031】
上記ステップP13にて求められたVベクタは、次のステップP14でUベクタに変換される。なお、VベクタからUベクタへの変換処理は、次に示す(式4)および(式5)に従って行われる。
U[i×64+j]=V[i×128 +j] (式4)
U[i×64+32+j]=V[i×128 +96+j] (式5)
ただし、i=0 〜7 、j=0 〜31
【0032】
この(式4)および(式5)から明らかなように、合成サブバンドフィルタ処理を行うには、上記ステップP13にて求められた64個のVベクタを含めて全部で1024個のVベクタが必要になる。1024個のVベクタは、異なるサブバンドサンプル情報Sの組(1組は32個)から64個ごとに算出されたものであり、図17に示したVベクタRAMの第0アドレスから第1023アドレスに記憶されているものである。
【0033】
次に、ステップP15で、上記ステップP14にて変換されたUベクタに所定のウィンドウ係数Di が掛けられることにより、512個のWベクタが算出される。すなわち、このWベクタは、次の(式6)に従って求められる。なお、上記ウィンドウ係数Di は、MPEG規格によって定められている。
W[i] =U[i] ×Di [i] (式6)
ただし、i=0 〜511
【0034】
そして、次のステップP16で、上記ステップP15にて求められたWベクタを用いて32個のPCMデータが次の(式7)に従って算出される。このようにして求められた32個のPCMデータは、次のステップP17で外部に出力される。
【0035】
【数2】
【0036】
以上のステップP17の処理までで1フレーム分のデコード処理が終了する。その後、ステップP18でデコード処理を終了するかどうかが判断され、デコード処理を終了しないときは、ステップP11の処理に戻り、次のフレームの処理を開始する。
【0037】
【発明が解決しようとする課題】
上述したように、従来のMPEGオーディオデコーダでは、その入力段に、図15のようなビットストリームからなるオーディオ圧縮データを一時記憶しておくためのバッファメモリが設けられていた。そして、そのバッファメモリは、ビットストリーム中の各情報を記憶するために、それぞれに専用のメモリが個々に設けられていた。
【0038】
このため、これらの各情報を記憶するためのバッファメモリは、各情報のデータ量の合計に相当する大きな記憶容量が必要となり、その全記憶容量が非常に大きくなってしまうという問題があった。
【0039】
また、上記オーディオ圧縮データ中に含まれる各サンプル情報は、それぞれビット幅が異なるものであることは上述したとおりである。具体的には、サンプル情報のビット幅は、2〜16ビットと様々である。このため、サンプル情報を記憶するためのバッファメモリは、ビット幅が最大のサンプル情報を1つのアドレスに記憶することができるようにするために、1ワードが16ビット幅となっていた。
【0040】
ところが、従来のMPEGオーディオデコーダは、サンプル情報をアドレス単位で読み出すようにしていたため、サンプル情報の記憶時には、各サンプル情報のビット幅がそれぞれ異なっているにもかかわらず、各サンプル情報を1つのアドレスに1つずつ記憶するようにしていた。
【0041】
このため、16ビット幅のサンプル情報を記憶する場合は良いが、それ以下のビット幅を持つサンプル情報を記憶する場合には、1つのアドレス内の一部にのみサンプル情報が記憶されることになる。これにより、サンプル情報を記憶するためのバッファメモリの全記憶領域の中でサンプル情報が記憶されない無駄な領域が多く生じるという問題があった。
【0042】
また、上記した(式1)から明らかなように、従来のMPEGオーディオデコーダでは、サブバンドサンプル情報Sを求めるためには、逆量子化処理と逆スケーリング処理との2つの処理を行う必要があり、それぞれの処理において乗算処理を行う必要があった。
【0043】
一般に、乗算処理は演算負荷が大きいため、2回にわたって乗算処理を行う従来の方式では、全体として演算負荷が非常に大きくなってしまい、処理時間も長くなってしまうという問題があった。
【0044】
また、上述したように、PCMデータを生成するためには片チャネルで1024個のVベクタが必要であった。したがって、上述のVベクタRAMは、片チャネルで少なくとも1024ワード分のメモリ容量が必要であった。このことは、図17に示したとおりである。
【0045】
Vベクタは情報量が多いデータであるから、このように数多くのVベクタを記憶するためのVベクタRAMは、その記憶容量が非常に大きくなってしまうという問題があった。
【0046】
さらに、図16に示した処理を行うMPEGオーディオデコーダでは、まず最初に、1組のサブバンドサンプル情報Sから64個のVベクタを算出する。そして、この64個のVベクタから変換したUベクタを用いてWベクタを算出し、このWベクタを用いて32個のPCMデータを生成していた。すなわち、従来は、図16のステップP11〜S15の処理を行わなければ、32個ののPCMデータを生成することができなかった。
【0047】
このため、この場合にはPCMデータ出力用のメモリを設けなくても済むが、生成したPCMデータをオーディオデータとして絶え間なく外部に出力できるようにするためには、少なくとも片チャネルで32個のPCMデータを生成するためのデータを保持しておくメモリを演算部に設ける必要があった。そして、一般には、ある程度の余裕を持たせるために、100ワード分の記憶容量を持つメモリが用いられることが多かった。
【0048】
したがって、従来のMPEGオーディオデコーダは、PCMデータをオーディオデータとして絶え間なく外部に出力するためには、大容量のメモリを設けなくてはならない問題点があった。
【0049】
本発明は、以上のような種々の問題を同時に解決するために成されたものであり、MPEGオーディオデコーダ中に備えられている種々のメモリの記憶容量を小さくすることができるようにするとともに、一連のデコード処理を短い工程で行うことができるようにすることを目的とする。
【0050】
具体的には、第1に、MPEG規格のオーディオ圧縮データ中に含まれる各情報を一時記憶しておくためのバッファメモリの全記憶容量を小さくすることができるようにすることを目的としている。第2に、一連のデコード処理の中でサブバンドサンプル情報を求める際の演算負荷を小さくすることができるようにすることを目的としている。
【0051】
第3に、合成サブバンドフィルタ処理の過程でサブバンドサンプル情報から求められるVベクタを一時記憶しておくためのバッファメモリ、すなわち、VベクタRAMの記憶容量を小さくすることができるようにすることを目的としている。第4に、PCMデータを絶え間なく外部に出力できるようにするために設けなければならないメモリの容量を可及的に少なくすることを目的としている。
【0052】
【課題を解決するための手段】
本発明のMPEGオーディオデコーダは、入力されるMPEG規格のオーディオ圧縮データに対して逆量子化処理、逆スケーリング処理および合成サブバンドフィルタ処理を行うことによりPCMデータを生成するMPEGオーディオデコーダにおいて、上記オーディオ圧縮データに含まれる各種情報のうち、少なくとも scfsi情報およびスケールファクタ情報がこの順番で一時記憶されるAS−RAMと、上記オーディオ圧縮データ中に含まれるサンプル情報が一時記憶されるサンプルRAMと、上記オーディオ圧縮データ中に含まれるアロケーション情報、スケールファクタ情報およびサンプル情報を用いた逆量子化処理および逆スケーリング処理によって求められるサブバンドサンプル情報が一時記憶されるサブバンドサンプルRAMと、上記サブバンドサンプル情報を用いた合成サブバンドフィルタ処理の過程で求められるVベクタが一時記憶されるVベクタRAMと、上記AS−RAMの所定記憶領域に上記 scfsi情報を記憶させるとともに、上記 scfsi情報の後に入力されるスケールファクタ情報を上記 scfsi情報が記憶されていた記憶領域に上書きするようにして記憶させる scfsi・スケールファクタ書き込み手段と、上記サンプルRAMの記憶領域に複数のサンプル情報を順に書き込むようにして、各サンプル情報のビット幅が相互に異なることにより、上記複数のサンプル情報の境界と上記サンプルRAMの各アドレスの境界とが一致していないミスアライン状態で記憶するようにするサンプル書き込み手段と、上記サンプル書き込み手段によってミスアライン状態で上記サンプルRAMに記憶された複数のサンプル情報を1つずつ取り出して読み出すようにするサンプル読み出し手段と、上記VベクタRAMに記憶されたVベクタを読み出すためのVベクタ読み出し手段と、上記逆量子化処理、逆スケーリング処理および合成サブバンドフィルタ処理を行う演算手段であって、上記スケールファクタ情報の値によって特定される演算値の指数を分数部と整数部とに分離して生成した演算式に基づいて、上記分数部に関する演算を乗算によって行うとともに、上記整数部に関する演算をシフト処理によって行うことにより、上記アロケーション情報、スケールファクタ情報およびサンプル情報を用いて上記サブバンドサンプル情報を求めた後、上記サブバンドサンプル情報の1組から生成される複数のVベクタのうち、相関関係にあるVベクタの一方のVベクタを1個ずつ求め、さらに、上記求めた1個のVベクタと、上記Vベクタ読み出し手段により読み出された複数個のVベクタとを用いてPCMデータを1個ずつ生成する演算手段と、上記Vベクタ読み出し手段の読み出し動作を制御し、ある1個のPCMデータを生成するために利用要求があったVベクタであって、現在のサブバンドサンプル情報の組より前に入力されたサブバンドサンプル情報の組に基づいて既に求められて上記VベクタRAMの飛び飛びのアドレスに既に記憶されている複数個のVベクタを上記VベクタRAMから読み出すようにするとともに、利用要求があったVベクタが上記VベクタRAMに記憶されていない場合には、上記利用要求があったVベクタと相関関係にあるVベクタを上記VベクタRAMから読み出すようにするVベクタ読み出し制御手段と、上記Vベクタ読み出し制御手段の制御に基づいて上記VベクタRAMから読み出されるVベクタの符号を、所定の条件に応じて反転させる符号反転手段と、上記演算手段により上記PCMデータが1個生成される毎にそのPCMデータを出力するようにする出力手段とを具備する。
【0053】
【作用】
本発明は上記技術手段より成るので、各サブバンドにスケールファクタ情報が何個存在するのかを表すためにAS−RAMから一度読み出された後は不要となり、消去してもデコード処理の動作上何の問題も生じないという scfsi情報の性質が有効に利用され、上記AS−RAMの一部の記憶領域を、scfsi 情報を一時記憶しておくための記憶領域として使用するとともに、その後に入力されるスケールファクタ情報を上書きして一時記憶しておくための記憶領域としても使用することができるようになり、scfsi 情報用の記憶領域とスケールファクタ情報用の記憶領域とを個々に設けなくても済むようになる。
【0054】
また、サンプルRAMの1つのアドレス内に複数のサンプル情報をミスアライン状態で記憶することが可能となり、従来のように記憶手段の1ワードに満たないビット幅を持つサンプル情報が1つのアドレスに1つだけ記憶されることにより、上記記憶手段の全記憶領域の中でサンプル情報が記憶されない無駄な領域が生じるという従来の不都合をなくすことができるようになるとともに、記憶すべきサンプル数の分だけアドレスを用意しなくても済むようになる。
【0055】
また、1組のサブバンドサンプル情報から生成される複数のVベクタにおいて、相関関係にあるVベクタのうちの一方のVベクタ、例えば、相互に等しい値を持つVベクタの組のうちの一方のVベクタ、および相互に符号のみが異なるVベクタの組のうちの一方のVベクタが求められてVベクタRAMに記憶されるとともに、利用要求があったVベクタが上記VベクタRAMに記憶されていない場合には、相関関係にあることにより相互に等しい値を持つVベクタが上記VベクタRAMから読み出され、上記読み出されたVベクタが所定の条件に応じて符号反転手段により符号反転されることになり、これにより、上記相互に等しい値を持つVベクタの組のうちの他方のVベクタおよび相互に符号のみが異なるVベクタの組のうちの他方のVベクタの値を計算して上記VベクタRAMに記憶しておかなくても、上記1組のサブバンドサンプル情報から生成される全てのVベクタの利用要求に応じることができるようになる。
【0056】
また、VベクタRAMの飛び飛びのアドレスに既に記憶されているVベクタからPCMデータが直接生成されるとともに、1個ずつ生成され、かつ生成される毎に出力されるので、PCMデータ出力用のメモリおよびPCMデータを生成するためのデータを保持しておくメモリを設けなくても、オーディオデータを絶え間なく外部に出力できるようになる。
【0057】
さらに、一連のデコード処理の中で行われる逆量子化処理および逆スケーリング処理が、オーディオ圧縮データ中のスケールファクタ情報の値によって特定される演算値の指数を分数部と整数部とに分離した演算式に基づいて、上記整数部に関する演算処理とそれ以外の演算処理とに分けて行われるようになり、上記整数部に関する演算処理については、与えられる情報を乗算ではなくシフト演算によって処理することが可能となるので、上記逆量子化処理および逆スケーリング処理の際に、演算負荷が大きい乗算を行う回数を従来よりも少なくすることが可能となる。
【0058】
また、請求項8に記載の発明によれば、ある1つのサンプル情報を取り出す際に、サンプルRAMのメモリアドレスへのアクセスが2回行われ、上記2回にわたるメモリアドレスへのアクセスにより取り出されるデータのラッチ処理が行われることとなるので、サンプル情報の取り出し処理を行っている間に、その前に取り出したサンプル情報を用いて逆量子化係数との加算処理を行う時間が十分に得られるようになる。
【0059】
また、請求項12に記載の発明によれば、演算負荷が小さいシフト処理は極めて短時間で行うことができ、乗算手段による乗算処理とシフト手段によるシフト処理とを1マシンサイクルで行うことが可能であるので、上記サンプル情報を取り出して逆量子化係数を加算する処理と、前のマシンサイクルにおける取り出し処理および加算処理によって得られた情報を用いた乗算処理およびシフト処理とを、全て1マシンサイクルで行うことが可能となる。
【0060】
【実施例】
以下、本発明のMPEGオーディオデコーダの一実施例を図面に基づいて説明する。
図1は、本実施例によるMPEGオーディオデコーダの全体構成を示すブロック図である。まず最初に、この図1を用いて各部の構成および動作を簡単に説明する。
【0061】
図1において、1はデータ入力部であり、図15に示したビットストリームで構成されるMPEG規格のオーディオ圧縮データを入力する。先にも述べたように、上記オーディオ圧縮データは、図15に示したビットストリームの順番でこのデータ入力部1に入力されるようになっている。データ入力部1の内部には、ヘッダレジスタ1aが備えられており、上記ビットストリームに最初に含まれているヘッダ情報が記憶される。
【0062】
2はCRCチェック部であり、CRC情報(CRCチェックワード)に基づいてビットストリーム中のエラーを検出する。すなわち、CRCチェック部2は、16ビットのCRCチェックワードの値と、それ以前に入力されたヘッダ情報および上記CRCチェックワードの後に入力されるアロケーション情報、 scfsi情報、スケールファクタ情報の各値をもとに所定の演算が施された結果得られる16ビットの値とを比較する。そして、それら両者の値が一致するかどうかを調べることにより、エラー検出を行う。
【0063】
3はAS−RAM(Allocation・Scale Factor−RAM)ブロックであり、上記データ入力部1から送られてくるアロケーション情報、scfsi 情報およびスケールファクタ情報を一時記憶するためのものである。本実施例では、このAS−RAMブロック3内のある記憶領域に一度記憶された scfsi情報をそれより後に入力されるスケールファクタ情報によって上書きするように構成している。したがって、このAS−RAMブロック3には、最終的にはアロケーション情報およびスケールファクタ情報のみが記憶されることになる。
【0064】
4はサンプルRAMブロックであり、上記データ入力部1から送られてくるサンプル情報(後述のように、サンプルコード情報が送られてきたときはそれがサンプル情報に変換される)を一時記憶するとともに、そのサンプル情報を読み出す際に、上記した(式1)中に示される(S”+D)の値を得るようにするためのものである。
【0065】
このように、本実施例では、オーディオ圧縮データ中に含まれる種々の情報のうち、可変長のデータであるサンプル情報を一時記憶するためのサンプルRAMブロック4と、このサンプル情報を特徴づけるデータ(アロケーション情報、scfsi 情報、スケールファクタ情報)を一時記憶するためのAS−RAMブロック3とを別個に設けている。この点、各情報を記憶するためのメモリが個々に設けられていた従来方式と異なる。
【0066】
5は演算部であり、上記AS−RAMブロック3およびサンプルRAMブロック4からそれぞれ読み出されるアロケーション情報、スケールファクタ情報およびサンプル情報を用いて、逆量子化処理、逆スケーリング処理および合成サブバンドフィルタ処理を行うことにより、PCMデータを生成する。
【0067】
6は係数ROMブロックであり、上記演算部5において逆量子化処理、逆スケーリング処理および合成サブバンドフィルタ処理を行う際に用いられる種々の係数をあらかじめ記憶するものである。
【0068】
7はVベクタRAMブロックであり、上記演算部5における逆量子化処理および逆スケーリング処理によって求められるサブバンドサンプル情報Sや、合成サブバンドフィルタ処理の過程でサブバンドサンプル情報Sから求められるVベクタを一時記憶するためのものである。
【0069】
8は出力手段としての出力インタフェース部であり、図示しないD/A変換器を含んでおり、上記演算部5により求められたデジタルのPCMデータをアナログ信号に変換して外部に出力するものである。
【0070】
9はオーディオ・ビデオ同期用タイマーであり、以上に示した構成のオーディオデコーダにより再生されるPCMオーディオデータと、図示しないビデオデコーダにより再生されるビデオデータとの間で同期をとるために使用されるものである。
【0071】
10はデータバスであり、上記演算部5で求められるサブバンドサンプル情報S、VベクタおよびPCMデータが、演算部5とVベクタRAMブロック7と出力インタフェース部8との間で相互に伝送される。
【0072】
次に、上記のように構成した本実施例によるMPEGオーディオデコーダの各ブロックについて、更に詳細な構成および動作を以下に示す各図面を参照しながら説明する。
【0073】
図2は、上記AS−RAMブロック3の構成を示す図である。この図2から明らかなように、AS−RAMブロック3は、第1のシリアル/パラレル変換部(S/P変換部)11と、アロケーション変換部12と、 scfsi・スケールファクタ書き込み手段としての第1の書き込み部13と、AS−RAM14と、第1の読み出し部15とにより構成されている。
【0074】
上記第1のS/P変換部11は、データ入力部1からシリアルデータの形で送られてくるアロケーション情報、scfsi 情報およびスケールファクタ情報を、それぞれパラレルデータの形に変換するものである。上記アロケーション変換部12は、アロケーション情報が入力された場合にそれを後述するような所定のデータに変換するものである。
【0075】
また、上記AS−RAM14は、パラレル変換されたアロケーション情報、scfsi 情報およびスケールファクタ情報を一時記憶するものである。AS−RAM14に対するこれらの各情報の読み書きは、上記第1の書き込み部13および第1の読み出し部15によって行われる。
【0076】
図2に示したように、第1の書き込み部13は、上書き手段13aを備えている。この上書き手段13aは、後述するように、scfsi 情報が既に書き込まれたAS−RAM14のメモリエリアに、それより後に入力されるスケールファクタ情報を上書きするようにして記憶させていく。
【0077】
上記第1の読み出し部15によってAS−RAM14から読み出されるアロケーション情報、scfsi 情報およびスケールファクタ情報は、上記第1の書き込み部13やサンプルRAMブロック4内のサンプル変換部22(図4において後述する)および演算部5における処理において利用あるいは参照される。
【0078】
次に、上記のように構成されたAS−RAMブロック3の動作を説明する。なお、上述のように、図1のデータ入力部1には、図15のようなビットストリーム中に含まれる各情報がその順番に沿って入力されている。よって、AS−RAMブロック3にアロケーション情報が転送される前にデータ入力部1に入力されたヘッダ情報およびCRC情報については、以下の処理が既に行われている。
【0079】
すなわち、まず最初に、ヘッダ情報がデータ入力部1より入力され、それがデータ入力部1内のヘッダレジスタ1aに記憶される。次に、CRC情報がデータ入力部1より入力され、それがCRCチェック部2に転送される。そして、CRCチェック部2によって、そのフレーム内にビット・エラーが存在するかどうかが調べられる。
【0080】
次に、アロケーション情報がデータ入力部1より入力されると、それがシリアルデータの形で第1のS/P変換部11に転送される。第1のS/P変換部11では、アロケーション情報がシリアルデータの形からパラレルデータの形に1ワード毎に変換される。そして、このようにしてパラレル変換されたアロケーション情報が、アロケーション変換部12を通って第1の書き込み部13に与えられ、AS−RAM14内のアロケーション情報用のフィールドに記憶される。
【0081】
図2に示したAS−RAM14から明らかなように、本実施例では、1つのRAMをアロケーション情報用のフィールド(図中でアロケーションと表記)と scfsi情報用のフィールド(図中で(scfsi) と表記)とスケールファクタ情報用のフィールド(図中でスケールファクタ0,スケールファクタ1,スケールファクタ2と表記)とに分けて使用している。
【0082】
また、上述したように、オーディオデータは32個のサブバンド(サブバンド番号sb=0〜31)に分割され、各サブバンド毎に符号化されており、各サブバンドには2個のチャネル(チャネル番号ch=0または1)が含まれている。そこで、上記した各情報用のフィールドには、各サブバンドの各チャネルについての情報を記憶するためのアドレスが0〜63まで用意されている。
【0083】
上述のアロケーション情報は、各サブバンドの各チャネル毎に1個ずつ用意されていて、図2に示したように〔sb0,ch0〕、〔sb0,ch1〕、〔sb1,ch0〕、………の順でAS−RAM14の専用フィールドに記憶されていく。ただし、レイヤIIでは、サブバンドsb30,sb31についてはアロケーション情報は存在せず、最大でサブバンドsb29まで(アドレス59まで)アロケーション情報が記憶される。
【0084】
ところで、アロケーション情報は、それより後に入力される scfsi情報、スケールファクタ情報およびサンプルデータの要素分割処理や、PCMデータを生成するための復号処理など、種々の処理に利用されるデータである。このため、それらの処理を行うたびに、表1のような複雑なテーブル情報を参照するのは不便である。
【0085】
そこで、本実施例においては、このような不便を解消するために、アロケーション変換部12を用いてアロケーション情報を例えば次の表5に示すようなアロケーションコードにあらかじめ変換した上でAS−RAM14に記憶するようにしている。
【0086】
【表5】
【0087】
表5に示したアロケーションコードは、その最上位ビット(MSB)でサンプル情報であるかサンプルコード情報であるかを示しており、下位4ビットでサンプル情報のビット幅を示している。すなわち、最上位ビットが“0”の場合はそのサンプルデータがサンプル情報であることを示し、“1”の場合はサンプルコード情報であることを示している。また、下位4ビットで示される2進数の値がサンプル情報のビット幅を示している。
【0088】
なお、先に示した表1からも明らかなように、サンプル情報のビット幅が1ビットということはないので、下位4ビットの0001(2) には、サンプル情報のビット幅が16ビットであるという情報を割り当てている。また、アロケーションコードが00000(2) の場合は、対応するサブバンド、チャネルには scfsi情報、スケールファクタ情報およびサンプル情報の何れも存在しないことを示している。
【0089】
次に、scfsi 情報がデータ入力部1より入力されると、それがシリアルデータの形で第1のS/P変換部11に転送される。第1のS/P変換部11では、scfsi 情報がシリアルデータの形からパラレルデータの形に要素単位(2ビット)毎に変換される。そして、このようにしてパラレル変換された scfsi情報は、第1の書き込み部13に与えられ、AS−RAM14に記憶される。
【0090】
この scfsi情報の書き込み時には、第1の読み出し部15によって、AS−RAM14に既に記憶されているアロケーション情報が若いアドレスから順に読み出され、それが“0”でないことが確認されてから書き込まれる。上述したように、アロケーション情報が“0”の場合は、対応するサブバンド、チャネルには
scfsi情報が存在しないからである。
【0091】
すなわち、まず、アドレス0のデータ(サブバンドsb0、チャネルch0のアロケーション情報が含まれる)が読み出される。そして、その読み出されたアロケーション情報が“0”でない場合は、そのアロケーション情報と、上記要素単位にパラレル変換された scfsi情報とがアドレス0に再度書き込まれる。また、アロケーション情報が“0”の場合は、そのアロケーション情報のみがアドレス0に再度書き込まれる。
【0092】
以下、同様の処理がアドレス63まで(ただし、レイヤIIの場合はアドレス59まで)繰り返し行われる。これにより、AS−RAM14には、アロケーション情報と scfsi情報とがそれぞれ専用のフィールド(図2において、アロケーション、(scfsi) で示された領域)に記憶される。
【0093】
次に、スケールファクタ情報がデータ入力部1より入力されると、それがシリアルデータの形で第1のS/P変換部11に転送される。第1のS/P変換部11では、スケールファクタ情報がシリアルデータの形からパラレルデータの形に変換される。そして、このようにしてパラレル変換されたスケールファクタ情報は、第1の書き込み部13に与えられ、AS−RAM14に記憶される。
【0094】
このスケールファクタ情報の書き込み時には、第1の読み出し部15により、AS−RAM14に既に記憶されているアロケーション情報と scfsi情報とが若いアドレスから順に読み出され、それらの内容を確認しながら書き込まれる。すなわち、まず最初に、アドレス0のデータ(サブバンドsb0、チャネルch0のアロケーション情報および scfsi情報が含まれる)が読み出される。そして、その読み出されたアロケーション情報が“0”でないかどうかが確認される。
【0095】
ここで、読み出されたアロケーション情報が“0”ならば、対応するサブバンドsb0、チャネルch0にスケールファクタ情報は存在しないので、そのアドレス0にはスケールファクタ情報は書き込まれない。一方、アロケーション情報が“0”でないならば、続けて scfsi情報の値が確認され、そのサブバンドsb0、チャネルch0にスケールファクタ情報が何個存在するかが判断される。
【0096】
そして、このような判断が行われた後、シリアルデータの形で入力されたスケールファクタ情報が第1のS/P変換部11でパラレル変換され、このパラレル変換されたスケールファクタ情報と上記第1の読み出し部15によって読み出されたアロケーション情報とが、アドレス0に再度書き込まれる。
【0097】
このときスケールファクタ情報は、AS−RAM14内のスケールファクタ0,スケールファクタ1,スケールファクタ2の全てのフィールドに書き込まれる。例えば、表2から分かるように、scfsi 情報の値が10(2) の場合、スケールファクタ情報は1個しか存在しないが、その1個の値aがスケールファクタ0〜2の全てのフィールドに書き込まれる。
【0098】
ところで、scfsi 情報は、それより後に入力されるスケールファクタ情報が各サブバンドの各チャネルに何個存在するかを示すだけものである。したがって、この scfsi情報を一度読み出してスケールファクタ情報の個数を確認すれば、その後は不要なものとなる。
【0099】
そこで、本実施例では、スケールファクタ情報の書き込みに際して、上記アロケーション情報と共に読み出された scfsi情報は、アドレス0に再度書き込まないようにしている。そして、図2に示したように、スケールファクタ0のフィールドの一部を上記 scfsi情報のフィールドに重複させてスケールファクタ情報を書き込むようにしている。すなわち、本実施例では、scfsi 情報が既に書き込まれたフィールドにスケールファクタ情報の一部を上書きするようにして記憶させるようにしている。
【0100】
以下、同様の処理がアドレス63まで(ただし、レイヤIIの場合はアドレス59まで)繰り返し行われる。これにより、AS−RAM14には、アロケーション情報とスケールファクタ情報とがそれぞれ専用のフィールド(図2において、アロケーション、スケールファクタ0,スケールファクタ1,スケールファクタ2で示された領域)に記憶される。
【0101】
このように、本実施例では、1つのAS−RAM14をアロケーション情報用のフィールドと scfsi情報用のフィールドとスケールファクタ情報用のフィールド(その一部を上記 scfsi情報のフィールドと重複させている)とに分けて使用し、scfsi 情報を一度読み出した後は、その後に入力されるスケールファクタ情報で上書きするようにしている。
【0102】
したがって、本実施例によれば、AS−RAM14の全記憶領域の中の一部をscfsi 情報を一時記憶するためのメモリエリアとスケールファクタ情報の一部を一時記憶するためのメモリエリアとで共用することができる。このため、scfsi 情報専用のバッファメモリを用意しなくても済むので、scfsi 情報専用のバッファメモリが別個に設けられていた従来技術に比べて、全体の記憶容量を削減することができるようになる。
【0103】
なお、以上の実施例では、アロケーション情報、scfsi 情報およびスケールファクタ情報を1つのAS−RAM14に記憶していくようにしている。しかし、本発明においては、1つのRAMに少なくとも scfsi情報とスケールファクタ情報とを記憶するようにすれば良く、必ずしもアロケーション情報を同じRAM内に記憶させる必要はない。
【0104】
次に、サンプルデータがデータ入力部1より入力されると、それが図1のサンプルRAMブロック4に転送される。なお、上記サンプルデータは、図3の矢印で示す順番に従ってデータ入力部1に入力される。
【0105】
すなわち、各サンプルデータをsp(ch,sb,GR)で定義(1フレーム中で時間軸方向に36個存在するサンプルデータを3個ずつまとめた各グループ0〜11内の番号をGR(= 0〜2)で表した)すると、sp(0,0,0) 、sp(0,0,1) 、sp(0,0,2) 、sp(1,0,0) 、sp(1,0,1) 、sp(1,0,2) 、sp(0,1,0) 、………、sp(1,31,2)の順番でデータ入力部1に入力され、サンプルRAMブロック4に転送されていく。
【0106】
このサンプルRAMブロック4は、図4に示すように、第2のS/P変換部21と、サンプル変換部22と、サンプル書き込み手段としての第2の書き込み部23と、サンプルRAM24と、サンプル読み出し手段としての第2の読み出し部25とにより構成されている。
【0107】
ここで、上記第2のS/P変換部21は、データ入力部1からシリアルデータの形で送られてくるサンプル(もしくはサンプルコード)情報をパラレルデータの形に変換するものである。上記サンプル変換部22は、サンプルコード情報が入力された場合にそれを分解して3つのサンプル情報に変換するものである。
【0108】
また、上記サンプルRAM24は、パラレル変換されたサンプル情報を一時記憶するものであり、上記第2の書き込み部23および第2の読み出し部25によって読み書きが行われるようになっている。なお、このサンプルRAM24の1ワードは、サンプル情報の最大ビット幅である16ビット(2バイト)に合わせて設計されている。
【0109】
上記データ入力部1よりサンプルRAMブロック4にシリアルデータの形で転送されてきたサンプルデータは、まず第2のS/P変換部21に入力される。第2のS/P変換部21では、上記サンプルデータがシリアルデータの形からパラレルデータの形に2バイト毎に変換される。そして、このパラレル変換されたサンプルデータがサンプル変換部22を通って第2の書き込み部23に与えられ、サンプルRAM24に記憶される。
【0110】
なお、このサンプルデータの書き込みの際には、データ入力部1から転送されてくるサンプルデータのビット数がカウントされると同時に、図2のAS−RAM14から各サブバンド、チャネルのアロケーション情報が若いアドレスから順に読み出される。これにより、どのサブバンド、チャネルに対応するサンプルデータが転送されてきているのかが常に監視されている。
【0111】
すなわち、サンプルデータの書き込み時には、AS−RAM14から読み出されるアロケーション情報をもとにサンプルデータのビット幅や、そのサンプルデータがサンプル情報であるのかサンプルコード情報であるのかが確認される。
【0112】
そして、入力されたサンプルデータがサンプルコード情報である場合は、そのサンプルコード情報は、サンプル変換部22によって3つのサンプル情報に分解された後で、上記サンプルRAM24に記憶される。なお、サンプルコード情報から3つのサンプル情報を抽出するには、以下のような処理が行われる。
【0113】
ただし、s[i] (i= 0〜2):3つのサンプル情報
c :初期値はサンプルコード情報
nelvels :3or5or9
% :余り
div :商
【0114】
図4から明らかなように、本実施例による第2の書き込み部23は、ビット幅が異なる複数のサンプル情報を、サンプルRAM24の1ワードに1つずつ書き込むのではなく、先に書き込んだサンプル情報に続けて詰めて書き込むようにしている。
【0115】
これにより、サンプルRAM24の1つのアドレス内には幾つものサンプル情報が記憶されるようになる。また、斜線部で示したように、1つのアドレス内の残りの記憶領域で足りないときは、次のアドレスの記憶領域も使って1つのサンプル情報が記憶される、つまり、1つのサンプル情報が2つのアドレスにまたがって記憶されることが頻繁に発生する。
【0116】
すなわち、サンプルRAM24には、複数のサンプル情報がsp(0,0,0) 、sp(0,0,1) 、sp(0,0,2) 、sp(1,0,0) 、sp(1,0,1) 、sp(1,0,2) 、sp(0,1,0) 、………、sp(1,31,2)の順番で若いアドレスから順に詰めて記憶されていく。このように、本実施例においては、サンプルRAM24に記憶されるサンプル情報の境界と各アドレスの境界とが一致しないので、アラインメントがとれていないと言える。以下では、この状態をミスアライン状態と呼ぶことにする。
【0117】
以上のようにして、アロケーション情報、スケールファクタ情報およびサンプル情報がAS−RAM14およびサンプルRAM24に順に記憶されていき、ある程度の量が記憶されると、それらが第1および第2の読み出し部15,25によって読み出され、演算部5に与えられる。
【0118】
上記第2の読み出し部25は、サンプルRAM24にミスアライン状態で記憶された複数のサンプル情報を1つずつ読み出すとともに、その読み出したサンプル情報と、所定の逆量子化係数Dとを加算して出力する。
【0119】
すなわち、この第2の読み出し部25は、サンプル情報がサンプルRAM24の1つのアドレス内に記憶されているときは、そのアドレスから1つのサンプル情報を取り出す。また、サンプル情報が2つのアドレスにまたがって記憶されているときは、その2つのアドレスから1つのサンプル情報を取り出す。その際、取り出したサンプル情報の最上位ビット(MSB)を反転する。
【0120】
そして、このようにしてMSBを反転した状態で取り出したサンプル情報S”と、所定の逆量子化係数Dとを加算する。なお、サンプルRAM24から読み出されるサンプル情報に加算される逆量子化係数Dは、上記アロケーション情報の値に応じて決められる。
【0121】
次に示す図5は、上記第2の読み出し部25の構成を示すブロック図である。図5に示したように、第2の読み出し部25は、サンプル指定手段31と、第1および第2のラッチ手段32,33と、第1および第2のサンプル取出手段34,35と、判別手段36と、切り替え手段37と、加算手段38とにより構成されている。
【0122】
上記サンプル指定手段31は、サンプルRAM24から読み出そうとするサンプル情報のアドレスやそのアドレス内での位置を指定するものである。第1のラッチ手段32は、上記サンプル指定手段31により指定されたアドレスから読み出されるデータ(幾つかのサンプル情報を含んでいる)を順次ラッチするものであり、本実施例では16ビットで構成されている。第2のラッチ手段33は、上記第1のラッチ手段32の出力を順次ラッチするものであり、同じく16ビットで構成されている。
【0123】
第1のサンプル取出手段34は、上記第2のラッチ手段33にラッチされている16ビットデータから1つのサンプル情報を取り出すものである。この第1のサンプル取出手段34は、1つのサンプル情報が1つのアドレス内に記憶されている場合に、そのアドレスの16ビットデータを用いて、読み出そうとする1つのサンプル情報のみを取り出す。
【0124】
具体的には、図6の(1)に示すように、第2のラッチ手段33にラッチされている16ビットデータ中に含まれる1つのサンプル情報(図6(a)の斜線で示した部分)が1ワードの先頭にくるように所定ビットだけ右シフトするとともに、シフトされたサンプル情報(図6(b)の斜線部分)以外の1ワード内のビットを全て“0”にセットすることにより、読み出そうとする1つのサンプル情報のみを取り出す。このとき、得られたサンプル情報のMSBをビット反転する。
【0125】
また、第2のサンプル取出手段35は、上記第1および第2のラッチ手段32,33にラッチされている各16ビットデータから1つのサンプル情報を取り出すものである。この第2のサンプル取出手段35は、1つのサンプル情報が2つのアドレスにまたがって記憶されている場合に、その2つのアドレスの各16ビットデータを用いて、読み出そうとする1つのサンプル情報のみを取り出す。
【0126】
具体的には、図6の(2)に示すように、第2のラッチ手段33にラッチされている16ビットデータ中に含まれる1つのサンプル情報の一部分(図6(d)の斜線部分)が1ワードの先頭にくるように所定ビットだけ右シフトする。また、第1のラッチ手段32にラッチされている16ビットデータ中に含まれる上記1つのサンプル情報の残りの部分(図6(c)の斜線部分)が上記右シフトされたサンプル情報の後に続くように所定ビットだけ左シフトすることにより、読み出そうとする1つのサンプル情報を生成する(図6(e)の斜線部分)。
【0127】
そして、このようにして生成したサンプル情報以外の1ワード内のビットを全て“0”にセットするとともに、得られたサンプル情報のMSBをビット反転することにより、2つのアドレスの各16ビットデータから、読み出そうとする1つのサンプル情報のみを取り出す。
【0128】
判別手段36は、サンプルRAM24から読み出そうとする1つのサンプル情報が、サンプルRAM24の1つのアドレス内に記憶されているのか、あるいは、2つのアドレスにまたがって記憶されているのかを判別する。切り替え手段37は、上記判別手段36による判別結果に応じて、上記第1のサンプル取出手段34または第2のサンプル取出手段35の何れかに切り替え、何れかの取出手段によって取り出されたサンプル情報S”を次段の加算手段38に出力する。
【0129】
加算手段38は、MSBを反転した状態で取り出されたサンプル情報S”と、アロケーション情報より得られる逆量子化係数Dとを加算するものである。この加算結果(S”+D)は、図1の演算部5に与えられ、逆量子化処理および逆スケーリング処理に利用される。
【0130】
図7は、図5に示した第2の読み出し部25を具体的に実施した場合の構成を示す回路図である。
図7において、40は第1のアドレスジェネレータであり、図5のサンプル指定手段31と判別手段36とを含んでいる。41,42は第1、第2のアロケーションレジスタであり、AS−RAM14より入力されるアロケーション情報をラッチする。
【0131】
ここで、上記第1のアロケーションレジスタ41は、チャネルch0 に対応するアロケーション情報をラッチし、上記第2のアロケーションレジスタ42は、チャネルch1 に対応するアロケーション情報をラッチする。以下では、第1のアロケーションレジスタ41にラッチされるアロケーション情報の値をal0 で表し、第2のアロケーションレジスタ42にラッチされるアロケーション情報の値をal1 で表す。
【0132】
上述したように、レイヤIIの場合、アロケーション情報は、表5に示したようなMPEG1規格に基づく所定のアロケーションテーブルを参照して、対応するサンプル情報のビット幅を表す値に事前に変換され、それが上記AS−RAM14に記憶されている。したがって、上記アロケーション情報の値al0 ,al1 は、それぞれ対応するサンプル情報のビット幅を示している。
【0133】
43はアロケーションデコーダであり、上記第1および第2のアロケーションレジスタ41,42からアロケーション情報を順次入力し、次の表6に示す処理内容に従って所定値を表すデータを出力する。
【0134】
【表6】
【0135】
例えば、入力されるアロケーション情報に対応するチャネル番号がch=0で、グループ内番号がGR=0の場合は、上記所定値を表すデータとして“0”を出力する。また、入力されるアロケーション情報に対応するチャネル番号がch=0で、グループ内番号がGR=1の場合は、そのアロケーション情報に対応するサンプル情報のビット幅そのものを上記所定値として出力する。他のチャネル番号、グループ内番号を有するアロケーション情報が入力されたときは、表6の対応する計算式に従って所定値を計算し、それを出力する。
【0136】
44は第1の加算器であり、上記第1および第2のアロケーションレジスタ41,42にラッチされたアロケーション情報の値al0 ,al1 を用いて、
(al0 +al1 )×3
の演算を行う。45は第1の選択器であり、上記第1および第2のアロケーションレジスタ41,42にラッチされたアロケーション情報のうち、何れか一方を選択して出力する。
【0137】
46は第2の加算器であり、上記第1の加算器44から出力されるデータと第2のレジスタ49から出力されるデータとを加算する。ここで、上記第2のレジスタ49は、第2の選択器47から出力されるデータをラッチするものであり、上記第2の選択器47は、上記第2の加算器46から出力されるデータと第1のレジスタ48から出力されるデータとの何れかを選択するものである。
【0138】
また、上記第1のレジスタ48は、上記第2のレジスタ49から出力されるデータをラッチするものである。なお、デコード処理の初期段階においては、サンプル情報sp(0,0,0) のMSBの位置を示す値がこの第1のレジスタ48に記憶されている。
【0139】
50は第3の加算器であり、上記アロケーションデコーダ43から出力されるデータと上記第2のレジスタ49から出力されるデータとを加算する。51は第3の選択器であり、上記第3の加算器50から出力されるデータと第4の加算器53から出力されるデータとの何れかを選択する。ここで、上記第4の加算器53は、アドレスレジスタ52から出力されるデータに16(10)(=1000(2) )を加えて出力するものである。
【0140】
上記アドレスレジスタ52は、上記第3の選択器51から出力されるデータをラッチするものである。このアドレスレジスタ52にラッチされたデータは、サンプルRAM24から読み出そうとしているサンプル情報のアドレスやそのアドレス内でのMSBの位置を示している。
【0141】
54はデコーダであり、上記第1の選択器45から出力されるデータと上記第3の加算器50から出力されるデータの下位4ビットとを加算し、その加算結果が17(10)以上になったかどうかを判別する。そして、加算結果が17(10)以上であるときは出力が“Hi”、17(10)より小さいときは出力が“Lo”となる制御信号OF−Pを次のマシンサイクルで出力する。このデコーダ54は、図5に示した判別手段36に対応するものである。
【0142】
55は第1のサンプルレジスタであり、サンプルRAM24の各アドレスより読み出される16ビットデータを順次ラッチする。56は第2のサンプルレジスタであり、上記第1のサンプルレジスタ55から出力されるデータを順次ラッチする。これらの第1および第2のサンプルレジスタ55,56は、それぞれ図5に示した第1および第2のラッチ手段32,33に対応するものである。
【0143】
57はデータジェネレータであり、上記第1および第2のサンプルレジスタ55,56にそれぞれラッチされた16ビットデータの中から、読み出すべき1つのサンプル情報S”のみを取り出すとともに、その取り出したサンプル情報S”に逆量子化係数Dを加算する。このデータジェネレータ57は、図5に示した第1および第2のサンプル取出手段34,35、切り替え手段37および加算手段38を具備している。
【0144】
次に、図7のように構成したサンプル記憶ブロックの動作について説明する。ここでは、一連の動作をサイクルで区切って説明することにする。まず、図7中の点線で囲んだ第1のアドレスジェネレータ40の動作について説明する。
【0145】
▲1▼第1サイクル
まず始めに、AS−RAM14よりサブバンドsb0 ,チャネルch0 に対応するアロケーション情報、およびサブバンドsb0 ,チャネルch1 に対応するアロケーション情報が入力され、それぞれ第1および第2のアロケーションレジスタ41,42にラッチされる。
【0146】
それと同時に、第2の選択器47では、端子A側に入力されるデータが選択される。これにより、第1のレジスタ48に記憶されているデータが第2のレジスタ49にラッチされる。デコード開始時は、第1のレジスタ48には初期値“0”がセットされているので、第2のレジスタ49には“0”がラッチされる。
【0147】
また、アロケーションデコーダ43では、上記第1および第2のアロケーションレジスタ41,42にラッチされたアロケーション情報に応じて所定の値が計算され、それが第3の加算器50に出力される。例えば、チャネル番号がch=0で、グループ内番号がGR=0の場合は、先に示した表6の処理内容に従って所定値“0”が出力される。
【0148】
また、第1の選択器45では、端子A側が選択される。これにより、上記第1のアロケーションレジスタ41にラッチされたアロケーション情報がデコーダ54に出力される。
【0149】
デコーダ54は、上記第1の選択器45から出力されるデータと第3の加算器50から出力されるデータの下位4ビットとを加算し、その加算結果が17(10)以上となるかどうかを判別する。
【0150】
上記第3の加算器50から出力されるデータの下位4ビットは、サンプルRAM24から読み出そうとしているサンプル情報のMSBのワード内位置を示すものである。また、第1の選択器45から出力されるデータは、そのサンプル情報のビット幅を示すものである。よって、デコーダ54における上記加算結果は、読み出そうとしているサンプル情報の最下位ビット(LSB)の位置を示すことになる。
【0151】
したがって、この加算結果の値が17(10)以上であるときは、その読み出そうとしているサンプル情報がサンプルRAM24の2つのアドレスにまたがって記憶されていると判断することができる。
【0152】
デコーダ54は、このような判別結果に応じて“Hi”または“Lo”の値を持つ制御信号OF−Pを次の第2サイクルで出力し、それを第3の選択器51の制御端に供給する。なお、第1サイクルにおいては、第3の選択器51では端子A側が選択されている。これにより、第3の加算器50から出力されるデータが選択されて次段のアドレスレジスタ52に出力される。
【0153】
▲2▼第2サイクル
次に、上記第3の選択器51から出力されるデータがアドレスレジスタ52にラッチされる。このとき、アドレスレジスタ52の下位4ビットを除く上位ビットのデータは、サンプルRAM24から読み出そうとしているサンプル情報のMSBが記憶されているアドレスを示している。
【0154】
この上位ビットのデータは、サンプルRAM24の図示しないアドレス入力部に送られる。これにより、その指定されたアドレスに記憶されている16ビットデータが読み出され、それが次の第3サイクルで第1のサンプルレジスタ55にラッチされる。
【0155】
また、この第2サイクルでは、上記第1サイクルでデコーダ54に入力されたデータに応じて制御信号OF−Pの値が決められる。制御信号OF−Pの値が“Hi”であれば、第3の選択器51では端子B側に入力されるデータが選択される。これにより、アドレスレジスタ52にラッチされたデータに16(10)の値を加算したデータが第3の選択器51より出力される。一方、制御信号OF−Pの値が“Lo”であれば、第3の選択器51では端子A側に入力されるデータが選択される。これにより、上記第1サイクルと同じ値が第3の選択器51より出力される。
【0156】
▲3▼第3サイクル
上記第3の選択器51から出力されるデータがアドレスレジスタ52ラッチされる。このとき、アドレスレジスタ52の下位4ビットを除く上位ビットのデータは、読み出そうとしているサンプル情報のLSBが記憶されているアドレスを示している。この上位ビットのデータは、上記した第2サイクルと同様に、サンプルRAM24の図示しないアドレス入力部に送られる。
【0157】
これにより、その指定されたアドレスに記憶されている16ビットデータが読み出され、それが次の第4サイクルで第1のサンプルレジスタ55にラッチされる。このとき、上記第2サイクルで第1のサンプルレジスタ55にラッチされた16ビットデータは、同じく次の第4サイクルで第2のサンプルレジスタ56にラッチされる。
【0158】
それと同時に、次のアロケーション情報が第1および第2のアロケーションレジスタ41,42にラッチされる。また、第2の選択器47では、端子B側に入力されるデータ、すなわち、第2の加算器46による加算結果が選択される。
【0159】
上記第1サイクルで第1および第2のアロケーションレジスタ41,42にラッチされたアロケーション情報の値をそれぞれal00,al10とすると、上記第2の加算器46から出力されるデータの値は、第2のレジスタ49内のデータが“0”であることから、
(al00+al10)×3
である。よって、第2のレジスタ49には、この値が新たにラッチされる。
【0160】
また、第1の選択器45では、端子A側が選択され、これにより、この第3サイクルで第1のアロケーションレジスタ41にラッチされたアロケーション情報al01がデコーダ54に出力される。デコーダ54は、上記第1の選択器45から出力されるデータと第3の加算器50から出力されるデータの下位4ビットとを加算し、その加算結果が17(10)以上となるかどうかを判別する。これにより、次に読み出すべきサンプル情報がサンプルRAM24において2つのアドレスにまたがって記憶されているかどうかを判断する。
【0161】
デコーダ54は、このような判別結果に応じて“Hi”または“Lo”の値を持つ制御信号OF−Pを次の第4サイクルで出力し、それを第3の選択器51の制御端に供給する。なお、第3サイクルにおいては、第3の選択器51では端子A側が選択される。これにより、第3の加算器50から出力されるデータが選択されて次段のアドレスレジスタ52に出力される。
【0162】
▲4▼第4サイクル
上記第3の選択器51から出力されるデータがアドレスレジスタ52ラッチされる。このとき、アドレスレジスタ52の下位4ビットを除く上位ビットのデータは、次に読み出すべきサンプル情報のMSBが記憶されているアドレスを示している。この上位ビットのデータは、上記した第2サイクルと同様に、サンプルRAM24の図示しないアドレス入力部に送られる。
【0163】
これにより、その指定されたアドレスに記憶されている16ビットデータが読み出され、それが次の第5サイクルで第1のサンプルレジスタ55にラッチされる。このとき、上記第3サイクルで第1のサンプルレジスタ55にラッチされた16ビットデータは、同じく次の第5サイクルで第2のサンプルレジスタ56にラッチされる。
【0164】
▲5▼第5サイクル
上記した第3サイクルと同じ処理が実行される。
【0165】
以上のような処理を繰り返して行うことにより、まず、図3中の時間軸方向で見たサンプルNo.0、チャネルch0 、各サブバンドsb0 〜31に対応するサンプル情報の読み出しを実行する。また、次のステップで、時間軸方向で見たサンプルNo.0、チャネルch1 、各サブバンドsb0 〜31に対応するサンプル情報の読み出しを実行する。
【0166】
なお、サブバンドsb0 、チャネルch1 に対応するサンプル情報の読み出し時には、第2の選択器47で端子A側のデータを最初に選択することにより、第2のレジスタ49にラッチされているデータを第1のレジスタ48にラッチする。
【0167】
以下、時間軸方向で見たサンプルNo.1、2 についても同様の読み出し処理を実行する。そして、グループ0のサンプル情報の読み出しが終了し、次にグループ1のサンプル情報の読み出しを開始するときには、始めに第1のレジスタ48の値を更新する。すなわち、グループ0についての演算後には、第2のレジスタ49に次の(式8)に示す値が保持されており、この値を第1のレジスタ48にラッチすることにより値を更新する。
【0168】
【数3】
【0169】
そして、以上に述べたのと同様の処理をグループ0〜11まで実行することにより、1フレーム分のサンプル情報の読み出し処理を終了する。
【0170】
次に、上記した第1〜第5サイクルの処理の並行して行われるデータジェネレータ57での処理内容を、図6をもとに説明する。
上述したように、このデータジェネレータ57は、第1および第2のサンプルレジスタ55,56にそれぞれラッチされている16ビットデータの中から、読み出すべき1つのサンプル情報S”のみを取り出すとともに、その取り出したサンプル情報S”にレイヤIIでの逆量子化係数Dを加算する処理を実行する。
【0171】
図7に示したように、データジェネレータ57は、アドレスレジスタ52にラッチされているデータの下位4ビットi、第1の選択器45から出力されるアロケーション情報j、デコーダ54から出力される制御信号OF−Pをそれぞれ入力している。そして、データジェネレータ57は、これらのデータ値を制御入力として1つのサンプル情報を取り出す。
【0172】
ここで、アドレスレジスタ52にラッチされているデータの下位4ビットiの値は、サンプルRAM24から読み出そうとしているサンプル情報のワード内位置を示すものである。また、上記アロケーション情報jの値は、上記読み出そうとしているサンプル情報のビット幅を示すものである。また、デコーダ54から出力される制御信号OF−Pの値は、上記読み出そうとしているサンプル情報がサンプルRAM24内において2つのアドレスにまたがって記憶されているかどうかを示すものである。
【0173】
上記制御信号OF−Pの値が“Lo”のときは、図6の(1)に示したように、第2のサンプルレジスタ56にラッチされている16ビットデータをiビットだけ右シフトすることにより、その16ビットデータ中に含まれる1つのサンプル情報が1ワードの先頭にくるようにする。
【0174】
それとともに、そのシフトされたサンプル情報以外の1ワード内の(16−j)ビットを全て“0”にセットすることにより、読み出そうとする1つのサンプル情報のみを取り出す。このとき、得られたサンプル情報のMSBをビット反転することにより、目的のサンプル情報S”を得る。
【0175】
また、制御信号OF−Pの値が“Hi”のときは、図6の(2)に示したように、第2のサンプルレジスタ56にラッチされている16ビットデータをiビットだけ右シフトすることにより、その16ビットデータ中に含まれる1つのサンプル情報の一部分が1ワードの先頭にくるようにする。
【0176】
それとともに、第1のサンプルレジスタ55にラッチされている16ビットデータを(16−i)ビットだけ左シフトすることにより、その16ビットデータ中に含まれる上記1つのサンプル情報の残りの部分が上記iビットだけ右シフトされたサンプル情報の後に続くようにする。これにより、読み出そうとする1つのサンプル情報を生成する。
【0177】
そして、このようにして生成したサンプル情報以外の残りの(16−j)ビットを全て“0”にセットするとともに、得られたサンプル情報のMSBをビット反転することにより、2つのアドレスの各16ビットデータから、読み出そうとする1つのサンプル情報S”のみを取り出す。
【0178】
次に、以上のようにして取り出したサンプル情報S”にアロケーション情報jに応じた値を持つ逆量子化係数Dを加算することにより、上記した(式1)中の(S”+D)の値を得る。
【0179】
このように、本実施例では、サンプルRAM24にミスアライン状態で記憶されたサンプル情報を1つずつ読み出すことができるような構成(第2の読み出し部25)を設けたので、第2の書き込み部23によってサンプルRAM24の記憶領域にビット幅が異なる複数のサンプル情報を順に詰めて書き込むことが可能となり、1つのアドレス内に幾つものサンプル情報を記憶することができるようになった。
【0180】
これにより、サンプルRAM24の全記憶領域の中でサンプル情報が記憶されない無駄な領域をなくすことができ、サンプルRAM24の記憶領域を有効に使うことができるようになる。また、記憶するサンプル情報の数だけアドレスを用意しなくても済むので、1フレームすべてのサンプル情報を記憶するためのサンプルRAM24の記憶容量を可及的に小さくすることができる。
【0181】
また、本実施例では、1つのサンプル情報がサンプルRAM24内の2つのアドレスにまたがって記憶されることがあるので、1つのサンプル情報S”を取り出す際には、メモリアドレスへのアクセスを2回にわたって行い、それにより得られる各データを第1および第2のサンプルレジスタ55,56にラッチする。そして、その各データから1つのサンプル情報を取り出すようにしている。
【0182】
このため、パイプライン処理で見た場合、このラッチ処理を行っている間に、S”+Dの加算を行う時間が十分に得られる。したがって、本実施例によれば、サンプル情報S”の読み出し処理とS”+Dの加算処理とを1つのマシンサイクルで行うことができる。
【0183】
これに対して従来は、1つのサンプル情報S”を読み出す際にラッチ処理は行われず、また、S”+Dの加算処理は、逆量子化処理や逆スケーリング処理を行うために用意された別個の乗加算器によって行われるようになされていた。このため、従来は、サンプル情報S”の読み出し処理とS”+Dの加算処理とを行うために、2つのマシンサイクルを要していた。
【0184】
以上のようにして、サンプルRAM24からサンプル情報が演算部5に読み出されると、演算部5において、逆量子化処理、逆スケーリング処理および合成サブバンドフィルタ処理によるデコード処理が行われることにより、PCMデータが生成される。
【0185】
なお、このデコード処理を行っている際にも、データ入力部1からオーディオ圧縮データのビットストリームが常に入力され、AS−RAM14およびサンプルRAM24に各情報が順次記憶されていく。
【0186】
このデコード処理では、まずサブバンドサンプル情報Sが求められる。従来、上述のサブバンドサンプル情報Sは、上記した(式1)(式2)の演算式に従って求められていた。表3に示したように、スケールファクタ情報は0〜62の値をとるから、上記(式2)は、その指数を整数部mと分数部nとに分けて次の(式9)のようにように変形することができる。
ファクタ=21−index/3 =2−m(2−n/3) (式9)
ただし、m=−1〜19,n=0〜2
【0187】
したがって、上記(式1)は、この(式9)を用いて次の(式10)のように変形することができる。
S=2−m・(2−n/3×C)×(S”+D)(式10)
さらに、(式10)において、2−n/3×C=C’とすると、
S=2−m・C’×(S”+D) (式11)
となる。
【0188】
本実施例では、この(式11)に基づいて逆量子化演算および逆スケーリング演算を行うことにより、サブバンドサンプル情報Sを求めるようにしている。ここで、(式11)中の2−mの演算はシフト演算によって行うことができるので、上記サブバンドサンプル情報Sは、加算1回、乗算1回、シフト演算1回の演算処理によって求めることができる。
【0189】
周知のように、シフト演算の方が乗算よりも演算負荷はかなり小さいので、本実施例によれば、演算負荷が大きい乗算を2回にわたって行わなければならなかった従来方式に比べて、サブバンドサンプル情報Sを求める際の演算負荷を大幅に小さくすることができる。
【0190】
図8は、このような技術を実施するための構成を簡単に示したブロック図である。
図8において、61は演算式生成手段であり、MPEG規格のオーディオ圧縮データに対して逆量子化処理および逆スケーリング処理を行うための演算式であって、従来の規格に基づく演算式を変形して新たな演算式を生成する。
【0191】
すなわち、コンパクトディスク等の図示しない外部メディアから入力されるオーディオ圧縮データ中に含まれるスケールファクタ情報の値によって特定される演算値の指数を整数部と分数部とに分離するようにして従来の(式1)を変形し、上記した本実施例の(式11)による演算式を生成する。
【0192】
62は乗加算手段であり、上記演算式生成手段61によって生成された演算式に基づいて、入力されるオーディオ圧縮データに対して上記整数部に関する演算以外の演算を乗加算によって行う。すなわち、上記(式11)中のC’×(S”+D)の演算を行う。
【0193】
63はシフト手段であり、上記乗加算手段62により行われた演算結果に対して、上記演算式生成手段61によって生成された演算式における上記整数部に関する演算をシフト処理によって行う。すなわち、上記(式11)中の2−mを乗ずる演算を行うことにより、サブバンドサンプル情報Sを求め、それをVベクタRAMブロック7へ出力する。
【0194】
これから分かるように、乗加算手段62は、図5に示した加算手段38を含んでおり、(S”+D)の値はサンプルRAMブロック4において既に求められている。また、上記乗加算手段62の中の乗算を行う部分とシフト手段63は、演算部5に含まれており、ここで(式11)中の残りの演算が行われる。
【0195】
上記演算部5は、図9に示すように、第1セレクタ70と、第1レジスタ71と、第2レジスタ72と、乗算器73と、バレルシフタ74と、加算器75と、第1アキュムレータ76と、第2アキュムレータ77と、第2セレクタ78と、丸め及びオーバーフロー補正回路79と、第1の反転器80とにより構成されている。
【0196】
そして、上記サンプルRAMブロック4内の加算手段38で計算された(S”+D)の値が、第1セレクタ70を介して第1レジスタ71に転送されて保持される。それと同時に、上記サンプル情報S”に対応するサブバンド、チャネルのスケールファクタ情報がAS−RAM14から読み出され、その値に応じた係数C’が係数ROMブロック6から読み出される。このようにして読み出された係数C’は、演算部5内の第2レジスタ72に転送されて保持される。
【0197】
図9に示したように、係数ROMブロック6は、種々の係数が記憶された複数の係数ROM81〜83と、第1の符号反転器84と、第2のアドレスジェネレータ85とにより構成されている。そして、与えられるアロケーション情報およびスケールファクタ情報に応じて第2のアドレスジェネレータ85により読み出しアドレスが指定され、その指定されたアドレスから所定の係数が読み出され、読み出された係数の符号が第1の符号反転器84で適宜反転されて出力されるようになっている。
【0198】
なお、上記複数の係数ROM81〜83のうち、C’係数ROM81は、上記した(式11)中の係数C’の値を記憶したものである。また、D係数ROM82は、PCMデータを生成する際に利用されるウィンドウ係数Di の値を記憶したものである。さらに、Nik係数ROM84は、Vベクタを求める際に利用されるコサイン関数に関する係数Nikの値を記憶したものである。
【0199】
次に、上記第1レジスタ71に保持された加算結果(S”+D)と、上記第2レジスタ72に保持された係数C’とが乗算器73において乗算される。続いて、この乗算器73における乗算結果{C’×(S”+D)}がバレルシフタ74に与えられ、2−mの分だけシフト処理される。
【0200】
以下に示す表7は、上述のような逆量子化演算および逆スケーリング演算をパイプライン処理によって行った場合にかかる全マシンサイクル数を示すものである。なお、表7中の(a)および(b)は、従来の(式1)に基づいて演算を行った場合のマシンサイクル数を示し、(c)は、本実施例の(式11)に基づいて演算を行った場合のマシンサイクル数を示している。
【0201】
【表7】
【0202】
表7の(a)は、1つの係数ROMに、係数ファクタ,係数C,係数Dの各値を記憶した場合を示すものである。この場合、まず最初に、第1のマシンサイクルでサンプル情報のMSBを反転した値S”と係数Dとを読み出す。次に、第2のマシンサイクルで係数Cを読み出すとともに、上記第1のマシンサイクルで読み出したサンプル情報S”と係数Dとを加算する。
【0203】
次の第3のマシンサイクルでは、係数ファクタを読み出すとともに、上記第2のマシンサイクルで読み出した係数Cと加算結果(S”+D)とを乗算する。そして、第4のマシンサイクルにおいて、上記第3のマシンサイクルで読み出した係数ファクタと乗算結果{C×(S”+D)}とを乗算することにより、サブバンドサンプル情報Sを求める。この第4のマシンサイクルでは、次のサンプル情報S”と係数Dとを読み出しているので、全体としては3マシンサイクルでサブバンドサンプル情報Sが求められる。
【0204】
表7の(b)は、係数ROMを2つ設け、1つ目の係数ROMに係数Dを記憶し、2つ目の係数ROMに係数ファクタと係数Cとを記憶した場合を示すものである。このように係数ROMを2つに分けると、第3のマシンサイクルの段階で次のサンプル情報S”と係数Dとを読み出すことが可能となるので、全体としては2マシンサイクルでサブバンドサンプル情報Sを求めることが可能となる。
【0205】
以上のような従来例に対して、本実施例の動作を示す表7の(c)では、まず第1のマシンサイクルでサンプルRAM24からサンプル情報S”を読み出すとともに、C’係数ROM81から係数C’を読み出す。また、この第1のマシンサイクルでは、上記読み出したサンプル情報S”と係数Dとを加算手段38において加算する処理も併せて行う。
【0206】
上述したように、本実施例では、1つのサンプル情報S”を読み出すために、読み出し処理を2回行っており、サンプルRAM24から1つのサンプル情報S”を取り出すまでに、第1および第2のラッチ手段32,33を用いた合成処理を行っている。よって、パイプライン処理で見た場合、このラッチ処理を行っている間に、S”+Dの加算を行う時間が十分に得られるので、このような加算処理を1マシンサイクルで行うことが可能となっている。
【0207】
次に、第2のマシンサイクルでは、上記第1のマシンサイクルで読み出した係数C’と加算手段38における加算結果(S”+D)とを乗算するとともに、その乗算結果{C’×(S”+D)}に対して2−mの分だけシフト演算を施す。シフト演算は乗算に比べて演算時間が非常に短くて済むので、同じマシンサイクルの中で上述の乗算とシフト演算とを行うことが可能である。
【0208】
次のサンプル情報(S”+D)と係数C’の読み出しは、第3のマシンサイクルで行われる。これは、上述したように、1つのサンプル情報を読み出すためにサンプルRAM24からの読み出し処理を2回行っているからである。また、係数C’とサンプル情報(S”+D)との乗算および2−mのシフト処理は、第4のマシンサイクルで行われる。
【0209】
このように、本実施例では、サブバンドサンプル情報Sの演算だけをみた場合には2マシンサイクルかかるが、演算器は1マシンサイクルおきに使用される。したがって、空いているマシンサイクルを利用して、後述するPCMデータを算出するための最終演算(Vベクタとウィンドウ係数Di との積和演算)を実行することで、パイプライン処理で見た場合、1マシンサイクルでサブバンドサンプルの演算が行えることになり、演算時間を大幅に短縮することができる。
【0210】
以上のようにしてサブバンドサンプル情報Sが求められると、その求められたサブバンドサンプル情報Sは、データバス10を介してVベクタRAMブロック7に転送されて一時記憶される。
【0211】
このVベクタRAMブロック7は、次の図10に示すように構成されている。すなわち、このVベクタRAMブロック7は、第1のRAM91と、第2のRAM92と、Vベクタ読み出し制御手段としての第3のアドレスジェネレータ93と、Vベクタ読み出し手段としての第3の読み出し部94と、第3の書き込み部95と、符号反転手段としての第2の符号反転器96と、第2の反転器97とを具備している。
【0212】
上記第1のRAM91は、チャネルch0 のサブバンドサンプル情報SおよびVベクタを記憶するものであり、第2のRAM92は、チャネルch1 のサブバンドサンプル情報SおよびVベクタを記憶するものである。
【0213】
すなわち、上記第1および第2のRAM91,92はそれぞれ、各サブバンドに対応する32ワード分のサブバンドサンプル情報Sを記憶するサブバンドサンプルRAM部91a,92aと、このサブバンドサンプル情報Sから求められる512ワード分のVベクタを記憶するVベクタRAM部91b,92bとの2つのRAM部を有している。
【0214】
上記第1のRAM91および第2のRAM92内の各サブバンドサンプルRAM部91a,92aに一時記憶された各32個のサブバンドサンプル情報Sは、演算部5に再び読み出され、ここでVベクタが算出される。
【0215】
図16のステップP13に示したように、従来のMPEGオーディオデコーダにおいては、32個のサブバンドサンプル情報Sから64個のVベクタを求めていた。これに対して本実施例の演算部5では、ある特定のVベクタを32個だけ求めるようにしている。以下に、このことを詳細に説明する。
【0216】
まず最初に、上記64個のVベクタについての相関を表8に示す。
【0217】
【表8】
【0218】
この表8から分かるように、第17番目のVベクタV17〜第32番目のVベクタV32の値は、それぞれ第15番目のVベクタV15〜第0番目のVベクタV0 の値を符号反転したものである。また、第49番目のVベクタV49〜第63番目のVベクタV63の値は、それぞれ第47番目のVベクタV47〜第33番目のVベクタV33の値と同じものである。
【0219】
したがって、与えられる制御信号に応じてVベクタの値を適宜符号反転するようにする機構を設ければ、VベクタV0 〜V16およびVベクタV33〜V48の値を求めるだけで、その求めた値からVベクタV0 〜V63の値を全て得ることができる。また、VベクタV16の値は0であることが分かっているので、これについては演算する必要がない。この結果、V0 〜V15、V33〜V48の32ワード分のVベクタを計算すれば良いことになる。
【0220】
そこで、本実施例では、次の(式12)に示す演算式に従って、32個のサブバンドサンプル情報Sから上述したV0 〜V15、V33〜V48の32個のVベクタを求めるようにしている。
【0221】
【数4】
【0222】
このようにして求められた32個のVベクタは、上記第1のRAM91および第2のRAM92内の各VベクタRAM部91b,92bに転送されて一時記憶される。そして、上記VベクタRAM部91b,92bに一時記憶されたVベクタは、演算部5に再び読み出され、ここで所定の演算が行われることにより、PCMデータが生成される。
【0223】
ここで、演算部5は、VベクタRAM部91b,92bから読み出される複数個のVベクタと係数ROMブロック6から読み出されるウィンドウ係数Di とを用いてPCMデータを1個ずつ生成する。
【0224】
図11は、上記のようにVベクタを求めるとともに、その求めたVベクタからPCMデータを生成するまでの処理、すなわち、合成サブバンドフィルタ処理の動作を示すフローチャートである。なお、ここではチャネルch0 についてのVベクタおよびPCMデータを求める場合を例にとって説明する。
【0225】
図11において、最初にステップP1で、第1のRAM91内のVベクタRAM部91bのアドレスが32ワード分シフトされる。これにより、図12に示したように、VベクタRAM部91bの第0アドレスから第32アドレスまでが空にされ、これから算出するVベクタの記憶領域が確保される。
【0226】
次の表9は、Vベクタを記憶するためのハードウェア上のアドレス(上記VベクタRAM部91bの32個ごとのアドレスに相当)をV’で表し、MPEG規格上のVベクタをVで表して、それらの関係を示したものである。これから分かるように、VベクタRAM部91bの第0アドレス〜第31アドレスには、V0 〜V15、V33〜V48の32ワード分のVベクタが順に記憶されることになる。
【0227】
【表9】
【0228】
そして、ステップP2で、各サブバンドごとに求められた32個のサブバンドサンプル情報Sが演算部5に入力される。次に、ステップP3で、上記ステップP2にて入力された32個のサブバンドサンプル情報Sに基づいて1個のVベクタが算出される。このようにして求められたVベクタは、VベクタRAM部91bの新たに確保された記憶領域(第0アドレス〜第32アドレスの何れか)に一時記憶される。
【0229】
次に、ステップP4で、上記ステップP3にて求められた1個のVベクタと、過去に入力された複数組のサブバンドサンプル情報Sに基づいて既に求められ、VベクタRAM部91bの第32アドレス〜第511アドレスに既に記憶されている複数個のVベクタとがVベクタRAM部91bから読み出される。この読み出しは、第3のアドレスジェネレータ93の下で第3の読み出し部94によって行われる。そして、これらの読み出されたVベクタに基づいて1個のPCMデータが算出される。
【0230】
このVベクタの読み出しに際して、第2の符号反転器96は、上記VベクタRAM部91bから読み出されるVベクタの符号を、第3のアドレスジェネレータ93から与えられる制御信号Sc に応じて反転する。すなわち、第3のアドレスジェネレータ93は、VベクタRAM部91bからVベクタを読み出す際のアドレス指定を制御するとともに、その読み出したVベクタの符号を反転するか否かを指示するための制御信号Sc を第2の符号反転器96に出力する。
【0231】
例えば、VベクタRAM部91bに記憶されているVベクタV0 〜V15あるいはVベクタV33〜V48を演算部5において利用しようとする第1の利用要求信号S1 が与えられたときには、第3のアドレスジェネレータ93は、表9に示したアドレスV’0 〜V’31をそのまま指定する。このとき、符号反転を行わないことを指示するための制御信号Sc を第2の符号反転器96に出力する。
【0232】
また、上記VベクタRAM部91bに記憶されていないVベクタV17〜V32を利用しようとする第2の利用要求信号S2 が与えられたときには、VベクタV17〜V32の値がVベクタV15〜V0 の値を符号反転した値にそれぞれ等しいことから(表8参照)、第3のアドレスジェネレータ93は、表9に示したアドレスV’15〜V’0 を指定する。このとき、符号反転を行うことを指示するための制御信号Sc を第2の符号反転器96に出力する。
【0233】
また、同じくVベクタRAM部91bに記憶されていないVベクタV49〜V63を利用しようとする第3の利用要求信号S3 が与えられたときには、VベクタV49〜V63の値がVベクタV47〜V33の値にそれぞれ等しいことから(表8参照)、第3のアドレスジェネレータ93は、表9に示したアドレスV’30〜V’16を指定する。このとき、符号反転を行わないことを指示するための制御信号Sc を第2の符号反転器96に出力する。
【0234】
次に、上記ステップP4にて求められた1個のPCMデータは、次のステップP5で出力インタフェース部8に転送され、外部に出力される。このとき、出力インタフェース部8は、演算部5によってPCMデータが1個求められる毎にそのPCMデータをアナログ信号に変換して外部に出力する。
【0235】
ここで、上記ステップP3およびステップP4における処理の内容を更に詳しく説明する。従来は、上記した(式7)に示す演算式に従って32個のPCMデータを求めていた。すなわち、Vベクタから生成した複数個のWベクタを用いて32個のPCMデータを求めていた。なお、この(式7)を展開すると、次の(式13)のように表すことができる。
【0236】
【数5】
【0237】
また、この(式13)を(式4)〜(式6)の関係を用いて変形すると、次の(式14)のように表すことができる。本実施例では、この(式14)の演算式に従ってPCMデータを求めるようにしている。
【0238】
【数6】
【0239】
すなわち、(式7)を見てみると、例えばPCMデータPCM0を求めるために用いているVベクタは、V0 ,V96,…,V992 のVベクタであることが分かる。ここで、VベクタV0 は、上記ステップP3にて求められ、VベクタRAM部91bの第0アドレスに記憶されたものである。
【0240】
また、VベクタV96,…,V992 は、過去に入力された複数組のサブバンドサンプル情報Sに基づいて既に求められ、VベクタRAM部91bの第32アドレス〜第511アドレスに既に記憶されているものである(ただし、VベクタV96,…,V992 の値そのものが実際に求められて記憶されているとは限らず、上記の表8に示した相関に基づいて求められた一方のVベクタの値が記憶されていることがある)。
【0241】
したがって、PCMデータPCM0を求めるときには、1個のVベクタV0 のみを求め、残りのVベクタV96,…,V992 をVベクタRAM部91bから読み出せば(第2の符号反転器96によって適宜符号反転する)良いことになる。
【0242】
そこで、図10の第3のアドレスジェネレータ93は、演算部5によりVベクタV0 が算出されたときは、VベクタRAM部91bからVベクタV0 ,V96,…,V992 を読み出すように第3の読み出し部94を制御している。他のPCMデータPCM1〜PCM31 についても同様である。
【0243】
なお、ここでは、演算部5によりVベクタV0 が算出されたときに、VベクタRAM部91bからVベクタV0 ,V96,…,V992 を読み出すようにしているが、VベクタV0 については演算部5により求められたもの自体を使用するようにしてもよい。
【0244】
次に、ステップP6で、32個のPCMデータPCM0〜PCM31 が全て出力されたかどうかが判断される。まだ出力していないPCMデータが残っているときは、ステップP3の処理に戻り、次のPCMデータの生成が行われる。一方、32個のPCMデータが全て出力されたときは、ステップP7に進み、デコード処理を終了するかどうかが判断される。そして、デコード処理を終了しないときは、ステップP1の処理に戻り、次の32個分のPCM演算処理を開始する。
【0245】
以上のように、本実施例によれば、1組のサブバンドサンプル情報Sから生成される64個のVベクタのうち、V0 〜V15、V33〜V48の32個のVベクタのみを求めてそれを各VベクタRAM部91b,92bに記憶するだけで、読み出しの際に64個のVベクタV0 〜V63の値を全て得ることができる。
【0246】
このため、64個のVベクタを全て計算してVベクタRAMに記憶していた従来のMPEGオーディオデコーダに比べ、記憶するVベクタのデータ量を半分に減らすことが可能となり、VベクタRAM部91b,92bのメモリ容量をそれぞれ従来の半分に削減することができる。すなわち、従来は片チャネルで1024ワード分のメモリ容量が必要であったのに対し、本実施例では512ワード分のメモリ容量で済む。
【0247】
なお、上記実施例においては、第2の符号反転器96を設けたので、相互に符号のみが異なるVベクタの組のうちの一方の値のみを求めてVベクタRAM部91b,92bに記憶することができるようになった。しかし、上記第2の符号反転器96は必ずしも設けなくてもよい。
【0248】
上記のように第2の第2の符号反転器96を設けない場合には、相互に等しい値を持つVベクタの組のうちの他方のVベクタだけが、その値を計算して上記VベクタRAM部91b,92bに記憶しておかなくても済むようになるだけであるが、この場合も従来と比較すれば上記VベクタRAM部91b,92bの記憶容量を小さくすることができる。
【0249】
また、上記した(式12)から明らかなように、Vベクタの算出は乗加算によって行われているが、周知のように、乗算は演算負荷が大きい演算である。したがって、本実施例によれば、Vベクタの計算量をも半分に減らすことができているので、演算負荷を小さくできるとともに、処理を高速化することができる利点が得られる。
【0250】
さらに、本実施例では、以上のようなPCMデータを1個ずつ生成して出力するまでの一連の処理をパイプライン処理で行い、1個のPCMデータを外部に出力している間に次の1個のPCMデータを生成するようにしている。そして、この1個のPCMデータの生成処理にかかるマシンサイクル数と出力処理にかかるマシンサイクル数とが同じになるようにしている。
【0251】
したがって、本実施例によれば、複数のVベクタからWベクタを生成することなくPCMデータを1個ずつ生成し、1個のPCMデータを生成している間に前に生成した1個のPCMデータを外部に出力することによってPCMデータを続けて出力するようにすることができる。
【0252】
このため、PCMデータ出力用のメモリおよびPCMデータを生成するためのデータを保持しておくメモリを設けなくても、PCMデータ(オーディオデータ)を絶え間なく外部に出力することができるようになる。
【0253】
図13は、以上のような本実施例のMPEGオーディオデコーダにおける一連のデータ処理の流れを概念的に示す図である。また、この本実施例におけるデータ処理の流れの特徴を分かりやすくするために、その比較例として、従来のMPEGオーディオデコーダにおけるデータ処理の流れを図14に示す。
【0254】
図14から分かるように、従来は、アロケーション情報、scfsi 情報、スケールファクタ情報およびサンプル情報を記憶するためのバッファメモリ(RAM)がそれぞれ専用に設けられていた。そして、それぞれのバッファメモリにそれぞれの情報が記憶されるようになされていた。また、デコード処理では、32個のPCMデータを計算し終わった後に、それらを1個ずつ出力するようになされていた。
【0255】
これに対して、図13に示した本実施例では、1つのAS−RAM14をアロケーション情報用のフィールドと scfsi情報用のフィールドとスケールファクタ情報用のフィールド(その一部を上記 scfsi情報のフィールドと重複させている)とに分けて使用し、scfsi 情報を一度読み出した後は、その後に入力されるスケールファクタ情報で上書きするようにしている。
【0256】
また、デコード処理では、PCMデータを1個ずつ順番に生成し、1個のPCMデータを生成したらそれを直ちに出力していくことによってPCMデータを順に続けて出力することができるようにしている。
【0257】
したがって、本実施例によれば、AS−RAM14の全記憶領域の中の一部を、scfsi 情報を一時記憶するためのメモリエリアとスケールファクタ情報の一部を一時記憶するためのメモリエリアとで共用することができるので、scfsi 情報専用のバッファメモリを用意しなくても良い。また、PCMデータを生成するためのデータを保持しておくメモリも設けなくてもオーディオデータを絶え間なく外部に出力することができる。
【0258】
また、この図13からは明らかでないが、サンプルRAM24の記憶容量や合成サブバンドフィルタ処理の過程で用いられるVベクタRAM部91b,92bの記憶容量が従来に比べて小さくて済むことは、先に示した各図面を用いて説明したとおりである。
【0259】
以上のことより、本実施例のMPEGオーディオデコーダでは、その内部に備えられている種々のバッファメモリの記憶容量をそれぞれ小さくすることができ、全体として見ると、内部メモリの記憶容量を従来よりも格段に小さくすることができている。
【0260】
また、次の表10は、演算部5において32個のPCMデータを求めるのに必要なマシンサイクル数を示したものである。なお、ここでは、従来のMPEG規格に従った処理として表7(b)の場合を用い、本実施例に従った処理として表7(c)の場合を用いて両者を比較している。また、この表10は、積和演算を1マシンサイクルで処理できる装置で比較したものとする。
【0261】
【表10】
【0262】
この表10から明らかなように、本実施例のMPEGオーディオデコーダによれば、32個のPCMデータを生成するのにかかるマシンサイクル数を、従来の約40%に低減することができている。したがって、一連のデコード処理を高速に行うことができるようになる。
【0263】
【発明の効果】
本発明は上述したように、少なくとも scfsi情報およびスケールファクタ情報が一時記憶されるAS−RAMにおいて、上記 scfsi情報が既に記憶されたAS−RAMの所定記憶領域にその後に入力されるスケールファクタ情報の一部を上書きするようにしてスケールファクタ情報を記憶させる scfsi・スケールファクタ書き込み手段を設け、上記AS−RAMの記憶領域の一部を、scfsi 情報を一時記憶しておくための記憶領域と、スケールファクタ情報の一部を一時記憶しておくための記憶領域とで共用させるようにしたので、scfsi 情報専用のバッファメモリを設けなくても済み、オーディオ圧縮データ中に存在する各情報を一時記憶しておくためのメモリの記憶容量を、scfsi 情報を記憶するための専用の記憶領域を設けなくても済む分だけ削減することができる。
【0264】
また、複数のサンプル情報をサンプルRAMの記憶領域に順に書き込むことによりミスアライン状態で記憶させるサンプル書き込み手段と、上記サンプルRAMにミスアライン状態で記憶された複数のサンプル情報を1つずつ取り出して読み出すサンプル読み出し手段とを設けたので、1つのアドレス内に複数のサンプル情報を記憶することができるようになり、サンプルRAMの全記憶領域の中でサンプル情報が記憶されない無駄な領域をなくすことができるとともに、記憶するサンプル数の分だけアドレスを用意しなくても済み、サンプルRAMの記憶容量を可及的に小さくすることができる。
【0265】
また、サブバンドサンプル情報から生成される複数のVベクタのうち、相関関係にあるVベクタのうちの一方のVベクタの値を演算してVベクタRAMに記憶するようにし、利用要求があったVベクタが上記VベクタRAMに記憶されていない場合には、相関関係にあるVベクタを上記VベクタRAMから読み出し、上記読み出したVベクタが相関関係にあることにより等しい値を持つ場合にはそのまま出力するとともに、符号のみが異なる場合には符号反転手段により符号反転して出力するようにしたので、上記相互に等しい値を持つVベクタの組のうちの他方のVベクタおよび相互に符号のみが異なるVベクタの組のうちの他方のVベクタの値を計算して上記VベクタRAMに記憶しておかなくても全てのVベクタの利用要求に応じることができるようになり、上記1組のサブバンドサンプル情報から生成される複数のVベクタの全てが得られるようにするために記憶しなければならないVベクタのデータ量を更に削減することができ、必要な記憶容量を一層小さくすることができる。しかも、合成サブバンドフィルタ処理においてVベクタを求める際の処理時間を短くするすることもできる。
【0266】
また、演算手段により求められた1個のVベクタおよびある1個のPCMデータを生成するのに必要な複数個のVベクタであって、現在のサブバンドサンプル情報の組より前に入力されたサブバンドサンプル情報の組に基づいて既に求められて飛び飛びのアドレスに記憶されたVベクタRAMから読み出されたVベクタと、所定の逆量子化係数とを用いて乗加算を行うことによりPCMデータを1個ずつ生成するようにするとともに、生成する毎に外部に出力するようにしたので、PCMデータ出力用のメモリおよびPCMデータを生成するためのデータを保持しておくメモリを設けなくても、オーディオデータを絶え間なく外部に出力できるようになり、オーディオデータを絶え間なく外部に出力できるようにするために設けなければならないメモリの容量を可及的に少なくすることができる。
【0267】
このように、本発明によれば、一連のデコード処理の過程で得られる種々の情報を一時記憶しておくために用いられるデコーダ内部の各バッファメモリの記憶容量をそれぞれ小さくすることができ、あるいは、メモリ自体を不要とすることができるので、MPEGオーディオデコーダの内部メモリの全体としての記憶容量を従来よりも格段に小さくすることができる。
【0268】
さらに、本発明は上述したように、オーディオ圧縮データ中のスケールファクタ情報の値によって特定される演算値の指数を分数部と整数部とに分離した演算式に基づいて、1回の乗加算演算と1回のシフト演算とによって逆量子化処理および逆スケーリング処理を行うようにしたので、従来は2回にわたって行っていた乗算の一方をシフト演算に置き換えることで演算負荷を著しく小さくすることができる。
【0269】
また、請求項8に記載の発明によれば、ラッチ処理を行うことにより取り出したサンプル情報と所定の逆量子化係数とを加算する加算手段を更に設けたので、ある1つのサンプル情報の取り出し処理を行っている間に、その前に取り出されたサンプル情報を用いて加算処理を行うことができ、上記サンプル情報の取り出し処理と加算処理とを1マシンサイクルで行うことができる。
【0270】
また、請求項12に記載の発明によれば、逆量子化処理および逆スケーリング処理をパイプライン処理によって行うようにしたので、上記サンプル情報を取り出して逆量子化係数を加算する処理と、前のマシンサイクルにおける取り出し処理および加算処理によって得られた情報を用いた乗算処理およびシフト処理とを、全て1マシンサイクルで行うことができ、逆量子化処理および逆スケーリング処理を行うための処理時間を短くすることができる。
【0271】
このように、本発明によれば、逆量子化処理および逆スケーリング処理を行う際にかかる処理時間と、その後の合成サブバンドフィルタ処理においてVベクタを求める際にかかる処理時間とを共に短くすることができるので、一連のデコード処理を従来に比べて極めて高速に行うことができる。
【図面の簡単な説明】
【図1】本発明の一実施例によるMPEGオーディオデコーダの全体構成を示すブロック図である。
【図2】AS−RAMブロックの構成を示すブロック図である。
【図3】本実施例のMPEGオーディオデコーダに入力されるサンプル情報の入力順を示す図である。
【図4】サンプルRAMブロックの構成を示すブロック図である。
【図5】第2の読み出し部の構成を示すブロック図である。
【図6】データジェネレータでの処理内容を説明するための図である。
【図7】図5に示した第2の読み出し部を具体的に実施した場合の構成を示す回路図である。
【図8】逆量子化処理および逆スケーリング処理によってサブバンドサンプル情報を求めるための構成を示すブロック図である。
【図9】演算部および係数ROMブロックの構成を示す図である。
【図10】VベクタRAMブロックの構成を示すブロック図である。
【図11】本実施例のMPEGオーディオデコーダにおける合成サブバンドフィルタ処理の流れを示すフローチャートである。
【図12】本実施例によるVベクタRAM部のアドレスシフト処理を説明するための図である。
【図13】本実施例のMPEGオーディオデコーダにおける一連のデコード処理の流れを示す図である。
【図14】従来のMPEGオーディオデコーダにおける一連のデコード処理の流れを示す図である。
【図15】MPEG1オーディオ規格のレイヤIIによるオーディオ圧縮データのビットストリームを示す図である。
【図16】従来のMPEGオーディオデコーダにおける合成サブバンドフィルタ処理の流れを示すフローチャートである。
【図17】従来のVベクタRAMのアドレスシフト処理を説明するための図である。
【符号の説明】
3 AS−RAMブロック
4 サンプルRAMブロック
5 演算部
6 係数ROMブロック
7 VベクタRAMブロック
8 出力インタフェース部
13 第1の書き込み部
13a 上書き手段
14 AS−RAM
23 第2の書き込み部
24 サンプルRAM
25 第2の読み出し部
31 サンプル指定手段
32 第1のラッチ手段
33 第2のラッチ手段
34 第1のサンプル取出手段
35 第2のサンプル取出手段
36 判別手段
37 切り替え手段
38 加算手段
61 演算式生成手段
62 乗加算手段
63 シフト手段
73 乗算器
74 バレルシフタ
81 C’係数ROM
91a,92a サブバンドサンプルRAM部
91b,92b VベクタRAM部
93 第3のアドレスジェネレータ
94 第2の符号反転器[0001]
[Industrial applications]
The present invention relates to an MPEG audio decoder for decoding audio data compressed by MPEG.
[0002]
[Prior art]
In recent years, a digital audio signal compression technique called MPEG (Moving Picture Image Coding Experts Group) audio has been developed. Currently, MPEG1 is standardized for this MPEG audio. According to the MPEG1 standard, three methods of layer I, layer II, and layer III are prepared according to required sound quality and circuit scale.
[0003]
Further, in the MPEG audio, each mode such as a single channel, a dual channel, a stereo, and a joint stereo is defined as a channel mode of an audio signal. Furthermore, in MPEG audio, various transmission rates (bit rates) and output rates (sampling frequencies) of reproduced audio signals are defined for each channel mode of each layer.
[0004]
For example, in the stereo mode, audio data is divided into 32 sub-bands in Layer I and up to 30 sub-bands in Layer II, and each sub-band includes two channels.
[0005]
FIG. 15 is a diagram illustrating a bit stream of audio data compressed by the layer II of MPEG1. As shown in FIG. 15, one frame of the audio compression data includes header information (HEADER), CRC (Cyclic Redundancy Check) information, allocation (Allocation) information, scfsi information, scale factor information, and scale or scale factor information. It is composed of sample code (Sample / Sample Code) information (hereinafter collectively referred to as sample data), and is input to the MPEG audio decoder in this order.
[0006]
Here, the header information is composed of basic information such as a bit rate, a sampling frequency, and a stereo / monaural channel mode. The CRC information is for checking whether there is any error in the bit stream.
[0007]
The allocation information, the scale factor information, and the sample data are information constituting the audio compressed data body. By processing the sample data according to the allocation information and the scale factor information, audio compressed data is decoded and PCM data is generated.
[0008]
That is, the allocation information is information used at the time of the inverse quantization operation at the time of decoding, and information on the bit width of sample data to be input later and sample code information on whether the sample data is sample information or not. It contains information on what it is. Such information can be known by referring to the table information as shown in Table 1 based on the value of the allocation information and the subband number in accordance with the standard of ISO / IEC 11172 MPEG1 audio layer II.
[0009]
[Table 1]
[0010]
In Table 1, the item indicated by nbal indicates the bit width of the allocation information. When the allocation information has a 4-bit width (subbands sb0 to sb10), the allocation information has 16 values of 0 to 15. Take. When the allocation information has a 3-bit width (subbands sb11 to sb22), the allocation information takes eight values from 0 to 7. When the allocation information has a 2-bit width (subbands sb23 to sb29), the allocation information takes four values of 0 to 3.
[0011]
For example, when the subband number is sb = 2 and the value of the allocation information is 5, it can be seen that there are 63 possible values of the sample data and the bit width of the sample data is 6 bits. When the subband number is sb = 20 and the value of the allocation information is 5, it can be seen that there are 15 possible values of the sample data and the bit width of the sample data is 4 bits.
[0012]
If the sample data has three, five, or nine possible values, the sample data is input in the form of a sample code. Therefore, by seeing the possible values of the sample data with reference to Table 1, it is possible to know whether the sample data is sample information or sample code information.
[0013]
Here, the sample code is a group of three pieces of sample information that exist continuously in the time axis direction in each subband unit into one code. For example, when one sample information can have three possible values, usually three pieces of sample information have 6 bits, but if they are combined into one code, only 5 bits are needed. In addition, when one sample information can have five or nine possible values, three pieces of sample information usually have 9 bits and 12 bits, respectively. Just a bit.
[0014]
Further, the scale factor information is information used at the time of the inverse scaling operation after the above-mentioned inverse quantization operation, and represents a scaling coefficient value which gives an approximate output level. Here, in the case of Layer II, there are 36 pieces of the above-described sample information in the time axis direction for each channel of each subband when viewed in frame units. The 36 pieces of sample information can take different scale factor values for every 12 consecutive pieces of sample information.
[0015]
That is, assuming that scale factor information for the 0th to 11th, 12th to 23rd, and 24th to 35th sample information in the time axis direction is
[0016]
[Table 2]
[0017]
The scfsi information is a parameter indicating how many (1 to 3) scale factor information exists in each channel of each subband, and is used only in layer II. That is, the scfsi information indicates which pattern among the four patterns shown in Table 2.
[0018]
The decoding processing of the audio compressed data having the bit stream as described above is performed as follows. That is, first, subband sample information is obtained by the above-described inverse quantization process and inverse scaling process. Next, PCM data is generated by performing synthesis sub-band filter processing using the sub-band sample information.
[0019]
In general, a conventional MPEG audio decoder is provided with several buffer memories for temporarily storing an input bit stream as shown in FIG. 15 and data obtained in a series of processing steps as described above. I have. For example, a buffer memory for temporarily storing each piece of information in the bit stream, and a primary memory for temporarily storing information called a V vector obtained from subband sample information in the course of the above synthesis subband filter processing. There is a buffer memory called a V vector RAM.
[0020]
The above-described subband sample information S is obtained according to the following arithmetic expression.
S = factor × C × (S ″ + D) (Equation 1)
Here, the factor in (Expression 1) is an operation value specified according to the value of the scale factor information, and if the value of the scale factor information is represented by an index,
Factor = 2 1-index / 3 (Equation 2)
Given by Table 3 shows the relationship between the value (index) of the scale factor information and the value of the above factor.
[0021]
[Table 3]
[0022]
The value S ″ in the above (Equation 1) is obtained by inverting the most significant bit (MSB) of the sample information. Similarly, the values C and D in the (Equation 1) are the predetermined inverse quantization It is a coefficient, and a value is used as shown in the following Table 4. As can be seen from Table 4, different values are used for the coefficients C and D depending on the possible values of the sample information. That is, one of the coefficient values shown in Table 4 is used according to the value of the allocation information.
[0023]
[Table 4]
[0024]
In the calculation for obtaining the subband sample information S shown in the above (Equation 1), first, an inverse quantization operation represented by C × (S ″ + D) is performed, and then, an inverse scaling operation for multiplying by a factor value is performed. The values of the above factors and the values of the coefficients C and D are stored in advance as table information as shown in Tables 3 and 4, respectively.
[0025]
By the way, in order to perform the synthetic subband filter processing for obtaining the PCM data from the subband sample information S obtained as described above, an enormous amount of calculation is required to divide the audio data into 32 subbands. is there. In order to solve this problem, a technique called a polyphase filter bank may be used. The polyphase filter bank is designed so that aliasing is canceled by performing the above-mentioned 32 bands at once by a sophisticated mathematical method, and that the calculation can be performed very efficiently.
[0026]
However, when 32 pieces of PCM data are generated at once using the polyphase filter bank, a memory for PCM data is required at the output stage of the decoder in order to continuously output the generated PCM data. However, there is a problem that the memory capacity to be installed increases.
[0027]
Therefore, a synthesis sub-band filter process has been proposed which eliminates the need for providing an output memory.
FIG. 16 is a flowchart showing the contents of the combined subband filter processing in layers I and II. In FIG. 16, first, in step P11, 32 pieces of subband sample information S obtained for each subband are input to an internal memory (not shown).
[0028]
Then, in step P12, the address of the above-described V vector RAM is shifted by 64 words. Thereby, as shown in FIG. 17, the 0th to 63rd addresses of the V vector RAM are emptied, and a storage area for the V vector calculated from this is secured.
[0029]
Next, in step P13, 64 V vectors are calculated from the 32 pieces of subband sample information S input in step P11. It should be noted that these V vectors are obtained according to the following equation (Equation 3). The V vector obtained in this manner is temporarily stored in a newly secured storage area of the V vector RAM.
[0030]
(Equation 1)
[0031]
The V vector obtained in step P13 is converted to a U vector in the next step P14. The conversion process from the V vector to the U vector is performed according to the following (Equation 4) and (Equation 5).
U [i × 64 + j] = V [i × 128 + j] (Equation 4)
U [i × 64 + 32 + j] = V [i × 128 + 96 + j] (Equation 5)
Where i = 0 to 7, j = 0 to 31
[0032]
As is clear from (Equation 4) and (Equation 5), in order to perform the combined sub-band filter processing, a total of 1024 V vectors including the 64 V vectors obtained in step P13 are obtained. Will be needed. The 1024 V vectors are calculated every 64 pieces from a set of different subband sample information S (one set is 32 pieces), and the 0th address to the 1023th address of the V vector RAM shown in FIG. Is stored.
[0033]
Next, in step P15, a predetermined window coefficient D is added to the U vector converted in step P14. i Is multiplied to calculate 512 W vectors. That is, the W vector is obtained according to the following (Equation 6). The window coefficient D i Is defined by the MPEG standard.
W [i] = U [i] × D i [I] (Equation 6)
Where i = 0 to 511
[0034]
Then, in the next step P16, 32 PCM data are calculated according to the following (Equation 7) using the W vector obtained in the above step P15. The 32 pieces of PCM data thus obtained are output to the outside in the next Step P17.
[0035]
(Equation 2)
[0036]
The decoding process for one frame is completed up to the process in step P17 described above. Thereafter, it is determined in step P18 whether or not the decoding process is to be terminated. If the decoding process is not to be terminated, the process returns to step P11 and the process for the next frame is started.
[0037]
[Problems to be solved by the invention]
As described above, in the conventional MPEG audio decoder, the input stage is provided with the buffer memory for temporarily storing the compressed audio data composed of the bit stream as shown in FIG. The buffer memories are provided with dedicated memories individually for storing information in the bit stream.
[0038]
For this reason, a buffer memory for storing each of these pieces of information needs a large storage capacity corresponding to the total data amount of each piece of information, and there is a problem that the total storage capacity becomes very large.
[0039]
Further, as described above, each sample information included in the audio compression data has a different bit width. Specifically, the bit width of the sample information varies from 2 to 16 bits. For this reason, in the buffer memory for storing the sample information, one word has a 16-bit width so that the sample information having the maximum bit width can be stored at one address.
[0040]
However, since the conventional MPEG audio decoder reads out the sample information in address units, when storing the sample information, each sample information is stored in one address even though the bit width of each sample information is different. Was stored one by one.
[0041]
For this reason, it is good to store the sample information having a 16-bit width. However, when storing the sample information having a bit width smaller than that, the sample information is stored only in a part of one address. Become. As a result, there is a problem that many useless areas in which the sample information is not stored are generated in all the storage areas of the buffer memory for storing the sample information.
[0042]
Further, as is apparent from the above (Equation 1), in the conventional MPEG audio decoder, in order to obtain the sub-band sample information S, it is necessary to perform two processes of an inverse quantization process and an inverse scaling process. , It is necessary to perform a multiplication process in each process.
[0043]
In general, the multiplication process has a large calculation load, and therefore, the conventional method of performing the multiplication process twice has a problem that the calculation load becomes extremely large as a whole and the processing time becomes long.
[0044]
Further, as described above, 1024 V vectors are required for one channel to generate PCM data. Therefore, the above-described V vector RAM requires a memory capacity of at least 1024 words in one channel. This is as shown in FIG.
[0045]
Since the V vector is data having a large amount of information, there is a problem that the storage capacity of the V vector RAM for storing such a large number of V vectors is extremely large.
[0046]
Further, the MPEG audio decoder that performs the processing shown in FIG. 16 first calculates 64 V vectors from one set of subband sample information S. Then, a W vector is calculated using the U vector converted from the 64 V vectors, and 32 PCM data is generated using the W vector. That is, conventionally, it was not possible to generate 32 pieces of PCM data unless the processes of steps P11 to S15 in FIG. 16 were performed.
[0047]
In this case, it is not necessary to provide a memory for PCM data output. It is necessary to provide a memory for holding data for generating data in the arithmetic unit. In general, a memory having a storage capacity of 100 words is often used in order to allow a certain margin.
[0048]
Therefore, the conventional MPEG audio decoder has a problem that a large-capacity memory must be provided in order to continuously output PCM data as audio data to the outside.
[0049]
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described various problems at the same time, and enables the storage capacities of various memories provided in an MPEG audio decoder to be reduced. An object is to enable a series of decoding processes to be performed in a short process.
[0050]
Specifically, first, it is an object of the present invention to reduce the total storage capacity of a buffer memory for temporarily storing each piece of information included in MPEG-compressed audio data. Second, it is an object of the present invention to reduce a calculation load when obtaining subband sample information in a series of decoding processes.
[0051]
Thirdly, it is possible to reduce the storage capacity of a buffer memory for temporarily storing a V vector obtained from subband sample information in the course of synthesis subband filter processing, that is, a V vector RAM. It is an object. Fourth, the object of the present invention is to minimize the capacity of a memory that must be provided for continuously outputting PCM data to the outside.
[0052]
[Means for Solving the Problems]
An MPEG audio decoder according to the present invention is an MPEG audio decoder that generates PCM data by performing inverse quantization, inverse scaling, and synthesis sub-band filtering on input MPEG-compressed audio data. Among various information included in the compressed data, an AS-RAM in which at least scfsi information and scale factor information are temporarily stored in this order, a sample RAM in which sample information included in the audio compressed data is temporarily stored, A subband sample R in which subband sample information obtained by inverse quantization and inverse scaling using the allocation information, scale factor information, and sample information included in the audio compressed data is temporarily stored. AM, a V vector RAM for temporarily storing a V vector obtained in the course of the synthesis sub-band filter processing using the sub-band sample information, and storing the scfsi information in a predetermined storage area of the AS-RAM. A scfsi scale factor writing means for storing scale factor information input after the scfsi information in a storage area in which the scfsi information is stored, and a plurality of sample information in a storage area of the sample RAM. The sample is stored in a misaligned state in which the bit width of each sample information is different from each other so that the boundary between the plurality of sample information does not coincide with the boundary between each address of the sample RAM. Writing means and the sample writing means Sample reading means for taking out and reading out a plurality of pieces of sample information stored in the sample RAM one by one in a misaligned state by a stage; and V vector reading means for reading the V vector stored in the V vector RAM. Calculating means for performing the inverse quantization processing, the inverse scaling processing, and the synthesis sub-band filter processing, wherein the exponent of the operation value specified by the value of the scale factor information is separated into a fraction part and an integer part, and generated. Based on the calculated expression, the operation on the fractional part is performed by multiplication, and the operation on the integer part is performed by shift processing, so that the subband sample information is obtained using the allocation information, scale factor information, and sample information. After obtaining the subband sample information, , One of the correlated V vectors is determined one by one from among the plurality of V vectors generated from the V vector, and the obtained one V vector is read by the V vector reading means. A calculating means for generating PCM data one by one using a plurality of V vectors, and a V which has been requested to use to control the reading operation of the V vector reading means and generate a certain piece of PCM data. A plurality of V-vectors which are already obtained based on the set of sub-band sample information input before the current set of sub-band sample information and are already stored at the discrete addresses of the V vector RAM. The vector is read from the V vector RAM. If the V vector requested to be used is not stored in the V vector RAM, the usage vector is read. V vector read control means for reading from the V vector RAM a V vector having a correlation with the V vector in which the error occurred, and V vector read control means for reading the V vector read from the V vector RAM under the control of the V vector read control means. The apparatus includes sign inverting means for inverting the sign in accordance with a predetermined condition, and output means for outputting the PCM data each time one of the PCM data is generated by the arithmetic means.
[0053]
[Action]
Since the present invention comprises the above technical means, it is unnecessary once read from the AS-RAM to indicate how many scale factor information exists in each sub-band. The nature of the scfsi information, which does not cause any problem, is effectively used, and a part of the storage area of the AS-RAM is used as a storage area for temporarily storing the scfsi information, and is input later. Can be used as a storage area for temporarily overwriting and temporarily storing scale factor information, which eliminates the need to provide a storage area for scfsi information and a storage area for scale factor information separately. Will be done.
[0054]
Further, it is possible to store a plurality of pieces of sample information in one address of the sample RAM in a misaligned state, and one piece of sample information having a bit width less than one word of the storage means is stored in one address as in the related art. Is stored, the conventional inconvenience of causing a useless area in which the sample information is not stored in the entire storage area of the storage means can be eliminated, and the address can be reduced by the number of samples to be stored. You do not need to prepare.
[0055]
Further, in a plurality of V vectors generated from one set of subband sample information, one of the V vectors having a correlation, for example, one of a set of V vectors having mutually equal values. A V vector and one V vector of a set of V vectors differing only in sign from each other are obtained and stored in the V vector RAM, and the V vector requested to be used is stored in the V vector RAM. If not, V vectors having mutually equal values due to the correlation are read from the V vector RAM, and the read V vectors are sign-inverted by sign inversion means according to a predetermined condition. As a result, the other V vector of the set of V vectors having mutually equal values and the other V vector of the set of V vectors having only different signs are different from each other. Without first stored in the V vector RAM to calculate the value of Kuta, it is possible to respond to the use request of all V vectors generated from the set of sub-band sample information.
[0056]
Also, PCM data is directly generated from V vectors already stored at discrete addresses in the V vector RAM, and one PCM data is generated at a time. Also, without providing a memory for holding data for generating PCM data, audio data can be continuously output to the outside.
[0057]
Further, an inverse quantization process and an inverse scaling process performed in a series of decoding processes are performed by separating an exponent of an operation value specified by a value of scale factor information in audio compressed data into a fraction part and an integer part. Based on the formula, the arithmetic processing related to the integer part and the other arithmetic processing are performed separately. In the arithmetic processing related to the integer part, the given information may be processed by a shift operation instead of a multiplication. This makes it possible to reduce the number of times of multiplication with a large computational load in the inverse quantization process and the inverse scaling process as compared with the related art.
[0058]
According to the present invention, when one piece of sample information is taken out, the memory address of the sample RAM is accessed twice, and the data taken out by accessing the memory address twice. Is performed, so that it is possible to sufficiently obtain the time for performing the addition processing with the inverse quantization coefficient using the sample information extracted earlier while performing the extraction processing of the sample information. become.
[0059]
According to the twelfth aspect of the present invention, the shift processing with a small calculation load can be performed in a very short time, and the multiplication processing by the multiplication means and the shift processing by the shift means can be performed in one machine cycle. Therefore, the processing of extracting the sample information and adding the inverse quantization coefficient and the multiplication processing and the shift processing using the information obtained by the extraction processing and the addition processing in the previous machine cycle are all performed in one machine cycle. It is possible to do with.
[0060]
【Example】
An embodiment of the MPEG audio decoder according to the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing the overall configuration of the MPEG audio decoder according to the present embodiment. First, the configuration and operation of each unit will be briefly described with reference to FIG.
[0061]
In FIG. 1,
[0062]
[0063]
[0064]
[0065]
As described above, in the present embodiment, the
[0066]
[0067]
[0068]
Reference numeral 7 denotes a V vector RAM block, which is a sub-band sample information S obtained by the inverse quantization process and the inverse scaling process in the
[0069]
[0070]
[0071]
[0072]
Next, each block of the MPEG audio decoder according to the present embodiment configured as described above will be described in further detail with reference to the following drawings.
[0073]
FIG. 2 is a diagram showing a configuration of the AS-
[0074]
The first S /
[0075]
The AS-
[0076]
As shown in FIG. 2, the
[0077]
The allocation information, scfsi information, and scale factor information read from the AS-
[0078]
Next, the operation of the AS-
[0079]
That is, first, header information is input from the
[0080]
Next, when the allocation information is input from the
[0081]
As is clear from the AS-
[0082]
Further, as described above, the audio data is divided into 32 subbands (subband numbers sb = 0 to 31) and encoded for each subband, and each subband has two channels ( Channel number ch = 0 or 1) is included. Therefore, in the above-mentioned information fields, addresses 0 to 63 for storing information about each channel of each subband are prepared.
[0083]
One piece of the above allocation information is prepared for each channel of each subband, and as shown in FIG. 2, [sb0, ch0], [sb0, ch1], [sb1, ch0],... Are stored in a dedicated field of the AS-
[0084]
By the way, the allocation information is data used for various kinds of processing such as element division processing of scfsi information, scale factor information, and sample data that are input after that, and decoding processing for generating PCM data. For this reason, it is inconvenient to refer to complicated table information such as Table 1 every time these processes are performed.
[0085]
Therefore, in the present embodiment, in order to eliminate such inconvenience, the allocation information is converted in advance to, for example, an allocation code as shown in the following Table 5 using the
[0086]
[Table 5]
[0087]
In the allocation code shown in Table 5, the most significant bit (MSB) indicates whether it is sample information or sample code information, and the lower four bits indicate the bit width of the sample information. That is, when the most significant bit is “0”, it indicates that the sample data is sample information, and when the most significant bit is “1”, it indicates that it is sample code information. The binary value indicated by the lower 4 bits indicates the bit width of the sample information.
[0088]
As is clear from Table 1 described above, since the bit width of the sample information is not 1 bit, the lower 4 bits of 0001 (2) , Information that the bit width of the sample information is 16 bits is assigned. Also, if the allocation code is 000000 (2) Indicates that the corresponding subband and channel do not have any of the scfsi information, the scale factor information, and the sample information.
[0089]
Next, when scfsi information is input from the
[0090]
When writing the scfsi information, the
This is because there is no scfsi information.
[0091]
That is, first, data at address 0 (including allocation information of subband sb0 and channel ch0) is read. If the read allocation information is not “0”, the allocation information and the scfsi information parallel-converted for each element are written again to the
[0092]
Hereinafter, the same processing is repeatedly performed up to the address 63 (however, in the case of the layer II, up to the address 59). As a result, the AS-
[0093]
Next, when scale factor information is input from the
[0094]
When writing the scale factor information, the
[0095]
Here, if the read allocation information is “0”, there is no scale factor information in the corresponding subband sb0 and channel ch0, so that the scale factor information is not written in the
[0096]
After such determination is made, the scale factor information input in the form of serial data is parallel-converted by the first S /
[0097]
At this time, the scale factor information is written in all the fields of the
[0098]
By the way, the scfsi information merely indicates how many scale factor information input after that exists in each channel of each subband. Therefore, once this scfsi information is read and the number of scale factor information is confirmed, it becomes unnecessary thereafter.
[0099]
Therefore, in this embodiment, when writing the scale factor information, the scfsi information read together with the allocation information is not written again to the
[0100]
Hereinafter, the same processing is repeatedly performed up to the address 63 (however, in the case of the layer II, up to the address 59). Thus, the AS-
[0101]
As described above, in the present embodiment, one AS-
[0102]
Therefore, according to the present embodiment, a part of the entire storage area of the AS-
[0103]
In the above embodiment, allocation information, scfsi information, and scale factor information are stored in one AS-
[0104]
Next, when sample data is input from the
[0105]
That is, each sample data is defined by sp (ch, sb, GR) (the numbers in each of
[0106]
As shown in FIG. 4, the
[0107]
Here, the second S /
[0108]
The
[0109]
The sample data transferred from the
[0110]
At the time of writing the sample data, the number of bits of the sample data transferred from the
[0111]
That is, when writing the sample data, the bit width of the sample data and whether the sample data is sample information or sample code information is confirmed based on the allocation information read from the AS-
[0112]
When the input sample data is sample code information, the sample code information is decomposed by the
[0113]
Where s [i] (i = 0 to 2): three pieces of sample information
c: Initial value is sample code information
nelvels: 3or5or9
%: Surplus
div: quotient
[0114]
As is apparent from FIG. 4, the
[0115]
As a result, several pieces of sample information are stored in one address of the
[0116]
That is, the
[0117]
As described above, the allocation information, the scale factor information, and the sample information are sequentially stored in the AS-
[0118]
The
[0119]
That is, when the sample information is stored in one address of the
[0120]
Then, the sample information S ″ extracted with the MSB inverted and the predetermined inverse quantization coefficient D are added. The inverse quantization coefficient D added to the sample information read from the
[0121]
FIG. 5 shown below is a block diagram showing the configuration of the
[0122]
The
[0123]
The first sample extracting means 34 extracts one piece of sample information from the 16-bit data latched by the second latch means 33. When one piece of sample information is stored in one address, the first sample extracting means 34 extracts only one piece of sample information to be read using 16-bit data of the address.
[0124]
Specifically, as shown in FIG. 6A, one sample information included in the 16-bit data latched by the second latch means 33 (the hatched portion in FIG. 6A). ) Is shifted rightward by a predetermined bit so as to be at the beginning of one word, and all bits in one word other than the shifted sample information (the hatched portion in FIG. 6B) are set to “0”. , And extracts only one piece of sample information to be read. At this time, the MSB of the obtained sample information is bit-inverted.
[0125]
The second sample extracting means 35 extracts one piece of sample information from each of the 16-bit data latched by the first and second latch means 32 and 33. When one piece of sample information is stored over two addresses, the second sample extracting means 35 outputs one piece of sample information to be read using each 16-bit data of the two addresses. Take out only.
[0126]
Specifically, as shown in FIG. 6B, a part of one sample information included in the 16-bit data latched by the second latch means 33 (a hatched portion in FIG. 6D). Is shifted rightward by a predetermined bit so that is at the beginning of one word. The remaining part of the one piece of sample information (hatched part in FIG. 6C) included in the 16-bit data latched by the first latch means 32 follows the right-shifted sample information. As described above, one sample information to be read is generated by shifting to the left by a predetermined bit (the hatched portion in FIG. 6E).
[0127]
Then, all the bits in one word other than the sample information generated in this manner are set to “0”, and the MSB of the obtained sample information is bit-inverted, so that the 16-bit data of each of the two addresses is obtained. , And extracts only one piece of sample information to be read.
[0128]
The determination means 36 determines whether one piece of sample information to be read from the
[0129]
The adding means 38 adds the sample information S "taken out with the MSB inverted and the inverse quantization coefficient D obtained from the allocation information. The result of the addition (S" + D) is shown in FIG. And is used for inverse quantization processing and inverse scaling processing.
[0130]
FIG. 7 is a circuit diagram showing a configuration in the case where the
7, reference numeral 40 denotes a first address generator, which includes the
[0131]
Here, the
[0132]
As described above, in the case of Layer II, the allocation information is converted in advance into a value representing the bit width of the corresponding sample information with reference to a predetermined allocation table based on the MPEG1 standard as shown in Table 5, It is stored in the AS-
[0133]
Reference numeral 43 denotes an allocation decoder, which sequentially inputs allocation information from the first and second allocation registers 41 and 42, and outputs data representing a predetermined value in accordance with the processing contents shown in Table 6 below.
[0134]
[Table 6]
[0135]
For example, when the channel number corresponding to the input allocation information is ch = 0 and the group number is GR = 0, “0” is output as data representing the predetermined value. When the channel number corresponding to the input allocation information is ch = 0 and the group number is GR = 1, the bit width itself of the sample information corresponding to the allocation information is output as the predetermined value. When allocation information having another channel number or group number is input, a predetermined value is calculated according to the corresponding calculation formula in Table 6, and the calculated value is output.
[0136]
A
(Al0 + al1) × 3
Is calculated. A
[0137]
A second adder 46 adds the data output from the
[0138]
The
[0139]
A
[0140]
The address register 52 latches data output from the
[0141]
A
[0142]
[0143]
[0144]
Next, the operation of the sample storage block configured as shown in FIG. 7 will be described. Here, a series of operations will be described while being divided into cycles. First, the operation of the first address generator 40 surrounded by a dotted line in FIG. 7 will be described.
[0145]
(1) First cycle
First, the allocation information corresponding to the sub-band sb0 and the channel ch0 and the allocation information corresponding to the sub-band sb0 and the channel ch1 are input from the AS-
[0146]
At the same time, the
[0147]
Further, the allocation decoder 43 calculates a predetermined value according to the allocation information latched by the first and second allocation registers 41 and 42, and outputs the calculated value to the
[0148]
Further, the
[0149]
The
[0150]
The lower 4 bits of the data output from the
[0151]
Therefore, the value of this addition result is 17 (10) In this case, it can be determined that the sample information to be read is stored across two addresses of the
[0152]
The
[0153]
(2) Second cycle
Next, the data output from the
[0154]
The data of the upper bits is sent to an address input unit (not shown) of the
[0155]
In the second cycle, the value of the control signal OF-P is determined according to the data input to the
[0156]
(3) Third cycle
The data output from the
[0157]
As a result, the 16-bit data stored at the specified address is read out and latched in the
[0158]
At the same time, the next allocation information is latched in the first and second allocation registers 41 and 42. The
[0159]
Assuming that the values of the allocation information latched in the first and second allocation registers 41 and 42 in the first cycle are al00 and al10, respectively, the value of the data output from the second adder 46 is the second value. Since the data in the
(Al00 + al10) × 3
It is. Therefore, this value is newly latched in the
[0160]
In the
[0161]
The
[0162]
4) 4th cycle
The data output from the
[0163]
As a result, the 16-bit data stored at the specified address is read out and latched in the
[0164]
5) 5th cycle
The same processing as in the third cycle is performed.
[0165]
By repeating the above processing, first, the sample No. viewed in the time axis direction in FIG. 0, channel ch0, and reading of sample information corresponding to each of the subbands sb0 to sb31. Further, in the next step, the sample No. viewed in the time axis direction was used. 0, the channel ch1, and the reading of the sample information corresponding to each of the subbands sb0 to sb31.
[0166]
When reading the sample information corresponding to the sub-band sb0 and the channel ch1, the data on the terminal A is first selected by the
[0167]
Hereinafter, the sample No. viewed in the time axis direction. The same readout processing is executed for 1 and 2. When the reading of the sample information of
[0168]
(Equation 3)
[0169]
Then, by executing the same processing as described above for
[0170]
Next, processing contents of the
As described above, the
[0171]
As shown in FIG. 7, the
[0172]
Here, the value of the lower 4 bits i of the data latched in the
[0173]
When the value of the control signal OF-P is "Lo", the 16-bit data latched in the
[0174]
At the same time, by setting all (16-j) bits in one word other than the shifted sample information to “0”, only one piece of sample information to be read is extracted. At this time, the target sample information S ″ is obtained by bit inverting the MSB of the obtained sample information.
[0175]
When the value of the control signal OF-P is "Hi", the 16-bit data latched in the
[0176]
At the same time, by shifting the 16-bit data latched in the
[0177]
Then, the remaining (16-j) bits other than the sample information generated in this manner are all set to “0”, and the MSB of the obtained sample information is bit-inverted, whereby each 16 bits of the two addresses is obtained. Only one piece of sample information S ″ to be read is extracted from the bit data.
[0178]
Next, by adding the inverse quantization coefficient D having a value corresponding to the allocation information j to the sample information S ″ extracted as described above, the value of (S ″ + D) in the above (Equation 1) is added. Get.
[0179]
As described above, in the present embodiment, the configuration (second reading unit 25) capable of reading out the sample information stored in the
[0180]
As a result, an unnecessary area in which the sample information is not stored in the entire storage area of the
[0181]
Further, in this embodiment, since one sample information may be stored across two addresses in the
[0182]
For this reason, as seen from the pipeline processing, a sufficient time for adding S ″ + D is obtained while the latch processing is being performed. Therefore, according to the present embodiment, the reading of the sample information S ″ is performed. The processing and the addition processing of S ″ + D can be performed in one machine cycle.
[0183]
On the other hand, conventionally, the latch process is not performed when one piece of sample information S ″ is read, and the addition process of S ″ + D is a separate process prepared for performing the inverse quantization process and the inverse scaling process. It was intended to be performed by a multiply-adder. For this reason, conventionally, two machine cycles were required to perform the reading process of the sample information S ″ and the adding process of S ″ + D.
[0184]
As described above, when the sample information is read from the
[0185]
During the decoding process, the bit stream of the audio compression data is always input from the
[0186]
In this decoding process, first, subband sample information S is obtained. Conventionally, the above-described subband sample information S has been obtained in accordance with the above-described equations (Equation 1) and (Equation 2). As shown in Table 3, the scale factor information takes a value of 0 to 62. Therefore, in the above (Equation 2), the exponent is divided into an integer part m and a fraction part n as shown in the following (Equation 9). It can be transformed as follows.
Factor = 2 1-index / 3 = 2 -M (2 -N / 3 (Equation 9)
However, m = −1 to 19, n = 0 to 2
[0187]
Therefore, the above (Equation 1) can be transformed into the following (Equation 10) using this (Equation 9).
S = 2 -M ・ (2 -N / 3 × C) × (S ″ + D) (Equation 10)
Further, in (Equation 10), 2 -N / 3 × C = C ′,
S = 2 -M C ′ × (S ″ + D) (Equation 11)
It becomes.
[0188]
In the present embodiment, the sub-band sample information S is obtained by performing an inverse quantization operation and an inverse scaling operation based on (Equation 11). Here, 2 in (Equation 11) -M Can be performed by a shift operation, so that the sub-band sample information S can be obtained by one addition, one multiplication, and one shift operation.
[0189]
As is well known, the operation load of the shift operation is much smaller than that of the multiplication. Therefore, according to the present embodiment, the sub-band operation is larger than that of the conventional method in which the multiplication operation having a large operation load has to be performed twice. The calculation load for obtaining the sample information S can be significantly reduced.
[0190]
FIG. 8 is a block diagram simply showing a configuration for implementing such a technique.
In FIG. 8,
[0191]
That is, the exponent of the operation value specified by the value of the scale factor information included in the audio compression data input from an external medium (not shown) such as a compact disc is separated into an integer part and a fraction part. The equation (1) is modified to generate the operation equation according to (equation 11) of the above-described embodiment.
[0192]
Reference numeral 62 denotes a multiplication / addition unit, which performs multiplication and addition on the input audio compressed data other than the operation related to the integer part based on the operation expression generated by the operation
[0193]
[0194]
As can be seen, the multiplying and adding means 62 includes the adding means 38 shown in Fig. 5, and the value of (S "+ D) has already been obtained in the
[0195]
As shown in FIG. 9, the
[0196]
Then, the value of (S "+ D) calculated by the adding means 38 in the
[0197]
As shown in FIG. 9, the
[0198]
The C ′
[0199]
Next, the addition result (S ″ + D) held in the
[0200]
Table 7 below shows the total number of machine cycles when the above-described inverse quantization operation and inverse scaling operation are performed by pipeline processing. Note that (a) and (b) in Table 7 show the number of machine cycles when the calculation is performed based on the conventional (Equation 1), and (c) shows the number of machine cycles in the present embodiment (Equation 11). It shows the number of machine cycles when the calculation is performed based on the above.
[0201]
[Table 7]
[0202]
(A) of Table 7 shows a case where the values of the coefficient factor, the coefficient C, and the coefficient D are stored in one coefficient ROM. In this case, first, the value S ″ obtained by inverting the MSB of the sample information and the coefficient D are read out in the first machine cycle. Next, the coefficient C is read out in the second machine cycle, and the first machine cycle is read out. The sample information S ″ read in the cycle and the coefficient D are added.
[0203]
In the next third machine cycle, the coefficient factor is read out, and the coefficient C read out in the second machine cycle is multiplied by the addition result (S ″ + D). The sub-band sample information S is obtained by multiplying the coefficient factor read in the third machine cycle by the multiplication result {C × (S ″ + D)}. In the fourth machine cycle, the next sample information S ″ and coefficient D are read, so that the sub-band sample information S is obtained in three machine cycles as a whole.
[0204]
(B) of Table 7 shows a case where two coefficient ROMs are provided, the coefficient D is stored in the first coefficient ROM, and the coefficient factor and the coefficient C are stored in the second coefficient ROM. . When the coefficient ROM is divided into two in this way, the next sample information S ″ and the coefficient D can be read at the stage of the third machine cycle, so that the subband sample information can be read in two machine cycles as a whole. S can be obtained.
[0205]
In contrast to the conventional example described above, in Table 7 (c) showing the operation of this embodiment, first, the sample information S ″ is read from the
[0206]
As described above, in the present embodiment, the reading process is performed twice in order to read one sample information S ″, and the first and second reading processes are performed until the one sample information S ″ is taken out from the
[0207]
Next, in the second machine cycle, the coefficient C ′ read in the first machine cycle is multiplied by the addition result (S ″ + D) by the addition means 38, and the multiplication result {C ′ × (S ″) + D)} for 2 -M The shift operation is performed by the amount of. Since the operation time of the shift operation is much shorter than that of the multiplication, the above-described multiplication and the shift operation can be performed in the same machine cycle.
[0208]
The reading of the next sample information (S ″ + D) and the coefficient C ′ is performed in the third machine cycle, and as described above, the reading process from the
[0209]
As described above, in the present embodiment, when only the operation of the subband sample information S is viewed, it takes two machine cycles, but the arithmetic unit is used every other machine cycle. Therefore, a final operation (V vector and window coefficient D i By performing the sum-of-products operation, the operation of the sub-band samples can be performed in one machine cycle, as seen in the pipeline processing, and the calculation time can be greatly reduced.
[0210]
When the sub-band sample information S is obtained as described above, the obtained sub-band sample information S is transferred to the V vector RAM block 7 via the
[0211]
The V vector RAM block 7 is configured as shown in FIG. That is, the V vector RAM block 7 includes a
[0212]
The
[0213]
That is, the first and
[0214]
The 32 pieces of sub-band sample information S temporarily stored in the respective sub-band
[0215]
As shown in step P13 in FIG. 16, in the conventional MPEG audio decoder, 64 V vectors are obtained from 32 pieces of subband sample information S. On the other hand, the
[0216]
First, Table 8 shows the correlation for the 64 V vectors.
[0217]
[Table 8]
[0218]
As can be seen from Table 8, the seventeenth V vector V 17 To the 32nd V vector V 32 Are respectively the fifteenth V vector V Fifteen 0th V vector V 0 Is the sign of which is inverted. The 49th V vector V 49 To the 63rd V vector V 63 Are the 47th V vector V 47 To the 33rd V vector V 33 Is the same as the value of
[0219]
Therefore, if a mechanism for appropriately inverting the sign of the value of the V vector according to a given control signal is provided, the V vector V 0 ~ V 16 And V vector V 33 ~ V 48 Of the V vector V from the obtained value. 0 ~ V 63 Can be obtained. Also, the V vector V 16 Is known to be 0, so there is no need to operate on this. As a result, V 0 ~ V Fifteen , V 33 ~ V 48 It is only necessary to calculate the V vector for 32 words.
[0220]
Therefore, in the present embodiment, the above-described V is obtained from the 32 pieces of subband sample information S in accordance with the following equation (Expression 12) 0 ~ V Fifteen , V 33 ~ V 48 Of 32 V vectors are obtained.
[0221]
(Equation 4)
[0222]
The 32 V vectors obtained in this way are transferred to the V
[0223]
Here, the
[0224]
FIG. 11 is a flowchart showing the processing of obtaining the V vector as described above and generating PCM data from the obtained V vector, that is, the operation of the synthesis sub-band filter processing. Here, a case where the V vector and PCM data for channel ch0 are obtained will be described as an example.
[0225]
In FIG. 11, first, in step P1, the address of the V
[0226]
In the following Table 9, V 'represents an address on the hardware for storing the V vector (corresponding to the address of each of the 32 V
[0227]
[Table 9]
[0228]
Then, in step P2, the 32 pieces of subband sample information S obtained for each subband are input to the
[0229]
Next, at step P4, the V vector already obtained based on one V vector obtained at step P3 and a plurality of sets of sub-band sample information S input in the past, the 32nd A plurality of V vectors already stored at the address to the 511st address are read from the V
[0230]
When reading the V vector, the
[0231]
For example, the V vector V stored in the V
[0232]
Also, the V vector V not stored in the V
[0233]
Also, the V vector V that is not stored in the
[0234]
Next, one piece of PCM data obtained in the above step P4 is transferred to the
[0235]
Here, the contents of the processing in step P3 and step P4 will be described in more detail. Conventionally, 32 pieces of PCM data have been obtained according to the above-described equation (7). That is, 32 pieces of PCM data are obtained using a plurality of W vectors generated from V vectors. By expanding this (Equation 7), it can be expressed as the following (Equation 13).
[0236]
(Equation 5)
[0237]
Also, when this (Equation 13) is modified using the relations of (Equations 4) to (Equation 6), it can be expressed as the following (Equation 14). In this embodiment, the PCM data is obtained according to the equation (Equation 14).
[0238]
(Equation 6)
[0239]
That is, looking at (Equation 7), for example, the PCM data PCM 0 The V vector used to determine 0 , V 96 , ..., V 992 It can be seen that this is the V vector. Here, V vector V 0 Are obtained in the above step P3 and stored at the 0th address of the V
[0240]
Also, the V vector V 96 , ..., V 992 Are obtained based on a plurality of sets of subband sample information S input in the past, and are already stored in the 32nd to 511st addresses of the V
[0241]
Therefore, PCM data PCM 0 , One V vector V 0 Only the remaining V vector V 96 , ..., V 992 Is read from the V
[0242]
Therefore, the
[0243]
Here, the V vector V 0 Is calculated, the V
[0244]
Next, in Step P6, the 32 PCM data PCM 0 ~ PCM 31 Are output. If PCM data that has not yet been output remains, the process returns to step P3, and the next PCM data is generated. On the other hand, when all 32 pieces of PCM data have been output, the process proceeds to step P7, where it is determined whether the decoding process is to be terminated. If the decoding process is not to be ended, the process returns to the process of step P1, and the next 32 PCM calculation processes are started.
[0245]
As described above, according to the present embodiment, of the 64 V vectors generated from one set of subband sample information S, V 0 ~ V Fifteen , V 33 ~ V 48 Of the V
[0246]
For this reason, it is possible to reduce the amount of V vector data to be stored by half compared with the conventional MPEG audio decoder in which all 64 V vectors are calculated and stored in the V vector RAM. , 92b can be reduced to half of the conventional memory capacity. In other words, while the memory capacity for 1024 words is conventionally required for one channel, the memory capacity for 512 words is sufficient in this embodiment.
[0247]
In the above-described embodiment, since the
[0248]
In the case where the second
[0249]
Further, as is apparent from the above (Equation 12), the calculation of the V vector is performed by multiplication and addition, but as is well known, multiplication is an operation with a large calculation load. Therefore, according to the present embodiment, the amount of calculation of the V vector can be reduced to half, so that there is an advantage that the calculation load can be reduced and the processing can be speeded up.
[0250]
Further, in the present embodiment, a series of processing from generating and outputting one piece of PCM data as described above is performed by pipeline processing, and the following processing is performed while one piece of PCM data is output to the outside. One piece of PCM data is generated. Then, the number of machine cycles required for the process of generating one piece of PCM data is the same as the number of machine cycles required for the output process.
[0251]
Therefore, according to the present embodiment, PCM data is generated one by one without generating a W vector from a plurality of V vectors, and one PCM data previously generated while generating one PCM data is generated. By outputting the data to the outside, the PCM data can be continuously output.
[0252]
Therefore, PCM data (audio data) can be continuously output to the outside without providing a memory for outputting PCM data and a memory for holding data for generating PCM data.
[0253]
FIG. 13 is a diagram conceptually showing a flow of a series of data processing in the MPEG audio decoder of the present embodiment as described above. FIG. 14 shows a flow of data processing in a conventional MPEG audio decoder as a comparative example in order to make the characteristics of the flow of data processing in this embodiment easy to understand.
[0254]
As can be seen from FIG. 14, conventionally, a dedicated buffer memory (RAM) for storing allocation information, scfsi information, scale factor information, and sample information has been provided. Then, each information is stored in each buffer memory. In addition, in the decoding process, after calculating 32 PCM data, they are output one by one.
[0255]
On the other hand, in the present embodiment shown in FIG. 13, one AS-
[0256]
In the decoding process, PCM data is generated one by one in order, and once one piece of PCM data is generated, the PCM data is output immediately so that the PCM data can be output in succession.
[0257]
Therefore, according to the present embodiment, a part of the entire storage area of the AS-
[0258]
Although it is not clear from FIG. 13, the fact that the storage capacity of the
[0259]
As described above, in the MPEG audio decoder of the present embodiment, the storage capacities of the various buffer memories provided therein can be made smaller, and the storage capacities of the internal memories can be reduced as a whole as compared with the related art. It can be much smaller.
[0260]
Table 10 below shows the number of machine cycles required to calculate 32 pieces of PCM data in the
[0261]
[Table 10]
[0262]
As is apparent from Table 10, according to the MPEG audio decoder of the present embodiment, the number of machine cycles required to generate 32 PCM data can be reduced to about 40% of the conventional one. Therefore, a series of decoding processes can be performed at high speed.
[0263]
【The invention's effect】
As described above, according to the present invention, in an AS-RAM in which at least scfsi information and scale factor information are temporarily stored, the scale factor information which is subsequently input to a predetermined storage area of the AS-RAM in which the scfsi information is already stored is described. A scfsi / scale factor writing unit is provided for storing scale factor information by partially overwriting the storage area. A storage area for temporarily storing the scfsi information is provided in a part of the storage area of the AS-RAM. Since part of the factor information is shared with a storage area for temporarily storing the information, it is not necessary to provide a buffer memory dedicated to the scfsi information, and each information existing in the audio compressed data is temporarily stored. The storage capacity of the memory for storing the information is dedicated to storing the scfsi information. Can be reduced only without providing a storage area requires min.
[0264]
A sample writing means for sequentially writing a plurality of sample information in the storage area of the sample RAM to store the sample information in a misaligned state; and a sample reading means for taking out and reading out the plurality of sample information stored in the sample RAM in a misaligned state one by one. Means, a plurality of sample information can be stored in one address, and a wasteful area in which the sample information is not stored in the entire storage area of the sample RAM can be eliminated. It is not necessary to prepare addresses for the number of samples to be stored, and the storage capacity of the sample RAM can be reduced as much as possible.
[0265]
In addition, among the plurality of V vectors generated from the subband sample information, the value of one of the V vectors having a correlation is calculated and stored in the V vector RAM, and there is a use request. When the V vector is not stored in the V vector RAM, a correlated V vector is read from the V vector RAM, and when the read V vector has an equal value due to the correlation, the V vector is left as it is. In addition to the output, when only the sign is different, the sign is inverted by the sign inverting means and output, so that only the other V vector of the above set of V vectors having mutually equal values and the sign are mutually different. The value of the other V vector in the set of different V vectors can be calculated in response to the use request of all the V vectors without having to calculate the value in the V vector RAM. And the amount of V-vector data that must be stored in order to obtain all of the plurality of V-vectors generated from the set of sub-band sample information can be further reduced. The required storage capacity can be further reduced. In addition, the processing time for obtaining the V vector in the synthesis sub-band filter processing can be shortened.
[0266]
One V vector obtained by the arithmetic means and a plurality of V vectors required to generate one piece of PCM data, which are input before the current set of subband sample information. The PCM data is obtained by performing a multiply-add using the V vector read out from the V vector RAM already obtained based on the set of subband sample information and stored at discrete addresses and a predetermined inverse quantization coefficient. Are generated one by one and are output to the outside each time they are generated. Therefore, it is not necessary to provide a memory for outputting PCM data and a memory for holding data for generating PCM data. Must be provided so that audio data can be continuously output to the outside and audio data can be continuously output to the outside. It is possible to reduce as much as possible the capacity of the memory have.
[0267]
As described above, according to the present invention, it is possible to reduce the storage capacity of each buffer memory inside the decoder used for temporarily storing various information obtained in the course of a series of decoding processes, or Since the memory itself can be dispensed with, the storage capacity of the internal memory of the MPEG audio decoder can be made much smaller than before.
[0268]
Further, as described above, according to the present invention, a single multiplication-and-addition operation is performed based on an arithmetic expression in which an exponent of an operation value specified by a value of scale factor information in audio compressed data is separated into a fraction part and an integer part. Since the inverse quantization process and the inverse scaling process are performed by one shift operation and one shift operation, the operation load can be significantly reduced by replacing one of the multiplications conventionally performed twice by the shift operation. .
[0269]
According to the eighth aspect of the present invention, there is further provided an adding means for adding the sample information extracted by performing the latching process and a predetermined inverse quantization coefficient, so that a process of extracting one piece of sample information is performed. Is performed, the addition process can be performed using the sample information extracted before that, and the sample information extraction process and the addition process can be performed in one machine cycle.
[0270]
According to the twelfth aspect of the present invention, since the inverse quantization process and the inverse scaling process are performed by pipeline processing, a process of extracting the sample information and adding an inverse quantization coefficient, The multiplication processing and the shift processing using the information obtained by the extraction processing and the addition processing in the machine cycle can all be performed in one machine cycle, and the processing time for performing the inverse quantization processing and the inverse scaling processing is reduced. can do.
[0271]
As described above, according to the present invention, it is possible to shorten both the processing time required for performing the inverse quantization processing and the inverse scaling processing and the processing time required for obtaining the V vector in the subsequent synthesis subband filter processing. Therefore, a series of decoding processes can be performed at an extremely high speed as compared with the related art.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an overall configuration of an MPEG audio decoder according to one embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration of an AS-RAM block.
FIG. 3 is a diagram showing an input order of sample information input to the MPEG audio decoder of the embodiment.
FIG. 4 is a block diagram showing a configuration of a sample RAM block.
FIG. 5 is a block diagram illustrating a configuration of a second reading unit.
FIG. 6 is a diagram for explaining processing contents in a data generator.
FIG. 7 is a circuit diagram showing a configuration in a case where the second reading section shown in FIG. 5 is specifically implemented;
FIG. 8 is a block diagram illustrating a configuration for obtaining subband sample information by inverse quantization and inverse scaling.
FIG. 9 is a diagram showing a configuration of a calculation unit and a coefficient ROM block.
FIG. 10 is a block diagram showing a configuration of a V vector RAM block.
FIG. 11 is a flowchart showing a flow of a synthesis sub-band filter process in the MPEG audio decoder of the embodiment.
FIG. 12 is a diagram for explaining an address shift process of a V vector RAM unit according to the embodiment.
FIG. 13 is a diagram showing a flow of a series of decoding processes in the MPEG audio decoder of the embodiment.
FIG. 14 is a diagram showing a flow of a series of decoding processes in a conventional MPEG audio decoder.
FIG. 15 is a diagram illustrating a bit stream of audio compressed data according to Layer II of the MPEG1 audio standard.
FIG. 16 is a flowchart showing a flow of a synthesis sub-band filter process in a conventional MPEG audio decoder.
FIG. 17 is a diagram for explaining an address shift process of a conventional V vector RAM.
[Explanation of symbols]
3 AS-RAM block
4 Sample RAM block
5 Operation part
6 coefficient ROM block
7 V vector RAM block
8 Output interface
13 First writer
13a Overwriting means
14 AS-RAM
23 Second writing unit
24 sample RAM
25 Second reading unit
31 Sample designation means
32. First latch means
33. Second latch means
34 First Sample Removal Means
35 Second sample removal means
36 determination means
37 Switching means
38 Addition means
61 arithmetic expression generation means
62 square addition means
63 shift means
73 Multiplier
74 barrel shifter
81 C 'coefficient ROM
91a, 92a Subband sample RAM section
91b, 92b V vector RAM section
93 Third Address Generator
94 Second sign inverter
Claims (14)
上記オーディオ圧縮データに含まれる各種情報のうち、少なくとも scfsi情報およびスケールファクタ情報がこの順番で一時記憶されるAS−RAMと、
上記オーディオ圧縮データ中に含まれるサンプル情報が一時記憶されるサンプルRAMと、
上記オーディオ圧縮データ中に含まれるアロケーション情報、スケールファクタ情報およびサンプル情報を用いた逆量子化処理および逆スケーリング処理によって求められるサブバンドサンプル情報が一時記憶されるサブバンドサンプルRAMと、
上記サブバンドサンプル情報を用いた合成サブバンドフィルタ処理の過程で求められるVベクタが一時記憶されるVベクタRAMと、
上記AS−RAMの所定記憶領域に上記 scfsi情報を記憶させるとともに、上記 scfsi情報の後に入力されるスケールファクタ情報を上記 scfsi情報が記憶されていた記憶領域に上書きするようにして記憶させる scfsi・スケールファクタ書き込み手段と、
上記サンプルRAMの記憶領域に複数のサンプル情報を順に書き込むようにして、各サンプル情報のビット幅が相互に異なることにより、上記複数のサンプル情報の境界と上記サンプルRAMの各アドレスの境界とが一致していないミスアライン状態で記憶するようにするサンプル書き込み手段と、
上記サンプル書き込み手段によってミスアライン状態で上記サンプルRAMに記憶された複数のサンプル情報を1つずつ取り出して読み出すようにするサンプル読み出し手段と、
上記VベクタRAMに記憶されたVベクタを読み出すためのVベクタ読み出し手段と、
上記逆量子化処理、逆スケーリング処理および合成サブバンドフィルタ処理を行う演算手段であって、上記スケールファクタ情報の値によって特定される演算値の指数を分数部と整数部とに分離して生成した演算式に基づいて、上記分数部に関する演算を乗算によって行うとともに、上記整数部に関する演算をシフト処理によって行うことにより、上記アロケーション情報、スケールファクタ情報およびサンプル情報を用いて上記サブバンドサンプル情報を求めた後、上記サブバンドサンプル情報の1組から生成される複数のVベクタのうち、相関関係にあるVベクタの一方のVベクタを1個ずつ求め、さらに、上記求めた1個のVベクタと、上記Vベクタ読み出し手段により読み出された複数個のVベクタとを用いてPCMデータを1個ずつ生成する演算手段と、
上記Vベクタ読み出し手段の読み出し動作を制御し、ある1個のPCMデータを生成するために利用要求があったVベクタであって、現在のサブバンドサンプル情報の組より前に入力されたサブバンドサンプル情報の組に基づいて既に求められて上記VベクタRAMの飛び飛びのアドレスに既に記憶されている複数個のVベクタを上記VベクタRAMから読み出すようにするとともに、利用要求があったVベクタが上記VベクタRAMに記憶されていない場合には、上記利用要求があったVベクタと相関関係にあるVベクタを上記VベクタRAMから読み出すようにするVベクタ読み出し制御手段と、
上記Vベクタ読み出し制御手段の制御に基づいて上記VベクタRAMから読み出されるVベクタの符号を、所定の条件に応じて反転させる符号反転手段と、
上記演算手段により上記PCMデータが1個生成される毎にそのPCMデータを出力するようにする出力手段とを具備することを特徴とするMPEGオーディオデコーダ。In an MPEG audio decoder that generates PCM data by performing an inverse quantization process, an inverse scaling process, and a synthesis subband filter process on input MPEG compressed audio data,
An AS-RAM in which at least scfsi information and scale factor information among various information included in the audio compressed data are temporarily stored in this order;
A sample RAM for temporarily storing sample information included in the compressed audio data,
A sub-band sample RAM in which sub-band sample information obtained by inverse quantization and inverse scaling using the allocation information, scale factor information, and sample information included in the audio compressed data is temporarily stored;
A V vector RAM for temporarily storing a V vector obtained in the course of a synthesis sub-band filter process using the sub-band sample information;
The scfsi information is stored in a predetermined storage area of the AS-RAM, and the scale factor information input after the scfsi information is stored by overwriting the storage area in which the scfsi information is stored. Factor writing means,
A plurality of sample information is sequentially written in the storage area of the sample RAM, and the bit width of each sample information is different from each other, so that the boundary of the plurality of sample information and the boundary of each address of the sample RAM coincide with each other. Sample writing means for storing in a misaligned state that has not been aligned,
Sample reading means for taking out and reading out a plurality of pieces of sample information stored in the sample RAM one by one in a misaligned state by the sample writing means;
V vector reading means for reading the V vector stored in the V vector RAM;
An arithmetic unit for performing the inverse quantization process, the inverse scaling process, and the synthesis sub-band filter process, wherein the exponent of the arithmetic value specified by the value of the scale factor information is generated by being separated into a fraction part and an integer part. The subband sample information is obtained by using the allocation information, scale factor information and sample information by performing the operation on the fractional part by multiplication and performing the operation on the integer part by shift processing based on the arithmetic expression. After that, among the plurality of V vectors generated from one set of the subband sample information, one V vector of the correlated V vector is obtained one by one. , One PCM data using the plurality of V vectors read by the V vector reading means. Calculating means for generating for,
A V-vector that has been requested to use to control the read operation of the V-vector reading means and generate one piece of PCM data, and is a sub-band input before the current set of sub-band sample information. A plurality of V vectors that have already been obtained based on the set of sample information and that are already stored at the discrete addresses of the V vector RAM are read from the V vector RAM. V vector read control means for reading, from the V vector RAM, a V vector which is correlated with the V vector for which use has been requested, if the V vector is not stored in the V vector RAM;
Sign inverting means for inverting the sign of the V vector read from the V vector RAM under control of the V vector read control means in accordance with a predetermined condition;
Output means for outputting the PCM data each time one of the PCM data is generated by the arithmetic means.
上記書き込み手段により上記AS−RAMに記憶された scfsi情報を読み出す読み出し手段と、
上記読み出し手段により読み出された scfsi情報に応じて認識される数のスケールファクタ情報を、上記 scfsi情報が記憶されていた記憶領域に上書きするようにして記憶させる上書き手段とを具備することを特徴とする請求項1に記載のMPEGオーディオデコーダ。Writing means for storing the scfsi information in a predetermined storage area of the AS-RAM;
Reading means for reading the scfsi information stored in the AS-RAM by the writing means;
Overwriting means for overwriting the number of scale factor information recognized according to the scfsi information read by the reading means into the storage area where the scfsi information is stored. 2. The MPEG audio decoder according to claim 1, wherein
上記サンプル指定手段により指定された上記サンプルRAMの1つのアドレスのデータを順次ラッチする第1のラッチ手段と、
上記第1のラッチ手段から出力されるデータを順次ラッチする第2のラッチ手段と、
上記サンプルRAMから読み出そうとする1つのサンプル情報が、上記サンプルRAMの1つのアドレス内に記憶されているのか、あるいは2つのアドレスにまたがって記憶されているのかを判別する判別手段と、
上記判別手段が1つのアドレス内に記憶されていると判断したときに、上記読み出そうとする1つのサンプル情報を上記第2のラッチ手段にラッチされているデータの中から取り出すようにする第1の取出手段と、
上記判別手段が2つのアドレスにまたがって記憶していると判断したときに、上記読み出そうとする1つのサンプル情報を上記第1のラッチ手段および上記第2のラッチ手段にそれぞれラッチされているデータの中から取り出すようにする第2の取出手段とを具備することを特徴とする請求項1に記載のMPEGオーディオデコーダ。The sample reading means includes a sample specifying means for specifying a position of one piece of sample information to be read from the sample RAM;
First latch means for sequentially latching data at one address of the sample RAM designated by the sample designation means;
Second latch means for sequentially latching data output from the first latch means;
Determining means for determining whether one piece of sample information to be read from the sample RAM is stored in one address of the sample RAM or stored across two addresses;
When the discriminating means determines that the data is stored in one address, the one sample information to be read is taken out from the data latched by the second latch means. 1 taking-out means;
When the determination means determines that the data is stored over two addresses, the one sample information to be read is latched by the first latch means and the second latch means, respectively. 2. The MPEG audio decoder according to claim 1, further comprising second extracting means for extracting data from data.
上記演算式生成手段によって生成された演算式に基づいて、上記加算手段により行われた演算結果に対して上記分数部に関する演算を乗算によって行う乗算手段と、
上記乗算手段により行われた演算結果に対して上記演算式における上記整数部に関する演算をシフト処理によって行うシフト手段とを具備することを特徴とする請求項8に記載のMPEGオーディオデコーダ。The calculation means separates an exponent of a calculation value specified by the value of the scale factor information into a fraction part and an integer part and generates a calculation expression for performing the dequantization processing and the descale processing. Expression generation means;
Multiplication means for performing, on the basis of the operation expression generated by the operation expression generation means, an operation relating to the fractional part with respect to the operation result performed by the addition means, by multiplication;
9. The MPEG audio decoder according to claim 8, further comprising: shifting means for performing an arithmetic operation on the integer part in the arithmetic expression by a shift process on an arithmetic result obtained by the multiplying means.
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17034195A JP3589746B2 (en) | 1995-06-13 | 1995-06-13 | MPEG audio decoder |
| TW085104619A TW316302B (en) | 1995-05-02 | 1996-04-18 | |
| US08/638,230 US5703579A (en) | 1995-05-02 | 1996-04-26 | Decoder for compressed digital signals |
| CN96106224A CN1112047C (en) | 1995-05-02 | 1996-05-02 | Decoder for digitally compressed signals |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17034195A JP3589746B2 (en) | 1995-06-13 | 1995-06-13 | MPEG audio decoder |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08339199A JPH08339199A (en) | 1996-12-24 |
| JP3589746B2 true JP3589746B2 (en) | 2004-11-17 |
Family
ID=15903139
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17034195A Expired - Lifetime JP3589746B2 (en) | 1995-05-02 | 1995-06-13 | MPEG audio decoder |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3589746B2 (en) |
-
1995
- 1995-06-13 JP JP17034195A patent/JP3589746B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH08339199A (en) | 1996-12-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5805488A (en) | Method and structure for degrouping MPEG audio codes | |
| JP5265682B2 (en) | Digital content encoding and / or decoding | |
| US6900747B2 (en) | Method of compressing lookup table for reducing memory, non-linear function generating apparatus having lookup table compressed using the method, and non-linear function generating method | |
| US6757658B1 (en) | Audio decoder core (acore) MPEG sub-band synthesis algorithmic optimization | |
| KR20210003507A (en) | Method for processing residual signal for audio coding, and aduio processing apparatus | |
| JP3761639B2 (en) | Audio decoding device | |
| US5511094A (en) | Signal processor for a sub-band coding system | |
| US5703579A (en) | Decoder for compressed digital signals | |
| JP3589746B2 (en) | MPEG audio decoder | |
| US6108633A (en) | Audio decoder core constants ROM optimization | |
| US7196642B2 (en) | Circuitry and method for sampling audio data | |
| JP2885725B2 (en) | Synthesis filter for MPEG-2 audio decoder | |
| JP3501246B2 (en) | MPEG audio decoder | |
| JP3581431B2 (en) | MPEG audio decoder | |
| US5739778A (en) | Digital data formatting/deformatting circuits | |
| JP3576266B2 (en) | MPEG audio decoder | |
| JP3639424B2 (en) | Address generation circuit | |
| KR0181587B1 (en) | Apparatus and method for synthesis filtering of MPEG-1 audio decoder | |
| JP3342783B2 (en) | MPEG audio decoder | |
| JP3889738B2 (en) | Inverse quantization apparatus, audio decoding apparatus, image decoding apparatus, inverse quantization method, and inverse quantization program | |
| JP3258526B2 (en) | Compressed audio decompression device | |
| O'Callaghan | Implementation of a MPEG 1 layer I audio decoder with variable bit lengths | |
| JPH08320699A (en) | MPEG audio decoder | |
| KR960011112B1 (en) | Data processing method in digital audio signal compression coding | |
| JP3222967B2 (en) | Digital signal processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040803 |
|
| 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: 20040810 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040818 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080827 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090827 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100827 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110827 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110827 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120827 Year of fee payment: 8 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120827 Year of fee payment: 8 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120827 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130827 Year of fee payment: 9 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| EXPY | Cancellation because of completion of term |