JPH0670176A - Encoding method and encoding device - Google Patents

Encoding method and encoding device

Info

Publication number
JPH0670176A
JPH0670176A JP22176892A JP22176892A JPH0670176A JP H0670176 A JPH0670176 A JP H0670176A JP 22176892 A JP22176892 A JP 22176892A JP 22176892 A JP22176892 A JP 22176892A JP H0670176 A JPH0670176 A JP H0670176A
Authority
JP
Japan
Prior art keywords
image data
pixel
encoding
output
line
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
JP22176892A
Other languages
Japanese (ja)
Inventor
Hideshi Osawa
秀史 大澤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP22176892A priority Critical patent/JPH0670176A/en
Publication of JPH0670176A publication Critical patent/JPH0670176A/en
Priority to US08/515,385 priority patent/US5655032A/en
Priority to US08/736,942 priority patent/US6026197A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding

Abstract

PURPOSE:To evade the complication of hardware by setting a first flag for every n-lines and a second flag of a picture element unit in accordance with the features of first and second picture data, and predictive-encoding the first picture data in accordance with the first and the second flags. CONSTITUTION:The flag FLG='0' is set, and all reduced picture elements A to I are of the same color, and pattern prediction processing TP='1' is set to objective picture elements (a) to (d) to be encoded, and afterwards, it is judged whether a processed picture element is of the right edge of a second line or not, and if it is of the right edge of the second line, the FLG is settled when the processed picture element reaches, for instance, the right edge of the second line of a block line, and encoding processing is executed. Besides, in the case that the objective picture elements (a) to (d) to be encoded contain a different color, after TP='0' is set to the objective picture elements (a) to (d) to be encoded after FLG='1' is set, FLG is settled, and the encoding processing is executed.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は符号化方法および符号装
置に関し、例えば、画像データサービスなどにおける符
号化方法および符号装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coding method and a coding apparatus, for example, a coding method and a coding apparatus in an image data service.

【0002】[0002]

【従来の技術】静止画像通信装置の代表的な例であるフ
アクシミリ装置においては、MH,MR符号などを用い
て、2値画像を符号化している。フアクシミリ装置など
の符号化方法では、画像の全体像を把握するには、画像
データのすべてが伝送される必要がある。このため、画
像データベースサービスやビデオテツクスなど、迅速に
画像を判断することが必要とされる画像データサービス
において、フアクシミリ装置などで使用されている符号
化方法を使用するのは困難であつた。
2. Description of the Related Art In a facsimile device, which is a typical example of a still image communication device, a binary image is coded using MH, MR codes or the like. In encoding methods such as facsimile machines, all of the image data needs to be transmitted in order to grasp the overall image of the image. For this reason, it is difficult to use the encoding method used in facsimile devices in image data services such as image database services and video texts that require quick image determination.

【0003】そこで、1枚の画像を伝送するに当たり、
大まかな画像情報を最初に伝送して、その後追加情報を
伝送することによつて、徐々に詳細な画像を形成する順
次再生方式が提案されていて、これを実現するための符
号化が階層符号化方式である。順次再生方式において、
大まかな情報は、原画像を縮小したものを使う例が多
く、この縮小処理を何回か繰返すことにより階層を構成
する。例えば、画像に縦横1/2の縮小処理を繰返す
と、面積が1/4,1/16のサイズの画像が形成され
る。順次再生方式においては、最初にサイズが小さい1
/16の画像のデータを符号化して伝送し、次に、1/
16の画像から1/4の画像を形成するための追加情報
を符号化して伝送し、続いて、1/4の画像から原画像
を形成するための追加情報を伝送する。
Therefore, in transmitting one image,
A sequential reproduction method has been proposed in which rough image information is transmitted first, and then additional information is transmitted to form gradually detailed images, and the encoding for realizing this is a hierarchical code. It is a system. In the sequential playback system,
As rough information, there are many cases in which an original image is reduced, and the reduction process is repeated several times to form a hierarchy. For example, when the image is repeatedly reduced by ½ in the vertical and horizontal directions, an image having a size of 1/4 and 1/16 is formed. In the sequential playback method, the size is first small 1
/ 16 image data is encoded and transmitted, then 1 /
Additional information for forming a 1/4 image from 16 images is encoded and transmitted, and subsequently, additional information for forming an original image from the 1/4 image is transmitted.

【0004】また、1/4,1/16の画像を原画と同
じサイズに記録するには、記録密度を1/2,1/4に
下げて出力する。この追加情報をできるだけ小さくする
ことは、伝送時間を短縮するのに大きな効果がある。そ
こで、サイズの小さい画像から一回り大きいサイズの画
像を予測できるところは、符号化対象から外す符号化前
処理が数多く考えられている。
Further, in order to record 1/4 and 1/16 images in the same size as the original image, the recording density is reduced to 1/2 and 1/4 for output. Making this additional information as small as possible is very effective in reducing the transmission time. For this reason, there are many pre-coding processes for removing an image from a small size image that can be predicted from a small size image.

【0005】典型的なパターン予測処理(以下「TP」
という)も、符号化前処理の有効な手段である。TP
は、例えば2ラインをブロツクラインとし、符号化する
2×2の4画素と、これに対応する縮小画素とその周囲
の計9画素とが同色であれば、TP可能な画素として符
号化の対象から、この2×2画素を外すものである。す
なわち、ブロツクラインの先頭に付加されたTPフラグ
を、縮小画素から符号化する画素をTP可能な場合は
‘0’とし、例外が存在してTP不可能の場合は‘1’
とする。TPフラグが‘0’のブロツクラインについて
は、受信側でTP可能な画素を符号化対象から外し、そ
れ以外の画素は通常の予測符号化を行う。また、TPフ
ラグが‘1’のブロツクラインでは、全部の画素につい
て通常の符号化を行う。
A typical pattern prediction process (hereinafter "TP")
Is also an effective means of precoding processing. TP
Is a block line, for example, if 2 × 2 4 pixels to be coded, a reduced pixel corresponding to this, and a total of 9 pixels around it are the same color, the pixel to be coded as a TP-enabled pixel Therefore, this 2 × 2 pixel is removed. That is, the TP flag added to the beginning of the block line is set to "0" when the pixel to be encoded from the reduced pixel can be TP, and is set to "1" when the exception exists and TP cannot be performed.
And For the block line having the TP flag of “0”, the TP-capable pixel is excluded from the encoding target on the receiving side, and the other pixels are subjected to normal predictive encoding. In the block line having the TP flag of "1", normal encoding is performed on all pixels.

【0006】[0006]

【発明が解決しようとする課題】しかし、上記従来例に
おいては、次のような問題点があつた。すなわち、上記
従来例のTPを用いた符号化においては、TP可能か否
かを判定するために、前走査によつて各ブロツクライン
ごとに、符号化する画素と、対応する縮小画素およびそ
の周囲画素とを調べ、各ブロツクラインの先頭にTPフ
ラグを付加する必要がある。このため、上記従来例のT
Pを用いた符号化においては、何度も縮小画素とその周
囲画素を参照する必要があり、ハードウエアが複雑化す
る欠点があつた。
However, the above-mentioned conventional example has the following problems. That is, in the encoding using the TP of the above-mentioned conventional example, in order to determine whether or not the TP is possible, the pixel to be encoded, the corresponding reduced pixel and its periphery are provided for each block line by the pre-scan. It is necessary to check the pixel and add a TP flag to the beginning of each block line. Therefore, the T of the above conventional example is
In the encoding using P, it is necessary to refer to the reduced pixel and its surrounding pixels many times, and there is a drawback that the hardware becomes complicated.

【0007】[0007]

【課題を解決するための手段】本発明は、前記の課題を
解決することを目的としたもので、前記の課題を解決す
る一手段として、以下の構成を備える。
SUMMARY OF THE INVENTION The present invention is intended to solve the above problems, and has the following structure as one means for solving the above problems.

【0008】すなわち、第1の画像データから変換され
たより解像度の低い第2の画像データを生成し、前記第
1の画像データの特徴と前記第2の画像データの特徴と
に応じてnライン毎の第1のフラグを設定し、前記第1
の画像データの特徴と前記第2の画像データの特徴とに
応じて画素単位の第2のフラグを設定し、前記第1のフ
ラグと前記第2のフラグとに応じて前記第1の画像デー
タを予測符号化する符号化方法にする。
That is, second image data having a lower resolution converted from the first image data is generated, and every n lines depending on the characteristics of the first image data and the characteristics of the second image data. The first flag of the
A second flag in pixel units according to the characteristics of the image data and the characteristics of the second image data, and the first image data according to the first flag and the second flag. Is a predictive coding method.

【0009】または、第1の画像データの特徴を検出す
る第1の検出手段と、前記第1の画像データから変換さ
れたより解像度の低い第2の画像データの特徴を検出す
る第2の検出手段と、前記第1の検出手段によつて検出
された特徴と前記第2の検出手段によつて検出された特
徴とに応じて前記第1の画像データを予測符号化する符
号手段とを備えた符号装置とする。
Alternatively, a first detecting means for detecting a characteristic of the first image data and a second detecting means for detecting a characteristic of the second image data having a lower resolution converted from the first image data. And a coding means for predictively coding the first image data according to the characteristics detected by the first detection means and the characteristics detected by the second detection means. The encoding device.

【0010】[0010]

【作用】以上の構成によれば、第1の画像データの特徴
と、より解像度の低い第2の画像データの特徴とに応じ
て、第1の画像データを予測符号化する符号化方法およ
び符号装置を提供できる。例えば、以上の構成によつ
て、縮小画素とその周囲画素を何度も参照する必要が無
くなり、階層符号化を小規模なハードウエアで実現する
符号化方法および符号装置を提供できる。
With the above arrangement, a coding method and code for predictively coding the first image data according to the characteristics of the first image data and the characteristics of the second image data having a lower resolution. A device can be provided. For example, with the above configuration, it is not necessary to refer to the reduced pixel and its surrounding pixels many times, and it is possible to provide an encoding method and an encoding device that implements hierarchical encoding with small-scale hardware.

【0011】[0011]

【実施例】以下、図面を参照して本発明に係る一実施例
を詳細に説明する。図1は一般的な階層符号器の構成例
を示すブロツク図である。図1において、101は縮小
処理部aで、入力された原画像データI1の縦横を1/
2サイズに縮小処理して、1/4の面積の縮小画像デー
タI2を出力する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment according to the present invention will be described in detail below with reference to the drawings. FIG. 1 is a block diagram showing a configuration example of a general hierarchical encoder. In FIG. 1, reference numeral 101 denotes a reduction processing unit a, which converts the input original image data I1 into 1 / horizontal directions.
The size of the image is reduced to 2 and the reduced image data I2 having a quarter area is output.

【0012】102は縮小処理部bで、入力された縮小
画像データI2の縦横をさらに1/2サイズに縮小処理
して、1/16の面積の縮小画像データI3を出力す
る。103は符号器aで、入力された縮小画像データI
3を符号化圧縮する。符号器a103から出力される符
号データC3は、原画像データI1の1/16のデータ量
の縮小画像データI3を、さらに符号化圧縮したもので
あり、原画像データI1に比べて非常に小さなデータ量
となる。すなわち、送信側は、符号器a103から出力
された符号データC3を、最初に伝送することにより、
受信側では、符号データC3を復号して、画像サイズは
小さいが、送信画像の概略を知ることが可能となる。
Reference numeral 102 denotes a reduction processing unit b, which further reduces the vertical and horizontal directions of the input reduced image data I2 to 1/2 size and outputs reduced image data I3 having an area of 1/16. Reference numeral 103 is an encoder a for inputting the reduced image data I
3 is encoded and compressed. The code data C3 output from the encoder a103 is the reduced image data I3 having a data amount of 1/16 of the original image data I1, which is further encoded and compressed, and is much smaller than the original image data I1. It becomes the amount. That is, the transmitting side first transmits the code data C3 output from the encoder a103,
On the receiving side, it is possible to decode the coded data C3 and to know the outline of the transmitted image although the image size is small.

【0013】また、104は符号器bで、縮小画像デー
タI3を参照して、縮小画像データI2を符号化圧縮した
符号データC2を出力する。105は符号器cで、縮小
画像データI2を参照して、原画像データI1を符号化圧
縮した符号データC1を出力する。図2は一般的な階層
復号器の構成例を示すブロツク図である。
Reference numeral 104 denotes an encoder b, which refers to the reduced image data I3 and outputs encoded data C2 obtained by encoding and compressing the reduced image data I2. Reference numeral 105 denotes an encoder c, which refers to the reduced image data I2 and outputs encoded data C1 obtained by encoding and compressing the original image data I1. FIG. 2 is a block diagram showing a configuration example of a general hierarchical decoder.

【0014】図2において、201は復号器aで、入力
された符号データC3を復号する。204はフレームメ
モリaで、復号器a201が出力した復号画像データI
3’を記憶する。207は補間器aで、フレームメモリ
204aに記憶された復号画像データI3’を、必要サ
イズ(例えば縦横4倍)に補間処理する。また、202
は復号器bで、予測参照に復号画像データI3’を加え
て、入力された符号データC2を復号する。205はフ
レームメモリbで、復号器b202が出力した復号画像
データI2’を記憶する。208は補間器bで、フレー
ムメモリb205に記憶された復号画像データI2’
を、必要サイズ(例えば縦横2倍)に補間処理する。
In FIG. 2, reference numeral 201 denotes a decoder a, which decodes the input code data C3. A frame memory a 204 is the decoded image data I output by the decoder a 201.
Remember 3 '. An interpolator 207 interpolates the decoded image data I3 'stored in the frame memory 204a into a required size (for example, four times the vertical and horizontal directions). Also, 202
Is a decoder b, which adds the decoded image data I3 'to the prediction reference to decode the input code data C2. A frame memory b 205 stores the decoded image data I2 'output from the decoder b202. Reference numeral 208 denotes an interpolator b, which is the decoded image data I2 'stored in the frame memory b205.
Is interpolated to a required size (for example, double the length and width).

【0015】また、203は復号器cで、予測参照に復
号画像データI2’を加えて、入力された符号データC1
を復号する。206はフレームメモリcで、復号器c2
03が出力した復号画像データI1’を記憶する。20
9はセレクタで、選択入力端子Sへコントローラ(不図
示)から入力された切替信号に応じて、入力端子Aへ補
間器aから入力された画像データI31と、入力端子Bへ
補間器bから入力された画像データI21と、入力端子C
へフレームメモリc206から入力された画像データI
11との何れかを選択して出力する。
Reference numeral 203 denotes a decoder c, which adds the decoded image data I2 'to the prediction reference to input the input code data C1.
To decrypt. A frame memory c 206 includes a decoder c2
The decoded image data I1 ′ output by 03 is stored. 20
Reference numeral 9 denotes a selector, which inputs image data I31 input from the interpolator a to the input terminal A and input from the interpolator b to the input terminal B according to a switching signal input to the selection input terminal S from a controller (not shown). Image data I21 and input terminal C
Image data I input from the frame memory c206
Select one of 11 and output.

【0016】210はビデオメモリで、セレクタ209
から出力された画像データを記憶する。211はモニタ
で、ビデオメモリ210に記憶された画像データに基づ
いて、画像などを表示する。また、212はプリンタ
で、フレームメモリc206から出力された画像データ
I11に基づいて、画像などをハードコピーする。
Reference numeral 210 denotes a video memory, which is a selector 209.
The image data output from is stored. A monitor 211 displays an image or the like based on the image data stored in the video memory 210. Reference numeral 212 denotes a printer, which makes a hard copy of an image or the like based on the image data I11 output from the frame memory c206.

【0017】図3は符号器b104の構成例を示すブロ
ツク図である。なお、符号器c105,符号器a103
も略同様の構成である。図3において、304はメモリ
nで、縮小画像データI2の符号化注目画素とその周囲
画素を記憶する。305はメモリmで、縮小画像データ
I3の数ライン分のデータを記憶する。メモリ304,
305に記憶された画像データは、後述の予測部などへ
出力されて、予測参照画素として利用される。
FIG. 3 is a block diagram showing a configuration example of the encoder b104. The encoder c105 and the encoder a103
Also has substantially the same configuration. In FIG. 3, reference numeral 304 denotes a memory n which stores the coded pixel of interest of the reduced image data I2 and its surrounding pixels. A memory m 305 stores data of several lines of the reduced image data I3. Memory 304,
The image data stored in 305 is output to a prediction unit, which will be described later, and used as a prediction reference pixel.

【0018】301は典型的予測部で、復号側で予測可
能な画素を符号化対象から外すため、メモリn304か
ら入力された縮小画像データI2の数画素と、メモリm
305から入力された縮小画像データI3の数画素とが
同色の場合、符号化する縮小画像データI2の該画素を
符号化対象から外す。302は一義的予測部で、メモリ
n304から入力された符号化注目画素の周囲画素と、
メモリm305から入力された縮小画素データI3とを
参照することによつて、典型的予測部301から入力さ
れた符号化注目画素が、使用された縮小方式に応じて一
義的に決定できる場合、該画素を符号化対象から外す。
Reference numeral 301 denotes a typical predictor, which excludes pixels that can be predicted on the decoding side from the object of encoding, and therefore several pixels of the reduced image data I2 input from the memory n304 and the memory m.
When several pixels of the reduced image data I3 input from 305 have the same color, the pixels of the reduced image data I2 to be encoded are excluded from the encoding target. Reference numeral 302 denotes a unique predictor, which includes pixels surrounding the coded pixel of interest input from the memory n304,
When the coded pixel of interest input from the typical prediction unit 301 can be uniquely determined according to the reduction method used by referring to the reduced pixel data I3 input from the memory m305, Pixels are excluded from encoding.

【0019】303は予測符号部で、一義的予測部30
2から入力された画像データを符号化する。図4は符号
器b104の符号化処理の一例を示すフローチヤート
で、任意の符号化注目画素を符号化する処理を示すもの
である。なお、符号器c105,符号器a103も略同
様フローで符号化処理を行う。
Reference numeral 303 denotes a predictive coding unit, which is a unique predicting unit 30.
The image data input from 2 is encoded. FIG. 4 is a flow chart showing an example of the encoding process of the encoder b104, and shows the process of encoding an arbitrary pixel of interest for encoding. Note that the encoders c105 and a103 also perform encoding processing in a similar flow.

【0020】図4において、符号器は、ステツプS1
で、符号化注目画素の典型的予測が不可能か否かを判定
して、予測不可能の場合はステツプS2へ進み、予測可
能の場合は処理を終了する。続いて、符号器は、ステツ
プS2で、符号化注目画素の一義的予測が不可能か否か
を判定して、予測不可能の場合はステツプS3へ進み、
予測可能の場合は処理を終了する。
In FIG. 4, the encoder is step S1.
Then, it is determined whether or not the typical prediction of the coded pixel of interest is impossible. If the prediction is impossible, the process proceeds to step S2, and if the prediction is possible, the process ends. Subsequently, the encoder determines in step S2 whether or not the univocal prediction of the coded pixel of interest is impossible, and if unpredictable, the encoder proceeds to step S3.
If it is predictable, the process ends.

【0021】続いて、符号器は、ステツプS3で、符号
化注目画素の符号化を実行した後、処理を終了する。図
5は符号器b104における符号化対象画素と縮小画素
の関係の一例を示す図で、○印は縮小画素を、□印は符
号化対象画素を表している。なお、符号器c105,符
号器a103における符号化対象画素と縮小画素の関係
も略同様である。
Subsequently, the encoder executes the encoding of the pixel of interest to be encoded in step S3, and then ends the processing. FIG. 5 is a diagram showing an example of the relationship between the pixel to be coded and the reduced pixel in the encoder b104, in which the symbol ◯ represents the reduced pixel and the symbol □ represents the pixel to be encoded. The relationship between the encoding target pixel and the reduced pixel in the encoders c105 and a103 is substantially the same.

【0022】図5に一例を示すように、1つの縮小画素
Aは、4つの符号化対象画素a,b,c,dに対応し、
他の縮小画素においても略同様である。また、図5にF
LGで示すのはフラグで、縮小画素で構成されるそれぞ
れのラインの、例えば左端に添付される。また、符号化
対象画素a,bを含むラインと、符号化対象画素c,d
を含むラインとの2ラインをブロツクラインと呼ぶ。
As shown in an example in FIG. 5, one reduced pixel A corresponds to four encoding target pixels a, b, c and d,
The same applies to other reduced pixels. Also, in FIG.
A flag LG indicates a flag, which is attached to, for example, the left end of each line composed of reduced pixels. In addition, the line including the encoding target pixels a and b and the encoding target pixels c and d
Two lines including a line including a line are called block lines.

【0023】符号器は、例えば、図5に示す符号化対象
画素a〜dと、図5に示す縮小画素A〜Iとを参照す
る。一般的な典型的予測においては、縮小画素A〜Iが
同色の場合、符号化対象画素a〜dも同色であるという
ルールを仮定して、このルールが成立するか否かを判定
して、その結果に応じたフラグFLGをブロツクライン
ごとセツトする。すなわち、FLG=‘0’は、該ブロ
ツクラインでルールがすべて成立することを、また、F
LG=‘1’は、該ブロツクラインでルールが成立しな
い場合が存在することを示している。
The encoder refers to, for example, the pixels to be encoded a to d shown in FIG. 5 and the reduced pixels A to I shown in FIG. In general typical prediction, if the reduced pixels A to I have the same color, the rule that the encoding target pixels a to d also have the same color is assumed, and it is determined whether or not this rule holds, A flag FLG corresponding to the result is set for each block line. That is, FLG = '0' means that all the rules are satisfied at the block line.
LG = '1' indicates that there is a case where the rule is not satisfied in the block line.

【0024】図6は一般的な典型的予測におけるフラグ
FLGをセツトする一例を示すフローチヤートである。
図6において、符号器は、ステツプS11で、FLG=
‘0’をセツトし、ステツプS12で、縮小画素A〜I
がすべて同色か否かを判定して、すべて同色の場合はス
テツプS13へ進み、また、異なる色の画素が含まれる
場合はステツプS14へジヤンプする。
FIG. 6 is a flow chart showing an example of setting the flag FLG in a general typical prediction.
In FIG. 6, the encoder is FLG = in step S11.
"0" is set, and in steps S12, the reduced pixels A to I are set.
Are all the same color, and if they are all the same color, the process proceeds to step S13, and if pixels of different colors are included, the process jumps to step S14.

【0025】縮小画素A〜Iがすべて同色だつた場合、
符号器は、ステツプS13で、符号化対象画素a〜dが
すべて同色か否かを判定して、すべて同色の場合はステ
ツプS14へ進み、また、異なる色の画素が含まれる場
合はステツプS15へ進んで、ステツプS15で、FL
G=‘1’をセツトした後、処理を終了する。また、符
号器は、ステツプS14で、処理画素の位置を判定し
て、該画素がブロツクラインの例えば右端でなければス
テツプS12へ戻り、また、該画素がラインブロツクの
例えば右端であれば処理を終了する。
When all the reduced pixels A to I have the same color,
In step S13, the encoder determines whether all the pixels to be coded a to d have the same color and proceeds to step S14 if they are all the same color, or proceeds to step S15 if they include pixels of different colors. Go to Step S15, FL
After setting G = '1', the process is terminated. Further, the encoder determines the position of the processing pixel in step S14, and if the pixel is not the right end of the block line, returns to step S12, and if the pixel is the right end of the line block, the process is performed. finish.

【0026】すなわち、符号器は、前述したルールが成
立しない画素を検出するか、処理画素がブロツクライン
の右端に達するまで、ステツプS12からステツプS1
4の処理を繰返し、ステツプS14を経て処理を終了す
る場合は、FLG=‘0’となる。図7は一般的な典型
的予測における画素単位にTP値を決定する一例を示す
フローチヤートである。なお、同図は1ブロツクライン
の処理を示している。
That is, the encoder detects the pixel for which the above-mentioned rule is not satisfied or until the processed pixel reaches the right end of the block line, the steps S12 to S1.
When the processing of step 4 is repeated and the processing is terminated through step S14, FLG = '0'. FIG. 7 is a flow chart showing an example of determining the TP value for each pixel in a general typical prediction. The figure shows the processing of one block line.

【0027】図7において、符号器は、ステツプS21
でFLGを読込んで、ステツプS22で読込んだFLG
の値を判定して、FLG=‘0’の場合はステツプS2
3へ進み、FLG=‘1’の場合はステツプS24へ進
む。FLG=‘0’の場合、符号器は、ステツプS23
で、縮小画素A〜Iがすべて同色か否かを判定して、す
べて同色であれば符号化を行わずステツプS25へ進
み、異なる色がふくまれればステツプS24へ進む。
In FIG. 7, the encoder is step S21.
Read FLG with, and then read FLG with step S22.
Is determined, and if FLG = '0', step S2
3 and if FLG = '1', proceed to step S24. If FLG = '0', the encoder determines in step S23.
Then, it is determined whether or not all the reduced pixels A to I have the same color. If all the reduced pixels have the same color, the process proceeds to step S25 without encoding, and if different colors are included, the process proceeds to step S24.

【0028】FLG=‘1’の場合、および縮小画素A
〜Iに異なる色が含まれる場合、符号器は、ステツプS
24で、注目画素を符号化した後、ステツプS25へ進
む。続いて、符号器は、ステツプS25で、注目画素が
ラインの例えば右端か否かを判定して、ラインの右端で
なければステツプS22へ戻り、ラインの右端であれば
ステツプS26へ進む。すなわち、符号器は、注目画素
がライン濃淡に達するまで、ステツプS22からステツ
プS25を繰返す。
If FLG = '1' and reduced pixel A
If ~ I contains different colors, the encoder determines
After encoding the pixel of interest at 24, the process proceeds to step S25. Subsequently, the encoder determines in step S25 whether or not the pixel of interest is, for example, the right end of the line. If it is not the right end of the line, the process returns to step S22, and if it is the right end of the line, the process proceeds to step S26. That is, the encoder repeats steps S22 to S25 until the pixel of interest reaches the line density.

【0029】注目画素がラインの右端に達すると、符号
器は、ステツプS26で、注目画素がブロツクラインの
例えば2ライン目の右端か否かを判定して、2ライン目
の右端でなければステツプS22へ戻り、2ライン目の
右端であれば処理を終了する。符号器は、図7に示す処
理を、ブロツクラインごとに繰返して、画像データ全体
を処理する。
When the target pixel reaches the right end of the line, the encoder determines in step S26 whether or not the target pixel is the right end of the block line, for example, the second end, and if not, the step Returning to S22, if it is the right end of the second line, the process ends. The encoder repeats the processing shown in FIG. 7 for each block line to process the entire image data.

【0030】図6と図7に示したように、一般的な典型
的予測においては、例えば縮小画素A〜Iを、2回参照
する必要があつた。以下、本発明にかかる一実施例の予
測符号化について詳細に説明する。図8は本発明に係る
一実施例の典型的予測の一例を示すフローチヤートであ
る。
As shown in FIGS. 6 and 7, in the general typical prediction, for example, it is necessary to refer to the reduced pixels A to I twice. Hereinafter, the predictive coding according to the embodiment of the present invention will be described in detail. FIG. 8 is a flow chart showing an example of a typical prediction of an embodiment according to the present invention.

【0031】図8において、本実施例は、ステツプS3
1でFLG=‘0’をセツトし、ステツプS32で縮小
画素A〜Iがすべて同色か否かを判定して、すべて同色
であればステツプS33へ進み、異なる色を含めばステ
ツプS36へ進む。縮小画素A〜Iがすべて同色の場
合、本実施例は、ステツプS33で、符号化対象画素a
〜dがすべて同色か否かを判定して、すべて同色であれ
ばステツプS34へ進み、異なる色を含めばステツプS
35へ進む。
In FIG. 8, this embodiment is based on step S3.
In step 1, FLG = '0' is set, and in step S32, it is determined whether or not all the reduced pixels A to I have the same color. If they are all the same color, the process proceeds to step S33, and if different colors are included, the process proceeds to step S36. If all the reduced pixels A to I have the same color, in this embodiment, in step S33, the encoding target pixel a
~ D are all the same color, and if they are all the same color, go to step S34, and if different colors are included, step S34
Proceed to 35.

【0032】符号化対象画素a〜dがすべて同色の場
合、本実施例は、ステツプS34で、符号化対象画素a
〜dにTP=‘1’をセツトした後、ステツプS37へ
進む。また、符号化対象画素a〜dが異なる色を含む場
合、本実施例は、ステツプS35で、FLG=‘1’を
セツトした後、ステツプS36へ進む。縮小画素A〜I
がすべて同色の場合、および符号化対象画素a〜dが異
なる色を含む場合、本実施例は、ステツプS36で、符
号化対象画素a〜dにTP=‘0’をセツトした後、ス
テツプS37へ進む。
If all the pixels to be coded a to d have the same color, in this embodiment, at step S34, the pixel to be coded a is encoded.
After setting TP = '1' in .about.d, the process proceeds to step S37. If the pixels a to d to be encoded include different colors, this embodiment sets FLG = '1' in step S35 and then proceeds to step S36. Reduced pixels A to I
Are all the same color, and if the encoding target pixels a to d include different colors, in this embodiment, in step S36, after setting TP = "0" to the encoding target pixels a to d, step S37. Go to.

【0033】続いて、本実施例は、ステツプS37で、
処理画素がブロツクラインの例えば2ライン目の右端か
否かを判定して、2ライン目の右端であればステツプS
38へ進み、2ライン目の右端でなければステツプS3
2へ戻る。すなわち、本実施例は、処理画素がブロツク
ラインの例えば2ライン目の右端に達するまで、ステツ
プS32からステツプS37を繰返し実行する。
Next, in this embodiment, in step S37,
Whether the processed pixel is the right end of the second line of the block line is determined, and if it is the right end of the second line, step S
Proceed to step 38, and if not the right end of the second line, step S3
Return to 2. That is, in this embodiment, steps S32 to S37 are repeatedly executed until the processed pixel reaches, for example, the right end of the second line of the block line.

【0034】処理画素がブロツクラインの例えば2ライ
ン目の右端に達すると、本実施例は、ステツプS38で
FLGを確定し、ステツプS39で後述の符号化処理を
実行する。なお、本実施例においては、FLGを確定し
た後に符号化を実行できる状態になるので、符号化対象
画素データとそのTP値は、例えば2ラインバツフアな
どによつて、符号化が実行されるまで記憶しておく必要
がある。
When the processed pixel reaches, for example, the right end of the second line of the block line, this embodiment determines FLG in step S38, and executes the encoding process described later in step S39. In this embodiment, since the FLG is determined and then the encoding can be executed, the pixel data to be encoded and the TP value thereof are stored, for example, by a 2-line buffer or the like until the encoding is executed. You need to do it.

【0035】図9は本実施例の符号化処理の一例を示す
フローチヤートで、図8に示したステツプS39に対応
するものである。図9において、本実施例は、ステツプ
S41で、符号化注目画素のFLGおよびTPを判定し
て、FLG=‘0’かつTP=‘1’の場合はステツプ
S43へジヤンプする。また、本実施例は、ステツプS
41で、符号化注目画素が前記の条件を満たさない場合
はステツプS42へ進んで、ステツプS42で該画素の
予測符号化を実行した後、ステツプS43へ進む。
FIG. 9 is a flow chart showing an example of the encoding process of this embodiment, which corresponds to step S39 shown in FIG. In FIG. 9, in the present embodiment, in step S41, FLG and TP of the pixel of interest to be encoded are determined, and if FLG = '0' and TP = '1', jump to step S43. In addition, in this embodiment, the step S
If the pixel of interest to be coded does not satisfy the above condition at 41, the process proceeds to step S42, the predictive coding of the pixel is executed at step S42, and then the process proceeds to step S43.

【0036】すなわち、本実施例は、ステツプS41と
ステツプS42において、符号化対象画素を含むブロツ
クラインで典型的予測のルールが成立し(つまりFLG
=‘0’)、かつ、該画素がTPと判定されている(つ
まりTP=‘1’)場合は、ステツプS42の予測符号
化をパスする。続いて、本実施例は、ステツプS43
で、処理画素がブロツクラインの例えば2ライン目の右
端か否かを判定して、2ライン目の右端でなければステ
ツプS41へ戻り、2ライン目の右端であれば処理を終
了する。すなわち、本実施例は、処理画素がブロツクラ
インの例えば2ライン目の右端に達するまで、ステツプ
S41からステツプS43を繰返し実行する。
That is, in the present embodiment, in steps S41 and S42, the typical prediction rule is established for the block line including the pixel to be encoded (that is, FLG).
= '0'), and if the pixel is determined to be TP (that is, TP = '1'), the predictive coding in step S42 is passed. Subsequently, in the present embodiment, step S43
Then, it is determined whether the processing pixel is the right end of the second line of the block line, for example, and if it is not the right end of the second line, the process returns to step S41, and if it is the right end of the second line, the process ends. That is, in this embodiment, steps S41 to S43 are repeatedly executed until the processed pixel reaches the right end of the second line of the block line, for example.

【0037】図10は本実施例の予測符号部の構成例を
示すブロツク図である。図10において、121は予測
器で、外部のラインバツフア(不図示)から入力された
周囲画素データから予測状態を決定して、後述の信号N
sに応じて、その結果の予測状態と符号化シンボルXn
を出力する。122はLUTaで、例えばRAMなどで
構成され、予測器121から入力された予測状態に応じ
て、記憶するインデツクスINDEXと優勢シンボルM
PSを出力する。なお、LUTa122は、初期化回路
120によつて、その記憶するデータが初期化(例えば
INDEX=‘0’,MPS=‘0’)され、後述の更
新器125によつて、その記憶するデータが更新され
る。
FIG. 10 is a block diagram showing an example of the structure of the predictive coding unit of this embodiment. In FIG. 10, reference numeral 121 denotes a predictor, which determines a prediction state from surrounding pixel data input from an external line buffer (not shown) and outputs a signal N described later.
Depending on s, the resulting prediction state and the encoded symbol Xn
Is output. Reference numeral 122 denotes an LUTa, which is composed of, for example, a RAM, and stores an index INDEX and a dominant symbol M which are stored according to the prediction state input from the predictor 121.
Output PS. The LUTa 122 has its stored data initialized (eg, INDEX = '0', MPS = '0') by the initialization circuit 120, and the stored data is stored by the updater 125 described later. Will be updated.

【0038】123はLUTbで、例えばROMなどで
構成され、LUTa122から入力されたINDEXに
応じて、予測はずれの確率を示す記憶する劣勢シンボル
Pを出力する。124は算術符号器で、予測器121か
らの符号化シンボルXnと、LUTa122からの優勢
シンボルMPSと、LUTb123からの劣勢シンボル
Pとを入力して、動的に算術符号化を行い、算術符号デ
ータCnと、次の符号化シンボルを要求する信号Ns
と、符号化シンボルXnと優勢シンボルMPSとの一致
状態を示す信号YNとを出力する。なお、算術符号器1
24へ入力される信号Lsは、外部のコントローラ(不
図示)から送られてくる符号化データの最終ビツトを示
す信号である。
Reference numeral 123 denotes an LUTb, which is composed of, for example, a ROM, and outputs a stored inferior symbol P indicating a probability of misprediction according to INDEX input from the LUTa 122. An arithmetic encoder 124 receives the encoded symbols Xn from the predictor 121, the superior symbol MPS from the LUTa 122, and the inferior symbol P from the LUTb 123 to dynamically arithmetically encode the arithmetic encoded data. Cn and signal Ns requesting the next coded symbol
And a signal YN indicating the coincidence state between the coded symbol Xn and the dominant symbol MPS. The arithmetic encoder 1
The signal Ls input to 24 is a signal indicating the final bit of encoded data sent from an external controller (not shown).

【0039】125は更新器で、算術符号器124から
の信号Ns,信号YNと、LUTa122からインデツ
クスINDEX,優勢シンボルMPSとを入力して、L
UTa122のインデツクスINDEXと優勢シンボル
MPSを更新する。図11は算術符号器124の構成例
を示すブロツク図である。図11において、130は乗
算器a、131は減算器で、前述の劣勢シンボルPと後
述のラツチa136の出力とを、それぞれ乗算,減算す
る。133は加算器で、減算器131の出力と後述の出
力器141の出力とを加算する。
Reference numeral 125 denotes an updater, which inputs the signals Ns and YN from the arithmetic encoder 124, the index INDEX and the dominant symbol MPS from the LUTa 122, and outputs L
The index INDEX of the UTa 122 and the dominant symbol MPS are updated. FIG. 11 is a block diagram showing a configuration example of the arithmetic encoder 124. In FIG. 11, reference numeral 130 is a multiplier a, and 131 is a subtracter, which multiplies and subtracts the above-mentioned inferior symbol P and the output of a latch a 136 described later, respectively. An adder 133 adds the output of the subtractor 131 and the output of the output device 141 described later.

【0040】133と134はそれぞれセレクタで、セ
レクタa133は、排他的論理和回路EXOR135の
出力に応じて、乗算器a130から入力されたデータ
と、減算器131から入力されたデータとを選択して出
力し、また、セレクタb134は、排他的論理和回路E
XOR135の出力に応じて、加算器132から入力さ
れたデータと、出力器141から入力されたデータとを
選択して出力する。なお、EXOR135は、前述の符
号化シンボルXnと優勢シンボルMPSとを入力して、
両者の排他的論理和を出力する。なお、EXOR135
の出力は、前述の信号YNである。
133 and 134 are selectors, respectively. The selector a133 selects the data input from the multiplier a130 and the data input from the subtractor 131 according to the output of the exclusive OR circuit EXOR135. The selector b134 outputs the exclusive OR circuit E
According to the output of the XOR 135, the data input from the adder 132 and the data input from the output unit 141 are selected and output. The EXOR 135 inputs the above-described coded symbol Xn and the dominant symbol MPS,
Outputs the exclusive OR of both. In addition, EXOR135
Is the above-mentioned signal YN.

【0041】136はラツチaで、セレクタa133の
出力と、乗算器b139の出力とをラツチする。なお、
ラツチa136は、前述の信号Lsで初期化される。1
38は比較器で、ラツチa136より入力されたデータ
から、前述の信号Nsを出力する。139は乗算器b
で、ラツチa136から入力されたデータを乗算して、
再びラツチa136へ送る。
Reference numeral 136 denotes a latch a which latches the output of the selector a133 and the output of the multiplier b139. In addition,
The latch a136 is initialized by the above-mentioned signal Ls. 1
Reference numeral 38 is a comparator which outputs the above-mentioned signal Ns from the data input from the latch a136. 139 is a multiplier b
Then, multiply the data input from the latch a136,
It is sent to the latch a136 again.

【0042】137はラツチb、セレクタb134の出
力と、乗算器c140の出力とをラツチする。なお、ラ
ツチb137は、前述の信号Lsで初期化される。14
0は乗算器cで、ラツチb137から入力されたデータ
を乗算して、再びラツチb137へ送る。141は出力
器で、ラツチb137より入力されたデータから、前述
の算術符号データCnを出力する。
137 latches the output of the latch b and the selector b134 and the output of the multiplier c140. The latch b137 is initialized by the above-mentioned signal Ls. 14
Reference numeral 0 denotes a multiplier c, which multiplies the data input from the latch b137 and sends it to the latch b137 again. An output unit 141 outputs the above-described arithmetic code data Cn from the data input from the latch b137.

【0043】図10と図11では、本実施例の予測符号
部をハードウエアで構成する一例を示したが、次に、本
実施例の予測符号部をソフトウエアで構成する一例を説
明する。図12は符号化のメインルーチンの一例を示す
フローチヤートである。図12において、本実施例は、
ステツプS51で符号器の初期設定を行う後述の「初期
化」サブルーチンを実行し、ステツプS52で符号化シ
ンボルXnを読込み、ステツプS53で後述の「符号
化」サブルーチンを実行し、ステツプS54で処理画素
が最終画素か否かを判定して、最終画素でなければステ
ツプS52へ戻り、最終画素であればステツプS55へ
進んで、ステツプS55で後述の「最終符号出力」サブ
ルーチンを実行した後、メインルーチンを終了する。
Although FIG. 10 and FIG. 11 show an example in which the predictive coding unit of this embodiment is configured by hardware, an example in which the predictive coding unit of this embodiment is configured by software will be described. FIG. 12 is a flow chart showing an example of the encoding main routine. In FIG. 12, the present embodiment is
In step S51, the "initialization" subroutine described later for initializing the encoder is executed, in step S52 the encoded symbol Xn is read, in step S53 the "encoding" subroutine described later is executed, and in step S54 the processed pixel is processed. Is the last pixel, and if it is not the last pixel, the process returns to step S52, and if it is the last pixel, the process proceeds to step S55, where the "final code output" subroutine described later is executed, and then the main routine To finish.

【0044】図13は「初期化」サブルーチンの一例を
示すフローチヤートである。図13において、本実施例
は、ステツプS61で、例えば、レジスタC=0,バツ
フアB=0,カウンタSC=0に初期化し、また、例え
ば、レジスタA=‘FFFF’,フラグSTFLG≠
‘0’,カウンタCT=11に初期化した後、「初期
化」サブルーチンを終了して、メインルーチンへ戻る。
FIG. 13 is a flow chart showing an example of the "initialization" subroutine. 13, in the present embodiment, in step S61, for example, the register C = 0, the buffer B = 0, and the counter SC = 0 are initialized, and, for example, the register A = 'FFFF' and the flag STFLG ≠.
After initializing to "0" and the counter CT = 11, the "initializing" subroutine is terminated and the process returns to the main routine.

【0045】図14は「符号化」サブルーチンの一例を
示すフローチヤートである。図14において、本実施例
は、ステツプS71で、図10に示したLUTa122
から、前述の優勢シンボルMPSとインデツクスIND
EXを読出し、読出したINDEXから前述の劣勢シン
ボルPを決定する。続いて、本実施例は、ステツプS7
2で、レジスタA1の更新(A1←A×P)と、レジスタ
A0の更新(A0←A−A1)とを実行する。
FIG. 14 is a flow chart showing an example of the "encoding" subroutine. 14, in the present embodiment, in step S71, the LUTa 122 shown in FIG.
From the above-mentioned superior symbol MPS and index IND
EX is read, and the above-mentioned inferior symbol P is determined from the read INDEX. Subsequently, in this embodiment, step S7 is performed.
At 2, the register A1 is updated (A1 ← A × P) and the register A0 is updated (A0 ← A-A1).

【0046】続いて、本実施例は、ステツプS73で、
XnとMPSを比較して、Xn=MPSの場合(つまり
予測が一致した場合)はステツプS74へ進み、Xn≠
MPSの場合(つまり予測が外れた場合)はステツプS
81へ進む。予測が一致した場合(Xn=MPS)、本
実施例は、ステツプS74でレジスタAを更新(A←A
0)し、ステツプS75でレジスタAの最上位ビツト
(以下「MSB」という)を判定して、MSB=‘0’
の場合はステツプS76へ進み、MSB=‘1’の場合
は「符号化」サブルーチンを終了して、メインルーチン
へ戻る。
Subsequently, in this embodiment, in step S73,
Xn is compared with MPS, and if Xn = MPS (that is, if the predictions match), the process proceeds to step S74, where Xn ≠
In case of MPS (that is, when prediction is wrong), step S
Proceed to 81. If the predictions match (Xn = MPS), the present embodiment updates the register A in step S74 (A ← A).
0) Then, in step S75, the highest bit of register A (hereinafter referred to as "MSB") is determined, and MSB = "0".
If it is, the process proceeds to step S76. If MSB is '1', the "encoding" subroutine is terminated and the process returns to the main routine.

【0047】MSB=‘0’であつた場合、本実施例
は、ステツプS76でINDEXをNMPSテーブルに
従つて更新した後、ステツプS85へ進む。また、予測
が外れた場合(Xn≠MPS)、本実施例は、ステツプ
S81で、レジスタCの更新(C←C+A0)と、レジ
スタAの更新(A←A1)とを実行し、ステツプS82
で、INDEXに対応するスイツチSWITCHを判定
して、SWITCH=‘0’の場合はステツプS84へ
ジヤンプし、また、SWITCH=‘1’の場合はステ
ツプS83へ進んで、ステツプS83でMPSを反転
(MPS←1−MPS)した後、ステツプS84へ進
む。
If MSB = '0', the present embodiment updates INDEX according to the NMPS table in step S76, and then proceeds to step S85. If the prediction is wrong (Xn ≠ MPS), in this embodiment, the update of the register C (C ← C + A0) and the update of the register A (A ← A1) are executed in step S81, and step S82 is executed.
Then, the switch SWITCH corresponding to INDEX is determined, and if SWITCH = '0', jump to step S84. If SWITCH = '1', proceed to step S83 to invert MPS at step S83 ( After performing MPS ← 1-MPS), the process proceeds to step S84.

【0048】続いて、本実施例は、ステツプS84でI
NDEXをNLPSテーブルに従つて更新した後、ステ
ツプS85へ進む。続いて、本実施例は、ステツプS8
5で、「RENORME」サブルーチンを実行した後、
「符号化」サブルーチンを終了して、メインルーチンへ
戻る。図15は「RENORME」サブルーチンの一例
を示すフローチヤートである。
Subsequently, in this embodiment, in step S84, I
After updating NDEX according to the NLPS table, the process proceeds to step S85. Subsequently, in the present embodiment, step S8
After executing the "RENORME" subroutine in step 5,
The "encoding" subroutine is ended and the process returns to the main routine. FIG. 15 is a flow chart showing an example of the "RENORME" subroutine.

【0049】図15において、本実施例は、ステツプS
91で、レジスタAのMSBを判定して、MSB=
‘0’の場合はステツプS92へ進み、また、MSB=
‘1’の場合は、「RENORME」サブルーチンを終
了して、「符号化」サブルーチンへ戻る。MSB=
‘0’の場合、本実施例は、ステツプS92で、レジス
タAとレジスタCを左シフトして更新し、かつ、カウン
タCTをデクリメントして更新する。
In FIG. 15, the present embodiment is based on step S.
At 91, the MSB of the register A is determined and MSB =
If "0", the process proceeds to step S92, and MSB =
In the case of "1", the "RENORME" subroutine is terminated and the process returns to the "encoding" subroutine. MSB =
In the case of "0", in this embodiment, in step S92, the registers A and C are left-shifted and updated, and the counter CT is decremented and updated.

【0050】続いて、本実施例は、ステツプS93で、
カウンタCTの値を判定して、CT=0の場合はステツ
プS94へ進み、CT≠0の場合はステツプS91へ戻
る。CT=0であつた場合、本実施例は、ステツプS9
4で「バイト出力」サブルーチンを実行した後、ステツ
プS91へ戻る。すなわち、本実施例は、「RENOR
ME」サブルーチンで、レジスタAのMSBが‘1’に
なるまで、レジスタAとレジスタCを左シフトし、かつ
カウンタCTをデクリメントする。
Then, in this embodiment, in step S93,
The value of the counter CT is judged. If CT = 0, the process proceeds to step S94, and if CT ≠ 0, the process returns to step S91. If CT = 0, the present embodiment uses step S9.
After executing the "byte output" subroutine in step 4, the process returns to step S91. That is, in this embodiment, "RENOR
In the "ME" subroutine, the registers A and C are left-shifted and the counter CT is decremented until the MSB of the register A becomes "1".

【0051】図16は「バイト出力」サブルーチンの一
例を示すフローチヤートである。図16において、本実
施例は、ステツプS401で、例えば、レジスタCの値
を19ビツト右シフトした値と、‘1FF’とを論理積
した結果を、レジスタtempへ格納する。すなわち、
レジスタtempは、例えば、レジスタCのビツト19
からビツト27までの9ビツトを格納する。
FIG. 16 is a flow chart showing an example of the "byte output" subroutine. 16, in the present embodiment, in step S401, for example, the value obtained by logically shifting the value of the register C by 19 bits to the right and "1FF" is stored in the register temp. That is,
The register temp is, for example, the bit 19 of the register C.
9 bits from to 27 are stored.

【0052】続いて、本実施例は、ステツプS402
で、レジスタtempの値を判定して、例えば、tem
p>‘FF’の場合はステツプS403へ進み、tem
p≦‘FF’の場合はステツプS410へ進む。例えば
ビツト27のキヤリーがセツトされていた(temp>
‘FF’)場合、本実施例は、ステツプS403で、レ
ジスタBUFFERの値に1を加えた値を引数として、
「出力」サブルーチンを実行する。
Subsequently, in this embodiment, step S402 is executed.
Then, the value of the register temp is determined and, for example, tem
If p>'FF', the process proceeds to step S403 and tem
If p ≦ 'FF', the process proceeds to step S410. For example, the bit 27 carrier was set (temp>
In the case of “FF”), in this embodiment, in step S403, the value obtained by adding 1 to the value of the register BUFFER is used as an argument.
Executes the "output" subroutine.

【0053】続いて、本実施例は、ステツプS404
で、カウンタSCの値を判定して、SC>0の場合はス
テツプS405へ進み、SC=0の場合はステツプS4
21へ進む。SC>0の場合、本実施例は、ステツプS
405でカウンタSCをデクリメントし、ステツプS4
06で、例えば‘00’を引数として「出力」サブルー
チンを実行した後、ステツプS404へ戻る。すなわ
ち、本実施例は、カウンタSCが0に達するまで、ステ
ツプS404からステツプS406を繰返す。
Next, in this embodiment, step S404 is executed.
Then, the value of the counter SC is determined, and if SC> 0, the process proceeds to step S405, and if SC = 0, the process proceeds to step S4.
Proceed to 21. If SC> 0, the present embodiment uses step S
The counter SC is decremented at 405, and step S4 is executed.
In step 06, the "output" subroutine is executed using, for example, "00" as an argument, and then the process returns to step S404. That is, in the present embodiment, steps S404 to S406 are repeated until the counter SC reaches 0.

【0054】また、例えばビツト27のキヤリーがセツ
トされていなかつた(temp≦‘FF’)場合、本実
施例は、ステツプS410で、再びレジスタtempを
判定して、例えば、temp<‘FF’の場合はステツ
プS412へ進み、また、temp=‘FF’の場合
は、ステツプS411でカウンタSCをインクリメント
した後、ステツプS422へ進む。
In addition, for example, when the carrier of the bit 27 is not set (temp≤'FF '), the present embodiment determines the register temp again in step S410, and determines, for example, temp <' FF '. In the case of step S412, or in the case of temp = 'FF', the counter SC is incremented in step S411, and then the process proceeds to step S422.

【0055】temp<‘FF’の場合、本実施例は、
ステツプS412で、レジスタBUFFERの値を引数
として、「出力」サブルーチンを実行する。続いて、本
実施例は、ステツプS413で、カウンタSCの値を判
定して、SC>0の場合はステツプS414へ進み、S
C=0の場合はステツプS421へ進む。
If temp <'FF', this embodiment
In step S412, the "output" subroutine is executed using the value of the register BUFFER as an argument. Subsequently, in the present embodiment, the value of the counter SC is determined in step S413, and if SC> 0, the process proceeds to step S414 and S
If C = 0, the process proceeds to step S421.

【0056】SC>0の場合、本実施例は、ステツプS
414でカウンタSCをデクリメントし、ステツプS4
15で、例えば‘FF’を引数として「出力」サブルー
チンを実行した後、ステツプS413へ戻る。すなわ
ち、本実施例は、カウンタSCが0に達するまで、ステ
ツプS413からステツプS415を繰返す。続いて、
本実施例は、ステツプS421で、例えば、レジスタt
empの値と‘FF’を論理積した結果を、レジスタB
UFFERへ格納する。すなわち、レジスタBUFFE
Rは、例えば、レジスタtempの下位8ビツトを格納
する。
If SC> 0, the present embodiment uses step S
The counter SC is decremented at 414, and step S4 is executed.
In step 15, the "output" subroutine is executed using, for example, "FF" as an argument, and then the process returns to step S413. That is, in this embodiment, steps S413 to S415 are repeated until the counter SC reaches 0. continue,
In this embodiment, in step S421, for example, the register t
The result of the logical product of the value of emp and'FF 'is stored in register B
Store in UFFER. That is, the register BUFFE
R stores the lower 8 bits of the register temp, for example.

【0057】続いて、本実施例は、ステツプS422
で、例えば、レジスタCの値と‘7FFFF’を論理積
した結果を、レジスタCへ格納することによつて、出力
したレジスタCのビツトをクリアし、かつ、例えばカウ
ンタCT=8とした後、「バイト出力」サブルーチンを
終了して、メインルーチンへ戻る。図17は「出力」サ
ブルーチンの一例を示すフローチヤートである。
Next, in this embodiment, step S422 is executed.
Then, for example, after the bit of the output register C is cleared by storing the result of the logical product of the value of the register C and '7FFFF' in the register C, and after setting the counter CT = 8, for example, The "byte output" subroutine is terminated and the process returns to the main routine. FIG. 17 is a flow chart showing an example of the "output" subroutine.

【0058】図17において、本実施例は、ステツプS
431で、フラグSTFLGを判定して、STFLG=
‘0’の場合は、ステツプS433で引数として与えら
れたデータを出力した後、「出力」サブルーチンを終了
して、「バイト出力」サブルーチンへ戻る。また、ST
FLG≠‘0’の場合、本実施例は、ステツプS432
でSTFLG=‘0’にした後、「出力」サブルーチン
を終了して、「バイト出力」サブルーチンへ戻る。な
お、これは、初回の「出力」処理に入つているレジスタ
Cの初期値を無効にするためで、2回目以降は引数とし
て与えられたデータを出力する。
Referring to FIG. 17, this embodiment is based on step S.
At 431, the flag STFLG is determined and STFLG =
In the case of "0", after outputting the data given as an argument in step S433, the "output" subroutine is terminated and the process returns to the "byte output" subroutine. Also, ST
If FLG ≠ '0', the present embodiment uses step S432.
After setting STFLG to '0', the "output" subroutine is terminated and the process returns to the "byte output" subroutine. This is to invalidate the initial value of the register C included in the first "output" process, and the data given as the argument is output from the second time and thereafter.

【0059】図18は「最終符号出力」サブルーチンの
一例を示すフローチヤートで、「最終符号出力」サブル
ーチンは、レジスタCに残つた符号の最終出力を行うル
ーチンである。図18において、本実施例は、ステツプ
S501で、例えば、演算結果(C+A−1)と‘FF
FF0000’を論理積した結果を、レジスタtemp
へ格納する。すなわち、レジスタtempは、例えば、
演算結果(C+A−1)の上位16ビツトを格納する。
FIG. 18 is a flow chart showing an example of the "final code output" subroutine, and the "final code output" subroutine is a routine for finally outputting the code remaining in the register C. 18, in the present embodiment, in step S501, for example, the calculation result (C + A-1) and'FF
The result of the logical product of FF0000 'and the register temp
Store to. That is, the register temp is, for example,
The upper 16 bits of the operation result (C + A-1) are stored.

【0060】続いて、本実施例は、ステツプS502
で、レジスタtempの値とレジスタCの値を比較し
て、temp<Cの場合は、ステツプS507でレジス
タCを更新(C←temp+‘8000’)し、また、
temp≧Cの場合は、ステツプS504でレジスタC
を更新(C←temp)する。続いて、本実施例は、ス
テツプS505でカウンタCTの値だけレジスタCを左
シフトし、ステツプS506でカウンタCの値を判定し
て、C>‘7FFFFFF’の場合はステツプS507
へ進み、C≦‘7FFFFFF’の場合はステツプS5
11へ進む。
Next, in this embodiment, step S502 is executed.
Then, the value of the register temp is compared with the value of the register C, and if temp <C, the register C is updated (C ← temp + '8000') in step S507, and
If temp ≧ C, register C in step S504
Is updated (C ← temp). Next, in this embodiment, the register C is left-shifted by the value of the counter CT in step S505, the value of the counter C is determined in step S506, and if C>'7FFFFFF', step S507.
If C ≦ '7FFFFFF', go to step S5.
Proceed to 11.

【0061】C>‘7FFFFFF’の場合、本実施例
は、ステツプS507で、レジスタBUFFERの値に
1を加えた値を引数として、図17に示した「出力」サ
ブルーチンを実行する。続いて、本実施例は、ステツプ
S508で、カウンタSCの値を判定して、SC>0の
場合はステツプS509へ進み、SC=0の場合はステ
ツプS515へ進む。
If C>'7FFFFFF', this embodiment executes the "output" subroutine shown in FIG. 17 with the value obtained by adding 1 to the value of the register BUFFER as an argument in step S507. Then, in this embodiment, in step S508, the value of the counter SC is determined, and if SC> 0, the process proceeds to step S509, and if SC = 0, the process proceeds to step S515.

【0062】SC>0の場合、本実施例は、ステツプS
509でカウンタSCをデクリメントし、ステツプS5
10で、例えば‘00’を引数として「出力」サブルー
チンを実行した後、ステツプS508へ戻る。すなわ
ち、本実施例は、カウンタSCが0に達するまで、ステ
ツプS508からステツプS510を繰返す。また、C
≦‘7FFFFFF’の場合、本実施例は、ステツプS
511で、レジスタBUFFERの値を引数として、
「出力」サブルーチンを実行する。
If SC> 0, the present embodiment uses step S
The counter SC is decremented by 509, and step S5 is executed.
In step 10, the "output" subroutine is executed using, for example, "00" as an argument, and then the process returns to step S508. That is, in this embodiment, steps S508 to S510 are repeated until the counter SC reaches 0. Also, C
If ≦ '7FFFFFF', the present embodiment uses step S
At 511, using the value of the register BUFFER as an argument,
Executes the "output" subroutine.

【0063】続いて、本実施例は、ステツプS512
で、カウンタSCの値を判定して、SC>0の場合はス
テツプS513へ進み、SC=0の場合はステツプS5
15へ進む。SC>0の場合、本実施例は、ステツプS
513でカウンタSCをデクリメントし、ステツプS5
14で、例えば‘FF’を引数として「出力」サブルー
チンを実行した後、ステツプS512へ戻る。すなわ
ち、本実施例は、カウンタSCが0に達するまで、ステ
ツプS512からステツプS514を繰返す。
Subsequently, in this embodiment, step S512 is executed.
Then, the value of the counter SC is judged, and if SC> 0, the process proceeds to step S513, and if SC = 0, the process proceeds to step S5.
Proceed to 15. If SC> 0, the present embodiment uses step S
The counter SC is decremented at 513, and step S5 is executed.
At 14, the "output" subroutine is executed using, for example, 'FF' as an argument, and then the process returns to step S512. That is, in the present embodiment, steps S512 to S514 are repeated until the counter SC reaches 0.

【0064】続いて、本実施例は、ステツプS515
で、例えば、レジスタCのビツト19からビツト26ま
での8ビツトを引数として、「出力」サブルーチンを実
行し、ステツプS516で、例えば、レジスタCのビツ
ト11からビツト18までの8ビツトを引数として、
「出力」サブルーチンを実行する。以上説明したよう
に、本実施例によれば、例えばTPフラグ検出,TP判
定,2ライン遅延によつて、符号化対象画素と縮小画素
とを1回参照するだけで、TPフラグとTPの可否とを
決定できるので、階層符号化を小規模なハードウエアで
実現することができる。
Then, in this embodiment, step S515 is executed.
Then, for example, the "output" subroutine is executed with 8 bits from bit 19 to bit 26 of register C as an argument, and in step S516, for example, 8 bits from bit 11 to bit 18 of register C is used as an argument.
Executes the "output" subroutine. As described above, according to the present embodiment, by referring to the encoding target pixel and the reduced pixel only once, for example, by the TP flag detection, the TP determination, and the two-line delay, it is possible to use the TP flag and the TP. Since it can be determined that the hierarchical encoding can be realized by a small-scale hardware.

【0065】なお、本発明は、複数の機器から構成され
るシステムに適用しても、1つの機器からなる装置に適
用してもよい。また、本発明は、システムあるいは装置
にプログラムを供給することによつて達成される場合に
も適用できることはいうまでもない。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Further, it goes without saying that the present invention can be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0066】[0066]

【発明の効果】以上、本発明によれば、第1の画像デー
タの特徴と、より解像度の低い第2の画像データの特徴
とに応じて、第1の画像データを予測符号化する符号化
方法および符号装置を提供できる。
As described above, according to the present invention, the coding for predictively coding the first image data according to the characteristics of the first image data and the characteristics of the second image data having a lower resolution. A method and a coding device can be provided.

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

【図1】一般的な階層符号器の構成例を示すブロツク図
である。
FIG. 1 is a block diagram showing a configuration example of a general hierarchical encoder.

【図2】一般的な階層復号器の構成例を示すブロツク図
である。
FIG. 2 is a block diagram showing a configuration example of a general hierarchical decoder.

【図3】一般的な符号器の構成例を示すブロツク図であ
る。
FIG. 3 is a block diagram showing a configuration example of a general encoder.

【図4】一般的な符号器の符号化処理の一例を示すフロ
ーチヤートである。
FIG. 4 is a flowchart showing an example of encoding processing of a general encoder.

【図5】一般的な符号器における符号化対象画素と縮小
画素の関係の一例を示す図である。
FIG. 5 is a diagram showing an example of a relationship between an encoding target pixel and a reduced pixel in a general encoder.

【図6】一般的な典型的予測におけるフラグFLGをセ
ツトする一例を示すフローチヤートである。
FIG. 6 is a flow chart showing an example of setting a flag FLG in a general typical prediction.

【図7】一般的な典型的予測における画素単位にTP値
を決定する一例を示すフローチヤートである。
FIG. 7 is a flowchart showing an example of determining a TP value for each pixel in a general typical prediction.

【図8】本発明に係る一実施例の典型的予測の一例を示
すフローチヤートである。
FIG. 8 is a flow chart showing an example of a typical prediction according to the embodiment of the present invention.

【図9】本実施例の符号化処理の一例を示すフローチヤ
ートである。
FIG. 9 is a flow chart showing an example of the encoding process of the present embodiment.

【図10】本実施例の予測符号部の構成例を示すブロツ
ク図である。
FIG. 10 is a block diagram showing a configuration example of a predictive coding unit according to the present embodiment.

【図11】本実施例の算術符号器の構成例を示すブロツ
ク図である。
FIG. 11 is a block diagram showing a configuration example of an arithmetic encoder of this embodiment.

【図12】本実施例の符号化のメインルーチンの一例を
示すフローチヤートである。
FIG. 12 is a flow chart showing an example of an encoding main routine of the present embodiment.

【図13】図12の「初期化」サブルーチンの一例を示
すフローチヤートである。
13 is a flow chart showing an example of an "initialization" subroutine of FIG.

【図14】図12の「符号化」サブルーチンの一例を示
すフローチヤートである。
14 is a flow chart showing an example of the "encoding" subroutine of FIG.

【図15】図14の「RENORME」サブルーチンの
一例を示すフローチヤートである。
15 is a flow chart showing an example of a "RENORME" subroutine of FIG.

【図16】図15の「バイト出力」サブルーチンの一例
を示すフローチヤートである。
16 is a flow chart showing an example of a "byte output" subroutine of FIG.

【図17】図16の「出力」サブルーチンの一例を示す
フローチヤートである。
FIG. 17 is a flowchart showing an example of the “output” subroutine of FIG. 16.

【図18】図12の「最終符号出力」サブルーチンの一
例を示すフローチヤートである。
18 is a flow chart showing an example of a "final code output" subroutine of FIG.

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

120 初期化回路 121 予測器 122 LUTa 123 LUTb 124 算術符号器 125 更新器 120 Initialization Circuit 121 Predictor 122 LUTa 123 LUTb 124 Arithmetic Encoder 125 Updater

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 第1の画像データから変換されたより解
像度の低い第2の画像データを生成し、 前記第1の画像データの特徴と前記第2の画像データの
特徴とに応じてnライン毎の第1のフラグを設定し、 前記第1の画像データの特徴と前記第2の画像データの
特徴とに応じて画素単位の第2のフラグを設定し、 前記第1のフラグと前記第2のフラグとに応じて前記第
1の画像データを予測符号化することを特徴とする符号
化方法。
1. A second image data having a lower resolution converted from the first image data is generated, and every n lines depending on the characteristics of the first image data and the characteristics of the second image data. A first flag of the first image data is set, and a second flag of a pixel unit is set according to the characteristics of the first image data and the characteristics of the second image data. An encoding method, wherein the first image data is predictively encoded according to the flag.
【請求項2】 前記第1のフラグは2ライン毎に設定さ
れることを特徴とする請求項1記載の符号化方法。
2. The encoding method according to claim 1, wherein the first flag is set every two lines.
【請求項3】 第1の画像データの特徴を検出する第1
の検出手段と、 前記第1の画像データから変換されたより解像度の低い
第2の画像データの特徴を検出する第2の検出手段と、 前記第1の検出手段によつて検出された特徴と前記第2
の検出手段によつて検出された特徴とに応じて前記第1
の画像データを予測符号化する符号手段とを有すること
を特徴とする符号装置。
3. A first detecting feature of the first image data
Detecting means, second detecting means for detecting the characteristics of the second image data having a lower resolution converted from the first image data, the characteristics detected by the first detecting means, and Second
The first according to the characteristics detected by the detection means of
And a coding means for predictively coding the image data of 1.
JP22176892A 1992-08-20 1992-08-20 Encoding method and encoding device Pending JPH0670176A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP22176892A JPH0670176A (en) 1992-08-20 1992-08-20 Encoding method and encoding device
US08/515,385 US5655032A (en) 1992-08-20 1995-08-15 Coding method and apparatus therefor
US08/736,942 US6026197A (en) 1992-08-20 1996-10-25 Coding method and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22176892A JPH0670176A (en) 1992-08-20 1992-08-20 Encoding method and encoding device

Publications (1)

Publication Number Publication Date
JPH0670176A true JPH0670176A (en) 1994-03-11

Family

ID=16771899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22176892A Pending JPH0670176A (en) 1992-08-20 1992-08-20 Encoding method and encoding device

Country Status (1)

Country Link
JP (1) JPH0670176A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597310A (en) * 2009-11-02 2012-07-18 西格玛-奥吉奇有限责任公司 Evaporator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597310A (en) * 2009-11-02 2012-07-18 西格玛-奥吉奇有限责任公司 Evaporator

Similar Documents

Publication Publication Date Title
JPH02177766A (en) Hierarchical encoding system for binary image
US6026197A (en) Coding method and apparatus therefor
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JP3457269B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JP3466058B2 (en) Image decoding apparatus and image decoding method
US6188795B1 (en) Data compression
JPH0670176A (en) Encoding method and encoding device
JP3190056B2 (en) Image transmission device, image encoding device, image decoding device, and methods thereof
JP3406550B2 (en) Arithmetic encoding device and arithmetic decoding device
JP3262869B2 (en) Image coding method and apparatus
US5453789A (en) Moving-image signal encoding apparatus
US6091855A (en) method and apparatus for encoding signal method and apparatus for decoding signal and recording medium
JPH1127671A (en) Remote scanning line processing coding method
JP3146109B2 (en) Binary image coding device
JP2815510B2 (en) Motion vector calculation circuit for color difference signal
JPH046954A (en) Picture prediction coding system
JP2832072B2 (en) Image coding method and apparatus
JP3302253B2 (en) Information encoding / decoding method and apparatus
JP2003134346A (en) Coding/decoding method an apparatus thereof
JP2877451B2 (en) Image coding method
JPH04178074A (en) Coding decoding system for picture signal and its device
JP2697897B2 (en) Color image encoding method and apparatus
JP2000092333A (en) Image coding and decoding device
JPS5930366A (en) Device for encoding picture
JP3108243B2 (en) Encoding and decoding device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20010730