JP2007104194A - Decoding system - Google Patents

Decoding system Download PDF

Info

Publication number
JP2007104194A
JP2007104194A JP2005290098A JP2005290098A JP2007104194A JP 2007104194 A JP2007104194 A JP 2007104194A JP 2005290098 A JP2005290098 A JP 2005290098A JP 2005290098 A JP2005290098 A JP 2005290098A JP 2007104194 A JP2007104194 A JP 2007104194A
Authority
JP
Japan
Prior art keywords
code
decoding
symbol
processing unit
code length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005290098A
Other languages
Japanese (ja)
Other versions
JP4079965B2 (en
Inventor
Yasuhisa Maeda
泰久 前田
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.)
Axell Corp
Original Assignee
Axell Corp
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 Axell Corp filed Critical Axell Corp
Priority to JP2005290098A priority Critical patent/JP4079965B2/en
Publication of JP2007104194A publication Critical patent/JP2007104194A/en
Application granted granted Critical
Publication of JP4079965B2 publication Critical patent/JP4079965B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To speed up decoding processing in a decoding system while decoding a code string encoded by a canocical Huffman coding. <P>SOLUTION: The decoding system is provided with a code length specification part that executes code length specification processing for specifying a code length of the decoding target included in a processing unit. The system is composed so as to instruct the start of the code length specification processing regarding the next-time processing unit to the code length specification, after the code length specification processing regarding a current processing unit is finished, and before the decoding processing is finished. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、カノニカルハフマン方式によって符号化された符号列を、所定の符号長の処理単位毎に復号処理を繰り返し行うことによって、複数のシンボルが並んだシンボル列を出力する復号化システムに関する。   The present invention relates to a decoding system that outputs a symbol string in which a plurality of symbols are arranged by repeatedly decoding a code string encoded by the canonical Huffman method for each processing unit of a predetermined code length.

データ圧縮方法の一つとして、カノニカルハフマン符号化が知られている。この符号化では、出現頻度情報を正規化した上で、ハフマン符号で得られる符号語のビット長が直接算出される。これにより、復号側に出現頻度情報を渡す必要がなくなるので、復号側におけるメモリ消費量の低減を図ることができる。例えば、特許文献1には、回路規模を増大させることなく、処理の高速化を図ったハフマンデコーダが開示されている。このハフマンデコーダは、復号化による出力データの付加ビットの符号長に応じて、予め保持した予測値の中から次回のハフマン符号の頭出しデータを選択的に出力する。   Canonical Huffman coding is known as one of the data compression methods. In this encoding, after normalizing the appearance frequency information, the bit length of the codeword obtained by the Huffman code is directly calculated. This eliminates the need to pass the appearance frequency information to the decoding side, thereby reducing the memory consumption on the decoding side. For example, Patent Document 1 discloses a Huffman decoder that increases the processing speed without increasing the circuit scale. The Huffman decoder selectively outputs cueing data of the next Huffman code from among the prediction values held in advance according to the code length of the additional bits of the output data obtained by decoding.

特開2004−179752公報JP 2004-179752 A

しかしながら、特許文献1のハフマンデコーダでは、今回の復号化データの生成と同時に、次回のハフマン符号の符号長を決定することはできても、復号化データの生成の途中で、次回のハフマン符号の符号長を決定することができない。また、ハフマンデコーダ内に複数の予測値を保持するバッファが必要であり、予測値の数の応じてそのバッファのサイズも変化するので、回路の大規模化を招く要因となりえる。   However, in the Huffman decoder of Patent Document 1, although the code length of the next Huffman code can be determined simultaneously with the generation of the current decoded data, the next Huffman code is generated during the generation of the decoded data. The code length cannot be determined. In addition, a buffer for holding a plurality of prediction values is required in the Huffman decoder, and the size of the buffer changes according to the number of prediction values, which can be a factor in increasing the scale of the circuit.

本発明は、かかる事情に鑑みてなされたものであり、その目的は、今回の処理単位の復号処理の途中でも、次回の処理単位の復号処理を開始することで、復号処理の高速化を図ることである。   The present invention has been made in view of such circumstances, and an object thereof is to speed up the decoding process by starting the decoding process of the next processing unit even during the decoding process of the current processing unit. That is.

また、本発明の別の目的は、ハフマンデコーダ内に複数の予測値を保持するバッファを削減することにより、回路の小規模化を図ることである。   Another object of the present invention is to reduce the size of the circuit by reducing a buffer for holding a plurality of prediction values in the Huffman decoder.

かかる課題を解決するために、第1の発明は、カノニカルハフマン方式によって符号化された符号列を復号対象とし、符号列の一部を構成する所定の符号長の処理単位毎に復号処理を繰り返し行うことによって、複数のシンボルが並んだシンボル列を出力する復号化システムを提供する。この復号化システムは、複数の異なる符号長のそれぞれに対応付けて先頭符号が記述されたベーステーブルと、ベーステーブルに記述された符号長毎の先頭符号と、処理単位の先頭符号とを比較することによって、処理単位に含まれる復号対象の符号長を特定する符号長特定処理を行う符号長特定部と、符号長特定部によって符号長が特定された復号対象を復号化する復号処理を行うことによって、復号対象に対応したシンボルを出力する復号処理部と、今回の処理単位に関する符号長特定処理の終了後で、かつ、復号処理の終了前に、次回の処理単位に関する符号長特定処理の開始を符号長特定部に指示する制御部とを有する。   In order to solve such a problem, the first invention repeats the decoding process for each processing unit of a predetermined code length that constitutes a part of the code string with a code string encoded by the canonical Huffman method as a decoding target. By doing so, a decoding system is provided that outputs a symbol string in which a plurality of symbols are arranged. This decoding system compares a base table in which a head code is described in association with each of a plurality of different code lengths, a head code for each code length described in the base table, and a head code in a processing unit. A code length specifying unit that performs a code length specifying process that specifies a code length of a decoding target included in the processing unit, and a decoding process that decodes the decoding target whose code length is specified by the code length specifying unit The decoding processing unit that outputs a symbol corresponding to the decoding target and the start of the code length specifying process for the next processing unit after the end of the code length specifying process for the current processing unit and before the end of the decoding process And a control unit that instructs the code length specifying unit.

第2の発明は、カノニカルハフマン方式によって符号化された符号列を復号対象とし、符号列の一部を構成する所定の符号長の処理単位毎に復号処理を繰り返し行うことによって、複数のシンボルが並んだシンボル列を出力する復号化システムを提供する。この復号化システムは、シンボル列の配列的な特徴に基づき予め設定された特定シンボルのそれぞれに対応付けて符号が記述された判定テーブルを参照して、今回の処理単位に特定シンボルの符号が含まれていると判定した場合、符号に対応した特定シンボルを復号結果として出力するとともに、今回以降の処理単位に関する処理主体を選択的に指定するメインデコーダと、メインデコーダに並列に設けられており、自己が処理すべき複数の処理単位をパイプラインによって処理するとともに、メインデコーダからの指定に応じて、自己が処理すべき処理単位を復号化することによって得られたシンボルを復号結果として選択的に出力する第1のサブデコーダと、メインデコーダに並列に設けられているとともに、メインデコーダからの指定に応じて、自己が処理すべき処理単位を復号化することによって得られたシンボルを復号結果として選択的に出力する第2のサブデコーダとを有する。   In the second invention, a code string encoded by the canonical Huffman method is a decoding target, and a plurality of symbols are obtained by repeatedly performing decoding processing for each processing unit of a predetermined code length constituting a part of the code string. Provided is a decoding system that outputs a sequence of arranged symbols. This decoding system refers to a determination table in which a code is described in association with each specific symbol set in advance based on the arrangement characteristics of the symbol sequence, and includes the code of the specific symbol in the current processing unit If it is determined that, a specific symbol corresponding to the code is output as a decoding result, and a main decoder that selectively designates a processing subject regarding a processing unit after this time, and a main decoder are provided in parallel, A plurality of processing units to be processed by the self are processed by the pipeline, and symbols obtained by decoding the processing units to be processed by the self are selectively selected as decoding results according to the designation from the main decoder. The first sub-decoder for output and the main decoder are provided in parallel and designated from the main decoder. Correspondingly, a second sub-decoder for selectively outputting the decoded result obtained symbol by decoding processing unit itself to be processed.

また、第2の発明において、第1のサブデコーダは、複数の異なる符号長のそれぞれに対応付けて先頭符号が記述されたベーステーブルと、ベーステーブルに記述された符号長毎の先頭符号と、処理単位の先頭符号とを比較することによって、処理単位に含まれる復号対象の符号長を特定する符号長特定処理を行う符号長特定部と、符号長特定部によって符号長が特定された復号対象を復号化する復号処理を行うことによって、復号対象に対応したシンボルを出力する復号処理部と、今回の処理単位に関する符号長特定処理の終了後で、かつ、復号処理の終了前に、次回の処理単位に関する符号長特定処理の開始を符号長特定部に指示する制御部とを有することが好ましい。   In the second invention, the first sub-decoder includes a base table in which a head code is described in association with each of a plurality of different code lengths, a head code for each code length described in the base table, A code length specifying unit that performs a code length specifying process for specifying a code length of a decoding target included in the processing unit by comparing the head code of the processing unit, and a decoding target whose code length is specified by the code length specifying unit The decoding processing unit that outputs a symbol corresponding to the decoding target and the code length specifying process for the current processing unit and the end of the decoding process It is preferable to include a control unit that instructs the code length specifying unit to start the code length specifying process related to the processing unit.

また、第2の発明において、符号列は、複数種のキャラクタシンボルと、同種のキャラクタシンボルの連続数を示すランシンボルとで構成されており、メインデコーダは、ランシンボルの直前にくるキャラクタシンボルを特定シンボルとして出力し、第1のサブデコーダは、今回の処理単位に特定シンボルが含まれておらず、かつ、前回の処理単位にも特定シンボルが含まれていない場合、今回の処理単位を復号化することによって得られたキャラクタシンボルを復号結果として出力し、第2のサブデコーダは、今回の処理単位に特定シンボルが含まれておらず、かつ、前回の処理単位に特定シンボルが含まれている場合、今回の処理単位を復号化することによって得られたランシンボルを復号結果として出力することが好ましい。   In the second invention, the code string includes a plurality of types of character symbols and a run symbol indicating the number of consecutive same type of character symbols, and the main decoder selects a character symbol immediately before the run symbol. The first sub-decoder decodes the current processing unit when the current processing unit does not include the specific symbol and the previous processing unit does not include the specific symbol. The second sub-decoder does not include the specific symbol in the current processing unit and includes the specific symbol in the previous processing unit. If it is, it is preferable to output a run symbol obtained by decoding the current processing unit as a decoding result.

また、第2の発明において、メインデコーダは、今回を含む連続した処理単位に特定シンボルの符号が所定の順序で含まれていると判定した場合、この符号に対応した特定シンボルを復号結果として出力するとともに、今回以降の処理単位に関する処理主体をさらに選択的に指定することが好ましい。   In the second invention, when the main decoder determines that the code of the specific symbol is included in a predetermined order in the continuous processing unit including the current time, the main decoder outputs the specific symbol corresponding to the code as a decoding result. In addition, it is preferable to selectively specify the processing subject relating to the processing unit from this time onward.

第1の発明によれば、処理単位に含まれる復号対象の符号長を特定する符号長特定処理を行う符号長特定部を設けている。そして、今回の処理単位に関する符号長特定処理の終了後で、かつ、復号処理の終了前に、次回の処理単位に関する符号長特定処理の開始を符号長特定部に指示する。これにより、今回の処理単位の復号処理の途中で、次回の処理単位の復号処理を開始するというパイプライン処理が実行される。このようなパイプライン処理は、カノニカルハフマン符号化固有の特性に依拠したものであり、これにより、復号処理の高速化を図ることができる。また、ハフマンデコーダ内に複数の予測値を保持するバッファが必要がないので、回路の大規模化を防ぐことができる。   According to the first aspect of the present invention, the code length specifying unit that performs the code length specifying process for specifying the code length of the decoding target included in the processing unit is provided. Then, after the end of the code length specifying process for the current processing unit and before the end of the decoding process, the code length specifying unit is instructed to start the code length specifying process for the next processing unit. As a result, a pipeline process of starting the decoding process of the next processing unit is executed in the middle of the decoding process of the current processing unit. Such pipeline processing relies on the characteristics peculiar to canonical Huffman coding, whereby the speed of decoding processing can be increased. Further, since there is no need for a buffer for holding a plurality of predicted values in the Huffman decoder, it is possible to prevent the circuit from being scaled up.

また、第2の発明によれば、シンボル列の配列的な特徴に基づき予め設定された特定シンボルのそれぞれに対応付けて符号が記述された判定テーブルを参照するメインデコーダを設けている。このメインデコーダは、今回の処理単位に特定シンボルの符号が含まれているか否かに応じて、今回以降の処理単位に関するサブデコーダを選択的に指定する。これにより、シンボル列の配列的な特徴に基づいたシンボル列においても、今回の処理単位の復号処理の途中で次回の処理単位の復号処理を開始できるので、復号処理の高速化を図ることができる。   According to the second aspect of the invention, the main decoder is provided that refers to the determination table in which the code is described in association with each of the specific symbols set in advance based on the arrangement characteristics of the symbol string. The main decoder selectively designates a sub-decoder related to the subsequent processing units depending on whether or not the code of the specific symbol is included in the current processing unit. As a result, the decoding process of the next processing unit can be started in the middle of the decoding process of the current processing unit even in the case of the symbol string based on the arrangement characteristics of the symbol sequence, so that the decoding process can be speeded up. .

(第1の実施形態)
図1は、本実施形態における復号化システムの構成図である。この復号化システムは、カノニカルハフマン方式によって符号化された符号列を復号対象とし、処理単位毎に復号処理を繰り返し行うことによって、複数のシンボルが並んだシンボル列を出力する。処理単位は、符号列の一部を構成する部分符号列であって、所定の符号長を有する。復号化システムは、バッファ1と、シフタ2と、演算デコーダ3とから構成されている。
(First embodiment)
FIG. 1 is a configuration diagram of a decoding system in the present embodiment. This decoding system uses a code string encoded by the canonical Huffman method as a decoding target, and outputs a symbol string in which a plurality of symbols are arranged by repeatedly performing the decoding process for each processing unit. The processing unit is a partial code string that constitutes a part of the code string, and has a predetermined code length. The decoding system includes a buffer 1, a shifter 2, and an arithmetic decoder 3.

バッファ1は、カノニカルハフマン方式によって符号化された符号列を記憶する。シフタ2は、演算デコーダ3の一部である制御部7からの指示に従い、バッファ1に記憶された符号列の一部をビットシフトさせ、入力符号として演算デコーダ3(具体的には、符号長特定部5およびテーブルアドレス生成部6c)への入力を行う。演算デコーダ3は、ベーステーブル管理部4と、符号長特定部5と、復号処理部6と、制御部7とから構成されている。   The buffer 1 stores a code string encoded by the canonical Huffman method. The shifter 2 bit-shifts a part of the code string stored in the buffer 1 in accordance with an instruction from the control unit 7 which is a part of the arithmetic decoder 3, and uses the arithmetic decoder 3 (specifically, the code length) as an input code. Input to the specifying unit 5 and the table address generating unit 6c) is performed. The arithmetic decoder 3 includes a base table management unit 4, a code length specifying unit 5, a decoding processing unit 6, and a control unit 7.

ベーステーブル管理部4は、複数の異なる符号長のそれぞれに対応付けて先頭符号が記述されたベーステーブルを管理している。符号長特定部5は、ベーステーブル管理部4に記述された符号長毎の先頭符号と、処理単位の先頭符号とを比較することによって、処理単位に含まれる復号対象の符号長を特定する符号長特定処理を行う。復号処理部6は、符号長特定部5によって符号長が特定された復号対象を復号化する復号処理を行うことによって、この復号対象に対応したシンボルを出力する。   The base table management unit 4 manages a base table in which a head code is described in association with each of a plurality of different code lengths. The code length specifying unit 5 compares the head code for each code length described in the base table management unit 4 with the head code of the processing unit, thereby specifying the code length of the decoding target included in the processing unit. A long identification process is performed. The decoding processing unit 6 outputs a symbol corresponding to the decoding target by performing a decoding process for decoding the decoding target whose code length is specified by the code length specifying unit 5.

復号処理部6は、オフセットテーブル管理部6aと、シンボルテーブル管理部6bと、アドレス生成部6cとから構成されている。オフセットテーブル管理部6aは、複数の異なる符号長のそれぞれに対応付けてオフセット値が記述されたオフセットテーブルを管理する。シンボルテーブル管理部6bは、アドレスのそれぞれに対応付けてシンボルが記述されたシンボルテーブルを管理する。アドレス生成部6cは、バッファ1から入力された復号対象の符号列の一部と、オフセットテーブル管理部6aから入力されたオフセット値とに基づいて、符号列の一部に対応するシンボルを出力する。   The decoding processing unit 6 includes an offset table management unit 6a, a symbol table management unit 6b, and an address generation unit 6c. The offset table management unit 6a manages an offset table in which an offset value is described in association with each of a plurality of different code lengths. The symbol table management unit 6b manages a symbol table in which symbols are described in association with each address. The address generation unit 6c outputs a symbol corresponding to a part of the code sequence based on a part of the code sequence to be decoded input from the buffer 1 and the offset value input from the offset table management unit 6a. .

なお、これらのテーブル(ベーステーブル、オフセットテーブル、シンボルテーブル)は、符号化時に生成された符号長情報に基づいて、復号化時に随時生成される。この符号長情報は、入力(符号化)されたシンボルと、そのシンボルに対応する符号長とで構成されている。具体的には、最小の符号長を示すシンボルに対して値”0”(例えば、符号長”1”の場合:符号”0”、符号長”2”の場合:符号”00”)を割り当て、以降、符号長が長い順に連続する符号を割り当てることで、テーブル(直接テーブル)が生成される。そして、このテーブルを正規化することで各テーブルが生成される。なお、各テーブルは、本実施形態のような別個の構成に限定されるものではなく、論理的にそれぞれが構成されていてもよく、また、物理的に同一のバッファ(図示せず)に記憶されていてもよい。   Note that these tables (base table, offset table, symbol table) are generated as needed during decoding based on the code length information generated during encoding. This code length information is composed of an input (encoded) symbol and a code length corresponding to the symbol. Specifically, the value “0” (for example, code length “1”: code “0”, code length “2”: code “00”) is assigned to the symbol indicating the minimum code length. Thereafter, a table (direct table) is generated by assigning consecutive codes in order of increasing code length. Each table is generated by normalizing this table. Each table is not limited to a separate configuration as in the present embodiment, and each table may be logically configured, and is stored in the physically same buffer (not shown). May be.

制御部7は、今回の処理単位に関する符号長特定処理の終了後で、かつ、復号処理の終了前に、次回の処理単位に関する符号長特定処理の開始を符号長特定部5に指示する。具体的には、制御部7が、符号長特定部5から符号長特定処理の終了を今回の処理単位の符号長とともに検知した場合、この符号長に基づいてシフタ2に対して次回の復号処理に関するシフト量を指示すると共に、符号長特定部5に対して、次回の処理単位に関する符号長特定処理の開始を指示する。これにより、ある処理単位の処理完了を以て次の処理単位の処理を開始するという逐次処理ではなく、ある処理単位の処理途中で次の処理単位の処理を開始するというパイプライン処理が実行されることになる。このようなパイプライン処理が可能な理由は、後述するが、カノニカルハフマン符号化固有の特性に依拠している。   The control unit 7 instructs the code length specifying unit 5 to start the code length specifying process for the next processing unit after the end of the code length specifying process for the current processing unit and before the end of the decoding process. Specifically, when the control unit 7 detects the end of the code length specifying process from the code length specifying unit 5 together with the code length of the current processing unit, the next decoding process for the shifter 2 based on the code length The code length specifying unit 5 is instructed to start the code length specifying process for the next processing unit. As a result, pipeline processing that starts processing of the next processing unit in the middle of processing of a certain processing unit is executed instead of sequential processing of starting processing of the next processing unit upon completion of processing of a certain processing unit. become. The reason why such pipeline processing is possible depends on the characteristics peculiar to canonical Huffman coding, which will be described later.

図2は、演算デコーダ3が備えるテーブルの構成図であり、同図(a)は、ベーステーブル管理部4が備えるベーステーブル、同図(b)は、オフセットテーブル管理部6aが備えるオフセットテーブル、図(c)は、シンボルテーブル管理部6bが備えるシンボルテーブルに関する。これらのテーブルを用いて、一例として、符号”1001・・”から1つのシンボルに復号するケースについて説明する。本実施形態における符号列の復号処理(いわゆる、演算デコード)は、シフト処理と、符号長特定処理と、テーブルアクセス処理とから構成されている。   FIG. 2 is a configuration diagram of a table provided in the arithmetic decoder 3. FIG. 2A is a base table provided in the base table management unit 4, and FIG. 2B is an offset table provided in the offset table management unit 6a. FIG. 7C relates to a symbol table provided in the symbol table management unit 6b. As an example, a case where the code “1001...” Is decoded into one symbol will be described using these tables. The code string decoding process (so-called arithmetic decoding) in the present embodiment includes a shift process, a code length specifying process, and a table access process.

(シフト処理)
シフト処理は、符号列の一部を入力符号として入力させる処理である。具体的には、制御部7は、バッファ1に記憶されている復号対象の符号列を所定ビット分だけビットシフト処理を行うように、シフタ2に対して指示する。シフタ2は、この指示に応じて、バッファ1のビットシフトを行う。符号長特定部5およびアドレス生成部6cには、シフト後のデータが入力符号として入力される。
(Shift processing)
The shift process is a process for inputting a part of the code string as an input code. Specifically, the control unit 7 instructs the shifter 2 to perform a bit shift process on the decoding target code string stored in the buffer 1 by a predetermined number of bits. The shifter 2 performs bit shift of the buffer 1 in response to this instruction. The shifted data is input as an input code to the code length specifying unit 5 and the address generating unit 6c.

本ケースの場合、シフタ2がバッファ1に対してシフト処理を行うことで、バッファ1に記憶されている4ビットの符号列”1001”が入力符号として符号長特定部5へ読み込まれる。なお、ここで読み込まれるビット長は、入力符号の最大符号長、つまり、1回の復号化で出力されるシンボルに対応する最大の符号長を見越した上で予め設定されている。なぜなら、入力される演算デコーダ3に入力される符号は、当初その符号長が不明であり、シンボルと復号し得る範囲のビット全体を、符号長特定部5が把握しなければならないからである。   In this case, the shifter 2 shifts the buffer 1 so that the 4-bit code string “1001” stored in the buffer 1 is read into the code length specifying unit 5 as an input code. The bit length read here is set in advance in consideration of the maximum code length of the input code, that is, the maximum code length corresponding to the symbol output by one decoding. This is because the code length of the code input to the input operation decoder 3 is initially unknown, and the code length specifying unit 5 must grasp the entire bit within the range that can be decoded with the symbol.

(符号長特定処理)
符号長特定処理は、入力された符号のうち、どこからが別の符号列(すなわち、次回の復号処理において用いられる符号列)なのかを符号長ベースで特定する処理である。具体的には、ベーステーブル管理部4のベーステーブル(図2(a))を用いて、今回の復号対象となる入力符号の符号長が特定される。本ケースにおいて、符号長特定部5は、今回の入力符号”1001”をバッファ1から読み込み、入力符号”1001”が、どの程度の符号長を有するのかを特定する。符号長の特定には、入力符号の先頭符号”1001”と、ベーステーブルに記憶された先頭符号との比較を用いる。ベーステーブルの参照のみで符号長を特定できる理由は、カノニカルハフマン符号化による符号列が、以下の原則を備えているからである。

(1)符号長が、通常のハフマンアルゴリズムで決定されるのと同じ。
(2)短い符号列の値は、長い符号列の値より小さい。
(3)符号長が同じである場合、値は連続する。
(Code length identification process)
The code length specifying process is a process of specifying, based on the code length, where an input code is from another code string (that is, a code string used in the next decoding process). Specifically, the code length of the input code to be decoded this time is specified using the base table of the base table management unit 4 (FIG. 2A). In this case, the code length specifying unit 5 reads the current input code “1001” from the buffer 1 and specifies the code length of the input code “1001”. In order to specify the code length, a comparison between the head code “1001” of the input code and the head code stored in the base table is used. The reason why the code length can be specified only by referring to the base table is that a code string by canonical Huffman coding has the following principle.

(1) The code length is the same as that determined by the normal Huffman algorithm.
(2) The value of the short code string is smaller than the value of the long code string.
(3) If the code lengths are the same, the values are continuous.

入力符号の上位各ビットの値が、この符号長(ビット数)に対応する先頭符号の値よりも大きければ、この入力符号の符号長がこの先頭符号に対応する符号長以上であることが保証される。本ケースの場合、両者の比較は、以下のようなプロセスになる。

10(入力符号の先頭2ビット)>00(符号長2の先頭符号)
100(入力符号の先頭2ビット)>010(符号長3の先頭符号)
1001(入力符号の先頭2ビット)<1110(符号長4の先頭符号)
If the value of each upper bit of the input code is larger than the value of the head code corresponding to this code length (number of bits), it is guaranteed that the code length of this input code is greater than or equal to the code length corresponding to this head code. Is done. In this case, the comparison between the two is as follows.

10 (first two bits of input code)> 00 (first code of code length 2)
100 (first two bits of input code)> 010 (first code of code length 3)
1001 (first two bits of input code) <1110 (first code of code length 4)

上記プロセスにより、符号長は”3”以上で”4”未満であることから、符号長が”3”と特定される。なお、この特定と同時に入力符号の下位1ビットの”1”は、次回の復号処理で用いると判断される。特定された符号長”3”は、復号処理部6(オフセットテーブル管理部6a)および制御部7へ入力される。符号長特定部5は、入力符号の符号長の出力を以て、この入力符号に関して必要な処理が終了する。したがって、この時点で、新たな(次回の)入力符号の受け付けが可能になる点に留意されたい。   According to the above process, since the code length is “3” or more and less than “4”, the code length is specified as “3”. At the same time as this specification, it is determined that “1” of the lower 1 bit of the input code is used in the next decoding process. The identified code length “3” is input to the decoding processing unit 6 (offset table management unit 6a) and the control unit 7. The code length specifying unit 5 ends the necessary processing for the input code by outputting the code length of the input code. Therefore, it should be noted that a new (next) input code can be accepted at this point.

(テーブルアクセス処理)
テーブルアクセス処理は、上述の符号化特定処理によって特定された符号長を主として入力符号に対応するシンボルを出力する処理である。まず、オフセットテーブル管理部6aが、オフセットテーブル(図2(b))を参照して、符号長特定部5から入力された符号長に対応するオフセットアドレスを特定する。本ケースの場合、入力される符号長が”3”なので、これに対応するオフセットアドレスとして”1”が特定される。特定されたオフセットアドレス”1”は、符号長”3”と共にテーブルアドレス生成部6cへ入力される。
(Table access processing)
The table access process is a process for outputting a symbol that mainly corresponds to the input code with the code length specified by the above-described encoding specifying process. First, the offset table management unit 6a specifies an offset address corresponding to the code length input from the code length specifying unit 5 with reference to the offset table (FIG. 2B). In this case, since the input code length is “3”, “1” is specified as the corresponding offset address. The specified offset address “1” is input to the table address generation unit 6 c together with the code length “3”.

つぎに、テーブルアドレス生成部6cは、入力符号と、オフセットテーブル管理部6aから入力されるオフセットアドレスおよび符号長と、ベーステーブルに記憶された先頭符号とに基づいて、シンボルテーブル(図2(c))に対応したアドレスを算出する。具体的には、入力符号と、符号長に対応する先頭符号との差分(オフセットアドレスからの変位)が算出され、この差分とオフセットアドレスとを加算することによって、シンボルテーブルのアドレスが算出される。本ケースの場合、入力符号”100”と、符号長”3”に対応する先頭符号”010”との差分である値”2”が算出され、この差分値”2”とオフセットアドレス”1”との加算によって、アドレス”3”が算出される。この算出されたアドレス”3”は、シンボルテーブル管理部6bへ入力される。   Next, the table address generator 6c generates a symbol table (FIG. 2 (c) based on the input code, the offset address and code length input from the offset table manager 6a, and the head code stored in the base table. )) Is calculated. Specifically, the difference (displacement from the offset address) between the input code and the head code corresponding to the code length is calculated, and the symbol table address is calculated by adding the difference and the offset address. . In this case, a value “2” that is a difference between the input code “100” and the head code “010” corresponding to the code length “3” is calculated, and the difference value “2” and the offset address “1” are calculated. Is added to calculate address “3”. The calculated address “3” is input to the symbol table management unit 6b.

そして、シンボルテーブル管理部6bは、シンボルテーブルを参照して、今回の復号対象となる符号のシンボルを特定・出力する。本ケースの場合、入力されるアドレスが”3”なので、これに対応するシンボル”C”が特定される。特定されたシンボル”C”は、今回の入力符号”100”に対応するシンボルとして出力される。   Then, the symbol table management unit 6b refers to the symbol table and specifies / outputs the symbol of the code to be decoded this time. In this case, since the input address is “3”, the corresponding symbol “C” is specified. The identified symbol “C” is output as a symbol corresponding to the current input code “100”.

今回の処理単位に関する上述したテーブルアクセス処理と並行して、次回の処理単位に関するシフト処理が行われる。具体的には、符号長特定部5からの符号長の入力に基づいて、制御部7は、今回の処理単位で復号化されなかった下位ビットを、次回の処理単位の符号として、再度、符号長特定部5および復号処理部6に出力する。本ケースの場合、符号長”3”が制御部7に入力され、今回のシフト処理で入力した下位1ビット”1”を含む符号4ビットが次回の処理単位の符号として、バッファ1から符号長特定部5および復号処理部6に新たに入力される。   In parallel with the above-described table access processing relating to the current processing unit, shift processing relating to the next processing unit is performed. Specifically, based on the input of the code length from the code length specifying unit 5, the control unit 7 again uses the lower bits that have not been decoded in the current processing unit as the code of the next processing unit, The data is output to the length specifying unit 5 and the decoding processing unit 6. In this case, the code length “3” is input to the control unit 7, and the code 4 bits including the lower 1 bit “1” input in the current shift processing is the code length from the buffer 1 as the code of the next processing unit. The data is newly input to the specifying unit 5 and the decoding processing unit 6.

なお、下位ビット”1”含む符号が次回の処理単位の符号としてバッファ1から符号長特定部5および復号処理部6に新たに入力されるが、これに代えて、復号化システム内に予め保持しておき、これを次回の符号にマージして復号処理を行ってもよい。例えば、下位ビット”1”を符号長特定部5および復号処理部6内にそのまま保持しておく場合、バッファ1からこの下位ビット”1”に続く3ビットを符号長特定部5および復号処理部6に入力すれば足りる。   The code including the lower bit “1” is newly input from the buffer 1 to the code length specifying unit 5 and the decoding processing unit 6 as the code of the next processing unit. Instead, this code is stored in advance in the decoding system. In addition, the decoding process may be performed by merging this with the next code. For example, when the lower bit “1” is held in the code length specifying unit 5 and the decoding processing unit 6 as it is, the 3 bits following the lower bit “1” from the buffer 1 are converted into the code length specifying unit 5 and the decoding processing unit. Entering 6 is sufficient.

図3は、復号処理の説明図である。この説明図は、演算デコーダ3が行う複数の符号に対する、それぞれの復号処理の処理順序を示すタイムチャートである。また、この説明図は、横軸を時間軸、縦軸をシンボルに対応する符号とし、連続する3つの符号(1つの符号に対して1つのシンボルが対応する)が、順次、復号処理される時間的な処理時間を示している。同一の符号に対して、上述した一連の処理(シフト処理、符号長特定処理、テーブルアクセス処理)が順次実行される。本ケースでは、期間t0〜t1でシフト処理(図中の無地)および符号長特定処理(図中の斜線)が期間t0〜t1において行われ、これに続く期間t1〜t3でテーブルアクセス処理(図中の網掛)が行われるものとする。   FIG. 3 is an explanatory diagram of the decoding process. This explanatory diagram is a time chart showing the processing order of each decoding process for a plurality of codes performed by the arithmetic decoder 3. In this explanatory diagram, the horizontal axis is a time axis and the vertical axis is a code corresponding to a symbol, and three consecutive codes (one symbol corresponds to one code) are sequentially decoded. It shows the processing time in time. For the same code, the above-described series of processing (shift processing, code length specifying processing, table access processing) is sequentially executed. In this case, a shift process (plain color in the figure) and a code length specifying process (shaded line in the figure) are performed in the period t0 to t1 in the period t0 to t1, and the table access process (see FIG. (Shaded inside) shall be performed.

まず、期間t0において、符号1に対するシフト処理が行われ、続いて符号長特定処理が行われる。この符号長特定処理により、符号1に本来の(1シンボルに対応する)符号長が特定されると、期間t1において、今回(符号1)の復号処理(テーブルアクセス処理)と、次回(符号2)の復号処理(シフト処理・符号長特定処理)とが並行して開始される。このとき、テーブルアクセス処理と、シフト処理および符号長特定処理とは、互いに独立に処理されるので、連続した複数の処理単位を対象にした処理がパイプライン的に、換言すれば、同時並行的に処理される。   First, in a period t0, a shift process for code 1 is performed, and then a code length specifying process is performed. When the original code length (corresponding to one symbol) is specified for code 1 by this code length specifying process, this time (code 1) decoding process (table access process) and next time (code 2) are specified in period t1. ) Decoding process (shift process / code length specifying process) is started in parallel. At this time, the table access process, the shift process, and the code length specifying process are performed independently of each other, so that the process for a plurality of continuous processing units is performed in a pipeline manner, that is, simultaneously in parallel. To be processed.

そして、期間t2において、今回(符号2)の復号処理(テーブルアクセス処理)と、次回(符号3)の復号処理(シフト処理・符号長特定処理)とが並行して開始される。さらに、これらの処理と並行して、符号1の復号処理が行われる。このとき、3つのテーブル(ベーステーブル・オフセットテーブル・シンボルテーブル)の内容は、復号処理時においても不変であり、異なる符号列の復号時においても、同一テーブルに対して異なる複数の入力符号を対象にしたアクセスを受け付けることが可能である。そのため、複数のテーブルアクセス処理の並行処理ができる。   Then, in the period t2, the current decoding process (reference 2) (table access process) and the next decoding process (reference 3) (shift process / code length identification process) are started in parallel. Further, in parallel with these processes, a decoding process of code 1 is performed. At this time, the contents of the three tables (the base table, the offset table, and the symbol table) are unchanged even during the decoding process, and even when different code sequences are decoded, a plurality of different input codes are targeted for the same table. Can be accepted. Therefore, a plurality of table access processes can be processed in parallel.

期間t2〜t3の後半で符号1の復号処理が、期間t3〜t4の後半で符号2の復号処理が、そして、期間t4〜t5の後半で符号3の復号処理がそれぞれ終了し、復号処理によって得られたシンボルが連続して出力される。   The decoding process of code 1 is completed in the second half of the period t2 to t3, the decoding process of code 2 is completed in the second half of the period t3 to t4, and the decoding process of code 3 is completed in the second half of the period t4 to t5. The obtained symbols are output continuously.

本実施形態によれば、符号長特定処理(およびシフト処理)とテーブルアクセス処理とは互いに独立しているため、ベーステーブルを用いた入力符号の符号長の特定を早期に行うことができ、これにより、処理のパイプライン化が可能になる。また、各テーブルの内容は復号処理時においても不変なので、異なる符号列の復号時においても同一テーブルに対して複数のアクセスを受け付けることが可能になるので、複数のテーブルアクセス処理の並行処理が可能である。これより、符号列全体の処理の高速化を図ることができる。   According to the present embodiment, since the code length specifying process (and the shift process) and the table access process are independent of each other, the code length of the input code using the base table can be specified at an early stage. As a result, processing can be pipelined. In addition, since the contents of each table remain unchanged even during decoding processing, it is possible to accept multiple accesses to the same table even during decoding of different code strings, so multiple table access processing can be performed in parallel. It is. As a result, the processing speed of the entire code string can be increased.

また、本実施形態によれば、復号化システム内に、次回に入力しえる符号列を保持しておく必要がないため、復号化システム全体の回路の大規模化を抑制することができる。   Further, according to the present embodiment, since it is not necessary to hold a code string that can be input next time in the decoding system, it is possible to suppress an increase in circuit scale of the entire decoding system.

(第2の実施形態)
図4は、本実施形態における復号化システムの構成図である。第1の実施形態の復号化システムと同様に、カノニカルハフマン方式によって符号化された符号列を復号対象とし、複数のシンボルが並んだシンボル列が出力される。ただし、本実施形態の復号対象は、配列に特徴のあるシンボル列、具体的には、特定のキャラクタシンボルの直後に、別種類のシンボルを含み、かつ、この特定のキャラクタシンボルが予め判明しているシンボル列である。例えば、シンボル”a”の特定のキャラクタシンボル(特定シンボル)と、その直後の別種類のキャラクタシンボル(ランシンボル)とを含むシンボル列”a,4”の如くである。なお、このシンボル列の基礎となるシンボル列は、”a,a,a,a”である。
(Second Embodiment)
FIG. 4 is a configuration diagram of the decoding system in the present embodiment. Similar to the decoding system of the first embodiment, a code string encoded by the canonical Huffman method is to be decoded, and a symbol string in which a plurality of symbols are arranged is output. However, the decoding target of the present embodiment includes a symbol string having an arrangement characteristic, specifically, another type of symbol immediately after a specific character symbol, and the specific character symbol has been previously determined. This is a symbol string. For example, the symbol string “a, 4” includes a specific character symbol (specific symbol) of the symbol “a” and another type of character symbol (run symbol) immediately after the specific character symbol. Note that the symbol sequence that is the basis of this symbol sequence is “a, a, a, a”.

復号化システムは、バッファ1と、シフタ2と、メインデコーダ8と、2つのサブデコーダ(9a,9b)とから構成されている。バッファ1は、上述した第1の実施形態のバッファと同様に、カノニカルハフマン方式によって符号化された符号列を記憶する。シフタ2は、第1の実施形態のそれと同様に、バッファ1に対してシフト処理を行うが、シフト処理自体の指示はメインデコーダ8と、第1および第2のサブデコーダ(9a,9b)とによって行われる点が異なる。シフトされたビット(符号)は、これらのデコーダ(8,9a,9b)へ入力される。   The decoding system includes a buffer 1, a shifter 2, a main decoder 8, and two sub decoders (9a, 9b). The buffer 1 stores a code string encoded by the canonical Huffman method, similarly to the buffer of the first embodiment described above. The shifter 2 performs a shift process on the buffer 1 as in the first embodiment, but the instruction of the shift process itself is the main decoder 8 and the first and second sub-decoders (9a, 9b). The point that is done depends on. The shifted bit (sign) is input to these decoders (8, 9a, 9b).

メインデコーダ8は、入力された符号のうち特定シンボルに対応する符号を復号化する。メインデコーダ8は、判定テーブル管理部8aと、復号化部8bと、制御部8cとから構成されている。判定テーブル管理部8aは、シンボル列の配列的な特徴に基づいて、予め設定された特定シンボルのそれぞれに対応付けて符号が記憶された判定テーブルを有する。復号化部8bは、この判定テーブル管理部8aの判定テーブルを参照して、入力符号に対応した特定シンボルを復号結果として出力する。制御部8cは、今回の処理単位の符号列に特定シンボルの符号が含まれていると判定した場合、今回以降の処理単位に関する処理主体を選択的に指定する。   The main decoder 8 decodes a code corresponding to a specific symbol among the input codes. The main decoder 8 includes a determination table management unit 8a, a decoding unit 8b, and a control unit 8c. The determination table management unit 8a has a determination table in which a code is stored in association with each preset specific symbol based on the arrangement characteristics of the symbol string. The decoding unit 8b refers to the determination table of the determination table management unit 8a and outputs a specific symbol corresponding to the input code as a decoding result. If the control unit 8c determines that the code string of the current processing unit includes the code of the specific symbol, the control unit 8c selectively designates the processing subject relating to the subsequent processing units.

第1のサブデコーダ9aは、メインデコーダ8に並列に設けられている。このサブデコーダ9aは、自己が処理すべき複数の処理単位をパイプライン処理するとともに、メインデコーダ8(制御部8c)からの指定に応じて、自己が処理すべき処理単位を復号化することによって得られたシンボルを復号結果として選択的に出力する。第1のサブデコーダ9aの構成および動作は、第1の実施形態における演算デコーダ3のそれと同様に、複数のテーブルを参照して符号を復号化する。なお、本実施形態における第1のサブデコーダ9aが有する各テーブルの記憶内容は、第1の実施形態における演算デコーダ3のそれと同様である。   The first sub-decoder 9a is provided in parallel with the main decoder 8. The sub-decoder 9a pipelines a plurality of processing units to be processed by itself and decodes the processing units to be processed by the sub-decoder 9a according to the designation from the main decoder 8 (control unit 8c). The obtained symbol is selectively output as a decoding result. The configuration and operation of the first sub-decoder 9a is similar to that of the arithmetic decoder 3 in the first embodiment, and codes are decoded with reference to a plurality of tables. Note that the storage contents of each table of the first sub-decoder 9a in the present embodiment are the same as those of the arithmetic decoder 3 in the first embodiment.

第2のサブデコーダ9bは、第1のサブデコーダ9aと同様に、メインデコーダ8に並列に設けられている。また、メインデコーダ8(制御部8c)からの指定に応じて、自己が処理すべき処理単位を復号化することによって得られたシンボルを復号結果として選択的に出力する。第2のサブデコーダ9bの構成および動作は、第1の実施形態における演算デコーダ3および、第1のサブデコーダ9aのそれと同様に、複数のテーブルを参照して符号を復号化する。なお、本実施形態における第2のサブデコーダ9bが有する各テーブルに記憶された内容は、第1の実施形態における演算デコーダ3のそれと異なっている。   The second sub-decoder 9b is provided in parallel with the main decoder 8 in the same manner as the first sub-decoder 9a. Further, according to the designation from the main decoder 8 (control unit 8c), a symbol obtained by decoding a processing unit to be processed by itself is selectively output as a decoding result. The configuration and operation of the second sub-decoder 9b is similar to that of the arithmetic decoder 3 and the first sub-decoder 9a in the first embodiment, and codes are decoded with reference to a plurality of tables. Note that the content stored in each table of the second sub-decoder 9b in the present embodiment is different from that of the arithmetic decoder 3 in the first embodiment.

図5は、判定テーブル管理部8aの判定テーブルの構成図である。この判定テーブルは、符号と、この符号に対応するシンボルおよび符号長とがそれぞれ対応付けて記憶されている。同図の判定テーブルは、第1の実施形態のキャラクタシンボル(シンボル”A”〜”F”で構成されたシンボル列を符号化した場合)に、ランシンボル(シンボル”2”〜”4”)を加えたシンボルのうち、特定シンボルをシンボル”F”,”H”および”4”とした場合の記憶内容である。   FIG. 5 is a configuration diagram of a determination table of the determination table management unit 8a. In this determination table, a code, a symbol corresponding to the code, and a code length are stored in association with each other. The determination table shown in FIG. 6 includes run symbols (symbols “2” to “4”) for the character symbols of the first embodiment (when a symbol string composed of symbols “A” to “F” is encoded). Among the symbols with the symbol added, the stored contents are given when the specific symbols are symbols “F”, “H” and “4”.

同図(a)は、第1のサブデコーダ9aと並行して復号処理する場合における判定テーブルの構成図である。このテーブルに記述されている符号は全て最大符号長からなるビット列で構成されており、例えば、最大符号長が4の場合、記述される符号は全て4ビットで構成される。これは、バッファ1から入力される4ビットの符号を入力としたテーブル(判定テーブル)参照のみで、これに対応するシンボルを直接的に算出するためである。また、同図(b)は、第2のサブデコーダ9bと並行して復号処理する場合における判定テーブルの構成図である。符号は、同図(a)と同様に、最大符号長からなるビット列で構成されているが、第2のサブデコーダと並行して復号化処理する場合に、入力し得る(ランシンボルに対応し得る)符号の最大符号長は2であるため、記憶される符号は2ビットで構成される。なお、本実施形態における特定シンボルには、復号処理の終了を示す終了シンボル(例えば、シンボル列の最後のシンボル)も含まれており、復号対象には、終了シンボルを符号化した符号も含まれる(本実施形態では、シンボル”H”およびシンボル”4”を終了シンボルとする)。   FIG. 10A is a configuration diagram of a determination table in the case where decoding processing is performed in parallel with the first sub-decoder 9a. The codes described in this table are all composed of a bit string consisting of the maximum code length. For example, when the maximum code length is 4, the codes described are all composed of 4 bits. This is because a symbol corresponding to this is directly calculated only by referring to a table (determination table) using a 4-bit code input from the buffer 1 as an input. FIG. 6B is a configuration diagram of a determination table when decoding processing is performed in parallel with the second sub-decoder 9b. The code is composed of a bit string consisting of the maximum code length as in FIG. 5A, but can be input when decoding in parallel with the second sub-decoder (corresponding to the run symbol). Since the maximum code length of the code is 2, the stored code consists of 2 bits. Note that the specific symbol in the present embodiment also includes an end symbol indicating the end of the decoding process (for example, the last symbol in the symbol string), and the decoding target includes a code obtained by encoding the end symbol. (In this embodiment, symbol “H” and symbol “4” are end symbols).

この判定テーブルを用いた具体例として、入力符号”0001”からシンボルを復号化するケースについて説明する。なお、符号列の復号処理は、第1の実施形態で複数のテーブルを用いて復号化する演算デコードに対して、直接デコードという。直接デコードは、シフト処理と、テーブルアクセス処理とから構成される。また、この直前のシンボルは、特定シンボルでなかったものとする。   As a specific example using this determination table, a case where a symbol is decoded from an input code “0001” will be described. Note that the decoding process of the code string is referred to as direct decoding with respect to arithmetic decoding in which decoding is performed using a plurality of tables in the first embodiment. Direct decoding is composed of shift processing and table access processing. Further, it is assumed that the immediately preceding symbol is not a specific symbol.

(シフト処理)
メインデコーダ8が行うシフト処理は、第1の実施形態とシフト処理と同様に、符号列の一部を入力符号として入力させる処理である。しかしながら、その具体的な制御は、第1の実施形態のそれと異なっている。まず制御部8cと、第1および第2のサブデコーダに内蔵された制御部(図示せず)とが、シフタ2に対してバッファ1にビットシフト処理の指示を行う。そして、シフタ2が、この指示にしたがってバッファ1をビットシフトさせ、入力符号をメインデコーダ8(復号化部8b)と、第1および第2のサブデコーダ(9a,9b)に入力させる。本ケースの場合、シフタ2がバッファ1に対してシフト処理を行うことで、4ビットの符号列”0001”が入力符号として各デコーダに読み込まれる。
(Shift processing)
The shift process performed by the main decoder 8 is a process of inputting a part of the code string as an input code, similarly to the shift process in the first embodiment. However, the specific control is different from that of the first embodiment. First, the control unit 8c and the control unit (not shown) built in the first and second sub-decoders instruct the shifter 2 to the buffer 1 for bit shift processing. Then, the shifter 2 bit-shifts the buffer 1 according to this instruction, and inputs the input code to the main decoder 8 (decoding unit 8b) and the first and second sub-decoders (9a, 9b). In this case, the shifter 2 shifts the buffer 1 so that a 4-bit code string “0001” is read as an input code into each decoder.

(テーブルアクセス処理)
メインデコーダ8が行うテーブルアクセス処理は、上述のシフト処理によって入力された入力符号から直接シンボルを出力する処理である。具体的には、復号化部8bは、入力符号と、判定テーブル管理部8aから入力される判定テーブルの情報(符号・符号長・シンボル)とに基づいて、シンボルと符号長と出力する。そして、入力符号と同じ符号を有する符号に対応するシンボルが出力されるとともに、この符号に対応する符号長も出力される。本ケースの場合、入力符号”0001”はシンボル”F”に対応するので、シンボル”F”が出力シンボルとして出力されるとともに、このシンボル”F”に対応する符号長”2”も出力される。これらのデータを受けた制御部8cは、この符号長”2”に基づいて、次回に各デコーダ(8,9a,9b)へ入力させるシフト量を制御する。
(Table access processing)
The table access process performed by the main decoder 8 is a process of directly outputting a symbol from the input code input by the shift process described above. Specifically, the decoding unit 8b outputs a symbol and a code length based on the input code and information (code / code length / symbol) of the determination table input from the determination table management unit 8a. Then, a symbol corresponding to a code having the same code as the input code is output, and a code length corresponding to this code is also output. In this case, since the input code “0001” corresponds to the symbol “F”, the symbol “F” is output as an output symbol, and the code length “2” corresponding to the symbol “F” is also output. . Receiving these data, the control unit 8c controls the shift amount to be input to each decoder (8, 9a, 9b) next time based on this code length “2”.

図6は、第2のサブデコーダ9bの各テーブルの構成図である。第2のサブデコーダが有するテーブルの種類は、第1の実施形態におけるテーブルのそれと同様であるが、記述されている内容が異なる。具体的には、この記述内容には、シンボル列における特定シンボルに対する(直後に続く)ランシンボルを示すシンボル(数字)が含まている。同図(a)は、ベーステーブルの構成図、同図(b)は、オフセットテーブルの構成図、同図(c)は、シンボルテーブルの構成図である。ここで留意すべきは、通常の(キャラクタ)シンボルとは別のテーブルを用いてランシンボルが符号化されているために、使用するテーブルのサイズが小さくて済むという点である。本実施形態では、同図(a)のベーステーブルによると、符号長1〜2で構成されている。   FIG. 6 is a configuration diagram of each table of the second sub-decoder 9b. The table type of the second sub-decoder is the same as that of the table in the first embodiment, but the described contents are different. Specifically, this description includes a symbol (number) indicating a run symbol (following immediately after) for a specific symbol in the symbol string. FIG. 4A is a configuration diagram of a base table, FIG. 4B is a configuration diagram of an offset table, and FIG. 4C is a configuration diagram of a symbol table. It should be noted here that the run symbol is encoded using a table different from a normal (character) symbol, so that the size of the table to be used can be reduced. In the present embodiment, according to the base table of FIG.

図7は、復号処理のフローチャートである。まず、ステップ1において、今回の処理単位となる符号が入力される。具体的には、シフタ2によって、バッファ1に格納された符号列の一部が入力符号として、メインデコーダ8および第1のサブデコーダ9aに入力される。続くステップ2において、メインデコーダ8および第1のサブデコーダ9aは、この入力符号を復号処理する。   FIG. 7 is a flowchart of the decoding process. First, in step 1, a code as a current processing unit is input. Specifically, the shifter 2 inputs a part of the code string stored in the buffer 1 as an input code to the main decoder 8 and the first sub-decoder 9a. In the subsequent step 2, the main decoder 8 and the first sub-decoder 9a decode this input code.

ステップ3において、メインデコーダ8は、ステップ2で復号処理する入力符号から特定シンボルを出力したか否かを判定する。具体的には、制御部8cは、復号化部8bから特定シンボル(復号化の終了を示すシンボル)を出力したか否か、つまり、次回の入力される入力符号がランシンボルまたは終了シンボルであるか否かを検出する。特定シンボルが検出された場合、処理をステップ4へ進め、一方、特定シンボルが検出されなかった場合、処理をステップ1へ戻す。   In step 3, the main decoder 8 determines whether or not a specific symbol is output from the input code to be decoded in step 2. Specifically, the control unit 8c determines whether or not a specific symbol (a symbol indicating the end of decoding) is output from the decoding unit 8b, that is, the next input code to be input is a run symbol or an end symbol. Detect whether or not. If a specific symbol is detected, the process proceeds to step 4. On the other hand, if a specific symbol is not detected, the process returns to step 1.

ステップ4において、ステップ3において出力された特定シンボルが終了シンボルであるか否かが判定される。具体的には、制御部8cは、特定シンボルは終了シンボルであるか否か、つまり、次回の復号処理を終了するか否かを検出する。特定シンボルが終了シンボルでない場合、処理をステップ5へ進め、終了シンボルである場合、復号処理を終了する。   In step 4, it is determined whether or not the specific symbol output in step 3 is an end symbol. Specifically, the control unit 8c detects whether or not the specific symbol is an end symbol, that is, whether or not to end the next decoding process. If the specific symbol is not an end symbol, the process proceeds to step 5. If the specific symbol is an end symbol, the decoding process ends.

ステップ5において、第1のサブデコーダ9aは、ステップ2で入力された入力符号に対する復号処理を中止する。具体的には、制御部8cは、第1のサブデコーダ9aに対して、ステップ2で入力された入力符号の復号処理を中止する旨を指示する。第1のサブデコーダ9aは、この指示に応じて、復号処理を中止する。その際、制御部8cは、シフタ2に対して、復号化部8bがシンボルと共に生成した符号長に基づいて、新たな符号を入力させる(シフト処理を行う)旨を指示する。   In step 5, the first sub-decoder 9a stops the decoding process for the input code input in step 2. Specifically, the control unit 8c instructs the first sub-decoder 9a to stop the decoding process of the input code input in step 2. In response to this instruction, the first sub-decoder 9a stops the decoding process. At that time, the control unit 8c instructs the shifter 2 to input a new code (perform shift processing) based on the code length generated together with the symbol by the decoding unit 8b.

つぎに、ステップ6において、ステップ1の入力符号の直後に続く符号である新たな符号が入力される。具体的には、シフタ2によって、バッファ1に格納された符号列の一部が新たな入力符号として、メインデコーダ8および第2のサブデコーダ9bに入力される。続くステップ7において、メインデコーダ8および第2のサブデコーダ9bは、この新たな入力符号を復号処理する。   Next, in step 6, a new code that is a code immediately following the input code in step 1 is input. Specifically, the shifter 2 inputs a part of the code string stored in the buffer 1 as a new input code to the main decoder 8 and the second sub-decoder 9b. In the subsequent step 7, the main decoder 8 and the second sub-decoder 9b decode the new input code.

ステップ8において、メインデコーダ8は、ステップ7で復号処理する新たな入力符号から特定シンボルを出力したか否かを判定する。具体的には、制御部8cは、復号化部8bから特定シンボルを出力したか否か、つまり、次回の入力される入力符号がランシンボルまたは終了シンボルであるか否かを検出する。特定シンボルが検出された場合、処理をステップ9へ進め、一方、特定シンボルが検出されなかった場合、処理をステップ1へ戻す。   In step 8, the main decoder 8 determines whether or not a specific symbol is output from the new input code to be decoded in step 7. Specifically, the control unit 8c detects whether or not a specific symbol is output from the decoding unit 8b, that is, whether or not the next input code to be input is a run symbol or an end symbol. If a specific symbol is detected, the process proceeds to step 9. On the other hand, if a specific symbol is not detected, the process returns to step 1.

ステップ9において、ステップ8において出力された特定シンボルが終了シンボルであるか否かが判定される。具体的には、制御部8cは、特定シンボルは終了シンボルであるか否か、つまり、次回の復号処理を終了するか否かを検出する。特定シンボルが終了シンボルでない場合、処理をステップ10へ進め、終了シンボルである場合、復号処理を終了する。   In step 9, it is determined whether or not the specific symbol output in step 8 is an end symbol. Specifically, the control unit 8c detects whether or not the specific symbol is an end symbol, that is, whether or not to end the next decoding process. If the specific symbol is not an end symbol, the process proceeds to step 10. If the specific symbol is an end symbol, the decoding process ends.

ステップ10において、第2のサブデコーダ9bは、ステップ6で入力された新たな入力符号に対する復号処理を中止する。具体的には、制御部8cは、第2のサブデコーダ9bに対して、ステップ6で入力された入力符号の復号処理を中止する旨を指示する。第2のサブデコーダ9bは、この指示に応じて、復号処理を中止する。その際、制御部8cは、復号化部8bがシンボルと共に生成した符号長に基づいて、シフタ2に対して新たな符号を入力させる旨を指示する。本実施形態のシンボル列において、特定シンボル(ランシンボル)の次に出現する特定シンボルは、終了シンボルのみである(ランシンボルは連続しない)からであり、ステップ9にて終了シンボルを検出しなかった場合の次のシンボルは、通常の(キャラクタ)シンボルであるからである。   In step 10, the second sub-decoder 9b stops the decoding process for the new input code input in step 6. Specifically, the control unit 8c instructs the second sub-decoder 9b to stop the decoding process of the input code input in step 6. In response to this instruction, the second sub-decoder 9b stops the decoding process. At that time, the control unit 8c instructs the shifter 2 to input a new code based on the code length generated together with the symbol by the decoding unit 8b. This is because the specific symbol that appears after the specific symbol (run symbol) in the symbol string of this embodiment is only the end symbol (the run symbols are not continuous), and the end symbol was not detected in step 9. This is because the next symbol in the case is a normal (character) symbol.

なお、ステップ1およびステップ6において、入力される入力符号は、ステップ1では第2のサブデコーダ9b、ステップ6では第1のサブデコーダ9aにも入力されていてもよい。ただし、その場合、それぞれのサブデコーダ9a,9bは、自己が処理すべき処理単位を復号化することによって得られたシンボルを復号結果として出力するため、正しい復号結果は得られない。したがって、これらの復号結果は破棄または削除される。   In step 1 and step 6, the input code input may be input to the second sub-decoder 9 b in step 1 and also to the first sub-decoder 9 a in step 6. However, in this case, each sub-decoder 9a, 9b outputs a symbol obtained by decoding a processing unit to be processed as a decoding result, so that a correct decoding result cannot be obtained. Therefore, these decoding results are discarded or deleted.

図8は、復号処理の説明図である。この説明図は、図7の処理フローチャートに基づいて、それぞれのデコーダ8,9a,9bが行う複数の入力符号に対する、それぞれの復号処理の処理順序を示すタイムチャートである。メインデコーダ8は、1つの符号に対して、上述した2つの処理(シフト処理・テーブルアクセス処理)を順次実行する。また、第1の実施形態の演算デコーダ3と同様に、第1のサブデコーダ9aおよび第2のサブデコーダ9bは、1つの符号に対して、上述した3つの処理(シフト処理・符号長特定処理・テーブルアクセス処理)を順次実行する。   FIG. 8 is an explanatory diagram of the decoding process. This explanatory diagram is a time chart showing the processing order of the respective decoding processes for a plurality of input codes performed by the respective decoders 8, 9a, 9b based on the processing flowchart of FIG. The main decoder 8 sequentially executes the above-described two processes (shift process and table access process) for one code. Similarly to the arithmetic decoder 3 of the first embodiment, the first sub-decoder 9a and the second sub-decoder 9b perform the above-described three processes (shift process / code length specifying process) for one code. -Table access processing) is executed sequentially.

つぎに、この説明図に基づいて、連続する6つのシンボルに対応した符号列(符号1〜6)の復号処理について説明する。一例として、符号列は、特定シンボルをシンボル”F”,”H”,”4”とし、そのうち、”H”,”4”を終了シンボルとしたシンボル列”A,B,F,2,F,4”を符号化したものである。ここで、シフト処理(無地)内に記載された括弧内の値は、入力される符号(1つのシンボルを含むまとまり)の順序を示し、同じ括弧内の値を持つシフト処理は、同じ符号に対して行われることを示す。例えば(1)は符号1、(2)は符号2を示しており、その横に連続する処理は同一の符号に対する処理である。   Next, a decoding process of a code string (reference numerals 1 to 6) corresponding to six consecutive symbols will be described based on this explanatory diagram. As an example, the code sequence includes symbols “A”, “B”, “F”, and “F” with specific symbols as symbols “F”, “H”, and “4”, of which “H” and “4” are end symbols. , 4 "are encoded. Here, the values in parentheses described in the shift process (plain color) indicate the order of the input codes (a group including one symbol), and shift processes having values in the same parentheses have the same signs. To be done. For example, (1) shows the code 1 and (2) shows the code 2, and the process that continues beside it is the process for the same code.

まず、期間t0において、シフタ2によるシフト処理が行われ、符号1がメインデコーダ8および第1のサブデコーダ9aに読み込まれる(ステップ1)。そして、この符号1に対してメインデコーダ8は、テーブルアクセス処理を行うとともに、これと並行して、第1のサブデコーダ9aは、符号長特定処理を行う(ステップ2)。   First, in a period t0, shift processing by the shifter 2 is performed, and code 1 is read into the main decoder 8 and the first sub-decoder 9a (step 1). Then, the main decoder 8 performs a table access process for the code 1, and at the same time, the first sub-decoder 9a performs a code length specifying process (step 2).

期間t1では、メインデコーダ8が符号1から特定シンボルを復号しないので、これと並行して符号長特定処理を行っていた第1のサブデコーダ9aが、算出した符号1の符号長に基づいて、シフト処理をシフタ2に指示する(ステップ3)。そして、符号2がメインデコーダ8および第1のサブデコーダ9aに読み込まれる(ステップ1)。つぎに、期間t0と同様に、この符号2に対して、メインデコーダ8および第1のサブデコーダ9aが復号処理を行う(ステップ2)。一方、符号1の復号処理は、第1のサブデコーダ9aが引き続き行う。   In the period t1, since the main decoder 8 does not decode the specific symbol from the code 1, the first sub-decoder 9a, which has performed the code length specifying process in parallel with this, performs the calculation based on the calculated code length of the code 1, A shift process is instructed to the shifter 2 (step 3). Then, code 2 is read into the main decoder 8 and the first sub-decoder 9a (step 1). Next, as in the period t0, the main decoder 8 and the first sub-decoder 9a perform decoding processing on the code 2 (step 2). On the other hand, the decoding process of code 1 is continuously performed by the first sub-decoder 9a.

期間t2において、期間t1と同様に、メインデコーダ8が符号1から特定シンボルを復号しないので、これと並行して符号長特定処理を行っていた第1のサブデコーダ9aが、算出した符号2の符号長に基づいて、シフト処理をシフタ2に指示する(ステップ3)。そして、符号3がメインデコーダ8および第1のサブデコーダ9aに読み込まれる(ステップ1)。つぎに、期間t0と同様に、この符号2に対して、メインデコーダ8および第1のサブデコーダ9aが復号処理を行う(ステップ2)。   In the period t2, as in the period t1, the main decoder 8 does not decode the specific symbol from the code 1, so that the first sub-decoder 9a that has performed the code length specifying process in parallel with the code 1 calculates the code 2 Based on the code length, a shift process is instructed to the shifter 2 (step 3). The code 3 is read into the main decoder 8 and the first sub-decoder 9a (step 1). Next, as in the period t0, the main decoder 8 and the first sub-decoder 9a perform decoding processing on the code 2 (step 2).

一方、符号2の復号処理(テーブルアクセス処理)は、第1のサブデコーダ9aによって引き続き行われる。これは、第1の実施形態と同様に、第1のサブデコーダ9aのテーブルの記述内容は復号処理時においても不変だからである。これにより、異なる符号列の復号時においても同一テーブルに対して、複数のアクセスを受け付けることが可能であり、複数の符号に対する復号処理のパイプライン処理が可能となる。   On the other hand, the decoding process (table access process) of code 2 is continuously performed by the first sub-decoder 9a. This is because, as in the first embodiment, the description content of the table of the first sub-decoder 9a is not changed during the decoding process. Thereby, even when different code strings are decoded, it is possible to accept a plurality of accesses to the same table, and it is possible to perform pipeline processing of decoding processing for a plurality of codes.

期間t3において、メインデコーダ8が符号3から終了シンボルでない特定シンボル”F”を復号するので、(ステップ3,4)、メインデコーダ8(制御部8c)は、第1のサブデコーダ9aの符号3に対する復号処理を中止させる(ステップ5)。そして、特定シンボルと並行して算出された符号長をもとに、メインデコーダ8がシフト処理をシフタ2に指示し、符号4がメインデコーダ8および第2のサブデコーダ9bに読み込まれる(ステップ6)。つぎに、この符号4に対して、メインデコーダ8および第2のサブデコーダ9bが復号処理を行う(ステップ7)。なお、符号2の復号処理は、第1のサブデコーダ9aによって引き続き行われる。   In the period t3, the main decoder 8 decodes the specific symbol “F” which is not the end symbol from the code 3 (steps 3 and 4), so that the main decoder 8 (control unit 8c) uses the code 3 of the first sub-decoder 9a. The decoding process for is stopped (step 5). Based on the code length calculated in parallel with the specific symbol, the main decoder 8 instructs the shifter 2 to perform the shift process, and the code 4 is read into the main decoder 8 and the second sub-decoder 9b (step 6). ). Next, the main decoder 8 and the second sub-decoder 9b perform a decoding process on the code 4 (step 7). Note that the decoding process for code 2 is continued by the first sub-decoder 9a.

期間t4において、メインデコーダ8が符号1から特定シンボルを復号しないので、並行して符号長特定処理を行っていた第2のサブデコーダ9bが、算出した符号4の符号長に基づいて、シフト処理をシフタ2に指示する(ステップ8)。そして、符号5がメインデコーダ8および第1のサブデコーダ9aに読み込まれ、復号処理される(ステップ1,2)。なお、符号4の復号処理は、第2のサブデコーダ9bによって引き続き行われる。   Since the main decoder 8 does not decode the specific symbol from the code 1 in the period t4, the second sub-decoder 9b that has performed the code length specifying process in parallel performs the shift process based on the calculated code length of the code 4. To the shifter 2 (step 8). The code 5 is read into the main decoder 8 and the first sub-decoder 9a, and is decoded (steps 1 and 2). Note that the decoding process of code 4 is continued by the second sub-decoder 9b.

期間t5において、期間t3と同様にメインデコーダ8が符号5から終了シンボルでない特定シンボル”F”を復号するので、(ステップ3,4)、メインデコーダ8は、第1のサブデコーダ9aの符号3に対する復号処理を中止させる(ステップ5)。そして、メインデコーダ8がシフト処理をシフタ2に指示し、符号6がメインデコーダ8および第2のサブデコーダ9bに読み込まれ、復号処理される(ステップ6,7)。つづく、期間t6において、メインデコーダ8が符号6から終了シンボルである特定シンボル”4”を復号するので、(ステップ8,9)、復号処理を終了する。   In the period t5, as in the period t3, the main decoder 8 decodes the specific symbol “F” which is not the end symbol from the code 5 (steps 3 and 4), so the main decoder 8 uses the code 3 of the first sub-decoder 9a. The decoding process for is stopped (step 5). Then, the main decoder 8 instructs the shifter 2 to perform the shift process, and the code 6 is read into the main decoder 8 and the second sub-decoder 9b and decoded (steps 6 and 7). Subsequently, since the main decoder 8 decodes the specific symbol “4” as the end symbol from the code 6 in the period t6 (steps 8 and 9), the decoding process is ended.

このように、本実施形態によれば、第1の実施形態と同様に、復号処理のパイプライン化を行うことに加えて、特定シンボルの直後に続くランシンボルを含むシンボル列を符号化した符号列であっても、復号処理をパイプライン化することができる。これにより、符号列全体の処理の高速化を図ることができる。また、本実施形態によれば、第1の実施形態と同様に、復号化システム内部に、次回に入力され得る符号を保持しておく必要がないため、復号化システム全体の回路の大規模化を防ぐことができる。   As described above, according to the present embodiment, as in the first embodiment, in addition to performing decoding processing in a pipeline, a code obtained by encoding a symbol string including a run symbol immediately following a specific symbol is encoded. Even for columns, the decoding process can be pipelined. As a result, the processing speed of the entire code string can be increased. Further, according to the present embodiment, as in the first embodiment, since it is not necessary to store a code that can be input next time in the decoding system, the scale of the circuit of the entire decoding system is increased. Can be prevented.

なお、上述した実施形態では、特定シンボルと、その直後にランシンボルとが含まれたシンボル列を符号化した符号列を復号処理した。しかしながら、本発明はこれに限定されるものではなく、例えば、前後する2つのシンボル間に相関関係を含むシンボル列を符号化した符号列でも適用できる。ここで、相関関係とは、あるシンボルの次(回)のシンボルが、所定のシンボルである確率が高い関係を指す。   In the embodiment described above, the code sequence obtained by encoding the symbol sequence including the specific symbol and the run symbol immediately after the specific symbol is decoded. However, the present invention is not limited to this. For example, the present invention can also be applied to a code string obtained by encoding a symbol string including a correlation between two preceding and following symbols. Here, the correlation refers to a relationship that has a high probability that the next (time) symbol after a certain symbol is a predetermined symbol.

一例として、シンボル列”A,B,C,A,A,B,C,A,A,B,C,D”にのように、シンボル”A”の次に出現するシンボルがシンボル”B”である確率が高いケースについて考える。この場合、判定テーブルに設定する特定シンボルをシンボル”A”とし、シンボル”A”の次のシンボル専用の演算デコーダを第2のサブデコーダ9bとすることで対応が可能である。つまり、特定シンボルと相関関係のあるランシンボルを別のキャラクタシンボルと置換することにより、上述と同様の効果を得ることができる。また、この場合、符号列からの復号処理において、シンボル”A”が連続する場合、第2のサブデコーダ9bは、第1の実施形態の演算デコーダ3と同様に、同一テーブルを用いたパイプライン処理をすることができる。   As an example, the symbol that appears next to the symbol “A” is the symbol “B” as in the symbol string “A, B, C, A, A, B, C, A, A, B, C, D”. Consider the case with a high probability of. In this case, the specific symbol set in the determination table is the symbol “A”, and the operation decoder dedicated to the symbol next to the symbol “A” is the second sub-decoder 9b. That is, the same effect as described above can be obtained by replacing the run symbol correlated with the specific symbol with another character symbol. In this case, when the symbol “A” continues in the decoding process from the code string, the second sub-decoder 9b uses the same table as in the operation decoder 3 of the first embodiment. Can be processed.

さらに、このような相関関係を含むシンボルが複数連続するシンボル列を符号化した符号列に対しても適用可能である。具体的には、ある順序で出現する(復号化される)シンボルの次のシンボルが、所定のシンボルである確率が高いといった如くである。   Furthermore, the present invention can also be applied to a code string obtained by coding a symbol string in which a plurality of symbols including such correlations are continuous. Specifically, there is a high probability that a symbol next to a symbol that appears (decoded) in a certain order is a predetermined symbol.

一例として、シンボル列”A,B,C,B,A,B,C,C,A,B,C,D”のように、シンボル”A,B”の順序で出現する次のシンボルが、シンボル”C”である確率が高いケースについて考える。この場合、判定テーブルに設定する特定シンボルをシンボル”A”および”B”とし、さらにメインデコーダ8内(例えば、制御部8c)に、最近出力したシンボルを記憶可能なバッファを設ける。そして、各デコーダ(8,9a,9b)と並列に、さらに第3のサブデコーダ(図示せず)を設け、シンボル”A”の次のシンボル専用の演算デコーダを第2のサブデコーダ9bとし、シンボル”B”の次のシンボル専用の演算デコーダを第3のサブデコーダとすることで対応が可能である。つまり、相関関係の連続する特定シンボルの数に応じて、演算デコーダであるサブデコーダを設けることにより、上述と同様の効果を得ることができる。このとき、メインデコーダ8は、今回を含む連続した処理単位に特定シンボルの符号が所定の順序で含まれていると判定した場合、この符号に対応した特定シンボルを復号結果として出力するとともに、今回以降の処理単位に関する処理主体をさらに選択的に指定する。具体的には、メインデコーダ8は、前回の処理単位で特定シンボルが”A”を出力し、今回の処理単位特定シンボル”B”を出力すると判定した場合、制御部8cが、次回の符号の処理主体を第3のサブデコードに指定する。   As an example, the following symbols appearing in the order of the symbols “A, B”, such as the symbol string “A, B, C, B, A, B, C, C, A, B, C, D”, Consider the case where the probability of being symbol “C” is high. In this case, the specific symbols set in the determination table are symbols “A” and “B”, and a buffer capable of storing recently output symbols is provided in the main decoder 8 (for example, the control unit 8c). Further, a third sub-decoder (not shown) is provided in parallel with each decoder (8, 9a, 9b), and an operation decoder dedicated to the next symbol after the symbol “A” is set as the second sub-decoder 9b. This can be dealt with by using a third sub-decoder as an arithmetic decoder dedicated to the symbol following the symbol “B”. That is, the same effect as described above can be obtained by providing sub-decoders that are arithmetic decoders according to the number of specific symbols having continuous correlation. At this time, when the main decoder 8 determines that the code of the specific symbol is included in a predetermined order in the continuous processing unit including the current time, the main decoder 8 outputs the specific symbol corresponding to the code as a decoding result, and The processing subject relating to subsequent processing units is further selectively specified. Specifically, when the main decoder 8 determines that the specific symbol outputs “A” in the previous processing unit and the current processing unit specific symbol “B” is output, the control unit 8c determines the next code. The processing subject is designated as the third sub-decoding.

また、この場合、先に述べた拡張例と同様に符号列からの復号処理において、シンボル”A”が連続して復号化される場合には第2のサブデコーダ9bが、シンボル”B”が連続して復号化される場合には第3のサブデコーダが、それぞれ第1の実施形態の演算デコーダ3と同様に、同一テーブルを用いたパイプライン処理を実行してもよい。   Further, in this case, in the decoding process from the code string as in the above-described extended example, when the symbol “A” is continuously decoded, the second sub-decoder 9b determines that the symbol “B” In the case of continuous decoding, the third sub-decoder may execute pipeline processing using the same table, similarly to the arithmetic decoder 3 of the first embodiment.

なお、上述の2つの拡張例においても、特定シンボルを復号処理するメインデコーダ8が有する判定テーブルは1つであるが、本発明はこれに限らず、メインデコーダ8が判定する(出力する)シンボルの種類に応じて複数有してもよい。例えば、拡張案1において、シンボル”A”の次のシンボルに対して(第2のサブデコーダ9bと並行して)復号処理をする場合に用いる判定テーブルと、通常の(第1のサブデコーダ9aと並行する)復号処理に用いる判定テーブルと分けてもよい。これは、シンボル列が、上記の相関関係を考慮されたことによって異なるテーブルを用いて符号化された符号列に対応するためである。   In the two extended examples described above, the main decoder 8 that decodes a specific symbol has one determination table. However, the present invention is not limited to this, and the main decoder 8 determines (outputs) symbols. You may have two or more according to the kind of. For example, in the extension plan 1, a determination table used when decoding the symbol next to the symbol “A” (in parallel with the second sub-decoder 9b) and a normal (first sub-decoder 9a) It may be separated from the determination table used for the decoding process. This is because the symbol sequence corresponds to a code sequence encoded using a different table by considering the above correlation.

さらに、上述した拡張案を含む各実施形態では、復号対象が"a"や"b"といったテキスト(文字)や、”2”や”3”といった数値(数字)が含まれたシンボル列を符号化した符号列について説明した。しかしながら、本発明はこれらに限定されるものではなく、例えば、画像データや音声データといったデータ形式であっても適用可能なのは当然である。   Further, in each of the embodiments including the above-described extension plan, a symbol string including a text (character) such as “a” or “b” or a numerical value (number) such as “2” or “3” is encoded. The coded code string has been described. However, the present invention is not limited to these, and is naturally applicable to data formats such as image data and audio data.

第1の実施形態における復号化システムの構成図Configuration diagram of a decoding system according to the first embodiment 演算デコーダのテーブルの構成図Arithmetic decoder table configuration diagram 復号処理の説明図Illustration of decryption process 第2の実施形態における復号化システムの構成図Configuration diagram of decoding system in second embodiment 判定テーブルの構成図Judgment table configuration diagram 第2のサブデコーダのテーブルの構成図Structure of second sub-decoder table 復号処理のフローチャートDecoding process flowchart 復号処理の説明図Illustration of decryption process

符号の説明Explanation of symbols

1 バッファ
2 シフタ
3 演算デコーダ
4 ベーステーブル管理部
5 符号長特定部
6 復号処理部
6a オフセットテーブル管理部
6b シンボルテーブル管理部
6c アドレス生成部
7 制御部
8 メインデコーダ
8a 判定テーブル管理部
8b 復号化部
8c 制御部
9a 第1のサブデコーダ
9b 第2のサブデコーダ
DESCRIPTION OF SYMBOLS 1 Buffer 2 Shifter 3 Operation decoder 4 Base table management part 5 Code length specific | specification part 6 Decoding process part 6a Offset table management part 6b Symbol table management part 6c Address generation part 7 Control part 8 Main decoder 8a Judgment table management part 8b Decoding part 8c control unit 9a first sub-decoder 9b second sub-decoder

Claims (5)

カノニカルハフマン方式によって符号化された符号列を復号対象とし、当該符号列の一部を構成する所定の符号長の処理単位毎に復号処理を繰り返し行うことによって、複数のシンボルが並んだシンボル列を出力する復号化システムにおいて、
複数の異なる符号長のそれぞれに対応付けて先頭符号が記述されたベーステーブルと、
前記ベーステーブルに記述された符号長毎の先頭符号と、処理単位の先頭符号とを比較することによって、処理単位に含まれる復号対象の符号長を特定する符号長特定処理を行う符号長特定部と、
前記符号長特定部によって符号長が特定された復号対象を復号化する復号処理を行うことによって、当該復号対象に対応したシンボルを出力する復号処理部と、
今回の処理単位に関する前記符号長特定処理の終了後で、かつ、前記復号処理の終了前に、次回の処理単位に関する前記符号長特定処理の開始を前記符号長特定部に指示する制御部と
を有することを特徴とする復号化システム。
A code string encoded by the canonical Huffman method is to be decoded, and a decoding process is repeated for each processing unit of a predetermined code length that constitutes a part of the code string, whereby a symbol string in which a plurality of symbols are arranged is obtained. In the output decryption system,
A base table in which a head code is described in association with each of a plurality of different code lengths;
A code length specifying unit that performs a code length specifying process for specifying a code length of a decoding target included in a processing unit by comparing the starting code for each code length described in the base table with the starting code of the processing unit. When,
A decoding processing unit that outputs a symbol corresponding to the decoding target by performing a decoding process for decoding the decoding target whose code length is specified by the code length specifying unit;
A control unit that instructs the code length specifying unit to start the code length specifying process for the next processing unit after the end of the code length specifying process for the current processing unit and before the end of the decoding process; A decoding system comprising:
カノニカルハフマン方式によって符号化された符号列を復号対象とし、当該符号列の一部を構成する所定の符号長の処理単位毎に復号処理を繰り返し行うことによって、複数のシンボルが並んだシンボル列を出力する復号化システムにおいて、
シンボル列の配列的な特徴に基づき予め設定された特定シンボルのそれぞれに対応付けて符号が記述された判定テーブルを参照して、今回の処理単位に特定シンボルの符号が含まれていると判定した場合、当該符号に対応した特定シンボルを復号結果として出力するとともに、今回以降の処理単位に関する処理主体を選択的に指定するメインデコーダと、
前記メインデコーダに並列に設けられており、自己が処理すべき複数の処理単位をパイプラインによって処理するとともに、前記メインデコーダからの指定に応じて、自己が処理すべき処理単位を復号化することによって得られたシンボルを復号結果として選択的に出力する第1のサブデコーダと、
前記メインデコーダに並列に設けられているとともに、前記メインデコーダからの指定に応じて、自己が処理すべき処理単位を復号化することによって得られたシンボルを復号結果として選択的に出力する第2のサブデコーダと
を有することを特徴とする復号化システム。
A code string encoded by the canonical Huffman method is to be decoded, and a decoding process is repeated for each processing unit of a predetermined code length that constitutes a part of the code string, whereby a symbol string in which a plurality of symbols are arranged is obtained. In the output decryption system,
Based on the arrangement characteristics of the symbol sequence, it is determined that the code of the specific symbol is included in the current processing unit by referring to the determination table in which the code is described in association with each of the predetermined specific symbols. A main decoder that outputs a specific symbol corresponding to the code as a decoding result and selectively designates a processing subject relating to a processing unit after this time;
A plurality of processing units to be processed by itself are processed by a pipeline provided in parallel to the main decoder, and the processing units to be processed by itself are decoded according to the designation from the main decoder. A first sub-decoder that selectively outputs a symbol obtained by the above as a decoding result;
Secondly provided in parallel with the main decoder, and selectively outputs a symbol obtained by decoding a processing unit to be processed by itself as a decoding result in accordance with a designation from the main decoder. And a sub-decoder.
前記第1のサブデコーダは、
複数の異なる符号長のそれぞれに対応付けて先頭符号が記述されたベーステーブルと、
前記ベーステーブルに記述された符号長毎の先頭符号と、処理単位の先頭符号とを比較することによって、処理単位に含まれる復号対象の符号長を特定する符号長特定処理を行う符号長特定部と、
前記符号長特定部によって符号長が特定された復号対象を復号化する復号処理を行うことによって、当該復号対象に対応したシンボルを出力する復号処理部と、
今回の処理単位に関する前記符号長特定処理の終了後で、かつ、前記復号処理の終了前に、次回の処理単位に関する前記符号長特定処理の開始を前記符号長特定部に指示する制御部と
を有することを特徴とする請求項2に記載された復号化システム。
The first sub-decoder includes:
A base table in which a head code is described in association with each of a plurality of different code lengths;
A code length specifying unit that performs a code length specifying process for specifying a code length of a decoding target included in a processing unit by comparing the starting code for each code length described in the base table with the starting code of the processing unit. When,
A decoding processing unit that outputs a symbol corresponding to the decoding target by performing a decoding process for decoding the decoding target whose code length is specified by the code length specifying unit;
A control unit that instructs the code length specifying unit to start the code length specifying process for the next processing unit after the end of the code length specifying process for the current processing unit and before the end of the decoding process; The decoding system according to claim 2, further comprising:
前記符号列は、複数種のキャラクタシンボルと、同種のキャラクタシンボルの連続数を示すランシンボルとで構成されており、
前記メインデコーダは、ランシンボルの直前にくるキャラクタシンボルを前記特定シンボルとして出力し、
前記第1のサブデコーダは、今回の処理単位に前記特定シンボルが含まれておらず、かつ、前回の処理単位にも前記特定シンボルが含まれていない場合、今回の処理単位を復号化することによって得られたキャラクタシンボルを復号結果として出力し、
前記第2のサブデコーダは、今回の処理単位に前記特定シンボルが含まれておらず、かつ、前回の処理単位に前記特定シンボルが含まれている場合、今回の処理単位を復号化することによって得られたランシンボルを復号結果として出力することを特徴とする請求項2または3に記載された復号化システム。
The code string is composed of a plurality of types of character symbols and run symbols indicating the number of consecutive same type of character symbols,
The main decoder outputs a character symbol immediately before a run symbol as the specific symbol,
The first sub-decoder decodes the current processing unit when the specific symbol is not included in the current processing unit and the specific symbol is not included in the previous processing unit. Output the character symbol obtained by the decoding result,
The second sub-decoder decodes the current processing unit when the specific symbol is not included in the current processing unit and the specific symbol is included in the previous processing unit. 4. The decoding system according to claim 2, wherein the obtained run symbol is output as a decoding result.
前記メインデコーダは、今回を含む連続した処理単位に特定シンボルの符号が所定の順序で含まれていると判定した場合、当該符号に対応した特定シンボルを復号結果として出力するとともに、今回以降の処理単位に関する処理主体をさらに選択的に指定することを特徴とする請求項2から4のいずれかに記載された復号化システム。   When the main decoder determines that the code of the specific symbol is included in a predetermined order in the continuous processing unit including the current time, the main decoder outputs the specific symbol corresponding to the code as a decoding result, and processes subsequent to the current time 5. The decoding system according to claim 2, wherein a processing subject relating to the unit is further selectively specified.
JP2005290098A 2005-10-03 2005-10-03 Decryption system Expired - Fee Related JP4079965B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005290098A JP4079965B2 (en) 2005-10-03 2005-10-03 Decryption system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005290098A JP4079965B2 (en) 2005-10-03 2005-10-03 Decryption system

Publications (2)

Publication Number Publication Date
JP2007104194A true JP2007104194A (en) 2007-04-19
JP4079965B2 JP4079965B2 (en) 2008-04-23

Family

ID=38030707

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005290098A Expired - Fee Related JP4079965B2 (en) 2005-10-03 2005-10-03 Decryption system

Country Status (1)

Country Link
JP (1) JP4079965B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009246973A (en) * 2008-03-28 2009-10-22 Fujitsu Ltd Decoding accelerating apparatus for variable length code
JP2009253514A (en) * 2008-04-03 2009-10-29 Sony Corp Variable-length code decoding apparatus, variable-length code decoding method, and program
JP2009267813A (en) * 2008-04-25 2009-11-12 Mitsubishi Electric Corp Huffman decoding apparatus and huffman decoding method
JP2010166444A (en) * 2009-01-16 2010-07-29 Canon Inc Decoding apparatus and control method thereof
JP2010166445A (en) * 2009-01-16 2010-07-29 Canon Inc Decoding apparatus and control method thereof
WO2013132590A1 (en) * 2012-03-06 2013-09-12 富士通株式会社 Program, information processing apparatus, and data generating method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10163880A (en) * 1996-10-02 1998-06-19 Kawasaki Steel Corp Data decoder
JP2002016501A (en) * 2000-04-28 2002-01-18 Matsushita Electric Ind Co Ltd Variable length decoder
JP2004179752A (en) * 2002-11-25 2004-06-24 Kawasaki Microelectronics Kk Huffman decoder
JP2004528771A (en) * 2001-04-04 2004-09-16 ハネウェル・インターナショナル・インコーポレーテッド Canonical Huffman coded data decompression algorithm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10163880A (en) * 1996-10-02 1998-06-19 Kawasaki Steel Corp Data decoder
JP2002016501A (en) * 2000-04-28 2002-01-18 Matsushita Electric Ind Co Ltd Variable length decoder
JP2004528771A (en) * 2001-04-04 2004-09-16 ハネウェル・インターナショナル・インコーポレーテッド Canonical Huffman coded data decompression algorithm
JP2004179752A (en) * 2002-11-25 2004-06-24 Kawasaki Microelectronics Kk Huffman decoder

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009246973A (en) * 2008-03-28 2009-10-22 Fujitsu Ltd Decoding accelerating apparatus for variable length code
JP2009253514A (en) * 2008-04-03 2009-10-29 Sony Corp Variable-length code decoding apparatus, variable-length code decoding method, and program
JP2009267813A (en) * 2008-04-25 2009-11-12 Mitsubishi Electric Corp Huffman decoding apparatus and huffman decoding method
JP2010166444A (en) * 2009-01-16 2010-07-29 Canon Inc Decoding apparatus and control method thereof
JP2010166445A (en) * 2009-01-16 2010-07-29 Canon Inc Decoding apparatus and control method thereof
WO2013132590A1 (en) * 2012-03-06 2013-09-12 富士通株式会社 Program, information processing apparatus, and data generating method

Also Published As

Publication number Publication date
JP4079965B2 (en) 2008-04-23

Similar Documents

Publication Publication Date Title
JP4962476B2 (en) Arithmetic decoding device
US7408487B2 (en) Method and apparatus for CABAC-based encoding having high compression ratio using improved context model selection and method and apparatus for CABAC-based decoding
JP4079965B2 (en) Decryption system
US6809665B2 (en) Apparatus and method for decoding variable length code
KR101401244B1 (en) Method and apparatus and record carrier
JP2003218703A (en) Data coder and data decoder
JP2007226615A (en) Information processor, compression program generation method, and information processing system
JP2007043595A (en) Variable length code decoding method and device and data decompression device
JP2006254225A (en) Apparatus and method for decoding variable length code
JP2009081726A (en) Entropy coding device, entropy coding method, and computer program
JP3014997B2 (en) Variable length code decoding device
JP2008278075A (en) Variable length encoding/decoding device
JPH07107303A (en) Decoding method for huffman code
JP2008199100A (en) Device for decoding variable length code
JP2003174365A (en) Decoding device and its method
JP2003198858A (en) Encoder and decoder
JP5200854B2 (en) Encoding device, decoding device, and image processing system
JP2010258927A (en) Apparatus, method and program for processing coded data
JP2003152549A (en) Decoding method, decoder, computer program and recording medium
JPH0883347A (en) Picture processor
JPH09246989A (en) Decoder and method therefor
JPH1065550A (en) Decoder
US20060015704A1 (en) Operation apparatus and instruction code executing method
JP2006270330A (en) Variable-length code decoding circuit
JP3332630B2 (en) Decoding device and decoding table generation method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080111

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080205

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110215

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4079965

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110215

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110215

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120215

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120215

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130215

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130215

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130215

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140215

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees