JP2000138937A - Image compression coding method and device - Google Patents

Image compression coding method and device

Info

Publication number
JP2000138937A
JP2000138937A JP31147698A JP31147698A JP2000138937A JP 2000138937 A JP2000138937 A JP 2000138937A JP 31147698 A JP31147698 A JP 31147698A JP 31147698 A JP31147698 A JP 31147698A JP 2000138937 A JP2000138937 A JP 2000138937A
Authority
JP
Japan
Prior art keywords
image compression
intra
inter
compression
mean square
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
JP31147698A
Other languages
Japanese (ja)
Inventor
Hideyuki Narita
秀之 成田
Daisuke Hiranaka
大介 平中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP31147698A priority Critical patent/JP2000138937A/en
Publication of JP2000138937A publication Critical patent/JP2000138937A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To enhance the compression efficiency and to suppress deterioration in the image quality. SOLUTION: The image compression device is an MPEG image compression device that respectively selects in-frame compression or inter-frame compression for each macro block, the compression device has a motion detection section 11 that obtains a mean square error for each of block divisions that are 1/4 divisions of a macro block and controller 13 that sets priority for selection of the in-frame compression or the inter-frame compression and selects the in-frame compression as a macro block type when a maximum value of the means square errors of each block is sufficiently small.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、例えばいわゆるM
PEG(Moving Picture image coding ExpertsGroup)
等の動き検出を行う画像圧縮符号化方法及び装置に関す
る。
The present invention relates to a so-called M
PEG (Moving Picture image coding Experts Group)
The present invention relates to an image compression encoding method and apparatus for performing motion detection such as the above.

【0002】[0002]

【従来の技術】MPEG等の動き検出を用いたフレーム
間圧縮を行う場合は、例えば図4中(A)に示すような
1フレーム内の画像を16画素×16画素の単位に分割
(以下、適宜これをマクロブロックMBと呼ぶ)し、図
4中(B)に示すように当該マクロブロックMB単位で
参照画像から現画像への動き検出を行う。なお、当該動
き検出を行った後、フレーム間で参照画像から現画像へ
の残差情報と動きベクトルを圧縮したマクロブロックは
インターマクロブロックと呼ばれ、一方、動き検出情報
を使わずフレーム内で現画像の情報のみを圧縮するマク
ロブロックはイントラマクロブロックと呼ばれる。
2. Description of the Related Art In the case of performing inter-frame compression using motion detection such as MPEG, an image in one frame as shown in FIG. This is appropriately referred to as a macroblock MB), and motion detection from the reference image to the current image is performed in units of the macroblock MB as shown in FIG. After performing the motion detection, a macroblock obtained by compressing the residual information and the motion vector from the reference image to the current image between frames is called an inter macroblock. A macroblock that compresses only the information of the current image is called an intra macroblock.

【0003】図5には、一般的なMPEG画像圧縮装置
の構成を示す。
FIG. 5 shows the configuration of a general MPEG image compression apparatus.

【0004】この図5において、端子100には現画像
のデータが入力され、動き検出部101に送られる。
In FIG. 5, data of a current image is input to a terminal 100 and sent to a motion detecting unit 101.

【0005】動き検出部101は、現画像のデータとメ
モリ102に記憶されている前の画像(参照画像)のデ
ータとを用いて、マクロブロック単位で動き検出を行
い、コントローラ103に対して、後述する平均2乗予
測誤差と平均2乗偏差を出力する。
[0005] The motion detection unit 101 performs motion detection on a macroblock basis using the data of the current image and the data of the previous image (reference image) stored in the memory 102. It outputs a mean square prediction error and a mean square deviation described later.

【0006】コントローラ103は、DSP(ディジタ
ルシグナルプロセッサ)からなり、動き検出101から
の平均2乗予測誤差と平均2乗偏差の情報を用い、各マ
クロブロック毎にフレーム内圧縮若しくはフレーム間圧
縮の判断、すなわちイントラマクロブロックか若しくは
インターマクロブロックかの判断を行う。各マクロブロ
ックがフレーム内圧縮若しくはフレーム間圧縮(イント
ラマクロブロックか若しくはインターマクロブロック)
であるかは、マクロブロックタイプとして決定され、こ
のマクロブロックタイプの情報がコントローラ103か
ら動き検出部101に出力される。
The controller 103 is composed of a DSP (Digital Signal Processor), and uses the information of the mean square prediction error and the mean square deviation from the motion detection 101 to determine the intra-frame compression or the inter-frame compression for each macro block. That is, it is determined whether it is an intra macro block or an inter macro block. Each macro block is intra-frame compression or inter-frame compression (intra macro block or inter macro block)
Is determined as the macroblock type, and the information of the macroblock type is output from the controller 103 to the motion detection unit 101.

【0007】その後、動き検出部101からは、コント
ローラ103からのマクロブロックタイプに応じて、イ
ントラマクロブロックのときの画像データ或いはインタ
ーマクロブロックのときの動き予測残差成分と、動きベ
クトルとが出力され、DCT(離散コサイン変換)及び
量子化部104に送られる。
[0007] Thereafter, from the motion detecting section 101, image data for an intra macroblock or a motion prediction residual component for an inter macroblock and a motion vector are output according to the macroblock type from the controller 103. The signal is sent to a DCT (discrete cosine transform) and quantization unit 104.

【0008】DCT及び量子化部104では、イントラ
マクロブロックのときの画像データとインターマクロブ
ロックのときの動き予測残差成分を、マクロブロック単
位でDCTし、さらにマクロブロック単位で決定した量
子化スケールにて量子化し、当該量子化後のDCT係数
を動きベクトルと共に可変長符号化部105に送る。
[0008] The DCT and quantization unit 104 performs DCT on the image data in the case of an intra macroblock and the motion prediction residual component in the case of an inter macroblock in units of macroblocks, and furthermore, the quantization scale determined in units of macroblocks. , And sends the quantized DCT coefficient to the variable-length coding unit 105 together with the motion vector.

【0009】可変長符号化部105では、DCT及び量
子化部104から供給されたデータを可変長符号化し、
得られた圧縮データが端子106から出力される。
The variable length coding unit 105 performs variable length coding on the data supplied from the DCT and quantization unit 104,
The obtained compressed data is output from the terminal 106.

【0010】上述したように、MPEG等では、同じフ
レーム内でイントラ/インターマクロブロックが混在し
て画像を形成するため、各マクロブロック毎にイントラ
マクロブロックかインターマクロブロックのどちらを使
用するかを画像圧縮時に決定させる必要がある。
As described above, in MPEG and the like, since an image is formed by mixing intra / inter macroblocks in the same frame, it is determined whether each macroblock uses an intra macroblock or an inter macroblock. It must be determined at the time of image compression.

【0011】この際には、符号化効率が良く且つ画質劣
化の少ないマクロブロックタイプをを選び符号化する必
要がある。
In this case, it is necessary to select a macroblock type having good coding efficiency and little deterioration in image quality to perform coding.

【0012】図5に示した従来の技術の場合、イントラ
/インターマクロブロック決定時には、例えば下記に示
す手法が使われている。
In the case of the conventional technique shown in FIG. 5, for example, the following method is used when determining an intra / inter macro block.

【0013】図6と図7を用いて、図5の構成における
イントラ/インターマクロブロックの決定の処理につい
て説明する。
The process of determining an intra / inter macro block in the configuration of FIG. 5 will be described with reference to FIGS. 6 and 7.

【0014】先ず、動き検出部101では、図6及び式
(1),式(2)に示すように、現画像のマクロブロッ
クにおいて、16×16画素の各輝度値Y(x,y)(Y(0,
0))〜Y(15,15))の平均値avgYを求め、その平均値avg
Yと各画素の輝度値Y(x,y)の差を二乗し足しあわせて
平均を求める。以下、これを平均2乗偏差と呼び記号VA
RORで表す。
First, as shown in FIG. 6 and Equations (1) and (2), the motion detection unit 101 sets each luminance value Y (x, y) (16 (16) pixels of the macroblock of the current image to 16 × 16 pixels. Y (0,
0)) to the average value avgY of Y (15,15)), and the average value avgY
The difference between Y and the luminance value Y (x, y) of each pixel is squared and added to obtain an average. Hereinafter, this is called the mean square deviation, and the symbol VA
Expressed as ROR.

【0015】[0015]

【数1】 (Equation 1)

【0016】更に、動き検出部101では、図6及び式
(3)に示すように、動き予測時の現画像と対応する参
照画像のマクロブロックにおいて、現画像と参照画像間
のマクロブロック内でそれぞれ座標が等しい各画素の各
輝度値Y(0,0)〜Y(15,15)とY'(0,0)〜Y'(15,15)の差
の2乗を求め、これを16×16画素分足しあわせ、平
均を求める。以下、これを平均2乗予測誤差と呼び記号
VARで表す。
Further, as shown in FIG. 6 and equation (3), the motion detecting section 101 sets, in the macroblock of the reference picture corresponding to the current picture at the time of motion prediction, the macroblock between the current picture and the reference picture. The square of the difference between each of the luminance values Y (0,0) to Y (15,15) and Y ′ (0,0) to Y ′ (15,15) of each pixel having the same coordinates is obtained, and this is 16 × 16 pixels are added and the average is obtained. Hereinafter, this is referred to as the mean square prediction error.
Expressed as VAR.

【0017】[0017]

【数2】 (Equation 2)

【0018】次に、動き検出部101で求められた平均
2乗偏差VARORと平均2乗予測誤差VARは、図7のステッ
プS102として、コントローラ103に送られる。
Next, the mean square deviation VAROR and mean square prediction error VAR obtained by the motion detecting section 101 are sent to the controller 103 as step S102 in FIG.

【0019】次に、当該コントローラ103では、ステ
ップS103として、上記平均2乗偏差VARORと平均2
乗予測誤差VARを比較し、VAR≦VARORの場合は、ステッ
プS105にてインターマクロブロックを選択し、その
マクロブロックタイプを動き検出部101に出力する。
一方、VAROR<VARの場合は、ステップ104にてイント
ラマクロブロックを選択し、そのマクロブロックタイプ
を動き検出部101に出力する。
Next, in the controller 103, at step S103, the mean square deviation VAROR and the mean 2
The power prediction error VAR is compared. If VAR ≦ VAROR, an inter macroblock is selected in step S105, and the macroblock type is output to the motion detection unit 101.
On the other hand, if VAROR <VAR, an intra macroblock is selected in step 104, and the macroblock type is output to the motion detection unit 101.

【0020】その後は、ステップS106にて全マクロ
ブロックについてのマクロブロックタイプが決定された
ときは、ステップS107にて次のフレームの処理に移
り、全マクロブロックのタイプが決定されていない時は
ステップS102以降の処理を行う。
Thereafter, when the macroblock types for all the macroblocks have been determined in step S106, the process proceeds to the next frame in step S107. When the types of all the macroblocks have not been determined, the process proceeds to step S107. The processing after S102 is performed.

【0021】以上により、各マクロブロックタイプに基
づいて、フレーム間圧縮イントラ或いはフレーム内圧縮
が行われることになる。
As described above, intra-frame compression intra or intra-frame compression is performed based on each macroblock type.

【0022】[0022]

【発明が解決しようとする課題】ところで、上述したよ
うに動き検出を利用してフレーム間圧縮を行った場合と
フレーム内圧縮のみを行った場合とでは、一般的にフレ
ーム間圧縮の方がデータ量が少なく圧縮効率が良いこと
が知られている。しかし、上述の図7に示した従来のマ
クロブロックタイプ決定処理のフローチャートのよう
に、単純に平均2乗偏差VARORと平均2乗予測誤差VARの
比較のみでイントラ/インターのマクロブロックタイプ
判別を行うと、イントラマクロブロックが選ばれる数が
多く、圧縮効率は良くない。
As described above, when inter-frame compression is performed using motion detection as described above and when only intra-frame compression is performed, generally, inter-frame compression is more efficient than data compression. It is known that the amount is small and the compression efficiency is good. However, as shown in the flowchart of the conventional macroblock type determination processing shown in FIG. 7, the intra / inter macroblock type discrimination is performed simply by simply comparing the mean square deviation VAROR and the mean square prediction error VAR. Therefore, the number of intra macroblocks selected is large, and the compression efficiency is not good.

【0023】一方で、例えば平坦な画面では、画質の劣
化が人間の目に目立ちやすい事も知られている。しか
し、上述した従来例の場合、マクロブロック内が平坦で
あると、動き検出がうまくいかずに間違った動きベクト
ルを持ってきた場合でも平均2乗偏差VARORと平均2乗
予測誤差VARに差が出難く、間違った動きベクトルを持
ったインターマクロブロックが選ばれる事がある。この
場合、画面が平坦であるため画質の劣化として目立ちや
すい。特に、上述したように、圧縮効率を上げることを
考えてインターマクロブロックを単純に優先選択する
と、この問題が顕著に表れる。
On the other hand, it is also known that, for example, on a flat screen, deterioration of image quality is easily noticeable to human eyes. However, in the case of the conventional example described above, if the inside of the macroblock is flat, the difference between the mean square deviation VAROR and the mean square prediction error VAR will occur even if the motion detection fails and an incorrect motion vector is obtained. There is a case where an inter macroblock having a wrong motion vector is difficult to appear and is selected. In this case, since the screen is flat, the deterioration of the image quality tends to be conspicuous. In particular, as described above, if the inter-macroblock is simply selected with a view to increasing the compression efficiency, this problem becomes conspicuous.

【0024】そこで、本発明はこのような状況に鑑みて
なされたものであり、圧縮効率を上げ、且つ、画質の劣
化をも抑えることが可能な、画像圧縮符号化方法及び装
置を提供することを目的とする。
Accordingly, the present invention has been made in view of such a situation, and provides an image compression encoding method and apparatus capable of increasing compression efficiency and suppressing deterioration of image quality. With the goal.

【0025】[0025]

【課題を解決するための手段】本発明の画像圧縮符号化
方法は、複数の画素からなる符号化単位毎に、画像内圧
縮或いは画像間圧縮をそれぞれ選択して圧縮を行う画像
圧縮符号化方法であり、画像内圧縮と画像間圧縮の選択
に優先度を設け、符号化単位を複数に分割した各ブロッ
ク毎に所定のパラメータを求め、各ブロック毎の所定の
パラメータと視覚特性に応じた所定値との比較に基づい
て優先度を変化させ、優先度に基づいて画像内圧縮或い
は画像間圧縮を選択することにより、上述した課題を解
決する。
According to the present invention, there is provided an image compression / encoding method for performing compression by selecting either intra-image compression or inter-image compression for each encoding unit including a plurality of pixels. Priority is given to the selection of intra-image compression and inter-image compression, a predetermined parameter is obtained for each block obtained by dividing the coding unit into a plurality, and a predetermined parameter corresponding to the predetermined parameter and visual characteristics of each block is obtained. The above-described problem is solved by changing the priority based on the comparison with the value and selecting the intra-image compression or the inter-image compression based on the priority.

【0026】また、本発明の画像圧縮符号化装置は、複
数の画素からなる符号化単位毎に、画像内圧縮或いは画
像間圧縮をそれぞれ選択して圧縮を行う画像圧縮符号化
装置であり、画像内圧縮と画像間圧縮の選択に用いる優
先度を設定する優先度設定手段と、符号化単位を複数に
分割した各ブロック毎に所定のパラメータを求めるパラ
メータ生成手段と、所定のパラメータと視覚特性に応じ
た所定値との比較を行う比較手段と、比較結果に基づい
て優先度を変化させる優先度制御手段と、優先度に基づ
いて画像内圧縮或いは画像間圧縮を選択する選択手段と
を有することにより、上述した課題を解決する。
An image compression encoding apparatus according to the present invention is an image compression encoding apparatus which performs compression by selecting either intra-image compression or inter-image compression for each encoding unit composed of a plurality of pixels. Priority setting means for setting priorities used for selection of intra-compression and inter-picture compression; parameter generation means for obtaining a predetermined parameter for each block obtained by dividing the coding unit into a plurality of blocks; A comparing unit for comparing with a predetermined value corresponding thereto, a priority control unit for changing a priority based on the comparison result, and a selecting unit for selecting intra-image compression or inter-image compression based on the priority. Solves the above-described problem.

【0027】[0027]

【発明の実施の形態】本発明の好ましい実施の形態につ
いて、図面を参照しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described with reference to the drawings.

【0028】図1には、本発明の画像圧縮符号化方法及
び装置が適用される一実施の形態としてのMPEG画像
圧縮装置の構成を示す。
FIG. 1 shows the configuration of an MPEG image compression apparatus as an embodiment to which the image compression encoding method and apparatus of the present invention is applied.

【0029】この図1において、端子10には現画像の
データが入力され、動き検出部11に送られる。
In FIG. 1, data of the current image is input to a terminal 10 and sent to a motion detecting section 11.

【0030】動き検出部11は、現画像のデータとメモ
リ12に記憶されている前の画像(参照画像)のデータ
とを用いて、マクロブロック単位で動き検出を行い、前
記式(1)乃至式(3)により平均2乗偏差VARORと平
均2乗予測誤差VARを求め、これら平均2乗偏差VARORと
平均2乗予測誤差VARをコントローラ13に対して出力
する。
The motion detecting section 11 performs motion detection on a macroblock basis using the data of the current image and the data of the previous image (reference image) stored in the memory 12, and obtains the equations (1) to (4). The mean square deviation VAROR and the mean square prediction error VAR are obtained by the equation (3), and the mean square deviation VAROR and the mean square prediction error VAR are output to the controller 13.

【0031】また、本実施の形態の動き検出部11で
は、図2及び式(4),式(5)に示すように、16×
16画素のマクロブロックの8×8の4つのブロックbl
ock1〜block4に分け、それぞれのブロックblock1〜bloc
k4において8×8画素の各輝度値Y(x,y)(Y(0,0))〜
Y(7,7))の平均値avgyを求め、その平均値avgyと各
画素の輝度値Y(x,y)の差を二乗し足しあわせて平均を
求める。これら各ブロックblock1〜block4の平均2乗偏
差は、各ブロックblock1〜block4の平坦度を表し、以下
記号ACTIVITY(1)〜ACTIVITY(4)で表す。なお、式(4)
及び式(5)は例えばブロックblock1の平均2乗偏差AC
TIVITY(1)を求める式である。
Further, in the motion detecting section 11 of the present embodiment, as shown in FIG. 2 and equations (4) and (5),
4 8 × 8 blocks bl of 16-pixel macroblock
divided into ock1 ~ block4, each block block1 ~ bloc
At k4, each luminance value of 8 × 8 pixels Y (x, y) (Y (0,0)) to
Y (7,7)) is calculated, and the difference between the average value avgy and the luminance value Y (x, y) of each pixel is squared and the average is calculated. The mean square deviation of each of the blocks block1 to block4 represents the flatness of each of the blocks block1 to block4, and is hereinafter represented by the symbols ACTIVITY (1) to ACTIVITY (4). Equation (4)
And equation (5) are, for example, the mean square deviation AC of block block1.
This is an expression for calculating TIVITY (1).

【0032】[0032]

【数3】 (Equation 3)

【0033】動き検出部11は、上述のようにしてマク
ロブロック内を4つに分割した各ブロックblock1〜bloc
k4の平均2乗偏差ACTIVITY(1)〜ACTIVITY(4)も、コント
ローラ13に対して出力する。
The motion detector 11 divides the macroblock into four blocks 1 to block, as described above.
The mean square deviations ACTIVITY (1) to ACTIVITY (4) of k4 are also output to the controller 13.

【0034】コントローラ13は、DSP(ディジタル
シグナルプロセッサ)からなり、動き検出11からの平
均2乗偏差VAROR及び平均2乗予測誤差VARと、マクロブ
ロックを4分割した各ブロックblock1〜block4の平均2
乗偏差ACTIVITY(1)〜ACTIVITY(4)の情報とを用い、さら
に例えば端子17から設定された後述する固定の定数で
あるT1,T2,P1,P2を用いて、後述するよう
に、各マクロブロック毎にフレーム内圧縮若しくはフレ
ーム間圧縮の判断、すなわちイントラマクロブロックか
若しくはインターマクロブロックかの判断を行う。な
お、固定値T1,T2は後述するように各ブロックbloc
k1〜block4の平均2乗偏差ACTIVITY(1)〜ACTIVITY(4)の
うちの最大値と比較される定数であり、当該コントロー
ラ13の内部データとして保存され、T1>T2の関係
を持っている。また、固定値P1,P2は、マクロブロ
ックタイプに優先度(重み付け)を持たせるために使用
される定数であり、当該コントローラ13の内部データ
として保存される。これら各固定値T1,T2,P1,
P2は、予め視覚特性を考慮して決定されている。
The controller 13 is composed of a DSP (Digital Signal Processor), and has a mean square deviation VAROR and a mean square prediction error VAR from the motion detection 11, and an average 2 of each block block1 to block4 obtained by dividing the macroblock into four.
Using the information of the power deviations ACTIVITY (1) to ACTIVITY (4), and further using, for example, T1, T2, P1, and P2 which are fixed constants described later set from the terminal 17, as described later, each macro Judgment of intra-frame compression or inter-frame compression is performed for each block, that is, determination of intra macroblock or inter macroblock. It should be noted that the fixed values T1 and T2 are, as described later,
It is a constant that is compared with the maximum value of the mean square deviations ACTIVITY (1) to ACTIVITY (4) of k1 to block4, is stored as internal data of the controller 13, and has a relationship of T1> T2. The fixed values P1 and P2 are constants used to give priority (weight) to the macroblock type, and are stored as internal data of the controller 13. These fixed values T1, T2, P1,
P2 is determined in advance in consideration of visual characteristics.

【0035】このコントローラ13において、各マクロ
ブロックがフレーム内圧縮若しくはフレーム間圧縮(イ
ントラマクロブロックか若しくはインターマクロブロッ
ク)であるかは、マクロブロックタイプとして決定さ
れ、このマクロブロックタイプの情報がコントローラ1
3から動き検出部11に出力される。
The controller 13 determines whether each macroblock is intra-frame compression or inter-frame compression (intra macroblock or inter-macroblock) as a macroblock type, and the information of the macroblock type is determined by the controller 1.
3 to the motion detector 11.

【0036】その後、動き検出部11からは、コントロ
ーラ13からのマクロブロックタイプに応じて、イント
ラマクロブロックのときの画像データ或いはインターマ
クロブロックのときの動き予測残差成分と、動きベクト
ルとが出力され、DCT(離散コサイン変換)及び量子
化部14に送られる。
Thereafter, from the motion detecting section 11, image data for an intra macro block or a motion prediction residual component for an inter macro block and a motion vector are output according to the macro block type from the controller 13. The signal is sent to a DCT (discrete cosine transform) and quantization unit 14.

【0037】DCT及び量子化部14では、イントラマ
クロブロックのときの画像データ或いはインターマクロ
ブロックのときの動き予測残差成分を、マクロブロック
単位でDCTし、さらにマクロブロック単位で決定した
量子化スケールにて量子化し、当該量子化後のDCT係
数を動きベクトルと共に可変長符号化部15に送る。
The DCT and quantization section 14 performs DCT on the image data in the case of an intra macroblock or the motion prediction residual component in the case of an inter macroblock on a macroblock basis, and furthermore, a quantization scale determined on a macroblock basis. , And sends the quantized DCT coefficient to the variable-length encoding unit 15 together with the motion vector.

【0038】可変長符号化部15では、DCT及び量子
化部14から供給されたデータを可変長符号化し、得ら
れた圧縮データが端子16から出力される。
The variable length coding unit 15 performs variable length coding on the data supplied from the DCT and quantization unit 14 and outputs the obtained compressed data from a terminal 16.

【0039】ところで、前述したように動き検出を利用
してフレーム間圧縮を行った場合とフレーム内圧縮のみ
を行った場合では、一般的にフレーム間圧縮の方がデー
タ量が少なく圧縮効率が良いことが知られている。しか
し、前述した従来例のように、単純に平均2乗偏差VARO
Rと平均2乗予測誤差VARの比較のみでイントラ/インタ
ーのマクロブロックタイプ判別を行うと、イントラマク
ロブロックが選ばれる数が多く、圧縮効率は良くない。
As described above, when inter-frame compression is performed using motion detection and when only intra-frame compression is performed, inter-frame compression generally has a smaller data amount and higher compression efficiency. It is known. However, as in the above-mentioned conventional example, simply the mean square deviation VARO
When intra / inter macroblock type discrimination is performed only by comparing R and the mean square prediction error VAR, the number of intra macroblocks selected is large and the compression efficiency is not good.

【0040】このようなことから、本実施の形態では、
定常的にはインターマクロブロックを選び易くして画像
圧縮の効率化を実現するために、平均2乗偏差VARORと
平均2乗予測誤差VARを比較する際にインターマクロブ
ロックが選ばれやすくするようにある固定値P1を設
け、平均2乗予測誤差VARが当該固定値P1より小さい
場合にはインターマクロブロックを選ぶようにしてい
る。
From the above, in the present embodiment,
In order to make it easier to select inter macroblocks regularly and to improve the efficiency of image compression, make it easier to select inter macroblocks when comparing the mean square deviation VAROR and the mean square prediction error VAR. A fixed value P1 is provided, and when the mean square prediction error VAR is smaller than the fixed value P1, an inter macroblock is selected.

【0041】また、前述したように、例えば平坦な画面
では、画質の劣化が人間の目に目立ち易く、また、例え
ばマクロブロック内が平坦であると、動き検出がうまく
いかずに間違った動きベクトルを持ってきた場合でも平
均2乗偏差VARORと平均2乗予測誤差VARに差が出難く、
間違った動きベクトルを持ったインターマクロブロック
が選ばれる事がある。この場合、画面が平坦であるため
画質の劣化として目立易く、特に、圧縮効率を上げるこ
とを考えてインターマクロブロックを単純に優先選択す
ると、この問題が顕著に表れる。
As described above, for example, on a flat screen, the deterioration of the image quality is easily noticeable to human eyes. For example, when the inside of a macro block is flat, the motion detection is not successful and an incorrect motion vector is obtained. Even if you bring the difference between the mean square deviation VAROR and the mean square prediction error VAR,
An inter macroblock having an incorrect motion vector may be selected. In this case, since the screen is flat, deterioration in image quality is conspicuous as deterioration. In particular, if priority is simply given to an inter macro block in consideration of increasing compression efficiency, this problem becomes conspicuous.

【0042】このようなことから、本実施の形態では、
平坦な画面で動き検出がうまくいかなかった場合にはイ
ントラマクロブロックが選ばれ易くなるようにし、視覚
特性上の画質劣化を防ぐことができるようにするため
に、マクロブロック内の平坦度を表す値としてマクロブ
ロックを4分割した各ブロックblock1〜block4の平均2
乗偏差ACTIVITY(1)〜ACTIVITY(4)を求め、さらにこれら
のうち最大の平均2乗偏差ACTIVITYを用い、この最大の
平均2乗偏差ACTIVITYがある固定値T1より小さく、更
に当該最大の平均2乗偏差ACTIVITYがある固定値T2よ
り小さい場合はイントラマクロブロックが選ばれやすく
なるように、ある固定値P2と平均2乗予測誤差VARを
加算した値(VAR+P2)と平均2乗偏差VARORと間で比較
を行うようにしている。
From the above, in the present embodiment,
If the motion detection is not successful on a flat screen, it indicates the degree of flatness within the macroblock so that intra macroblocks can be easily selected and image quality degradation in visual characteristics can be prevented. Average value of each block block1 to block4 obtained by dividing a macroblock into four as a value
The squared deviations ACTIVITY (1) to ACTIVITY (4) are obtained, and the maximum mean squared deviation ACTIVITY is used. The maximum mean squared deviation ACTIVITY is smaller than a certain fixed value T1. If the squared deviation ACTIVITY is smaller than a certain fixed value T2, a value obtained by adding a certain fixed value P2 and a mean square prediction error VAR (VAR + P2) and a mean squared deviation VAROR so that an intra macroblock is easily selected. Comparisons are made between them.

【0043】本実施の形態では、図3に示すようなフロ
ーチャートにて、上述したようなマクロブロックの選択
処理を実現している。
In the present embodiment, the above-described macro block selection processing is realized by a flowchart as shown in FIG.

【0044】図3において、先ず動き検出部11では、
ステップS1として、前記式(1)乃至式(5)の計算
を行って、マクロブロックにおける平均2乗偏差VAROR
及び平均2乗予測誤差VARと、マクロブロック内を4つ
に分割した各ブロックblock1〜block4の平均2乗偏差AC
TIVITY(1)〜ACTIVITY(4)を求める。これら平均2乗偏差
VAROR及び平均2乗予測誤差VARと4つの平均2乗偏差AC
TIVITY(1)〜ACTIVITY(4)のデータは、コントローラ13
のレジスタに渡される。
In FIG. 3, first, in the motion detecting section 11,
In step S1, the above equations (1) to (5) are calculated, and the mean square deviation VAROR in the macro block is calculated.
And the mean square prediction error VAR and the mean square deviation AC of each of the blocks block1 to block4 obtained by dividing the macroblock into four.
Find TIVITY (1)-ACTIVITY (4). These mean square deviations
VAROR and mean square prediction error VAR and four mean square deviations AC
The data of TIVITY (1) to ACTIVITY (4)
Is passed to the register.

【0045】また、コントローラ13には、ステップS
2として、固定値T1,T2,P1,P2が予め入力さ
れ、当該コントローラ13の内部データとして保存され
ている。
The controller 13 has a step S
2, fixed values T1, T2, P1, and P2 are input in advance and stored as internal data of the controller 13.

【0046】コントローラ13は、ステップS3とし
て、レジスタに格納された4つの平均2乗偏差ACTIVITY
(1)〜ACTIVITY(4)の中から最大のものを選び、その最大
の平均2乗偏差ACTIVITYを変数ACTとしてレジスタに保
存する。
The controller 13 performs, at step S3, the four mean square deviations ACTIVITY stored in the register.
The largest one is selected from (1) to ACTIVITY (4), and the largest mean square deviation ACTIVITY is stored in a register as a variable ACT.

【0047】次に、コントローラ13は、ステップS4
として、変数ACTと固定値T1とを比較し、ACT<T1の
場合はステップS6の処理に進み、ACT≧T1の場合は
ステップS5の処理に進む。
Next, the controller 13 proceeds to step S4
The variable ACT is compared with the fixed value T1, and if ACT <T1, the process proceeds to step S6. If ACT ≧ T1, the process proceeds to step S5.

【0048】コントローラ13は、ステップS5の処理
に進むと、平均2乗予測誤差VARと固定値P1の大小を
比較する。このステップS5の比較において、平均2乗
予測誤差VARが固定値P1より小さい場合は、ステップ
S11に進んでマクロブロックタイプを強制的にインタ
ーマクロブロックに決定する。これにより、平坦度が低
い場合、すなわち最大の平均2乗偏差ACTIVITYが高い場
合は、マクロブロックタイプとしてインターマクロブロ
ックの選択される割合が高くなる。一方、ステップS5
において、平均2乗予測誤差VARが固定値P1より大き
い場合は、ステップS6の処理に進む。
When the process proceeds to step S5, the controller 13 compares the mean square prediction error VAR with the fixed value P1. If the average square prediction error VAR is smaller than the fixed value P1 in the comparison in step S5, the process proceeds to step S11, and the macroblock type is forcibly determined to be an inter macroblock. Accordingly, when the flatness is low, that is, when the maximum mean square deviation ACTIVITY is high, the ratio of selecting the inter macroblock as the macroblock type increases. On the other hand, step S5
If the mean square prediction error VAR is larger than the fixed value P1, the process proceeds to step S6.

【0049】コントローラ13は、ステップS6の処理
に進むと、変数ACTと固定値T2の比較を行う。この比
較において、ACT≧T2(或いはACT>T2)の場合は、
ステップS7の処理に進み、インター/イントラのどち
らにも優先度をつけずに平均2乗偏差VARORと平均2乗
予測誤差VARの大小を比較する。これにより、最大の平
均2乗偏差ACTIVITYがある程度低い場合は、インター/
イントラのマクロブロックタイプが同等に選択される。
すなわち、ステップS7において、VAR≦VARORとなった
場合はステップS11にてインターマクロブロックが選
択され、一方、VAR>VARORとなった場合はステップS1
2にてイントラマクロブロックが選択される。
When the process proceeds to step S6, the controller 13 compares the variable ACT with the fixed value T2. In this comparison, when ACT ≧ T2 (or ACT> T2),
Proceeding to step S7, the magnitude of the mean square deviation VAROR and the magnitude of the mean square prediction error VAR are compared without assigning a priority to either the inter or the intra. Thus, if the maximum mean square deviation ACTIVITY is low to some extent,
Intra macroblock types are equally selected.
That is, in step S7, if VAR ≦ VAROR, an inter macroblock is selected in step S11. On the other hand, if VAR> VAROR, step S1 is performed.
At 2, an intra macroblock is selected.

【0050】一方、ステップS6において、ACT<T2
となされた場合は、コントローラ13の処理はステップ
S8に進み、マクロブロックタイプとしてイントラマク
ロブロックが優先されるように、平均2乗予測誤差VAR
に固定値P2を加えた(VAR+P2)と平均2乗偏差VAROR
の大小を比較する。これにより、最大の平均2乗偏差AC
TIVITYが十分低い場合はイントラマクロブロックが優先
されることになる。このステップS8での大小比較の結
果、平均2乗偏差VARORが優先度をつけられた平均2乗
予測誤差(VAR+P2)より小さい場合は、ステップS9に
おいてマクロブロックタイプをイントラマクロブロック
とし、それ以外の場合は、ステップS10においてマク
ロブロックタイプをインターマクロブロックとする。
On the other hand, in step S6, ACT <T2
Is satisfied, the process of the controller 13 proceeds to step S8, and the mean square prediction error VAR is set so that the intra macroblock is prioritized as the macroblock type.
(VAR + P2) obtained by adding the fixed value P2 to the mean square deviation VAROR
Compare large and small. This gives the maximum mean squared deviation AC
If the TIVITY is sufficiently low, the intra macroblock has priority. If the result of the magnitude comparison in step S8 is that the mean square deviation VAROR is smaller than the prioritized mean square prediction error (VAR + P2), the macroblock type is set to an intra macroblock in step S9. Otherwise, in step S10, the macro block type is set to an inter macro block.

【0051】上述のようにしてコントローラ13にて設
定されたマクロブロックタイプは、ステップS13にて
動き検出部11に渡される。その後、ステップS14に
おいて、全マクロブロックについてのマクロブロックタ
イプが決定されたときは、ステップS15にて次のフレ
ームの処理に移り、全マクロブロックのタイプが決定さ
れていない時はステップS1以降の処理を行う。これに
より、動き検出部11以降の構成では、コントローラ1
3にて決定されたマクロブロックタイプに基づいてフレ
ーム内若しくはフレーム間圧縮が行われる。
The macroblock type set by the controller 13 as described above is passed to the motion detector 11 in step S13. Thereafter, in step S14, when the macroblock types for all the macroblocks have been determined, the process proceeds to the next frame in step S15, and when the type of all the macroblocks has not been determined, the processes after step S1 are performed. I do. Thereby, in the configuration after the motion detection unit 11, the controller 1
Intra-frame or inter-frame compression is performed based on the macroblock type determined in step 3.

【0052】上述したように、本発明実施の形態によれ
ば、定常状態で圧縮効率の高いフレーム間圧縮の画素ブ
ロックを優先的に使う事により、全体的な画質の向上が
得られることになり、また、視覚特性で画質の劣化が目
立つ平坦な画素ブロックにおいては、フレーム内圧縮を
優先させるため、単純なフレーム間圧縮優先選択の場合
に比べ、動き検出の精度が良くない場合でも画質の劣化
を防ぐ事ができ、効率的な圧縮と高画質化を両立でき
る。
As described above, according to the embodiment of the present invention, the overall image quality can be improved by preferentially using the pixel blocks of the inter-frame compression having high compression efficiency in the steady state. In addition, in a flat pixel block in which the image quality is conspicuous in visual characteristics, the priority is given to intra-frame compression. Can be prevented, and both efficient compression and high image quality can be achieved.

【0053】[0053]

【発明の効果】以上の説明で明らかなように、本発明に
おいては、画像内圧縮と画像間圧縮の選択に優先度を設
け、符号化単位を複数に分割した各ブロック毎に求めた
所定のパラメータと視覚特性に応じた所定値との比較に
基づいて優先度を変化させ、優先度に基づいて画像内圧
縮或いは画像間圧縮を選択することにより、圧縮効率を
上げ、且つ、画質の劣化をも抑えることが可能である。
As is apparent from the above description, in the present invention, priority is given to the selection between intra-image compression and inter-image compression, and a predetermined coding unit is obtained for each block obtained by dividing the coding unit into a plurality of blocks. By changing the priority based on the comparison between the parameter and a predetermined value corresponding to the visual characteristic, and selecting the intra-image compression or the inter-image compression based on the priority, the compression efficiency is increased and the deterioration of the image quality is reduced. Can also be suppressed.

【0054】すなわち、本発明によれば、定常状態では
圧縮効率の高い画像間圧縮の符号化単位を優先的に使う
事によって全体的な画質の向上を得るようにし、視覚特
性で画質の劣化が目立つ平坦な符号化単位に対しては画
像内圧縮を優先させることで、単純な画像間圧縮優先選
択の場合に比べ、動き検出の精度が良くない場合でも画
質の劣化を防ぐ事が出来、効率的な圧縮と高画質化を両
立している。
In other words, according to the present invention, in the steady state, the coding quality of the inter-picture compression having high compression efficiency is preferentially used to improve the overall picture quality, and the visual quality can reduce the picture quality. By giving priority to intra-image compression for conspicuous flat coding units, it is possible to prevent image quality degradation even when motion detection accuracy is poor, compared to the case of simple inter-image compression priority selection. It achieves both effective compression and high image quality.

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

【図1】本発明の画像圧縮符号化方法及び装置が適用さ
れる一実施の形態としてのMPEG画像圧縮装置の概略
構成を示すブロック回路図である。
FIG. 1 is a block circuit diagram showing a schematic configuration of an MPEG image compression apparatus as an embodiment to which an image compression encoding method and apparatus of the present invention is applied.

【図2】マクロブロックを4分割した各ブロックとそれ
ら各ブロックの平均2乗偏差の説明に用いる図である。
FIG. 2 is a diagram used to explain each block obtained by dividing a macroblock into four and the mean square deviation of each block;

【図3】本実施の形態のMPEG画像圧縮装置における
マクロブロックタイプの選択処理の流れを示すフローチ
ャートである。
FIG. 3 is a flowchart illustrating a flow of a macroblock type selection process in the MPEG image compression apparatus according to the present embodiment.

【図4】マクロブロックとフレーム間予測についての説
明に用いる図である。
FIG. 4 is a diagram used for describing macroblocks and inter-frame prediction.

【図5】従来のMPEG画像圧縮装置の概略構成を示す
ブロック回路図である。
FIG. 5 is a block circuit diagram showing a schematic configuration of a conventional MPEG image compression apparatus.

【図6】平均2乗偏差、平均2乗予測誤差の説明に用い
る図である。
FIG. 6 is a diagram used to describe a mean square deviation and a mean square prediction error.

【図7】従来のMPEG画像圧縮装置におけるマクロブ
ロックタイプの選択処理の流れを示すフローチャートで
ある。
FIG. 7 is a flowchart showing the flow of a macroblock type selection process in a conventional MPEG image compression apparatus.

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

11 動き検出部、 12 メモリ、 13 コントロ
ーラ、 14 DCT及び量子化部、 15 可変長符
号化部
11 motion detection unit, 12 memory, 13 controller, 14 DCT and quantization unit, 15 variable length coding unit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C059 KK02 MA00 MA05 MA23 MC11 MC38 ME01 NN01 NN28 PP05 PP06 TA18 TA22 TB07 TB08 TC02 TD04 TD11 UA02 5J064 AA02 BA13 BB03 BC02 BD03 ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5C059 KK02 MA00 MA05 MA23 MC11 MC38 ME01 NN01 NN28 PP05 PP06 TA18 TA22 TB07 TB08 TC02 TD04 TD11 UA02 5J064 AA02 BA13 BB03 BC02 BD03

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 複数の画素からなる符号化単位毎に、画
像内圧縮或いは画像間圧縮をそれぞれ選択して圧縮を行
う画像圧縮符号化方法において、 上記画像内圧縮と画像間圧縮の選択に優先度を設け、 上記符号化単位を複数に分割した各ブロック毎に所定の
パラメータを求め、 上記各ブロック毎の所定のパラメータと視覚特性に応じ
た所定値との比較に基づいて上記優先度を変化させ、 上記優先度に基づいて上記画像内圧縮或いは画像間圧縮
を選択することを特徴とする画像圧縮符号化方法。
1. An image compression coding method for performing compression by selecting intra-image compression or inter-image compression for each encoding unit including a plurality of pixels, wherein the intra-image compression and the inter-image compression are prioritized. A predetermined parameter is obtained for each block obtained by dividing the coding unit into a plurality of parts, and the priority is changed based on a comparison between the predetermined parameter for each block and a predetermined value according to visual characteristics. An image compression / encoding method, wherein the intra-image compression or the inter-image compression is selected based on the priority.
【請求項2】 上記所定のパラメータとして、各ブロッ
ク内の画素値の平均2乗誤差を求めることを特徴とする
請求項1記載の画像圧縮符号化方法。
2. The image compression encoding method according to claim 1, wherein an average square error of pixel values in each block is obtained as the predetermined parameter.
【請求項3】 各ブロックの平均2乗誤差の最大値が、
上記視覚特性に応じた所定値より小さいとき、上記画像
内圧縮を選択することを特徴とする請求項2記載の画像
圧縮符号化方法。
3. The maximum value of the mean square error of each block is:
3. The image compression encoding method according to claim 2, wherein when the value is smaller than a predetermined value corresponding to the visual characteristic, the intra-image compression is selected.
【請求項4】 複数の画素からなる符号化単位毎に、画
像内圧縮或いは画像間圧縮をそれぞれ選択して圧縮を行
う画像圧縮符号化装置において、 上記画像内圧縮と画像間圧縮の選択に用いる優先度を設
定する優先度設定手段と、 上記符号化単位を複数に分割した各ブロック毎に所定の
パラメータを求めるパラメータ生成手段と、 上記所定のパラメータと視覚特性に応じた所定値との比
較を行う比較手段と、 上記比較結果に基づいて上記優先度を変化させる優先度
制御手段と、 上記優先度に基づいて上記画像内圧縮或いは画像間圧縮
を選択する選択手段とを有することを特徴とする画像圧
縮符号化装置。
4. An image compression encoding apparatus for performing compression by selecting either intra-image compression or inter-image compression for each encoding unit including a plurality of pixels, wherein the intra-image compression and the inter-image compression are selected. Priority setting means for setting a priority; parameter generating means for obtaining a predetermined parameter for each block obtained by dividing the coding unit into a plurality of blocks; and comparing the predetermined parameter with a predetermined value according to visual characteristics. Comparison means for performing, priority control means for changing the priority based on the comparison result, and selection means for selecting the intra-image compression or the inter-image compression based on the priority. Image compression encoding device.
【請求項5】 上記パラメータ生成手段は、上記所定の
パラメータとして各ブロック内の画素値の平均2乗誤差
を求めることを特徴とする請求項4記載の画像圧縮符号
化装置。
5. The image compression encoding apparatus according to claim 4, wherein said parameter generating means obtains a mean square error of pixel values in each block as said predetermined parameter.
【請求項6】 上記選択手段は、各ブロックの平均2乗
誤差の最大値が上記視覚特性に応じた所定値より小さい
とき、上記画像内圧縮を選択することを特徴とする請求
項5記載の画像圧縮符号化装置。
6. The apparatus according to claim 5, wherein said selecting means selects said intra-image compression when the maximum value of the mean square error of each block is smaller than a predetermined value corresponding to said visual characteristics. Image compression encoding device.
JP31147698A 1998-10-30 1998-10-30 Image compression coding method and device Withdrawn JP2000138937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31147698A JP2000138937A (en) 1998-10-30 1998-10-30 Image compression coding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31147698A JP2000138937A (en) 1998-10-30 1998-10-30 Image compression coding method and device

Publications (1)

Publication Number Publication Date
JP2000138937A true JP2000138937A (en) 2000-05-16

Family

ID=18017688

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31147698A Withdrawn JP2000138937A (en) 1998-10-30 1998-10-30 Image compression coding method and device

Country Status (1)

Country Link
JP (1) JP2000138937A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006049335A1 (en) * 2004-11-04 2006-05-11 Casio Computer Co., Ltd. Motion picture encoding device and motion picture encoding processing program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006049335A1 (en) * 2004-11-04 2006-05-11 Casio Computer Co., Ltd. Motion picture encoding device and motion picture encoding processing program
JP2006135461A (en) * 2004-11-04 2006-05-25 Casio Comput Co Ltd Dynamic image coding apparatus and dynamic image coding processing program
US8121193B2 (en) 2004-11-04 2012-02-21 Casio Computer Co., Ltd. Motion picture encoding device and motion picture encoding processing program
US8824552B2 (en) 2004-11-04 2014-09-02 Casio Computer Co., Ltd. Motion picture encoding device and motion picture encoding processing program

Similar Documents

Publication Publication Date Title
JP3734492B2 (en) Image encoding system, image decoding system, and pixel value prediction method for blocks obtained by dividing an image
USRE43709E1 (en) Method for eliminating blocking effect in compressed video signal
US20150245023A1 (en) Moving image encoding device, moving image decoding device, moving image coding method, and moving image decoding method
US8189667B2 (en) Moving picture encoding apparatus
US20090225871A1 (en) Image encoding apparatus
US20060039476A1 (en) Methods for efficient implementation of skip/direct modes in digital video compression algorithms
JPH07154798A (en) Method and device for picture encoding
JP2000244921A (en) Method and device for coding video image
WO2005088981A1 (en) Encoding apparatus, encoding method, decoding apparatus, and decoding method
JP2000278688A (en) Motion vector detector, its method and image processor
JPH07193822A (en) Motion prediction processor and device therefor
US8290041B2 (en) Communication terminal
JP3531532B2 (en) Video encoding apparatus and method
US20050089232A1 (en) Method of video compression that accommodates scene changes
JP2001036908A (en) Dynamic image compressing device
US20050259734A1 (en) Motion vector generator for macroblock adaptive field/frame coded video data
JP2000138937A (en) Image compression coding method and device
US7738726B2 (en) Block distortion reduction apparatus
WO2012165428A1 (en) Video encoding device
KR102050238B1 (en) System and method for effectively deciding intra prediction mode for hevc encoder
TW202025747A (en) Image encoding device, image decoding device, control method for these, and program
JPH10136309A (en) Image compression/storage device
JP2740746B2 (en) Video compression device
JP3128336B2 (en) Video encoding device
JP3877043B2 (en) Scene adaptive video encoder

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: 20060110