JP2000101847A - Image signal coding method, image signal decoding method and device therefor - Google Patents

Image signal coding method, image signal decoding method and device therefor

Info

Publication number
JP2000101847A
JP2000101847A JP26584998A JP26584998A JP2000101847A JP 2000101847 A JP2000101847 A JP 2000101847A JP 26584998 A JP26584998 A JP 26584998A JP 26584998 A JP26584998 A JP 26584998A JP 2000101847 A JP2000101847 A JP 2000101847A
Authority
JP
Japan
Prior art keywords
code
run
size
escape
length
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
JP26584998A
Other languages
Japanese (ja)
Inventor
Kazuhiro Suzuki
一弘 鈴木
Shunichi Kimura
俊一 木村
Yasuharu Sakurai
康晴 桜井
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 JP26584998A priority Critical patent/JP2000101847A/en
Publication of JP2000101847A publication Critical patent/JP2000101847A/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)

Abstract

PROBLEM TO BE SOLVED: To shorten a maximum code length by finding out a region shared by codes that are not almost actually in use in the case of coding an actual image and using this region for an escape region so as to reduce number of codes thereby decreasing number of bits to mutually identify the codes. SOLUTION: A zero coefficient of a quantization coefficient AC component received by a zero discrimination section 11 is fed to a run counter 12 and a non-zero coefficient is fed to a size discrimination section 13, and when the run counter 12 counts a consecutive number of zero coefficients and the size discrimination section 13 detects the non-zero coefficient, run information of the run counter 12 is fed to a run comparison section 14, which outputs a logical value 1 when the run information is equal to a prescribed threshold r-limit or over. When the non-zero coefficient amplitude is classified and grouped by its quantity into group numbers and a group number that is an output of the section 13 is equal to a prescribed threshold s-limit or over, a size comparison section 15 provides an output of logical value 1. The outputs of the comparison sections 14, 15 are fed to an AND element 16, where they are ANDed and an output of the AND element 16 is fed to a code assignment section 17. The section 17 outputs a code word denoting an escape region when the output of the AND element 16 has a logical value 1, and a code word corresponding to the input run information and the group number and an added bit when the AND output has a logical value 0.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像信号の符号
化、復号を実行する方法および装置に関し、特に2次元
可変長符号化方法、装置、及び2次元可変長復号方法、
装置に関する。さらに詳細には、画像データの符号長を
減少させることを可能とした画像信号の符号化、復号を
実行する方法および装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for encoding and decoding an image signal, and more particularly to a two-dimensional variable-length encoding method and apparatus, and a two-dimensional variable-length decoding method.
Related to the device. More specifically, the present invention relates to a method and an apparatus for performing encoding and decoding of an image signal that enable the code length of image data to be reduced.

【0002】[0002]

【従来の技術】コンピュータの普及により、ディジタル
画像信号が広く利用されるようになっている。このよう
なディジタル画像信号では、データ量が多いため、通
信、蓄積のために冗長性を抑圧してデータ量を削減する
圧縮手法が適用されるのが一般的である。
2. Description of the Related Art With the spread of computers, digital image signals have been widely used. Since such a digital image signal has a large amount of data, a compression method for reducing the data amount by suppressing redundancy for communication and storage is generally applied.

【0003】圧縮手法には種々のアルゴリズムが存在す
る。中でも、直交変換アルゴリズムの一つである離散コ
サイン変換(Discrete Cosine Tra
nsform:以下DCT)方式は、静止画像や動画像
の符号化の国際標準アルゴリズムに採用されたことによ
り、幅広い分野で利用されている。
[0003] There are various algorithms for the compression method. Among them, discrete cosine transform (Discrete Cosine Tra), which is one of orthogonal transform algorithms, is used.
The nsform (hereinafter referred to as DCT) method has been used in a wide range of fields because it has been adopted as an international standard algorithm for coding still images and moving images.

【0004】こうした直交変換アルゴリズムでは、まず
画像をN画素×N画素(Nは正の整数)の矩形領域であ
る画素ブロックに分割する。分割された画素ブロックご
とに直交変換が施され、N×Nの変換係数が得られる。
これらの変換係数は、あらかじめ係数位置ごとに定めら
れた量子化ステップ幅で除算して丸める量子化処理によ
って、変換係数のビット数が減じられたN×Nの量子化
係数が得られる。さらに、量子化係数は、出現確率の高
いものには短い符号語が、出現確率の低いものには長い
符号語が割り当てられる可変長符号化によって全体のデ
ータ量が削減される。
In such an orthogonal transformation algorithm, first, an image is divided into pixel blocks which are rectangular regions of N pixels × N pixels (N is a positive integer). An orthogonal transform is performed for each of the divided pixel blocks, and N × N transform coefficients are obtained.
These transform coefficients are divided by a quantization step width predetermined for each coefficient position and rounded to obtain an N × N quantized coefficient in which the number of bits of the transform coefficient is reduced. Further, as for the quantization coefficient, the entire data amount is reduced by variable length coding in which a short codeword is assigned to a code with a high appearance probability and a long codeword is assigned to a code with a low appearance probability.

【0005】なお、標準方式に採用されたアルゴリズム
の可変長符号化は、符号化効率の観点から以下に説明す
るような2次元符号化を行っている。
[0005] The variable length coding of the algorithm adopted in the standard method uses two-dimensional coding as described below from the viewpoint of coding efficiency.

【0006】図11は、N=8、すなわち8×8の変換
係数行列とジグザグスキャン順序を示すものである。最
も左上に位置する要素は、直流成分と呼ばれ、それ以外
の要素は交流成分と呼ばれる。交流成分は、以下の手順
によって2次元符号化される。
FIG. 11 shows N = 8, that is, an 8 × 8 transform coefficient matrix and a zigzag scan order. The element at the upper left is called a DC component, and the other elements are called AC components. The AC component is two-dimensionally encoded by the following procedure.

【0007】交流成分は、量子化係数行列を図11の矢
印に示すようなジグザグ順に走査し、値が零である係数
の連続する長さであるランが求められる。また、ランに
続いて発生する非零の係数の振幅値を、値の大小によっ
て分類した複数のグループのいずれに属するかを判定
し、そのグループ番号であるサイズが決定される。これ
らのランとサイズの組み合わせに対してあらかじめ設定
された2次元のハフマンテーブルから対応する符号語を
読み出し、グループ内の前記振幅値を示す値を非零の量
子化係数の値として付加ビットとともに出力する。
For the AC component, the quantization coefficient matrix is scanned in a zigzag order as shown by an arrow in FIG. 11, and a run having a continuous length of a coefficient having a value of zero is obtained. Further, it is determined whether the amplitude value of the non-zero coefficient that occurs after the run belongs to any of a plurality of groups classified according to the magnitude of the value, and the size that is the group number is determined. A corresponding codeword is read from a two-dimensional Huffman table set in advance for these combinations of run and size, and a value indicating the amplitude value in the group is output as a value of a non-zero quantization coefficient together with an additional bit. I do.

【0008】ところで、静止画像用の符号化標準である
JPEGと、動画像の符号化標準であるH.261,M
PEGでは、この2次元ハフマン符号表には次のような
違いがある。
By the way, JPEG, which is a coding standard for still images, and H.264, which is a coding standard for moving images, are used. 261, M
In PEG, the two-dimensional Huffman code table has the following differences.

【0009】図12は、JPEGのアルゴリズムにおい
て輝度信号の交流成分用として推奨されている2次元ハ
フマンテーブル(符号テーブル)を表している。図12
中の数値の配列は、ランとサイズの組み合わせに対して
割り当てられるハフマン符号語の長さ(ビット数)を表
している。JPEGの2次元ハフマン符号表では、すべ
てのランとサイズの組み合わせに対応する符号が用意さ
れている。基本アルゴリズムであるベースラインシステ
ムの場合、ランは最大15まで、サイズは10までが使
用されている。但し、図12に示すようにJPEGハフ
マンテーブルでは、サイズ0の列において、ランが1か
ら14までの範囲は使用されていない領域である。サイ
ズ0、ラン15の位置の符号は、長さ16のランが発生
した最に使用されるZRL符号であり、また、サイズ
0、ラン0の位置の符号は、ブロック内の残りの係数が
すべてゼロであることを示すEOB符号である。これら
の特殊な符号を含めると162個の符号語が割り当てら
れていることになる。
FIG. 12 shows a two-dimensional Huffman table (code table) recommended for an AC component of a luminance signal in the JPEG algorithm. FIG.
The array of numerical values in the middle represents the length (number of bits) of the Huffman code word assigned to the combination of run and size. In the JPEG two-dimensional Huffman code table, codes corresponding to all combinations of runs and sizes are prepared. In the case of the baseline system which is the basic algorithm, up to 15 runs and up to 10 sizes are used. However, as shown in FIG. 12, in the JPEG Huffman table, in the column of size 0, the range of runs from 1 to 14 is an unused area. The code at the position of size 0, run 15 is the ZRL code used most recently when a run of length 16 has occurred, and the code at the position of size 0, run 0 is that all the remaining coefficients in the block are This is an EOB code indicating that it is zero. When these special codes are included, 162 code words are allocated.

【0010】図12に示す数値の配列は、ランとサイズ
の組み合わせに対して割り当てられるハフマン符号語の
長さ、すなわちビット数であり、各ランとサイズの組み
合わせの発生頻度が高い部分には短いビット数が割り当
てられ、発生頻度が低い部分では長いビット数が割り当
てられる。図2に示す例では、最大符号長として16ビ
ット符号が割り当てられている。これら16ビット符号
の割り当てられた領域のランおよびサイズの組み合わせ
は発生頻度が低いものであることが推測される。
The array of numerical values shown in FIG. 12 is the length of the Huffman code word assigned to the combination of run and size, that is, the number of bits, and is short in a portion where the frequency of each run and size combination is high. A bit number is assigned, and a long bit number is assigned to a portion where the occurrence frequency is low. In the example shown in FIG. 2, a 16-bit code is assigned as the maximum code length. It is presumed that these combinations of runs and sizes of the areas to which the 16-bit codes are assigned have a low occurrence frequency.

【0011】図13は、テレビ会議用の動画像符号化標
準であるH.261で使用される2次元ハフマンテーブ
ルである。H.261では、直交変換された変換係数
は、量子化処理によって−127〜127の範囲の整数
である量子化インデックスに置き換えられる。これら
は、JPEGの場合と同様に零の連続する長さ(ラン)
と、これに続く非零の値の大きさ(レベル)の組み合わ
せで符号化される。なお、H.261では、0〜63の
ランと、1〜127のレベルの絶対値の組み合わせに対
して符号語の割り当てが行われる。図13において、ラ
ンとレベルの組み合わせに対応する位置に数値が記入さ
れている場合は、この数値のビット数を持つ符号語が割
り当てられることを示している。それ以外のランとレベ
ルの組み合わせについては、発生頻度が低い事象である
ことから、エスケープ符号を用いて符号化される。この
場合、エスケープ符号とランは、それぞれ6ビット、レ
ベルは8ビットの固定の長さを持ち、計20ビットの長
さとなる。符号語の数は、全部で66個となる。
FIG. 13 shows H.264, a video coding standard for videoconferencing. 261 is a two-dimensional Huffman table. H. At 261, the orthogonally transformed transform coefficient is replaced by a quantization index that is an integer in the range of −127 to 127 by a quantization process. These are consecutive lengths (runs) of zero as in the case of JPEG.
And the following combination of the magnitude (level) of the non-zero value. In addition, H. In 261, codewords are allocated to combinations of runs 0 to 63 and absolute values of levels 1 to 127. In FIG. 13, when a numerical value is entered at a position corresponding to a combination of a run and a level, it indicates that a codeword having the bit number of the numerical value is assigned. Other combinations of run and level are coded using escape codes because they are infrequently occurring events. In this case, each of the escape code and the run has a fixed length of 6 bits, and the level has a fixed length of 8 bits, for a total length of 20 bits. The number of codewords is 66 in total.

【0012】[0012]

【発明が解決しようとする課題】複写機の分野では、高
度な画質制御による高画質化、プリンタやFAXとの共
用といった多機能化を目的に、デジタル化への移行が急
速に進んでいる。こうしたデジタル複写機、プリンタで
扱われる画像は、高画質化、高速化の要求の高まりとと
もに、大容量化している。
In the field of copiers, the shift to digitalization is rapidly progressing for the purpose of realizing high image quality by advanced image quality control and multifunction such as sharing with printers and faxes. Images handled by such digital copiers and printers have been increasing in capacity as demands for higher image quality and higher speed have increased.

【0013】例えば、現状では1[mm]あたり約16
ドット(400[ドット/25.4mm])の解像度が
将来的には、1[mm]あたり約24ドット(600
[ドット/25.4mm])の解像度になることが予想
される。このときの画素数は、ISO,A4原稿(21
0mm×297mm)の場合、210×24×297×
24=5040×7128=35,925,129画素
にもなる。なお、画素あたりのデータ量は、モノクロ2
56階調の画像の場合、1画素が1バイトとなり、YM
CKの4つの色成分から構成されるフルカラー画像の場
合は、各画素あたり4バイトとなる。
For example, at present, about 16
In the future, the resolution of dots (400 [dots / 25.4 mm]) will increase to about 24 dots (600
[Dot / 25.4 mm]) is expected. The number of pixels at this time is based on the ISO, A4 original (21
0 mm x 297 mm), 210 x 24 x 297 x
24 = 5040 × 7128 = 35,925,129 pixels. The data amount per pixel is monochrome 2
In the case of an image with 56 gradations, one pixel is one byte, and YM
In the case of a full-color image composed of four color components of CK, each pixel has 4 bytes.

【0014】さらにこれらの画像が、例えば毎分40枚
を上回る速度で印刷等の処理を行うことが求められてき
ている。このような大容量画像データの高速処理に対す
る要求の高まりから、画像データ蓄積容量の削減、デー
タ転送時の帯域の削減を目的として符号化技術が必要と
されていた。
Further, it is required that these images be subjected to processing such as printing at a speed exceeding, for example, 40 sheets per minute. With the increasing demand for such high-speed processing of large-capacity image data, an encoding technique has been required for the purpose of reducing the image data storage capacity and the bandwidth at the time of data transfer.

【0015】とくにゼログラフィなどの画像形成部を備
えた複写機やプリンタにおいては、高速な画像出力に対
応して高速に画像信号を供給する必要がある。このた
め、符号データを復号する速度が、生産性を左右する重
要な要因となり、生産性を高めるために高速な復号能力
が求められていた。
In particular, in a copying machine or a printer having an image forming unit such as xerography, it is necessary to supply an image signal at a high speed corresponding to a high-speed image output. For this reason, the speed at which code data is decoded is an important factor influencing productivity, and a high-speed decoding capability has been required in order to increase productivity.

【0016】こうしたデジタル複写機、プリンタで扱わ
れる画像(静止画像)は、時間軸方向に連続する大容量
の画像データという観点から動画像と比較してみると、
以下に述べる特徴、制約がある。 (1)復号画像が印字され、長時間にわたって注視され
ることから、出力として得られる結果の画質に対する要
求が高く、画質を劣化させる要因となる圧縮率をあまり
高くできない。 (2)スキャナなどから読み込まれる複数ページの原稿
では、連続するページ間に相関性がない。このため、動
画像のように連続するフレーム間の差分のみを符号化し
て冗長度を抑圧するフレーム間予測を利用できない。
Images (still images) handled by such digital copiers and printers are compared with moving images from the viewpoint of large-volume image data continuous in the time axis direction.
There are the following features and restrictions. (1) Since the decoded image is printed and watched for a long time, there is a high demand for the image quality of the result obtained as an output, and the compression ratio, which is a factor of deteriorating the image quality, cannot be so high. (2) In a multi-page document read from a scanner or the like, there is no correlation between consecutive pages. For this reason, it is not possible to use inter-frame prediction in which only a difference between consecutive frames, such as a moving image, is encoded to suppress redundancy.

【0017】プリンタで扱われる画像(静止画像)には
上記のような制約が存在し、また入力画素数が多く、画
質要求が高く、かつ符号化効率もそれほど高くできない
ことから、これらを解決するために復号処理に求められ
る性能は画像データの大容量化に伴い厳しいものとなっ
ている。
Images (still images) handled by the printer have the above-mentioned restrictions, and the number of input pixels is large, the image quality is required to be high, and the encoding efficiency cannot be so high. For this reason, the performance required for the decoding process becomes severe with the increase in the capacity of the image data.

【0018】こうした制約の多い復号処理においてJP
EGアルゴリズムを適用する場合、復号装置をLSIで
構成することが考えられる。JPEGアルゴリズムの場
合には、LSIは、可変長復号部、逆量子化部、およ
び、逆直交変換部を備えた構成となる。このうち、逆直
交変換や逆量子化といった処理は、比較的LSI化によ
る高速化が実現されやすいが、可変長復号部のLSI化
には、次のような問題がある。
In a decoding process with many restrictions, JP
When the EG algorithm is applied, it is conceivable that the decoding device is configured by an LSI. In the case of the JPEG algorithm, the LSI has a configuration including a variable length decoding unit, an inverse quantization unit, and an inverse orthogonal transform unit. Among them, processes such as inverse orthogonal transform and inverse quantization can be relatively easily speeded up by using an LSI, but the following problems are involved in implementing a variable-length decoding unit into an LSI.

【0019】すなわち、可変長復号部では、入力される
可変長の符号語を判別して、特定のランとレベルの組み
合わせへの対応づけが行われる。この対応づけ処理のた
め、JPEGアルゴリズムのハフマンテーブルを、
(a)テーブルに登録された全ての符号とのマッチング
を行う構成、(b)論理回路を多段に組み合わせた構
成、などで実装することが考えられるが、処理時間や回
路規模に対する要求の高まりにを満足させるには至らな
いという問題があった。
That is, the variable-length decoding unit determines the input variable-length codeword and associates it with a specific combination of run and level. For this association process, the Huffman table of the JPEG algorithm is
It is possible to implement (a) a configuration that performs matching with all codes registered in the table, (b) a configuration in which logic circuits are combined in multiple stages, and the like. Was not satisfied.

【0020】このため、本発明の構成は、2次元ハフマ
ンテーブルに設定される符号語の数を削減し、最大符号
長を短縮することで上記問題を解決するものである。
Therefore, the configuration of the present invention solves the above problem by reducing the number of code words set in the two-dimensional Huffman table and shortening the maximum code length.

【0021】例えば、従来技術の項で説明したH.26
1等の動画像の符号化標準のように、エスケープ符号の
導入された2次元ハフマン符号化テーブルを採用するこ
とが考えられる。すなわち図13に示すように発生頻度
の高いランとサイズの組み合わせに対応する位置に数値
対応のビット数を持つ符号語を割り当て、それ以外の発
生頻度の低いランとサイズの組み合わせについては、エ
スケープ符号を用いて符号化する動画像の符号化方式と
同様の手法の適用を静止画像の符号化システムに試みる
ものである。
For example, the H.264 described in the section of the prior art has been described. 26
It is conceivable to employ a two-dimensional Huffman coding table into which escape codes are introduced, as in the moving image coding standard such as 1. That is, as shown in FIG. 13, a code word having a bit number corresponding to a numerical value is assigned to a position corresponding to a combination of a run and a size with a high frequency of occurrence. The present invention attempts to apply a technique similar to the moving picture coding method to be coded by using a still picture coding system.

【0022】しかし、H.261などの動画像の符号化
標準のアルゴリズムでは、もともと入力がフレーム間の
差分画像であり、さらに、量子化処理の違い、ランとレ
ベルの組み合わせ方の違い、など静止画像の符号化アル
ゴリズムと異なる点が多い。このため、H.261のハ
フマン符号テーブルを静止画像の符号化システムにその
まま適用することは難しい。また、H.261(動画
像)の符号化標準のエスケープ領域は、図13に示すよ
うに形状が複雑であり、エスケープ/非エスケープの判
別が複雑になる問題があった。
However, H. In the algorithm of the moving image coding standard such as H.261, the input is originally a difference image between frames, and further different from the still image coding algorithm such as a difference in quantization processing, a difference in a combination of a run and a level, and the like. There are many points. For this reason, H. It is difficult to apply the Huffman code table of H.261 to a still image coding system as it is. H. The escape area of the encoding standard of H.261 (moving image) has a complicated shape as shown in FIG. 13, and there is a problem that the determination of escape / non-escape becomes complicated.

【0023】一方、JPEGアルゴリズムでは、2次元
ハフマン符号化のための推奨テーブルが用意されてい
る。このテーブルは、個々の画像に最適化されたハフマ
ンテーブルに対しては、符号化効率は劣るものの、多様
な画像に対して平均的に良好な符号化性能を示す、汎用
的なテーブルであることが知られている。
On the other hand, in the JPEG algorithm, a recommended table for two-dimensional Huffman coding is prepared. This table is a general-purpose table that shows an average good coding performance for various images, although the coding efficiency is inferior to the Huffman table optimized for each image. It has been known.

【0024】以上の点から考えて、本発明の構成は、J
PEGアルゴリズムを基本として、(1)エスケープ符
号の使用、不使用の判別が簡単に行い得ること、(2)
JPEGの推奨ハフマンテーブルの持つ汎用的な性能を
生かされること、(3)エスケープ符号を導入して符号
化シンボル数を削減すること、さらに、(4)最大符号
長を短縮すること、これらの課題を解決することを目的
とする。
In view of the above, the configuration of the present invention is
Based on the PEG algorithm, (1) it can be easily determined whether or not an escape code is used; (2)
To take advantage of the general-purpose performance of the recommended Huffman table of JPEG, (3) to reduce the number of coded symbols by introducing escape codes, and (4) to reduce the maximum code length. The purpose is to solve.

【0025】[0025]

【課題を解決するための手段】以上の課題を解決するた
めに、本発明の画像信号符号化方法は、画像信号に直交
変換を施し得られた変換係数を量子化して得られる量子
化係数の零の連続する長さであるランと、非零の量子化
係数の大きさを示すサイズと、非零の量子化係数の値を
表すための付加情報とを組み合わせて符号化を行う画像
信号符号化方法において、予め設定されたラン閾値以
上、かつ、予め設定されたサイズ閾値以上のランとサイ
ズの組み合わせによって規定されるエスケープ領域内
に、量子化係数のランとサイズの組み合わせが含まれる
か否かを判定し、量子化係数のランとサイズの組み合わ
せが、エスケープ領域内に含まれると判定された場合に
は、エスケープ領域であることを示すエスケープ符号
と、ランの値と、非零の量子化係数の値とを組み合わせ
て符号化し、画像信号に基づく量子化係数のランとサイ
ズの組み合わせが、エスケープ領域内に含まれないと判
定された場合には、ランとサイズの組み合わせに対応し
て予め定められた符号語と、非零の量子化係数の値を表
す付加情報とを組み合わせて符号化することを特徴とす
る。
In order to solve the above-mentioned problems, an image signal encoding method according to the present invention provides a method of quantizing a transform coefficient obtained by performing an orthogonal transform on an image signal. An image signal code to be encoded by combining a run having a continuous length of zero, a size indicating the size of a non-zero quantization coefficient, and additional information for representing a value of the non-zero quantization coefficient. In the quantization method, it is determined whether or not a combination of a run and a size of a quantization coefficient is included in an escape area defined by a combination of a run and a size that is equal to or larger than a predetermined run threshold and equal to or larger than a predetermined size threshold. If it is determined that the combination of the run and the size of the quantization coefficient is included in the escape area, an escape code indicating that the area is the escape area, a value of the run, and a non-zero When the combination of the run and the size of the quantization coefficient based on the image signal is determined not to be included in the escape area, the coding is performed in combination with the combination of the run and the size. The encoding is performed by combining a predetermined code word and additional information indicating a value of a non-zero quantization coefficient.

【0026】さらに、本発明の画像信号符号化方法にお
いて、符号化は複数のランとサイズの組み合わせに対応
する符号語を予め定めた符号テーブルを用いて符号化を
行うものであり、エスケープ領域は、符号テーブルにお
いて矩形領域として示されることを特徴とする。
Further, in the image signal encoding method according to the present invention, the encoding is performed by using a code table in which code words corresponding to a plurality of combinations of runs and sizes are encoded. , Are shown as rectangular areas in the code table.

【0027】さらに、本発明の画像信号符号化方法は、
エスケープ領域に含まれるランとサイズの組み合わせに
対応する符号語を符号テーブルから削除し、エスケープ
領域であることを示す符号語を符号テーブルに追加する
符号テーブルの修正を実行することを特徴とする。
Further, the image signal encoding method according to the present invention comprises:
The code word corresponding to the combination of run and size included in the escape area is deleted from the code table, and the code table that indicates the escape area is added to the code table is corrected.

【0028】さらに、本発明の画像信号符号化方法にお
いて、符号テーブルに設定された符号語には同一符号長
を有する符号語相互を識別するための識別ビットが設定
されており、エスケープ領域の設定により符号テーブル
から削除された符号語数に応じて、識別ビット数を減少
させて設定したことを特徴とする。
Further, in the image signal encoding method of the present invention, the codewords set in the code table are set with identification bits for identifying codewords having the same code length, and the escape area is set. The number of identification bits is reduced and set according to the number of code words deleted from the code table.

【0029】さらに、本発明の画像信号符号化方法にお
いて、エスケープ領域は、発生頻度の低い量子化係数の
ランとサイズの組み合わせ領域として設定されているこ
とを特徴とする。
Further, in the image signal encoding method according to the present invention, the escape area is set as a combination area of a run and a size of a quantization coefficient having a low frequency of occurrence.

【0030】さらに、本発明の画像信号符号化方法にお
いて、量子化係数のランとサイズの組み合わせが、エス
ケープ領域内に含まれると判定された場合には、エスケ
ープ領域であることを示すエスケープ符号と、ランの値
と、非零の量子化係数の値とを各々固定符号長領域に割
り当てて、これを組み合わせて符号化することを特徴と
する。
Further, in the image signal encoding method of the present invention, when it is determined that the combination of the run and the size of the quantized coefficient is included in the escape area, an escape code indicating that the combination is an escape area is provided. , And the value of the run and the value of the non-zero quantized coefficient are each assigned to a fixed code length region, and are combined and encoded.

【0031】さらに、本発明の画像信号符号化方法にお
いて、エスケープ符号に割り当てる符号語の長さは、エ
スケープ領域外の量子化係数に設定される最大符号長か
ら、エスケープ領域内に含まれると判定された場合のラ
ンの値と非零の量子化係数の値を示す各々の固定符号長
を減じて得られる符号長より長い、または少なくとも等
しい符号長を有することを特徴とする。
Further, in the image signal encoding method of the present invention, the length of the code word assigned to the escape code is determined to be included in the escape region from the maximum code length set for the quantization coefficient outside the escape region. And a code length longer than, or at least equal to, the code length obtained by subtracting each fixed code length indicating the value of the run and the value of the non-zero quantized coefficient.

【0032】さらに、本発明の画像信号符号化方法にお
いて、ラン閾値を4とし、サイズ閾値を3としたエスケ
ープ領域を設定し、最大符号長を2ビット短縮したこと
を特徴とする。
Further, the image signal encoding method of the present invention is characterized in that an escape area having a run threshold value of 4 and a size threshold value of 3 is set, and the maximum code length is reduced by 2 bits.

【0033】さらに、本発明の画像信号符号化装置は、
画像信号に直交変換を施し、得られた変換係数を量子化
して得られる量子化係数に対し、量子化係数が零である
ことを判定する零判定手段と、零判定手段において零と
判定された量子化係数の連続する長さを示すランを計数
する零計数手段と、零判定手段において非零と判定され
た量子化係数の大きさを示すサイズを判定する非零係数
判定手段と、ランとサイズの組み合わせに対応する符号
語と非零の量子化係数の値を表す付加情報を符号化する
符号割り当て手段を備えた画像信号符号化装置におい
て、ランを予め設定されたラン閾値と比較するラン比較
手段と、サイズを予め設定されたサイズ閾値と比較する
サイズ比較手段と、ラン比較手段においてランがラン閾
値以上と判定され、かつ、サイズ比較手段においてサイ
ズがサイズ閾値以上と判定された場合をエスケープ領域
内に含まれるランとサイズの組み合わせであると判定す
るエスケープ情報判定手段と、エスケープ情報判定手段
の出力に対応して符号割り当て動作を切り替える符号語
割り当て手段であって、エスケープ情報判定手段におい
て、ランとサイズの組み合わせがエスケープ領域内に含
まれると判定された場合、エスケープ領域であることを
示すエスケープ符号とランの値と非零の量子化係数の値
とを組み合わせて符号化し、エスケープ情報判定手段に
おいて、ランとサイズの組み合わせがエスケープ領域内
に含まれないと判定された場合、ランとサイズの組み合
わせに対応して予め定められた符号語と非零の量子化計
数の値を表す付加情報を符号化する符号語割り当て手段
とを有することを特徴とする。
Further, the image signal encoding apparatus of the present invention
The orthogonal transformation is performed on the image signal, and the quantization coefficient obtained by quantizing the obtained transformation coefficient is determined to be zero by the zero determination means for determining that the quantization coefficient is zero and the zero determination means. Zero counting means for counting runs indicating the continuous length of the quantized coefficient, non-zero coefficient determining means for determining a size indicating the size of the quantized coefficient determined to be non-zero by the zero determining means, In an image signal encoding apparatus including a code allocating means for encoding a code word corresponding to a combination of sizes and additional information representing a value of a non-zero quantization coefficient, a run for comparing a run with a preset run threshold value A comparison unit, a size comparison unit that compares the size with a preset size threshold, and a run determined by the run comparison unit to be equal to or larger than the run threshold, and the size is equal to or larger than the size threshold by the size comparison unit. An escape information determining unit that determines that the determined case is a combination of a run and a size included in the escape area, and a code word allocating unit that switches a code allocating operation corresponding to an output of the escape information determining unit. In the escape information determination means, when it is determined that the combination of run and size is included in the escape area, by combining the escape code indicating the escape area, the value of the run, and the value of the non-zero quantization coefficient, If the escape information determination means determines that the combination of run and size is not included in the escape area, the predetermined codeword corresponding to the combination of run and size and a non-zero quantization count And code word allocating means for encoding the additional information representing the value of.

【0034】さらに、本発明の画像信号符号化装置にお
いて、エスケープ情報判定手段は、ラン比較手段とサイ
ズ比較手段の比較結果の論理積を出力する論理演算素子
によって構成されることを特徴とする。
Further, in the image signal encoding apparatus according to the present invention, the escape information judging means is constituted by a logical operation element for outputting a logical product of comparison results of the run comparing means and the size comparing means.

【0035】さらに、本発明の画像信号符号化装置にお
いて、符号語割り当て手段は、ランとサイズの組み合わ
せに対応して予め定められた符号語を求める符号テーブ
ルを有し、符号テーブルは、ラン閾値以上、かつ、サイ
ズ閾値以上の領域をエスケープ領域として設定し、該エ
スケープ領域内においては対応符号語を持たず、さらに
符号テーブルはエスケープ領域であることを示すエスケ
ープ符号を有するテーブルであることを特徴とする。
Further, in the image signal coding apparatus according to the present invention, the code word allocating means has a code table for obtaining a predetermined code word corresponding to a combination of a run and a size. As described above, the area equal to or larger than the size threshold is set as an escape area, the corresponding code word is not provided in the escape area, and the code table is a table having an escape code indicating that the area is an escape area. And

【0036】さらに、本発明の画像信号符号化装置は、
ラン閾値を4とし、サイズ閾値を3としたエスケープ領
域を設定し、最大符号長を2ビット短縮したことを特徴
とする。
Further, the image signal encoding apparatus of the present invention
An escape area with a run threshold of 4 and a size threshold of 3 is set, and the maximum code length is reduced by 2 bits.

【0037】さらに、本発明の画像信号復号方法は、符
号データを入力し、入力符号データから予め定められた
長さのビットデータを読み出し、読み出したビットデー
タの先頭に位置する可変長符号部分を復号して、エスケ
ープ領域であるか否かを示す情報、付加ビットの長さ、
ラン、及び可変長符号とこれに付随する情報の全体の長
さを出力する符号変換を実行し、エスケープ領域である
か否かを示す情報、付加ビットの長さ、ラン、及び可変
長符号とこれに付随する情報の全体の長さに基づいて、
ビットデータから情報を読み出して量子化係数を復元す
る量子化係数再構成を実行することを特徴とする。
Further, according to the image signal decoding method of the present invention, code data is input, bit data of a predetermined length is read from the input code data, and a variable length code portion located at the head of the read bit data is read. After decoding, information indicating whether the area is an escape area, the length of an additional bit,
Run, and code conversion to output the entire length of the variable length code and the information associated with it, information indicating whether or not it is an escape area, additional bit length, run, and variable length code and Based on the overall length of the accompanying information,
It is characterized by executing quantization coefficient reconstruction for reading information from bit data and restoring quantization coefficients.

【0038】さらに、本発明の画像信号復号装置は、符
号データを入力し、入力符号データを一時蓄積する蓄積
手段と、蓄積手段より所定の長さのビットデータを読み
出すビット切り出し手段と、ビットデータの先頭に位置
する可変長符号部分を復号して、例外領域であるか否か
を示す情報、付加ビット長さ、ラン、及び可変長符号と
これに付随する情報の全体の長さを出力する符号変換手
段と、例外領域であるか否かを示す情報、付加ビット長
さ、ラン、及び可変長符号とこれに付随する情報の全体
の長さに基づいて、ビットデータから情報を読み出して
量子化係数を復元する再構成手段とを備えたことを特徴
とする。
Further, the image signal decoding apparatus of the present invention has a storage means for inputting code data and temporarily storing input code data, a bit cutout means for reading bit data of a predetermined length from the storage means, Decodes the variable-length code portion located at the beginning of the code, and outputs information indicating whether or not the area is an exceptional area, an additional bit length, a run, and the entire length of the variable-length code and the accompanying information. The information is read from the bit data based on the code conversion means and information indicating whether or not the area is an exception area, the additional bit length, the run, and the entire length of the variable length code and the accompanying information. Reconstructing means for restoring the quantization coefficient.

【0039】[0039]

【発明の実施の形態】本発明について、以下、 (1)本発明の構成の概念 (2)本発明の符号化装置、復号装置の概要 (3)本発明の符号化方法の詳細 (3.1)エスケープ領域の設定、設定パラメータと削
減符号数 (3.2)最大符号長の短縮方法 (4)本発明の符号化装置、復号装置の動作の項目に沿
って順次、詳細を説明する。
BEST MODE FOR CARRYING OUT THE INVENTION The present invention will be described below. (1) Concept of the configuration of the present invention (2) Outline of coding apparatus and decoding apparatus of the present invention (3) Details of coding method of the present invention (3. 1) Setting of escape area, setting parameters and number of reduced codes (3.2) Method of shortening maximum code length (4) Details will be sequentially described in accordance with the operation items of the encoding device and the decoding device of the present invention.

【0040】(1)本発明の構成の概念 はじめに、本発明の構成の概念について説明する。本発
明は静止画像の符号化アルゴリズムにおいて用いられる
2次元ハフマン符号化テーブルにエスケープ領域を設定
し、エスケープ領域/非エスケープの判別を容易とする
とともにJPEGの推奨ハフマンテーブルの持つ汎用的
な性能を生かし、符号化シンボル数の削減、最大符号長
の短縮を達成するものである。
(1) Concept of Configuration of the Present Invention First, the concept of the configuration of the present invention will be described. The present invention sets an escape area in a two-dimensional Huffman coding table used in a still image coding algorithm, facilitates determination of an escape area / non-escaping, and makes use of general-purpose performance of a recommended Huffman table of JPEG. , The number of coded symbols and the maximum code length can be reduced.

【0041】図1に2次元ハフマンテーブルにエスケー
プ領域を設定した例を示す。図1に示すハフマンテーブ
ルは図12に示すテーブルと同様の構成を有するがエス
ケープ領域が設定されている点で異なる。図1中のハッ
チング領域がエスケープ領域である。図1中のハッチン
グ領域は、サイズがs_limit(サイズ閾値)より
大で、ランがr_limit(ラン閾値)より大の領域
であり、本発明の符号化ではこの領域をエスケープ領域
として扱う。s_limit、r_limit設定につ
いての詳細は後段で詳述する。
FIG. 1 shows an example in which an escape area is set in a two-dimensional Huffman table. The Huffman table shown in FIG. 1 has the same configuration as the table shown in FIG. 12, but differs in that an escape area is set. The hatched area in FIG. 1 is an escape area. The hatched area in FIG. 1 is an area whose size is larger than s_limit (size threshold) and whose run is larger than r_limit (run threshold). In the encoding of the present invention, this area is treated as an escape area. The details of the s_limit and r_limit settings will be described later.

【0042】(2)本発明の符号化装置、復号装置の概
要 図2に本発明の2次元ハフマン符号化装置の実施例構成
図を示す。図2の2次元ハフマン符号化装置は、入力さ
れる量子化係数の交流成分を値が零であるか非零である
かを判別する零係数判別部11、零係数の連続する個数
を計数するランカウンタ12、非零の係数を大小に応じ
て分類されたグループのいずれに属するかを判定して設
定されるグループ番号と、前記非零の係数がグループ内
の数値のいずれに対応するかを示す付加ビットを出力す
るサイズ判定部13、入力されるラン情報を所定の閾値
r_limitと比較するラン比較部14、入力される
グループ番号を所定の閾値s_limitと比較するサ
イズ比較部15、ラン比較部14とサイズ比較部15の
出力の論理積を出力するAND素子16、入力されるラ
ン情報、グループ番号、付加ビット、及び、非零係数を
エスケープ情報にしたがって、ハフマン符号化する符号
割り当て部17によって構成される。
(2) Overview of the Encoding and Decoding Devices of the Present Invention FIG. 2 shows an embodiment of a two-dimensional Huffman encoding device of the present invention. The two-dimensional Huffman coding apparatus of FIG. 2 includes a zero coefficient discriminator 11 for discriminating whether the value of an AC component of an input quantized coefficient is zero or non-zero, and counts the number of consecutive zero coefficients. The run counter 12 determines which of the groups classified according to the magnitude of the non-zero coefficient belongs to a group number, which is set, and which of the numerical values in the group the non-zero coefficient corresponds to. A size determination unit 13 that outputs an additional bit to indicate the run information, a run comparison unit 14 that compares input run information with a predetermined threshold r_limit, a size comparison unit 15 that compares an input group number with a predetermined threshold s_limit, and a run comparison unit An AND element 16 for outputting the logical product of the output of the size comparison unit 15 and the output of the size comparison unit 15. The input run information, group number, additional bit, and non-zero coefficient are converted according to escape information. Constituted by the code assignment unit 17 for Huffman coding.

【0043】図2に示す本発明の2次元ハフマン符号化
装置の動作については、本発明のエスケープ領域を用い
た符号化方法についての説明の後、詳細に説明する。
The operation of the two-dimensional Huffman coding apparatus of the present invention shown in FIG. 2 will be described in detail after the description of the coding method using the escape area of the present invention.

【0044】図3は、本発明の2次元ハフマン復号装置
の実施例構成を示すものである。図3に示す2次元ハフ
マン復号装置は、入力される符号データを一時蓄積する
バッファ21、バッファ21より符号データを可変のビ
ット長さで読み出すビット切り出し部22、ビット切り
出し部によって切り出されたビット列を入力として、あ
らかじめ設定された複数のビットパターンと一致するも
のを検出し、複数のビットパターンに割り振られた付加
ビット長、ラン情報、一致したビット列の長さと付加ビ
ット長の合計、及び、エスケープ情報を出力する符号変
換テーブル23、ビット切り出し部22によって切り出
されたビット列から、付加ビット、ラン情報を対応する
ビットフィールドから読み出し、量子化係数値を復元す
る再構成部24を有する。
FIG. 3 shows an embodiment of a two-dimensional Huffman decoding apparatus according to the present invention. The two-dimensional Huffman decoding device shown in FIG. 3 includes a buffer 21 for temporarily storing input code data, a bit cutout unit 22 for reading code data from the buffer 21 with a variable bit length, and a bit string cut out by the bit cutout unit. As an input, a pattern that matches a predetermined plurality of bit patterns is detected, and additional bit lengths, run information, the sum of the matched bit string lengths and the additional bit lengths allocated to the plurality of bit patterns, and escape information are detected. And a reconstruction unit 24 that reads out additional bits and run information from the corresponding bit field from the bit string extracted by the bit extraction unit 22, and restores the quantized coefficient value.

【0045】図3に示す本発明の2次元ハフマン復号装
置の動作についても、本発明のエスケープ領域を用いた
符号化方法についての説明の後、詳細に説明する。
The operation of the two-dimensional Huffman decoding apparatus of the present invention shown in FIG. 3 will also be described in detail after the description of the encoding method using the escape area of the present invention.

【0046】(3)本発明の符号化方法の詳細 (3.1)エスケープ領域の設定、設定パラメータと削
減符号数 図4は、JPEGアルゴリズムを用いて複数の画像を符
号化した場合の、圧縮率の違いによるランとサイズの組
み合わせの発生分布の違いを表している。図4におい
て、横軸にサイズ(左から右に向かってサイズが大とな
る)、縦軸にラン(下方に向かってラン長が長くなる)
を設定したものであり、ハッチングの施された領域は、
ランとサイズの組み合わせが1回でも発生した部分を表
している。図4の左端の図は、圧縮率(スケーリングフ
ァクタ)が小の場合の符号発生領域を示し、中央は圧縮
率が中、右端は圧縮率が大の場合である。
(3) Details of Encoding Method of the Present Invention (3.1) Setting of Escape Area, Setting Parameters and Number of Reduced Codes FIG. 4 shows the compression when a plurality of images are encoded using the JPEG algorithm. It shows the difference in the occurrence distribution of the combination of run and size due to the difference in the rate. In FIG. 4, the horizontal axis indicates size (the size increases from left to right), and the vertical axis indicates a run (the run length increases downward).
Is set, and the hatched area is
The portion where the combination of run and size has occurred even once is shown. The leftmost diagram in FIG. 4 shows a code generation area when the compression ratio (scaling factor) is small, and the middle is a middle compression ratio and the right end is a large compression ratio.

【0047】なお、符号化には、JPEGアルゴリズム
に規定される輝度成分用の推奨量子化テーブルを使用し
ている。圧縮率の変更は、スケーリングファクタを変更
することで行った。スケーリングファクタとは、量子化
の過程で各変換係数を除する量子化ステップ幅を一様に
増減するために全量子化ステップ幅に乗ずる正の実数値
(0は含まない)である。スケーリングファクタを1よ
り大きくすると圧縮率は大きくなり(符号量が減少)、
スケーリングファクタを1より小さくすると圧縮率は小
さくなる。
The encoding uses a recommended quantization table for a luminance component defined in the JPEG algorithm. The compression ratio was changed by changing the scaling factor. The scaling factor is a positive real value (not including 0) multiplied by the entire quantization step width to uniformly increase or decrease the quantization step width for dividing each transform coefficient in the quantization process. When the scaling factor is larger than 1, the compression ratio increases (the amount of code decreases),
When the scaling factor is smaller than 1, the compression ratio becomes smaller.

【0048】図4から、圧縮率を変更することで、ラン
とサイズの組み合わせの発生する分布が変化しているこ
とがわかる。圧縮率が小さい場合は、サイズは比較的大
きい方まで出現するが、長いランはほとんど発生しな
い。これに対して、圧縮率が大きくなると大きなサイズ
はあまり発生せず、逆に長いランが発生しやすくなる傾
向を持つ。
FIG. 4 shows that the distribution in which the combination of run and size occurs changes by changing the compression ratio. When the compression ratio is low, the size appears to be relatively large, but long runs hardly occur. On the other hand, when the compression ratio increases, a large size does not often occur, and conversely, a long run tends to occur.

【0049】しかし、圧縮率が小、中、大いずれの場合
においても、ランとサイズがともに大きな組み合わせの
領域には、ほとんど発生していないことがわかる。
However, it can be seen that in any of the cases where the compression ratio is small, medium, and large, almost no occurrence occurs in the region of the combination where the run and the size are both large.

【0050】一方、図12の2次元ハフマン符号表にお
いて、ランとサイズのいずれかが大きい場合には、一様
に最大符号長である16ビット符号が割り当てられてい
る。これは、JPEGでは最大符号長を16ビットに制
限していることによるもので、16ビット符号が割り当
てられているこれらの領域に含まれるランとサイズの組
み合わせの各々の発生頻度が全て等しいとは考えられな
い。
On the other hand, in the two-dimensional Huffman code table of FIG. 12, when either the run or the size is large, a 16-bit code having the maximum code length is uniformly allocated. This is due to the fact that JPEG limits the maximum code length to 16 bits, and the frequency of each of the combinations of runs and sizes included in these areas to which 16-bit codes are assigned is not equal. Unthinkable.

【0051】したがって、図4に示す符号発生領域の結
果から、ランとサイズがともに大きな領域は図12に示
す16ビット符号の割り当てられた領域の中でもとくに
発生頻度が小さい領域であると判断される。そこで、本
発明ではこれらの領域をエスケープ領域として設定す
る。
Therefore, based on the result of the code generation region shown in FIG. 4, it is determined that the region having both the large run and the large size is the region having a low occurrence frequency among the regions to which the 16-bit code is allocated shown in FIG. . Therefore, in the present invention, these areas are set as escape areas.

【0052】図1は、JPEGの2次元ハフマンテーブ
ルに設定されたエスケープ領域を示すものである。図1
において、2つのパラメータr_limit(ラン閾
値)とs_limit(サイズ閾値)を用いることによ
り、2次元ハフマンテーブル中でランがr_limit
以上、サイズがs_limit以上となる矩形領域をエ
スケープ領域として設定する。このようなエスケープ領
域の設定により、ランおよびサイズについて各閾値と単
純に比較処理するだけでエスケープ領域とそれ以外の領
域を判別することができる。また、このようにして設定
されるエスケープ領域は、実際の画像においてほとんど
発生することのない、ランとサイズがともに大きい組み
合わせをカバーすることとなる。
FIG. 1 shows an escape area set in a JPEG two-dimensional Huffman table. FIG.
In the two-dimensional Huffman table, the run is r_limit by using two parameters r_limit (run threshold) and s_limit (size threshold).
As described above, the rectangular area whose size is equal to or larger than s_limit is set as the escape area. By setting such an escape area, the escape area and the other area can be distinguished by simply comparing the run and the size with each threshold value. In addition, the escape area set in this way covers a combination having a large run and a large size, which hardly occurs in an actual image.

【0053】上記手順によって、2次元ハフマンテーブ
ル中にエスケープ領域を設定した場合、符号数の減少が
達成される。図1に示すハフマンテーブルは図12に示
すハフマンテーブルと同様のものであり、サイズ(S)
が0〜11、ラン(r)が0〜15の領域を有するテー
ブルである。前述したように、サイズ0、ラン15の位
置の符号は、長さ16のランが発生した最に使用される
ZRL符号であり、また、サイズ0、ラン0の位置の符
号は、ブロック内の残りの係数がすべてゼロであること
を示すEOB符号である。これらの特殊な符号を含める
と、本来であれば162個の符号語が割り当てられる。
本発明の構成は、図1にハッチング領域として示すよう
に、r_limit(ラン閾値)とs_limit(サ
イズ閾値)を超えた領域をエスケープ領域として設定
し、このエスケープ領域の符号の削減を図る。
When the escape area is set in the two-dimensional Huffman table by the above procedure, the number of codes can be reduced. The Huffman table shown in FIG. 1 is similar to the Huffman table shown in FIG.
Is a table having areas of 0 to 11 and run (r) of 0 to 15. As described above, the code at the position of the size 0 and the run 15 is the ZRL code used at the time when the run of the length 16 occurs, and the code at the position of the size 0 and the run 0 is EOB code indicating that all remaining coefficients are zero. When these special codes are included, 162 code words are normally allocated.
In the configuration of the present invention, as shown as a hatched area in FIG. 1, a region exceeding r_limit (run threshold) and s_limit (size threshold) is set as an escape region, and the code of this escape region is reduced.

【0054】r_limit(ラン閾値)とs_lim
it(サイズ閾値)を超えた領域をエスケープ領域とし
て設定することにより、図1に示す斜線領域の符号が削
減されることになる。その結果、削減される符号数は、
下式、 削減される符号数=(11−s_limit)×(16
−r_limit) によって求められる。
R_limit (run threshold) and s_lim
By setting a region exceeding it (size threshold) as an escape region, the sign of the hatched region shown in FIG. 1 is reduced. As a result, the number of reduced codes is
The following equation: Number of reduced codes = (11−s_limit) × (16
−r_limit).

【0055】また、エスケープ領域設定による符号削減
後に2次元ハフマンテーブルに残される総符号数は、 総符号数=162+1−(11−s_limit)×
(16−r_limit) として求められる。
The total number of codes left in the two-dimensional Huffman table after code reduction by setting the escape area is: total code number = 162 + 1− (11−s_limit) ×
(16-r_limit).

【0056】なお、本来の総符号数162に1が加算さ
れているのは、エスケープ領域であることを示すエスケ
ープ符号が追加されていることによる。
The reason why 1 is added to the original total code number 162 is that an escape code indicating an escape area is added.

【0057】エスケープ領域に含まれるか否かについて
は、r_limit(ラン閾値)とs_limit(サ
イズ閾値)で容易に識別可能である。エスケープ領域に
含まれるか否かの判定がなされると、量子化係数は、エ
スケープ領域の内と外で異なる符号化が行われる。
Whether or not an area is included in the escape area can be easily identified by r_limit (run threshold) and s_limit (size threshold). When it is determined whether or not the quantization coefficient is included in the escape area, the quantization coefficient is subjected to different encoding inside and outside the escape area.

【0058】図5は、エスケープ領域の内外で、ランと
サイズの組み合わせに対して割り当てられる符号語の構
成の違いを示すものである。
FIG. 5 shows the difference in the structure of the code word assigned to the combination of run and size inside and outside the escape area.

【0059】図5の上段に示すように直流成分について
は、ハフマン符号2〜9ビット、付加ビット0〜11が
割り当てられて、最大20ビットのビット出力となる。
As shown in the upper part of FIG. 5, with respect to the DC component, Huffman code 2 to 9 bits and additional bits 0 to 11 are allocated, and a maximum of 20 bits are output.

【0060】ランがr_limit(ラン閾値)より大
きく、かつサイズがs_limit(サイズ閾値)より
大きい範囲にはないと判断され、エスケープ領域外と判
定されたランとサイズの組み合わせに対しては、図5の
中段に示すように通常のJEPG符号化と同様に2〜1
6ビットのハフマン符号と、1〜10ビットの付加ビッ
トが出力され、最大26ビットのビット出力となる。こ
れら、直流成分、エスケープ領域外については従来のビ
ット出力と同様である。
For a combination of a run and a size determined that the run is not larger than r_limit (run threshold) and the size is not within the range larger than s_limit (size threshold) and is determined to be outside the escape area, FIG. As shown in the middle part of FIG.
A 6-bit Huffman code and 1 to 10 additional bits are output, resulting in a maximum bit output of 26 bits. The components outside the DC component and the escape area are the same as the conventional bit output.

【0061】ランがr_limit(ラン閾値)より大
きく、かつサイズがs_limit(サイズ閾値)より
大きい範囲にあり、エスケープ領域内と判定されたラン
とサイズの組み合わせに対しては、図5の下段に示すよ
うに長さnビットのエスケープ符号を符号化した後、0
〜15までの長さのランを4ビット、−1023〜10
23の量子化係数を11ビットで表し、計(n+15)
ビットを出力する。エスケープ符号に割り当てる符号長
nについては後述する。
A combination of a run and a size whose run is larger than r_limit (run threshold) and whose size is larger than s_limit (size threshold) and which is determined to be within the escape area is shown in the lower part of FIG. After encoding an escape code of length n bits,
4 bits for runs up to ~ 15, -1023 ~ 10
23 quantization coefficients are represented by 11 bits, and a total of (n + 15)
Output a bit. The code length n assigned to the escape code will be described later.

【0062】以下、エスケープ符号の2次元ハフマンテ
ーブル中での設定位置、及び符号語長nの決定方法につ
いて説明する。図12に示すようにJPEGハフマンテ
ーブルでは、サイズ0の列において、ランが1から14
までの範囲は、使用されていない領域である(厳密に
は、JPEGの拡張モードで使用されているが、本発明
の範囲ではない)。
Hereinafter, a description will be given of a method for determining the set position of the escape code in the two-dimensional Huffman table and the codeword length n. In the JPEG Huffman table, as shown in FIG.
The area up to is an unused area (strictly speaking, it is used in the JPEG extension mode, but is not within the scope of the present invention).

【0063】以下に説明する本発明の実施例では、ハフ
マンテーブル中のサイズ0、ラン1の位置にエスケープ
符号を設定するものとする。ただし、本発明は、これに
限定するものではなく、上述した範囲のこれ以外の場所
にエスケープ符号設定しても構わない。
In the embodiment of the present invention described below, an escape code is set at the position of size 0 and run 1 in the Huffman table. However, the present invention is not limited to this, and escape codes may be set in other places in the above-described range.

【0064】エスケープ符号に割り当てる符号語のビッ
ト数は、エスケープ領域に含まれるランとサイズの組み
合わせの出現頻度の総和に基づいて決定されるべきであ
る。しかし、実際には、割り当てられたビット数からも
との出現頻度を推定することは不可能であるため、以下
の考えに基づいてエスケープ符号の符号長を決定するこ
ととした。
The number of bits of a code word to be assigned to an escape code should be determined based on the sum of the appearance frequencies of combinations of runs and sizes included in the escape area. However, in practice, it is impossible to estimate the original frequency of occurrence from the number of allocated bits, so the code length of the escape code is determined based on the following idea.

【0065】はじめに、エスケープ領域の導入の前後で
符号長が変化しないという条件から、エスケープ符号の
長さを決定することが考えられる。上述したように、エ
スケープ領域外の最大符号長は、ハフマン符号が16ビ
ットと付加ビットが10ビットの計26ビットである。
これに対して、エスケープ領域内の最大符号長は、付加
されるランに4ビット、サイズに11ビットが割り当て
られるので、エスケープ符号の符号長nを11ビットと
することにより、エスケープ領域の内外で符号化される
最大符号長を等しくすることができる。この結果、エス
ケープ領域の導入の前後での符号量の増減を無くするこ
とができる。
First, it is conceivable to determine the length of the escape code from the condition that the code length does not change before and after the introduction of the escape area. As described above, the maximum code length outside the escape area is a total of 26 bits including 16 bits for the Huffman code and 10 bits for the additional bits.
On the other hand, since the maximum code length in the escape area is assigned 4 bits for the run to be added and 11 bits for the size, the code length n of the escape code is set to 11 bits. The maximum code length to be encoded can be made equal. As a result, it is possible to eliminate the increase and decrease of the code amount before and after the introduction of the escape area.

【0066】ただし、以上の構成、すなわちエスケープ
符号の符号長nを11ビットとすることにより、もとの
JPEGの符号表で11ビットの符号が割り当てられて
いたランとサイズの組み合わせの一つが11ビットを超
える符号語に置き換えられることになり、これによる効
率の低下が問題となる。
However, by setting the code length n of the escape code to 11 bits, one of the combinations of the run and the size to which the 11-bit code is assigned in the original JPEG code table becomes 11 bits. The code word is replaced by a code word having more than bits, which causes a problem of a decrease in efficiency.

【0067】このようにエスケープ符号に、あまり短い
ビット数の符号を使用すると、発生頻度の高いランとサ
イズの組み合わせへの符号割り当てに影響がでて符号化
効率が低下することが考えられる。このため、エスケー
プ符号はなるべく長い符号を割り当て、もとのJPEG
の符号化効率を維持できるようにすることが考えられ
る。
As described above, when a code having an extremely short number of bits is used as the escape code, it is considered that the code allocation to a combination of a run and a size that frequently occurs is affected, and the coding efficiency is reduced. For this reason, the escape code is assigned as long as possible, and the original JPEG
It is conceivable that the encoding efficiency can be maintained.

【0068】しかし、一方エスケープ符号にあまり長い
符号語を割り当てた場合は、他にもランに4ビット、サ
イズに11ビットの計15ビットが付加され全体符号長
が長くなることになるので、符号化効率の点で問題があ
る。
However, if a too long code word is assigned to the escape code, on the other hand, a total of 15 bits, ie, 4 bits for the run and 11 bits for the size, are added, resulting in a longer overall code length. There is a problem in terms of conversion efficiency.

【0069】そこで、上述したように、エスケープ領域
はランとサイズの組み合わせの中でも特に発生頻度が小
さい領域を設定していることから、11ビットよりも1
ビット長い12ビットの符号長を与えるものとして説明
する。
Therefore, as described above, since the escape area is set as an area having a particularly low occurrence frequency among the combinations of the run and the size, the escape area is one bit smaller than 11 bits.
A description will be given assuming that a code length of 12 bits, which is a bit longer, is given.

【0070】もちろん、符号化対象となる代表的な画像
の集合があらかじめ選定できる場合は、これらに対して
予備的な符号化実験を行い、ここからエスケープ符号の
ビット長を統計的に決定してもよい。本発明では、エス
ケープ符号の符号長を12ビットだけに限定するもので
はない。
Of course, if a representative set of images to be encoded can be selected in advance, a preliminary encoding experiment is performed on these, and the bit length of the escape code is statistically determined from this. Is also good. In the present invention, the code length of the escape code is not limited to only 12 bits.

【0071】以上で決定された設定位置、符号語長をも
つエスケープ符号を既存のJPEGの符号木の中に設定
する手順について説明する。これは、符号データ中のエ
スケープ符号が、他のハフマン符号と一意に識別される
ようにするためである。
A procedure for setting an escape code having the set position and code word length determined as described above in an existing JPEG code tree will be described. This is to ensure that the escape code in the code data is uniquely identified from other Huffman codes.

【0072】JPEGでは、bitsとvaluesと
いう二つの配列から、ハフマンの符号木を生成する。
bitsとvaluesにはそれぞれ次のような内容が
設定されている。 bits:何ビットの符号が何個あるかを示す配列。最
大符号長は16ビットまで。 values:発生頻度順に並べた符号化要素。交流係
数の場合は、ランとサイズを各4ビットで表し、ランを
上位とした8ビットの数値(0〜255)で2次元ハフ
マンテーブル内の各位置に対応づける。
In JPEG, a Huffman code tree is generated from two arrays, bits and values.
The following contents are set in bits and values, respectively. bits: an array indicating how many bits of codes are present. The maximum code length is up to 16 bits. values: coding elements arranged in order of occurrence frequency. In the case of the AC coefficient, the run and the size are represented by 4 bits each, and each position in the two-dimensional Huffman table is associated with an 8-bit numerical value (0 to 255) with the run being higher.

【0073】図6は、JPEGにおける符号長の割り当
て方法を説明する図である。bitsの先頭要素は、符
号長1ビットの符号語の数を表している。図6では、b
itsの先頭要素は0となっているので1ビットの符号
語は使用されない。bitsの2番目の要素は、2ビッ
ト符号の数を表し、図6では2個存在する。この結果、
valuesの先頭の二つの要素は、2ビット符号語が
割り当てられることになる。図6では、0x01、0x
02の2個がこれに対応する。同様にbitsに設定さ
れている符号長をvaluesの要素に順次割り当てて
いくことでvaluesの要素の符号語長が決定され
る。なお、符号語となるビットパターンの割り当て方法
については、JPEGの仕様に記載される方法と同じで
あるのでここでは省略する。
FIG. 6 is a diagram for explaining a method of assigning code lengths in JPEG. The first element of bits indicates the number of code words having a code length of 1 bit. In FIG. 6, b
Since the head element of “its” is 0, a 1-bit code word is not used. The second element of bits indicates the number of 2-bit codes, and there are two in FIG. As a result,
The first two elements of values will be assigned a 2-bit codeword. In FIG. 6, 0x01, 0x
02 corresponds to this. Similarly, the codeword length of the value element is determined by sequentially assigning the code length set in bits to the value element. It should be noted that the method of assigning a bit pattern serving as a code word is the same as the method described in the JPEG specification, and a description thereof will be omitted.

【0074】図7は、JPEGのvalues配列にエ
スケープ符号を設定する手順を説明する図である。エス
ケープ符号は、上述のように長さ12ビットの符号語と
して設定する。2次元ハフマンテーブル内のサイズ0、
ラン1の位置は、上述するアドレス計算に従えば0x1
0(16進数の10)となり、この値をvalues中
に設定する。
FIG. 7 is a diagram for explaining a procedure for setting an escape code in a JPEG values array. The escape code is set as a code word having a length of 12 bits as described above. Size 0 in the 2D Huffman table,
The position of the run 1 is 0x1 according to the address calculation described above.
It becomes 0 (10 in hexadecimal), and this value is set in values.

【0075】図7の上段は、JPEGのvaluesの
一部を抜粋したもので、12ビット近辺の符号の割り当
てられるものを表している。JPEGのハフマン符号表
に12ビット符号として設定されている符号は4個存在
する。これらは、valuesの配列中では0x24,
0x33,0x62,0x72に対応し、これらを2次
元ハフマンテーブル内での位置を(ラン,サイズ)で表
すとそれぞれ(2,4),(3,3),(6,2),
(7,2)である。図12のハフマンテーブルに示すよ
うに12ビット符号が存在する位置は、(ラン,サイ
ズ)が、(2,4),(3,3),(6,2),(7,
2)である。
The upper part of FIG. 7 is an excerpt of a part of JPEG values, and shows a code to which a code near 12 bits is assigned. There are four codes set as 12-bit codes in the JPEG Huffman code table. These are 0x24,
0x33, 0x62, and 0x72, and their positions in the two-dimensional Huffman table are represented by (run, size) as (2,4), (3,3), (6,2),
(7, 2). As shown in the Huffman table of FIG. 12, the position where the 12-bit code exists is that (Run, Size) is (2,4), (3,3), (6,2), (7,
2).

【0076】図7の下段は、エスケープ符号を追加した
場合のJPEGのvaluesの変化を上段に対応させ
て示したものである。図7の下段に示すように、2次元
ハフマンテーブル内のサイズ0、ラン1の位置、0x1
0をvaluesテーブルの12ビット符号の割り当て
られる範囲の先頭に挿入することで、符号長12ビット
のエスケープ符号が生成される。ただし、この新たな1
2ビット符号の挿入により、後続する符号がもともと設
定されていた位置から一つずつずれるため、符号長の割
り当てがいくつかの符号で変更されることになる。図7
の下段では、1つの12ビット符号、0x72が、本来
の15ビット符号割り当て範囲にずれている。
The lower part of FIG. 7 shows changes in JPEG values when an escape code is added, corresponding to the upper part. As shown in the lower part of FIG. 7, the size 0, the position of the run 1, the 0x1 in the two-dimensional Huffman table
By inserting 0 at the beginning of the range to which a 12-bit code is assigned in the values table, an escape code having a code length of 12 bits is generated. However, this new one
The insertion of the two-bit code causes the subsequent codes to be shifted one by one from the originally set positions, so that the code length assignment is changed for some codes. FIG.
In the lower stage, one 12-bit code, 0x72, is shifted from the original 15-bit code allocation range.

【0077】さらに、配列valuesの要素でエスケ
ープ領域に該当する位置のものは値を0に置き換える。
また、配列bitsの16ビット符号の個数からは、エ
スケープ領域内に含まれる16ビット符号の個数を減ず
る。
Further, the value of the element of the array values in the position corresponding to the escape area is replaced with 0.
Also, the number of 16-bit codes included in the escape area is subtracted from the number of 16-bit codes in the array bits.

【0078】以上の手順で修正を加えたbitsとva
luesの二つの配列に、JPEGのハフマン符号生成
手順を適用することで、本発明で使用する2次元ハフマ
ン符号表を新たに生成することができる。
The bits and va modified by the above procedure
The two-dimensional Huffman code table used in the present invention can be newly generated by applying the JPEG Huffman code generation procedure to the two arrays of lues.

【0079】この結果、12ビット未満の符号語につい
ては、もとのJPEGの符号割り当てとなんら変更のな
い符号が生成されることになる。12ビット以上の符号
長を持つ符号語のいくつかにもとのJPEGの符号ビッ
ト長よりも増加するものが発生する。
As a result, for a code word of less than 12 bits, a code which is not changed from the original JPEG code assignment is generated. Some codewords having a code length of 12 bits or more may have a code length longer than the original JPEG code bit length.

【0080】図8は、いくつかのr_limitとs_
limitの組み合わせによって設定されるエスケープ
領域と、エスケープ領域外のランとサイズの組み合わせ
に対する符号割り当てを表している。エスケープ領域内
の符号長は0となり、符号が存在しないことを表してい
る。
FIG. 8 shows some r_limit and s_limit.
It shows the escape area set by the combination of the limit and the code assignment for the combination of run and size outside the escape area. The code length in the escape area is 0, indicating that no code exists.

【0081】図8(a)はr_limit=3、s_l
imit=3とした場合を示す。エスケープ領域は、r
≧3かつs≧3の領域となり、これらエスケープ領域内
の符号長は0となる。サイズ0、ラン1の位置には12
ビット符号のエスケープ符号0x01が割り当てられ
る。左上端の4の下に示す数値「12」がこれを示すも
のである。このr_limit=3、s_limit=
3としたエスケープ領域の設定の結果、使用領域の符号
は59シンボルに削減される。
FIG. 8A shows r_limit = 3, s_l
The case where limit = 3 is shown. The escape area is r
≧ 3 and s ≧ 3, and the code length in these escape areas is 0. Size 0, Run 1 position 12
Bit code escape code 0x01 is assigned. Numerical value "12" shown below 4 at the upper left corner indicates this. This r_limit = 3, s_limit =
As a result of setting the escape area to 3, the code of the used area is reduced to 59 symbols.

【0082】図8(b)はr_limit=4、s_l
imit=4とした場合を示す。エスケープ領域は、r
≧4かつs≧4の領域となり、これらエスケープ領域内
の符号長は0となる。図8(a)の場合と同様にサイズ
0、ラン1の位置には12ビット符号のエスケープ符号
0x01が割り当てられる。さらに、このエスケープ領
域設定の場合は、上述の図7において説明したように、
配列valuesにおいて元々12ビット符号であった
ものが12ビット符号のエスケープ符号をvalues
の12ビット符号領域に挿入したために配列value
sの15ビット領域に追い出される符号0x72が発生
する。この符号0x72は、前述したように2次元ハフ
マンテーブル内での位置(ラン,サイズ)が(7,2)
である。従って、図8(b)で示すように、(ラン,サ
イズ)が(7,2)の位置の符号は15ビットとして置
き換えられる。このr_limit=4、s_limi
t=4としたエスケープ領域の設定の結果、使用領域の
符号は79シンボルに削減される。
FIG. 8B shows r_limit = 4, s_l
The case where limit = 4 is shown. The escape area is r
≧ 4 and s ≧ 4, and the code length in these escape areas is 0. As in the case of FIG. 8A, a 12-bit escape code 0x01 is assigned to the position of size 0 and run 1. Further, in the case of this escape area setting, as described in FIG.
What was originally a 12-bit code in the array values is replaced with a 12-bit code escape code.
Array value because it was inserted into the 12-bit code area of
A code 0x72 which is expelled in the 15-bit area of s occurs. This code 0x72 has the position (run, size) in the two-dimensional Huffman table as described above, (7, 2).
It is. Therefore, as shown in FIG. 8B, the code at the position where (run, size) is (7, 2) is replaced with 15 bits. This r_limit = 4, s_limit
As a result of setting the escape area with t = 4, the code of the used area is reduced to 79 symbols.

【0083】図8(C)はr_limit=5、s_l
imit=5とした場合を示す。エスケープ領域は、r
≧5かつs≧5の領域となり、これらエスケープ領域内
の符号長は0となる。図8(a)の場合と同様にサイズ
0、ラン1の位置には12ビット符号のエスケープ符号
0x01が割り当てられる。このエスケープ領域設定の
場合も図8(b)の場合と同様に(ラン,サイズ)が
(7,2)の位置の符号は15ビットとして置き換えら
れる。このr_limit=5、s_limit=5と
したエスケープ領域の設定の結果、使用領域の符号は9
7シンボルに削減される。
FIG. 8C shows r_limit = 5, s_l
The case where limit = 5 is shown. The escape area is r
≧ 5 and s ≧ 5, and the code length in these escape areas is 0. As in the case of FIG. 8A, a 12-bit escape code 0x01 is assigned to the position of size 0 and run 1. Also in the case of this escape area setting, the code at the position where (run, size) is (7, 2) is replaced with 15 bits as in the case of FIG. 8B. As a result of setting the escape area where r_limit = 5 and s_limit = 5, the sign of the used area is 9
Reduced to 7 symbols.

【0084】図8(d)はr_limit=6、s_l
imit=6とした場合を示す。エスケープ領域は、r
≧6かつs≧6の領域となり、これらエスケープ領域内
の符号長は0となる。図8(a)の場合と同様にサイズ
0、ラン1の位置には12ビット符号のエスケープ符号
0x01が割り当てられる。このエスケープ領域設定の
場合も図8(b)の場合と同様に(ラン,サイズ)が
(7,2)の位置の符号は15ビットとして置き換えら
れる。このr_limit=6、s_limit=6と
したエスケープ領域の設定の結果、使用領域の符号は1
13シンボルに削減される。
FIG. 8D shows that r_limit = 6 and s_l
The case where limit = 6 is shown. The escape area is r
≧ 6 and s ≧ 6, and the code length in these escape areas is 0. As in the case of FIG. 8A, a 12-bit escape code 0x01 is assigned to the position of size 0 and run 1. Also in the case of this escape area setting, the code at the position where (run, size) is (7, 2) is replaced with 15 bits as in the case of FIG. 8B. As a result of setting the escape area where r_limit = 6 and s_limit = 6, the sign of the used area is 1
It is reduced to 13 symbols.

【0085】以上は、JPEGのハフマン符号表におい
て符号ビット長が12ビット未満の符号に変更を加え
ず、エスケープ符号とエスケープ領域を設定するための
手順である。しかし、符号化対象となる代表的な画像の
集合が決定でき、これらの予備符号化実験に基づいてラ
ンとサイズの組み合わせの出現頻度を求めることができ
れば、これに基づく符号表を設計しても構わない。
The above is a procedure for setting an escape code and an escape area without changing a code having a code bit length of less than 12 bits in the JPEG Huffman code table. However, if a representative set of images to be encoded can be determined, and the appearance frequency of a combination of run and size can be determined based on these preliminary encoding experiments, a code table based on this can be designed. I do not care.

【0086】(3.2)最大符号長の短縮方法 ところで、JPEGで使用される符号語で同一符号語長
を持つものは、下位の数ビットで符号どうしが識別され
るようにビットパターンが定められている。例えば図1
2のJPEGハフマンテーブルに示すように異なるラン
/サイズの符号語であっても、同じ16ビット符号長を
持つものが多数存在する。これら16ビット符号長を持
つ符号同士を識別するための識別ビットが必要となる。
(3.2) Method of shortening the maximum code length By the way, code words used in JPEG having the same code word length have their bit patterns determined so that codes can be identified by several lower bits. Have been. For example, FIG.
As shown in the second JPEG Huffman table, there are a number of codewords having different run / sizes having the same 16-bit code length. An identification bit for identifying codes having a 16-bit code length is required.

【0087】同一符号長を有する符号の数が多ければ多
いほど識別ビット数は長くする必要があるが、同一符号
長を有する符号の数が少なければ識別ビット数は少なく
てすむことになる。従って、ハフマン符号の数を削減で
きれば、個々の符号を識別するのに必要なビット数を削
減することができる。この結果、最大符号長を短縮する
ことが可能となる。
Although the number of identification bits needs to be longer as the number of codes having the same code length is larger, the number of identification bits is smaller as the number of codes having the same code length is smaller. Therefore, if the number of Huffman codes can be reduced, the number of bits required to identify each code can be reduced. As a result, the maximum code length can be reduced.

【0088】図12で示すJPEGの2次元ハフマンテ
ーブルの16ビット符号は、全部で125個存在し、下
位の7ビットが符号語相互を識別するために使用されて
いる。
There are a total of 125 16-bit codes in the JPEG two-dimensional Huffman table shown in FIG. 12, and the lower 7 bits are used to identify code words.

【0089】図9に本来のJPEGの輝度成分用2次元
ハフマンテーブル(JPEG輝度)と、本発明の各種の
大きさの異なるエスケープ領域を設けたテーブルにおい
て、エスケープ領域の大きさと、16ビット符号語の
数、符号語の相互識別に必要なビット長、及び、JPE
Gの16ビット符号の下位7ビットのうちで削減可能な
ビット数の関係を比較した図を示す。
FIG. 9 shows a two-dimensional Huffman table (JPEG luminance) for the original JPEG luminance component and a table provided with various sizes of escape areas according to the present invention. , The bit length required for mutual identification of codewords, and JPE
FIG. 11 is a diagram comparing the relationship between the number of bits that can be reduced among the lower 7 bits of a 16-bit G code.

【0090】図9から理解されるようにJPEG輝度で
は、16ビット符号が125であるが、本発明の各種の
大きさの異なるエスケープ領域を設けたテーブルではそ
れぞれ22,42,60,75と大幅に16ビットの符
号数が減少しており、この減少に伴って識別に必要なビ
ット数もr_limit=6、s_limit=6とし
た場合を除いて減少している。
As can be understood from FIG. 9, in the JPEG luminance, the 16-bit code is 125, but in the table of the present invention in which various sizes of escape areas are provided, they are 22, 42, 60 and 75, respectively. Accordingly, the number of 16-bit codes is reduced, and the number of bits required for identification is also reduced along with the reduction except for the case where r_limit = 6 and s_limit = 6.

【0091】図10は、図9を用いて説明した上述の識
別ビット数の減少を考慮して符号割り当てを行った例を
示すものである。図10(a)は、s_limit=
4,r_limit=4の場合の符号割り当てを示して
いる。これは先に説明した図8(b)と同様のものであ
る。エスケープ領域の設定により、16ビット符号の数
は42個になる。このとき、符号語相互を識別するため
には、6ビットあればよい。このため、もともとのJP
EGの16ビット符号に対して符号長を1ビット削減で
きることになる。
FIG. 10 shows an example in which codes are assigned in consideration of the reduction in the number of identification bits described above with reference to FIG. FIG. 10A shows s_limit =
4, code assignment when r_limit = 4. This is similar to FIG. 8B described above. By setting the escape area, the number of 16-bit codes becomes 42. At this time, in order to identify the codewords from each other, it suffices to have 6 bits. For this reason, the original JP
This means that the code length can be reduced by 1 bit with respect to the EG 16-bit code.

【0092】さらに、図10(b)のようにs_lim
it=4,r_limit=3のエスケープ領域を設定
することを考える。この時、15ビット符号と16ビッ
ト符号の合計は31個であるから符号語識別に5ビット
あればよいことになる。この結果、15ビット符号と1
6ビット符号のすべてを、元の最大符号長16ビットよ
りも2ビット短い14ビット符号とすることができる。
Further, as shown in FIG. 10B, s_lim
Consider setting an escape area where it = 4 and r_limit = 3. At this time, since the total of the 15-bit code and the 16-bit code is 31, only 5 bits are required for codeword identification. As a result, the 15-bit code and 1
All of the 6-bit codes can be 14-bit codes that are 2 bits shorter than the original maximum code length of 16 bits.

【0093】なお、これらの符号ビット数割り当て変更
を実際の符号割り当てにおいて反映するには、まずs_
limit=4,r_limit=3のエスケープ領域
の設定された配列valuesを作り、次に、配列bi
tsの15ビット符号と16ビット符号の個数を加算し
て14ビット符号の個数として設定する。後は、上で説
明したのと同じ手順で符号を生成することができる。図
10(b)は、s_limit=4,r_limit=
3の設定によってエスケープ領域の拡大と、最大符号長
の短縮を実現した例である。
In order to reflect these code bit number allocation changes in actual code allocation, first, s_
Create an array values in which an escape area of limit = 4 and r_limit = 3 is set, and then create an array bi
The number of 15-bit codes and the number of 16-bit codes of ts are added and set as the number of 14-bit codes. Thereafter, the code can be generated in the same procedure as described above. FIG. 10B shows that s_limit = 4 and r_limit =
This is an example in which the escape area is enlarged and the maximum code length is shortened by setting 3.

【0094】(4)本発明の符号化装置、復号装置の動
作 以下、先に図2において説明した本発明の2次元ハフマ
ン符号化装置の動作について説明する。図2において、
量子化係数の交流成分は、図11に示されるジグザグス
キャン順に零判定部11に入力される。ここで、零であ
る係数は、ランカウンタ12へ送出され、値が非零の係
数は、サイズ判定部13に送出される。
(4) Operation of Encoding Device and Decoding Device of the Present Invention The operation of the two-dimensional Huffman coding device of the present invention described above with reference to FIG. 2 will be described below. In FIG.
The AC components of the quantized coefficients are input to the zero determination unit 11 in the zigzag scan order shown in FIG. Here, the coefficient that is zero is sent to the run counter 12, and the coefficient whose value is non-zero is sent to the size determination unit 13.

【0095】ランカウンタ12は、入力される零係数の
連続数を計数する。この計数値は、サイズ判定部13に
おいて非零の係数が検出された時にラン比較部14に出
力される。また、このとき、計数値は零に初期化され
る。
The run counter 12 counts the number of consecutive zero coefficients input. This count value is output to the run comparison unit 14 when the size determination unit 13 detects a non-zero coefficient. At this time, the count value is initialized to zero.

【0096】一方、サイズ判定部13では、入力される
非零の係数の振幅値を、値の大小によって分類した複数
のグループのいずれに属するかを判定し、そのグループ
番号を決定して出力する。また、前記振幅値がグループ
内の数値のいずれに対応するかを示す付加ビットも出力
される。
On the other hand, the size judging section 13 judges which of the plurality of groups classified by the magnitude of the input non-zero coefficient belongs to the magnitude of the value, and determines and outputs the group number. . Also, an additional bit indicating which of the numerical values in the group the amplitude value corresponds to is output.

【0097】ラン比較部14では、入力されるラン情報
を所定の閾値r_limitと比較して、r_limi
t以上であれば、論理値1をAND素子16に出力す
る。また、サイズ比較部15は、入力されるグループ番
号を所定の閾値s_limitと比較し、s_limi
t以上であれば論理値1を出力する。AND素子16
は、ラン比較部14とサイズ比較部15の出力の論理積
を符号割り当て部17に対して出力する。
The run comparing section 14 compares the input run information with a predetermined threshold value r_limit, and
If it is greater than or equal to t, the logic value 1 is output to the AND element 16. The size comparing unit 15 compares the input group number with a predetermined threshold s_limit, and
If it is greater than or equal to t, a logical value 1 is output. AND element 16
Outputs the logical product of the outputs of the run comparison unit 14 and the size comparison unit 15 to the code assignment unit 17.

【0098】符号割り当て部17は、入力されるエスケ
ープ情報によって符号化動作を切り替える。エスケープ
情報が論理値1の場合、すなわち、符号の割り当て対象
となるランとサイズの組み合わせがエスケープ領域内で
あれば、エスケープ領域を示す符号語を出力し、さらに
所定のビット長でラン情報と非零係数を出力する。ま
た、エスケープ情報が論理値0の場合、入力されるラン
情報、グループ番号に対応する符号語、及び付加ビット
を出力する。以上で、本発明に係る2次元ハフマン符号
化の動作を完了する。
The code allocating section 17 switches the coding operation according to the escape information input. If the escape information has the logical value 1, that is, if the combination of the run and the size to which the code is to be assigned is within the escape area, a codeword indicating the escape area is output. Outputs zero coefficient. When the escape information has a logical value of 0, it outputs input run information, a code word corresponding to the group number, and additional bits. Thus, the operation of the two-dimensional Huffman coding according to the present invention is completed.

【0099】次に、図3に示す2次元ハフマン復号装置
の動作について説明する。バッファ21は、入力される
符号データを一時蓄積する。これは、ハフマン符号が実
際に復号してみないと長さがわからないため、一回の復
号動作が完了して次の符号の先頭を検出するまでデータ
を保持する必要があるためである。バッファ21は、内
部に蓄積された符号データすべての復号が完了すると、
次の符号データを読み出し、これを蓄積する。
Next, the operation of the two-dimensional Huffman decoding apparatus shown in FIG. 3 will be described. The buffer 21 temporarily stores input code data. This is because the length of the Huffman code cannot be known unless it is actually decoded, and it is necessary to hold the data until one decoding operation is completed and the head of the next code is detected. When the decoding of all the code data stored inside is completed, the buffer 21
The next code data is read out and stored.

【0100】ビット切り出し部22では、内部に記憶す
るバッファ内の符号先頭位置から、符号語の最大長さの
ビットデータを一括して読み出す。切り出された最大長
さのビットデータの内、先頭からハフマン符号の最大長
さに相当する部分は、符号変換テーブル23に入力され
る。
The bit cutout unit 22 collectively reads out the bit data of the maximum length of the code word from the code start position in the buffer stored therein. A portion corresponding to the maximum length of the Huffman code from the beginning of the cut-out bit data having the maximum length is input to the code conversion table 23.

【0101】符号変換テーブル23は、入力ビット列、
及び、入力ビット列の先頭を含む部分列が、あらかじめ
設定されたハフマン符号のいずれと一致するかを判定す
る。さらに、一致が検出されたハフマン符号に対応する
符号長、付加ビット長、及びラン情報を出力する。復号
された符号がエスケープ符号の場合は、さらにエスケー
プ情報が出力される。なお、検出されたハフマン符号長
と付加ビット長の合計値は、ビット切り出し部22に入
力され、内部に記憶されるバッファ内の符号先頭位置を
更新する。
The code conversion table 23 includes an input bit string,
Then, it is determined which of the preset Huffman codes the partial sequence including the head of the input bit sequence matches. Further, it outputs a code length, an additional bit length, and run information corresponding to the Huffman code for which a match has been detected. If the decoded code is an escape code, escape information is further output. Note that the detected total value of the Huffman code length and the additional bit length is input to the bit cutout unit 22 and updates the code head position in the buffer stored therein.

【0102】再構成部24は、符号変換テーブル23か
ら出力されるエスケープ情報、付加ビット、ラン情報に
基づき、ビット切り出し部22によって切り出されたビ
ット列内の特定のビットフィールドを読み出し、量子化
係数値を復元する。
The reconstruction unit 24 reads out a specific bit field in the bit string cut out by the bit cutout unit 22 based on the escape information, additional bits, and run information output from the code conversion table 23, and To restore.

【0103】以上の動作により、本発明の2次元ハフマ
ン復号装置は、本発明の2次元ハフマン符号化装置によ
って符号化された符号データを復号することができる。
By the above operation, the two-dimensional Huffman decoding apparatus of the present invention can decode the code data coded by the two-dimensional Huffman coding apparatus of the present invention.

【0104】上記設定で、実際のLSI設計に本発明を
適用して回路規模を見積もった所、2次元ハフマン復号
部の回路規模がJPEG方式のものに比べて25%程度
削減することが可能である。
With the above settings, the circuit size was estimated by applying the present invention to an actual LSI design. As a result, the circuit size of the two-dimensional Huffman decoding unit can be reduced by about 25% as compared with that of the JPEG system. is there.

【0105】以上、本発明では、JPEGの輝度信号の
交流成分用の推奨ハフマン符号をもとに、説明してきた
が、例えば、同じJPEGの色差信号用のハフマン符号
についても適用可能である。なお、本発明では、ハフマ
ン符号を例に説明してきたが、これ以外の他の可変長符
号を使用してもかまわない。
As described above, the present invention has been described based on the recommended Huffman code for the AC component of the JPEG luminance signal. However, the present invention is also applicable to the same JPEG color difference signal Huffman code. In the present invention, the Huffman code has been described as an example, but another variable length code other than the Huffman code may be used.

【0106】[0106]

【発明の効果】以上、説明してきたように本発明によれ
ば、静止画像の符号化標準であるJPEG方式の2次元
ハフマン符号化方式において、実際の画像の符号化にお
いてほとんど使用されない符号の占める領域を見出し、
この部分をエスケープ領域として符号数を削減した。エ
スケープ領域の判別には、ランとサイズを二つの閾値と
それぞれ大小比較するだけで簡易に行える。
As described above, according to the present invention, in the two-dimensional Huffman coding method of the JPEG system, which is a coding standard of still images, codes which are hardly used in actual image coding are occupied. Heading the area,
This part was used as an escape area to reduce the number of codes. The determination of the escape area can be easily performed simply by comparing the run and the size with the two thresholds.

【0107】また、JPEGの推奨ハフマンテーブルに
おいて使用頻度の高い符号語は、エスケープ領域外とし
たことでビット割り当てに変更を加えていない。このた
め、JPEGハフマンテーブルの持つ多様な画像に対す
る汎用的な符号化性能が確保されている。
In the JPEG recommended Huffman table, frequently used code words are not changed in the bit allocation because they are outside the escape area. Therefore, general-purpose encoding performance for various images possessed by the JPEG Huffman table is secured.

【0108】さらに、符号語数の削減した結果、符号相
互を識別するためのビット数を削減できることになり、
結果として最大符号長さを短縮できる。
Further, as a result of reducing the number of code words, the number of bits for identifying codes can be reduced.
As a result, the maximum code length can be reduced.

【0109】本発明の具体的な効果としては、r_li
mit=4,s_limit=3の場合、総符号語数を
162から67に削減される。また、この時ハフマン符
号の最大符号長を16ビットから14ビットに短縮する
ことが可能である。
As a specific effect of the present invention, r_li
When mit = 4 and s_limit = 3, the total number of codewords is reduced from 162 to 67. At this time, the maximum code length of the Huffman code can be reduced from 16 bits to 14 bits.

【0110】また、本発明の構成を適用することによ
り、実際のLSI回路規模における2次元ハフマン復号
部の回路規模が従来のJPEG方式のものに比べて25
%程度削減可能となる。
By applying the configuration of the present invention, the circuit size of the two-dimensional Huffman decoding unit in the actual LSI circuit scale is 25 times smaller than that of the conventional JPEG system.
% Can be reduced.

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

【図1】 本発明の2次元ハフマンテーブルへのエスケ
ープ領域の設定を説明する図である。
FIG. 1 is a diagram illustrating setting of an escape area in a two-dimensional Huffman table according to the present invention.

【図2】 本発明の2次元ハフマン符号化装置の構成を
示す図である。
FIG. 2 is a diagram illustrating a configuration of a two-dimensional Huffman encoding device according to the present invention.

【図3】 本発明の2次元ハフマン復号装置の構成を示
す図である。
FIG. 3 is a diagram illustrating a configuration of a two-dimensional Huffman decoding device according to the present invention.

【図4】 量子化スケーリングファクタと2次元ハフマ
ン符号の発生の相関を示す図である。
FIG. 4 is a diagram showing a correlation between a quantization scaling factor and generation of a two-dimensional Huffman code.

【図5】 本発明の符号化方法における変換係数の係数
位置と符号長の関係を説明する図である。
FIG. 5 is a diagram illustrating a relationship between a coefficient position of a transform coefficient and a code length in the encoding method of the present invention.

【図6】 bits(ビット)とvalues(バリュ
ー)による符号長の割り当て方法について説明する図で
ある。
FIG. 6 is a diagram illustrating a method of assigning a code length based on bits (bits) and values (values).

【図7】 本発明の符号化方法におけるエスケープ符号
の追加とビット割り当ての変更を説明する図である。
FIG. 7 is a diagram illustrating addition of an escape code and change of bit allocation in the encoding method of the present invention.

【図8】 本発明の符号化方法におけるr_limi
t,s_limitの組み合わせとエスケープ領域の関
係を説明する図である。
FIG. 8 shows r_limi in the encoding method of the present invention.
It is a figure explaining the relation of the combination of t and s_limit and an escape area.

【図9】 本発明の符号化方法におけるs_limi
t,r_limitの組み合わせと削減される符号数、
及び削減可能なビット数を説明する図である。
FIG. 9 shows s_limi in the encoding method of the present invention.
a combination of t, r_limit and the number of codes to be reduced,
FIG. 7 is a diagram illustrating the number of bits that can be reduced.

【図10】 本発明の符号化方法におけるr_limi
t=4,s_limit=3の場合の符号ビット数割り
当てについて説明する図である。
FIG. 10 shows r_limi in the encoding method of the present invention.
It is a figure explaining code bit number allocation at the time of t = 4 and s_limit = 3.

【図11】 変換係数行列とジグザグスキャン順序につ
いて説明する図である。
FIG. 11 is a diagram illustrating a transform coefficient matrix and a zigzag scan order.

【図12】 JPEG輝度成分用ハフマンテーブルにつ
いて説明する図である。
FIG. 12 is a diagram for explaining a JPEG luminance component Huffman table.

【図13】 H.261における2次元ハフマン符号化
の符号長について説明する図である。
FIG. 261 is a diagram for describing the code length of two-dimensional Huffman coding in H.261.

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

11 零判定部 12 ランカウンタ 13 サイズ判定部 14 ラン比較部 15 サイズ比較部 16 AND素子 17 符号割り当て部 21 バッファ 22 ビット切り出し部 23 符号変換テーブル 24 再構成部 DESCRIPTION OF SYMBOLS 11 Zero determination part 12 Run counter 13 Size determination part 14 Run comparison part 15 Size comparison part 16 AND element 17 Code allocation part 21 Buffer 22 Bit cutout part 23 Code conversion table 24 Reconstruction part

───────────────────────────────────────────────────── フロントページの続き (72)発明者 桜井 康晴 神奈川県足柄上郡中井町境430 グリーン テクなかい 富士ゼロックス株式会社内 Fターム(参考) 5C059 MA00 MA23 MC11 ME02 ME08 ME15 ME17 PP01 PP04 SS28 TA17 TC43 TD11 UA05 5C078 AA04 AA09 BA57 CA01 DA00 DA01 DA11 DB05  ────────────────────────────────────────────────── ─── Continuing on the front page (72) Inventor Yasuharu Sakurai 430 Nakai-cho, Ashigamikami-gun, Kanagawa Prefecture Green Tech Inside Fuji Xerox Co., Ltd. F-term (reference) 5C059 MA00 MA23 MC11 ME02 ME08 ME15 ME17 PP01 PP04 SS28 TA17 TC43 TD11 UA05 5C078 AA04 AA09 BA57 CA01 DA00 DA01 DA11 DB05

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 画像信号に直交変換を施し得られた変換
係数を量子化して得られる量子化係数の零の連続する長
さであるランと、非零の量子化係数の大きさを示すサイ
ズと、前記非零の量子化係数の値を表すための付加情報
とを組み合わせて符号化を行う画像信号符号化方法にお
いて、 予め設定されたラン閾値以上、かつ、予め設定されたサ
イズ閾値以上のランとサイズの組み合わせによって規定
されるエスケープ領域内に、前記量子化係数のランとサ
イズの組み合わせが含まれるか否かを判定し、 前記量子化係数のランとサイズの組み合わせが、前記エ
スケープ領域内に含まれると判定された場合には、前記
エスケープ領域であることを示すエスケープ符号と、ラ
ンの値と、非零の量子化係数の値とを組み合わせて符号
化し、 前記画像信号に基づく量子化係数のランとサイズの組み
合わせが、前記エスケープ領域内に含まれないと判定さ
れた場合には、ランとサイズの組み合わせに対応して予
め定められた符号語と、前記非零の量子化係数の値を表
す付加情報とを組み合わせて符号化することを特徴とす
る画像信号符号化方法。
1. A run that is a continuous length of zero of a quantized coefficient obtained by quantizing a transform coefficient obtained by performing an orthogonal transform on an image signal, and a size indicating a magnitude of a non-zero quantized coefficient. And an image signal encoding method for performing encoding by combining the additional information for representing the value of the non-zero quantized coefficient, wherein a predetermined run threshold or more, and a predetermined size threshold or more. It is determined whether or not a combination of the run and the size of the quantization coefficient is included in the escape area defined by the combination of the run and the size, and the combination of the run and the size of the quantization coefficient is included in the escape area. When it is determined that the image signal is included in the image signal, an escape code indicating the escape area, a run value, and a value of a non-zero quantization coefficient are combined and encoded. If it is determined that the combination of the run and the size of the quantization coefficient based on is not included in the escape area, a codeword predetermined corresponding to the combination of the run and the size, and the non-zero An image signal encoding method characterized in that encoding is performed in combination with additional information indicating a value of a quantization coefficient.
【請求項2】 前記符号化は、複数のランとサイズの組
み合わせに対応する符号語を予め定めた符号テーブルを
用いて符号化を行うものであり、 前記エスケープ領域は、前記符号テーブルにおいて矩形
領域として示されることを特徴とする請求項1に記載の
画像信号符号化方法。
2. The encoding according to claim 1, wherein the encoding is performed using a code table in which code words corresponding to a plurality of combinations of runs and sizes are predetermined. The escape area is a rectangular area in the code table. 2. The image signal encoding method according to claim 1, wherein:
【請求項3】 前記エスケープ領域に含まれるランとサ
イズの組み合わせに対応する符号語を前記符号テーブル
から削除し、前記エスケープ領域であることを示す符号
語を前記符号テーブルに追加する符号テーブルの修正を
実行することを特徴とする請求項2に記載の画像信号符
号化方法。
3. A code table, wherein a code word corresponding to a combination of run and size included in the escape area is deleted from the code table, and a code word indicating the escape area is added to the code table. 3. The image signal encoding method according to claim 2, wherein
【請求項4】 前記符号テーブルに設定された符号語に
は同一符号長を有する符号語相互を識別するための識別
ビットが設定されており、 前記エスケープ領域の設定により符号テーブルから削除
された符号語数に応じて、前記識別ビット数を減少させ
て設定したことを特徴とする請求項3に記載の画像信号
符号化方法。
4. A code word set in the code table is set with an identification bit for identifying code words having the same code length, and a code deleted from the code table by setting the escape area. 4. The image signal encoding method according to claim 3, wherein the number of identification bits is set to be reduced according to the number of words.
【請求項5】 前記エスケープ領域は、発生頻度の低い
量子化係数のランとサイズの組み合わせ領域として設定
されていることを特徴とする請求項1乃至4いずれかに
記載の画像信号符号化方法。
5. The image signal encoding method according to claim 1, wherein the escape area is set as a combination area of a run and a size of a quantization coefficient having a low frequency of occurrence.
【請求項6】 前記量子化係数のランとサイズの組み合
わせが、前記エスケープ領域内に含まれると判定された
場合には、前記エスケープ領域であることを示すエスケ
ープ符号と、ランの値と、非零の量子化係数の値とを各
々固定符号長領域に割り当てて、これを組み合わせて符
号化することを特徴とする請求項1乃至5いずれかに記
載の画像信号符号化方法。
6. When it is determined that the combination of the run and size of the quantization coefficient is included in the escape area, an escape code indicating the escape area, a run value, and a non- The image signal encoding method according to any one of claims 1 to 5, wherein a value of a zero quantization coefficient is assigned to each fixed code length area, and encoding is performed by combining them.
【請求項7】 前記エスケープ符号に割り当てる符号語
の長さは、エスケープ領域外の量子化係数に設定される
最大符号長から、前記エスケープ領域内に含まれると判
定された場合の前記ランの値と非零の量子化係数の値を
示す各々の固定符号長を減じて得られる符号長より長
い、または少なくとも等しい符号長を有することを特徴
とする請求項6に記載の画像信号符号化方法。
7. The length of a code word to be assigned to the escape code is a value of the run when it is determined that the code word is included in the escape area from a maximum code length set for a quantization coefficient outside the escape area. 7. The image signal encoding method according to claim 6, wherein a code length is longer than or at least equal to a code length obtained by subtracting each fixed code length indicating a value of a non-zero quantization coefficient.
【請求項8】 前記ラン閾値を4とし、前記サイズ閾値
を3としたエスケープ領域を設定し、最大符号長を2ビ
ット短縮したことを特徴とする請求項1乃至7いずれか
に記載の画像信号符号化方法。
8. The image signal according to claim 1, wherein an escape area in which the run threshold is set to 4 and the size threshold is set to 3 is set, and a maximum code length is reduced by 2 bits. Encoding method.
【請求項9】 画像信号に直交変換を施し、得られた変
換係数を量子化して得られる量子化係数に対し、前記量
子化係数が零であることを判定する零判定手段と、 前記零判定手段において零と判定された前記量子化係数
の連続する長さを示すランを計数する零計数手段と、 前記零判定手段において非零と判定された前記量子化係
数の大きさを示すサイズを判定する非零係数判定手段
と、 前記ランと前記サイズの組み合わせに対応する符号語と
前記非零の量子化係数の値を表す付加情報を符号化する
符号割り当て手段を備えた画像信号符号化装置におい
て、 前記ランを予め設定されたラン閾値と比較するラン比較
手段と、 前記サイズを予め設定されたサイズ閾値と比較するサイ
ズ比較手段と、 前記ラン比較手段においてランがラン閾値以上と判定さ
れ、かつ、前記サイズ比較手段において前記サイズが前
記サイズ閾値以上と判定された場合をエスケープ領域内
に含まれるランとサイズの組み合わせであると判定する
エスケープ情報判定手段と、 前記エスケープ情報判定手段の出力に対応して符号割り
当て動作を切り替える符号語割り当て手段であって、 前記エスケープ情報判定手段において、ランとサイズの
組み合わせがエスケープ領域内に含まれると判定された
場合、エスケープ領域であることを示すエスケープ符号
とランの値と非零の量子化係数の値とを組み合わせて符
号化し、 前記エスケープ情報判定手段において、ランとサイズの
組み合わせがエスケープ領域内に含まれないと判定され
た場合、ランとサイズの組み合わせに対応して予め定め
られた符号語と非零の量子化係数の値を表す付加情報を
符号化する符号語割り当て手段と、を有することを特徴
とする画像信号符号化装置。
9. A zero determining means for performing an orthogonal transform on an image signal and quantizing the obtained transform coefficient to determine that the quantized coefficient is zero, Means for counting runs indicating the continuous length of the quantized coefficient determined to be zero by the means; and determining a size indicating the size of the quantized coefficient determined to be non-zero by the zero determining means. A non-zero coefficient determining unit, and a code allocating unit that codes a code word corresponding to the combination of the run and the size and additional information indicating a value of the non-zero quantization coefficient. A run comparing means for comparing the run with a preset run threshold value; a size comparing means for comparing the size with a preset size threshold value; Escape information determining means for determining, when the size comparing means determines that the size is equal to or greater than the size threshold value, is a combination of a run and a size included in an escape area; and Code word allocating means for switching a code allocating operation in response to the output of, when the escape information determining means determines that a combination of run and size is included in the escape area, it is an escape area. When the escape information determination unit determines that the combination of run and size is not included in the escape area, the run is performed. Codewords and non-zero quantization corresponding to combinations of size and size Picture signal encoding apparatus characterized by having a codeword allocation means for encoding additional information representing the value of the number.
【請求項10】 前記エスケープ情報判定手段は、前記
ラン比較手段と前記サイズ比較手段の比較結果の論理積
を出力する論理演算素子によって構成されることを特徴
とする請求項9に記載の画像信号符号化装置。
10. The image signal according to claim 9, wherein the escape information determination unit is configured by a logical operation element that outputs a logical product of comparison results of the run comparison unit and the size comparison unit. Encoding device.
【請求項11】 前記符号語割り当て手段は、ランとサ
イズの組み合わせに対応して予め定められた符号語を求
める符号テーブルを有し、 前記符号テーブルは、前記ラン閾値以上、かつ、前記サ
イズ閾値以上の領域をエスケープ領域として設定してお
り、該エスケープ領域においては対応符号語を持たず、 さらに前記符号テーブルは、エスケープ領域であること
を示すエスケープ符号を有するテーブルであることを特
徴とする請求項9または10に記載の画像信号符号化装
置。
11. The code word allocating means has a code table for obtaining a predetermined code word corresponding to a combination of a run and a size, wherein the code table is equal to or more than the run threshold value and the size threshold value. The above-mentioned area is set as an escape area, the escape area does not have a corresponding code word, and the code table is a table having an escape code indicating an escape area. Item 11. The image signal encoding device according to Item 9 or 10.
【請求項12】 ラン閾値を4とし、サイズ閾値を3と
したエスケープ領域を設定し、最大符号長を2ビット短
縮したことを特徴とする請求項9乃至11いずれかに記
載の画像信号符号化方法。
12. An image signal encoding method according to claim 9, wherein an escape area having a run threshold value of 4 and a size threshold value of 3 is set, and the maximum code length is shortened by 2 bits. Method.
【請求項13】 符号データを入力し、 入力符号データから予め定められた長さのビットデータ
を読み出し、 読み出したビットデータの先頭に位置する可変長符号部
分を復号して、エスケープ領域であるか否かを示す情
報、付加ビットの長さ、ラン、及び前記可変長符号とこ
れに付随する情報の全体の長さを出力する符号変換を実
行し、 前記エスケープ領域であるか否かを示す情報、付加ビッ
トの長さ、ラン、及び前記可変長符号とこれに付随する
情報の全体の長さに基づいて、前記ビットデータから情
報を読み出して量子化係数を復元する量子化係数再構成
を実行することを特徴とする画像信号復号方法。
13. Input code data, read out bit data of a predetermined length from the input code data, decode a variable-length code portion located at the head of the read bit data, and determine whether it is an escape area. Information indicating whether or not it is the escape area, performing code conversion to output the length of the additional bit, the run, and the entire length of the variable length code and the information accompanying the variable length code, Performing a quantization coefficient reconstruction for reading information from the bit data and restoring a quantization coefficient based on the length of the additional bit, the run, and the entire length of the variable length code and the accompanying information. A video signal decoding method.
【請求項14】 符号データを入力し、入力符号データ
を一時蓄積する蓄積手段と、 前記蓄積手段より所定の長さのビットデータを読み出す
ビット切り出し手段と、 前記ビットデータの先頭に位置する可変長符号部分を復
号して、例外領域であるか否かを示す情報、付加ビット
長さ、ラン、及び前記可変長符号とこれに付随する情報
の全体の長さを出力する符号変換手段と、 前記例外領域であるか否かを示す情報、付加ビット長
さ、ラン、及び前記可変長符号とこれに付随する情報の
全体の長さに基づいて、前記ビットデータから情報を読
み出して量子化係数を復元する再構成手段とを備えたこ
とを特徴とする画像信号復号装置。
14. A storage means for inputting code data and temporarily storing input code data, a bit cutout means for reading bit data of a predetermined length from said storage means, and a variable length located at the head of said bit data. Code conversion means for decoding a code part, and information indicating whether or not the area is an exceptional area, an additional bit length, a run, and outputting the entire length of the variable length code and information accompanying the variable length code; Information indicating whether the area is an exception area, an additional bit length, a run, and information based on the entire length of the variable-length code and the accompanying information. An image signal decoding apparatus, comprising: reconstruction means for restoring.
JP26584998A 1998-09-21 1998-09-21 Image signal coding method, image signal decoding method and device therefor Pending JP2000101847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26584998A JP2000101847A (en) 1998-09-21 1998-09-21 Image signal coding method, image signal decoding method and device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26584998A JP2000101847A (en) 1998-09-21 1998-09-21 Image signal coding method, image signal decoding method and device therefor

Publications (1)

Publication Number Publication Date
JP2000101847A true JP2000101847A (en) 2000-04-07

Family

ID=17422935

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26584998A Pending JP2000101847A (en) 1998-09-21 1998-09-21 Image signal coding method, image signal decoding method and device therefor

Country Status (1)

Country Link
JP (1) JP2000101847A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011523152A (en) * 2008-06-13 2011-08-04 マイクロソフト コーポレーション Search index format optimization
CN109787455A (en) * 2017-11-15 2019-05-21 上海航空电器有限公司 A kind of zero passage sample circuit for alternating current solid-state power controller

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011523152A (en) * 2008-06-13 2011-08-04 マイクロソフト コーポレーション Search index format optimization
US8914380B2 (en) 2008-06-13 2014-12-16 Microsoft Corporation Search index format optimizations
CN109787455A (en) * 2017-11-15 2019-05-21 上海航空电器有限公司 A kind of zero passage sample circuit for alternating current solid-state power controller

Similar Documents

Publication Publication Date Title
US9698822B2 (en) Method and arrangement for coding transform coefficients in picture and/or video coders and decoders and a corresponding computer program and a corresponding computer-readable storage medium
US6219457B1 (en) Method and system for decoding data encoded in a variable length code word
US5539468A (en) Coding device and decoding device adaptive to local characteristics of an image signal
US6909811B1 (en) Image processing apparatus and method and storage medium storing steps realizing such method
US7483585B2 (en) Image compression using variable bit size run length encoding
EP1834487B1 (en) Method for improved entropy coding
JP3967405B2 (en) Image signal encoding method
US6501859B1 (en) Image compression using wavelet data or original image data depending on code amount
US5422736A (en) Multi-mode image processing permitting selection of quantization process according to image characteristics
US20030090398A1 (en) System and method for efficient data compression
EP0833519B1 (en) Segmentation and background suppression in JPEG-compressed images using encoding cost data
US5801841A (en) Image signal coding apparatus with switching between variable-length coding and fixed-length coding
EP2317476B1 (en) Multimedia signature coding and decoding
US20030107753A1 (en) Image processing apparatus and method, program, and storage medium
JPH03165181A (en) High quality compression method of binary text picture
JP2003143604A (en) Adaptive block size image compression method and system
US8275210B2 (en) Lossless compressor for image data values
KR100904797B1 (en) Methods and systems for compressing image data
US7561744B2 (en) Image encoding apparatus, image decoding apparatus, and their control method, and computer program and computer-readable storage medium
JPH11252563A (en) Image coder, image decoder, image processing unit, image coding method, image decoding method and image processing method
US5007102A (en) Data compression using block list transform
CN1539239A (en) Interface encoding method and apparatus
US8023756B2 (en) Image encoding apparatus and method of controlling same
US20060140487A1 (en) Image compressing apparatus and image decoding apparatus and image converting apparatus and image processing method
US6084913A (en) Method for compressing dynamic image information and system and device therefor