JP2007228519A - Image encoding device and image encoding method - Google Patents

Image encoding device and image encoding method Download PDF

Info

Publication number
JP2007228519A
JP2007228519A JP2006050225A JP2006050225A JP2007228519A JP 2007228519 A JP2007228519 A JP 2007228519A JP 2006050225 A JP2006050225 A JP 2006050225A JP 2006050225 A JP2006050225 A JP 2006050225A JP 2007228519 A JP2007228519 A JP 2007228519A
Authority
JP
Japan
Prior art keywords
picture
feature amount
block
variance value
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006050225A
Other languages
Japanese (ja)
Inventor
Shohei Saito
昇平 齋藤
Toru Yokoyama
徹 横山
Muneaki Yamaguchi
宗明 山口
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2006050225A priority Critical patent/JP2007228519A/en
Publication of JP2007228519A publication Critical patent/JP2007228519A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To reduce operational throughput for calculating the feature value of an image used for quantization control when encoding a moving picture. <P>SOLUTION: When encoding an I picture in an original image memory 1, a feature value arithmetic part 16 calculates a variance value for each MB, stores it in a feature value storage memory 19, calculates quantization step size information of the MB and sends it to a quantization control part 13. When encoding the P picture, a feature value prediction part 17 acquires the variance value of MB of the I or P picture that becomes the predictive image of the MB, from the featured value storage memory 19, calculates the variance value, stores it in the featured value storage memory 19, calculates quantization step size information, and sends it to the quantization control part 13. When encoding the B picture, the feature value prediction part 17 also acquires the variance value of MB of the I or P picture that becomes the predictive image of MB of the B picture, from the feature value storage memory 19, calculates the variance value, calculates a quantization step size, and sends it to the quantization control part 13. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、画像データを効率的に符号化するための画像符号化装置及び画像符号化方法に関する。   The present invention relates to an image encoding device and an image encoding method for efficiently encoding image data.

従来、画像符号化の分野の技術としては、MPEG(Moving Picture Experts Group)規格に代表される符号化方式が知られている。   2. Description of the Related Art Conventionally, as a technique in the field of image encoding, an encoding method represented by the MPEG (Moving Picture Experts Group) standard is known.

図12にMPEG−2規格による従来の画像符号化装置の一例を示すブロック構成図であって、1は原画像メモリ、2は減算器、3は直交変換部、4は量子化部、5は符号化部、6は送信バッファ、7は逆量子化部、8は逆直交変換部、9は加算器、10はフレームメモリ、11は動き検出・動き補償部、12はフレーム内予測部、13は量子化制御部、14はアクティビティ演算部である。   FIG. 12 is a block diagram showing an example of a conventional image encoding apparatus according to the MPEG-2 standard, where 1 is an original image memory, 2 is a subtractor, 3 is an orthogonal transform unit, 4 is a quantization unit, Encoding unit, 6 transmission buffer, 7 inverse quantization unit, 8 inverse orthogonal transformation unit, 9 adder, 10 frame memory, 11 motion detection / compensation unit, 12 intra-frame prediction unit, 13 Is a quantization control unit, and 14 is an activity calculation unit.

同図において、MPEG−2規格の符号化では、画面毎に画面内予測符号化と画面間予測符号化とが用いられ、画面内予測符号化を用いて符号化される画面をIピクチャといい、画面間予測符号化を用いて符号化されるピクチャはP,Bピクチャの2通りがある。Pピクチャが画面間予測符号化されるときには、IピクチャもしくはPピクチャが参照ピクチャとして用いられ、Bピクチャがフレーム間予測符号化されるときには、そのIまたはPピクチャと次のPピクチャとが参照ピクチャとして用いるものである。   In the figure, in the MPEG-2 standard encoding, intra-screen predictive coding and inter-screen predictive coding are used for each screen, and a screen encoded using intra-screen predictive coding is called an I picture. There are two types of pictures that are encoded using inter-picture predictive encoding: P and B pictures. When a P picture is inter-picture prediction encoded, the I picture or P picture is used as a reference picture. When a B picture is inter-frame predictive encoded, the I or P picture and the next P picture are the reference pictures. It is used as

なお、以下では、フレーム単位のピクチャを対象として説明し、このため、画面内予測符号化をフレーム内予測符号化、画面間予測符号化をフレーム間予測符号化と夫々いうことにする。   In the following, a description is given for a picture in units of frames. Therefore, intra prediction encoding is referred to as intra prediction encoding, and inter prediction encoding is referred to as inter prediction encoding.

そこで、例えば、
……,I,B1,B2,P1,B3,B4,P2,……
の順で入力されるピクチャは、原画像メモリ1から読み出されるときには、
……,I,P1,B1,B2,P2,B3,B4,……
の順で読み出されて符号化される。Iピクチャはフレーム内予測符号化されるが、P1ピクチャは符号化済みのIピクチャを参照ピクチャとしてフレーム間予測符号化され、P2ピクチャは符号化済みのP1ピクチャを参照ピクチャとしてフレーム間予測符号化される。また、B1,B2ピクチャは符号化済みのI,P1ピクチャを参照ピクチャとしてフレーム間予測符号化され、B3,B4ピクチャは符号化済みのP1,P2ピクチャを参照ピクチャとしてフレーム間予測符号化される。このため、IピクチャはPピクチャ,Bピクチャの前に符号化され、Pピクチャはこれを参照ピクチャとするBピクチャの前に符号化される。従って、B1,B2ピクチャが符号化される前に、I,P1ピクチャが符号化され、これらの復号I,P1ピクチャを参照ピクチャとしてB1,B2ピクチャが符号化される。かかる符号化は、16×16画素のマクロブロック(MB)もしくはこれを分割した8×8画素,4×4画素のブロックを単位ブロックとして符号化される。かかる符号化の単位ブロックを、以下、符号化対象ブロックという。
So, for example,
..., I, B1, B2, P1, B3, B4, P2, ...
When the pictures input in this order are read from the original image memory 1,
..., I, P1, B1, B2, P2, B3, B4, ...
Are read and encoded in this order. The I picture is subjected to intraframe prediction encoding, while the P1 picture is interframe prediction encoded using the encoded I picture as a reference picture, and the P2 picture is interframe predictive encoding using the encoded P1 picture as a reference picture. Is done. The B1 and B2 pictures are inter-frame predictive encoded using the encoded I and P1 pictures as reference pictures, and the B3 and B4 pictures are inter-frame predictively encoded using the encoded P1 and P2 pictures as reference pictures. . For this reason, the I picture is encoded before the P picture and the B picture, and the P picture is encoded before the B picture using this as a reference picture. Therefore, before the B1 and B2 pictures are encoded, the I and P1 pictures are encoded, and the B1 and B2 pictures are encoded using these decoded I and P1 pictures as reference pictures. Such encoding is performed using a 16 × 16 pixel macroblock (MB) or an 8 × 8 pixel or 4 × 4 pixel block obtained by dividing the macroblock (MB) as a unit block. Such an encoding unit block is hereinafter referred to as an encoding target block.

入力される順次のピクチャ列からなる画像データは一旦原画像メモリ1に記憶され、これから各ピクチャが上記のような所定の順序で読み出されて減算器2に供給される。減算器2では、Iピクチャが符号化のために供給されるときには(このように、符号化のために原画像メモリ1から読み出されて供給されるピクチャを、以下、符号化対象ピクチャという)、フレーム内予測部12で生成されたフレーム内予測符号化のための参照画像も供給され、また、P,Bピクチャが符号化対象フレームとして供給されるときには、フレームメモリ10からのフレーム間予測符号化のための参照画像も供給され、符号化対象フレームの画素毎に参照画像の画素(以下、参照画素という)の画素値が減算され、その差分値の画素(差分値画素)からなる符号化対象ピクチャが直交変換部4に供給される。   The input image data composed of sequential picture sequences is temporarily stored in the original image memory 1, and each picture is read out in a predetermined order as described above and supplied to the subtracter 2. In the subtractor 2, when an I picture is supplied for encoding (in this way, a picture read out and supplied from the original image memory 1 for encoding is hereinafter referred to as an encoding target picture). A reference image for intra-frame prediction encoding generated by the intra-frame prediction unit 12 is also supplied, and when P and B pictures are supplied as encoding target frames, an inter-frame prediction code from the frame memory 10 is supplied. A reference image for encoding is also supplied, a pixel value of a pixel of the reference image (hereinafter referred to as a reference pixel) is subtracted for each pixel of the encoding target frame, and encoding is made up of pixels of the difference value (difference value pixel) The target picture is supplied to the orthogonal transform unit 4.

なお、Iピクチャの最初に符号化される先頭のマクロブロックが減算器2に供給されるときには、一定の画素値「128」の画素が参照画素として減算器2に供給され、これとの差分値の画素(差分値画素)からなるマクロブロックが形成される。また、Iピクチャのこれ以外のマクロブロックでは、同じIピクチャ内の符号化された先行するマクロブロックが参照画像となり、これが減算器2に供給される。ここで、マクロブロックは16×16画素からなる画素のブロックであって、符号化の単位ブロックである。また、Iピクチャの先頭のマクロブロックは、このフレームによる画面上、左上隅に位置するマクロブロックである。   When the first macroblock encoded at the beginning of the I picture is supplied to the subtracter 2, a pixel having a constant pixel value “128” is supplied to the subtractor 2 as a reference pixel, and the difference value from this is supplied. A macro block composed of the pixels (difference value pixels) is formed. In other macroblocks of the I picture, the preceding macroblock encoded in the same I picture becomes a reference image, and this is supplied to the subtracter 2. Here, the macro block is a block of pixels composed of 16 × 16 pixels, and is a unit block for encoding. The first macroblock of the I picture is a macroblock located at the upper left corner on the screen of this frame.

直交変換部3では、マクロブロックを単位として、これが8×8画素の4個のブロックに分割され、このブロック毎にDCT(Discrete Cosine Transform:離散コサイン変換)演算によって直交変換される。この直交変換によって得られたDCT係数が量子化部4に供給されて量子化され、この量子化データが符号化部5で可変長符号化される。このようにして予測符号化されて圧縮された画像データは一旦送信バッファ6に記憶され、一定のビットレートとなるように読み出されて送信される。   In the orthogonal transform unit 3, the macro block is divided into four blocks of 8 × 8 pixels, and each block is orthogonally transformed by DCT (Discrete Cosine Transform) operation. The DCT coefficient obtained by the orthogonal transform is supplied to the quantization unit 4 and quantized, and the quantized data is variable-length encoded by the encoding unit 5. The image data that has been predictively encoded and compressed in this manner is temporarily stored in the transmission buffer 6, and is read and transmitted so as to have a constant bit rate.

また、量子化部4からの量子化データは逆量子化部7に供給され、逆量子化処理されて元のDCT係数に復元され、さらに、逆直交変換部8に供給されて逆DCT処理され、差分値画素からなるピクチャの画像データに復元される。このピクチャは加算器9に供給され、このとき、フレームメモリ10もしくはフレーム内予測部12からこのピクチャに対して減算部3に用いた参照画像が読み出されて加算器9に供給され、差分画素毎に加算されて元の画素値のピクチャに復号される。この復号ピクチャが、参照ピクチャとして用いるために、フレームメモリ10に記憶されて保存される。   Also, the quantized data from the quantization unit 4 is supplied to the inverse quantization unit 7, subjected to inverse quantization processing to be restored to the original DCT coefficient, and further supplied to the inverse orthogonal transform unit 8 for inverse DCT processing. The picture data of the picture made up of difference value pixels is restored. This picture is supplied to the adder 9, and at this time, the reference image used for the subtraction unit 3 is read from the frame memory 10 or the intra-frame prediction unit 12 for this picture, and is supplied to the adder 9, and the difference pixel It is added every time and is decoded into a picture having the original pixel value. This decoded picture is stored and saved in the frame memory 10 for use as a reference picture.

なお、加算器9に供給されるピクチャがIピクチャで場合には、このIピクチャ自身が参照ピクチャとしてフレーム内予測部12から読み出されて加算器9に供給されるが、このIピクチャの先頭のマクロブロックが供給されるときには、フレーム内予測部12から一定の画素値「128」が読み出されて加算器9に供給される。これにより、この先頭のマクロブロックの各画素が元の画素値の画素に復号される。   If the picture supplied to the adder 9 is an I picture, the I picture itself is read out from the intra-frame prediction unit 12 as a reference picture and supplied to the adder 9. When the macroblock is supplied, a predetermined pixel value “128” is read from the intra-frame prediction unit 12 and supplied to the adder 9. Thereby, each pixel of this leading macroblock is decoded into a pixel having the original pixel value.

このIピクチャの復号された先頭のマクロブロックは、フレームメモリ10に供給されて記憶されるとともに、フレーム内予測部12に供給され、Iピクチャの次に符号化されるマクロブロックの参照画像が生成される。従って、この2番目のマクロブロックが符号化されるときには、先頭のマクロブロックによる参照画像が減算部2に供給され、この2番目のマクロブロックとの減算処理がなされて画面内予測符号化されるとともに、符号化されたこの2番目のマクロブロックが加算器9で同じ参照画像で復号され、フレームメモリ10に記憶されるとともに、フレーム内予測部12に供給されてさらに次のマクロブロック(3番目のマクロブロック)の符号化のための参照画像が形成される。このようにして、Iピクチャのマクロブロックが順次符号化されるとともに、復号がされたマクロブロックがフレームメモリ10に順次記憶されていき、Iピクチャの画面内符号化が終了したときには、フレームメモリ10内にその復号Iピクチャがフレームメモリ10内に記憶されている事になり、これが次のPピクチャの参照ピクチャとして用いられる。   The decoded first macroblock of the I picture is supplied to and stored in the frame memory 10 and is also supplied to the intra-frame prediction unit 12 to generate a reference image of the macroblock to be encoded next to the I picture. Is done. Therefore, when the second macroblock is encoded, the reference image of the first macroblock is supplied to the subtracting unit 2, and the subtraction process with the second macroblock is performed to perform intra prediction encoding. At the same time, the encoded second macroblock is decoded by the adder 9 with the same reference image, stored in the frame memory 10, and supplied to the intra-frame prediction unit 12 for further subsequent macroblocks (third A reference image for encoding (macroblock) is formed. In this way, the macroblocks of the I picture are sequentially encoded, and the decoded macroblocks are sequentially stored in the frame memory 10. When the intra-picture encoding of the I picture is completed, the frame memory 10 The decoded I picture is stored in the frame memory 10 and used as a reference picture for the next P picture.

Iピクチャの次のPピクチャを画面間予測符号化するときには、フレームメモリ10に記憶されているIピクチャを参照画像として、上記と同様の処理がなされるが、この場合、符号化するPピクチャとフレームメモリ10に記憶されているIピクチャとが動き検出・動き補償部11に供給され、マクロブロック毎に動きベクトルMVが検出される。そして、この動きベクトルMVをもとに、減算器2に供給されるPピクチャのマクロブロックに対するIピクチャのマクロブロックが検出され、これが減算器2に供給されて差分値画素からなるマクロブロックが形成され、このマクロブロックが符号化されるとともに、加算器9にも供給されてこの符号化マクロブロックが復号され、フレームメモリ10に供給されて記憶される。   When inter-picture prediction encoding is performed on the next P picture after the I picture, the same processing as described above is performed using the I picture stored in the frame memory 10 as a reference image. In this case, the P picture to be encoded The I picture stored in the frame memory 10 is supplied to the motion detection / compensation unit 11, and a motion vector MV is detected for each macroblock. Then, based on the motion vector MV, an I-picture macroblock for a P-picture macroblock supplied to the subtractor 2 is detected, and this is supplied to the subtractor 2 to form a macroblock composed of difference value pixels. The macroblock is encoded and supplied to the adder 9 to decode the encoded macroblock, which is supplied to the frame memory 10 and stored therein.

符号化されたPピクチャの次に符号化されるPピクチャの画面間予測符号化の場合には、フレームメモリ10に記憶されている復号Pピクチャを動き検出・動き補償部11で処理して参照画像とするものであり、これ以外は上記のPピクチャの符号化処理と同様である。また、Bピクチャを符号化する場合には、フレームメモリ10に記憶されている既に符号化されたI,Pピクチャの復号ピクチャを動き検出・動き補償部11の動きベクトルで処理して得られる参照画像を用いるものである。但し、Bピクチャは参照画像として用いないので、フレームメモリ10には、Bピクチャを記憶しない。   In the case of inter-picture predictive coding of a P picture that is coded after the coded P picture, the motion detection / motion compensation unit 11 processes the decoded P picture stored in the frame memory 10 for reference. Other than this, it is the same as the P picture encoding process described above. When a B picture is encoded, a reference obtained by processing a decoded picture of an already encoded I or P picture stored in the frame memory 10 with a motion vector of the motion detection / motion compensation unit 11 is obtained. An image is used. However, since the B picture is not used as a reference image, the B picture is not stored in the frame memory 10.

P,Bピクチャを符号化するときに、マクロブロック毎に動き検出・動き補償部11で検出された動きベクトルMVは符号化部5に供給される。この符号化部5では、この符号化対象ピクチャの減算器2でこの動きベクトルMVが上記のように用いられたマクロブロックの量子化部4からの画像データに、この動きベクトルMVが付加されて可変長符号化される。   When the P and B pictures are encoded, the motion vector MV detected by the motion detection / compensation unit 11 is supplied to the encoding unit 5 for each macroblock. In the encoding unit 5, the motion vector MV is added to the image data from the quantization unit 4 of the macroblock in which the motion vector MV is used as described above by the subtracter 2 of the encoding target picture. Variable length coding.

以上のようにして、I,P,Bピクチャの配列からなる画像データに符号化され、送信バッファ6から一定のビットレートで送信されるが、このように送信されるように、量子化制御部13が画像データを監視し、この監視結果に応じて量子化部4を制御し、一定のビットレートで送信されるように、量子化部4での量子化ステップサイズQS(量子化レベルの間隔)を調整する。以下、この点について説明する。   As described above, the data is encoded into image data including an array of I, P, and B pictures, and is transmitted from the transmission buffer 6 at a constant bit rate. 13 monitors the image data, controls the quantization unit 4 according to the monitoring result, and transmits the quantization step size QS (quantization level interval) in the quantization unit 4 so as to be transmitted at a constant bit rate. ). Hereinafter, this point will be described.

量子化制御部13では、符号化された画像データを所定のデータ量(ビットレート)で伝送するため、各ピクチャに対するデータの割り当て量(割り当て符号量)を制御する。例えば、MPEGの符号化方式では、性質(符号化方式)の異なる3種類のピクチャ(上記のI,P,Bピクチャ)が存在するため、ピクチャの種類によって割り当て符号量を決定する。即ち、I,PピクチャをP,Bピクチャの参照ピクチャとして用いる場合には、I,Pピクチャの割り当て符号量をBピクチャよりも多くする。また、ピクチャ単位の割り当て符号量が決定した後、ピクチャをブロック分割し、ブロック単位で割り当て符号量を決定することも可能である。   The quantization control unit 13 controls the data allocation amount (allocation code amount) for each picture in order to transmit the encoded image data at a predetermined data amount (bit rate). For example, in the MPEG encoding system, there are three types of pictures (I, P, and B pictures described above) having different properties (encoding systems), and therefore the allocated code amount is determined according to the type of picture. That is, when I and P pictures are used as reference pictures for P and B pictures, the allocated code amount for I and P pictures is made larger than that for B pictures. It is also possible to divide a picture into blocks after determining the allocated code amount in units of pictures and determine the allocated code amount in units of blocks.

MPEG−1規格で用いられているMPEG-2 Test Model 5(以下、TM5という)の量子化制御方式では、
ステップ1:各ピクチャへの符号量割り当てを行なう
ステップ2:仮想バッファを用いて、ピクチャ内の各ブロックへの量子化パラ
メータQPを決定する
ステップ3:ピクチャ内の視覚特性を考慮して、各ブロックの量子化パラメー
タQPに重み付けを行なって、量子化ステッサイズを決定する
という3ステップの処理が行なわれている(例えば、非特許文献1,非特許文献2参照)。
In the MPEG-2 Test Model 5 (hereinafter referred to as TM5) quantization control method used in the MPEG-1 standard,
Step 1: Assign a code amount to each picture Step 2: Use a virtual buffer to quantize each block in the picture
Determining the meter QP Step 3: Considering the visual characteristics in the picture, the quantization parameter of each block
A three-step process is performed in which the quantization step size is determined by weighting the data QP (see, for example, Non-Patent Document 1 and Non-Patent Document 2).

ステップ3では、画像の平坦部では、歪が目立ち易く、画像の絵柄の複雑な部分では、目立ちにくいという人間の視覚特性を利用し、その判別のために、アクティビティActと呼ばれる画像の特徴量を用いる。そして、アクティビティActに基づいて、量子化ステップサイズQSを変更するものである。アクティビティ演算部14はピクチャ毎にアクティビティActを求めるものであり、得られた子のアクティビティActに基づいて、量子化制御部13が量子化部4での量子化ステップサイズQSを制御する。   In step 3, human visual characteristics that distortion is conspicuous in the flat part of the image and inconspicuous in the complicated part of the image pattern are used. Use. Then, the quantization step size QS is changed based on the activity Act. The activity calculation unit 14 obtains an activity Act for each picture, and the quantization control unit 13 controls the quantization step size QS in the quantization unit 4 based on the obtained child activity Act.

アクテイビティ演算部14での具体的な処理としては、まず、ピクチャ内を16×16画素単位のマクロブロックに分割する。次に、図13に示すように、マクロブロックを8×8画素のブロックに4分割し、このブロック単位で輝度信号の分散値を計算する。n番目のブロックの分散値Var[n]は、次の数式1、即ち、

Figure 2007228519
As specific processing in the activity calculation unit 14, first, the picture is divided into macro blocks each having a size of 16 × 16 pixels. Next, as shown in FIG. 13, the macroblock is divided into four blocks of 8 × 8 pixels, and the variance value of the luminance signal is calculated for each block. The variance value Var [n] of the nth block is expressed by the following Equation 1,
Figure 2007228519

で示す計算式で求める。ここで、第1番目のブロック(n=1)は、図13に示すマクロブロック内の4個のブロックにおいて、左上の8×8画素のブロック1であり、第2番ブロック(n=2)は右上の8×8画素のブロック2であり、第3番目のブロック(n=3)は左下の8×8画素のブロック3であり、第4番目のブロック(n=4)は右下の8×8画素のブロック4である。また、上記数1において、Pn(x,y)は、第n番目のブロック内での座標位置(x,y)の画素の画素値である。 Obtained by the calculation formula shown in. Here, the first block (n = 1) is the upper left 8 × 8 pixel block 1 among the four blocks in the macroblock shown in FIG. 13, and the second block (n = 2). Is the upper right 8 × 8 pixel block 2, the third block (n = 3) is the lower left 8 × 8 pixel block 3, and the fourth block (n = 4) is the lower right This is a block 4 of 8 × 8 pixels. In Equation 1, P n (x, y) is the pixel value of the pixel at the coordinate position (x, y) in the nth block.

次に、上記数1に示す4個のブロックの分散値Var[n]から、このマクロブロックのアクティビティActを求める。このアクティビティActは、次の数2、即ち、

Figure 2007228519
Next, the activity Act of this macroblock is obtained from the variance value Var [n] of the four blocks shown in the above equation 1. This activity Act has the following number 2, namely:
Figure 2007228519

から算出される。ここで、min( )はその括弧内の最小値となる分散値Var[n]を選択する関数であり、最小値をとなる分散値Var[n]を選択するのは、マクロブロック内の一部だけでも平坦部のある場合には、量子化ステップサイズQSを小さくして量子化を細かくするためである。 Is calculated from Here, min () is a function for selecting the variance value Var [n] that becomes the minimum value in the parentheses, and the variance value Var [n] that becomes the minimum value is selected in one macro block. This is because when there is a flat part even in only a part, the quantization step size QS is reduced to make the quantization finer.

次に、量子化ステップサイズQSの重み付け係数Nactを、次の数3、即ち、

Figure 2007228519
Next, the weighting coefficient N act of the quantization step size QS is expressed by the following equation 3, that is,
Figure 2007228519

で算出する。ここで、Avg_actは、直前に符号化したピクチャでの全マクロブロックのアクティビティの平均値である。 Calculate with Here, Avg_act is an average value of activities of all macroblocks in the picture encoded immediately before.

続いて、上記ステップ2で算出・設定された量子化パラメータQPに、数4で示すように、数3で求めた重み付け係数Nactを乗算し、符号化対象ブロックに対する量子化部4での量子化ステップサイズQSを算出する。

Figure 2007228519
Subsequently, the quantization parameter QP calculated and set in the above step 2 is multiplied by the weighting coefficient N act obtained in Equation 3 as shown in Equation 4, and the quantization in the quantization unit 4 for the encoding target block is performed. The step size QS is calculated.
Figure 2007228519

このようにして得られた量子化ステップサイズQSが量子化制御部13に供給され、量子化制御部13は、この量子化ステップサイズQSを基に、量子化部4での量子化レベルを決める。   The quantization step size QS obtained in this way is supplied to the quantization control unit 13, and the quantization control unit 13 determines the quantization level in the quantization unit 4 based on the quantization step size QS. .

なお、量子化制御部13は、また、送信バッファ6からビット量の情報も供給され、これに基づいて量子化ステップサイズQSを調整し、送信バッファ6から一定のビットレートで送信できるように、量子化部4での量子化レベルを調整する。   The quantization control unit 13 is also supplied with bit amount information from the transmission buffer 6, adjusts the quantization step size QS based on the information, and transmits from the transmission buffer 6 at a constant bit rate. The quantization level in the quantization unit 4 is adjusted.

以上の方法により、視覚的劣化の目立ちにくい絵柄の複雑な画像領域では、量子化部4での量子化ステップサイズを大きくして荒い量子化を行ない、また、視覚的劣化の目立ち易い平坦な画像領域では、量子化部4での量子化ステップサイズを小さくして細かい量子化を行なうようにして、画質に応じて発生符号量を制御するようにする。   By the above method, in a complex image region with a pattern that is not easily noticeable visually, the quantization step size in the quantizer 4 is increased to perform rough quantization, and a flat image that is easily noticeable visually deteriorates. In the area, the quantization step size in the quantization unit 4 is reduced to perform fine quantization, and the generated code amount is controlled according to the image quality.

しかし、上記量子化制御方式では、視覚的に劣化の目立ち易いエッジ部で分散値が大きくなり、荒く量子化されることになる。そのため、エッジ部の劣化が目立ち易くなり、また、低ビットレート時では、必然的に量子化ステップ(量子化レベル)が荒くなり、ブロック歪みが増えて視覚的に違和感が起こる。   However, in the above-described quantization control method, the variance value becomes large at the edge portion where deterioration is conspicuous and is roughly quantized. For this reason, the deterioration of the edge portion becomes conspicuous, and at a low bit rate, the quantization step (quantization level) inevitably becomes rough, and the block distortion increases, resulting in a visually uncomfortable feeling.

そこで、その問題を解決するために、符号化前の原画像データに対して前処理を行なうことにより、高圧縮かつ高品質の符号化を行なうことを可能とする技術が提案されている(例えば、特許文献1や特許文献2を参照)。
MPEG-2, Test Model 5(TM5), Doc.ISO/IEC JTC1/SC29/WG11/N0400, Test Model Editing Committee, Apr.1993. Joint Video Team (JVT) of ISO/IEC MPEG & ITU-T VCEG : "Text of ISO/IEC 14496 10 Advanced Video Coding 3rd Edition", Jul, 2004. 特開2002−16923 特開2002−10268
Therefore, in order to solve the problem, a technique that enables high-compression and high-quality encoding by performing preprocessing on original image data before encoding has been proposed (for example, , See Patent Document 1 and Patent Document 2).
MPEG-2, Test Model 5 (TM5), Doc.ISO / IEC JTC1 / SC29 / WG11 / N0400, Test Model Editing Committee, Apr. 1993. Joint Video Team (JVT) of ISO / IEC MPEG & ITU-T VCEG: "Text of ISO / IEC 14496 10 Advanced Video Coding 3rd Edition", Jul, 2004. JP2002-16923 JP2002-10268

ところで、上記特許文献1や特許文献2における上記の前処理では、符号化された原画像データとその復号画像データの差分が大きくなるにつれて、周波数帯域を制限するフィルタ処理や原画像データの空間的な周波数情報を取得するためのDFT(Discrete Fourier Transform:離散フーリエ変換)やDCTの直交変換処理が必要となる。また、エッジ部を強調するための中高域通過フィルタ処理も必要となる。従って、これらの前処理をI,P,Bピクチャの全てに対して行なった場合、演算処理時間が大幅にかかり、特に、PピクチャやBピクチャにおいては、動き探索処理により、Iピクチャに比べて処理量が非常に多くなるといった問題があった。   By the way, in the above preprocessing in Patent Document 1 and Patent Document 2, as the difference between the encoded original image data and the decoded image data becomes larger, filter processing for limiting the frequency band and spatial processing of the original image data are performed. DFT (Discrete Fourier Transform) and DCT orthogonal transform processing are required to acquire accurate frequency information. In addition, a mid-high pass filter process for emphasizing the edge portion is also required. Therefore, when these pre-processing is performed on all of the I, P, and B pictures, the calculation processing time is significantly increased. In particular, the P picture and the B picture are compared with the I picture by the motion search process. There was a problem that the amount of processing became very large.

また、HD(High Definition:高品位)画像などのサイズの大きい画像を符号化する際には、リアルタイムで符号化処理を行なうことが困難となるといった問題もあった。   In addition, when encoding a large image such as an HD (High Definition) image, it is difficult to perform the encoding process in real time.

本発明の目的は、かかる問題を解消し、画質を実質的に保持しながら、特徴量算出に費やす演算量の大幅な削減を実現可能とした画像符号化装置及び画像符号化方法を提供することにある。   An object of the present invention is to provide an image coding apparatus and an image coding method that can solve such a problem and that can substantially reduce the amount of calculation spent for calculating a feature amount while substantially maintaining image quality. It is in.

上記目的を達成するために、本発明は、アクティビティをはじめとする画像の特徴量算出処理において、IまたはPピクチャの特徴量を算出し、その特徴量に基づいてPまたはBピクチャの特徴量を予測するものであって、画質を実質的に保持しながら、特徴量算出に費やす演算量の大幅な削減を実現するものである。   In order to achieve the above object, according to the present invention, a feature amount of an I or P picture is calculated in an image feature amount calculation process including an activity, and a feature amount of a P or B picture is calculated based on the feature amount. This is a prediction, and realizes a significant reduction in the amount of calculation spent on the feature amount calculation while substantially maintaining the image quality.

具体的には、本発明は、一連のピクチャからなる動画像情報を符号化する画像符号化装置であって、符号化するピクチャの特徴量を算出する特徴量演算手段と、特徴量の算出の際の分散値を格納する特徴量格納手段と、符号化するピクチャの特徴量を、該特徴量格納手段に格納されている該分散値を基に算出する特徴量予測手段とを備えたことを特徴とするものである。   Specifically, the present invention is an image encoding device that encodes moving image information including a series of pictures, a feature amount calculating unit that calculates a feature amount of a picture to be encoded, and a feature amount calculation unit. Characteristic amount storage means for storing the variance value at the time of the calculation, and feature quantity prediction means for calculating the feature value of the picture to be encoded based on the variance value stored in the feature value storage means. It is a feature.

また、本発明による画像符号化装置は、前記特徴量演算手段で特徴量が算出されるピクチャは、画面内予測符号化されるIピクチャであり、前記特徴量予測手段で前記特徴量が算出されるピクチャは、画面間予測符号化されるPピクチャとBピクチャであって、Pピクチャの分散値が、前記特徴量格納手段に格納されている既に符号化された該Iピクチャまたは該Pピクチャの分散値を基に、前記特徴量予測手段で算出され、算出された該分散値が前記特徴量格納手段に格納され、該Bピクチャの分散値が、前記特徴量格納手段に格納されている既に符号化された該Iピクチャや該Pピクチャの特徴量を基に、前記特徴量予測手段で算出され、前記特徴量格納手段への格納が禁止されることを特徴とするものである。   In the image coding apparatus according to the present invention, the picture whose feature value is calculated by the feature value calculating unit is an I picture that is predictive-encoded in the screen, and the feature value is calculated by the feature value predicting unit. The pictures are P pictures and B pictures that are inter-picture predictively encoded, and the variance value of the P picture is stored in the feature amount storage means and the already encoded I picture or P picture Based on the variance value, calculated by the feature amount prediction means, the calculated variance value is stored in the feature amount storage means, and the variance value of the B picture is already stored in the feature amount storage means The feature amount is calculated by the feature amount prediction unit based on the encoded feature amount of the I picture or the P picture, and storage in the feature amount storage unit is prohibited.

また、本発明による画像符号化装置は、前記特徴量演算手段は、前記Iピクチャをブロック分割し、該ブロック毎に、該ブロックの各画素の画素値に基づいて、前記分散値を生成することを特徴とするものである。   Also, in the image encoding device according to the present invention, the feature amount calculation means divides the I picture into blocks, and generates the variance value for each block based on the pixel value of each pixel of the block. It is characterized by.

また、本発明による画像符号化装置は、前記Iピクチャをブロック分割し、該ブロック毎に該Iピクチャ内の参照画像との差分値を画素とする手段を有し、前記特徴量演算手段は、該ブロック毎に、該差分値の画素値に基づいて、前記分散値を生成することを特徴とするものである。   The image coding apparatus according to the present invention includes means for dividing the I picture into blocks, and for each block, using a difference value from a reference image in the I picture as a pixel, wherein the feature amount calculating means includes: The variance value is generated for each block based on the pixel value of the difference value.

また、本発明による画像符号化装置は、前記特徴量予測手段は、前記P,Bピクチャをブロック分割し、該ブロック毎に、該ブロックに対する参照ブロックとなる前記特徴量格納手段のIまたはPピクチャのブロック、もしくはその周辺ブロックの分散値に基づいて、分散値を生成することを特徴とするものである。   Also, in the image coding apparatus according to the present invention, the feature quantity prediction means divides the P and B pictures into blocks, and the feature quantity storage means that is a reference block for the block for each block. The variance value is generated based on the variance value of the block or its neighboring blocks.

また、本発明による画像符号化装置は、前記特徴量演算手段で算出される前記特徴量は、前記Iピクチャが符号化されるときの量子化ステップサイズであり、前記特徴量予測手段で算出される前記特徴量は、前記P,Bピクチャが符号化されるときの量子化ステップサイズであることを特徴とするものである。   In the image coding apparatus according to the present invention, the feature amount calculated by the feature amount calculation unit is a quantization step size when the I picture is encoded, and is calculated by the feature amount prediction unit. The feature amount is a quantization step size when the P and B pictures are encoded.

また、本発明による画像符号化装置は、前記特徴予測手段は、前記Pピクチャの符号化するブロック毎に、該ブロックの周辺の既に符号化されたプロックの動きベクトルを基に動きベクトルを予測し、該動きベクトルを基に前記IまたはPピクチャの前記参照ブロックを予測し、予測された前記参照ブロックもしくはその周辺ブロックの分散値を前記特徴量格納手段から取得して該符号化するブロックの分散値を求めることを特徴とするものである。   In the image encoding device according to the present invention, the feature prediction means predicts a motion vector for each block to be encoded of the P picture based on a motion vector of a block already encoded around the block. The block of the block to be encoded by predicting the reference block of the I or P picture based on the motion vector, obtaining a variance value of the predicted reference block or its neighboring blocks from the feature amount storage means It is characterized by obtaining a value.

また、本発明による画像符号化装置は、前記特徴予測手段は、前記Bピクチャの符号化するブロック毎に、前記Bブロックに表示順で前方のIまたはPピクチャに対する前方予測動きベクトルと前記Bブロックに表示順で後方のPピクチャに対する後方予測動きベクトルとを予測し、該前方予測動きベクトルに基づいて該前方のIまたはPピクチャでの前方の前記参照ブロックを予測し、該後方予測動きベクトルに基づいて該後方のPピクチャでの後方の前記参照ブロックを予測し、該前方の前記参照ブロックまたはその周辺ブロックの分散値と該後方の前記参照ブロックまたはその周辺ブロックの分散値とを前記特徴量格納手段から取得して該符号化するブロックの分散値を求めることを特徴とするものである。   Further, in the image encoding device according to the present invention, the feature prediction means includes, for each block to be encoded of the B picture, a forward prediction motion vector for the I or P picture forward in the display order of the B block and the B block. Predicting a backward predicted motion vector for a backward P picture in display order, predicting the forward reference block in the forward I or P picture based on the forward predicted motion vector, and Based on this, the reference block in the back in the back P picture is predicted, and a variance value of the reference block in the front or its surrounding block and a variance value of the reference block in the back or its surrounding block are used as the feature amount It is characterized in that the variance value of the block to be encoded is obtained from the storage means.

また、本発明による画像符号化装置は、特徴量予測手段で特徴量を予測するか否かを判定する特徴量予測処理判定手段を設け、該特徴量予測処理判定手段により、特徴量予測手段で特徴量を予測しないと判定されたときには、前記特徴量演算手段で特徴量を算出し、その算出に際しての前記分散値を前記特徴量格納手段に格納することを特徴とするものである。   The image coding apparatus according to the present invention further includes a feature amount prediction process determination unit that determines whether or not a feature amount is predicted by the feature amount prediction unit, and the feature amount prediction process determination unit determines whether the feature amount prediction process is performed. When it is determined that the feature amount is not predicted, the feature amount calculation unit calculates the feature amount, and the variance value at the time of the calculation is stored in the feature amount storage unit.

また、本発明による画像符号化装置は、動画像のシーンチェンジを検出するシーンチェンジ検出手段を設け、シーンチェンジしたピクチャに対して、前記特徴量予測処理判定手段に特徴量予測手段で特徴量を予測しないと判定させることを特徴とするものである。   The image encoding apparatus according to the present invention further includes a scene change detection unit for detecting a scene change of a moving image, and the feature amount prediction unit determines a feature amount for the scene-changed picture in the feature amount prediction processing determination unit. It is characterized in that it is determined not to predict.

また、本発明による画像符号化装置は、前記分散値から求めた量子化ステップサイズの情報を、前記分散値に代えて、前記特徴量格納手段に格納することを特徴とするものである。   The image encoding apparatus according to the present invention is characterized in that information on a quantization step size obtained from the variance value is stored in the feature quantity storage means instead of the variance value.

また、本発明による画像符号化装置は、前記特徴量格納手段に符号化の対象となるピクチャに前処理を施した後の画素値を格納することを特徴とするものである。   The image encoding apparatus according to the present invention is characterized in that the feature value storage means stores a pixel value after pre-processing a picture to be encoded.

また、本発明による画像符号化装置は、前記前処理は、画像のエッジ部を強調する処理であることを特徴とするものである。   The image encoding device according to the present invention is characterized in that the preprocessing is processing for enhancing an edge portion of an image.

また、本発明は、I,P,Bピクチャの一連のピクチャからなる動画像情報を符号化する画像符号化方法であって、該Iピクチャの符号化の際、該Iピクチャの特徴量を算出して格納し、該P,Bピクチャを符号化する際には、その特徴量を格納されている特徴量に基づいて算出し、該Pピクチャの算出された該特徴量を格納して保持することを特徴とするものである。   The present invention also relates to an image encoding method for encoding moving picture information composed of a series of I, P, and B pictures, wherein the feature amount of the I picture is calculated when the I picture is encoded. When the P and B pictures are encoded, the feature amount is calculated based on the stored feature amount, and the calculated feature amount of the P picture is stored and held. It is characterized by this.

また、本発明による画像符号化方法は、前記格納される特徴量は、前記I,P,Bピクチャの分割されたブロック毎に算出される分散値であって、該分散値から、前記I,P,Bピクチャの符号化の際の量子化ステップサイズを決める情報が算出されることを特徴とするものである。   In the image coding method according to the present invention, the stored feature amount is a variance value calculated for each divided block of the I, P, and B pictures. Information for determining a quantization step size at the time of encoding P and B pictures is calculated.

本発明によると、MEPEG規格の方式をはじめとする動画像符号化方式において、量子化制御に用いる画像の特徴量を算出するための処理を大幅に削減することができ、画質を実質的に保持しつつ、符号化処理を高速に行なうことができる。   According to the present invention, in the moving picture coding system such as the MPEG standard system, the processing for calculating the feature amount of the image used for the quantization control can be greatly reduced, and the image quality is substantially maintained. However, the encoding process can be performed at high speed.

以下、本発明の実施形態を図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は本発明による画像符号化装置及び画像符号化方法の一実施例の構成を示すブロック構成図であって、15はピクチャ種別判定部、16は特徴量演算部、17は特徴量予測部、18は動きベクトルメモリ、19は特徴量格納メモリであり、図12に対応する部分には同一符号をつけて重複する説明を省略する。   FIG. 1 is a block diagram showing the configuration of an embodiment of an image encoding apparatus and an image encoding method according to the present invention, in which 15 is a picture type determining unit, 16 is a feature amount calculating unit, and 17 is a feature amount predicting unit. , 18 is a motion vector memory, and 19 is a feature quantity storage memory. The same reference numerals are assigned to the portions corresponding to those in FIG.

同図において、この第1の実施形態は、図12に示す従来の画像符号化装置の構成に対し、アクティビティ演算部14に代えて、ピクチャ種別判定部15,特徴量演算部16,特徴量予測部17,動きベクトルメモリ18及び特徴量格納メモリ19を設けたものであり、Iピクチャでアクティビティをはじめとする特徴量を求めて、P,Bピクチャの特徴量をこのIピクチャで求めた特徴量を利用して求めるものであり、これら特徴量に応じて量子化制御部13が量子化部4の量子化ステップサイズを制御するものである。   In the figure, the first embodiment is different from the configuration of the conventional image coding apparatus shown in FIG. 12 in that a picture type determination unit 15, a feature amount calculation unit 16, a feature amount prediction is used instead of the activity calculation unit 14. Unit 17, motion vector memory 18, and feature quantity storage memory 19. A feature quantity such as an activity is obtained from an I picture, and a feature quantity of P and B pictures is obtained from this I picture. The quantization control unit 13 controls the quantization step size of the quantization unit 4 in accordance with these feature amounts.

原画像メモリ1から上記の順序で読み出される符号化対象ピクチャ(ここでは、フレームとする)が減算器2や直交変換部3などによって符号化処理されるときには、ピクチャ種別判定部15において、その符号化対象ピクチャがI,P,Bピクチャのいずれであるか判定され、その判定結果情報CRが特徴量演算部16と特徴量予測部17とに供給される。この判定結果情報CRがIピクチャであることを示す場合には、この特徴量演算部16が動作を開始し、原画像メモリ1からこのIピクチャの画像データが供給されてその特徴量などを求めるための演算処理を開始する。また、この判定結果情報CRがPまたはBピクチャであることを示す場合には、特徴量予測部17が動作を開始し、IまたはPピクチャの特徴量を用いてこれらPまたはBピクチャの特徴量などを求めるための演算処理を開始する。   When an encoding target picture (here, referred to as a frame) read out from the original image memory 1 in the above order is encoded by the subtractor 2 or the orthogonal transform unit 3, the picture type determination unit 15 performs the encoding process. It is determined whether the target picture is an I, P, or B picture, and the determination result information CR is supplied to the feature amount calculation unit 16 and the feature amount prediction unit 17. When the determination result information CR indicates that the picture is an I picture, the feature amount calculation unit 16 starts operating, and the image data of the I picture is supplied from the original image memory 1 to obtain the feature amount and the like. The calculation process for this is started. When the determination result information CR indicates that the picture is a P or B picture, the feature quantity prediction unit 17 starts operation, and the feature quantity of these P or B pictures is started using the feature quantity of the I or P picture. The arithmetic processing for obtaining the above is started.

なお、以下では、特徴量演算部16や特徴量予測部17で演算処理される符号化対象のI,P,Bピクチャを、夫々演算処理対象I,P,Bピクチャという。また、演算処理対象PまたはBピクチャであって、特徴量予測部17が演算処理を行なう場合には、上記のように、この特徴量予測部17に演算処理対象PまたはBピクチャが供給されるのではなく、特徴量演算部16で求められたIピクチャの特徴量を利用するものである。   In the following, the I, P, and B pictures to be encoded that are processed by the feature amount calculating unit 16 and the feature amount predicting unit 17 are referred to as the calculation target I, P, and B pictures, respectively. Further, when the feature amount prediction unit 17 performs a calculation process for a calculation processing target P or B picture, the calculation processing target P or B picture is supplied to the feature amount prediction unit 17 as described above. Instead, the feature amount of the I picture obtained by the feature amount calculation unit 16 is used.

特徴量演算部16では、ピクチャ種別判定部15でIピクチャと判定されて、原画像メモリ1から演算処理対象Iピクチャが供給されると、そのアクティビティActをはじめとする特徴量がマクロブロック(MB)毎に算出され、アクティビティActの算出に用いたブロック毎の分散値Varが特徴量格納メモリ19に格納される。そして、この演算処理対象Iピクチャと同じピクチャが原画像メモリ1から読み出され、符号化対象Iピクチャとして先に説明したようにして符号化処理されるとき、特徴量演算部16が算出したアクティビティActから量子化ステップサイズQSを求め、これを量子化制御部13に送る。これにより、この符号化対象Iピクチャに対して、そのマクロブロック毎に量子化部4での量子化ステップサイズ、従って、量子化レベルの間隔が設定される。   In the feature amount calculation unit 16, when the picture type determination unit 15 determines that the picture is an I picture and the calculation target I picture is supplied from the original image memory 1, the feature amount including the activity Act becomes a macroblock (MB ) And the variance value Var for each block used to calculate the activity Act is stored in the feature amount storage memory 19. Then, when the same picture as the calculation processing target I picture is read from the original image memory 1 and encoded as the encoding target I picture as described above, the activity calculated by the feature amount calculation unit 16 is calculated. The quantization step size QS is obtained from Act and is sent to the quantization control unit 13. As a result, the quantization step size in the quantization unit 4 and thus the quantization level interval are set for each macroblock for the I picture to be encoded.

ピクチャ種別判定部15が原画像メモリ1から読み出されるて符号化されるピクチャをPピクチャと判定すると、特徴量演算部16は動作を開始し、このPピクチャを演算処理対象Pピクチャとして、まず、ブロック(演算処理対象ブロック)毎に分散値Varを算出する。この演算処理対象ブロックの分散値Varは、特徴量格納メモリ19に格納されている分散値を用いて算出されるものであって、このために、特徴量格納メモリ19から必要な分散値が特徴量予測部17に読み取られる。この分散値の読み取りに動き検出・動き補償部11で検出される動きベクトルMVが用いられる。即ち、特徴量予測部17では、演算処理対象Pピクチャの演算処理対象となるブロックが決まると、この演算処理対象ブロックに対して参照画像となるブロック(参照ブロック:これに対する分散値が特徴量格納メモリ19に保存されている)をこの動きベクトルMVを用いて探索し、この参照ブロック、もしくはその周囲のブロックの分散値を特徴量格納メモリ19から取り込み、これに基づいて演算処理対象ブロックの分散値とするものである。   When the picture type determination unit 15 determines that the picture read and encoded from the original image memory 1 is a P picture, the feature amount calculation unit 16 starts its operation. The variance value Var is calculated for each block (operation processing target block). The variance value Var of the operation processing target block is calculated using the variance value stored in the feature amount storage memory 19. For this reason, the necessary variance value is obtained from the feature amount storage memory 19. It is read by the quantity prediction unit 17. The motion vector MV detected by the motion detection / compensation unit 11 is used for reading the dispersion value. That is, in the feature quantity predicting unit 17, when a block to be subjected to the computation process of the computation target P picture is determined, a block that becomes a reference image for the computation target block (reference block: a variance value corresponding thereto is stored in the feature quantity (Stored in the memory 19) is searched using this motion vector MV, and the variance value of this reference block or its surrounding blocks is fetched from the feature amount storage memory 19, and based on this, the variance of the block to be processed is calculated. Value.

特徴量予測部17は、さらに、演算処理対象Pピクチャのこのようにして得られたブロック毎の分散値Varからアクティビティをはじめとする特徴量をマクロブロック毎に予測し、その分散値Varを特徴量格納メモリ19に格納する。そして、この符号化対象Pピクチャが先に説明したようにして符号化処理されるとき、特徴量予測部17がこの演算処理対象Pピクチャから算出したアクティビティActから量子化ステップサイズQSを求め、これを量子化制御部13に送る。これにより、この符号化対象Pピクチャに対して、そのマクロブロック毎に量子化部4での量子化ステップサイズ、従って、量子化レベルの間隔が設定される。動き検出・動き補償部11から取り込まれた動きベクトルMVは、この演算処理対象Pピクチャに対するかかる処理が終わるまで、動きベクトルメモリ18に保持されている。   The feature amount prediction unit 17 further predicts, for each macroblock, a feature amount including an activity from the variance value Var for each block of the P picture to be calculated in this way, and uses the variance value Var as the feature value. It is stored in the quantity storage memory 19. When the encoding target P picture is encoded as described above, the feature amount prediction unit 17 obtains the quantization step size QS from the activity Act calculated from the calculation processing target P picture. Is sent to the quantization control unit 13. As a result, the quantization step size in the quantization unit 4 and thus the quantization level interval are set for each macroblock for the P picture to be encoded. The motion vector MV captured from the motion detection / compensation unit 11 is held in the motion vector memory 18 until such processing for the calculation processing target P picture is completed.

なお、Pピクチャが既に符号化された先行のPピクチャを参照画像として符号化される場合には、かかる先行のPピクチャのブロック毎の分散値Varも特徴量格納メモリ19に格納されており、この符号化対象となるPピクチャに対する演算処理対象Pピクチャのブロック毎の分散値を求めるときには、上記と同様、このブロックに対する先行Pピクチャでの参照ブロックを動きベクトルMVを用いて求め、この参照ブロックの分散値を特徴量格納メモリ19から読み取る。   When a preceding P picture in which a P picture has already been encoded is encoded as a reference image, the variance value Var for each block of the preceding P picture is also stored in the feature amount storage memory 19. When obtaining the variance value for each block of the P picture to be processed with respect to the P picture to be coded, the reference block in the preceding P picture for this block is obtained using the motion vector MV in the same manner as described above. Are distributed from the feature amount storage memory 19.

原画像メモリ1からBピクチャが読み出されて符号化されるときには、この符号化対象Bピクチャの参照画像としては、このBピクチャに前後する既に符号化されたIピクチャとその次に符号化されたPピクチャもしくはこのBピクチャに前後する2つの既に符号化されたPピクチャが用いられる。従って、原画像メモリ1のBピクチャが符号化されるときには、特徴量格納メモリ19にその参照画像となるIピクチャやPピクチャの特徴量(分散値Var)が既に格納されている状態にある。   When a B picture is read out from the original image memory 1 and is encoded, the reference picture of the encoding target B picture is an I picture that has already been encoded before and after this B picture, and is encoded next. Or two already encoded P pictures before and after this B picture. Therefore, when the B picture in the original image memory 1 is encoded, the feature quantity storage memory 19 already stores the feature quantity (variance value Var) of the I picture or P picture that is the reference picture.

そこで、特徴量予測部17は、ピクチャ種別判定部15が原画像メモリ1から読み出されて符号化されるピクチャをBピクチャと判定すると、動作を開始し、その演算処理対象となるBピクチャのブロック(演算処理対象ブロック)毎に、動き検出・動き補償部11で検出された動きベクトルMVを用いて参照画像となる演算処理済みのIピクチャやPピクチャのブロック(参照ブロック)を探索し、この参照ブロックまたはその周辺ブロックの分散値Varを特徴量格納メモリ19から取り込む。そして、この取り込んだ分散値Varに基づいて、この演算処理対象ブロックの分散値Varを求める。さらに、特徴量予測部17は、このようにして得られた分散値Varに基づいて、この演算処理対象BピクチャのアクティビティActをはじめとする特徴量をマクロブロック毎に予測し、この予測したアクティビティActから量子化ステップサイズQSを求め、これを量子化制御部13に送る。これにより、符号化対象Bピクチャに対して、そのマクロブロック毎に量子化部4での量子化ステップサイズ、従って、量子化レベルの間隔が設定される。動き検出・動き補償部11から取り込まれた動きベクトルMVは、この演算処理対象Bピクチャに対するかかる処理が終わるまで、動きベクトルメモリ18に保持されている。   Therefore, when the picture type determination unit 15 determines that the picture read and encoded from the original image memory 1 is a B picture, the feature amount prediction unit 17 starts the operation, and the feature quantity prediction unit 17 For each block (arithmetic processing target block), a motion vector MV detected by the motion detection / compensation unit 11 is used to search for a block (reference block) of an arithmetically processed I picture or P picture that becomes a reference image, The variance value Var of this reference block or its peripheral blocks is fetched from the feature amount storage memory 19. Then, based on the fetched variance value Var, the variance value Var of this operation processing target block is obtained. Further, the feature amount predicting unit 17 predicts a feature amount including the activity Act of the B picture to be processed for each macroblock based on the variance value Var obtained in this way, and this predicted activity The quantization step size QS is obtained from Act and is sent to the quantization control unit 13. Thereby, with respect to the encoding target B picture, the quantization step size in the quantization unit 4 and thus the quantization level interval are set for each macroblock. The motion vector MV captured from the motion detection / compensation unit 11 is held in the motion vector memory 18 until such processing for the calculation processing target B picture is completed.

このようにして、I,P,Bピクチャの特徴量が算出され、かかる特徴量を用いて夫々の量子化ステップサイズQSが求められるものである。この際、PピクチャやBピクチャの参照画像としてのI,Pピクチャの特徴量は、使用されなくなるまで、特徴量格納メモリ19に保存されている。   In this way, the feature quantities of the I, P, and B pictures are calculated, and the respective quantization step sizes QS are obtained using the feature quantities. At this time, the feature amounts of the I and P pictures as reference images of the P picture and B picture are stored in the feature amount storage memory 19 until they are not used.

図2は以上のピクチャ種別判定部15,特徴量演算部16,特徴量予測部17及び特徴量格納メモリ19による処理の流れを示すフローチャートであって、これを用いて上記の処理動作を具体的に説明する。   FIG. 2 is a flowchart showing the flow of processing performed by the picture type determination unit 15, the feature amount calculation unit 16, the feature amount prediction unit 17, and the feature amount storage memory 19 described above. Explained.

原画像メモリ1から読み出されて符号化されるピクチャが、ピクチャ種別判定部15により、Iピクチャと判定されると(図2のステップ101の“YES”)、特徴量演算部16が動作を開始し、このピクチャが演算処理対象Iピクチャとして供給されて、その特徴量がマクロブロック毎に算出される(図2のステップ102)。   When a picture read out from the original image memory 1 and encoded is determined as an I picture by the picture type determination unit 15 (“YES” in step 101 in FIG. 2), the feature amount calculation unit 16 operates. This picture is supplied as an arithmetic processing target I picture, and its feature amount is calculated for each macroblock (step 102 in FIG. 2).

ここで、この特徴量をアクティビティActを例にして説明する。   Here, this feature amount will be described using the activity Act as an example.

アクティビティActの算出には、ここでは、先の分散値Varを算出する数式1及びアクティビティActを算出する数式2を用いることとするが、アクティビティActの算出に8×8画素のブロック毎に数式1で求める分散値Varを用いる代わりに、8×8画素のブロック内の画素値からその平均値を求め、この平均値とこのブロック内での各画素値との差分の絶対値の総和など、かかるブロックに関する他の計算式で求めた値を用いてもよい。また、ブロックサイズとしては、8×8画素単位ではなく、16×16画素単位や4×4画素単位などの複数画素から構成されていれば、どのサイズとしても適用することができる。   Here, for calculating the activity Act, Formula 1 for calculating the previous variance value Var and Formula 2 for calculating the activity Act are used, but Formula 1 is calculated for each 8 × 8 pixel block for calculating the Activity Act. Instead of using the variance value Var obtained in step 1, the average value is obtained from the pixel values in the 8 × 8 pixel block, and the sum of the absolute values of the differences between the average value and each pixel value in the block is required. You may use the value calculated | required with the other formula about a block. Further, the block size can be applied to any size as long as it is composed of a plurality of pixels such as a 16 × 16 pixel unit or a 4 × 4 pixel unit instead of an 8 × 8 pixel unit.

次に、図2のステップ102でアクティビティActを算出する際に求めた各ブロックの分散値Varが、特徴量格納メモリ19に記憶される(図2のステップ103)。特徴量格納メモリ19への記憶方法としては、例えば、I,Pピクチャ毎にそのマクロブロックの格納アドレスを決めるMBアドレスが設定されており、特徴量演算部16で順次算出された演算処理対象Iピクチャのマクロブロックでの各ブロックの分散値Varが、特徴量格納メモリ19の該当するMBアドレスに格納される。   Next, the variance value Var of each block obtained when calculating the activity Act in step 102 in FIG. 2 is stored in the feature amount storage memory 19 (step 103 in FIG. 2). As a storage method in the feature quantity storage memory 19, for example, an MB address that determines the storage address of the macroblock is set for each I and P picture, and the computation target I is sequentially calculated by the feature quantity computation unit 16. The variance value Var of each block in the macro block of the picture is stored in the corresponding MB address of the feature amount storage memory 19.

演算処理対象Iピクチャに該当する符号化対象Iピクチャが原画像メモリ1から読み出されて符号化されるとき、特徴量演算部16は算出したアクティビティactから上記の数3及び数4に基づいて量子化ステップサイズQSを算出する。そして、この量子化ステップサイズQSが量子化制御部13に供給され、これによって量子化部4で量子化ステップサイズが制御されてIピクチャの符号化処理が行なわれる(図2のステップ106)。   When the encoding target I picture corresponding to the arithmetic processing target I picture is read from the original image memory 1 and encoded, the feature amount calculation unit 16 uses the calculated activity act based on the above equations 3 and 4. A quantization step size QS is calculated. Then, the quantization step size QS is supplied to the quantization control unit 13, whereby the quantization step size is controlled by the quantization unit 4 to perform the I picture encoding process (step 106 in FIG. 2).

以上の処理が、演算処理対象Iピクチャ内の全てのマクロブロックに対して終了するまで繰り返えされる(図2のステップ107)。   The above processing is repeated until all the macroblocks in the calculation target I picture are completed (step 107 in FIG. 2).

原画像メモリ1から読み出されて符号化されるピクチャが、ピクチャ種別判定部15により、Pピクチャと判定された場合には(図2のステップ101の“NO”)、特徴量予測部17が動作を開始し、特徴量格納メモリ19に記憶されているIピクチャの分散値Varを利用してアクティビティActを予測する(図2のステップ104)。   When the picture read out from the original image memory 1 and encoded is determined as a P picture by the picture type determination unit 15 (“NO” in step 101 of FIG. 2), the feature amount prediction unit 17 The operation is started, and the activity Act is predicted using the variance value Var of the I picture stored in the feature amount storage memory 19 (step 104 in FIG. 2).

図3は演算処理対象PピクチャでのアクティビティActの予測処理の一部の一具体例を示す図である。   FIG. 3 is a diagram showing a specific example of a part of the activity Act prediction process for the P picture to be processed.

同図において、演算処理対象Pピクチャに対応する符号化対象Pピクチャでの符号化対象ブロックをX、その左側の隣接ブロックをA、上側の隣接ブロックをB、この隣接ブロックの右側の隣接ブロックをCとする。これら隣接ブロックA,B,Cは、既に符号化された符号化済みブロックであり、夫々参照画面としてのIまたはPピクチャに対する動きベクトルMVA,MVB,MVCも既に求められている。   In the figure, the encoding target block in the encoding target P picture corresponding to the operation target P picture is X, the adjacent block on the left side is A, the adjacent block on the upper side is B, and the adjacent block on the right side of the adjacent block is C. These adjacent blocks A, B, and C are already encoded blocks, and motion vectors MVA, MVB, and MVC for I or P pictures as reference screens have already been obtained.

特徴予測部17において、演算処理対象Pピクチャの演算処理の対象となるブロックをブロックXとすると、この演算処理の対象となるブロックXは、まだ符号化されたものでないので、動きベクトルMVが得られていないが、既に符号化されている隣接ブロックA,B,Cでは、動きベクトルMVA,MVB,MVCが得られて動きベクトルメモリ18に格納されている。そこで、特徴予測部17は、これら隣接ブロックA,B,Cの動きベクトルMVA,MVB,MVCを動きベクトルメモリ18から取得し、そのうちの絶対値が中間の値の動きベクトルをこの演算処理対象ブロックXの動きベクトル(以下、これを予測動きベクトルという)PMVとする。そして、特徴量予測部17は、この予測動きベクトルPMVを基に、符号化の際の参照画像となるIピクチャもしくはPピクチャのブロック(参照ブロック)を特定し、その分散値Varまたはその周辺ブロックの分散値Varを特徴量格納メモリ19から取り込み、これに基づいて演算処理対象ブロックXの分散値Varを求める。このために、動き検出・動き補償部11で検出されたこの演算処理対象Pピクチャの各ブロックに対する動きベクトルMVが動きベクトルメモリ18に記憶されて保持される。   In the feature prediction unit 17, if the block that is the target of the arithmetic processing target P picture is the block X, the block X that is the target of the arithmetic processing is not yet encoded, so the motion vector MV is obtained. Although not coded, motion vectors MVA, MVB, and MVC are obtained and stored in the motion vector memory 18 in the adjacent blocks A, B, and C that have already been encoded. Therefore, the feature prediction unit 17 acquires the motion vectors MVA, MVB, and MVC of these adjacent blocks A, B, and C from the motion vector memory 18, and the motion vector having an intermediate absolute value among them is the operation processing target block. Let XV be a motion vector (hereinafter referred to as a predicted motion vector) PMV. Then, the feature quantity predicting unit 17 specifies an I picture or P picture block (reference block) which is a reference image at the time of encoding based on the predicted motion vector PMV, and its variance value Var or its peripheral blocks Is obtained from the feature quantity storage memory 19, and based on this, the variance value Var of the operation processing target block X is obtained. For this purpose, the motion vector MV for each block of the calculation target P picture detected by the motion detection / motion compensation unit 11 is stored and held in the motion vector memory 18.

なお、予測動きベクトルPMVとしては、隣接ブロックA,B,Cの動きベクトルMVA,MVB,MVCのうちの最小値の動きベクトルやベクトル平均値のベクトルを用いてもよい。   Note that the motion vector MVA, MVB, and MVC of the adjacent blocks A, B, and C may be the minimum motion vector or vector average vector as the predicted motion vector PMV.

また、符号化対象Pピクチャの画面での上辺部のブロックなど、周辺ブロックA,B,Cに相当する隣接ブロックが存在しないブロックもある。このようなブロックに対しては、かかるブロックが符号化対象ブロックとなるときに動き検出・動き補償部11で検出される動きベクトルMVが特徴予測部17に供給されたとき(これも、当然動きベクトルメモリ18に保存される)、直接この符号化対象ブロックに対する演算処理対象ブロックの予測動きベクトルとし、これを用いて該当する参照ブロックを特定して特徴量格納メモリ19から、上記のように、その分散値Varを読み取ってこの演算処理対象ブロックの分散値Varとする。   In addition, there are blocks in which there are no adjacent blocks corresponding to the peripheral blocks A, B, and C, such as the upper side block on the screen of the encoding target P picture. For such a block, when a motion vector MV detected by the motion detection / compensation unit 11 is supplied to the feature prediction unit 17 when such a block becomes an encoding target block (which is of course also a motion) (Preserved in the vector memory 18) directly as the predicted motion vector of the operation target block for this encoding target block, and using this, the corresponding reference block is identified from the feature amount storage memory 19 as described above, The variance value Var is read and set as the variance value Var of the operation processing target block.

このようにして、演算処理対象Pピクチャについては、その一部のブロックについては、動き検出・動き補償部11で動きベクトルMVが検出されるのを待ち、この検出された動きベクトルMVを演算処理対象ブロックの予測動きベクトルとするが、ほとんどのブロックについては、演算処理対象Pピクチャの既に演算処理された隣接ブロックの動きベクトルをもとに予測動きベクトルMVを取得するものであるから、予測動きベクトルを取得するための演算処理量が大幅に低減されることになり、迅速な処理を行なうことができる。   In this way, with respect to the P picture to be processed, for a part of the blocks, the motion detection / motion compensation unit 11 waits for the motion vector MV to be detected, and the detected motion vector MV is processed. Although the prediction motion vector of the target block is used, for most blocks, the prediction motion vector MV is obtained based on the motion vector of an adjacent block that has already been arithmetically processed for the P picture to be processed. The calculation processing amount for acquiring the vector is greatly reduced, and a quick process can be performed.

図4はかかる演算処理対象Pピクチャでの演算処理対象ブロックXの分散値Varを求める方法の一具体例を示す図であって、20は演算処理対象Pピクチャの演算処理対象マクロブロック、21はこの演算処理対象Pブロックに対する参照画像としての演算処理済みのIまたはPピクチャの一部である。   FIG. 4 is a diagram showing a specific example of a method for obtaining the variance value Var of the operation processing target block X in the operation processing target P picture. In FIG. 4, 20 is an operation processing target macroblock of the operation processing target P picture, and 21 is This is a part of an I or P picture that has been subjected to arithmetic processing as a reference image for this arithmetic processing target P block.

同図において、16×16画素からなる演算処理対象マクロブロック20は、8×8画素からなる4個のブロックA,B,C,Dからなるものである。また、演算処理済みのIまたはPピクチャ21も、8×8画素からなるブロックに区分して示している。ここでは、ピクチャ21をIピクチャとして説明するが、Pピクチャであっても同様である。   In the figure, an arithmetic processing target macroblock 20 composed of 16 × 16 pixels is composed of four blocks A, B, C, and D composed of 8 × 8 pixels. Further, the I or P picture 21 that has been subjected to the arithmetic processing is also divided into blocks each having 8 × 8 pixels. Here, the picture 21 is described as an I picture, but the same applies to a P picture.

いま、演算処理対象マクロブロック20での左上の演算処理対象ブロックAについて説明する。この演算処理対象ブロックAから上記のようにして求めた予測動きベクトルPMVで決まるIピクチャ21上での8×8画素のエリアをエリアX’として、このエリアX’に最も近いIピクチャ21上でのブロックをブロックA’とすると、このブロックA’が演算処理対象ブロックAの参照ブロックとなる。そして、この参照ブロックA’の分散値Varをこの演算処理対象ブロックAの分散値Varとする。なお、これに限らず、このブロックA’の周囲のブロックE,F,……,Lのいずれか複数のブロックの分散値Varを重み付けして平均化したものを演算処理対象ブロックAの分散値Varとしてもよい。   Now, the upper left arithmetic processing target block A in the arithmetic processing target macroblock 20 will be described. An area of 8 × 8 pixels on the I picture 21 determined by the predicted motion vector PMV obtained from the arithmetic processing target block A as described above is defined as an area X ′, and on the I picture 21 closest to the area X ′. If the block A ′ is a block A ′, this block A ′ becomes a reference block of the operation processing target block A. Then, the variance value Var of the reference block A ′ is set as the variance value Var of the operation processing target block A. However, the present invention is not limited to this, and the variance value of the operation processing target block A is obtained by weighting and averaging the variance values Var of any of the blocks E, F,..., L around the block A ′. It may be Var.

同様にして、演算処理対象マクロブロック20の他のブロックB,C,Dについても分散値Varを求め、これら分散値Varから、上記の数式2により、演算処理対象マクロブロック20のアクティビティActを算出する。このとき、演算処理対象ピクチャがPピクチャであるので(図2のステップ105)、これらブロックA,B,C,Dの分散値Varを、演算処理対象Iピクチャの場合と同様に、特徴量格納メモリ19に記憶する(図2のステップ106)。   Similarly, the variance value Var is also obtained for the other blocks B, C, and D of the operation processing target macroblock 20, and the activity Act of the operation processing target macroblock 20 is calculated from these distribution values Var by the above-described Expression 2. To do. At this time, since the operation processing target picture is a P picture (step 105 in FIG. 2), the variance value Var of these blocks A, B, C, and D is stored in the feature amount as in the case of the operation processing target I picture. The data is stored in the memory 19 (step 106 in FIG. 2).

以上の処理を、演算処理対象Pピクチャ内の全てのマクロブロックが終了するまで繰り返す(図2のステップ107)。   The above processing is repeated until all the macroblocks in the calculation target P picture are completed (step 107 in FIG. 2).

図2において、原画像メモリ1から読み出されて符号化されるピクチャが、ピクチャ種別判定部15により、Bピクチャと判定された場合には(図2のステップ101の“NO”)、特徴量格納メモリ19に記憶されているI,Pピクチャの分散値を利用してアクティビティActを予測する(図2のステップ104)。   In FIG. 2, when a picture read and encoded from the original image memory 1 is determined as a B picture by the picture type determination unit 15 (“NO” in step 101 in FIG. 2), the feature amount The activity Act is predicted using the variance values of the I and P pictures stored in the storage memory 19 (step 104 in FIG. 2).

図5はBピクチャでのアクティビティActの予測のための演算処理での予測動きベクトルを求める処理の一具体例を示す図である。   FIG. 5 is a diagram showing a specific example of a process for obtaining a predicted motion vector in a calculation process for predicting an activity Act in a B picture.

同図において、いま、図示するようにP1,B1,B2,P2のピクチャの表示順の配列で、B2ピクチャを演算処理対象ピクチャとする。この場合には、P1,P2ピクチャは演算処理対象ピクチャの参照ピクチャとしてのPピクチャであって、既に演算処理されてそのブロックの分散値Varが特徴量格納メモリ19に格納されている(勿論、符号化対象としてのP1,P2ピクチャは符号化済みであり、これらが演算処理対象ピクチャB2の参照ピクチャとなる)。また、P1ピクチャのブロックからP2ピクチャの参照プロックへの動きベクトルMVC01も、既に動き検出・動き補償部11で求められて、動きベクトルメモリ18に取り込まれている。B1,B2ピクチャはBピクチャである。なお、P1ピクチャはIピクチャであっても、以下の演算処理は同様である。   In the drawing, as shown in the figure, the B2 picture is set as the operation processing picture in the display order arrangement of the pictures P1, B1, B2, and P2. In this case, the P1 and P2 pictures are P pictures as reference pictures of the calculation target picture, and have already been calculated and the variance value Var of the block is stored in the feature amount storage memory 19 (of course, The P1 and P2 pictures as encoding targets have already been encoded, and these become reference pictures for the arithmetic processing target picture B2. Also, the motion vector MVC01 from the P1 picture block to the P2 picture reference block has already been obtained by the motion detection / motion compensation unit 11 and taken into the motion vector memory 18. B1 and B2 pictures are B pictures. Even if the P1 picture is an I picture, the following calculation processing is the same.

ここで、演算処理対象ピクチャB2での演算処理対象ブロックをブロックXとすると、まず、参照ピクチャP1からの動きベクトルPMVL0の演算処理対象ピクチャB2での位置が演算処理対象ブロックXとなるこの動きベクトルPMVL0と、この演算処理対象ブロックXから参照ピクチャP2への動きベクトルPMVL1を予測して求めるのであるが、その方法として、これらを参照ピクチャP1から参照ピクチャP2への動きベクトルMVColを用いて近似する方法を用いる。   Here, assuming that the operation processing target block in the operation processing target picture B2 is a block X, first, the motion vector in which the position of the motion vector PMVL0 from the reference picture P1 in the operation processing target picture B2 is the operation processing target block X. PMVL0 and the motion vector PMVL1 from the operation processing target block X to the reference picture P2 are predicted and obtained. As a method thereof, these are approximated using the motion vector MVCol from the reference picture P1 to the reference picture P2. Use the method.

この方法としては、まず、演算処理対象ブロックB2に時間的に最も近い参照ピクチャを決める。この場合には、参照ピクチャP2である。次に、この参照ピクチャP2上での、演算処理対象ピクチャB2での演算処理対象ブロックXの空間位置関係と同じ位置関係となるブロックを求める。このブロックをブロックBとする。次に、参照ピクチャP1からの動きベクトルMVC01による参照ピクチャP2での位置に最も近いブロックが上記のブロックBとなるこの動きベクトルMVC0lを求める。かかる動きベクトルMVColは、動きベクトルメモリ18(図1)から求めることができる。   As this method, first, a reference picture that is temporally closest to the operation processing target block B2 is determined. In this case, it is the reference picture P2. Next, a block having the same positional relationship as the spatial positional relationship of the operation processing target block X in the operation processing target picture B2 on the reference picture P2 is obtained. This block is called block B. Next, the motion vector MVC01 in which the block closest to the position in the reference picture P2 by the motion vector MVC01 from the reference picture P1 is the block B is obtained. Such a motion vector MVCol can be obtained from the motion vector memory 18 (FIG. 1).

かかる動きベクトルMVColが求まると、次に、ピクチャP1,B2の時間間隔T1と参照ピクチャP1,P2の時間間隔T2とに応じて時間内分する次の数式5、即ち、

Figure 2007228519
When such a motion vector MVCol is obtained, the following equation 5 that divides the time in accordance with the time interval T1 between the pictures P1 and B2 and the time interval T2 between the reference pictures P1 and P2,
Figure 2007228519

により、演算処理対象ブロックXの予測動きベクトルPMVL0,PMVL1を求める。ここで、予測動きベクトルPMVL0は、主に、前方向予測で算出される動きベクトルであり、予測動きベクトルPMVL1は、後方向予測で算出される動きベクトルである。 Thus, the predicted motion vectors PMVL0 and PMVL1 of the operation processing target block X are obtained. Here, the predicted motion vector PMVL0 is mainly a motion vector calculated by forward prediction, and the predicted motion vector PMVL1 is a motion vector calculated by backward prediction.

また、演算処理対象ピクチャBの演算処理対象ブロックの予測動きベクトルを求める他の方法として、図6に示すように、演算処理対象ピクチャBでの演算処理対象ブロックXの周辺の演算処理済みブロックA,B,Cの動きベクトルMVA,MVB,MVCを利用して、この演算処理対象ブロックXの予測動きベクトルPMVL0,PMVL1を求めることもできる。この方法は、演算処理対象ピクチャB2から表示時間順に最も近くにある演算処理済みのピクチャを参照ピクチャとし、演算処理済みのブロックA,B,Cの動きベクトルの中間値を演算処理対象ブロックXの予測動きベクトルとするものである。   Further, as another method for obtaining the predicted motion vector of the operation processing target block of the operation processing target picture B, as shown in FIG. 6, the operation processed block A around the operation processing target block X in the operation processing target picture B is shown. , B, C motion vectors MVA, MVB, MVC can also be used to determine the predicted motion vectors PMVL0, PMVL1 of the operation processing target block X. In this method, an arithmetically processed picture that is closest to the arithmetic processing target picture B2 in display time order is used as a reference picture, and an intermediate value of motion vectors of arithmetically processed blocks A, B, and C is set to the arithmetic processing target block X. This is a predicted motion vector.

このようにして、演算処理対象ブロックXの参照ピクチャP1,P2に対する予測動きベクトルPMVL0,PMVL0が求まると、特徴量予測部17(図1)は、図4で説明した方法と同様、参照ピクチャP1での演算処理対象ブロックXからこの予測動きベクトルPMVL0の位置に最も近いブロックを参照ブロックとし、この参照ブロックの分散値Var(P1)を特徴量格納メモリ19から読み取る。同様にして、参照ピクチャP2での演算処理対象ブロックXからこの予測動きベクトルPMVL1の位置に最も近いブロックを参照ブロックとし、この参照ブロックの分散値Var(P2)を特徴量格納メモリ19から読み取る。勿論、図4で説明したように、周辺のブロックの分散値Varを用いて夫々の分散値Var(P1),Var(P2)を求めるようにしてもよい。そして、これら分散値Var(P1),Var(P2)を基に演算処理対象ブロックXの分散値Varを求めるのであるが、その方法としては、例えば、これら分散値Var(P1),Var(P2)を演算処理対象ピクチャB2から参照画像としてのピクチャP1,P2までの時間間隔T1,(T2−T1)に応じた重み付けによって平均化する方法がある。   In this way, when the predicted motion vectors PMVL0 and PMVL0 for the reference pictures P1 and P2 of the operation processing target block X are obtained, the feature quantity predicting unit 17 (FIG. 1) performs the reference picture P1 similarly to the method described in FIG. The block closest to the position of the predicted motion vector PMVL0 from the operation processing target block X in FIG. 5 is used as a reference block, and the variance value Var (P1) of this reference block is read from the feature quantity storage memory 19. Similarly, the block closest to the position of the predicted motion vector PMVL1 from the operation processing target block X in the reference picture P2 is used as a reference block, and the variance value Var (P2) of this reference block is read from the feature quantity storage memory 19. Of course, as described with reference to FIG. 4, the variance values Var (P1) and Var (P2) may be obtained using the variance values Var of the neighboring blocks. Then, based on these variance values Var (P1) and Var (P2), the variance value Var of the operation processing target block X is obtained. As the method, for example, these variance values Var (P1) and Var (P2) are obtained. ) Is averaged by weighting according to time intervals T1, (T2-T1) from the operation target picture B2 to the pictures P1, P2 as reference images.

以下同様にして、同じマクロブロック内での全ての演算処理対象ブロックについて分散値Varを求め、先の数2を用いてこの演算処理対象マクロブロックでのアクティビティActを求め、先の数3を基に、演算処理対象マクロブロックでの量子化ステップサイズの重み付け係数Nactを算出し、先の数4を基に、量子化ステップサイズQSを求める。ここで、予測動きベクトルPMVL0を基に得られたアクティビティActをAct_PMVL0、予測動きベクトルPMVL0を基に得られたアクティビティActをAct_PMVL1とすると、先の数式3で量子化ステップサイズの重み付け係数Nactを算出する際に、Act_PMVL0,Act_PMVL1、Act_PMVL0とAct_PMVL1の平均化値やAct_PMVL0とAct_PMVL1の重み付けして加算した値を用いることができる。   In the same manner, the variance value Var is obtained for all the operation processing target blocks in the same macroblock, and the activity Act in this operation processing target macroblock is obtained using the previous equation 2, and the previous equation 3 is used as the basis. Then, the weighting coefficient Nact of the quantization step size in the operation processing target macroblock is calculated, and the quantization step size QS is obtained based on the above equation 4. Here, if the activity Act obtained based on the predicted motion vector PMVL0 is Act_PMVL0, and the activity Act obtained based on the predicted motion vector PMVL0 is Act_PMVL1, the weighting coefficient Nact of the quantization step size is calculated by the above Equation 3. In this case, the average value of Act_PMVL0, Act_PMVL1, Act_PMVL0 and Act_PMVL1, or the value obtained by weighting and adding Act_PMVL0 and Act_PMVL1 can be used.

以上が演算処理対象Bピクチャに対する図2でのステップ104の処理であり、この演算処理対象Bピクチャは参照ピクチャとはならないので(図2のステップ105で“NO”)、上記の求めた分散値Varを特徴量格納メモリ19に格納することなく、求めた量子化ステップサイズQSが量子化制御部13(図1)に送られて量子化部4での量子化ステップサイズの制御が行なわれる。   The above is the processing in step 104 in FIG. 2 for the B picture to be processed, and this B picture to be processed does not become a reference picture (“NO” in step 105 in FIG. 2). Without storing Var in the feature quantity storage memory 19, the obtained quantization step size QS is sent to the quantization control unit 13 (FIG. 1), and the quantization step size is controlled by the quantization unit 4.

以上のように、この第1の実施形態では、P,Bピクチャについて、その参照ピクチャの分散値Varを用いて分散値Varが予測され、これを基に量子化部4の量子化ステップサイズが決められるので、量子化制御に用いる画像の特徴量を算出するための処理量を大幅に削減することができ、画質に実質的に影響を与えることなく、符号化処理の高速化を図ることができる。   As described above, in the first embodiment, for the P and B pictures, the variance value Var is predicted using the variance value Var of the reference picture, and the quantization step size of the quantization unit 4 is based on this. Therefore, the processing amount for calculating the feature amount of the image used for the quantization control can be greatly reduced, and the encoding process can be speeded up without substantially affecting the image quality. it can.

図7は本発明による画像符号化装置及び画像符号化方法の第2の実施形態を示すブロック構成図であって、22は差分情報格納メモリであり、図1に対応する部分には同一符号をつけて重複する説明を省略する。   FIG. 7 is a block diagram showing a second embodiment of the image coding apparatus and image coding method according to the present invention, 22 is a difference information storage memory, and the same reference numerals are given to portions corresponding to FIG. A duplicate description will be omitted.

同図において、この第2の実施形態は、予測符号化方式を、例えば、先の非特許文献2に記載のH.264/AVC規格による符号化方式とし、Iピクチャの予測符号化に際して求められる差分情報を利用して特徴量を求めるようにすることにより、Iピクチャについても、特徴量を算出するための演算処理量も削減することができるようにしたものである。このために、図1に示す第1の実施形態の構成に差分情報格納メモリ22を付加し、求められた差分情報を保存してIピクチャの特徴量を求める演算に利用できるようにする。   In this figure, this second embodiment is obtained when predictive encoding of an I picture is made by using, for example, the encoding method according to the H.264 / AVC standard described in Non-Patent Document 2 above. By calculating the feature amount using the difference information, the calculation processing amount for calculating the feature amount of the I picture can also be reduced. For this purpose, the difference information storage memory 22 is added to the configuration of the first embodiment shown in FIG. 1, and the obtained difference information is stored so that it can be used for the calculation for obtaining the feature amount of the I picture.

以下、Iピクチャの特徴量の算出のための特徴量演算部16の動作について説明する。   Hereinafter, the operation of the feature amount calculation unit 16 for calculating the feature amount of the I picture will be described.

H.264/AVC規格では、Iピクチャの符号化のために、イントラ(フレーム内)予測ブロックと呼ばれる符号化対象ブロックの隣接ブロックの画素値を用いて参照画像を予測生成する処理が行なわれる。H.264/AVC規格では、その予測(イントラ予測)モードとしては、複数種類規定されており、そのいずれかを任意に選択することができる。   In the H.264 / AVC standard, for encoding an I picture, a process of predicting and generating a reference image using a pixel value of a block adjacent to an encoding target block called an intra (intraframe) prediction block is performed. In the H.264 / AVC standard, a plurality of types are defined as the prediction (intra prediction) mode, and any one of them can be arbitrarily selected.

図8はH.264/AVC規格で規定されるイントラ予測モードを示す図である。   FIG. 8 is a diagram showing an intra prediction mode defined by the H.264 / AVC standard.

H.264/AVC規格でのイントラ予測モードは、符号化対象ブロックの周辺ブロックの特定の画素をこの符号化対象ブロックの予測画素とし、この予測画素から決められた方向(これを予測方向という)に配列される符号化対象ブロックでの画素の画素値とその予測画素との差分値を求めることにより、符号化対象ブロックの予測を行なうものである。この予測方向は複数規定されており、そのうちの1つを任意に選択して使用することができる。   In the intra prediction mode in the H.264 / AVC standard, a specific pixel of a peripheral block of an encoding target block is set as a prediction pixel of the encoding target block, and a direction determined from the prediction pixel (this is referred to as a prediction direction) The prediction of the encoding target block is performed by obtaining the difference value between the pixel value of the pixel in the encoding target block and the prediction pixel. A plurality of prediction directions are defined, and one of them can be arbitrarily selected and used.

図8(a)は符号化対象ブロックXを16×16画素からなるマクロブロックとするときの予測モード、即ち、イントラ16×16予測モードを示すものである。かかるイントラ16×16予測モードでは、符号化対象ブロックXとしてのマクロブロックの上側の隣接ブロックとしてのマクロブロック(以下、上側MBという)の最も下側の画素列23aの各画素と左側の隣接ブロックとしてのマクロブロック(以下、左側MBという)の最も右側の画素列23bの各画素とのいずれか一方、もしくは両方が予測画素となる。また、矢印24aは予測方向の1つの例を、矢印24bは予測方向のもう1つの例を夫々示している。   FIG. 8A shows a prediction mode when the encoding target block X is a macroblock having 16 × 16 pixels, that is, an intra 16 × 16 prediction mode. In the intra 16 × 16 prediction mode, each pixel in the lowermost pixel row 23a of the macroblock (hereinafter referred to as upper MB) as the upper adjacent block of the macroblock as the encoding target block X and the adjacent block on the left side As a prediction pixel, either one or both of the pixels in the rightmost pixel row 23b of the macroblock (hereinafter referred to as the left MB). An arrow 24a indicates one example of the prediction direction, and an arrow 24b indicates another example of the prediction direction.

いま、予測方向が、矢印24aに示すように、下方向に選択された場合には、上側MBの画素列23aの16画素が符号化対象ブロックXの予測画素となる。そして、これら予測画素毎に、その予測画素から下方向に配列される符号化対象ブロックXでの画素(即ち、符号化対象画素)全てについて、その画素値とその予測画素の画素値との差分値が算出される。従って、符号化対象ブロックXは、かかる差分値の画素からなるものとなる。かかる予測画素はフレーム内予測メモリ12で作成され、符号化対象ブロックXでの符号化対象画素と該当する予測画素との差分処理は、減算器2で行なわれる。   If the prediction direction is selected in the downward direction as indicated by the arrow 24a, 16 pixels in the upper MB pixel column 23a are prediction pixels of the encoding target block X. For each prediction pixel, the difference between the pixel value and the pixel value of the prediction pixel for all the pixels in the encoding target block X arranged in the downward direction from the prediction pixel (that is, the encoding target pixel). A value is calculated. Therefore, the encoding target block X is composed of pixels having such a difference value. Such a prediction pixel is created in the intra-frame prediction memory 12, and difference processing between the encoding target pixel in the encoding target block X and the corresponding prediction pixel is performed by the subtracter 2.

また、予測方向が、矢印24bに示すように、右方向に選択された場合には、左側MBの画素列23bの16画素が符号化対象ブロックXの予測画素となる。そして、これら予測画素毎に、その予測画素から右方向に配列される符号化対象ブロックXでの符号化対象画素全てについて、その画素値とその予測画素の画素値との差分値が算出される。従って、この場合の符号化対象ブロックXも、かかる差分値の画素からなるものとなる。   When the prediction direction is selected in the right direction as indicated by the arrow 24b, 16 pixels in the left MB pixel column 23b are prediction pixels of the encoding target block X. Then, for each prediction pixel, for all the encoding target pixels in the encoding target block X arranged in the right direction from the prediction pixel, a difference value between the pixel value and the pixel value of the prediction pixel is calculated. . Therefore, the encoding target block X in this case is also composed of pixels having such a difference value.

H.264/AVC規格でのイントラ4×4予測モードまたはイントラ8×8予測モードでは、図8(d)に示すように、予測方向が9通り決められている。即ち、下向き垂直方向の予測方向0(Vertical)、右向きの水平方向の予測方向1(Horizontal)、隣接ブロックの上記特定の画素の画素値の平均値を予測画素の画素値とする予測方向2(DC)、角度π/4左下向きの予測方向3(Diagonal Down Left)、角度π/4右下向きの予測方向4(Diagonal Down Right)、角度3π/8右下向きの予測方向5(Vertical Right)、角度π/8右下向きの予測方向6(Horizontal Down)、角度3π/8左下向きの予測方向7(Vertical Left)及び角度π/8右上向きの予測方向8(Horizontal Up)の9通りである。   In the intra 4 × 4 prediction mode or the intra 8 × 8 prediction mode in the H.264 / AVC standard, nine prediction directions are determined as shown in FIG. That is, the prediction direction 0 (Vertical) in the downward vertical direction, the prediction direction 1 (Horizontal) in the rightward horizontal direction, and the prediction direction 2 (the average value of the pixel values of the specific pixels in the adjacent blocks is the pixel value of the prediction pixel ( DC), angle π / 4 downward prediction direction 3 (Diagonal Down Left), angle π / 4 downward prediction direction 4 (Diagonal Down Right), angle 3π / 8 downward prediction direction 5 (Vertical Right), There are nine types of prediction direction 6 (Horizontal Down) with an angle π / 8 downward to the right, prediction direction 7 (Vertical Left) with an angle 3π / 8 downward to the left, and prediction direction 8 (Horizontal Up) with an angle π / 8 in the upper right direction.

イントラ16×16予測モードでは、そのうちの予測方向0(Vertical),1(Horizontal),2(DC),3(Diagonal Down Left)の4通りの予測方向が規定され、そのうちの1つを任意に選択することができる。従って、イントラ16×16予測方式では、4種類のイントラ予測モードがある。なお、予測方向0(DC)は、符号化対象ブロックXの前画素の画素値の平均値を予測画素の画素値とするものであり、符号化対象ブロックXの全画素がこの予測画素との間で差分値がとられる。   In the intra 16 × 16 prediction mode, four prediction directions of 0 (Vertical), 1 (Horizontal), 2 (DC), and 3 (Diagonal Down Left) are defined, and one of them is arbitrarily selected. You can choose. Therefore, in the intra 16 × 16 prediction method, there are four types of intra prediction modes. In addition, the prediction direction 0 (DC) uses the average value of the pixel values of the previous pixel of the encoding target block X as the pixel value of the prediction pixel, and all the pixels of the encoding target block X have the predicted pixel. The difference value is taken between.

図8(b)は符号化対象ブロックXを4×4画素からなるブロックとするときの予測モード、即ち、イントラ4×4予測モードを示すものである。従って、1マクロブロックが4つの符号化対象ブロックからなる。かかるイントラ4×4予測モードでは、符号化対象ブロックXの上側ブロックの最も下側の画素列の各画素,左側ブロックの最も右側の画素列の各画素,左上側ブロックの右下隅の画素及び右上側ブロックの最も下側の画素列の各画素のいずれかが予測画素となり、予測方向に応じて予測画素が決められる。適用される予測方向は、図8(d)に示す予測方向0〜8の9通りの全てであり、そのうちの1つを任意に選択して用いることができる。従って、イントラ4×4予測モードでは、9種類のイントラ予測モードがある。   FIG. 8B shows a prediction mode when the encoding target block X is a block composed of 4 × 4 pixels, that is, an intra 4 × 4 prediction mode. Therefore, one macro block is composed of four encoding target blocks. In the intra 4 × 4 prediction mode, each pixel in the lowermost pixel column of the upper block of the encoding target block X, each pixel in the rightmost pixel column of the left block, the pixel in the lower right corner of the upper left block, and the upper right pixel One of the pixels in the lowermost pixel column of the side block is a predicted pixel, and the predicted pixel is determined according to the prediction direction. The prediction directions to be applied are all nine prediction directions 0 to 8 shown in FIG. 8D, and one of them can be arbitrarily selected and used. Therefore, in the intra 4 × 4 prediction mode, there are nine types of intra prediction modes.

図8(c)は符号化対象ブロックXを8×8画素からなるブロックとするときの予測モード、即ち、イントラ8×8予測モードを示すものである。従って、1マクロブロックが4つの符号化対象ブロックからなる。かかるイントラ8×8予測モードも、イントラ4×4予測モードと同様であり、図8(d)に示す予測方向0〜8の9通りの予測方向のいずれか1つを任意に選択して使用することができる。従って、イントラ8×8予測モードでも、9種類のイントラ予測モードがある。   FIG. 8C shows a prediction mode when the encoding target block X is a block composed of 8 × 8 pixels, that is, an intra 8 × 8 prediction mode. Therefore, one macro block is composed of four encoding target blocks. The intra 8 × 8 prediction mode is the same as the intra 4 × 4 prediction mode, and any one of nine prediction directions 0 to 8 shown in FIG. 8D is arbitrarily selected and used. can do. Accordingly, there are nine types of intra prediction modes even in the intra 8 × 8 prediction mode.

なお、予測画素値としては、隣接ブロックの上記の画素の画素値に所定の重み付けをしたものであってもよいし、また、平均化したもの(この場合には、全ての予測画素の画素値は等しくなる)であってもよい。   The predicted pixel value may be a value obtained by applying a predetermined weight to the pixel value of the above-mentioned pixel in the adjacent block, or an averaged value (in this case, the pixel value of all the predicted pixels). May be equal).

図7の特徴量演算部16では、演算処理対象Iピクチャに対し、かかるイントラ予測モードによる処理結果を用いて分散値Var,アクティビティActなどを求める。以下、このための処理を図9を用いて説明する。   The feature value calculation unit 16 in FIG. 7 obtains the variance value Var, activity Act, and the like for the calculation target I picture using the processing result in the intra prediction mode. Hereinafter, the process for this is demonstrated using FIG.

原画像メモリ1から減算器2にIピクチャの最初の符号化対象ブロック(16×16画素ブロック,4×4画素ブロックまたは8×8画素ブロック)が供給されると、上記のように、フレーム内予測部12から値「128」の参照画素が減算器2に供給され(図9のステップ201)、この最初の符号化対象ブロックの画素毎に、この値「128」の参照画素との差分値が求められる。この差分値の画素からなる符号化対象ブロックは、直交変換部3に供給されることにより、フレーム内予測符号化されるが、これとともに、この減算器2からの差分値の画素からなる符号化対象ブロックの情報は、差分情報として、差分情報格納メモリ22に格納される(図9のステップ202:なお、差分情報格納メモリ22に格納された差分情報のブロックを、以下、演算処理対象ブロックという)。また、図8で説明したように、隣接ブロックの画素を予測画素として用い、この予測画素との差分を求めることができる符号化対象ブロックにおいては、フレーム内予測部12からかかる予測画素が減算器2に供給され(図2のステップ201)、これとの差分値が画素値となる符号化対象ブロック、従って、演算処理対象ブロックが得られることになり、かかる演算処理対象ブロックが差分情報として差分情報格納メモリ22に格納される(図2のステップ202)。   When the first encoding target block (16 × 16 pixel block, 4 × 4 pixel block, or 8 × 8 pixel block) of the I picture is supplied from the original image memory 1 to the subtracter 2, as described above, A reference pixel having a value “128” is supplied from the prediction unit 12 to the subtractor 2 (step 201 in FIG. 9), and a difference value from the reference pixel having this value “128” is determined for each pixel of the first encoding target block. Is required. The encoding target block composed of pixels of the difference value is supplied to the orthogonal transformation unit 3 and is subjected to intraframe prediction coding. At the same time, the encoding block composed of pixels of the difference value from the subtracter 2 is encoded. The information on the target block is stored as difference information in the difference information storage memory 22 (step 202 in FIG. 9: the block of difference information stored in the difference information storage memory 22 is hereinafter referred to as an operation processing target block. ). Further, as described with reference to FIG. 8, in a coding target block in which a pixel of an adjacent block is used as a prediction pixel and a difference from this prediction pixel can be obtained, the prediction pixel from the intra-frame prediction unit 12 is subtracted. 2 (step 201 in FIG. 2), an encoding target block whose difference value is a pixel value, and therefore an arithmetic processing target block, is obtained. It is stored in the information storage memory 22 (step 202 in FIG. 2).

なお、かかる差分情報の演算処理対象ブロックを求める場合、イントラ(フレーム内)予測モードとしては、図8で説明したいずれのモードを任意に選択して用いることができる。   In addition, when calculating | requiring the calculation process target block of such difference information, any mode demonstrated in FIG. 8 can be selected arbitrarily and used as an intra (intra-frame) prediction mode.

以上のようにして、各演算処理対象ブロックの差分情報が差分情報格納ブロック22(図7)に格納されるが、1つの演算処理対象ブロックの差分情報が差分情報格納メモリ22に格納する毎に、その差分情報が特徴量演算部16(図7)に読み取られ、次の数6、即ち、

Figure 2007228519
As described above, the difference information of each calculation processing target block is stored in the difference information storage block 22 (FIG. 7), but every time the difference information of one calculation processing target block is stored in the difference information storage memory 22. The difference information is read by the feature amount calculation unit 16 (FIG. 7), and the following equation 6,
Figure 2007228519

の演算処理により、この演算処理対象ブロックの分散値Var(n)を求める。ここで、Pn’(x,y)は差分情報の演算処理対象ブロックの位置(x,y)での差分画素値であり、数6は8×8画素のブロックを例として示している。従って、16×16画素のブロック,4×4画素のブロックについても同様である。 In this calculation process, the variance value Var (n) of this calculation process target block is obtained. Here, P n ′ (x, y) is a difference pixel value at the position (x, y) of the calculation processing target block of difference information, and Equation 6 shows an 8 × 8 pixel block as an example. Accordingly, the same applies to a 16 × 16 pixel block and a 4 × 4 pixel block.

このようにして、順次の演算処理対象ブロックについて分散値Var(n)を求め、求めた分散値Var(n)をもとに、上記の数2〜4により、演算処理対象マクロブロック毎に量子化ステップサイズQSを求め、量子化制御部13(図7)に供給する(図9のステップ203)。   In this way, the variance value Var (n) is obtained for the sequential computation processing target blocks, and the quantum value is calculated for each computation processing target macroblock by the above formulas 2 to 4 based on the obtained variance value Var (n). The quantization step size QS is obtained and supplied to the quantization control unit 13 (FIG. 7) (step 203 in FIG. 9).

以上の処理を、Iピクチャ内の全てのマクロブロックが終了するまで繰り返す(図9のステップ204)。   The above processing is repeated until all macroblocks in the I picture are completed (step 204 in FIG. 9).

P,Bピクチャの特徴量の算出については、先の第1の実施形態の場合と同様である。   The calculation of the feature amounts of the P and B pictures is the same as that in the first embodiment.

以上のようにして、この第2の実施形態では、演算処理たいしようブロックの画素と参照画素との差分画素値を用いて特徴量算出するものであるから、処理する情報量を低減できる。   As described above, in the second embodiment, since the feature amount is calculated using the difference pixel value between the pixel of the block to be subjected to the arithmetic processing and the reference pixel, the amount of information to be processed can be reduced.

なお、Iピクチャにおいて、演算処理対象マクロブロックの分散値を1マクロブロックおきに算出し、特徴量格納メモリ19に格納するようにしてもよい。具体的には、演算処理対象マクロブロックの周囲のブロックの分散値が求まっている場合には、フレーム内予測モードの予測方向によって、周囲のブロックのどの分散値を利用するかを決定する。例えば、フレーム内予測モードが予測方向1(Horizontal)(図8)である場合、図8に示すように、予測方向が左から右方へ予測するモードであるため、演算処理対象マクロブロックの左側の隣接ブロックの分散値を用いてアクティビティを算出する。アクティビティの算出には、例えば、上記の数式1,2を用いて算出する。ここで、アクティビティを算出するマクロブロックの分散値を1マクロブロックおきとしたが、これに限らず、複数のマクロブロック毎に行なうようにしてもよい。また、複数のマクロブロック毎に分散値を算出する方法としては、8×8画素単位や4×4画素単位などの複数画素から構成されていれば、どのサイズにも適用できる。また、PピクチャやBピクチャにも適用してもよい。   In addition, in the I picture, the variance value of the macro block to be processed may be calculated every other macro block and stored in the feature amount storage memory 19. Specifically, when the variance value of the surrounding blocks of the calculation target macroblock is obtained, which variance value of the surrounding blocks is determined according to the prediction direction of the intra-frame prediction mode. For example, when the intra-frame prediction mode is the prediction direction 1 (Horizontal) (FIG. 8), as shown in FIG. 8, the prediction direction is a mode predicting from the left to the right. The activity is calculated using the variance value of adjacent blocks. The activity is calculated using, for example, the above formulas 1 and 2. Here, although the variance value of the macroblock for calculating the activity is set to every other macroblock, the present invention is not limited to this and may be performed for each of a plurality of macroblocks. In addition, as a method of calculating a variance value for each of a plurality of macroblocks, any size can be applied as long as it is composed of a plurality of pixels such as an 8 × 8 pixel unit or a 4 × 4 pixel unit. Also, the present invention may be applied to P pictures and B pictures.

図10は本発明による画像符号化装置及び画像符号化方法の第3の実施形態を示すブロック構成図であって、25は特徴量予測処理判定部、26はユーザ入力部、27はシーンチェンジ検出部であり、前出図面に対応する部分には同一符号をつけて重複する説明を省略する。   FIG. 10 is a block diagram showing a third embodiment of the image coding apparatus and image coding method according to the present invention, in which 25 is a feature amount prediction processing determination unit, 26 is a user input unit, and 27 is scene change detection. The same reference numerals are given to the portions corresponding to the above-mentioned drawings, and redundant description is omitted.

この第3の実施形態は、I,P,Bピクチャにおいて、上記第1,第2の実施形態での特徴量算出方法を行なうか否かを選択できるようにしたものである。一般的に、I,P,Bピクチャにおける特徴量の予測精度を高めると、視覚的画質が改善するが、それに伴う演算量も膨大なものとなる。一方、特徴量の予測精度を下げれば、それに伴う演算処理量が少なくなるが、視覚的に画質の劣化が目立ち易くなる。   In the third embodiment, it is possible to select whether or not to perform the feature amount calculation method in the first and second embodiments for I, P, and B pictures. In general, when the prediction accuracy of feature quantities in I, P, and B pictures is increased, the visual image quality is improved, but the amount of computation associated therewith is enormous. On the other hand, if the prediction accuracy of the feature amount is lowered, the amount of calculation processing associated therewith is reduced, but the deterioration of the image quality is easily noticeable visually.

この第3の実施形態は、かかる点を勘案して、特徴量としてアクティビティを例に挙げると、アクティビティ予測処理(先の第1,第2の実施形態のように、分散値を既に符号化されたブロックの分散値から予測して求める処理)を行なうか否かを決めることができるようにしたものである。このために、第1図での第1の実施形態のアクティビティ予測処理を適用するものとすると、この図1示す構成にシーンチェンジ検出部1101、及び特徴量予測処理判定部1102、ユーザ入力部1103が追加された点である。   In this third embodiment, taking this point into consideration, if an activity is taken as an example of the feature amount, an activity prediction process (as in the previous first and second embodiments, the variance value has already been encoded). It is possible to decide whether or not to perform processing obtained by predicting from the variance value of the block. Therefore, if the activity prediction process of the first embodiment in FIG. 1 is applied, the scene change detection unit 1101, the feature amount prediction process determination unit 1102, and the user input unit 1103 are added to the configuration shown in FIG. Is added.

図10において、シーンチェンジ検出部27は、表示タイミング順で前後となるピクチャ間での輝度差分値や輝度のヒストグラムを算出し、表示される画面でシーンチェンジ(場面の切り替え)があるか否かを判定するものである。例えば、かかるピクチャ間での差分値や輝度のヒストグラムがある閾値よりも大きい場合には、シーンチェンジが起こったものと判定する。シーンチェンジが起こった場合には、動き探索精度が低下するため、PピクチャやBピクチャのアクティビティ予測処理を行なわないないように、特徴量予測処理判定部25に指示信号を送る。また、入力画像やフレームレートなどに基づいて、適応的にI,P,Bピクチャのアクティビティ予測処理を行なうか否かを決定し、その決定信号を特徴量予測処理判定部25に送るようにしてもよい。   In FIG. 10, the scene change detection unit 27 calculates a luminance difference value and a luminance histogram between pictures that are before and after in the display timing order, and whether or not there is a scene change (scene switching) on the displayed screen. Is determined. For example, if a difference value between pictures or a histogram of luminance is larger than a certain threshold value, it is determined that a scene change has occurred. When a scene change occurs, the motion search accuracy decreases, so an instruction signal is sent to the feature amount prediction process determination unit 25 so that the activity prediction process for the P picture and B picture is not performed. Also, based on the input image, frame rate, etc., it is determined whether to perform activity prediction processing of I, P, B pictures adaptively, and the determination signal is sent to the feature amount prediction processing determination unit 25. Also good.

図11はこの第3の実施形態の符号化処理でのI,P,Bピクチャの予測選択処理を示すフローチャート図である。以下、この処理について説明する。   FIG. 11 is a flowchart showing prediction selection processing for I, P, and B pictures in the encoding processing according to the third embodiment. Hereinafter, this process will be described.

特徴量予測処理判定部25(図10)では、I,P,Bピクチャのアクティビティ予測処理を行なうか否かを決定するフラグ(以下、特徴量予測処理フラグという)が用意されており、特徴量予測処理フラグが“0”であるときには(図11のステップ301の“YES”)、I,P,Bピクチャのアクティビティ予測処理を行なわずに、図12で示した従来技術と同様、それ自身からアクティビティを算出する(図11のステップ302)。アクティビティの算出法としては、例えば、上記の数式1,2を用いる。一方、特徴量予測処理フラグが“1”のときには(図11のステップ301で“NO”)、先の第1,第2の実施形態のいずれかの方法により、アクティビティ予測処理を行なう(図11のステップ303)。   In the feature amount prediction processing determination unit 25 (FIG. 10), a flag (hereinafter referred to as a feature amount prediction processing flag) for determining whether or not to perform activity prediction processing for I, P, and B pictures is prepared. When the prediction processing flag is “0” (“YES” in step 301 in FIG. 11), the activity prediction processing for I, P, and B pictures is not performed, and itself is performed as in the prior art shown in FIG. The activity is calculated (step 302 in FIG. 11). As an activity calculation method, for example, Equations 1 and 2 are used. On the other hand, when the feature amount prediction processing flag is “1” (“NO” in step 301 of FIG. 11), the activity prediction processing is performed by one of the methods of the first and second embodiments (FIG. 11). Step 303).

このようにして、アクティビティ予測処理によって分散値が求まると、次に、演算処理対象ピクチャが他のPまたはBピクチャの参照ピクチャとなるか否か判定し(図11のステップ304)、参照ピクチャとなるものである場合には(図11のステップ304で“YES”)、その算出された分散値を特徴量格納メモリ19に記憶し(図11のステップ305)、また、この分散値から先の数2〜4に基づいて量子化ステップサイズQSを算出し、該当する符号化対象ブロックの符号化処理を行なう(図11のステップ306)。演算処理対象Bブロックのように、この演算処理対象ピクチャが参照ピクチャとならない場合には、その計算した分散値を特徴量格納メモリ19に格納せず、上記の数2〜4に基づいて量子化ステップサイズQSを算出し、符号化処理を行なう(図11のステップ306)。   In this way, when the variance value is obtained by the activity prediction process, it is next determined whether or not the arithmetic processing target picture becomes a reference picture of another P or B picture (step 304 in FIG. 11). If this is the case (“YES” in step 304 in FIG. 11), the calculated variance value is stored in the feature amount storage memory 19 (step 305 in FIG. 11). A quantization step size QS is calculated based on Equations 2 to 4, and the corresponding encoding target block is encoded (step 306 in FIG. 11). When this calculation processing target picture is not a reference picture as in the calculation processing target B block, the calculated variance value is not stored in the feature amount storage memory 19 but is quantized based on the above formulas 2 to 4. A step size QS is calculated and an encoding process is performed (step 306 in FIG. 11).

以上の処理を、演算処理対象ピクチャ内の全てのマクロブロックに対して終了するまで繰り返す(図11のステップ307)。   The above processing is repeated until all the macroblocks in the calculation target picture are finished (step 307 in FIG. 11).

なお、特徴量予測処理フラグの“1”,“0”の関係は、これに限るものではなく、ON,OFFなど2値判別できるものであれば何でもよい。また、逆の関連付けを行なってもよい。   It should be noted that the relationship between the feature amount prediction processing flags “1” and “0” is not limited to this and may be anything as long as binary discrimination such as ON and OFF can be performed. Further, reverse association may be performed.

特徴量予測処理フラグの切り替え単位は、例えば、マクロブロック,スライス,フレーム,シーケンス単位がある。また、ピクチャの予測処理を行なうか否かの判定をユーザが任意に行なうようにしてもよい。この場合には、装置の構成としては、図10に示すように、ユーザ入力部26が追加される。ユーザ入力部では、ユーザから入力された演算処理対象ピクチャのアクティビティ予測処理を行なうか否かの命令を受け取り、特徴量予測処理フラグを立てるか(予測処理を行なう)、立てないかの信号を特徴量予測処理判定部25へ送る。   The switching unit of the feature amount prediction processing flag includes, for example, a macro block, a slice, a frame, and a sequence unit. Further, the user may arbitrarily determine whether or not to perform a picture prediction process. In this case, as a configuration of the apparatus, a user input unit 26 is added as shown in FIG. The user input unit receives an instruction on whether or not to perform an activity prediction process on a calculation target picture input by a user, and sets a signal indicating whether or not to set a feature amount prediction process flag (perform a prediction process) or not This is sent to the quantity prediction process determination unit 25.

この第3の実施形態のかかる構成によると、例えば、HD(高品位)画像などの大きな画像を符号化処理する場合、I,P,Bピクチャにおけるアクティビティ予測処理を行なうことにより、その処理時間を短縮することができる。逆に、処理演算量が少ないQCIF(Quarter Common Intermediate Format:1/4共通中間フォーマット)画像などの小さい画像を符号化する場合には、I,P,Bピクチャの全てまたはいずれかのピクチャに対して、原画像(それ自身の画像)からアクティビティを直接算出して精度の高い処理を行なうことができる。同様に、高性能の符号化処理装置、即ち、短時間で多くのブロックを処理できる符号化装置においても、I,P,Bピクチャの全てに対して、原画像からアクティビティを直接算出して、精度の高い処理を行なうことができる。   According to the configuration of the third embodiment, for example, when encoding a large image such as an HD (high definition) image, the processing time is reduced by performing an activity prediction process for I, P, and B pictures. It can be shortened. On the other hand, when encoding a small image such as a QCIF (Quarter Common Intermediate Format) image with a small amount of processing calculation, all or any of the I, P, and B pictures are encoded. Thus, highly accurate processing can be performed by directly calculating the activity from the original image (its own image). Similarly, even in a high-performance encoding processing apparatus, that is, an encoding apparatus that can process many blocks in a short time, the activity is directly calculated from the original image for all of the I, P, and B pictures, Highly accurate processing can be performed.

以上のように、この第3の実施形態では、入力画像のサイズや符号化装置の性能に応じて、予測効率と演算負荷とのトレードオフを制御することで自由度の高い映像の符号化を実現できる。   As described above, in the third embodiment, video with a high degree of freedom is encoded by controlling the trade-off between prediction efficiency and calculation load according to the size of the input image and the performance of the encoding device. realizable.

なお、図10に示す第3の実施形態は、図1に示す構成にシーンチェンジ検出部27,特徴量予測処理判定部25及びユーザ入力部26を追加したものとしたが、図1に示す構成にシーンチェンジ検出部27,特徴量予測処理判定部25及びユーザ入力部26を追加したものとしたものとしてもよく、これにより、アクティビティ予測処理を第2の実施形態のように行なうことができる。   In the third embodiment shown in FIG. 10, the scene change detection unit 27, the feature amount prediction process determination unit 25, and the user input unit 26 are added to the configuration shown in FIG. Further, the scene change detection unit 27, the feature amount prediction process determination unit 25, and the user input unit 26 may be added, so that the activity prediction process can be performed as in the second embodiment.

次に、本発明による画像符号化装置及び画像符号化方法の第4の実施形態について説明する。   Next, a fourth embodiment of the image encoding device and the image encoding method according to the present invention will be described.

この第4の実施形態は、図1または図7に示す構成において、アクティビティ予測処理を例に挙げると、特徴量格納メモリ19に分散値以外の情報も格納するようにしたものである。   In the fourth embodiment, in the configuration shown in FIG. 1 or FIG. 7, taking the activity prediction process as an example, information other than the variance value is also stored in the feature amount storage memory 19.

図1,図7,図10において、先の数式1で求められた分散値をそのまま特徴量格納メモリ19に記憶すると、メモリ容量が多くなってしまうといった問題が生じる。そこで、例えば、8×8画素のブロック単位で求めた分散値Varを数式2〜4で演算処理して量子化ステップサイズQSに変換し、この量子化ステップサイズQSを特徴量格納メモリ19に記憶することにより、特徴量格納メモリ19の使用容量を削減する。   In FIG. 1, FIG. 7, and FIG. 10, if the variance value obtained by Equation 1 is stored in the feature quantity storage memory 19 as it is, a problem arises that the memory capacity increases. Therefore, for example, the variance value Var obtained in units of blocks of 8 × 8 pixels is calculated by Expressions 2 to 4 and converted into a quantization step size QS, and this quantization step size QS is stored in the feature amount storage memory 19. By doing so, the used capacity of the feature amount storage memory 19 is reduced.

即ち、IまたはPピクチャで算出された量子化ステップサイズQSを特徴量格納メモリ19に格納し、この量子化ステップサイズQSを利用してPまたはBピクチャの量子化ステップサイズQSの値を予測する。このような処理を行なうことにより、特徴量格納メモリ19に記憶される情報が8×8画素毎の分散値情報から16×16画素毎の量子化ステップサイズQSのパラメータ情報になるので、特徴量格納メモリ19の使用容量が大幅に削減されることになる。   That is, the quantization step size QS calculated for the I or P picture is stored in the feature amount storage memory 19, and the quantization step size QS of the P or B picture is predicted using this quantization step size QS. . By performing such processing, the information stored in the feature amount storage memory 19 becomes the parameter information of the quantization step size QS for each 16 × 16 pixels from the variance value information for each 8 × 8 pixels. The used capacity of the storage memory 19 is greatly reduced.

また、画素値を量子化ステップサイズQSを変更するパラメータを特徴量格納メモリ19に記憶してもよい。例えば、符号化対象ピクチャの画像領域がエッジ部である場合、画質劣化が目立たないようにするため、量子化パラメータを小さくするようにして画質の劣化を防ぐ。その際、上記数式4に示す量子化ステップサイズQSを小さく変更するが、どの程度小さく変更するのかを決定するパラメータを特徴量格納メモリ19に記憶する。例えば、シーケンスやピクチャ,フレーム単位で算出される量子化ステップサイズQSを基準量子化ステップサイズとし、この規準量子化ステップサイズを1/2倍,1/3倍にするときには、その分母の係数2,3を上記の特徴量格納メモリ19に記憶するパラメータとする。即ち、量子化ステップサイズQSを特徴量格納メモリ19に格納する場合よりも、その使用容量を大幅に削減することができる。なお、かかるパラメータは、エッジ検出部において、エッジが存在するか否かかの2値判別フラグなどを適用してもよい。   Further, a parameter for changing the pixel value quantization step size QS may be stored in the feature amount storage memory 19. For example, when the image area of the encoding target picture is an edge portion, the quantization parameter is reduced to prevent the deterioration of the image quality so that the deterioration of the image quality is not noticeable. At this time, the quantization step size QS shown in the above Equation 4 is changed to a smaller value, but a parameter for determining how much the change is made is stored in the feature amount storage memory 19. For example, when the quantization step size QS calculated in units of sequences, pictures, and frames is used as the reference quantization step size, and the reference quantization step size is ½ times or 3 times, the denominator coefficient 2 , 3 are parameters stored in the feature quantity storage memory 19. That is, the used capacity can be greatly reduced as compared with the case where the quantization step size QS is stored in the feature amount storage memory 19. The parameter may be a binary determination flag indicating whether or not an edge exists in the edge detection unit.

また、特徴量格納メモリ19に、演算処理対象画像に前処理フィルタなどによって高周波成分をカットするなどの前処理を施した後の画素値を記憶してもよい。例えば、上記MPEG-2 TM5量子化制御方式を用いた場合、視覚的に劣化の目立ち易いエッジ部では、分散値が大きくなるため、上記数式4に示すように、量子化パラメータQPに大きく重み付けされ、荒く量子化されることになる。そのため、エッジ部の劣化が目立ちやすくなる。また、低ビットレートで符号化する際には、必然的に量子化ステップサイズが荒くなり、ブロック歪みが増えて視覚的に違和感が起こるといった問題が生じる。   In addition, the feature value storage memory 19 may store pixel values after performing preprocessing such as cutting high-frequency components on the calculation target image using a preprocessing filter or the like. For example, when the MPEG-2 TM5 quantization control method is used, the dispersion value becomes large at an edge portion that is visually noticeable for deterioration, so that the quantization parameter QP is heavily weighted as shown in Equation 4 above. It will be roughly quantized. For this reason, the deterioration of the edge portion becomes conspicuous. Also, when encoding at a low bit rate, the quantization step size becomes inevitably rough, and there is a problem that the block distortion increases and visually uncomfortable.

そこで、エッジ検出器を用いて、符号化対象の画像領域がエッジ部と判定された際には、中高域通過フィルタを適用することにより、この画像のエッジ部をシャープにする処理を施す。そのフィルタ適用後の画素値を特徴量格納メモリ19に記憶する。具体的には、エッジ検出の際に、Sobel演算(マトリクス処理によるエッジ検出)などの処理を適用し、その領域がエッジ部であるかの判定を行ない、その領域がエッジ部と判定された場合には、中高域通過フィルタをその領域に適用して画像のエッジ部を強調する。即ち、IまたはPピクチャにおいて、上記のエッジ検出やフィルタ処理を適用し、フィルタ適用後の画素値を特徴量格納メモリ19に記憶し、その記憶されたフィルタ適用後の画素値情報に基づいて、PまたはBピクチャのフィルタ適用後の画素値を予測することにより、P,Bピクチャにおける上記エッジ検出やフィルタ演算などの膨大な処理量を大幅に削減することができる。なお、上記のフィルタは、中高域通過フィルタのほかにも、低域通過フィルタなど様々なフィルタを適用することができる。   Therefore, when the image region to be encoded is determined to be an edge portion using an edge detector, a process for sharpening the edge portion of the image is performed by applying a mid-high pass filter. The pixel value after applying the filter is stored in the feature amount storage memory 19. Specifically, when edge detection is performed, processing such as Sobel calculation (edge detection by matrix processing) is applied to determine whether the area is an edge, and the area is determined to be an edge. First, a mid-high pass filter is applied to the region to enhance the edge portion of the image. That is, in the I or P picture, the above-described edge detection or filter processing is applied, the pixel value after the filter application is stored in the feature amount storage memory 19, and based on the stored pixel value information after the filter application, By predicting the pixel value after applying the filter for the P or B picture, it is possible to greatly reduce the enormous amount of processing such as the edge detection and the filter operation in the P and B pictures. Note that various filters such as a low-pass filter can be applied to the above-described filter in addition to the medium-high pass filter.

以上、本発明の実施形態について説明したが、これら実施形態1〜4では、常に画像入力の単位をフレームとして説明してきた。しかし、これに限らず、インタレース画像の入力を想定すして、画像入力をフィールドとする場合においても、上記実施形態を適用することができる。また、特徴量の算出において、8×8画素のブロック単位で処理する例を示したが、16×16画素のマクロブロックや4×4画素のブロック、あるいはその他の画素数のブロックを単位として処理を行なうようにしてもよい。また、上記のピクチャ単位の符号化処理の代わりに、スライス単位でもよい。また、I,P,Bピクチャを利用する全ての符号化方式で適用できる。   Although the embodiments of the present invention have been described above, in the first to fourth embodiments, the unit of image input has always been described as a frame. However, the present embodiment is not limited to this, and the above embodiment can be applied even when an input of an interlaced image is assumed and the image input is a field. Moreover, in the calculation of the feature amount, an example in which processing is performed in units of 8 × 8 pixel blocks has been shown. May be performed. Further, instead of the above-mentioned picture unit encoding process, a slice unit may be used. Further, the present invention can be applied to all coding schemes using I, P, and B pictures.

また、本発明は、インターネットや携帯電話などによる動画像情報の伝送、光ディスクや光磁気ディスク,フラッシュメモリなどの記録媒体への動画像情報の記録などに適用できる。   Further, the present invention can be applied to transmission of moving image information via the Internet or a mobile phone, and recording of moving image information on a recording medium such as an optical disk, a magneto-optical disk, or a flash memory.

本発明による画像符号化装置の第1の実施形態を示すブロック構成図である。It is a block block diagram which shows 1st Embodiment of the image coding apparatus by this invention. 図1に示す第1の実施形態での量子化ステップサイズの設定のための処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process for the setting of the quantization step size in 1st Embodiment shown in FIG. 図2におけるPピクチャの特徴量予測処理に用いる動きベクトル情報の算出方法の一具体例を示す図である。It is a figure which shows one specific example of the calculation method of the motion vector information used for the feature-value prediction process of the P picture in FIG. 図2におけるS104での演算処理対象ブロックXの分散値を求める方法の一具体例を示す図である。It is a figure which shows one specific example of the method of calculating | requiring the dispersion value of the calculation process target block X in S104 in FIG. 図2のステップ104でのBピクチャの特徴量予測処理に用いる動きベクトルの算出方法の一具体例を示す図である。It is a figure which shows one specific example of the calculation method of the motion vector used for the feature-value prediction process of the B picture in step 104 of FIG. 図2のステップ104でのBピクチャの特徴量予測処理に用いる動きベクトルの算出方法の他の具体例を示す図である。It is a figure which shows the other specific example of the calculation method of the motion vector used for the feature-value prediction process of the B picture in step 104 of FIG. 本発明による画像符号化装置及び画像符号化方法の第2の実施形態を示すブロック構成図である。It is a block block diagram which shows 2nd Embodiment of the image coding apparatus and image coding method by this invention. 図7に示す第2の実施形態で用いられるIピクチャのイントラ予測方法を示す図である。It is a figure which shows the intra prediction method of the I picture used in 2nd Embodiment shown in FIG. 図7に示す第2の実施形態のフレーム内予測モードでの量子化ステップサイズの設定のための処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process for the setting of the quantization step size in the prediction mode in a frame of 2nd Embodiment shown in FIG. 本発明による画像符号化装置及び画像符号化方法の第3の実施形態を示すブロック構成図である。It is a block block diagram which shows 3rd Embodiment of the image coding apparatus and image coding method by this invention. 図10に示す第3の実施形態の符号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the encoding process of 3rd Embodiment shown in FIG. 従来の画像符号化装置の一例を示すブロック構成図である。It is a block block diagram which shows an example of the conventional image coding apparatus. マクロブロックにおける符号化対象ブロックの一例を示す図である。It is a figure which shows an example of the encoding object block in a macroblock.

符号の説明Explanation of symbols

1 原画像メモリ
2 減算器
3 直交変換部
4 量子化部
5 符号化部
6 送信バッファ
7 逆量子化部
8 逆直交変換部
9 加算器
10 フレームメモリ
11 動き検出・動き補償部
12 フレーム内予測部
13 量子化制御部
20 演算処理対象マクロブロック
21 参照画像
22 差分情報格納メモリ
23a,23b 隣接ブロック
24a,24b 予測方向を示す矢印
25 特徴量予測処理判定部
26 ユーザ入力部
27 シーンチェンジ検出部
DESCRIPTION OF SYMBOLS 1 Original image memory 2 Subtractor 3 Orthogonal transformation part 4 Quantization part 5 Encoding part 6 Transmission buffer 7 Inverse quantization part 8 Inverse orthogonal transformation part 9 Adder 10 Frame memory 11 Motion detection and motion compensation part 12 Intra-frame prediction part DESCRIPTION OF SYMBOLS 13 Quantization control part 20 Operation process object macroblock 21 Reference image 22 Difference information storage memory 23a, 23b Adjacent block 24a, 24b Arrow which shows a prediction direction 25 Feature-value prediction process determination part 26 User input part 27 Scene change detection part

Claims (15)

一連のピクチャからなる動画像情報を符号化する画像符号化装置であって、
符号化するピクチャの特徴量を算出する特徴量演算手段と、
特徴量の算出の際の分散値を格納する特徴量格納手段と、
符号化するピクチャの特徴量を、該特徴量格納手段に格納されている該分散値を基に算出する特徴量予測手段と
を備えたことを特徴とする画像符号化装置。
An image encoding device that encodes moving image information including a series of pictures,
A feature amount calculating means for calculating a feature amount of a picture to be encoded;
Feature quantity storage means for storing a variance value at the time of calculating the feature quantity;
An image encoding apparatus comprising: a feature amount prediction unit that calculates a feature amount of a picture to be encoded based on the variance value stored in the feature amount storage unit.
請求項1において、
前記特徴量演算手段で前記特徴量が算出される前記ピクチャは、画面内予測符号化されるIピクチャであり、
前記特徴量予測手段で前記特徴量が算出される前記ピクチャは、画面間予測符号化されるPピクチャとBピクチャであって、
該Pピクチャの分散値が、前記特徴量格納手段に格納されている既に符号化された該Iピクチャまたは該Pピクチャの分散値を基に、前記特徴量予測手段で算出され、算出された該分散値が前記特徴量格納手段に格納され、
該Bピクチャの分散値が、前記特徴量格納手段に格納されている既に符号化された該Iピクチャや該Pピクチャの特徴量を基に、前記特徴量予測手段で算出され、前記特徴量格納手段への格納が禁止されることを特徴とする画像符号化装置。
In claim 1,
The picture for which the feature amount is calculated by the feature amount calculating means is an I picture to be subjected to intra-screen predictive coding,
The pictures for which the feature amount is calculated by the feature amount prediction means are a P picture and a B picture that are inter-screen predictively encoded,
A variance value of the P picture is calculated by the feature amount prediction unit based on the variance value of the already encoded I picture or the P picture stored in the feature amount storage unit. A variance value is stored in the feature quantity storage means,
A variance value of the B picture is calculated by the feature amount prediction unit based on the already encoded feature values of the I picture and the P picture stored in the feature amount storage unit, and stored in the feature amount storage An image encoding apparatus characterized in that storage in the means is prohibited.
請求項2において、
前記特徴量演算手段は、前記Iピクチャをブロック分割し、該ブロック毎に、該ブロックの各画素の画素値に基づいて、前記分散値を生成することを特徴とする画像符号化装置。
In claim 2,
The image coding apparatus according to claim 1, wherein the feature amount calculating unit divides the I picture into blocks and generates the variance value for each block based on a pixel value of each pixel of the block.
請求項2において、
前記Iピクチャをブロック分割し、該ブロック毎に該Iピクチャ内の参照画像との差分値を画素とする手段を有し、
前記特徴量演算手段は、該ブロック毎に、該差分値の画素値に基づいて、前記分散値を生成することを特徴とする画像符号化装置。
In claim 2,
Means for dividing the I picture into blocks, and for each block, a difference value from a reference image in the I picture is used as a pixel;
The image coding apparatus according to claim 1, wherein the feature amount calculation means generates the variance value for each block based on the pixel value of the difference value.
請求項2,3または4において、
前記特徴量予測手段は、前記P,Bピクチャをブロック分割し、該ブロック毎に、該ブロックに対する参照ブロックとなる前記特徴量格納手段のIまたはPピクチャのブロック、もしくはその周辺ブロックの分散値に基づいて、分散値を生成することを特徴とする画像符号化装置。
In claim 2, 3 or 4,
The feature amount predicting means divides the P and B pictures into blocks, and for each block, the feature value predicting means is used as a reference block for the block, to the variance value of the block of the I or P picture of the feature amount storage means or its peripheral blocks. An image coding apparatus that generates a variance value based on the image data.
請求項2〜5のいずれか1つにおいて、
前記特徴量演算手段で算出される前記特徴量は、前記Iピクチャが符号化されるときの量子化ステップサイズであり、
前記特徴量予測手段で算出される前記特徴量は、前記P,Bピクチャが符号化されるときの量子化ステップサイズであることを特徴とする画像符号化装置。
In any one of Claims 2-5,
The feature amount calculated by the feature amount calculation means is a quantization step size when the I picture is encoded,
The image coding apparatus according to claim 1, wherein the feature quantity calculated by the feature quantity prediction unit is a quantization step size when the P and B pictures are coded.
請求項5または6において、
前記特徴予測手段は、前記Pピクチャの符号化するブロック毎に、
該ブロックの周辺の既に符号化されたプロックの動きベクトルを基に動きベクトルを予測し、
該動きベクトルを基に前記IまたはPピクチャの前記参照ブロックを予測し、
予測された前記参照ブロックもしくはその周辺ブロックの分散値を前記特徴量格納手段から取得して該符号化するブロックの分散値を求める
ことを特徴とする画像符号化装置。
In claim 5 or 6,
The feature predicting means, for each block to be encoded of the P picture,
Predict a motion vector based on the motion vector of the already encoded block around the block;
Predicting the reference block of the I or P picture based on the motion vector;
An image coding apparatus characterized in that a predicted variance value of the reference block or its neighboring blocks is obtained from the feature amount storage means to obtain a variance value of a block to be encoded.
請求項5,6または7において、
前記特徴予測手段は、前記Bピクチャの符号化するブロック毎に、
前記Bブロックに表示順で前方のIまたはPピクチャに対する前方予測動きベクトルと前記Bブロックに表示順で後方のPピクチャに対する後方予測動きベクトルとを予測し、
該前方予測動きベクトルに基づいて該前方のIまたはPピクチャでの前方の前記参照ブロックを予測し、該後方予測動きベクトルに基づいて該後方のPピクチャでの後方の前記参照ブロックを予測し、
該前方の前記参照ブロックまたはその周辺ブロックの分散値と該後方の前記参照ブロックまたはその周辺ブロックの分散値とを前記特徴量格納手段から取得して該符号化するブロックの分散値を求める
ことを特徴とする画像符号化装置。
In claim 5, 6 or 7,
The feature predicting means, for each block to be encoded of the B picture,
Predicting a forward prediction motion vector for a forward I or P picture in display order in the B block and a backward prediction motion vector for a backward P picture in display order in the B block;
Predicting the forward reference block in the forward I or P picture based on the forward predicted motion vector, predicting the backward reference block in the backward P picture based on the backward predicted motion vector;
Obtaining a variance value of the block to be encoded by obtaining a variance value of the front reference block or its peripheral block and a variance value of the reference block or its surrounding block from the feature amount storage means. An image encoding device.
請求項1〜8のいずれか1つにおいて、
特徴量予測手段で特徴量を予測するか否かを判定する特徴量予測処理判定手段を設け、
該特徴量予測処理判定手段により、特徴量予測手段で特徴量を予測しないと判定されたときには、前記特徴量演算手段で特徴量を算出し、その算出に際しての前記分散値を前記特徴量格納手段に格納することを特徴とする画像符号化装置。
In any one of Claims 1-8,
A feature amount prediction process determination unit for determining whether or not the feature amount prediction unit predicts a feature amount is provided,
When it is determined by the feature amount prediction processing determination unit that the feature amount prediction unit does not predict the feature amount, the feature amount calculation unit calculates a feature amount, and the variance value at the time of the calculation is used as the feature amount storage unit. An image encoding apparatus characterized by being stored in
請求項9において、
動画像のシーンチェンジを検出するシーンチェンジ検出手段を設け、
シーンチェンジしたピクチャに対して、前記特徴量予測処理判定手段に特徴量予測手段で特徴量を予測しないと判定させることを特徴とする画像符号化装置。
In claim 9,
A scene change detection means for detecting a scene change of a moving image is provided,
An image coding apparatus characterized by causing a feature amount prediction processing determination unit to determine that a feature amount is not predicted by a feature amount prediction unit for a scene-changed picture.
請求項1〜10のいずれか1つにおいて、
前記分散値から求めた量子化ステップサイズの情報を、前記分散値に代えて、前記特徴量格納手段に格納することを特徴とする画像符号化装置。
In any one of Claims 1-10,
An image encoding apparatus, wherein information of a quantization step size obtained from the variance value is stored in the feature amount storage means instead of the variance value.
請求項1〜10のいずれか1つにおいて、
前記特徴量格納手段に符号化の対象となるピクチャに前処理を施した後の画素値を格納することを特徴とする画像符号化装置。
In any one of Claims 1-10,
An image encoding apparatus, wherein the feature value storage means stores a pixel value after pre-processing a picture to be encoded.
請求項12において、
前記前処理は、画像のエッジ部を強調する処理であることを特徴とする画像符号化装置。
In claim 12,
The image coding apparatus according to claim 1, wherein the preprocessing is processing for enhancing an edge portion of an image.
I,P,Bピクチャの一連のピクチャからなる動画像情報を符号化する画像符号化方法であって、
該Iピクチャの符号化の際、該Iピクチャの特徴量を算出して格納し、
該P,Bピクチャを符号化する際には、その特徴量を格納されている特徴量に基づいて算出し、該Pピクチャの算出された該特徴量を格納して保持する
ことを特徴とする画像符号化方法。
An image encoding method for encoding moving image information composed of a series of I, P, and B pictures,
When encoding the I picture, the feature amount of the I picture is calculated and stored,
When encoding the P and B pictures, the feature amount is calculated based on the stored feature amount, and the calculated feature amount of the P picture is stored and held. Image coding method.
請求項14において、
前記格納される特徴量は、前記I,P,Bピクチャの分割されたブロック毎に算出される分散値であって、
該分散値から、前記I,P,Bピクチャの符号化の際の量子化ステップサイズを決める情報が算出されることを特徴とする画像符号化方法。
In claim 14,
The stored feature amount is a variance value calculated for each divided block of the I, P, and B pictures,
An image encoding method, wherein information for determining a quantization step size at the time of encoding the I, P, and B pictures is calculated from the variance value.
JP2006050225A 2006-02-27 2006-02-27 Image encoding device and image encoding method Pending JP2007228519A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006050225A JP2007228519A (en) 2006-02-27 2006-02-27 Image encoding device and image encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006050225A JP2007228519A (en) 2006-02-27 2006-02-27 Image encoding device and image encoding method

Publications (1)

Publication Number Publication Date
JP2007228519A true JP2007228519A (en) 2007-09-06

Family

ID=38549838

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006050225A Pending JP2007228519A (en) 2006-02-27 2006-02-27 Image encoding device and image encoding method

Country Status (1)

Country Link
JP (1) JP2007228519A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009177353A (en) * 2008-01-22 2009-08-06 Canon Inc Encoder, method of controlling the same, and computer program
JP2009268064A (en) * 2008-04-28 2009-11-12 Mitsubishi Electric Research Laboratories Inc Method for compressing sar data and apparatus for encoding sar data
JP2010141883A (en) * 2008-12-10 2010-06-24 Nvidia Corp Measurement-based and scalable deblock filtering of image data
WO2016152446A1 (en) * 2015-03-25 2016-09-29 Nttエレクトロニクス株式会社 Moving image encoding device
JP2020500448A (en) * 2016-10-13 2020-01-09 エーティーアイ・テクノロジーズ・ユーエルシーAti Technologies Ulc Determining the variance of an image block based on the motion vector
JP7356549B1 (en) 2022-07-22 2023-10-04 Nttイノベーティブデバイス株式会社 Image encoding device and image encoding method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009177353A (en) * 2008-01-22 2009-08-06 Canon Inc Encoder, method of controlling the same, and computer program
JP2009268064A (en) * 2008-04-28 2009-11-12 Mitsubishi Electric Research Laboratories Inc Method for compressing sar data and apparatus for encoding sar data
JP2010141883A (en) * 2008-12-10 2010-06-24 Nvidia Corp Measurement-based and scalable deblock filtering of image data
WO2016152446A1 (en) * 2015-03-25 2016-09-29 Nttエレクトロニクス株式会社 Moving image encoding device
JP2016184801A (en) * 2015-03-25 2016-10-20 Nttエレクトロニクス株式会社 Moving image encoding device
US11432005B2 (en) 2015-03-25 2022-08-30 Ntt Electronics Corporation Moving image encoding device
JP2020500448A (en) * 2016-10-13 2020-01-09 エーティーアイ・テクノロジーズ・ユーエルシーAti Technologies Ulc Determining the variance of an image block based on the motion vector
US11445214B2 (en) 2016-10-13 2022-09-13 Ati Technologies Ulc Determining variance of a block of an image based on a motion vector for the block
JP7150706B2 (en) 2016-10-13 2022-10-11 エーティーアイ・テクノロジーズ・ユーエルシー Determining the variance of a block of an image based on its motion vector
JP7356549B1 (en) 2022-07-22 2023-10-04 Nttイノベーティブデバイス株式会社 Image encoding device and image encoding method

Similar Documents

Publication Publication Date Title
JP6261660B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
AU2015213341B2 (en) Video decoder, video encoder, video decoding method, and video encoding method
US8665960B2 (en) Real-time video coding/decoding
US8098731B2 (en) Intraprediction method and apparatus using video symmetry and video encoding and decoding method and apparatus
US8428136B2 (en) Dynamic image encoding method and device and program using the same
US8588301B2 (en) Image coding apparatus, control method therefor and computer program
JP2007067469A (en) In-frame prediction coding control method, in-frame prediction coding control apparatus, in-frame prediction coding control program, and recording medium recorded with the program
US8189667B2 (en) Moving picture encoding apparatus
JP2007329693A (en) Image encoding device and method
JP4774315B2 (en) Image decoding apparatus and image decoding method
JP2015103970A (en) Dynamic image encoding device, dynamic image encoding method, dynamic image encoding program and dynamic image capturing device
JP2007228519A (en) Image encoding device and image encoding method
JP2013115583A (en) Moving image encoder, control method of the same, and program
WO2012165428A1 (en) Video encoding device
JP4857243B2 (en) Image encoding apparatus, control method therefor, and computer program
JP4829951B2 (en) Intraframe predictive coding control method, intraframe predictive coding control apparatus, intraframe predictive coding control program, and computer-readable recording medium storing the program
KR100728032B1 (en) Method for intra prediction based on warping
JP6080726B2 (en) Moving picture encoding apparatus, intra prediction mode determination method, and program
JP2008099175A (en) Video coder, and video coding method
Ren et al. A fast feature-assisted adaptive early termination approach for multiple reference frames motion estimation in H. 264
JP2014135552A (en) Dynamic image encoder, dynamic image decoder, dynamic image encoding method, and dynamic image decoding method
JP5521859B2 (en) Moving picture coding apparatus and method
JP2014179918A (en) Moving image encoder, control method thereof, and imaging apparatus
Xu et al. A refined motion estimation strategy for adaptive interpolation filter
JP2010074347A (en) Device and method for encoding moving image