JP2005094562A - Code data decoder - Google Patents

Code data decoder Download PDF

Info

Publication number
JP2005094562A
JP2005094562A JP2003327443A JP2003327443A JP2005094562A JP 2005094562 A JP2005094562 A JP 2005094562A JP 2003327443 A JP2003327443 A JP 2003327443A JP 2003327443 A JP2003327443 A JP 2003327443A JP 2005094562 A JP2005094562 A JP 2005094562A
Authority
JP
Japan
Prior art keywords
code data
decoding
code
storage unit
information storage
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.)
Withdrawn
Application number
JP2003327443A
Other languages
Japanese (ja)
Inventor
Yasuharu Sakurai
康晴 桜井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2003327443A priority Critical patent/JP2005094562A/en
Publication of JP2005094562A publication Critical patent/JP2005094562A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To flexibly deal with a change in a way of assigning codes while suppressing circuit scale small in a variable length code data decoder. <P>SOLUTION: LUTs 302, 304, 306 for storing decoding table information are composed of RAMs. The LUT 302 stores information for decoding code data shorter than m1. The LUT 304 stores information for decoding code data wherein the same bit continuously appears more than m2 in the top. The LUT 306 stores information for decoding the remaining codes which do not match the conditions of the LUTs 302, 304. A shift circuit 326 is provided to shift code data D3 just for m3 as many as the number of the same bit data continuously appearing in the top commonly for all codes to be decoded by the LUT 306. A shift quantity corresponding to the change in the way of assigning codes is adjusted on the basis of setting of a register part 316. A decision part 340 and a selective output part 360 selectively output appropriate one corresponding to a code length from results of decoding referring to the LUTs. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、符号データの復号装置に関する。より詳細には、たとえばハフマン符号などの可変長符号を書換可能な記憶媒体に記憶したテーブル情報を参照して復号する技術に関する。   The present invention relates to an apparatus for decoding code data. More specifically, the present invention relates to a technique for decoding with reference to table information stored in a rewritable storage medium such as a Huffman code.

データの伝送時の高速化、データの蓄積時の効率化のために、データ圧縮伸張、データ符号化復号化の技術が広く用いられている。このようなデータ圧縮伸張、データ符号化復号化の技術には様々な手法があるが、ハフマン符号などの可変長符号化方式が一般的に用いられている。たとえば、画像符号化方式としてよく知られているJPEG(Joint Photographic Experts Group)方式は、ハフマン符号化とDCT(離散コサイン変換)と量子化を組み合わせた方式である。   Data compression / decompression and data encoding / decoding techniques are widely used to increase data transmission speed and data storage efficiency. There are various techniques for such data compression / decompression and data encoding / decoding techniques, and a variable-length encoding system such as a Huffman code is generally used. For example, the JPEG (Joint Photographic Experts Group) system, which is well known as an image encoding system, is a system that combines Huffman encoding, DCT (discrete cosine transform), and quantization.

可変長符号化方式では、符号化するときには、元の情報に対して可変長のビット列を符号として割り当て、この可変長のビット列を隙間なくパッキングすることによって符号データを作成する。たとえばaという情報に10、bという情報に110、cという情報に1110というように符号のビット列を割り当てた場合は、元の情報abacに対する符号データは10110101110となる。このようにして得られた符号データから元の情報を復元(復号)するためには、符号データから個々の符号の切れ目を判定し、それぞれの符号から対応する元の情報を得なければならない。   In the variable-length encoding method, when encoding, code data is created by assigning a variable-length bit string as a code to the original information and packing the variable-length bit string without gaps. For example, if a bit string of a code is assigned such as 10 for information a, 110 for information b, 1110 for information c, the code data for the original information abac is 10110101110. In order to restore (decode) the original information from the code data obtained in this way, it is necessary to determine the break of each code from the code data and obtain the corresponding original information from each code.

このような可変長符号を復号するための従来例としては、可変長符号を符号長の長短によらず1クロックサイクルで復号する方式が知られている。具体的には、可変長符号データの復号テーブルをメモリ素子で構成しておき、この復号テーブルを参照して入力データに対応した復号データを読み出す、いわゆるテーブルルックアップ方式が知られている。たとえば特許文献1や特許文献2などに開示されている復号システムがある。   As a conventional example for decoding such a variable length code, there is known a method of decoding a variable length code in one clock cycle regardless of the length of the code length. Specifically, a so-called table look-up method is known in which a decoding table of variable-length code data is configured with a memory element, and decoding data corresponding to input data is read with reference to the decoding table. For example, there are decoding systems disclosed in Patent Document 1, Patent Document 2, and the like.

特開平5−63586号公報JP-A-5-63586 特開平8−167855号公報JP-A-8-167855

また、復号システムに用いる復号装置の実装方法として、特許文献1や特許文献2などの他に、特許文献3〜5に開示されているものがある。   Moreover, as a mounting method of a decoding device used in a decoding system, there are those disclosed in Patent Documents 3 to 5 in addition to Patent Document 1 and Patent Document 2.

特開平4−133522号公報Japanese Patent Laid-Open No. 4-133522 特開平4−90267号公報JP-A-4-90267 特開平8−316847号公報JP-A-8-316847

たとえば、特許文献2の図3には、復号装置をROMやRAMの1面の復号テーブルで実装する場合の例が開示されている。以下、この例を従来例1という。   For example, FIG. 3 of Patent Document 2 discloses an example in which the decoding device is mounted with a decoding table on one surface of ROM or RAM. Hereinafter, this example is referred to as Conventional Example 1.

また、特許文献2の図4や図5には、組合せ論理回路で復号装置を実装する場合の例が開示されている。以下、この例を従来例2という。   Further, FIGS. 4 and 5 of Patent Document 2 disclose an example in which a decoding device is implemented by a combinational logic circuit. Hereinafter, this example is referred to as Conventional Example 2.

また、特許文献3の第2図や特許文献4の第1図では、復号装置を複数の小規模なROMで実装する場合の例が開示されている。以下、この例を従来例3という。   Further, FIG. 2 of Patent Document 3 and FIG. 1 of Patent Document 4 disclose examples in which the decoding device is implemented by a plurality of small-scale ROMs. Hereinafter, this example is referred to as Conventional Example 3.

さらに、特許文献5の図1では、符号の割当てが固定の場合に、3つの復号テーブルで実装する場合の例が開示されている。以下、この例を従来例4という。   Furthermore, FIG. 1 of Patent Document 5 discloses an example in which three decoding tables are used when code assignment is fixed. Hereinafter, this example is referred to as Conventional Example 4.

また、特許文献5の図11では、符号の割当てが任意の場合に、9個の復号テーブルで実装する場合の例が開示されている。以下、この例を従来例5という。   Moreover, in FIG. 11 of patent document 5, the example in the case of mounting with nine decoding tables is disclosed when code allocation is arbitrary. Hereinafter, this example is referred to as Conventional Example 5.

しかしながら、従来例1〜5に記載の技術では、符号の割当て方の変更に対する対応の面と、メモリ容量やメモリの利用効率の面(結果としての回路規模の面)で、必ずしもバランスのよい状態となっていない。   However, the techniques described in the conventional examples 1 to 5 are not necessarily in a well-balanced state in terms of dealing with changes in the code allocation method, and in terms of memory capacity and memory utilization efficiency (resulting circuit scale). It is not.

たとえば、従来例1のように、復号装置を1個のROMまたはRAMの復号テーブルで構成すると、符号ビット列の最長ビット数分のアドレス入力が必要になり、巨大なROMまたはRAMが必要になる。たとえば、JPEGでよく用いられる符号割当ての可変長符号(後述する図5や図6を参照)を復号するためには、ROMまたはRAMのアドレス入力は16ビット必要になり、ROMまたはRAMの容量は65536ワードになる。   For example, when the decoding device is configured with a decoding table of one ROM or RAM as in Conventional Example 1, it is necessary to input addresses for the maximum number of bits of the code bit string, and a huge ROM or RAM is required. For example, in order to decode a variable length code with code allocation often used in JPEG (see FIGS. 5 and 6 described later), ROM or RAM address input requires 16 bits, and the capacity of ROM or RAM is 65536 words.

つまり、RAMを利用すれば、符号の割当て方の変更に対応できるが、メモリ容量が多くなる。一方、ROMを利用すれば、符号の割当て方の変更に対応できないし、メモリ容量も多くなる。任意に符号の割当て方が切り替えられると、ROMがそれに対応していなければ、その変更に対応できないからである。種々の割当て方に対応するには、相応の数(バリエーション)のROMを必要とするから、メモリ容量を一層多く必要とする。   That is, if the RAM is used, it is possible to cope with a change in the code allocation method, but the memory capacity increases. On the other hand, if the ROM is used, it is not possible to cope with a change in the code allocation method, and the memory capacity increases. This is because, if the code assignment method is arbitrarily switched, the change cannot be made unless the ROM supports it. In order to cope with various allocation methods, a corresponding number (variation) of ROMs is required, so that a larger memory capacity is required.

また、従来例1では、00などの短い符号を復号するときに、後続のビット列が何であるかに拘わらず一定の復号結果が得られなければならないので、アドレス“00 00…00”から“00 11…11”までに、完全に同一の情報を格納しておかなければならなくなり、メモリエリアの殆どの部分が、同じような情報を格納することに費やされてしまい、メモリの利用効率が悪い。   Further, in the first conventional example, when decoding a short code such as 00, a constant decoding result must be obtained regardless of what the subsequent bit string is, so the addresses “00 00... 00” to “00” 11 ... 11 ", it is necessary to store completely the same information, and most of the memory area is spent storing similar information. bad.

つまり、最長符号長に満たない可変長符号については、上位の可変長符号に相当する部分を除く無効な部分の全符号パターンについて重複して同一のデータを記憶しなければならず、その分メモリ空間が無駄に使用される。このことは、ROMを使用する場合に限らず、符号の割当て方の変更に対応するべくRAMを利用した場合でも同様である。   In other words, for variable length codes that are less than the longest code length, the same data must be stored redundantly for all invalid code patterns except for the portion corresponding to the upper variable length code, and the corresponding memory. Space is wasted. This is not limited to the case where the ROM is used, and the same applies to the case where the RAM is used to cope with the change in the code allocation method.

また、従来例2のように、ROMやRAMと同等の入出力関係を持った組合せ論理回路で復号装置を実装すると、回路規模を小さくすることができるが、符号の割当て方が変更になったときに対応するのが困難になる。たとえばJPEGの規格書では、符号の割当て方の一例(後述する図5を参照)は示されているが、必ずしもこれに従わなくてもよくて、符号データを作成するときに符号の割り当てを自由に決定してもよい。   In addition, when the decoding device is implemented by a combinational logic circuit having an input / output relationship equivalent to that of ROM or RAM as in Conventional Example 2, the circuit scale can be reduced, but the code allocation method has been changed. Sometimes it becomes difficult to respond. For example, in the JPEG standard document, an example of how to assign codes (see FIG. 5 described later) is shown. However, it is not always necessary to follow this, and codes can be assigned freely when creating code data. You may decide to.

組合せ論理回路の復号装置をASIC(Application Specific IC :特定用途向け集積回路)やFPGA(Filed Programmable Gate Alley :フィールドプログラマブルゲートアレイ)に実装すると、符号割当てが異なる符号データに対応するには、ASICの作り直しやFPGAの回路データの書換えなどが必要になり、実質的に対応不可能である。   When a decoding device for a combinational logic circuit is mounted on an ASIC (Application Specific IC) or an FPGA (Filed Programmable Gate Alley: Field Programmable Gate Array), the ASIC can be used to support code data with different code assignments. Reworking or rewriting of FPGA circuit data is required, which is substantially impossible.

また、従来例3では、符号データの上位側を入力する1個のROMと、符号データの下位側を入力する複数のROMで復号装置を実装しており、基本的にROMを利用する構成であるから、従来例2と同様に符号の割り当てが変更になったときに柔軟に対応できないという欠点がある。また、この構成でROMをRAMに置き換えることで、符号割当ての変更に柔軟に対応できると考えられるが、実際には、下位側の複数のRAMがいくつ必要かは、符号の割当て方によって決まるので、RAMの個数を決めて実装すると対応できないケースが発生してしまう。   Further, in Conventional Example 3, the decoding device is implemented by one ROM that inputs the upper side of the code data and a plurality of ROMs that input the lower side of the code data, and basically uses a ROM. Therefore, like the conventional example 2, there is a drawback that when the code assignment is changed, it cannot be flexibly handled. In addition, replacing the ROM with RAM in this configuration can be considered to flexibly cope with changes in code assignment, but in practice, how many RAMs on the lower side are required depends on how the codes are assigned. If the number of RAMs is determined and mounted, a case that cannot be handled occurs.

また、従来例4と従来例5では、各符号長の符号群ごと(符号のビット長ごと)に、全符号ビットから共通ビット部分を除いた復号関与ビット部分に対応づけて各々の可変長符号に対応する固定長データを保持する複数の復号テーブルを設けているので、復号テーブルの個数が多くなってしまう。   In Conventional Example 4 and Conventional Example 5, each variable length code is associated with each decoding code bit group obtained by removing the common bit part from all code bits for each code group (each code bit length). Since a plurality of decoding tables that hold fixed-length data corresponding to are provided, the number of decoding tables increases.

また、従来例4では、3つの復号テーブルに入力ビットを分割して入力しているが、この分割方法が回路実装で固定化してしまうので、符号の割当て方が変更になると対応できない場合がある。   Further, in the conventional example 4, the input bits are divided and inputted to the three decoding tables. However, since this division method is fixed by circuit implementation, it may not be possible to cope with changes in the code allocation method. .

また、従来例5では、ビット長が長い符号用の復号テーブルでは、符号の先頭の決まったビット数を無視するようになっているので、符号の割当て方が変更になると対応できない場合がある。   Further, in the conventional example 5, in the decoding table for a code having a long bit length, the fixed number of bits at the head of the code is ignored, so there are cases where it cannot be handled if the code allocation method is changed.

また、従来例4と従来例5では、複数の復号テーブルの出力の中から1つを選択するための選択回路において、符号長を元に判定しているので、回路構成が複雑になり、また、テーブルから符号長が出力されないと判定できないことが回路の動作速度を低下させる要因となる。   Further, in the conventional example 4 and the conventional example 5, the selection circuit for selecting one of the outputs of the plurality of decoding tables makes the determination based on the code length, so that the circuit configuration becomes complicated. If the code length is not output from the table, it cannot be determined that the operation speed of the circuit is reduced.

本発明は、上記事情に鑑みてなされたものであり、回路を小規模に抑えながら、符号の割当て方の変更に柔軟に対応することのできる復号装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a decoding apparatus that can flexibly cope with a change in the code allocation method while keeping the circuit small.

本発明に係る符号データを復号する復号装置は、先ず、順次入力される符号データのうち、それぞれ所定ビット数よりも短い複数の符号長の符号データを復号するための情報を格納する書換可能な記憶デバイスを有した短ビット符号データ用復号情報記憶部と、順次入力される符号データのうち、符号データ中に共通して同一ビットデータが所定ビット数分連続したものを処理対象として復号するための情報を格納する書換可能な記憶デバイスを有した連続ビット符号データ用復号情報記憶部と、連続ビット符号データ用復号情報記憶部が処理対象とする符号データについての前記所定ビット数分に関する情報を格納する書換可能な記憶デバイスを有した連続ビット数記憶部と、順次入力される符号データの符号の割当て方に応じて各記憶部に格納する情報を書き換えさせる記憶情報更新部とを備えるものとした。   A decoding device for decoding code data according to the present invention first stores rewritable information for decoding code data having a plurality of code lengths shorter than a predetermined number of bits, among sequentially input code data. Decoding information storage unit for short bit code data having a storage device, and decoding among code data that is sequentially input, in which the same bit data is continued for a predetermined number of bits in common in the code data A decoding information storage unit for continuous bit code data having a rewritable storage device for storing the information, and information regarding the predetermined number of bits for the code data to be processed by the decoding information storage unit for continuous bit code data A continuous bit number storage unit having a rewritable storage device to be stored, and each storage unit according to a code allocation method of sequentially input code data It was assumed and a storage information update unit that makes rewriting the information to be stored.

さらに、本発明に係る復号装置は、短ビット符号データ用復号情報記憶部および連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れを選択すべきかを判定する判定部と、判定部の判定結果に基づいて短ビット符号データ用復号情報記憶部および連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れかを選択して出力する選択出力部とを備えるものとした。   Furthermore, the decoding device according to the present invention includes a determination unit that determines which of the decoding results output from the decoding information storage unit for short bit code data and the decoding information storage unit for continuous bit code data is to be selected; A selection output unit that selects and outputs one of the decoding results output from the decoding information storage unit for short bit code data and the decoding information storage unit for continuous bit code data based on the determination result of the unit did.

また従属項に記載された発明は、本発明に係る復号装置のさらなる有利な具体例を規定する。   The invention described in the dependent claims defines a further advantageous specific example of the decoding device according to the present invention.

たとえば連続ビット符号データ用復号情報記憶部としては、それぞれ異なる所定ビット数分に対応した複数種類の連続ビット符号データ用復号情報記憶部を備えた構成とすることができる。この場合、各連続ビット符号データ用復号情報記憶部が処理対象とする符号データの有効部分は、一方については符号の割当て方が変更されても不変なものとし、他方は符号の割当て方に応じて可変なものとする構成を採ることもできるし、何れも符号の割当て方に応じて可変なものとする構成を採ることもできる。   For example, the decoding information storage unit for continuous bit code data may be configured to include a plurality of types of decoding information storage units for continuous bit code data corresponding to different predetermined numbers of bits. In this case, the effective portion of the code data to be processed by each decoding information storage unit for continuous bit code data is unchanged even if the code allocation method is changed for one, and the other depends on the code allocation method. It is also possible to adopt a configuration that is variable, or a configuration that is variable depending on how the codes are allocated.

また、連続ビット符号データ用復号情報記憶部としては、1つの連続ビット符号データ用復号情報記憶部を備えた構成とすることもできる。この場合、連続ビット符号データ用復号情報記憶部が処理対象とする符号データの有効部分は、符号の割当て方が変更されても不変なものとする構成を採ることもできるし、符号の割当て方に応じて可変なものとする構成を採ることもできる。   Further, the decoding information storage unit for continuous bit code data may include a single decoding information storage unit for continuous bit code data. In this case, the effective portion of the code data to be processed by the decoding information storage unit for continuous bit code data can be configured to be unchanged even if the code allocation method is changed. It is also possible to adopt a configuration that is variable according to the above.

連続ビット符号データ用復号情報記憶部として符号の割当て方に応じて可変とする構成を採る場合には、有効部分抽出処理部としては、装置に順次入力される符号データを所定ビット数分(特に、連続ビット符号データ用復号情報記憶部が処理対象とする全ての符号データに共通して符号の先頭側に現れる連続した同一ビットの個数分)だけ入力される符号データをシフトさせることで有効部分の符号データを抽出するシフト処理部を有していることが望ましい。   When the decoding information storage unit for the continuous bit code data is configured to be variable according to the code allocation method, the effective part extraction processing unit receives the code data sequentially input to the apparatus for a predetermined number of bits (in particular, Effective part by shifting the input code data by the number of consecutive identical bits appearing at the head of the code) common to all code data to be processed by the decoding information storage unit for continuous bit code data It is desirable to have a shift processing unit for extracting the code data.

本発明の復号装置に依れば、復号処理のためのテーブル情報をRAMなどの書換可能な記憶デバイスで実装することとしたので、符号の割り当てが変更になった場合に、回路構成を変更しなくてもテーブル情報を書き換えることによって対応可能となる。   According to the decoding device of the present invention, the table information for decoding processing is implemented by a rewritable storage device such as a RAM. Therefore, when the code assignment is changed, the circuit configuration is changed. Even without this, it is possible to cope by rewriting the table information.

加えて、復号処理のためのテーブル情報を格納する各記憶部としては、符号の割当て方に応じて、所定ビット数よりも短い複数の符号長の符号データを復号するための情報を格納する部分と、これ以外であって符号データ中に共通して同一ビットデータが所定ビット数分連続したものを処理対象とする部分とに分けて取り扱うことで、復号処理に際して、前者の記憶部には符号データの上位ビット側を担当させ、後者の記憶部には符号データの下位ビットや中間ビットを担当させるようにした。判定回路と選択出力部とにより、各記憶部を参照した復号結果の中から、符号長に応じた適切な方を選択して出力する。   In addition, as each storage unit for storing table information for decoding processing, a part for storing information for decoding code data having a plurality of code lengths shorter than a predetermined number of bits according to a code allocation method Other than this, the same bit data in the code data that is the same number of consecutive bits is handled separately as a processing target, so that the former storage unit stores the code in the decoding process. The upper bit side of the data is in charge, and the latter storage unit is in charge of the lower bit and intermediate bit of the code data. The determination circuit and the selection output unit select and output an appropriate one according to the code length from the decoding results referring to the storage units.

これにより、各復号テーブルに、重複して各可変長符号に対応する復号情報を保持しておく必要がなくなり、復号テーブル全体としての容量を削減することができる。また、その分メモリ空間が無駄に使用されることを防止でき、メモリの利用効率が良くなるとともに小規模な複数のルックアップテーブルで構成することによって、回路規模を小さく抑えることができるようになる。   As a result, it is not necessary to store the decoding information corresponding to each variable length code in each decoding table, and the capacity of the entire decoding table can be reduced. In addition, it is possible to prevent the memory space from being wasted, and the memory utilization efficiency can be improved, and the circuit scale can be reduced by configuring the memory with a plurality of small look-up tables. .

このように本発明の復号装置に依れば、復号テーブルの回路を小規模に抑えながら、符号ビット列の割当て方が変更になっても柔軟に対応することができる。   As described above, according to the decoding apparatus of the present invention, it is possible to flexibly cope with a change in the method of assigning the code bit string while keeping the decoding table circuit small.

以下、図面を参照して本発明の実施形態について詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

<システム構成>
図1は、本発明に係る復号化装置を適用した復号システムの概要を示したブロック図である。この復号システム1は、符号入力部10と、符号切出部20と、復号処理部30と、符号位置管理部40と、復号結果出力部50とを備えて構成されている。
<System configuration>
FIG. 1 is a block diagram showing an outline of a decoding system to which a decoding apparatus according to the present invention is applied. The decoding system 1 includes a code input unit 10, a code cutout unit 20, a decoding processing unit 30, a code position management unit 40, and a decoding result output unit 50.

符号入力部10は図示しない記憶手段を備えており、入力された符号データD1中の処理途中の複数ビット(そのデータをD2とする)を保持する。この際、符号入力部10は、後述する符号位置管理部40から入力されるタイミング情報J3に基づいて、順次、次の符号データD1を取り込む。   The code input unit 10 includes a storage unit (not shown), and holds a plurality of bits in the process of the input code data D1 (the data is D2). At this time, the code input unit 10 sequentially fetches the next code data D1 based on timing information J3 input from a code position management unit 40 described later.

符号切出部20は、符号入力部10が保持する符号データD2の中から、復号処理が終わっていない部分(そのデータをD3とする)を切り出し復号処理部30に入力する。   The code cutout unit 20 cuts out a portion of the code data D2 held by the code input unit 10 that has not been decoded (the data is D3) and inputs the portion to the decoding processing unit 30.

復号処理部30は、符号切出部20にて切り出された符号データD3に基づいて復号処理をし、その復号結果情報J1を復号結果出力部50に入力するとともに、復号した符号の符号長情報J2を符号位置管理部40に入力する。   The decoding processing unit 30 performs a decoding process based on the code data D3 cut out by the code cutting unit 20, inputs the decoding result information J1 to the decoding result output unit 50, and code length information of the decoded code. J2 is input to the code position management unit 40.

符号位置管理部40は、復号処理部30から入力された符号長情報J2を累積加算し、符号入力部10に次の符号データD1を取り込むためのタイミングを決定し、そのタイミング情報J3を符号入力部10に入力するとともに、次の符号データの切出位置を決め、その切出位置情報J4を符号切出部20にフィードバック入力する。
一方、復号結果出力部50は、符号位置管理部40から入力された復号結果情報J1に、必要に応じて所定の処理を施して、復号結果情報J5として(不要であればJ1そのままでよい)、後段の回路に出力する。
The code position management unit 40 cumulatively adds the code length information J2 input from the decoding processing unit 30, determines the timing for fetching the next code data D1 into the code input unit 10, and inputs the timing information J3 as a code. The cut position of the next code data is determined and the cut position information J4 is fed back to the code cut section 20 while being input to the section 10.
On the other hand, the decoding result output unit 50 performs predetermined processing on the decoding result information J1 input from the code position management unit 40 as necessary to obtain decoding result information J5 (J1 may be left as it is if unnecessary). , Output to the subsequent circuit.

復号システム1は、システム全体をクロック信号に同期させて動作させることで、1クロックサイクルに1個の符号を復号することができる。このように、符号切出部20と復号処理部30を持ち、復号済みの符号長情報を累積加算することによって、1クロックサイクルに1符号を復号する。   The decoding system 1 can decode one code in one clock cycle by operating the entire system in synchronization with the clock signal. In this way, the code extraction unit 20 and the decoding processing unit 30 are provided, and one code is decoded in one clock cycle by accumulating the decoded code length information.

<第1実施形態;第1のLUT(1個)+第2/第3のLUT(複数;1個はシフト量固定と同じ意義→第2のLUT)>
図2は、本発明に係る復号装置の一例である復号処理部30の第1実施形態を示す回路ブロック図である。この第1実施形態は、符号データD3の最大長が予め定められている(すなわち最大長が固定である)場合に好適な構成例である。
<First embodiment: first LUT (one) + second / third LUT (multiple; one is the same meaning as fixed shift amount → second LUT)>
FIG. 2 is a circuit block diagram showing a first embodiment of a decoding processing unit 30 which is an example of a decoding device according to the present invention. The first embodiment is a configuration example suitable for a case where the maximum length of the code data D3 is predetermined (that is, the maximum length is fixed).

図示するように、第1実施形態の復号処理部30は、RAMなどの書換可能な記憶手段を有してなるメモリ部300と、符号割当の変更に対応して符号データD3の内の有効部分幅を適宜調整するための有効部分抽出処理部の一例であるシフト量調整処理部320と、メモリ部300から出力される複数系統の復号結果の何れを選択すべきかを判定する判定部340と、判定部340の判定結果に基づいてメモリ部300から出力される1つの系統の復号結果を選択して出力する選択出力部360と、符号の割当て方に応じてメモリ部300へ格納する情報を書き換えさせる記憶情報更新部380とを備える。   As shown in the figure, the decoding processing unit 30 of the first embodiment includes a memory unit 300 having a rewritable storage unit such as a RAM, and an effective portion of the code data D3 corresponding to the code allocation change. A shift amount adjustment processing unit 320 which is an example of an effective part extraction processing unit for appropriately adjusting the width, a determination unit 340 for determining which of a plurality of decoding results output from the memory unit 300 should be selected, A selection output unit 360 that selects and outputs a decoding result of one system output from the memory unit 300 based on a determination result of the determination unit 340, and rewrites information stored in the memory unit 300 according to a code allocation method And a stored information updating unit 380.

メモリ部300は、符号切出部20にて切り出された符号データD3について、ある所定のビット数(m1)よりも短い符号データを復号するため符号データD31として取り込み復号結果情報J11および符号長情報J21を出力する第1のルックアップテーブル(以下LUTと記す)302と、符号データD3の先頭(上位ビット側)に同一ビットが所定の数以上連続して現れる符号データを復号し、復号結果情報J12および符号長情報J22を出力する第2のLUT304と、第1のLUT302と第2のLUT304の条件に合致しない残りの符号を復号し、復号結果情報J13および符号長情報J23を出力する第3のLUT306と、第3のLUT306に対応したシフト量調整処理部320とを備えている。   The memory unit 300 takes in the code data D3 extracted by the code extraction unit 20 as code data D31 in order to decode code data shorter than a predetermined number of bits (m1), and decode result information J11 and code length information Decode first look-up table (hereinafter referred to as LUT) 302 that outputs J21, and code data in which a predetermined number or more of the same bits continuously appear at the beginning (upper bit side) of code data D3. A second LUT 304 that outputs J12 and code length information J22, and a third code that decodes the remaining codes that do not match the conditions of the first LUT 302 and the second LUT 304, and outputs decoding result information J13 and code length information J23 LUT 306 and a shift amount adjustment processing unit 320 corresponding to the third LUT 306 are provided.

第1のLUT302は、短ビット符号データ用復号情報記憶部の一例である。第2のLUT304は、第1の連続ビット符号データ用復号情報記憶部の一例である。第3のLUT306は、第2の連続ビット符号データ用復号情報記憶部の一例である。   The first LUT 302 is an example of a decoding information storage unit for short bit code data. The second LUT 304 is an example of a first decoding information storage unit for continuous bit code data. The third LUT 306 is an example of a second decoding information storage unit for continuous bit code data.

第1のLUT302には、復号システム1に順次入力される符号データのうち、所定ビット数m1よりも短い複数の符号長の符号データを復号するための情報を格納する。よって、たとえばm1=8とすれば、第1のLUT302には、符号長が8ビット以下の全ての符号データを復号するための復号情報が記憶される。   In the first LUT 302, information for decoding code data having a plurality of code lengths shorter than the predetermined number of bits m1 among code data sequentially input to the decoding system 1 is stored. Therefore, for example, if m1 = 8, the first LUT 302 stores decoding information for decoding all code data having a code length of 8 bits or less.

シフト量調整処理部320は、第3のLUT306で復号する符号において全ての符号に共通して符号の先頭に現れる連続した同一ビットデータの個数分だけ入力符号データD3をシフトするためのシフト回路326を有している。これに対応するように、メモリ部300は、シフト回路326のシフト数を設定するためのシフト数レジスタ部316を有する。   The shift amount adjustment processing unit 320 shifts the input code data D3 by the number of consecutive identical bit data appearing at the head of the code common to all codes in the code decoded by the third LUT 306. have. Corresponding to this, the memory unit 300 includes a shift number register unit 316 for setting the shift number of the shift circuit 326.

シフト数レジスタ部316は、符号データD3の符号化系列情報に基づいて、入力される符号データD3に対するシフト量を決定し、このシフト量を表すシフト量情報S13aをシフト回路326に入力するとともに、同様のシフト量情報S13bを判定部340に入力する。   The shift number register unit 316 determines the shift amount for the input code data D3 based on the encoded sequence information of the code data D3, and inputs the shift amount information S13a representing the shift amount to the shift circuit 326. Similar shift amount information S13b is input to the determination unit 340.

シフト回路326は、シフト処理部の一例であって、符号切出部20から入力される符号データD3について、シフト数レジスタ部316から入力されるシフト量情報S13aに基づいてシフト量を調整して、シフト量に応じた所定ビット数分だけ符号データD3を移動させることで先頭側の実質的に無効なデータを掃き捨て、残りの有効部分だけを抽出して符号データD33として第3のLUT306に入力する。   The shift circuit 326 is an example of a shift processing unit, and adjusts the shift amount of the code data D3 input from the code cutout unit 20 based on the shift amount information S13a input from the shift number register unit 316. By moving the code data D3 by a predetermined number of bits according to the shift amount, the head side substantially invalid data is swept away, and only the remaining valid part is extracted and is stored in the third LUT 306 as code data D33. input.

ここで、第2のLUT304と第3のLUT306は、何れも、符号データの上位側にデータ“1”が連続して所定数以上連続する符号を復号処理の対象とするもので、本質的には同種の処理を行なうものである。ただし、この第1実施形態では、符号データD3の最大長が固定である場合に対応するものであり、2つのLUTの内の一方は、符号データD3の先頭(上位ビット側)に連続して現れる同一ビットの“所定の数”を固定とすることが可能となる。   Here, both the second LUT 304 and the third LUT 306 are intended to decode a code in which the data “1” is continuously higher than the code data and continues for a predetermined number of times. Performs the same kind of processing. However, in the first embodiment, this corresponds to the case where the maximum length of the code data D3 is fixed, and one of the two LUTs continues to the head (upper bit side) of the code data D3. It is possible to fix the “predetermined number” of the same bits that appear.

よって、これに対応した第2のLUT304は、符号データD3の先頭(上位ビット側)に連続して“1”がm2個以上(m2は第3のLUT306用のm3よりも大きい)現れる符号を復号するための情報を記憶しておき、また、実質的にシフト量が固定でよくなるので、第3のLUT306に対応したシフト量調整処理部320を備えることなく、固定的に上位ビット側を削除して符号データD32として取り込むことで対応する。   Accordingly, the second LUT 304 corresponding to this is a code in which m2 or more (m2 is larger than m3 for the third LUT 306) appearing continuously at the head (upper bit side) of the code data D3. Information for decoding is stored, and the shift amount can be substantially fixed. Therefore, the upper bit side is permanently deleted without providing the shift amount adjustment processing unit 320 corresponding to the third LUT 306. This can be handled by taking in the data as code data D32.

各LUT302,304,306には、それぞれ入力された符号データD31,D32,D33、すなわちそれぞれが復号処理を担当する符号データD3に対応する復号情報(復号結果情報と符号長情報)を記憶させおく。こうすることで、それぞれに入力される符号データD3から各LUTが復号を担当する符号長に対応した有効部分を抽出し、この有効部分をアドレスとして各LUTを参照することで、対応する復号結果情報と符号長情報とを読み出すことができる。   The LUTs 302, 304, and 306 store the input code data D31, D32, and D33, that is, the decoding information (decoding result information and code length information) corresponding to the code data D3 that is responsible for the decoding process, respectively. . In this way, the effective part corresponding to the code length that each LUT is responsible for decoding is extracted from the code data D3 input to each, and the corresponding decoding result is obtained by referring to each LUT using this effective part as an address. Information and code length information can be read.

なお、第1実施形態の構成では、第3のLUT306についてのみシフト量調整処理部320にてシフト量を調整可能に構成しているが、これは、第1のLUT302は常に上位側m1ビットを固定的に取り込み、第2のLUT304についてはシフト量をm2に固定してよいからである。これに対応して、メモリ部300には、第1のLUT302に対応したm1の情報を設定する有効上位ビット数レジスタ部312と、第2のLUT304に対応したm2の情報を設定するシフト数レジスタ部314とを有している。   In the configuration of the first embodiment, only the third LUT 306 is configured so that the shift amount can be adjusted by the shift amount adjustment processing unit 320. This is because the first LUT 302 always has the upper m1 bit set. This is because the shift amount of the second LUT 304 may be fixed to m2 in a fixed manner. Correspondingly, in the memory unit 300, the effective upper bit number register unit 312 for setting m1 information corresponding to the first LUT 302 and the shift number register for setting m2 information corresponding to the second LUT 304 are stored. Part 314.

有効上位ビット数レジスタ部312は、第1のLUT302に対応したm1を表す有効上位ビット情報S11bを判定部340に入力する。また、シフト数レジスタ部314は、第2のLUT302に対応したm2を表すシフト量情報S12bを判定部340に入力する。   The valid high-order bit number register unit 312 inputs valid high-order bit information S11b representing m1 corresponding to the first LUT 302 to the determination unit 340. Further, the shift number register unit 314 inputs shift amount information S12b representing m2 corresponding to the second LUT 302 to the determination unit 340.

判定部340は、入力符号データの先頭に現れる連続した同一ビットの個数、すなわち先頭側に連続して同一ビットが現れる場合のランレングスを判断することで、3つのLUT302,304,306の何れの出力を選択すべきかを判定する。具体的には、符号切出部20にて切り出された符号データD3の先頭に現れる連続した同一ビットの個数を判断するとともに、有効上位ビット数レジスタ部312から入力される有効上位ビット情報S11bと、シフト数レジスタ部314から入力されるシフト量情報S12bと、シフト数レジスタ部316から入力されるシフト量情報S13bを参照して、3つのLUT302,304,306の何れの出力を選択すべきかを判定し、その判定結果を示す判定情報S21を選択出力部360に入力する。   The determination unit 340 determines the number of consecutive identical bits that appear at the beginning of the input code data, that is, the run length when the same bits appear continuously at the beginning, so that any of the three LUTs 302, 304, and 306 can be determined. Determine whether output should be selected. Specifically, the number of consecutive identical bits appearing at the head of the code data D3 cut out by the code cutout unit 20 is determined, and the valid upper bit information S11b input from the valid upper bit number register unit 312; Referring to the shift amount information S12b input from the shift number register unit 314 and the shift amount information S13b input from the shift number register unit 316, which output of the three LUTs 302, 304, and 306 should be selected Determination is performed, and determination information S21 indicating the determination result is input to the selection output unit 360.

なお、先にも述べたように、第1実施形態の構成では、第3のLUT306についてのみシフト量調整処理部320にてシフト量を調整可能に構成しているので、判定部340は、符号の割当て方の変更に対応するためにS11b,S12b,S13bのうち少なくともシフト量情報S13bを参照する必要があるが、残りのS11b,S12bに関しては、その情報を予め判定部340に設定しておく(固定的に取り扱う)ことでも対応することができる。   As described above, in the configuration of the first embodiment, the shift amount adjustment processing unit 320 can adjust the shift amount only for the third LUT 306. It is necessary to refer to at least the shift amount information S13b among S11b, S12b, and S13b in order to cope with the change in allocation method. However, for the remaining S11b and S12b, the information is set in the determination unit 340 in advance. It can also be handled by (fixed handling).

選択出力部360は、判定部340から入力される判定情報S21に基づいて、3つのLUT302,304,306から出力される復号結果情報J11,J12,J13の何れか1つと、対応する符号長情報J21,J22,J23の何れか1つを、それぞれ選択して出力する。   The selection output unit 360, based on the determination information S21 input from the determination unit 340, any one of the decoding result information J11, J12, J13 output from the three LUTs 302, 304, 306 and the corresponding code length information Any one of J21, J22, and J23 is selected and output.

記憶情報更新部380は、たとえば復号システム1に入力される符号データD1に含まれている符号の割当て方を示す情報に基づいて、メモリ部300の各LUT302,304,306、さらには有効上位ビット数レジスタ部312、シフト数レジスタ部314、シフト数レジスタ部316へ格納する情報を書き換えさせる。符号データD1に符号の割当て方を示す情報が直接には含まれておらず、符号データD1には対応コードが記述され、この対応コードを参照して他の手段から符号の割当て方を示す情報を取得するような構成であってもよい。また、符号データD1とは別に符号の割当て方を示す情報を取得する構成であってもよい。   The stored information update unit 380, for example, based on the information indicating the code allocation method included in the code data D1 input to the decoding system 1, each LUT 302, 304, 306 of the memory unit 300, and the valid upper bits Information stored in the number register unit 312, the shift number register unit 314, and the shift number register unit 316 is rewritten. The code data D1 does not directly include information indicating how to allocate the code, and the code data D1 describes a corresponding code, and information indicating the code allocation from other means with reference to the corresponding code The configuration may be such that Moreover, the structure which acquires the information which shows how to allocate a code | symbol separately from code data D1 may be sufficient.

このような構成により、第1実施形態の復号処理部30では、可変長符号の符号の割当て方に応じて、3つのLUTの内容と、第3のLUT306の入力のシフト数を予め設定しておき、符号データD3の上位ビットを第1のLUT302に、下位ビットを第2のLUT304に、中間ビットを第3のLUT306にそれぞれ入力することで、各LUTから出力される復号結果J11,J12,J13の中から何れか1つを選択して出力することによって、可変長符号の符号の割当て方が変更になっても復号が可能になる。以下、この点について、詳細に説明する。   With such a configuration, the decoding processing unit 30 of the first embodiment presets the contents of the three LUTs and the number of input shifts of the third LUT 306 in accordance with how the variable length codes are allocated. The decoding result J11, J12, output from each LUT by inputting the upper bits of the code data D3 to the first LUT 302, the lower bits to the second LUT 304, and the intermediate bits to the third LUT 306, respectively. By selecting and outputting any one of J13, decoding is possible even when the variable length code allocation method is changed. Hereinafter, this point will be described in detail.

図3および図4は、符号の割当て方の基本例を示した図表である。第1実施形態の復号処理部30では、符号データD3の最大長が予め定められている(すなわち最大長が固定である)場合を想定してものであり、符号の割当て方が変わっても、符号データの最大長はMビットと制限されているものとする。また、符号の中には、ビット数の短い第1種の符号(ここでは符号長m1;m1<Mとする)と、それ以上で最大長Mまでの符号(符号長がm1+1〜M)に大別することができる。また、符号長がm1+1〜Mの符号はさらに、符号の先頭(上位ビット側)の少なくともm2ビットが全て(すなわちm2個分以上が連続して)“1”となる第2種の符号と、それ以外の第3種の符号とに分けることができる。   3 and 4 are tables showing basic examples of code allocation methods. In the decoding processing unit 30 of the first embodiment, it is assumed that the maximum length of the code data D3 is predetermined (that is, the maximum length is fixed), and even if the code allocation method changes, It is assumed that the maximum length of the code data is limited to M bits. In addition, among codes, a first type code with a short number of bits (here, code length m1; m1 <M) and codes up to a maximum length M (code length is m1 + 1 to M) are included. It can be divided roughly. Further, a code having a code length of m1 + 1 to M is further a second type code in which at least m2 bits at the head (upper bit side) of the code are all “1” (that is, m2 or more consecutively), It can be divided into other types of codes.

第1のLUT302用のRAM1は、符号長がm1ビット以下の第1種の符号を復号するために使用する。第2のLUT304用のRAM2は、符号長がm1+1〜Mビットであって第2種の符号を復号するために使用する。第3のLUT306用のRAM3は、符号長がm1+1〜Mビットであって第3種の符号を復号するために使用する。第2のLUT304用のRAM2は第2種の符号を復号するために使用するので、対応するべきビット幅はM−m2でよい。   The RAM 1 for the first LUT 302 is used to decode a first type code having a code length of m1 bits or less. The RAM 2 for the second LUT 304 has a code length of m1 + 1 to M bits and is used for decoding the second type code. The RAM 3 for the third LUT 306 has a code length of m1 + 1 to M bits and is used for decoding the third type code. Since the RAM 2 for the second LUT 304 is used to decode the second type code, the bit width to be supported may be M-m2.

一方、第3のLUT306用のRAM3は、第3種の符号を復号するために使用するので、対応するべきビット幅は、最大でM(Mビットの符号であって符号の先頭にm2ビット分“1”となるものがない)で、最小は1となる。よって、全ての符号の割当て方に対応しようとすれば、第3のLUT306用のRAM3が対応するべきビット幅は、Mビットになる。   On the other hand, since the RAM 3 for the third LUT 306 is used for decoding the third type code, the corresponding bit width is M (M bit code at the beginning of the code and m2 bits). There is no “1”), and the minimum is 1. Therefore, if it is intended to deal with all the code allocation methods, the bit width to be supported by the RAM 3 for the third LUT 306 is M bits.

ただし、符号化方式にも依るが、たとえば、出現頻度の低い情報の多数にはMビットの符号が割り当てられ、かつ符号長が長くなるに従って先頭側で連続する“1”の個数も多くなり、さらにm1+1ビット〜Mビットの符号の中には、符号の先頭(上位ビット側)の少なくともm3ビットが全て(すなわちm3個分以上m2個未満が連続して)“1”となる符号とすることができる。このような符号化方式の場合、第3のLUT306用のRAM3が対応するべきビット幅は、Mビットよりも少なくM−m3〜Mビットで済むようになり、場合によっては、M−m2程度でもよくなる。   However, depending on the encoding method, for example, an M-bit code is assigned to a large number of pieces of information with low appearance frequency, and the number of consecutive “1” s on the leading side increases as the code length increases. Furthermore, among the codes of m1 + 1 bit to M bits, at least m3 bits at the head (upper bit side) of the code are all set to “1” (that is, m3 or more and less than m2 are consecutive). Can do. In the case of such an encoding method, the bit width to be supported by the RAM 3 for the third LUT 306 is smaller than M bits and may be M-m3 to M bits, and in some cases, it may be about M-m2. Get better.

そこで、本実施形態では、第3のLUT306用のRAM3が対応するべきビット幅としてM−m2を設定し、第3のLUT306用のRAM3には、ビット長がm1+1〜Mでかつ第2種を除く符号の内、符号の先頭m3ビット分が連続する符号を復号するための情報を設定する。そして、これに対応して、m3ビット分のシフト量の調整をシフト数レジスタ部316が行ない、第3のLUT306には上位m3ビット分を除く下位側(1〜M−m3ビット分)だけが入力されるようにする。第3のLUT306は、m1+1〜Mビットの符号のうち、先頭側のm3ビット分が連続する符号については確実に復号できるが、符号の先頭m3ビット分が連続しない符号については復号できない。   Therefore, in the present embodiment, M-m2 is set as the bit width to which the RAM 3 for the third LUT 306 should correspond, and the bit length is m1 + 1 to M and the second type is set in the RAM 3 for the third LUT 306. Among the codes to be excluded, information for decoding a code in which the first m3 bits of the code are continuous is set. Correspondingly, the shift number register unit 316 adjusts the shift amount for m3 bits, and only the lower side (for 1 to M−m3 bits) except the upper m3 bits is included in the third LUT 306. To be entered. The third LUT 306 can reliably decode a code in which m3 + 1 bits on the head side are continuous among codes of m1 + 1 to M bits, but cannot decode a code in which the first m3 bits in the code are not continuous.

よって、符号を割り当てる際には、m1+1〜Mビットの符号については、先頭m3ビット分が連続しない符号を割り当てないようにすることが必須となる。こうすることで、符号の割当て方が変わった場合でも、前述の条件を満足する限り、必ず全ての符号を復号することができるようになる。   Therefore, when assigning codes, it is essential not to assign codes that do not have consecutive m3 bits at the beginning for m1 + 1 to M-bit codes. In this way, even when the code allocation method changes, all codes can be decoded without fail as long as the above-described conditions are satisfied.

たとえば、図3および図4に示すように、符号長(符号データのビット長)がm1ビットまでの第1種の符号は、それらが全て第1のLUT302に入力され、第1のLUT302による復号処理の対象となる。また、符号長がm1+1〜Mビットの符号の内、上位側にデータ“1”が連続してm2個以上連続する第2種の符号は、上位m2ビット分が削除された下位ビットだけが(実質的にm2ビット分のシフトに相当)第2のLUT304に入力され、第2のLUT304による復号処理の対象となる。   For example, as shown in FIG. 3 and FIG. 4, the first type codes whose code length (bit length of the code data) is up to m1 bits are all input to the first LUT 302 and decoded by the first LUT 302. It becomes the object of processing. Of the codes having a code length of m1 + 1 to M bits, the second type code in which m2 or more of data “1” continues on the upper side is only the lower bits from which the upper m2 bits are deleted ( (Substantially equivalent to a shift of m2 bits) is input to the second LUT 304 and becomes a target of decoding processing by the second LUT 304.

また、符号長がm1+1〜Mの符号の内の第2種の符号を除く第3種の符号は、上位m3aビット分(図3の符号割当の場合)あるいは上位m3bビット分(図4の符号割当の場合)がそれぞれシフト回路326によって削除された下位ビットだけが第3のLUT304に入力され、第3のLUT306による復号処理の対象となる。   Also, the third type code excluding the second type code among the code lengths m1 + 1 to M is the upper m3a bits (in the case of code allocation in FIG. 3) or the upper m3b bits (in FIG. 4). In the case of allocation), only the lower-order bits deleted by the shift circuit 326 are input to the third LUT 304, and are subject to decoding processing by the third LUT 306.

このような回路構成を採ることによって、符号の割当て方が変わっても、LUTの内容とシフト数レジスタ部316の設定を変更することによって、様々な符号長や符号割り当ての可変長符号を復号することができる。たとえばm1,m2,m3a,Mもしくはm1,m2,m3b,Mの関係が維持できる限り、シフト数レジスタ部316によるシフト量の設定を同じにしておいても対応できる。   By adopting such a circuit configuration, various code lengths and variable length codes with code assignment can be decoded by changing the contents of the LUT and the setting of the shift number register unit 316 even if the code assignment method changes. be able to. For example, as long as the relationship of m1, m2, m3a, M or m1, m2, m3b, M can be maintained, it is possible to cope with the same shift amount setting by the shift number register unit 316.

また、m3がm3aからm3bというように変更される場合には、各LUT302,304,306に記憶すべき情報とシフト数レジスタ部316に対するレジスタ値をm3aからm3bに書き換えさえすれば、シフト回路326は、シフト数レジスタ部316からのシフト量情報S13aに基づいてシフト量調整ができるので、同一の回路構成にて(すなわち回路変更をすることなく)、符号割当ての変更に対応することができる。   When m3 is changed from m3a to m3b, the shift circuit 326 only has to be rewritten from m3a to m3b the information to be stored in each LUT 302, 304, 306 and the register value for the shift number register unit 316. Since the shift amount can be adjusted based on the shift amount information S13a from the shift number register unit 316, it is possible to cope with a change in code assignment with the same circuit configuration (that is, without changing the circuit).

次に、符号化データとして、JPEG用のハフマン符号を復号する場合を例にとって、具体的に説明する。   Next, a specific description will be given of a case where a JPEG Huffman code is decoded as encoded data.

図5および図6は、JPEG規格に基づくハフマン符号の割当表の一例である。ここで、図5に示す第1例の割当表は、JPEGの規格書に一例として記載されているAC成分用のハフマン符号の割当表である。JPEGでは、符号を割り当てるべき情報の種類は“162”であり、符号データのビット長の最大値M(符号データの最大長)は“16”と制限されている。このため、図5のように出現頻度の高い情報には短い符号が割り当てられて、出現頻度の低い情報の多数には16ビットの符号が割り当てられる傾向にある。   5 and 6 are examples of Huffman code allocation tables based on the JPEG standard. Here, the allocation table of the first example shown in FIG. 5 is an allocation table of Huffman codes for AC components described as an example in the JPEG standard. In JPEG, the type of information to which a code should be assigned is “162”, and the maximum bit length M (maximum length of code data) of code data is limited to “16”. Therefore, as shown in FIG. 5, a short code is assigned to information with a high appearance frequency, and a 16-bit code tends to be assigned to a large number of information with a low appearance frequency.

また、符号長が長い符号では、符号の上位側からの先頭部分は“1”が多数連続して現れており、符号長が長くなるに従って連続する“1”の個数も多くなる傾向にある。画像の性質によって符号の割当て方を変更することは許されているが、上記の制限があるので、割当て方を変えてもこの傾向は変わらない。   Further, in a code having a long code length, a large number of “1” s appear continuously in the head portion from the upper side of the code, and the number of consecutive “1” s tends to increase as the code length increases. Although it is allowed to change the code allocation method depending on the nature of the image, this tendency does not change even if the allocation method is changed due to the above-mentioned limitations.

そこで、図2に示した第1実施形態の復号処理部30においては、入力される符号データD3の符号ビット列は、符号長の最大値である16ビットとしている。この入力符号ビット列は、図1に示した復号システム1の符号切出部20で、16ビットずつ切り出して符号データD3として復号処理部30に入力することによって得られる。これに対応して、図2に示したように、LUT302,304,306の3つのルックアップテーブルを設け、それぞれは8ビット入力のRAMで実装する。   Therefore, in the decoding processing unit 30 of the first embodiment shown in FIG. 2, the code bit string of the input code data D3 is 16 bits, which is the maximum value of the code length. This input code bit string is obtained by cutting out 16 bits at a time by the code cutting unit 20 of the decoding system 1 shown in FIG. 1 and inputting the data as code data D3 to the decoding processing unit 30. Correspondingly, as shown in FIG. 2, three lookup tables LUTs 302, 304, and 306 are provided, and each is implemented by an 8-bit input RAM.

たとえば、第1のLUT302は、16ビットの符号データD3の内の上位m1(=8)ビットを取り込むので、第1のLUT302用のRAM1には、8ビット以下の符号長の符号を復号するための情報を設定する。具体的には、図5に示した範囲1の符号の復号情報をRAM1に設定する。   For example, since the first LUT 302 takes in the upper m1 (= 8) bits of the 16-bit code data D3, the RAM 1 for the first LUT 302 decodes a code having a code length of 8 bits or less. Set the information. Specifically, the decoding information of the code in the range 1 shown in FIG.

また、第2のLUT304は、最大長M(=16)ビットの符号データD3の内の上位m2(=8)ビットを除く下位(=8)ビットを取り込むので、第2のLUT304用のRAM2には、符号の先頭(上位ビット側)の8ビットが全て“1”である符号を復号するための情報を設定する。具体的には、図5に示した範囲2の符号の復号情報をRAM2に設定する。   Further, since the second LUT 304 takes in the lower (= 8) bits excluding the upper m2 (= 8) bits in the code data D3 having the maximum length M (= 16) bits, it is stored in the RAM 2 for the second LUT 304. Sets information for decoding a code in which the first 8 bits (upper bit side) of the code are all “1”. Specifically, the decoding information of the code in the range 2 shown in FIG.

また、第3のLUT306は、第1のLUT302と第2のLUT304で復号できない符号(中間ビットデータという)D33を取り込むので、第3のLUT306用のRAM3には、第1のLUT302と第2のLUT304で復号できない符号を復号するための情報を設定する。具体的には、図5に示した範囲3の符号の復号情報をRAM3に設定する。   In addition, since the third LUT 306 takes in a code (called intermediate bit data) D33 that cannot be decoded by the first LUT 302 and the second LUT 304, the RAM 3 for the third LUT 306 stores the first LUT 302 and the second LUT 306. Information for decoding a code that cannot be decoded by the LUT 304 is set. Specifically, the decoding information of the code in the range 3 shown in FIG.

ここで、範囲3の符号は、符号の先頭のm3a(=5)ビットが全て“1”なので、シフト数レジスタには“5”を設定し、RAM3に入力する中間ビットデータは、符号ビット列の先頭の5ビットを削除した6ビット目以降の8ビットとする。これに対応して、この5ビット分のシフト量の調整をシフト数レジスタ部316が行ない、第3のLUT306には上位5ビット分を除く下位側だけが入力されるようにする。   Here, since all the m3a (= 5) bits at the beginning of the code of the code in range 3 are “1”, “5” is set in the shift number register, and the intermediate bit data input to the RAM 3 is the code bit string. The first 5 bits are deleted and the 6th bit and subsequent 8 bits are used. Correspondingly, the shift number register unit 316 adjusts the shift amount for 5 bits, and only the lower side except the upper 5 bits is input to the third LUT 306.

ここで、“6ビット目以降の8ビット”としたのは、JPEGフォーマットで許容されている符号割当方式に従う場合、第1のLUT302と第2のLUT304で復号できない符号である中間ビットとして8ビット程度を割り当てておけば、符号の割当て方が変わっても、概ね全ての割当て方に対応できると考えられるからである。   Here, “8 bits after the 6th bit” is set to 8 bits as an intermediate bit that is a code that cannot be decoded by the first LUT 302 and the second LUT 304 in accordance with the code allocation method permitted in the JPEG format. This is because, if the degree is assigned, even if the code assignment method changes, it is considered that almost all assignment methods can be handled.

判定部340は、符号切出部20にて切り出された符号データD30について、符号ビット列の少なくとも先頭8(=m2)ビットが全て“1”ならばRAM2すなわち第2のLUT304の出力を選択するように選択出力部360を切り替えるための判定情報S21を出力する。   The determination unit 340 selects the output of the RAM 2, that is, the second LUT 304 if at least the first 8 (= m2) bits of the code bit string are all “1” for the code data D30 extracted by the code extraction unit 20. The determination information S21 for switching the selection output unit 360 is output.

また、判定部340は、シフト量情報S13bに基づいて、前述の条件を満たさない場合において、少なくとも符号ビット列の先頭にシフト数レジスタ部316に設定された個数(=m3)だけ“1”が連続して現れていれば、RAM3すなわち第3のLUT306の出力を選択するように選択出力部360を切り替えるための判定情報S21を出力する。そして、最後に、判定部340は、前述の2つの条件を満たさない場合は、RAM1すなわち第1のLUT302の出力を選択するように選択出力部360を切り替えるための判定情報S21を出力する。   Further, the determination unit 340, based on the shift amount information S13b, continues with “1” as many as the number (= m3) set in the shift number register unit 316 at least at the beginning of the code bit string when the above condition is not satisfied. If it appears, determination information S21 for switching the selection output unit 360 so as to select the output of the RAM 3, that is, the third LUT 306 is output. Finally, when the above two conditions are not satisfied, the determination unit 340 outputs determination information S21 for switching the selection output unit 360 so as to select the output of the RAM 1, that is, the first LUT 302.

選択出力部360は、判定部340から入力される判定情報S21に従って、第1、第2、および第3のLUT302,304,306であるRAM1,RAM2,RAM3の3つの出力の中から1つを選択して出力する。   The selection output unit 360 outputs one of the three outputs of the first, second, and third LUTs 302, 304, and 306, that is, RAM1, RAM2, and RAM3, according to the determination information S21 input from the determination unit 340. Select and output.

選択出力部360は、復号結果の出力のうち、復号結果情報J1を図1に示した復号結果出力部50を介して後段の回路に出力し、符号長情報J2を符号位置管理部40へ入力する。   The selection output unit 360 outputs the decoding result information J1 out of the decoding result output to the subsequent circuit via the decoding result output unit 50 shown in FIG. 1, and inputs the code length information J2 to the code position management unit 40. To do.

次に、符号の割当て方が、図5に示す第1例の割当表から図6に示す第2例の割当表に変更になった場合について説明する。図6に示す第2例の割当表も、図5に示す第1例の割当表と同様に、符号データの最大長Mが“16”であることに従っており、出現頻度の高い情報には短い符号が割り当てられて、出現頻度の低い情報の多数には16ビットの符号が割り当てられ、符号長が長い符号では、符号の上位側からの先頭部分は“1”が多数連続して現れ、符号長が長くなるに従って連続する“1”の個数も多くなる傾向にある。   Next, a case where the code allocation method is changed from the allocation table of the first example shown in FIG. 5 to the allocation table of the second example shown in FIG. 6 will be described. Similar to the allocation table of the first example shown in FIG. 5, the allocation table of the second example shown in FIG. 6 follows that the maximum length M of the code data is “16”, and is short for information with high appearance frequency. A code is assigned and a 16-bit code is assigned to a large number of pieces of information with low appearance frequency. In a code with a long code length, a number of “1” s appear continuously from the upper part of the code. The number of consecutive “1” s tends to increase as the length increases.

ここで、図5に示す第1例の割当表と図6に示す第2例の割当表を比較すると分かるように、符号は先ず、ビット数がm1(=8)よりも短い第1種の符号(何れも範囲1で示す)と、それ以上で最大長M(=16)までの符号(符号長が9〜16ビット)であって、符号の先頭(上位ビット側)の少なくともm2(=8)ビットが全て(すなわち8個以上が連続して)“1”となる第2種の符号(何れも範囲1で示す)とに分けられる。   Here, as can be seen by comparing the allocation table of the first example shown in FIG. 5 and the allocation table of the second example shown in FIG. 6, the code is first of the first type whose number of bits is shorter than m1 (= 8). A code (both are indicated by range 1) and a code (code length is 9 to 16 bits) up to the maximum length M (= 16), and at least m2 (= higher bit side) of the code 8) All bits (that is, 8 or more consecutively) are divided into a second type code (both indicated by a range 1) which is “1”.

また、9ビット〜16ビットの残りの符号は、図5に示す第1例の割当表では、符号の先頭(上位ビット側)の少なくともm3a(=5)ビットが全て(すなわち5個分以上8個未満が連続して)“1”となる(範囲3で示す)一方、図6に示す第2例の割当表では、符号の先頭(上位ビット側)の少なくともm3b(=3)ビットが全て(すなわち3個分以上8個未満が連続して)“1”となる(範囲3で示す)。   Further, in the allocation table of the first example shown in FIG. 5, the remaining codes of 9 bits to 16 bits are all at least m3a (= 5) bits at the beginning (upper bit side) of the codes (that is, 8 or more 8 bits). On the other hand, in the allocation table of the second example shown in FIG. 6, at least m3b (= 3) bits at the beginning (upper bit side) of the code are all present. (That is, 3 or more and less than 8 consecutively) becomes “1” (indicated by range 3).

よって、図5に示す第1例の割当表から図6に示す第2例の割当表へと符号の割当て方が変更される場合には、各LUT302,304,306に記憶すべき情報とシフト数レジスタ部316に対するレジスタ値(符号割当表から導かれるm3に対応したシフト量を示す)をm3aからm3bに書き換え、シフト回路326は、シフト数レジスタ部316からのシフト量情報S13aに基づいてシフト量調整を行なう。これにより、回路を作り直さなくても、図2に示した同一の回路構成にて、図5に示す第1例の割当表から図6に示す第2例の割当表への符号割当ての変更に対応することができる。   Therefore, when the code allocation method is changed from the allocation table of the first example shown in FIG. 5 to the allocation table of the second example shown in FIG. 6, information to be stored in each LUT 302, 304, 306 and shift The register value for the number register unit 316 (indicating the shift amount corresponding to m3 derived from the code assignment table) is rewritten from m3a to m3b, and the shift circuit 326 shifts based on the shift amount information S13a from the shift number register unit 316. Adjust the amount. This makes it possible to change the code assignment from the assignment table of the first example shown in FIG. 5 to the assignment table of the second example shown in FIG. 6 with the same circuit configuration shown in FIG. 2 without recreating the circuit. Can respond.

また、ルックアップテーブルをRAMなどの書換可能な記憶手段で実装することによって、符号割り当てが変更になった場合に回路構成を変更しなくてもテーブルを書き換えることによって対応可能であるとともに、復号テーブルを小規模な複数のルックアップテーブルで構成することができ、回路規模を小さく抑えることができる。   In addition, by mounting the lookup table with a rewritable storage means such as a RAM, it is possible to cope with rewriting the table without changing the circuit configuration when the code assignment is changed, and the decoding table. Can be composed of a plurality of small look-up tables, and the circuit scale can be kept small.

<第2実施形態;第1のLUT(1個)+第3のLUT(複数;何れもシフト量可変)>
図7は、復号処理部30の第2実施形態を示す回路ブロック図である。この第2実施形態は、符号データD3の最大長Mが固定でない場合に好適な構成例である。第1実施形態で述べたように、第2のLUTと第3のLUTは、何れも、符号データの上位側にデータ“1”が連続して所定数以上連続する符号を復号処理の対象とするもので、本質的には同種の処理を行なうが、符号データD3の最大長Mが固定である場合には、2つのLUTの内の一方についてはシフト量を固定とすることができた。これに対して、符号データD3の最大長Mが固定でない場合には、双方ともにシフト量を固定とすることができないので、第2実施形態では、実質的に、第2のLUTを取り外し、第3のLUTとこれに対応したシフト回路とを2つ備えた構成となる。以下具体的に説明する。
<Second Embodiment: First LUT (1) + Third LUT (Plural; Both are Variable in Shift Amount)>
FIG. 7 is a circuit block diagram showing a second embodiment of the decoding processing unit 30. The second embodiment is a configuration example suitable for the case where the maximum length M of the code data D3 is not fixed. As described in the first embodiment, each of the second LUT and the third LUT uses a code in which the data “1” is continuously higher than the code data as a target for decoding processing. Therefore, the same kind of processing is performed essentially, but when the maximum length M of the code data D3 is fixed, the shift amount can be fixed for one of the two LUTs. On the other hand, if the maximum length M of the code data D3 is not fixed, the shift amount cannot be fixed in both cases. Therefore, in the second embodiment, the second LUT is substantially removed, 3 LUTs and two shift circuits corresponding to the three LUTs. This will be specifically described below.

図示するように、第2実施形態の復号処理部30において、メモリ部300は、符号切出部20にて切り出された符号データD3について、ある所定のビット数(=m1)よりも短い符号を復号するため符号データD31として取り込み復号結果情報J11および符号長情報J21を出力する第1のLUT302と、符号長がm1を超える符号について、符号データD3の先頭(上位ビット側)に同一ビットがm3A以上連続して現れる符号を復号し、復号結果情報J13Aおよび符号長情報J23Aを出力する第3のLUT306Aと、符号長がm1を超える符号について、符号データD3の先頭(上位ビット側)に同一ビットがm3B以上連続して現れる符号を復号し、復号結果情報J13Bおよび符号長情報J23Bを出力する第3のLUT306Bとを有する。   As shown in the drawing, in the decoding processing unit 30 of the second embodiment, the memory unit 300 uses a code shorter than a predetermined number of bits (= m1) for the code data D3 extracted by the code extraction unit 20. For the first LUT 302 that captures as code data D31 for decoding and outputs decoding result information J11 and code length information J21, and for codes whose code length exceeds m1, the same bit is m3A at the head (upper bit side) of code data D3. For the third LUT 306A that decodes the codes that appear continuously and outputs the decoding result information J13A and the code length information J23A, and the code whose code length exceeds m1, the same bit at the head (upper bit side) of the code data D3 Decodes a code that continuously appears for m3B or more, and outputs decoding result information J13B and code length information J23B. And a UT306B.

シフト量調整処理部320は、第3のLUT306Aで復号する符号において全ての符号に共通して符号の先頭に現れる連続した同一ビットの個数(m3A)分だけ入力符号データをシフトするための第1のシフト回路326Aと、第3のLUT306Bで復号する符号において全ての符号に共通して符号の先頭に現れる連続した同一ビットの個数(m3B)分だけ入力符号データをシフトするための第2のシフト回路326Bとを有する。これに対応するように、メモリ部300は、シフト回路326Aのシフト数(=m3A)を設定するためのシフト数レジスタ部316Aと、シフト回路326Bのシフト数(=m3B,m3A<m3B)を設定するためのシフト数レジスタ部316Aとを有する。   The shift amount adjustment processing unit 320 shifts the input code data by the number of consecutive identical bits (m3A) appearing at the head of the code common to all codes in the code decoded by the third LUT 306A. The second shift for shifting the input code data by the number of consecutive identical bits (m3B) appearing at the head of the code common to all codes in the code decoded by the shift circuit 326A and the third LUT 306B Circuit 326B. Corresponding to this, the memory unit 300 sets the shift number register unit 316A for setting the shift number (= m3A) of the shift circuit 326A and the shift number (= m3B, m3A <m3B) of the shift circuit 326B. A shift number register unit 316A.

シフト数レジスタ部316Aは、符号データD3の符号化系列情報に基づいて、第3のLUT306Aについての入力される符号データD3に対するシフト量を決定し、このシフト量を表すシフト量情報S13aAをシフト回路326Aに入力するとともに、同様のシフト量情報S13bAを判定部340に入力する。シフト数レジスタ部316Bは、符号データD3の符号化系列情報に基づいて、第3のLUT306Bについての入力される符号データD3に対するシフト量を決定し、このシフト量を表すシフト量情報S13aBをシフト回路326Bに入力するとともに、同様のシフト量情報S13bBを判定部340に入力する。   The shift number register unit 316A determines a shift amount with respect to the input code data D3 for the third LUT 306A based on the encoded sequence information of the code data D3, and uses the shift amount information S13aA representing this shift amount as a shift circuit. The same shift amount information S13bA is input to the determination unit 340 as well as to 326A. The shift number register unit 316B determines a shift amount with respect to the input code data D3 for the third LUT 306B based on the encoded sequence information of the code data D3, and uses the shift amount information S13aB representing this shift amount as a shift circuit. The same shift amount information S13bB is input to the determination unit 340 as well as to 326B.

各LUT302,306A,306Bへの入力ビット幅などの回路構成は、第1実施形態と同様に、符号割当ての性質や回路実装の事情などを考慮して決定する。   The circuit configuration such as the input bit width to each of the LUTs 302, 306A, and 306B is determined in consideration of the nature of code assignment, the situation of circuit mounting, and the like, as in the first embodiment.

この第2実施形態の構成に依れば、第1実施形態における第2のLUT304を第3のLUT306Bに置き換え、これに対応したシフト回路326Bを設けた構成となるので、各第3のLUT306A,306Bに入力するビット列の位置を、シフト数レジスタ部316A,316Bによるレジスタ設定と、それに対応したシフト回路326A,326Bによって変更することができる。つまり、それぞれのLUTに入力するビット列の位置をレジスタ設定とシフト回路によって変更することができる。これにより、符号割当てが変更になる場合に加えて、最大符号長が変更されるような(たとえば16ビットよりも短くなる)別の種類の可変長符号化方式にも対応できるようになる。以下、この点について、説明する。   According to the configuration of the second embodiment, the second LUT 304 in the first embodiment is replaced with the third LUT 306B, and a shift circuit 326B corresponding to the second LUT 306B is provided. The position of the bit string input to 306B can be changed by the register setting by the shift number register units 316A and 316B and the corresponding shift circuits 326A and 326B. That is, the position of the bit string input to each LUT can be changed by register setting and the shift circuit. As a result, in addition to the case where the code allocation is changed, it is possible to cope with another type of variable length coding scheme in which the maximum code length is changed (for example, shorter than 16 bits). Hereinafter, this point will be described.

図8および図9は、第2実施形態の効果を説明する符号の割当て方の基本例を示した図表である。図8に示す第1例の割当表は、図3に示した第1例の割当表と同じである。一方、図9に示す第2例の割当表では、符号長の最大長がMA=16ビットからMB=15ビットに変更されている。つまり、符号の割当て方が変わった際に、m1の関係を維持できるが、Mを維持できない。   FIG. 8 and FIG. 9 are tables showing basic examples of code allocation methods for explaining the effects of the second embodiment. The allocation table of the first example shown in FIG. 8 is the same as the allocation table of the first example shown in FIG. On the other hand, in the allocation table of the second example shown in FIG. 9, the maximum code length is changed from MA = 16 bits to MB = 15 bits. That is, when the code allocation method changes, the relationship of m1 can be maintained, but M cannot be maintained.

そこで、この場合、m3A,m3BをMに連動して切り替えるようにすることで、シフト数レジスタ部316A,316Bによるレジスタ設定と、それに対応したシフト回路326A,326Bによって変更し、第3のLUT306A,306Bに入力するビット列の位置を切り替える。   Therefore, in this case, by switching m3A and m3B in conjunction with M, the register settings by the shift number register units 316A and 316B are changed by the corresponding shift circuits 326A and 326B, and the third LUT 306A, The position of the bit string input to 306B is switched.

こうすることで、最大長がMAからMBというように変更される場合であっても、各LUT302,304,306に記憶すべき情報とシフト数レジスタ部316A,316Bに対するレジスタ値m3A,m3BをMAやMBに連動して書き換えさえすれば、シフト回路326A,326Bは、シフト数レジスタ部316A,316Bからのシフト量情報S13aA,S13aBに基づいてシフト量調整ができる。   Thus, even if the maximum length is changed from MA to MB, the information to be stored in each LUT 302, 304, 306 and the register values m3A, m3B for the shift number register units 316A, 316B are changed to MA. As long as rewriting is performed in conjunction with MB, the shift circuits 326A and 326B can adjust the shift amount based on the shift amount information S13aA and S13aB from the shift number register units 316A and 316B.

これにより、回路変更をすることなく、最大符号長が短いような別の種類の可変長符号化方式への変更にも対応することができる。また、これとは逆に、符号長が長くなって、たとえば“17”とか“18”の場合であっても、シフト量調整によって、符号長変更に対して、ある程度順応することもできる。   Thereby, it is possible to cope with a change to another type of variable-length encoding method in which the maximum code length is short without changing the circuit. On the other hand, even if the code length becomes longer, for example, “17” or “18”, the code length can be adjusted to some extent by adjusting the shift amount.

<第3実施形態;第1のLUT(1個)+第3のLUT(1個)>
図10は、復号処理部30の第3実施形態を示す回路ブロック図である。この第3実施形態は、符号データD3の最大長Mが固定でない場合に好適な第2実施形態の構成に対する変形例であり、第3のLUTを1系統のみ備えている点に特徴を有する。実質的には、図示するように、第1実施形態の復号処理部30から第2のLUT304を取り除いた構成となる。
<Third embodiment: first LUT (one) + third LUT (one)>
FIG. 10 is a circuit block diagram showing a third embodiment of the decoding processing unit 30. The third embodiment is a modification of the configuration of the second embodiment that is suitable when the maximum length M of the code data D3 is not fixed, and is characterized in that it includes only one third LUT. As shown in the figure, the second LUT 304 is removed from the decoding processing unit 30 of the first embodiment.

このような第3実施形態の構成に依れば、第1や第2実施形態の構成に比べて、符号割当方の変更に対する柔軟性が低下するものの、最大符号長が事前に予想できないような場合であってもある程度は対応可能である。たとえば、変更前のMの値が大きくなる、すなわち最大符号長が長くなるような変更に対応可能である。   According to the configuration of the third embodiment, the maximum code length cannot be predicted in advance, although the flexibility for changing the code allocation method is reduced as compared with the configurations of the first and second embodiments. Even if it is a case, it can cope to some extent. For example, it is possible to cope with a change in which the value of M before the change is large, that is, the maximum code length is long.

<第4実施形態;第1のLUT(1個)+第2のLUT(1個)>
図11は、復号処理部30の第4実施形態を示す回路ブロック図である。この第4実施形態は、図示するように、第1実施形態の復号処理部30から第3のLUT306と、シフト量調整処理部320とを取り除いた点に特徴を有する。このような第4実施形態においては、先ず、第1のLUT302では、あるビット長m1以下の符号を復号し、第2のLUT304では、先頭のあるビット長m2が同じ値の符号を復号する。
<Fourth embodiment: first LUT (one) + second LUT (one)>
FIG. 11 is a circuit block diagram showing a fourth embodiment of the decoding processing unit 30. As shown in the figure, the fourth embodiment is characterized in that the third LUT 306 and the shift amount adjustment processing unit 320 are removed from the decoding processing unit 30 of the first embodiment. In the fourth embodiment, first, the first LUT 302 decodes a code having a certain bit length m1 or less, and the second LUT 304 decodes a code having the same bit length m2 at the beginning.

判定部340は、符号切出部20にて切り出された符号データD3に基づいて、2つのLUT302,304の何れの出力を選択すべきかを判定し、その判定結果を示す判定情報S21を選択出力部360に入力する。具体的には、判定部340は、符号切出部20にて切り出された符号データD30について、符号ビット列の先頭m2ビットが全て“1”ならばRAM2すなわち第2のLUT304の出力を選択するように選択出力部360を切り替えるための判定情報S21を出力する。また、判定部340は、前述の条件を満たさない場合は、RAM1すなわち第1のLUT302の出力を選択するように選択出力部360を切り替えるための判定情報S21を出力する。   The determination unit 340 determines which output of the two LUTs 302 and 304 should be selected based on the code data D3 extracted by the code extraction unit 20, and selectively outputs determination information S21 indicating the determination result. To the part 360. Specifically, the determination unit 340 selects the output of the RAM 2, that is, the second LUT 304 if the first m2 bits of the code bit string are all “1” for the code data D30 extracted by the code extraction unit 20. The determination information S21 for switching the selection output unit 360 is output. Further, the determination unit 340 outputs determination information S21 for switching the selection output unit 360 so as to select the output of the RAM 1, that is, the first LUT 302, when the above condition is not satisfied.

選択出力部360は、判定部340から入力される判定情報S21に従って、第1および第2のLUT302,304であるRAM1,RAM2の2つの出力の中から1つを選択して出力する。このような第4実施形態の構成に依れば、上述した第1実施形態の構成よりも、さらに回路を簡易化できる。   The selection output unit 360 selects and outputs one of the two outputs of the RAMs 1 and 2 as the first and second LUTs 302 and 304 according to the determination information S21 input from the determination unit 340. According to such a configuration of the fourth embodiment, the circuit can be further simplified than the configuration of the first embodiment described above.

ここで、図5に示した符号の割当て方に対応するためには、m2=8ならば、m1は範囲2のビット分(=11)以上である必要がある。つまり、第3のLUT306を取り外しているので、第1のLUT302が担当する符号範囲を範囲3まで広くする。つまり、RAM1のアドレス入力のビット幅が上記第1〜第3実施形態と異なり、8ビットではなくなる。回路構成としては、この点を見越して予めそのようなビット幅に対応したRAMを実装しておく。   Here, in order to correspond to the code allocation method shown in FIG. 5, if m2 = 8, m1 needs to be equal to or larger than the bit of range 2 (= 11). That is, since the third LUT 306 is removed, the code range handled by the first LUT 302 is expanded to range 3. That is, unlike the first to third embodiments, the bit width of the address input of the RAM 1 is not 8 bits. As a circuit configuration, a RAM corresponding to such a bit width is mounted in advance in view of this point.

なお、第1のLUT302が担当する符号範囲を広くするのとは反対に、第2のLUT304が担当する符号範囲を範囲3まで広くしてもよい。ただしこの場合には、RAM2のアドレス入力のビット幅が上記第1〜第3実施形態と異なり、8ビットではなくなることに加えて、第2のLUT304が除外するべき符号データD3の先頭側(第3のLUT306用のシフト回路326によるシフト量に相当)は5ビットにする必要がある。   It should be noted that the code range handled by the second LUT 304 may be widened to the range 3 as opposed to widening the code range handled by the first LUT 302. However, in this case, the bit width of the address input of the RAM 2 is not 8 bits unlike the first to third embodiments, and in addition to the leading side of the code data D3 to be excluded by the second LUT 304 (first 3 is equivalent to the shift amount by the shift circuit 326 for the LUT 306).

なお、この第4実施形態の構成は、特開平8−167855号公報の図5(以下従来技術1という)に示される構成と似通っている。しかしながら、この従来技術1の構成では、先頭2ビットを組合せ論理回路に入力し、“00”,“01”,“10”の場合を復号し、3ビット目以降をメモリに入力し、先頭が“11”の場合を復号している。ある符号の割当て方を想定して、その場合だけに使える構成を示しているので、符号割当てが変わった場合には対応できない。   The configuration of the fourth embodiment is similar to the configuration shown in FIG. 5 (hereinafter referred to as prior art 1) of JP-A-8-167855. However, in the configuration of this prior art 1, the first two bits are input to the combinational logic circuit, the cases of “00”, “01”, “10” are decoded, the third and subsequent bits are input to the memory, The case of “11” is decoded. Assuming a certain code allocation method, a configuration that can be used only in that case is shown.

これに対して、第4実施形態の構成では、符号割当てが変わった場合でも、m1,m2に応じて適応できる。逆に言えば、m1=m2=2の場合に特化した構成が、従来技術1に示される構成になると考えてよい。この点では、m1,m2に応じて適応できる第4実施形態の構成と従来技術1の構成では、構成および作用効果に相違がある。   In contrast, the configuration of the fourth embodiment can be adapted to m1 and m2 even when the code assignment changes. In other words, the configuration specialized for the case of m1 = m2 = 2 may be considered to be the configuration shown in the prior art 1. In this respect, there is a difference in configuration and operational effect between the configuration of the fourth embodiment that can be adapted according to m1 and m2, and the configuration of the prior art 1.

また、第4実施形態の構成は、特開平8−316847号公報の図1(以下従来技術2という)に示される構成とも似通っている。すなわち、従来技術2の構成では、3つのLUTで構成しており、LUTを1個減らすと第4実施形態の構成に似通ったものとなる。しかしながら、従来技術2では、複数テーブルの出力から1つを選択するのに、テーブルから出力される選択データを使って判定しているので、回路構成が複雑になり、また、テーブルから符号長が出力されないと判定できず動作速度を低下させる要因となる問題がある。   The configuration of the fourth embodiment is similar to the configuration shown in FIG. 1 (hereinafter referred to as Conventional Technology 2) of JP-A-8-316847. In other words, the configuration of the conventional technique 2 is configured by three LUTs, and if one LUT is reduced, the configuration is similar to the configuration of the fourth embodiment. However, in the prior art 2, since one of the outputs from the plurality of tables is selected using the selection data output from the table, the circuit configuration is complicated, and the code length is determined from the table. There is a problem that it cannot be determined that it is not output and causes a reduction in operating speed.

これに対して、第4実施形態では、テーブルから出力される選択データを使わずに、判定部340からの判定情報S21、すなわち符号切出部20にて切り出された符号データD3に基づいて得られる判定情報S21に従って第1および第2のLUT302,304であるRAM1,RAM2の2つの出力の中から1つを選択して出力するので、構成が簡易でありまた符号長が出力されないために判定できないという問題も生じない点で異なる。よって、第4実施形態と従来技術2とは、似通っているが、構成および作用・効果において相違がある。   On the other hand, in the fourth embodiment, the selection data output from the table is not used, but the determination information S21 from the determination unit 340, that is, the code data D3 extracted by the code extraction unit 20 is obtained. Since one of the two outputs of RAM1 and RAM2 which are the first and second LUTs 302 and 304 is selected and output in accordance with the determination information S21, the determination is made because the configuration is simple and the code length is not output. The difference is that the problem of not being possible does not occur. Therefore, although the fourth embodiment and the prior art 2 are similar, there is a difference in configuration, operation, and effect.

以上、本発明を実施形態を用いて説明したが、本発明の技術的範囲は上記実施形態に記載の範囲には限定されない。発明の要旨を逸脱しない範囲で上記実施形態に多様な変更または改良を加えることができ、そのような変更または改良を加えた形態も本発明の技術的範囲に含まれる。   As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in the said embodiment. Various changes or improvements can be added to the above-described embodiment without departing from the gist of the invention, and embodiments to which such changes or improvements are added are also included in the technical scope of the present invention.

また、上記の実施形態は、クレーム(請求項)にかかる発明を限定するものではなく、また実施形態の中で説明されている特徴の組合せの全てが発明の解決手段に必須であるとは限らない。前述した実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜の組合せにより種々の発明を抽出できる。実施形態に示される全構成要件から幾つかの構成要件が削除されても、効果が得られる限りにおいて、この幾つかの構成要件が削除された構成が発明として抽出され得る。   Further, the above embodiments do not limit the invention according to the claims (claims), and all combinations of features described in the embodiments are not necessarily essential to the solution means of the invention. Absent. The embodiments described above include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. Even if some constituent requirements are deleted from all the constituent requirements shown in the embodiment, as long as an effect is obtained, a configuration from which these some constituent requirements are deleted can be extracted as an invention.

たとえば、上記第1〜第3実施形態では、一例としてRAM1,RAM2,RAM3のアドレス入力のビット幅が全て8ビットの場合を取り上げたが、符号割当ての性質や回路実装の事情などを考慮してビット幅を変更して実装することも可能である。第4実施形態がその一例である。   For example, in the first to third embodiments, the case where the bit widths of the address inputs of RAM1, RAM2, and RAM3 are all 8 bits is taken as an example. However, in consideration of the nature of code assignment and the circumstances of circuit implementation, etc. It is also possible to implement by changing the bit width. The fourth embodiment is an example.

また、符号切出部20の回路構成によって、復号テーブルに入力される符号ビット列のビット幅は固定化されるが、このビット数以下ならば、様々な種類の可変長符号に対応することが可能である。   Also, the bit width of the code bit string input to the decoding table is fixed by the circuit configuration of the code cutout unit 20, but it is possible to support various types of variable length codes as long as the number of bits is less than this number. It is.

たとえば図2に示した例では、JPEGの場合を例としたので入力符号ビット列のビット幅を“16”としており、JPEGの符号割当てが変更になったときでも復号可能であるが、さらにこれに加えて、符号の最大ビット長が“16”以下であるような別の種類の可変長符号についても、RAMとレジスタの設定値を書き換えるだけで、回路構成を変更せずに対応可能である。   For example, in the example shown in FIG. 2, since the case of JPEG is taken as an example, the bit width of the input code bit string is set to “16”, and decoding is possible even when the JPEG code assignment is changed. In addition, other types of variable-length codes whose code maximum bit length is “16” or less can be dealt with without changing the circuit configuration by simply rewriting the set values of the RAM and the register.

また、上記実施形態では、JPEG方式が採用しているハフマン符号などの可変長符号についての復号処理について説明したが、等長符号についての復号処理についても適用し得る。たとえば、ハフマン符号などの可変長符号では、出現頻度の高い入力データに対しては、短いデータ長の符号データを割り当て、出現頻度の低い入力データに対しては、長いデータ長の符号データを割り当て、これにより、使用する平均的なデータ長を短くすることで、符号データ全体のデータ量を少なくするようにしているが、符号データの復号時には符号長の切れ目を峻別する処理が必要となる。   In the above-described embodiment, the decoding process for a variable length code such as a Huffman code adopted by the JPEG method has been described. However, the decoding process for an equal length code can also be applied. For example, in a variable-length code such as a Huffman code, code data having a short data length is assigned to input data having a high appearance frequency, and code data having a long data length is assigned to input data having a low appearance frequency. As a result, the average data length to be used is shortened to reduce the data amount of the entire code data. However, when the code data is decoded, a process for discriminating between the code lengths is required.

一方、等長符号では、出現頻度に関わらず一定の符号長で符号データを割り当てるので、実質的には意味のない部分を多く含み得るが、符号データの復号時には符号長の切れ目を峻別する処理が不要である。   On the other hand, in the isometric code, the code data is allocated with a constant code length regardless of the appearance frequency, and therefore, it may contain many parts that are substantially meaningless. Is unnecessary.

上記実施形態で示したように、本実施形態の復号処理では、入力される符号データのうち、上述したような所定の条件に従って、実質的に有効な部分に対応した復号用の情報をLUTに用意しておき復号処理を行なうものであり、この点では、等長符号についても、実質的には意味のない部分を除いた有効部分に対応した復号用の情報をLUTに用意しておき復号処理を行なうことができる。   As shown in the above embodiment, in the decoding process of this embodiment, the decoding information corresponding to the substantially effective portion of the input code data according to the predetermined condition as described above is stored in the LUT. In this regard, even for the isometric code, decoding information corresponding to the effective part excluding the substantially meaningless part is prepared in the LUT. Processing can be performed.

本発明に係る復号化装置を適用した復号システムの概要を示したブロック図である。It is the block diagram which showed the outline | summary of the decoding system to which the decoding apparatus concerning this invention is applied. 本発明に係る復号装置の一例である復号処理部の第1実施形態を示す回路ブロック図である。It is a circuit block diagram which shows 1st Embodiment of the decoding process part which is an example of the decoding apparatus which concerns on this invention. 符号の割当て方の基本例を示した第1例の図表である。It is the graph of the 1st example which showed the basic example of how to allocate a code | symbol. 符号の割当て方の基本例を示した第2例の図表である。It is the chart of the 2nd example which showed the basic example of how to allocate a code. JPEG規格に基づく第1例のハフマン符号の割当表である。It is an allocation table of the Huffman code of the first example based on the JPEG standard. JPEG規格に基づく第2例のハフマン符号の割当表である。It is the allocation table of the Huffman code of the 2nd example based on JPEG standard. 復号処理部の第2実施形態を示す回路ブロック図である。It is a circuit block diagram which shows 2nd Embodiment of a decoding process part. 第2実施形態の効果を説明する符号の割当ての第1例を示した図表である。It is the table | surface which showed the 1st example of the allocation of the code | symbol explaining the effect of 2nd Embodiment. 第2実施形態の効果を説明する符号の割当ての第2例を示した図表である。It is the table | surface which showed the 2nd example of the allocation of the code | symbol explaining the effect of 2nd Embodiment. 復号処理部の第3実施形態を示す回路ブロック図である。It is a circuit block diagram which shows 3rd Embodiment of a decoding process part. 復号処理部の第4実施形態を示す回路ブロック図である。It is a circuit block diagram which shows 4th Embodiment of a decoding process part.

符号の説明Explanation of symbols

1…復号システム、10…符号入力部、20…符号切出部、30…復号処理部、300…メモリ部、302…第1のLUT、304…第2のLUT、306,306a,306b…第3のLUT、312…有効上位ビット数レジスタ部、314…シフト数レジスタ部、316,316a,316b…シフト数レジスタ部、320…シフト量調整処理部、326,326a,326b…シフト回路、340…判定部、360…選択出力部、380…記憶情報更新部、40…符号位置管理部、50…復号結果出力部   DESCRIPTION OF SYMBOLS 1 ... Decoding system, 10 ... Code input part, 20 ... Code extraction part, 30 ... Decoding processing part, 300 ... Memory part, 302 ... 1st LUT, 304 ... 2nd LUT, 306, 306a, 306b ... 1st 3 LUTs, 312... Valid upper bit number register unit, 314... Shift number register unit, 316, 316 a, 316 b... Shift number register unit, 320 ... shift amount adjustment processing unit, 326, 326 a, 326 b. Determination unit, 360 ... selection output unit, 380 ... stored information update unit, 40 ... code position management unit, 50 ... decoding result output unit

Claims (9)

符号データを復号する復号装置であって、
前記復号装置に順次入力される符号データのうち、それぞれ所定ビット数よりも短い複数の符号長の符号データを復号するための情報を格納する書換可能な記憶デバイスを有した短ビット符号データ用復号情報記憶部と、
前記復号装置に順次入力される符号データのうち、符号データ中に共通して同一ビットデータが所定ビット数分連続したものを処理対象として復号するための情報を格納する書換可能な記憶デバイスを有した連続ビット符号データ用復号情報記憶部と、
前記連続ビット符号データ用復号情報記憶部が処理対象とする符号データについての前記所定ビット数分に関する情報を格納する書換可能な記憶デバイスを有した連続ビット数記憶部と、
前記復号装置に順次入力される符号データの符号の割当て方に応じて、前記各記憶部に格納する情報を書き換えさせる記憶情報更新部と、
前記短ビット符号データ用復号情報記憶部および前記連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れを選択すべきかを判定する判定部と、
前記判定部の判定結果に基づいて、前記短ビット符号データ用復号情報記憶部および前記連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れかを選択して出力する選択出力部と
を備えたことを特徴とする復号装置。
A decoding device for decoding code data,
Decoding for short-bit code data having a rewritable storage device for storing information for decoding code data having a plurality of code lengths shorter than a predetermined number of bits among code data sequentially input to the decoding device An information storage unit;
There is a rewritable storage device that stores information for decoding the code data that is sequentially input to the decoding apparatus and having the same bit data as a processing target in common in the code data. A decoding information storage unit for continuous bit code data,
A continuous bit number storage unit having a rewritable storage device that stores information about the predetermined number of bits of code data to be processed by the decoding information storage unit for continuous bit code data;
A storage information update unit that rewrites information stored in each storage unit according to a code allocation method of code data sequentially input to the decoding device;
A determination unit for determining which of the decoding results output from the decoding information storage unit for short bit code data and the decoding information storage unit for continuous bit code data is to be selected;
A selection output unit that selects and outputs one of the decoding results output from the decoding information storage unit for short bit code data and the decoding information storage unit for continuous bit code data based on the determination result of the determination unit And a decoding device comprising:
前記連続ビット符号データ用復号情報記憶部は、処理対象の符号データから連続した前記所定ビット数分を除外した有効部分に対応付けて前記処理対象の符号データを復号するための情報を格納する
ことを特徴とする請求項1に記載の復号装置。
The continuous bit code data decoding information storage unit stores information for decoding the processing target code data in association with an effective portion excluding the predetermined number of consecutive bits from the processing target code data. The decoding device according to claim 1.
前記処理対象の符号データから、前記所定ビット数分連続した部分を除外して有効部分の符号データを抽出し、この有効部分の符号データを前記連続ビット符号データ用復号情報記憶部に入力する有効部分抽出処理部
を備えたことを特徴とする請求項1または2に記載の復号装置。
The effective code data is extracted from the code data to be processed by excluding the continuous portion of the predetermined number of bits, and the effective portion of the code data is input to the decoding information storage unit for the continuous bit code data. The decoding apparatus according to claim 1, further comprising a partial extraction processing unit.
前記有効部分抽出処理部は、前記復号装置に順次入力される符号データを前記所定ビット数分だけ移動させるためのシフト処理部を含む
ことを特徴とする請求項3に記載の復号装置。
The decoding device according to claim 3, wherein the effective part extraction processing unit includes a shift processing unit for moving code data sequentially input to the decoding device by the predetermined number of bits.
前記シフト処理部は、前記連続ビット符号データ用復号情報記憶部が処理対象とする全ての符号データに共通して符号の先頭側に現れる連続した同一ビットの個数分だけ入力される符号データをシフトさせる
ことを特徴とする請求項4に記載の復号装置。
The shift processing unit shifts code data that is input by the number of consecutive identical bits that appear on the head side of the code in common with all code data to be processed by the decoding information storage unit for continuous bit code data. The decoding device according to claim 4, wherein:
前記連続ビット符号データ用復号情報記憶部は、第1の前記所定ビット数以上連続したものを処理対象として復号するための情報を格納する第1の連続ビット符号データ用復号情報記憶部と、前記第1の所定ビット数以下の第2の前記所定ビット数以上連続したものであって、前記短ビット符号データ用復号情報記憶部および前記第1の連続ビット符号データ用復号情報記憶部が処理対象としない符号データを処理対象として復号するための情報を格納する第2の連続ビット符号データ用復号情報記憶部とを有し、
前記連続ビット数記憶部は、前記第2の連続ビット符号データ用復号情報記憶部が処理対象とする符号データについての前記第2の所定ビット数分に関する、前記符号の割当て方に応じて変更される情報を格納するレジスタ部を有し、
前記有効部分抽出処理部は、前記レジスタ部が格納している前記第2の所定ビット数分に関する情報に基づいて、前記有効部分の符号データを抽出し、この有効部分の符号データを前記第2の連続ビット符号データ用復号情報記憶部に入力し、
前記第1の連続ビット符号データ用復号情報記憶部は、処理対象とする符号データについての前記第1の所定ビット数分に関する、前記符号の割当て方に応じた情報であって、当該割当て方が変更されても不変な予め定められている情報に基づいて前記有効部分の符号データを取り込み、
前記判定部は、前記復号装置に順次入力される符号データと前記レジスタ部が格納している前記第2の所定ビット数分に関する情報とに基づいて、前記短ビット符号データ用復号情報記憶部および前記第1および前記第2の各連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れを選択すべきかを判定する
ことを特徴とする請求項3から5のうちの何れか1項に記載の復号装置。
The decoding information storage unit for continuous bit code data is a first decoding information storage unit for first continuous bit code data that stores information for decoding data that is continuous for the first predetermined number of bits or more, The decoding information storage unit for the short bit code data and the decoding information storage unit for the first continuous bit code data that are continuous for the second predetermined bit number that is less than or equal to the first predetermined number of bits. A decoding information storage unit for second continuous bit code data that stores information for decoding code data not to be processed,
The continuous bit number storage unit is changed according to the code allocation method for the second predetermined bit number of code data to be processed by the second continuous bit code data decoding information storage unit. A register unit for storing information,
The effective part extraction processing unit extracts code data of the effective part based on information about the second predetermined number of bits stored in the register unit, and extracts the code data of the effective part to the second To the decoding information storage unit for continuous bit code data of
The first continuous bit code data decoding information storage unit is information according to the code allocation method for the first predetermined number of bits for the code data to be processed, and the allocation method is Capture code data of the effective part based on predetermined information that is unchanged even if changed,
The determination unit, based on code data sequentially input to the decoding device and information on the second predetermined number of bits stored in the register unit, the decoding information storage unit for short bit code data and Any one of the decoding results output from the decoding information storage units for the first and second continuous bit code data should be selected. 6. The decoding device according to item.
前記連続ビット符号データ用復号情報記憶部は、第1の前記所定ビット数以上連続したものを処理対象として復号するための情報を格納する第1の連続ビット符号データ用復号情報記憶部と、前記第1の所定ビット数以下の第2の前記所定ビット数以上連続したものであって、前記短ビット符号データ用復号情報記憶部および前記第1の連続ビット符号データ用復号情報記憶部が処理対象としない符号データを処理対象として復号するための情報を格納する第2の連続ビット符号データ用復号情報記憶部とを有し、
前記連続ビット数記憶部は、前記第1の連続ビット符号データ用復号情報記憶部が処理対象とする符号データについての前記第1の所定ビット数分に関する、前記符号の割当て方に応じて変更される情報を格納する第1のレジスタ部、および前記第2の連続ビット符号データ用復号情報記憶部が処理対象とする符号データについての前記第2の所定ビット数分に関する、前記符号の割当て方に応じて変更される情報を格納する第2のレジスタ部を有し、
前記有効部分抽出処理部は、前記第1のレジスタ部が格納している前記第1の所定ビット数分に関する情報に基づいて第1の前記有効部分の符号データを抽出して、この第1の有効部分の符号データを前記第1の連続ビット符号データ用復号情報記憶部に入力するとともに、前記第2のレジスタ部が格納している前記第2の所定ビット数分に関する情報に基づいて第2の前記有効部分の符号データを抽出して、この第2の有効部分の符号データを前記第2の連続ビット符号データ用復号情報記憶部に入力し、
前記判定部は、前記復号装置に順次入力される符号データと前記第1および前記第2の各レジスタ部が格納している前記各所定ビット数分に関する情報とに基づいて、前記短ビット符号データ用復号情報記憶部および前記第1および前記第2の各連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れを選択すべきかを判定する
ことを特徴とする請求項3から5のうちの何れか1項に記載の復号装置。
The decoding information storage unit for continuous bit code data is a first decoding information storage unit for first continuous bit code data that stores information for decoding data that is continuous for the first predetermined number of bits or more, The decoding information storage unit for the short bit code data and the decoding information storage unit for the first continuous bit code data that are continuous for the second predetermined bit number that is less than or equal to the first predetermined number of bits. A decoding information storage unit for second continuous bit code data that stores information for decoding code data not to be processed,
The continuous bit number storage unit is changed according to the code allocation method for the first predetermined number of bits for the code data to be processed by the first continuous bit code data decoding information storage unit. A first register unit for storing the information and a decoding information storage unit for the second continuous bit code data for the second predetermined number of bits for the code data to be processed. A second register unit for storing information to be changed in response,
The effective part extraction processing unit extracts the code data of the first effective part based on the information about the first predetermined number of bits stored in the first register unit, The code data of the effective portion is input to the first decoding information storage unit for the continuous bit code data, and the second data is stored based on the second predetermined number of bits stored in the second register unit. Code data of the effective portion of the second, and input the code data of the second effective portion to the second continuous bit code data decoding information storage unit,
The determination unit is configured to generate the short bit code data based on code data sequentially input to the decoding device and information on the predetermined number of bits stored in the first and second register units. 6. The decoding information storage unit and the first and second continuous bit code data decoding information storage units output from the decoding result storage unit to be selected are determined. The decoding device according to any one of the above.
前記連続ビット数記憶部は、前記連続ビット符号データ用復号情報記憶部が処理対象とする符号データについての前記所定ビット数分に関する、前記符号の割当て方に応じて変更される情報を格納するレジスタ部を有し、
前記有効部分抽出処理部は、前記レジスタ部が格納している前記所定ビット数分に関する情報に基づいて前記有効部分の符号データを抽出して、この有効部分の符号データを前記連続ビット符号データ用復号情報記憶部に入力し、
前記判定部は、前記復号装置に順次入力される符号データと前記レジスタ部が格納している前記所定ビット数分に関する情報とに基づいて、前記短ビット符号データ用復号情報記憶部および前記連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れを選択すべきかを判定する
ことを特徴とする請求項3から5のうちの何れか1項に記載の復号装置。
The continuous bit number storage unit stores information that is changed according to the code allocation method for the predetermined number of bits for the code data to be processed by the decoding information storage unit for the continuous bit code data. Part
The effective part extraction processing unit extracts code data of the effective part based on information about the predetermined number of bits stored in the register unit, and uses the code data of the effective part for the continuous bit code data Input to the decryption information storage unit,
The determination unit includes the decoding information storage unit for the short bit code data and the continuous bits based on the code data sequentially input to the decoding device and information on the predetermined number of bits stored in the register unit. The decoding apparatus according to any one of claims 3 to 5, wherein which of the decoding results output from the decoding information storage unit for code data is to be selected is determined.
前記連続ビット符号データ用復号情報記憶部は、処理対象とする符号データについての前記所定ビット数分に関する、前記符号の割当て方が変更されても不変な予め定められている情報に基づいて前記有効部分の符号データを取り込み
前記判定部は、前記復号装置に順次入力される符号データと前記符号の割当て方が変更されても不変な予め定められている情報とに基づいて、前記短ビット符号データ用復号情報記憶部および前記連続ビット符号データ用復号情報記憶部から出力される各復号結果の何れを選択すべきかを判定する
ことを特徴とする請求項3から5のうちの何れか1項に記載の復号装置。
The continuous bit code data decoding information storage unit relates to the predetermined number of bits for the code data to be processed, based on predetermined information that remains unchanged even if the code allocation method is changed. The determination unit captures the short bit code data based on code data sequentially input to the decoding device and predetermined information that is invariable even if the code allocation method is changed. The decoding information storage unit for data and the decoding information storage unit for the continuous bit code data are determined which one of the decoding results to be selected is selected. The decoding device described.
JP2003327443A 2003-09-19 2003-09-19 Code data decoder Withdrawn JP2005094562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003327443A JP2005094562A (en) 2003-09-19 2003-09-19 Code data decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003327443A JP2005094562A (en) 2003-09-19 2003-09-19 Code data decoder

Publications (1)

Publication Number Publication Date
JP2005094562A true JP2005094562A (en) 2005-04-07

Family

ID=34457305

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003327443A Withdrawn JP2005094562A (en) 2003-09-19 2003-09-19 Code data decoder

Country Status (1)

Country Link
JP (1) JP2005094562A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015130640A (en) * 2014-01-09 2015-07-16 富士ゼロックス株式会社 Data expander, program, and recording-medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015130640A (en) * 2014-01-09 2015-07-16 富士ゼロックス株式会社 Data expander, program, and recording-medium

Similar Documents

Publication Publication Date Title
JP3459030B2 (en) Coding system
US7769088B2 (en) Context adaptive binary arithmetic code decoding engine
JP4886755B2 (en) Context-adaptive binary arithmetic encoding and decoding system and method
US20040268329A1 (en) Context adaptive binary arithmetic code decoding engine
US20030085822A1 (en) High performance memory efficient variable-length coding decoder
US7127115B2 (en) Image processing apparatus and method, computer program, and storage medium
US7411529B2 (en) Method of decoding bin values using pipeline architecture and decoding device therefor
US7365659B1 (en) Method of context adaptive binary arithmetic coding and coding apparatus using the same
JP3341962B2 (en) Variable length decoder and method for decoding variable length code value
JP4160689B2 (en) Arithmetic coding apparatus and arithmetic decoding apparatus
JP2006211621A (en) Data compression device and data decompression device
WO2007129508A1 (en) Dynamic image processing method, program for the dynamic image processing method, recording medium containing the program for the dynamic image processing method, dynamic image processing device
JP2009534886A5 (en)
KR20170036683A (en) Encoder, decoder and method
KR100486251B1 (en) Decoding apparatus for variable length code and method thereof
US5825312A (en) DX JPEG Huffman decoder
JP2006093958A (en) Progressive jpeg decoding system
US6850648B2 (en) System for decoding packed coded image data while depacking same
US7643689B2 (en) Encoded data conversion method
JP2005094562A (en) Code data decoder
JP2002271791A (en) Image coder, image coding/decoding device, image coding/ decoding method, and program to perform the method
JP2010050697A (en) Apparatus and method for compressing/decompressing image
US7164802B2 (en) Method for image compression by modified Huffman coding
JP2009239852A (en) Image processing apparatus and image processing method
JP2007074648A (en) Cabac decoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060824

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20070906