JP2003333339A - Image encoding apparatus and image encoding method - Google Patents

Image encoding apparatus and image encoding method

Info

Publication number
JP2003333339A
JP2003333339A JP2002136510A JP2002136510A JP2003333339A JP 2003333339 A JP2003333339 A JP 2003333339A JP 2002136510 A JP2002136510 A JP 2002136510A JP 2002136510 A JP2002136510 A JP 2002136510A JP 2003333339 A JP2003333339 A JP 2003333339A
Authority
JP
Japan
Prior art keywords
coefficient
zero
dct
coefficients
image
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.)
Pending
Application number
JP2002136510A
Other languages
Japanese (ja)
Inventor
Daisuke Koyanagi
大輔 小柳
Hitomi Horigome
ひとみ 堀込
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2002136510A priority Critical patent/JP2003333339A/en
Publication of JP2003333339A publication Critical patent/JP2003333339A/en
Pending 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)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image encoding apparatus and an image encoding method capable of realizing high speed Huffman encoding processing and simplifying encoding processing. <P>SOLUTION: A zero run processing section 7 for a process of counting zero coefficients is provided not in a Huffman encoding section 5 but before the Huffman encoding section 5, the zero coefficients are processed before Huffman encoding and the Huffman encoding section 5 processes non-zero coefficients and a zero run length only. <P>COPYRIGHT: (C)2004,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像符号化装置、
特に、JPEG(Joint Photographic Expert Group)
方式により画像を圧縮して符号化する画像符号化装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image coding device,
In particular, JPEG (Joint Photographic Expert Group)
The present invention relates to an image encoding device that compresses and encodes an image by a method.

【0002】[0002]

【従来の技術】デジタル静止画像の符号化方式としてJ
PEGが知られており、特に、DCT(離散コサイン変
換)を用いたベースライン方式は広く用いられている。
図1は、以上の方式で符号化を行なう従来の画像符号化
装置100の概略構成図を示す。図1に示す画像符号化
装置100において、まず、前処理部101では、入力
画像データが所定サイズのブロック、例えば8×8の画
素値からなるブロックに分割される。次に、DCT/量
子化部102において、各画素値ブロックに対して離散
コサイン変換(DCT:discrete cosine transformati
on)が施される。DCTにより、各8×8の画素値ブロ
ックから8×8のDCT係数ブロックが得られる。この
8×8のDCT係数ブロックの最初のDCT係数は、画
素値ブロックのDC(直流)成分の大きさを示し、それ
以外の63個のDCT係数はそれぞれ周波数の異なるA
C(交流)成分の大きさを示している。次に、DCT係
数ブロック内の各DCT係数が量子化される。次に、量
子化された64個のDCT係数(1ブロック)が一旦D
CTバッファ103に保存される。次に、ジグザグスキ
ャン部104では、量子化されたDCT係数ブロック
(以降、量子化されたDCT係数はDCT係数と省略す
る)に対しジグザグスキャンを施して、DCT係数ブロ
ックの各DCT係数をジグザグな順序のシーケンスに並
べる。そして、ハフマン符号化部105では、このDC
T係数シーケンスに対し、二次元ハフマン符号化(ラン
レングス・ハフマン符号化)を施して、そのビット数を
低減する。
2. Description of the Related Art J is a digital still image encoding system.
PEG is known, and in particular, a baseline method using DCT (discrete cosine transform) is widely used.
FIG. 1 shows a schematic configuration diagram of a conventional image encoding apparatus 100 that performs encoding by the above method. In the image encoding device 100 shown in FIG. 1, first, in the preprocessing unit 101, the input image data is divided into blocks of a predetermined size, for example, blocks each having 8 × 8 pixel values. Next, in the DCT / quantization unit 102, a discrete cosine transform (DCT) is performed on each pixel value block.
on) is applied. With DCT, an 8 × 8 DCT coefficient block is obtained from each 8 × 8 pixel value block. The first DCT coefficient of this 8 × 8 DCT coefficient block indicates the magnitude of the DC (direct current) component of the pixel value block, and the other 63 DCT coefficients have different A frequencies.
The magnitude of the C (alternating current) component is shown. Next, each DCT coefficient in the DCT coefficient block is quantized. Next, the quantized 64 DCT coefficients (1 block) are once D
It is saved in the CT buffer 103. Next, the zigzag scanning unit 104 performs a zigzag scan on the quantized DCT coefficient block (hereinafter, the quantized DCT coefficient is abbreviated as a DCT coefficient) to zigzag each DCT coefficient block. Arrange in a sequence of orders. Then, in the Huffman encoding unit 105, this DC
Two-dimensional Huffman coding (run-length Huffman coding) is applied to the T coefficient sequence to reduce the number of bits.

【0003】一般的なデジタル静止画像にDCTを施す
と、得られたDCT係数ブロックでは、高域のAC係数
の大部分がゼロ又はゼロに近い値になる。そのため、続
く量子化によって、高域のAC係数の大部分はゼロにな
る。そのため、次のジグザグスキャンにより得られたD
CT係数シーケンスには、連続したゼロの列が多く含ま
れることになる。図2の図表に、実際のJPEG(4:
2:2)の自然画に対して、全てのブロック中に含まれ
るゼロ係数の数と全てのデータの数、及び1ブロック
(8×8=64データ)中に含まれるゼロ係数の割合を
示す。図2の図表の結果より、1ブロック内に含まれる
ゼロ係数の割合は約65%以上である。このようなDC
T係数ブロックに対して、二次元ハフマン符号化では、
連続するゼロの列の長さ(ゼロランレングス)を考慮し
たハフマン符号化を行なうことにより、ビット数が効果
的に低減される。
When DCT is applied to a general digital still image, in the obtained DCT coefficient block, most of high-frequency AC coefficients are zero or a value close to zero. Therefore, by the subsequent quantization, most of the high frequency AC coefficients become zero. Therefore, D obtained by the next zigzag scan
The CT coefficient sequence will include many consecutive columns of zeros. In the diagram of FIG. 2, the actual JPEG (4:
For a natural image of 2: 2), the number of zero coefficients included in all blocks and the number of all data, and the ratio of zero coefficients included in one block (8 × 8 = 64 data) are shown. . From the result of the chart of FIG. 2, the ratio of zero coefficients included in one block is about 65% or more. DC like this
For two-dimensional Huffman coding for a T coefficient block,
The number of bits is effectively reduced by performing the Huffman coding in consideration of the length (zero run length) of the series of consecutive zeros.

【0004】すなわち、この二次元ハフマン符号化で
は、DCT係数シーケンス内に出現する、連続するゼロ
の列と、それに先行(又は後続)するゼロでない1つの
係数(非ゼロ係数)とを合わせたものを、符号化すべき
一つの事象として扱う。そして、ハフマン符号化の原理
に従い、統計的な出現頻度のより高い事象に対し、より
短いシンボルを割り当てる。例えば、ゼロランレングス
がゼロ、後続する非ゼロ係数のビット長が1という事象
は、出現頻度が最も高いので、最も短いシンボルを割り
当てる。また、ゼロランレングスが1、後続の非ゼロ係
数のビット長が1という事象は、次に出現頻度が高いの
で、次のシンボルを割り当てる。同様に他の事象に対し
ても、その出現頻度に応じたシンボルを割り当てる。こ
のように、ゼロランレングスと後続の非ゼロ係数という
二つの次元を採り入れた二次元ハフマン符号化により、
全体のビット数が効果的に低減される。
That is, in this two-dimensional Huffman coding, a sequence of consecutive zeros appearing in the DCT coefficient sequence and one preceding (or following) non-zero coefficient (non-zero coefficient) are combined. Is treated as one event to be encoded. Then, according to the principle of Huffman coding, shorter symbols are assigned to events having a higher statistical appearance frequency. For example, an event in which the zero run length is zero and the bit length of the subsequent non-zero coefficient is 1 has the highest appearance frequency, and thus the shortest symbol is assigned. Further, the phenomenon that the zero run length is 1 and the bit length of the subsequent non-zero coefficient is 1 has the second highest appearance frequency, so the next symbol is assigned. Similarly, symbols are assigned to other events according to their appearance frequencies. Thus, by two-dimensional Huffman coding that incorporates the two dimensions of zero run length and the subsequent non-zero coefficient,
The total number of bits is effectively reduced.

【0005】[0005]

【発明が解決しようとする課題】図3は、画像符号化装
置100において、ハフマン符号化部105の概略構成
図を示す。図3に示す従来のハフマン符号化部105に
おいては、まず、DCT係数判定部110により、ジグ
ザグスキャン部104から入力されたDCT係数がゼロ
であるかどうかを判別する。DCT係数判定部110は
入力されたDCT係数がゼロであると判別した場合は、
ゼロランカウンタ111は、連続したゼロ係数の数(ゼ
ロランレングス)をカウントアップする。DCT係数判
定部110は入力されたDCT係数がゼロではないと判
別した場合は、符号化部112において、該非ゼロのD
CT係数に対して、ハフマン符号化を行なうと共に、該
非ゼロのDCT係数の前の係数までにカウントしたゼロ
係数のカウント数(ゼロランレングス)も同時に符号化
する。また、一度非ゼロの係数を符号化した時に、ゼロ
ランカウンタ111はクリアする。
FIG. 3 is a schematic block diagram of the Huffman coding unit 105 in the image coding apparatus 100. In the conventional Huffman encoding unit 105 shown in FIG. 3, first, the DCT coefficient determination unit 110 determines whether or not the DCT coefficient input from the zigzag scanning unit 104 is zero. If the DCT coefficient determination unit 110 determines that the input DCT coefficient is zero,
The zero run counter 111 counts up the number of consecutive zero coefficients (zero run length). When the DCT coefficient determining unit 110 determines that the input DCT coefficient is not zero, the encoding unit 112 determines that the non-zero D
Huffman coding is performed on the CT coefficient, and the count number of zero coefficients (zero run length) counted up to the coefficient before the non-zero DCT coefficient is also coded at the same time. Further, the zero run counter 111 is cleared once the non-zero coefficient is encoded.

【0006】図4(A)〜(E)は、画像符号化装置1
00において、ハフマン符号化部105が動作するタイ
ムチャートを示す。図4(A)は画像符号化装置100
のクロック信号であり、図4(B)はジグザグスキャン
部104から入力されたDCT係数を示す。図4
(C)、(D)、(E)は、それぞれゼロランカウント
111のカウント値、ハフマン符号となるシンボル、及
びハフマン符号化イネーブル信号を示している。図4
(A)において、最初のクロック周期に、値は2となる
DCT係数が入力されたので、ゼロランカウンタ111
が動作せず、図4(C)に示すように、カウント値はゼ
ロである。次のクロック周期に、図4(E)に示すよう
に、ハフマンイネーブル信号がハイレベルになり、この
時、図4(D)に示すように、上記DCT係数(2)と
ゼロランカウンタ111のカウント値(0)にシンボル
Bが割り当てられ、ハフマン符号化を行なう。同じよう
に、次のクロック周期に入力されたDCT係数1(2)
とゼロランカウンタ111のカウント値(0)にシンボ
ルCが割り当てられる。
FIGS. 4A to 4E show the image coding apparatus 1.
00 shows a time chart in which the Huffman encoding unit 105 operates. FIG. 4A shows an image encoding device 100.
4B, the DCT coefficient input from the zigzag scanning unit 104 is shown in FIG. Figure 4
(C), (D), and (E) show the count value of the zero run count 111, the symbol to be the Huffman code, and the Huffman coding enable signal, respectively. Figure 4
In (A), since the DCT coefficient whose value is 2 is input in the first clock cycle, the zero run counter 111
Does not operate, and the count value is zero as shown in FIG. In the next clock cycle, the Huffman enable signal becomes high level as shown in FIG. 4 (E), and at this time, as shown in FIG. 4 (D), the DCT coefficient (2) and the zero run counter 111 The symbol B is assigned to the count value (0), and Huffman coding is performed. Similarly, the DCT coefficient 1 (2) input in the next clock cycle
And the symbol C is assigned to the count value (0) of the zero run counter 111.

【0007】続く3つのクロック周期において(図4
(A))、ゼロが3つ連続して入力されて(図4
(B))、ゼロランカウンタ111で、連続したゼロ係
数の数(ゼロランレングス)(ここで3)をカウントア
ップする(図4(C))。さらに、次のクロック周期
に、DCT係数3が入力されて、該DCT係数(3)と
ゼロランカウンタ111のカウント値(3)にシンボル
Gが割り当てられる。そして、次のクロック周期に、ゼ
ロランカウンタ111はカウント値が0にリセットされ
る。同じように、次に続くゼロの数2とその次のDCT
係数1にシンボルJが割り当てられ、そして、ゼロラン
カウンタ111はリセットされる。
In the following three clock cycles (see FIG.
(A)), three zeros are continuously input (Fig. 4).
(B)), and the zero run counter 111 counts up the number of consecutive zero coefficients (zero run length) (here, 3) (FIG. 4 (C)). Further, in the next clock cycle, the DCT coefficient 3 is input, and the symbol G is assigned to the DCT coefficient (3) and the count value (3) of the zero run counter 111. Then, in the next clock cycle, the count value of the zero run counter 111 is reset to 0. Similarly, the number 2 of the next zero and the next DCT
The symbol J is assigned to the coefficient 1, and the zero run counter 111 is reset.

【0008】以上のように、従来の画像符号化装置10
0においては、1つのゼロ係数をカウントアップするの
に、1クロックを必要とし、さらにゼロランレングスの
符号化にも1クロックを要していた。これによって、ハ
フマン符号化の処理時間が長く、高速処理が難しい。
As described above, the conventional image coding apparatus 10
In 0, one clock is required to count up one zero coefficient, and one clock is required to encode zero run length. As a result, the processing time of Huffman coding is long and high-speed processing is difficult.

【0009】本発明は、このような課題を鑑みてなさ
れ、その目的は、ハフマン符号化処理の高速化、及び符
号化処理の簡略化を実現できる画像符号化装置及びその
方法を提供することにある。
The present invention has been made in view of the above problems, and an object of the present invention is to provide an image coding apparatus and a method thereof capable of realizing high-speed Huffman coding processing and simplification of the coding processing. is there.

【0010】[0010]

【課題を解決するための手段】前記課題を解決するため
に、本発明の画像符号化装置は、入力画像を直交変換す
る直交変換手段と、前記直交変換手段により得られた係
数を量子化する量子化手段と、前記量子化手段により得
られた係数の中に、連続するゼロとなるゼロ係数の数を
カウントし、前記連続するゼロ係数の数Lと、該L個の
ゼロ係数に続くゼロではない係数Xとを合わせて、1つ
の係数に変換するゼロ係数処理部と、前記ゼロ係数処理
部で変換された係数について、可変長符号化を行なう可
変長符号化手段とを有する。
In order to solve the above-mentioned problems, an image coding apparatus of the present invention quantizes an orthogonal transformation means for orthogonally transforming an input image and a coefficient obtained by the orthogonal transformation means. Quantizing means and the number of consecutive zero coefficients among the coefficients obtained by the quantizing means, which counts as zero, counts the number of consecutive zero coefficients L and zeros following the L zero coefficients. It has a zero coefficient processing unit for converting the non-equal coefficient X into one coefficient, and a variable length coding means for performing variable length coding on the coefficient converted by the zero coefficient processing unit.

【0011】また、前記ゼロ係数処理部で変換された係
数において、上位の所定のビット数は、前記連続するゼ
ロ係数の数Lを表し、下位の所定のビット数は、該L個
のゼロ係数に続くゼロではない係数Xを表す。
Further, in the coefficient converted by the zero coefficient processing unit, the upper predetermined number of bits represents the number L of the continuous zero coefficients, and the lower predetermined number of bits is the L zero coefficients. Represents a non-zero coefficient X that follows.

【0012】また、前記量子化手段により得られた係数
を記憶する第1の記憶手段と、前記ゼロ係数処理部によ
って変換された係数を記憶する第2の記憶手段とをさら
に有する。
Further, it further comprises a first storage means for storing the coefficient obtained by the quantizing means, and a second storage means for storing the coefficient converted by the zero coefficient processing section.

【0013】前記課題を解決するために、本発明の画像
符号化方法は、入力画像を直交変換し、前記直交変換さ
れた係数を量子化し、前記量子化された係数の中に、連
続するゼロとなるゼロ係数の数をカウントし、前記連続
するゼロ係数の数Lと、該L個のゼロ係数に続くゼロで
はない係数Xとを合わせて、1つの係数に変換し、前記
変換された係数について、可変長符号化を行なう。
In order to solve the above-mentioned problems, the image coding method of the present invention orthogonally transforms an input image, quantizes the orthogonally transformed coefficient, and quantizes the quantized coefficient with consecutive zeros. Counting the number of zero coefficients, the number of consecutive zero coefficients L and the nonzero coefficient X following the L zero coefficients are converted into one coefficient, and the converted coefficient Variable-length encoding is performed on the.

【0014】前記変換された係数において、上位の所定
のビット数は、前記連続するゼロ係数の数Lを表し、下
位の所定のビット数は、該L個のゼロ係数に続くゼロで
はない係数Xを表す。
In the transformed coefficients, the upper predetermined number of bits represents the number of consecutive zero coefficients L, and the lower predetermined number of bits is the nonzero coefficient X following the L zero coefficients. Represents

【0015】上記の画像符号化装置と画像符号化方法に
よれば、ゼロ係数をカウントする処理をハフマン符号化
部から抜き、ハフマン符号化前に行なう。これにより、
ハフマン符号化に使われるクロック数が少なくなり、ハ
フマン符号化の処理時間を短縮でき、処理速度を向上で
きる。
According to the image coding apparatus and the image coding method described above, the process of counting the zero coefficient is omitted from the Huffman coding unit and is performed before the Huffman coding. This allows
The number of clocks used for Huffman coding is reduced, the processing time of Huffman coding can be shortened, and the processing speed can be improved.

【0016】[0016]

【発明の実施の形態】以下、本発明の画像符号化装置と
画像符号化方法の実施の形態について、添付の図面を参
照して述べる。図5は、本発明の実施形態に係わる画像
符号化装置10の概略構成図である。図5に示す画像符
号化装置10は、前処理部1、DCT/量子化部2、第
1のDCTバッファ3、ジグザグスキャン部4、ゼロラ
ン処理部7、第2のDCTバッファ8、ハフマン符号化
部5を含む。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of an image coding apparatus and an image coding method according to the present invention will be described below with reference to the accompanying drawings. FIG. 5 is a schematic configuration diagram of the image encoding device 10 according to the embodiment of the present invention. The image coding apparatus 10 shown in FIG. 5 includes a preprocessing unit 1, a DCT / quantization unit 2, a first DCT buffer 3, a zigzag scanning unit 4, a zero run processing unit 7, a second DCT buffer 8, and Huffman coding. Including part 5.

【0017】図5に示す画像符号化装置10において、
前処理部1では、入力画像データの色空間をRGBから
YUV(YCbCr)へ変換する色変換、及び、3つの
各色成分の画像を例えばサイズ8×8のブロックに細分
するブロック化処理を行なう。次に、DCT/量子化部
2において、各画素値ブロックに対して2次元DCTを
施して、DCTにより、各8×8の画素値ブロックから
8×8のDCT係数ブロックが得られる。次に、各係数
ブロックに対し、DCT係数ごとに異なる量子化ステッ
プを用いた量子化を施す。次に、量子化された64個の
DCT係数(1ブロック)を一旦第1のDCTバッファ
3に保存する。
In the image coding apparatus 10 shown in FIG. 5,
The preprocessing unit 1 performs color conversion for converting the color space of the input image data from RGB to YUV (YCbCr), and blocking processing for subdividing the image of each of the three color components into blocks of size 8 × 8, for example. Next, in the DCT / quantization unit 2, each pixel value block is subjected to two-dimensional DCT, and an 8 × 8 DCT coefficient block is obtained from each 8 × 8 pixel value block by DCT. Next, each coefficient block is quantized using a different quantization step for each DCT coefficient. Next, the quantized 64 DCT coefficients (1 block) are temporarily stored in the first DCT buffer 3.

【0018】次に、ジグザグスキャン部4では、第1の
DCTバッファ3から読み出した量子化されたDCT係
数ブロックに対しジグザグスキャンを行ない、DCT係
数ブロックの各DCT係数を、低域が先で高域が後とい
う順序で一つのシーケンスに並べる。図6(A)と
(B)は、ジグザグスキャンを説明する図である。図6
(A)と(B)において、数字1〜64は、8×8のデ
ータブロックの各係数を表わす。図6(A)に示すよう
に、ジグザグスキャンを行なう前に、第1のDCTバッ
ファ3に記憶された量子化後のDCT係数は、1から6
4までの順番で並べられている。このように並べられて
いる係数は第1のDCTバッファ3から読み出されて、
図6(A)における矢印に示すようにジグザグスキャン
を行ない、DCT係数は、図6(B)に示すような順序
で並べられる。
Next, the zigzag scanning unit 4 performs a zigzag scan on the quantized DCT coefficient block read from the first DCT buffer 3, and the DCT coefficients of the DCT coefficient block are first increased in the low frequency range. The areas are arranged in the order of being afterwards. FIGS. 6A and 6B are diagrams illustrating zigzag scanning. Figure 6
In (A) and (B), the numbers 1 to 64 represent the respective coefficients of the 8 × 8 data block. As shown in FIG. 6A, the quantized DCT coefficients stored in the first DCT buffer 3 before the zigzag scan are 1 to 6
They are arranged in the order up to 4. The coefficients arranged in this way are read from the first DCT buffer 3 and
Zigzag scanning is performed as indicated by the arrow in FIG. 6A, and the DCT coefficients are arranged in the order shown in FIG. 6B.

【0019】次に、ゼロラン処理部7は、ゼロ係数と非
ゼロ係数を分けて処理する。図7は、ゼロラン処理部7
の構成の一例を示す。図7に示すように、ゼロラン処理
部7は、DCT係数判定部11、ゼロランカウンタ1
2、合成部13を含む。図8は、図7に示すゼロラン処
理部7の動作を説明するフローチャートである。 ステップ61:ジグザグスキャン部4から、量子化され
たDCT係数がゼロラン処理部7に入力される。 ステップ62:DCT係数判定部11は、ジグザグスキ
ャン部4から入力されたDCT係数がゼロであるかどう
かを判別する。 ステップ63:入力されたDCT係数がゼロであると判
別した場合は、ゼロランカウンタ12で、連続したゼロ
係数の数(ゼロランレングス)をカウントアップする。
そして、ステップ61に戻って、次の入力されたDCT
係数についてゼロの判別を行なう。カウントアップされ
たゼロ係数は第2のDCTバッファ8に記憶しない。
Next, the zero run processing section 7 processes the zero coefficient and the non-zero coefficient separately. FIG. 7 shows the zero run processing unit 7.
An example of the configuration will be shown. As shown in FIG. 7, the zero run processing unit 7 includes a DCT coefficient determination unit 11 and a zero run counter 1.
2, including the synthesizing unit 13. FIG. 8 is a flowchart for explaining the operation of the zero run processing unit 7 shown in FIG. Step 61: The quantized DCT coefficient is input from the zigzag scanning unit 4 to the zero run processing unit 7. Step 62: The DCT coefficient determination unit 11 determines whether the DCT coefficient input from the zigzag scanning unit 4 is zero. Step 63: When it is determined that the input DCT coefficient is zero, the zero run counter 12 counts up the number of consecutive zero coefficients (zero run length).
Then, returning to step 61, the next input DCT
The coefficient is determined to be zero. The counted zero coefficient is not stored in the second DCT buffer 8.

【0020】ステップ64:DCT係数判定部11は、
入力されたDCT係数がゼロではないと判別した場合
は、合成部13において、該非ゼロのDCT係数と、該
非ゼロのDCT係数の前の係数までにカウントしたゼロ
係数のカウント数(ゼロランレングス)とが合体され
て、新しい係数が得られる。該新しい係数において、上
位4ビットはゼロランレングスを表わし、下位11ビッ
トは、該非ゼロのDCT係数を表わすようにする。
Step 64: The DCT coefficient judging section 11
When it is determined that the input DCT coefficient is not zero, the synthesis unit 13 counts the non-zero DCT coefficient and the number of zero coefficients counted up to the coefficient before the non-zero DCT coefficient (zero run length). And are merged to obtain the new coefficient. In the new coefficient, the upper 4 bits represent zero run length and the lower 11 bits represent the non-zero DCT coefficient.

【0021】ステップ65:該合成された新しい係数
は、一旦第2のDCTバッファ8に記憶される。そし
て、第2のDCTバッファ8から読み出した合成された
係数に対して、ハフマン符号化部5においてハフマン符
号化を行なう。また、一度非ゼロの係数を符号化した時
に、ゼロランカウンタ12はクリアされる。
Step 65: The synthesized new coefficient is temporarily stored in the second DCT buffer 8. Then, the Huffman coding unit 5 performs Huffman coding on the combined coefficient read from the second DCT buffer 8. Also, the zero run counter 12 is cleared once the non-zero coefficients have been encoded.

【0022】図9(A)〜(D)は、画像符号化装置1
0において、ハフマン符号化部5が動作するタイムチャ
ートを示す。図9(A)は、画像符号化装置10のクロ
ック信号、図9(B)は、第2のDCTバッファ8から
ハフマン符号化部5に入力されたDCT係数をそれぞれ
示す。図9(C)と図9(D)は、それぞれゼロランカ
ウント12のカウント値とハフマン符号化シンボルを示
している。図4(A)〜(E)に示された従来の画像符
号化装置100のタイムチャートと比較すれば分かるよ
うに、従来の画像符号化装置100におけるハフマン符
号化部105に、多数のゼロ係数が入力されて、ハフマ
ン符号化部105が該多数のゼロ係数をカウントして処
理することに対して、本発明の実施形態に関わる画像符
号化装置10におけるハフマン符号化部5において、非
ゼロ係数及びゼロランレングスデータのみを処理する。
即ち、図9(A)に示された各クロック周期において、
図9(B)に示された非ゼロのDCT係数2、1、3、
1が入力されて、それと共に、図9(C)に示されたゼ
ロランレングスデータも入力され、それぞれのDCT係
数とゼロランレングスに対して、図9(D)に示された
シンボルB、C、G、Hが割り当てられ、ハフマン符号
化を行なう。
FIGS. 9A to 9D show the image coding apparatus 1.
0 shows a time chart in which the Huffman encoder 5 operates. FIG. 9A shows the clock signal of the image coding apparatus 10, and FIG. 9B shows the DCT coefficients input from the second DCT buffer 8 to the Huffman coding unit 5. 9C and 9D show the count value of the zero run count 12 and the Huffman coded symbol, respectively. As can be seen from comparison with the time charts of the conventional image encoding device 100 shown in FIGS. 4A to 4E, the Huffman encoding unit 105 in the conventional image encoding device 100 has a large number of zero coefficients. Is input and the Huffman coding unit 105 counts and processes the large number of zero coefficients, whereas the Huffman coding unit 5 in the image coding apparatus 10 according to the embodiment of the present invention uses non-zero coefficients. And zero run length data only.
That is, in each clock cycle shown in FIG.
The non-zero DCT coefficients 2, 1, 3, shown in FIG.
1 is input, and the zero run length data shown in FIG. 9 (C) is also input together with it, and for each DCT coefficient and zero run length, the symbol B shown in FIG. 9 (D), C, G and H are assigned and Huffman coding is performed.

【0023】以上のように、ハフマン符号化部5にはゼ
ロ係数は入力されず、DCT係数と、ゼロランレングス
が一度に入力されることになる。従来の画像符号化装置
100において、ハフマン符号化装置100でゼロデー
タのカウントとDCT係数の符号化を行っていたため
に、64のDCT係数からなる1ブロックを処理するの
に、必ず64クロックを使用していたが、本発明の実施
形態に関わる画像符号化装置10のハフマン符号化部5
は、ゼロデータに対する処理を行なわず、1クロックで
必ず1データを符号化できる。
As described above, the zero coefficient is not input to the Huffman encoder 5, but the DCT coefficient and the zero run length are input at one time. In the conventional image encoding device 100, since the Huffman encoding device 100 counts zero data and encodes DCT coefficients, 64 clocks are always used to process one block consisting of 64 DCT coefficients. However, the Huffman coding unit 5 of the image coding apparatus 10 according to the embodiment of the present invention
Does not perform processing on zero data and can always encode one data in one clock.

【0024】図2に示すように、1ブロック内に含まれ
るゼロのデータ数は約65%以上であるので、本発明を
適用することにより、ハフマン符号化部5が処理するデ
ータは、1ブロックの64データの半分(32データ)
以下になる。これにより、従来技術では1ブロック処理
するのに64クロックを使用していたが、本発明による
ハフマン符号化は、約12〜32クロックで1ブロック
を処理することが可能になる。また、原則的に、第2の
DCTバッファは第1のDCTバッファの半分の容量を
有すれば良い。勿論、汎用性を考慮し、第2のDCTバ
ッファは第1のDCTバッファと同容量のものを持って
も良い。
As shown in FIG. 2, the number of zero data contained in one block is about 65% or more. Therefore, by applying the present invention, the data processed by the Huffman coding unit 5 is one block. Half of 64 data (32 data)
It becomes the following. This allows the Huffman coding according to the present invention to process one block in approximately 12 to 32 clocks, whereas the prior art used 64 clocks to process one block. Further, in principle, the second DCT buffer should have a capacity half that of the first DCT buffer. Of course, in consideration of versatility, the second DCT buffer may have the same capacity as the first DCT buffer.

【0025】本実施形態によれば、ゼロ係数をカウント
する処理をハフマン符号化部から抜き、ハフマン符号化
前に行なうことにより、ハフマン符号化に使われるクロ
ック数が少なくなり、ハフマン符号化の処理時間を短縮
でき、処理速度を向上できる。
According to the present embodiment, the process of counting the zero coefficient is removed from the Huffman coding unit and is performed before the Huffman coding, whereby the number of clocks used for the Huffman coding is reduced, and the Huffman coding process is performed. The time can be shortened and the processing speed can be improved.

【0026】以上、本発明を好ましい実施の形態に基づ
き説明したが、本発明は以上に説明した実施の形態に限
られるものではなく、本発明の要旨を逸脱しない範囲
で、種々の改変が可能である。本実施形態に説明した画
像符号化装置は、一例であり、その構成の各種の変更が
可能である。
Although the present invention has been described above based on the preferred embodiments, the present invention is not limited to the embodiments described above, and various modifications can be made without departing from the gist of the present invention. Is. The image encoding device described in the present embodiment is an example, and various modifications of its configuration are possible.

【0027】[0027]

【発明の効果】本発明によれば、ハフマン符号化処理に
おいて、従来技術と比べて、約半分以下の処理時間でD
CT係数を符号化することが可能となる。これにより、
ハフマン符号化のアルゴリズムが簡略化されて、また、
処理時間が短く、処理の高速化が実現できる。また、ハ
フマン符号化処理において、クロック数の供給を減らせ
るので、画像符号化装置の消費電力を低減することが可
能となる。
According to the present invention, in the Huffman coding process, the D time is about half or less compared with the conventional technique.
It becomes possible to encode the CT coefficient. This allows
The Huffman coding algorithm is simplified,
The processing time is short and the processing speed can be increased. Further, in the Huffman encoding process, the supply of the number of clocks can be reduced, so that the power consumption of the image encoding device can be reduced.

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

【図1】従来の画像符号化装置の構成図である。FIG. 1 is a configuration diagram of a conventional image encoding device.

【図2】JPEGファイルにおける値がゼロとなるDC
T係数の数と割合を示す図表である。
FIG. 2 DC in which the value in the JPEG file is zero
It is a chart which shows the number and ratio of T coefficient.

【図3】従来の画像符号化装置において、ハフマン符号
化部の構成図である。
FIG. 3 is a configuration diagram of a Huffman encoding unit in a conventional image encoding device.

【図4】(A)〜(E)は、従来の画像符号化装置にお
いて、ハフマン符号化部の動作を説明するタイムチャー
トである。
4A to 4E are time charts for explaining the operation of the Huffman coding unit in the conventional image coding apparatus.

【図5】本発明の実施形態に関わる画像符号化装置の構
成図である。
FIG. 5 is a configuration diagram of an image encoding device according to an embodiment of the present invention.

【図6】本発明の実施形態に関わる画像符号化装置にお
いて、ジグザグスキャン処理を示す図である。
FIG. 6 is a diagram showing a zigzag scan process in the image encoding device according to the embodiment of the present invention.

【図7】本発明の実施形態に関わる画像符号化装置にお
いて、ゼロ係数処理部の構成図である。
FIG. 7 is a configuration diagram of a zero coefficient processing unit in the image encoding device according to the embodiment of the present invention.

【図8】本発明の実施形態に関わる画像符号化装置にお
いて、ハフマン符号化処理の動作を説明するフローチャ
ートである。
FIG. 8 is a flowchart illustrating an operation of Huffman encoding processing in the image encoding device according to the embodiment of the present invention.

【図9】本発明の実施形態に関わる画像符号化装置にお
いて、ハフマン符号化部の動作を説明するタイムチャー
トである。
FIG. 9 is a time chart explaining the operation of the Huffman coding unit in the image coding apparatus according to the embodiment of the present invention.

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

1…前処理部、2…DCT/量子化部、3…第1のDC
Tバッファ、4…ジグザグスキャン部、5…ハフマン符
号化部、7…ゼロラン処理部、8…第2のDCTバッフ
ァ、10…画像符号化装置、11…DCT係数判定部、
12…ゼロランカウンタ、13…合成部、100…画像
符号化装置、101…前処理部、102…DCT/量子
化部、103…DCTバッファ、104…ジグザグスキ
ャン部、105…ハフマン符号化部、110…DCT係
数判定部、111…ゼロラン処理部、112…ゼロラン
カウンタ。
1 ... Preprocessing unit, 2 ... DCT / quantization unit, 3 ... First DC
T buffer, 4 ... Zigzag scanning unit, 5 ... Huffman coding unit, 7 ... Zero run processing unit, 8 ... Second DCT buffer, 10 ... Image coding device, 11 ... DCT coefficient determination unit,
12 ... Zero run counter, 13 ... Compositing section, 100 ... Image coding apparatus, 101 ... Preprocessing section, 102 ... DCT / quantization section, 103 ... DCT buffer, 104 ... Zigzag scanning section, 105 ... Huffman coding section, 110 ... DCT coefficient determination unit, 111 ... Zero run processing unit, 112 ... Zero run counter.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 堀込 ひとみ 神奈川県横浜市保土ヶ谷区神戸町134番地 ソニー・エルエスアイ・デザイン株式会 社内 Fターム(参考) 5C059 KK15 MA00 MA23 MC11 MC38 ME02 PP01 PP15 PP16 TA57 TB07 TC04 TC06 TD07 UA02 UA32 5C078 AA04 BA57 CA31 DA01 DA05 5J064 AA03 BA09 BA16 BB13 BC01 BC05 BC08 BC16 BD01    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Hitomi Horigome             134, Kobe-cho, Hodogaya-ku, Yokohama-shi, Kanagawa               Sony LSI Design Stock Association             In-house F-term (reference) 5C059 KK15 MA00 MA23 MC11 MC38                       ME02 PP01 PP15 PP16 TA57                       TB07 TC04 TC06 TD07 UA02                       UA32                 5C078 AA04 BA57 CA31 DA01 DA05                 5J064 AA03 BA09 BA16 BB13 BC01                       BC05 BC08 BC16 BD01

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】入力画像を直交変換する直交変換手段と、 前記直交変換手段により得られた係数を量子化する量子
化手段と、 前記量子化手段により得られた係数の中に、連続するゼ
ロとなるゼロ係数の数をカウントし、前記連続するゼロ
係数の数Lと、該L個のゼロ係数に続くゼロではない係
数Xとを合わせて、1つの係数に変換するゼロ係数処理
部と、 前記ゼロ係数処理部で変換された係数について、可変長
符号化を行なう可変長符号化手段とを有する画像符号化
装置。
1. An orthogonal transform means for orthogonal transforming an input image, a quantizing means for quantizing the coefficient obtained by the orthogonal transform means, and a continuous zero in the coefficient obtained by the quantizing means. A zero coefficient processing unit that counts the number of zero coefficients, and combines the number L of consecutive zero coefficients with a non-zero coefficient X that follows the L zero coefficients, and converts the coefficient into one coefficient. An image coding apparatus having variable length coding means for performing variable length coding on the coefficient converted by the zero coefficient processing unit.
【請求項2】前記ゼロ係数処理部で変換された係数にお
いて、上位の所定のビット数は、前記連続するゼロ係数
の数Lを表し、下位の所定のビット数は、該L個のゼロ
係数に続くゼロではない係数Xを表す請求項1に記載の
画像符号化装置。
2. In the coefficient converted by the zero coefficient processing unit, the upper predetermined bit number represents the number L of the continuous zero coefficients, and the lower predetermined bit number is the L zero coefficients. The image coding apparatus according to claim 1, wherein the image coding apparatus represents a coefficient X that is not zero and that follows X.
【請求項3】前記量子化手段により得られた係数を記憶
する第1の記憶手段と、 前記ゼロ係数処理部によって変換された係数を記憶する
第2の記憶手段とをさらに有する請求項2に記載の画像
符号化装置。
3. The method according to claim 2, further comprising: first storage means for storing the coefficient obtained by the quantizing means, and second storage means for storing the coefficient converted by the zero coefficient processing section. The image encoding device described.
【請求項4】入力画像を直交変換し、 前記直交変換された係数を量子化し、 前記量子化された係数の中に、連続するゼロとなるゼロ
係数の数をカウントし、前記連続するゼロ係数の数L
と、該L個のゼロ係数に続くゼロではない係数Xとを合
わせて、1つの係数に変換し、 前記変換された係数について、可変長符号化を行なう画
像符号化方法。
4. An input image is orthogonally transformed, the orthogonally transformed coefficient is quantized, the number of zero coefficients that become consecutive zeros in the quantized coefficient is counted, and the consecutive zero coefficient is counted. Number L
And the non-zero coefficient X following the L zero coefficients are converted into one coefficient, and variable length coding is performed on the converted coefficient.
【請求項5】前記変換された係数において、上位の所定
のビット数は、前記連続するゼロ係数の数Lを表し、下
位の所定のビット数は、該L個のゼロ係数に続くゼロで
はない係数Xを表す請求項4に記載の画像符号化方法。
5. In the transformed coefficient, a predetermined number of higher bits represents the number L of the consecutive zero coefficients, and a predetermined number of lower bits is not zero following the L zero coefficients. The image coding method according to claim 4, wherein the coefficient X is represented.
JP2002136510A 2002-05-13 2002-05-13 Image encoding apparatus and image encoding method Pending JP2003333339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002136510A JP2003333339A (en) 2002-05-13 2002-05-13 Image encoding apparatus and image encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002136510A JP2003333339A (en) 2002-05-13 2002-05-13 Image encoding apparatus and image encoding method

Publications (1)

Publication Number Publication Date
JP2003333339A true JP2003333339A (en) 2003-11-21

Family

ID=29698508

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002136510A Pending JP2003333339A (en) 2002-05-13 2002-05-13 Image encoding apparatus and image encoding method

Country Status (1)

Country Link
JP (1) JP2003333339A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009260745A (en) * 2008-04-17 2009-11-05 Canon Inc Image encoder, and control method thereof
JP2011010124A (en) * 2009-06-26 2011-01-13 Nomura Research Institute Ltd Market data compression system and program
JP2011125038A (en) * 2004-12-31 2011-06-23 Microsoft Corp Adaptive coefficient scan order
JP7173134B2 (en) 2018-04-13 2022-11-16 日本電信電話株式会社 Encoding device, decoding device, encoding method, decoding method, program, and recording medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011125038A (en) * 2004-12-31 2011-06-23 Microsoft Corp Adaptive coefficient scan order
US8311119B2 (en) 2004-12-31 2012-11-13 Microsoft Corporation Adaptive coefficient scan order
US8824557B2 (en) 2004-12-31 2014-09-02 Microsoft Corporation Adaptive coefficient scan order
JP2009260745A (en) * 2008-04-17 2009-11-05 Canon Inc Image encoder, and control method thereof
JP2011010124A (en) * 2009-06-26 2011-01-13 Nomura Research Institute Ltd Market data compression system and program
JP7173134B2 (en) 2018-04-13 2022-11-16 日本電信電話株式会社 Encoding device, decoding device, encoding method, decoding method, program, and recording medium

Similar Documents

Publication Publication Date Title
US6285796B1 (en) Pseudo-fixed length image compression scheme
US6643408B2 (en) Image coding and decoding apparatus, method of image coding and decoding, and recording medium for recording program for image coding and decoding
AU6771496A (en) Data compression method
EP0692913B1 (en) Digital coding/decoding apparatus using variable length codes
WO2005079054A1 (en) Image compression device
KR100944928B1 (en) Apparatus and method for encoding and computing a discrete cosine transform using a butterfly processor
JP3469438B2 (en) Image signal processing method and apparatus, recording medium
JP2001217721A (en) Huffman encoding device, huffman encoding method and recording medium recorded with huffman encoding processing program
JPH06350854A (en) Picture compression encoding device
JP2003333339A (en) Image encoding apparatus and image encoding method
JP3835273B2 (en) Image encoding / decoding device
JP3282527B2 (en) Image coding device
JP2001145106A (en) Device and method for compressing image
JP3824259B2 (en) Encoding method, decoding method, encoding device, decoding device, and recording medium
JP3230336B2 (en) Recompression device and recompression system
JP3954032B2 (en) Image coding apparatus, image coding method, image coding program, and computer-readable recording medium on which image coding program is recorded
JPH1188183A (en) Wavelet converter, its method, wavelet inverse converter, its method, image coder, its method, image decoder and its method
JP2001128176A (en) Image compressing and expanding device
Kaur et al. IMAGE COMPRESSION USING DECISION TREE TECHNIQUE.
JP2003309848A (en) Image encoding apparatus and control method thereof
JPH02104180A (en) Compression processing method for image data compressor
JP2571274B2 (en) Code data storage / readout method
JP4095454B2 (en) Data decoding apparatus and data decoding method
JPH08161506A (en) Image compressing device
JP2001094985A (en) Image coder