JP3622473B2 - Variable length code decoding device - Google Patents
Variable length code decoding device Download PDFInfo
- Publication number
- JP3622473B2 JP3622473B2 JP02452598A JP2452598A JP3622473B2 JP 3622473 B2 JP3622473 B2 JP 3622473B2 JP 02452598 A JP02452598 A JP 02452598A JP 2452598 A JP2452598 A JP 2452598A JP 3622473 B2 JP3622473 B2 JP 3622473B2
- Authority
- JP
- Japan
- Prior art keywords
- code
- length
- register
- dct coefficient
- bit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、可変長符号とそれに付加される付加情報を用いた符号化方式によって符号化された符号を高速に復号する装置に関するものであり、特にJPEG(Joint Photographic Experts Group)方式などの多階調画像符号化方式におけるハフマン符号を高速に復号する装置として適用できるものである。
【0002】
【従来の技術】
JPEG方式などの多階調画像符号化方式では、画像を例えば8×8画素のブロックに分割して以下のような操作を行なう。
【0003】
▲1▼ブロックの画素値を2次元離散コサイン変換(DCT)によって64個のDCT係数に変換する。
▲2▼この64個のDCT係数を量子化テーブルで持っている量子化ステップで量子化する。
▲3▼量子化された64個のDCT係数のうち1個のDC係数は前ブロックのDC係数との差分をとり、この差分をハフマン符号により可変長符号化し、必要に応じて可変長の付加情報ビットを可変長符号の後に付加し符号ビット列を得る。
▲4▼量子化された64個のDCT係数のうち63個のAC係数はジグザグスキャン順に配列し、この配列の中で連続するゼロの個数とその次にくる非ゼロの係数の値を組として可変長符号化し、必要に応じて可変長の付加情報ビットを可変長符号の後に付加することによって符号ビット列を得る。
【0004】
復号装置では前記符号化の過程を逆にたどることによって画像を復元する。
【0005】
上記の符号化方式で符号化された符号を復号する装置は、例えば、特開平4−133522号公報、特開平3−247020号公報、特開平4−23521号公報、特開平5−63586号公報、特開平9−130265号公報、特開平9−130266号公報に開示されている。
【0006】
図11は、これら従来の復号装置を説明するためのものであり、図11において、11、12は入力符号ビット列を保持するラッチ、13はバレルシフタ、14は変換回路、15は後段へのデータを一時保持する出力用ラッチ、16は累算回路、17はEOBの検出データを一時保持するEOB検出用ラッチである。
【0007】
符号ビット列は可変長符号(ハフマン符号)とこれに続く付加ビットを継続してなり、可変長符号は付加ビットのビット長またはビット長とゼロのランレングスとの組合わせを表す。変換回路14は符号ビット列の可変長符号を復号し、可変長符号のビット長、付加ビットのビット長、ゼロのランレングス等を生成し、ラッチ15を介して所望のデータを後続の付加ビット取出し部に送るものである。また、累算回路16は変換回路14から可変長符号および付加ビットのトータルのビット長を知り、バレルシフタ13やラッチのシフトを制御するものである。また、EOB検出用のラッチ17はEOBの検出によりつぎにDC係数が来ることを通知するものである。
【0008】
すなわち、従来の構成では、符号ビット列のなかの複数ビットを保持するレジスタまたはラッチ11、12を複数設け、このレジスタに保持された符号ビット列の中から復号に必要な有効ビット列をセレクタまたはバレルシフタ13を用いて取り出す。そして、この有効ビット列をROMまたはPLAなどで構成された変換回路14に入力し、変換回路14の出力の一部を復号データとして出力する。また変換回路14の出力の他の一部を用いて前記レジスタ11、12の内容の更新と前記セレクタ13による次の有効ビット列の取り出しを制御し、変換回路14の出力の他の一部を用いて可変長符号の後に付加されている付加情報ビットの取り出しを制御するようにしている。
【0009】
ところで、上記の多階調画像符号化方式による符号の復号において、DC係数の可変長符号の復号とAC係数の可変長符号の復号では違う変換回路を用いる必要があるが、従来技術に示した復号装置では変換回路を適切に使い分けることができない。特開平4−133522号公報に示された復号回路では、符号列中のEOB(End of Block)符号を検出することによって変換回路を切り替える回路としているが、AC係数の63番目が非ゼロの場合はブロックの最後にEOB符号が出力されないので、正しく切り替えることはできない。
【0010】
また、可変長符号の復号装置から出力される復号データは、次段の逆量子化装置へ入力されるが、現在出力している復号データがDCT係数の何番目なのかという情報を出力していないため、逆量子化装置において逆量子化に用いる量子化テーブルを管理する必要がある。
【0011】
【発明が解決しようとする課題】
本発明は、以上の事情を考慮してなされたものであり、AC係数の可変長符号とDC係数の可変長符号とを簡易かつ確実に区別できるようにすることを目的としている。
【0012】
【課題を解決するための手段】
本発明の可変長符号の復号装置は、複数ビット並列に入力される符号ビット列を保持するための第一のレジスタと、第一のレジスタに新たな符号ビット列が書き込まれた時に、それまで第一のレジスタに保持されていた符号ビット列を保持するための第二のレジスタと、第一と第二のレジスタに保持されている符号ビット列から復号すべき符号ビット列を取り出すためのセレクタと、復号すべき符号ビット列を入力として、復号データ、可変長符号の符号長、可変長の付加情報ビットのビット長、可変長符号の符号長と可変長の付加情報ビットのビット長を加算した復号済符号長を出力する変換回路と、変換回路から出力される復号済符号長を用いて第一と第二のレジスタの内容を更新し、次に復号する符号ビット列の取り出し位置をセレクタに指示し、本装置に符号を出力している前段の装置に対して新たな符号ビット列を要求する制御回路と、復号データに含まれるAC係数のゼロのランレングスとEOB(End of Block)符号を用いて現在復号しているDCT係数がブロックのなかの何番目のDCT係数かを管理するDCT係数位置レジスタと、DCT係数位置レジスタの出力を用いてDC係数用の変換回路とAC係数用の変換回路を切り替える装置と、前記セレクタの出力と前記変換回路の出力とDCT係数位置レジスタの出力を後段の装置に出力するためのレジスタとを含んで構成される。
【0013】
以上のように復号装置を構成することによって、1クロックサイクルで必ず1つの可変長符号を解釈し復号することができ、復号スピードを保証することができる。また、可変長符号に付加される付加情報ビットも次段の回路で容易に取り出すことができる。また、DCT係数位置レジスタを備えたことによって、DC係数用の変換回路とAC係数用の変換回路を適切にきりかえることができる。さらに、DCT係数位置レジスタの出力が後段の回路へ出力されているので、逆量子化回路では、この値を用いて量子化テーブルから必要な量子化ステップ値を容易に得ることができる。
【0014】
【発明の実施の態様】
以下、本発明の実施例について説明する。
【0015】
図1は本発明の実施例の可変長復号装置(付加ビット検出用前段)の構成を全体として示しており、この図において、可変長復号装置は、第一のレジスタ101、第二のレジスタ102、符号セレクタ回路103、変換回路104、復号起動回路105、符号選択制御回路106、DCT係数位置レジスタ107、出力レジスタ108を含んで構成されている。
【0016】
前段の装置から入力される符号ビット列CodeInは、第一のレジスタ101に保持される。第一のレジスタ101のビット数は、可変長符号の最大符号長と可変長付加情報ビットの最大ビット長を加えた値以上でなければならない。JPEG方式の一般的な符号化方法では、最大符号長は16ビット、最大付加情報ビット長は11ビットなので、レジスタ101のビット数は27ビット以上必要である。電子回路への実装が容易となるように、本実施例ではレジスタ101のビット数は32ビットとする。このレジスタは図2のようにマルチプレクサ111とフリップフロップ111とを接続し、さらにこれを並列に配列することによって実現することができる。第一のレジスタ101への符号ビット列のロードはロード信号で制御される。
【0017】
第二のレジスタ102は、第一のレジスタ101と同様に構成され、第一のレジスタ101に新たな符号ビット列がロードされたときに、それまで第一のレジスタ101に保持されていた符号ビット列をロードする。このロード動作は、第二のレジスタ102に保持されている符号ビット列の復号が全て終了した時に行なわれる。
【0018】
第一のレジスタ101の符号32ビットと第二レジスタ102の符号32ビットは連結されて、64ビットの符号列bit63−0として符号セレクタ103に入力される。本実施例では、32ビットの符号列のMSB側から順に符号が詰められているものとする。この場合、64ビットの上位半分の32ビットは第二レジスタ102の符号32ビットとし、下位32ビットは第一レジスタ101の符号32ビットとし、第一と第二のレジスタのMSB側が連結後の符号ビット列のMSB側となるように連結する。
【0019】
セレクタ回路103は、図3に示すように5ビットのセレクト信号によって、入力された64ビットの符号列bit63−0から27ビットの符号code26−0を切り出して出力する。セレクト信号が’00000’の場合はビット63−37を出力し、セレクト信号の値が1増加するごとに1ビット下位にずれた位置の符号を切り出し、セレクト信号が’11111’の場合はビット32−6を出力する。セレクタ回路103は、マルチプレクサを多段階、並列に接続して実現することができる。
【0020】
セレクタ回路103から出力される27ビットの符号列のうち、可変長符号を含む上位16ビットはハフマン符号テーブルによる変換を行う変換回路104に入力する。変換回路104の入力と出力の例として、JPEG方式の画像符号化において画像の輝度成分を復号する場合に一般的に用いられる変換テーブルの入力と出力を図4に示す。
【0021】
変換回路104の入力table−in16−0の最上位ビットはDC係数用の変換テーブルとAC係数用の変換テーブルを切り換える信号を入力する。入力の残り16ビットは、セレクタ回路103の出力の上位16ビットを入力する。図4の例において、セレクタ回路103からの入力ビットとして16ビット未満の入力パターンしか示されていないワードがあるが、これは不足分の下位ビットがドントケアであることを示している。例えば、3行目の入力パターンは’011’となっているが、これは入力された符号列のうち上位3ビットが’011’ならば、残りの13ビットの値にかかわらず、出力は右に示されている’00101 0000 0010’であることを示している。
【0022】
変換回路104の出力としては、復号データ、可変長符号の符号長、可変長の付加情報ビットのビット長、可変長符号の符号長と可変長の付加情報ビットのビット長を加算した復号済符号長の4つの情報が必要である。しかし、このうちの復号データ以外の3つについては、2つが判っていれば残り1つを容易に得ることができるので、かならずしも3つ全てを変換回路104から出力する必要はない。図4の例の出力信号table−out12−0では、上位5ビットは可変長符号の符号長と可変長の付加情報ビットのビット長を加算した復号済符号長、次の4ビットはAC係数列中のゼロのランレングスを示す復号データ、最下位の4ビットは付加情報ビットのビット長である。
【0023】
復号テーブルによる変換回路104の実装方法の一例として、図4のような入出力の関係を論理合成ツールに与えて、この関係を満足する論理回路を自動合成する方法がある。図4の例の復号テーブルの場合は、論理セル数が700以下、入力から出力までの遅延時間が論理セル15段分以下という、小規模で高速な回路で実装することができる。
【0024】
変換回路104の他の実装方法の一例として、ROM、RAMなどのメモリ回路による実装がある。この場合、図4の例の復号テーブルを実装するためには、アドレス入力17ビット、データ出力13ビット必要である。よって回路規模は、13ビット×131072ワードとなる。RAMを用いて実装した場合は、回路の動作中に適切なタイミングでRAMの内容を書き換えることによって、複数の符号化・復号化テーブルに対応することができるという利点がある。
【0025】
復号起動回路105の構成例を図5に示す。復号起動回路105はステートロジック112およびラッチ113を含む。Start信号によってStateが変化する例を図6に示す。この例では、Start信号がLになるとStateは’00’になり、Start信号がHになると次のクロックサイクルからStateは’01’→’10’→’11’と変化し、次にStart信号がLになるまでStateは’11’に留まる。Stateが’00’のときは回路は停止状態である。Stateが’01’と’10’のときは、第一のレジスタ101と第二のレジスタ102に最初の2ワード(64ビット)の符号列をロードしており、復号は開始されていない。Stateが’11’のときは、1サイクルに1符号が復号され、必要に応じて第一のレジスタ101と第二のレジスタ102に新たな符号列がロードされる。
【0026】
符号選択制御回路106の構成例を図7に示す。符号選択制御回路106は加算器116、第一のスタートロジック114、第二のスタートロジック115、ラッチ117を含む。この制御回路106から出力されるセレクト信号によってセレクタ回路103をきりかえて、ロード信号によって第一のレジスタ101と第二のレジスタ102と復号装置の前段にあって符号ビット列を出力する装置を制御する。セレクト信号は、変換回路104の出力の上位5ビットtable−out12−8を加算することによって毎サイクル更新する。ロード信号は、加算器116のキャリーアウトを出力する。また、復号装置が起動するときは、起動回路105のState信号によって、セレクト信号とロード信号は、図8のように出力される。
【0027】
DCT係数位置レジスタ107の構成例を図9に示す。DCT係数位置レジスタ107は、NAND回路118、AND回路121、NOR回路119、120、OR回路122、ラッチ123、加算器124、増分器125を含んで構成されている。DCT係数位置レジスタ107の出力CoefPositionは、変換回路104の出力table−out7−4と’1’を加算することによって毎サイクル更新する。復号装置が起動するときは、Stateが’11’になるまで、CoefPosition=’000000’とする。また、変換回路4は、EOB(End of Block)に対して、table−out7−0=’00000000’を出力するので、この場合もCoefPosition=’000000’とする。また、CoefPosition=’000000’のときはDC/AC=’0’とし、それ以外の場合はDC/AC=’1’として、変換回路104のDC係数用の変換テーブルとAC係数用の変換テーブルを切り換える。なお、図1に破線で示すように符号セレクタ回路103からの符号ビット列(TableIn16−0)を直接にDCT係数位置レジスタ107に供給してEOBを検出してDC/AC=’0’としてもよい。
【0028】
セレクタ回路103の出力、変換回路104の出力、DCT係数位置レジスタ107の出力は、出力レジスタ108で同期をとって次段の回路に出力する。レジスタ108は、フリップフロップを並列に接続して構成できる。
【0029】
この回路の次段に接続する回路の構成例を図10に示す。次段の回路は、DCT係数セレクタ回路126、差分符号復号回路127、マルチプレクサ128、乗算器129、量子化係数出力回路130、ランレングス符号復号回路131を含んで構成されている。変換回路104から出力される符号長と付加情報ビット長を使って、セレクタ回路103から出力される符号ビット列から量子化されたDCT係数を得る。DC係数の場合は、前ブロックとの差分からDCT係数に戻す。DCT係数位置レジスタ107の出力を使って量子化テーブルから量子化ステップを得、乗算器129で逆量子化する。このように、可変長符号復号装置にDCT係数位置レジスタ107を設けたことによって、次段の回路を単純な構成とすることができ、高速動作が可能な回路とすることができる。
【0030】
【発明の効果】
本発明によれば、1クロックサイクルで必ず1つの可変長符号を解釈し復号することができ、符号長によらず復号スピードを保証することができる。また、可変長符号に付加される付加情報ビットも次段の回路で容易に取り出すことができる。また、DCT係数位置レジスタを備えたことによって、DC係数用の変換回路とAC係数用の変換回路を適切にきりかえることができる。さらに、DCT係数位置レジスタの出力が次段の回路へ出力されているので、逆量子化回路では、この値を用いて量子化テーブルから必要な量子化ステップ値を容易に得ることができる。
【図面の簡単な説明】
【図1】本発明の実施例を全体として示すブロック図である。
【図2】第一と第二のレジスタを構成する1ビット分のレジスタの構成例を示すブロック図である。
【図3】符号セレクタ回路の構成例を示すブロック図である。
【図4】変換回路の入出力関係の一例を示す図である。
【図5】復号起動回路の構成例を示すブロック図である。
【図6】復号起動回路の入出力信号波形を示す波形図である。
【図7】第一と第二のレジスタとセレクタ回路を制御する符号選択制御回路の構成例を示すブロック図である。
【図8】符号選択制御回路の起動時の動作を説明する図である。
【図9】DCT係数位置レジスタの構成例を示すブロック図である。
【図10】本発明の可変長符号の復号装置の次段に接続する回路を全体として示すブロック図である。
【図11】従来技術を示すブロック図である。
【符号の説明】
101 符号ビット列を保持する第一のレジスタ
102 符号ビット列を保持する第二のレジスタ
103 符号セレクタ回路
104 変換回路
105 復号起動回路
106 符号選択制御回路
107 DCT係数位置レジスタ
108 出力レジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an apparatus for rapidly decoding a code encoded by an encoding method using a variable length code and additional information added thereto, and in particular, a multi-order such as a JPEG (Joint Photographic Experts Group) method. The present invention can be applied as a device that decodes a Huffman code in a video encoding system at high speed.
[0002]
[Prior art]
In a multi-tone image encoding method such as the JPEG method, an image is divided into blocks of 8 × 8 pixels, for example, and the following operations are performed.
[0003]
(1) The pixel value of the block is converted into 64 DCT coefficients by two-dimensional discrete cosine transform (DCT).
{Circle around (2)} The 64 DCT coefficients are quantized in the quantization step possessed by the quantization table.
(3) One of the 64 quantized DCT coefficients takes a difference from the DC coefficient of the previous block, and the difference is variable-length encoded by a Huffman code, and a variable length is added if necessary. An information bit is added after the variable length code to obtain a code bit string.
(4) 63 AC coefficients out of 64 quantized DCT coefficients are arranged in a zigzag scan order, and the number of consecutive zeros in this array and the value of the next nonzero coefficient are taken as a set. A code bit string is obtained by performing variable length coding and adding variable length additional information bits after the variable length code as necessary.
[0004]
The decoding apparatus restores the image by following the encoding process in reverse.
[0005]
For example, Japanese Patent Laid-Open Nos. 4-133522, 3-247020, 4-23521, and 5-63586 are disclosed as apparatuses for decoding codes encoded by the above-described encoding method. JP-A-9-130265 and JP-A-9-130266.
[0006]
FIG. 11 is a diagram for explaining these conventional decoding apparatuses. In FIG. 11, 11 and 12 are latches for holding an input code bit string, 13 is a barrel shifter, 14 is a conversion circuit, and 15 is data for the subsequent stage. An output latch for temporarily holding, an
[0007]
The code bit string is composed of a variable length code (Huffman code) followed by additional bits, and the variable length code represents a bit length of the additional bits or a combination of a bit length and a run length of zero. The
[0008]
That is, in the conventional configuration, a plurality of registers or
[0009]
By the way, in the decoding of the code by the above multi-tone image coding method, it is necessary to use different conversion circuits for the decoding of the variable length code of the DC coefficient and the decoding of the variable length code of the AC coefficient. The decoding device cannot properly use the conversion circuit properly. In the decoding circuit disclosed in Japanese Patent Laid-Open No. 4-133522, the conversion circuit is switched by detecting an EOB (End of Block) code in the code string. However, when the 63rd AC coefficient is non-zero Since the EOB code is not output at the end of the block, switching cannot be performed correctly.
[0010]
Also, the decoded data output from the variable length code decoding device is input to the next-stage inverse quantization device, which outputs information indicating what number of DCT coefficients the currently output decoded data is. Therefore, it is necessary to manage a quantization table used for inverse quantization in the inverse quantization apparatus.
[0011]
[Problems to be solved by the invention]
The present invention has been made in view of the above circumstances, and an object of the present invention is to make it possible to easily and reliably distinguish between a variable length code of an AC coefficient and a variable length code of a DC coefficient.
[0012]
[Means for Solving the Problems]
The variable length code decoding apparatus according to the present invention includes a first register for holding a code bit string input in parallel with a plurality of bits, and a new code bit string written to the first register until then. A second register for holding the code bit string held in the first register, a selector for taking out the code bit string to be decoded from the code bit strings held in the first and second registers, and With the code bit string as input, the decoded data, the code length of the variable length code, the bit length of the variable length additional information bit, the code length of the variable length code and the bit length of the variable length additional information bit are added. The conversion circuit to output and the decoded code length output from the conversion circuit are used to update the contents of the first and second registers, and the position to extract the code bit string to be decoded next is selected. And a control circuit that requests a new code bit string from the preceding apparatus outputting the code to the apparatus, a zero run length of the AC coefficient included in the decoded data, and an EOB (End of Block) code The DCT coefficient position register for managing the DCT coefficient currently decoded in the block using the DCT coefficient position register, the DCT coefficient position register using the output of the DCT coefficient position register and the DC coefficient conversion circuit A device for switching the conversion circuit, and a register for outputting the output of the selector, the output of the conversion circuit, and the output of the DCT coefficient position register to the subsequent device.
[0013]
By configuring the decoding device as described above, one variable length code can always be interpreted and decoded in one clock cycle, and the decoding speed can be guaranteed. Further, additional information bits added to the variable length code can be easily taken out by a circuit in the next stage. Further, by providing the DCT coefficient position register, the DC coefficient conversion circuit and the AC coefficient conversion circuit can be appropriately switched. Furthermore, since the output of the DCT coefficient position register is output to the subsequent circuit, the inverse quantization circuit can easily obtain the required quantization step value from the quantization table using this value.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
Examples of the present invention will be described below.
[0015]
FIG. 1 shows the overall configuration of a variable-length decoding apparatus (previous stage for detecting additional bits) according to an embodiment of the present invention. In this figure, the variable-length decoding apparatus includes a
[0016]
The code bit string CodeIn input from the preceding apparatus is held in the
[0017]
The second register 102 is configured in the same manner as the
[0018]
The code 32 bits of the
[0019]
As shown in FIG. 3, the
[0020]
Of the 27-bit code string output from the
[0021]
The most significant bit of the input table-in 16-0 of the
[0022]
The output of the
[0023]
As an example of a method for mounting the
[0024]
As an example of another mounting method of the
[0025]
A configuration example of the
[0026]
A configuration example of the code
[0027]
A configuration example of the DCT coefficient position register 107 is shown in FIG. The DCT coefficient position register 107 includes a
[0028]
The output of the
[0029]
FIG. 10 shows a configuration example of a circuit connected to the next stage of this circuit. The circuit in the next stage includes a DCT
[0030]
【The invention's effect】
According to the present invention, one variable length code can always be interpreted and decoded in one clock cycle, and the decoding speed can be guaranteed regardless of the code length. Further, additional information bits added to the variable length code can be easily taken out by a circuit in the next stage. Further, by providing the DCT coefficient position register, the DC coefficient conversion circuit and the AC coefficient conversion circuit can be appropriately switched. Further, since the output of the DCT coefficient position register is output to the next-stage circuit, the inverse quantization circuit can easily obtain the necessary quantization step value from the quantization table using this value.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of the present invention as a whole.
FIG. 2 is a block diagram illustrating a configuration example of a 1-bit register configuring the first and second registers.
FIG. 3 is a block diagram illustrating a configuration example of a code selector circuit.
FIG. 4 is a diagram illustrating an example of an input / output relationship of a conversion circuit.
FIG. 5 is a block diagram illustrating a configuration example of a decoding start circuit.
FIG. 6 is a waveform diagram showing input / output signal waveforms of a decoding start circuit.
FIG. 7 is a block diagram illustrating a configuration example of a code selection control circuit that controls the first and second registers and the selector circuit;
FIG. 8 is a diagram for explaining an operation at the time of activation of a code selection control circuit;
FIG. 9 is a block diagram illustrating a configuration example of a DCT coefficient position register.
FIG. 10 is a block diagram showing the whole circuit connected to the next stage of the variable length code decoding apparatus of the present invention.
FIG. 11 is a block diagram showing a conventional technique.
[Explanation of symbols]
Claims (4)
複数ビット並列に入力される符号ビット列を保持する第一のレジスタと、
上記第一のレジスタに新たな符号ビット列が書き込まれた時に、それまで上記第一のレジスタに保持されていた符号ビット列を保持する第二のレジスタと、
上記第一のレジスタおよび上記第二のレジスタに保持されている符号ビット列から復号すべき符号ビット列を取り出すセレクタと、
復号すべき符号ビット列を入力として、復号データ、可変長符号の符号長、可変長の付加情報ビットのビット長、可変長符号の符号長と可変長の付加情報ビットのビット長とを加算した復号済符号長を出力する変換回路と、
上記変換回路から出力される復号済符号長を用いて上記第一のレジスタおよび上記第二のレジスタの内容を更新し、次に復号する符号ビット列の取り出し位置を上記セレクタに指示する制御回路と、
復号データに含まれる、上記ゼロの交流成分のDCT係数のランレングスとこれに続く非ゼロの交流成分のDCT係数の値とからなる組ごとに、当該ゼロの交流成分のDCT係数のランレングスが示す当該ゼロの交流成分のDCT係数の個数と、当該非ゼロの交流成分のDCT係数の個数である1とを累積して得られる、現在復号しているDCT係数がブロックのなかの何番目のDCT係数かを示すDCT係数位置データを記憶するとともに、EOB(End ofBlock)符号により現在のDCT係数位置データを初期値にリセットするDCT係数位置レジスタと、
DCT係数位置レジスタの出力を用いて直流成分のDCT係数用の変換回路と交流成分用のDCT係数用の変換回路を切り替える手段と、
前記セレクタの出力と前記変換回路の出力とDCT係数位置レジスタの出力とを後段の装置に出力するレジスタとを有することを特徴とする可変長符号復号装置。 In a variable length code decoding apparatus that encodes a set consisting of a run length of a DCT coefficient of zero AC component and a value of a DCT coefficient of a non-zero AC component following this,
A first register holding a sign bit string input in parallel in a plurality of bits;
When a new code bit string is written in the first register, a second register that holds the code bit string held in the first register until then,
A selector for extracting a code bit string to be decoded from code bit strings held in the first register and the second register;
Decoding by adding the code bit string to be decoded as input and decoding data, variable length code length, variable length additional information bit length, variable length code length and variable length additional information bit length A conversion circuit for outputting a completed code length;
A control circuit for updating the contents of the first register and the second register using the decoded code length output from the conversion circuit and instructing the selector of the extraction position of the code bit string to be decoded next;
For each set consisting of the run length of the DCT coefficient of the zero alternating current component and the value of the DCT coefficient of the nonzero alternating current component included in the decoded data, the run length of the DCT coefficient of the zero alternating current component is The number of DCT coefficients of the zero AC component shown and the number of DCT coefficients of the non-zero AC component, which is obtained by accumulating the number of DCT coefficients currently being decoded , is the number of DCT coefficients currently decoded in the block. A DCT coefficient position register for storing DCT coefficient position data indicating whether it is a DCT coefficient, and resetting the current DCT coefficient position data to an initial value by an EOB (End of Block) code ;
Means for switching between a DCT coefficient conversion circuit for a DC component and a DCT coefficient conversion circuit for an AC component using the output of the DCT coefficient position register;
A variable-length code decoding apparatus comprising: a register that outputs an output of the selector, an output of the conversion circuit, and an output of a DCT coefficient position register to a subsequent apparatus.
上記前段部が、
複数ビット並列に入力される符号ビット列を保持する第一のレジスタと、
上記第一のレジスタに新たな符号ビット列が書き込まれた時に、それまで上記第一のレジスタに保持されていた符号ビット列を保持する第二のレジスタと、
上記第一のレジスタおよび上記第二のレジスタに保持されている符号ビット列から復号すべき符号ビット列を取り出すセレクタと、
復号すべき符号ビット列を入力として、可変長符号の符号長および可変長の付加情報ビットのビット長に関するデータ、ならびに復号データに含まれる交流成分のDCT係数の量子化データのゼロのランレングスに関するデータを出力する変換回路と、
上記変換回路から出力されるビット長に関するデータを用いて上記第一のレジスタおよび上記第二のレジスタの内容を更新し、次に復号する符号ビット列の取り出し位置を上記セレクタに指示する制御回路と、
上記交流成分用の可変長符号の各々の復号データに含まれる、上記ゼロの交流成分のD CT係数のランレングスが示す当該ゼロの交流成分のDCT係数の個数とこれに続く非ゼロの交流成分のDCT係数の個数である1とを順次に累積して得られる、現在復号している周波数成分のDCT係数がブロックのなかの何番目のDCT係数かを示すDCT係数位置情報を記憶するとともに、EOB(End of Block)符号により現在のDCT係数位置データを初期値にリセットするDCT係数位置レジスタと、
復号すべき符号ビット列と、可変長符号の符号長および可変長の付加ビットのビット長に関するデータと、上記DCT係数位置レジスタの出力とを上記後段部に出力するレジスタとを有することを特徴とする可変長符号復号装置。A variable-length additional bit representing a difference in the quantized data of the DCT coefficient of the DC component of the image block, a variable-length code for the DC component assigned to the bit length of the additional bit, and a non-zero DCT coefficient of each AC component Variable-length additional bits representing the quantized data, and the variable length code for the AC component assigned to the combination of the bit length of this additional bit and the run length of the AC component for which the quantized data of the DCT coefficient is zero From the code bit string that is successively constructed in a predetermined order, and from the code bit string based on the information from the preceding stage and the preceding stage part that sequentially cuts out the set of the variable length code and the additional bit of the variable length A variable-length code decoding apparatus comprising a subsequent stage that extracts and decodes the variable-length additional bits;
The front part is
A first register holding a sign bit string input in parallel in a plurality of bits;
When a new code bit string is written in the first register, a second register that holds the code bit string held in the first register until then,
A selector for extracting a code bit string to be decoded from code bit strings held in the first register and the second register;
Data relating to code length of variable length code and bit length of additional information bit of variable length, and data relating to zero run length of quantized data of DCT coefficient of AC component included in decoded data with code bit string to be decoded as input A conversion circuit that outputs
A control circuit for updating the contents of the first register and the second register using data relating to the bit length output from the conversion circuit and instructing the selector of the extraction position of the code bit string to be decoded next;
Included in the decoded data for each variable length code for the AC component, the AC component of the number and the non-zeros which follow the DCT coefficients of the AC component of the zero indicating the run length of the D CT coefficients of the AC component of the zero DCT coefficient position information indicating which DCT coefficient of the frequency component being decoded is the DCT coefficient in the block obtained by sequentially accumulating 1 which is the number of DCT coefficients of A DCT coefficient position register for resetting current DCT coefficient position data to an initial value by an EOB (End of Block) code ;
A code bit sequence to be decoded, a register that outputs data relating to a code length of a variable length code and a bit length of a variable length additional bit, and an output of the DCT coefficient position register to the subsequent stage Variable length code decoding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP02452598A JP3622473B2 (en) | 1998-02-05 | 1998-02-05 | Variable length code decoding device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP02452598A JP3622473B2 (en) | 1998-02-05 | 1998-02-05 | Variable length code decoding device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11225077A JPH11225077A (en) | 1999-08-17 |
JP3622473B2 true JP3622473B2 (en) | 2005-02-23 |
Family
ID=12140581
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP02452598A Expired - Fee Related JP3622473B2 (en) | 1998-02-05 | 1998-02-05 | Variable length code decoding device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3622473B2 (en) |
-
1998
- 1998-02-05 JP JP02452598A patent/JP3622473B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH11225077A (en) | 1999-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4886755B2 (en) | Context-adaptive binary arithmetic encoding and decoding system and method | |
US6587057B2 (en) | High performance memory efficient variable-length coding decoder | |
JP4422833B2 (en) | Decoder and method for decoding variable length codeword | |
US5254991A (en) | Method and apparatus for decoding Huffman codes | |
US5208593A (en) | Method and structure for decoding Huffman codes using leading ones detection | |
US7343542B2 (en) | Methods and apparatuses for variable length encoding | |
JP3227292B2 (en) | Encoding device, encoding method, decoding device, decoding method, encoding / decoding device, and encoding / decoding method | |
JPS6148298B2 (en) | ||
JPH0645950A (en) | Apparatus and method for generation of signal | |
Lee et al. | $2^{n} $ pattern run-length for test data compression | |
JPH06104767A (en) | Variable length code decoder | |
JPH1065549A (en) | Device for determining length of variable length encoded data value, device for decoding data stream of variable length encoded data value, and method for determining length of variable length encoded data value | |
JP4065425B2 (en) | Variable length coding packing architecture | |
EP0681404A2 (en) | Variable-length decoder | |
US7256719B2 (en) | Digital data decompression implemented in a field programmable array device | |
JP3622473B2 (en) | Variable length code decoding device | |
US6781528B1 (en) | Vector handling capable processor and run length encoding | |
US5654806A (en) | Code manipulation for a high speed JPEG decoder | |
Rudberg et al. | New approaches to high speed Huffman decoding | |
US6707398B1 (en) | Methods and apparatuses for packing bitstreams | |
JP4013680B2 (en) | Decoding device and decoding method | |
KR100292050B1 (en) | Data simulator of variable length decoder | |
JPH09246990A (en) | Variable length coder/decoder | |
JP2710917B2 (en) | Header detector and decoding device using the same | |
US6707397B1 (en) | Methods and apparatus for variable length codeword concatenation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040527 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040601 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040729 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040824 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041019 |
|
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: 20041102 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041115 |
|
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: 20071203 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081203 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091203 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101203 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |