Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3373132B2 - Digital encoding device and digital decoding device - Google Patents
[go: Go Back, main page]

JP3373132B2 - Digital encoding device and digital decoding device - Google Patents

Digital encoding device and digital decoding device

Info

Publication number
JP3373132B2
JP3373132B2 JP12394797A JP12394797A JP3373132B2 JP 3373132 B2 JP3373132 B2 JP 3373132B2 JP 12394797 A JP12394797 A JP 12394797A JP 12394797 A JP12394797 A JP 12394797A JP 3373132 B2 JP3373132 B2 JP 3373132B2
Authority
JP
Japan
Prior art keywords
code
length
output
data
extracting
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
Application number
JP12394797A
Other languages
Japanese (ja)
Other versions
JPH10322221A (en
Inventor
豊史 堀川
貞彦 樋上
裕史 児玉
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.)
Sharp Corp
Original Assignee
Sharp 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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=14873291&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=JP3373132(B2) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP12394797A priority Critical patent/JP3373132B2/en
Publication of JPH10322221A publication Critical patent/JPH10322221A/en
Application granted granted Critical
Publication of JP3373132B2 publication Critical patent/JP3373132B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、ディジタル符号化
装置およびディジタル復号化装置に関し、特にJPEG
(Joint Photographic Experts Group)、MPEG(Mo
ving Picture Experts Group)、およびDVC(Digita
l Video Camera)方式等の画像処理におけるディジタル
符号化装置およびディジタル復号化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital encoder and a digital decoder, and more particularly to JPEG.
(Joint Photographic Experts Group), MPEG (Mo
ving Picture Experts Group) and DVC (Digita
The present invention relates to a digital encoding device and a digital decoding device in image processing such as Video Camera).

【0002】[0002]

【従来の技術】近年、圧縮技術の急速な進歩により、高
速に大量のデータ処理を必要とするビデオ信号をパーソ
ナルコンピュータやビデオカメラ等で取扱うことが可能
となってきた。
2. Description of the Related Art In recent years, rapid advances in compression technology have made it possible to handle video signals requiring a large amount of data processing at high speed with a personal computer, a video camera or the like.

【0003】図7は、この圧縮技術の1つであるJPE
G方式の画像処理装置の概略構成を示すブロック図であ
る。この画像処理装置は、画素データを離散コサイン変
換(Discrete Cosine Transform 、以下DCTと呼ぶ)
するためのDCT演算部101、DCT演算結果を量子
化するための量子化器102、量子化器102が量子化
を行なう際に参照する量子化テーブル103、量子化さ
れたデータの連続するゼロの個数を計数するためのゼロ
長計数部105、量子化されたデータをグルーピングす
るためのグルーピング部104、2次元ハフマン符号化
を行なうための可変長符号化部106、可変長符号化部
106が2次元ハフマン符号化を行なう際に参照する符
号テーブル107、可変長符号化部106によって求め
られた可変長の符号をパッキングして出力するための固
定長化部108、固定長化部108によってパッキング
された圧縮データの入出力等の処理を行なうためのプロ
セッサ109、プロセッサ109から入力された圧縮デ
ータを所定のビット長データに分解するためのビット抽
出部110、圧縮データからゼロ長とグループ係数とを
求めるための可変長復号化部111、可変長復号化部1
11が復号化を行なう際に参照する復号テーブル11
2、可変長復号化部111によって求められたゼロ長と
グループ係数とを用いて逆量子化を行なうための逆量子
化部113、および逆量子化されたデータを逆離散コサ
イン変換(Inverse Discrete Cosine Transform 、以下
IDCTと呼ぶ)するためのIDCT変換部114を含
む。
FIG. 7 shows JPE which is one of the compression techniques.
It is a block diagram showing a schematic structure of a G system image processing device. This image processing apparatus uses a discrete cosine transform (hereinafter referred to as DCT) to transform pixel data.
A DCT calculation unit 101, a quantizer 102 for quantizing a DCT calculation result, a quantization table 103 referred to when the quantizer 102 quantizes, and a continuous zero of quantized data. The zero length counting unit 105 for counting the number, the grouping unit 104 for grouping the quantized data, the variable length coding unit 106 for performing the two-dimensional Huffman coding, and the variable length coding unit 106 are two. The code table 107 to be referred to when performing the dimension Huffman coding, the fixed length conversion unit 108 for packing and outputting the variable length code obtained by the variable length coding unit 106, and the fixed length conversion unit 108 The processor 109 for inputting / outputting the compressed data and the compressed data input from the processor 109 into a predetermined bit. Variable length decoding unit 111 for bit extraction section 110 for decomposing the length data from the compressed data obtaining a zero-length and grouping factor, the variable length decoding unit 1
Decoding table 11 to be referred to by 11 when performing decoding
2. An inverse quantization unit 113 for performing inverse quantization using the zero length and the group coefficient obtained by the variable length decoding unit 111, and an inverse discrete cosine transform (Inverse Discrete Cosine Transform) of the inversely quantized data. Transform, hereinafter referred to as IDCT).

【0004】JPEG画像圧縮においては、入力される
画像は8×8の画素ブロックに分割され、そのブロック
単位で図7に示す画像処理装置に入力される。まず、D
CT演算部101は、直交変換の一種である離散コサイ
ン変換を行ない、画像を空間周波数領域へ写像する。人
間の視覚は、空間周波数の低周波成分と高周波成分とで
は視覚感度が異なり、主に低周波成分で感度が高く、高
周波成分で感度が低い。したがって、量子化器102は
低周波成分を細かく、高周波成分を粗く量子化する。量
子化特性は量子化テーブル103に格納されており、量
子化器102はDCT演算部101からの出力と同期し
てテーブル値を読出し、量子化を行なう。
In JPEG image compression, an input image is divided into 8 × 8 pixel blocks and the blocks are input to the image processing apparatus shown in FIG. First, D
The CT calculation unit 101 performs a discrete cosine transform, which is a type of orthogonal transform, and maps an image to the spatial frequency domain. Human visual sense has different visual sensitivities between a low-frequency component and a high-frequency component of a spatial frequency, and is mainly sensitive to low-frequency components and low to high-frequency components. Therefore, the quantizer 102 quantizes low frequency components finely and high frequency components roughly. The quantization characteristic is stored in the quantization table 103, and the quantizer 102 reads the table value in synchronization with the output from the DCT operation unit 101 and performs quantization.

【0005】量子化されたDCT演算結果は、高周波成
分で粗く量子化されているためゼロが続くデータとなる
場合が多い。そこで、ゼロ長計数部105は連続するゼ
ロの個数を計数してゼロ長を求める。一方、グルーピン
グ部104は、ゼロでない有値係数に対して図8(a)
に示すようなグルーピングを行ない、グループ係数と付
加係数とに分解する。付加係数とは、グルーピング内に
おけるオフセット値を意味し、ssssはグループ係数
を示している。
Since the quantized DCT operation result is roughly quantized by high frequency components, it is often data in which zeros continue. Therefore, the zero length counting unit 105 counts the number of consecutive zeroes to obtain the zero length. On the other hand, the grouping unit 104 uses the non-zero valued coefficient shown in FIG.
Grouping as shown in (1) is performed to decompose into group coefficients and additional coefficients. The additional coefficient means an offset value within the grouping, and ssss represents a group coefficient.

【0006】図9に示すように、以上の処理で求められ
たゼロ長(nnnn)とグループ係数(ssss)とが
組合わされて、可変長符号化部106に入力される。可
変長符号化部106は、ゼロの個数(1〜16の4ビッ
ト)とグループ係数(4ビット)とに対応したハフマン
符号(最大16ビット)とその符号長(4ビット)を符
号テーブル107から読出し、さらにグルーピング部1
04において求められた付加係数を可変長符号の最下位
ビット(LSB)からマージして固定長化部108に入
力する。
As shown in FIG. 9, the zero length (nnnn) obtained by the above processing and the group coefficient (ssss) are combined and input to the variable length coding unit 106. The variable length coding unit 106, from the code table 107, the Huffman code (maximum 16 bits) and the code length (4 bits) corresponding to the number of zeros (4 bits of 1 to 16) and the group coefficient (4 bits). Read-out, further grouping unit 1
The additional coefficient obtained in 04 is merged from the least significant bit (LSB) of the variable length code and input to the fixed length conversion unit 108.

【0007】固定長化部108は、可変長の符号を8ビ
ットまたは16ビットにパッキングし、外部のプロセッ
サ109に出力する。
The fixed length conversion unit 108 packs the variable length code into 8 bits or 16 bits and outputs the packed code to the external processor 109.

【0008】また、JPEG画像展開においては、ビッ
ト抽出部110が、プロセッサ109から入力される固
定長圧縮データをたとえば16ビット長に分解して出力
する。可変長復号化部111は、16ビット長の圧縮デ
ータに対応したゼロ長(nnnn)とグループ係数(s
sss)とを復号テーブル112を参照して求める。復
号テーブル112には、符号とその符号化要素であるグ
ループ係数(ssss)、ゼロ長(nnnn)、および
符号長が記憶されている。
In the JPEG image expansion, the bit extraction unit 110 decomposes the fixed length compressed data input from the processor 109 into, for example, 16 bits and outputs it. The variable length decoding unit 111 includes a zero length (nnnn) and a group coefficient (s) corresponding to 16-bit compressed data.
sss) is obtained by referring to the decoding table 112. The decoding table 112 stores codes, group coefficients (ssss), coding lengths thereof, zero length (nnnn), and code length.

【0009】逆量子化部113は、グループ係数(ss
ss)から符号係数のビット数を求め、ゼロ長(nnn
n)、グループ係数(ssss)、および付加係数を用
い逆量子化を行なう。そして、IDCT変換部113
は、逆直交変換であるIDCTを行ない再生画像である
復元画素データを求める。
The dequantization unit 113 has a group coefficient (ss
The number of bits of the code coefficient is calculated from ss) and the zero length (nnn
Inverse quantization is performed using n), the group coefficient (ssss), and the additional coefficient. Then, the IDCT conversion unit 113
Performs inverse CT transform IDCT to obtain restored pixel data that is a reproduced image.

【0010】[0010]

【発明が解決しようとする課題】しかし、従来のJPE
G方式の画像処理装置における可変長符号化において、
符号テーブル107にはアドレスとしてゼロ長(nnn
n)4ビットとグループ係数(ssss)4ビットの合
計8ビット、データとしてJPEG方式で規定されるハ
フマン符号の最長符号長である16ビットと符号長を示
す4ビットの合計20ビットのテーブルが必要となり、
合計5,120ビット(28 ×20)のメモリが必要と
なる。
[Problems to be Solved by the Invention] However, the conventional JPE
In the variable-length coding in the G system image processing device,
The code table 107 has an address of zero length (nnn
n) 4 bits and group coefficient (ssss) 4 bits in total, 8 bits in total, 16 bits which is the longest code length of the Huffman code defined by the JPEG method as data, and 4 bits indicating code length, 20 bits in total table are required. Next to
A total of 5,120 bits (2 8 × 20) of memory is required.

【0011】また、従来のJPEG方式の画像処理装置
における可変長復号化において、復号テーブル112に
はアドレスとして固定長符号データ16ビット、データ
としてゼロ長(nnnn)4ビット、グループ係数(s
sss)4ビットおよび実際の符号長(len)4ビッ
トの合計12ビットのテーブルが必要となり、合計78
6,432ビット(216×12)のメモリが必要とな
る。
In variable length decoding in a conventional JPEG image processing apparatus, the decoding table 112 has 16 bits of fixed-length code data as an address, 4 bits of zero length (nnnn) as data, and a group coefficient (s).
A total of 12-bit table of sss) 4 bits and actual code length (len) 4 bits is required, and a total of 78
A 6,432-bit (2 16 × 12) memory is required.

【0012】符号化および復号化におけるテーブルメモ
リの削減に関する技術として、特開平8−84081号
公報に開示された発明がある。この発明における符号化
においては、符号テーブルの可変長符号の符号長データ
4ビット分を削減し、符号長を符号から計算して求めて
いる。ところが、この方法においても16ビット分のデ
ータが必要であり、合計4,096ビット(28 ×1
6)のメモリが必要となるため、大幅なメモリ容量削減
には至らない。
As a technique for reducing the table memory in encoding and decoding, there is the invention disclosed in Japanese Patent Laid-Open No. 8-84081. In the encoding according to the present invention, the code length of the variable length code in the code table is reduced by 4 bits, and the code length is calculated from the code. However, this method also requires 16 bits of data, and a total of 4,096 bits (2 8 × 1
Since the memory of 6) is required, the memory capacity cannot be significantly reduced.

【0013】同様に、復号化においても復号テーブル1
12の符号長4ビット分を削減し、演算によって符号長
を求めることで、データ幅を8ビットに削減している
が、それでも合計524,288ビット(216×8)と
容量が大きく、安価なハードロジック化を実現するには
さらなる容量削減が要求される。
Similarly, in decoding, the decoding table 1
The data width is reduced to 8 bits by reducing the code length of 4 bits by 12 and calculating the code length by calculation, but the total capacity is still large at 524,288 bits (2 16 × 8), and it is inexpensive. Further realization of advanced hard logic requires further capacity reduction.

【0014】本発明は、上記問題点を解決するためにな
されたものであり、請求項1および2記載の発明の目的
は、可変長符号化の際に参照されるテーブルの容量を削
減することである。
The present invention has been made to solve the above problems, and an object of the present invention is to reduce the capacity of a table referred to in variable length coding. Is.

【0015】請求項3〜8に記載の発明の目的は、可変
長復号化の際に参照されるテーブルの容量を削減するこ
とである。
An object of the invention described in claims 3 to 8 is to reduce the capacity of a table referred to in variable length decoding.

【0016】[0016]

【課題を解決するための手段】請求項1に記載のディジ
タル符号化装置は、入力データを直交変換するための変
換手段と、変換手段によって直交変換された入力データ
のゼロ長と有値係数とを抽出するための抽出手段と、抽
出手段によって抽出されたゼロ長と有値係数とに基づい
て、符号長と符号長における当該符号の発生頻度を出力
するための第1の出力手段と、第1の出力手段から出力
される符号長に基づいて、符号長の符号の中で最も発生
頻度の高い符号を出力するための第2の出力手段と、第
1の出力手段から出力される発生頻度と第2の出力手段
から出力される最も発生頻度の高い符号とを加算するた
めの第1の加算手段とを含む。
According to a first aspect of the present invention, there is provided a digital encoding device, which comprises a conversion means for orthogonally converting input data, a zero length and a value coefficient of the input data orthogonally converted by the conversion means. A first output means for outputting the code length and the frequency of occurrence of the code in the code length based on the zero length and the valence coefficient extracted by the extraction means; Second output means for outputting the code having the highest occurrence frequency among the codes of the code length based on the code length output from the first output means, and the occurrence frequency output from the first output means And a first adding means for adding the code having the highest occurrence frequency output from the second output means.

【0017】第1の出力手段は、符号長とこの符号長に
おける当該符号の発生頻度のみを記憶し、第2の出力手
段は符号長の符号の中で最も発生頻度の高い符号のみを
記憶する。したがって、第1の出力手段と第2の出力手
段の記憶容量を、小さくすることが可能となる。
The first output means stores only the code length and the frequency of occurrence of the code at this code length, and the second output means stores only the code having the highest frequency of occurrence among the codes of the code length. . Therefore, the storage capacities of the first output means and the second output means can be reduced.

【0018】請求項2に記載のディジタル符号化装置
は、請求項1記載のディジタル符号化装置であって、抽
出手段はゼロ長を計数するためのゼロ長計数手段と、有
値係数をグループ係数と付加ビットに変換するためのグ
ルーピング手段とを含み、ディジタル符号化装置はさら
にグルーピング手段によって変換されたグループ係数と
第1の出力手段によって出力された符号長とを加算する
ための第2の加算手段と、第1の加算手段によって加算
された符号とグルーピング手段によって変換された付加
ビットとを固定長符号に変換して出力するための固定長
化手段とを含む。
According to a second aspect of the present invention, there is provided a digital encoding apparatus according to the first aspect, wherein the extracting means is a zero length counting means for counting zero length, and the value coefficient is a group coefficient. And a grouping means for converting into additional bits, and the digital encoding device further includes a second addition for adding the group coefficient converted by the grouping means and the code length output by the first output means. Means and fixed length conversion means for converting the code added by the first adding means and the additional bit converted by the grouping means into a fixed length code and outputting the fixed length code.

【0019】請求項3に記載のディジタル復号化装置
は、固定長符号から所定ビット長の符号データを抽出す
るための符号データ抽出手段と、符号データ抽出手段に
よって抽出された符号データから符号長を抽出するため
の符号長抽出手段と、符号長抽出手段によって抽出され
た符号長に基づいて所定ビット長の符号データから符号
を切出すための切出手段と、切出手段によって切出され
た符号に基づいてゼロ長とグループ係数とを出力するた
めの第3の出力手段とを含む。
According to a third aspect of the present invention, there is provided a digital decoding device in which a code data extracting means for extracting code data having a predetermined bit length from a fixed length code and a code length from the code data extracted by the code data extracting means. Code length extracting means for extracting, cutout means for cutting out a code from code data having a predetermined bit length based on the code length extracted by the code length extracting means, and code cut out by the cutting means And third output means for outputting a zero length and a group coefficient based on

【0020】第3の出力手段は、ゼロ長とグループ係数
のみを記憶する。したがって、その記憶容量を削減する
ことが可能となる。
The third output means stores only the zero length and the group coefficient. Therefore, it is possible to reduce the storage capacity.

【0021】請求項4に記載のディジタル復号化装置
は、請求項3記載のディジタル復号化装置であって、符
号データ抽出手段は符号長抽出手段によって抽出された
符号長と第3の出力手段によって出力されたグループ係
数とに基づいて、所定ビット長の符号データの先頭アド
レスを算出する。
A digital decoding device according to a fourth aspect is the digital decoding device according to the third aspect, wherein the code data extracting means is the code length extracted by the code length extracting means and the third output means. The start address of the code data having a predetermined bit length is calculated based on the output group coefficient.

【0022】請求項5に記載のディジタル復号化装置
は、請求項3記載のディジタル復号化装置であって、符
号長抽出手段は符号長の符号の中で最も発生頻度の高い
符号を出力するための第4の出力手段と、符号データ抽
出手段によって抽出された符号データの最初の複数ビッ
トと第4の出力手段によって出力される最も発生頻度の
高い符号との比較によって符号長を決定するための決定
手段とを含む。
A digital decoding device according to a fifth aspect of the present invention is the digital decoding device according to the third aspect, wherein the code length extraction means outputs the code having the highest occurrence frequency among the codes of the code length. For determining the code length by comparing the first plurality of bits of the code data extracted by the code data extraction means with the code with the highest frequency of occurrence output by the fourth output means. And determining means.

【0023】請求項6に記載のディジタル復号化装置
は、請求項3記載のディジタル復号化装置であって、符
号データ抽出手段は第3の出力手段によって出力される
グループ係数に基づいて付加ビットを切出す。
A digital decoding device according to a sixth aspect of the present invention is the digital decoding device according to the third aspect, wherein the code data extracting means adds the additional bits based on the group coefficient output by the third output means. Cut out.

【0024】請求項7に記載のディジタル復号化装置
は、固定長符号から所定ビット長の符号データを抽出す
るための符号データ抽出手段と、符号データ抽出手段に
よって抽出された符号データから符号長と符号長におけ
る当該符号の発生頻度とを抽出するための符号長抽出手
段と、符号長抽出手段によって抽出された符号長に基づ
いて符号長の符号の中で最も発生頻度の高い符号の可変
長符号全体における発生頻度順位を出力するための第5
の出力手段と、符号長抽出手段によって抽出された発生
頻度と第5の出力手段から出力された符号長の符号の中
で最も発生頻度の高い符号の可変長符号全体における発
生頻度順位とに基づいてグループ係数とゼロ長とを出力
するための第6の出力手段とを含む。
According to a seventh aspect of the present invention, there is provided a digital decoding device in which a code data extracting means for extracting code data having a predetermined bit length from a fixed length code and a code length from the code data extracted by the code data extracting means. A code length extraction unit for extracting the occurrence frequency of the code in the code length, and a variable length code of the code with the highest occurrence frequency among the codes of the code length based on the code length extracted by the code length extraction unit Fifth for outputting the overall occurrence frequency ranking
Output means, the occurrence frequency extracted by the code length extraction means, and the occurrence frequency rank in the entire variable length code of the code having the highest occurrence frequency among the codes of the code length output from the fifth output means. And a sixth output means for outputting the group coefficient and zero length.

【0025】第5の出力手段は、符号長の符号の中で最
も発生頻度の高い符号の可変長符号全体における発生頻
度順位のみを記憶し、第6の出力手段はグループ係数と
ゼロ長のみを記憶する。したがって、請求項5に記載し
たディジタル復号化装置と比較して、さらに記憶容量を
削減することが可能となる。
The fifth output means stores only the occurrence frequency rank of the code having the highest occurrence frequency among the codes of the code length in the entire variable length code, and the sixth output means stores only the group coefficient and the zero length. Remember. Therefore, it is possible to further reduce the storage capacity as compared with the digital decoding device according to the fifth aspect.

【0026】請求項8記載のディジタル復号化装置は、
請求項7記載のディジタル復号化装置であって、第5の
出力手段は符号長抽出手段によって抽出された符号長に
基づいて、この符号長より短い符号長の符号の累積個数
を出力する。
The digital decoding apparatus according to claim 8 is
The digital decoding device according to claim 7, wherein the fifth output means outputs the cumulative number of codes having a code length shorter than this code length based on the code length extracted by the code length extraction means.

【0027】[0027]

【発明の実施の形態】DETAILED DESCRIPTION OF THE INVENTION

[実施の形態1]図1は、本発明の実施の形態1におけ
るディジタル符号化復号化装置の概略構成を示すブロッ
ク図である。このディジタル符号化復号化装置は、画像
データを離散コサイン変換するためのDCT演算部1
1、DCT演算結果を量子化するための量子化部12、
量子化部12が量子化を行なう際に参照する量子化テー
ブル13、量子化されたデータの連続するゼロの個数を
計数するためのゼロ長計数部14、量子化されたデータ
をグルーピングするためのグルーピング部15、2次元
ハフマン符号化を行なうための可変長符号化部16、可
変長符号化部16によって求められた可変長の符号をパ
ッキングして出力するための固定長化部17、固定長化
部17によってパッキングされた圧縮データの入出力等
の処理を行なうためのプロセッサ18、プロセッサ18
から入力された圧縮データから量子化データを求めるた
めの可変長復号化部19、可変長復号化部19によって
求められた量子化データを用いて逆量子化を行なうため
の逆量子化部20、および逆量子化されたデータを逆離
散コサイン変換するためのIDCT演算部21を含む。
[Embodiment 1] FIG. 1 is a block diagram showing a schematic configuration of a digital encoding / decoding apparatus in Embodiment 1 of the present invention. This digital encoding / decoding apparatus includes a DCT calculator 1 for performing a discrete cosine transform on image data.
1. a quantizer 12 for quantizing a DCT operation result,
The quantization table 13 referred to by the quantization unit 12 when performing quantization, the zero length counting unit 14 for counting the number of consecutive zeros of the quantized data, and the grouping for the quantized data Grouping unit 15, variable-length coding unit 16 for performing two-dimensional Huffman coding, fixed-length coding unit 17 for packing and outputting the variable-length code obtained by the variable-length coding unit 16, fixed-length A processor 18 for performing processing such as input / output of compressed data packed by the digitizing unit 17,
A variable length decoding unit 19 for obtaining quantized data from the compressed data input from, an inverse quantization unit 20 for performing inverse quantization using the quantized data obtained by the variable length decoding unit 19, And an IDCT operation unit 21 for performing an inverse discrete cosine transform on the dequantized data.

【0028】本発明は、特に可変長符号に関するもので
あり、JPEG圧縮展開の処理手順の一部であるDCT
/逆DCT変換、量子化/逆量子化に関する手法は公知
技術であるので、たとえば「マルチメディア符号化の国
際標準(丸善、安井浩編著、1991)」等を参照され
たい。
The present invention particularly relates to a variable length code and is a DCT which is a part of the processing procedure of JPEG compression and expansion.
Since the techniques related to / inverse DCT transform and quantization / inverse quantization are known techniques, refer to, for example, "International Standard of Multimedia Coding (edited by Maruzen, Hiroshi Yasui, 1991)" and the like.

【0029】まず、予め輝度(Y)と色差(Cb,C
r)に分解された8ビットの画像データは、水平方向8
画素、垂直方向8画素が切出され画像データとして入力
される。DCT演算部11は、入力された64画素の画
素データを空間周波数領域へ写像し、11ビット精度の
DCT係数64個に変換する。量子化部12は、64個
のDCT係数を量子化テーブル13を参照しながら量子
化する。量子化テーブル13は、たとえば図8(b)に
示すテーブルであり、量子化部12は入力値に対応する
量子化テーブルの値で割算し余りを丸める。
First, luminance (Y) and color difference (Cb, C
The 8-bit image data decomposed into r) has a horizontal direction of 8
Pixels, 8 pixels in the vertical direction are cut out and input as image data. The DCT operation unit 11 maps the input pixel data of 64 pixels to the spatial frequency domain and converts it into 64 DCT coefficients with 11-bit precision. The quantizer 12 quantizes the 64 DCT coefficients with reference to the quantization table 13. The quantization table 13 is, for example, the table shown in FIG. 8B, and the quantization unit 12 divides the remainder by the value of the quantization table corresponding to the input value and rounds the remainder.

【0030】さらに、量子化部12は、64個のDCT
量子化係数をジグザグ経路と呼ばれる順序に並べ替え出
力する。ゼロ長計数部14は、DCT量子化係数の中か
ら連続するゼロの個数を計数し、ゼロ長(nnnn)と
して出力する。また、グルーピング部15は、量子化部
12から出力された量子化係数の中の有値係数をグルー
プ係数(ssss)と付加ビット(fk)に変換し出力
する。たとえば、図6に示すDCT量子化係数「000
0012」(十進表現)がゼロ長計数部14およびグル
ーピング部15に入力された場合、ゼロ長(nnnn)
として5、グループ係数(ssss)として4、付加ビ
ット(fk)として1100Bに変換される。図6に示
す有値係数“12”は、図8(a)に示すグループ係数
4に含まれ、付加係数の最小値である“−15”から数
えて13番目になるので、付加ビットが1100Bとな
る。ゼロ長(nnnn)は1〜63の数値をとるが、無
効係数(0)のラン長が15を超える場合には、16の
無効係数のラン長を表わすZRL(Zero Run Length )
を残りのラン長が15以下になるまで続けて出力した後
に、残りのラン長をゼロ長(nnnn)として出力する
ため、4ビットで表わされる。また、グループ係数(s
sss)は図8(a)に示すように0〜11の4ビット
で表わされ、付加ビット(fk)は最大16ビットデー
タ(グループ係数が16の場合)で表わされる。
Further, the quantizer 12 includes 64 DCTs.
The quantized coefficients are rearranged and output in an order called a zigzag path. The zero length counting unit 14 counts the number of consecutive zeros in the DCT quantized coefficient, and outputs it as a zero length (nnnn). Further, the grouping unit 15 converts the value coefficient in the quantized coefficient output from the quantization unit 12 into a group coefficient (ssss) and an additional bit (fk) and outputs the group coefficient (ssss) and the additional bit (fk). For example, the DCT quantization coefficient “000 shown in FIG.
When “0012” (decimal expression) is input to the zero length counting unit 14 and the grouping unit 15, a zero length (nnnn)
, 5 as a group coefficient, 4 as a group coefficient (ssss), and 1100B as an additional bit (fk). Since the value coefficient “12” shown in FIG. 6 is included in the group coefficient 4 shown in FIG. 8A and is the 13th from the minimum value “−15” of the additional coefficient, the additional bit is 1100B. Becomes The zero length (nnnn) takes a numerical value of 1 to 63, but when the run length of the invalid coefficient (0) exceeds 15, ZRL (Zero Run Length) representing the run length of 16 invalid coefficients.
Is continuously output until the remaining run length becomes 15 or less, and then the remaining run length is output as a zero length (nnnn). Also, the group coefficient (s
As shown in FIG. 8A, sss) is represented by 4 bits of 0 to 11, and the additional bit (fk) is represented by maximum 16-bit data (when the group coefficient is 16).

【0031】ゼロ長計数部14およびグルーピング部1
5において求められたゼロ長(nnnn)、グループ係
数(ssss)、および付加ビット(fk)は、可変長
符号化部16に入力される。可変長符号化部16は、ゼ
ロ長(nnnn)とグループ係数(ssss)とに基づ
いてハフマン符号化を行ない、付加ビット(fk)を付
加した最大32ビットの符号を固定長化部17に出力す
る。固定長化部17は、入力された符号を16ビットを
1ワードとするデータに固定長化し、プロセッサ18に
出力する。プロセッサ18は、固定長化部17から出力
された固定長データを、不図示のハードディスク装置等
に圧縮ファイルとして格納する。
Zero length counting section 14 and grouping section 1
The zero length (nnnn), the group coefficient (ssss), and the additional bit (fk) obtained in 5 are input to the variable length coding unit 16. The variable length coding unit 16 performs Huffman coding based on the zero length (nnnn) and the group coefficient (ssss) and outputs a code of up to 32 bits to which the additional bit (fk) is added to the fixed length conversion unit 17. To do. The fixed length conversion unit 17 converts the input code into fixed length data having 16 bits as one word, and outputs the data to the processor 18. The processor 18 stores the fixed length data output from the fixed length conversion unit 17 in a hard disk device (not shown) as a compressed file.

【0032】一方、ハードディスク等に格納されている
圧縮ファイルを展開する場合には、プロセッサ18がハ
ードディスクから読出した圧縮データを1ワード16ビ
ットの構成で可変長復号化部19に出力する。可変長復
号化部19は、入力された符号からゼロ長(nnnn
2)、グループ係数(ssss2)、付加ビット(fk
2)を求め、64個の量子化データを作成し逆量子化部
20へ出力する。逆量子化部20は、入力された64個
の量子化データを逆ジグザグ経路で並べ替え、図8
(b)に示す量子化テーブルの値を掛けることでDCT
係数を求める。最後に、IDCT演算部21が、DCT
係数を逆直交変換し64画素の復元画素データを求め
る。
On the other hand, when decompressing a compressed file stored in a hard disk or the like, the processor 18 outputs the compressed data read from the hard disk to the variable length decoding section 19 in a 16-bit word structure. The variable length decoding unit 19 calculates the zero length (nnnnn) from the input code.
2), group coefficient (ssss2), additional bit (fk)
2) is obtained, 64 pieces of quantized data are created and output to the inverse quantization unit 20. The inverse quantization unit 20 rearranges the input 64 pieces of quantized data on the inverse zigzag path, and
By multiplying the values in the quantization table shown in (b), the DCT
Find the coefficient. Finally, the IDCT calculation unit 21
The coefficient is inversely orthogonally transformed to obtain 64-pixel restored pixel data.

【0033】図2は、本実施の形態における可変長符号
化部16の内部構成を示すブロック図である。可変長符
号化部16は、ゼロ長(nnnn)およびグループ係数
(ssss)からハフマン符号の符号長(len)およ
び当該符号長の発生頻度順位(hind)に変換するた
めのテーブル1(22)、テーブル1(22)からの符
号長(len)が入力され、当該符号長の符号の中で最
も発生頻度の高い符号(dpat)を出力するためのテ
ーブル2(23)、グループ係数(ssss)と符号長
(len)とを加算するための加算器25、および発生
頻度順位(hind)と当該符号長の符号の中で最も発
生頻度の高い符号(dpat)とを加算するための加算
器24を含む。
FIG. 2 is a block diagram showing the internal structure of the variable length coding unit 16 in this embodiment. The variable-length coding unit 16 converts the zero length (nnnn) and the group coefficient (ssss) into the code length (len) of the Huffman code and the occurrence frequency rank (hind) of the code length (1), a table 1 (22), The code length (len) from the table 1 (22) is input, and the table 2 (23) for outputting the code (dpat) having the highest occurrence frequency among the codes of the code length, the group coefficient (ssss), An adder 25 for adding the code length (len), and an adder 24 for adding the occurrence frequency rank (hind) and the code (dpat) having the highest occurrence frequency among the codes of the code length. Including.

【0034】ゼロ長(nnnn)4ビットと、グループ
係数(ssss)4ビットの合計8ビットがアドレスと
してテーブル1(22)に入力される。テーブル1(2
2)はゼロ長とグループ係数とに対応するハフマン符号
の符号長(len)と符号長における当該符号の発生頻
度順位(hind)とを格納しており、アドレスとして
入力されるゼロ長とグループ係数とに対応するハフマン
符号の符号長と符号長における当該符号の発生頻度順位
(hind)とを出力する。発生頻度順位とは、ある符
号長yに対して符号がm個割当てられているとした場
合、符号化要素(ssss,nnnn)が符号長yを有
する複数の符号の中で、何番目の符号に相当するのかを
示す順位である。すなわち、符号長yの符号の中で発生
頻度が何番目に相当するかを表わすものである。たとえ
ば、図3(a)に示すハフマン符号を想定した場合、4
ビットの符号長に符号が3個割当てられており、最も発
生頻度の高い符号は(ssss,nnnn)=(0,
5)であり、(0,6)、(0,0)の順に発生頻度が
低いことがわかる。テーブル1(22)には、図3
(a)に示す符号長および発生頻度がデータとして格納
されている。
A total of 8 bits of zero length (nnnn) 4 bits and group coefficient (ssss) 4 bits are input to the table 1 (22) as addresses. Table 1 (2
2) stores the code length (len) of the Huffman code corresponding to the zero length and the group coefficient and the occurrence frequency order (hind) of the code in the code length, and the zero length and the group coefficient input as addresses. The code length of the Huffman code corresponding to and the generation frequency rank (hind) of the code in the code length are output. The occurrence frequency order means, in the case where m codes are assigned to a certain code length y, the number of the code among the plurality of codes having the code length y in the coding element (sssss, nnnn). It is a ranking indicating whether or not. In other words, it represents the order of occurrence frequency in the code of code length y. For example, assuming the Huffman code shown in FIG.
Three codes are assigned to the bit code length, and the code with the highest frequency of occurrence is (ssss, nnnn) = (0,
5), and it can be seen that the occurrence frequency is low in the order of (0, 6) and (0, 0). Table 1 (22) is shown in FIG.
The code length and the occurrence frequency shown in (a) are stored as data.

【0035】テーブル1(22)から出力される符号長
(len)がテーブル2(23)のアドレスとして入力
されており、符号長に対応する発生頻度の最も高いパタ
ーン(dpat)がデータとして格納されている。たと
えば、図3(a)に示すハフマン符号の場合、図3
(b)に示す内容のデータが格納されることになる。
The code length (len) output from the table 1 (22) is input as the address of the table 2 (23), and the pattern (dpat) having the highest occurrence frequency corresponding to the code length is stored as data. ing. For example, in the case of the Huffman code shown in FIG.
The data having the content shown in (b) is stored.

【0036】JPEG方式の符号化においては、1〜1
6ビットをとる可能性があるが、ハードウェア記述言語
で作成したテーブルをハードロジックに変換することに
より、無駄なテーブルのロジックを削減している。すな
わち、ROM(Read Only Memory) でテーブル1(2
2)を構成すると、16×16=256ビット必要であ
るが、ハードロジックで構成した場合(1+2+…+1
6)=136ビットとなる。
In JPEG encoding, 1 to 1
Although it may take 6 bits, the table logic created in the hardware description language is converted into hard logic to reduce unnecessary table logic. That is, a table 1 (2
When 2) is configured, 16 × 16 = 256 bits are required, but when configured by hard logic (1 + 2 + ... + 1)
6) = 136 bits.

【0037】テーブル2(23)から符号長(len)
に対応した発生頻度の最も高いハフマン符号(dpa
t)が出力され、テーブル1(22)から既に出力され
ている発生頻度とを加算器24で加算することによっ
て、目的のハフマン符号を得ることができる。また、付
加ビット(fk)のビット数はグループ係数と同じでs
sssであるため、ハフマン符号(dpat)をMSB
側に、付加ビット(fk)をLSB側に連ねた符号を出
力し、その符号長(len+ssss)を加算器25で
求めて符号長(tlen)として出力する。このように
して得られたハフマン符号と符号長とが固定長化部17
に入力され、16ビット長を1ワードとするデータにパ
ケット化される。
Code length (len) from Table 2 (23)
Huffman code (dpa
t) is output, and the target Huffman code can be obtained by adding the occurrence frequency already output from Table 1 (22) with the adder 24. Also, the number of additional bits (fk) is the same as the group coefficient and s
Since it is sss, the Huffman code (dpat) is MSB
A code in which the additional bits (fk) are connected to the LSB side is output to the side, the code length (len + ssss) is obtained by the adder 25, and is output as the code length (tlen). The Huffman code and the code length obtained in this way are fixed in length by the fixed length conversion unit 17
And is packetized into data having a 16-bit length as one word.

【0038】以上説明したように、可変長符号化部16
において、符号長と発生頻度、およびその符号長の符号
の中で最も発生頻度の高い符号を出力するテーブルを用
いて、求めたい符号を算出することにより、符号化に要
する回路規模の小型化が可能となり、その結果デバイス
が安価となり低消費電力駆動が可能となる。上述したテ
ーブル構成によって、テーブル1(22)が28 ×8ビ
ットに、テーブル2(23)が24 ×16ビットにな
り、合計2,304ビットに容量が縮小される。また、
テーブル2(23)をランダムロジックで構成すること
により、さらに回路規模の小型化が実現可能となる。
As described above, the variable length coding unit 16
In the above, the code length and the frequency of occurrence and the table that outputs the code with the highest frequency of occurrence of the codes of that code length are used to calculate the desired code, thereby reducing the circuit scale required for encoding. As a result, the device becomes inexpensive and low power consumption driving becomes possible. With the above table configuration, the capacity of the table 1 (22) becomes 2 8 × 8 bits and the table 2 (23) becomes 2 4 × 16 bits, and the capacity is reduced to 2,304 bits in total. Also,
By configuring the table 2 (23) with random logic, it is possible to further reduce the circuit scale.

【0039】図4は、可変長復号化部19の構成を示す
ブロック図である。可変長復号化部19は、所定長の符
号データを切出すための第1ビット抽出部41、符号デ
ータから符号長を抽出するための比較部42、比較部4
2が符号長を抽出するために参照されるテーブル3(4
3)、符号データから符号を切出すための第2ビット抽
出部44、符号に対応したゼロ長(nnnn2)および
グループ係数(ssss2)を出力するためのテーブル
4(45)、ゼロ長(nnnn2)とグループ係数(s
sss2)と付加ビット(fk2)とから64個の量子
化係数を求めるための係数展開部46、加算器47、お
よび第1ビット抽出部41が抽出する所定長の符号デー
タの先頭アドレスを算出するための先頭アドレス算出部
48を含む。
FIG. 4 is a block diagram showing the configuration of the variable length decoding unit 19. The variable length decoding unit 19 includes a first bit extracting unit 41 for extracting code data of a predetermined length, a comparing unit 42 for extracting a code length from the code data, and a comparing unit 4.
2 is referred to in order to extract the code length from table 3 (4
3), a second bit extraction unit 44 for extracting a code from code data, a table 4 (45) for outputting a zero length (nnnn2) and a group coefficient (ssss2) corresponding to the code, and a zero length (nnnn2) And group coefficient (s
From sss2) and the additional bits (fk2), a coefficient expansion unit 46 for obtaining 64 quantized coefficients, an adder 47, and a start address of a predetermined length of code data extracted by the first bit extraction unit 41 are calculated. A head address calculation unit 48 for

【0040】まず、第1ビット抽出部41は、プロセッ
サ18から入力される16ビット1ワードの圧縮データ
列(固定長データを連ねたもの)の先頭ビットから16
ビットを切出し、比較部42へ出力する。先頭ビット位
置(m)は、画像入力の最初でゼロにリセットされてい
る。比較部42は、符号長1ビットから16ビットま
で、各符号長の符号の中で発生頻度が最も高い符号パタ
ーンを順次テーブル3(43)から読出し、この符号パ
ターンと第1ビット抽出部41から出力された16ビッ
トデータをMSBから1ビット、2ビット、…、16ビ
ットの順に切出したデータ(kdt)とを比較する。こ
の比較の結果、大小関係が変わる符号長を符号長(cl
en)と判定する。たとえば図3(d)に示す符号デー
タが入力された場合、まず符号データから切出された1
ビットのデータ(kdt)と符号長が1の符号の中で最
も発生頻度が高い符号(dpat)とを比較し、kdt
の方がdpatより大きいことがわかる。次に、符号デ
ータから2ビットのデータ(kdt)を切出し、符号長
2の符号の中で最も発生頻度が高い符号パターン(dp
at)と比較し、kdtがdpatより大きいことがわ
かる。この処理を順次繰返し、切出した4ビットのデー
タ(kdt)と符号長4の符号の中で最も発生頻度の高
い符号パターン(dpat)との比較において、大小関
係が変わっていることがわかる。この大小関係が変わっ
ている4からマイナス1した3を符号長として判定す
る。
First, the first bit extraction unit 41 extracts 16 bits from the first bit of a 16-bit 1-word compressed data string (consecutive of fixed length data) input from the processor 18.
The bit is cut out and output to the comparison unit 42. The leading bit position (m) has been reset to zero at the beginning of the image input. The comparing unit 42 sequentially reads, from the table 3 (43), the code pattern having the highest occurrence frequency among the codes of each code length from the code length of 1 bit to 16 bits, and the code pattern and the first bit extracting unit 41 The output 16-bit data is compared with the data (kdt) obtained by cutting out the MSB in the order of 1 bit, 2 bits, ..., 16 bits. As a result of this comparison, the code length at which the magnitude relationship changes is determined as
en). For example, when the code data shown in FIG. 3 (d) is input, first, 1 extracted from the code data is input.
The bit data (kdt) is compared with the code (dpat) that has the highest frequency of occurrence with a code length of 1, and kdt
It can be seen that is larger than dpat. Next, 2-bit data (kdt) is cut out from the code data, and the code pattern (dp) with the highest frequency of occurrence in the code of code length 2 is extracted.
It can be seen that kdt is larger than dpat in comparison with (at). It is understood that the size relationship has changed in the comparison between the cut-out 4-bit data (kdt) and the code pattern (dpat) having the highest occurrence frequency in the code having the code length of 4 by sequentially repeating this process. The value obtained by subtracting 1 from 4 in which the magnitude relationship has changed is determined as the code length.

【0041】第2ビット抽出部44は、16ビットの符
号データのMSBから符号長(clen)だけ符号を切
出し、残りの(16−clen)ビットを“0”で埋め
た16ビットデータをテーブル4(45)にアドレスと
して出力する。たとえば、16ビット固定長符号データ
として、1011011011101101が入力され
るとすると、図3(d)に示すように符号101が切出
され、アドレスとして101000000000000
0がテーブル4(45)に出力される。テーブル4(4
5)には、16ビットの符号に対応したゼロ長(nnn
n2)およびグループ係数(ssss2)が格納されて
おり、ゼロ長(nnnn2)を係数展開部46へ出力
し、グループ係数(ssss2)を第1ビット抽出部4
1、係数展開部46、および加算器47へ出力する。加
算器47は、比較部42によって抽出された符号長(c
len)とテーブル4(45)から出力されるグループ
係数(ssss2)とを加算し、clen2として先頭
アドレス算出部48へ出力する。先頭アドレス算出部4
8は、先頭ビット位置m=m+clen2を算出し、次
に読出すべき符号の先頭アドレスmを第1ビット抽出部
41へ出力する。第1ビット抽出部41は、先頭アドレ
ス算出部48から出力された先頭ビット位置から16ビ
ット分の符号データを切出し、比較部42へ出力する。
The second bit extraction unit 44 cuts out a code from the MSB of the 16-bit code data by the code length (clen) and fills the remaining (16-clen) bits with "0" to obtain the 16-bit data in Table 4. It is output to (45) as an address. For example, if 1011011011101101 is input as 16-bit fixed-length code data, the code 101 is cut out as shown in FIG. 3D, and the address is 101000000000000.
0 is output to Table 4 (45). Table 4 (4
5) has a zero length (nnn) corresponding to a 16-bit code.
n2) and the group coefficient (ssss2) are stored, the zero length (nnnn2) is output to the coefficient expansion unit 46, and the group coefficient (ssss2) is output to the first bit extraction unit 4
1 to the coefficient expansion unit 46 and the adder 47. The adder 47 has a code length (c
len) and the group coefficient (ssss2) output from the table 4 (45) are added, and the result is output to the start address calculation unit 48 as clen2. Start address calculator 4
8 calculates the head bit position m = m + clen2, and outputs the head address m of the code to be read next to the first bit extraction unit 41. The first bit extraction unit 41 cuts out 16-bit code data from the head bit position output from the head address calculation unit 48 and outputs the code data to the comparison unit 42.

【0042】一方、第1ビット抽出部41は、テーブル
4(45)から出力されるグループ係数(ssss2)
を入力し、新たに算出された先頭ビット位置からグルー
プ係数(ssss2)分の符号データをMSB側から切
出し、付加ビット(fk2)として係数展開部46へ出
力する。係数展開部46は、第1ビット抽出部41から
出力される付加ビット(fk2)と、テーブル4(4
5)から出力されるゼロ長(nnnn2)およびグルー
プ係数(ssss2)とから64個の量子化係数を求め
て逆量子化部20へ出力する。
On the other hand, the first bit extracting unit 41 outputs the group coefficient (ssss2) output from the table 4 (45).
Is input, the code data for the group coefficient (ssss2) is cut out from the MSB side from the newly calculated head bit position, and is output to the coefficient expansion unit 46 as an additional bit (fk2). The coefficient expansion unit 46 uses the additional bits (fk2) output from the first bit extraction unit 41 and the table 4 (4
From the zero length (nnnn2) and the group coefficient (ssss2) output from (5), 64 quantized coefficients are obtained and output to the inverse quantization unit 20.

【0043】以上説明したように、可変長復号化部19
において、符号長とこの符号長の符号の中で最も発生頻
度の高い符号とを格納するテーブル3(43)と、ゼロ
長およびグループ係数を格納するテーブル4(45)と
を用いることによって、復号化に要するテーブルを合計
524,288ビットとすることができる。すなわち、
テーブル3(43)は図2に示すテーブル2(23)と
同じであるので、可変長符号化部16と共用でき、テー
ブル4(45)の容量は216×8ビットとなるからであ
る。
As described above, the variable length decoding unit 19
In Table 1, the decoding is performed by using the table 3 (43) for storing the code length and the code with the highest frequency of occurrence of the code length and the table 4 (45) for storing the zero length and the group coefficient. The tables required for the conversion can be a total of 524,288 bits. That is,
This is because the table 3 (43) is the same as the table 2 (23) shown in FIG. 2 and therefore can be shared with the variable length coding unit 16, and the capacity of the table 4 (45) is 2 16 × 8 bits.

【0044】[実施の形態2]本発明の実施の形態2に
おけるディジタル符号化復号化装置の概略構成および可
変長符号部の内部構成は、図1および図2に示す実施の
形態1におけるディジタル符号化復号化装置の概略構成
および可変長符号化部16の内部構成と同じであるの
で、詳細な説明は繰返さない。
[Embodiment 2] The digital coding / decoding apparatus according to Embodiment 2 of the present invention has a schematic configuration and a variable-length coding section having an internal configuration as shown in FIG. 1 and FIG. The general configuration of the decoding / decoding device and the internal configuration of the variable length coding unit 16 are the same, and therefore detailed description will not be repeated.

【0045】図5は、実施の形態2における可変長復号
化部19の構成を示すブロック図である。可変長復号化
部19は、所定長の符号データを切出すためのビット抽
出部51、符号データから符号長および符号長における
当該符号の発生頻度(chind)を抽出するための比
較部52、比較部52が符号長および発生頻度を抽出す
る際に参照されるテーブル3(43)、比較部52から
出力される符号長に対してこの符号長より短い符号長の
符号の累積個数を出力するためのテーブル5(54)、
符号に対応したゼロ長(nnnn2)およびグループ係
数(ssss2)を出力するためのテーブル6(5
5)、ゼロ長(nnnn2)とグループ係数(ssss
2)と付加ビット(fk2)とから64個の量子化係数
を求めるための係数展開部56、ビット抽出部51が抽
出する所定長の符号データの先頭アドレスを算出するた
めの先頭アドレス算出部57、および加算器58,59
を含む。
FIG. 5 is a block diagram showing the configuration of the variable length decoding unit 19 in the second embodiment. The variable length decoding unit 19 includes a bit extraction unit 51 for extracting code data of a predetermined length, a comparison unit 52 for extracting a code length and a code occurrence frequency (chind) in the code length from the code data, and a comparison unit 52. Table 3 (43) referred to when the unit 52 extracts the code length and the frequency of occurrence, to output the cumulative number of codes having a code length shorter than the code length output from the comparison unit 52. Table 5 (54),
Table 6 (5) for outputting the zero length (nnnn2) and group coefficient (ssss2) corresponding to the code
5), zero length (nnnn2) and group coefficient (sssss)
2) and the additional bit (fk2) and a coefficient expansion unit 56 for obtaining 64 quantized coefficients, and a start address calculation unit 57 for calculating the start address of the code data of a predetermined length extracted by the bit extraction unit 51. , And adders 58 and 59
including.

【0046】まず、ビット抽出部51は、プロセッサ1
8から入力される16ビット1ワードの圧縮データ列の
先頭ビットから16ビットを切出し、比較部52へ出力
する。比較部52は、図3(d)を用いて説明した方法
により符号長(clen)を求める。また、比較の際に
用いた発生頻度の最も高い符号(dpat)と切出され
たデータ(kdt)との差、すなわちkdt−dpat
を算出し、発生頻度(chind)として加算器59へ
出力する。
First, the bit extraction unit 51 is the processor 1
16 bits are cut out from the first bit of the 16-bit 1-word compressed data string input from 8 and output to the comparison unit 52. The comparison unit 52 obtains the code length (clen) by the method described with reference to FIG. Further, the difference between the code (dpat) having the highest occurrence frequency used in the comparison and the cut-out data (kdt), that is, kdt-dpat
Is calculated and output to the adder 59 as the occurrence frequency (chind).

【0047】テーブル5(54)は、アドレスとして比
較部52が出力する符号長(clen)が入力され、
(clen−1)の符号長までの符号化要素の個数の累
積がデータとして格納されている。すなわち、発生頻度
の最も高い符号(dpat)が可変長符号全体の中で何
番目の発生頻度であるのかを出力する。たとえば、図3
(a)に示す符号の場合には、図3(c)に示すデータ
がテーブル5(54)に格納されることになる。
The table 5 (54) receives the code length (clen) output from the comparing section 52 as an address,
The cumulative number of coded elements up to the code length of (clen-1) is stored as data. That is, it outputs the number of occurrences of the code (dpat) having the highest occurrence frequency in the entire variable length code. For example, in FIG.
In the case of the code shown in (a), the data shown in FIG. 3 (c) is stored in the table 5 (54).

【0048】加算器59は、テーブル5(54)から出
力される符号の累積個数と比較部52が出力する発生頻
度(chind)とを加算してテーブル6(55)にア
ドレスとして出力する。テーブル6(55)は、データ
として短い符号長から符号化要素の発生頻度順位が高い
符号の順にグループ係数(ssss2)およびゼロ長
(nnnn2)を記憶している。すなわち、可変長符号
全体における発生頻度がアドレスとして入力され、この
発生頻度に対応するグループ係数(ssss2)および
ゼロ長(nnnn2)が出力されることになる。
The adder 59 adds the cumulative number of codes output from the table 5 (54) and the occurrence frequency (chind) output from the comparator 52, and outputs the result to the table 6 (55) as an address. The table 6 (55) stores, as data, the group coefficient (ssss2) and the zero length (nnnnn2) in the order of the code having the shortest code length and the code having the highest frequency of occurrence of coding elements. That is, the frequency of occurrence in the entire variable length code is input as an address, and the group coefficient (ssss2) and zero length (nnnn2) corresponding to this frequency of occurrence are output.

【0049】先頭アドレス算出部57は、実施の形態1
において説明した先頭アドレス算出部48と同様の方法
により先頭アドレスを算出しビット抽出部51へ出力す
る。ビット抽出部51は、テーブル6(55)から出力
されるグループ係数(ssss2)を入力し、新たに算
出された先頭ビット位置からグループ係数(ssss
2)分の符号データをMSB側から切出し、付加ビット
(fk2)として係数展開部56へ出力する。係数展開
部56は、ビット抽出部51から出力される付加ビット
(fk2)と、テーブル6(55)から出力されるゼロ
長(nnnn2)およびグループ係数(ssss2)と
から64個の量子化係数を求めて逆量子化部20へ出力
する。
The head address calculation unit 57 is the same as that of the first embodiment.
The head address is calculated by the same method as the head address calculation unit 48 described in 1 above and output to the bit extraction unit 51. The bit extraction unit 51 inputs the group coefficient (ssss2) output from the table 6 (55), and the group coefficient (sssss) from the newly calculated start bit position.
The code data for 2) is cut out from the MSB side and is output to the coefficient expansion unit 56 as an additional bit (fk2). The coefficient expansion unit 56 extracts 64 quantized coefficients from the additional bit (fk2) output from the bit extraction unit 51, the zero length (nnnn2) and the group coefficient (ssss2) output from the table 6 (55). It is obtained and output to the inverse quantization unit 20.

【0050】以上説明したように、可変長復号化部19
において、当該符号長より短い符号長の符号の累積個数
を格納するテーブル5(54)と、ゼロ長およびグルー
プ係数を格納するテーブル6(55)とを用いることに
よって、復号化に要するテーブルの合計を縮小すること
ができる。すなわち、テーブル5(54)の容量は2 4
×8ビット、テーブル6(55)の容量は28 ×9ビッ
トとなり、合計2,432ビットに縮小される。
As described above, the variable length decoding unit 19
In, the cumulative number of codes with a code length shorter than the code length
Table 5 (54) for storing zero length and glue
Table 6 (55) that stores the coefficient
Therefore, reduce the total number of tables required for decoding.
You can That is, the capacity of the table 5 (54) is 2 Four
× 8 bits, table 6 (55) capacity is 28× 9 bits
And is reduced to a total of 2,432 bits.

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

【図1】本発明の実施の形態におけるディジタル符号化
復号化装置の概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a digital encoding / decoding device according to an embodiment of the present invention.

【図2】本発明の実施の形態1における可変長符号化部
16の内部構成を示すブロック図である。
FIG. 2 is a block diagram showing an internal configuration of a variable length coding unit 16 according to Embodiment 1 of the present invention.

【図3】(a)は、ハフマン符号の一例を示す図であ
る。(b)は、図2のテーブル2(23)の内容の一例
を示す図である。(c)は、図5のテーブル5(54)
の内容の一例を示す図である。(d)は、図4の比較部
42における符号長の判定を説明するための図である。
FIG. 3A is a diagram showing an example of a Huffman code. (B) is a figure which shows an example of the content of the table 2 (23) of FIG. (C) is the table 5 (54) in FIG.
It is a figure which shows an example of the content of. (D) is a figure for demonstrating the determination of the code length in the comparison part 42 of FIG.

【図4】実施の形態1における可変長復号化部19の構
成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a variable length decoding unit 19 in the first embodiment.

【図5】実施の形態2における可変長復号化部19の構
成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a variable length decoding unit 19 in the second embodiment.

【図6】ジグザグ経路の順序に並べ替えられたDCT量
子化係数を示す図である。
FIG. 6 is a diagram showing DCT quantized coefficients rearranged in a zigzag path order.

【図7】従来のディジタル符号化復号化装置の構成を示
す図である。
FIG. 7 is a diagram showing a configuration of a conventional digital encoding / decoding device.

【図8】(a)は、グループ係数(ssss)と付加係
数との関係を示す図である。(b)は、量子化の際に使
用される量子化テーブルを示す図である。
FIG. 8A is a diagram showing a relationship between a group coefficient (ssss) and an additional coefficient. (B) is a figure which shows the quantization table used at the time of quantization.

【図9】従来の符号化テーブルおよび復号化テーブルを
示す図である。
FIG. 9 is a diagram showing a conventional encoding table and decoding table.

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

11 DCT演算部 12 量子化部 13 量子化テーブル 14 ゼロ長計数部 15 グルーピング部 16 可変長符号化部 17 固定長化部 18 プロセッサ 19 可変長復号化部 20 逆量子化部 21 IDCT演算部 22 テーブル1 23 テーブル2 24,25,47,58,59 加算器 41 第1ビット抽出部 42 比較部 43 テーブル3 44 第2ビット抽出部 45 テーブル4 46,56 係数展開部 48,57 先頭アドレス算出部 51 ビット抽出部 52 比較部 54 テーブル5 55 テーブル6 11 DCT calculator 12 Quantizer 13 Quantization table 14 Zero length counter 15 Grouping part 16 Variable length coding unit 17 Fixed length part 18 processors 19 Variable length decoding unit 20 Dequantizer 21 IDCT operation unit 22 Table 1 23 Table 2 24,25,47,58,59 adder 41 First Bit Extractor 42 Comparison section 43 Table 3 44 Second Bit Extractor 45 Table 4 46,56 Coefficient expansion unit 48,57 Start address calculator 51-bit extractor 52 Comparison Department 54 Table 5 55 Table 6

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平8−84081(JP,A) 特開 平8−56164(JP,A) 特開 平7−212243(JP,A) 特開 平6−225156(JP,A) (58)調査した分野(Int.Cl.7,DB名) H03M 7/40 H03M 7/46 G11B 20/10 301 H04N 1/41 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP-A-8-84081 (JP, A) JP-A-8-56164 (JP, A) JP-A-7-212243 (JP, A) JP-A-6- 225156 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) H03M 7/40 H03M 7/46 G11B 20/10 301 H04N 1/41

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力データを直交変換するための変換手
段と、 前記変換手段によって直交変換された入力データのゼロ
長と有値係数とを抽出するための抽出手段と、 前記抽出手段によって抽出されたゼロ長と有値係数とに
基づいて、符号長と該符号長における当該符号の発生頻
度を出力するための第1の出力手段と、 前記第1の出力手段から出力される符号長に基づいて、
前記符号長の符号の中で最も発生頻度の高い符号を出力
するための第2の出力手段と、 前記第1の出力手段から出力される発生頻度と前記第2
の出力手段から出力される最も発生頻度の高い符号とを
加算するための第1の加算手段とを含むディジタル符号
化装置。
1. A conversion means for orthogonally transforming input data, an extraction means for extracting a zero length and a valence coefficient of the input data orthogonally transformed by the conversion means, and an extraction means for extracting the zero length and a valence coefficient. Based on the zero length and the value coefficient, the first output means for outputting the code length and the occurrence frequency of the code in the code length, and the code length output from the first output means. hand,
Second output means for outputting the code with the highest occurrence frequency among the codes of the code length; the occurrence frequency output from the first output means and the second
And a first adding means for adding the most frequently generated code output from the output means of.
【請求項2】 前記抽出手段は、前記ゼロ長を計数する
ためのゼロ長計数手段と、 前記有値係数をグループ係数と付加ビットに変換するた
めのグルーピング手段とを含み、 前記ディジタル符号化装置はさらに、前記グルーピング
手段によって変換されたグループ係数と前記第1の出力
手段によって出力された符号長とを加算するための第2
の加算手段と、 前記第1の加算手段によって加算された符号と前記グル
ーピング手段によって変換された付加ビットとを固定長
符号に変換して出力するための固定長化手段とを含む、
請求項1記載のディジタル符号化装置。
2. The digital encoding device, wherein the extracting means includes zero length counting means for counting the zero length, and grouping means for converting the valued coefficients into group coefficients and additional bits. Further includes a second coefficient for adding the group coefficient converted by the grouping means and the code length output by the first output means.
And a fixed length conversion unit for converting the code added by the first addition unit and the additional bit converted by the grouping unit into a fixed length code and outputting the fixed length code.
The digital encoding device according to claim 1.
【請求項3】 固定長符号から所定ビット長の符号デー
タを抽出するための符号データ抽出手段と、 前記符号データ抽出手段によって抽出された符号データ
から符号長を抽出するための符号長抽出手段と、 前記符号長抽出手段によって抽出された符号長に基づい
て前記所定ビット長の符号データから符号を切出すため
の切出手段と、 前記切出手段によって切出された符号に基づいてゼロ長
とグループ係数とを出力するための第3の出力手段とを
含むディジタル復号化装置。
3. Code data extracting means for extracting code data having a predetermined bit length from a fixed length code, and code length extracting means for extracting code length from the code data extracted by the code data extracting means. A cutout unit for cutting out a code from the code data having the predetermined bit length based on the code length extracted by the code length extraction unit; and a zero length based on the code cut out by the cutout unit. And a third output means for outputting the group coefficient and the digital decoding device.
【請求項4】 前記符号データ抽出手段は、前記符号長
抽出手段によって抽出された符号長と前記第3の出力手
段によって出力されたグループ係数とに基づいて、前記
所定ビット長の符号データの先頭アドレスを算出する、
請求項3記載のディジタル復号化装置。
4. The code data extraction means, based on the code length extracted by the code length extraction means and the group coefficient output by the third output means, the head of the code data having the predetermined bit length. Calculate the address,
The digital decoding device according to claim 3.
【請求項5】 前記符号長抽出手段は、符号長の符号の
中で最も発生頻度の高い符号を出力するための第4の出
力手段と、 前記符号データ抽出手段によって抽出された符号データ
の最初の複数ビットと前記第4の出力手段によって出力
される最も発生頻度の高い符号との比較によって符号長
を決定するための決定手段とを含む、請求項3記載のデ
ィジタル復号化装置。
5. The code length extracting means includes a fourth output means for outputting a code having the highest occurrence frequency among codes having a code length, and a first output of the code data extracted by the code data extracting means. 4. The digital decoding apparatus according to claim 3, further comprising: a deciding means for deciding a code length by comparing a plurality of bits of ## EQU1 ## with a code having the highest frequency of occurrence output by the fourth output means.
【請求項6】 前記符号データ抽出手段は、前記第3の
出力手段によって出力されるグループ係数に基づいて付
加ビットを切出す、請求項3記載のディジタル復号化装
置。
6. The digital decoding device according to claim 3, wherein said code data extracting means cuts out additional bits based on the group coefficient output by said third output means.
【請求項7】 固定長符号から所定ビット長の符号デー
タを抽出するための符号データ抽出手段と、 前記符号データ抽出手段によって抽出された符号データ
から符号長と該符号長における当該符号の発生頻度とを
抽出するための符号長抽出手段と、 前記符号長抽出手段によって抽出された符号長に基づい
て該符号長の符号の中で最も発生頻度の高い符号の可変
長符号全体における発生頻度順位を出力するための第5
の出力手段と、 前記符号長抽出手段によって抽出された発生頻度と前記
第5の出力手段から出力された符号長の符号の中で最も
発生頻度の高い符号の可変長符号全体における発生頻度
順位とに基づいてグループ係数とゼロ長とを出力するた
めの第6の出力手段とを含むディジタル復号化装置。
7. Code data extraction means for extracting code data of a predetermined bit length from a fixed length code, code length from the code data extracted by the code data extraction means, and frequency of occurrence of the code at the code length. Based on the code length extracted by the code length extraction means, a code length extraction means for extracting the Fifth for outputting
Output means, the occurrence frequency extracted by the code length extraction means, and the occurrence frequency rank in the entire variable length code of the code having the highest occurrence frequency among the codes of the code length output from the fifth output means, And a sixth output means for outputting the group coefficient and zero length based on
【請求項8】 前記第5の出力手段は、前記符号長抽出
手段によって抽出された符号長に基づいて、該符号長よ
り短い符号長の符号の累積個数を出力する、請求項7記
載のディジタル復号化装置。
8. The digital according to claim 7, wherein the fifth output means outputs the cumulative number of codes having a code length shorter than the code length based on the code length extracted by the code length extraction means. Decoding device.
JP12394797A 1997-05-14 1997-05-14 Digital encoding device and digital decoding device Expired - Fee Related JP3373132B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12394797A JP3373132B2 (en) 1997-05-14 1997-05-14 Digital encoding device and digital decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12394797A JP3373132B2 (en) 1997-05-14 1997-05-14 Digital encoding device and digital decoding device

Publications (2)

Publication Number Publication Date
JPH10322221A JPH10322221A (en) 1998-12-04
JP3373132B2 true JP3373132B2 (en) 2003-02-04

Family

ID=14873291

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12394797A Expired - Fee Related JP3373132B2 (en) 1997-05-14 1997-05-14 Digital encoding device and digital decoding device

Country Status (1)

Country Link
JP (1) JP3373132B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4893957B2 (en) 2006-08-07 2012-03-07 富士ゼロックス株式会社 Encoding device, decoding device, encoding method and program
JP4814826B2 (en) * 2007-03-30 2011-11-16 株式会社イクス Image processing apparatus and image processing method
CN114429200B (en) * 2021-12-29 2025-08-26 中国科学院计算技术研究所 Normalized Huffman encoding and decoding method and neural network computing chip

Also Published As

Publication number Publication date
JPH10322221A (en) 1998-12-04

Similar Documents

Publication Publication Date Title
JP3103383B2 (en) Image decoding method
Howard et al. New methods for lossless image compression using arithmetic coding
US5659362A (en) VLSI circuit structure for implementing JPEG image compression standard
JPH07262175A (en) Function conversion arithmetic unit
EP0692913B1 (en) Digital coding/decoding apparatus using variable length codes
US6067384A (en) Fast scaling of JPEG images
KR100944928B1 (en) Apparatus and method for encoding and computing a discrete cosine transform using a butterfly processor
WO1998054907A1 (en) System and method for encoding video data using computationally efficient adaptive spline wavelets
JP3373132B2 (en) Digital encoding device and digital decoding device
JP2002026737A (en) Data decoding apparatus and method
JP3951036B2 (en) Dynamic decimal point method, dynamic decimal point arithmetic method, two-dimensional inverse discrete cosine transform method and apparatus
JPH08116268A (en) Information processing device
JP2003333339A (en) Image encoding apparatus and image encoding method
JPH07303045A (en) Huffman decoder
JP2753091B2 (en) Image data expansion circuit
JP3954032B2 (en) Image coding apparatus, image coding method, image coding program, and computer-readable recording medium on which image coding program is recorded
JP3015001B2 (en) Huffman decoding device
JPH10116267A (en) Arithmetic device and information processing device
JPH04971A (en) Picture encoding system
JPS61149126A (en) Medical image data compression and expansion system
JP2001007706A (en) Variable length code decoding device
JP3152772B2 (en) Image data restoration device
JPH09261645A (en) Image data decompression device
JPH04274674A (en) Data converter
Yusof et al. Real time implementation of baseline JPEG decoder using floating point DSP TMS320C31

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021105

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

Free format text: PAYMENT UNTIL: 20081122

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091122

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20091122

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101122

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111122

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111122

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121122

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees