JP2004080634A - Code converter - Google Patents
Code converter Download PDFInfo
- Publication number
- JP2004080634A JP2004080634A JP2002241051A JP2002241051A JP2004080634A JP 2004080634 A JP2004080634 A JP 2004080634A JP 2002241051 A JP2002241051 A JP 2002241051A JP 2002241051 A JP2002241051 A JP 2002241051A JP 2004080634 A JP2004080634 A JP 2004080634A
- Authority
- JP
- Japan
- Prior art keywords
- data
- conversion
- code
- encoding
- decoding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、例えばMPEG(Motion Picture Experts Group)1,MPEG2,MPEG4及びH263等に適用されている可変長符号化処理、可変長符号の復号処理、固定長符号化処理並びに固定長符号の復号処理を行う符号変換装置に関する。
【0002】
【従来の技術】
現在、MPEG(Motion Picture Experts Group)1,MPEG2,MPEG4やH263といった様々な種類の画像符号化規格が提案されている。このような画像符号化規格では、画像データを復元するためのいろいろな情報(シンタックス)を符号化することが定められている。例えば、空間領域の画像信号に対して離散コサイン変換を施すことにより生成されたDCT係数、フレーム間の動き予測を行うことにより生成された動きベクトル、マクロブロックのタイプ、動きベクトルの予測方向等々を符号化することが定められている。符号化データにどのような種類のシンタックスを含めるかはその符号化データのフォーマットによってそれぞれ定められており、また、その符号化順序もそのフォーマットで定められている。
【0003】
また、MPEG1,MPEG2,MPEG4やH263といった画像符号化規格では、各種のシンタックスを階層構造で符号化している。例えば、上記の各画像符号化規格では、一連の同じ属性を有する画面グループに関するシンタックスが記述されるシーケンス層、ランダムアクセス単位となる画面グループに関するシンタックスが記述されるGOP層、1枚の画面に関するシンタックスが記述されるピクチャ層、1枚の画面を横方向にスライスした小画面に関するシンタックスが記述されるスライス層、スライス層をさらに細分化した2次元の画素ブロックに関するシンタックスが記述されるマクロブロック層といったように階層構造化することが規定されている。
【0004】
さらに、上記の各階層構造のうちのマクロブロック層には、DCT係数及び動きベクトルといった最も符号量の多くなるシンタックスが含まれている。そのため、上記の各符号化規格では、マクロブロック層に含められるシンタックスに対して可変長符号化処理が行われ、効率的な符号化処理がされている。特に、DCT係数に関しては、0ランとレベルとの組み合わせに対して可変長の符号列を割り当てるランレングス符号化が行われている。
【0005】
可変長符号列の符号化及び復号化を行う場合、通常、シンタックスと符号列との対応関係が記述された変換テーブルを参照して、シンタックスから符号列への変換、又は、その逆変換が行われる。変換テーブルは、シンタックスの種類毎に用意される。つまり、DCT係数用の変換テーブル、動きベクトル用の変換テーブル、その他各種パラメータ毎の変換テーブルが用意される。
【0006】
【発明が解決しようとする課題】
ところで、MPEG1,MPEG2,MPEG4及びH263等の各画像符号化規格は、それぞれ独自のシンタックスを規定しており、各規格毎にシンタックスの内容が異なっている。そのため、当然その変換テーブルも異なる。また、規格間で同様のシンタックスを用いていたとしても、シンタックスの値と対応する可変長符号の符号列との関係が異なっていたり、また、符号化順序も異なっている。
【0007】
そのため、例えば、複数の画像符号化規格に対応した共用のエンコーダ又はデコーダを製造する場合、可変長符号化及び復号化回路を各規格毎に別々に開発し、それぞれの規格に対応した回路を全てエンコーダ及びデコーダに搭載しなければならなかった。すなわち、1つのエンコーダ及びデコーダに、画像符号化規格の数だけ、可変長符号化及び復号化回路を搭載しなければならなかった。
【0008】
また、ある画像符号化規格に対応したエンコーダ又はデコーダを開発した後に、その画像符号化規格に新たなシンタックスが拡張された場合や、符号化順序が変更された場合、これまでの可変長符号化及び復号化回路では、拡張又は変更後の規格に対応することができなくなるため、新規に回路設計を行わなければならなかった。
【0009】
本発明は、このような従来の実情に鑑みて提案されたものであり、複数の規格に対応した場合であっても回路規模を小さくすることができ、さらに、新規な符号化規格が提案された場合であっても容易にその新規な規格に対応することができる拡張性の高い符号変換装置を提供することを目的とする。
【0010】
【課題を解決するための手段】
本発明にかかる符号変換装置は、特定の情報内容を示すシンタックスと符号列との対応関係が記述された変換テーブルを上記情報内容の種別毎に複数格納している変換テーブル格納手段と、入力されたシンタックスから対応した符号列への符号変換を上記変換テーブルの記述に従って行い、符号変換して生成した複数の符号列を合成して1つのデータストリームを生成する符号化処理、及び/又は、入力されたデータストリームから符号列を抽出し、抽出した符号列から対応したシンタックスへの符号変換を上記変換テーブルの記述に従って行う復号化処理を行う符号化/復号化手段と、少なくとも上記変換テーブルの選択情報が示された命令データを格納する命令格納手段とを備え、上記符号化/復号化手段は、上記命令格納手段に格納されている命令データに示された変換テーブルを上記変換テーブル格納手段から1つ選択し、選択した変換テーブルに基づき上記符号変換を行うことを特徴とする。
【0011】
この符号変換装置では、情報内容の種別毎に分類された変換テーブルを変換テーブル格納手段内に複数格納しておく。変換テーブルには、シンタックスと符号列との対応関係が記述された情報が記述されている。
【0012】
この符号変換装置には、外部から命令データが格納される。命令データには、少なくとも、変換テーブル格納手段に格納されている複数の変換テーブルのなかから1つの変換テーブルを選択する選択情報が記述されている。符号化/復号化手段は、命令格納手段に格納されている命令データに基づき1つの変換テーブルを選択し、選択した変換テーブルを参照して、シンタックスから符号列への符号変換処理又は符号列からシンタックスへの変換処理を行う。
【0013】
【発明の実施の形態】
以下、本発明の実施の形態として、MPEG2(ISO/IEC 13818−2)及びMPEG4(ISO/IEC 14496−2)の両者の方式に対応した画像符号化及び復号装置に用いられるVLC符号変換装置について、図面を参照しながら詳細に説明する。
【0014】
本発明の実施の形態のVLC符号変換装置は、符号化処理を行う場合には、MPEG2又はMPEG4のマクロブロックレイヤに規定されている各種の情報(以下シンタックスと呼ぶ。)が入力され、それらのシンタックスに対して可変長符号化処理(又は固定長符号化処理)をして所定の符号列を生成する。そして、VLC符号変換装置は、生成した符号列を合成してMPEG2又はMPEG4に対応したデータストリームを生成する。また、VLC符号変換装置は、復号処理を行う場合には、MPEG2又はMPEG4に対応したデータストリームが入力され、入力されたデータストリームを可変長符号(又は固定長符号)の個々の符号列に分割する。そして、VLC符号変換装置は、分割した各符号列に対して可変長符号の復号化処理(又は固定長符号の復号化処理)をしてMPEG2又はMPEG4のマクロブロックレイヤに規定されているシンタックスを抽出する。
【0015】
シンタックスに対して可変長符号化処理(或いは固定長符号化処理)をして生成された符号列のことを、VLC符号列と呼ぶものとする。
【0016】
図1に、本発明の実施の形態のVLC符号変換装置1のブロック構成図を示す。
【0017】
VLC符号変換装置1は、図1に示すように、符号変換部11と、DCT係数バッファ12と、MVバッファ13と、パラメータバッファ14と、ビットストリームバッファ15と、CPU(Central Processing Unit)16とを備えて構成されている。
【0018】
符号変換部11は、符号化時には、MPEG2又はMPEG4のマクロブロックレイヤに規定されているシンタックスをVLC符号列に変換し、生成したVLC符号列を合成してビットストリームを生成する処理を行う。符号変換部11は、復号時には、MPEG2又はMPEG4のフォーマットに対応したビットストリームを個々のVLC符号列に分離し、各VLC符号列をシンタックスに変換する処理を行う。
【0019】
DCT係数バッファ12は、MPEG2及びMPEG4のシンタックスの一つとして規定されているDCT係数を格納する。MVバッファ13は、MPEG2及びMPEG4のシンタックスの一つとして規定されている動きベクトルを格納する。パラメータバッファ14は、MPEG2又はMPEG4で規定されたシンタックスのうち、DCT係数及び動きベクトル以外のシンタックス、例えば、マクロブロックのタイプ、動きベクトルの予測方向等を格納する。なお、MPEG2及びMPEG4で規定されているシンタックスのうち、DCT係数及び動きベクトル以外のシンタックスのことを、以下パラメータと呼ぶ。
【0020】
ビットストリームバッファ15は、MPEG2又はMPEG4のビットストリームを格納する。CPU16は、符号変換部11の動作を制御する。
【0021】
以上のような構成のVLC符号変換装置1は、符号化時には、DCT係数バッファ12,MVバッファ13及びパラメータバッファ14に格納されているシンタックス(DCT係数,動きベクトル及びパラメータ)を読み出して、可変長符号化(又は固定長符号化)を行ってVLC符号列を生成し、生成したVLC符号列をビットストリームバッファ15上で、MPEG2又はMPEG4に対応したビットストリームに合成する。また、VLC符号変換装置1は、復号時には、ビットストリームバッファ15に格納されているMPEG2又はMPEG4に対応したビットストリームを読み出して、個々のVLC符号列を分離し、分離した各VLC符号列に対して可変長符号の復号化(又は固定長符号の復号化)を行ってシンタックスを生成し、生成したシンタックスを対応するバッファ(DCT係数バッファ12,MVバッファ13又はパラメータバッファ14のいずれかのバッファ)に格納する。
【0022】
つぎに、符号変換部11の内部構成について説明をする。
【0023】
符号変換部11は、ランラベル解析部21と、MV解析部22と、符号化/復号部23と、命令レジスタ24と、制御レジスタ25と、制御部26とを備えて構成されている。
【0024】
ランレベル解析部21は、符号化時には、DCT係数バッファ12から所定のスキャン順序でDCT係数を読み出し、読み出した順序で並べられたDCT係数をラン−レベル情報に変換する変換処理を行い、復号時には、その逆変換処理を行う。DCT係数は、いわゆるランレベルの2次元可変長符号化が行われる。ランとは、DCT係数の並びのうち先行するゼロ値の個数のことであり、レベルとは、ランに続く非ゼロ値のDCT係数の値のことである。ラン−レベル情報とは、1つのランと1つのレベルとの組み合わせを表わした符号化情報である。MPEG2及びMPEG4では、このラン−レベル情報に基づき、DCT係数にに対して可変長符号化を行う。ランレベル解析部21は、符号化時には、DCT係数バッファ12からDCT係数を所定のスキャン順序で読み出して、ラン−レベル情報を生成し、符号化/復号部23に供給する。また、ランレベル解析部21は、復号時には、符号化/復号部23から供給されたラン−レベル情報から、所定のスキャン順序で並べられた複数のDCT係数の値を復元し、復元したDCT係数をDCT係数バッファ12に格納する。なお、MPEG2及びMPEG4では、イントラマクロブロックのDC成分のDCT係数は、ランレベルの2次元可変長符号化は行われずに、レベルに対する固定長符号化が行われる。このため、イントラマクロブロックのDC成分のDCT係数は、符号化/復号部23との間で、レベルの値のみがやり取りされる。
【0025】
MV解析部22は、符号化時には、連続したマクロブロックの動きベクトルの値の差分を求め、その差分値に基づき動きベクトルを差分コード化する。また、MV解析部22は、復号時には、差分コードから動きベクトルを復元する処理を行う。MV解析部22は、符号化時には、MVバッファ13から動きベクトルを読み出して差分コード化し、差分コード化した動きベクトルを符号化/復号部23に供給する。MV解析部22は、復号時には、符号化/復号部23から供給された差分コードから動きベクトルを復元して、復元した動きベクトルをMVバッファ13に格納する。なお、Pピクチャでのスライスの先頭マクロブロック、イントラマクロブロック、ノンMC等では、差分コード化は行われず、動きベクトルの値がそのままVLC符号化される。
【0026】
符号化/復号部23は、内部に格納されている変換テーブルを参照して、シンタックスとVLC符号列との間の変換処理を行う。
【0027】
符号化/復号部23には、符号化時には、シンタックスとして、DCT係数、動きベクトル及びパラメータが入力される。なお、DCT係数はランレベル解析部21によりラン−レベル情報とされて入力され、動きベクトルはMV解析部22により差分コード化されて入力される。また、パラメータは、パラメータバッファ14から直接入力される。符号化/復号部23は、符号化時には、制御部26により選択された変換テーブルを参照して入力されたシンタックスを対応するVLC符号列に変換し、それらを合成してMPEG2又はMPEG4に対応したビットストリームを生成する。
【0028】
符号化/復号部23は、復号化時には、MPEG2又はMPEG4に対応したビットストリームがビットストリームバッファ15から入力される。符号化/復号部23は、入力されたビットストリームを各VLC符号列に分離する。符号化/復号部23は、制御部26により選択された変換テーブルを参照して各VLC符号列を対応するシンタックスに変換する。符号化/復号部23は、変換したシンタックスのうち、DCT係数をランレベル解析部21を介してDCT係数バッファ12に格納し、動きベクトルをMV解析部22を介してMVバッファ13に格納し、パラメータをパラメータバッファ14に格納する。
【0029】
命令レジスタ24には、CPU16から命令データが与えられ、その命令データを格納する。命令データの詳細については後に説明する。
【0030】
制御レジスタ25には、CPU16から制御データが与えられ、その制御データを格納する。制御データの詳細については後に説明する。
【0031】
制御部26は、命令レジスタ24に格納されている命令データ及び制御レジスタ25に格納されている制御データを参照して、符号化/復号部23の動作制御を行う。制御部26の動作制御処理の詳細については後に説明する。
【0032】
つぎに、符号化/復号部23の構成について詳細に説明をする。図2に符号化/復号部23のブロック構成図を示す。
【0033】
符号化/復号部23は、テーブル変換器31と、ストリーム解析器32と、ストリーム結合器33とを備えて構成される。
【0034】
ストリーム解析器32には、符号化時に、MPEG2又はMPEG4のビットストリームが入力される。MPEG2及びMPEG4のビットストリームは、所定の階層データ構造で各種のデータが並べられて構成されたストリームであり、特に、マクロブロック層は、シンタックスを可変長符号化又は固定長符号化して生成されたデータ列(VLC符号列)が、所定のデータ構造に従って並べられている。ビットストリーム内のマクロブロック層部分には、例えば、DCT係数、動きベクトル、マクロブロックアドレス、マクロブロックアドレス等の情報内容を示すVLC符号列が含まれている。ただし、VLC符号列の最大符号長(或いは固定長符号データの符号長)は、その情報内容毎に異なっている。ストリーム解析器32は、ビットストリーム中に含まれているVLC符号列の最大符号長を示す情報が制御部26から与えられ、その最大符号長情報に基づき、入力されたビットストリームを個々のVLC符号列に分離する。なお、この最大符号長を示す情報は、命令レジスタ24に格納された命令データにより与えられる。
【0035】
ストリーム結合器33には、復号時には、テーブル変換器31から出力されたVLC符号列が入力される。ストリーム結合器33は、MPEG2又はMPEG4のフォーマットに従い、入力されたVLC符号列を結合して、MPEG2又はMPEG4に対応したビットストリームを生成する。結合されたビットストリームは、MPEG2又はMPEG4のマクロブロック層部分の階層データとして外部に出力され、上位階層のデータストリームの所定部分に結合される。
【0036】
テーブル変換器31は、符号化時には、シンタックスが入力され、VLC符号列を出力する。また、テーブル変換器31は、復号時には、ストリーム解析器32により分割された個々のVLC符号列又は固定長符号データが入力され、それらの対応したシンタックスを出力する。
【0037】
テーブル変換器31は、符号化時におけるシンタックスからVLC符号列への符号変換処理、復号時におけるVLC符号列からシンタックスへの符号変換処理を、予め内部に格納している変換テーブルを参照して行う。
【0038】
テーブル変換器31の内部構成を図3に示す。
【0039】
テーブル変換器31は、符号化/復号化テーブル格納部34と、オフセットテーブル格納部35と、アドレス生成部36と、オフセットテーブル一時格納部37と、アドレス合成部38と、符号化/復号テーブル一時格納部39とを備えて構成されている。
【0040】
符号化/復号化テーブル格納部34は、複数の符号化用の変換テーブル(符号化テーブル)と、複数の復号化用の変換テーブル(復号化テーブル)とを格納している。
【0041】
符号化テーブルは、アドレス化されたシンタックスの値がインデックスワードとして記述されている。アドレス化されたシンタックスとは、テーブルデータとして取り扱いやすいようにシンタックスの値を変換したデータである。シンタックスの値は、例えば、マイナス値があったり、単純にインクリメントされている値ではなく、そのままではテーブルデータとして取り扱いづらい。そのため、本符号化テーブルでは、これらのシンタックスの値を所定の変換方式に従い単純化して、テーブルのインデックスワードとして用いることができるようにアドレス化している。符号化テーブルは、各インデックスワードに対して対応するVLC符号列が割り当てられている。割り当てられたVLC符号列は、テーブル内においては、おのおのがユニークな符号列となっている。このため、符号化テーブルは、ある任意の値のシンタックスを入力すると、そのシンタックスに対応したVLC符号列を一つ出力することができる。
【0042】
復号化テーブルは、アドレス化されたVLC符号列の値がインデックスワードとして記述されている。アドレス化したVLC符号列とは、テーブルデータとして取り扱い易いように、VLC符号列の値を変換したデータである。VLC符号列の値は、それぞれの符号長が異なっており、テーブルデータのインデックスワードとしてそのまま用いた場合、テーブルが非常に大きくなってしまい、さらに、空白領域も膨大となり、非常に取り扱いづらい。そのため、本復号化テーブルでは、こららのVLC符号列の値を所定の変換方式に従い単純化して、テーブルのインデックスワードとして用いることができるようにアドレス化している。復号化テーブルは、各インデックスワードに対して対応するシンタックスの値が割り当てられている。このため、復号化テーブルは、ある任意のVLC符号列を入力すると、その符号列に対応したシンタックスの値を一つ出力することができる。
【0043】
また、符号化/復号化テーブル格納部34には、少なくともマクロブロック層に含まれるシンタックスの種類毎、ビットストリームの種類毎、符号化/復号化毎にそれぞれ独立した変換テーブルが格納されている。例えば、MPEG2に対応したDCT係数の変換テーブル、MPEG4に対応したDCT係数の変換テーブル、MPEG2に対応した動きベクトルの変換テーブル、MPEG4に対応した動きベクトルの変換テーブル、MPEG2に対応したマクロブロックのタイプの変換テーブル、MPEG4に対応したマクロブロックのタイプの変換テーブルといったように、情報の種類毎、ストリームの種類毎並びに符号化/復号化毎に独立に生成された変換テーブルが格納されている。
【0044】
オフセットテーブル格納部35には、各種のオフセットテーブルを格納している。オフセットテーブルは、アドレス化されたシンタックス又はアドレス化されたVLC符号列のうちの上位部分の情報(上位アドレス)がインデックスワードとして記述されており、各インデックスワードに対して変換テーブル内の所定のインデックス位置を示したオフセットアドレスが割り当てられたテーブルである。
【0045】
変換テーブル内の情報は、図4に示すように、有効なインデックス値が連続して記述されている領域毎に分割できる。特に、アドレス化したVLC符号列は、データ長が様々であることもあり、有効な値が集まった領域が離散的に発生しているため、領域分割できる。変換テーブルでは、その個々の領域に対して上位アドレスを割り当て、領域内の各情報にその領域内における順位を示した下位アドレスが割り当てられている。オフセットテーブルは、上位アドレスが入力されると、その上位アドレスで指定される領域の先頭のアドレスを出力するテーブルである。
【0046】
アドレス生成部36は、変換前のデータ(符号化時にはシンタックス、復号時にはVLC符号列)が入力され、変換テーブル内の領域を指定する上位アドレスと、その領域内における順位を示す下位アドレスとを生成する。上位アドレスは、オフセットテーブル一時格納部37に供給され、下位アドレスはアドレス合成部38に供給される。
【0047】
オフセットテーブル一時格納部37には、オフセットテーブル35に格納されている複数のオフセットテーブルのうち、制御部26から与えられるテーブル選択信号により選択された1つのオフセットテーブルが転送され、その転送されたオフセットテーブルを格納する。オフセットテーブル一時格納部37は、格納しているオフセットテーブルを参照して、入力された上位アドレスに対応したオフセットアドレスを出力する。オフセットアドレスは、アドレス合成部38に供給される。なお、オフセットテーブル一時格納部37に転送されるオフセットテーブルは、命令レジスタ24に格納される命令データに基づき制御部26が選択する。
【0048】
アドレス合成部38は、オフセットアドレスと下位アドレスとが入力される。アドレス合成部38は、オフセットアドレスと下位アドレスとを加算したアドレスを生成する。この加算したアドレスは、変換テーブルのインデックスワードを指定するアドレスとなる。アドレス合成部38により生成されたアドレスは、符号化/復号化テーブル一時格納部39に供給される。
【0049】
符号化/複号化テーブル一時格納部39には、符号化/復号化テーブル格納部34に格納されている複数の変換テーブルのうち、制御部26から与えられるテーブル選択信号により選択された1つの符号化/復号化テーブルが転送され、その転送された変換テーブルを格納する。符号化/複号化テーブル一時格納部39は、格納している変換テーブルを参照して、アドレス合成部38から入力されたアドレスに対応した変換後データ(符号化時にはVLC符号列、復号時にはシンタックス)を出力する。なお、符号化/復号化テーブル一時格納部39に転送される変換テーブルは、命令レジスタ34に格納される命令データに基づき制御部26が選択する。
【0050】
以上のように符号化/復号部23では、複数の各種の変換テーブルを予め格納しておき、可変長符号化(又は復号化)をする際に必要となる1つの変換テーブルを読み出して、その読み出した変換テーブルに基づき、シンタックスからVLC符号列への変換、或いは、VLC符号列からシンタックスへの変換処理を行っている。このように本符号化/復号部23では、必要に応じて変換テーブルを読み出すような構成としているので、ハードウェア構成自体を変更しなくても、変換テーブルの修正、追加のみをすれば、新たなシンタックスやフォーマットに対応することができる。
【0051】
また、VLC符号列をテーブルのインデックスとした場合、可変長符号であるという性質上、無駄な空白領域が増加し、テーブルデータが大きくなってしまう。しかしながら、本符号化/復号部23では、変換テーブル内のデータを領域分割し、各領域を指定するアドレスをオフセットテーブルで発生している。本符号化/復号部23では、このように2段階の符号変換用のテーブルを用いているので、可変長符号を取り扱ってもテーブル内に無駄な空白領域を作らなくてもよく、メモリの使用効率を向上させることができる。
【0052】
つぎに、命令レジスタ24及び制御レジスタ25に格納される命令データ及び制御データについて説明を行う。
【0053】
命令レジスタ24には命令データが書き込まれ、制御レジスタ25には制御データが書き込まれる。命令データ及び制御データの書き込みを行うのは、CPU16である。CPU16は、処理状況に応じた様々な処理プログラムを有しており、その処理プログラムに基づき必要な命令セット(複数の命令データが羅列されているセット)及び制御データを、命令レジスタ24及び25に格納する。
【0054】
また、書き込まれた命令データ及び制御データを参照して動作制御を行うのは、符号変換部11の制御部26である。
【0055】
図5(A)に符号化時における命令データのデータ構成を示し、図5(B)に復号化時における命令データのデータ構成を示す。
【0056】
符号化時の命令データは、モード情報41、最大ビット長情報42、パラメータ識別情報43、バッファ選択/固定長符号化値情報44、ループ数45とから構成される。また、復号化時の命令データは、モード情報41と、最大ビット長情報42と、復号回数46とから構成される。
【0057】
モード情報41は、符号化又は復号化するシンタックスの種類を示している。符号変換部11の制御部26は、このモード情報41を参照して、複数の変換テーブル(及び複数のオフセットテーブル)のなかから、必要な1つの変換テーブル(及びオフセットテーブル)を選択する。符号変換部11の制御部26は、選択した変換テーブル(及びオフセットテーブル)を指定する制御命令を符号化/復号部23に対して制御命令を発行し、指定した変換テーブル(オフセットテーブル)を参照して符号変換を行わせる。
【0058】
モード情報41として規定する具体的なコード例を図6〜図9に示す。ここで示すコード例では、5ビットのコード例である。図6は、MPEG2方式で符号化処理を行う場合におけるモード情報のコード例である。図7は、MPEG4方式で符号化処理を行う場合におけるモード情報のコード例である。図8は、MPEG2方式で復号化処理を行う場合におけるモード情報のコード例である。図9は、MPEG4方式で復号化処理を行う場合におけるモード情報のコード例である。
【0059】
最大ビット長情報42は、符号化又は復号化するVLC符号列の最大のビット長を表す情報である。符号変換部11の制御部26は、最大ビット長情報42に基づき、VLC符号列の最大ビット長を指定する制御情報を符号化/復号部23に対して発行し、MPEG2又はMPEG4ビットストリームを個々のVLC符号列に分割させる。
【0060】
パラメータ識別情報43は、符号化するシンタックスがパラメータであるか、DCT係数又は動きベクトルであるか、を識別するための情報である。制御部26は、本パラメータ識別情報43に、符号化するシンタックスがパラメータであると示されている場合には、パラメータバッファ14から符号化/復号部23へデータを転送する制御を行う。なお、パラメータ識別情報は、符号化時にのみ設定される。
【0061】
バッファ選択/固定長符号化値情報44は、パラメータ識別情報43の記述に応じて情報内容が異なる。符号化するシンタックスがパラメータであるパラメータ識別情報43に示されている場合には、バッファ選択/固定長符号化値情報44には、固定長符号化するシンタックスの値が記述される。この場合、制御部26は、シンタックスの値が、このバッファ選択/固定長符号化値情報44に示される値と一致する場合には、そのシンタックスに対して固定長符号化処理を行う。一方、符号化するシンタックスがパラメータではないとパラメータ識別情報43に示されている場合には、バッファ選択/固定長符号化値情報44には、符号化するシンタックスがDCT係数であるか動きベクトルであるかの識別情報が記述される。制御部26は、バッファ選択/固定長符号化情報44に符号化するシンタックスがDCT係数であると示されていれば、DCT係数バッファ12から符号化/復号部23へデータを転送する制御を行い、バッファ選択/固定長符号化情報44に符号化するシンタックスが動きベクトルであると示されていれば、MVバッファ13から符号化/復号部23へデータを転送する制御を行う。なお、バッファ選択/固定長符号化値情報44は、符号化時にのみ設定される。
【0062】
ループ数情報45は、本命令データで指定された変換テーブルを用いて、連続して符号化処理を行うインデックス数を示している。例えば、DCT係数や動きベクトルは、ストリーム中に連続して符号化される。従って、連続した同種類のインデックスを、1つの変換テーブルを参照して符号化する場合には、このループ数情報45に記述されている回数分繰り返し符号化処理を行う。このことによって、1つの命令データに基づき、複数のシンタックスに対する符号化処理が行えることとなり、命令数を減少させることができる。なお、このループ数情報45は、符号化時にのみ設定される。
【0063】
復号回数情報46は、本命令データで指定された変換テーブルを用いて、復号処理を行う回数を示している。例えば、DCT係数や動きベクトルは、ストリーム中に連続して符号化されている。従って、連続した同種類のインデックスを1つの変換テーブルを参照して復号化する場合には、この復号回数情報46に記述されている回数分繰り返し復号処理を行う。このことによって、1つの命令データに基づき、複数回の復号処理を行えることとなり、命令数を減少させることができる。なお、この復号回数情報46は、復号化時にのみ設定される。
【0064】
図10に制御データのデータ構成を示す。制御データは、モード情報として記述される各コード値に対して設定される。つまり、図6〜図9に示した5ビットの各値毎に制御データが設定される。制御データは、CPU16により制御レジスタ25に書き込まれ、制御部26により参照される。制御部26は、まず、命令レジスタ24から命令データを読み込んだ後に、その命令データのモード情報に対応した制御データを制御レジスタ25から読み出し、その制御データに記述された内容を実行する。
【0065】
制御データは、ENDフラグ47、FLCフラグ48、INTRAフラグ49、DCTフラグ50、MVフラグ51、PARAMフラグ52から構成されている。
【0066】
ENDフラグ47は、終端マクロブロックを示すフラグである。すなわち、制御データは、ENDフラグ47のビットが立っていればそのモード情報に基づき行われる符号変換処理が、終端マクロブロックに対する処理であることを示しており、ビットが立っていなければそのモード情報に基づき行われる符号変換処理が終端マクロブロックに対する処理ではないことを示している。制御部26は、制御データのENDフラグ47が立っていれば、その命令データに基づく処理を行う際に、終端マクロブロックに対する処理を行い、ENDフラグ47が立っていなければ、その命令データに基づく処理を行う際に、通常のマクロブロックに対する処理を行う。
【0067】
FLCフラグ48は、固定長処理を行うか、可変長処理を行うかを示すフラグである。すなわち、制御データは、FLCフラグ48のビットが立っていればそのモード情報に基づき行われる符号変換処理が、固定長符号化処理又は固定長復号化処理であることを示しており、ビットが立っていなければそのモード情報に基づき行われる符号変換処理が、可変長符号化又は可変長復号化処理であることを示している。制御部26は、制御データのFLCフラグ48が立っていれば、例えばビットストリームの解析や変換テーブルのアドレス生成処理等を行う際に、固定長符号化処理に対応した処理を行い、制御データのFLCフラグが48が立っていなければ、例えばビットストリームの解析や変換テーブルのアドレス生成処理等を行う際に、可変長符号化処理に対応した処理を行う。
【0068】
INTRAフラグ49は、イントラマクロブロックに対応した処理を行うか、インターマクロブロックに対応した処理を行うかを示すフラグである。すなわち、INTRAフラグ49のビットが立っていればそのモード情報に基づき行われる符号変換処理が、イントラマクロブロックに対する処理であることを示しており、ビットが立っていなければそのモード情報に基づき行われる符号変換処理が、インターマクロブロックに対する処理であることを示している。制御部26は、制御データのINTRAフラグ49が立っていれば、例えばランレベル解析部21やMV解析部22に対してイントラマクロブロックに対応した処理をさせる制御を行い、制御部26は、制御データのINTRAフラグ49が立っていなければ、例えばランレベル解析部21やMV解析部22に対してインターマクロブロックに対応した処理をさせる制御を行う。
【0069】
DCTフラグ50,MVフラグ51及びPRAMフラグ52は、復号化したシンタックスを格納するバッファを選択するフラグである。すなわち、制御部26は、DCTフラグ50のビットが立っていれば復号したシンタックスをDCT係数バッファ12に格納し、MVフラグ51のビットが立っていれば復号したシンタックスをMVバッファ13に格納し、PRAMフラグ52のビットが立っていれば復号したシンタックスをパラメータバッファ14に格納する。
【0070】
以上のように本VLC符号変換装置1では、命令データ及び制御データがCPU16により書き込まれ、制御部26が命令データ及び制御データに基づき、変換テーブルの選択や各種の符号変換処理の制御を行っている。このため、例えば、符号化や復号化するインデックスの種類やその順序等を自在にプログラミングすることが可能となる。従って、例えば複数のストリームに対応した符号化処理や復号化処理、並びに、新たな符号化ストリームへの対応等を、プログラムの変更のみで行うことができる。
【0071】
つぎに、符号変換部11の符号化時の処理内容について、図11のフローチャートを参照して説明をする。
【0072】
まず、制御レジスタ25に対する制御データの書き込み(ステップS11)、並びに、命令レジスタ24に対する命令セットの書き込みが、CPU16により予め行われている(ステップS12)。命令セットとは、複数の命令データで構成されるデータ群であり、命令データとその実行順序が示されている。
【0073】
続いて、符号変換部11の制御部26は、CPU16から符号化開始命令が与えられる。制御部26は、符号化開始命令が与えられると、符号化処理を開始する(ステップS13)。
【0074】
続いて、符号変換部11の制御部26は、命令レジスタ24に格納されている命令セットの中から、最初の1つの命令データを読み出す(ステップS14)。
【0075】
続いて、符号変換部11の制御部26は、読み出した命令データに記述されているモード情報を参照し、そのモード情報に対応した制御データを制御レジスタ25から読み出す。制御部26は、読み出した制御データに記述された内容の設定制御を行う(ステップS15)。
【0076】
続いて、符号変換部11の制御部26は、命令データのモード情報により指定されるオフセットテーブル及び変換テーブルを選択し、符号化/復号化テーブル格納部34及びオフセットテーブル格納部35から、オフセットテーブル一時格納部37及び変換テーブル一時格納部39に転送する(ステップS16)。
【0077】
続いて、符号変換部11の制御部26は、符号化処理を行うシンタックスが、パラメータである場合には、パラメータバッファ14から1つのパラメータを読み出して、符号化/復号部23へ転送する。或いは、符号変換部11の制御部26は、符号化処理を行うシンタックスがDCT係数又は動きベクトルである場合には、ランレベル解析部21又はMV解析部22に演算処理を行わせ、ランレベル情報又は動きベクトルの差分コードを符号化/復号部23へ転送する(ステップS17)。
【0078】
続いて、符号変換部11の制御部26は、符号化/復号部23に対して制御命令を発行して、入力されたシンタックス(DCT係数,動きベクトル又はパラメータ)からアドレス情報への変換処理(ステップS20)、アドレス情報化したシンタックスに対応したVLC符号列への変換処理(ステップS21)、VLC符号列のビットストリーム合成処理(ステップS22)を行わせる。
【0079】
続いて、符号変換部11の制御部26は、命令データに示されているループ数分の符号変換処理を行ったか否かを判断する(ステップS23)。ループ数分の符号変換処理を行っていない場合には、ステップS17に戻り、再度同じ変換テーブルを用いて次のシンタックスに対する符号化処理を行う。
【0080】
ループ数分の符号変換処理が終了した場合には、続いて、命令セット内の全ての命令データに対して、符号変換処理が終了したか否かを判断する。命令セット内の全ての命令データに対して符号変換が終了していない場合にはステップS14に戻り、次の命令データを命令レジスタ24から読み出し、処理を続行する。終了した場合には、本符号化処理を終了する。
【0081】
つぎに、符号変換部11の復号化時の処理内容について、図12のフローチャートを参照して説明をする。
【0082】
まず、制御レジスタ25に対する制御データの書き込み(ステップS31)、並びに、命令レジスタ24に対する命令セットの書き込みが、CPU16により予め行われている(ステップS32)。
【0083】
続いて、符号変換部11の制御部26は、CPU16から符号化開始命令が与えられる。符号変換部11の制御部26は、符号化開始命令が与えられると、符号化処理を開始する(ステップS33)。
【0084】
続いて、符号変換部11の制御部26は、命令レジスタ24に格納されている命令セットの中から、最初の1つの命令データを読み出す(ステップS34)。
【0085】
続いて、符号変換部11の制御部26は、読み出した命令データに記述されているモード情報を参照し、そのモード情報に対応した制御データを制御レジスタ25から読み出す。制御部26は、読み出した制御データに記述された内容の設定制御を行う(ステップS35)。
【0086】
続いて、符号変換部11の制御部26は、命令データのモード情報により指定されるオフセットテーブル及び変換テーブルを選択し、復号化/復号化テーブル格納部34及びオフセットテーブル格納部35から、オフセットテーブル一時格納部37及び変換テーブル一時格納部39に転送する(ステップS36)。
【0087】
続いて、符号変換部11の制御部26は、ビットストリームバッファ15内のビットストリームを解析して、1つのVLC符号列を抽出する(ステップS37)。
【0088】
続いて、符号変換部11の制御部26は、復号化/復号部23に対して制御命令を発行して、抽出したVLC符号化列からアドレス情報への変換処理(ステップS38)、アドレス情報化したVLC符号列に対応したシンタックスへの変換処理(ステップS39)を行わせる。
【0089】
続いて、符号変換部11の制御部26は、復号したシンタックスが、DCT係数又は動きベクトルであるか否かを判断する(ステップS40)。DCT係数又は動きベクトルではない場合、つまり、パラメータである場合には、復号したパラメータをパラメータバッファ14に格納する(ステップS41)。符号変換部11の制御部26は、復号したシンタックスがDCT係数又は動きベクトルである場合には、ランレベル解析部21又はMV解析部22に演算処理を行わせ(ステップS42)、DCT係数又は動きベクトルをDCT係数バッファ12又はMVバッファ13に格納する(ステップS43)。
【0090】
続いて、符号変換部11の制御部26は、命令データに示されている復号数分の符号変換処理を行ったか否かを判断する(ステップS44)。復号数分の符号変換処理を行っていない場合には、ステップS37に戻り、再度同じ変換テーブルを用いて次のVLC符号列に対する復号化処理を行う。
【0091】
復号回数分の符号変換処理が終了した場合には、続いて、命令セット内の全ての命令データに対して、符号変換処理が終了したか否かを判断する。命令セット内の全ての命令データに対して符号変換が終了していない場合にはステップS34に戻り、次の命令データを命令レジスタ24から読み出し、処理を続行する。終了した場合には、本復号化処理を終了する。
【0092】
つぎに、CPU16による符号変換部11の制御処理方法の一例を示す。なお、ここでは、MPEG4で規定されているデータパーティションニングに対応した復号処理について説明をする。
【0093】
MPEG4では、マクロブロック層に含められるデータを単純な階層構造ではなく、重要な情報を先に伝送するように情報の伝送順序を変えたデータパーティショングと呼ばれる伝送方式を適用することができる。データパーティショニングでは、重要な情報を先に伝送することによって、エラー耐性を向上させることができる。MPEG4のデータパーティショニングでは、ビデオパケットの各マクロブロックの特に重要な情報をビデオパケットの前半に、それ以外の情報を後半になるように伝送順序を変更している。そして、前半と後半のデータ列の間に、特定のビット列(イントラVOPの場合にはdc marker,インターVOPの場合にはmotion marker)を配置している。
【0094】
イントラVOPの場合、前半部分に挿入されている情報は、符号化モード、量子化差分値、イントラDC成分であり、後半部分に挿入されている情報は、さらに、内部が2ループに分割されている。後半部分の第1ループは、マクロブロックのAC成分を復号するために必要な符号化パターン,AC予測フラグであり、第2ループは、マクロブロックのAC成分である。つまり、ビデオパケット内のマクロブロック層のデータが、合計3ループで転送される。
【0095】
インターVOPの場合、前半部分に挿入されている情報は、符号化MBであるか非符号化MBであるかを示すフラグ、符号化モード、動きベクトルであり、後半部分に挿入されている情報は、さらに、内部が2ループに分割されている。後半部分の第1ループは、符号化パターン、AC予測フラグ、量子化差分値、イントラDC成分であり、第2ループは、マクロブロックのAC成分である。つまり、つまり、ビデオパケット内のマクロブロック層のデータが、合計3ループで転送される。
【0096】
そのため、このようなデータパーティショニングに対応した復号処理を行う場合には、1つのビデオパケットに対して各ループ毎に複数の命令セットを準備し、これらの命令セットをストリームのループの位置に応じて適宜切り換えながら、命令レジスタ24に書き込まなければならない。
【0097】
以下に説明する制御フローは、このようなデータパーティショニングに対応した復号処理を行うためのプログラム例である。
【0098】
図13に、イントラVOPに対するデータパーティショニングの制御フローを示し、図14〜図16に、イントラVOPに対する制御フローで用いられる命令セットを示す。
【0099】
まず、CPU16は、1つのビデオパケット内に含まれているマクロブロック数を示す変数mを0に初期化する(ステップS51)。
【0100】
続いて、CPU16は、制御データを制御レジスタ25に書き込む(ステップS52)。
【0101】
続いて、CPU16は、第1の命令セットを命令レジスタ24に書き込む(ステップS53)。第1の命令セットを図14に示す。この第1の命令セットは、1つのマクロブロック内の符号化モード、量子化差分値、イントラDC成分を復号するための命令セットである。
【0102】
続いて、CPU16は、符号変換部11に対して復号化開始命令を発行する(ステップS54)。復号化開始命令が発行されると、符号変換部11は、第1の命令セットに対応した復号処理を行う(ステップS55)。
【0103】
続いて、符号変換部11による第1の命令セットに対応した復号処理を終了すると、つまり、1つのマクロブロックに対する符号化モード、量子化差分値、イントラDC成分の復号が終了すると、CPU16は、変数mを1インクリメントする(ステップS56)。
【0104】
続いて、CPU16は、データストリーム中の次のデータが、“dc marker“であるか否かを判断する(ステップS57)。つまり、データパーティショニングの前半部分のデータを全て復号したか否かを判断する。“dc marker”ではない場合には、ステップS54に戻り、再度復号開始命令を発行し、処理を繰り返す。なお、命令レジスタ24には、第1の命令セットが格納されている状態のままなので、符号変換部11は、再度復号開始命令が与えられると、もう一度第1の命令セットに対応した復号処理を繰り返す。つまり、次のマクロブロックに対する符号化モード、量子化差分値、イントラDC成分の復号が行われる。
【0105】
データストリーム中の次のデータが“dc marker”である場合、つまり、データパーティショニングの前半部分のデータを全て復号すると、続いて、ステップS58に進み、以後データパーティショニングの後半部分の第1ループに対する復号処理が行われる。この際、変数mには、ビデオパケット内のマクロブロック数の値が格納されている。
【0106】
ステップS58において、CPU16は、第2の命令セットを命令レジスタ24に書き込む(ステップS58)。第2の命令セットを図15に示す。この第2の命令セットは、1つのマクロブロック内のAC成分を復号するために必要な符号化パターン及びAC予測フラグを復号するための命令セットである。
【0107】
続いて、CPU16は、変数iを0に初期化する(ステップS59)。この変数iは、復号したマクロブロック数を示す値である。
【0108】
続いて、CPU16は、符号変換部11に対して復号化開始命令を発行する(ステップS60)。復号化開始命令が発行されると、符号変換部11は、第2の命令セットに対応した復号処理を行う(ステップS61)。
【0109】
続いて、符号変換部11による第2の命令セットに対応した復号処理を終了すると、つまり、1つのマクロブロックに対する符号化パターン及びAC予測フラグの復号が終了すると、CPU16は、変数iを1インクリメントする(ステップS62)。
【0110】
続いて、CPU16は、変数iが、mと一致したか否かを判断する(ステップS63)。つまり、データパーティショニングの後半部分の第1ループ内のデータを全て復号したか否かを判断する。変数iとmが一致しない場合には、ステップS60に戻り、再度復号開始命令を発行し、処理を繰り返す。なお、命令レジスタ24には、第2の命令セットが格納されている状態のままなので、符号変換部11は、再度復号開始命令が与えられると、もう一度第2の命令セットに対応した復号処理を繰り返す。つまり、次のマクロブロックに対するAC成分を復号するために必要な符号化パターン及びAC予測フラグの復号が行われる。
【0111】
変数iとmとが一致した場合、つまり、データパーティショニングの後半部分の第1ループのデータを全て復号すると、続いて、ステップS64に進み、以後データパーティショニングの後半部分の第2ループに対する復号処理が行われる。
【0112】
ステップS64において、CPU16は、第3の命令セットを命令レジスタ24に書き込む(ステップS64)。第3の命令セットを図16に示す。この第3の命令セットは、1つのマクロブロック内のAC成分を復号するための命令セットである。
【0113】
続いて、CPU16は、変数iを0に初期化する(ステップS65)。この変数iは、復号したマクロブロック数を示す値である。
【0114】
続いて、CPU16は、符号変換部11に対して復号化開始命令を発行する(ステップS66)。復号化開始命令が発行されると、符号変換部11は、第3の命令セットに対応した復号処理を行う(ステップS67)。
【0115】
続いて、符号変換部11による第3の命令セットに対応した復号処理を終了すると、つまり、1つのマクロブロック内のAC成分の復号が終了すると、CPU16は、変数iを1インクリメントする(ステップS68)。
【0116】
続いて、CPU16は、変数iが、mと一致したか否かを判断する(ステップS69)。つまり、データパーティショニングの後半部分の第2ループ内のデータを全て復号したか否かを判断する。変数iとmが一致しない場合には、ステップS66に戻り、再度復号開始命令を発行し、処理を繰り返す。なお、命令レジスタ24には、第3の命令セットが格納されている状態のままなので、符号変換部11は、再度復号開始命令が与えられると、もう一度第3の命令セットに対応した復号処理を繰り返す。つまり、次のマクロブロックに対するAC成分の復号が行われる。
【0117】
変数iとmとが一致した場合、つまり、データパーティショニングの後半部分の第2ループのデータを全て復号すると、本処理を終了する。
【0118】
図17に、インターVOPに対するデータパーティショニングの制御フローを示す。このインターVOPに対する制御フローは、ステップS57における処理が、“dc marker”であるか、“motion marker”であるかの違いのみで、他の処理は全てイントラVOPと同一であるので、その処理説明は省略する。
【0119】
ただし、第1の命令セット、第2の命令セット及び第3の命令セットは、それぞれ異なっている。図18にインターVOPの制御フローで用いられる第1の命令セットを示し、図19にインターVOPの制御フローで用いられる第2の命令セットを示し、図20にインターVOPの制御フローで用いられる第1の命令セットを示す。
【0120】
インターVOPの制御フローで用いられる第1の命令セット(図18)は、データパーティショニングの前半部分に挿入されている、符号化MBであるか非符号化MBであるかを示すフラグ、符号化モード、動きベクトルを復号するための命令セットである。インターVOPの制御フローで用いられる第2の命令セット(図19)は、データパーティショニングの後半部分の第1ループに挿入されている、符号化パターン、AC予測フラグ、量子化差分値、イントラDC成分を復号するための命令セットである。インターVOPの制御フローで用いられる第3の命令セット(図20)は、マクロブロックのAC成分を復号するための命令セットである。
【0121】
【発明の効果】
以上のように本発明にかかる符号変換装置では、命令格納手段に格納されている命令データに基づき1つの変換テーブルを選択し、選択した変換テーブルを参照して、シンタックスから符号列への符号変換処理又は符号列からシンタックスへの変換処理を行う。
【0122】
このため、本発明にかかる符号変換装置では、複数の規格に対応させる場合であっても、それぞれの規格毎に別途ハードウェアを作成することなく、一つの回路で符号変換を行うことができる。さらに、新規な符号化規格が提案された場合であっても、変換テーブルを追加するとともに、命令データを発行するソフトウェアプログラムを変更すれば対応することが可能である。
【図面の簡単な説明】
【図1】本発明の実施の形態のVLC符号変換装置のブロック構成図である。
【図2】上記VLC符号変換装置の符号化/復号部のブロック構成図である。
【図3】上記符号化/復号部のテーブル変換部のブロック構成図である。
【図4】オフセットテーブルを説明するための図である。
【図5】命令データのデータ構成を説明するための図である。
【図6】MPEG2方式で符号化処理を行う場合における命令データのモード情報のコード例を示す図である。
【図7】MPEG4方式で符号化処理を行う場合における命令データのモード情報のコード例を示す図である。
【図8】MPEG2方式で復号化処理を行う場合における命令データのモード情報のコード例を示す図である。
【図9】MPEG4方式で復号化処理を行う場合における命令データのモード情報のコード例を示す図である。
【図10】制御データのデータ構成を説明するための図である。
【図11】符号化時における符号変換部の処理内容を示すフローチャートである。
【図12】復号化時における符号変換部の処理内容を示すフローチャートである。
【図13】データパーティショニングに従い伝送されたイントラVOPから、マクロブロック層のデータを復号するための処理プログラムを示したフローチャートである。
【図14】データパーティショニングに従い伝送されたイントラVOPから、1つのマクロブロック内のデータを復号するための第1の命令セットである。
【図15】データパーティショニングに従い伝送されたイントラVOPから、1つのマクロブロック内のデータを復号するための第2の命令セットである。
【図16】データパーティショニングに従い伝送されたイントラVOPから、1つのマクロブロック内のデータを復号するための第3の命令セットである。
【図17】データパーティショニングに従い伝送されたインターVOPから、マクロブロック層のデータを復号するための処理プログラムを示したフローチャートである。
【図18】データパーティショニングに従い伝送されたインターVOPから、1つのマクロブロック内のデータを復号するための第1の命令セットである。
【図19】データパーティショニングに従い伝送されたインターVOPから、1つのマクロブロック内のデータを復号するための第2の命令セットである。
【図20】データパーティショニングに従い伝送されたインターVOPから、1つのマクロブロック内のデータを復号するための第3の命令セットである。
【符号の説明】
1 VLC符号変換装置、11 符号変換部、12 DCT係数バッファ、13 MVバッファ、14 パラメータバッファ、15 ビットストリームバッファ、21 ランレベル解析部、22 MV解析部、23 符号化/復号部、24命令レジスタ、25 制御レジスタ、26 制御部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to variable-length coding, variable-length code decoding, fixed-length coding, and fixed-length code decoding applied to, for example, MPEG (Motion Picture Experts Group) 1, MPEG2, MPEG4, and H263. The present invention relates to a transcoder that performs the following.
[0002]
[Prior art]
At present, various types of image coding standards such as MPEG (Motion Picture Experts Group), MPEG2, MPEG4 and H263 have been proposed. In such an image coding standard, it is defined that various information (syntax) for restoring image data is coded. For example, a DCT coefficient generated by performing discrete cosine transform on an image signal in a spatial domain, a motion vector generated by performing motion prediction between frames, a macroblock type, a motion vector prediction direction, and the like. It is prescribed to encode. What kind of syntax is included in the encoded data is determined by the format of the encoded data, and the encoding order is also determined by the format.
[0003]
Further, in image coding standards such as MPEG1, MPEG2, MPEG4 and H263, various syntaxes are coded in a hierarchical structure. For example, in each of the above-described image coding standards, a sequence layer in which syntax relating to a series of screen groups having the same attribute is described, a GOP layer in which syntax relating to a screen group serving as a random access unit is described, and one screen Layer, which describes the syntax relating to a small screen obtained by slicing a single screen in the horizontal direction, and the syntax relating to a two-dimensional pixel block obtained by further subdividing the slice layer. It is stipulated that a hierarchical structure such as a macro block layer is formed.
[0004]
Further, the macroblock layer in each of the above-described hierarchical structures includes a syntax having the largest code amount, such as a DCT coefficient and a motion vector. Therefore, in each of the above coding standards, a variable length coding process is performed on the syntax included in the macroblock layer, and an efficient coding process is performed. In particular, with respect to DCT coefficients, run-length encoding in which a variable-length code string is assigned to a combination of 0 runs and levels is performed.
[0005]
When performing encoding and decoding of a variable-length code string, usually, a conversion from syntax to a code string or a reverse conversion thereof is performed by referring to a conversion table describing the correspondence between syntax and code string. Is performed. A conversion table is prepared for each type of syntax. That is, a conversion table for DCT coefficients, a conversion table for motion vectors, and a conversion table for each of various parameters are prepared.
[0006]
[Problems to be solved by the invention]
By the way, each image coding standard such as MPEG1, MPEG2, MPEG4, and H263 defines its own syntax, and the content of the syntax differs for each standard. Therefore, the conversion table is naturally different. Even if the same syntax is used between the standards, the relationship between the value of the syntax and the code string of the corresponding variable length code is different, and the encoding order is also different.
[0007]
Therefore, for example, when manufacturing a common encoder or decoder corresponding to a plurality of image coding standards, a variable length coding and decoding circuit is separately developed for each standard, and all the circuits corresponding to each standard are completely developed. It had to be mounted on the encoder and the decoder. That is, one encoder and one decoder have to be equipped with variable length coding and decoding circuits as many as the number of image coding standards.
[0008]
In addition, after developing an encoder or decoder that supports a certain image coding standard, if a new syntax is extended to that image coding standard, or if the coding order is changed, the variable length code The decoding and decoding circuit cannot support the expanded or changed standard, so that a new circuit design has to be performed.
[0009]
The present invention has been proposed in view of such a conventional situation, and can reduce the circuit scale even when supporting a plurality of standards. Further, a new coding standard has been proposed. It is an object of the present invention to provide a highly scalable code conversion device that can easily cope with the new standard even when the code conversion is performed.
[0010]
[Means for Solving the Problems]
The code conversion device according to the present invention is a conversion table storage unit that stores a plurality of conversion tables each describing a correspondence relationship between syntax indicating a specific information content and a code string for each type of the information content. Encoding processing for converting the generated syntax into a corresponding code string according to the description of the conversion table, and combining a plurality of code strings generated by the code conversion to generate one data stream; and / or Encoding / decoding means for performing a decoding process of extracting a code string from an input data stream and performing code conversion from the extracted code string into a corresponding syntax according to the description of the conversion table; Command storage means for storing command data indicating table selection information, wherein the encoding / decoding means is stored in the command storage means. The conversion table shown in and have instruction data selected one of the conversion table storing means, and performs the code conversion based on the conversion table selected.
[0011]
In this transcoder, a plurality of conversion tables classified according to the type of information content are stored in the conversion table storage means. The conversion table describes information describing the correspondence between the syntax and the code string.
[0012]
The transcoder stores command data from the outside. The instruction data describes at least selection information for selecting one conversion table from a plurality of conversion tables stored in the conversion table storage unit. The encoding / decoding means selects one conversion table based on the instruction data stored in the instruction storage means and refers to the selected conversion table to perform code conversion processing from syntax to a code string or a code string. Performs the conversion process from to the syntax.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, as an embodiment of the present invention, a VLC code conversion device used in an image coding and decoding device compatible with both MPEG2 (ISO / IEC 13818-2) and MPEG4 (ISO / IEC 14496-2) systems. This will be described in detail with reference to the drawings.
[0014]
When performing the encoding process, the VLC code conversion device according to the embodiment of the present invention receives various information (hereinafter, referred to as syntax) specified in an MPEG2 or MPEG4 macroblock layer, and inputs them. Is subjected to a variable length encoding process (or a fixed length encoding process) to generate a predetermined code string. Then, the VLC code converter synthesizes the generated code strings to generate a data stream corresponding to MPEG2 or MPEG4. When performing decoding processing, the VLC code converter receives a data stream corresponding to MPEG2 or MPEG4 and divides the input data stream into individual code strings of variable-length codes (or fixed-length codes). I do. Then, the VLC code conversion device performs variable length code decoding processing (or fixed length code decoding processing) on each of the divided code strings, and performs syntax specified in the MPEG2 or MPEG4 macroblock layer. Is extracted.
[0015]
A code string generated by performing variable-length coding processing (or fixed-length coding processing) on the syntax is referred to as a VLC code string.
[0016]
FIG. 1 shows a block diagram of a
[0017]
As shown in FIG. 1, the
[0018]
At the time of encoding, the
[0019]
The
[0020]
The
[0021]
At the time of encoding, the VLC
[0022]
Next, the internal configuration of the
[0023]
The
[0024]
The run-
[0025]
At the time of encoding, the
[0026]
The encoding /
[0027]
At the time of encoding, the encoding /
[0028]
At the time of decoding, the encoding /
[0029]
The
[0030]
The control register 25 is supplied with control data from the
[0031]
The
[0032]
Next, the configuration of the encoding /
[0033]
The encoding /
[0034]
An MPEG2 or MPEG4 bit stream is input to the
[0035]
Upon decoding, the VLC code string output from the
[0036]
At the time of encoding, the
[0037]
The
[0038]
FIG. 3 shows the internal configuration of the
[0039]
The
[0040]
The encoding / decoding
[0041]
In the encoding table, the value of the addressed syntax is described as an index word. Addressed syntax is data obtained by converting syntax values so that it can be easily handled as table data. The value of the syntax is, for example, a minus value or a value that is not simply incremented, and it is difficult to handle as it is as table data. Therefore, in the present encoding table, the values of these syntaxes are simplified according to a predetermined conversion method, and are addressed so that they can be used as index words of the table. In the encoding table, a corresponding VLC code string is assigned to each index word. The assigned VLC code string is a unique code string in the table. Therefore, when the syntax of an arbitrary value is input to the encoding table, one VLC code string corresponding to the syntax can be output.
[0042]
In the decoding table, the value of the addressed VLC code string is described as an index word. The VLC code string converted into an address is data obtained by converting the value of the VLC code string so as to be easily handled as table data. The values of the VLC code string have different code lengths, and if they are used as they are as the index words of the table data, the table becomes very large and the blank area becomes enormous, making it very difficult to handle. Therefore, in the present decoding table, the values of these VLC code strings are simplified according to a predetermined conversion method, and are addressed so that they can be used as index words of the table. In the decoding table, a corresponding syntax value is assigned to each index word. For this reason, when a certain arbitrary VLC code string is input, the decoding table can output one syntax value corresponding to the code string.
[0043]
In addition, the encoding / decoding
[0044]
The offset
[0045]
As shown in FIG. 4, the information in the conversion table can be divided into regions in which valid index values are continuously described. In particular, the VLC code string converted into an address can be divided into regions in which effective values are gathered discretely since the data length may vary. In the conversion table, an upper address is assigned to each area, and a lower address indicating the order in the area is assigned to each piece of information in the area. The offset table is a table that, when an upper address is input, outputs a head address of an area specified by the upper address.
[0046]
The
[0047]
To the offset table
[0048]
The
[0049]
The encoding / decoding table
[0050]
As described above, the encoding /
[0051]
Further, when a VLC code string is used as an index of a table, a useless variable area increases due to the nature of the variable length code, and the table data becomes large. However, the encoding /
[0052]
Next, the instruction data and control data stored in the
[0053]
Instruction data is written into the
[0054]
It is the
[0055]
FIG. 5A shows the data structure of the instruction data at the time of encoding, and FIG. 5B shows the data structure of the instruction data at the time of decoding.
[0056]
The instruction data at the time of encoding includes
[0057]
The
[0058]
6 to 9 show specific code examples defined as the
[0059]
The maximum
[0060]
The
[0061]
The buffer selection / fixed-length
[0062]
The number-of-
[0063]
The number-of-
[0064]
FIG. 10 shows the data structure of the control data. The control data is set for each code value described as mode information. That is, control data is set for each of the 5-bit values shown in FIGS. The control data is written into the
[0065]
The control data includes an
[0066]
The
[0067]
The
[0068]
The
[0069]
The
[0070]
As described above, in the VLC
[0071]
Next, the contents of processing performed by the
[0072]
First, writing of control data to the control register 25 (step S11) and writing of an instruction set to the
[0073]
Subsequently, the
[0074]
Subsequently, the
[0075]
Subsequently, the
[0076]
Subsequently, the
[0077]
Subsequently, when the syntax for performing the encoding process is a parameter, the
[0078]
Subsequently, the
[0079]
Subsequently, the
[0080]
When the code conversion processing for the number of loops has been completed, subsequently, it is determined whether or not the code conversion processing has been completed for all the instruction data in the instruction set. If the code conversion has not been completed for all the instruction data in the instruction set, the process returns to step S14, reads the next instruction data from the
[0081]
Next, the processing contents of the
[0082]
First, writing of control data to the control register 25 (step S31) and writing of an instruction set to the
[0083]
Subsequently, the
[0084]
Subsequently, the
[0085]
Subsequently, the
[0086]
Subsequently, the
[0087]
Subsequently, the
[0088]
Subsequently, the
[0089]
Subsequently, the
[0090]
Subsequently, the
[0091]
When the code conversion process for the number of times of decoding has been completed, subsequently, it is determined whether the code conversion process has been completed for all the instruction data in the instruction set. If the code conversion has not been completed for all the instruction data in the instruction set, the process returns to step S34, reads the next instruction data from the
[0092]
Next, an example of a control processing method of the
[0093]
In MPEG4, a transmission method called data partitioning in which the transmission order of information is changed so that important information is transmitted first can be applied instead of a simple hierarchical structure of data included in a macroblock layer. In data partitioning, error resilience can be improved by transmitting important information first. In the data partitioning of MPEG4, the transmission order is changed so that particularly important information of each macroblock of a video packet is placed in the first half of the video packet, and other information is placed in the second half. Then, a specific bit string (dc marker in the case of an intra VOP, motion marker in the case of an inter VOP) is arranged between the first half and the second half of the data string.
[0094]
In the case of an intra VOP, the information inserted in the first half is an encoding mode, a quantization difference value, and an intra DC component, and the information inserted in the second half is further divided into two loops. I have. The first loop in the latter half is a coding pattern and an AC prediction flag necessary for decoding the AC component of the macroblock, and the second loop is the AC component of the macroblock. That is, the data of the macroblock layer in the video packet is transferred in a total of three loops.
[0095]
In the case of an inter VOP, the information inserted in the first half is a flag indicating whether it is a coded MB or an uncoded MB, a coding mode, and a motion vector. , And the inside is divided into two loops. The first loop of the latter half is a coding pattern, an AC prediction flag, a quantization difference value, and an intra DC component, and the second loop is an AC component of a macroblock. That is, the data of the macroblock layer in the video packet is transferred in a total of three loops.
[0096]
Therefore, when performing a decoding process corresponding to such data partitioning, a plurality of instruction sets are prepared for each loop for one video packet, and these instruction sets are set according to the position of the loop of the stream. It is necessary to write to the
[0097]
The control flow described below is an example of a program for performing a decoding process corresponding to such data partitioning.
[0098]
FIG. 13 shows a control flow of data partitioning for an intra VOP, and FIGS. 14 to 16 show instruction sets used in a control flow for an intra VOP.
[0099]
First, the
[0100]
Subsequently, the
[0101]
Subsequently, the
[0102]
Subsequently, the
[0103]
Subsequently, when the decoding process corresponding to the first instruction set by the
[0104]
Subsequently, the
[0105]
If the next data in the data stream is “dc marker”, that is, if all the data in the first half of the data partitioning is decoded, then the process proceeds to step S58, where the first loop of the second half of the data partitioning is performed. Is decrypted. At this time, the value of the number of macroblocks in the video packet is stored in the variable m.
[0106]
In step S58, the
[0107]
Subsequently, the
[0108]
Subsequently, the
[0109]
Subsequently, when the decoding process corresponding to the second instruction set by the
[0110]
Subsequently, the
[0111]
If the variables i and m match, that is, if all the data in the first loop of the second half of data partitioning is decoded, then the process proceeds to step S64, where decoding of the second loop of the second half of data partitioning is performed thereafter. Processing is performed.
[0112]
In step S64, the
[0113]
Subsequently, the
[0114]
Subsequently, the
[0115]
Subsequently, when the decoding process corresponding to the third instruction set by the
[0116]
Subsequently, the
[0117]
When the variables i and m match, that is, when all the data of the second loop in the second half of the data partitioning is decoded, the present processing is terminated.
[0118]
FIG. 17 shows a control flow of data partitioning for an inter VOP. The control flow for this inter VOP is the same as that for the intra VOP except for the difference in whether the processing in step S57 is “dc marker” or “motion marker”. Is omitted.
[0119]
However, the first instruction set, the second instruction set, and the third instruction set are different from each other. FIG. 18 shows a first instruction set used in the inter-VOP control flow, FIG. 19 shows a second instruction set used in the inter-VOP control flow, and FIG. 20 shows a second instruction set used in the inter-VOP control flow. 1 shows an instruction set.
[0120]
The first instruction set (FIG. 18) used in the control flow of the inter-VOP includes a flag indicating whether it is a coded MB or an uncoded MB, which is inserted in the first half of data partitioning, This is an instruction set for decoding a mode and a motion vector. The second instruction set (FIG. 19) used in the control flow of the inter VOP includes the coding pattern, the AC prediction flag, the quantization difference value, and the intra DC inserted in the first loop of the latter half of the data partitioning. Instruction set for decoding components. A third instruction set (FIG. 20) used in the control flow of the inter VOP is an instruction set for decoding an AC component of a macroblock.
[0121]
【The invention's effect】
As described above, in the code conversion device according to the present invention, one conversion table is selected based on the instruction data stored in the instruction storage means, and the code from the syntax to the code string is referred to with reference to the selected conversion table. A conversion process or a conversion process from a code string to syntax is performed.
[0122]
For this reason, in the transcoder according to the present invention, even when a plurality of standards are supported, transcoding can be performed by one circuit without separately creating hardware for each standard. Further, even when a new coding standard is proposed, it is possible to cope with it by adding a conversion table and changing a software program that issues instruction data.
[Brief description of the drawings]
FIG. 1 is a block diagram of a VLC code conversion device according to an embodiment of the present invention.
FIG. 2 is a block diagram of an encoding / decoding unit of the VLC code conversion device.
FIG. 3 is a block diagram of a table conversion unit of the encoding / decoding unit.
FIG. 4 is a diagram illustrating an offset table.
FIG. 5 is a diagram for explaining a data configuration of instruction data.
FIG. 6 is a diagram illustrating a code example of mode information of instruction data in a case where encoding processing is performed according to the MPEG2 method.
FIG. 7 is a diagram illustrating a code example of mode information of instruction data in a case where encoding processing is performed in the MPEG4 system.
FIG. 8 is a diagram illustrating a code example of mode information of instruction data in a case where a decoding process is performed by the MPEG2 method.
FIG. 9 is a diagram illustrating a code example of mode information of instruction data when performing a decoding process according to the MPEG4 system.
FIG. 10 is a diagram for explaining a data configuration of control data.
FIG. 11 is a flowchart illustrating processing performed by a code conversion unit during encoding.
FIG. 12 is a flowchart showing processing contents of a code conversion unit at the time of decoding.
FIG. 13 is a flowchart showing a processing program for decoding data of a macroblock layer from an intra VOP transmitted according to data partitioning.
FIG. 14 is a first instruction set for decoding data in one macroblock from an intra VOP transmitted according to data partitioning.
FIG. 15 is a second instruction set for decoding data in one macroblock from an intra VOP transmitted according to data partitioning.
FIG. 16 is a third instruction set for decoding data in one macroblock from an intra VOP transmitted according to data partitioning.
FIG. 17 is a flowchart showing a processing program for decoding data of a macroblock layer from an inter VOP transmitted according to data partitioning.
FIG. 18 is a first instruction set for decoding data in one macroblock from an inter VOP transmitted according to data partitioning.
FIG. 19 is a second instruction set for decoding data in one macroblock from an inter VOP transmitted according to data partitioning.
FIG. 20 is a third instruction set for decoding data in one macroblock from an inter VOP transmitted according to data partitioning.
[Explanation of symbols]
1 VLC code converter, 11 code converter, 12 DCT coefficient buffer, 13 MV buffer, 14 parameter buffer, 15 bit stream buffer, 21 run level analyzer, 22 MV analyzer, 23 encoder / decoder, 24 instruction register , 25 control register, 26 control unit
Claims (14)
入力されたシンタックスから対応した符号列への符号変換を上記変換テーブルの記述に従って行い、符号変換して生成した複数の符号列を合成して1つのデータストリームを生成する符号化処理、及び/又は、入力されたデータストリームから符号列を抽出し、抽出した符号列から対応したシンタックスへの符号変換を上記変換テーブルの記述に従って行う復号化処理を行う符号化/復号化手段と、
少なくとも上記変換テーブルの選択情報が示された命令データを格納する命令格納手段とを備え、
上記符号化/復号化手段は、上記命令格納手段に格納されている命令データに示された変換テーブルを上記変換テーブル格納手段から1つ選択し、選択した変換テーブルに基づき上記符号変換を行うこと
を特徴とする符号変換装置。Conversion table storage means for storing a plurality of conversion tables in which a correspondence relationship between syntax indicating a specific information content and a code string is described for each type of the information content,
An encoding process of performing code conversion from the input syntax to a corresponding code string according to the description of the conversion table, synthesizing a plurality of code strings generated by code conversion to generate one data stream, and / or Encoding / decoding means for extracting a code string from the input data stream, and performing decoding processing for performing code conversion from the extracted code string to a corresponding syntax according to the description of the conversion table;
Instruction storage means for storing at least instruction data indicated by the selection information of the conversion table,
The encoding / decoding means selects one of the conversion tables indicated by the instruction data stored in the instruction storage means from the conversion table storage means, and performs the code conversion based on the selected conversion table. A transcoding device characterized by the above-mentioned.
上記符号化/復号化手段は、上記命令格納手段に格納される各命令データを順次読み出し、命令データを読み出す毎にその命令データに示されている変換テーブルを選択して符号変換を実行すること
を特徴とする請求項1記載の符号変換装置。The command storage means stores one or more command data from the outside,
The encoding / decoding means sequentially reads out each instruction data stored in the instruction storage means, and executes a code conversion by selecting a conversion table indicated in the instruction data every time the instruction data is read out. The transcoder according to claim 1, wherein:
上記符号化/復号化手段は、上記命令データに示されている内容に従い、符号化処理を行うこと
を特徴とする請求項2記載の符号変換装置。In the instruction data, the selection information of the conversion table, the data length of the code string, and the number of processes for performing continuous code conversion are indicated.
3. The apparatus according to claim 2, wherein said encoding / decoding means performs an encoding process in accordance with the contents indicated in said instruction data.
を特徴とする請求項3記載の符号変換装置。4. The apparatus according to claim 3, wherein said encoding / decoding means extracts a code string having a predetermined data length from an input data stream based on a data length of the code string.
を特徴とする請求項3記載の符号変換装置。4. The code conversion apparatus according to claim 3, wherein the coding / decoding means performs the code conversion by using the selected conversion tables for the number of processes for continuously performing the code conversion.
上記データ制御手段は、入出力されるデータストリームのフォーマットに応じて、複数の命令データから構成される命令セットを生成し、生成した命令セットを上記命令格納手段に格納すること
を特徴とする請求項2記載の符号変換装置。Further comprising data control means for generating the instruction data,
The data control means generates an instruction set including a plurality of instruction data according to a format of a data stream to be input / output, and stores the generated instruction set in the instruction storage means. Item 3. The transcoder according to Item 2.
を特徴とする請求項1記載の符号変換装置。The conversion table storage means stores a conversion table for encoding in which a code string is indicated for the syntax, and a conversion table for decoding in which syntax is indicated for the code string. The transcoder according to claim 1, wherein:
符号変換前のシンタックス又は符号列が入力され、当該符号変換前のシンタックス又は符号列を、上記変換テーブル内の各情報群を指定する上位アドレスと、上記情報群内における各情報の順位を示す下位アドレスとに変換するアドレス生成手段と、
上位アドレスに対応させてその上位アドレスにより指定される情報群内の先頭情報のアドレスを記述したオフセットテーブルとを備え、
上記符号化/復号化手段は、
上記命令格納手段に格納されている命令データに示された変換テーブル及びオフセットテーブルを上記変換テーブル格納手段及びオフセットテーブルから1つずつ選択し、
上記アドレス生成手段から出力された上位アドレスから上記情報群内の先頭情報のアドレスへの変換を選択したオフセットテーブルの記述に従って行い、
当該オフセットテーブルから出力された上記情報群内の先頭情報のアドレスと上記アドレス生成手段から出力された下位アドレスとに基づき、選択された上記変換テーブルから情報を抽出して符号変換を行うこと
を特徴とする請求項1記載の符号変換装置。The information described in the conversion table is divided for each predetermined information group,
The syntax or code string before the code conversion is input, and the syntax or the code string before the code conversion is converted into an upper address specifying each information group in the conversion table, and the order of each information in the information group. Address generating means for converting the data into a lower address to be indicated,
An offset table describing the address of the leading information in the information group specified by the upper address in association with the upper address,
The encoding / decoding means includes:
A conversion table and an offset table indicated in the instruction data stored in the instruction storage means are selected one by one from the conversion table storage means and the offset table;
The conversion from the upper address output from the address generator to the address of the head information in the information group is performed according to the description of the selected offset table,
Extracting information from the selected conversion table and performing code conversion based on the address of the leading information in the information group output from the offset table and the lower address output from the address generation means. The code conversion device according to claim 1, wherein
特定の情報内容を示すシンタックスと符号列との対応関係が記述された変換テーブルを、上記情報内容の種別毎に複数格納している変換テーブル格納手段と、
動画像データに対して上記離散コサイン変換処理を行って生成されたシンタックスであるDCT係数を格納するDCT係数バッファと、
動画像データに対して動き予測処理を行って生成されたシンタックスである動きベクトルを格納する動きベクトルバッファと、
上記DCT係数及び動きベクトル以外のシンタックスであるパラメータを格納するパラメータバッファと、
上記DCTバッファ、上記動きベクトルバッファ及び上記パラメータバッファに格納されているシンタックスを読み出して、読み出したシンタックスから対応した符号列への符号変換を上記変換テーブルの記述に従って行い、符号変換して生成した複数の符号列を合成して1つのデータストリームを生成する符号化処理、及び/又は、入力されたデータストリームから符号列を抽出し、抽出した符号列から対応したシンタックスへの符号変換を上記変換テーブルの記述に従って行い、シンタックスをそれぞれ上記DCTバッファ、上記動きベクトルバッファ及び上記パラメータバッファに格納する復号化処理を、行う符号化/復号化手段と、
少なくとも上記情報内容の種別が示された命令データを格納する命令格納手段とを備え、
上記符号化/復号化手段は、上記命令格納手段に格納されている命令データに示された情報内容の種別に基づき上記変換テーブル格納手段に格納された複数の変換テーブルから1つの変換テーブルを選択し、選択した変換テーブルに基づき上記符号変換を行うこと
を特徴とする符号変換装置。Variable-length coding and fixed-length coding processing and / or variable-length code decoding and fixing for a data stream that includes at least moving image data coded using the discrete cosine transform processing and the motion prediction processing In a code conversion device that performs decoding processing of a long code,
Conversion table storage means for storing a plurality of conversion tables in which a correspondence relationship between syntax indicating a specific information content and a code string is described for each type of the information content,
A DCT coefficient buffer that stores a DCT coefficient that is a syntax generated by performing the discrete cosine transform process on the moving image data;
A motion vector buffer that stores a motion vector that is a syntax generated by performing a motion prediction process on the moving image data,
A parameter buffer for storing a parameter that is a syntax other than the DCT coefficient and the motion vector,
The syntax stored in the DCT buffer, the motion vector buffer, and the parameter buffer is read, and code conversion from the read syntax to a corresponding code string is performed according to the description in the conversion table, and code conversion is performed. Encoding processing for generating a single data stream by combining the plurality of code strings thus obtained, and / or extracting a code string from the input data stream and performing code conversion from the extracted code string to a corresponding syntax. Encoding / decoding means for performing decoding according to the description of the conversion table and storing syntax in the DCT buffer, the motion vector buffer, and the parameter buffer, respectively;
Command storage means for storing at least command data indicating the type of the information content,
The encoding / decoding means selects one conversion table from a plurality of conversion tables stored in the conversion table storage means based on a type of information content indicated in the instruction data stored in the instruction storage means. And a code conversion device for performing the code conversion based on the selected conversion table.
を特徴とする請求項9記載の符号変換装置。The conversion table storage means stores a conversion table for encoding in which a code string is indicated for the syntax, and a conversion table for decoding in which syntax is indicated for the code string. 10. The transcoder according to claim 9, wherein:
上記符号化/復号化手段は、上記命令格納手段に格納される各命令データを順次読み出し、命令データを読み出す毎にその命令データに示されている変換テーブルを選択して符号変換を実行すること
を特徴とする請求項10記載の符号変換装置。The command storage means stores one or more command data from the outside,
The encoding / decoding means sequentially reads out each instruction data stored in the instruction storage means, and executes a code conversion by selecting a conversion table indicated in the instruction data every time the instruction data is read out. The transcoder according to claim 10, wherein:
上記符号化/復号化手段は、上記命令データに示されている内容に従い、符号化処理を行うこと
を特徴とする請求項11記載の符号変換装置。The instruction data given at the time of encoding includes type information of information content, data length of a code string, selection information of a parameter buffer, a DCT coefficient buffer or a motion vector buffer, and information indicating a value to be fixed-length encoded. , And the number of times of continuous code conversion are shown,
12. The transcoder according to claim 11, wherein said encoding / decoding means performs an encoding process according to the contents indicated in said instruction data.
上記符号化/復号化手段は、上記命令データに示されている内容に従い、符号化処理を行うこと
を特徴とする請求項12記載の符号変換装置。In the instruction data given at the time of decoding, the type information of the information content, the data length of the code string, and the number of times of continuous code conversion are shown,
13. The apparatus according to claim 12, wherein said encoding / decoding means performs an encoding process in accordance with the contents indicated in said instruction data.
上記制御データには、その命令データに基づく処理がストリームの終端に対する処理であることを示す終端処理情報と、その命令データに基づく処理が固定長符号に対する処理を行うのか可変長符号に対する処理を行うのかを示す固定長/可変長符号処理識別情報と、その命令データに基づく処理がイントラマクロブロックに対する処理を行うのかインターマクロブロックに対する処理を行うのかを示すイントラ/インター処理識別情報と、その命令データに基づき復号化されたシンタックスの格納先のバッファを指定するバッファ選択情報とを含み、
上記符号化/復号化手段は、上記命令データに示されている内容に従い、符号化処理を行うこと
を特徴とする請求項11記載の符号変換装置。Control data corresponding to each type information of information content indicated in the command data stored in the command data storage means includes control data storage means stored from the outside,
The control data includes termination processing information indicating that the processing based on the instruction data is processing for the end of the stream, and whether the processing based on the instruction data performs processing on fixed-length codes or processing on variable-length codes. Fixed / variable-length code processing identification information indicating whether or not the processing based on the instruction data performs processing on an intra macroblock or an inter macroblock, and the instruction data And buffer selection information that specifies a buffer in which to store the syntax decoded based on
12. The transcoder according to claim 11, wherein said encoding / decoding means performs an encoding process according to the contents indicated in said instruction data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002241051A JP3988582B2 (en) | 2002-08-21 | 2002-08-21 | Encoding device and decoding device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002241051A JP3988582B2 (en) | 2002-08-21 | 2002-08-21 | Encoding device and decoding device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004080634A true JP2004080634A (en) | 2004-03-11 |
JP3988582B2 JP3988582B2 (en) | 2007-10-10 |
Family
ID=32023660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002241051A Expired - Fee Related JP3988582B2 (en) | 2002-08-21 | 2002-08-21 | Encoding device and decoding device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3988582B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007043674A (en) * | 2005-07-05 | 2007-02-15 | Matsushita Electric Ind Co Ltd | Variable-length decoding method and apparatus |
WO2013132590A1 (en) * | 2012-03-06 | 2013-09-12 | 富士通株式会社 | Program, information processing apparatus, and data generating method |
-
2002
- 2002-08-21 JP JP2002241051A patent/JP3988582B2/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007043674A (en) * | 2005-07-05 | 2007-02-15 | Matsushita Electric Ind Co Ltd | Variable-length decoding method and apparatus |
WO2013132590A1 (en) * | 2012-03-06 | 2013-09-12 | 富士通株式会社 | Program, information processing apparatus, and data generating method |
Also Published As
Publication number | Publication date |
---|---|
JP3988582B2 (en) | 2007-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4440640B2 (en) | Image block decoding method | |
US10623742B2 (en) | Method of determining binary codewords for transform coefficients | |
JP5258664B2 (en) | Image coding apparatus, method and program, and image decoding apparatus, method and program | |
US9270988B2 (en) | Method of determining binary codewords for transform coefficients | |
US9167245B2 (en) | Method of determining binary codewords for transform coefficients | |
US20070242753A1 (en) | Coding and decoding method and apparatus using plural scanning patterns | |
US9635358B2 (en) | Method of determining binary codewords for transform coefficients | |
KR100732358B1 (en) | Video encoding method, video decoding method, video encoding program, video decoding program, video encoding apparatus, and video decoding apparatus | |
WO2011121715A1 (en) | Image decoding method | |
WO1999022524A1 (en) | Image decoder, image encoder, image communication system, and encoded bit stream converter | |
JP2002315004A (en) | Image-encoding method and device, image-decoding method and device, and image processing system | |
JP2009207163A (en) | Decoding device and method, and recording medium | |
WO2006114954A1 (en) | Video information recording device, video information recording method, video information recording program, and recording medium containing the video information recording program | |
JP2010051013A (en) | Encoding method, encoding apparatus, decoding method, and decoder | |
EP1977599A1 (en) | Device and method for encoding/decoding video data | |
JP2015109695A (en) | Moving image encoder and moving image decoder | |
JP4660408B2 (en) | Encoding method | |
JPH09121359A (en) | Picture coding and decoding methods | |
JP3988582B2 (en) | Encoding device and decoding device | |
JP2006333500A (en) | Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, and moving image decoding method | |
JP4906197B2 (en) | Decoding device and method, and recording medium | |
JP2004007788A (en) | Device and method for encoding animation, and device and method for decoding the same | |
US20120147972A1 (en) | Image decoding apparatus, image decoding method, image encoding apparatus, image encoding method, and program | |
JP2020072369A (en) | Decoding device, encoding device, decoding method, encoding method, and program | |
JP4847423B2 (en) | Moving picture encoding apparatus and computer program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050518 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070129 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070206 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070406 |
|
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: 20070626 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070709 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100727 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |