JP2006129067A - Moving image encoding device and method - Google Patents

Moving image encoding device and method Download PDF

Info

Publication number
JP2006129067A
JP2006129067A JP2004314494A JP2004314494A JP2006129067A JP 2006129067 A JP2006129067 A JP 2006129067A JP 2004314494 A JP2004314494 A JP 2004314494A JP 2004314494 A JP2004314494 A JP 2004314494A JP 2006129067 A JP2006129067 A JP 2006129067A
Authority
JP
Japan
Prior art keywords
macroblock
activity
quantization coefficient
quantization
coefficient
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.)
Granted
Application number
JP2004314494A
Other languages
Japanese (ja)
Other versions
JP4325536B2 (en
Inventor
Masamichi Nagone
正道 名郷根
Yasuhiro Hashimoto
安弘 橋本
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 JP2004314494A priority Critical patent/JP4325536B2/en
Publication of JP2006129067A publication Critical patent/JP2006129067A/en
Application granted granted Critical
Publication of JP4325536B2 publication Critical patent/JP4325536B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce mosquito noise that occurs around a moving person. <P>SOLUTION: A quantization coefficient control circuit of an MPEG-2 encoder to which this invention is applied performs coefficient control so as to make a quantization coefficient small when activity of a macroblock of a quantization target is low and to make the quantization coefficient large when the activity is high on the basis of steps 1, 2 and 3 of a TM (test model) 5. Further, the quantization coefficient control circuit compares the activity of the macroblock of the quantization target with activity of macroblocks around the macroblock of the quantization target, determines whether the macroblock of the quantization target is a macroblock located at a boundary between an area with low activity and an area with high activity, and makes a quantization coefficient value small when the macroblock is determined to be a macroblock at the boundary part. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、マクロブロック単位で量子化係数を制御して動画像信号の符号化を行う動画像符号化装置及び方法に関するものである。   The present invention relates to a moving picture coding apparatus and method for coding a moving picture signal by controlling a quantization coefficient in units of macroblocks.

MPEG-2のTM5(Test Model 5 ;ISO/IEC JTC/SC29/WG11 (1993))では、高画質化を図るための量子化係数の制御方法が提案されている。具体的に、TM5には、各ピクチャへ最適な符号配分を行う階層(ステップ1)と、仮想バッファの容量を元に量子化係数のフィードバックコントロールを行う階層(ステップ2)と、視覚特性に応じてマクロブロック単位で量子化係数をコントロールを行う階層(ステップ3)とが規定されている。   In MPEG-2, TM5 (Test Model 5; ISO / IEC JTC / SC29 / WG11 (1993)), a quantization coefficient control method for improving image quality is proposed. Specifically, TM5 has a hierarchy (step 1) for optimal code distribution to each picture, a hierarchy (step 2) for feedback control of quantization coefficients based on the capacity of the virtual buffer, and a visual characteristic. And a hierarchy (step 3) for controlling the quantization coefficient in units of macroblocks.

ここで、ステップ3では、視覚的に劣化の目立ちやすい平坦な画像部分(アクティビティが小さい部分)でより細かく量子化し、劣化の目立ちにくい絵柄の複雑な画像部分(アクティビティが大きい部分)でより粗く量子化するように、ステップ2で求められた量子化係数を変化させている。具体的には、ステップ3では、アクティビティにより絵柄の複雑さを指標化して、ステップ2で求められた量子化係数を変化させている。   Here, in step 3, the image is more finely quantized with a flat image portion that is visually prominently deteriorated (a portion with low activity), and is more coarsely quantized with a complex image portion (a portion with high activity) that is less prone to deterioration. Thus, the quantization coefficient obtained in step 2 is changed. Specifically, in step 3, the complexity of the pattern is indexed by activity, and the quantization coefficient obtained in step 2 is changed.

特開平10−66067号公報Japanese Patent Laid-Open No. 10-66067

ところで、TM5のステップ3では、平坦部分と絵柄の複雑な部分との境界に位置するマクロブロックについては、絵柄が複雑であると判断する傾向にあり、粗く量子化していた。そのため、例えば白い壁上で例えばスポーツをしている人物が表示されているような画面、つまり、平坦な背景画像の上で動きの大きいオブジェクト画像が表示されている画面では、その背景画像とオブジェクト画像との境界部分にモスキートノイズが発生しやすかった。   By the way, in step 3 of TM5, the macroblock located at the boundary between the flat part and the complicated part of the pattern tends to be judged as having a complicated pattern, and is roughly quantized. Therefore, for example, on a screen on which a person who is doing sports, for example, is displayed on a white wall, that is, a screen on which an object image with a large movement is displayed on a flat background image, the background image and the object Mosquito noise was likely to occur at the border with the image.

本発明は、以上のような問題を解決するものであり、量子化による画質劣化を小さくした動画像符号化装置及び方法を提供することを目的とする。   The present invention solves the above-described problems, and an object of the present invention is to provide a moving image encoding apparatus and method in which image quality deterioration due to quantization is reduced.

本発明に係る動画像符号化装置及び方法では、量子化対象のマクロブロックのアクティビティと、周囲のマクロブロックのアクティビティとを比較し、比較結果に基づき量子化対象のマクロブロックに対する量子化係数を算出する。   In the moving picture coding apparatus and method according to the present invention, the activity of the macroblock to be quantized is compared with the activity of the surrounding macroblocks, and the quantization coefficient for the macroblock to be quantized is calculated based on the comparison result. To do.

さらに、本発明に係る動画像符号化装置及び方法では、量子化対象のマクロブロックのアクティビティが低ければ量子化係数を小さくし、アクティビティが高ければ量子化係数を大きくするような所定の演算式に基づき、上記量子化係数をマクロブロック毎に制御するとともに、量子化対象のマクロブロックのアクティビティと周囲のマクロブロックのアクティビティとを比較し、アクティビティが低い領域とアクティビティが高い領域との境界部分のマクロブロックであるか否かを判断し、境界部分のマクロブロックであると判断したならば、上記所定の演算式に基づき算出された量子化係数の値を小さくする。   Furthermore, in the moving picture coding apparatus and method according to the present invention, a predetermined arithmetic expression is set such that the quantization coefficient is decreased when the activity of the macroblock to be quantized is low, and the quantization coefficient is increased when the activity is high. Based on the above, the quantization coefficient is controlled for each macroblock, and the activity of the macroblock to be quantized is compared with the activity of the surrounding macroblock, and the macro of the boundary portion between the low activity area and the high activity area is compared. It is determined whether or not the block is a block, and if it is determined that the block is a macro block at the boundary portion, the value of the quantization coefficient calculated based on the predetermined arithmetic expression is reduced.

以上のような本発明に係る動画像符号化装置及び方法では、量子化による画質劣化を小さくすることができる。   With the moving picture coding apparatus and method according to the present invention as described above, it is possible to reduce image quality degradation due to quantization.

さらに、本願発明に係る動画像符号化装置及び方法では、画像平坦部分では細かく、絵柄の複雑部分では粗く量子化をするとともに、動きのあるオブジェクト画像の境界部分では細かく量子化するので、視覚特性に応じて効率的に量子化を行うとともに、モスキートノイズの発生を低減することができる。   Furthermore, in the moving picture coding apparatus and method according to the present invention, the quantization is fine in the flat part of the image, coarsely in the complex part of the pattern, and fine in the boundary part of the moving object image. Quantization can be efficiently performed according to the above and generation of mosquito noise can be reduced.

以下、本発明が適用されたMPEG-2(ISO/IEC13818-2 Information Technology-Generic Coding of moving pictures and associated audio information: Video)方式のビデオエンコーダについて説明をする。   An MPEG-2 (ISO / IEC13818-2 Information Technology-Generic Coding of moving pictures and associated audio information: Video) video encoder to which the present invention is applied will be described below.

(全体のブロック構成)
図1は、本発明が適用されたビデオエンコーダ10の構成図である。
(Overall block configuration)
FIG. 1 is a configuration diagram of a video encoder 10 to which the present invention is applied.

ビデオエンコーダ10は、図1に示すように、空間領域の画像データ(画素データ(Pixel))が入力され、MPEG-2規格に対応した符号化処理を行い、符号化ストリーム(Stream)を出力する。   As shown in FIG. 1, the video encoder 10 receives spatial area image data (pixel data (Pixel)), performs an encoding process corresponding to the MPEG-2 standard, and outputs an encoded stream (Stream). .

ビデオエンコーダ10は、動きベクトルを算出する動き推定部11と、減算部12と、離散コサイン変換(DCT)部13と、量子化部14と、可変長符号化(VLC)処理を行うVLC部15と、量子化係数を制御する量子化係数制御部16と、逆量子化部17と、逆離散コサイン変換(IDCT)部18と、加算部19と、メモリ20と、動き補償部21とを備えている。   The video encoder 10 includes a motion estimation unit 11 that calculates a motion vector, a subtraction unit 12, a discrete cosine transform (DCT) unit 13, a quantization unit 14, and a VLC unit 15 that performs variable length coding (VLC) processing. A quantization coefficient control unit 16 that controls the quantization coefficient, an inverse quantization unit 17, an inverse discrete cosine transform (IDCT) unit 18, an addition unit 19, a memory 20, and a motion compensation unit 21. ing.

動き推定部11には、画素データ(Pixel)がマクロブロック単位で入力され、各マクロブロックの動きベクトルを算出する。動き推定部11は、動きベクトルの算出の際に、マクロブロックのアクティビティ及びME残差を算出し、これらを利用して動きベクトルを算出する。   Pixel data (Pixel) is input to the motion estimation unit 11 in units of macroblocks, and motion vectors for each macroblock are calculated. When calculating the motion vector, the motion estimation unit 11 calculates the activity and ME residual of the macroblock, and calculates the motion vector using these.

アクティビティは、絵柄の複雑さを表す指標であり、分散に基づき表される。すなわち、アクティビティが大きいマクロブロックは各画素のレベルのばらつきが大きく、アクティビティが小さいマクロブロックは各画素のレベルのばらつきが小さく、平坦化している。なお、アクティビティを算出する具体的な演算式については、後述する。   The activity is an index representing the complexity of the pattern, and is represented based on the variance. That is, a macroblock with a large activity has a large variation in the level of each pixel, and a macroblock with a small activity has a small variation in the level of each pixel and is flattened. A specific arithmetic expression for calculating the activity will be described later.

ME残差は、動き推定をした後に残存するレベルの総量を示す指標である。ME残差は、例えば、圧縮符号化時の動きベクトルによる動き補償処理後に、入力画像と参照画像との差分値の絶対値和若しくは自乗値和として定義される。入力画像と参照画像との相関がない場合にはME残差が大きくなり、入力画像と参照画像との相関がある場合には、ME残差が小さくなる。   The ME residual is an index indicating the total level remaining after motion estimation. The ME residual is defined as, for example, an absolute value sum or a square value sum of a difference value between an input image and a reference image after a motion compensation process using a motion vector at the time of compression encoding. When there is no correlation between the input image and the reference image, the ME residual is large, and when there is a correlation between the input image and the reference image, the ME residual is small.

減算部12には、画像データ(pixel)がマクロブロック単位で入力される。また、減算部12には、符号化対象となるマクロブロック(画素データ(pixel))に対して、フレーム間の相関を利用した符号化処理を行う場合には、動き補償部21から予測ブロックも入力される。減算部12は、インターマクロブロックに対して処理を行う場合には、入力された画像データから予測ブロックを減算する。減算部12は、イントラマクロブロックに対して処理を行う場合には、入力された画像データをそのまま出力する。   Image data (pixel) is input to the subtraction unit 12 in units of macroblocks. In addition, when the encoding process using the correlation between frames is performed on the macroblock (pixel data (pixel)) to be encoded, the subtraction unit 12 also receives the prediction block from the motion compensation unit 21. Entered. The subtraction unit 12 subtracts the prediction block from the input image data when performing processing on the inter macroblock. The subtraction unit 12 outputs the input image data as it is when processing the intra macroblock.

DCT部13は、減算部12から出力されたマクロブロック(画像データ(pixel))に対して離散コサイン変換を行い、周波数領域の画像データであるDCTの係数データ(coef)を生成する。DCT部13は、生成した係数データ(coef)を量子化部14に出力する。   The DCT unit 13 performs discrete cosine transform on the macroblock (image data (pixel)) output from the subtracting unit 12 to generate DCT coefficient data (coef) that is image data in the frequency domain. The DCT unit 13 outputs the generated coefficient data (coef) to the quantization unit 14.

量子化部14は、入力された係数データ(coef)に対して、量子化係数Qを用いて、量子化処理を行う。すなわち、量子化部14は、入力された係数データ(coef)を量子化係数Qにより除算して商を求め、その商を出力する。量子化部14により量子化されることにより、係数データ(coef)は非可逆圧縮される。量子化係数Qが大きければ、出力される符号量は少なくなるので圧縮率が高くなり、反対に、量子化係数Qが小さければ、出力される符号量が多くなるので圧縮率が低くなる。   The quantization unit 14 performs a quantization process on the input coefficient data (coef) using the quantization coefficient Q. That is, the quantization unit 14 divides the input coefficient data (coef) by the quantization coefficient Q to obtain a quotient, and outputs the quotient. The coefficient data (coef) is irreversibly compressed by being quantized by the quantization unit 14. If the quantization coefficient Q is large, the amount of code to be output is small and the compression rate is high. Conversely, if the quantization coefficient Q is small, the amount of code to be output is large and the compression rate is low.

VLC部15は、量子化部14により量子化されたマクロブロック単位の係数データ(coef)を所定のスキャン方式で読み出し、ランレングス符号化により符号化を行う。それとともに、VLC部15は、動きベクトル及びその他のシステム情報を固定長符号化等をする。VLC部15は、これらのデータをMPEG-2方式に従って多重化し、1本のビット列からなる符号化ストリーム(Stream)を生成する。VLC部15は、生成した符号化ストリーム(Stream)を外部に出力する。   The VLC unit 15 reads the coefficient data (coef) in units of macroblocks quantized by the quantization unit 14 by a predetermined scanning method, and performs encoding by run length encoding. At the same time, the VLC unit 15 performs fixed-length coding or the like on the motion vector and other system information. The VLC unit 15 multiplexes these data according to the MPEG-2 system and generates a coded stream (Stream) composed of one bit string. The VLC unit 15 outputs the generated encoded stream (Stream) to the outside.

量子化係数制御部16は、量子化部14の量子化処理で用いる量子化係数Qを算出して、量子化部14に供給する。量子化係数制御部16は、VLC部15から出力された符号化ストリーム(stream)のビットレート、動き推定部11で算出されたアクティビティ及びME残差を参照して、量子化係数Qを決定する。量子化係数制御部16の詳細な処理内容については、後述する。   The quantization coefficient control unit 16 calculates a quantization coefficient Q used in the quantization process of the quantization unit 14 and supplies the quantization coefficient Q to the quantization unit 14. The quantization coefficient control unit 16 determines the quantization coefficient Q by referring to the bit rate of the encoded stream (stream) output from the VLC unit 15, the activity calculated by the motion estimation unit 11, and the ME residual. . Detailed processing contents of the quantization coefficient control unit 16 will be described later.

逆量子化部17には、量子化部14から出力された係数データのうち、フレーム間予測の参照画像となり得るフレームのマクロブロックの係数データが入力される。逆量子化部17は、入力されたデータに対して、量子化した際に用いられた量子化係数により、逆量子化処理を行う。   Of the coefficient data output from the quantization unit 14, the inverse quantization unit 17 receives coefficient data of a macroblock of a frame that can be a reference image for interframe prediction. The inverse quantization unit 17 performs inverse quantization processing on the input data using the quantization coefficient used when the data is quantized.

IDCT部18は、逆量子化部17から出力された係数データ(coef)に対して、逆離散コサイン変換を行い、空間領域の画像データ(pixel)を生成する。   The IDCT unit 18 performs inverse discrete cosine transform on the coefficient data (coef) output from the inverse quantization unit 17 to generate image data (pixel) in the spatial domain.

加算部19には、IDCT部18から出力された画像データ(pixel)が入力される。また、加算部19には、入力された画像データがフレーム間の相関を利用した符号化がされたマクロブロックである場合、その予測ブロックが動き補償部21から入力される。加算部19は、インターマクロブロックに対して処理を行う場合には、入力された画像データに対して予測ブロックを加算する。加算部19は、イントラマクロブロックに対して処理を行う場合には、入力された画像データをそのまま出力する。加算部19は、出力した画像データを参照画像としてメモリ20に格納される。   The image data (pixel) output from the IDCT unit 18 is input to the adding unit 19. In addition, when the input image data is a macroblock encoded using the correlation between frames, the prediction block is input from the motion compensation unit 21 to the addition unit 19. The adder 19 adds the prediction block to the input image data when performing processing on the inter macroblock. The adder 19 outputs the input image data as it is when processing the intra macroblock. The adder 19 stores the output image data in the memory 20 as a reference image.

動き補償部21は、メモリ20に格納された参照画像に対して動きベクトルを用いて動き補償を行い、予測ブロックを生成する。なお、動き補償部21は、イントラマクロブロックが格納されている場合には、動き補償を行わずに画像データをそのまま予測ブロックとして出力する。動き補償部21は、予測ブロックを減算部12に供給する。また、予測ブロックのうち、参照画像となる予測ブロックは、加算部19にも供給される。   The motion compensation unit 21 performs motion compensation on the reference image stored in the memory 20 using a motion vector, and generates a prediction block. Note that, when an intra macroblock is stored, the motion compensation unit 21 outputs the image data as it is as a prediction block without performing motion compensation. The motion compensation unit 21 supplies the prediction block to the subtraction unit 12. Moreover, the prediction block used as a reference image is also supplied to the addition part 19 among prediction blocks.

以上のようなMPEG-2方式のビデオエンコーダ10では、1つのマクロブロックが入力されると、まず、そのマクロブロックのタイプを判断し、イントラマクロブロックであれば、そのまま入力されたマクロブロックをDCT部13に供給し、インターマクロブロックであれば、予測ブロックを生成して、入力されたマクロブロックから予測ブロックを減算して、DCT部13に供給する。   In the MPEG-2 video encoder 10 as described above, when one macroblock is input, the type of the macroblock is first determined, and if it is an intra macroblock, the input macroblock is directly converted into DCT. If it is an inter macroblock, a prediction block is generated, and the prediction block is subtracted from the input macroblock and supplied to the DCT unit 13.

続いて、ビデオエンコーダ10では、入力されたマクロブロック単位の画素データに対してDCT部13でDCT演算による直交変換を行って周波数領域の係数データとし、その後、量子化部14で量子化係数Qにより量子化処理を行う。DCT演算及び量子化がされたマクロブロック単位のデータ(係数データ)は、VLC部15に供給される。   Subsequently, in the video encoder 10, the DCT unit 13 performs orthogonal transform on the input macroblock unit pixel data by DCT calculation to obtain frequency domain coefficient data, and then the quantization unit 14 performs the quantization coefficient Q. Quantization processing is performed. Data (coefficient data) in units of macroblocks subjected to DCT calculation and quantization is supplied to the VLC unit 15.

そして、ビデオエンコーダ10では、VLC部15によって係数データの可変長符号化を行うとともに、符号化ストリームの多重化を行い、符号化ストリームを生成して出力する。   In the video encoder 10, the VLC unit 15 performs variable-length coding of the coefficient data, multiplexes the coded stream, generates a coded stream, and outputs it.

(量子化係数制御部)
つぎに、量子化係数制御部16の処理内容について説明をする。
(Quantization coefficient controller)
Next, processing contents of the quantization coefficient control unit 16 will be described.

量子化係数制御部16は、量子化部14の量子化処理で用いる量子化係数Qを算出して、量子化部14に供給する部である。ビデオエンコーダ10では、量子化係数Qにより、出力する符号化ストリーム(stream)のビットレートを制御する。つまり、量子化係数Qが大きくなればビットレートが小さくなる方向に制御され、量子化係数Qが小さくなればビットレートが大きくなる方向に制御される。   The quantization coefficient control unit 16 is a unit that calculates a quantization coefficient Q used in the quantization process of the quantization unit 14 and supplies the quantization coefficient Q to the quantization unit 14. In the video encoder 10, the bit rate of the encoded stream to be output is controlled by the quantization coefficient Q. That is, when the quantization coefficient Q is increased, the bit rate is controlled to decrease, and when the quantization coefficient Q is decreased, the bit rate is controlled to increase.

--TM5について--
量子化係数制御部16では、TM5のステップ1、ステップ2及びステップ3を利用して、量子化係数Qを算出している。
--About TM5--
The quantization coefficient control unit 16 calculates the quantization coefficient Q by using Step 1, Step 2 and Step 3 of TM5.

まず、TM5のステップ1、ステップ2及びステップ3について説明をする。   First, Step 1, Step 2 and Step 3 of TM5 will be described.

MPEG-2の量子化の特徴として、次の2点が挙げられる。   The following two points can be mentioned as the characteristics of MPEG-2 quantization.

(1)MPEG-2では、ピクチャタイプ(I,P,B)毎に発生符号量が大幅に異なる。また、量子化係数Qの変化に応じた発生符号量の変化の割合も、ピクチャタイプ毎に大幅に異なる。   (1) In MPEG-2, the amount of generated code differs greatly for each picture type (I, P, B). In addition, the rate of change of the generated code amount according to the change of the quantization coefficient Q is also greatly different for each picture type.

(2)Iピクチャ及びPピクチャの量子化ノイズは、これを参照するPピクチャ及びBピクチャに伝搬するが、Bピクチャの量子化ノイズは他のピクチャには伝搬しない。従って、全てのピクチャの量子化係数Qを均一とすることが必ずしも全体の画質を最適化することにならない。   (2) The quantization noise of the I picture and the P picture propagates to the P picture and the B picture that refer to this, but the quantization noise of the B picture does not propagate to other pictures. Therefore, making the quantization coefficient Q of all pictures uniform does not necessarily optimize the overall image quality.

MPEG-2のTM5では、以上の2つの特徴を利用して、画質劣化をより少なくしながら、最適なビット配分、レート制御及び適応量子化が行えるように、ステップ1→ステップ2→ステップ3という順序で階層的に量子化係数の算出を行うことが規定されている。   In MPEG-5 TM5, the above two features are used, so that the optimum bit allocation, rate control, and adaptive quantization can be performed while reducing image quality degradation, so that Step 1 → Step 2 → Step 3 It is specified that quantization coefficients are calculated hierarchically in order.

TM5のステップ1では、各ピクチャへのビット配分を行う。具体的には、ステップ1では、GOP内の各ピクチャに対する割り当てビット量を、割り当て対象となるピクチャを含めGOP内でまだ符号化されていないピクチャに対して割り当てられるビット量Rを基にして配分する。   In Step 1 of TM5, bit allocation to each picture is performed. Specifically, in step 1, the allocated bit amount for each picture in the GOP is allocated based on the bit amount R allocated to a picture that has not yet been encoded in the GOP including the picture to be allocated. To do.

TM5のステップ2では、ステップ1で求められた各ピクチャに対するターゲットビット量に、実際の発生符号量を一致させるために、各ピクチャタイプ毎に独立に設定した3種類の仮想バッファ(VBVバッファ)を設定し、そのVBVバッファの容量を基に量子化スケールコードQをマクロブロック単位のフィードバック制御で求める。 In step 2 of TM5, three types of virtual buffers (VBV buffers) set independently for each picture type are used in order to match the actual generated code amount with the target bit amount for each picture obtained in step 1. Based on the capacity of the VBV buffer, the quantization scale code Q j is obtained by macroblock unit feedback control.

TM5のステップ3では、視覚的に劣化の目立ちやすい平坦部でより細かく量子化し、劣化が視覚的に目立ちにくい絵柄の複雑な部分でより粗く量子化するように、ステップ2で求められた量子化スケールコードQを、そのマクロブロックのアクティビティによって変化させ、視覚特性を考慮した量子化スケールコードmquantを算出する。 In step 3 of TM5, the quantization obtained in step 2 is performed so that the quantization is finer at the flat part where deterioration is visually noticeable and the deterioration is more coarse at the complicated part of the pattern where deterioration is not visually noticeable. The scale code Q j is changed according to the activity of the macroblock, and the quantized scale code mquant j considering the visual characteristics is calculated.

--TM5のステップ3について--
TM5のステップ3の処理についてさらに説明する。
--About Step 3 of TM5--
The process of step 3 of TM5 will be further described.

あるマクロブロックjのアクティビティの算出には、マクロブロックjのフレームDCT符号化モードにおける輝度成分の4つのブロックと、フィールドDCT符号化モードにおける輝度成分の4つのブロックが用いられる。   For the calculation of the activity of a certain macroblock j, four blocks of the luminance component in the frame DCT coding mode of the macroblock j and four blocks of the luminance component in the field DCT coding mode are used.

まず、TM5のステップ3では、以上の8つのブロックに対して、式(11)に示すように、それぞれ分散Varsblkを求める。 First, in step 3 of TM5, the variance Var sblk is obtained for each of the above eight blocks as shown in the equation (11).

Figure 2006129067
Figure 2006129067

Figure 2006129067
Figure 2006129067

式(11)のP(バー)は、式(12)に示すように、各ブロック(8×8=64画素)の平均値である。Pは、各画素の画素値である。 P (bar) in Equation (11) is an average value of each block (8 × 8 = 64 pixels) as shown in Equation (12). P k is a pixel value of each pixel.

続いて、ステップ3では、式(13)に示すように、8つのブロックの各分散のうち最小値を選択し、選択した最小値に1を加える。   Subsequently, in step 3, as shown in equation (13), the minimum value is selected from the variances of the eight blocks, and 1 is added to the selected minimum value.

Figure 2006129067
Figure 2006129067

式(13)で求められた値が、マクロブロックjのアクティビティactである。式(13)において、min( )は、最小値を選択する式である。最小値を選択するのは、マクロブロック内の一部分だけでも平坦性が高い部分が存在した場合には、量子化を細かく行うようにするためである。 The value obtained by Expression (13) is the activity act j of the macroblock j. In Expression (13), min () is an expression for selecting the minimum value. The reason why the minimum value is selected is that if there is a portion with high flatness even in only a portion of the macroblock, quantization is performed finely.

アクティビティactが求められると、続いて、TM5のステップ3では、式(14)に示す演算式に基づき、その値が0.5以上2.0以下の値をとる正規化アクティビティNactを算出する。 When the activity act j is obtained, then in step 3 of TM5, a normalized activity Nact j having a value of 0.5 or more and 2.0 or less is calculated based on the arithmetic expression shown in the equation (14). To do.

Figure 2006129067
Figure 2006129067

式(14)のavg_actは、直前に符号化したピクチャの平均のアクティビティである。すなわち、式(14)では、アクティビティactjが、前のピクチャの平均アクティビティavg_actと同じであれば、1となるように正規化がされている。   In the equation (14), avg_act is an average activity of the picture encoded immediately before. That is, in the equation (14), if the activity actj is the same as the average activity avg_act of the previous picture, it is normalized so as to be 1.

最後に、ステップ3では、式(15)に示すように、ステップ2で求めた量子化スケールコードQに、正規化したアクティビティNactを乗算し、マクロブロックjに対する最終的な量子化スケールコードmquantを求める。 Finally, in step 3, as shown in equation (15), the quantized scale code Q j obtained in step 2 is multiplied by the normalized activity Nact j to obtain the final quantized scale code for the macroblock j. Determine mquant j .

Figure 2006129067
Figure 2006129067

TM5では、以上のステップ3で求められた量子化スケールコードmquantで、DCTした後の係数データを量子化する。 In TM5, the coefficient data after DCT is quantized with the quantization scale code mquant j obtained in step 3 above.

その結果、図2の領域Aで示すように視覚的に劣化の目立ちやすい、すなわちアクティビティが小さいマクロブロック(平坦部)で量子化係数を小さくし、図2の領域Bに示すように劣化が視覚的に目立ちにくいアクティビティが大きいマクロブロック(絵柄の複雑な部分)で量子化係数を大きくするように、ステップ2で求められた量子化スケールコードを変化させ、このことにより、視覚特性の考慮がされた量子化スケールコードmquantを算出することができる。 As a result, the deterioration is visually noticeable as shown in the area A of FIG. 2, that is, the quantization coefficient is reduced in the macroblock (flat portion) with a small activity, and the deterioration is visually shown in the area B of FIG. The quantization scale code obtained in step 2 is changed so that the quantization coefficient is increased in macroblocks (complex parts of the pattern) that have large activity that is not easily noticeable. The quantization scale code mquant j can be calculated.

--具体的な量子化フロー--
つぎに、量子化係数制御部16の具体的な処理手順について、図3のフローチャートを参照して説明をする。
--Specific quantization flow--
Next, a specific processing procedure of the quantization coefficient control unit 16 will be described with reference to the flowchart of FIG.

量子化係数制御部16は、ピクチャ内の最初のマクロブロック(画面の左上のマクロブロック)が入力されると、以下のステップS11から処理を開始する。   When the first macroblock in the picture (the macroblock on the upper left of the screen) is input, the quantization coefficient control unit 16 starts processing from the following step S11.

まず、ステップS11において、量子化係数制御部16は、TM5のステップ1に基づき、そのピクチャに対する符号量の割当を行う。   First, in step S11, the quantization coefficient control unit 16 assigns a code amount to the picture based on step 1 of TM5.

続いて、ステップS12において、量子化係数制御部16は、TM5のステップ2に基づき、量子化対象となっているマクロブロック(以下、対象マクロブロックという。)に対する量子化スケールコードQを算出し、その後、TM5のステップ3に基づき、対象マクロブロックに対する視覚特性の考慮がされた量子化スケールコードmquantを算出する。 Subsequently, in step S12, the quantization coefficient control unit 16 calculates a quantization scale code Q j for a macroblock to be quantized (hereinafter referred to as a target macroblock) based on step 2 of TM5. Thereafter, based on Step 3 of TM5, a quantization scale code mquant j in which visual characteristics for the target macroblock are taken into consideration is calculated.

続いて、ステップS13において、量子化係数制御部16は、対象マクロブロックが、画面の上端又は左端のマクロブロックであるか否かを判断する。すなわち、量子化係数制御部16は、図4のCに示すような画面の上端の行のマクロブロックであるか、又は、図4のDに示すような画面の左端の列のマクロブロックであるかを判断する。   Subsequently, in step S13, the quantization coefficient control unit 16 determines whether or not the target macroblock is the uppermost or leftmost macroblock of the screen. That is, the quantization coefficient control unit 16 is a macroblock in the uppermost row of the screen as shown in FIG. 4C or a macroblock in the leftmost column of the screen as shown in D of FIG. Determine whether.

量子化係数制御部16は、対象マクロブロックが画面上端又は左端のマクロブロックであれば(ステップS13のYES)、ステップS14(動的オブジェクトの境界処理)を行わずにステップS15に進み、対象マクロブロックが画面の上端又は左端のマクロブロックでなければ(ステップS13のNO)、ステップS14(動的オブジェクトの境界処理)に進む。   If the target macroblock is the top or left macroblock of the screen (YES in step S13), the quantization coefficient control unit 16 proceeds to step S15 without performing step S14 (dynamic object boundary processing), and the target macroblock If the block is not the top or left macroblock of the screen (NO in step S13), the process proceeds to step S14 (dynamic object boundary processing).

続いて、ステップS14において、量子化係数制御部16は、動的オブジェクトの境界処理を行う。動的オブジェクトの境界処理では、対象マクロブロックが、動きのあるオブジェクト画像と平坦な背景画像の境界部に位置するマクロブロックであるか否かを判断し、境界部に位置するマクロブロックであればTM5のステップ3で求めた量子化係数が小さくなるように修正する処理を行う。なお、この動的オブジェクトの境界処理の詳細については後述する。   Subsequently, in step S14, the quantization coefficient control unit 16 performs dynamic object boundary processing. In the boundary processing of dynamic objects, it is determined whether or not the target macroblock is a macroblock located at the boundary between a moving object image and a flat background image. Processing for correcting the quantization coefficient obtained in step 3 of TM5 to be small is performed. Details of the boundary processing of the dynamic object will be described later.

続いて、ステップS15において、量子化係数制御部16は、対象マクロブロックが、そのピクチャの最終のマクロブロック(すなわち、画面の右下のマクロブロック)であるか否かを判断する。   Subsequently, in step S15, the quantization coefficient control unit 16 determines whether or not the target macroblock is the last macroblock of the picture (that is, the lower right macroblock of the screen).

量子化係数制御部16は、対象マクロブロックがそのピクチャの最終のマクロブロックであれば、当該フローを終了し、最終のマクロブロックでなければ、ステップ12に戻り、次のマクロブロックに対してステップS12〜S15の処理を行う。   If the target macroblock is the last macroblock of the picture, the quantization coefficient control unit 16 ends the flow. If the target macroblock is not the last macroblock, the quantization coefficient control unit 16 returns to step 12 and performs the step for the next macroblock. The process of S12-S15 is performed.

つぎに、ステップS14の動的オブジェクトの境界処理について、さらに詳細に説明をする。   Next, the dynamic object boundary processing in step S14 will be described in more detail.

ステップS14の動的オブジェクトの境界処理では、図5のEに示すような、例えばスポーツをしている人物等の動きの大きいオブジェクト画像(以下、動的オブジェクトという。)と、例えば空や白い壁等の平坦な背景画像(以下、平坦背景画像)との境界部分のマクロブロックであるか否かの判断をし、境界部分のマクロブロックであれば、TM5のステップ3で求めた量子化係数を小さくするように調整を行う処理である。   In the boundary processing of the dynamic object in step S14, an object image (hereinafter referred to as a dynamic object) having a large movement such as a person playing sports, for example, as shown in E of FIG. And so on. If it is a boundary macroblock, the quantization coefficient obtained in step 3 of TM5 is determined. This is a process of adjusting so as to make it smaller.

図6に、ステップS14の動的オブジェクトの境界処理の更に詳細なフローチャートを示す。   FIG. 6 shows a more detailed flowchart of the boundary processing of the dynamic object in step S14.

まず、ステップS21において、量子化係数制御部16は、TM5のステップ3の処理で求めたる正規化アクティビティNactが1より小さいか否かを判断する。正規化アクティビティNactが1より小さいか否かを判断する理由は、1より小さければ、TM5のステップ3までの処理で既に量子化係数が小さくされているために、新たに量子化係数を小さくするような修正は不要であるからである。 First, in step S21, the quantization coefficient control unit 16 determines whether or not the normalized activity Nact j obtained in the process of step 3 of TM5 is smaller than 1. The reason for determining whether or not the normalization activity Nact j is smaller than 1 is that if it is smaller than 1, since the quantization coefficient has already been reduced in the process up to step 3 of TM5, the quantization coefficient is newly reduced. This is because such correction is unnecessary.

正規化アクティビティNactが1より小さい場合には、ステップS31に進む。正規化アクティビティNactが1より小さくない場合には、続くステップS22に進む。 If the normalized activity Nact j is smaller than 1, the process proceeds to step S31. If the normalized activity Nact j is not smaller than 1, the process proceeds to the following step S22.

続いて、ステップS22において、量子化係数制御部16は、対象マクロブロックのアクティビティと、対象マクロブロックの周囲にあるマクロブロック(以下、周囲マクロブロックという。)とを比較して、対象マクロブロックが、平坦背景画像と、絵柄が複雑なオブジェクト画像との境界部分に位置しているか否かを比較判断する。   Subsequently, in step S22, the quantization coefficient control unit 16 compares the activity of the target macroblock with macroblocks around the target macroblock (hereinafter referred to as a surrounding macroblock), and the target macroblock Then, a determination is made as to whether or not the flat background image is located at the boundary portion between the pattern and the complex object image.

比較判断の手法としては、例えば、対象マクロブロックのアクティビティから、周囲マクロブロックのアクティビティを減算し、その減算結果が所定の閾値以上となっていれば、その対象マクロブロックは、平坦背景画像と絵柄が複雑なオブジェクト画像との境界部分に位置していると判断する。   As a comparison judgment method, for example, the activity of the surrounding macroblock is subtracted from the activity of the target macroblock, and if the subtraction result is equal to or greater than a predetermined threshold value, the target macroblock is determined as a flat background image and a picture. Is located at the boundary with the complex object image.

なお、周囲マクロブロックを、対象マクロブロックの8方向(上下左右、左上、右上、左下、右下)の全ての周囲のマクロブロックとし、それぞれの方向について比較判断をしてもよいが、本例では、一般に量子化処理は画面左上のマクロブロックから始まり行方向にラスタスキャンがされて順次処理がされていくので、図7に示すように、既にエンコード処理が終了している上位置及び左位置のマクロブロックのみを周囲マクロブロックとしている。つまり、本例では、対象マクロブロックのアクティビティから左隣のマクロブロックのアクティビティを減算し、その減算結果が所定の閾値以上であるか、又は、対象マクロブロックのアクティビティから上隣のマクロブロックのアクティビティを減算し、その減算結果が所定の閾値以上であるかを判断している。   Note that the surrounding macroblocks may be all surrounding macroblocks in the eight directions of the target macroblock (up / down / left / right, upper left, upper right, lower left, lower right), and each direction may be compared and determined. In general, since the quantization process starts from the macro block at the upper left of the screen and is sequentially scanned by the raster scan in the row direction, as shown in FIG. Only the macro block of is set as the surrounding macro block. That is, in this example, the activity of the macroblock on the left is subtracted from the activity of the target macroblock, and the subtraction result is equal to or greater than the predetermined threshold, or the activity of the macroblock on the upper side from the activity of the target macroblock. Is subtracted, and it is determined whether the subtraction result is equal to or greater than a predetermined threshold.

また、1つのマクロブロックに含まれている4つの輝度ブロック(8×8画素)のうち、境界部分を検出するために利用するアクティビティは、4つの輝度ブロックのうち最も大きい値を比較判断に用いている。その理由としては、TM5では、対象マクロブロック内の8つのブロックのうちの最小のアクティビティを利用し、マクロブロック内の一部だけでも平坦部分があるかを検出していることで画質を救っている。それに対して、周囲マクロブロックの最大アクティビティ及び対象マクロブロックの最大アクティビティを利用すると、対象マクロブロック内の一部だけでも絵柄が複雑な部分が含まれていることを検出することができる。すなわち、ステップS21では、対象マクロブロックの最大アクティビティから、周囲マクロブロックの最大アクティビティを減算して、その減算結果が所定の閾値以上である場合は、対象マクロブロックが平坦背景画像とオブジェクト画像との境界部分と判断する。   Of the four luminance blocks (8 × 8 pixels) included in one macroblock, the activity used to detect the boundary portion uses the largest value among the four luminance blocks for comparison determination. ing. The reason for this is that TM5 uses the minimum activity of the eight blocks in the target macroblock and saves the image quality by detecting whether there is only a flat part in the macroblock. Yes. On the other hand, if the maximum activity of the surrounding macroblocks and the maximum activity of the target macroblock are used, it can be detected that only a part of the target macroblock includes a complicated picture. That is, in step S21, when the maximum activity of the surrounding macroblocks is subtracted from the maximum activity of the target macroblock, and the subtraction result is equal to or greater than a predetermined threshold, the target macroblock is determined between the flat background image and the object image. Judge as the boundary.

また、上述したステップS12において、対象マクロブロックが画面の上端の行又は左端の列である場合には、当該動的オブジェクトの境界処理を行っていないが、これは、このステップS21において、エンコード処理が完了しているマクロブロックのアクティビティを参照するために、1行目(画面の上端)及び1列目(画面の左端)のマクロブロックでは、周囲マクロブロックのアクティビティが参照できないためである。   In addition, when the target macroblock is the uppermost row or the leftmost column of the screen in the above-described step S12, the boundary processing of the dynamic object is not performed, but this is the encoding process in this step S21. This is because the activities of the surrounding macroblocks cannot be referred to in the macroblocks in the first row (upper end of the screen) and the first column (left end of the screen).

量子化係数制御部16は、当該ステップS22において、対象マクロブロックが平坦背景画像と絵柄が複雑なオブジェクト画像との境界に位置していないと判断した場合には、ステップS31に進む。一方、対象マクロブロックが平坦背景画像と絵柄が複雑なオブジェクト画像との境界に位置していると判断した場合には、続くステップS23に進む。   If the quantization coefficient control unit 16 determines in step S22 that the target macroblock is not located at the boundary between the flat background image and the object image having a complicated pattern, the process proceeds to step S31. On the other hand, if it is determined that the target macroblock is located at the boundary between the flat background image and the object image having a complicated pattern, the process proceeds to the following step S23.

続いて、ステップS23において、量子化係数制御部16は、現在符号化しているピクチャが、Iピクチャであるか否かを判断する。Iピクチャでなければ、つまり、Pピクチャ又はBピクチャであればステップS24に進み、IピクチャであればステップS33に進む。   Subsequently, in step S23, the quantization coefficient control unit 16 determines whether or not the currently encoded picture is an I picture. If it is not an I picture, that is, if it is a P picture or a B picture, the process proceeds to step S24, and if it is an I picture, the process proceeds to step S33.

続いて、ステップS24において、量子化係数制御部16は、対象マクロブロックに含まれているオブジェクト画像が、動きの大きい動的な画像であるか、動きの小さい静的な画像であるかを判断する。すなわち、対象マクロブロックは、既にステップS22で平坦背景画像と絵柄が複雑なオブジェクト画像との境界に位置していると判断されているが、当該絵柄が複雑なオブジェクト画像が、さらに、動きのあるオブジェクト画像であるかを判断している。   Subsequently, in step S24, the quantization coefficient control unit 16 determines whether the object image included in the target macroblock is a dynamic image with a large motion or a static image with a small motion. To do. That is, it is determined that the target macroblock is already positioned at the boundary between the flat background image and the object image with a complicated pattern in step S22. However, the object image with the complicated pattern further moves. It is determined whether the image is an object image.

具体的な判断手法としては、例えば、対象マクロブロックのME残差が所定の閾値以上であるか否かを判断する。動いているオブジェクトと平坦背景画像の境界は、動きベクトルが外れやすく、ME残差が大きくなる傾向がある。逆に、平坦背景画像と絵柄が複雑なオブジェクト画像との境界であっても動きがない場合は、ME残差が小さくなる。モスキートノイズは、動きのある画像と平坦な部分画像の境界に多く発生するので、ここでは、このような判断を行っている。   As a specific determination method, for example, it is determined whether or not the ME residual of the target macroblock is greater than or equal to a predetermined threshold value. At the boundary between the moving object and the flat background image, the motion vector tends to be off and the ME residual tends to increase. Conversely, if there is no movement even at the boundary between the flat background image and the object image with a complicated pattern, the ME residual becomes small. Since mosquito noise frequently occurs at the boundary between a moving image and a flat partial image, this determination is made here.

なお、ME残差は、Iピクチャでは算出されない。そのため、前段のステップS23において、Pピクチャ及びBピクチャを選択して、Pピクチャ及びBピクチャの場合にのみ、当該動きの判断処理を行っている。   Note that the ME residual is not calculated for the I picture. Therefore, in step S23 in the previous stage, a P picture and a B picture are selected, and the motion determination process is performed only in the case of the P picture and the B picture.

量子化係数制御部16は、当該ステップS21において、対象マクロブロックが動きの大きなオブジェクト画像の境界部分に位置していない判断した場合には、ステップS31に進む。一方、対象マクロブロックが動きの大きなオブジェクト画像の境界部分に位置していると判断した場合には、ステップS32に進む。   If the quantization coefficient control unit 16 determines in step S21 that the target macroblock is not located at the boundary portion of the object image with large motion, the process proceeds to step S31. On the other hand, if it is determined that the target macroblock is located at the boundary portion of the object image having a large movement, the process proceeds to step S32.

ステップS31では、TM5のステップ3に基づき算出された量子化スケールコードmquantを、そのまま量子化係数Qとして用いると決定する処理を行う。 In step S31, a process of determining that the quantization scale code mquant j calculated based on step 3 of TM5 is used as it is as the quantization coefficient Q is performed.

すなわち、正規化アクティビティNactが1より小さいと判断した場合(ステップS21のYES)、対象マクロブロックが平坦背景画像と絵柄が複雑なオブジェクト画像との境界部分に位置していないと判断した場合(ステップ22のNO)、並びに、絵柄が複雑なオブジェクトの動きが大きくないと判断した場合(ステップ24のNO)には、TM5のステップ3で求められた量子化スケールコードmquantをそのまま量子化係数Qとして用いる。すなわち、量子化係数をより小さくする処理は行わない。 That is, when it is determined that the normalized activity Nact j is smaller than 1 (YES in step S21), when it is determined that the target macroblock is not located at the boundary portion between the flat background image and the object image having a complicated pattern ( If NO in step 22), and if it is determined that the movement of the object having a complicated pattern is not large (NO in step 24), the quantization scale code mquant j obtained in step 3 of TM5 is directly used as the quantization coefficient. Used as Q. That is, the process for reducing the quantization coefficient is not performed.

なお、正規化アクティビティNactが1より小さいということは、そのマクロブロックが平坦部に位置していると判断されているので、そのままTM5のステップ3で求めた量子化係数を用いている。 If the normalized activity Nact j is smaller than 1, it is determined that the macroblock is located on the flat portion, and the quantization coefficient obtained in step 3 of TM5 is used as it is.

ステップS32では、TM5のステップ2に基づき算出された量子化スケールコードQjを、量子化係数Qとして用いると決定する。つまり、ステップS32では、TM5のステップ3の処理は用いずに量子化を行う。   In step S32, it is determined that the quantization scale code Qj calculated based on step 2 of TM5 is used as the quantization coefficient Q. That is, in step S32, quantization is performed without using the process of step 3 of TM5.

すなわち、正規化アクティビティNactが1以上である場合(ステップS21のNO)であって、且つ、対象マクロブロックが絵柄が複雑なオブジェクト画像と平坦背景画像との境界に位置しており(ステップS22のYES)、且つ、その絵柄が複雑なオブジェクトが大きく動いている(ステップS24のYES)場合には、TM5のステップ3で求められた量子化スケールコードmquantよりも小さい値である、TM5のステップ2に基づき算出された量子化スケールコードQjを、量子化係数Qとする。 That is, the normalization activity Nact j is 1 or more (NO in step S21), and the target macroblock is located at the boundary between the object image having a complicated pattern and the flat background image (step S22). If the object whose pattern is complex is moving greatly (YES in step S24), the value of TM5, which is smaller than the quantization scale code mquant j obtained in step 3 of TM5, is The quantization scale code Qj calculated based on step 2 is set as a quantization coefficient Q.

このように設定することにより、量子化係数QがTM5の場合よりも小さい値となるので、モスキートノイズが発生しづらくなる。   By setting in this way, the quantization coefficient Q becomes a smaller value than in the case of TM5, so that it is difficult to generate mosquito noise.

ステップS33では、正規化アクティビティNactの算出演算式を、下記式(16)に変更し、続いて、上記式(15)に基づき量子化スケールコードmquantを求め、量子化係数Qをこの量子化スケールコードmquantに設定する。 In step S33, the calculation formula of the normalized activity Nact j is changed to the following formula (16), and then the quantization scale code mquant j is obtained based on the above formula (15), and the quantization coefficient Q is converted to this quantum coefficient Q Set to the scaled scale code mquant j .

Figure 2006129067
Figure 2006129067

TM5で用いられる式(14)の正規化アクティビティでは、0.5以上2以下の範囲をとるNactとなるが、式(16)では2/3以上3/2以下という小さい範囲をとる正規化アクティビティとなる。このように小さい範囲を取ることによって、マクロブロック毎の量子化係数の差分値が小さくなり、量子化係数Qのばらつきが小さくなり、モスキートノイズの発生防ぐことが可能になる。   In the normalization activity of Equation (14) used in TM5, Nact takes a range from 0.5 to 2 but in Equation (16), a normalization activity takes a small range of 2/3 to 3/2. It becomes. By taking such a small range, the difference value of the quantization coefficient for each macroblock becomes small, the variation of the quantization coefficient Q becomes small, and it becomes possible to prevent the occurrence of mosquito noise.

ステップS31、ステップS32又はステップS33の処理を終えると、量子化スケール制御部16は、続くステップS34の処理を行う。   When the process of step S31, step S32, or step S33 is completed, the quantization scale control unit 16 performs the subsequent process of step S34.

ステップS34では、決定した量子化係数Qを、量子化部14に送信する。   In step S34, the determined quantization coefficient Q is transmitted to the quantization unit 14.

量子化スケール制御部16では、以上のように処理が行われることによって、動いている絵柄が複雑なオブジェクト画像の周囲に発生するモスキートノイズを軽減することができる。さらに、絵柄が複雑なオブジェクト画像の境界部分以外では、TM5のステップ3本来の効果を維持することができる。   The quantization scale control unit 16 can reduce the mosquito noise generated around the object image having a complex moving picture by performing the processing as described above. Further, the original effect of Step 3 of TM5 can be maintained except for the boundary portion of the object image having a complicated pattern.

本発明が適用されたMPEG-2方式のビデオエンコーダのブロック構成図である。1 is a block configuration diagram of an MPEG-2 video encoder to which the present invention is applied. FIG. 視覚的に劣化の目立ちやすい、すなわちアクティビティが小さい画像部分(A)と、劣化が視覚的に目立ちにくいアクティビティが大きい画像部分(B)を示す図である。It is a figure which shows the image part (A) where deterioration is visually conspicuous, that is, activity is small, and the image part (B) where activity is difficult to visually deteriorate. 量子化係数制御処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of a quantization coefficient control process. 画面の上端の行のマクロブロック(C)、及び、画面の左端の列のマクロブロック(D)を示す図である。It is a figure which shows the macroblock (C) of the row | line | column of the upper end of a screen, and the macroblock (D) of the column of the left end of a screen. 平坦な背景画像と、動きのある絵柄が複雑なオブジェクト画像との境界に位置するマクロブロック(E)を示す図である。It is a figure which shows the macroblock (E) located in the boundary of a flat background image and an object image with the pattern with a motion complicated. 動的オブジェクトの境界処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the boundary process of a dynamic object. 周囲マクロブロックを示す図である。It is a figure which shows a surrounding macroblock.

符号の説明Explanation of symbols

10 ビデオエンコーダ、 11 動き推定部、 12 減算部、 13 DCT部、 14 量子化部、 15 VLC部、 16 量子化係数制御部、 17 逆量子化部、 18 IDCT部、 19 加算部、 20 メモリ、 21 動き補償部
10 video encoders, 11 motion estimation units, 12 subtraction units, 13 DCT units, 14 quantization units, 15 VLC units, 16 quantization coefficient control units, 17 inverse quantization units, 18 IDCT units, 19 addition units, 20 memories, 21 Motion compensation unit

Claims (6)

所定数の画素から構成されるブロック(マクロブロック)単位で画面内をマトリクス状に分割し、分割したマクロブロック単位で動画像信号を符号化する動画像符号化装置において、
量子化係数に基づき動画像信号を量子化する量子化手段と、
マクロブロック毎に量子化係数を制御する係数制御手段とを備え、
上記係数制御手段は
量子化対象のマクロブロックのアクティビティと、周囲のマクロブロックのアクティビティとを比較し、比較結果に基づき量子化対象のマクロブロックに対する量子化係数を算出すること
を特徴とする動画像符号化装置。
In a video encoding device that divides a screen in a matrix form in units of blocks (macroblocks) composed of a predetermined number of pixels and encodes a video signal in units of the divided macroblocks,
A quantization means for quantizing the moving image signal based on the quantization coefficient;
Coefficient control means for controlling the quantization coefficient for each macroblock,
The coefficient control means compares the activity of a macroblock to be quantized with the activity of surrounding macroblocks, and calculates a quantization coefficient for the macroblock to be quantized based on the comparison result. Encoding device.
所定数の画素から構成されるブロック(マクロブロック)単位で画面内をマトリクス状に分割し、分割したマクロブロック単位で動画像信号を符号化する動画像符号化装置において、
マクロブロック単位で設定された量子化係数に基づき動画像信号を量子化する量子化手段と、
量子化対象のマクロブロックのアクティビティが低ければ量子化係数を小さくし、アクティビティが高ければ量子化係数を大きくするような所定の演算式に基づき、上記量子化係数をマクロブロック毎に制御する係数制御手段とを備え、
上記係数制御手段は、
量子化対象のマクロブロックのアクティビティと周囲のマクロブロックのアクティビティとを比較し、アクティビティが低い領域とアクティビティが高い領域との境界部分のマクロブロックであるか否かを判断し、境界部分のマクロブロックであると判断したならば、上記所定の演算式に基づき算出された量子化係数の値を小さくすること
を特徴とする動画像符号化装置。
In a video encoding device that divides a screen in a matrix form in units of blocks (macroblocks) composed of a predetermined number of pixels and encodes a video signal in units of the divided macroblocks,
A quantization means for quantizing a moving image signal based on a quantization coefficient set in units of macroblocks;
Coefficient control that controls the quantization coefficient for each macroblock based on a predetermined arithmetic expression that reduces the quantization coefficient if the activity of the macroblock to be quantized is low and increases the quantization coefficient if the activity is high Means and
The coefficient control means is
The activity of the macroblock to be quantized is compared with the activities of the surrounding macroblocks, and it is determined whether the macroblock is at the boundary between the low activity area and the high activity area. If it is determined, the moving picture coding apparatus characterized by reducing the value of the quantization coefficient calculated based on the predetermined arithmetic expression.
上記係数制御手段は、
動き推定による残差成分が所定量以下である場合には、境界部分のマクロブロックであっても、量子化係数を小さくしないこと
を特徴とする請求項2記載の動画像符号化装置。
The coefficient control means is
The moving picture coding apparatus according to claim 2, wherein when a residual component obtained by motion estimation is equal to or less than a predetermined amount, the quantization coefficient is not reduced even for a macroblock at a boundary portion.
所定数の画素から構成されるブロック(マクロブロック)単位で画面内をマトリクス状に分割し、分割したマクロブロック毎に量子化係数を算出して量子化することにより、動画像信号を符号化する動画像符号化方法において、
量子化対象のマクロブロックのアクティビティと、周囲のマクロブロックのアクティビティとを比較し、比較結果に基づき量子化対象のマクロブロックに対する量子化係数を算出すること
を特徴とする動画像符号化方法。
The video image signal is encoded by dividing the inside of the screen into a matrix in units of blocks (macroblocks) composed of a predetermined number of pixels, and calculating and quantizing a quantization coefficient for each divided macroblock. In the video encoding method,
A moving picture coding method characterized by comparing the activity of a macroblock to be quantized with the activity of surrounding macroblocks and calculating a quantization coefficient for the macroblock to be quantized based on the comparison result.
所定数の画素から構成されるブロック(マクロブロック)単位で画面内をマトリクス状に分割し、分割したマクロブロック毎に量子化係数を算出して量子化することにより、動画像信号を符号化する動画像符号化方法において、
量子化対象のマクロブロックのアクティビティが低ければ量子化係数を小さくし、アクティビティが高ければ量子化係数を大きくするような所定の演算式に基づき、上記量子化係数をマクロブロック毎に制御するとともに、
量子化対象のマクロブロックのアクティビティと周囲のマクロブロックのアクティビティとを比較し、アクティビティが低い領域とアクティビティが高い領域との境界部分のマクロブロックであるか否かを判断し、境界部分のマクロブロックであると判断した場合には、上記所定の演算式に基づき算出された量子化係数の値を小さくすること
を特徴とする動画像符号化方法。
The video image signal is encoded by dividing the inside of the screen into a matrix in units of blocks (macroblocks) composed of a predetermined number of pixels, and calculating and quantizing a quantization coefficient for each divided macroblock. In the video encoding method,
Based on a predetermined arithmetic expression that reduces the quantization coefficient if the activity of the macroblock to be quantized is low and increases the quantization coefficient if the activity is high, the quantization coefficient is controlled for each macroblock,
The activity of the macroblock to be quantized is compared with the activities of the surrounding macroblocks, and it is determined whether the macroblock is at the boundary between the low activity area and the high activity area. If it is determined that the value is, the moving picture coding method characterized by reducing the value of the quantization coefficient calculated based on the predetermined arithmetic expression.
動き推定による残差成分が所定量以下である場合には、境界部分のマクロブロックであっても、量子化係数を小さくしないこと
を特徴とする請求項5記載の動画像符号化方法。
6. The moving picture coding method according to claim 5, wherein when a residual component obtained by motion estimation is equal to or less than a predetermined amount, the quantization coefficient is not reduced even for a macroblock at a boundary portion.
JP2004314494A 2004-10-28 2004-10-28 Video encoding apparatus and method Expired - Fee Related JP4325536B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004314494A JP4325536B2 (en) 2004-10-28 2004-10-28 Video encoding apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004314494A JP4325536B2 (en) 2004-10-28 2004-10-28 Video encoding apparatus and method

Publications (2)

Publication Number Publication Date
JP2006129067A true JP2006129067A (en) 2006-05-18
JP4325536B2 JP4325536B2 (en) 2009-09-02

Family

ID=36723271

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004314494A Expired - Fee Related JP4325536B2 (en) 2004-10-28 2004-10-28 Video encoding apparatus and method

Country Status (1)

Country Link
JP (1) JP4325536B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008079148A (en) * 2006-09-22 2008-04-03 Ntt Electornics Corp Encoder
JP2011130050A (en) * 2009-12-16 2011-06-30 Canon Inc Image encoding apparatus
US8000393B2 (en) 2008-11-28 2011-08-16 Kabushiki Kaisha Toshiba Video encoding apparatus and video encoding method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008079148A (en) * 2006-09-22 2008-04-03 Ntt Electornics Corp Encoder
JP4668878B2 (en) * 2006-09-22 2011-04-13 Nttエレクトロニクス株式会社 Encoder
US8000393B2 (en) 2008-11-28 2011-08-16 Kabushiki Kaisha Toshiba Video encoding apparatus and video encoding method
JP2011130050A (en) * 2009-12-16 2011-06-30 Canon Inc Image encoding apparatus

Also Published As

Publication number Publication date
JP4325536B2 (en) 2009-09-02

Similar Documents

Publication Publication Date Title
JP4529919B2 (en) Adaptive quantization apparatus and adaptive quantization program
KR100243430B1 (en) Method of adaptive quantization control
JP3748717B2 (en) Video encoding device
KR19990076563A (en) Video coding method
JP5133290B2 (en) Video encoding apparatus and decoding apparatus
JP4221655B2 (en) Encoding apparatus, encoding method, program, and recording medium
KR20000023174A (en) Encoding apparatus and method
JP2000201354A (en) Moving image encoder
JP2000138938A (en) Image compression coding method and device
JP4325536B2 (en) Video encoding apparatus and method
KR20070034869A (en) Apparatus and method for controlling bit rate of video encoder
JP2000358247A (en) Rate controller, rate control method and coder
JP2005086249A (en) Dynamic image coding method and dynamic image coding apparatus
JP4942208B2 (en) Encoder
JP4586340B2 (en) Encoding apparatus, encoding method, and program
JP4186543B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2005303555A (en) Moving image encoding apparatus and its method
JP4228739B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2005005862A (en) Picture coding device
JP4185413B2 (en) Flicker reduction quantizer, flicker reduction quantization method, and program thereof
JP4186544B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2009118097A (en) Image encoder, its control method, and computer program
JP4150730B2 (en) Image encoding apparatus and image encoding method
JPH05219496A (en) Picture encoder and moving picture encoder
JP2015019319A (en) Encoding apparatus, encoding method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070517

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090430

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090519

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090601

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130619

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees