JPH11272843A - Device and method for encoding color image, and device and method for decoding color image - Google Patents

Device and method for encoding color image, and device and method for decoding color image

Info

Publication number
JPH11272843A
JPH11272843A JP10071026A JP7102698A JPH11272843A JP H11272843 A JPH11272843 A JP H11272843A JP 10071026 A JP10071026 A JP 10071026A JP 7102698 A JP7102698 A JP 7102698A JP H11272843 A JPH11272843 A JP H11272843A
Authority
JP
Japan
Prior art keywords
component
encoding
decoding
color
data
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.)
Withdrawn
Application number
JP10071026A
Other languages
Japanese (ja)
Inventor
Shoji Hoshina
彰治 保科
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP10071026A priority Critical patent/JPH11272843A/en
Publication of JPH11272843A publication Critical patent/JPH11272843A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To shorten time for encoding and decoding, and to perform motion compensation sufficiently in consideration of a shadow part of an image by encoding and decoding a color image without using DCT. SOLUTION: An encoding device 1 for a moving picture consisting of multicolor images is provided with a thinning-out means 2c which thins out at least UV components among YUV components where RGB components are converted, a quantizing means 2d which quantizes the Y component which is not thinned out or slightly thinned out, and an encoding means which performs encoding by compressing the UV components that are largely thinned out and the quantized Y component. When motion compensation for the moving picture is performed, motion compensation is performed for the UV components and not performed for the Y component.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、カラー画像の符号
化装置およびその方法ならびにカラー画像の復号化装置
およびその方法に関する。そして、さらに詳細に述べれ
ば、マルチカラー画像や自然画像を符号化および復号化
する際のYUV成分の処理の仕方の改良に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to an apparatus and method for encoding a color image and an apparatus and method for decoding a color image. More specifically, the present invention relates to an improvement in a method of processing a YUV component when encoding and decoding a multi-color image or a natural image.

【0002】[0002]

【従来の技術】従来からパソコンやゲーム機器等では、
マルチカラー画像と呼ばれる画像が使用されている。こ
のマルチカラー画像とは、代表色画像とか限定色画像等
とも呼ばれているもので、図37に示すように、特定の
色、すなわち特定のR(赤)、G(緑)、B(青)の値
を持つ色に対してインデックスを付与し、そのインデッ
クスのデータを利用して、16色や256色等の限定さ
れた代表色で表現するようにした画像のことである。
2. Description of the Related Art Conventionally, in personal computers and game machines,
An image called a multi-color image is used. The multi-color image is also called a representative color image or a limited color image, and as shown in FIG. 37, specific colors, that is, specific R (red), G (green), B (blue) ) Is an image in which an index is assigned to a color having a value of ()) and expressed by a limited representative color such as 16 colors or 256 colors using data of the index.

【0003】このようなマルチカラー画像のデータは、
仮にR、G、Bの各色が8ビット(256種)で表され
るとしたら、合計24ビット必要になるのであるが、イ
ンデックスそのものも例えば8ビットで表示するように
しているので、相当な圧縮率となっている。しかし、圧
縮はされているが、それでも情報量が多いため、何の工
夫もせず、そのままの形で処理すると、メモリ容量が大
きくなり、また通信速度も遅くなり実用的でない。した
がって、マルチカラー画像も他の画像データと同様にそ
の圧縮技術は極めて重要なものとなる。なお、マルチカ
ラー画像は、その色の数が限定されていることから、一
般的に、ロスレスでの符号化および復号化、すなわち可
逆的な圧縮技術が必要とされている。
[0003] Such multi-color image data is:
If each color of R, G, and B is represented by 8 bits (256 types), a total of 24 bits are required. However, since the index itself is displayed by, for example, 8 bits, considerable compression is required. Rate. However, although the data is compressed, the amount of information is still large, so if the processing is performed without any modification, the memory capacity is increased and the communication speed is reduced, which is not practical. Therefore, the compression technique of a multi-color image is extremely important, like other image data. Since the number of colors of a multicolor image is limited, generally, lossless encoding and decoding, that is, a reversible compression technique is required.

【0004】一方、近年、データ圧縮の手法の一つとし
て、エントロピー符号器および復号器を用いた技術が注
目されている。このエントロピー符号化および復号化技
術の一つとして、例えば、算術符号化および復号化の技
術を用いたものがある。この技術の概要は、例えば、特
開昭62−185413号公報、特開昭63−7432
4号公報、特開昭63−76525号公報等に記載され
ている。
On the other hand, in recent years, a technique using an entropy encoder and a decoder has attracted attention as one of data compression techniques. As one of the entropy coding and decoding techniques, for example, there is one using an arithmetic coding and decoding technique. The outline of this technology is described in, for example, JP-A-62-185413 and JP-A-63-7432.
No. 4, JP-A-63-76525 and the like.

【0005】図35に、このような技術を用いた従来の
マルチカラー画像の符号化システム50および復号化シ
ステム60を示す。この符号化システム50は、ライン
バッファ51と、エントロピー符号器52とを含むもの
である。入力されるインデックスのデータ、すなわちカ
ラー画素データ100Aは、ラインバッファ51および
エントロピー符号器52へ入力される。このカラー画素
データ100Aは、図36に示すように、いずれもラス
タースキャンされ水平走査順に順次画素データとして入
力される。なお、このインデックスのデータ、すなわち
カラー画素データ100Aを作成する方法としては、入
力する色の順番にインデックスを付与する方法が一般的
であり、図37に示すように、インデックスの番号が近
いもの、例えば「1」と「2」でもその色が大きく異な
ったり、インデックスの番号が遠いもの、例えば「10
0」と「200」でもその色は近似している現象が生じ
ている。このような現象を避けるため、特開平5−32
8142に示されるように、色の近いものに連続番号を
付与するようにしたものも現れている。
FIG. 35 shows a conventional multi-color image encoding system 50 and decoding system 60 using such a technique. The encoding system 50 includes a line buffer 51 and an entropy encoder 52. The input index data, that is, the color pixel data 100A, is input to the line buffer 51 and the entropy encoder 52. As shown in FIG. 36, all of the color pixel data 100A are raster-scanned and sequentially input as pixel data in the horizontal scanning order. As a method of creating the data of the index, that is, the color pixel data 100A, a method of assigning an index in the order of the input colors is general, and as shown in FIG. For example, the colors of “1” and “2” are significantly different, and those with distant index numbers, for example, “10”
A phenomenon occurs in which the colors are similar even for “0” and “200”. In order to avoid such a phenomenon, Japanese Patent Application Laid-Open No. 5-32
As indicated by reference numeral 8142, there is a case in which serial numbers are assigned to objects having similar colors.

【0006】符号化システム50中のラインバッファ5
1は、参照画素生成手段として、既に入力されたカラー
画素データ100Aから、符号化対象画素Xに対する参
照画素データA,B,C,Dを作成する。すなわち、ラ
インバッファ51は、画像をスキャンするときにnライ
ン(1〜5ライン程度が多い)分の履歴を記憶してお
く。そして、符号化対象画素Xのカラー画素データ10
0Aが入力されるごとに、この直前の画素Aと、周辺の
画素B,C,Dとからなる一連の画素データを参照画素
データ110としてエントロピー符号器52へ向けて出
力する。
The line buffer 5 in the encoding system 50
Reference numeral 1 denotes reference pixel generation means that generates reference pixel data A, B, C, and D for an encoding target pixel X from the already input color pixel data 100A. That is, the line buffer 51 stores histories for n lines (often about 1 to 5 lines) when scanning an image. Then, the color pixel data 10 of the encoding target pixel X is obtained.
Each time 0A is input, a series of pixel data including the immediately preceding pixel A and the surrounding pixels B, C, and D is output to the entropy encoder 52 as reference pixel data 110.

【0007】このエントロピー符号器52は、例えば、
算術符号化またはハフマン符号化などの手法を用いて形
成される。そして、参照画素データ110を状態信号と
して用い、対象カラー画素データ100Aを符号化デー
タ200に変換出力する。
The entropy encoder 52 is, for example,
It is formed using a technique such as arithmetic coding or Huffman coding. Then, using the reference pixel data 110 as a state signal, the target color pixel data 100A is converted into encoded data 200 and output.

【0008】一方、復号化システム60は、ラインバッ
ファ61とエントロピー復号器62を含んで構成され
る。ここにおいて、ラインバッファ61とエントロピー
復号器62は、入力される符号化データ200を符号化
システム50のラインバッファ51、エントロピー符号
器52とは全く逆の手順で復号化出力するように形成さ
れている。
On the other hand, the decoding system 60 includes a line buffer 61 and an entropy decoder 62. Here, the line buffer 61 and the entropy decoder 62 are formed so as to decode and output the input coded data 200 in a procedure completely opposite to that of the line buffer 51 and the entropy coder 52 of the coding system 50. I have.

【0009】このようにして、符号化システム50と、
復号化システム60とは、互いに全く逆のアルゴリズム
を用いて、カラー画素データ100Aを符号化データ2
00に符号化し、さらにこの符号化データ200をカラ
ー画素データ100Bに復号化して出力することができ
る。したがって、このシステムは、各種用途に幅広く用
いることができる。
[0009] Thus, the encoding system 50,
The decoding system 60 converts the color pixel data 100A into the coded data 2 using completely opposite algorithms.
00, and the encoded data 200 can be decoded into color pixel data 100B and output. Therefore, this system can be widely used for various applications.

【0010】一方、自然画像の場合、そのカラー画像
は、直接RGB成分で表せられる。しかし、JPEGや
MPEGと呼ばれる規格では、データ圧縮のし易さから
通常は、一旦、YUV成分に変換される。しかも、人間
の目は、輝度成分(=Y成分)に敏感で、色成分(=U
V成分)には鈍感なため、UV成分を間引くことが行わ
れている。Y成分と間引かれたUV成分は、それぞれブ
ロック化され、各ブロック毎に離散コサイン変換(以下
DCTという)される。その後、DCT係数が量子化さ
れ、その値がハフマン符号等により符号化される。な
お、マルチカラー画像の場合も、そのパレットには各R
GBの値が入れられており、RGBからなる自然画像に
した後、同様な処理を行うことが可能である。
On the other hand, in the case of a natural image, the color image is directly represented by RGB components. However, in a standard called JPEG or MPEG, the data is usually once converted into a YUV component for ease of data compression. Moreover, the human eye is sensitive to the luminance component (= Y component) and the color component (= U
V component) is insensitive, so that the UV component is thinned out. The Y component and the decimated UV component are each divided into blocks, and each block is subjected to discrete cosine transform (hereinafter referred to as DCT). Thereafter, the DCT coefficients are quantized, and the values are encoded by Huffman coding or the like. Note that even in the case of a multi-color image, each R
Since the values of GB are entered, it is possible to perform the same processing after forming a natural image composed of RGB.

【0011】また、動画像の符号化や復号化において
は、動き補償と呼ばれるものが知られている。この動き
補償は、動画が静止画の連続であり、その1枚1枚を見
ると、前のフレームや後のフレームと相関があることに
着目したものである。具体的には、着目フレームを16
×16ピクセルの複数のブロックに分割し、当該着目フ
レーム中の所定ブロックが参照フレームの1ピクセル左
にずれた同様のブロックと似ている場合、着目フレーム
中のそのブロックの画像データを符号化または復号化せ
ず、参照フレーム中の1ピクセル左にずれたブロックに
似ているというデータを符号化または復号化するもので
ある。
In coding and decoding of a moving image, what is called motion compensation is known. This motion compensation focuses on the fact that a moving image is a sequence of still images, and that when looking at each of them, there is a correlation with a previous frame or a subsequent frame. Specifically, the target frame is set to 16
If the predetermined block in the frame of interest is similar to a similar block shifted one pixel to the left of the reference frame, the image data of the block in the frame of interest is encoded or It encodes or decodes data that resembles a block shifted one pixel to the left in the reference frame without decoding.

【0012】すなわち、この動き補償では、着目フレー
ムの全データを符号化したり復号化するのではなく、変
化のあった部分だけのデータ(動領域)を送ると共に、
参照フレーム中のブロックと同一となるブロックについ
ては、さらに動きベクトルをデータ化することによって
差分情報のさらなる減少が可能となっている。
That is, in this motion compensation, instead of encoding or decoding all the data of the frame of interest, data (moving area) of only a changed portion is sent,
For the same block as the block in the reference frame, the difference information can be further reduced by further converting the motion vector into data.

【0013】[0013]

【発明が解決しようとする課題】マルチカラー画像は、
その色の数が限定されていることから、一般的に、ロス
レスでの符号化および復号化が必要とされている。しか
し、非可逆(=ロッシー)となってしまうが、マルチカ
ラー画像を自然画で復号したい場合がある。また、自然
画をロッシーで復号したい場合もある。このような要求
の場合、従来のものでは、DCTを使用するため、その
実行、すなわち符号化と復号化に多くの時間を要するも
のとなっている。
SUMMARY OF THE INVENTION A multi-color image is
Due to the limited number of colors, lossless encoding and decoding are generally required. However, there is a case where it is desired to decode a multi-color image with a natural image, although it is irreversible (= lossy). In some cases, it is desired to decode a natural image by lossy. In the case of such a request, the conventional one requires a lot of time to execute, that is, perform encoding and decoding, because the DCT is used.

【0014】また、最近の立体画像(3D画像)に動き
補償を適用する場合、その影にあたる部分を効率的に符
号化し、復号化することが全体のデータ圧縮や効率的な
復号にとって重要であることがわかってきた。しかし、
影に相当する部分の効率的な符号化や復号化は、まだ十
分解決されていない。
When motion compensation is applied to a recent stereoscopic image (3D image), it is important to efficiently encode and decode a portion corresponding to the shadow for the overall data compression and efficient decoding. I understand that. But,
Efficient encoding and decoding of a portion corresponding to a shadow has not yet been sufficiently solved.

【0015】本発明は、以上のような問題に対処してな
されたものであり、DCTを使用せずカラー画像を符号
化および復号化することにより、符号化や復号化の時間
を短縮できるようにしたカラー画像の符号化装置および
その方法ならびにカラー画像の復号化装置およびその方
法を提供することを目的とする。また、他の本発明は、
カラー画像からなる動画像の符号化や復号化を行う際、
画像の影の部分を十分考慮した動き補償とすることがで
きるカラー画像の符号化装置およびその方法ならびにカ
ラー画像の復号化装置およびその方法を提供することを
目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-described problems, and it is possible to reduce the time required for encoding and decoding by encoding and decoding a color image without using DCT. It is an object of the present invention to provide a color image encoding apparatus and method, and a color image decoding apparatus and method. In addition, other inventions,
When encoding or decoding a moving image composed of color images,
It is an object of the present invention to provide a color image encoding device and a color image decoding device and a color image decoding device and a color image decoding method capable of performing motion compensation in which a shadow portion of the image is sufficiently considered.

【0016】[0016]

【課題を解決するための手段】かかる目的を達成するた
め、請求項1記載の発明では、カラー画像の符号化装置
において、RGB成分から変換されたYUV成分の少な
くともUV成分を間引く間引き手段と、間引かれないか
または小さく間引かれたY成分を量子化する量子化手段
と、大きく間引かれたUV成分および上記量子化された
Y成分を圧縮して符号化する符号化手段とを設けてい
る。
In order to achieve the above object, according to the present invention, in a color image encoding apparatus, a thinning means for thinning at least a UV component of a YUV component converted from an RGB component, Quantizing means for quantizing a Y component which is not thinned out or thinned out, and coding means for compressing and coding a UV component which has been thinned out and the quantized Y component are provided. ing.

【0017】このため、DCTを使用せずカラー画像を
符号化することになり、符号化の時間を短縮できること
となる。また、Y成分を量子化してその値を小さくし、
UV成分を大きく間引いているので、同様にデータ量が
少なくなり、符号化を効率的に行えるものとなる。
For this reason, the color image is encoded without using the DCT, and the encoding time can be reduced. Also, the Y component is quantized to reduce its value,
Since the UV component is greatly thinned out, the data amount is similarly reduced, and encoding can be performed efficiently.

【0018】また、請求項2記載の発明では、カラー画
素データからなる静止画のフレームを連続させて動画像
を形成する際、符号化対象の着目フレームをそれぞれN
×Nピクセル(Nは4以上の整数)からなる複数のブロ
ックに分割し、その着目フレーム中のブロックが参照フ
レーム中のブロックと同一であるとき、そのブロックの
動きベクトルを差分情報としてデータ化し、差分情報の
データ量を減少させる動き補償を行うカラー画像の符号
化装置において、RGB成分から変換されたYUV成分
の少なくともUV成分を間引く間引き手段と、間引かれ
ないかまたは小さく間引かれたY成分を量子化する量子
化手段と、大きく間引かれたUV成分および上記量子化
されたY成分を圧縮して符号化する符号化手段とを設
け、UV成分について動き補償を行い、Y成分について
動き補償を行わないようにしている。
According to the second aspect of the present invention, when a moving image is formed by continuously forming a still image frame composed of color pixel data, each of the frames of interest to be encoded is set to N.
When the block in the frame of interest is the same as the block in the reference frame, the motion vector of the block is converted into data as difference information, In a color image encoding apparatus that performs motion compensation to reduce the data amount of difference information, a thinning-out unit that thins out at least a UV component of a YUV component converted from an RGB component, and Y that is not thinned out or thinly thinned out. Quantizing means for quantizing the component, and encoding means for compressing and encoding the greatly thinned UV component and the quantized Y component are provided, and motion compensation is performed for the UV component. The motion compensation is not performed.

【0019】一般的に、3D画像の影の部分の輝度(Y
成分)は、光線の当たり具合で大きく変化する。このた
め、動き補償にはなじまない。一方、色成分であるUV
成分は、大きく変化しない。よって、UV成分のみに動
き補償を使用すると、効率的なデータ圧縮が可能とな
る。
Generally, the luminance (Y
Component) greatly changes depending on how light hits. Therefore, it is not suitable for motion compensation. On the other hand, UV which is a color component
The components do not change significantly. Therefore, if motion compensation is used only for the UV component, efficient data compression becomes possible.

【0020】さらに、請求項3記載の発明では、請求項
1または2記載のカラー画像の符号化装置において、カ
ラー画像をマルチカラー画像とし、そのマルチカラー画
像をRGB成分からなる自然画像に変換する自然画変換
手段と、変換されたRGB成分をYUV成分に変換する
YUV変換手段と、大きく間引かれたUV成分にインデ
ックスを付与すると共にパレット化するパレット化手段
とを設け、符号化手段は、量子化されたY成分およびパ
レット化されたインデックスが付与されたUV成分を符
号化するようにしている。
According to the third aspect of the present invention, in the color image encoding apparatus according to the first or second aspect, the color image is converted into a multi-color image, and the multi-color image is converted into a natural image composed of RGB components. Natural image conversion means, YUV conversion means for converting the converted RGB components into YUV components, and palletizing means for assigning an index to the largely thinned out UV components and palletizing, the encoding means, The quantized Y component and the palletized indexed UV component are encoded.

【0021】このため、マルチカラー画像も自然画と同
様に非可逆で符号化できることとなり、データの圧縮率
を向上させることができる。また、UV成分は、UVを
一組としてインデックスが付与され、パレット化される
ため、圧縮効率は一層高くなる。
Therefore, a multi-color image can be irreversibly encoded like a natural image, and the data compression ratio can be improved. In addition, since the UV component is indexed as a set of UVs and is palletized, the compression efficiency is further improved.

【0022】加えて、請求項4記載の発明では、請求項
1、2または3記載のカラー画像の符号化装置におい
て、符号化手段は、色の出現頻度によって、そのY成分
およびUV成分を並び替える色順位変換手段と、この色
順位変換手段によって並び替えられた各成分の値をラン
レングスモデル化するランレングスモデル化手段とを有
している。このように、色順位変換手段と、ランレング
スモデル化手段とを有し、符号化しているので、データ
圧縮効率がきわめて高くなる。
In addition, according to the fourth aspect of the present invention, in the color image encoding apparatus according to the first, second or third aspect, the encoding means arranges the Y component and the UV component according to the frequency of appearance of the color. It has a color order conversion means for changing the color order, and a run length modeling means for making a run length model of the values of the components rearranged by the color order conversion means. As described above, since the image processing apparatus includes the color order conversion unit and the run-length modeling unit and performs encoding, the data compression efficiency is extremely high.

【0023】また、請求項5記載の発明では、カラー画
像の符号化方法において、RGB成分から変換されたY
UV成分の少なくともUV成分を間引く間引き工程と、
間引かれないかまたは小さく間引かれたY成分を量子化
する量子化工程と、大きく間引かれたUV成分および上
記量子化されたY成分を圧縮して符号化する符号化工程
とを設けている。
According to a fifth aspect of the present invention, in the color image encoding method, the Y component converted from the RGB component is used.
A thinning step of thinning at least the UV component of the UV component,
A quantization step of quantizing a Y component that is not thinned out or thinned out, and an encoding step of compressing and coding the UV component that has been largely thinned out and the quantized Y component. ing.

【0024】このため、DCTを使用せずカラー画像を
符号化することになり、符号化の時間を短縮できること
となる。また、Y成分を量子化してその値を小さくし、
UV成分を大きく間引いているので、同様にデータ量が
少なくなり、符号化を効率的に行えるものとなる。
For this reason, the color image is encoded without using the DCT, and the encoding time can be shortened. Also, the Y component is quantized to reduce its value,
Since the UV component is greatly thinned out, the data amount is similarly reduced, and encoding can be performed efficiently.

【0025】また、請求項6記載の発明では、カラー画
素データからなる静止画のフレームを連続させて動画像
を形成する際、符号化対象の着目フレームをそれぞれN
×Nピクセル(Nは4以上の整数)からなる複数のブロ
ックに分割し、その着目フレーム中のブロックが参照フ
レーム中のブロックと同一であるとき、そのブロックの
動きベクトルを差分情報としてデータ化し、差分情報の
データ量を減少させる動き補償を行うカラー画像の符号
化方法において、RGB成分から変換されたYUV成分
の少なくともUV成分を間引く間引き工程と、間引かれ
ないかまたは小さく間引かれたY成分を量子化する量子
化工程と、大きく間引かれたUV成分および上記量子化
されたY成分を圧縮して符号化する符号化工程とを設
け、UV成分について動き補償を行い、Y成分について
動き補償を行わないようにしている。
According to the sixth aspect of the present invention, when a still image frame composed of color pixel data is formed continuously to form a moving image, each of the frames of interest to be encoded is set to N.
When the block in the frame of interest is the same as the block in the reference frame, the motion vector of the block is converted into data as difference information, In a color image encoding method for performing motion compensation for reducing the data amount of difference information, a thinning step of thinning at least a UV component of a YUV component converted from an RGB component, and a Y thinning that is not thinned or thinned out. A quantization step of quantizing the component, and an encoding step of compressing and encoding the significantly thinned UV component and the quantized Y component, performing motion compensation on the UV component, The motion compensation is not performed.

【0026】一般的に、3D画像の影の部分の輝度(Y
成分)は、光線の当たり具合で大きく変化する。このた
め、動き補償にはなじまない。一方、色成分であるUV
成分は、大きく変化しない。よって、UV成分のみに動
き補償を使用すると、効率的なデータ圧縮が可能とな
る。
In general, the brightness (Y
Component) greatly changes depending on how light hits. Therefore, it is not suitable for motion compensation. On the other hand, UV which is a color component
The components do not change significantly. Therefore, if motion compensation is used only for the UV component, efficient data compression becomes possible.

【0027】さらに、請求項7記載の発明では、請求項
5または6記載のカラー画像の符号化方法において、カ
ラー画像をマルチカラー画像とし、そのマルチカラー画
像をRGB成分からなる自然画像に変換する自然画変換
工程と、変換されたRGB成分をYUV成分に変換する
YUV変換工程と、大きく間引かれたUV成分にインデ
ックスを付与すると共にパレット化するパレット化工程
とを設け、符号化工程は、量子化されたY成分およびパ
レット化されたインデックスが付与されたUV成分を符
号化するようにしている。
According to a seventh aspect of the present invention, in the color image encoding method according to the fifth or sixth aspect, the color image is a multi-color image, and the multi-color image is converted into a natural image composed of RGB components. A natural image conversion step, a YUV conversion step of converting the converted RGB components into a YUV component, and a palletization step of assigning an index to the greatly thinned out UV components and palletizing the components are provided. The quantized Y component and the palletized indexed UV component are encoded.

【0028】このため、マルチカラー画像も自然画と同
様に非可逆で符号化できることとなり、データの圧縮率
を向上させることができる。また、UV成分は、UVを
一組としてインデックスが付与され、パレット化される
ため、圧縮効率は一層高くなる。
Therefore, a multicolor image can be irreversibly encoded like a natural image, and the data compression ratio can be improved. In addition, since the UV component is indexed as a set of UVs and is palletized, the compression efficiency is further improved.

【0029】加えて、請求項8記載の発明では、請求項
1、2または3記載のカラー画像の符号化方法におい
て、符号化工程は、色の出現頻度によって、そのY成分
およびUV成分を並び替える色順位変換工程と、この色
順位変換工程によって並び替えられた各成分の値をラン
レングスモデル化するランレングスモデル化工程とを有
している。このように、色順位変換工程と、ランレング
スモデル化工程とを有し、符号化しているので、データ
圧縮効率がきわめて高くなる。
In addition, in the invention according to claim 8, in the color image encoding method according to claim 1, the encoding step arranges the Y component and the UV component according to the frequency of appearance of the color. It has a color order conversion step for changing the color order, and a run length modeling step for forming a run length model of the values of the components rearranged in the color order conversion step. As described above, since the encoding process includes the color order conversion process and the run length modeling process, the data compression efficiency is extremely high.

【0030】また、請求項9記載の発明は、YUV成分
を有するカラー画像の復号化装置において、入力される
対象符号化データを復号する復号化手段と、復号された
データ中の量子化されたY成分をスムージング処理する
スムージング手段と、Y成分に比べ大きく間引かれたU
V成分を中間色補間によって処理する中間色処理手段と
を設けている。
According to a ninth aspect of the present invention, in a color image decoding apparatus having a YUV component, a decoding means for decoding input target encoded data, and a quantized quantized data in the decoded data are provided. A smoothing means for smoothing the Y component, and a U which is greatly thinned compared to the Y component.
And an intermediate color processing means for processing the V component by intermediate color interpolation.

【0031】このため、DCTを使用せずカラー画像を
復号化できることになり、復号化の時間を短縮できるこ
ととなる。また、Y成分を量子化してその値を小さく
し、UV成分を大きく間引いているので、同様にデータ
量が少なくなり、復号化を効率的に行えるものとなる。
Therefore, a color image can be decoded without using the DCT, and the decoding time can be reduced. In addition, since the Y component is quantized to reduce its value and the UV component is greatly thinned out, the amount of data is similarly reduced, and decoding can be performed efficiently.

【0032】また、請求項10記載の発明は、入力され
る対象符号化データをYUV成分からなるカラー画素デ
ータに復号する復号化手段と、該カラー画素データから
なる静止画を連続させて動画像を形成する動画像形成手
段とを備え、動画像形成手段は、復号化対象の着目フレ
ームをそれぞれN×Nピクセル(Nは4以上の整数)か
らなる複数のブロックに分割し、その着目フレーム中の
ブロックに関する復号化データ中にそのブロックの相対
変位を示す動きベクトルが存在するとき、参照する参照
フレーム中の同一のブロックを利用してそのブロックを
復号する動き補償を行うカラー画像の復号化装置におい
て、復号化手段によって復号されたデータ中、UV成分
については動き補償を行い、Y成分については上記動き
補償を行わないようにしている。
Further, according to the present invention, there is provided a decoding means for decoding input target encoded data into color pixel data comprising YUV components, and a moving picture comprising a series of still images comprising said color pixel data. And a moving image forming unit that divides a target frame to be decoded into a plurality of blocks each including N × N pixels (N is an integer of 4 or more). When a motion vector indicating the relative displacement of the block exists in the decoded data related to the block, a color image decoding apparatus that performs motion compensation for decoding the block using the same block in the reference frame to be referred to In the data decoded by the decoding means, the motion compensation is performed for the UV component, and the motion compensation is not performed for the Y component. It has to.

【0033】一般的に、3D画像の影の部分の輝度(Y
成分)は、光線の当たり具合で大きく変化する。このた
め、動き補償にはなじまない。一方、色成分であるUV
成分は、大きく変化しない。よって、UV成分のみに動
き補償を使用すると、動画像の効率的な復号が可能とな
る。
Generally, the brightness (Y
Component) greatly changes depending on how light hits. Therefore, it is not suitable for motion compensation. On the other hand, UV which is a color component
The components do not change significantly. Therefore, if motion compensation is used only for the UV component, efficient decoding of a moving image becomes possible.

【0034】さらに、請求項11記載の発明では、復号
化手段に、色の出現頻度によってそのY成分およびUV
成分を並び替えて復号する色順位変換手段と、この色順
位変換手段によって並び替えられた各成分の値を示すデ
ータをランレングス復号化するランレングス復号化手段
とを設けている。このように、色順位変換手段と、ラン
レングスモデル化手段とを有し、復号化しているので、
データの復号効率がきわめて高くなる。
Further, according to the eleventh aspect of the present invention, the decoding means outputs the Y component and the UV according to the frequency of appearance of the color.
Color order conversion means for rearranging and decoding the components, and run-length decoding means for run-length decoding data indicating the values of the components rearranged by the color order conversion means are provided. As described above, since the image processing apparatus has the color rank conversion unit and the run length modeling unit and performs decoding,
The data decoding efficiency becomes extremely high.

【0035】また、請求項12記載の発明は、YUV成
分を有するカラー画像の復号化方法において、入力され
る対象符号化データを復号する復号化工程と、復号され
たデータ中の量子化されたY成分をスムージング処理す
るスムージング工程と、Y成分に比べ大きく間引かれた
UV成分を中間色補間によって処理する中間色処理工程
とを設けている。
According to a twelfth aspect of the present invention, in the method for decoding a color image having a YUV component, a decoding step of decoding input target encoded data, and a step of decoding quantized data in the decoded data. A smoothing step for smoothing the Y component and an intermediate color processing step for processing the UV component, which is thinned out more than the Y component, by intermediate color interpolation are provided.

【0036】このため、DCTを使用せずカラー画像を
復号化できることになり、復号化の時間を短縮できるこ
ととなる。また、Y成分を量子化してその値を小さく
し、UV成分を大きく間引いているので、同様にデータ
量が少なくなり、復号化を効率的に行えるものとなる。
Therefore, a color image can be decoded without using the DCT, and the decoding time can be reduced. In addition, since the Y component is quantized to reduce its value and the UV component is greatly thinned out, the amount of data is similarly reduced, and decoding can be performed efficiently.

【0037】また、請求項13記載の発明は、入力され
る対象符号化データをYUV成分からなるカラー画素デ
ータに復号する復号化工程と、該カラー画素データから
なる静止画を連続させて動画像を形成する動画像形成工
程とを備え、動画像形成工程は、復号化対象の着目フレ
ームをそれぞれN×Nピクセル(Nは4以上の整数)か
らなる複数のブロックに分割し、その着目フレーム中の
ブロックに関する復号化データ中にそのブロックの相対
変位を示す動きベクトルが存在するとき、参照する参照
フレーム中の同一のブロックを利用してそのブロックを
復号する動き補償を行うカラー画像の復号化方法におい
て、復号化工程によって復号されたデータ中、UV成分
については動き補償を行い、Y成分については上記動き
補償を行わないようにしている。
According to a thirteenth aspect of the present invention, there is provided a decoding step of decoding input target encoded data into color pixel data composed of YUV components, and a moving picture by continuously forming a still image composed of the color pixel data. And a moving image forming step of dividing the target frame to be decoded into a plurality of blocks each including N × N pixels (N is an integer of 4 or more). A color image decoding method for performing motion compensation for decoding a block using a same block in a reference frame when a motion vector indicating a relative displacement of the block exists in decoded data related to the block In the data decoded in the decoding step, motion compensation is performed for the UV component, and the motion compensation is not performed for the Y component. It has to.

【0038】一般的に、3D画像の影の部分の輝度(Y
成分)は、光線の当たり具合で大きく変化する。このた
め、動き補償にはなじまない。一方、色成分であるUV
成分は、大きく変化しない。よって、UV成分のみに動
き補償を使用すると、動画像の効率的な復号が可能とな
る。
In general, the brightness (Y
Component) greatly changes depending on how light hits. Therefore, it is not suitable for motion compensation. On the other hand, UV which is a color component
The components do not change significantly. Therefore, if motion compensation is used only for the UV component, efficient decoding of a moving image becomes possible.

【0039】さらに、請求項14記載の発明では、復号
化工程に、色の出現頻度によってそのY成分およびUV
成分を並び替えて復号する色順位変換工程と、この色順
位変換手段によって並び替えられた各成分の値を示すデ
ータをランレングス復号化するランレングス復号化工程
とを設けている。このように、色順位変換工程と、ラン
レングスモデル化工程とを有し、復号化しているので、
データの復号効率がきわめて高くなる。
Further, in the invention according to claim 14, in the decoding step, the Y component and the UV of the
A color rank conversion step for rearranging and decoding the components and a run length decoding step for run length decoding data indicating the values of the components rearranged by the color rank conversion means are provided. As described above, since the image has the color order conversion step and the run-length modeling step and is decoded,
The data decoding efficiency becomes extremely high.

【0040】[0040]

【発明の実施の形態】本発明の実施の形態を図1から図
34に基づき説明する。なお、従来技術中のデータと対
応する各データには、同一符号を付して説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to FIGS. In addition, each data corresponding to the data in the prior art will be described with the same reference numerals.

【0041】図1に、本発明に係るマルチカラー画像か
らなる動画像の符号化システム1の好適な実施の形態を
示す。また、図3に、図1の符号化システム1に対応す
るマルチカラー画像からなる動画像の復号化システム3
の好適な実施の形態を示す。
FIG. 1 shows a preferred embodiment of a moving picture coding system 1 comprising multi-color pictures according to the present invention. FIG. 3 shows a moving image decoding system 3 composed of multi-color images corresponding to the encoding system 1 of FIG.
1 shows a preferred embodiment of the present invention.

【0042】この符号化システム1は、前処理手段2
と、静止画としてのフレームをメモリする2つのフレー
ムメモリ1a,1bと、動き補償を行うための動きベク
トルVを生成する排他的論理生成手段/動き補償手段1
cと、この排他的論理生成手段/動き補償手段1cで生
成される動きベクトルVを符号化するエントロピー符号
器4と、各スイッチ5a,5bを制御する制御回路5
と、インデックス変換部7と、周辺画素生成手段および
参照画素生成手段となるラインバッファ10と、縮退手
段となるマルコフモデル生成部11と、エントロピー符
号化手段となるエントロピー符号器12と、合成部20
とを含み、入力されるカラー画素データ100Aのデー
タストリームを符号化データ200のデータストリーム
に変換して出力するように構成されている。なお、前処
理手段2以後が符号化手段となっている。
The encoding system 1 includes a preprocessing unit 2
And two frame memories 1a and 1b for storing frames as still images, and an exclusive logic generation unit / motion compensation unit 1 for generating a motion vector V for performing motion compensation.
c, an entropy encoder 4 for encoding the motion vector V generated by the exclusive logic generation means / motion compensation means 1c, and a control circuit 5 for controlling the switches 5a and 5b.
An index conversion unit 7, a line buffer 10 as a peripheral pixel generation unit and a reference pixel generation unit, a Markov model generation unit 11 as a degeneration unit, an entropy encoder 12 as an entropy encoding unit, and a synthesis unit 20
And configured to convert the input data stream of the color pixel data 100A into the data stream of the encoded data 200 and output the converted data stream. The pre-processing means 2 and subsequent parts are coding means.

【0043】前処理手段2は、そのマルチカラー画像の
カラー画素データ100AをRGB成分からなる自然画
像に変換する自然画変換手段2aと、変換されたRGB
成分をYUV成分に変換するYUV変換手段2bと、Y
UV成分の少なくともUV成分を間引く間引き手段2c
と、間引かれないかまたは小さく間引かれたY成分を量
子化する量子化手段2dと、量子化されたY成分をイン
デックス化するインデックス化手段2eと、大きく間引
かれたUV成分にインデックスを付与すると共にパレッ
ト化するパレット化手段2fとから構成される。
The pre-processing means 2 includes a natural image converting means 2a for converting the color pixel data 100A of the multi-color image into a natural image composed of RGB components, and a converted RGB image.
YUV conversion means 2b for converting the component into a YUV component;
Thinning means 2c for thinning out at least the UV component of the UV component
A quantizing means 2d for quantizing the Y component which is not thinned out or thinned out; an indexing means 2e for indexing the quantized Y component; And palletizing means 2f for palletizing.

【0044】なお、この実施の形態では、マルチカラー
画像のカラー画素データ100Aは、256色のインデ
ックス画像となっている。また、RGB画像は、各8ビ
ットからなる計24ビットの自然画像としている。さら
に、間引き手段2cは、YUV成分中、UV成分を間引
くものとなっている。この間引き手段2cは、YUVを
4:2:2または4:1:1に間引くものとなってい
る。なお、間引きは、縦横同割合ではなく異なる割合に
しても良い。また、必要によってはY成分も間引いても
良いが、その間引き程度は、UV成分より小さくする必
要がある。
In this embodiment, the color pixel data 100A of the multi-color image is a 256-color index image. The RGB image is a 24-bit natural image composed of 8 bits each. Further, the thinning means 2c thins out the UV component from the YUV component. This thinning-out means 2c thins out YUV to 4: 2: 2 or 4: 1: 1. It should be noted that the thinning-out may be performed at a different ratio instead of the same ratio in the vertical and horizontal directions. If necessary, the Y component may be thinned out, but the degree of the thinning needs to be smaller than that of the UV component.

【0045】量子化手段2dは、JPEG規格等で使用
されている量子化手段と同様な構成のもので、Yの値を
所定の係数によって小さくしている。量子化されたY成
分は、インデックス化手段2eによって0,1,2等の
インデックスが付与される。一方、大きく間引かれたU
V成分は、パレット化手段2fによってUVが一対とな
ってインデックスが付与されると共にその値がパレット
化される。
The quantizing means 2d has the same configuration as the quantizing means used in the JPEG standard or the like, and reduces the value of Y by a predetermined coefficient. The quantized Y component is given an index of 0, 1, 2, etc. by the indexing means 2e. On the other hand, U
The V component is indexed as a pair of UV by the palletizing means 2f, and the value is palletized.

【0046】排他的論理生成手段/動き補償手段1c
は、従来と同様な機能を有するものとなっている。ここ
で、この動作について簡単に説明する。
Exclusive logic generation means / motion compensation means 1c
Has the same function as the conventional one. Here, this operation will be briefly described.

【0047】カラー画素データ100A‘は、マルチカ
ラー画素データとして、フレームメモリ1a,1bのい
ずれかに入力する。この入力信号が排他的論理生成手段
/動き補償手段1cに入力する。元の信号が、ラスタス
キャンにしたがって入力されている場合には、排他的論
理生成手段/動き補償手段1cにてブロック単位の画素
比較を行うために、画像バッファ(図示省略)に画素デ
ータを入力する。この場合には、画像バッファは少なく
とも、ブロックの縦の画素数×画像フレームの横画素数
分の画像データを入力できる容量になる。この画像バッ
ファの値と、フレームメモリ1a,1bに格納された過
去または未来の画像データと排他的論理和XORにて、
該当画素が互いに一致しているかどうかを検証する。こ
の検証は、画像バッファ中のブロックと同じ座標の、フ
レームメモリ1a,1b中のブロックを取り出しXOR
比較する他に、その同じ座標の周囲のブロックについて
も比較する。
The color pixel data 100A 'is input to one of the frame memories 1a and 1b as multi-color pixel data. This input signal is input to the exclusive logic generation means / motion compensation means 1c. When the original signal is input according to raster scan, pixel data is input to an image buffer (not shown) in order to perform pixel comparison in block units by the exclusive logic generation unit / motion compensation unit 1c. I do. In this case, the image buffer has a capacity to input image data of at least the number of vertical pixels of the block × the number of horizontal pixels of the image frame. The value of this image buffer and the past or future image data stored in the frame memories 1a and 1b are obtained by an exclusive OR XOR.
Verify whether the corresponding pixels match each other. In this verification, a block in the frame memories 1a and 1b having the same coordinates as the block in the image buffer is taken out and XOR is performed.
In addition to the comparison, the blocks around the same coordinates are also compared.

【0048】画素データは、マルチカラー画像では、1
画素あたり1バイト程度のデータから成り立つ。排他的
論理和XORは、フレーム画像データの画素と、画像バ
ッファの画素が同一であるかどうかの確認であるので、
1画素を表す全てのビットをXORするのではなく、ど
れか1ビットでも異なっているものがあれば、確認は終
了する。
The pixel data is 1 in a multi-color image.
It consists of about 1 byte of data per pixel. Since the exclusive OR XOR is a check as to whether the pixel of the frame image data and the pixel of the image buffer are the same,
Not all bits representing one pixel are XORed, but if any one bit is different, the confirmation is terminated.

【0049】画素の一致、不一致は、排他的論理生成手
段/動き補償手段1c内のカウンター(図示省略)によ
って、カウントする。ここでは不一致検出ごとにカウン
ターが増大するとする。このカウンターは、フレームメ
モリ1a,1bの1ブロック分のカウントを終了するご
とにリセットされる。リセット直前のカウント値は、カ
ウンターに内在している、カウント値の配列格納部(図
示省略)に、現在の比較しているブロックの位置と、フ
レームメモリ1a,1bのブロック位置とのずれごとに
格納する。
Pixel coincidence and non-coincidence are counted by a counter (not shown) in the exclusive logic generation means / motion compensation means 1c. Here, it is assumed that the counter increases every time a mismatch is detected. This counter is reset each time counting of one block of the frame memories 1a and 1b is completed. The count value immediately before the reset is stored in the count value array storage unit (not shown) inherent in the counter for each shift between the position of the block currently being compared and the block position of the frame memories 1a and 1b. Store.

【0050】現在の画像の1ブロック分の比較の終了時
には、配列格納部中でカウント値のもっとも小さい値を
検索する。その値が設定した閾値よりも大きい場合に
は、現在のブロックが過去または未来の該当位置のブロ
ックと、同一または類似していないと判別する。判別の
結果によって行う動作は、順方向予測すなわち過去から
現在方向の予測と、逆方向予測すなわち未来から現在方
向の予測と、双方向予測すなわち過去または未来から現
在への予測とでは動作が異なる。
At the end of the comparison of one block of the current image, the smallest value of the count value is searched in the array storage. If the value is larger than the set threshold value, it is determined that the current block is not the same or similar to the past or future block at the corresponding position. The operation performed based on the result of the determination differs between forward prediction, that is, prediction from the past to the current direction, reverse prediction, that is, prediction from the future to the current direction, and bidirectional prediction, that is, prediction from the past or future to the present.

【0051】順方向予測では、同一または類似であると
判別した時、過去フレームの最も不一致点が少ない領域
を、現在のフレームへコピーする。逆に同一または類似
ではない時には、画像バッファから現在のフレームにコ
ピーする。このとき、排他的論理生成手段/動き補償手
段1c以外の部分では、画像バッファの比較したブロッ
クに相当するデータをエントロピー符号器12によって
符号化する。
In the forward prediction, when it is determined that they are the same or similar, the area of the past frame having the fewest mismatch points is copied to the current frame. Conversely, if they are not the same or similar, copy from the image buffer to the current frame. At this time, in portions other than the exclusive logic generation unit / motion compensation unit 1c, data corresponding to the compared block in the image buffer is encoded by the entropy encoder 12.

【0052】逆方向予測では、同一または類似であると
判別した時、未来フレームの最も不一致点が少ない領域
を、現在のフレームへコピーする。逆に同一または類似
ではない時には、画像バッファから現在のフレームにコ
ピーする。このとき、排他的論理生成手段/動き補償手
段1c以外の部分では、画像バッファの比較したブロッ
クに相当するデータをエントロピー符号器12によって
符号化する。
In the backward prediction, when it is determined that they are the same or similar, the area of the future frame having the fewest mismatch points is copied to the current frame. Conversely, if they are not the same or similar, copy from the image buffer to the current frame. At this time, in portions other than the exclusive logic generation unit / motion compensation unit 1c, data corresponding to the compared block in the image buffer is encoded by the entropy encoder 12.

【0053】双方向予測では、同一または類似でないと
判別した時、排他的論理生成手段/動き補償手段1c以
外では、画像バッファの比較したブロックに相当するデ
ータをエントロピー符号器12によって符号化する。同
一または類似であると判別した時は、順方向予測または
逆方向予測と同一となる。
In the bidirectional prediction, when it is determined that they are not the same or similar, data corresponding to the compared block in the image buffer is encoded by the entropy encoder 12 except for the exclusive logic generation means / motion compensation means 1c. When it is determined that they are the same or similar, the prediction is the same as the forward prediction or the backward prediction.

【0054】順、逆および双方向予測ともに、同一また
は類似であると判別した時の、最も不一致点が少ない領
域と、現在判断している領域との相対位置のずれを、動
きベクトルVとする。この動きベクトルVは、動きベク
トルV用に決める符号化手順により圧縮や多重化を行
う。
The displacement of the relative position between the area having the fewest mismatch points and the area currently being determined when it is determined that the forward, backward and bidirectional predictions are the same or similar is referred to as a motion vector V. . The motion vector V is compressed or multiplexed by an encoding procedure determined for the motion vector V.

【0055】このような動き補償の動作を図を利用して
説明する。例えば、全く予測を用いないフレームをIピ
クチャー、過去の画像を用いて予測を行うフレームをP
ピクチャー、過去と未来の画像を利用して予測を行うフ
レームをBピクチャーとすると、図5(A)に示すよう
に、入力順は、PBBPBBIBBPBBPBBIとな
る。このように、各フレームに役割を与えると、符号化
順序は図5(B)に示すとおりとなる。すなわち、例え
ば、No.8のフレームは、No.7のIピクチャーと
No.10のPピクチャーが符号化された後に、それら
のデータを利用して符号化される。この符号化の際、動
き補償が適宜使用される。
The operation of such motion compensation will be described with reference to the drawings. For example, a frame for which prediction is not used at all is an I picture, and a frame for which prediction is
Assuming that a picture and a frame to be predicted using past and future images are B pictures, the input order is PBBPBBIBBPBBPBBI as shown in FIG. 5A. Thus, when a role is given to each frame, the encoding order is as shown in FIG. That is, for example, 8 is No. 8 No. 7 I-picture and No. 7 After 10 P pictures have been encoded, they are encoded using those data. At the time of this encoding, motion compensation is appropriately used.

【0056】動き補償は、PピクチャーとBピクチャー
を符号化するときに使用される。具体的には、符号化し
ようとするフレーム内を、図6に示すように、16×1
6ピクセルのマクロブロックMBに分割し、そのマクロ
ブロックMBと同一と判定されるマクロブロックを参照
フレームから捜し出す。なお、参照フレームは、Pピク
チャーを符号化するときはIピクチャーで、Bピクチャ
ーを符号化するときはIピクチャーとPピクチャーとな
る。
The motion compensation is used when encoding a P picture and a B picture. Specifically, as shown in FIG. 6, a frame to be coded is 16 × 1
The macroblock MB is divided into 6-pixel macroblocks, and a macroblock determined to be the same as the macroblock MB is searched for from the reference frame. The reference frame is an I picture when encoding a P picture, and an I picture and a P picture when encoding a B picture.

【0057】参照フレームから同一ブロックを捜し出す
方法は、従来と同様に、参照フレームの対応するマクロ
ブロックMBの位置およびその位置からわずかにずれた
位置のマクロブロックMBの各画素を対比することによ
り行う。この実施の形態では、同一か否かの判断を両マ
クロブロックMB内の対応する位置の画素が異なる場合
のその個数で行っている。すなわち、不一致数が所定値
以下となるときに、排他的論理生成手段/動き補償手段
1c内の判断手段(図示省略)が両マクロブロックMB
を同一と判断する。この実施の形態では、このマクロブ
ロックMBの判定のための所定値を20個としている。
The method of searching for the same block from the reference frame is performed by comparing the position of the corresponding macro block MB in the reference frame and each pixel of the macro block MB slightly shifted from the position, as in the conventional method. . In this embodiment, the determination as to whether or not the pixels are the same is made based on the number of pixels at corresponding positions in both macroblocks MB that are different. That is, when the number of mismatches becomes equal to or less than a predetermined value, the judging means (not shown) in the exclusive logic generating means / motion compensating means 1c determines whether the two macro blocks MB
Are determined to be the same. In this embodiment, the predetermined value for determining the macroblock MB is set to 20.

【0058】同一と判断すると、排他的論理生成手段/
動き補償手段1cは、両マクロブロックMBの移動方向
をベクトル化した動きベクトルVを生成し、その値をエ
ントロピー符号器12へ送出する。排他的論理生成手段
/動き補償手段1cは、マクロブロックMBを4つに分
割して小さな4つのブロックSBを生成する小ブロック
化手段(図示省略)を有している。そして、このちいさ
なブロックSBについても同一か否かを判断手段にて判
定している。この実施の形態では、そのブロックSBと
参照フレーム中のブロックSBの画素の不一致数が3個
以下のとき、両ブロックSBは同一と判断している。同
一か否かの判定基準となる所定数としては、0〜5個の
値とするのが、マルチカラー画像の乱れが生じずかつ効
果的な圧縮を行うためには好ましい。
If they are determined to be the same, exclusive logic generation means /
The motion compensator 1 c generates a motion vector V in which the moving directions of both macroblocks MB are vectorized, and sends the value to the entropy encoder 12. The exclusive logic generation unit / motion compensation unit 1c has a small block generation unit (not shown) that divides the macroblock MB into four and generates four small blocks SB. Then, it is determined by the determining means whether or not the small blocks SB are the same. In this embodiment, when the number of mismatches between the pixels of the block SB and the block SB in the reference frame is 3 or less, the blocks SB are determined to be the same. It is preferable that the predetermined number serving as a criterion for judging whether or not they are the same is a value of 0 to 5 in order to prevent the disturbance of the multi-color image and perform the effective compression.

【0059】なお、この小さなブロックSBについて
は、動きベクトルV用のデータ部分を設けず、先のマク
ロブロックMBの動きベクトルVをそのまま利用する。
このため、動きベクトルV用のデータ部分は小さくな
り、データ増大を招くことがない。一方、同一か否かの
判定は、小さなブロックSBで厳しく行うことができる
ので、マルチカラー画像の乱れも生じない。
For the small block SB, the data portion for the motion vector V is not provided, and the motion vector V of the previous macro block MB is used as it is.
For this reason, the data portion for the motion vector V becomes small and does not cause an increase in data. On the other hand, the determination as to whether or not they are the same can be made strictly with a small block SB, so that there is no disturbance of the multi-color image.

【0060】例えば、図6に示すマクロブロックMB
と、参照フレームのマクロブロックMBとの画素の不一
致数が仮に18個とすると、両マクロブロックMBは同
一と判定され、動きベクトルVが生成される。一方、小
さなブロックSB(1)の不一致数が3個、SB(2)
が2個、SB(3)が2個とすると、小さなブロックS
B(1),SB(2),SB(3)は同一のものがある
と判定され、マクロブロックMBによって生成された動
きベクトルVを利用してデータ圧縮される。しかし、小
さなブロックSB(4)の不一致数は11個となること
となり、この小さなブロックSB(4)は、動き補償を
使用することなく、その画素が符号化される。
For example, the macro block MB shown in FIG.
Assuming that the number of pixel mismatches between the reference frame and the macroblock MB is 18, the two macroblocks MB are determined to be the same, and the motion vector V is generated. On the other hand, the number of mismatches of the small block SB (1) is 3, and SB (2)
Is two and SB (3) is two, a small block S
It is determined that B (1), SB (2), and SB (3) are the same, and data is compressed using the motion vector V generated by the macroblock MB. However, the number of mismatches of the small block SB (4) is 11, and the pixel of the small block SB (4) is encoded without using motion compensation.

【0061】この実施の形態では、マクロブロックMB
の同一判定を甘くし、小さなブロックSBの同一判定を
厳しくしている。このため、動きベクトルを利用できる
ブロックが増える一方、画像の乱れも生じないものとな
る。なお、画像の性質によっては、マクロブロックMB
の同一判定を厳しくし、小さなブロックSBの同一判定
を甘くしたり、両者を同一レベルのものとしても良い。
In this embodiment, the macro block MB
Of the small blocks SB is made stricter. For this reason, while the number of blocks that can use the motion vector increases, the image is not disturbed. Note that the macroblock MB
May be made stricter, and the same determination may be made less strictly for small blocks SB, or both may be of the same level.

【0062】インデックス変換部7は、図2に示すよう
に、参照画素生成手段となるラインバッファ10と、縮
退手段となるマルコフモデル生成部11と、エントロピ
ー符号化手段となるエントロピー符号器12とに接続さ
れ、状態信号STを生成する状態生成部13と、プリス
キャン時に2種類の変換テーブルを生成する変換テーブ
ル生成部14と、参照順位テーブル15と、符号化時に
画素インデックス(カラーシンボル)3を入力し、イン
デックス変換する画素インデックス変換テーブル16
と、カラーパレット変換部17と、変換された変換カラ
ーパレット18と、変換された画素インデックスを入力
し、所定の順位を出力する判別部19とを含むように構
成されている。
As shown in FIG. 2, the index conversion unit 7 includes a line buffer 10 serving as a reference pixel generation unit, a Markov model generation unit 11 serving as a degeneration unit, and an entropy encoder 12 serving as an entropy coding unit. A state generator 13 for generating a state signal ST, a conversion table generator 14 for generating two types of conversion tables during prescan, a reference order table 15, and a pixel index (color symbol) 3 for encoding. Pixel index conversion table 16 for input and index conversion
And a color pallet conversion unit 17, a converted color pallet 18, and a determination unit 19 that receives the converted pixel index and outputs a predetermined order.

【0063】ラインバッファ10は、プリスキャン時に
は、参照画素を状態生成部13に入力し、符号化時には
参照画素をマルコフモデル生成部11に入力している。
マルコフモデル生成部11は、図7(A)に示すよう
に、符号化対象画素buf〔i〕に対し参照画素とし
て、周辺の4画素R
The line buffer 10 inputs reference pixels to the state generator 13 during prescan, and inputs reference pixels to the Markov model generator 11 during encoding.
As shown in FIG. 7A, the Markov model generation unit 11 sets the surrounding four pixels R as a reference pixel for the encoding target pixel buf [i].

〔0〕〜R〔3〕を取り入れ、マル
コフ状態信号CXを発生させている。
[0] to R [3] are taken in to generate a Markov state signal CX.

【0064】エントロピー符号器12は、後述するよう
に、予測ランレングス符号化によってモデル化されて画
像信号を符号化コード化するものとなっている。このエ
ントロピー符号器12は、図40に示す算術型のエント
ロピー符号器や、ハフマン符号を使用した符号器を採用
するようにしても良い。なお、エントロピー符号器12
の構成、動作、機能の詳細については後述する。
As will be described later, the entropy encoder 12 is modeled by predictive run-length encoding and encodes an image signal into encoded code. The entropy encoder 12 may employ an arithmetic entropy encoder shown in FIG. 40 or an encoder using a Huffman code. Note that the entropy encoder 12
The details of the configuration, operation, and function of will be described later.

【0065】状態生成部13は、符号化プロセスに先立
つプリスキャン時に動作するもので、図7(A)に示す
ように、符号化対象画素をbuf〔i〕としたとき、そ
の周辺の参照画素R
The state generating section 13 operates at the time of pre-scanning prior to the encoding process. As shown in FIG. 7A, when the encoding target pixel is buf [i], the surrounding reference pixels R

〔0〕〜R〔03〕の状態を図8に
示すように区分けするものとなっている。例えば、R
The states [0] to R [03] are classified as shown in FIG. For example, R

〔0〕〜R〔3〕がすべて同一の色の時は、状態信号S
Tは「0」となり、R
When [0] to R [3] are all the same color, the state signal S
T becomes "0" and R

〔0〕〜R〔3〕がすべて互いに
異なる色のときは状態信号STは「33」となる。な
お、符号化対象画素buf〔i〕は、先頭ラスタにある
ときは、図7(B)に示すように、現れてこない部分で
ある参照画素R〔1〕〜R〔3〕にはすべて「0」、す
なわち後述するように最も頻度の高い画素インデックス
を設定する。また、符号化対象画素buf〔i〕が、画
像の先頭であるとき、R
When [0] to R [3] are all different colors, the state signal ST becomes "33". When the encoding target pixel buf [i] is in the leading raster, all the reference pixels R [1] to R [3] which do not appear, as shown in FIG. 0 ", that is, the most frequent pixel index is set as described later. When the encoding target pixel buf [i] is at the head of the image, R

〔0〕〜R〔3〕のすべてに
「0」を設定する。
“0” is set to all of [0] to R [3].

【0066】なお、画素インデックスは、輝度成分Y
と、色成分UVにそれぞれ付与されている。輝度の階調
は、量子化により64(または32)程度に縮小されて
いる。このため、輝度のインデックスは、YC0 からY
C63の64種類程度となる。また、UVのインデックス
は、間引きのためやはり256個そのままではなく、減
少する可能性が高い。
The pixel index is represented by the luminance component Y
And the color components UV. The luminance gradation is reduced to about 64 (or 32) by quantization. Therefore, the luminance index is calculated from YC0 to Y
There are about 64 types of C63. Also, the UV index is likely to decrease instead of staying at 256 due to thinning.

【0067】変換テーブル生成部14も、プリスキャン
時にのみ動作する。そして、符号化対象画素buf
〔i〕が4つの参照画素(以下R〔4〕という)と一致
した場合、状態信号毎にその一致した色の位置の度数を
算出すると共に、参照画素R〔4〕の中に符号化対象画
素buf〔i〕が無いときには、その一致しなかった画
素インデックスの出現度数をカウントする。
The conversion table generator 14 operates only at the time of prescan. Then, the encoding target pixel buf
When [i] matches four reference pixels (hereinafter referred to as R [4]), the frequency of the position of the matching color is calculated for each state signal, and the encoding target is included in the reference pixel R [4]. When there is no pixel buf [i], the frequency of appearance of the pixel index that does not match is counted.

【0068】例えば、状態信号STが「3」のとき、図
9(A)に示すように、符号化対象画素buf〔i〕が
参照画素R
For example, when the state signal ST is “3”, as shown in FIG. 9A, the encoding target pixel buf [i] is set to the reference pixel R

〔0〕と一致した数をNAとし、参照画素R
〔2〕と一致した数をNBとすると、NA>NBなら作
成する参照順位テーブル15の参照画素位置は、図9
(B)に示すように、0位にR
The number corresponding to [0] is defined as NA, and the reference pixel R
Assuming that the number matching [2] is NB, if NA> NB, the reference pixel position of the reference order table 15 to be created is as shown in FIG.
As shown in FIG.

〔0〕がきて、1位にR
〔2〕がくる。一方、NA<NBのときは、図9(C)
に示すように、0位にR〔2〕、1位にR
[0] comes and R is in 1st place
[2] comes. On the other hand, when NA <NB, FIG.
As shown in the figure, R [2]

〔0〕がく
る。このようにして、図10に示すような参照順位テー
ブル15が作成される。なお、参照順位テーブル15中
の数字、例えば、状態信号STが「3」のときの0位の
「2」、1位の「0」は、先に示した例で言えば、0位
のR〔2〕の「2」を、1位のR
[0] comes. In this way, a reference rank table 15 as shown in FIG. 10 is created. The numbers in the reference order table 15, for example, “2” in the 0th place and “0” in the 1st place when the status signal ST is “3” are, in the example shown above, the R in the 0th place. [2] of "2" is replaced by R

〔0〕の「0」を示し
ている。また、状態信号STが「0」のときは0位のみ
であり、参照順位テーブル15から除かれるため、その
テーブル15は縦が14個、横が4個のテーブルとなっ
ている。
"0" of [0] is shown. When the status signal ST is “0”, the order is only the 0th place and is excluded from the reference order table 15. Therefore, the table 15 is a table having 14 columns and 4 columns.

【0069】また、変換テーブル生成部14は、参照画
素R〔4〕の中に符号化対象画素buf〔i〕の色が無
いときは、図11に示すように、参照画素R〔4〕中に
なかった度数を画素インデックス毎にカウントする。そ
して、図12に示すような画素インデックス変換テーブ
ル16を生成する。なお、図12に示すものは、N2≧
N0 ≧…≧Nn の場合となっている。
When the color of the pixel to be coded buf [i] does not exist in the reference pixel R [4], the conversion table generation unit 14 outputs the reference pixel R [4] as shown in FIG. Are counted for each pixel index. Then, a pixel index conversion table 16 as shown in FIG. 12 is generated. In addition, what is shown in FIG.
... ≧ Nn.

【0070】カラーパレット変換部17は、カラーパレ
ット(例えば、図13の左側に示すようなカラーパレッ
ト)9を、画素インデックス変換テーブル16を利用し
て図13(B)に示すような変換カラーパレット18を
生成している。例えば、画素インデックス(カラーシン
ボル)YC2 が輝度成分YとしてY2 なるものとされて
いるとき、参照画素R〔4〕中に無かった度数の順位が
1番目すなわち順位として0順位のとき、変換カラーパ
レット18では最上位すなわちカラーシンボルYC0 の
位置に設定されることとなる。
The color pallet conversion unit 17 converts the color pallet (for example, a color pallet as shown on the left side of FIG. 13) 9 into a converted color pallet as shown in FIG. 18 is generated. For example, if the pixel index (color symbol) YC2 is Y2 as the luminance component Y, and if the rank of the frequency that was not present in the reference pixel R [4] is the first, that is, the rank is 0, the conversion color palette At 18, the color symbol YC0 is set at the highest position.

【0071】判別部19は、符号化時に動作するもの
で、画素インデックス変換テーブル16によって変換さ
れた画素インデックスと、状態信号STに基づく参照画
素が入力される。そして、その画素インデックスと参照
画素が一致したときは、参照順位テーブル15に基づい
てその順位を出力する。一致しなかった場合は、その画
素インデックスの順位に、マルコフ状態信号CXに1を
加えた数を加算して出力する。例えば、変換された画素
インデックスがYCn のときで状態信号STが「3」の
場合は、その画素インデックスYCn と同一の色が参照
画素R
The discriminator 19 operates at the time of encoding, and receives a pixel index converted by the pixel index conversion table 16 and a reference pixel based on the state signal ST. When the pixel index matches the reference pixel, the order is output based on the reference order table 15. If they do not match, a number obtained by adding 1 to the Markov state signal CX is added to the order of the pixel index and output. For example, when the converted pixel index is YCn and the state signal ST is “3”, the same color as the pixel index YCn is used as the reference pixel R

〔0〕にあったときは、順位として「1」を出力
する。一方、画素インデックスYCn が参照画素R
〔4〕中に無いときは、CXが「1」なので、「n+1
+1」=「n+2」を出力する。
When it is [0], "1" is output as the rank. On the other hand, if the pixel index YCn is the reference pixel R
When [4] does not exist, since CX is “1”, “n + 1”
+1 "=" n + 2 "is output.

【0072】エントロピー符号器12は、判別部19の
出力をマルコフ状態信号CXでマルコフモデル化し、可
変長符号化する。合成部20では、変換カラーパレット
18のデータと、参照順位テーブル15のデータと、エ
ントロピー符号器12からの出力とを合成して符号化デ
ータ200として出力する。この実施の形態では、符号
化データ200は、画像のサイズ等の情報に続き、変換
カラーパレット18のデータ、参照順位テーブル15の
データ、最後にエントロピー符号器12によって符号化
された符号化コードという順に出力されるが、基本的に
は符号化データ200中に入っていれば良く、他の順序
としても良い。
The entropy encoder 12 transforms the output of the discriminating section 19 into a Markov model with a Markov state signal CX and performs variable length coding. The synthesizing unit 20 synthesizes the data of the converted color palette 18, the data of the reference order table 15, and the output from the entropy encoder 12, and outputs the result as encoded data 200. In this embodiment, the encoded data 200 includes information such as the size of an image, data of a converted color palette 18, data of a reference order table 15, and finally an encoded code encoded by the entropy encoder 12. Although they are output in order, basically, they only need to be included in the encoded data 200, and may be in another order.

【0073】以上、輝度成分Yについて説明したが、U
V成分についても同様となる。以後の説明でも、輝度成
分YとUV成分は、共に同様に処理される。
The luminance component Y has been described above.
The same applies to the V component. In the following description, the luminance component Y and the UV component are both processed in the same manner.

【0074】次に、以上の構成を有する符号化システム
1の動作について、図14および図15に示すフローチ
ャートに基づいて説明する。なお、排他的論理生成手段
/動き補償手段1cの動作は、既に説明したので、ここ
ではインデックス変換部7およびその周辺の部材の動作
について説明する。
Next, the operation of the encoding system 1 having the above configuration will be described with reference to the flowcharts shown in FIGS. Since the operation of the exclusive logic generation unit / motion compensation unit 1c has already been described, here, the operation of the index conversion unit 7 and its peripheral members will be described.

【0075】符号化システム1の動作は、プリスキャン
プロセスと符号化プロセスとに分かれる。符号化の前処
理に当たるプリスキャンプロセスでは、後段の符号化プ
ロセスで適切な符号化が行えるように、画素インデック
ス変換テーブル16および参照順位テーブル15の作成
を行う。このために、まず、スイッチ21を端子21a
に接続する。そして、ステップS0では変換テーブル生
成部14中の後述するカウントテーブルならびに参照順
位テーブル15および画素インデックス変換テーブル1
6の初期化ならびに後述する符号化処理のための各種変
数の初期化を行う。
The operation of the coding system 1 is divided into a prescan process and a coding process. In the pre-scan process corresponding to the pre-processing of the encoding, the pixel index conversion table 16 and the reference order table 15 are created so that appropriate encoding can be performed in the subsequent encoding process. For this purpose, first, switch 21 is connected to terminal 21a.
Connect to Then, in step S0, a count table, a reference rank table 15, and a pixel index conversion table 1 described later in the conversion table generation unit 14 are stored.
6 and initialization of various variables for encoding processing to be described later.

【0076】ステップS1では、入力画像のカラーパレ
ット9のデータをカラーパレット変換部17中の配列p
allet〔 〕に入力する。ステップS2では、入力
画像の画素インデックス100A’をラインバッファ1
0中の配列buf〔 〕に入力する。次に、ステップS
3では、符号化対象画素buf〔i〕の周辺の4画素を
ラインバファ10から取り出し、変換テーブル生成部1
4や状態生成部13等の配列R〔 〕に入力する。符号
化対象画素buf〔i〕と参照画素R
In step S 1, the data of the color palette 9 of the input image is stored in the array p in the color palette conversion unit 17.
Input to allet []. In step S2, the pixel index 100A 'of the input image is stored in the line buffer 1
Input to array buf [] in 0. Next, step S
In 3, four pixels around the encoding target pixel buf [i] are extracted from the line buffer 10, and the conversion table generation unit 1
4 and the array R [] of the state generation unit 13 and the like. The encoding target pixel buf [i] and the reference pixel R

〔0〕〜R〔3〕
の位置関係は図7に示すとおりである。ステップS4で
は、ラインバファ10から抽出した参照画素に基づき、
図8の基準で状態信号STを生成する。
[0] to R [3]
Are as shown in FIG. In step S4, based on the reference pixels extracted from the line buffer 10,
The state signal ST is generated based on the reference in FIG.

【0077】ステップS5では、参照画素R〔4〕の中
に符号化対象画素buf〔i〕と一致するものがあるか
どうか調べる。その後、ステップ6で参照画素R〔i〕
と一致した場合、変換テーブル生成部14中の参照順位
テーブル15用のカウントテーブルN_table_A
〔ST+j〕に1を加える。ここで、jは参照画素の位
置を現すため、N_table_A〔 〕には、参照画
素の状態と一致した位置毎に、一致した回数がカウント
される。次のステップS7では、参照画素と一致しない
場合、変換テーブル生成部14中の画素インデックス変
換テーブル16作成用のカウントテーブルN_tabl
e_B[buf〔i〕]に1を加える。つまり、カウン
トテーブルN_table_B[buf〔i〕]には、
参照画素と一致しなかった画素について、その画素イン
デックス3ごとにカウントされる。
In step S5, it is checked whether or not any of the reference pixels R [4] matches the pixel to be coded buf [i]. Then, in step 6, the reference pixel R [i]
If it matches, the count table N_table_A for the reference rank table 15 in the conversion table generation unit 14
One is added to [ST + j]. Here, since j represents the position of the reference pixel, the number of times of matching is counted in N_table_A [] for each position that matches the state of the reference pixel. In the next step S7, if the pixel does not match the reference pixel, the count table N_tabl for creating the pixel index conversion table 16 in the conversion table generation unit 14
One is added to e_B [buf [i]]. That is, in the count table N_table_B [buf [i]],
A pixel that does not match the reference pixel is counted for each pixel index 3.

【0078】ステップS8で、すべての画素データにつ
いて、ステップS3からステップ6あるいはステップ7
までの処理を繰り返す。カウントテーブルN_tabl
e_B〔 〕には、画素インデックス100A毎に出現
度数がカウントされている。ステップS9では、これを
基に出現度数の多いものから昇順のコードに変換する画
素インデックス変換テーブル16を作成する。このテー
ブル16により、出現度数の多い画素インデックス10
0Aほど、小さいインデックス値に変換され、その特性
に合わせたエントロピー符号化を用意すれば、いかなる
画像であっても最も効率の良いエントロピー圧縮を行う
ことができる。
At step S8, for all the pixel data, step S3 to step 6 or step 7
The process up to is repeated. Count table N_tabl
In e_B [], the frequency of appearance is counted for each pixel index 100A. In step S9, a pixel index conversion table 16 for converting a code having a higher frequency of occurrence into an ascending code is created based on the table. According to this table 16, the pixel index 10 having a high appearance frequency
If the index value is converted to a smaller value for 0A and entropy encoding is prepared according to the characteristic, the most efficient entropy compression can be performed for any image.

【0079】ステップS10では、その参照順位を記述
した参照順位テーブル15を作成する。すなわち、カウ
ントテーブルN_table_A〔 〕には、参照画素
の状態信号STと、符号化対象画素buf〔i〕に一致
した参照画素位置毎にその度数がカウントされているの
で、度数の多い順に昇順を付ければ、最も効率の良い圧
縮が期待できる。
In step S10, a reference rank table 15 describing the reference rank is created. That is, in the count table N_table_A [], since the frequency is counted for each reference pixel position that matches the reference pixel status signal ST and the encoding target pixel buf [i], the ascending order can be added in descending order of frequency. If so, the most efficient compression can be expected.

【0080】プリスキャンプロセスによって、参照順位
テーブル15と画素インデックス変換テーブル16を作
成後、図15に示す符号化プロセスを実行する。この実
行に当たり、まずスイッチ2を端子21b側に切り換え
る。
After the reference rank table 15 and the pixel index conversion table 16 are created by the pre-scan process, the encoding process shown in FIG. 15 is executed. In executing this, first, the switch 2 is switched to the terminal 21b side.

【0081】プリスキャンプロセスにて作成された参照
順位テーブル15は、復号処理に必要となる。このた
め、圧縮ストリームのヘッダ情報の一部として符号化デ
ータ200のストリームに付加するために、ステップS
11で、合成部20に出力される。ステップS12で
は、プリスキャンプロセスで作成した画素インデックス
変換テーブル16を用いて、画素インデックス100
A’の変換を行う。この変換により参照画素と一致しな
かった画素インデックス100A’が、その出現度数の
大きい順に昇順のコードとなる。
The reference order table 15 created in the prescan process is necessary for the decoding process. Therefore, in order to add to the stream of the encoded data 200 as a part of the header information of the compressed stream, step S
At 11, it is output to the synthesis unit 20. In step S12, the pixel index 100 is used by using the pixel index conversion table 16 created in the prescan process.
A 'is converted. The pixel index 100A ′ that does not match the reference pixel by this conversion becomes a code in ascending order in descending order of the appearance frequency.

【0082】画素インデックス100A’の変換に伴っ
て、カラーパレットも復号側で正しい色が再現されるよ
うに変換する必要がある。このため、ステップS13
で、画素インデックス変換テーブル16を利用して、カ
ラーパレット変換部17で変換カラーパレット18の作
成を行う。変換された変換カラーパレット18は、合成
部20に入力し、符号化データ200からなる圧縮スト
リームのヘッダ情報の一部として付加される。ステップ
S14では、プリスキャンプロセスのステップS3と同
じ動作をする。すなわち、ラインバッファ10から参照
画素R〔4〕を取り出し、マルコフモデル生成部11や
状態生成部13に入力する。
Along with the conversion of the pixel index 100A ', it is necessary to convert the color palette so that the decoding side reproduces the correct color. Therefore, step S13
Then, using the pixel index conversion table 16, the color palette conversion unit 17 creates the conversion color palette 18. The converted color palette 18 is input to the synthesizing unit 20 and added as a part of the header information of the compressed stream composed of the encoded data 200. In step S14, the same operation as in step S3 of the prescan process is performed. That is, the reference pixel R [4] is extracted from the line buffer 10 and input to the Markov model generation unit 11 and the state generation unit 13.

【0083】次のステップS15では、プリスキャンプ
ロセスのステップS4と同じ動作をする。すなわち、状
態生成部13で、図8に示す基準に基づいて状態信号S
Tを、参照順位テーブル15に向けて出力する。ステッ
プS16では、マルコフ状態信号CXを生成する。この
マルコフ状態信号CXは、参照画素の色数を現す値で、
図8の表に基づいて参照画素の状態から生成する。な
お、この符号化プロセスのフローでは明記しないが、こ
のマルコフ状態信号CXは、エントロピー符号化を行う
際のマルコフモデル化のための符号化条件としても用い
ている。
In the next step S15, the same operation as in step S4 of the prescan process is performed. That is, the state generator 13 generates the state signal S based on the reference shown in FIG.
T is output to the reference ranking table 15. In step S16, a Markov state signal CX is generated. The Markov state signal CX is a value representing the number of colors of the reference pixel,
It is generated from the state of the reference pixel based on the table of FIG. Although not specified in the flow of this encoding process, this Markov state signal CX is also used as an encoding condition for Markov modeling when performing entropy encoding.

【0084】ステップS17では、符号化対象画素bu
f〔i〕が、参照画素R〔4〕と一致するか否か調べ
る。具体的には、参照順位テーブル15中の状態信号S
Tに対応する欄内を0からCXと等しい値まで変化さ
せ、符号化対象画素buf〔i〕と一致するか調べてい
く。参照画素と一致した場合は、即ステップS18に進
み、そうでない場合はステップS19に進む。
In step S17, the pixel to be encoded bu
It is checked whether or not f [i] matches the reference pixel R [4]. Specifically, the state signal S in the reference order table 15
The value in the column corresponding to T is changed from 0 to a value equal to CX, and it is checked whether or not the value matches the encoding target pixel buf [i]. If it matches the reference pixel, the process immediately proceeds to step S18; otherwise, the process proceeds to step S19.

【0085】参照画素と一致した場合は、その時の順位
をエントロピー符号化する(ステップS18)。参照画
素と一致しなかった場合は、符号化対象画素buf
〔i〕を直接エントロピー符号化する。ただし、(CX
+1)個の符号が参照画素と一致した場合の符号に割り
当てられているので、(CX+1)を加算して符号化す
る(ステップS19)。ステップ20で、すべての画素
データについて、ステップS14からステップS18あ
るいはステップS19までの処理を繰り返す。
If the pixel matches the reference pixel, the rank at that time is subjected to entropy coding (step S18). If it does not match the reference pixel, the encoding target pixel buf
[I] is directly entropy coded. However, (CX
Since (+1) codes are assigned to the code in the case where the reference pixel coincides with the reference pixel, (CX + 1) is added and encoded (step S19). In step 20, the processing from step S14 to step S18 or step S19 is repeated for all the pixel data.

【0086】ところで、上述したフローでは、ステップ
S18あるいはステップS19で順位の確定と共に逐次
エントロピー符号化を行うようになっているが、全画素
の順位と対応するマルコフ状態信号CXを一旦バッファ
に格納し、まとめて後述する符号化を行っても良い。例
えば、後述する予測ランレングスの符号化方法を採用し
た場合、符号化対象シンボル以降の未来のシンボルをま
とめて符号化することとなる。
In the above-mentioned flow, the entropy coding is performed sequentially with the determination of the order in step S18 or S19. The Markov state signal CX corresponding to the order of all pixels is temporarily stored in a buffer. Alternatively, the encoding described later may be performed collectively. For example, when a prediction run-length encoding method described later is adopted, future symbols after the encoding target symbol are encoded collectively.

【0087】なお、この実施の形態では、輝度成分であ
るY成分については、動き補償を行わず、色成分のUV
成分についてのみ動き補償を行っている。
In this embodiment, motion compensation is not performed on the Y component, which is a luminance component, and the UV component of the color component is not corrected.
Motion compensation is performed only for the component.

【0088】また、PピクチャーやBピクチャーの符号
化において、所定のマクロブロックMBが動き補償を行
わないと判断されたとき、それらのマクロブロックMB
が拾われ、連続して符号化される。例えば、図16
(A)に示すように、マクロブロックMBのNo.1〜
No.7が動き補償を行わないものであるとき、符号化
はNo.1→No.4→No.2→No.6→No.7
→No.5→No.3の順で行われる。このため、メモ
リ容量を小さくしても効果的な圧縮が可能となる。
In coding a P picture or a B picture, when it is determined that a predetermined macro block MB does not perform motion compensation, the macro block MB
Are picked up and coded continuously. For example, FIG.
As shown in FIG. 1 to
No. When No. 7 does not perform motion compensation, the coding is No. 1 → No. 4 → No. 2 → No. 6 → No. 7
→ No. 5 → No. 3 is performed in order. Therefore, effective compression is possible even if the memory capacity is reduced.

【0089】例えば、図16(B)に示す、No.1,
4,2のマクロブロックMBをNo.1→No.2の順
で符号化すると、No.2のマクロブロックMBのN
o.1と隣接する部分の画素を効果的に圧縮するには、
No.1のマクロブロックMBの右端側の少なくとも1
列について記憶するためのメモリが余分に必要となると
共にアクセスの手間がかかる。ところが、No.1→N
o.4の順で符号化すると、No.4のマクロブロック
MBのNo.1と隣接する部分の画素の符号化には先に
示した最新出現表をそのまま利用でき、余分なメモリが
必要とならずアクセス時間も速くなる。
For example, as shown in FIG. 1,
No. 4 and No. 2 macro blocks MB. 1 → No. No. 2 is encoded. N of macro block MB of 2
o. To effectively compress the pixels adjacent to 1
No. At least one on the right end of one macroblock MB
An extra memory for storing a column is required and access is troublesome. However, no. 1 → N
o. No. 4 is encoded. No. 4 macro block MB No. 4 The latest appearance table described above can be used as it is for encoding pixels in a portion adjacent to 1, and no extra memory is required, and the access time is shortened.

【0090】次に、符号化システム1に対応したマルチ
カラー画像からなる動画像の復号化システム3について
説明する。
Next, a decoding system 3 for a moving image composed of multi-color images corresponding to the encoding system 1 will be described.

【0091】この復号化システム3は、各スイッチ6
a,6b,6cを切り替える制御回路6と、動き補償部
3aと、Y成分とUV成分を補正処理する補正手段9
と、2つのフレームメモリ3b,3cと、インデックス
変換部8と、周辺画素生成手段および参照画素生成手段
となるラインバッファ30と、縮退手段となるマルコフ
モデル生成部31と、エントロピー復号化手段となるエ
ントロピー復号器32と、分離部33とを含み、入力さ
れる符号化データ200のデータストリームをカラー画
素データ100Bのデータストリームに変換して出力す
るように形成されている。なお、補正手段9以前の構成
が、復号化手段となる。
The decoding system 3 includes a switch 6
a control circuit 6 for switching between a, 6b, and 6c, a motion compensating unit 3a, and a correcting unit 9 for correcting the Y component and the UV component
, Two frame memories 3b and 3c, an index conversion unit 8, a line buffer 30 as a peripheral pixel generation unit and a reference pixel generation unit, a Markov model generation unit 31 as a degeneration unit, and an entropy decoding unit. It includes an entropy decoder 32 and a separation unit 33, and is formed to convert a data stream of input coded data 200 into a data stream of color pixel data 100B and output the data stream. Note that the configuration before the correction means 9 becomes the decoding means.

【0092】補正手段9は、Y成分をスムージング処理
するスムージング手段9aと、UV成分を中間色補間に
よって処理する中間色処理手段9bとから構成される。
スムージング処理は、所定の係数を有するフィルターに
よって行う公知の処理方法である。例えば、縦横3つで
計9個の升目を有し、中央が0.2で他が0.1の係数
を持つフィルター等がある。また、中間色補間も、例え
ば、中間の値をその両側の画素の値の中間値とする補正
で、従来公知の各種の補正方法を採用することができ
る。なお、4つの画素のちょうど中央となる部分につい
ては、4つの画素の平均値としたり、特定方向の2つの
画素の中間値としたりすることとなる。
The correction means 9 comprises a smoothing means 9a for performing a smoothing process on the Y component and an intermediate color processing means 9b for processing the UV component by intermediate color interpolation.
The smoothing process is a known processing method performed by a filter having a predetermined coefficient. For example, there is a filter or the like that has a total of 9 squares in 3 rows and 3 columns, and has a coefficient of 0.2 in the center and 0.1 in the others. In addition, the intermediate color interpolation is, for example, a correction in which an intermediate value is set to an intermediate value between values of pixels on both sides thereof, and various conventionally known correction methods can be adopted. Note that, for a portion exactly at the center of the four pixels, the average value of the four pixels or the intermediate value of the two pixels in the specific direction is used.

【0093】なお、この実施の形態では、スムージング
手段9aでは、エッジ保存処理も行っている。このエッ
ジ保存処理は、対象とする画素を含む一定の領域、例え
ば、長方形の領域をその画素を中心として360度回転
させて、その画素を変化率が最も小さい色に割り当てる
ものである。これによってスムージング処理によって失
われがちなエッジを確実に保存することができる。
In this embodiment, the smoothing means 9a also performs an edge preserving process. This edge preservation processing is to rotate a fixed area including a target pixel, for example, a rectangular area by 360 degrees around the pixel, and assign the pixel to a color having the smallest change rate. This makes it possible to reliably preserve edges that are likely to be lost by the smoothing process.

【0094】この復号化システム3のアルゴリズムは、
復号化手段は符号化手段と全く逆のアルゴリズムである
が、全体としては、符号化システム1のアルゴリズムと
は異なるものとなる。したがってカラー画素データ10
0Aのビット構成およびデータストリームと、カラー画
素データ100Bのビット構成およびデータストリーム
とは若干異なるものとなる。なお、動き補償部3aは、
先の符号化システム1の排他的論理生成手段/動き補償
手段1cと基本的に逆の動作となっており、その内部
に、動きベクトルVの有無を判断する判断手段3dを有
している。
The algorithm of the decoding system 3 is as follows.
The decoding means is an algorithm completely opposite to the coding means, but is totally different from the algorithm of the coding system 1 as a whole. Therefore, the color pixel data 10
The bit configuration and data stream of 0A are slightly different from the bit configuration and data stream of color pixel data 100B. Note that the motion compensation unit 3a
The operation is basically the reverse of that of the exclusive logic generation means / motion compensation means 1c of the encoding system 1 described above, and includes a judgment means 3d for judging the presence or absence of the motion vector V inside.

【0095】なお、動き補償部3aの動作は、次のとお
りである。すなわち、動きベクトルVの情報を元にし
て、動きベクトルVと、その動きベクトルVを使用する
か否かの情報を入手する。動きベクトルVを使用する場
合には、フレームメモリ3b,3c中のデータを復号
し、動きベクトルVを使用しない場合には、エントロピ
ー復号器32から復号したデータを、そのまま復号デー
タとして採用する。
The operation of the motion compensator 3a is as follows. That is, based on the information on the motion vector V, the motion vector V and information on whether or not to use the motion vector V are obtained. When the motion vector V is used, the data in the frame memories 3b and 3c is decoded. When the motion vector V is not used, the data decoded from the entropy decoder 32 is directly used as the decoded data.

【0096】動きベクトルVを使用する場合、順方向の
ときには過去のデータから、逆方向のときには未来のデ
ータから、それぞれデータを転送する。双方向の場合に
は、過去または未来のいずれかを選択し転送する。一
方、動きベクトルVを使用しない場合には、エントロピ
ー復号器32からのデータを復号データとして出力する
他に、順、逆方向の場合には、現在のフレームデータと
してフレームメモリ3b,3cに格納する。
When the motion vector V is used, data is transferred from past data in the forward direction and from future data in the backward direction. In the case of bidirectional transmission, either the past or the future is selected and transferred. On the other hand, when the motion vector V is not used, the data from the entropy decoder 32 is output as decoded data, and in the case of forward and reverse directions, the data is stored in the frame memories 3b and 3c as current frame data. .

【0097】インデックス変換部8は、参照画素生成手
段となるラインバッファ30と、縮退手段となるマルコ
フモデル生成部31と、エントロピー復号化手段となる
エントロピー復号器32とに接続され、状態信号STを
生成する状態生成部34と、参照順位テーブル35と、
画素インデックス(カラーシンボル)生成部36とを含
むように構成されている。
The index conversion unit 8 is connected to a line buffer 30 serving as reference pixel generation means, a Markov model generation unit 31 serving as degeneration means, and an entropy decoder 32 serving as entropy decoding means. A state generating unit 34 to generate, a reference order table 35,
And a pixel index (color symbol) generator 36.

【0098】ラインバッファ30は、符号化システム1
のラインバッファ10と同様に複数の画素を保存できる
ものとなっている。そして、その値を周辺画素としてマ
ルコフモデル作成部31や状態生成部34等に入力し、
参照順位テーブル35や各信号ST、CXを作成してい
る。
[0098] The line buffer 30
A plurality of pixels can be stored in the same manner as the line buffer 10. Then, the value is input to the Markov model creation unit 31, the state generation unit 34, and the like as peripheral pixels,
The reference order table 35 and the signals ST and CX are created.

【0099】エントロピー復号器32は、マルコフ状態
信号CXを利用して、入力する符号化データ200中の
符号化コードを、エントロピー符号器12と逆の手順で
復号化演算処理する。なお、エントロピー復号器32
は、エントロピー符号器12とは全く逆のアルゴリズム
でその演算を行うように形成しなければならない。した
がって、エントロピー復号器32は、エントロピー符号
器12に算術符号器が用いられた場合には、それと同様
な構成の算術復号器として形成する必要があり、また、
エントロピー符号器12にハフマン符号器が用いられた
場合には、それと同じ構成のハフマン復号器として構成
する必要がある。
The entropy decoder 32 decodes the encoded code in the input encoded data 200 by using the Markov state signal CX in a procedure reverse to that of the entropy encoder 12. Note that the entropy decoder 32
Must be formed to perform its operation with an algorithm completely opposite to that of the entropy encoder 12. Therefore, when an arithmetic encoder is used as the entropy encoder 12, the entropy decoder 32 needs to be formed as an arithmetic decoder having a similar configuration.
If a Huffman encoder is used as the entropy encoder 12, it must be configured as a Huffman decoder having the same configuration.

【0100】分離部33は、符号化データ200のデー
タストリームより変換カラーパレット18のデータと、
参照順位テーブル35のデータとを分離するものであ
る。そして、その内部に符号化システム1の合成部20
と逆の機能が設定されており、エントロピー符号器12
で符号化された符号化コードをエントロピー復号器32
に出力する。
The separating unit 33 converts the data of the converted color palette 18 from the data stream of the encoded data 200,
This is to separate the data of the reference rank table 35 from the data. Then, the synthesizing unit 20 of the encoding system 1 is provided therein.
The reverse function is set, and the entropy encoder 12
The encoded code encoded by the entropy decoder 32
Output to

【0101】状態生成部34は、符号化システム1中の
状態生成部13と同様な構成、機能を有しており、図8
に示す表に示された基準に基づいて状態信号STを出力
する。参照順位テーブル35は、分離部33で分離され
た参照順位テーブル35用のデータによって構成され、
符号化システム1中の参照順位テーブル15と同様な表
となっている。画素インデックス生成部36は、符号化
システム1で生成された所定順位のデータおよびマルコ
フ状態信号CXならびに参照順位テーブル35の各デー
タから画素インデックス6を出力する。
The state generator 34 has the same configuration and function as the state generator 13 in the encoding system 1 and
The state signal ST is output based on the criteria shown in the table shown in FIG. The reference rank table 35 is configured by data for the reference rank table 35 separated by the separation unit 33,
The table is similar to the reference order table 15 in the encoding system 1. The pixel index generation unit 36 outputs the pixel index 6 from the data of the predetermined order and the Markov state signal CX generated by the encoding system 1 and each data of the reference order table 35.

【0102】次に、このように構成される復号化システ
ム3の動作について、図17に示すフローチャートに基
づいて説明する。
Next, the operation of the decoding system 3 thus configured will be described with reference to the flowchart shown in FIG.

【0103】まず、ステップS30で、参照画素や後述
する予測ランレングス(PRLC)復号のための各種変
数の初期化を行う。次に、分離部33によって符号化デ
ータ200の圧縮ストリームのヘッダに付加された参照
順位テーブル35のデータを抽出し参照順位テーブル3
5を生成する(ステップS31)。ステップS32で
は、圧縮ストリームとなる符号化データ200のヘッダ
に付加された変換カラーパレット18のデータを同様に
分離部33によって抽出し出力する。
First, in step S30, the reference pixel and various variables for predictive run length (PRLC) decoding described later are initialized. Next, the data of the reference rank table 35 added to the header of the compressed stream of the encoded data 200 by the separating unit 33 is extracted, and the reference rank table 3
5 is generated (step S31). In step S32, the data of the converted color pallet 18 added to the header of the encoded data 200 to be a compressed stream is similarly extracted and output by the separation unit 33.

【0104】次に、ステップS33で、参照画素R
〔4〕を抽出する。これは符号化プロセスのステップS
14と全く同様となっている。ステップS34では、マ
ルコフ状態信号CXを生成する。これは符号化プロセス
のステップS16と全く同様となっている。ステップS
35では、PRLCによるエントロピー復号により復号
順位Xを得る。
Next, at step S33, the reference pixel R
[4] is extracted. This is step S of the encoding process.
It is exactly the same as 14. In step S34, a Markov state signal CX is generated. This is exactly the same as step S16 of the encoding process. Step S
At 35, a decoding order X is obtained by entropy decoding by PRLC.

【0105】ステップS36では、画素インデックス生
成部36において、順位Xがマルコフ状態信号CXの値
以下かどうかを判定する。順位Xが値CX以下の場合、
復号される画素インデックスが参照画素に存在すること
を示し、ステップS37に進む。それ以外は、ステップ
S38に進む。ステップS37では、状態信号STで区
分される中に存在する順位Xが指し示す位置にある参照
画素の画素インデックス100Bを出力する。
In step S36, the pixel index generator 36 determines whether or not the rank X is equal to or less than the value of the Markov state signal CX. If the rank X is less than or equal to the value CX,
This indicates that the pixel index to be decoded exists in the reference pixel, and the process proceeds to step S37. Otherwise, the process proceeds to step S38. In step S37, the pixel index 100B of the reference pixel located at the position indicated by the rank X existing in the state segmented by the state signal ST is output.

【0106】ステップS38では、復号順位Xが参照画
素を指し示さない場合は、復号順位Xそのものが復号さ
れる画素インデックス100Bとなる。ただし、(CX
+1)個の符号が参照画素に割り当てられているため、
復号順位Xから(CX+1)を差し引く必要がある。ス
テップS39で、すべての画素インデックス100Bの
復号が完了するまで、ステップS33からステップS3
7あるいはステップS38までを繰り返す。そして、す
べての画素インデックス100Bの復号が終了すると、
復号動作が終了する。
In step S38, if the decoding order X does not indicate a reference pixel, the decoding order X itself becomes the pixel index 100B to be decoded. However, (CX
Since +1) codes are assigned to the reference pixels,
It is necessary to subtract (CX + 1) from the decoding order X. In step S39, steps S33 to S3 are performed until decoding of all pixel indexes 100B is completed.
7 or step S38 is repeated. Then, when decoding of all pixel indexes 100B is completed,
The decoding operation ends.

【0107】次に、先に説明した符号化システム1中の
エントロピー符号器12で行う符号化について説明す
る。この実施の形態では、いわば予測ランレングス(以
下、PRLCという)と称するものを採用している。こ
のPRLCは、良く知られているランレングス符号化を
改良したもので、そのアルゴリズムの概要について、図
18から図20に基づいて説明すると共に、このPRL
Cの基礎となる基本的な符号化方法等を図21および図
22に基づいて説明する。
Next, the encoding performed by the entropy encoder 12 in the encoding system 1 described above will be described. In this embodiment, what is called a predicted run length (hereinafter referred to as PRLC) is employed. The PRLC is an improvement of the well-known run-length coding. The outline of the algorithm will be described with reference to FIGS.
A basic encoding method and the like that form the basis of C will be described with reference to FIGS. 21 and 22.

【0108】この符号化の基本のアルゴリズムは、従来
から良く知られているQMコーダと同様、基本的には、
2値のビット列を圧縮の対象としている。まず初期値と
して、“0”か“1”のいずれかを優勢シンボルと定
め、そのシンボルが連続すると予測する個数runを設
定する。入力系列の出現確率が不明の場合は、runを
1に設定するのが良い。その上で、以下に示すようなル
ールに従い符号化を進める。なお、個数runが予測ビ
ット数に相当する。
The basic algorithm of this encoding is basically the same as that of a conventionally well-known QM coder.
A binary bit string is to be compressed. First, as an initial value, either “0” or “1” is determined as a dominant symbol, and the number run of which the symbol is predicted to be continuous is set. If the appearance probability of the input sequence is unknown, run is preferably set to 1. Then, the encoding is performed according to the following rules. Note that the number run corresponds to the number of predicted bits.

【0109】図18に示すように、runで示される注
目系列がすべて優勢シンボルであると予測し、予測が当
たったとき、符号語として“0”を出力し、この系列の
符号化を完了する。はずれた場合は“1”を出力し、次
の分割符号化工程を実行する。
As shown in FIG. 18, all the sequences of interest indicated by run are predicted to be dominant symbols, and when the prediction is successful, "0" is output as a codeword and the coding of this sequence is completed. . If it deviates, "1" is output, and the next division encoding step is executed.

【0110】予測がはずれた場合は、図19に示すよう
に注目系列を前半部系列と後半部系列の2つに分け、前
半部がすべて優勢シンボルのときは符号語として“0”
を、前半部系列に劣勢シンボルが存在し後半部がすべて
優勢シンボルのときは、符号語として“10”を、前半
部にも後半部にも劣勢シンボルが存在するときは“1
1”をそれぞれ出力する。そして、劣勢シンボルが存在
する系列は、さらに系列を分割する(図20参照)。劣
勢シンボルが存在する系列は、可能な限り系列を分割し
て上述の分割符号化工程を繰り返す。
If the prediction is incorrect, the sequence of interest is divided into the first half sequence and the second half sequence as shown in FIG. 19, and if the first half is all dominant symbols, "0" is used as a codeword.
When the inferior symbol exists in the first half sequence and the latter half is all superior symbols, "10" is used as a codeword, and when the inferior symbol exists in both the former and latter half, "1" is used.
1 ". The sequence in which the inferior symbol exists is further divided (see FIG. 20). The sequence in which the inferior symbol exists is divided as much as possible, and the above-described division encoding step is performed. repeat.

【0111】なお、分割は必ずしも2つの均等分割とす
る必要はなく、不均等な分割としたり3つ以上の分割と
しても良い。また、予測が当たったとき“0”ではな
く、優勢シンボルを出力し、はずれた場合“1”ではな
く、劣勢シンボルを出力するようにしたり、予測当たり
で“1”を、予測はずれで“0”を出力するようにして
も良い。
Note that the division need not necessarily be two equal divisions, but may be non-uniform divisions or three or more divisions. In addition, when the prediction is successful, a superior symbol is output instead of “0”. When the prediction is incorrect, an inferior symbol is output instead of “1”. "May be output.

【0112】以上がこの符号化の前提となるデータ符号
化の基本アルゴリズムであるが、さらに、入力系列の出
現確率の変化に追随し、符号化効率を向上させるため、
以下の処理を加えるようにしても良い。
The above is the basic algorithm of data encoding which is the premise of this encoding. In order to follow the change of the appearance probability of the input sequence and improve the encoding efficiency,
The following processing may be added.

【0113】すなわち、runで予測した系列が続けて
所定回数、例えば、2回当たったとき、runを2倍等
に増加させる。なお、予測が的中し続けた場合、さらに
予測範囲を拡大していく。一方、runで予測した系列
が2回以上劣勢シンボルを含むと共にrunを1/2倍
する。予測がはずれ続けた場合、さらに1/2倍してい
く。そして、runが1で、それが劣勢シンボルのとき
は、以降の入力系列を反転させる。すなわち、優勢シン
ボルを変更させる。
That is, when the sequence predicted by run hits a predetermined number of times consecutively, for example, twice, run is increased twice or the like. If the prediction continues to be correct, the prediction range is further expanded. On the other hand, the sequence predicted by run includes the inferior symbol twice or more, and the run is halved. If the prediction continues to be missed, it is further increased by a factor of two. Then, when run is 1 and it is the inferior symbol, the subsequent input sequence is inverted. That is, the dominant symbol is changed.

【0114】なお、runで予測した系列の後半部系列
に劣勢シンボルが存在するとき、runをいきなり1/
4等に減少させるようにしても良い。これは、後半部に
劣勢シンボルが存在するときは、次に続く系列に劣勢シ
ンボルが多く含まれると判断されているためである。こ
のため、runで予測した系列の前半部系列のみに劣勢
シンボルが存在するときは、後半部に劣勢シンボルが存
在するときより多い値、例えばrunを1/2倍するよ
うにしても良い。
When a less-probable symbol exists in the latter half of the sequence predicted by run, run is immediately changed to 1 /
It may be reduced to 4 or the like. This is because, when the inferior symbol exists in the latter half, it is determined that the following sequence includes many inferior symbols. For this reason, when the inferior symbol exists only in the first half sequence of the sequence predicted by run, a value larger than when the inferior symbol exists in the second half, for example, run may be multiplied by 1 /.

【0115】この実施の形態のエントロピー符号器12
内の符号化プロセスは、次に説明する図21および図2
2の符号化プロセスを改良したものであり、まずその符
号化プロセスについて説明する。改良前の符号化プロセ
スは、図21の符号化メインルーチンと図22の符号化
サブルーチンにより構成される。なお、図22中の符号
化サブルーチンは、サブルーチンから同じサブルーチン
を呼び出すいわゆる関数の再帰読出しを行っている。
The entropy encoder 12 of this embodiment
21 and FIG. 2 described below.
2 is an improved version of the encoding process. First, the encoding process will be described. The encoding process before improvement includes an encoding main routine of FIG. 21 and an encoding subroutine of FIG. The encoding subroutine in FIG. 22 performs recursive reading of a function that calls the same subroutine from the subroutine.

【0116】まず、図21の符号化メインルーチンの各
ステップについて説明する。なお、符号化の対象は2値
のビット列からなる入力系列となっている。最初に、予
測の初期値runの設定と優勢シンボルの選択(“0”
または“1”)を行う(ステップS50)。次に、ロー
カル変数ofsに0を、widthにrunを代入する
(ステップS51)。ここでofsは、符号化のために
予め定義した配列Aのポインタで、予測開始ビット位置
を示す。したがって初期値は0となる。widthはo
fsで示したビット位置から何ビットを予測の対象にす
るかを示す値で、ここでは、予測の初期値runが代入
される。その後、予め定義した配列AのA〔ofs〕か
らA〔width−1〕までに入力ビットを書き込む
(ステップS52)。そして、A〔ofs〕からA〔w
idth−1〕のすべての要素が優勢シンボルのときス
テップS54へ進み、ひとつでも劣勢シンボルが含まれ
ているときは、ステップS55へ進む。
First, each step of the encoding main routine of FIG. 21 will be described. The encoding target is an input sequence composed of binary bit strings. First, setting of the initial value run of the prediction and selection of the dominant symbol (“0”
Or “1”) (step S50). Next, 0 is substituted for the local variable ofs and run is substituted for the width (step S51). Here, ofs is a pointer of the array A defined in advance for encoding, and indicates a prediction start bit position. Therefore, the initial value is 0. width is o
A value indicating how many bits are to be predicted from the bit position indicated by fs. In this case, the initial value of prediction run is substituted. Then, input bits are written from A [ofs] to A [width-1] of the array A defined in advance (step S52). Then, from A [ofs] to A [w
If all elements of [idth-1] are superior symbols, the process proceeds to step S54. If at least one inferior symbol is included, the process proceeds to step S55.

【0117】予測が的中した場合、符号語として予測当
たり信号“0”を出力し、配列Aに取り込んだ系列の符
号化を完了する(ステップS54)。一方、予測はずれ
た場合、符号語として予測はずれ信号“1”を出力する
(ステップS55)。そして、widthが1以上か否
かを検出する(ステップS56)。widthが1以下
ならこれ以上分割できないので、ステップS7の符号化
サブルーチンへは移行せずステップS58へ移行する。
一方、widthが1を超えていると、図22の符号化
サブルーチンを呼び出す(ステップS57)。
If the prediction is correct, a signal "0" is output as a code word per prediction, and the encoding of the sequence taken into array A is completed (step S54). On the other hand, if the prediction is incorrect, a mispredicted signal "1" is output as a code word (step S55). Then, it is detected whether the width is 1 or more (step S56). If the width is equal to or less than 1, the image cannot be further divided, so that the process proceeds to step S58 without going to the encoding subroutine of step S7.
On the other hand, if the width exceeds 1, the encoding subroutine in FIG. 22 is called (step S57).

【0118】ステップS58では、予測runの再設定
と必要ならば優勢シンボルの変更を行う。すなわち、こ
のステップS58においては、基本的には予測が的中す
れば、runを大きくし、はずれれば小さくする。そし
てrunを小さくしても予測が所定回数はずれ続けるよ
うなら、優勢シンボルの変更を行う。なお、予測の的中
や予測のはずれをどのように評価するかについては、さ
まざまな方法を採用することができる。たとえば、予測
がはずれた場合、直ちにrunを小さくしたり、2回以
上連続してはずれたとき、初めてrunを小さくする等
の方法を採用することができる。さらに、前半部系列も
しくは後半部系列のみはずれた場合と、両方はずれた場
合とでrunの縮小の度合いを異ならせる方法も採用で
きる。また、符号済みビット系列で所定の確率テーブル
を引き、次の予測runを設定する等の方式も採用可能
である。
In step S58, the prediction run is reset and, if necessary, the dominant symbol is changed. That is, in this step S58, basically, if the prediction is correct, the run is increased, and if it is off, the run is reduced. If the prediction continues to shift a predetermined number of times even when run is reduced, the dominant symbol is changed. It should be noted that various methods can be adopted as to how to evaluate a hit or a wrong prediction. For example, it is possible to adopt a method in which the run is reduced immediately when the prediction is incorrect, or the run is reduced for the first time when the prediction is incorrectly performed two or more times. Furthermore, a method can be employed in which the degree of run reduction differs between when only the first half sequence or the second half sequence is deviated and when both are deviated. It is also possible to adopt a method of drawing a predetermined probability table with an encoded bit sequence and setting the next prediction run.

【0119】符号化メインルーチンで1次予測がはずれ
た場合は、ステップS57で図22に示す符号化サブル
ーチンを呼び出す。符号化サブルーチンへ渡す引き数
は、ofsとwidthである。以下、符号化サブルー
チンの各ステップについて説明する。
If the primary prediction deviates in the encoding main routine, an encoding subroutine shown in FIG. 22 is called in step S57. Arguments to be passed to the encoding subroutine are ofs and width. Hereinafter, each step of the encoding subroutine will be described.

【0120】符号化サブルーチンでは、予測を前半部系
列と後半部系列に分けて行うため、予測の範囲を半分に
する(ステップS60)。すなわち、親ルーチンから引
き数として受け取ったwidthを1/2にする。そし
て、次のステップS61で、前半部系列(配列のA〔o
fs〕からA〔ofs+width−1〕まで)がすべ
て優勢シンボルか否かをチェックする。すべて優勢シン
ボルならステップS62へ進む。ひとつでも劣勢シンボ
ルが存在したら、直ちにステップS64へ進む。
In the encoding subroutine, since the prediction is performed separately for the former half sequence and the latter half sequence, the range of the prediction is halved (step S60). That is, the width received as an argument from the parent routine is halved. Then, in the next step S61, the first half sequence (A [o of the array)
fs] to A [ofs + width-1]) are all checked symbols. If all the symbols are superior, the process proceeds to step S62. If at least one inferior symbol exists, the process immediately proceeds to step S64.

【0121】前半部系列がすべて優勢シンボルなら、符
号語として“0”を出力する(ステップS62)。そし
て、前半部系列の先頭位置を示すポインタofsにwi
dthを加え、後半部系列の先頭位置を示すように変更
する。また、前半部系列がすべて優勢シンボルのとき
は、後半部系列に必ず劣勢シンボルが存在するので、後
半部系列の予測がはずれたことを示す符号語“1”を出
力する必要がない。したがって、後述するステップS7
0はスキップし、ステップS71に進む。
If all the first half sequences are dominant symbols, "0" is output as a codeword (step S62). Then, the pointer ofs indicating the head position of the first half series is set to wi.
dth is added to change to indicate the head position of the latter half series. Further, when the first half sequence is all dominant symbols, since the inferior symbol always exists in the second half sequence, there is no need to output the code word “1” indicating that the prediction of the second half sequence has been lost. Therefore, step S7 described later
0 is skipped and the process proceeds to step S71.

【0122】一方、前半部系列に劣勢シンボルが存在す
る場合、符号語として“1”を出力する(ステップS6
4)。次に、widthが1を超えているか否かをチェ
ックする(ステップS65)。1以下の場合、これ以上
分割できないので、子の符号化サブルーチン(ステップ
S66)の呼び出しをスキップし、ステップS67へ移
行する。なお、widthが2以上なら、さらに系列を
2つに分け、それぞれを符号化しなければならない。そ
のための子の符号化サブルーチンを呼び出す(ステップ
S66)。子の符号化サブルーチンは、図22に示した
符号化サブルーチンと全く同一となっている。つまり、
ここでは、同一ルーチン(関数)の再帰呼び出しを行
う。
On the other hand, when the inferior symbol exists in the first half sequence, "1" is output as the code word (step S6).
4). Next, it is checked whether the width exceeds 1 (step S65). If the value is equal to or less than 1, the image cannot be further divided, so that the call of the child encoding subroutine (step S66) is skipped, and the process proceeds to step S67. If the width is 2 or more, it is necessary to further divide the sequence into two and encode each of them. The child encoding subroutine for that purpose is called (step S66). The child encoding subroutine is exactly the same as the encoding subroutine shown in FIG. That is,
Here, the same routine (function) is recursively called.

【0123】符号化サブルーチンの再帰呼び出しによっ
て前半部系列の符号化を終了すると、前半部系列の先頭
位置を示すポインタofsにステップS60で設定した
widthを加え、後半部系列の先頭位置を示すように
変更する(ステップS67)。その後、後半部系列(配
列のA〔ofs〕からA〔ofs+width−1〕ま
で)がすべて優勢シンボルか否かをチェックする(ステ
ップS68)。すべて優勢シンボルならステップS69
へ進む。ひとつでも劣勢シンボルが存在したら、直ちに
ステップS70へ進む。そして、後半部系列がすべて優
勢シンボルなら、符号語として“0”を出力する(ステ
ップS69)。
When the encoding of the first half sequence is completed by recursive calling of the encoding subroutine, the width set in step S60 is added to the pointer ofs indicating the start position of the first half sequence, and the start position of the second half sequence is indicated. It is changed (step S67). Thereafter, it is checked whether or not all the latter half sequences (from A [ofs] to A [ofs + width-1] in the arrangement) are all dominant symbols (step S68). If all symbols are superior, step S69
Proceed to. If at least one inferior symbol exists, the process immediately proceeds to step S70. If all of the latter half sequences are dominant symbols, "0" is output as a codeword (step S69).

【0124】一方、前半部系列に劣勢シンボルが存在す
る場合、符号語として“1”を出力する(ステップS7
0)。そして、次に、widthが1を超えているか否
かをチェックする(ステップS71)。1以下の場合、
これ以上分割できないので、子の符号化サブルーチンを
実行するステップS72をスキップし、次の注目系列の
符号化工程へリターンする。なお、後半部系列について
も、widthが2以上なら、さらに系列を2つに分
け、それぞれ符号化する。そのため図22に示す符号化
サブルーチンと同一の子の符号化サブルーチンを呼び出
す(ステップS72)。この符号化サブルーチンの再帰
呼び出しによって後半部系列の符号化を実行する。
On the other hand, when the inferior symbol exists in the first half sequence, "1" is output as the code word (step S7).
0). Then, it is checked whether the width exceeds 1 (step S71). If less than 1,
Since the image cannot be further divided, the step S72 of executing the child encoding subroutine is skipped, and the process returns to the encoding process of the next sequence of interest. If the width of the latter half sequence is 2 or more, the sequence is further divided into two and encoded. Therefore, the same child encoding subroutine as the encoding subroutine shown in FIG. 22 is called (step S72). By the recursive call of this encoding subroutine, encoding of the latter half part series is executed.

【0125】以上のような符号化プロセスの具体例を次
に説明する。すなわち、符号化の具体例として、予測の
初期値runを8、優勢シンボルを“0”として、“0
0001001”として表される入力ビットを符号化す
る場合について説明する。
Next, a specific example of the above-described encoding process will be described. That is, as a specific example of the encoding, the initial value of prediction run is set to 8, the dominant symbol is set to “0”, and “0” is set to “0”.
A case where an input bit represented as 0001001 "is encoded will be described.

【0126】まず、図21の符号化メインルーチンのス
テップS52で、A
First, in step S52 of the encoding main routine of FIG.

〔0〕からA〔7〕に、上記の入力
ビットを入力する。ステップS53では、A
The above input bits are input from [0] to A [7]. In step S53, A

〔0〕から
A〔7〕のすべてが“0”かどうか判定する。上の例の
場合、ビット列に“1”が含まれているので、ステップ
S55に移行し、まず符号語として“1”を出力する。
続いてステップS56では、widthの大きさをチェ
ックするが、widthはこのとき8なので、符号化サ
ブルーチン(ステップS57)に進む。
It is determined whether all of [0] to A [7] are “0”. In the case of the above example, since "1" is included in the bit string, the process proceeds to step S55, and "1" is first output as a codeword.
Subsequently, in step S56, the size of the width is checked. Since the width is 8 at this time, the process proceeds to the encoding subroutine (step S57).

【0127】符号化サブルーチンでは、まずステップS
60で、widthを1/2の4に設定する。そしてス
テップS61で、入力ビットの前半部、つまりA
In the encoding subroutine, first, in step S
At 60, the width is set to 1/2, ie, 4. Then, in step S61, the first half of the input bit, that is, A

〔0〕
からA〔3〕がすべて0かどうかチェックする。この場
合、すべて“0”なのでステップS62に進み、符号語
として“0”を出力する。以上で前半部系列の符号化が
完了する。続いてステップS63を実行し、後半部系列
の符号化に移るが、前半部系列がすべて“0”の場合、
後半部系列に“1”が含まれるのは明らかである。した
がって、ステップS71でwidthが1以下でない限
り後半部系列をさらに分割して符号化しなければならな
い。そこで、符号化サブルーチンを子プロセスとしてス
テップS72で再び呼び出す。なお、そのための前処理
として、上述したようにステップS63では、ofsに
widthを加え、ofsを後半部系列の先頭位置にセ
ットする。
[0]
To A [3] are all 0. In this case, since all are "0", the process proceeds to step S62, and "0" is output as a code word. Thus, the encoding of the first half sequence is completed. Subsequently, step S63 is executed, and the process proceeds to the encoding of the latter half part sequence.
Obviously, the latter half series includes "1". Therefore, unless the width is not less than 1 in step S71, the latter half sequence must be further divided and encoded. Therefore, the encoding subroutine is called again in step S72 as a child process. As a pre-process for that purpose, in step S63, the width is added to ofs, and the ofs is set to the head position of the latter half series, as described above.

【0128】ステップS72では、ofsとwidth
を引き数として子の符号化サブルーチンを呼び出す。子
の符号化サブルーチンを実行するステップS72では、
まず、図22に示す符号化サブルーチンのステップS6
0でwidthをさらに半分にして2に変更する。次の
ステップS61では、前半部系列、すなわちA〔4〕と
A〔5〕が共に“0”であるか否かをチェックする。こ
の場合、A〔4〕が“1”なので、次のステップS64
に移行し、符号語として“1”を出力する。そしてステ
ップS65でwidthが1を超えていると判断し、孫
プロセスをステップS66で呼び出す。孫の符号化サブ
ルーチンでは、まずステップS60においてwidth
が1となる。A〔4〕は“1”なのでステップS61か
らステップS64へ処理が移り、符号語“1”を出力す
る。ステップS65では、widthが1以下なので、
ステップS66をスキップし、ステップS67でofs
を5に変更する。A〔5〕は“0”なのでステップS6
8からステップS69に処理が移り、符号語“0”を出
力する。
In step S72, ofs and width are set.
Is called as an argument, and the child encoding subroutine is called. In step S72 of executing the child encoding subroutine,
First, step S6 of the encoding subroutine shown in FIG.
At 0, the width is further halved and changed to 2. In the next step S61, it is checked whether or not both the first half series, that is, A [4] and A [5] are both "0". In this case, since A [4] is "1", the next step S64
And outputs "1" as a code word. Then, in step S65, it is determined that the width exceeds 1, and the grandchild process is called in step S66. In the grandchild encoding subroutine, first, in step S60, the width is
Becomes 1. Since A [4] is "1", the process moves from step S61 to step S64, and outputs a code word "1". In step S65, since the width is 1 or less,
Step S66 is skipped.
To 5. Since A [5] is "0", step S6
From 8, the process proceeds to step S <b> 69 to output a code word “0”.

【0129】次に、この孫の符号化サブルーチンから抜
けて、子の符号化サブルーチンのステップS67に戻
る。子の符号化サブルーチンのofsは4、width
は2であるから、ステップS67でofsは6に変更さ
れる。したがってステップS68では、A〔6〕とA
〔7〕をチェックすることになる。この場合、A〔7〕
が“1”なのでステップS70へ移行し、符号語“1”
を出力する。そして、再び孫の符号化サブルーチンをス
テップS72で呼び出す。孫の符号化サブルーチンで
は、A〔6〕が“0”なのでステップS62で符号語
“0”を出力する。そして、widthが1なので、ス
テップS72をスキップして子の符号化サブルーチンに
復帰する。
Next, the process exits from the grandchild encoding subroutine and returns to step S67 of the child encoding subroutine. Ofs of child encoding subroutine is 4, width
Is 2, the value ofs is changed to 6 in step S67. Therefore, in step S68, A [6] and A
[7] will be checked. In this case, A [7]
Is "1", the flow shifts to step S70, where the code word "1"
Is output. Then, the grandchild encoding subroutine is called again in step S72. In the grandchild encoding subroutine, since A [6] is "0", the code word "0" is output in step S62. Since the width is 1, the process skips step S72 and returns to the child encoding subroutine.

【0130】子の符号化サブルーチンに復帰したプロセ
スは、さらに符号化メインルーチンに復帰し、ステップ
S58で予測runの再設定と、優勢シンボルの再設定
を行う。この例の場合、1次予測ははずれたが、2次予
測で前半部が的中したので、runを8から4に変更
し、優勢シンボルは引き続き“0”とする処理を施す。
なお、予測runの設定は、2回続けてはずれたときに
変更する等の設定にしても良い。
The process that has returned to the child encoding subroutine further returns to the encoding main routine, and resets the predicted run and the dominant symbol in step S58. In this example, the primary prediction was missed, but the first half was hit in the secondary prediction, so run is changed from 8 to 4, and the process of continuously setting the dominant symbol to "0" is performed.
Note that the setting of the predicted run may be changed, for example, when the prediction run is missed twice.

【0131】このような符号化プロセスによって、入力
ビットである“00001001”が“101101
0”の符号化系列となる。したがってこの場合、8ビッ
トの入力系列が7ビットに圧縮されたことになる。
By such an encoding process, the input bit “000000101” is changed to “101101”.
The encoded sequence is 0 ". Therefore, in this case, the input sequence of 8 bits is compressed to 7 bits.

【0132】なお、復号化プロセスについては、符号化
プロセスと逆のアルゴリズムによって、入力されてくる
符号語を復号している。すなわち、復号化プロセスも、
復号化メインルーチンと復号化サブルーチンにより構成
され、符号化と逆のアルゴリズムによって復号してい
る。
In the decoding process, an input codeword is decoded by an algorithm reverse to that of the encoding process. That is, the decryption process also
It consists of a decoding main routine and a decoding subroutine, and performs decoding by an algorithm opposite to the encoding.

【0133】このように、図21および図22に示す符
号化プロセスおよびその符号化プロセスと逆のアルゴリ
ズムを使用して行う復号化プロセスでは、圧縮率が従来
のQMコーダと呼ばれるものと同レベルであり、一方、
符号化時間や復号化時間は大幅に短縮されたものとなっ
ている。しかし、この符号化プロセスおよび復号化プロ
セスにおいては、予測ビット数であるrunで定まるビ
ット列を一度に符号化しているため、圧縮率を高めるた
めに、runの最大値を大きく設定すると、runの個
数分のビットを保存しておくためのバッファが大きくな
るという問題が生じる。
As described above, in the encoding process shown in FIGS. 21 and 22 and the decoding process performed using the algorithm reverse to the encoding process, the compression ratio is at the same level as that of a conventional QM coder. Yes,
The encoding time and the decoding time are greatly reduced. However, in the encoding process and the decoding process, a bit string determined by the number of predicted bits, run, is encoded at a time. Therefore, in order to increase the compression ratio, if the maximum value of run is set to be large, the number of run There is a problem that a buffer for storing the minute bits becomes large.

【0134】この問題は、マルコフ状態信号CXをマル
コフモデル化から得るような場合、そのバッファが非常
に大きくなり、さらに大きな問題となる。すなわち、仮
にrunをnとしたとき、バッファとしてはnビット分
必要となり、さらにm状態のマルコフモデル化を行う
と、バッファは各状態毎に必要となるため、n×mビッ
トの容量になる。この容量は、runの値が大きくなる
と無視できなくなる大きさとなる。
This problem becomes more serious when the Markov state signal CX is obtained from Markov modeling, because the buffer becomes very large. That is, if run is assumed to be n, n buffers are required for the buffer, and if the Markov model of m states is further performed, the buffer is required for each state, so that the capacity becomes n × m bits. This capacity becomes a size that cannot be ignored as the value of run increases.

【0135】また、図21および図22に示す符号化プ
ロセスおよびその符号化プロセスと逆のアルゴリズムを
使用する復号化プロセスでは、その各処理時間は、QM
コーダに比べ大幅に短縮されているものの、符号化や復
号化のサブルーチンを再帰的に呼び出して符号化や復号
化を行っており、このサブルーチンの再帰的呼び出しの
プロセスで時間を有するものとなっている。
In the encoding process shown in FIGS. 21 and 22 and the decoding process using an algorithm reverse to the encoding process, each processing time is equal to QM
Although it is much shorter than the coder, it performs encoding and decoding by recursively calling the encoding and decoding subroutines, and this recursive call of the subroutine has time. I have.

【0136】このため、本実施の形態では、図18から
図22に示す符号化プロセスおよび復号化プロセスを生
かしつつ、デコード用のバッファを小さくしたり、符号
化や復号化の時間をさらに減少できるデータ符号化方法
等を採用している。以下、本発明の実施の形態における
インデックス変換部7,8の動作の基本的な考え方を、
図23から図34に基づき説明する。
Therefore, in the present embodiment, it is possible to reduce the size of the decoding buffer and to further reduce the encoding and decoding time while making use of the encoding and decoding processes shown in FIGS. A data encoding method and the like are adopted. Hereinafter, the basic concept of the operation of the index conversion units 7 and 8 in the embodiment of the present invention will be described.
This will be described with reference to FIGS.

【0137】まず、本発明の実施の形態で使用されるエ
ントロピー符号器12を、図23に基づき説明する。
First, the entropy encoder 12 used in the embodiment of the present invention will be described with reference to FIG.

【0138】このエントロピー符号器12は、エントロ
ピー符号化装置となっており、符号化すべき2値ビット
列を入力するビット列分解部22と、各予測ビット長r
un毎に符号化テーブルを内蔵する符号化テーブル部2
3と、符号化テーブル部23から入力される可変長符号
を一旦バッファリングして固定のビット幅にならして出
力するストリーム生成部24と、後述する状態遷移表を
内蔵し、予測ビット長run等を設定する符号化制御部
25とから主に構成される。
The entropy encoder 12 is an entropy encoding device, and includes a bit string decomposition section 22 for inputting a binary bit string to be encoded, and a prediction bit length r
Coding table unit 2 with a built-in coding table for each un
3, a stream generation unit 24 for temporarily buffering the variable-length code input from the encoding table unit 23 to output a fixed bit width, and a state transition table described later. And the like.

【0139】ここで、符号化制御部25には、状態遷移
表を有する状態遷移部26と、マルコフモデル等により
生成される符号化条件を入力し、その条件毎に現在の状
態の信号を状態遷移部26に与え、符号化後に次の状態
の信号入力し、その符号化の状態を記憶しておく状態記
憶部27とが設けられている。
Here, a state transition unit 26 having a state transition table and an encoding condition generated by a Markov model or the like are input to the encoding control unit 25, and the signal of the current state is converted into a state for each condition. There is provided a state storage section 27 which is provided to the transition section 26, receives a signal of the next state after encoding, and stores the state of the encoding.

【0140】したがって、マルコフモデルのような条件
付き符号化を行うときは、条件をインデックスとして、
状態記憶部27から該当する状態を取り出し、その状態
を後述する図28に示した状態遷移表により遷移させ、
次の状態を再び状態記憶部27の元の番地にストアして
おけば、条件毎に、状態を管理できることとなる。した
がって、予測ビット長run等のパラメータも条件毎に
個別に設定できることとなる。なお、マルコフモデル化
する場合、ビット列分解部22には、各符号化条件毎に
切り換えるバッファが複数必要となるが、この実施の形
態では、予測ビット長runの数ではなく、より小さい
固定の区切りビット数pで段階的に符号化しているの
で、そのバッファの容量はそれ程大きくならず、実用面
で適したものとなっている。
Therefore, when performing conditional coding such as the Markov model, the condition is used as an index and
The corresponding state is taken out from the state storage unit 27, and the state is transited according to a state transition table shown in FIG.
If the next state is stored in the original address of the state storage unit 27 again, the state can be managed for each condition. Therefore, parameters such as the predicted bit length run can be individually set for each condition. In the case of using Markov models, the bit string decomposing unit 22 requires a plurality of buffers to be switched for each encoding condition. However, in this embodiment, not a number of predicted bit lengths run but a smaller fixed delimiter Since the coding is performed stepwise with the number of bits p, the capacity of the buffer does not increase so much, which is suitable for practical use.

【0141】ビット列分解部22は、符号化制御部25
から予測ビット長runを指示する信号RUNと、優勢
シンボルを指示する信号SWを入力する。ここで、信号
RUNは、1からn(nは最大予測ビット長)の値を取
る。また、信号SWは、その値が「0」のとき、“0”
を優勢シンボルとし、「1」のとき、“1”を優勢シン
ボルとするが、その逆でも構わない。
The bit string decomposing unit 22 includes an encoding control unit 25
, A signal RUN indicating a prediction bit length run and a signal SW indicating a dominant symbol are input. Here, the signal RUN takes a value from 1 to n (n is the maximum predicted bit length). When the value of the signal SW is “0”, “0”
Is the dominant symbol, and when it is "1", "1" is the dominant symbol, but vice versa.

【0142】さらに、ビット列分解部22は、デコード
すべきビット数の信号DECNUMと、デコードすべき
ビットのパターンとなる信号パターンDECPATNを
符号化テーブル部23に出力する。信号DECNUM
は、入力ビット列に、劣勢シンボルを含む4ビットのパ
ターンが現れたとき、その4ビットとそれまで続いた優
勢シンボル個数の合計数となる。なお、信号RUNが
「4」未満のときは、信号RUNと同じ値が出力され
る。これは、この実施の形態では、区切りビット数pを
「4」としているためである。
Further, the bit string decomposing unit 22 outputs to the encoding table unit 23 a signal DECNUM of the number of bits to be decoded and a signal pattern DECPATN which is a pattern of the bits to be decoded. Signal DECNUM
Is the total number of 4 bits and the number of superior symbols that have continued up to that point when a 4-bit pattern including inferior symbols appears in the input bit string. When the signal RUN is less than “4”, the same value as the signal RUN is output. This is because the number of delimiter bits p is set to “4” in this embodiment.

【0143】このようにして、ビット列分解部22は、
入力したビット列が信号RUNで指定されたビット数
分、すべて信号SWで指定された優勢シンボルが続いた
とき、すなわち、予測が的中したとき、信号DECNU
Mとして信号RUNの値を、信号パターンDECPAT
Nとして“0”を出力する。
As described above, the bit string decomposing unit 22
When the dominant symbol specified by the signal SW continues for the input bit string for the number of bits specified by the signal RUN, that is, when the prediction is successful, the signal DECNU
The value of the signal RUN is set as the signal pattern DECPAT.
"0" is output as N.

【0144】符号化テーブル部23は、図24から図2
7に示すような符号化テーブルを内蔵しており、どのテ
ーブルを用いるかは、符号化制御部25からのテーブル
番号指示信号TABLEにより選択される。そして、こ
の符号化テーブル部23は、ビット列分解部22からの
信号DECNUMと信号パターンDECPATNにより
所定のテーブル内を検索し、所定の圧縮ビット列DEC
BITとそのビット長LENGTHおよび予測の当たり
外れを示すFAILを出力する。なお、信号TABLE
は、信号RUNと1対1の関係を有するものとなってい
る。
The encoding table unit 23 is shown in FIG.
7, the table to be used is selected by a table number instruction signal TABLE from the encoding control unit 25. The encoding table unit 23 searches a predetermined table based on the signal DECNUM and the signal pattern DECPTN from the bit string decomposing unit 22, and searches for a predetermined compressed bit string DEC.
The BIT, its bit length LENGTH, and FAIL indicating a prediction hit or miss are output. In addition, the signal TABLE
Has a one-to-one relationship with the signal RUN.

【0145】図24の符号化テーブルは、テーブル番号
は「0」で、信号RUNの値が「1」、すなわちrun
が「1」の場合を示している。図24に示されるよう
に、runが「1」のときは、2種類の信号となってい
る。すなわち、デコードすべきビット数は1個であり、
信号パターンは“0”と“1”の2種類となる。この2
種類の入力信号に対して、圧縮ビット列DECBIT
と、そのビット長LENGTHと、予測の列外れを示す
フラグFAILの組み合わせからなる2種類の信号が対
応する。例えば、信号DECNUMが「1」で、信号パ
ターンDECPATNが“0”の場合は、予測当たりと
なり、フラグFAILは当たり信号の「0」となり、圧
縮ビット列DECBITは“0”となり、ビット長LE
NGTHは「1」となる。
In the encoding table of FIG. 24, the table number is “0” and the value of signal RUN is “1”, that is, run
Is "1". As shown in FIG. 24, when run is "1", there are two types of signals. That is, the number of bits to be decoded is one,
There are two types of signal patterns, "0" and "1". This 2
Compressed bit string DECBIT
And two types of signals corresponding to the combination of the bit length LENGTH and the flag FAIL indicating a column out of prediction. For example, when the signal DECNUM is “1” and the signal pattern DECCATN is “0”, a prediction hit occurs, the flag FAIL becomes a hit signal “0”, the compressed bit string DECBIT becomes “0”, and the bit length LE
NGTH is "1".

【0146】図25の符号化テーブルは、テーブル番号
が「1」で、runが2の場合を示している。なお、各
符号化テーブルの信号パターンDECPATNと圧縮ビ
ット列DECBITは、共に右側から左側に入力してく
る信号を示している。この図25の場合、その信号形態
は4種類となる。デコードすべきビット数はすべて2個
であり、そのときの信号パターンDECPATNは“0
0”“10”“01”“11”の4種類となる。信号パ
ターンDECPATNが“00”のときは、2つとも優
勢シンボルのため予測が当たったこととなり、フラグF
AILは当たり信号の「0」となると共に、そのときの
圧縮ビット列DECBITは“0”となり、ビット長L
ENGTHは「1」となる。
The encoding table of FIG. 25 shows a case where the table number is “1” and run is 2. The signal pattern DECPTN and the compressed bit string DECBIT of each encoding table both indicate signals input from the right to the left. In the case of FIG. 25, the signal forms are four types. The number of bits to be decoded is all two, and the signal pattern DECPTN at that time is “0”.
0, 10, 10, 01. When the signal pattern DECPTN is "00", both of the symbols are the predominant symbols, so that the prediction was successful, and the flag F
AIL becomes "0" of the hit signal, and the compressed bit string DECBIT at that time becomes "0", and the bit length L
ENGTH becomes “1”.

【0147】一方、信号パターンDECPATNが“1
0”のときは、劣勢シンボル“1”が入っており、予測
が外れたこととなる。この結果、フラグFAILは、外
れ信号の「1」となり、圧縮ビット列DECBITは、
最初に“1”がくる。次に、“10”の前半部が“0”
であるため、予測が当たり圧縮ビット列DECBITの
2番目は“0”となり、“01”となる。ここで、最初
に予測外れとなっているので、後半部に“1”があるこ
ととなる。このため、圧縮ビット列DECBITは、こ
の“01”がそのまま採用される。
On the other hand, when the signal pattern DECPTN is "1"
When the value is "0", the inferior symbol "1" is included, which means that the prediction has been missed.As a result, the flag FAIL becomes "1" of the missed signal, and the compressed bit string DECBIT becomes
"1" comes first. Next, the first half of “10” is “0”
, And the second bit of the compressed bit string DECBIT becomes “0” and becomes “01”. Here, since the prediction is initially unsuccessful, there is "1" in the latter half. For this reason, this “01” is used as it is in the compressed bit string DECBIT.

【0148】信号パターンDECPATNが“01”の
ときは、劣勢シンボル“1”が入っており、予測が外れ
たこととなる。この結果、フラグFAILは外れ信号の
「1」となり、圧縮ビット列DECBITは最初に
“1”がくる。次に、“01”の前半部が“1”である
ため、予測がまたも外れたこととなり、圧縮ビット列D
ECBITの2番目は“1”となる。信号パターンDE
CPATN“01”の後半部は“0”であるため、予測
当たりとなり、圧縮ビット列DECBITの3番目は
“0”となる。すなわち、信号パターンDECPATN
“01”に対応する圧縮ビット列DECBITは、“0
11”となる。そして、ビット長LENGTHは「3」
となる。同様にして、信号パターンDECPATN“1
1”に対する圧縮ビット列DECBITは、“111”
となる。以上の4種類の信号の対応表が図20となって
いる。
When the signal pattern DECPTN is "01", the inferior symbol "1" has been entered, which means that the prediction was incorrect. As a result, the flag FAIL becomes the departure signal “1”, and the compressed bit string DECBIT first comes “1”. Next, since the first half of “01” is “1”, the prediction is again lost, and the compressed bit string D
The second of the ECBIT is "1". Signal pattern DE
Since the latter half of CPUTN “01” is “0”, it is a prediction hit and the third of the compressed bit string DECBIT is “0”. That is, the signal pattern DECPTN
The compressed bit string DECBIT corresponding to “01” is “0”.
11 ". The bit length LENGTH is" 3 ".
Becomes Similarly, the signal pattern DECPTN “1”
The compressed bit string DECBIT for "1" is "111".
Becomes FIG. 20 shows a correspondence table of the above four types of signals.

【0149】同様にして、テーブル番号が「2」で、r
unが「4」の16種類の信号の対応関係が図26に示
され、テーブル番号「3」でrunが「8」の計31種
類の信号の対応関係が図27に示されている。なお、図
26のrunが「4」の場合では、runの値が区切り
ビット数pと同じとなるので、図24および図25と全
く同じ関係のみのものとなるが、図27のrunが
「8」の場合は、区切りビット数p(この実施の形態で
はp=4)より大きくなるため、少し変更された表とな
る。
Similarly, if the table number is “2” and r
FIG. 26 shows the correspondence relationship between 16 types of signals whose un is “4”, and FIG. 27 shows the correspondence relationship of a total of 31 types of signals whose table number is “3” and run is “8”. When the run in FIG. 26 is "4", the value of run is the same as the number of delimiter bits p, so that only the same relationship as in FIGS. 24 and 25 is obtained. In the case of "8", the number of delimiter bits is larger than p (p = 4 in this embodiment), so that the table is slightly modified.

【0150】次に、他の表とは若干異なるこの図27の
符号化テーブルの内容を説明する。この符号化テーブル
では、デコードすべき信号のビット数DECNUMは、
「8」のものと「4」のものが存在する。「8」のもの
は、前半部がすべて“0000”のものであり、「4」
のものは、runが「8」で前半部に劣勢シンボル
“1”がきた場合のものを示している。デコードすべき
信号のビット数DECNUM(以下単にDECNUMと
して示す)が「8」で、信号パターンDECPATN
(以下単にDECPATNとして示す)が“0000”
のときは“00000000”であることを示し、予測
が当たったこととなり、フラグFAIL(以下単にFA
ILとして示す)は当たり信号の「0」となる。そし
て、圧縮ビット列DECBIT(以下単にDECBIT
として示す)は“0”で、ビット長LENGTH(以下
単にLENGTHとして示す)は「1」となる。DEC
NUMが「8」で、DECPATNが“1000”のと
きは、“10000000”であることを示し、予測が
外れたこととなり、FAILは外れ信号の「1」とな
る。そして、DECBITの1番目には“1”がくる。
次に、前半部“0000”は予測当たりとなり、DEC
BITの2番目には“0”がくる。このとき、後半部
“1000”に劣勢シンボル“1”が当然くることとな
るため、後半部の4つの信号に対するDECBITは、
特に発生しない。
Next, the contents of the encoding table of FIG. 27 slightly different from the other tables will be described. In this encoding table, the number of bits DECNUM of the signal to be decoded is:
There are "8" and "4". In the case of “8”, the first half is all “0000” and “4”
Indicates a case where the run is "8" and the inferior symbol "1" comes in the first half. The number of bits DECNUM (hereinafter simply referred to as DECNUM) of a signal to be decoded is “8”, and the signal pattern DECPTN
(Hereinafter simply referred to as DECPTN) is "0000"
Indicates that it is “00000000”, which means that the prediction was successful, and the flag FAIL (hereinafter simply referred to as FA
IL) is "0" of the hit signal. Then, the compressed bit string DECBIT (hereinafter simply referred to as DECBIT
) Is “0”, and the bit length LENGTH (hereinafter simply referred to as LENGTH) is “1”. DEC
When NUM is "8" and DECPTN is "1000", it indicates "10000000", which means that the prediction has been lost, and FAIL becomes "1" of the disconnection signal. Then, "1" comes at the first of the DECBIT.
Next, the first half “0000” becomes a prediction hit, and DEC
"0" comes at the second of the BIT. At this time, since the inferior symbol “1” naturally comes to the latter half “1000”, the DECBIT for the four signals in the latter half is:
No particular problem occurs.

【0151】後半部“1000”の中の前半部“00”
は、予測当たりであり、3番目のDECBITは“0”
となる。このとき、後半部“10”に劣勢シンボル
“1”が当然くることとなるため、後半部の2つの信号
に対するDECBITは特に発生しない。そして、この
後半部“10”の前半部“0”は予測当たりとなり、4
番目のDECBITは“0”となる。こうなると、最後
尾に“1”があることが当然となり、特にDECBIT
は発生しない。よって、DECPATN“1000”に
対応するDECBITは“0001”となる。そして、
LENGTHは「4」となる。これが、図27のテーブ
ル番号「3」の表の上から2番目の状態に対応する。
The first half “00” in the second half “1000”
Is per prediction, and the third DECBIT is “0”
Becomes At this time, since the inferior symbol “1” naturally comes to the latter half “10”, DECBIT for the two signals in the latter half is not particularly generated. Then, the first half “0” of this second half “10” becomes a prediction hit, and 4
The third DECBIT is "0". In this case, it is natural that there is a “1” at the end, and especially DECBIT
Does not occur. Therefore, DECBIT corresponding to DECPTN “1000” is “0001”. And
LENGTH is "4". This corresponds to the second state from the top of the table with the table number “3” in FIG.

【0152】このような関係は、図27の符号化テーブ
ルの第3番目から第16番目にも当てはまる。一方、図
27のテーブル番号「3」の上から第17番目から第3
1番目までは、DECNUMが「4」となり、図21の
テーブル番号「2」のものに近似する。すなわち、図2
1の符号化テーブルの第2番目から第16番目のもの
に、runが「8」として見たときの予測外れの“1”
がすべて最初に付加されたものと、図27のDECNU
M「4」のものとは同一となる。なお、符号化テーブル
部3より出力される符号は、LENGTHによって指定
される可変長符号になっている。
Such a relationship also applies to the third to sixteenth encoding tables in FIG. On the other hand, from the 17th to the third from the top of the table number "3"
Up to the first, DECNUM is "4", which is similar to that of table number "2" in FIG. That is, FIG.
In the second to sixteenth encoding tables of the encoding table No. 1, “1” which is a misprediction when the run is viewed as “8”
Are added first, and the DECNU in FIG.
It is the same as that of M “4”. The code output from the encoding table unit 3 is a variable length code specified by LENGTH.

【0153】この実施の形態では、さらにrunが16
のテーブルと、runが32のテーブルとを有してい
る。その両テーブルは、図27に示すrunが8のテー
ブル番号「3」の考え方と同様となっており、その説明
を省略する。
In this embodiment, run is 16
And a table with 32 run. The two tables have the same concept as the table number “3” of which run is 8 shown in FIG. 27, and a description thereof will be omitted.

【0154】ストリーム生成部24は、入力の可変長符
号を一旦バッファリングして、出力の伝送路で定められ
た固定のビット幅にならして出力するものとなってい
る。
The stream generating section 24 temporarily buffers the input variable length code, and outputs the buffer after arranging it to a fixed bit width determined by the output transmission path.

【0155】符号化制御部25の基本動作は、信号RU
N(以下単にRUNという)によってビット列分解部2
2にビットの切り出し方法を指示し、同時に信号TAB
LE(以下単にTABLEという)により符号化テーブ
ルの選択を行うものとなる。そして、符号化テーブル部
23からフィードバックされるFAILにより、次の符
号化のためのRUNとTABLEを設定する。なお、こ
の実施の形態では、区切りビット数pを利用した段階的
な符号化を導入したため、ある予測ビット長runで符
号化した際、必要に応じて途中の段階であることをこの
符号化制御部25は記憶する必要がある。
The basic operation of the encoding control unit 25 is as follows.
N (hereinafter simply referred to as RUN), the bit string decomposing unit 2
2 to indicate the bit extraction method, and at the same time, the signal TAB
The coding table is selected by LE (hereinafter simply referred to as TABLE). Then, the RUN and TABLE for the next encoding are set by the FAIL fed back from the encoding table unit 23. In this embodiment, stepwise encoding using the number p of delimiter bits is introduced. Therefore, when encoding is performed with a certain prediction bit length run, this encoding control may be performed at an intermediate stage as necessary. The unit 25 needs to memorize.

【0156】この符号化制御部25の具体的な動作は、
図28に示す状態遷移表に基づくものとなっている。こ
の状態遷移表の動作について、予測当たりが続く場合を
例にして説明する。ここで、初期状態は、SS1となっ
ている。まず、状態SS1のとき、runが「1」で、
TABLEは「0」である。このため、図24に示すテ
ーブル番号「0」の符号化テーブルが使用される。そし
て、予測が当たる場合は、優勢シンボルが“0”が続く
ことであるため、入力されるビット列入力からそのDE
CNUMの数である「1」個分の“0”のみを符号化テ
ーブル部23に送り、テーブル番号「0」のテーブル
(=図24の表)に基づいて、FAIL「0」と、DE
CBIT“0”と、LENGTH「1」とが出力され
る。そして、そのFAIL「0」が符号化制御部25に
伝えられる。
The specific operation of the encoding control unit 25 is as follows.
This is based on the state transition table shown in FIG. The operation of the state transition table will be described by taking a case where prediction hits are continued as an example. Here, the initial state is SS1. First, in the state SS1, run is “1”,
TABLE is “0”. Therefore, the encoding table of table number “0” shown in FIG. 24 is used. When the prediction is successful, the dominant symbol is “0”, which means that the bit string input from the input bit string
Only “0” of “1”, which is the number of CNUMs, is sent to the encoding table unit 23, and FAIL “0” and DE are determined based on the table of table number “0” (= table in FIG. 24).
CBIT “0” and LENGTH “1” are output. Then, the FAIL “0” is transmitted to the encoding control unit 25.

【0157】符号化制御部25は、図28の状態遷移表
に基づき、SS1中のFAIL「0」となるものを見つ
け、次の状態として状態SS0を選択する(図28の状
態遷移表の上から3番目)。このとき、信号SWは
“0”となるので、シンボルの逆転はなく、そのまま
“0”が優勢シンボルとなる。状態SS0においても、
同様な動作の結果、状態遷移表の第1番目が選択され、
状態SS3が次の状態となる。これによって、2回予測
が当たったこととなる。
The coding control unit 25 finds a FAIL “0” in SS1 based on the state transition table of FIG. 28, and selects the state SS0 as the next state (see the state transition table of FIG. 28). Third). At this time, since the signal SW becomes "0", there is no inversion of the symbol, and "0" becomes the dominant symbol as it is. Also in the state SS0,
As a result of the same operation, the first state transition table is selected,
State SS3 is the next state. This means that the prediction has been made twice.

【0158】この状態遷移表では、2回予測が当たる
と、runが2倍になる。すなわち、上から7番目およ
び8番の状態SS3となり、runが「2」となる。こ
のように予測が当たり続けると、すなわち、入力ビット
列がこの場合であると“0”であり続けると、runが
「2」「2」「4」「4」「8」「8」と増えていく。
また、一方、予測が外れ続けるときは、2回毎、同一r
unで行い小さくなっていく。すなわち、runが
「8」「8」「6」「6」「4」「4」「2」「2」と
小さくなっていく。そして、runが「1」のときに、
予測が外れると、信号SWは反転する。
In this state transition table, if prediction is successful twice, run is doubled. That is, the seventh and eighth states SS3 from the top are set, and the run becomes "2". If the prediction continues to be hit in this way, that is, if the input bit string continues to be “0” in this case, the run increases to “2” “2” “4” “4” “8” “8” Go.
On the other hand, if the prediction continues to be incorrect, the same r
It becomes smaller with un. That is, the run becomes smaller as “8” “8” “6” “6” “4” “4” “2” “2”. And when run is "1",
If the prediction is incorrect, the signal SW is inverted.

【0159】このような状態遷移表の動作のルールをま
とめると、次のとおりとなる。
The rules for the operation of such a state transition table can be summarized as follows.

【0160】(1)同一の予測ビット長runでの予測が
2回連続して的中したとき、予測ビット長runを2倍
する。
(1) When prediction with the same prediction bit length run is hit twice consecutively, the prediction bit length run is doubled.

【0161】(2)同一の予測ビット長runでの予測が
2回連続して外れたとき、予測ビット長runを1/2
倍する。
(2) When the prediction with the same prediction bit length run is missed twice consecutively, the prediction bit length run is reduced by half.
Multiply.

【0162】(3)予測ビット長runが4以下のとき
は、1回で符号化を実行する。
(3) If the prediction bit length run is 4 or less, the encoding is performed once.

【0163】(4)予測ビット長runが8で、DECN
UM=4のときは、2回に分けて符号化を実行する。
(4) When the predicted bit length run is 8, and the DECN
When UM = 4, the encoding is performed twice.

【0164】(5)このときは、状態SS5に遷移して、
予測ビット長runを「4」で、後半のビットを符号化
する。
(5) At this time, the state transits to the state SS5 and
The prediction bit length run is set to “4”, and the latter bit is encoded.

【0165】なお、信号SWの反転とは、この値が1の
とき、信号SWを反転させるという意味である。
The inversion of the signal SW means that when this value is 1, the signal SW is inverted.

【0166】なお、図28で示す状態遷移表は、run
が「8」までしか示していないが、この実施の形態で
は、runを最大「32」としているので、run「1
6」とrun「32」のものも、図示していないが同様
に作成されている。また、状態遷移表としては、run
が「64」以上のものにしても良い。さらに、当たりや
外れが2回続いたらrunを増加させたり減少させたり
するのではなく、1回毎に変えたり3回以上の数とした
り、種々のパターンを採用することができる。また、こ
のような符号化テーブルとしては、ビット数の少ないも
のだけを用意し、大きなビット数、例えば、16ビット
以上の場合は符号化テーブルを持たないようにすること
もできる。
It should be noted that the state transition table shown in FIG.
Indicates only up to “8”, but in this embodiment, since run is set to a maximum of “32”, run “1”
6 "and run" 32 "are similarly created, though not shown. In addition, as the state transition table, run
May be "64" or more. Further, if the hit or miss continues twice, the run may not be increased or decreased, but may be changed each time, or may be three or more times, or various patterns may be adopted. Also, as such an encoding table, only an encoding table having a small number of bits may be prepared, and if the number of bits is large, for example, 16 bits or more, the encoding table may not be provided.

【0167】次に、以上のような構成を有するエントロ
ピー符号器12の動作を具体例を使用して説明する。
Next, the operation of the entropy encoder 12 having the above configuration will be described using a specific example.

【0168】例えば、予測が当たり続けて、run=1
6となった状態で、“000001000011110
0………」のような形で入力してきたビット列を符号化
する場合、4ビットの区切りビット数pで区切り、ま
ず、最初は“00000100”までを符号化すること
となる。これは、劣勢シンボル“1”が第1番目の区切
りビット数(=最初の4ビット)部分にはなく、第2番
目(=次の4ビット)に出てくるためである。そして、
次に“0011”を、そして最後に“1100”を符号
化することとなる。
For example, if the prediction continues and run = 1
6 and “00000001000011110”
When encoding a bit string input in the form of “0...”, It is divided by a 4-bit delimiter bit number p, and first, up to “0000100100” is encoded. This is because the inferior symbol “1” does not exist in the first delimiter bit number (= first 4 bits) portion, but appears in the second (= next 4 bits). And
Next, “0011” is encoded, and finally “1100” is encoded.

【0169】このため、ビット列分解部22から出力さ
れるDECNUMは、「8」「4」「4」となる。一
方、DECPATNは、“0100”“0011”“1
100”(ここでは、いずれのパターンも左の数値から
入力されてくるとする)となる。このような条件におい
て、DECBITは、まず、run=16としたときの
予測外れの“1”がくる。次に、“00000100”
は、RUN「8」、TABLE「3」、DECNUM
「8」のため、図27に示す上から5番目に相当するも
のであり(図27に示す各数値の場合、それぞれ右端側
から入力されてくることに注意)、DECBITは“1
0100”となる。このため、先の“1”と合わせられ
た“110100”(この数値は左端から順に出力)の
DECBITとLENGTH「6」が符号化テーブル部
23からストリーム生成部24に出力される。
Therefore, the DECNUM output from the bit string decomposing unit 22 is “8”, “4”, and “4”. On the other hand, DECPTN is “0100” “0011” “1”
100 "(in this case, all patterns are assumed to be input from the left numerical value). Under such conditions, DECBIT firstly becomes" 1 ", which is a disappointment when run = 16. Next, "00000100"
Is RUN "8", TABLE "3", DECNUM
Since it is “8”, it corresponds to the fifth from the top shown in FIG. 27 (note that in the case of each numerical value shown in FIG. 27, it is input from the right end side), and DECBIT is “1”.
Therefore, DECBIT and LENGTH “6” of “110100” (the numerical values are output in order from the left end) and “1” are output from the encoding table unit 23 to the stream generation unit 24. You.

【0170】一方、符号化制御部25内の状態遷移表で
いえば、状態SS6でDECNUM「8」のとき、FA
IL「1」となったこととなり、次の状態は状態SS7
となる。そして、次の“0011”は、run=8でD
ECNUM「4」なので、テーブル番号「3」のテーブ
ル(=図27の符号化テーブル)が採用され、その上か
ら19番目のものが該当し、“11011”のDECN
UMとLENGTH「5」が符号テーブル3から出力さ
れる。
On the other hand, in the state transition table in the encoding control section 25, if the state SS6 is DECNUM “8”, the FA
It becomes IL "1", and the next state is state SS7.
Becomes Then, the next “0011” is run = 8 and D
Since ECNUM is "4", the table with the table number "3" (= the encoding table in FIG. 27) is adopted, and the nineteenth table from the top corresponds to the DECN of "11011".
UM and LENGTH "5" are output from the code table 3.

【0171】最後の“1100”については、前の状態
が状態SS7のrun「8」、DECNUM「4」で、
FAIL「1」となったため(図28の現状態コード
“0111”中の1番下の状態)、状態SS5が採用さ
れる。このため、run「4」、TABLE「2」とな
り、図26に示すテーブル番号「2」の符号化テーブル
が使用される。そして、このテーブル番号「2」のテー
ブルにおいて、下から4番目が該当し“11110”の
DECBITと、LENGTH「5」が符号化テーブル
部23からストリーム生成部24に出力される。なお、
状態SS5で、FAILは「1」となるので、次は状態
SS2に移る。すなわち、次の入力ビット列に対して
は、run=2である図25の符号化テーブルが使用さ
れることとなる。
As for the last “1100”, the previous state is run “8” and DECNUM “4” in the state SS7, and
Since FAIL has become “1” (the lowest state in the current state code “0111” in FIG. 28), the state SS5 is adopted. Therefore, run “4” and TABLE “2” are used, and the encoding table with the table number “2” shown in FIG. 26 is used. In the table with the table number “2”, the fourth from the bottom corresponds, and the DECBIT of “11110” and LENGTH “5” are output from the encoding table unit 23 to the stream generation unit 24. In addition,
In the state SS5, the FAIL becomes “1”, so that the process proceeds to the state SS2. That is, for the next input bit string, the encoding table of FIG. 25 where run = 2 is used.

【0172】以上をまとめると、入力ビット列“000
0010000111100”が“110100”,
“11011”,“11110”の3つの圧縮ビット列
として符号化されたこととなる。なお、入力ビット列や
3つの圧縮ビット列は、共に先頭側から入力され、出力
されていくものとする。この点、図24から図27の各
符号化テーブルとは異なることに注意する必要がある。
すなわち、各符号化テーブルでは、その表示の各値は、
その表示の右端から順に入力し、出力するものとなって
いる。
To summarize the above, the input bit string “000”
0010000111100 "becomes" 110100 ",
That is, it is encoded as three compressed bit strings “11011” and “11110”. It is assumed that the input bit string and the three compressed bit strings are input and output from the head side. It should be noted that this point is different from each of the encoding tables of FIGS.
That is, in each encoding table, each value of the display is:
Input and output are performed sequentially from the right end of the display.

【0173】そして、runは、当初「16」であった
のが、この4ビットの区切りビットpで段階的に符号化
していく中で、runは「2」となり、次の入力ビット
列に対しては、「2」の予測ビット長runで符号化さ
れることとなる。
The run is initially “16”, but while the encoding is performed step by step with the four-bit delimiter bit p, the run becomes “2”, and the run is Will be encoded with a prediction bit length run of “2”.

【0174】一方、先に示した本実施の形態の元となる
基本的プロセスで、同じ入力ビット列“0000010
000111100”を符号化すると、まずrun=1
6での予測外れの“1”、次に前半の8ビットを注目
し、2番目に予測外れの“1”がきて、さらに前半の4
ビット“0000”に注目し、予測当たりの“0”が3
番目にくる。すると、後半部の4ビット“0100”に
劣勢シンボルがくるとは確実なので、すぐに2つに分割
し、前半の2ビット“01”に注目する。このため、予
測外れの“1”が4番目にくる。次は、さらにこれを2
分割し、前半の“0”に注目し、5番目に予測当たりの
“0”がくる。すると、後半の“1”は劣勢シンボルが
確実なので、すぐに後半の2ビット“00”に注目し、
予測当たりの“0”が6番目にくる。
On the other hand, in the basic process which is the basis of the present embodiment shown above, the same input bit string “0000010” is used.
000111100 ", first, run = 1
Attention is paid to the mispredicted "1" at 6 and then the first 8 bits, and the second mispredicted "1" comes, and the first 4
Paying attention to bit “0000”, “0” per prediction is 3
Come th. Then, since it is certain that the inferior symbol will come in the latter 4 bits “0100”, it is immediately divided into two and the first 2 bits “01” are noted. For this reason, the unpredicted "1" comes fourth. Next, this is 2 more
Attention is paid to “0” in the first half, and “0” per prediction comes fifth. Then, since the inferior symbol is certain in the latter half “1”, immediately notice the latter two bits “00”,
“0” per prediction comes in sixth.

【0175】以上の前半8ビットの符号化をまとめる
と、“110100”となる。これは、本実施の形態に
よる符号化ビットと全く同じとなる。続く8ビットも同
様な方法で進めていくと、これらも本実施の形態による
符号化ビットと同一となる。本実施の形態の元となる基
本的プロセスと本実施の形態とが異なる点は、符号化さ
れたビット自体ではなく、1.符号化の区切り方、2.予測
ビット表の変更の仕方、3.符号化テーブルの活用の3点
にある。
The above first eight bits are coded as “110100”. This is exactly the same as the coded bits according to the present embodiment. When the subsequent 8 bits are advanced in a similar manner, these become the same as the encoded bits according to the present embodiment. The difference between the basic process that is the basis of the present embodiment and the present embodiment is not the coded bits themselves, but the following: 1.How to separate coding, 2.How to change prediction bit table, 3. There are three points in using the encoding table.

【0176】すなわち、改良した本実施の形態では、入
力ビット列に対しrunより小さい区切りビット数p
(この実施の形態ではp=4)で区切り、劣勢シンボル
が存在する区切り部分までで一旦符号化を区切るように
している。先の例では、16ビットの入力ビット列が3
つに区切られて符号化されている。また、本実施の形態
では、次の入力ビット列に対し予測ビット長runは
「2」となるのに対し、基本的プロセスの考え方では、
予測外れは1回であり、runは「16」のままとな
る。さらに、本実施の形態の基本的プロセスの考え方で
は、符号化サブルーチンを再帰的に呼び出して符号化し
ているが、改良した本実施の形態の符号化方法では、符
号化テーブル、具体的には予測ビット長run毎に符号
化テーブルを用いている。
That is, in the improved embodiment, the number of delimiter bits p smaller than run
(In this embodiment, p = 4), and the encoding is temporarily divided up to the delimiter where the inferior symbol exists. In the above example, the input bit sequence of 16 bits is 3
The encoding is divided into two. Also, in the present embodiment, the predicted bit length run is “2” for the next input bit string, whereas the basic process concept is
There is only one disappointment, and run remains at “16”. Furthermore, in the concept of the basic process of the present embodiment, the encoding is performed by recursively calling the encoding subroutine. However, in the improved encoding method of the present embodiment, the encoding table, An encoding table is used for each bit length run.

【0177】以上の3つの点は、それらが同時に利用さ
れることによって大きな効果を生ずるが、それぞれ単独
で使用されても十分効果を有する。例えば、第1の点の
段階的に符号化する方法を採用すると、バッファ、例え
ば、ビット列分解部22やストリーム生成部24内の各
バッファを小さくできるばかりか後述するマルコフモデ
ル化によって圧縮ビット列を得ようとするときにそのバ
ッファの容量を減少させることができる。
The above three points produce a great effect when they are used at the same time, but they are sufficiently effective when used alone. For example, if the method of stepwise encoding of the first point is adopted, not only the buffers such as the buffers in the bit string decomposing unit 22 and the stream generating unit 24 can be reduced, but also the compressed bit string can be obtained by Markov modeling described later. In such a case, the capacity of the buffer can be reduced.

【0178】第2の点の予測ビット長runの変更につ
いては、入力ビット列が途中からがらっとその性質が変
わるような場合に特に有効となる。先の例では、予測が
当たり続けてrun=16となったのに対し、次に性質
ががらっと変わったビット列、すなわち劣勢シンボルを
多く含む“0000010000111100”がきた
とき、改良された本実施の形態の符号化方法では、その
性質に合わせ、runは「2」となり、続く入力ビット
列の性質に合う確率が高いものとなり、圧縮率が高くな
る。しかし、基本的プロセスで処理した場合、runは
「16」のままであり、次の入力ビット列の性質にそぐ
わない確率の高いものとなる。なお、圧縮率の向上は、
具体的には、改良前に比べ、0.5%から数%程度であ
るが、各プログラムソフト等が大容量化している現在で
は、このようなわずかな数値の向上効果も無視し得ない
ものとなっている。
The change of the predicted bit length run at the second point is particularly effective when the characteristics of the input bit sequence change from the middle. In the above example, when the prediction continues to be run and run = 16, next, when a bit string whose property has changed drastically, that is, “000000010000111100” including many inferior symbols comes, the improved embodiment of the present embodiment is performed. In the encoding method, run is set to “2” according to the property, the probability of matching the property of the subsequent input bit string is high, and the compression ratio is high. However, when processed by the basic process, the run remains at “16”, which has a high probability that it does not match the properties of the next input bit string. In addition, the improvement of the compression ratio
Specifically, it is about 0.5% to several% compared to before the improvement. However, at present when each program software and the like has a large capacity, such a slight improvement in the numerical value cannot be ignored. It has become.

【0179】第3の点の符号化テーブルについては、サ
ブルーチンの再帰的呼び出しによる符号化に比べ、符号
化テーブルのためのメモリ容量は若干増えるものの、符
号化速度が極めて速くなる。
As for the encoding table of the third point, although the memory capacity for the encoding table is slightly increased as compared with the encoding by the recursive call of the subroutine, the encoding speed is extremely high.

【0180】次に、この実施の形態のエントロピー復号
器32について、図29に基づき説明する。
Next, the entropy decoder 32 of this embodiment will be described with reference to FIG.

【0181】このエントロピー復号器32は、符号化さ
れた信号のストリームを入力するストリーム切り出し部
41と、予測ビット長runに応じた複数の復号テーブ
ルを内蔵する復号テーブル部42と、復号されたビット
をストアし、所定のシンボルを出力するデコードバッフ
ァ部43と、エントロピー符号器12の状態変換部26
内の状態遷移表と同じ状態遷移表他を有する復号制御部
44とから主に構成されている。ここで、復号制御部4
4には、状態遷移表を有する状態遷移部45と、マルコ
フモデル等により生成される復号条件を入力し、その条
件毎に現在の状態の信号を状態遷移部45に与え、復号
後に次の状態の信号を入力し、その復号条件の状態を記
憶しておく状態記憶部46とが設けられている。
The entropy decoder 32 includes a stream cutout section 41 for inputting a stream of an encoded signal, a decoding table section 42 containing a plurality of decoding tables corresponding to a prediction bit length run, and a decoded bit stream. And a decode buffer unit 43 that outputs a predetermined symbol and a state conversion unit 26 of the entropy encoder 12.
And a decoding control unit 44 having the same state transition table as the state transition table. Here, the decryption control unit 4
4, a state transition unit 45 having a state transition table and a decoding condition generated by a Markov model or the like are input, and a signal of the current state is given to the state transition unit 45 for each condition, and after decoding, the next state , And a state storage unit 46 for storing the state of the decoding condition.

【0182】なお、デコードバッファ部43は、復号条
件が入力し、その条件毎に個別に管理されるものとなっ
ている。このため、マルコフモデルのような条件付き復
号化の場合、バッファとして非常に大きなものが必要に
なる。しかし、本実施の形態のエントロピー復号器32
では、後述するように段階的な復号を行うので、各バッ
ファは小さいものでも十分対応でき、マルコフモデルの
ような条件付きの復号化でもデコードバッファ部43は
それ程大きな容量を必要としなくなる。
The decoding buffer 43 receives decoding conditions and is individually managed for each condition. Therefore, in the case of conditional decoding such as a Markov model, a very large buffer is required. However, the entropy decoder 32 of the present embodiment
In this case, since the decoding is performed stepwise as will be described later, each buffer can sufficiently cope with a small buffer, and the decoding buffer unit 43 does not require a large capacity even in conditional decoding such as a Markov model.

【0183】ストリーム切り出し部41は、復号テーブ
ル部42から、復号したビット数を後述するLENGT
Hにより指示されるので、その値に基づき、復号済みビ
ットを廃棄して、未復号ビットの先頭が、符号化された
データとなる復号予定の符号語信号CODE(以下単に
CODEという)の最下位ビット(または最上位)に来
るようにストリームを切り出す。なお、LENGTHを
評価して、復号済みビットを廃棄するのは、デコードバ
ッファ部43から廃棄指示DECREQ(以下単にDE
CREQという)があったときのみである。また、CO
DEは8ビット単位で送信される。
The stream cutout unit 41 calculates the number of decoded bits from the decoding table
H, the decoded bits are discarded based on the value, and the head of the undecoded bits is the lowest bit of the code word signal CODE (hereinafter, simply referred to as CODE) to be decoded, which becomes encoded data. Cut out the stream so that it is at the bit (or most significant). It should be noted that the LENGTH is evaluated and the decoded bits are discarded because the discard instruction DECREQ (hereinafter simply referred to as DE
CREQ). Also, CO
DE is transmitted in units of 8 bits.

【0184】復号テーブル部42は、図30から図33
に示すような各復号テーブルを内蔵し、復号制御部44
が出力するテーブル番号指示信号TABLE(以下単に
TABLEという)によりそれらを切り替えて使用す
る。そして、復号テーブル部42は、次の信号を出力す
る。すなわち、(1)何ビット復号したかを示す信号LE
NGTH(以下単にLENGTHという)で、エントロ
ピー符号器12におけるLENGTHに相当するもの、
(2)予測の当たり外れを示す信号FAIL(以下単にF
AILという)で、エントロピー符号器12におけるF
AILに相当するもの、(3)復号したビット・パターン
信号DECPATN(以下単にDECPATNという)
で、エントロピー符号器12におけるDECPATNに
相当するもの、(4)復号結果が何ビットかを示す信号D
ECNUM(以下単にDECNUMという)で、エント
ロピー符号器におけるDECNUMに相当するもの、を
出力する。
The decoding table section 42 is shown in FIGS.
Each decoding table as shown in FIG.
Are switched and used by a table number indicating signal TABLE (hereinafter simply referred to as "TABLE") output from the CPU. Then, the decoding table section 42 outputs the next signal. That is, (1) a signal LE indicating how many bits have been decoded
NGTH (hereinafter simply referred to as LENGTH), which corresponds to LENGTH in the entropy encoder 12;
(2) A signal FAIL (hereinafter simply referred to as F
AIL), and F in the entropy encoder 12
AIL equivalent, (3) decoded bit pattern signal DECPTN (hereinafter simply referred to as DECPTN)
Which corresponds to DECPTN in the entropy encoder 12, and (4) a signal D indicating the number of bits of the decoding result.
An ECNUM (hereinafter simply referred to as DECNUM) which is equivalent to DECNUM in the entropy encoder is output.

【0185】図30に示すrun=1の復号テーブル
は、CODEが“0”“1”の2種類に対応する各出力
が記載されている。この復号テーブルは、図24のru
n=1の符号化テーブルに相当するもので、符号化テー
ブル中のDECBITに相当するものが、この復号テー
ブルではCODEとなっている。図31に示すrun=
2の復号テーブルは、同様に図25のrun=2の符号
化テーブルに相当するものとなっている。また、図32
に示すrun=4の復号テーブルでは、図26のrun
=4の符号化テーブルに相当し、図33に示すrun=
8の復号テーブルは、図27のrun=8の符号化テー
ブルに相当している。なお、各復号テーブルにおける各
数値も、符号化テーブルと同様に、各数値の右端側から
入力し、出力する表示となっている。また、復号テーブ
ルとして、run=16と、run=32のテーブルも
用意されている。
The decoding table of run = 1 shown in FIG. 30 describes each output corresponding to two types of CODE of "0" and "1". This decoding table corresponds to ru in FIG.
What corresponds to the encoding table of n = 1, and which corresponds to DECBIT in the encoding table is CODE in this decoding table. Run = shown in FIG.
Similarly, the decoding table of 2 corresponds to the encoding table of run = 2 in FIG. FIG. 32
In the decoding table of run = 4 shown in FIG.
= 4, and the run table shown in FIG.
The decoding table of 8 corresponds to the encoding table of run = 8 in FIG. Each numerical value in each decoding table is input and output from the right end side of each numerical value, similarly to the encoding table. Also, tables of run = 16 and run = 32 are prepared as decoding tables.

【0186】デコードバッファ部43は、4ビット(こ
の実施例の場合)以下のDECPATNとDECNUM
を直接的にストアし、それぞれデコードバッファ部43
内のPATNREG(以下単にPATNREGという)
とナンバーレジスタNUMREG(以下単にNUMRE
Gという)にストアする。そして、デコードバッファ部
43の出力がqビット幅の場合、デコードバッファ部4
3は、1回デコード・データを出力する度にストアした
NUMREGからqを減じる。そして、NUMREGが
qより小さくなったら、DECREQをアクティブにし
て、新たなデータのデコード要求を発する。また、NU
MREGが5以上のときは、信号SWで定まる優勢シン
ボルをデコード出力として出力する。一方、NUMRE
Gが4以下になったら、PATREGの値を出力する。
The decode buffer unit 43 has DECPATN and DECNUM of 4 bits or less (in this embodiment).
Are directly stored, and the decode buffer 43
PANTREG inside (hereinafter simply PANTREG)
And number register NUMREG (hereinafter simply NUMRE)
G). When the output of the decode buffer unit 43 has a q bit width, the decode buffer unit 4
3 subtracts q from NUMREG stored each time decoded data is output. When NUMREG becomes smaller than q, DECREQ is activated, and a request for decoding new data is issued. NU
When MREG is 5 or more, a dominant symbol determined by the signal SW is output as a decode output. On the other hand, NUMRE
When G becomes 4 or less, the value of PATHREG is output.

【0187】例えば、図33の上から5番目のCODE
“00101”が復号テーブル部42に入力された場
合、DECNUM=8、DECPATN=“0010”
がデコードバッファ部43に入力されてくる。このと
き、信号SWが「0」となっていたとし、出力を2ビッ
ト単位(これはq=2に相当)で行うとした場合、最初
の2回の出力は優勢シンボルを出力すればよい。この場
合SW=0なので、優勢シンボルは“0”である。した
がって、“0000”を出力する。この4ビットを出力
した時点で、NUMREGは4(=8−4)になってい
る。そこで、次のサイクルは、PATNREGの値を、
順に出力する。すなわち、“0100”をこの表示の左
端側から出力する。
For example, the fifth CODE from the top in FIG.
When “00101” is input to the decoding table unit 42, DECNUM = 8 and DECCATN = “0010”
Is input to the decode buffer unit 43. At this time, assuming that the signal SW is “0” and the output is performed in units of 2 bits (this corresponds to q = 2), the first two outputs may output the superior symbols. In this case, since SW = 0, the dominant symbol is “0”. Therefore, "0000" is output. When these 4 bits are output, NUMREG is 4 (= 8−4). Then, in the next cycle, the value of PATHNREG is
Output in order. That is, "0100" is output from the left end side of this display.

【0188】復号制御部44の状態遷移部45は、符号
化制御部25の状態遷移部26と同じ状態遷移表を保有
している。そして、状態の初期値は、SS1であり、F
AILとDECNUMにより、次の遷移先が決定され、
DECREQがアクティブのとき、その遷移先へ遷移す
る。
The state transition unit 45 of the decoding control unit 44 has the same state transition table as the state transition unit 26 of the encoding control unit 25. Then, the initial value of the state is SS1, and F
The next transition destination is determined by AIL and DECNUM,
When DECREQ is active, transition is made to that transition destination.

【0189】以上のように構成されるエントロピー復号
器32は、先に示したエントロピー符号器12と逆のア
ルゴリズムによって動作する。なお、このエントロピー
復号器32は、デコードバッファ部43の出力状態によ
って制御されるものとなっている。すなわち、デコード
バッファ部43のNUMREGが出力ビット幅qより小
さくなると、DECREQがストリーム切り出し部41
と復号制御部44へ出力される。ストリーム切り出し部
41は、そのDECREQにより復号済みビットをその
LENGTH分廃棄する。
The entropy decoder 32 configured as described above operates according to an algorithm reverse to that of the entropy encoder 12 described above. The entropy decoder 32 is controlled by the output state of the decode buffer 43. That is, when NUMREG of the decode buffer unit 43 becomes smaller than the output bit width q, DECREQ is output from the stream cutout unit 41.
Is output to the decoding control unit 44. The stream cutout unit 41 discards the decoded bits by the LENGTH according to the DECREQ.

【0190】先の例のrun=8でCODE“0010
1”の場合、NUMREGが「8」から「4」へ、
「4」から「2」、「2」から「0」へと下がる。この
「2」から「0」へ下がったときに、DECREQが発
生する。そして、LENGTHが「5」であるので、C
ODEから復号済みの5ビットを廃棄する。このため、
ストリーム切り出し部41内のCODEには、未復号ビ
ットが最下位または最上位にきて、次の復号に備える。
一方、復号制御部44では、run=8、DECNUM
=8で、FAIL=1なので、状態SS7へ遷移する。
このため、run=8に相当するTABLE=3を復号
テーブル部42に向けて出力する。
In the above example, when run = 8 and CODE “0010”
In the case of 1 ", NUMREG changes from" 8 "to" 4 ",
It falls from "4" to "2" and from "2" to "0". When the value falls from "2" to "0", DECREQ occurs. Since LENGTH is “5”, C
Discard the decoded 5 bits from the ODE. For this reason,
In the CODE in the stream cutout unit 41, the undecoded bits come to the lowest order or the highest order to prepare for the next decoding.
On the other hand, in the decryption control unit 44, run = 8, DECNUM
= 8 and FAIL = 1, transit to state SS7.
Therefore, TABLE = 3 corresponding to run = 8 is output to the decoding table unit 42.

【0191】この結果、復号テーブル部42は、図33
のテーブル番号「3」であるrun=8の復号テーブル
を準備する。そして、入力してくるCODEからLEN
GTH、DECNUM、DECPATNおよびFAIL
が確定し、出力される。例えば、そのCODEの最初が
“0”であれば、CODE“0”であることが確定し、
LENGTH=1、DECNUM=8、DECPATN
=“0000”、FAIL=「0」を出力する。一方、
CODEが“01011”の場合、CODEの最初が
“1”であるので、まだ確定せず、次の“1”でも、3
番目の“0”でも、4番目の“1”でも確定しない。し
かし、5番目の“0”が入った段階で“01011”で
あることが確定する。この確定によって、LENGTH
=5、DECNUM=4、DECPATN=“010
0”、FAIL=「1」がそれぞれ出力される。このよ
うにして、順次、復号されていく。
As a result, the decoding table section 42
A decoding table of run = 8 with the table number “3” is prepared. Then, from the input CODE to LEN
GTH, DECNUM, DECPTN and FAIL
Is determined and output. For example, if the beginning of the CODE is “0”, it is determined that the CODE is “0”,
LENGTH = 1, DECNUM = 8, DECPTN
= “0000” and FAIL = “0”. on the other hand,
When the CODE is “01011”, since the beginning of the CODE is “1”, the CODE is not yet determined, and even if the next “1” is 3
Neither the fourth “0” nor the fourth “1” is determined. However, at the stage when the fifth “0” is entered, it is determined that it is “01011”. With this confirmation, LENGTH
= 5, DECNUM = 4, DECPTN = “010
0 "and FAIL =" 1 "are output. In this way, decoding is performed sequentially.

【0192】このエントロピー復号器32は、エントロ
ピー符号器12と同様に、先に述べた基本的プロセスに
基づく復号に比べると、段階的な復号によるバッファ
容量の減少化信号の性質にあった予測ビット長run
の変更復号テーブルによる復号速度の向上という各種
の有利な効果を有するものとなる。
The entropy decoder 32, like the entropy encoder 12, has a buffer capacity reduced by stepwise decoding as compared with the decoding based on the basic process described above. Long run
Has various advantageous effects of improving the decoding speed by the modified decoding table.

【0193】このエントロピー復号器32においては、
状態遷移を条件毎に個別に管理する点で、エントロピー
符号器12と同様である。ただし、このエントロピー復
号器32の場合は、上述したようにさらにデコードバッ
ファ部43も個別に管理しなければならない。このた
め、デコードバッファ部43は、NUMREG、PAT
NREGに相当するレジスタを有り得る条件数分内蔵
し、復号条件によって切り換えるものとなっている。
In the entropy decoder 32,
It is similar to the entropy encoder 12 in that the state transition is managed individually for each condition. However, in the case of the entropy decoder 32, the decode buffer unit 43 must also be individually managed as described above. For this reason, the decode buffer unit 43 includes NUMREG, PAT
Registers equivalent to NREG are provided for the number of possible conditions, and are switched according to decoding conditions.

【0194】上述の説明では、分かり易さを考慮し、2
値のビット列を例にして、予測ランレングス符号化方式
を説明したが、判別部19から出力される順位コードは
多値データであり、実際は多値データを2値系列に変換
する必要がある。例えば、ビット・プレーンに分けて、
各ビット・プレーンをこの予測ランレングス符号化方式
で符号化するようにしても良い。また、最上位ビットか
らプレーン毎にこの予測ランレングス符号化方式にて符
号化を行い、“1”が出現した時点で続く下位ビットを
直接ストリームに出力するようにしても良い。
In the above description, 2
The prediction run-length encoding method has been described by taking the bit string of the value as an example. However, the rank code output from the determination unit 19 is multi-valued data, and it is actually necessary to convert the multi-valued data into a binary sequence. For example, dividing into bit planes,
Each bit plane may be encoded using this predictive run-length encoding method. Alternatively, encoding may be performed for each plane starting from the most significant bit using this predictive run-length encoding method, and the subsequent lower bits may be directly output to the stream when "1" appears.

【0195】この実施の形態では、このPRLCを多値
系列に適用する方式として、ビット・プレーンではなく
レベル・プレーンに分けて行っている。具体的には、シ
ンボルが8ビットであるため、256のレベル・プレー
ンに分け、その入力シンボルをグループに分け、グルー
プ番号をこの予測ランレングス符号化方式で符号化して
いる。すなわち、入力シンボルを図34に示すように、
グループ分けし、まず入力シンボルがグループ番号0か
0以外かを示す判定ビットをこのPRLCで符号化す
る。もし入力シンボルが0ならこのシンボルの符号化を
完了するが、そうでない場合はさらにグループ番号が1
か1以外かを示す判定ビットをこの予測ランレングス符
号化方式で符号化する。
In this embodiment, as a method of applying this PRLC to a multilevel sequence, the PRLC is divided into a level plane instead of a bit plane. More specifically, since the symbols are 8 bits, the symbols are divided into 256 level planes, the input symbols are divided into groups, and the group numbers are encoded by this predictive run-length encoding method. That is, as shown in FIG.
Grouping is performed, and first, a decision bit indicating whether the input symbol is a group number 0 or other than 0 is encoded by this PRLC. If the input symbol is 0, the encoding of this symbol is completed.
A decision bit indicating whether the bit is a value other than 1 is encoded by the predictive run-length encoding method.

【0196】このようにして、グループ番号が確定する
まで、判定ビットをPRLCで符号化し、確定したグル
ープ番号が2以上の場合は、該当グループにおけるシン
ボルを確定するため、必要とする付加ビットを直接スト
リームに出力する。ただし、各グループ判定ビットは、
グループ毎に独立した系列として扱い、各々個別に現状
態コードを管理して符号化する。この方法は、グループ
番号が確定した時点で、上位の判定ビットの符号化を行
わないので、処理速度が向上する。
In this way, the decision bits are encoded by PRLC until the group number is determined. If the determined group number is 2 or more, the necessary additional bits are directly added to determine the symbol in the corresponding group. Output to stream. However, each group judgment bit is
Each group is treated as an independent sequence, and the current status code is individually managed and encoded. In this method, when the group number is determined, the higher-order determination bits are not encoded, so that the processing speed is improved.

【0197】なお、この実施の形態では、圧縮対象画素
の画素インデックス100Aの数が256個に加え、
(CX+1)が加わるため、最高260個が対象とな
り、順位としては259順位となる。この対策として、
順位255をエスケープ・コードに割り当て、255以
上の順位については、このエスケープ・コードを符号化
後、255との差分を3ビット付加ビットとして直接圧
縮ストリームに出力している。このような対策は、圧縮
対象の画素インデックス100Aが256色をわずかに
超える場合にも適用できる。
In this embodiment, the number of pixel indices 100A of the pixel to be compressed is 256 in addition to 256.
Since (CX + 1) is added, a maximum of 260 items are targeted, and the order is 259. As a measure against this,
The rank 255 is assigned to an escape code, and for ranks of 255 or more, after encoding this escape code, the difference from 255 is directly output to the compressed stream as 3-bit additional bits. Such a measure can be applied even when the pixel index 100A to be compressed slightly exceeds 256 colors.

【0198】また、この実施の形態におけるマルチカラ
ー画像のインデックスパレットは、異なるフレーム間で
共有されており、パレットのためのデータ量は多くなら
ない。すなわち、動画像のインデックスパレットは、動
画ストリームの中で共通のパレットとして使用されてい
る。さらに、このパレットは、フレーム間相関を用いた
符号化では、フレーム間相関の及ぶ範囲で共通のパレッ
トを使用している。例えば、IピクチャーとIピクチャ
ーの間(GOP)毎にパレットを持つようにしたり、他
の範囲で持つようにしたりしている。
The index palette of the multi-color image in this embodiment is shared between different frames, and the data amount for the palette does not increase. That is, the index palette of the moving image is used as a common palette in the moving image stream. Further, in the encoding using the inter-frame correlation, a common palette is used within the range of the inter-frame correlation. For example, a palette is provided for each I-picture (GOP), or in another range.

【0199】また、この実施の形態のエントロピー符号
器12では、符号化する際、過去の符号化済み系列等に
より適当に条件付けを行い、符号化することで、圧縮率
が向上している。すなわち、マルコフ状態信号CXによ
り条件分けを行ってPRLC符号化を実行している。具
体的には、マルコフ状態信号CXは、4状態存在し、1
つの状態で8つのグループ判定ビットを個別に符号化す
るため、合計で32状態の現状態コードを個別に管理し
符号化することになる。
Also, in the entropy encoder 12 of this embodiment, when encoding, the compression ratio is improved by appropriately setting conditions based on past encoded sequences and the like. That is, PRLC encoding is executed by performing condition classification based on the Markov state signal CX. Specifically, the Markov state signal CX has four states and one
Since eight group determination bits are individually encoded in one state, a total of 32 state current state codes are individually managed and encoded.

【0200】なお、上述の実施の形態は、本発明の好適
な実施の形態の例であるが、これに限定されるものでは
なく本発明の要旨を逸脱しない範囲において、種々変形
実施可能である。例えば、カラー画素データ100Aと
しては、nビット(nは2以上の整数)のカラー画素デ
ータ100Aを対象とし、その符号化や復号化を行うよ
うに構成することができる。
Although the above-described embodiment is an example of a preferred embodiment of the present invention, the present invention is not limited to this embodiment, and various modifications can be made without departing from the gist of the present invention. . For example, the color pixel data 100A may be configured to encode and decode n-bit (n is an integer of 2 or more) color pixel data 100A.

【0201】また、マルチカラー画像ではなく、RGB
成分やYUV成分を直接有する自然画像に適用すること
ができる。その場合、自然画変換手段2aが不要となっ
たり、自然画変換手段2aとYUV変換手段2bが不要
となったりする。また、上述の実施の形態では、動き補
償を使用する動画像の場合を示したが、動き補償の無い
動画像や静止画像にも、前処理手段2や補正手段9を適
用することができる。さらに、UV成分をパレット化す
るのではなく、間引き手段2cで間引きされたUV成分
をインデックス化したり、または直接符号化手段で符号
化するようにしても良い。
Also, instead of multi-color images, RGB
It can be applied to a natural image having a component or a YUV component directly. In that case, the natural image conversion means 2a becomes unnecessary, or the natural image conversion means 2a and the YUV conversion means 2b become unnecessary. In the above-described embodiment, the case of a moving image using motion compensation has been described. However, the preprocessing unit 2 and the correcting unit 9 can be applied to a moving image or a still image without motion compensation. Further, instead of palletizing the UV components, the UV components thinned out by the thinning means 2c may be indexed, or may be coded by the direct coding means.

【0202】なお、符号化や復号化を行うにあたり、図
18から図22に示す改良前の方法を採用したり、従来
の算術符号型のエントロピー符号器およびエントロピー
復号器を利用しても良い。また、上述の実施の形態のよ
うに、プリスキャンを行うのではなく、特開平6−27
6041号に開示された技術を利用しても良い。すなわ
ち、インデックスを出現頻度順に並び替えた色順位デー
タを利用したり、最新のものを先頭へ移動する移動処理
を行って得た最新出現表を利用するようにしても良い。
In performing the encoding and decoding, the method before improvement shown in FIGS. 18 to 22 may be employed, or a conventional arithmetic code type entropy encoder and entropy decoder may be used. Also, instead of performing pre-scan as in the above-described embodiment, Japanese Patent Laid-Open No.
The technology disclosed in Japanese Patent No. 6041 may be used. That is, the color ranking data obtained by rearranging the indexes in the order of appearance frequency may be used, or the latest appearance table obtained by performing the moving process of moving the latest one to the top may be used.

【0203】さらに、先頭移動処理を使用する場合、現
れたカラーシンボルを常に先頭へ持っていくのではな
く、先頭方向へ所定の決まりにしたがって移動させるよ
うにしても良い。このようにすると、出現確率が低いカ
ラーシンボルが出たとき、すぐに先頭へ移動しないの
で、出現確率の低いものに短い符号を割り当てるという
ことが無くなる。このため、出現確率が低いものが現れ
ても符号化効率や復号化効率が悪化してしまうことはな
い。
Furthermore, when the head moving process is used, the appearing color symbol may not always be brought to the head, but may be moved in the head direction according to a predetermined rule. In this way, when a color symbol with a low appearance probability appears, the color symbol does not immediately move to the head, so that a short code is not assigned to a symbol with a low appearance probability. For this reason, even if an object having a low appearance probability appears, the encoding efficiency and the decoding efficiency do not deteriorate.

【0204】なお、マクロブロックMBと小さなブロッ
クSBによる二重判定は、マルチカラー画像以外の画
像、例えば自然画の動き補償の際にも適用できる。ま
た、動き補償を行わないとしたマクロブロックMBの拾
い方は、フレームのスキャンが横方向のときは縦方向に
集めていき、フレームのスキャンが縦方向のときは横方
向に集めていくのが好ましい。
The double judgment based on the macro block MB and the small block SB can be applied to the motion compensation of an image other than a multi-color image, for example, a natural image. Also, the method of picking up macroblocks MB for which motion compensation is not performed is to collect vertically when frame scanning is horizontal, and to collect horizontally when frame scanning is vertical. preferable.

【0205】また、動き補償を行うブロックは、一般的
に採用されている16×16ピクセルの他に8×8ピク
セル、4×4ピクセル、32×32ピクセル等種々の大
きさのものとすることができるが、動きベクトルのため
のデータ量を考慮すると4×4ピクセル以上が好まし
く、効果的な動き検出を考慮すると64×64ピクセル
以下が好ましい。
The blocks for performing motion compensation have various sizes such as 8 × 8 pixels, 4 × 4 pixels, and 32 × 32 pixels in addition to the generally employed 16 × 16 pixels. However, considering the amount of data for a motion vector, it is preferably 4 × 4 pixels or more, and considering effective motion detection, it is preferably 64 × 64 pixels or less.

【0206】さらに、上述の実施の形態では、符号化お
よび復号化は、ハードとして構成されたシステムで処理
しているが、すべてソフトウェアで処理するようにして
も良い。また、ソフトウェアで処理する際は、その処理
手順をプログラム化しCDーROM等の記憶媒体にイン
ストールし、その記憶媒体をパソコン等のハードに差し
込んで処理したり、そのプログラムをネットワーク等を
介して送受信し、パソコン等のハードディスク等へ取り
込んで処理するようにしても良い。
Further, in the above-described embodiment, the encoding and decoding are performed by the system configured as hardware, but may be entirely performed by software. When processing by software, the processing procedure is programmed and installed in a storage medium such as a CD-ROM, and the storage medium is inserted into hardware such as a personal computer or the like, and the program is transmitted or received via a network or the like. Alternatively, the data may be imported to a hard disk such as a personal computer and processed.

【0207】[0207]

【発明の効果】以上説明したように、本発明のカラー画
像の符号化装置およびその方法では、DCTを使用せず
カラー画像を符号化することにより、符号化の時間を短
縮できるものとなり、また、他の発明ではカラー画像か
らなる動画像の符号化を行う際、画像の影の部分を十分
考慮した動き補償とすることができる。
As described above, the color image encoding apparatus and method according to the present invention can reduce the encoding time by encoding a color image without using DCT. According to another aspect of the present invention, when a moving image composed of a color image is encoded, motion compensation can be performed by sufficiently considering a shadow portion of the image.

【0208】また、本発明のカラー画像の復号化装置お
よびその方法では、DCTを使用せずカラー画像を復号
化することにより、復号化の時間を短縮できるものとな
り、また、他の発明では、カラー画像からなる動画像の
復号化を行う際、画像の影の部分を十分考慮した動き補
償とすることができる。
In the color image decoding apparatus and method according to the present invention, decoding time can be reduced by decoding a color image without using DCT. When decoding a moving image composed of a color image, it is possible to perform a motion compensation in which a shadow portion of the image is sufficiently considered.

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

【図1】本発明のカラー画像の符号化装置およびその方
法を採用した符号化システムを示す図である。
FIG. 1 is a diagram showing a color image encoding apparatus and an encoding system employing the method according to the present invention.

【図2】図1の符号化システム中のインデックス変換部
およびその周辺の構成を示す図である。
FIG. 2 is a diagram showing a configuration of an index conversion unit and its periphery in the encoding system of FIG. 1;

【図3】本発明のカラー画像の復号化装置およびその方
法を採用した復号化システムを示す図である。
FIG. 3 is a diagram showing a color image decoding apparatus and a decoding system employing the method according to the present invention.

【図4】図3の復号化システム中のインデックス変換部
およびその周辺の構成を示す図である。
FIG. 4 is a diagram showing a configuration of an index conversion unit and its periphery in the decoding system of FIG. 3;

【図5】図1の符号化システムの動き補償部の動作結果
を説明するための図で、(A)は各ピクチャー(フレー
ム)の種類と入力順序を示す図で、(B)はそのときの
符号化順序を示す図である。
5A and 5B are diagrams for explaining an operation result of the motion compensation unit of the encoding system in FIG. 1; FIG. 5A is a diagram showing types and input orders of pictures (frames); FIG. 3 is a diagram showing an encoding order.

【図6】図1の符号化システムおよび図3の復号化シス
テムで採用されるマクロブロックと小さなブロックおよ
びその関係を示す図である。
FIG. 6 is a diagram showing macroblocks and small blocks employed in the encoding system of FIG. 1 and the decoding system of FIG. 3 and their relationships.

【図7】図1および図3の符号化システムおよび復号化
システムにマルコフモデルとして採用される参照画素の
配置を説明するための図で、(A)は通常の参照画素
を、(B)は先頭ラスタの場合を、(C)は先頭画素の
場合をそれぞれ示している図である。
7A and 7B are diagrams for explaining an arrangement of reference pixels adopted as a Markov model in the encoding system and the decoding system in FIGS. 1 and 3, where FIG. 7A illustrates a normal reference pixel, and FIG. FIG. 4C is a diagram illustrating a case of a leading raster, and FIG. 4C is a diagram illustrating a case of a leading pixel.

【図8】図1および図3の符号化システムおよび復号化
システムに採用される参照画素の状態と、状態信号ST
と、色数と、マルコフ状態信号CXとの関係を示す図で
ある。
FIG. 8 shows a state of a reference pixel employed in the encoding system and the decoding system shown in FIGS. 1 and 3, and a state signal ST.
FIG. 7 is a diagram illustrating a relationship between the number of colors, a number of colors, and a Markov state signal CX.

【図9】図1の符号化システムに採用される変換テーブ
ル生成部の参照順位テーブル作成の機能を説明するため
の図で、(A)は符号化対象画素と参照画素が一致した
ときの度数の例を示す図で、(B)(C)はそれぞれの
度数が所定の関係となったときの参照画素の順位を示す
図である。
9A and 9B are diagrams for explaining a function of generating a reference order table of a conversion table generation unit employed in the encoding system of FIG. 1; FIG. 9A illustrates a frequency when a pixel to be encoded matches a reference pixel; (B) and (C) are diagrams illustrating the order of reference pixels when the respective frequencies have a predetermined relationship.

【図10】図1および図3の符号化システムおよび復号
化システムに採用される参照順位テーブルの例を示す図
である。
FIG. 10 is a diagram showing an example of a reference order table employed in the encoding system and the decoding system of FIGS. 1 and 3;

【図11】図1の符号化システムに採用される変換テー
ブル生成部の画素インデックス変換テーブル作成機能を
説明するための図で、入力してきた画素インデックスに
対応する画素が参照画素中に無かった度数を示す図であ
る。
11 is a diagram for explaining a pixel index conversion table creation function of a conversion table generation unit employed in the encoding system of FIG. 1; FIG. 11 is a diagram illustrating the frequency with which a pixel corresponding to an input pixel index is not present in a reference pixel; FIG.

【図12】図1の符号化システムに採用される変換テー
ブル生成部の画素インデックス変換テーブル作成機能を
説明するための図で、入力してきた画素インデックスに
対応する画素が参照画素中に無かった度数の順位を示す
図である。
12 is a diagram for explaining a function of creating a pixel index conversion table of a conversion table generation unit employed in the encoding system of FIG. 1, and is a frequency at which a pixel corresponding to an input pixel index is not present in a reference pixel; FIG.

【図13】図1の符号化システムにおける入力してきた
カラーパレットから変換カラーパレットへの変換を説明
するための図である。
13 is a diagram for explaining conversion from an input color palette to a conversion color palette in the encoding system of FIG. 1;

【図14】図1の符号化システムにおけるプリスキャン
時の動作を示すフローチャートである。
FIG. 14 is a flowchart showing an operation at the time of prescan in the encoding system of FIG. 1;

【図15】図1の符号化システムにおける符号化プロセ
ス時の動作を示すフローチャートである。
FIG. 15 is a flowchart showing an operation during an encoding process in the encoding system of FIG. 1;

【図16】図1の符号化システムにおいて動き補償を行
わないと判断されたマクロブロックの符号化方法を説明
するための図で、(A)は動き補償を行わないマクロブ
ロックの位置の例を示し、(B)はその一部拡大図であ
る。
16A and 16B are diagrams for explaining a method of encoding a macroblock determined not to perform motion compensation in the encoding system of FIG. 1; FIG. 16A illustrates an example of a position of a macroblock not performing motion compensation; (B) is a partially enlarged view of FIG.

【図17】図3の復号化システムにおける復号化プロセ
スを示すフローチャートである。
FIG. 17 is a flowchart showing a decoding process in the decoding system of FIG. 3;

【図18】本発明で採用するエントロピー符号器および
エントロピー復号器で使用しているアルゴリズムの概要
を説明するための図で、注目系列と予測ビット数run
との関係を示す図である。
FIG. 18 is a diagram for explaining an outline of an algorithm used in an entropy encoder and an entropy decoder employed in the present invention.
FIG.

【図19】図18の注目系列を分割した状態を示す図で
ある。
FIG. 19 is a diagram illustrating a state where the attention sequence in FIG. 18 is divided.

【図20】図19の前半部注目系列をさらに分割した状
態を示す図である。
FIG. 20 is a diagram showing a state in which the first half attention sequence in FIG. 19 is further divided.

【図21】図18から図20に示すエントロピー符号器
内の符号化プロセスを説明するためのフローチャート
で、符号化メインルーチンを示すフローチャートであ
る。
21 is a flowchart for explaining an encoding process in the entropy encoder shown in FIGS. 18 to 20, and is a flowchart showing an encoding main routine.

【図22】図18から図20に示すエントロピー符号器
内の符号化プロセスを説明するためのフローチャート
で、符号化サブルーチンを示すフローチャートである。
FIG. 22 is a flowchart for explaining an encoding process in the entropy encoder shown in FIGS. 18 to 20, and is a flowchart showing an encoding subroutine.

【図23】本発明の実施の形態で採用するエントロピー
符号器の構成を示すブロック図である。
FIG. 23 is a block diagram illustrating a configuration of an entropy encoder employed in an embodiment of the present invention.

【図24】図23のエントロピー符号器の符号化テーブ
ル部内の符号化テーブルを示す図で、予測ビット長が
「1」の場合のテーブルを示す図である。
24 is a diagram illustrating an encoding table in an encoding table unit of the entropy encoder of FIG. 23, and is a diagram illustrating a table in a case where a prediction bit length is “1”.

【図25】図23のエントロピー符号器の符号化テーブ
ル部内の符号化テーブルを示す図で、予測ビット長が
「2」の場合のテーブルを示す図である。
25 is a diagram illustrating an encoding table in an encoding table unit of the entropy encoder in FIG. 23, and is a diagram illustrating a table in a case where a prediction bit length is “2”.

【図26】図23のエントロピー符号器の符号化テーブ
ル部内の符号化テーブルを示す図で、予測ビット長が
「4」の場合のテーブルを示す図である。
26 is a diagram illustrating an encoding table in an encoding table unit of the entropy encoder in FIG. 23, and is a diagram illustrating a table in a case where a prediction bit length is “4”.

【図27】図23のエントロピー符号器の符号化テーブ
ル部内の符号化テーブルを示す図で、予測ビット長が
「8」の場合のテーブルを示す図である。
27 is a diagram illustrating an encoding table in an encoding table unit of the entropy encoder of FIG. 23, and is a diagram illustrating a table in a case where a prediction bit length is “8”.

【図28】図23のエントロピー符号器の状態遷移部内
の状態遷移表を示す図である。
FIG. 28 is a diagram showing a state transition table in a state transition unit of the entropy encoder of FIG.

【図29】本発明の実施の形態で採用するエントロピー
復号器の構成を示すブロック図である。
FIG. 29 is a block diagram illustrating a configuration of an entropy decoder employed in an embodiment of the present invention.

【図30】図29のエントロピー復号器の復号テーブル
部内の復号テーブルを示す図で、予測ビット長が「1」
の場合のテーブルを示す図である。
30 is a diagram illustrating a decoding table in a decoding table unit of the entropy decoder in FIG. 29, where a prediction bit length is “1”;
It is a figure showing the table in the case of.

【図31】図29のエントロピー復号器の復号テーブル
部内の復号テーブルを示す図で、予測ビット長が「2」
の場合のテーブルを示す図である。
FIG. 31 is a diagram showing a decoding table in a decoding table section of the entropy decoder of FIG. 29, where the prediction bit length is “2”;
It is a figure showing the table in the case of.

【図32】図29のエントロピー復号器の復号テーブル
部内の復号テーブルを示す図で、予測ビット長が「4」
の場合のテーブルを示す図である。
FIG. 32 is a diagram showing a decoding table in a decoding table section of the entropy decoder of FIG. 29, where the prediction bit length is “4”;
It is a figure showing the table in the case of.

【図33】図29のエントロピー復号器の復号テーブル
部内の復号テーブルを示す図で、予測ビット長が「8」
の場合のテーブルを示す図である。
FIG. 33 is a diagram illustrating a decoding table in a decoding table section of the entropy decoder in FIG. 29, where the prediction bit length is “8”;
It is a figure showing the table in the case of.

【図34】本発明で採用するアルゴリズムを本実施の形
態で示す多値系列データに適用した場合の例を説明する
ための図で、入力シンボルを複数のグループに分けた状
態を示す図である。
FIG. 34 is a diagram for describing an example in which an algorithm employed in the present invention is applied to the multi-level sequence data described in the present embodiment, and is a diagram illustrating a state where input symbols are divided into a plurality of groups. .

【図35】従来のマルチカラー画像の符号化システムお
よび復号化システムのブロック図である。
FIG. 35 is a block diagram of a conventional multicolor image encoding system and decoding system.

【図36】従来の符号化対象画素データに対する参照画
素データの説明図である。
FIG. 36 is an explanatory diagram of reference pixel data with respect to conventional encoding target pixel data.

【図37】従来や本発明で使用されるマルチカラー画像
のインデックスを説明するための図である。
FIG. 37 is a diagram for explaining an index of a multi-color image used in the related art and the present invention.

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

1 符号化システム 1c 排他的論理生成手段/動き補償手段 2 前処理手段 2a 自然画変換手段 2b YUV変換手段 2c 間引き手段 2d 量子化手段 2e インデックス化手段 2f パレット化手段 3 復号化システム 4 エントロピー符号器 7、8 インデックス変換部 9 補正手段 9a スムージング手段 9b 中間色処理手段 12 エントロピー符号器 100A 符号化されるカラー画素データ 100B 復号化されたカラー画素データ 200 符号化データ DESCRIPTION OF SYMBOLS 1 Encoding system 1c Exclusive logic generation means / motion compensation means 2 Preprocessing means 2a Natural picture conversion means 2b YUV conversion means 2c Decimation means 2d Quantization means 2e Indexing means 2f Palletizing means 3 Decoding system 4 Entropy encoder 7, 8 index conversion unit 9 correction means 9a smoothing means 9b intermediate color processing means 12 entropy encoder 100A color pixel data to be encoded 100B decoded color pixel data 200 encoded data

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 カラー画像の符号化装置において、RG
B成分から変換されたYUV成分の少なくともUV成分
を間引く間引き手段と、間引かれないかまたは小さく間
引かれたY成分を量子化する量子化手段と、大きく間引
かれたUV成分および上記量子化されたY成分を圧縮し
て符号化する符号化手段とを設けたことを特徴とするカ
ラー画像の符号化装置。
1. An apparatus for encoding a color image, comprising:
Thinning means for thinning at least the UV component of the YUV component converted from the B component, quantizing means for quantizing the Y component which is not thinned or thinned, the UV component which is greatly thinned and the quantum Encoding means for compressing and encoding the converted Y component.
【請求項2】 カラー画素データからなる静止画のフレ
ームを連続させて動画像を形成する際、符号化対象の着
目フレームをそれぞれN×Nピクセル(Nは4以上の整
数)からなる複数のブロックに分割し、その着目フレー
ム中のブロックが参照フレーム中のブロックと同一であ
るとき、そのブロックの動きベクトルを差分情報として
データ化し、その差分情報のデータ量を減少させる動き
補償を行うカラー画像の符号化装置において、RGB成
分から変換されたYUV成分の少なくともUV成分を間
引く間引き手段と、間引かれないかまたは小さく間引か
れたY成分を量子化する量子化手段と、大きく間引かれ
たUV成分および上記量子化されたY成分を圧縮して符
号化する符号化手段とを設け、上記UV成分について上
記動き補償を行い、上記Y成分について上記動き補償を
行わないことを特徴とするカラー画像の符号化装置。
2. When forming a moving image by continuously forming a still image frame composed of color pixel data, a target frame to be encoded is divided into a plurality of blocks each composed of N × N pixels (N is an integer of 4 or more). When the block in the frame of interest is the same as the block in the reference frame, the motion vector of that block is converted into data as difference information, and the color image of the color image for which motion compensation is performed to reduce the data amount of the difference information In the encoding device, thinning means for thinning out at least the UV component of the YUV component converted from the RGB component, quantization means for quantizing the Y component which is not thinned out or thinned out, Encoding means for compressing and encoding the UV component and the quantized Y component, performing the motion compensation on the UV component, Encoding device of a color image, characterized in that does not perform the motion compensation for the serial Y component.
【請求項3】 前記カラー画像をマルチカラー画像と
し、そのマルチカラー画像をRGB成分からなる自然画
像に変換する自然画変換手段と、変換されたRGB成分
をYUV成分に変換するYUV変換手段と、前記大きく
間引かれたUV成分にインデックスを付与すると共にパ
レット化するパレット化手段とを設け、前記符号化手段
は、前記量子化されたY成分および上記パレット化され
たインデックスが付与されたUV成分を符号化すること
を特徴とする請求項1または2記載のカラー画像の符号
化装置。
3. A natural image converting means for converting the color image into a multi-color image and converting the multi-color image into a natural image composed of RGB components, a YUV converting means for converting the converted RGB components into YUV components, Palletizing means for assigning an index to the large-thinned UV component and palletizing the UV component, wherein the encoding means comprises: the quantized Y component and the palletized indexed UV component. The color image encoding apparatus according to claim 1, wherein the color image is encoded.
【請求項4】 前記符号化手段は、色の出現頻度によっ
て、そのY成分およびUV成分を並び替える色順位変換
手段と、この色順位変換手段によって並び替えられた各
成分の値をランレングスモデル化するランレングスモデ
ル化手段とを有していることを特徴とする請求項1、2
または3記載のカラー画像の符号化装置。
4. The encoding means according to claim 1, wherein said encoding means rearranges the Y component and the UV component according to the frequency of appearance of the color, and encodes the values of each component rearranged by said color order converting means into a run-length model. And a run length modeling means for converting the run length into a run length.
Or a color image encoding device according to 3.
【請求項5】 カラー画像の符号化方法において、RG
B成分から変換されたYUV成分の少なくともUV成分
を間引く間引き工程と、間引かれないかまたは小さく間
引かれたY成分を量子化する量子化工程と、大きく間引
かれたUV成分および上記量子化されたY成分を圧縮し
て符号化する符号化工程とを設けたことを特徴とするカ
ラー画像の符号化方法。
5. A method for encoding a color image, comprising the steps of:
A thinning step of thinning out at least the UV component of the YUV component converted from the B component; a quantization step of quantizing the Y component that is not thinned out or thinned out; An encoding step of compressing and encoding the converted Y component.
【請求項6】 カラー画素データからなる静止画のフレ
ームを連続させて動画像を形成する際、符号化対象の着
目フレームをそれぞれN×Nピクセル(Nは4以上の整
数)からなる複数のブロックに分割し、その着目フレー
ム中のブロックが参照フレーム中のブロックと同一であ
るとき、そのブロックの動きベクトルを差分情報として
データ化し、差分情報のデータ量を減少させる動き補償
を行うカラー画像の符号化方法において、RGB成分か
ら変換されたYUV成分の少なくともUV成分を間引く
間引き工程と、間引かれないかまたは小さく間引かれた
Y成分を量子化する量子化工程と、大きく間引かれたU
V成分および上記量子化されたY成分を圧縮して符号化
する符号化工程とを設け、上記UV成分について上記動
き補償を行い、上記Y成分について上記動き補償を行わ
ないことを特徴とするカラー画像の符号化方法。
6. When forming a moving image by continuously forming a still image frame composed of color pixel data, a target frame to be encoded is divided into a plurality of blocks each composed of N × N pixels (N is an integer of 4 or more). When the block in the frame of interest is the same as the block in the reference frame, the motion vector of that block is converted into data as difference information, and the color image code for performing motion compensation to reduce the data amount of the difference information A thinning step for thinning out at least the UV component of the YUV component converted from the RGB components, a quantization step for quantizing the Y component that is not thinned out or thinned out, and a highly thinned U component.
A coding step of compressing and coding the V component and the quantized Y component, performing the motion compensation on the UV component, and not performing the motion compensation on the Y component. Image encoding method.
【請求項7】 前記カラー画像をマルチカラー画像と
し、そのマルチカラー画像をRGB成分からなる自然画
像に変換する自然画変換工程と、変換されたRGB成分
をYUV成分に変換するYUV変換工程と、前記大きく
間引かれたUV成分にインデックスを付与すると共にパ
レット化するパレット化工程とを設け、前記符号化工程
は、前記量子化されたY成分および上記パレット化され
たインデックスが付与されたUV成分を符号化すること
を特徴とする請求項5または6記載のカラー画像の符号
化方法。
7. A natural image conversion step of converting the color image into a multi-color image and converting the multi-color image into a natural image composed of RGB components, a YUV conversion step of converting the converted RGB components into YUV components, A palletizing step of assigning an index to the largely-thinned UV component and palletizing the UV component, wherein the encoding step includes the quantized Y component and the palletized indexed UV component. 7. The color image encoding method according to claim 5, wherein
【請求項8】 前記符号化工程は、色の出現頻度によっ
て、そのY成分およびUV成分を並び替える色順位変換
工程と、この色順位変換工程によって並び替えられた各
成分の値をランレングスモデル化するランレングスモデ
ル化工程とを有していることを特徴とする請求項5、6
または7記載のカラー画像の符号化方法。
8. The encoding step includes: a color rank conversion step of rearranging the Y component and the UV component according to the frequency of appearance of the color; and a run length model by rearranging the values of the components rearranged by the color rank conversion step. And a run-length modeling step for converting the run-length into a run-length model.
Or a method for encoding a color image according to 7.
【請求項9】 YUV成分を有するカラー画像の復号化
装置において、入力される対象符号化データを復号する
復号化手段と、復号されたデータ中の量子化されたY成
分をスムージング処理するスムージング手段と、上記Y
成分に比べ大きく間引かれたUV成分を中間色補間によ
って処理する中間色処理手段とを設けたことを特徴とす
るカラー画像の復号化装置。
9. A decoding apparatus for decoding a color image having a YUV component, wherein decoding means decodes input target encoded data, and smoothing means performs a smoothing process on a quantized Y component in the decoded data. And the above Y
A color image decoding apparatus, comprising: intermediate color processing means for processing, by intermediate color interpolation, UV components thinned out more than components.
【請求項10】 入力される対象符号化データをYUV
成分からなるカラー画素データに復号する復号化手段
と、該カラー画素データからなる静止画を連続させて動
画像を形成する動画像形成手段とを備え、動画像形成手
段は、復号化対象の着目フレームをそれぞれN×Nピク
セル(Nは4以上の整数)からなる複数のブロックに分
割し、その着目フレーム中のブロックに関する復号化デ
ータ中にそのブロックの相対変位を示す動きベクトルが
存在するとき、参照する参照フレーム中の同一のブロッ
クを利用してそのブロックを復号する動き補償を行うカ
ラー画像の復号化装置において、上記復号化手段によっ
て復号されたデータ中、上記UV成分については上記動
き補償を行い、上記Y成分については上記動き補償を行
わないことを特徴とするカラー画像の復号化装置。
10. The input target encoded data is YUV
Decoding means for decoding the image data into color pixel data composed of components, and moving image forming means for forming a moving image by continuously forming still images composed of the color pixel data. When a frame is divided into a plurality of blocks each composed of N × N pixels (N is an integer of 4 or more), and a motion vector indicating a relative displacement of the block exists in decoded data relating to a block in the frame of interest, In a color image decoding apparatus that performs motion compensation by decoding the block using the same block in a reference frame to be referenced, the motion compensation is performed on the UV component in the data decoded by the decoding unit. A color image decoding apparatus, wherein the motion compensation is not performed for the Y component.
【請求項11】 前記復号化手段は、色の出現頻度によ
ってそのY成分およびUV成分を並び替えて復号する色
順位変換手段と、この色順位変換手段によって並び替え
られた各成分の値を示すデータをランレングス復号化す
るランレングス復号化手段とを有していることを特徴と
する請求項9または10記載のカラー画像の復号化装
置。
11. The color order conversion means for rearranging and decoding the Y component and the UV component according to the frequency of appearance of a color, and a value of each component rearranged by the color order conversion means. 11. The color image decoding apparatus according to claim 9, further comprising: run length decoding means for run length decoding data.
【請求項12】 YUV成分を有するカラー画像の復号
化方法において、入力される対象符号化データを復号す
る復号化工程と、復号されたデータ中の量子化されたY
成分をスムージング処理するスムージング工程と、上記
Y成分に比べ大きく間引かれたUV成分を中間色補間に
よって処理する中間色処理工程とを設けたことを特徴と
するカラー画像の復号化方法。
12. A method for decoding a color image having a YUV component, comprising: a decoding step of decoding input encoded data to be inputted; and a quantized Y in the decoded data.
A method for decoding a color image, comprising: a smoothing step of performing a smoothing process on a component; and an intermediate color processing step of processing a UV component, which is significantly thinned compared to the Y component, by an intermediate color interpolation.
【請求項13】 入力される対象符号化データをYUV
成分からなるカラー画素データに復号する復号化工程
と、該カラー画素データからなる静止画を連続させて動
画像を形成する動画像形成工程とを備え、動画像形成工
程は、復号化対象の着目フレームをそれぞれN×Nピク
セル(Nは4以上の整数)からなる複数のブロックに分
割し、その着目フレーム中のブロックに関する復号化デ
ータ中にそのブロックの相対変位を示す動きベクトルが
存在するとき、参照する参照フレーム中の同一のブロッ
クを利用してそのブロックを復号する動き補償を行うカ
ラー画像の復号化方法において、上記復号化工程によっ
て復号されたデータ中、上記UV成分については上記動
き補償を行い、上記Y成分については上記動き補償を行
わないことを特徴とするカラー画像の復号化方法。
13. The input target encoded data is YUV
A decoding step of decoding into color pixel data composed of the components, and a moving image forming step of forming a moving image by continuously forming a still image composed of the color pixel data. When a frame is divided into a plurality of blocks each composed of N × N pixels (N is an integer of 4 or more), and a motion vector indicating a relative displacement of the block exists in decoded data relating to a block in the frame of interest, In a color image decoding method for performing motion compensation by decoding the block using the same block in a reference frame to be referred to, in the data decoded by the decoding step, the motion compensation is performed for the UV component. And performing the motion compensation on the Y component.
【請求項14】 前記復号化工程は、色の出現頻度によ
ってそのY成分およびUV成分を並び替えて復号する色
順位変換工程と、この色順位変換工程によって並び替え
られた各成分の値を示すデータをランレングス復号化す
るランレングス復号化工程とを有していることを特徴と
する請求項12または13記載のカラー画像の復号化方
法。
14. The decoding step shows a color order conversion step of rearranging and decoding the Y component and the UV component according to the frequency of appearance of the color, and shows the values of the components rearranged by the color order conversion step. 14. The color image decoding method according to claim 12, further comprising a run-length decoding step of run-length decoding data.
JP10071026A 1998-03-19 1998-03-19 Device and method for encoding color image, and device and method for decoding color image Withdrawn JPH11272843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10071026A JPH11272843A (en) 1998-03-19 1998-03-19 Device and method for encoding color image, and device and method for decoding color image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10071026A JPH11272843A (en) 1998-03-19 1998-03-19 Device and method for encoding color image, and device and method for decoding color image

Publications (1)

Publication Number Publication Date
JPH11272843A true JPH11272843A (en) 1999-10-08

Family

ID=13448615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10071026A Withdrawn JPH11272843A (en) 1998-03-19 1998-03-19 Device and method for encoding color image, and device and method for decoding color image

Country Status (1)

Country Link
JP (1) JPH11272843A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100671349B1 (en) * 2004-11-08 2007-01-19 주식회사 티엘아이 RGB residual image removing method
KR100671354B1 (en) * 2004-11-08 2007-01-19 주식회사 티엘아이 RGB residual image removing apparatus and method using it
US10021405B2 (en) 2015-08-18 2018-07-10 Kabushiki Kaisha Toshiba Encoding device, decoding device, and image processing device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100671349B1 (en) * 2004-11-08 2007-01-19 주식회사 티엘아이 RGB residual image removing method
KR100671354B1 (en) * 2004-11-08 2007-01-19 주식회사 티엘아이 RGB residual image removing apparatus and method using it
US10021405B2 (en) 2015-08-18 2018-07-10 Kabushiki Kaisha Toshiba Encoding device, decoding device, and image processing device

Similar Documents

Publication Publication Date Title
RU2654200C1 (en) Improved coding of the screen content with improved methods of palette and index card coding
US4028731A (en) Apparatus for compression coding using cross-array correlation between two-dimensional matrices derived from two-valued digital images
US5228098A (en) Adaptive spatio-temporal compression/decompression of video image signals
JP4264492B2 (en) Image decoding device
US6522783B1 (en) Re-indexing for efficient compression of palettized images
EP0777386B1 (en) Method and apparatus for encoding and decoding an image
US8238437B2 (en) Image encoding apparatus, image decoding apparatus, and control method therefor
JP4522199B2 (en) Image encoding apparatus, image processing apparatus, control method therefor, computer program, and computer-readable storage medium
US6614939B1 (en) Image compression apparatus and decoding apparatus suited to lossless image compression
JPH07231444A (en) Encoder/decorder and encoding and decoding method
US6327383B2 (en) Multi-color image encoding apparatus and method, multi-color image decoding apparatus and method
US6728412B1 (en) Method and apparatus for on-the-fly image coding
US6055273A (en) Data encoding and decoding method and device of a multiple-valued information source
KR100717002B1 (en) Apparatus for encoding and decoding image, and method thereof, and a recording medium storing program to implement the method
JPH11272843A (en) Device and method for encoding color image, and device and method for decoding color image
CA2436437A1 (en) Moving picture information compressing method and its system
JPH11308465A (en) Encoding method for color image, encoder therefor, decoding method for color image and decoder therefor
GB2366472A (en) Improvements relating to representations of compressed video
JPH0937262A (en) Image processing unit and method
US6219445B1 (en) Multi-color image encoding and/or decoding apparatus containing color order table and the method thereof
JPH11272842A (en) Device and method for encoding moving picture consisting of multicolor image and device and method for decoding moving picture consisting of multicolor image
JPH11272847A (en) Device and method for encoding moving image consisting of multicolor image, and device and method for decoding the same moving image
JPH11272844A (en) Device and method for encoding moving image consisting of multicolor image, and device and method for decoding the same moving image
JP4034385B2 (en) Multi-color image encoding apparatus and method, and multi-color image decoding apparatus and method
JPH08317385A (en) Image encoder and decoder

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050607