JPH0898029A - Coder - Google Patents

Coder

Info

Publication number
JPH0898029A
JPH0898029A JP23173194A JP23173194A JPH0898029A JP H0898029 A JPH0898029 A JP H0898029A JP 23173194 A JP23173194 A JP 23173194A JP 23173194 A JP23173194 A JP 23173194A JP H0898029 A JPH0898029 A JP H0898029A
Authority
JP
Japan
Prior art keywords
address
encoding
coefficient
dimensional data
data series
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP23173194A
Other languages
Japanese (ja)
Other versions
JP3276037B2 (en
Inventor
Hiroyuki Kono
裕之 河野
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
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 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

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

Abstract

PURPOSE: To improve the coding speed by finishing discrimination when a significant coefficient is detected at first and terminating coding of linear data series when the position for coding reaches a position at which the discrimination is finished. CONSTITUTION: At first counters 42, 43, a coder 44 and a discrimination device 45 are initialized. Then control signals ctrl, ctrl2 are asserted to start the coder 44 and the discrimination device 45. The coder 44 codes the received coefficient depending on a valid bit number and the discrimination device 45 discriminates whether the received coefficient is a significant coefficient or a non-significant coefficient. Then when the signal val is not asserted, a controller 46 continues the processing and the controller 46 stops the operation of the discrimination device 45 when asserted. Furthermore, the controller 46 checks whether or not addresses adr1 and adr2 are equal to each other and when not equal, the coder 44 codes the received coefficient, and when equal, the coding processing unit 44 is stopped to terminate the entire processing.

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 a coding device, and more particularly, to a two-dimensional one-dimensional data series consisting of N (N is a natural number) coefficients by the value of the significant coefficient and the number of continuous insignificant coefficients. The present invention relates to a coding device that performs entropy coding.

【0002】[0002]

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

【0003】以下、図1〜図4を参照しながら、データ
を圧縮する際のJPEGアルゴリズムの概要を説明す
る。
An 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, the input image data is divided into blocks of 8 pixels in the main scanning direction and 8 pixels in the sub scanning direction (hereinafter abbreviated as blocks) (not shown). Next, a two-dimensional discrete cosine transform (hereinafter abbreviated as DCT) according to the equation (1) is applied to the divided blocks (step 11). In equation (1), f (i, j) is the i-th main scanning direction and the sub-scanning direction j in the pre-conversion block as shown in FIG.
As for the value of the th pixel, F (u, v) represents the u-th sub-scanning direction v-th sub-scanning direction conversion value in the post-conversion block as shown in FIG.

【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 frequency components (DCT coefficients) by DCT is quantized by a predetermined quantization table (step 12). The quantized DCT blocks are rearranged into a one-dimensional data series consisting of 64 coefficients by zigzag scanning according to the order shown in FIG. 4 (step 13). The rearranged one-dimensional data series is encoded (step 14). It is checked whether all blocks have been encoded (step 15),
If not finished, the next block is encoded by steps 11-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 second and subsequent coefficients of the one-dimensional data series, that is, the AC coefficient numbers, and zero represents the number of continuous insignificant coefficients. In addition, floor (a) is a modb which is a number obtained by converting a into an integer by rounding down to the decimal point.
Means the remainder when a is divided by b.

【0007】まず、先頭の係数、すなわち直流係数をそ
の値の有効ビット数(例えば直流係数値が’7’であれ
ば有効ビット数は3)によって1次元ハフマン符号化し
て該符号を符号列に付加し(ステップ202)、該係数
の有効ビット(例えば直流係数値が’7’であれば有効
ビツトは’111’)を符号列に付加する(ステップ2
03)。
First, the leading coefficient, that is, the DC coefficient is one-dimensionally Huffman-encoded by the effective bit number of the value (for example, the effective bit number is 3 when the DC coefficient value is '7'), and the code is converted into a code string. Then, the effective bit of the coefficient is added to the code string (eg, the effective bit is "111" if the DC coefficient value is "7") (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 encoding of the AC coefficient is the nth (n is 1 ≦ n ≦ 6
It is checked whether the AC coefficient of the integer 3) is "0" (step 205), and if it is not "0", zero is 1
Check whether it is less than 6 (step 206), ze
If ro is 16 or more, a code (ZRL code) that indicates that 16 integer insignificant coefficients that are obtained by cutting down the decimal point of the quotient obtained by dividing zero by 16 are added to the code string (step 207), and zero is added to zero. Is divided by 16 (step 208), and if zero is smaller than 16, nothing is done, and two-dimensional Huffman coding is performed according to the zero value at that time and the number of effective bits of the AC coefficient to obtain the code. 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 series. Check it (Step 21
1) If it is the last coefficient, the encoding is terminated, and if it is not the last coefficient, zero is set to zero, and the processing from step 205 is performed on 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 or not the AC coefficient is the 63rd AC coefficient, that is, the last coefficient of the one-dimensional data series (step 213). If the coefficient is 0, a code (EOB code) indicating the end of the one-dimensional data sequence is added to the code string (step 214), and if it is not the last coefficient, 1 is added to zero, and step 205 is performed for the (n + 1) th AC coefficient.
Perform the following processing.

【0010】上記の要領にて、63番目の交流係数、す
なわちl次元データ系列の最後の係数まで符号化する
と、ステップ14は終了となる。なお、上記において、
有意係数が負の値ならば有効ビット数は該係数の絶対値
の有効ビット数であり、有効ビットは該係数から1を減
じた値の0補数表現のLSBからの有効ビット数分のビ
ットである。例えば、有意係数が’−3’ならば有効ビ
ット数は2ビットであり,該係数から1を減じた値の8
ビットでの0補数表現は1111,1101であるの
で、有効ビットは01である。
When the 63rd AC coefficient, that is, the last coefficient of the 1-dimensional data series is encoded in the above manner, step 14 is completed. In the above,
If the significance 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 the 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 representation 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 are concentrated in the DC coefficient and the low frequency AC coefficient, and there are many blocks in which the ratio of the insignificant coefficient to the high frequency AC coefficient is high. The latter half of the above-mentioned one-dimensional data series often has almost insignificant coefficients. According to the above, if the coefficient from the next coefficient to the last coefficient of a certain significant coefficient in the one-dimensional data series is an insignificant coefficient, that part may be encoded into an EOB code, and the shortest or normal EOB code is used. Since a code having a code length close to that is assigned, high compression efficiency can be realized.

【0012】[0012]

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

【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. This technique starts zigzag scanning from the end of the one-dimensional data series, starts encoding from the beginning of the one-dimensional data series when a significant coefficient is detected first, and encodes at the position where the significant coefficient is detected first. Is to end.

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

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

【0016】[0016]

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

【0017】また、請求項2記載の符号化装置は、N個
(Nは自然数)の係数からなる1次元データ系列を有意
係数の値と連続する無意係数の数とによって2次元エン
トロピー符号化する符号化装置であり、前記1次元デー
タ系列を記憶する記憶手段と、前記記憶手段に記憶され
ている1次元データ系列を先頭から順次読み出すための
第一のアドレスを発生する第一のアドレス発生手段と、
前記記憶手段に記憶されている1次元データ系列を末尾
から順次読み出すための第二のアドレスを発生する第二
のアドレス発生手段と、前記第一のアドレスによって前
記記憶手段から読み出される1次元データ系列を符号化
する第一の符号化手段と、前記第二のアドレスによって
前記記憶手段から読み出される1次元データ系列を符号
化する第二の符号化手段と、前記第一の符号化手段から
発生される符号列と、前記第二の符号化手段から発生さ
れる符号列とを連結して1つの符号列とする連結手段
と、前記記憶手段、前記第一のアドレス発生手段、前記
第二のアドレス発生手段、前記第一の符号化手段、前記
第二のアドレス発生手段及び連結手段を制御する制御手
段とを備え、前記制御手段は前記第一の符号化手段と前
記第二の符号化手段を同時に動作させ、前記第二のアド
レスが所定値に達すると前記第二のアドレス発生手段を
停止し、その後前記第一のアドレスが前記第二のアドレ
スに等しくなると前記第一のアドレス発生手段、前記第
一の符号化手段及び前記第二の符号化手段の動作を停止
して前記1次元データ系列の符号化を終了することを特
徴とする。
The encoding device according to a second aspect of the present invention performs two-dimensional entropy encoding on a one-dimensional data sequence consisting of N (N is a natural number) coefficients by the value of the significant coefficient and the number of consecutive insignificant coefficients. An encoding device, storage means for storing the one-dimensional data series, and 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. 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 one-dimensional data series read from the storage means by the first address Generated by the first encoding means, the second encoding means for encoding the one-dimensional data sequence read from the storage means by the second address, and the first encoding means for encoding Connecting means for connecting the code string and the code string generated from the second encoding means into one code string, the storage means, the first address generating means, the second address Generating means, said first encoding means, said second address generating means and control means for controlling said connecting means, said control means comprising said first encoding means and said second encoding means When the second addresses reach a predetermined value, the second address generating means are stopped at the same time, and when the first address becomes equal to the second address, the first address generating means, The operation of the first encoding unit and the second encoding unit is stopped to end the encoding of the one-dimensional data series.

【0018】[0018]

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

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

【0020】[0020]

【実施例】以下、本発明の実施例を図5〜図12,図1
3を用いて説明する。なお、以下において、末尾にxが
付加されている数字列は2進表記、hが付加されている
数字列は16進表記、何も付加されていない数字列は1
0進表記である。
Embodiments of the present invention will now be described with reference to FIGS.
3 will be used for the explanation. In the following, a number string with x added to the end is in binary notation, a number string with h added is in hexadecimal notation, and a number string with nothing added is 1
It is a zero-based notation.

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

【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 is a memory for storing a one-dimensional data series consisting of 64 coefficients input from an input terminal (not shown) and outputting a coefficient designated by an input address, and 42 is a count. .Enable signal c
If e1 is active, a counter that generates addresses for reading coefficients from the memory 41 in ascending order in synchronization with a clock signal (not shown), and 43 is a clock (not shown) if the count enable signal ce2 is active. A counter which generates addresses for reading coefficients from the memory 41 in a descending order in synchronization with the signal, and 44 encodes the coefficient input first while the control signal ctrl1 is active, by the effective bit number of the coefficient. Left-justified to the code string, the effective bit of the coefficient is extracted, left-justified to the code string, and if the second and subsequent coefficients are insignificant coefficients, an internal insignificant coefficient counter (not shown) ) Is incremented to find a significant coefficient, and if the value of the insignificant coefficient counter at that time is 16 or more, the fourth bit (LS) of the counter Is the 0th bit) and the number of ZRL codes represented by bits equal to or greater than 0 is left-justified in 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) and the number of significant bits of the significant coefficient, which is left-justified in the code string, and the significant bits of the significant coefficient are cleaved and left-justified in the code string, and 45 is a control signal While ctrl2 is active, determine whether the input coefficient is a significant coefficient or an insignificant coefficient,
A determiner that asserts the signal val if it is a significant coefficient, and 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 determiner 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で割った
余りをそれぞれ表す。
Hereinafter, as shown in FIG. 6, a one-dimensional data series consisting of 64 coefficients is stored in the memory 41, and the counter 42, the counter 43, and the insignificant coefficient counter in the encoder 44 (hereinafter (Simply called the insignificant coefficient counter)
Is a 6-bit counter, and the initial values of the counter 42 and the insignificant coefficient counter are '00h' and the initial value of the counter 43 is '3fh', and will be described with reference to the control flowcharts shown in FIGS. 7 and 8. . Note that FIG.
The coefficient map shown in (a) is a one-dimensional data sequence obtained by zigzag scanning the coefficient block shown in FIG. 6 (b) in the order shown in FIG.
It is stored from the beginning up to the address fh. Also,
The flow chart shown in FIG. 7 is a control flow chart of the counter 42 and the encoder 44, and the flow chart shown in FIG. 8 is a control flow chart of the counter 43 and the determiner 45. Zero in FIG. 7 and FIG. The value of the counter, floor (a), represents the number obtained by rounding down the decimal point of a to make it an integer, and amod b represents the remainder of 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, the initialization operation is performed, and the counter 42,
The counter 43, the encoder 44, and the determiner 45 are initialized (step 611 and step 631). As a result, the coefficient at address 00h for the encoder 44 and the coefficient at address 3fh for the determiner 45, that is, the head coefficient and the tail coefficient of the one-dimensional data series, are output from the storage unit 41 (step 612 and Step 632). Next, the control signal ctrl1 and the control signal ctrl2 are asserted to start the encoder 44 and the determiner 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 in a left-justified manner (step 614), extracts the effective bit of the coefficient and adds it to the code string in a left-justified manner (step 614). 615), the determiner 4
5 determines whether the input coefficient is a significant coefficient or an insignificant coefficient (step 634).

【0025】その後、判定器45については、信号va
lがアサートされているかどうかを調べ(ステップ63
5)、アサートされていなければ制御器46はカウント
・イネーブル信号ce2をアサートし、次番地の係数を
記憶器41から出力してカウント・イネーブル信号ce
2をネゲートして(ステップ636)ステップ634以
下の処埋を続行し、アサートされていれば制御器46は
制御信号ctrl2をネゲートして判定器の動作を停止
する(ステップ637)。
Thereafter, the decision unit 45 outputs the signal va.
Check if l 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) to continue the processing of step 634 and subsequent steps, and if asserted, the controller 46 negates the control signal ctrl2 to stop the operation of the determiner (step 637).

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

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

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

【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を制御する制御器で
ある。
Secondly, an embodiment of the encoding device described in claim 2 will be described with reference to FIGS. 9 to 12 and 13. In FIG. 9, reference numeral 71 denotes a storage unit that stores a one-dimensional data series input from an input terminal (not shown) and outputs a coefficient specified by an input address. Reference numeral 72 indicates if the count enable signal cel is active. , A counter for generating addresses in ascending order for reading coefficients from the memory 71 in synchronization with a clock signal (not shown), and 73 is a count enable signal ce
If 2 is active, a counter that generates addresses for reading coefficients from the memory 71 in descending order in synchronization with a clock signal (not shown), 74 is a control signal ctrl
While l is active, the number of significant bits of the coefficient input first is incremented by an internal meaningless coefficient counter (not shown) if the coefficient input is an insignificant coefficient, and if it is a significant coefficient, then If the value of the insignificant coefficient counter of 16 is 16 or more, the ZRL code of the number represented by the 4th bit (LSB is 0th bit) or more of the counter is left-justified to the code string, and the lower 4 bits of the counter are added. The control signal ctrl is encoded by the number expressed in bits and the number of significant bits of the significant coefficient and left-justified in the code string, and the significant bit of the significant coefficient is extracted and left-justified in the code string.
When l is negated, the forward encoder, which terminates the encoding operation after the termination operation described later, 75 is the control signal ctrl
While 2 is asserted, the input coefficient is subjected to backward two-dimensional Huffman coding, which will be described later, to output a code, and when the control signal ctrl2 is negated, the coding operation ends after the ending operation described below. Insignificant coefficient counter (not shown)
A backward encoder which incorporates a code, 76 is a concatenator which concatenates the code strings output from the encoder 74 and the encoder 75 and outputs as one code string, and 77 is an address adr1 output from the counter 72 Also, the controller 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 73.

【0030】ここで、逆方向符号化器75における逆方
向2次元ハフマン符号化及び連結器76における符号列
の連結動作について説明する。
Here, the backward two-dimensional Huffman coding in the backward encoder 75 and the concatenation operation of the code strings in the concatenator 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. 10 and 11. For example, when two-dimensional Huffman coding is performed on a one-dimensional data sequence as shown in FIG. 10 by the number of significant bits of a significant coefficient and the number of consecutive insignificant coefficients before the coefficient, normal coding (forward coding 11), the corresponding significant code '1011x' on the encoding table illustrated in FIG. 11 is extracted by the effective bit number 4 of the first significant coefficient '10' and the number 0 of consecutive insignificant coefficients before that. Left-justified to the code string, and the effective bit of the coefficient '10'is' 101
0x 'is added left-justified to the code string. The next significant coefficient after the significant coefficient '10' is the coefficient '15', and since there are four insignificant coefficients before it, the significant bit number of the coefficient '15' and the number of consecutive insignificant coefficients 4 sign '1111,1
111,1001,0111x 'is extracted and added to the code string by left-justification, and the effective bit' 111 of the coefficient '15'.
1x 'is added to the code string left justified. The coefficient '15' is the last coefficient of the l-dimensional data sequence, so the code string '1'
011,1010,1111,1111,1001,0
111, llllx 'are 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 backward coding a one-dimensional data sequence, effective bits of significant coefficients are right-justified in a code string, and an encoding table is obtained according to the number of effective bits of the significant coefficients and the number of consecutive insignificant coefficients. Add the corresponding code above with right justification. When the one-dimensional data series shown in FIG. 10 is subjected to backward two-dimensional Huffman coding, the first significant coefficient '1
5'significant bits '1llllx' are added to the code string right justified, counting the number of insignificant coefficients until the next significant coefficient is detected. The significant coefficient next to the coefficient “15” is the coefficient “10”, the number of insignificant coefficients following the coefficient “15” is 4, and the number of effective bits of the coefficient “15” is 4. Therefore, the sign “ 1111, 1111, 1001, 0111x 'are extracted and right-justified to the code string, and the effective bit' 1010x 'of the coefficient' 10 'is right-justified to the code string.
Since the coefficient "10" is the last coefficient in the one-dimensional data series when viewed from the opposite direction, it is signed by the number of effective bits 4 of the coefficient "10" and the number of consecutive insignificant coefficients 0.
1011x ′ is extracted and added right-justified to the code string.

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

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

【0035】次に、連結器76における符号列の連結動
作について説明する。上記において説明したように、順
方向符号化器74からは1次元データ系列を先頭から順
方向に符号化した符号列が、逆方向符号化器75からは
1次元データ系列を末尾から逆方向に符号化した符号列
がそれぞれ出力される。連結器76は、順方向符号化器
74から出力される順方向符号列はそのまま出力し、逆
方向符号化器75から出力される逆方向符号列は内部バ
ッファに右詰めで記憶しておく。順方向符号化器74か
らの出力が終了すると、順方向符号列に続いて記憶して
おいた逆方向符号列を左から順に出力する。
Next, the code string concatenation operation in the concatenator 76 will be described. As described above, the forward encoder 74 encodes the one-dimensional data sequence in the forward direction from the head, and the backward encoder 75 encodes the one-dimensional data sequence in the backward direction from the end. The encoded code strings are output. The concatenator 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 in the right-justified manner. When the output from the forward coder 74 is completed, the stored backward code sequence following 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内の無意係数カウンタの値をそれぞれ
表す。
Hereinafter, as in the first embodiment, the one-dimensional data series is stored in the storage 71, and the counter 72, the counter 73, the insignificant coefficient counter in the forward encoder 74 and the backward encoder. The insignificant coefficient counter in 75 is a 6-bit counter. The initial values of the counter 72 and both insignificant coefficient counters are "00h", and the initial value of the counter 43 is "3".
Taking the case of fh ′ as an example, description will be made with reference to the control flowcharts shown in FIGS. 12 and 13. Note that the flowchart shown in FIG. 12 is a control flowchart of the counter 72 and the forward encoder 74, the flowchart shown in FIG. 13 is a control flowchart of the counter 73 and the backward encoder 75, and floor (a) is a mod b is the number obtained by rounding down the number after the decimal point of a to obtain an integer.
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. 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, the initialization operation is performed, and the counter 72,
The counter 73, the forward encoder 74, and the backward encoder 76 are initialized (step 101 and step 12).
1). This causes 00h for the forward encoder 74.
For the address and backward encoder 75, the coefficient at address 3fh is output from the memory 71 (step 102 and step 122). Next, the control signal ctrl1 and the control signal ctrl2 are asserted to start the forward encoder 74 and the backward encoder 75 (step 103 and step 123). After that, the forward encoder 74 and the backward encoder 75 perform forward and backward encoding in the above-described manner (step 104 and after and step 124 and after). When the address adr2 becomes equal to the fixed address ADR, the controller 77 negates the control signal ctrl2 to stop the operation of the backward encoder 75 (step 137), and the backward encoder 75 forward codes. It waits for the output from the rectifier 76 (step 138). Also, the address a
When the dr1 and the address adr2 become equal, the controller 7
7 negates the control signal ctrl1 to stop the operation of the forward encoder 74 (step 113), and the forward encoder 74 performs backward encoding if the last input coefficient at that time is a significant coefficient. The operation is terminated without outputting anything to the device 75, and if it is an insignificant coefficient, the ZRL code of the number represented by the 4th bit or more of the insignificant coefficient counter in the forward encoder at that time is left. The data is padded and added to the code string, and the lower 4 bits of the counter are output to the backward encoder 75 (step 114 above). The backward encoder 75 receives the output from the forward encoder, and if the coefficient last input to the backward encoder 75 is a significant coefficient, the number of effective bits of the coefficient and the forward encoder are calculated. It is encoded by the output code3 from 76 and added to the code string in the right column, and the operation ends (step 189 above).

【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, if the processing after step 137 is larger than the running value, the processing after step 136 or after step 128 may be performed. This is done by checking whether the difference between the address adrl and the address adr2 is less than or equal to a predetermined value. And that step 135 may be replaced.

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

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

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

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

【0043】[0043]

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

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

【図面の簡単な説明】[Brief description of 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 a coding flow of a JPEG algorithm at the time of image compression.

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

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

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

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

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

【図9】 本発明の特許請求の範囲第2項による符号化
装置の一実施例をである。
FIG. 9 is an embodiment of an encoding device according to the second aspect 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.

【図11】 2次元符号化テーブルの例を示す図であ
る。
FIG. 11 is a diagram showing 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.

【図13】 図9の実施例における処理フローを示す図
の第2の部分である。
FIG. 13 is a second part of the diagram showing the 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-15 ... Each step in the processing flow in FIG.
201-215 ... Each step in the encoding flow in FIG. 2, 41 ... Memory device, 42 ... Counter, 43 ... Counter, 44 ... Encoder, 45 ... Judgment device, 46 ... Controller, 6
01 to 617 and 621 to 627 ... Each step in the process flow in FIGS. 7 and 8, 71 ... Memory device, 72 ... Counter, 73 ... Counter, 74 ... Forward encoder, 75 ...
Reverse encoder, 76 ... Concatenator, 77 ... Controller, 101
To 117 and 121 to 142 ... Steps in the process flow in FIGS.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H03M 7/40 9382−5K H04N 7/30 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical indication H03M 7/40 9382-5K H04N 7/30

Claims (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007088826A (en) * 2005-09-22 2007-04-05 Fuji Xerox Co Ltd Data processing method and data processor

Cited By (2)

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

Also Published As

Publication number Publication date
JP3276037B2 (en) 2002-04-22

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
US20090129691A1 (en) Lossless Compression of Color Image Data Using Entropy Encoding
CN1155221C (en) Method and system for encoding and decoding method and system
EP0425496B1 (en) Method and apparatus for statistically encoding digital data
US5761345A (en) Image processing apparatus suitable for multistage compression
US5668737A (en) High-speed data processor and coding method
WO1989009516A1 (en) Apparatus for decoding variable-length encoded data
JP2962518B2 (en) Image data encoding device
JP3217507B2 (en) Image compression device
US4972497A (en) Image coding system
JP3276037B2 (en) Encoding device
JPH10215379A (en) Image coder and image decoder
JPH1023259A (en) Image pattern converter
JPH10271016A (en) Encoder/decoder
JP2905133B2 (en) Digital encoding device
JP3260925B2 (en) Image processing device
JP2812064B2 (en) Image processing device
JP2001217722A (en) Device and method for encoding information, and computer readable storage medium
JPH0884260A (en) Compression system and expansion system for two-dimension image data
JP2684887B2 (en) Encoding / decoding device
JP2708253B2 (en) Image data compression method
JPH10163880A (en) Data decoder
JPS61136379A (en) Encoding system
JP3216741B2 (en) Image coding method

Legal Events

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