JP4461859B2 - Run-length code decoding apparatus - Google Patents
Run-length code decoding apparatus Download PDFInfo
- Publication number
- JP4461859B2 JP4461859B2 JP2004077453A JP2004077453A JP4461859B2 JP 4461859 B2 JP4461859 B2 JP 4461859B2 JP 2004077453 A JP2004077453 A JP 2004077453A JP 2004077453 A JP2004077453 A JP 2004077453A JP 4461859 B2 JP4461859 B2 JP 4461859B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- register
- coefficient
- zero
- run
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 description 11
- 238000006243 chemical reaction Methods 0.000 description 10
- 238000013139 quantization Methods 0.000 description 8
- 230000001186 cumulative effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000000750 progressive effect Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000009131 signaling function Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
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)
Description
本発明はランレングス符号の復号装置、特に復号処理の高速化に関する。 The present invention relates to a run-length code decoding apparatus, and more particularly to speeding up decoding processing.
従来より、画像データの圧縮及び伸長に関する規格としてMPEG2が知られている。MPEG2では、画像データは8画素×8画素のブロック(あるいは16画素×16画素のマクロブロック)単位でデータ処理が行われ、具体的にはDCT(離散コサイン変換)、量子化、ランレングス符号化及び可変長符号化によりデータを圧縮している。各処理は公知であるが、簡単に説明すると、DCTでは空間領域の画像データを周波数領域のデータに変換する。一般の画像では、低周波数領域にエネルギが集中し、高周波数領域のエネルギは少ない。そこで、非ゼロで相対的に大きな値を有する係数を低周波数領域に集中させることができる。8画素×8画素のブロックに対してDCT変換した場合、1個のDC係数と63個のAC係数が生成される。量子化は、高周波数領域の係数を低周波数領域よりも荒く量子化してデータ数を圧縮する。これにより、高周波数領域の小さい値の係数はほとんどゼロに変換される。ランレングス符号化は、ゼロ成分が連続しやすいように量子化の結果をジグザグ状にスキャンしながら非ゼロ成分に先行するゼロ成分の個数を示すゼロランレングスデータワードと、非ゼロの値を示すレベルデータワードで構成されたデータストリームを生成する。可変長符号化は、ハフマンコードを用いて高頻度のデータには短いコードを割り当て低頻度のデータには長いコードを割り当ててデータストリームを符号化する。なお、JPEGにおいても同様の技術が用いられている。 Conventionally, MPEG2 is known as a standard for image data compression and decompression. In MPEG2, image data is processed in units of blocks of 8 pixels × 8 pixels (or macro blocks of 16 pixels × 16 pixels). Specifically, DCT (Discrete Cosine Transform), quantization, and run length coding are performed. The data is compressed by variable length coding. Each process is known, but in brief, DCT converts spatial domain image data into frequency domain data. In a general image, energy concentrates in a low frequency region and energy in a high frequency region is small. Therefore, non-zero and relatively large coefficients can be concentrated in the low frequency region. When DCT conversion is performed on a block of 8 pixels × 8 pixels, one DC coefficient and 63 AC coefficients are generated. In the quantization, the number of data is compressed by roughly quantizing the coefficient in the high frequency region than in the low frequency region. As a result, the small value coefficient in the high frequency region is converted to almost zero. Run-length encoding is a zero-run-length data word that indicates the number of zero components preceding the non-zero component while scanning the quantization result in a zigzag pattern so that the zero components are likely to be continuous, and a non-zero value. A data stream composed of level data words is generated. In variable-length coding, a Huffman code is used to encode a data stream by assigning a short code to high-frequency data and assigning a long code to low-frequency data. A similar technique is used in JPEG.
このように圧縮された画像データを復号する際には、圧縮時の逆処理を行う。すなわち、可変長復号、ランレングス符号復号、逆量子化、及び逆DCTを順次行って元の画像データを復元する。 When decoding the image data compressed in this way, reverse processing at the time of compression is performed. That is, variable length decoding, run length code decoding, inverse quantization, and inverse DCT are sequentially performed to restore the original image data.
図6には、下記の特許文献に記載された従来のランレングス符号の復号装置が示されている。 FIG. 6 shows a conventional run-length code decoding apparatus described in the following patent document.
可変長符号復号器(VLD)201は、DC係数の可変長符号がデータ入力端子200に与えられると、1個のブロックの始まりを示すブロックスタート信号を信号線205に出力する。また、AC係数の可変長符号がデータ入力端子200に与えられると、非ゼロの成分に先行するゼロ成分の個数を表すランレングスデータワードを信号線207へ、非ゼロの成分の絶対値を表すレベルデータワードを信号線208へ、非ゼロの成分が正であるか負であるかを指定する1ビット情報を信号線209へ供給する。DC係数の復号結果は、レベルデータとして信号線208、209に供給される。また、EOB(エンドオブブロック)の可変長符号がデータ入力端子200に与えられると、EOB検出信号を信号線206へ供給する。
The variable length code decoder (VLD) 201 outputs a block start signal indicating the start of one block to the
ブロックスタート信号を入力したアドレスカウンタ223は、クロック信号202に同期して計数値を初期値から順次カウントアップし、計数値をアドレスとして信号線224へ供給する。計数値が63になると、ブロックの終了を示すパルス信号をブロック終了信号として信号線225へ供給する(1ブロックは8画素×8画素=64画素で構成される)。RSフリップフロップ228は、初期状態では信号線229をLレベルとし、信号線206のEOB検出信号を入力したときに信号線229をHレベルにセットし、ブロック終了信号を入力したときにLレベルにリセットする。
The
ルックアップテーブル226は、ジグザグスキャンに対応したアドレス変換テーブルを有し、信号線224のアドレスをこれに対応するジグザグスキャンアドレスに変換して信号線227へ供給する。ジグザグスキャンアドレスは、スキャン変換用RAM232に書き込みアドレスとして与えられる。
The lookup table 226 has an address conversion table corresponding to the zigzag scan, converts the address of the
ゼロラングスデータワードはダウンカウンタ212に、レベルデータワードは第1のデータラッチ211に、1ビット情報は1ビットラッチ210にそれぞれクロック信号202に同期して格納される。ダウンカウンタ212は、プリセットされたゼロラングスデータワードを0になるまでダウンカウントする。第1のデータラッチ211に格納されたレベルワードデータは信号線215を介して、1ビットラッチ210に格納された1ビット情報は信号線214を介して正/負値切り替え部216へ供給される。正/負値切り替え部216は、符号付レベルデータワードを算出し、信号線218へ供給する。
The zero-length data word is stored in the
ダウンカウンタ212の計数動作中は、NOR回路230が信号線231の選択信号をHレベルに固定する。Hレベルの選択信号を入力したマルチプレクサ219は、固定データワード0を信号線220へ供給する。ダウンカウンタ212の計数値が0になると、信号線213及び信号線217がLレベルとなり、マルチプレクサ219は信号線218上の符号付レベルデータワードを信号線220へ供給する。信号線220上へ供給された固定データワード0と符号付レベルデータワードは、クロック信号202に同期して第2のデータラッチ221に格納される。第2のデータラッチ221に順次格納されたデータワードは、信号線222を介してスキャン変換用RAM232に書き込みデータとして与えられる。したがって、一連のデータワードがスキャン変換用RAM232のジグザグスキャンアドレスで指定された位置に書き込まれ、8×8個の成分で構成された1個のブロックがスキャン変換用RAM232の中に復元される。スキャン変換用RAM232に復元された64個のデータは、データ出力端子234から次段の逆量子化器へ順次供給される。
During the counting operation of the down
しかしながら、上記従来技術においては、次段の量子化器に対して1データずつしか出力することができず、全てのデータを出力するまでにスキャン変換用RAM232の書き込み側が待機状態となる必要があり、全体としての処理のスループットが抑制されてしまう問題がある。
However, in the above prior art, only one data can be output to the next-stage quantizer, and the write side of the
また、非ゼロの係数をスキャン変換用RAM232に書き込む前にゼロを書き込んで初期化するための初期化用回路及び初期化制御が必要となるため、回路の増大及び制御の複雑化を招く問題もある。
In addition, since an initialization circuit and initialization control are required to write and initialize zero before writing a non-zero coefficient into the
本発明の目的は、初期化回路や初期化制御を別途必要とすることなく、簡易な構成でかつ全体のスループットを向上させることができる復号装置を提供することにある。 An object of the present invention is to provide a decoding apparatus that can improve the overall throughput with a simple configuration without requiring an initialization circuit and initialization control separately.
本発明は、離散コサイン変換及びランレングス符号化されたデータストリームを復号する装置であって、前記データストリームの前記離散コサイン変換におけるDC成分に対応するデータを格納するDC用レジスタと、前記データストリームの前記離散コサイン変換におけるAC成分に対応するデータをそれぞれ格納するAC用レジスタとを有し、前記データストリームの前記離散コサイン変換におけるDC成分に対応するデータを前記DC用レジスタに書き込むタイミングで前記AC用レジスタにゼロデータを書き込む制御手段を有する。 The present invention is an apparatus for decoding a discrete cosine transform and run-length encoded data stream, the DC register storing data corresponding to a DC component in the discrete cosine transform of the data stream, and the data stream And an AC register for storing data corresponding to the AC component in the discrete cosine transform, and the AC register at a timing of writing data corresponding to the DC component in the discrete cosine transform of the data stream to the DC register. Control means for writing zero data to the register.
離散コサイン変換(DCT)及びランレングス符号化されたデータストリームを復号する装置は、ランレングス復号及び逆DCTを含む。DCTによりブロック単位で周波数領域のデータに変換されるが、本発明の復号装置は、DCTにおけるDC(直流)成分に対応するデータを格納するDC用レジスタと、AC(交流)成分に対応するデータを格納するAC用レジスタを用いて復号データを格納する。DC成分に対応するデータをDC用レジスタに書き込む際には、AC用レジスタに書き込むべきデータは存在しないが、本発明ではAC用レジスタを待機状態とはせず、DC用レジスタにDC成分のデータを書き込むタイミングでAC用レジスタにゼロデータを書き込んでAC用レジスタを初期化してしまう。これにより、AC用レジスタに書き込む前に別途、AC用レジスタを初期化するステップを不要とする。DC用レジスタにデータを書き込むタイミングでAC用レジスタを初期化した後、AC用レジスタにデータを書き込むが、既にAC用レジスタにはゼロデータが格納されて初期化されているため、AC成分データのうちゼロデータは改めてAC用レジスタに書き込む必要はなく、非ゼロデータのみをAC用レジスタに書き込めばよく、効率的な書き込み処理が実現する。 An apparatus for decoding a discrete cosine transform (DCT) and run-length encoded data stream includes run-length decoding and inverse DCT. Although DCT is converted into frequency domain data in units of blocks, the decoding apparatus of the present invention includes a DC register for storing data corresponding to a DC (direct current) component in DCT and data corresponding to an AC (alternating current) component. The decoded data is stored using an AC register for storing. When writing data corresponding to the DC component to the DC register, there is no data to be written to the AC register. However, in the present invention, the AC register is not put into a standby state, and the DC component data is stored in the DC register. The zero register is written to the AC register at the timing of writing the data to initialize the AC register. This eliminates the need to separately initialize the AC register before writing to the AC register. After the AC register is initialized at the timing of writing data to the DC register, the data is written to the AC register. However, since zero data is already stored in the AC register and initialized, the AC component data Of these, it is not necessary to write zero data again to the AC register, and only non-zero data needs to be written to the AC register, thereby realizing an efficient writing process.
復号すべきデータストリームは、より詳しくはDCT、量子化、ジグザグスキャン、ランレングス符号化、可変長符号化の各処理ステップを経たものでもよく、この場合、復号装置は可変長復号化、ランレングス復号化、ジグザグスキャン、逆量子化、逆DCTの各処理を実行する。本発明のDC用レジスタ及びAC用レジスタは、ランレングス復号化されたデータを格納し、後段の逆量子化あるいは逆DCTに必要なデータを供給する。 More specifically, the data stream to be decoded may have been subjected to DCT, quantization, zigzag scan, run-length encoding, and variable-length encoding processing steps. In this case, the decoding apparatus performs variable-length decoding, run-length encoding. Decoding, zigzag scanning, inverse quantization, and inverse DCT processes are executed. The DC register and AC register according to the present invention store run-length decoded data, and supply data necessary for subsequent inverse quantization or inverse DCT.
本発明の1つの実施形態では、前記AC用レジスタのうち、前記データストリームに含まれる、非ゼロ成分に先行するゼロ成分の個数を示すゼロランレングスデータに基づきゼロデータを書き込む必要のないレジスタを特定し、非ゼロ成分を書き込むべきレジスタを選択して非ゼロデータを書き込む。 In one embodiment of the present invention, among the AC registers, a register that does not need to write zero data based on zero run length data indicating the number of zero components preceding the non-zero component included in the data stream. Specify the register to which the non-zero component is to be written, and write the non-zero data.
本発明の他の実施形態では、DC用レジスタ及びAC用レジスタの組は複数セット設けられ、これらの組に交互に復号データの書き込みと読み出しを行う。交互に書き込みと読み出しを行う所謂ピンポン制御により、処理のスループットがさらに向上する。 In another embodiment of the present invention, a plurality of sets of DC registers and AC registers are provided, and decoding data is written and read alternately in these sets. Processing throughput is further improved by so-called ping-pong control in which writing and reading are alternately performed.
本発明によれば、データストリームのDC成分に対応するデータをDC用レジスタに格納するタイミングでAC用レジスタにゼロデータを書き込んでAC用レジスタを初期化するため、処理のスループットを向上させることができる。 According to the present invention, since the data corresponding to the DC component of the data stream is stored in the DC register, zero data is written into the AC register and the AC register is initialized, thereby improving the processing throughput. it can.
また、DC用レジスタ及びAC用レジスタに格納したデータを後段の処理が許容する範囲で同時に、あるいは適当な順序で出力することで処理のスループットを一層向上させることができる。 Further, the throughput of processing can be further improved by outputting the data stored in the DC register and AC register simultaneously or in an appropriate order within the range allowed by the subsequent processing.
以下、図面に基づき本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1には、本実施形態に係るランレングス符号の復号装置の構成が示されている。図6に示された復号装置におけるスキャン変換用RAM232を有せず、その代わりにDC係数用レジスタ14及びAC係数用レジスタ16を有している。
FIG. 1 shows the configuration of a run-length code decoding apparatus according to this embodiment. The decoding apparatus shown in FIG. 6 does not have the
可変長符号デコーダ(VLD)10は、図6に示された可変長符号復号器(VLD)201と同様にランレングス符号化されたデータストリームを入力して可変長復号する。この際、DCTにおけるDC係数の可変長符号が入力されるとその復号結果を出力し、DCTにおけるAC係数の可変長符号が入力されると、非ゼロの成分に先行するゼロ成分の個数を表すランレングスデータワード及び非ゼロの成分の絶対値を表すレベルデータワードを出力する。また、非ゼロの成分が正であるか負であるかを指定する1ビット情報を出力する。図において、DC係数の復号結果であるデータワード、AC係数の符号付レベルデータワードをまとめて「データ」として、ランレングスデータワードは「ランレングス」として簡略的に示されている。また、可変長符号デコーダ10は、入力された係数がDC係数であるかAC係数であるかを示す識別信号を出力する。DC係数はブロックの先頭に位置するため、DC係数/AC係数の識別は容易である。図では、識別信号を「DC/AC」として簡略的に示されている。可変長符号デコーダ10からの「データ」は信号線100を介してDC係数用レジスタ14及びAC係数用レジスタ16に供給される。可変長符号デコーダ10からの「ランレングス」及び「DC/AC」識別信号は信号線102を介して累加デコーダ12に供給される。また、「DC/AC」識別信号は後述するDC係数用レジスタ14及びAC係数用レジスタ16の全ワードにも供給される。
The variable length code decoder (VLD) 10 receives the run-length encoded data stream and performs variable length decoding similarly to the variable length code decoder (VLD) 201 shown in FIG. At this time, when a variable length code of DC coefficient in DCT is input, the decoding result is output, and when a variable length code of AC coefficient in DCT is input, it represents the number of zero components preceding non-zero components. A run-length data word and a level data word representing the absolute value of the non-zero component are output. Also, 1-bit information designating whether the non-zero component is positive or negative is output. In the figure, a data word that is a DC coefficient decoding result and a signed level data word of an AC coefficient are collectively shown as “data”, and a run-length data word is simply shown as “run-length”. The variable
累加デコーダ12は、図6におけるアドレスカウンタ223に対応するものであるが、その機能は異なる。すなわち、可変長符号デコーダ10からのDC/AC識別信号がDC係数を示す場合にはDC用係数レジスタ14に対して信号線106を介して選択信号を出力し、AC係数を示す場合にはAC係数用レジスタ16に対して信号線106を介して選択信号を出力する。AC係数用レジスタ16に対して選択信号を出力する際には、可変長符号デコーダ10からのランレングスワードデータを参照し、非ゼロとなる係数に対応するレジスタに対して選択信号を出力する。言い換えれば、累加デコーダ12は、ゼロ成分の個数分だけAC係数用レジスタを飛び越え、非ゼロとなる係数に対応するレジスタに対して選択信号を出力する。選択信号は、具体的には信号線106をLレベルからHレベルに設定することで送出される。選択信号は、レジスタにデータを書き込むためのイネーブル信号として機能する。
The
DC係数用レジスタ14及びAC係数用レジスタ16は別個に設けられ、DC係数用レジスタはDC係数の1ワードデータを格納し、AC係数用レジスタ16はAC係数の63ワードデータを格納する。
The
DC係数用レジスタ14には、可変長符号デコーダ10からのデータ、すなわちDC係数の復号結果が信号線100を介して供給されるとともに、累加デコーダ12からの選択信号が信号線106を介して供給される。DC係数用レジスタ14は、選択信号が供給されたとき(信号線106がHレベルとなったとき)にDC係数の復号結果を格納する。
The DC coefficient register 14 is supplied with the data from the variable-
AC係数用レジスタ16には、可変長符号デコーダ10からのデータ、すなわち非ゼロ成分の復号結果が信号線100を介して供給されるとともに、累加デコーダ12からの選択信号が信号線106を介して供給され、可変長符号デコーダ10からのDC/AC識別信号も供給される。AC係数用レジスタ16は、DC/AC識別信号がDC係数を指定する場合には、全てのレジスタにゼロを書き込む。すなわち、DC係数用レジスタ14にDC係数を書き込むタイミングでAC係数用レジスタ16にゼロを書き込むのである。一方、DC/AC識別信号がAC係数を指定する場合には、AC係数レジスタ16は、信号線106を介して供給された選択信号に応じてデータを当該レジスタに書き込む。選択信号はゼロの個数に応じて設定され、例えばゼロの個数が3である場合には、AC係数用レジスタ16のうち上位から第4番目にあるレジスタに対して選択信号が出力されるから、第4位のレジスタにデータを書き込む。この場合、第1番目〜第3番目のレジスタには何らのデータ書き込みも行われないが、AC係数の書き込みに先立つDC係数の書き込み処理において、同時にAC係数用レジスタ16の全てのレジスタにはゼロが書き込まれているため、第1番目〜第3番目のレジスタはゼロのまま維持される。
The
DC係数用レジスタ14及びAC係数用レジスタ16に格納された64個のデータは、信号線108を介して後段のセレクタ18に供給される。
The 64 pieces of data stored in the
セレクタ18の後段には逆量子化器さらに逆DCT器に出力される(図では、両者をまとめて逆DCT器20として簡略的に示されている)。逆DCT器20からは選択信号が信号線110を介してセレクタ18に供給される。セレクタ18は、選択信号で指定されるタイミングで、64個のデータのうちの複数データをまとめて、あるいは逆DCT器20の構成及び機能が許容すれば64個のデータを同時に信号線112を介して逆DCT器20に供給する。
After the
図2には、本実施形態におけるDC係数用レジスタ14及びAC係数用レジスタ16の処理フローチャートが示されている。
FIG. 2 shows a processing flowchart of the
まず、可変長符号デコーダ10からのDC/AC識別信号に基づいて、入力されたデータがDC係数かAC係数かを判定する(S101)。ブロックの先頭であることを示すワードデータがある場合にはDC係数、それ以外の場合にはAC係数であるため、単にブロックの先頭データか否かを判定してもよい。
First, based on the DC / AC identification signal from the variable
入力データがDC係数である場合、DC用係数レジスタ14に選択信号が供給されるから、DC係数用レジスタ14は可変長符号デコーダ10からのDC係数復号データを格納する(S102)。なお、DC/AC識別信号はDC係数用レジスタにも供給されるから、選択信号ではなくこの識別信号に基づいてDC係数復号データを格納してもよい。入力データがDC係数である場合、AC係数用レジスタ16は全てのレジスタにゼロデータを書き込む(S103)。具体的には、AC係数用レジスタ16の前段にセレクタを設け、このセレクタにゼロデータとDC/AC識別信号を供給し、DC係数である場合にセレクタからゼロデータをAC係数用レジスタ16の全てのレジスタに供給して書き込めばよい。DC係数の書き込みのタイミングでAC係数用レジスタ16にゼロを書き込むこの処理は、AC係数用レジスタ16の初期化処理とともに、次のAC係数書き込みにおけるゼロデータの前書き処理と云うこともできる。
When the input data is a DC coefficient, a selection signal is supplied to the
一方、入力データがAC係数である場合、63ワードのレジスタを有するAC係数用レジスタ16のうち、ランレングスデータで指定される非ゼロ成分に対応するレジスタのみが選択されて選択信号により選択される(S104)。例えば、ワードデータにブロックの先頭から順次0,1,2,3,・・・と番号を付し(番号0はDC係数に相当)、符号番号1のゼロランレングスが1、符号番号2のゼロランレングスが3、符号3のゼロランレングスが0である場合、AC係数用レジスタ16のうち、第2番目、第6番目、第7番目のレジスタに対して選択信号が出力され(選択信号がHレベルとなってアクティブ状態となる)、第1番目、第3番目〜第5番目のレジスタには選択信号は出力されない(選択信号はLレベルとなって非アクティブ状態)。書き込むべきレジスタを選択した後、選択したレジスタに可変長符号デコーダ10からのAC係数復号データを書き込む(S105)。このデータは符号付レベルデータである。
On the other hand, when the input data is an AC coefficient, only the register corresponding to the non-zero component specified by the run-length data is selected from the AC coefficient register 16 having a 63 word register and selected by the selection signal. (S104). For example, 0, 1, 2, 3,... Are sequentially added to the word data from the beginning of the block (
以上の処理を全ての係数データについて繰り返し実行し(S106)、合計64個のデータをレジスタ14,16に格納する。格納されたデータは既述したようにセレクタ18を介して同時に(例えば8個のデータあるいはそれ以上のデータがパラレルに)逆DCT器20に供給される。
The above process is repeated for all coefficient data (S106), and a total of 64 data is stored in the
図3には、DC係数用レジスタ14の構成が示されている。DC係数用レジスタ14の前段にセレクタ13が設けられ、このセレクタ13に信号線100を介してデータ(復号データ)が供給され、信号線104を介してDC/AC識別信号が供給され、信号線106を介して選択信号が供給される。
FIG. 3 shows the configuration of the
セレクタ13は、DC/AC識別信号がDCを指定する場合、あるいは選択信号がHレベルである場合に、信号線100を介して供給されたデータをDC係数用レジスタ14に供給する。DC係数用レジスタ14はクロック信号CLKに同期してDC係数復号データを格納する。DC/AC識別信号がACを指定する場合、あるいは選択信号がLレベルである場合、セレクタ13は信号線100からのデータを出力せず、DC係数用レジスタ14の値を保持する。
The
また、図4には、AC係数用レジスタ16の構成が示されている。AC係数用レジスタ16の全てのレジスタの前段にセレクタ15が設けられ、このセレクタ15に信号線100を介してデータ(復号データ)が供給され、信号線104を介してDC/AC識別信号が供給され、信号線106を介して選択信号が供給される。また、セレクタ15にはゼロデータも供給される。
FIG. 4 shows the configuration of the
セレクタ15は、DC/AC識別信号がDCを指定する場合、ゼロデータを選択してAC係数用レジスタ16に供給する。AC係数用レジスタ16は、クロック信号CLKに同期して選択信号によらずゼロデータを格納する。累加デコーダ12において、DC/AC識別信号がDCを指定する場合にDC係数用レジスタ14及びAC係数用レジスタ16に供給する全ての選択信号をHレベル(アクティブ状態)として全てのレジスタへの書き込みを許可する構成としてもよい。DC/AC識別信号がACを指定する場合、セレクタ15は選択信号がHレベルである場合にのみ信号線100からのデータを選択してAC係数用レジスタ16に供給する。選択信号がLレベルの場合、セレクタ15は信号線100からのデータを出力せず、AC係数用レジスタ16に格納されたゼロデータはそのまま維持される。
When the DC / AC identification signal specifies DC, the
このように、本実施形態では、DC係数用レジスタ14にDC係数復号データを書き込むタイミングにおいて、同時にAC係数用レジスタ16の全てのレジスタ(合計63個のレジスタ)にゼロデータを書き込んで初期化するため、別途、レジスタを初期化する処理が不要化される。また、AC係数復号データを書き込む際にも、AC係数用レジスタ16のうち非ゼロ成分に対応するレジスタのみに復号データを書き込むだけで、1ブロックの復号データをレジスタ内に格納することができる。また、本実施形態では、RAMではなく全64ワードのレジスタを用いているため、逆量子化や逆DCT等、後段の処理が必要とする複数のデータを複数同時に、また適切な順次(ジグザグスキャンに対応した順次)で出力することもできる。
As described above, in this embodiment, at the timing of writing the DC coefficient decoded data to the
以上、本発明の実施形態について説明したが、本発明はこれに限らず種々の変形が可能である。 As mentioned above, although embodiment of this invention was described, this invention is not restricted to this, A various deformation | transformation is possible.
例えば、本実施形態ではDC係数用レジスタ14及びAC係数用レジスタ16をそれぞれ1つずつ設けているが、DC係数用レジスタ14及びAC係数用レジスタ16からなるレジスタセットを2セット設け、これらの書き込み及び読み出しを交互に切り替えて実行することで、全体のスループットを一層向上させることもできる。
For example, in the present embodiment, one
図5には、このようにレジスタセットを2セット設けたダブル(あるいはデュアル)レジスタシステムの構成が示されている。 FIG. 5 shows a configuration of a double (or dual) register system in which two register sets are provided as described above.
第1のレジスタセットはDC係数用レジスタ14a及びAC係数用レジスタ16aから構成され、第2のレジスタセットはDC係数用レジスタ14b及びAC係数用レジスタ16bから構成される。
The first register set includes a
あるブロックのデータストリームが復号装置に供給されると、累加デコーダ12はDC係数用レジスタ14a及びAC係数用レジスタ16aを選択し、上述した処理によりDC係数及びAC係数の復号データを書き込む。具体的には、DC係数の場合にはDC係数用レジスタ14a及びAC係数用レジスタ16aの選択信号をHレベルとし、DC係数用レジスタ14b及びAC係数用レジスタ16bの選択信号をLレベルとして、DC係数の復号データをDC係数レジスタ14aに書き込むとともに、ゼロデータをAC係数用レジスタ16aに書き込む。次に、AC係数の場合にはAC係数用レジスタ16aのうち、ランレングスデータで特定される非ゼロ成分に対応するレジスタのみ選択信号をHレベルとしてAC係数の復号データを書き込む。
When a data stream of a certain block is supplied to the decoding device, the
次のブロックのデータストリームが復号装置に供給されると、累加デコーダ12はDC係数用レジスタ14b及びAC係数用レジスタ16bを選択し、上述した処理によりDC係数及びAC係数の復号データを書き込む。具体的には、DC係数の場合にはDC係数用レジスタ14b及びAC係数用レジスタ16bの選択信号をHレベルとし、DC係数用レジスタ14a及びAC係数用レジスタ16aの選択信号をLレベルとして、DC係数の復号データをDC係数レジスタ14bに書き込むとともに、ゼロデータをAC係数用レジスタ16bに書き込む。次に、AC係数の場合にはAC係数用レジスタ16bのうち、ランレングスデータで特定される非ゼロ成分に対応するレジスタのみ選択信号をHレベルとしてAC係数の復号データを書き込む。また、このブロックの復号データをDC係数用レジスタ14b及びAC係数用レジスタ16bに書き込むタイミングにおいて、既に前のブロックの復号データが格納されているDC係数用レジスタ14a及びAC係数用レジスタ16aから復号データを出力する。
When the data stream of the next block is supplied to the decoding device, the
さらに次のブロックのデータストリームが復号装置に供給されると、累加デコーダ12はDC係数用レジスタ14a及びAC係数用レジスタ16aを選択し、DC係数及びAC係数の復号データを書き込む。具体的には、DC係数の場合にはDC係数用レジスタ14a及びAC係数用レジスタ16aの選択信号をHレベルとし、DC係数用レジスタ14b及びAC係数用レジスタ16bの選択信号をLレベルとして、DC係数の復号データをDC係数レジスタ14aに書き込むとともに、ゼロデータをAC係数用レジスタ16aに書き込む。次に、AC係数の場合にはAC係数用レジスタ16aのうち、ランレングスデータで特定される非ゼロ成分に対応するレジスタのみ選択信号をHレベルとしてAC係数の復号データを書き込む。また、このブロックの復号データをDC係数用レジスタ14a及びAC係数用レジスタ16aに書き込むタイミングにおいて、既に前のブロックの復号データが格納されているDC係数用レジスタ14b及びAC係数用レジスタ16bから復号データを出力する。
When the data stream of the next block is supplied to the decoding device, the
以上のようにして、2つのレジスタセットを交互に書き込み/読み出し制御することで、復号処理を高速化できる。 As described above, the decoding process can be speeded up by alternately writing / reading the two register sets.
本実施形態の復号装置は、DCT及びランレングス符号化が施された画像圧縮データを復号して原画像データを出力する任意のデバイスに適用することができ、このようなデバイスの一例は多機能複写機である。 The decoding apparatus of this embodiment can be applied to any device that decodes compressed image data that has been subjected to DCT and run-length encoding and outputs original image data. An example of such a device is multifunctional It is a copier.
10 可変長符号デコーダ(VLD)、12 累加デコーダ、14 DC係数用レジスタ、16 AC係数用レジスタ、18 セレクタ、20 逆DCT器。 10 variable length code decoder (VLD), 12 accumulative decoder, 14 DC coefficient register, 16 AC coefficient register, 18 selector, 20 inverse DCT unit.
Claims (3)
前記データストリームを可変長復号して復号データ、ゼロランレングスデータ及び前記離散コサイン変換のDC成分とAC成分の識別データを出力する可変長復号器と、
前記ブロックの先頭データである離散コサイン変換のDC成分に対応する復号データを格納するDC用レジスタと、
前記ブロックの非先頭データである離散コサイン変換のAC成分に対応する復号データをそれぞれ格納するAC用レジスタと、
前記識別データに基づき、前記データストリームのデータがDC成分に対応する復号データである場合には前記DC用レジスタに前記復号データを書き込むとともに前記AC用レジスタの全てにゼロデータを書き込み、前記データストリームのデータがAC成分に対応する復号データである場合には前記AC用レジスタのうち、前記ランレングスデータが示す非ゼロ成分に対応するレジスタを選択して前記復号データを書き込む手段と、
前記DC用レジスタ及びAC用レジスタに格納されたデータのいずれか複数を所定のタイミングで同時に出力する選択出力手段と、
を有することを特徴とするランレングス符号の復号装置。 An apparatus for decoding a data stream that has been subjected to discrete cosine transform, run length encoding, and variable length encoding for each predetermined block,
A variable length decoder that performs variable length decoding of the data stream and outputs decoded data, zero run length data, and DC component and AC component identification data of the discrete cosine transform;
A DC register for storing decoded data corresponding to the DC component of the discrete cosine transform which is the head data of the block;
AC registers for storing decoded data corresponding to AC components of discrete cosine transform, which is non-leading data of the block,
Based on the identification data, when the data of the data stream is decoded data corresponding to a DC component, the decoded data is written to the DC register and zero data is written to all of the AC registers, and the data stream Means for selecting the register corresponding to the non-zero component indicated by the run-length data and writing the decoded data out of the AC register when the data is decoded data corresponding to the AC component;
Selection output means for simultaneously outputting a plurality of data stored in the DC register and the AC register at a predetermined timing;
A run-length code decoding apparatus comprising:
前記AC用レジスタは、前記データストリームに含まれるAC成分の個数だけ設けられ、
前記書き込む手段は、前記データストリームのデータがAC成分に対応する復号データである場合には前記AC用レジスタのうち、前記ランレングスデータが示す非ゼロ成分に先行するゼロ成分の個数分に対応するレジスタには書き込まず、前記非ゼロ成分に対応するレジスタに前記復号データを書き込む
ことを特徴とするランレングス符号の復号装置。 The apparatus of claim 1.
The AC registers are provided by the number of AC components included in the data stream,
When the data of the data stream is decoded data corresponding to an AC component, the writing means corresponds to the number of zero components preceding the non-zero component indicated by the run-length data in the AC register. An apparatus for decoding a run-length code , wherein the decoded data is written to a register corresponding to the non-zero component without writing to a register .
前記DC用レジスタ及びAC用レジスタの組は、複数個設けられることを特徴とするランレングス符号の復号装置。 The apparatus of claim 1.
A run-length code decoding apparatus , wherein a plurality of sets of the DC register and the AC register are provided .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004077453A JP4461859B2 (en) | 2004-03-18 | 2004-03-18 | Run-length code decoding apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004077453A JP4461859B2 (en) | 2004-03-18 | 2004-03-18 | Run-length code decoding apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005269132A JP2005269132A (en) | 2005-09-29 |
JP4461859B2 true JP4461859B2 (en) | 2010-05-12 |
Family
ID=35093215
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004077453A Expired - Fee Related JP4461859B2 (en) | 2004-03-18 | 2004-03-18 | Run-length code decoding apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4461859B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100547671C (en) * | 2006-07-25 | 2009-10-07 | 华中科技大学 | Coding method for modulation code used in high-density optical disk |
-
2004
- 2004-03-18 JP JP2004077453A patent/JP4461859B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005269132A (en) | 2005-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4782181B2 (en) | Entropy decoding circuit, entropy decoding method, and entropy decoding method using pipeline method | |
JP4682102B2 (en) | Image coding apparatus and image coding method | |
CN108419084B (en) | Method, apparatus and storage medium for improved entropy coding and decoding | |
JP2007300517A (en) | Moving image processing method, program of moving image processing method, recording medium with program of moving image processing method recorded thereon and moving image processor | |
JP4825644B2 (en) | Image decoding apparatus, image encoding apparatus, and system LSI | |
US8457428B2 (en) | Image coding apparatus, control method thereof, and storage medium | |
CN103581680A (en) | Method and system for improving decoder performance through quantization control | |
US7373001B2 (en) | Compressed moving image decompression device and image display device using the same | |
US7356189B2 (en) | Moving image compression device and imaging device using the same | |
JP3940672B2 (en) | Image processing apparatus and image processing method | |
CN110708547B (en) | Efficient entropy coding grouping method for transform modes | |
US8194753B2 (en) | Apparatus processing video stream | |
US20210195196A1 (en) | Video decoding method and video decoding device | |
JP4461859B2 (en) | Run-length code decoding apparatus | |
JP2002112268A (en) | Compressed image data decoding apparatus | |
WO2010095181A1 (en) | Variable-length decoding device | |
CN112449201A (en) | Decoding method, encoding method, corresponding devices, electronic equipment and storage medium | |
JP3861317B2 (en) | Variable length decoder | |
US7262718B2 (en) | Variable length decoder and variable length decoding method | |
KR100816461B1 (en) | Real-time Deblocking Filter and Deblocking Method Using the Same | |
JP2010268094A (en) | Image decoder and image decoding method | |
CN101064515B (en) | Methods to Improve Decoding Performance | |
US20070036445A1 (en) | Method and apparatus of efficient lossless data stream coding | |
JP4095454B2 (en) | Data decoding apparatus and data decoding method | |
JP2001196935A (en) | Data quantizer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070221 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090203 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090401 |
|
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: 20100126 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100208 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130226 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4461859 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: 20130226 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140226 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |