JP2000049621A - Huffman decoding method and data processor - Google Patents

Huffman decoding method and data processor

Info

Publication number
JP2000049621A
JP2000049621A JP10217004A JP21700498A JP2000049621A JP 2000049621 A JP2000049621 A JP 2000049621A JP 10217004 A JP10217004 A JP 10217004A JP 21700498 A JP21700498 A JP 21700498A JP 2000049621 A JP2000049621 A JP 2000049621A
Authority
JP
Japan
Prior art keywords
huffman
decoding
data
bit
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP10217004A
Other languages
Japanese (ja)
Inventor
Junichi Shimizu
純一 清水
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.)
Hitachi Ltd
Hitachi Solutions Technology Ltd
Original Assignee
Hitachi Ltd
Hitachi ULSI Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi ULSI Systems Co Ltd filed Critical Hitachi Ltd
Priority to JP10217004A priority Critical patent/JP2000049621A/en
Publication of JP2000049621A publication Critical patent/JP2000049621A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To speed up a decoding processing. SOLUTION: A decoding table forming means 171 generating the first table of a plurality of bit lengths, which corresponds to a Huffman code value by one to one, and the second table of cut width larger than the first table by using a plurality of bits for the respective inversion positions of the bits of the Huffman code value and a decoding means 173 inverting inputted data, obtaining the bit inversion positions and executing decoding by using the first or the second table in accordance with the bit inversion position are installed. The bit inversion position of inputted data is obtained and the second table is used in accordance with the bit inversion position. Thus a decoding processing speed is improved.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理技術、さ
らにはハフマン復号化の処理を行う回路の改良に関し、
例えばディジタルスチルカメラのデータ処理系に適用し
て有効な技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing technique and, more particularly, to an improvement of a circuit for performing Huffman decoding.
For example, the present invention relates to a technology effective when applied to a data processing system of a digital still camera.

【0002】[0002]

【従来の技術】画像情報や音声情報等のマルチメディア
情報の通信を効率的に実現するための情報符号化(情報
圧縮)技術の国際標準として例えばDCT(Discrete C
osineTransfer=離散コサイン変換)方式によるJPE
G(Joint Photographic Expert Group)がある。符号
化器は原画像の情報を離散コサイン変換(DCT)し、
これを量子化した後に、例えばハフマン符号化して、パ
ラメータと共に符号化されたデータを伝送路に出力可能
にする。復号化器は、パラメータと共に符号化されたデ
ータが伝送路から供給されたとき、それをハフマン復号
化し、逆量子化を行った後、逆離散コサイン変換(ID
CT)を施して再生画像を生成する。量子化及び逆量子
化、また、ハフマン符号化及びハフマン復号化では、そ
れぞれ所定のテーブルが参照される。
2. Description of the Related Art For example, DCT (Discrete C) is an international standard for information encoding (information compression) technology for efficiently realizing communication of multimedia information such as image information and audio information.
JPE by osineTransfer (discrete cosine transform) method
G (Joint Photographic Expert Group). The encoder performs discrete cosine transform (DCT) on the information of the original image,
After this is quantized, for example, Huffman coding is performed so that the data encoded together with the parameters can be output to the transmission path. When the data coded together with the parameters is supplied from the transmission path, the decoder performs Huffman decoding on the data, performs inverse quantization, and then performs inverse discrete cosine transform (ID
CT) to generate a reproduced image. In quantization and dequantization, and in Huffman encoding and Huffman decoding, predetermined tables are respectively referred to.

【0003】尚、ハフマン符号化やハフマン復号化につ
いて記載された文献の例としては、平成3年12月に、
CQ出版から発行された「インタフェース(第160頁
〜)」がある。
As an example of a document describing Huffman encoding and Huffman decoding, in December 1991,
There is an “interface (from page 160)” issued by CQ Publishing.

【0004】[0004]

【発明が解決しようとする課題】従来のハフマン復号化
処理は、ハフマン符号化されたデータを1ビット単位で
データ比較を行うようにしている。つまり、入力された
データの先頭1ビットの論理値が“1”か“0”かを判
別し、もし論理値“0”であれば、次の1ビットの論理
値の比較が行われる。そのようにして異なる論理値がで
た段階で一つ前のビットに戻って復号化を行うようにし
ている。入力されるデータが16ビット長である場合、
このような処理が16回繰り返されることなり、全体と
して非常に時間のかかる処理となる。また、ハフマン符
号値と1対1で対応する16ビット長のテーブルを用い
れば高速化が可能である反面、そのようなテーブルを形
成するには、テーブル容量が著しく増加するため、例え
ばディジタル・スチル・カメラなどへの適用を考える
と、限られたメモリ容量の範囲内でそのような16ビッ
ト長のテーブルを実現するのは困難とされる。
In the conventional Huffman decoding process, data that has been Huffman-encoded is compared in units of one bit. That is, it is determined whether the logical value of the first bit of the input data is “1” or “0”. If the logical value is “0”, the logical value of the next 1 bit is compared. In this way, when a different logical value appears, decoding is performed by returning to the previous bit. If the input data is 16 bits long,
Such a process is repeated 16 times, and it takes a very long time as a whole. Further, if a 16-bit table having a one-to-one correspondence with the Huffman code value can be used, the speed can be increased. However, forming such a table significantly increases the table capacity. -Considering application to a camera or the like, it is difficult to realize such a 16-bit length table within a limited memory capacity.

【0005】本発明の目的は、ハフマン復号化処理の高
速化を図るための技術を提供することにある。
An object of the present invention is to provide a technique for speeding up Huffman decoding processing.

【0006】本発明の別の目的は、テーブル容量を著し
く増加させることなく、ハフマン復号化処理の高速化を
図るための技術を提供することにある。
Another object of the present invention is to provide a technique for speeding up Huffman decoding without significantly increasing the table capacity.

【0007】[0007]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The following is a brief description of an outline of a typical invention among the inventions disclosed in the present application.

【0008】すなわち、ハフマン符号値に1対1で対応
する複数ビット長の第1テーブルを作成し、ハフマン符
号値のビット反転位置毎に複数ビットを用いて上記第1
テーブルよりも大きな刻み幅をもって複数個の第2テー
ブルを作成し、入力されたデータのビット反転位置を求
め、そのビット反転位置に応じて上記第1テーブル又は
上記第2テーブルを用いて上記データを復号化する。
That is, a first table having a plurality of bits having a one-to-one correspondence with the Huffman code value is created, and a plurality of bits are used for each bit inversion position of the Huffman code value.
A plurality of second tables are created with a larger step width than the table, a bit inversion position of input data is obtained, and the data is converted using the first table or the second table according to the bit inversion position. Decrypt.

【0009】上記した手段によれば、入力されたデータ
のビット反転位置を求め、そのビット反転位置に応じて
上記第2テーブルを使うようにしている。上記第1テー
ブル及び第2テーブルはともに複数ビット長のテーブル
となっており、複数ビット単位で復号化処理が可能とさ
れ、このことが、復号化処理の高速化を達成する。
According to the above-mentioned means, the bit inversion position of the input data is obtained, and the second table is used according to the bit inversion position. Both the first table and the second table are tables having a plurality of bits, and the decoding process can be performed in units of a plurality of bits. This achieves a high-speed decoding process.

【0010】入力されたデータが所定値より大きいか否
かを判別する第4ステップ(ステップS13)を設け、
この第4ステップの判別結果に応じて上記第1テーブル
と上記第2テーブルとを使い分けるようにすると良い。
[0010] A fourth step (step S13) for determining whether or not the input data is larger than a predetermined value is provided.
It is preferable that the first table and the second table are selectively used according to the determination result of the fourth step.

【0011】また、入力されたデータが所定値より大き
い場合に、当該データの先頭からのビット反転位置を求
める第5ステップ(ステップS15)と、ビット反転位
置に応じてデータをシフトする第6ステップ(ステップ
S15)と、ビット反転位置に応じてオフセット値を加
算する第7ステップ(ステップS16)とを設けること
ができる。
When the input data is larger than a predetermined value, a fifth step (step S15) for obtaining a bit inversion position from the head of the data and a sixth step for shifting the data according to the bit inversion position (Step S15) and a seventh step (Step S16) of adding an offset value according to the bit inversion position can be provided.

【0012】さらに、ハフマン符号化されたデータを復
号化するハフマン復号化部を含んでデータ処理装置が構
成されるとき、上記ハフマン復号化部は、ハフマン符号
値に1対1で対応する複数ビット長の第1テーブル、及
びハフマン符号値のビット反転位置毎に複数ビットを用
いて上記第1テーブルの刻み幅よりも大きな刻み幅をも
って複数個の第2テーブルを作成する復号化テーブル形
成手段(171)と、入力されたデータを反転してビッ
ト反転位置を求め、ビット反転位置に応じて上記第1テ
ーブル又は上記第2テーブルを用いて復号化する復号化
手段(173)とを設けることができる。
Further, when the data processing device is configured to include a Huffman decoding unit for decoding the Huffman-encoded data, the Huffman decoding unit includes a plurality of bits corresponding to the Huffman code value on a one-to-one basis. Decoding table forming means (171) for creating a plurality of second tables with a step width larger than the step width of the first table using a first table having a long length and a plurality of bits for each bit inversion position of the Huffman code value. ) And decoding means (173) for inverting the input data to obtain a bit inversion position and decoding using the first table or the second table in accordance with the bit inversion position. .

【0013】また、上記データ処理装置において、画像
データを離散コサイン変換するための離散コサイン変換
部(13)と、上記離散コサイン変換部の変換結果を量
子化する量子化部(14)と、上記量子化部の出力デー
タをハフマン符号化するためのハフマン符号化部(1
5)と、上記ハフマン復号化部の出力データを逆量子化
する逆量子化部(18)と、上記逆量子化部の出力デー
タを逆離散コサイン変換する逆離散コサイン変換部(1
9)とを設けることができる。
In the above data processing apparatus, a discrete cosine transform unit (13) for performing discrete cosine transform of image data, a quantization unit (14) for quantizing a transform result of the discrete cosine transform unit, A Huffman encoding unit (1) for Huffman encoding the output data of the quantization unit.
5), an inverse quantization unit (18) for inversely quantizing the output data of the Huffman decoding unit, and an inverse discrete cosine transform unit (1) for performing an inverse discrete cosine transform of the output data of the inverse quantization unit.
9) can be provided.

【0014】[0014]

【発明の実施の形態】図1には本発明にかかる画像処理
装置の一例であるディジタル・スチル・カメラの構成例
が示される。
FIG. 1 shows a configuration example of a digital still camera which is an example of an image processing apparatus according to the present invention.

【0015】CCD(Charge Coupled
Device)カメラ11によって撮像された画像デー
タはRGB形式からYUV形式に変換されてから後段の
画像メモリ12に格納される。この画像メモリ12から
読み出されたYUVデータは、後段のDCT部13に入
力されて離散コサイン変換される。この変換結果は、後
段の量子化部14で量子化されてから、後段のハフマン
符号化部15に入力されてハフマン符号化される。ハフ
マン符号化されたデータは、JPEGファイルとされ
る。
[0015] CCD (Charge Coupled)
Image data captured by the device camera 11 is converted from the RGB format to the YUV format, and then stored in the image memory 12 at the subsequent stage. The YUV data read from the image memory 12 is input to the DCT unit 13 at the subsequent stage and is subjected to discrete cosine transform. The result of this conversion is quantized by the subsequent quantization unit 14, and then input to the subsequent Huffman encoding unit 15 and subjected to Huffman encoding. The Huffman encoded data is a JPEG file.

【0016】上記フラッシュメモリ16に格納されたデ
ータは、必要に応じて読み出されてハフマン復号化部1
7に伝達され、ここで復号化される。この復号化処理に
ついては後に詳述する。そして、復号化部17で復号化
されたデータは逆量子化部18で逆量子化され、IDC
T19で逆離散コサイン変換されてから後段の画像メモ
リ20を介して後段の液晶ディスプレイ(LCD)21
に伝達されて表示される。
The data stored in the flash memory 16 is read out as needed, and is read out by the Huffman decoding unit 1.
7 where it is decoded. This decoding processing will be described later in detail. The data decoded by the decoding unit 17 is inversely quantized by the inverse quantization unit 18 and
After the inverse discrete cosine transform at T19, the subsequent liquid crystal display (LCD) 21 via the subsequent image memory 20
Is transmitted to and displayed.

【0017】上記JPEGファイルは、DHTマーカや
DQTマーカを含む。DHTマーカは復号化テーブル情
報であり、ハフマン復号化部17では、このDHTマー
カに基づいて復号化テーブルを形成し、それを参照する
ことでハフマン復号化処理を行う。また、上記DQTマ
ーカは量子化テーブル情報であり、逆量子化部18で
は、このDQTマーカに基づいて逆量子化テーブルを作
成し、それを参照することで逆量子化処理を行う。
The JPEG file contains a DHT marker and a DQT marker. The DHT marker is decoding table information, and the Huffman decoding unit 17 forms a decoding table based on the DHT marker, and performs Huffman decoding processing by referring to the table. The DQT marker is quantization table information, and the inverse quantization unit 18 creates an inverse quantization table based on the DQT marker, and performs an inverse quantization process by referring to the table.

【0018】図2には上記ハフマン復号化部17の構成
例が示される。
FIG. 2 shows a configuration example of the Huffman decoding unit 17.

【0019】図2に示されるように、ハフマン復号化部
17は、特に制限されないが、ハフマン符号値に1対1
で対応する16ビット長の第1テーブル、及びハフマン
符号値のビット反転位置毎に複数ビットを用いて上記第
1テーブルよりも刻み幅の大きな複数個の第2テーブル
を作成する復号化テーブル形成手段171と、上記第1
テーブル及び第2テーブルが格納されるRAM(ランダ
ム・アクセス・メモリ)172と、入力されたデータ
(ハフマン符号値)を反転してからビット反転位置を求
め、このビット反転位置に応じて上記第1テーブル又は
上記第2テーブルを用いて復号化する復号化手段173
とを含んで成る。
As shown in FIG. 2, the Huffman decoding unit 17 has a one-to-one correspondence with the Huffman code value, although there is no particular limitation.
And a decoding table forming means for generating a plurality of second tables having a larger step width than the first table by using a first table having a length of 16 bits and a plurality of bits for each bit inversion position of the Huffman code value. 171 and the first
A RAM (random access memory) 172 in which the table and the second table are stored, and a bit inversion position obtained after inverting input data (Huffman code value). Decoding means 173 for decoding using the table or the second table
And

【0020】このように、ハフマン符号化部17でのハ
フマン復号化処理では、復号化テーブルの作成ステッ
プ、及びそのテーブルを参照して復号化するステップが
含まれる。
As described above, the Huffman decoding process in the Huffman encoder 17 includes a step of creating a decoding table and a step of decoding with reference to the table.

【0021】次に、復号化テーブル作成手段171によ
って行われる復号化テーブル作成について説明する。
Next, the decoding table creation performed by the decoding table creation means 171 will be described.

【0022】先ず、ハフマン符号値(16ビット長)の
反転値を昇順に並べる。尚、ハフマン符号値が16ビッ
ト未満の場合には左寄せデータとし、符号以外は論理値
“0”を割り当てることにより16ビット長とする。
First, the inverted values of the Huffman code value (16-bit length) are arranged in ascending order. If the Huffman code value is less than 16 bits, it is left-justified data, and other than the code, the logical value "0" is assigned to make it 16 bits long.

【0023】図3に示されるように、昇順に並べられた
反転値(1で示される)において、16進表記でH’0
01−H’007F(ビット反転位置:0〜6)の範囲
では、+1刻みの1対1のテーブル(2で示される)が
作成され、16進表記でH’0080−H’FFFF
(ビット反転位置:7−15)の範囲では、ビット反転
位置単位に次4ビット(3で示される)を用いて複数個
のテーブル(4で示される)が作成される。何個のテー
ブルが必要となるかは、ハフマン符号化されたデータの
DHTマーカによって決定される。
As shown in FIG. 3, H'0 in hexadecimal notation is used for inverted values (indicated by 1) arranged in ascending order.
In the range of 01-H'007F (bit inversion positions: 0 to 6), a one-to-one table (indicated by 2) in increments of +1 is created, and H'0080-H'FFFF in hexadecimal notation.
In the range of (bit inversion position: 7-15), a plurality of tables (indicated by 4) are created using the next 4 bits (indicated by 3) in bit inversion position units. How many tables are needed is determined by the DHT marker of the Huffman coded data.

【0024】次に、上記のように作成された復号化テー
ブルを参照しながら行われる復号化処理について説明す
る。この復号化処理は復号化処理手段172によって行
われる。
Next, a decoding process performed with reference to the decoding table created as described above will be described. This decoding processing is performed by the decoding processing means 172.

【0025】図3に示されるように、フラッシュシュメ
モリ16からハフマン符号値を16ビット分リードし、
そのデータ値をビット反転する。そして、ビット反転し
たデータからビット反転位置(5で示される)を求め
る。
As shown in FIG. 3, a 16-bit Huffman code value is read from the flash memory 16 and
Bit invert the data value. Then, a bit inversion position (indicated by 5) is obtained from the bit-inverted data.

【0026】このビット反転位置が、0〜7ビット目の
場合には反転値(6で示される)がキー(図7で示され
る)とされて復号化テーブルのサーチが行われて、対応
するテーブル値が求められる。
When the bit inversion position is the 0th to 7th bits, the inverted value (indicated by 6) is used as a key (indicated by FIG. 7), and a search of the decoding table is performed. Table values are determined.

【0027】ビット判定位置が、8〜15ビット目の場
合には、図4に示されるように、ビット反転位置から5
ビット(8で示される)を取り出して、ビット反転位置
に応じたオフセット値(9で示される)が加算されて復
号化のキー(10で示される)として対応するテーブル
値が求められる。
If the bit determination position is the 8th to 15th bit, as shown in FIG.
The bit (indicated by 8) is taken out, and an offset value (indicated by 9) corresponding to the bit inversion position is added to obtain a corresponding table value as a key for decoding (indicated by 10).

【0028】図6及び図7にはさらに具体的な復号化テ
ーブルが示される。
FIGS. 6 and 7 show more specific decoding tables.

【0029】紙面の都合により、図6にはNo.1〜N
o.223のテーブルが示され、図7にはNo.224
〜No.319のテーブルが示される。また、値が連続
している箇所は部分的に省略されている。
Due to space limitations, FIG. 1 to N
o. 223 is shown in FIG. 224
-No. 319 is shown. Further, portions where the values are continuous are partially omitted.

【0030】図6及び図7では、テーブル値とそれに対
応する符号、及びその反転値が示される。説明の便宜
上、符号及びその反転値は2進、16進の双方で示され
る。テーブル値には、グループ番号(ステップSSS
S)、符号長(length)、ラン長(run)が挙
げられる。
FIGS. 6 and 7 show table values, their corresponding signs, and their inverted values. For convenience of explanation, the sign and its inverted value are shown in both binary and hexadecimal. The table value contains the group number (step SSS
S), code length (length), and run length (run).

【0031】ハフマン符号値(16ビット長)の反転値
が昇順に並べられ、16進表記でH’000−H’00
7F(ビット反転位置:0〜6)の範囲では、+1刻み
の1対1のテーブル(第1テーブル)とされ、16進表
記でH’0080−H’FFFF(ビット反転位置:7
−15)の範囲では、ビット反転位置毎に次6ビットを
用いて第1テーブルよりも大きな刻み幅で複数個のテー
ブル(第2テーブル)が作成されている。第2テーブル
における刻み幅は、次のようになっている。
Inversion values of the Huffman code value (16-bit length) are arranged in ascending order, and H'000-H'00 in hexadecimal notation.
In the range of 7F (bit inversion positions: 0 to 6), a one-to-one table (first table) in increments of +1 is set, and H'0080-H'FFFF in hexadecimal notation (bit inversion positions: 7).
In the range of -15), a plurality of tables (second tables) are created with a larger step width than the first table using the next 6 bits for each bit inversion position. The step width in the second table is as follows.

【0032】No.128〜160では、H’02刻
み、No.161〜191では、H’02刻み、No.
192〜207では、H’10刻み、No.208〜2
23では、H’20刻み、No.224〜239では、
H’40刻み、No.240〜255では、H’80刻
み、No.256〜271では、H’100刻み、N
o.272〜287では、H’200刻み、No.28
8〜303では、H’400刻み、No.304〜31
9では、H’800刻みとされる。
No. In the case of Nos. 128 to 160, the increment is H'02, In Nos. 161 to 191, the unit is H′02,
In Nos. 192 to 207, H'10 increments are used. 208-2
No. 23, H'20 increments; In 224 to 239,
No. H'40, No. In the case of Nos. 240 to 255, H'80 is used. In 256-271, H'100 increments, N
o. In Nos. 272 to 287, H'200 increments are used. 28
In Nos. 8 to 303, steps of H'400 are used. 304-31
In H.9, the increment is H'800.

【0033】図8には復号化手段173による復号化処
理の具体的な流れが示される。
FIG. 8 shows a specific flow of the decoding process by the decoding means 173.

【0034】先ず、フラッシュメモリ16からハフマン
符号値を16ビット分リードし(ステップS11)、そ
のデータ値をビット反転する(ステップS12)。
First, a 16-bit Huffman code value is read from the flash memory 16 (step S11), and the data value is bit-inverted (step S12).

【0035】次に、上記ステップS12でビット反転さ
れたデータが、16進表記でH’80より大きいか否か
の判別が行われる(ステップS13)。この判別におい
て、H’80より小さい(NO)と判断された場合に
は、このビット反転されたデータをそのままキーとして
復号化テーブルがサーチされ、対応するテーブル値(S
SSS,length,run)が求められる。
Next, it is determined whether the data bit-inverted in step S12 is greater than H'80 in hexadecimal notation (step S13). If it is determined in this determination that the value is smaller than H'80 (NO), the decoding table is searched using the bit-inverted data as a key, and the corresponding table value (S
SSS, length, run) are obtained.

【0036】また、上記ステップS13の判別におい
て、反転されたデータがH’80より大きい(YES)
と判断された場合には、先頭からビット反転位置が求め
られ(ステップS14)、このビット反転位置に応じて
右シフトされ(ステップS15)、さらにビット反転位
置に応じてオフセット値が加算されることでキーが求め
られる(ステップS16)。ここで、第2テーブル(N
o.128〜319)におけるキーは次のようになる。
In the determination in step S13, the inverted data is larger than H'80 (YES).
If it is determined that the bit inversion position is obtained from the beginning (step S14), the bit is shifted to the right according to the bit inversion position (step S15), and an offset value is added according to the bit inversion position. Is used to obtain a key (step S16). Here, the second table (N
o. The keys in 128 to 319) are as follows.

【0037】No.128〜160では、反転値が1ビ
ット右シフトされて、オフセット値H’40が加算され
ることで、キーは、0080〜00A0までの33個と
される。
No. In 128 to 160, the inverted value is shifted right by one bit, and the offset value H'40 is added, so that the number of keys becomes 0080 to 00A0.

【0038】No.161〜191では、同様に反転値
が1ビット右シフトされて、オフセット値H’40が加
算されることで、キーは、00A1〜00BFまでの3
1個とされる。
No. In 161 to 191, similarly, the inverted value is right-shifted by one bit and the offset value H′40 is added, so that the key becomes 3 from 00A1 to 00BF.
It is one.

【0039】No.192〜207では、反転値が4ビ
ット右シフトされて、オフセット値H’B0が加算され
ることで、キーは、00C0〜00CFまでの16個と
される。
No. In 192 to 207, the inverted value is right-shifted by 4 bits, and the offset value H'B0 is added, so that 16 keys from 00C0 to 00CF are provided.

【0040】No.208〜223では、反転値が5ビ
ット右シフトされて、オフセット値H’C0が加算され
ることで、キーは、00D0〜00DFまでの16個と
される。
No. In 208 to 223, the inverted value is right-shifted by 5 bits and the offset value H'C0 is added, so that 16 keys from 00D0 to 00DF are provided.

【0041】No.224〜239では、反転値が6ビ
ット右シフトされて、オフセット値H’D0が加算され
ることで、キーは、00E0〜00EFまでの16個と
される。
No. In 224 to 239, the inverted value is right-shifted by 6 bits, and the offset value H'D0 is added, so that 16 keys from 00E0 to 00EF are provided.

【0042】No.240〜255では、反転値が7ビ
ット右シフトされて、オフセット値H’E0が加算され
ることで、キーは、00F0〜00FFまでの16個と
される。
No. In 240 to 255, the inverted value is shifted right by 7 bits, and the offset value H'E0 is added, so that the keys are set to 16 keys from 00F0 to 00FF.

【0043】No.256〜271では、反転値が8ビ
ット右シフトされて、オフセット値H’F0が加算され
ることで、キーは、0100〜010Fまでの16個と
される。
No. In 256 to 271, the inverted value is shifted right by 8 bits, and the offset value H′F0 is added, so that 16 keys from 0100 to 010F are provided.

【0044】No.272〜287では、反転値が9ビ
ット右シフトされて、オフセット値H’100が加算さ
れることで、キーは、0110〜011Fまでの16個
とされる。
No. In 272 to 287, the inverted value is shifted right by 9 bits, and the offset value H'100 is added, so that the keys are 16 from 0110 to 011F.

【0045】No.288〜303では、反転値が10
ビット右シフトされて、オフセット値H’110が加算
されることで、キーは、0120〜012Fまでの16
個とされる。
No. In the case of 288 to 303, the inversion value is 10
The key is shifted right by a bit and the offset value H′110 is added, so that the key becomes 16 from 0120 to 012F.
Individual.

【0046】No.304〜319では、反転値が11
ビット右シフトされて、オフセット値H’120が加算
されることで、キーは、0130〜013Fまでの16
個とされる。
No. In 304 to 319, the inverted value is 11
The key is shifted right by a bit and the offset value H′120 is added, so that the key becomes 16 from 0130 to 013F.
Individual.

【0047】このようなキーを用いてテーブルがサーチ
されることでテーブル値(SSSS,length,r
un)が求められる。
When the table is searched using such a key, the table value (SSSS, length, r
un).

【0048】ここで、従来技術に従えば、ハフマン符号
化されたデータを1ビット単位でデータ比較を行うこと
で復号化されていたため、入力されるデータが16ビッ
ト長である場合、このような処理が16回繰り返される
ことなり、非常に時間のかかる処理となる。これに対し
て上記した例では、ハフマン符号化されたデータを16
ビット単位で復号化処理するようにしているので、従来
のように1ビット単位でデータ比較を行うのに比べて、
復号化の効率向上を図ることができる。
Here, according to the prior art, the Huffman-encoded data is decoded by comparing the data in 1-bit units, so that when the input data is 16 bits long, The process is repeated 16 times, which is a very time-consuming process. On the other hand, in the above example, the Huffman encoded data is
Since the decoding process is performed on a bit-by-bit basis, data comparison is performed on a bit-by-bit basis as in the related art.
Decoding efficiency can be improved.

【0049】また、ハフマン符号値と1対1に対応する
16ビット長のテーブルを用いれば高速化が可能である
反面、そのようなテーブルを形成するには、テーブル容
量が著しく増加するため、例えばディジタル・スチル・
カメラなどへの適用を考えると、限られたメモリ容量の
範囲内でそのような16ビット長のテーブルを実現する
のは困難とされる。これに対して上記した例では、ハフ
マン符号化されたデータが、H’80に満たない場合に
は、そのデータ(反転値)をキーとして第1テーブルが
サーチされるが、ハフマン符号化されたデータが、H’
80以上になった場合には、上記第1テーブルよりも大
きな刻み幅の第2テーブルがサーチされるようになって
おり、すべてが、ハフマン符号化されたデータに1対1
で対応する16ビット長のテーブルではないから、テー
ブル容量を著しく増加させないで済む。それは、ディジ
タルスティルカメラなどのように製造コストやスペース
との関係で、大容量RAMを搭載できない機器において
有利となる。
The use of a 16-bit table having a one-to-one correspondence with the Huffman code value makes it possible to increase the speed. On the other hand, when such a table is formed, the table capacity is significantly increased. Digital still
Considering application to a camera or the like, it is difficult to realize such a 16-bit length table within a limited memory capacity. On the other hand, in the above example, when the Huffman-encoded data is less than H'80, the first table is searched using the data (inversion value) as a key. Data is H '
When the number becomes 80 or more, the second table having a step size larger than the first table is searched, and all of the data is one-to-one with Huffman-encoded data.
Therefore, the table capacity does not need to be significantly increased because the table is not 16 bits long. This is advantageous in a device such as a digital still camera, which cannot be equipped with a large-capacity RAM because of the manufacturing cost and space.

【0050】上記した例によれば、以下の作用効果を得
ることができる。
According to the above example, the following functions and effects can be obtained.

【0051】(1)第1テーブル(No.1〜127)
及び第2テーブル(No.128〜319)はともに1
6ビット長のテーブルとされ、16ビット単位で復号化
処理を行うことができるので、1ビット単位で復号化処
理を行う場合に比べて、復号化処理の高速化を図ること
ができる。
(1) First table (No. 1 to 127)
And the second table (No. 128 to 319) are both 1
Since the table has a 6-bit length and the decoding process can be performed in 16-bit units, the speed of the decoding process can be increased as compared with the case where the decoding process is performed in 1-bit units.

【0052】(2)16進表記でH’000−H’00
7F(ビット反転位置:0〜6)の範囲では、+1刻み
の1対1のテーブルとされるが、ハフマン符号値H’0
080−H’FFFFでは、ビット反転位置毎に複数ビ
ットを用いて第1テーブルよりも大きな刻み幅をもって
複数の第2テーブル作成しているため、全てを+1刻み
の1対1のテーブルとするのに比べてテーブル形成に必
要な記憶容量の低減化を図ることができる。
(2) H'000-H'00 in hexadecimal notation
In the range of 7F (bit inversion positions: 0 to 6), a one-to-one table in increments of +1 is used, but the Huffman code value H'0
In 080-H'FFFF, a plurality of second tables are created with a larger step width than the first table by using a plurality of bits for each bit inversion position. The storage capacity required for forming the table can be reduced as compared with the case of FIG.

【0053】以上本発明者によってなされた発明を具体
的に説明したが、本発明はそれに限定されるものではな
く、その要旨を逸脱しない範囲で種々変更可能であるこ
とはいうまでもない。
Although the invention made by the inventor has been specifically described above, the present invention is not limited to this, and it goes without saying that various modifications can be made without departing from the gist of the invention.

【0054】例えば、上記した例では、ハフマン符号値
の反転値を求め、この反転値に基づいてテーブルサーチ
のキーを求めるようにしたが、ハフマン符号値を反転し
なくてもテーブルサーチのキーを求めることができる。
また、第1テーブルと第2テーブルとの境界がH’80
とされるが、この値は任意に設定可能とされる。さら
に、第2テーブルにおける刻み幅は、図6及び図7に示
される場合に限定されるものではなく、適宜に変更され
る。
For example, in the above example, the inverted value of the Huffman code value is obtained, and the key of the table search is obtained based on this inverted value. However, the key of the table search can be obtained without inverting the Huffman code value. You can ask.
Also, the boundary between the first table and the second table is H'80.
However, this value can be set arbitrarily. Further, the step width in the second table is not limited to the case shown in FIGS. 6 and 7, but may be changed as appropriate.

【0055】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるディジ
タルスチルカメラに適用した場合について説明したが、
本発明はそれに限定されるものではなく、各種データ処
理装置に適用することができる。
In the above description, mainly the case where the invention made by the present inventor is applied to a digital still camera, which is the field of application as the background, has been described.
The present invention is not limited to this, and can be applied to various data processing devices.

【0056】本発明は、少なくともハフマン符号化され
たデータを取り扱うことを条件に適用することができ
る。
The present invention can be applied on condition that at least Huffman coded data is handled.

【0057】[0057]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。
The effects obtained by typical ones of the inventions disclosed in the present application will be briefly described as follows.

【0058】すなわち、第1テーブル及び第2テーブル
はともに複数ビット長のテーブルとされ、複数ビット単
位で復号化処理を行うことができるので、1ビット単位
で復号化処理を行う場合に比べて、復号化処理の高速化
を図ることができる。
That is, the first table and the second table are both tables having a plurality of bits, and the decoding process can be performed in units of a plurality of bits. The speed of the decoding process can be increased.

【0059】また、第2テーブルは、テーブルの刻み幅
が+1よりも大きくとられ、複数個のテーブルが形成さ
れるため、全てを+1刻みの1対1のテーブルとするの
に比べてテーブル形成に必要な記憶容量の低減化を図る
ことができ、それは、ディジタルスティルカメラなどの
ように製造コストやスペースとの関係で、大容量RAM
を搭載できない機器において有利となる。
In the second table, the step width of the table is set to be larger than +1 and a plurality of tables are formed. The storage capacity required for a large-capacity RAM, such as a digital still camera, can be reduced in terms of manufacturing cost and space.
This is advantageous in a device that cannot be equipped with a.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明にかかるハフマン復号化方法が適用され
るディジタルスチルカメラの構成例ブロック図である。
FIG. 1 is a block diagram illustrating a configuration example of a digital still camera to which a Huffman decoding method according to the present invention is applied.

【図2】上記ディジタルスチルカメラに含まれるハフマ
ン復号化部の構成例ブロック図である。
FIG. 2 is a block diagram illustrating a configuration example of a Huffman decoding unit included in the digital still camera.

【図3】上記ハフマン復号化方法におけるテーブル作成
の説明図である。
FIG. 3 is an explanatory diagram of table creation in the Huffman decoding method.

【図4】ハフマン復号化方法におけるテーブルサーチの
キーを求める手順の説明図である。
FIG. 4 is an explanatory diagram of a procedure for obtaining a table search key in the Huffman decoding method.

【図5】ハフマン復号化方法におけるテーブルサーチの
キーを求める手順の説明図である。
FIG. 5 is an explanatory diagram of a procedure for obtaining a table search key in the Huffman decoding method.

【図6】上記ハフマン復号化方法における具体的なテー
ブルの説明図である。
FIG. 6 is an explanatory diagram of a specific table in the Huffman decoding method.

【図7】上記ハフマン復号化方法における具体的なテー
ブルの説明図である。
FIG. 7 is an explanatory diagram of a specific table in the Huffman decoding method.

【図8】上記ハフマン復号化方法の処理の流れを示すフ
ローチャートである。
FIG. 8 is a flowchart showing a processing flow of the Huffman decoding method.

【符号の説明】[Explanation of symbols]

11 CCDカメラ 12,20 画像メモリ 13 DCT部 14 量子化部 15 ハフマン符号化部 16 フラッシュメモリ 17 ハフマン復号化部 18 逆量子化部 19 IDCT部 21 LCD 171 復号化テーブル形成手段 172 RAM 173 復号化手段 Reference Signs List 11 CCD camera 12, 20 Image memory 13 DCT unit 14 Quantization unit 15 Huffman encoding unit 16 Flash memory 17 Huffman decoding unit 18 Inverse quantization unit 19 IDCT unit 21 LCD 171 Decoding table forming unit 172 RAM 173 Decoding unit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5J064 AA03 BA09 BA16 BC01 BC02 BC16 BC23 BD03  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5J064 AA03 BA09 BA16 BC01 BC02 BC16 BC23 BD03

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ハフマン符号化されたデータを復号化す
るハフマン復号化方法において、 ハフマン符号値に1対1で対応する複数ビット長の第1
テーブルを作成する第1ステップと、 ハフマン符号値のビット反転位置毎に複数ビットを用い
て上記第1テーブルの刻み幅よりも大きな刻み幅をもっ
て複数個の第2テーブルを作成する第2ステップと、 入力されたデータのビット反転位置を求め、そのビット
反転位置に応じて上記第1テーブル又は上記第2テーブ
ルを用いて上記データを復号化する第3ステップと、 を含むことを特徴とするハフマン復号化方法。
1. A Huffman decoding method for decoding Huffman-encoded data, wherein a first bit having a plurality of bits corresponding to a Huffman code value on a one-to-one basis.
A first step of creating a table, and a second step of creating a plurality of second tables with a step width larger than the step width of the first table using a plurality of bits for each bit inversion position of the Huffman code value; A third step of determining a bit inversion position of the input data and decoding the data using the first table or the second table according to the bit inversion position. Method.
【請求項2】 入力されたデータが所定値より大きいか
否かを判別する第4ステップを含み、 上記第4ステップの判別結果に応じて上記第1テーブル
と上記第2テーブルとを使い分ける請求項1記載のハフ
マン復号化方法。
2. The method according to claim 1, further comprising: a fourth step of determining whether or not the input data is greater than a predetermined value, wherein the first table and the second table are selectively used according to a result of the determination in the fourth step. 2. The Huffman decoding method according to 1.
【請求項3】 入力されたデータが所定値より大きい場
合に、当該データの先頭からのビット反転位置を求める
第5ステップと、 ビット反転位置に応じてデータをシフトする第6ステッ
プと、 ビット反転位置に応じてオフセット値を加算する第7ス
テップと、 を含むことを特徴とする請求項2記載のハフマン復号化
方法。
3. When the input data is larger than a predetermined value, a fifth step of obtaining a bit inversion position from the head of the data, a sixth step of shifting data according to the bit inversion position, The Huffman decoding method according to claim 2, further comprising: a seventh step of adding an offset value according to the position.
【請求項4】 ハフマン符号化されたデータを復号化す
るハフマン復号化部を含むデータ処理装置において、 上記ハフマン復号化部は、ハフマン符号値に1対1で対
応する複数ビット長の第1テーブル、及びハフマン符号
値のビット反転位置毎に複数ビットを用いて上記第1テ
ーブルの刻み幅よりも大きな刻み幅をもって複数個の第
2テーブルを作成する復号化テーブル形成手段と、 入力されたデータを反転してビット反転位置を求め、ビ
ット反転位置に応じて上記第1テーブル又は上記第2テ
ーブルを用いて復号化する復号化手段と、 を含むことを特徴とするデータ処理装置。
4. A data processing apparatus including a Huffman decoding unit for decoding Huffman-encoded data, wherein the Huffman decoding unit has a plurality of bit length first tables corresponding to Huffman code values on a one-to-one basis. Decoding table forming means for generating a plurality of second tables with a step width larger than the step width of the first table using a plurality of bits for each bit inversion position of the Huffman code value; Decoding means for inverting to obtain a bit inversion position and decoding using the first table or the second table in accordance with the bit inversion position.
【請求項5】 画像データを離散コサイン変換するため
の離散コサイン変換部と、 上記離散コサイン変換部の変換結果を量子化する量子化
部と、 上記量子化部の出力データをハフマン符号化するための
ハフマン符号化部と、 上記ハフマン復号化部の出力データを逆量子化する逆量
子化部と、 上記逆量子化部の出力データを逆離散コサイン変換する
逆離散コサイン変換部と、 を含む請求項4記載のデータ処理装置。
5. A discrete cosine transform unit for performing discrete cosine transform of image data; a quantizing unit for quantizing a transform result of the discrete cosine transform unit; and a Huffman encoding of output data of the quantizing unit. A Huffman encoding unit, an inverse quantization unit that inversely quantizes the output data of the Huffman decoding unit, and an inverse discrete cosine transform unit that performs an inverse discrete cosine transform of the output data of the inverse quantization unit. Item 5. The data processing device according to Item 4.
JP10217004A 1998-07-31 1998-07-31 Huffman decoding method and data processor Withdrawn JP2000049621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10217004A JP2000049621A (en) 1998-07-31 1998-07-31 Huffman decoding method and data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10217004A JP2000049621A (en) 1998-07-31 1998-07-31 Huffman decoding method and data processor

Publications (1)

Publication Number Publication Date
JP2000049621A true JP2000049621A (en) 2000-02-18

Family

ID=16697323

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10217004A Withdrawn JP2000049621A (en) 1998-07-31 1998-07-31 Huffman decoding method and data processor

Country Status (1)

Country Link
JP (1) JP2000049621A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009118464A (en) * 2007-09-17 2009-05-28 Nvidia Corp Decoding variable-length code in jpeg application
US8339406B2 (en) 2004-01-30 2012-12-25 Nvidia Corporation Variable-length coding data transfer interface
US8477852B2 (en) 2007-06-20 2013-07-02 Nvidia Corporation Uniform video decoding and display
US8502709B2 (en) 2007-09-17 2013-08-06 Nvidia Corporation Decoding variable length codes in media applications
US8687875B2 (en) 2007-12-03 2014-04-01 Nvidia Corporation Comparator based acceleration for media quantization
US8725504B1 (en) 2007-06-06 2014-05-13 Nvidia Corporation Inverse quantization in audio decoding
US8934539B2 (en) 2007-12-03 2015-01-13 Nvidia Corporation Vector processor acceleration for media quantization
US9307267B2 (en) 2008-12-11 2016-04-05 Nvidia Corporation Techniques for scalable dynamic data encoding and decoding

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8339406B2 (en) 2004-01-30 2012-12-25 Nvidia Corporation Variable-length coding data transfer interface
US8427494B2 (en) 2004-01-30 2013-04-23 Nvidia Corporation Variable-length coding data transfer interface
US8725504B1 (en) 2007-06-06 2014-05-13 Nvidia Corporation Inverse quantization in audio decoding
US8477852B2 (en) 2007-06-20 2013-07-02 Nvidia Corporation Uniform video decoding and display
JP2009118464A (en) * 2007-09-17 2009-05-28 Nvidia Corp Decoding variable-length code in jpeg application
JP4693072B2 (en) * 2007-09-17 2011-06-01 エヌヴィディア コーポレイション Decoding variable-length codes in JPEG applications
US8502709B2 (en) 2007-09-17 2013-08-06 Nvidia Corporation Decoding variable length codes in media applications
US8849051B2 (en) 2007-09-17 2014-09-30 Nvidia Corporation Decoding variable length codes in JPEG applications
US8687875B2 (en) 2007-12-03 2014-04-01 Nvidia Corporation Comparator based acceleration for media quantization
US8934539B2 (en) 2007-12-03 2015-01-13 Nvidia Corporation Vector processor acceleration for media quantization
US9307267B2 (en) 2008-12-11 2016-04-05 Nvidia Corporation Techniques for scalable dynamic data encoding and decoding

Similar Documents

Publication Publication Date Title
US7894532B2 (en) Variable-length encoding apparatus and method
Acharya et al. JPEG2000 standard for image compression: concepts, algorithms and VLSI architectures
US7109896B2 (en) Variable length coding apparatus and variable length coding method
US5945930A (en) Data processing apparatus
KR101266577B1 (en) The method and apparatus of processing an image
US20010054973A1 (en) Variable length decoder
JPH0485621A (en) Rounding device
JPH06224777A (en) Coding method, coder, decoding method, decoder, data compressor, bit stream generating method and transition machine generating method
US8254700B1 (en) Optimized method and system for entropy coding
Slattery et al. The qx-coder
EP2289246A2 (en) Fast visual degrading of images
US20110091123A1 (en) Coding apparatus and coding method
JP3940672B2 (en) Image processing apparatus and image processing method
JP2000049621A (en) Huffman decoding method and data processor
Tarui et al. High-speed implementation of JBIG arithmetic coder
US8427348B2 (en) Parallel processing of sequentially dependent digital data
CN111818335A (en) Entropy coding method and device and electronic equipment
JPH10271016A (en) Encoder/decoder
JPH10108180A (en) Image coding data generating method and image coding data decoding method
CN112449191A (en) Method for compressing a plurality of images, method and apparatus for decompressing an image
CN112449201B (en) Decoding method, encoding method, corresponding devices, electronic equipment and storage medium
Bonomini et al. Implementing an MPEG2 Video Decoder Based on TMS320C80 MVP
JP2006108997A (en) Method and device for processing information, program, and storage medium
JP3796354B2 (en) Image coding method
JP2004253889A (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20051004