JP3276037B2 - Encoding device - Google Patents

Encoding device

Info

Publication number
JP3276037B2
JP3276037B2 JP23173194A JP23173194A JP3276037B2 JP 3276037 B2 JP3276037 B2 JP 3276037B2 JP 23173194 A JP23173194 A JP 23173194A JP 23173194 A JP23173194 A JP 23173194A JP 3276037 B2 JP3276037 B2 JP 3276037B2
Authority
JP
Japan
Prior art keywords
address
encoding
coefficient
dimensional data
data sequence
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
JP23173194A
Other languages
Japanese (ja)
Other versions
JPH0898029A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP23173194A priority Critical patent/JP3276037B2/en
Publication of JPH0898029A publication Critical patent/JPH0898029A/en
Application granted granted Critical
Publication of JP3276037B2 publication Critical patent/JP3276037B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、符号化装置に関し、特
にN個(Nは自然数)の係数からなる1次元データ系列
を、有意係数の値と、連続する無意係数の数とによって
2次元エントロピー符号化する符号化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding apparatus, and more particularly, to a two-dimensional encoding method for converting a one-dimensional data sequence composed of N (N is a natural number) coefficients into a two-dimensional data sequence by using significant coefficient values and continuous insignificant coefficient numbers. The present invention relates to an encoding device that performs entropy encoding.

【0002】[0002]

【従来の技術】近年、デジタル画像データを取り扱う際
に記憶容量の削減や通信時間の短縮を図る技術として、
画像圧縮技術、なかでもISO/ITU−TS(旧CC
ITT)により国際標準として規格化されたJPEGア
ルゴリズム(ISO/IECDIS 10918−1)
が注目を集めている。
2. Description of the Related Art In recent years, techniques for reducing storage capacity and communication time when handling digital image data have been developed.
Image compression technology, especially ISO / ITU-TS (former CC
JPEG algorithm standardized as an international standard by (ITT) (ISO / IECDIS 10918-1)
Is attracting attention.

【0003】以下、図1〜図4を参照しながら、データ
を圧縮する際のJPEGアルゴリズムの概要を説明す
る。
The outline of the JPEG algorithm for compressing data will be described below with reference to FIGS.

【0004】まず、入力された画像データを主走査方向
8画素、副走査方向8画素のブロック(以下ブロックと
略す)に分割する(図示せず)。次に、分割されたブロ
ックに式(1)に従った2次元離散コサイン変換(以下
DCTと略す)を施す(ステップ11)。なお、式
(1)において、f(i,j)は図3(a)に示すよう
に変換前ブロック内の主走査方向i番目、副走査方向j
番目の画素の値を、F(u,v)は図3(b)に示すよ
うに変換後ブロック内の主走査方向u番目、副走査方向
v番目の変換値を表す。
First, input image data is divided into blocks (hereinafter abbreviated as blocks) of 8 pixels in the main scanning direction and 8 pixels in the sub-scanning direction (not shown). Next, the divided blocks are subjected to a two-dimensional discrete cosine transform (hereinafter abbreviated as DCT) according to equation (1) (step 11). In equation (1), f (i, j) is the i-th main scanning direction and the sub-scanning direction j in the block before conversion as shown in FIG.
As shown in FIG. 3B, F (u, v) represents the u-th converted value in the main scanning direction and the v-th converted value in the sub-scanning direction in the converted block.

【0005】[0005]

【数1】 DCTによって周波数成分(DCT係数)に変換された
ブロック(以下DCTブロックと略す)を所定の量子化
テーブルで量子化する(ステップ12)。量子化された
DCTブロックを図4に示す順序に従ったジグザグスキ
ャンによって64個の係数からなる1次元データ系列へ
と並べかえる(ステップ13)。並べかえられた1次元
データ系列を符号化する(ステップ14)。全ブロック
の符号化が終了したかどうかを調べ(ステップ15)、
終了していないならば次のブロックをステップ11〜ス
テップ14によって符号化する。
(Equation 1) A block (hereinafter abbreviated as DCT block) converted into a frequency component (DCT coefficient) by DCT is quantized by a predetermined quantization table (step 12). The quantized DCT blocks are rearranged into a one-dimensional data sequence composed of 64 coefficients by zigzag scanning in the order shown in FIG. 4 (step 13). The rearranged one-dimensional data sequence is encoded (step 14). It is checked whether encoding of all blocks is completed (step 15).
If not, the next block is encoded by steps 11 to 14.

【0006】次に、上記ステップ14における1次元デ
ータ系列の符号化を、図2を用いて説明する。なお、図
2において、nは1次元データ系列の2番目以降の係
数、すなわち交流係数の番号を、zeroは連続する無
意係数の数を表す。また、floor(a)は小数点以
下の切捨てによってaを整数化した数を、a modb
はaをbで割った余りを意味する。
Next, the encoding of the one-dimensional data series in step 14 will be described with reference to FIG. In FIG. 2, n represents the number of the second and subsequent coefficients of the one-dimensional data series, that is, the number of the AC coefficient, and zero represents the number of consecutive insignificant coefficients. Floor (a) is a modb which is a number obtained by converting a to an integer by truncating the decimal part.
Means the remainder of dividing a by b.

【0007】まず、先頭の係数、すなわち直流係数をそ
の値の有効ビット数(例えば直流係数値が’7’であれ
ば有効ビット数は3)によって1次元ハフマン符号化し
て該符号を符号列に付加し(ステップ202)、該係数
の有効ビット(例えば直流係数値が’7’であれば有効
ビツトは’111’)を符号列に付加する(ステップ2
03)。
First, the first coefficient, that is, the DC coefficient, is one-dimensionally Huffman-coded by the number of effective bits of the value (for example, if the DC coefficient value is “7”, the number of effective bits is 3), and the code is converted into a code string. (Step 202), and an effective bit of the coefficient (for example, if the DC coefficient value is '7', the effective bit is '111') is added to the code string (step 2).
03).

【0008】次に、2番目の係数から64番目の係数、
すなわち交流係数の符号化は、n番目(nは1≦n≦6
3なる整数)の交流係数が’0’であるかどうかを調べ
(ステップ205)、’0’でないならばzeroが1
6より小さいかどうかを調べ(ステップ206)、ze
roが16以上ならばzeroを16で割った商の小数
点以下を切り捨てた整数個の16個無意係数が続くこと
を示す符号(ZRL符号)を符号列に付加し(ステップ
207)、zeroにzeroを16で割った余りを設
定して(ステップ208)、zeroが16より小さい
ならば何もせず、その時点のzeroの値と該交流係数
の有効ビット数とによって2次元ハフマン符号化して該
符号を符号列に付加し(ステップ209)、該交流係数
の有効ビットを符号列に付加し(ステップ210)、該
交流係数が63番目の交流係数、つまり1次元データ系
列の最後の係数であるかどうかを調べて(ステップ21
1)、最後の係数ならば符号化を終了し、最後の係数で
なければzeroに0を設定して、(n+1)番目の交
流係数についてステップ205以降の処理を行う。
Next, from the second coefficient to the 64th coefficient,
That is, the coding of the AC coefficient is the nth (where n is 1 ≦ n ≦ 6).
It is checked whether or not the AC coefficient of “3” is “0” (step 205), and if it is not “0”, zero is 1
It is checked whether it is smaller than 6 (step 206).
If ro is equal to or greater than 16, a code (ZRL code) indicating that an integer number of 16 insignificant coefficients following the decimal point of the quotient obtained by dividing zero by 16 is added to the code sequence (step 207), and zero is added to zero. Is divided by 16 (step 208). If zero is smaller than 16, nothing is performed, and two-dimensional Huffman coding is performed using the value of zero at that time and the number of effective bits of the AC coefficient. Is added to the code string (step 209), the effective bit of the AC coefficient is added to the code string (step 210), and whether the AC coefficient is the 63rd AC coefficient, that is, the last coefficient of the one-dimensional data sequence. Check whether (Step 21
1) If the last coefficient, the coding is terminated; if not the last coefficient, zero is set to zero, and the processing from step 205 onward is performed for the (n + 1) th AC coefficient.

【0009】また、n番目の交流係数が’0’であるな
らばその交流係数が63番目の交流係数、つまり1次元
データ系列の最後の係数であるかどうかを調べて(ステ
ップ213)、最後の係数ならば1次元データ系列の終
了を示す符号(EOB符号)を符号列に付加し(ステッ
プ214)、最後の係数でなければzeroに1を加
え、(n+1)番目の交流係数についてステップ205
以降の処理を行う。
If the nth AC coefficient is "0", it is checked whether the AC coefficient is the 63rd AC coefficient, that is, the last coefficient of the one-dimensional data sequence (step 213). If it is the coefficient, the code (EOB code) indicating the end of the one-dimensional data sequence is added to the code string (step 214). If it is not the last coefficient, 1 is added to zero, and the step 205 is performed for the (n + 1) th AC coefficient.
The following processing is performed.

【0010】上記の要領にて、63番目の交流係数、す
なわちl次元データ系列の最後の係数まで符号化する
と、ステップ14は終了となる。なお、上記において、
有意係数が負の値ならば有効ビット数は該係数の絶対値
の有効ビット数であり、有効ビットは該係数から1を減
じた値の0補数表現のLSBからの有効ビット数分のビ
ットである。例えば、有意係数が’−3’ならば有効ビ
ット数は2ビットであり,該係数から1を減じた値の8
ビットでの0補数表現は1111,1101であるの
で、有効ビットは01である。
[0010] In the above manner, when encoding is performed up to the 63rd AC coefficient, that is, the last coefficient of the l-dimensional data sequence, step 14 ends. In the above,
If the significant coefficient is a negative value, the number of significant bits is the number of significant bits of the absolute value of the coefficient, and the number of significant bits is the number of significant bits from the LSB of the 0's complement representation of a value obtained by subtracting 1 from the coefficient. is there. For example, if the significant coefficient is '-3', the number of effective bits is 2 bits, and the value obtained by subtracting 1 from the coefficient is 8
Since the 0's complement expression in bits is 1111 and 1101, the effective bit is 01.

【0011】画像データは、ブロックの範囲では滑らか
に変化することが多いため、有意係数が直流係数及び低
周波数交流係数に集中し、高周波数交流係数における無
意係数の割合が高いブロックが多い、つまり上記1次元
データ系列の後半はほとんど無意係数となることが多
い。上記によると、1次元データ系列内のある有意係数
の次の係数から最後の係数までが無意係数であるなら
ば、その部分をEOB符号に符号化すればよく、また通
常EOB符号には最短もしくはそれに近い符号長の符号
が割当てられるため、高い圧縮効率を実現することがで
きる。
Since image data often changes smoothly in the range of blocks, significant coefficients concentrate on DC coefficients and low-frequency AC coefficients, and many blocks have a high ratio of insignificant coefficients in high-frequency AC coefficients. The latter half of the one-dimensional data series often has almost insignificant coefficients. According to the above, if a coefficient from a coefficient following a certain significant coefficient to a last coefficient in a one-dimensional data series is an insignificant coefficient, the part may be encoded into an EOB code. Since a code with a code length close to that is assigned, high compression efficiency can be realized.

【0012】[0012]

【発明が解決しようとする課題】ところで、上記の64
個の係数からなる1次元データ系列の符号化において
は、該1次元データ系列の先頭から順次符号化していく
ため、該1次元データ系列の64番目の係数に達するま
で、該1次元データ系列内に最後に出現する有意係数の
位置がわからず、該1次元データ系列の符号化速度の向
上を妨げていた。
By the way, the above-mentioned 64
In the encoding of a one-dimensional data sequence composed of a number of coefficients, since the one-dimensional data sequence is sequentially encoded from the beginning, the one-dimensional data sequence is encoded until the 64th coefficient of the one-dimensional data sequence is reached. In this case, the position of the last significant coefficient is not known, which hinders an improvement in the encoding speed of the one-dimensional data sequence.

【0013】この課題を解決するための技術として、例
えば特開平5−83564号公報に開示されている技術
がある。この技術は、ジグザグスキャンを最初に1次元
データ系列末尾から開始し、最初に有意係数を検出する
と該1次元データ系列の先頭から符号化を開始し、最初
に有意係数を検出した位置で符号化を終了するものであ
る。
As a technique for solving this problem, for example, there is a technique disclosed in Japanese Patent Application Laid-Open No. 5-83564. In this technique, zigzag scanning is started from the end of a one-dimensional data sequence first, and when a significant coefficient is detected first, coding is started from the beginning of the one-dimensional data sequence, and coding is performed at a position where a significant coefficient is detected first. Is to end.

【0014】しかし、これは1次元データ系列内のスキ
ャン順序を入れ替えたものであり、該1次元データ系列
の符号化に要する時間は、該1次元データ系列を先頭か
ら順に末尾まで符号化する時間と何ら変わりはない。
However, this is obtained by changing the scan order in the one-dimensional data sequence, and the time required for encoding the one-dimensional data sequence is the time required for encoding the one-dimensional data sequence from the beginning to the end. There is no difference.

【0015】本発明は、上記の課題に鑑みてなされたも
のであり、N個(Nは自然数)の係数からなる1次元デ
ータ系列を、有意係数の値と、有意係数の前に連続する
無意係数の数とによって2次元エントロピー符号化する
符号化装置において、符号化速度の向上を図るものであ
る。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problem, and a method of converting a one-dimensional data sequence including N (N is a natural number) coefficients into a significant coefficient value and a continuous insignificant value before the significant coefficient. In a coding apparatus that performs two-dimensional entropy coding according to the number of coefficients, the coding speed is improved.

【0016】[0016]

【課題を解決するための手段】本発明は、上記課題を解
決するために、請求項1記載の符号化装置は、N個(N
は自然数)の係数からなる1次元データ系列を有意係数
の値と連続する無意係数の数とによって2次元エントロ
ピー符号化する符号化装置であり、前記1次元データ系
列を記憶する記億手段と、前記記憶手段に記憶されてい
る1次元データ系列を先頭から順次読み出すための第一
のアドレスを発生する第一のアドレス発生手段と、前記
記憶手段に記憶されている1次元データ系列を末尾から
順次読み出すための第二のアドレスを発生する第二のア
ドレス発生手段と、前記第一のアドレスによって前記記
憶手段から順次読み出される1次元データ系列を符号化
する符号化手段と、前記第二のアドレスによって前記記
憶手段から順次読み出される1次元データ系列の各係数
が有意係数又は無意係数のどちらかであるかを判定する
判定手段と、前記記憶手段、前記第一のアドレス発生手
段、前記第二のアドレス発生手段、前記符号化手段及び
判定手段を制御する制御手段とを備え、前記制御手段は
前記符号化手段と前記判定手段を同時に動作させ、前記
判定手段が最初に有意係数を検出すると前記第二のアド
レス発生手段及び前記判定手段の動作を停止し、その後
前記第一のアドレスが前記第二のアドレスに等しくなる
と前記第一のアドレス発生手段及び前記符号化手段の動
作を停止して前記1次元データ系列の符号化を終了する
ことを特徴とする。
According to the present invention, in order to solve the above-mentioned problems, the encoding apparatus according to claim 1 comprises N (N
A two-dimensional entropy coding of a one-dimensional data sequence consisting of natural number coefficients by the value of a significant coefficient and the number of continuous insignificant coefficients, and a storage means for storing the one-dimensional data sequence; First address generating means for generating a first address for sequentially reading the one-dimensional data series stored in the storage means from the beginning, and sequentially storing the one-dimensional data series stored in the storage means from the end Second address generating means for generating a second address for reading; encoding means for encoding a one-dimensional data sequence sequentially read from the storage means by the first address; Determining means for determining whether each coefficient of the one-dimensional data sequence sequentially read from the storage means is a significant coefficient or an insignificant coefficient; Control means for controlling the first address generating means, the second address generating means, the encoding means and the judging means, wherein the control means operates the encoding means and the judging means simultaneously. And when the determining means first detects a significant coefficient, stops the operations of the second address generating means and the determining means, and thereafter, when the first address becomes equal to the second address, the first address. The operation of the generating means and the encoding means is stopped, and the encoding of the one-dimensional data sequence is terminated.

【0017】また、請求項2記載の符号化装置は、N個
(Nは自然数)の係数からなる1次元データ系列を有意
係数の値と連続する無意係数の数とによって2次元エン
トロピー符号化する符号化装置であり、前記1次元デー
タ系列を記憶する記憶手段と、前記記憶手段に記憶され
ている1次元データ系列を先頭から順次読み出すための
第一のアドレスを発生する第一のアドレス発生手段と、
前記記憶手段に記憶されている1次元データ系列を末尾
から順次読み出すための第二のアドレスを発生する第二
のアドレス発生手段と、前記第一のアドレスによって前
記記憶手段から読み出される1次元データ系列を符号化
する第一の符号化手段と、前記第二のアドレスによって
前記記憶手段から読み出される1次元データ系列を符号
化する第二の符号化手段と、前記第一の符号化手段から
発生される符号列と、前記第二の符号化手段から発生さ
れる符号列とを連結して1つの符号列とする連結手段
と、前記記憶手段、前記第一のアドレス発生手段、前記
第二のアドレス発生手段、前記第一の符号化手段、前記
第二のアドレス発生手段及び連結手段を制御する制御手
段とを備え、前記制御手段は前記第一の符号化手段と前
記第二の符号化手段を同時に動作させ、前記第二のアド
レスが所定値に達すると前記第二のアドレス発生手段を
停止し、その後前記第一のアドレスが前記第二のアドレ
スに等しくなると前記第一のアドレス発生手段、前記第
一の符号化手段及び前記第二の符号化手段の動作を停止
して前記1次元データ系列の符号化を終了することを特
徴とする。
Further, the encoding apparatus according to the second aspect performs two-dimensional entropy encoding of a one-dimensional data sequence composed of N (N is a natural number) coefficients by using the value of a significant coefficient and the number of consecutive insignificant coefficients. An encoding device, comprising: storage means for storing the one-dimensional data sequence; and first address generation means for generating a first address for sequentially reading the one-dimensional data sequence stored in the storage means from the beginning. When,
Second address generating means for generating a second address for sequentially reading the one-dimensional data series stored in the storage means from the end, and a one-dimensional data series read from the storage means by the first address First encoding means for encoding a one-dimensional data sequence read from the storage means by the second address; and Connecting means for connecting a code string generated by the second coding means to a code string generated by the second coding means, the storage means, the first address generating means, and the second address. Control means for controlling the generating means, the first coding means, the second address generating means and the linking means, wherein the control means comprises the first coding means and the second coding means Operating simultaneously, stopping the second address generation means when the second address reaches a predetermined value, and then when the first address becomes equal to the second address, the first address generation means, The operation of the first encoding unit and the second encoding unit is stopped, and the encoding of the one-dimensional data sequence is terminated.

【0018】[0018]

【作用】特許請求の範囲第1項に記載した符号化装置に
おいては、N個の係数からなる1次元データ系列を、先
頭から有意係数の値と連続する無意係数の数とによって
2次元エントロピー符号化するのと同時に、末尾から各
係数が有意係数か無意係数であるかを判定し、最初に有
意係数を検出すると判定を終了し、符号化を行っている
位置が判定を終了した位置に達すると前記1次元データ
系列の符号化を終了するので、符号化速度の向上が図れ
る。
In the encoding apparatus according to the first aspect, a one-dimensional data sequence composed of N coefficients is converted into a two-dimensional entropy code by using a significant coefficient value from the beginning and the number of consecutive insignificant coefficients. At the same time, it is determined from the end whether each coefficient is a significant coefficient or an insignificant coefficient. When a significant coefficient is detected first, the determination ends, and the position where encoding is performed reaches the position where the determination is completed. Then, since the encoding of the one-dimensional data sequence is completed, the encoding speed can be improved.

【0019】また、特許請求の範囲第2項に記載した符
号化装置においては、N個の係数からなる1次元データ
系列を、先頭から有意係数の値と連続する無意係数の数
とによって2次元エントロピー符号化するのと同時に、
末尾からも符号化し、末尾から所定の位置まで符号化す
ると該符号化を終了し、先頭からの符号化を行っている
位置が末尾からの符号化を終了した位置に達すると、両
符号化によって発生した符号列を連結して1つの符号列
として符号化を終了するので、符号化速度の向上が図れ
る。
Further, in the encoding device described in claim 2, the one-dimensional data sequence composed of N coefficients is converted into two-dimensional data by the value of the significant coefficient from the beginning and the number of continuous insignificant coefficients. At the same time as entropy coding,
Encoding is also performed from the end, and when encoding is performed from the end to a predetermined position, the encoding is terminated.When the position where encoding from the beginning reaches the position where encoding from the end is completed, both encodings are performed. Since the generated code strings are concatenated to end the coding as one code string, the coding speed can be improved.

【0020】[0020]

【実施例】以下、本発明の実施例を図5〜図12,図1
3を用いて説明する。なお、以下において、末尾にxが
付加されている数字列は2進表記、hが付加されている
数字列は16進表記、何も付加されていない数字列は1
0進表記である。
FIG. 5 to FIG. 12 and FIG.
3 will be described. Note that, in the following, a numeral string with x added at the end is represented in binary, a numeral string with h added is represented in hexadecimal, and a numeral string without any addition is 1
It is a decimal number notation.

【0021】第一に、特許請求の範囲第1項に記載した
符号化装置の実施例について、図5〜図7,図8を用い
て説明する。
First, an embodiment of the coding apparatus described in claim 1 will be described with reference to FIGS. 5 to 7 and FIG.

【0022】図5において、41は図示しない入力端子
から入力される64個の係数からなる1次元デー夕系列
を記憶し、入力されるアドレスによって指定される係数
を出力する記憶器、42はカウント・イネーブル信号c
e1がアクティブであるならば、図示しないクロック信
号に同期して記憶器41から係数を読み出すためのアド
レスを昇順に生成するカウンタ、43はカウント・イネ
ーブル信号ce2がアクティブであるならば、図示しな
いクロック信号に同期して記憶器41から係数を読み出
すためのアドレスを降順に生成するカウンタ、44は制
御信号ctrl1がアクティブである間、最初に入力さ
れる係数については該係数の有効ビット数により符号化
して符号列に左詰めで付加し、該係数の有効ビットを抽
出して符号列に左詰めで付加し、2番目以降に入力され
る係数が無意係数ならば内部の無意係数カウンタ(図示
せず)をインクリメントし、有意係数ならぼ、その時点
の無意係数カウンタの値が16以上ならば該カウンタの
第4ビット(LSBは第0ビット)以上のビットで表さ
れる数のZRL符号を符号列に左詰めで付加し、該カウ
ンタの下位4ビットで表される数(例えば該カウンタの
値が’20’であれば4)と該有意係数の有効ビット数
とにより符号化して符号列に左詰めで付加し、該有意係
数の有効ビットを袖出して符号列に左詰めで付加する符
号化器、45は制御信号ctrl2がアクティブである
間、入力される係数が有意係数か無意係数かを判定し、
有意係数であるならば信号valをアサートする判定
器、46はカウンタ42から出力されるアドレスadr
1、カウンタ43から出力されるアドレスadr2及び
判定器45から出力される信号valに応じて、カウン
ト・イネーブル信号cel、カウント・イネーブル信号
ce2、制御信号ctrl1及び制御信号ctrl2を
制御する制御器である。
In FIG. 5, reference numeral 41 denotes a storage for storing a one-dimensional data sequence composed of 64 coefficients inputted from an input terminal (not shown) and outputting a coefficient designated by an inputted address; .Enable signal c
If e1 is active, a counter for generating addresses for reading coefficients from the storage device 41 in ascending order in synchronization with a clock signal (not shown) is provided. 43 is a clock (not shown) provided that the count enable signal ce2 is active. A counter 44 for generating an address for reading out a coefficient from the memory 41 in descending order in synchronization with the signal. The counter 44 encodes the first inputted coefficient by the number of effective bits of the coefficient while the control signal ctrl1 is active. To the code string left-justified, extract the significant bits of the coefficient and add it to the code string left-justified. If the second and subsequent coefficients are insignificant coefficients, an internal insignificant coefficient counter (not shown) ) Is incremented, and if the value of the insignificant coefficient counter at that time is 16 or more, the fourth bit (LS Is the zeroth bit) or more ZRL codes of the number represented by the bits or more are added left-justified to the code string, and the number represented by the lower 4 bits of the counter (for example, if the value of the counter is '20', 4) an encoder that encodes by using the significant bits of the significant coefficient and adds the significant bits to the code string left-justified, determines the significant bits of the significant coefficients and adds the significant bits to the code string left-justified, and 45 is a control signal. While ctrl2 is active, it is determined whether the input coefficient is a significant coefficient or an insignificant coefficient,
If it is a significant coefficient, the decision unit asserts the signal val. 46 is the address adr output from the counter 42.
1, a controller that controls the count enable signal cel, the count enable signal ce2, the control signal ctrl1, and the control signal ctrl2 according to the address adr2 output from the counter 43 and the signal val output from the decision unit 45. .

【0023】以下、図6に示したように、記憶器41に
64個の係数からなる1次元データ系列が記憶されてお
り、カウンタ42、カウンタ43及び符号化器44内の
無意係数カウンタ(以下単に無意係数カウンタと呼ぶ)
は6ビットカウンタであり、カウンタ42及び無意係数
カウンタの初期値は’00h’、カウンタ43の初期値
は’3fh’とした場合を例にとり、図7,図8に示し
た制御フローチャートとともに説明する。なお、図6
(a)に示した係数マッブは、図6(b)に示した係数
ブロックを、図4に示した順序に従ってジグザグスキャ
ンして得られる1次元データ系列を、00h番地から3
fh番地まで先頭から順に記憶したものである。また、
図7に示したフローチャートは、カウンタ42及び符号
化器44の制御フローチャート、図8に示したフローチ
ャートは、カウンタ43及び判定器45の制御フローチ
ャートであり、図7,図8中のzeroは無意係数カウ
ンタの値を、floor(a)はaの小数点以下を切り
捨てて整数化した数を、amod bはaをbで割った
余りをそれぞれ表す。
As shown in FIG. 6, a one-dimensional data sequence consisting of 64 coefficients is stored in a storage unit 41, and a counter 42, a counter 43, and an insignificant coefficient counter (hereinafter, referred to as a counter) in an encoder 44. Simply called the insignificant coefficient counter)
Is a 6-bit counter. The case where the initial value of the counter 42 and the insignificant coefficient counter is "00h" and the initial value of the counter 43 is "3fh" will be described with reference to the control flowcharts shown in FIGS. . FIG.
The coefficient map shown in (a) is a three-dimensional data series obtained by zigzag scanning the coefficient block shown in FIG. 6B in the order shown in FIG.
The data is stored in order from the head up to the address fh. Also,
The flowchart shown in FIG. 7 is a control flowchart of the counter 42 and the encoder 44, and the flowchart shown in FIG. 8 is a control flowchart of the counter 43 and the determiner 45. Zero in FIGS. The value of the counter, floor (a) represents a number obtained by rounding off a below the decimal point of a and converted to an integer, and amod b represents a remainder obtained by dividing a by b.

【0024】まず、初期化動作を行い、カウンタ42、
カウンタ43、符号化器44及び判定器45を初期化す
る(ステップ611及びステップ631)。これにより
符号化器44に対しては00h番地、判定器45に対し
ては3fh番地の係数、つまりそれぞれ1次元データ系
列の先頭係数と最後尾係数が記憶器41から出力される
(ステップ612及びステップ632)。次に、制御信
号ctrl1及び制御信号ctrl2をアサートし、符
号化器44及び判定器45を始動する(ステップ613
及びステップ633)。符号化器44は、入力された係
数を有効ビット数から符号化して符号列に左詰めで付加
し(ステップ614)、該係数の有効ビットを抽出して
符号列に左詰めで付加し(ステップ615)、判定器4
5は入力された係数が有意係数か無意係数かを判定する
(ステップ634)。
First, an initialization operation is performed, and a counter 42,
The counter 43, the encoder 44, and the determiner 45 are initialized (steps 611 and 631). Thus, the coefficient at address 00h for the encoder 44 and the coefficient at address 3fh for the decision unit 45, that is, the first coefficient and the last coefficient of the one-dimensional data sequence, respectively, are output from the storage unit 41 (steps 612 and 612). Step 632). Next, the control signal ctrl1 and the control signal ctrl2 are asserted to start the encoder 44 and the decision unit 45 (step 613).
And step 633). The encoder 44 encodes the input coefficient from the number of effective bits and adds it to the code string left-justified (step 614), extracts the effective bits of the coefficient, and adds it to the code string left-justified (step 614). 615), judgment device 4
5 determines whether the input coefficient is a significant coefficient or a meaningless coefficient (step 634).

【0025】その後、判定器45については、信号va
lがアサートされているかどうかを調べ(ステップ63
5)、アサートされていなければ制御器46はカウント
・イネーブル信号ce2をアサートし、次番地の係数を
記憶器41から出力してカウント・イネーブル信号ce
2をネゲートして(ステップ636)ステップ634以
下の処埋を続行し、アサートされていれば制御器46は
制御信号ctrl2をネゲートして判定器の動作を停止
する(ステップ637)。
Thereafter, the signal va
It is checked whether or not 1 is asserted (step 63
5) If not asserted, the controller 46 asserts the count enable signal ce2, outputs the coefficient at the next address from the memory 41, and outputs the count enable signal ce2.
2 is negated (step 636), and the processing following step 634 is continued. If asserted, the controller 46 negates the control signal ctrl2 and stops the operation of the determiner (step 637).

【0026】また、符号化器44については、制御器4
6はアドレスadr1とアドレスadr2が等しいかど
うかを調べ、等しくなければカウント・イネーブル信号
ce1をアサートし、次番地の係数を記憶器41から出
力してカウント・イネーブル信号ce1をネゲートし
(ステップ617)、符号化器44は入力された係数を
前述の要領で符号化し(ステップ618以降)、等しけ
れば制御信号ctrl1をネゲートして符号化器の動作
を停止し(ステップ623)、符号化器44がEOB符
号を符号列に左詰めで付加する(ステップ624)と、
全処理を終了する。
The encoder 44 includes a controller 4
6 checks whether the address adr1 is equal to the address adr2, and if they are not equal, asserts the count enable signal ce1 and outputs the coefficient of the next address from the memory 41 to negate the count enable signal ce1 (step 617). , The encoder 44 encodes the inputted coefficients in the manner described above (step 618 and thereafter), negates the control signal ctrl1 if they are equal, and stops the operation of the encoder (step 623). When the EOB code is added to the code string left-justified (step 624),
All processing ends.

【0027】次に、符号化装置の他の例について説明す
る。この他の例の符号化装置は、先に述べた実施例にお
いて、信号valがアサートされるか又はアドレスad
r2が所定値(例えば20h番地)に達するとステップ
637以降の処理を行い、信号valがアサートされて
いず且つアドレスadr2が所定値に達していないとス
テップ636の処理を行うようにすることによって実現
できる。つまり、上記実施例においてステップ635
を、信号valがアサートされているか又はアドレスa
dr2が所定値に達しているかを調べるようにすればよ
い。
Next, another example of the encoding apparatus will be described. In another embodiment of the encoding device, the signal val is asserted or the address ad is
When r2 reaches a predetermined value (for example, address 20h), the processing after step 637 is performed, and when signal val is not asserted and address adr2 does not reach the predetermined value, processing is performed by step 636. it can. That is, in the above embodiment, step 635 is performed.
Is determined whether the signal val is asserted or the address a
What is necessary is just to check whether dr2 has reached the predetermined value.

【0028】更に、符号化装置の更に他の例について説
明する。この更に他の例の符号化装置は、先に述べた実
施例において信号valがアサートされるか又はアドレ
スadrlとアドレスadr2との差が所定値(例えば
1)に達するとステップ637以降の処理を行い、信号
valがアサートされていず旦つアドレスadr1とア
ドレスadr2との差が所定値に達していないとステッ
プ636の処理を行うようにすることによって実現でき
る。つまり、上記実施例においてステップ635を、信
号valがアサートされているか又はアドレスadr1
とアドレスadr2との差が所定値に達しているかを調
べるようにすればよい。なお、上記の所定値は0から、
1次元データ系列の先頭係数が記憶されているアドレス
と末尾係数が記憶されているアドレスとの差までの範囲
で任意であるが、本発明の目的は符号化速度の向上にあ
るので、できる限り小さい値であることが望ましい。
Further, another example of the encoding apparatus will be described. The encoding apparatus according to the still another example performs the processing after step 637 when the signal val is asserted or the difference between the address adrl and the address adr2 reaches a predetermined value (for example, 1) in the above-described embodiment. If the signal val is not asserted and the difference between the address adr1 and the address adr2 does not reach a predetermined value, the process of step 636 is performed. That is, in the above-described embodiment, step 635 is performed when the signal val is asserted or when the address adr1
It is sufficient to check whether the difference between the address and the address adr2 has reached a predetermined value. In addition, the above predetermined value is from 0,
Any one of the range up to the difference between the address at which the leading coefficient of the one-dimensional data sequence is stored and the address at which the ending coefficient is stored can be used. However, the object of the present invention is to improve the encoding speed. Desirably, the value is small.

【0029】第二に、特許請求の範囲第2項に記載した
符号化装置の実施例について、図9〜図12,図13を
用いて説明する。図9において、71は図示しない入力
端子から入力される1次元データ系列を記憶し、入力さ
れるアドレスによって指定される係数を出力する記憶
器、72はカウント・イネーブル信号celがアクティ
ブであるならば、図示しないクロック信号に同期して記
憶器71から係数を読み出すためのアドレスを昇順に生
成するカウンタ、73はカウント・イネーブル信号ce
2がアクティブであるならば、図示しないクロック信号
に同期して記憶器71から係数を読み出すためのアドレ
スを降順に生成するカウンタ、74は制御信号ctrl
lがアクティブである間、最初に入力される係数につい
ては該係数の有効ビット数入力される係数が無意係数な
らば内部の無意係数カウンタ(図示せず)をインクリメ
ントし、有意係数ならばその時点の無意係数カウンタの
値が16以上ならば該カウンタの第4ビット(LSBは
第0ビット)以上のビットで表される数のZRL符号を
符号列に左詰めで付加し、該カウンタの下位4ビットで
表される数と該有意係数の有効ビット数とにより符号化
して符号列に左詰めで付加し、該有意係数の有効ビット
を抽出して符号列に左詰めで付加し、制御信号ctrl
lがネゲートされると、後述の終了動作の後に符号化動
作を終了する順方向符号化器、75は制御信号ctrl
2がアサートされている間、入力される係数を後述する
逆方向2次元ハフマン符号化して符号を出力し、制御信
号ctrl2がネゲートされると、後述の終了動作の後
符号化動作を終了する、無意係数カウンタ(図示せず)
を内蔵する逆方向符号化器、76は符号化器74及び符
号化器75から出力される符号列を連結して1つの符号
列として出力する連結器、77はカウンタ72から出力
されるアドレスadr1及びカウンタ73から出力され
るアドレスadr2に応じて、カウント・イネーブル信
号cel、カウント・イネーブル信号ce2、制御信号
ctrll及び制御信号ctrl2を制御する制御器で
ある。
Second, an embodiment of the encoding apparatus described in claim 2 will be described with reference to FIGS. 9 to 12 and 13. FIG. In FIG. 9, reference numeral 71 denotes a storage device for storing a one-dimensional data sequence input from an input terminal (not shown) and outputting a coefficient specified by an input address; and 72, if the count enable signal cel is active. A counter for generating addresses for reading coefficients from the storage device 71 in ascending order in synchronization with a clock signal (not shown);
If 2 is active, a counter 74 generates addresses for reading coefficients from the storage device 71 in descending order in synchronization with a clock signal (not shown), and a counter 74 generates a control signal ctrl.
While 1 is active, the number of effective bits of the coefficient to be input first is incremented by an internal insignificant coefficient counter (not shown) if the input coefficient is an insignificant coefficient, and if it is a significant coefficient, If the value of the insignificant coefficient counter is 16 or more, the number of ZRL codes represented by bits equal to or more than the fourth bit (LSB is the 0th bit) of the counter is added to the code string left justified, and the lower 4 A control signal ctrl is generated by coding the number represented by the bits and the number of significant bits of the significant coefficient and adding it to the code string left-justified, extracting the significant bits of the significant coefficient and adding it to the code string left-justified,
When n is negated, the forward encoder 75 that terminates the encoding operation after the termination operation described later, 75 controls the control signal ctrl.
While 2 is asserted, the input coefficient is subjected to backward two-dimensional Huffman encoding described later to output a code. When the control signal ctrl2 is negated, the encoding operation is terminated after the termination operation described later. Insignificant coefficient counter (not shown)
, A concatenator for concatenating the code strings output from the encoder 74 and the encoder 75 and outputting as one code string, 77 a address adr1 output from the counter 72 And a controller that controls the count enable signal cel, the count enable signal ce2, the control signal ctrl1, and the control signal ctrl2 in accordance with the address adr2 output from the counter 73.

【0030】ここで、逆方向符号化器75における逆方
向2次元ハフマン符号化及び連結器76における符号列
の連結動作について説明する。
Here, the operation of the backward two-dimensional Huffman coding in the backward encoder 75 and the concatenation of the code strings in the coupler 76 will be described.

【0031】まず、逆方向符号化器75における逆方向
2次元ハフマン符号化について図10及び図11を用い
て説明する。例えば、図10に示したような1次元デー
タ系列を有意係数の有効ビット数と該係数の前に連続す
る無意係数の数とによって2次元ハフマン符号化する場
合、通常の符号化(順方向符号化)においては、最初の
有意係数’10’の有効ビット数4とその前に連続する
無意係数の数0とによって、図11に例示した符号化テ
ーブル上の該当する符号’1011x’を抽出して符号
列に左詰めで加え、係数’10’の有効ビット’101
0x’を符号列に左詰めで加える。有意係数’10’の
次の有意係数は係数’15’であり、その前には4つの
無意係数があるので、係数’15’の有効ビット数4と
連続する無意係数の数4とによって符号’1111,1
111,1001,0lllx’が抽出されて符号列に
左詰めで加えられ、係数’15’の有効ビット’111
1x’が符号列に左詰めで加えられる。係数’15’は
l次元デー夕系列の最後の係数であるので、符号列’1
011,1010,1111,1111,1001,0
111,llllx’が最終的に得られる。
First, the backward two-dimensional Huffman coding in the backward encoder 75 will be described with reference to FIGS. For example, when a one-dimensional data sequence as shown in FIG. 10 is subjected to two-dimensional Huffman coding by the number of significant bits of a significant coefficient and the number of consecutive insignificant coefficients before the coefficient, ordinary coding (forward code ), The corresponding code '1011x' on the coding table illustrated in FIG. 11 is extracted by using the number 4 of effective bits of the first significant coefficient '10' and the number of consecutive insignificant coefficients 0 before it. To the code string, left-justified, and the effective bit '101 of coefficient' 10 '
0x 'is added to the code string left-justified. The next significant coefficient after the significant coefficient '10' is the coefficient '15', which is preceded by four insignificant coefficients. Therefore, the sign is determined by the number of effective bits of the coefficient '15' and the number of consecutive insignificant coefficients '4'. '1111,1
111, 1001, 0llx 'are extracted and added to the code string left-justified, and the effective bit' 111 'of the coefficient' 15 'is extracted.
1x 'is added to the code string left-justified. Since the coefficient '15' is the last coefficient of the l-dimensional data series, the code string '1'
011,1010,1111,1111,1001,0
111, llllx 'is finally obtained.

【0032】1次元データ系列を逆方向符号化する場
合、有意係数の有効ビットを符号列に右詰めで加え、該
有意係数の有効ビット数とその後に連続する無意係数の
数とによって符号化テーブル上の該当する符号化して右
詰めで加える。図10に示した1次元データ系列を逆方
向2次元ハフマン符号化すると、最初の有意係数’1
5’の有効ビット’1lllx’が符号列に右詰めで加
えられ、次の有意係数を検出するまで無意係数の数を計
数する。係数’15’の次の有意係数は係数’10’で
あり、係数’15’の後に連続する無意係数の数は4で
あり、係数’15’の有効ビット数は4であるので、符
号’1111,1111,1001,0lllx’が抽
出され符号列に右詰めで加えられ、係数’10’の有効
ビツト’1010x’が符号列に右詰めで加えられる。
係数’10’は逆方向から見た場合の1次元データ系列
内の最後の係数であるので、係数’10’の有効ビット
数4とその後に連続する無意係数の数0によって符号’
1011x’が抽出され符号列に右詰めで加えられる。
When the one-dimensional data sequence is reverse-coded, the significant bits of the significant coefficient are added to the code string right-justified, and the coding table is calculated based on the number of significant bits of the significant coefficient and the number of subsequent insignificant coefficients. Encode the relevant code above and add it right-justified. When the one-dimensional data sequence shown in FIG. 10 is subjected to reverse two-dimensional Huffman coding, the first significant coefficient '1
A 5 'valid bit' 11llx 'is added to the code string right-justified, and the number of insignificant coefficients is counted until the next significant coefficient is detected. The next significant coefficient after the coefficient '15' is the coefficient '10', the number of insignificant coefficients following the coefficient '15' is four, and the number of effective bits of the coefficient '15' is four. 1111, 1111, 1001, 0llx 'are extracted and added to the code string right-justified, and the effective bit' 1010x 'of the coefficient' 10 'is added to the code string right-justified.
Since the coefficient '10' is the last coefficient in the one-dimensional data sequence when viewed from the opposite direction, the code '10' is signified by the number of effective bits 4 of the coefficient '10' and the number 0 of subsequent insignificant coefficients
1011x 'is extracted and added to the code string right-justified.

【0033】以上により、最終的には順方向2次元ハフ
マン符号化と同じ符号列が得られる。
As described above, the same code sequence as in the forward two-dimensional Huffman coding is finally obtained.

【0034】なお、逆方向符号化器75は最初に入力さ
れる係数、つまり1次元データ系列の最後の係数が無意
係数ならば、1次元データ系列の符号化が終了したこと
を示す符号を符号列に右詰めで加えた後、上述の逆方向
符号化を行う。
The backward encoder 75 encodes the first input coefficient, that is, if the last coefficient of the one-dimensional data sequence is an insignificant coefficient, the code indicating that the encoding of the one-dimensional data sequence has been completed. After adding to the column right-justified, the above-described reverse encoding is performed.

【0035】次に、連結器76における符号列の連結動
作について説明する。上記において説明したように、順
方向符号化器74からは1次元データ系列を先頭から順
方向に符号化した符号列が、逆方向符号化器75からは
1次元データ系列を末尾から逆方向に符号化した符号列
がそれぞれ出力される。連結器76は、順方向符号化器
74から出力される順方向符号列はそのまま出力し、逆
方向符号化器75から出力される逆方向符号列は内部バ
ッファに右詰めで記憶しておく。順方向符号化器74か
らの出力が終了すると、順方向符号列に続いて記憶して
おいた逆方向符号列を左から順に出力する。
Next, a description will be given of the operation of connecting the code strings in the connector 76. As described above, a code sequence obtained by coding the one-dimensional data sequence in the forward direction from the forward encoder 74 and the one-dimensional data sequence in the backward direction from the tail is output from the backward encoder 75. Each of the encoded code strings is output. The coupler 76 outputs the forward code string output from the forward encoder 74 as it is, and stores the backward code string output from the backward encoder 75 in the internal buffer right-justified. When the output from the forward encoder 74 is completed, the backward code sequence stored after the forward code sequence is sequentially output from the left.

【0036】以下、第一の実施例と同様に1次元データ
系列が記憶器71に記憶されており、カウンタ72、カ
ウンタ73、順方向符号化器74内の無意係数カウンタ
及び逆方向符号化器75内の無意係数カウンタは6ビッ
トカウンタであり、カウンタ72及び両無意係数カウン
タの初期値は’00h’、カウンタ43の初期値は’3
fh’とした場合を例にとり、図12,図13に示した
制御フローチャートとともに説明する。なお、図12に
示したフローチャートは、カウンタ72及び順方向符号
化器74の制御フローチャート、図13に示したフロー
チャートはカウンタ73及び逆方向符号化器75の制御
フローチャートであり、floor(a)はaの小数点
以下を切り捨てて整数化した数を、a mod bはa
をbで割った余りを、図12中のz1は順方向符号化器
74内の無意係数カウンタの値を、図13中のz2は逆
方向符号化器75内の無意係数カウンタの値をそれぞれ
表す。
Thereafter, as in the first embodiment, a one-dimensional data sequence is stored in the storage unit 71, and the counter 72, the counter 73, the insignificant coefficient counter in the forward encoder 74, and the reverse encoder are used. The insignificant coefficient counter in 75 is a 6-bit counter, the initial value of the counter 72 and both insignificant coefficient counters is “00h”, and the initial value of the counter 43 is “3”.
The case where fh ′ is set as an example will be described together with the control flowcharts shown in FIGS. Note that the flowchart shown in FIG. 12 is a control flowchart of the counter 72 and the forward encoder 74, and the flowchart shown in FIG. 13 is a control flowchart of the counter 73 and the backward encoder 75. a mod b is a number obtained by rounding down the decimal part of a and converting it to an integer.
12, z1 in FIG. 12 is the value of the insignificant coefficient counter in the forward encoder 74, and z2 in FIG. 13 is the value of the insignificant coefficient counter in the backward encoder 75, respectively. Represent.

【0037】まず、初期化動作を行い、カウンタ72、
カウンタ73、順方向符号化器74及び逆方向符号化器
76を初期化する(ステップ101及びステップ12
1)。これにより順方向符号化器74に対しては00h
番地、逆方向符号化器75に対しては3fh番地の係数
が記憶器71から出力される(ステップ102及びステ
ップ122)。次に、制御信号ctrl1及び制御信号
ctrl2をアサートし、順方向符号化器74及び逆方
向符号化器75を始動する(ステップ103及びステッ
プ123)。その後、順方向符号化器74及び逆方向符
号化器75は、上述の要領で順方向及び逆方向の符号化
を行う(ステップ104以降及びステップ124以
降)。なお、アドレスadr2が固定アドレスADRに
等しくなると、制御器77は制御信号ctrl2をネゲ
ー卜して逆方向符号化器75の動作を停止し(ステップ
137)、逆方向符号化器75は順方向符号化器76か
らの出力を待つ(ステップ138)。また、アドレスa
dr1とアドレスadr2とが等しくなると、制御器7
7は制御信号ctrl1をネゲートして順方向符号化器
74の動作を停止し(ステップ113)、順方向符号化
器74はその時点で最後に入力された係数が有意係数な
らば逆方向符号化器75には何も出力せずに動作を終了
し、無意係数ならばその時点での順方向符号化器内の無
意係数カウンタの第4ビット以上のビットで表現される
数のZRL符号を左詰めで符号列に付加し、同カウンタ
の下位4ビットを逆方向符号化器75に出力する(以上
ステップ114)。逆方向符号化器75は順方向符号化
器からの出力を受け取った後、逆方向符号化器75に最
後に入力された係数が有意係数ならば該係数の有効ビッ
ト数と順方向符号化器76からの出力code3とによ
って符号化して符号列に右誌めで付加して動作を終了す
る(以上ステップ189)。
First, an initialization operation is performed, and a counter 72,
Initialize the counter 73, the forward encoder 74, and the backward encoder 76 (Step 101 and Step 12).
1). This gives 00h to forward encoder 74.
The coefficient at the address 3fh is output from the storage unit 71 to the address / inverse encoder 75 (steps 102 and 122). Next, the control signal ctrl1 and the control signal ctrl2 are asserted, and the forward encoder 74 and the backward encoder 75 are started (steps 103 and 123). Thereafter, the forward encoder 74 and the backward encoder 75 perform forward and backward encoding in the manner described above (steps 104 and after and steps 124 and after). When the address adr2 becomes equal to the fixed address ADR, the controller 77 negates the control signal ctrl2 and stops the operation of the backward encoder 75 (step 137). The output from the converter 76 is waited (step 138). Address a
When dr1 and address adr2 become equal, the controller 7
7 negates the control signal ctrl1 and stops the operation of the forward encoder 74 (step 113), and the forward encoder 74 performs reverse encoding if the last input coefficient at that time is a significant coefficient. The operation is terminated without outputting anything to the encoder 75, and if it is an insignificant coefficient, the ZRL code of the number represented by the fourth or more bits of the insignificant coefficient counter in the forward encoder at that time is left The lower 4 bits of the counter are output to the reverse encoder 75 (step 114). After receiving the output from the forward encoder, the backward encoder 75, if the last coefficient input to the backward encoder 75 is a significant coefficient, determines the number of effective bits of the coefficient and the forward encoder. The code is encoded by the output code3 from the code 76 and added to the code string in the right column, and the operation is terminated (step 189).

【0038】なお、別の例では、上記実施例において逆
方向符号化器75が始動した後、アドレスadrlとア
ドレスadr2との差が所定値、例えば1、以下かどう
かを調べ、所定値以下ならばステップ137以降の処理
を、所走値より大きければステップ136以降またはス
テップ128以降の処理を行えばよく、これはアドレス
adrlとアドレスadr2との差が所定値以下かどう
かを調べるようにステップ127及びステップ135を
置き換えればよいことを意味する。
In another example, after the backward encoder 75 is started in the above embodiment, it is checked whether the difference between the address adrl and the address adr2 is a predetermined value, for example, 1 or less. For example, the process after step 137 may be performed, and if it is larger than the preset value, the process after step 136 or step 128 may be performed. In step 127, it is determined whether the difference between the address adrl and the address adr2 is equal to or smaller than a predetermined value. And step 135 may be replaced.

【0039】以上、第一に特許請求の範囲第1項に記載
した符号化装置の実施例について、第二に特許請求の範
囲第2項に記載した符号化装置の実施例について説明し
た。なお、いずれの実施例についても、その構成及び動
作アルゴリズムは上記実施例に限定されるものではな
く、第一の実施例については1次元データ系列を記憶す
る記憶手段と、記憶手段に記憶されている1次元データ
系列を先頭から順次読み出すための第一のアドレスを発
生する第一のアドレス発生手段と、記憶手段に記憶され
ている1次元データ系列を末尾から順次読み出すための
第二のアドレスを発生する第二のアドレス発生手段と、
第一のアドレスによって記憶手段から順次読み出される
1次元データ系列を符号化する符号化手段と、第二のア
ドレスによって記憶手段から順次読み出される1次元デ
ータ系列の各係数が有意係数または無意係数のどちらで
あるかを判定する判定手段と、記憶手段、第一のアドレ
ス発生手段、第二のアドレス発生手段、符号化手段及び
判定手段を制御する制御手段とを備え、本発明による符
号化装置の動作を実現する構成及び動作アルゴリズムで
あれば、どのような構成及び動作アルゴリズムでも構わ
ない。
As described above, the first embodiment of the coding apparatus described in claim 1 and the second embodiment of the coding apparatus described in claim 2 have been described. Note that, in any of the embodiments, the configuration and the operation algorithm are not limited to the above-described embodiments. For the first embodiment, a storage unit that stores a one-dimensional data sequence and a storage unit that stores the one-dimensional data series are used. A first address generating means for generating a first address for sequentially reading the one-dimensional data series from the beginning, and a second address for sequentially reading the one-dimensional data series stored in the storage means from the end. Second address generating means for generating,
Encoding means for encoding a one-dimensional data sequence sequentially read from the storage means by the first address; and determining whether each coefficient of the one-dimensional data series sequentially read from the storage means by the second address is a significant coefficient or an insignificant coefficient And a control means for controlling the storage means, the first address generation means, the second address generation means, the coding means and the determination means, and the operation of the coding apparatus according to the present invention. Any configuration and operation algorithm may be used as long as the configuration and the operation algorithm realize the above.

【0040】また、第二の実施例については1次元デー
タ系列を記憶する記憶手段と、記憶手段に記憶されてい
る1次元データ系列を先頭から順次読み出すための第一
のアドレスを発生する第一のアドレス発生手段と、記憶
手段に記憶されている1次元データ系列を末尾から順次
読み出すための第二のアドレスを発生する第二のアドレ
ス発生手段と、第一のアドレスによって記憶手段から順
次読み出される1次元データ系列を符号化する符号化手
段と、第二のアドレスによって記憶手段から順次読み出
される1次元データ系列を符号化する符号化手段と、第
一の符号化手段から発生される符号列と前記第二の符号
化手段から発生される符号列とを連結して1つの符号列
とする速結手段と、記憶手段、第一のアドレス発生手
段、第二のアドレス発生手段、順方向符号化手段及び逆
方向符号化手段を制御する制御手段とを備え、本発明に
よる符号化装置の動作を実現する構成及び動作アルゴリ
ズムであれば、どのような構成及び動作アルゴリズムで
も構わない。
Further, in the second embodiment, a storage means for storing a one-dimensional data sequence and a first address for generating a first address for sequentially reading the one-dimensional data sequence stored in the storage means from the head. Address generating means, a second address generating means for generating a second address for sequentially reading the one-dimensional data series stored in the storage means from the end, and sequentially read from the storage means by the first address. Encoding means for encoding the one-dimensional data sequence, encoding means for encoding the one-dimensional data sequence sequentially read from the storage means by the second address, and a code sequence generated from the first encoding means. Quick connection means for concatenating a code string generated from the second encoding means into one code string, storage means, first address generation means, and second address And a control unit for controlling the forward encoding unit and the backward encoding unit, and any configuration and operation algorithm that realizes the operation of the encoding device according to the present invention. I do not care.

【0041】また、上記においては、符号化については
2次元ハフマン符号化を例にとったが、1次元データ系
列を有意係数と連続する無意係数の数とによる2次元エ
ントロピー符号化ならば符号化の種類は問わない。
Further, in the above description, two-dimensional Huffman coding is taken as an example of coding, but if two-dimensional entropy coding of a one-dimensional data sequence is performed using a significant coefficient and the number of consecutive insignificant coefficients, the coding is performed. Does not matter.

【0042】また、上記においては、図6に示した1次
元データ系列を例にとったが、その内容及び係数の個数
ともにこれに限定されないことは明らかである。
In the above description, the one-dimensional data series shown in FIG. 6 is taken as an example, but it is apparent that the contents and the number of coefficients are not limited to this.

【0043】[0043]

【発明の効果】本発明の特許請求の範囲第1項に記載し
た符号化装置は、1次元データ系列の先頭からの符号化
と同時に1次元データ系列の最終有意係数を検出でき、
該符号化は1次元データ系列の最終有意係数で終了する
ことができるため、最終有意係数以降の符号化に要する
時間を削減でき、符号化速度の向上を図ることができ
る。
According to the encoding device described in claim 1 of the present invention, it is possible to detect the final significant coefficient of a one-dimensional data sequence simultaneously with the encoding from the beginning of the one-dimensional data sequence,
Since the encoding can be completed at the last significant coefficient of the one-dimensional data sequence, the time required for encoding after the last significant coefficient can be reduced, and the encoding speed can be improved.

【0044】また、特許請求の範囲第2項に記載した符
号化装置は、1次元データ系列を先頭からのみ符号化す
る符号化装置と生成する符号が完全互換でありながら符
号化速度の向上を図ることができる。
Further, the encoding device described in claim 2 improves the encoding speed while the generated code is completely compatible with the encoding device that encodes the one-dimensional data sequence only from the beginning. Can be planned.

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

【図1】 画像圧縮時のJPEGアルゴリズムの処理フ
ローを示す図である。
FIG. 1 is a diagram showing a processing flow of a JPEG algorithm at the time of image compression.

【図2】 画像圧縮時のJPEGアルゴリズムの符号化
フローを示す図である。
FIG. 2 is a diagram showing an encoding flow of a JPEG algorithm during image compression.

【図3】 (a),(b)はDCTを施す前後のブロッ
クを示す図である。
FIGS. 3A and 3B are diagrams showing blocks before and after applying DCT. FIGS.

【図4】 画像圧縮時のJPEGアルゴリズムにおける
ジグザグスキャンの順序を示す図である。
FIG. 4 is a diagram showing the order of zigzag scanning in the JPEG algorithm during image compression.

【図5】 本発明の特許請求の範囲第1項による符号化
装置の一実施例である。
FIG. 5 is an embodiment of an encoding device according to claim 1 of the present invention.

【図6】 (a)は図5の実施例中の記憶器41に記憶
されている1次元データ系列の例を示す図であり、
(b)は図5の実施例中の記憶器41に記憶されている
1次元データ系列の例のジグザグスキャン前の状態を示
す図である。
FIG. 6A is a diagram showing an example of a one-dimensional data series stored in a storage device 41 in the embodiment of FIG. 5,
FIG. 6B is a diagram illustrating a state before zigzag scanning of an example of a one-dimensional data sequence stored in the storage device 41 in the embodiment of FIG.

【図7】 図5の実施例における処理フローを示す図の
第1の部分である。
FIG. 7 is a first part of a diagram showing a processing flow in the embodiment of FIG. 5;

【図8】 図5の実施例における処理フローを示す図の
第2の部分である。
FIG. 8 is a second part of a diagram showing a processing flow in the embodiment of FIG. 5;

【図9】 本発明の特許請求の範囲第2項による符号化
装置の一実施例をである。
FIG. 9 shows an embodiment of an encoding device according to claim 2 of the present invention.

【図10】 図9の実施例中の逆方向符号化器75にお
ける逆方向符号化を説明するための図である。
FIG. 10 is a diagram for explaining backward encoding in the backward encoder 75 in the embodiment of FIG. 9;

【図11】 2次元符号化テーブルの例を示す図であ
る。
FIG. 11 is a diagram illustrating an example of a two-dimensional encoding table.

【図12】 図9の実施例における処理フローを示す図
の第1の部分である。
FIG. 12 is a first part of a diagram showing a processing flow in the embodiment of FIG. 9;

【図13】 図9の実施例における処理フローを示す図
の第2の部分である。
FIG. 13 is a second part of a diagram illustrating a processing flow in the embodiment of FIG. 9;

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

11〜15…図1における処理フロー中の各ステップ、
201〜215…図2における符号化フロー中の各ステ
ップ、41…記憶器、42…カウンタ、43…カウン
タ、44…符号化器、45…判定器、46…制御器、6
01〜617及び621〜627…図7,図8における
処理フロー中の各ステップ、71…記憶器、72…カウ
ンタ、73…カウンタ、74…順方向符号化器、75…
逆方向符号化器、76…連結器、77…制御器、101
〜117及び121〜142…図12,図13における
処理フロー中の各ステップ
11 to 15... Each step in the processing flow in FIG.
201 to 215 each step in the encoding flow in FIG. 2, 41 storage, 42 counter, 43 counter, 44 encoder, 45 determiner, 46 controller 6,
01 to 617 and 621 to 627... Each step in the processing flow in FIGS. 7 and 8, 71... Memory, 72... Counter 73, counter 74, forward encoder, 75.
Reverse coder, 76 ... connector, 77 ... controller, 101
To 117 and 121 to 142... Each step in the processing flow in FIGS.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/41 - 1/419 H03M 7/30 H04N 7/30 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int. Cl. 7 , DB name) H04N 1/41-1/419 H03M 7/30 H04N 7/30

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 N個(Nは自然数)の係数からなる1次
元データ系列を有意係数の値と連続する無意係数の数と
によって2次元エントロピー符号化する符号化装置であ
り、 前記1次元データ系列を記憶する記億手段と、 前記記憶手段に記憶されている1次元データ系列を先頭
から順次読み出すための第一のアドレスを発生する第一
のアドレス発生手段と、 前記記憶手段に記憶されている1次元データ系列を末尾
から順次読み出すための第二のアドレスを発生する第二
のアドレス発生手段と、 前記第一のアドレスによって前記記憶手段から順次読み
出される1次元データ系列を符号化する符号化手段と、 前記第二のアドレスによって前記記憶手段から順次読み
出される1次元データ系列の各係数が有意係数又は無意
係数のどちらであるかを判定する判定手段と、 前記記憶手段、前記第一のアドレス発生手段、前記第二
のアドレス発生手段、前記符号化手段及び判定手段を制
御する制御手段とを備え、 前記制御手段は前記符号化手段と前記判定手段を同時に
動作させ、前記判定手段が最初に有意係数を検出すると
前記第二のアドレス発生手段及び前記判定手段の動作を
停止し、その後前記第一のアドレスが前記第二のアドレ
スに等しくなると前記第一のアドレス発生手段及び前記
符号化手段の動作を停止して前記1次元データ系列の符
号化を終了することを特徴とする符号化装置。
1. An encoding apparatus for two-dimensionally entropy-encoding a one-dimensional data sequence composed of N (N is a natural number) coefficients using a value of a significant coefficient and the number of consecutive insignificant coefficients, Storage means for storing a series, first address generation means for generating a first address for sequentially reading the one-dimensional data series stored in the storage means from the beginning, and storage in the storage means Second address generating means for generating a second address for sequentially reading the one-dimensional data series from the end, and encoding for coding the one-dimensional data series sequentially read from the storage means by the first address Means for determining whether each coefficient of the one-dimensional data sequence sequentially read from the storage means by the second address is a significant coefficient or a meaningless coefficient. Determination means, and control means for controlling the storage means, the first address generation means, the second address generation means, the encoding means and the determination means, wherein the control means is The determination means is operated simultaneously, and when the determination means first detects a significant coefficient, the operations of the second address generation means and the determination means are stopped, and then the first address is equal to the second address. An encoding device, wherein the operation of the first address generating means and the encoding means is stopped and the encoding of the one-dimensional data sequence is terminated.
【請求項2】 N個(Nは自然数)の係数からなる1次
元データ系列を有意係数の値と連続する無意係数の数と
によって2次元エントロピー符号化する符号化装置であ
り、 前記1次元データ系列を記憶する記憶手段と、 前記記憶手段に記憶されている1次元データ系列を先頭
から順次読み出すための第一のアドレスを発生する第一
のアドレス発生手段と、 前記記憶手段に記憶されている1次元データ系列を末尾
から順次読み出すための第二のアドレスを発生する第二
のアドレス発生手段と、 前記第一のアドレスによって前記記憶手段から読み出さ
れる1次元データ系列を符号化する第一の符号化手段
と、 前記第二のアドレスによって前記記憶手段から読み出さ
れる1次元データ系列を符号化する第二の符号化手段
と、 前記第一の符号化手段から発生される符号列と、前記第
二の符号化手段から発生される符号列とを連結して1つ
の符号列とする連結手段と、 前記記憶手段、前記第一のアドレス発生手段、前記第二
のアドレス発生手段、前記第一の符号化手段、前記第二
のアドレス発生手段及び連結手段を制御する制御手段と
を備え、 前記制御手段は前記第一の符号化手段と前記第二の符号
化手段を同時に動作させ、前記第二のアドレスが所定値
に達すると前記第二のアドレス発生手段を停止し、その
後前記第一のアドレスが前記第二のアドレスに等しくな
ると前記第一のアドレス発生手段、前記第一の符号化手
段及び前記第二の符号化手段の動作を停止して前記1次
元データ系列の符号化を終了することを特徴とする符号
化装置。
2. An encoding apparatus for two-dimensional entropy-encoding a one-dimensional data sequence composed of N (N is a natural number) coefficients using a value of a significant coefficient and the number of continuous insignificant coefficients, Storage means for storing a series, first address generation means for generating a first address for sequentially reading the one-dimensional data series stored in the storage means from the beginning, and storage in the storage means Second address generating means for generating a second address for sequentially reading the one-dimensional data series from the end, and a first code for coding the one-dimensional data series read from the storage means by the first address Encoding means; second encoding means for encoding a one-dimensional data sequence read from the storage means by the second address; and first encoding means. Concatenating means for concatenating a code string generated from the above and a code string generated from the second encoding means into one code string; the storage means, the first address generating means, Control means for controlling the second address generation means, the first encoding means, the second address generation means and the connection means, wherein the control means comprises the first encoding means and the second code The second address generation means is stopped when the second address reaches a predetermined value, and then the first address generation is performed when the first address becomes equal to the second address. Means, the operation of said first encoding means and said second encoding means is stopped, and the encoding of said one-dimensional data sequence is terminated.
JP23173194A 1994-09-27 1994-09-27 Encoding device Expired - Fee Related JP3276037B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23173194A JP3276037B2 (en) 1994-09-27 1994-09-27 Encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23173194A JP3276037B2 (en) 1994-09-27 1994-09-27 Encoding device

Publications (2)

Publication Number Publication Date
JPH0898029A JPH0898029A (en) 1996-04-12
JP3276037B2 true JP3276037B2 (en) 2002-04-22

Family

ID=16928154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23173194A Expired - Fee Related JP3276037B2 (en) 1994-09-27 1994-09-27 Encoding device

Country Status (1)

Country Link
JP (1) JP3276037B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4582413B2 (en) * 2005-09-22 2010-11-17 富士ゼロックス株式会社 Data processing method and data processing apparatus

Also Published As

Publication number Publication date
JPH0898029A (en) 1996-04-12

Similar Documents

Publication Publication Date Title
US5818877A (en) Method for reducing storage requirements for grouped data values
US5825830A (en) Method and apparatus for the compression of audio, video or other data
JP3349617B2 (en) Huffman decoder
CN1155221C (en) Method and system for encoding and decoding method and system
JP3224926B2 (en) Quantization / inverse quantization circuit
US20070279261A1 (en) Method and apparatus for lossless run-length data encoding
EP0425496B1 (en) Method and apparatus for statistically encoding digital data
JP2000138934A (en) Jpeg coder with limited file size, its method and recording medium
US4967196A (en) Apparatus for decoding variable-length encoded data
US5668737A (en) High-speed data processor and coding method
JPH07123269A (en) Corder for picture signal
US6798914B1 (en) Neural-network-based method of image compression
JP3276037B2 (en) Encoding device
JP3217507B2 (en) Image compression device
US5561422A (en) Method and apparatus for variable length coding with reduced memory requirement
JP4241517B2 (en) Image encoding apparatus and image decoding apparatus
JP3260925B2 (en) Image processing device
JPH08251590A (en) Digital encoding device
JP2698034B2 (en) Code conversion method, code conversion system, and digital data signal processing method
JPH0884260A (en) Compression system and expansion system for two-dimension image data
JP2988825B2 (en) Variable length encoding method and apparatus using small memory
JP2627927B2 (en) Image data compression rate conversion method
JPH06152988A (en) Decoder for variable length encoding
JP2684887B2 (en) Encoding / decoding device
JP2937455B2 (en) Image data compression device and image data decompression device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees