JP2008283481A - Image processor, and method thereof - Google Patents

Image processor, and method thereof Download PDF

Info

Publication number
JP2008283481A
JP2008283481A JP2007125956A JP2007125956A JP2008283481A JP 2008283481 A JP2008283481 A JP 2008283481A JP 2007125956 A JP2007125956 A JP 2007125956A JP 2007125956 A JP2007125956 A JP 2007125956A JP 2008283481 A JP2008283481 A JP 2008283481A
Authority
JP
Japan
Prior art keywords
prediction
prediction mode
block
encoded
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007125956A
Other languages
Japanese (ja)
Other versions
JP4921240B2 (en
JP2008283481A5 (en
Inventor
Osamu Itokawa
修 糸川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2007125956A priority Critical patent/JP4921240B2/en
Publication of JP2008283481A publication Critical patent/JP2008283481A/en
Publication of JP2008283481A5 publication Critical patent/JP2008283481A5/ja
Application granted granted Critical
Publication of JP4921240B2 publication Critical patent/JP4921240B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce an operation amount required to determine a predictive mode of an in-frame predictive coding. <P>SOLUTION: When encoding a frame of a moving image in a block unit, predictive image generating parts 201 to 209 generate a plurality of predictive images respectively corresponding to a plurality of predictive modes in the case of performing in-frame predictive coding of a block of an encoding object. Pixel selecting parts 211 to 219 acquire the value of a pixel of a position corresponding to each predictive mode from the block of the encoding object and a plurality of predictive images. SAD (sum of absolute difference) calculating parts 221 to 229 calculate an evaluation value showing a difference between pixel values. A predictive mode determining part 210 sets a predictive mode of the block of the encoding object on the basis of evaluation values respectively corresponding to the plurality of predictive modes. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、動画像の符号化に関する。   The present invention relates to video encoding.

動画像の符号化方式としてMPEG-2 (ISO/IEC 13818)が蓄積、通信、放送などの分野で普及している。近年は、MPEG系の新しい符号化方式として、H.264/MPEG-4 AVC (ISO/IEC 14496-10)が標準化され、その普及が期待されている(以下、H.264)。   MPEG-2 (ISO / IEC 13818) is widely used as a moving image encoding method in the fields of storage, communication, and broadcasting. In recent years, H.264 / MPEG-4 AVC (ISO / IEC 14496-10) has been standardized as a new MPEG encoding method and is expected to be widely used (hereinafter referred to as H.264).

H.264の符号化装置は、動画像のフレームをフレーム内予測符号化する場合のイントラ予測の方式として、様々な予測モードを用意し、複数の予測モードの中から最適な予測モードを選ぶことで、従来よりも高い符号化効率を得ることができる。以下では、予測モードの種類と、予測画像の生成方法について説明する。   The H.264 encoding device prepares various prediction modes as an intra prediction method when intra-frame predictive encoding of a moving image frame, and selects an optimal prediction mode from a plurality of prediction modes. Thus, higher encoding efficiency than before can be obtained. Below, the kind of prediction mode and the production | generation method of a prediction image are demonstrated.

予測画像は、画面内の既に符号化済みのデータから、局所的に復号した画像を用いて生成する。符号化は、画面の左上から右下に向かって、ブロック単位で行うので、対象ブロックの予測画像生成に利用可能な画素は、対象ブロックの左側や上側などのブロックの復号画像になる。   The predicted image is generated using a locally decoded image from already encoded data in the screen. Since encoding is performed in units of blocks from the upper left to the lower right of the screen, the pixels that can be used for generating the predicted image of the target block are decoded images of blocks such as the left side and the upper side of the target block.

図1は予測画像を生成するために用いられる隣接ブロックを示す図で、斜線部が予測画像の生成対象のブロック、ブロックA、B、C、Dが局所復号した参照可能なブロックの画像である。   FIG. 1 is a diagram showing adjacent blocks used for generating a predicted image, in which the shaded portion is a block that is a generation target of the predicted image, and blocks A, B, C, and D are locally decoded images that can be referred to .

図2はH.264の4×4画素ブロックの符号化における、予測の方向ごとの九種類の予測モードを示す図である。予測モードごとに、どの参照画素を用いて予測画像を生成するのかが定義されている。   FIG. 2 is a diagram showing nine types of prediction modes for each prediction direction in encoding of a H.264 4 × 4 pixel block. For each prediction mode, it is defined which reference pixel is used to generate a prediction image.

図3は各予測モードと予測画素値の関係を説明する図で、画素a〜pは、予測画像として生成される各画素の位置を示し、画素A〜Mは、予測画像の生成に利用する参照画素を示す。   FIG. 3 is a diagram for explaining the relationship between each prediction mode and the predicted pixel value. Pixels a to p indicate the positions of the pixels generated as the predicted image, and pixels A to M are used to generate the predicted image. Reference pixels are shown.

予測モード0は垂直(vertical)予測で、予測画像の各画素を以下のように生成する。
a, e, i, m:A
b, f, j, n:B
c, g, k, o:C
d, h, l, p:D …(1)
The prediction mode 0 is vertical prediction, and each pixel of the prediction image is generated as follows.
a, e, i, m: A
b, f, j, n: B
c, g, k, o: C
d, h, l, p : D… (1)

予測モード1は水平(horizontal)予測で、予測画像の各画素を以下のように生成する。
a, b, c, d:I
e, f, g, h:J
i, j, k, l:K
m, n, o, p:L …(2)
The prediction mode 1 is horizontal prediction, and each pixel of the predicted image is generated as follows.
a, b, c, d: I
e, f, g, h: J
i, j, k, l: K
m, n, o, p: L… (2)

予測モード2は、図2には示されないが、DC成分の予測で、予測画像の各画素を以下のように生成する。なお「≫」はビットシフトを表し、「≫ x」はxビット右シフトする、言い換えれば1/2xにすることを意味する。
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p:(A+B+C+D+I+J+K+L+4) ≫ 3 …(3)
Although the prediction mode 2 is not shown in FIG. 2, each pixel of the predicted image is generated as follows in the prediction of the DC component. “>>” represents a bit shift, and “>> x” means right shift by x bits, in other words, 1/2 x .
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p: (A + B + C + D + I + J + K + L + 4 ) ≫ 3… (3)

予測モード3は斜め左下(diagonal_down_left)予測で、予測画像の各画素を以下のように生成する。
a:(A+2B+C+2) ≫ 2
b, e:(B+2C+D+2) ≫ 2
c, f, i:(C+2D+E+2) ≫ 2
d, g, j, m:(D+2E+F+2) ≫ 2
h, k, n:(E+2F+G+2) ≫ 2
l, o:(F+2G+H+2) ≫ 2
p:(G+3H+2) ≫ 2 …(4)
Prediction mode 3 is diagonal lower left (diagonal_down_left) prediction, and each pixel of the predicted image is generated as follows.
a : (A + 2B + C + 2) ≫ 2
b, e: (B + 2C + D + 2) ≫ 2
c, f, i: (C + 2D + E + 2) ≫ 2
d, g, j, m: (D + 2E + F + 2) ≫ 2
h, k, n: (E + 2F + G + 2) ≫ 2
l, o: (F + 2G + H + 2) ≫ 2
p : (G + 3H + 2) ≫ 2… (4)

予測モード4は斜め右下(diagonal_down_right)予測で、予測画像の各画素を以下のように生成する。
m:(J+2K+L+2) ≫ 2
i, n:(I+2J+K+2) ≫ 2
e, j, o:(M+2I+J+2) ≫ 2
a, f, k, p:(A+2M+I+2) ≫ 2
b, g, l:(M+2A+B+2) ≫ 2
c, h:(A+2B+C+2) ≫ 2
d:(B+2C+D+2) ≫ 2 …(5)
Prediction mode 4 is diagonally lower right (diagonal_down_right) prediction, and each pixel of the predicted image is generated as follows.
m: (J + 2K + L + 2) ≫ 2
i, n: (I + 2J + K + 2) ≫ 2
e, j, o: (M + 2I + J + 2) ≫ 2
a, f, k, p: (A + 2M + I + 2) ≫ 2
b, g, l: (M + 2A + B + 2) ≫ 2
c, h: (A + 2B + C + 2) ≫ 2
d : (B + 2C + D + 2) ≫ 2… (5)

予測モード5は斜めやや右下(diagonal_vertical_right)予測で、予測画像の各画素を以下のように生成する。
a, j:(M+A+1) ≫ 1
b, k:(A+B+1) ≫ 1
c, l:(B+C+1) ≫ 1
d:(C+D+1) ≫ 1
e, n:(I+2M+A+2) ≫ 2
f, o:(M+2A+B+2) ≫ 2
g, p:(A+2B+C+2) ≫ 2
h:(B+2C+D+2) ≫ 2
i:(M+2I+J+2) ≫ 2
m:(I+2J+K+2) ≫ 2 …(6)
The prediction mode 5 is diagonally lower right (diagonal_vertical_right) prediction, and each pixel of the predicted image is generated as follows.
a, j: (M + A + 1) ≫ 1
b, k: (A + B + 1) ≫ 1
c, l: (B + C + 1) ≫ 1
d : (C + D + 1) ≫ 1
e, n: (I + 2M + A + 2) ≫ 2
f, o: (M + 2A + B + 2) ≫ 2
g, p: (A + 2B + C + 2) ≫ 2
h: (B + 2C + D + 2) ≫ 2
i : (M + 2I + J + 2) ≫ 2
m : (I + 2J + K + 2) ≫ 2… (6)

予測モード6は水平やや下(horizontal_down)予測で、予測画像の各画素を以下のように生成する。
a, g:(M+I+1) ≫ 1
b, h:(I+2M+A+2) ≫ 2
c:(M+2A+B+2) ≫ 2
d:(A+2B+C+2) ≫ 2
e, k:(I+J+1) ≫ 1
f, l:(M+2I+J+2) ≫ 2
i, o:(J+K+1) ≫ 1
j, p:(I+2J+K+2) ≫ 2
m:(K+L+1) ≫ 1
n:(J+2K+L+2) ≫ 2 …(7)
The prediction mode 6 is horizontal slightly down (horizontal_down) prediction, and each pixel of the predicted image is generated as follows.
a, g : (M + I + 1) ≫ 1
b, h: (I + 2M + A + 2) ≫ 2
c: (M + 2A + B + 2) ≫ 2
d : (A + 2B + C + 2) ≫ 2
e, k: (I + J + 1) ≫ 1
f, l: (M + 2I + J + 2) ≫ 2
i, o: (J + K + 1) ≫ 1
j, p: (I + 2J + K + 2) ≫ 2
m: (K + L + 1) ≫ 1
n : (J + 2K + L + 2) ≫ 2… (7)

予測モード7は斜めやや左下(diagonal_vertical_left)予測で、予測画像の各画素を以下のように生成する。
a:(A+B+1) ≫ 1
b, i:(B+C+1) ≫ 1
c, j:(C+D+1) ≫ 1
d, k:(D+E+1) ≫ 1
l:(E+F+1) ≫ 1
e:(A+2B+C+2) ≫ 2
f, m:(B+2C+D+2) ≫ 2
g, n:(C+2D+E+2) ≫ 2
h, o:(D+2E+F+2) ≫ 2
p:(E+2F+G+2) ≫ 2 …(8)
The prediction mode 7 is diagonally lower left (diagonal_vertical_left) prediction, and each pixel of the predicted image is generated as follows.
a : (A + B + 1) ≫ 1
b, i: (B + C + 1) ≫ 1
c, j: (C + D + 1) ≫ 1
d, k: (D + E + 1) ≫ 1
l : (E + F + 1) ≫ 1
e: (A + 2B + C + 2) ≫ 2
f, m: (B + 2C + D + 2) ≫ 2
g, n: (C + 2D + E + 2) ≫ 2
h, o: (D + 2E + F + 2) ≫ 2
p: (E + 2F + G + 2) ≫ 2… (8)

予測モード8は、水平やや上(horizontal_up)予測で、予測画像の各画素を以下のように生成する。
a:(I+J+1) ≫ 1
b:(I+2J+K+2) ≫ 2
c, e:(J+K+1) ≫ 1
d, f:(J+2K+L+2) ≫ 2
g, i:(K+L+1) ≫ 1
h, j:(K+3L+2) ≫ 2
k, l, m, n, o, p:L …(9)
The prediction mode 8 is horizontal slightly up (horizontal_up) prediction, and each pixel of the predicted image is generated as follows.
a : (I + J + 1) ≫ 1
b : (I + 2J + K + 2) ≫ 2
c, e: (J + K + 1) ≫ 1
d, f: (J + 2K + L + 2) ≫ 2
g, i : (K + L + 1) ≫ 1
h, j: (K + 3L + 2) ≫ 2
k, l, m, n, o, p: L… (9)

このように、4×4画素ブロックの予測モードは九種類ある。九種類すべての予測モードについて予測画像を生成し、評価値を求め、その中から最適な予測モードを決定するには、演算量が多く、処理負担が大きい問題がある。   Thus, there are nine types of prediction modes for 4 × 4 pixel blocks. In order to generate prediction images for all nine types of prediction modes, obtain evaluation values, and determine an optimal prediction mode from them, there is a problem that the amount of calculation is large and the processing load is large.

処理負荷を緩和する方法として、特許文献1は次の方法を開示する。つまり、九種類のモードを、水平方向に相関があるものと、垂直方向に相関があるものの二種類に分類する。そして、予測画像の生成対象ブロックがどちらに属するかを、水平方向の差分和と垂直方向の差分和の比較から検出する。しかし、この方法においても、水平・垂直の何れを選択しても、さらに、六種類の予測モードについて予測画像を生成して、最適な予測モードを決定することになる。つまり、演算量を充分に削減することはできない。   As a method of reducing the processing load, Patent Document 1 discloses the following method. That is, nine types of modes are classified into two types, those having a correlation in the horizontal direction and those having a correlation in the vertical direction. Then, it is detected from the comparison of the difference sum in the horizontal direction and the difference sum in the vertical direction to which the generation target block of the predicted image belongs. However, also in this method, regardless of whether horizontal or vertical is selected, prediction images are generated for six types of prediction modes, and the optimal prediction mode is determined. That is, the amount of calculation cannot be reduced sufficiently.

特開2004-304724公報JP2004-304724

本発明は、フレーム内予測符号化の予測モードの決定に必要な演算量を削減することを目的とする。   An object of the present invention is to reduce the amount of calculation required for determining a prediction mode of intraframe prediction encoding.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

本発明にかかる動画像のフレームをブロック単位に符号化する画像処理は、符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像を生成し、前記符号化対象のブロックと前記複数の予測画像から各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算し、前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定することを特徴とする。   The image processing for encoding the frame of the moving image according to the present invention in units of blocks generates a plurality of prediction images corresponding to a plurality of prediction modes when the block to be encoded is subjected to intraframe prediction encoding, Obtain a pixel value at a position corresponding to each prediction mode from the encoding target block and the plurality of prediction images, calculate an evaluation value indicating a difference between the pixel values, and correspond to each of the plurality of prediction modes The prediction mode of the block to be encoded is set based on the evaluation value to be encoded.

また、符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像について、各予測モードに応じた位置の画素を生成し、前記符号化対象のブロックと前記複数の予測画像の前記各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算し、前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定し、前記設定された予測モードの予測画像を生成することを特徴とする。   Further, for a plurality of prediction images corresponding to each of a plurality of prediction modes when the block to be encoded is intra-frame predictively encoded, a pixel at a position corresponding to each prediction mode is generated, and the block to be encoded Based on evaluation values corresponding to each of the plurality of prediction modes, obtaining pixel values at positions corresponding to the respective prediction modes of the plurality of prediction images, calculating evaluation values indicating differences between the pixel values. A prediction mode of the block to be encoded is set, and a prediction image of the set prediction mode is generated.

また、符号化対象のブロックに隣接する複数の符号化済みブロックの予測モード情報を取得し、前記予測モード情報が示す予測モードによって、前記符号化対象のブロックをフレーム内予測符号化する場合の第一の予測画像を生成し、前記符号化対象のブロックと前記第一の予測画像の対応する画素値の間の差分を示す第一の評価値を計算し、前記第一の評価値に基づき、前記予測モード情報が示す予測モードを選択し、前記選択された予測モードの予測方向に隣接する予測方向をもつ予測モードによって、前記符号化対象のブロックをフレーム内予測符号化する場合の第二の予測画像を生成し、前記符号化対象のブロックと前記第二の予測画像の対応する画素値の間の差分を示す第二の評価値を計算し、前記第一および第二の評価値に基づき、前記符号化対象のブロックの予測モードを設定することを特徴とする。   In addition, when the prediction mode information of a plurality of encoded blocks adjacent to the block to be encoded is acquired, and the block to be encoded is subjected to intraframe prediction encoding according to the prediction mode indicated by the prediction mode information. Generating one predicted image, calculating a first evaluation value indicating a difference between a corresponding pixel value of the block to be encoded and the first predicted image, and based on the first evaluation value, When the prediction mode indicated by the prediction mode information is selected, and the prediction target having the prediction direction adjacent to the prediction direction of the selected prediction mode is used for intra-frame prediction encoding of the block to be encoded A prediction image is generated, a second evaluation value indicating a difference between corresponding pixel values of the encoding target block and the second prediction image is calculated, and based on the first and second evaluation values. Z , And sets the prediction mode of the block of the encoding target.

また、動画像のフレームをブロック単位に符号化する画像処理方法であって、符号化対象のブロックの所定画素の値を取得し、前記所定画素の値の組み合わせに基づき、前記符号化ブロックをフレーム内予測符号化する場合の予測モードを設定することを特徴とする。   An image processing method for encoding a frame of a moving image in units of blocks, wherein a value of a predetermined pixel of a block to be encoded is acquired, and the encoded block is framed based on a combination of the values of the predetermined pixel. It is characterized by setting a prediction mode in the case of intra prediction encoding.

また、動画像のフレームをブロック単位に符号化する画像処理方法であって、符号化対象のブロックの所定画素の値を取得し、前記所定画素の値の組み合わせに基づき、前記符号化ブロックをフレーム内予測符号化する場合の複数の予測モードを選択し、前記複数の予測モードそれぞれに対応する複数の予測画像を生成し、前記符号化対象のブロックと前記複数の予測画像の対応する画素値の間の差分を示す評価値を計算し、前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定することを特徴とする。   An image processing method for encoding a frame of a moving image in units of blocks, wherein a value of a predetermined pixel of a block to be encoded is acquired, and the encoded block is framed based on a combination of the values of the predetermined pixel. Selecting a plurality of prediction modes when performing intra prediction encoding, generating a plurality of prediction images corresponding to each of the plurality of prediction modes, and corresponding pixel values of the block to be encoded and the plurality of prediction images An evaluation value indicating a difference between them is calculated, and a prediction mode of the block to be encoded is set based on an evaluation value corresponding to each of the plurality of prediction modes.

本発明によれば、フレーム内予測符号化の予測モードの決定に必要な演算量を削減することができる。   According to the present invention, it is possible to reduce the amount of calculation required for determining the prediction mode of intraframe prediction encoding.

以下、本発明にかかる実施例の画像処理を図面を参照して詳細に説明する。なお、以下では、4×4画素のブロックを説明するが、16×16画素のブロックや8×8画素のブロックにおいても同様に処理することができる。   Hereinafter, image processing according to an embodiment of the present invention will be described in detail with reference to the drawings. In the following, a 4 × 4 pixel block will be described, but the same processing can be applied to a 16 × 16 pixel block and an 8 × 8 pixel block.

[装置の構成]
図4は実施例の符号化装置の構成例を示すブロック図である。符号化装置は、符号化ブロックに分割された動画像のフレームを、ブロック単位にH.264方式で符号化する。
[Device configuration]
FIG. 4 is a block diagram illustrating a configuration example of the encoding apparatus according to the embodiment. The encoding device encodes a frame of a moving image divided into encoded blocks in H.264 format on a block basis.

減算器1001は、符号化対象のフレーム(以下、現フレーム)の符号化対象のブロック(以下、現ブロック)の画像と、予測画像の差分を計算して、差分画像を出力する。直交変換(DCT)部1002は、差分画像を直交変換する。量子化部1003は、直交変換係数を量子化する。可変長符号化部1004は、ハフマン符号化や算術符号化を使用して、量子化された直交変換係数から符号を生成する。   The subtractor 1001 calculates a difference between an image of a block to be encoded (hereinafter referred to as the current block) of a frame to be encoded (hereinafter referred to as the current frame) and a predicted image, and outputs a difference image. An orthogonal transform (DCT) unit 1002 performs orthogonal transform on the difference image. The quantization unit 1003 quantizes the orthogonal transform coefficient. The variable length coding unit 1004 generates a code from the quantized orthogonal transform coefficient using Huffman coding or arithmetic coding.

予測画像の生成には、既に符号化したデータを局所的に復号した画像(以下、局所復号画像)を用いる。逆量子化部1006は、量子化された直交変換係数を逆量子化する。逆DCT部1007は、逆量子化によって得られた直交変換係数を逆DCTして、局所復号画像を生成する。加算器1017は、フレーム間予測符号化の場合、逆DCT部1007が出力する画像と、予測画像を加算する。ブロック歪除去部1011は、ブロック歪と呼ばれる量子化ステップが大きい場合に発生し易い視覚的な劣化を抑制する。上記の復号処理は、ローカルデコードとも呼ばれる。フレームメモリ(FM)1013は、ローカルデコードした画像を一時記憶する。   For generation of a predicted image, an image obtained by locally decoding already encoded data (hereinafter referred to as a locally decoded image) is used. The inverse quantization unit 1006 inversely quantizes the quantized orthogonal transform coefficient. The inverse DCT unit 1007 performs inverse DCT on the orthogonal transform coefficient obtained by inverse quantization to generate a locally decoded image. The adder 1017 adds the image output from the inverse DCT unit 1007 and the predicted image in the case of inter-frame predictive coding. The block distortion removing unit 1011 suppresses visual degradation that easily occurs when the quantization step called block distortion is large. The above decoding process is also called local decoding. A frame memory (FM) 1013 temporarily stores locally decoded images.

イントラ予測部1010は、フレーム内予測符号化のイントラ予測用に、現ブロックの画像と、FM 1013から現ブロックの近傍に位置する局所復号画像を入力して、予測画像を生成する。動き補償部1012は、フレーム間予測符号化用に、現ブロックの画像と、FM 1013から現フレーム近傍のフレームのローカルデコード画像を入力し、ブロック間におけるオブジェクトの相対的な動き量(以下、動きベクトル)を算出し、予測画像を生成する。   The intra prediction unit 1010 receives an image of the current block and a locally decoded image located in the vicinity of the current block from the FM 1013 for intra prediction of intraframe prediction encoding, and generates a prediction image. The motion compensation unit 1012 receives an image of the current block and a local decoded image of a frame in the vicinity of the current frame from the FM 1013 for inter-frame prediction encoding, and the relative motion amount (hereinafter referred to as motion) of the object between the blocks. Vector) and a predicted image is generated.

可変長符号化部1004は、符号化を行う際、イントラ予測におけるモード判定や、フレーム間予測における動きベクトルなどの付加情報も併せて符号化する。バッファ部1014は、発生する符号量を監視し、その状態をレート制御部1015に出力するとともに、所定の伝送レートで符号を出力する。レート制御部1015は、発生符号量>目標値の場合は粗い量子化を行う量子化ステップを量子化部1003に設定し、発生符号量<目標値の場合は細かい量子化を行う量子化ステップを量子化部1003に設定して、発生符号量を制御する。   When performing encoding, the variable length encoding unit 1004 also encodes additional information such as mode determination in intra prediction and motion vectors in interframe prediction. The buffer unit 1014 monitors the amount of generated code, outputs the state to the rate control unit 1015, and outputs a code at a predetermined transmission rate. The rate control unit 1015 sets a quantization step for performing coarse quantization in the quantization unit 1003 when the generated code amount> target value, and performs a quantization step for performing fine quantization when the generated code amount <target value. The generated code amount is controlled by setting in the quantization unit 1003.

モード判定部1005は、現フレームをフレーム内予測符号化するか、フレーム間予測符号化するかを判定し、判定結果に応じてスイッチ1008と1009を制御する。フレーム内予測符号化するイントラピクチャ(Iピクチャ)の場合、スイッチ1009を介してイントラ予測部1010の予測画像が減算器1001に入力される。また、スイッチ1008はオープンである。一方、フレーム間予測符号化する予測ピクチャ(Pピクチャ)または双方向予測ピクチャ(Bピクチャ)の場合、スイッチ1009を介して、動き補償部1012の予測画像が減算器1001に入力される。また、スイッチ1008を介して、動き補償部1012の予測画像が加算器1017に入力される。   The mode determination unit 1005 determines whether the current frame is subjected to intraframe prediction encoding or interframe prediction encoding, and controls the switches 1008 and 1009 according to the determination result. In the case of an intra picture (I picture) to be subjected to intraframe prediction encoding, a prediction image of the intra prediction unit 1010 is input to the subtractor 1001 via the switch 1009. The switch 1008 is open. On the other hand, in the case of a prediction picture (P picture) or a bidirectional prediction picture (B picture) to be subjected to interframe prediction encoding, a prediction image of the motion compensation unit 1012 is input to the subtractor 1001 via the switch 1009. Also, the predicted image of the motion compensation unit 1012 is input to the adder 1017 via the switch 1008.

このように、H.264方式は、フレーム内符号化およびフレーム間予測符号化ともに、現ブロックの画像と予測画像のブロックの画像の差分画像を符号化することになる。   As described above, the H.264 method encodes the difference image between the current block image and the predicted image block image in both intra-frame coding and inter-frame prediction coding.

図11は符号化装置をコンピュータ装置2000で実現する例を説明するブロック図である。   FIG. 11 is a block diagram illustrating an example in which the encoding apparatus is realized by the computer apparatus 2000.

CPU 2002は、RAM 2004をワークメモリとして、ROM 2003やハードディスクドライブ(HDD) 2008に格納されたオペレーティングシステム(OS)や各種プログラムを実行する。そして、システムバス2001を介して後述する各種構成を制御するとともに、実施例の符号化装置としての機能を実現するプログラムを実行することにより、図4に示す符号化装置として機能する。   The CPU 2002 executes an operating system (OS) and various programs stored in the ROM 2003 and the hard disk drive (HDD) 2008 using the RAM 2004 as a work memory. Then, various components to be described later are controlled via the system bus 2001, and the program for realizing the function as the encoding device of the embodiment is executed, thereby functioning as the encoding device shown in FIG.

ネットワークインタフェイス(I/F) 2005は、ネットワーク2010とのインタフェイスである。入力装置2006は、例えばマウスやキーボード、あるいは、ビデオカメラなどの映像入力機器である。出力装置2007は、モニタや各種記録メディアに映像を記録する記録装置である。   A network interface (I / F) 2005 is an interface with the network 2010. The input device 2006 is a video input device such as a mouse, a keyboard, or a video camera. The output device 2007 is a recording device that records video on a monitor or various recording media.

コンピュータ装置2000は、入力装置2006から入力されるビデオデータ、または、HDD 2008に格納されたビデオデータを符号化して、出力装置2007に出力したり、ネットワーク2010を介してサーバやクライアントに伝送する。   The computer device 2000 encodes video data input from the input device 2006 or video data stored in the HDD 2008 and outputs the encoded data to the output device 2007 or transmits it to the server or client via the network 2010.

[イントラ予測部]
図5はイントラ予測部1010の構成例を示すブロック図である。
[Intra prediction section]
FIG. 5 is a block diagram illustrating a configuration example of the intra prediction unit 1010.

予測画像生成部201〜209はそれぞれ、局所復号画像から予測モード0〜8の予測画像を生成する。つまり、九種類の予測モードに対応する九つの予測画像(以下、予測画像0〜8)を生成する。   Prediction image generation units 201 to 209 generate prediction images of prediction modes 0 to 8 from local decoded images, respectively. That is, nine predicted images (hereinafter, predicted images 0 to 8) corresponding to the nine types of prediction modes are generated.

画素選択部211〜219はそれぞれ、現ブロックの画素(入力画素)と、予測画像0〜8の対応する画素(予測画素)の選択を行う。SAD算出部221〜229はそれぞれ、入力画素と選択画素の差分絶対値和(sum of absolute difference: SAD)を計算し、対応する画素間のSADの総和または平均値を評価値とする。   The pixel selectors 211 to 219 respectively select a pixel (input pixel) of the current block and a corresponding pixel (predicted pixel) of the predicted images 0 to 8. Each of the SAD calculation units 221 to 229 calculates the sum of absolute differences (SAD) between the input pixel and the selected pixel, and uses the sum or average value of the SADs between corresponding pixels as an evaluation value.

評価値は、現ブロックの画像と予測画像の間の誤差を示す値であればどのようなものでもよく、例えば、入力画素と予測画素の差分二乗和でもよい。さらに精度を高めるには、差分値を直交変換した変換係数で比較したり、変換係数を量子化した場合の発生符号量を予測値で比較してもよい。   The evaluation value may be any value as long as it indicates an error between the current block image and the predicted image. For example, the evaluation value may be the sum of squares of the difference between the input pixel and the predicted pixel. In order to further increase the accuracy, the difference values may be compared with transform coefficients obtained by orthogonal transform, or the generated code amounts when the transform coefficients are quantized may be compared with predicted values.

図6は画素選択部211〜219が選択する画素の位置を示す図である。矢印は予測の方向を示す。   FIG. 6 is a diagram illustrating pixel positions selected by the pixel selection units 211 to 219. Arrows indicate the direction of prediction.

予測モード0用の画素選択部211は、図6(a)に示す画素(図3に示す画素m、n、o、p)を選択する。予測モード1用の画素選択部212は、図6(b)に示す画素(図3に示す画素d、h、l、p)を選択する。予測モード2用の画素選択部213は、図6(c)に示す画素(図3に示す画素a、d、m、p)を選択する。予測モード3用の画素選択部214は、図6(d)に示す画素(図3に示す画素i、m、n、o)を選択する。予測モード4用の画素選択部215は、図6(e)に示す画素(図3に示す画素h、l、n、o)を選択する。予測モード5用の画素選択部216は、図6(f)に示す画素(図3に示す画素h、n、o、p)を選択する。予測モード6用の画素選択部217は、図6(g)に示す画素(図3に示す画素h、l、n、p)を選択する。予測モード7用の画素選択部218は、図6(h)に示す画素(図3に示す画素e、m、n、o)を選択する。予測モード8用の画素選択部219は、図6(i)に示す画素(図3に示す画素b、c、d、h)を選択する。   The pixel selection unit 211 for the prediction mode 0 selects the pixels shown in FIG. 6A (pixels m, n, o, and p shown in FIG. 3). The pixel selection unit 212 for the prediction mode 1 selects the pixels shown in FIG. 6B (pixels d, h, l, and p shown in FIG. 3). The pixel selection unit 213 for the prediction mode 2 selects the pixels shown in FIG. 6C (pixels a, d, m, and p shown in FIG. 3). The pixel selection unit 214 for the prediction mode 3 selects the pixels shown in FIG. 6D (pixels i, m, n, and o shown in FIG. 3). The pixel selection unit 215 for the prediction mode 4 selects the pixels shown in FIG. 6E (pixels h, l, n, and o shown in FIG. 3). The pixel selection unit 216 for the prediction mode 5 selects the pixels shown in FIG. 6 (f) (pixels h, n, o, and p shown in FIG. 3). The pixel selection unit 217 for the prediction mode 6 selects the pixels shown in FIG. 6G (pixels h, l, n, and p shown in FIG. 3). The pixel selection unit 218 for the prediction mode 7 selects the pixels shown in FIG. 6 (h) (pixels e, m, n, and o shown in FIG. 3). The pixel selection unit 219 for the prediction mode 8 selects the pixels shown in FIG. 6 (i) (pixels b, c, d, and h shown in FIG. 3).

つまり、画素選択部211〜219はそれぞれ四画素を選択して評価値を計算するから、全画素を選択して評価値を計算する場合に比べて、各SAD算出部221〜229の計算量は1/4に削減される。   That is, since the pixel selection units 211 to 219 each select four pixels and calculate the evaluation value, the calculation amount of each of the SAD calculation units 221 to 229 is smaller than when all the pixels are selected and the evaluation value is calculated. Reduced to 1/4.

なお、画素選択部211〜219が選択する画素の数は図6に示すように四つずつに制限されるわけではない。評価精度は選択する画素の数に比例する。また、選択画素の位置も制約はないが、予測モードの予測方向に対して、予測画像の生成に用いる画素(図6に丸印○で示す画素)からより遠い位置にある画素を選択する方が、評価精度が高くなると考えられる。そこで、図6には、最も遠い位置にある画素を選択する例を示した。   Note that the number of pixels selected by the pixel selectors 211 to 219 is not limited to four as shown in FIG. Evaluation accuracy is proportional to the number of pixels to be selected. In addition, although the position of the selected pixel is not limited, it is possible to select a pixel farther from the pixel used to generate the predicted image (the pixel indicated by a circle in FIG. 6) with respect to the prediction direction of the prediction mode. However, it is considered that the evaluation accuracy becomes high. Therefore, FIG. 6 shows an example in which the pixel at the farthest position is selected.

また、すべての予測モードにおいて選択する画素の数を四つずつとしたが、予測モードごとに変えても構わない。ただし、予測モードによって選択する画素の数が異なる場合は、SADを選択画素数で割り、一画素当りの平均値を求めるか、SADに選択画素数に応じた重み係数を乗じるなど、評価値の重みを一致させる処置を行う。   Moreover, although the number of pixels to be selected in all the prediction modes is four, it may be changed for each prediction mode. However, if the number of pixels to be selected differs depending on the prediction mode, the evaluation value of SAD is divided by the number of selected pixels and an average value per pixel is obtained, or SAD is multiplied by a weighting factor according to the number of selected pixels. Take action to match the weights.

予測モード判定部210は、SAD算出部221〜229から九つの評価値を入力し、評価値が最小の予測モードを判定し、判定結果を出力する。セレクタ220は、予測モード判定部210の判定結果に応じて、予測画像生成部201〜209の予測画像の何れかを選択的に出力する。   The prediction mode determination unit 210 receives nine evaluation values from the SAD calculation units 221 to 229, determines a prediction mode with the smallest evaluation value, and outputs a determination result. The selector 220 selectively outputs one of the prediction images of the prediction image generation units 201 to 209 according to the determination result of the prediction mode determination unit 210.

図7はイントラ予測部1010の動作を説明するフローチャートである。   FIG. 7 is a flowchart for explaining the operation of the intra prediction unit 1010.

イントラ予測部1010は、局所復号画像を入力し(S301)、現ブロックの画像を入力する(S302)。そして、カウンタiを0に初期設定する(S303)。   The intra prediction unit 1010 inputs a locally decoded image (S301), and inputs an image of the current block (S302). Then, the counter i is initialized to 0 (S303).

次に、イントラ予測部1010は、予測モードiに対応する予測画像生成部により予測画像を生成する(S304)。そして、予測モードiに対応する画素選択部により、予測モードiにおける評価値計算用の画素を選択する(S305)。そして、予測モードiに対応するSAD算出部により、予測モードiにおける評価量を計算する(S306)。   Next, the intra prediction unit 1010 generates a predicted image by the predicted image generation unit corresponding to the prediction mode i (S304). Then, a pixel for evaluation value calculation in the prediction mode i is selected by the pixel selection unit corresponding to the prediction mode i (S305). Then, the evaluation amount in the prediction mode i is calculated by the SAD calculation unit corresponding to the prediction mode i (S306).

次に、イントラ予測部1010は、i<8か否かを判定する(S307)。i<8の場合は、iをインクリメントし(S308)、処理をステップS304に戻す。また、i=8の場合は、全予測モードにおける評価値が求まったので、予測モード判定部210により、評価値が最小の予測モードを選択し(S309)、セレクタ220により、選択した予測モードの予測画像を選択的に出力する。   Next, the intra prediction unit 1010 determines whether i <8 (S307). If i <8, i is incremented (S308), and the process returns to step S304. Further, when i = 8, since the evaluation values in all prediction modes are obtained, the prediction mode determination unit 210 selects the prediction mode with the smallest evaluation value (S309), and the selector 220 selects the prediction mode selected. Predictive images are selectively output.

このように、本実施例は、まず、符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像を生成する。そして、符号化対象のブロックと複数の予測画像から各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算する。そして、複数の予測モードそれぞれに対応する評価値に基づき、符号化対象のブロックの予測モードを設定することで、予測モードを決定するための演算量を削減することができる。   As described above, in this embodiment, first, a plurality of prediction images corresponding to a plurality of prediction modes in the case where intra-frame prediction encoding is performed on a block to be encoded are generated. And the value of the pixel of the position according to each prediction mode is acquired from the block to be encoded and a plurality of prediction images, and the evaluation value indicating the difference between the pixel values is calculated. Then, the calculation amount for determining the prediction mode can be reduced by setting the prediction mode of the block to be encoded based on the evaluation value corresponding to each of the plurality of prediction modes.

以下、本発明にかかる実施例2の画像処理を説明する。なお、実施例2において、実施例1と略同様の構成については、同一符号を付して、その詳細説明を省略する。   The image processing according to the second embodiment of the present invention will be described below. Note that the same reference numerals in the second embodiment denote the same parts as in the first embodiment, and a detailed description thereof will be omitted.

図8は実施例2のイントラ予測部1010の構成例を示すブロック図である。   FIG. 8 is a block diagram illustrating a configuration example of the intra prediction unit 1010 according to the second embodiment.

画素選択部401〜409はそれぞれ、現ブロックの画素(入力画素)と、局所復号画像0〜8の対応する画素の選択を行う。予測画像生成部411〜419は、画素選択部401〜409が選択した画素位置のみの予測画像を局所復号画像から生成する。   The pixel selection units 401 to 409 respectively select a pixel (input pixel) of the current block and a corresponding pixel of the local decoded images 0 to 8. Prediction image generation units 411 to 419 generate prediction images of only pixel positions selected by pixel selection units 401 to 409 from the locally decoded image.

予測モード0に対応する予測画像生成部411は次式により予測画像を生成する。
m:A
n:B
o:C
p:D …(10)
The predicted image generation unit 411 corresponding to the prediction mode 0 generates a predicted image according to the following equation.
m: A
n: B
o: C
p: D… (10)

予測モード1に対応する予測画像生成部412は次式により予測画像を生成する。
d:I
h:J
l:K
p:L …(11)
The predicted image generation unit 412 corresponding to the prediction mode 1 generates a predicted image by the following equation.
d: I
h: J
l: K
p: L (11)

予測モード2に対応する予測画像生成部413は次式により予測画像を生成する。
a, d, m, p:(A+B+C+D+I+J+K+L+4) ≫ 3 …(12)
The predicted image generation unit 413 corresponding to the prediction mode 2 generates a predicted image according to the following equation.
a, d, m, p: (A + B + C + D + I + J + K + L + 4) ≫ 3… (12)

予測モード3に対応する予測画像生成部414は次式により予測画像を生成する。
i:(C+2D+E+2) ≫ 2
m:(D+2E+F+2) ≫ 2
n:(E+2F+G+2) ≫ 2
o:(F+2G+H+2) ≫ 2 …(13)
The predicted image generation unit 414 corresponding to the prediction mode 3 generates a predicted image according to the following equation.
i : (C + 2D + E + 2) ≫ 2
m: (D + 2E + F + 2) ≫ 2
n: (E + 2F + G + 2) ≫ 2
o : (F + 2G + H + 2) ≫ 2… (13)

予測モード4に対応する予測画像生成部415は次式により予測画像を生成する。
o:(M+2I+J+2) ≫ 2
n:(I+2J+K+2) ≫ 2
l:(M+2A+B+2) ≫ 2
h:(A+2B+C+2) ≫ 2 …(14)
The predicted image generation unit 415 corresponding to the prediction mode 4 generates a predicted image according to the following equation.
o: (M + 2I + J + 2) ≫ 2
n: (I + 2J + K + 2) ≫ 2
l : (M + 2A + B + 2) ≫ 2
h : (A + 2B + C + 2) ≫ 2… (14)

予測モード5に対応する予測画像生成部416は次式により予測画像を生成する。
n:(I+2M+A+2) ≫ 2
o:(M+2A+B+2) ≫ 2
p:(A+2B+C+2) ≫ 2
h:(B+2C+D+2) ≫ 2 …(15)
The predicted image generation unit 416 corresponding to the prediction mode 5 generates a predicted image according to the following equation.
n: (I + 2M + A + 2) >> 2
o: (M + 2A + B + 2) ≫ 2
p: (A + 2B + C + 2) ≫ 2
h : (B + 2C + D + 2) ≫ 2… (15)

予測モード6に対応する予測画像生成部417は次式により予測画像を生成する。
h:(I+2M+A+2) ≫ 2
l:(M+2I+J+2) ≫ 1
p:(I+2J+K+2) ≫ 2
n:(J+2K+L+2) ≫ 2 …(16)
The predicted image generation unit 417 corresponding to the prediction mode 6 generates a predicted image according to the following equation.
h: (I + 2M + A + 2) ≫ 2
l : (M + 2I + J + 2) ≫ 1
p: (I + 2J + K + 2) ≫ 2
n : (J + 2K + L + 2) ≫ 2… (16)

予測モード7に対応する予測画像生成部418は次式により予測画像を生成する。
e:(A+2B+C+2) ≫ 2
m:(B+2C+D+2) ≫ 2
n:(C+2D+E+2) ≫ 2
o:(D+2E+F+2) ≫ 2 …(17)
The predicted image generation unit 418 corresponding to the prediction mode 7 generates a predicted image according to the following equation.
e: (A + 2B + C + 2) ≫ 2
m: (B + 2C + D + 2) ≫ 2
n: (C + 2D + E + 2) >> 2
o : (D + 2E + F + 2) ≫ 2… (17)

予測モード8に対応する予測画像生成部414は次式により予測画像を生成する。
b:(I+2J+K+2) ≫ 2
c:(J+K+1) ≫ 1
d:(J+2K+L+2) ≫ 2
h:(K+3L+2) ≫ 2 …(18)
The predicted image generation unit 414 corresponding to the prediction mode 8 generates a predicted image according to the following equation.
b : (I + 2J + K + 2) ≫ 2
c: (J + K + 1) ≫ 1
d: (J + 2K + L + 2) ≫ 2
h : (K + 3L + 2) ≫ 2… (18)

セレクタ220は、実施例1と同様に、予測モード判定部210の判定結果に従い、予測画像生成部411〜419の予測画像の何れかを選択的に出力する。ただし、選択された予測画像は、ブロックの全画素値をもつわけではない。   The selector 220 selectively outputs any one of the predicted images of the predicted image generation units 411 to 419 according to the determination result of the prediction mode determination unit 210 as in the first embodiment. However, the selected predicted image does not have all the pixel values of the block.

追加予測画像生成部430は、予測モード判定部210の判定結果に従い、画素選択部401?409が選択した画素位置以外の予測画像を局所復号画像から生成する。予測画像統合部431は、セレクタ220が出力する画像と、追加予測画像生成部430が出力する画像を合成して、完全な予測画像を出力する。   The additional predicted image generation unit 430 generates a predicted image other than the pixel position selected by the pixel selection unit 401-409 from the locally decoded image according to the determination result of the prediction mode determination unit 210. The predicted image integration unit 431 combines the image output from the selector 220 and the image output from the additional predicted image generation unit 430, and outputs a complete predicted image.

例えば、予測モード0が選択された場合、予測画像生成部411が生成した予測画像は、画素m、n、o、pの四つの画素値をもつだけである。従って、残る画素の画素値は追加予測画像生成部430が生成する。   For example, when the prediction mode 0 is selected, the prediction image generated by the prediction image generation unit 411 has only four pixel values of pixels m, n, o, and p. Accordingly, the additional predicted image generation unit 430 generates the pixel values of the remaining pixels.

図9は実施例2のイントラ予測部1010の動作を説明するフローチャートである。ただし、図7に示す処理と同様のステップには、図7と同じ符号を付し、その詳細説明を省略する。   FIG. 9 is a flowchart for explaining the operation of the intra prediction unit 1010 according to the second embodiment. However, the same steps as those shown in FIG. 7 are denoted by the same reference numerals as those in FIG.

イントラ予測部1010は、カウンタiを初期化(S303)した後、予測モードiに対応する画素選択部により、予測モードiにおける評価値計算用の画素を選択する(S504)。そして、予測モードiに対応する予測画像生成部により、画素選択部が選択した画素位置における予測画像を生成する(S505)。そして、予測モードiに対応するSAD算出部により、予測モードiにおける評価量を算出する(S506)。   The intra prediction unit 1010 initializes the counter i (S303), and then selects a pixel for evaluation value calculation in the prediction mode i by the pixel selection unit corresponding to the prediction mode i (S504). Then, a predicted image at the pixel position selected by the pixel selection unit is generated by the predicted image generation unit corresponding to the prediction mode i (S505). Then, the evaluation amount in the prediction mode i is calculated by the SAD calculation unit corresponding to the prediction mode i (S506).

イントラ予測部1010は、予測モード判定部210により、評価値が最小の予測モードを選択(S309)すると、追加予測画像生成部430により、選択した予測モードにおける不足分の予測画像を生成する(S510)。そして、予測画像統合部431により統合した予測画像を出力する(S511)。   When the prediction mode determination unit 210 selects a prediction mode with the smallest evaluation value (S309), the intra prediction unit 1010 generates an insufficient prediction image in the selected prediction mode using the additional prediction image generation unit 430 (S510). ). Then, the predicted image integrated by the predicted image integration unit 431 is output (S511).

図10はイントラ予測部1010の別の構成例を示すブロック図である。   FIG. 10 is a block diagram showing another configuration example of the intra prediction unit 1010.

図10に示すイントラ予測部1010は、最終の予測画像を出力する際、予測画像生成部433により、予測モードの選択結果に応じた予測画像を生成する。この構成によれば、予測画像生成部411〜419は予測画像を保持する必要はなく、セレクタ220と予測画像統合部431も不要になる。   In the intra prediction unit 1010 illustrated in FIG. 10, when the final predicted image is output, the predicted image generation unit 433 generates a predicted image corresponding to the selection result of the prediction mode. According to this configuration, the predicted image generation units 411 to 419 do not need to hold the predicted image, and the selector 220 and the predicted image integration unit 431 are not necessary.

図10に示す構成の場合、イントラ予測部1010の動作は、予測画像生成部433により、選択された予測モードに対応する予測画像を生成し(S510)、生成した予測画像を出力する(S511)ことになる。   In the configuration shown in FIG. 10, the operation of the intra prediction unit 1010 is to generate a prediction image corresponding to the selected prediction mode by the prediction image generation unit 433 (S510), and output the generated prediction image (S511). It will be.

このように、本実施例は、符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像について、各予測モードに応じた位置の画素を第一の生成手段によって生成する。そして、符号化対象のブロックと複数の予測画像の前記各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算する。そして、複数の予測モードそれぞれに対応する評価値に基づき、符号化対象のブロックの予測モードを設定し、設定された予測モードの予測画像を第二の生成手段によって生成することで、予測モードを決定するための演算量を削減することができる。   As described above, in the present embodiment, for the plurality of prediction images corresponding to the plurality of prediction modes when the block to be encoded is subjected to intra-frame prediction encoding, the pixel at the position corresponding to each prediction mode is set to the first. Generated by generating means. And the value of the pixel of the position according to each said prediction mode of the block of an encoding target and several prediction images is acquired, and the evaluation value which shows the difference between pixel values is calculated. Then, based on the evaluation value corresponding to each of the plurality of prediction modes, the prediction mode of the block to be encoded is set, and the prediction image of the set prediction mode is generated by the second generation unit, so that the prediction mode is determined. The amount of calculation for determination can be reduced.

以下、本発明にかかる実施例3の画像処理を説明する。なお、実施例3において、実施例1、2と略同様の構成については、同一符号を付して、その詳細説明を省略する。   Hereinafter, image processing according to the third embodiment of the present invention will be described. Note that the same reference numerals in the third embodiment denote the same parts as in the first and second embodiments, and a detailed description thereof will be omitted.

図12は実施例3のイントラ予測部1010の構成例を示すブロック図である。   FIG. 12 is a block diagram illustrating a configuration example of the intra prediction unit 1010 according to the third embodiment.

予測画像生成部1201と1202は、局所復号画像から予測画像を生成する。モード設定部1203は、予測画像生成部1201と1202が生成する予測画像の予測モードを設定する。   Prediction image generation units 1201 and 1202 generate prediction images from locally decoded images. The mode setting unit 1203 sets the prediction mode of the prediction image generated by the prediction image generation units 1201 and 1202.

処理対象ブロックの予測モードは、処理対象画像データとともに符号化されるが、本実施例では、その後に処理する隣接ブロックの予測に利用するため、隣接ブロックの処理が終わるまで、一時的に記憶しておく。   The prediction mode of the processing target block is encoded together with the processing target image data. In this embodiment, however, the prediction mode is temporarily stored until the processing of the adjacent block is completed in order to use it for prediction of the adjacent block to be processed thereafter. Keep it.

モード設定部1203は、現ブロックの上ブロック(図1に示すブロックB)の予測モードを予測画像生成部1201に設定し、左ブロック(図1に示すブロックA)の予測モードを予測画像生成部1202に設定する。これは、現ブロックの予測モードと、現ブロックに隣接するブロック(以下、隣接ブロック)の予測モードの間の強い相関を利用するものである。勿論、図1に示す隣接ブロックCやDの予測モードを利用することも可能である。   The mode setting unit 1203 sets the prediction mode of the upper block (block B shown in FIG. 1) of the current block in the prediction image generation unit 1201, and sets the prediction mode of the left block (block A shown in FIG. 1) to the prediction image generation unit Set to 1202. This utilizes a strong correlation between the prediction mode of the current block and the prediction mode of a block adjacent to the current block (hereinafter referred to as an adjacent block). Of course, the prediction mode of adjacent blocks C and D shown in FIG. 1 can also be used.

SAD算出部1204(1205)は、現ブロックの画像と、予測画像生成部1201(1202)が生成した予測画像から評価値を計算する。予測モード判定部1206は、SAD算出部1204と1205が計算した評価値を比較して、評価値の小さい方の予測モードを選択して仮予測モードを示す信号(以下、仮予測信号)を出力する。   The SAD calculation unit 1204 (1205) calculates an evaluation value from the image of the current block and the prediction image generated by the prediction image generation unit 1201 (1202). The prediction mode determination unit 1206 compares the evaluation values calculated by the SAD calculation units 1204 and 1205, selects a prediction mode with a smaller evaluation value, and outputs a signal indicating the temporary prediction mode (hereinafter referred to as a temporary prediction signal). To do.

例えば、予測モード判定部1206は、予測画像生成部1201の予測モードを仮予測モードとする場合は‘0’の、予測画像生成部1202の予測モードを仮予測モードとする場合は‘1’の仮予測信号を出力する。セレクタ1207、1208はそれぞれ、仮予測信号が‘0’の場合は予測画像生成部1201とSAD算出部1204の出力を選択し、仮予測信号が‘1’の場合は予測画像生成部1202とSAD算出部1205の出力を選択する。   For example, the prediction mode determination unit 1206 is '0' when the prediction mode of the prediction image generation unit 1201 is the temporary prediction mode, and is '1' when the prediction mode of the prediction image generation unit 1202 is the temporary prediction mode. A temporary prediction signal is output. The selectors 1207 and 1208 respectively select the output of the predicted image generation unit 1201 and the SAD calculation unit 1204 when the temporary prediction signal is “0”, and the predicted image generation unit 1202 and SAD when the temporary prediction signal is “1”. The output of the calculation unit 1205 is selected.

例えば、現ブロックの上ブロックが予測モード1、左ブロックが予測モード5とすると、予測画像生成部1201は予測モード1の予測画像を生成し、予測画像生成部1202は予測モード5の予測画像を生成する。従って、予測モード判定部1206は、予測モード1と5の評価値を判定して、発生符号量が小さい予測モードを仮予測モードにする。   For example, if the upper block of the current block is in prediction mode 1 and the left block is in prediction mode 5, the prediction image generation unit 1201 generates a prediction image in prediction mode 1, and the prediction image generation unit 1202 generates a prediction image in prediction mode 5. Generate. Therefore, the prediction mode determination unit 1206 determines the evaluation values of the prediction modes 1 and 5, and sets the prediction mode having a small generated code amount as the temporary prediction mode.

モード設定部1212は、仮予測信号を入力して、仮予測モードに隣接する予測モードを予測画像生成部1210と予測画像生成部1211に設定する。仮予測モードに隣接する予測モードは、図2に示すように、仮予測モードの予測方向に隣接する予測方向をもつ予測モードのことである。   The mode setting unit 1212 receives the temporary prediction signal and sets a prediction mode adjacent to the temporary prediction mode in the prediction image generation unit 1210 and the prediction image generation unit 1211. As shown in FIG. 2, the prediction mode adjacent to the temporary prediction mode is a prediction mode having a prediction direction adjacent to the prediction direction of the temporary prediction mode.

予測モード判定部1215は、SAD算出部1213と1214が計算した評価値、および、セレクタ1208を介してSAD算出部1204または1205が計算した評価値を入力する。そして、それら評価値を比較して、評価値が最小の予測モードを示す予測モード信号を出力する。   The prediction mode determination unit 1215 receives the evaluation value calculated by the SAD calculation units 1213 and 1214 and the evaluation value calculated by the SAD calculation unit 1204 or 1205 via the selector 1208. Then, the evaluation values are compared, and a prediction mode signal indicating the prediction mode with the smallest evaluation value is output.

例えば、予測モード判定部1215は、次の予測モード信号を出力する。
予測画像生成部1210の予測モードを選択する場合:‘0’
予測画像生成部1211の予測モードを選択する場合:‘1’
予測画像生成部1201または1202の予測モードを選択する場合:‘2’
For example, the prediction mode determination unit 1215 outputs the next prediction mode signal.
When selecting the prediction mode of the prediction image generation unit 1210: '0'
When selecting the prediction mode of the prediction image generation unit 1211: '1'
When selecting the prediction mode of the prediction image generation unit 1201 or 1202: '2'

セレクタ1217は、予測モード信号に基づき、予測画像を選択的に出力する。   The selector 1217 selectively outputs a prediction image based on the prediction mode signal.

例えば、仮予測モードが1だとすると、モード設定部1212は、予測画像生成部1210に予測モード6を、予測画像生成部1211に予測モード8を設定する。従って、予測モード判定部1215は、予測モード1、6、8の評価値を判定して、発生符号量が小さい予測モードを選択する。例えば、予測モード8が選択された場合、セレクタ1217は、予測画像生成部1211の予測画像を選択的に出力する。   For example, if the temporary prediction mode is 1, the mode setting unit 1212 sets the prediction mode 6 in the prediction image generation unit 1210 and the prediction mode 8 in the prediction image generation unit 1211. Therefore, the prediction mode determination unit 1215 determines the evaluation values of the prediction modes 1, 6, and 8, and selects a prediction mode with a small generated code amount. For example, when the prediction mode 8 is selected, the selector 1217 selectively outputs the prediction image of the prediction image generation unit 1211.

図13Aと13Bは実施例3のイントラ予測部1010の動作を説明するフローチャートである。   13A and 13B are flowcharts for explaining the operation of the intra prediction unit 1010 according to the third embodiment.

イントラ予測部1010は、局所復号画像を入力し(S1301)、現ブロックの画像を入力する(S1302)。   The intra prediction unit 1010 inputs a locally decoded image (S1301), and inputs an image of the current block (S1302).

次に、イントラ予測部1010は、モード設定部1203により、上ブロックの予測モード情報を取得する(S1303)。そして、予測画像生成部1201により、上ブロックの予測モードの予測画像を生成し(S1304)、SAD算出部1204により、上ブロックの予測モードにおける評価値を算出する(S1305)。   Next, the intra prediction unit 1010 acquires the prediction mode information of the upper block by the mode setting unit 1203 (S1303). Then, the prediction image generation unit 1201 generates a prediction image in the prediction mode of the upper block (S1304), and the SAD calculation unit 1204 calculates the evaluation value in the prediction mode of the upper block (S1305).

次に、イントラ予測部1010は、モード設定部1203により、左ブロックの予測モードを入力する(S1306)。そして、予測画像生成部1202により、左ブロックの予測モードの予測画像を生成し(S1307)、SAD算出部1205により、左ブロックの予測モードにおける評価値を算出する(S1308)。   Next, the intra prediction unit 1010 inputs the prediction mode of the left block by the mode setting unit 1203 (S1306). Then, the prediction image generation unit 1202 generates a prediction image of the prediction mode of the left block (S1307), and the SAD calculation unit 1205 calculates the evaluation value in the prediction mode of the left block (S1308).

次に、イントラ予測部1010は、予測モード判定部1206により、評価値の小さい予測モードを仮予測モードとして選択する(S1309)。そして、モード設定部1212により、仮予測モードに隣接する予測モード(以下、隣接予測モード)を設定する(S1311)。   Next, the intra prediction unit 1010 uses the prediction mode determination unit 1206 to select a prediction mode with a small evaluation value as a temporary prediction mode (S1309). Then, the mode setting unit 1212 sets a prediction mode adjacent to the temporary prediction mode (hereinafter, adjacent prediction mode) (S1311).

図14は仮予測モードと隣接予測モードの関係を示すテーブルを示す図で、モード設定部1212はこのテーブルに従い隣接予測モードを選択する。例えば、隣接予測モードは、選択予測モードの予測方向に対して、予測方向の傾きがプラス方向で最も近い予測モードと、予測方向の傾きがマイナス方向で最も近い予測モードである。図14には、隣接予測モードの数を最大二つとしているが、予測モード2(DC予測モード)を加えて、最大三つとしてもよい。また、予測モード2の隣接予測モードとして、比較的、発生頻度が高い予測モード0と1を設定してもよい。   FIG. 14 is a diagram showing a table showing the relationship between the temporary prediction mode and the adjacent prediction mode, and the mode setting unit 1212 selects the adjacent prediction mode according to this table. For example, the adjacent prediction mode is a prediction mode in which the inclination of the prediction direction is the closest in the positive direction and the prediction mode in which the inclination of the prediction direction is the closest in the negative direction with respect to the prediction direction of the selected prediction mode. Although the maximum number of adjacent prediction modes is two in FIG. 14, the prediction mode 2 (DC prediction mode) may be added to provide a maximum of three. Further, prediction modes 0 and 1 having relatively high occurrence frequencies may be set as the adjacent prediction modes of the prediction mode 2.

次に、イントラ予測部1010は、隣接予測モードがあるか否かを判定する(S1312)。例えば、仮予測モードが2の場合、図14に示すテーブルには隣接予測モードはない。また、ステップS1303とS1306で入力した予測モードが8と1で、仮予測モードが8の場合も、予測モード1の処理は不要であるから、隣接予測モードはないと判定する。隣接予測モードがない場合、イントラ予測部1010は、予測モード判定部1215により、仮予測モードを最終の予測モードに決定し(S1313)、処理をステップ1318に進める。   Next, the intra prediction unit 1010 determines whether or not there is an adjacent prediction mode (S1312). For example, when the temporary prediction mode is 2, there is no adjacent prediction mode in the table shown in FIG. Also, when the prediction modes input in steps S1303 and S1306 are 8 and 1, and the temporary prediction mode is 8, the prediction mode 1 is not necessary, so it is determined that there is no adjacent prediction mode. If there is no adjacent prediction mode, the intra prediction unit 1010 causes the prediction mode determination unit 1215 to determine the temporary prediction mode as the final prediction mode (S1313), and the process proceeds to step 1318.

一方、隣接予測モードがある場合、イントラ予測部1010は、予測画像生成部1210により、隣接予測モードの予測画像を生成し(S1314)、SAD算出部1213により、評価値として算出する(S1315)。そして、隣接予測モードが二つある場合は(S1316)、予測画像生成部1211とSAD算出部1214により、二つ目の評価値を算出する(S1314、S1315)。   On the other hand, when there is an adjacent prediction mode, the intra prediction unit 1010 generates a prediction image of the adjacent prediction mode by the predicted image generation unit 1210 (S1314), and calculates it as an evaluation value by the SAD calculation unit 1213 (S1315). Then, when there are two adjacent prediction modes (S1316), the second evaluation value is calculated by the predicted image generation unit 1211 and the SAD calculation unit 1214 (S1314, S1315).

次に、イントラ予測部1010は、予測モード判定部1215により、すべての評価値の中から最小の評価値をもつ予測モードを、現ブロックの予測モードに決定する(S1317)。そして、決定した予測モードの予測画像を選択的に出力する(S1318)。   Next, the intra prediction unit 1010 uses the prediction mode determination unit 1215 to determine the prediction mode having the smallest evaluation value among all the evaluation values as the prediction mode of the current block (S1317). Then, the predicted image of the determined prediction mode is selectively output (S1318).

このように、本実施例は、符号化対象のブロックに隣接する複数の符号化済みブロックの予測モード情報を取得する。そして、予測モード情報が示す予測モードによって、符号化対象のブロックをフレーム内予測符号化する場合の第一の予測画像を第一の生成手段によって生成する。そして、符号化対象のブロックと第一の予測画像の対応する画素値の間の差分を示す第一の評価値を第一の計算手段によって計算し、第一の評価値に基づき、予測モード情報が示す予測モードを選択する選択する。そして、選択された予測モードの予測方向に隣接する予測方向をもつ予測モードによって、符号化対象のブロックをフレーム内予測符号化する場合の第二の予測画像を第二の生成手段によって生成する。そして、符号化対象のブロックと第二の予測画像の対応する画素値の間の差分を示す第二の評価値を第二の計算手段によって計算する。そして、第一および第二の評価値に基づき、符号化対象のブロックの予測モードを設定することで、すべての予測モードの予測画像を生成し評価値を計算する処理を省くことができる。従って、予測モードを決定するための演算量を削減することができる。   As described above, in this embodiment, prediction mode information of a plurality of encoded blocks adjacent to a block to be encoded is acquired. Then, the first generation image is generated by the first generation unit when the block to be encoded is subjected to intraframe prediction encoding according to the prediction mode indicated by the prediction mode information. And the 1st evaluation value which shows the difference between the pixel value corresponding to the block for coding and the 1st prediction picture is calculated by the 1st calculation means, and prediction mode information is based on the 1st evaluation value Select to select the prediction mode indicated by. Then, the second generation image is generated by the second generation unit when the intra-frame prediction encoding is performed on the block to be encoded in the prediction mode having the prediction direction adjacent to the prediction direction of the selected prediction mode. Then, a second evaluation value indicating a difference between corresponding pixel values of the encoding target block and the second predicted image is calculated by the second calculation unit. And the process which produces | generates the prediction image of all the prediction modes and calculates an evaluation value can be omitted by setting the prediction mode of the block of an encoding target based on the 1st and 2nd evaluation value. Therefore, the amount of calculation for determining the prediction mode can be reduced.

以下、本発明にかかる実施例4の画像処理を説明する。なお、実施例4において、実施例1〜3と略同様の構成については、同一符号を付して、その詳細説明を省略する。   Hereinafter, image processing according to the fourth embodiment of the present invention will be described. Note that the same reference numerals in the fourth embodiment denote the same parts as in the first to third embodiments, and a detailed description thereof will be omitted.

図15は実施例4のイントラ予測部1010の構成例を示すブロック図である。   FIG. 15 is a block diagram illustrating a configuration example of the intra prediction unit 1010 according to the fourth embodiment.

実施例3と異なるのは、仮予測モードを選択した後、閾値処理により、隣接予測モードに関する判定を制御することである。   The difference from the third embodiment is that after the temporary prediction mode is selected, the determination on the adjacent prediction mode is controlled by threshold processing.

閾値判定部1220は、仮予測モードの評価値Etと所定の閾値thを比較する。そして、評価値が閾値未満(Et<th)の場合は、仮予測モードの予測画像を出力するように、セレクタ1218と1219を制御する。つまり、Et<thの場合、隣接予測モードに関する判定を行わずに、仮予測モードを最終の予測モードにすることになる。また、評価値が閾値以上(Et≧th)の場合は、セレクタ1218は仮予測モードの予測画像をセレクタ1217に供給し、セレクタ1219はセレクタ1217が選択した予測画像を出力するように切り替わる。従って、実施例3と同様に、仮予測モードと隣接予測モードの評価値に基づき、予測画像が出力される。   The threshold determination unit 1220 compares the evaluation value Et in the temporary prediction mode with a predetermined threshold th. When the evaluation value is less than the threshold (Et <th), the selectors 1218 and 1219 are controlled so as to output a prediction image in the temporary prediction mode. That is, in the case of Et <th, the temporary prediction mode is changed to the final prediction mode without performing the determination regarding the adjacent prediction mode. If the evaluation value is equal to or greater than the threshold (Et ≧ th), the selector 1218 supplies the prediction image in the temporary prediction mode to the selector 1217, and the selector 1219 switches to output the prediction image selected by the selector 1217. Therefore, as in the third embodiment, a prediction image is output based on the evaluation values of the temporary prediction mode and the adjacent prediction mode.

所定の閾値thは、入力画像に含まれるノイズ量を考慮して決定することが好ましい。ブロック内の画素値のレベルがノイズのレベルより小さい場合は、ノイズの影響が予測モードを決める際の支配的な要因となる。この場合、最小の評価値となる予測モードを選択しても、符号化効率の改善は僅かなものとなる。   The predetermined threshold th is preferably determined in consideration of the amount of noise included in the input image. When the pixel value level in the block is smaller than the noise level, the influence of noise becomes a dominant factor in determining the prediction mode. In this case, even if the prediction mode with the minimum evaluation value is selected, the improvement in coding efficiency is slight.

図16は実施例4のイントラ予測部1010の動作を説明するフローチャートである。なお、処理の前半は図13Aと同じである。図13Aと13Bに示す実施例3の動作と異なるのは、仮予測モードを選択(S1309)した後、仮予測モードの評価値Etと閾値thを比較して(S1310)、比較結果に応じて処理をステップS1311またはS1313に分岐する点である。   FIG. 16 is a flowchart for explaining the operation of the intra prediction unit 1010 according to the fourth embodiment. Note that the first half of the processing is the same as FIG. 13A. The difference from the operation of the third embodiment shown in FIGS. 13A and 13B is that, after selecting the temporary prediction mode (S1309), the evaluation value Et of the temporary prediction mode is compared with the threshold th (S1310), and according to the comparison result. The point is that the process branches to step S1311 or S1313.

このように、現ブロックの予測モードと隣接ブロックの予測モードの強い相関を利用して現ブロックの予測モードを仮設定した場合、その評価値が充分に小さければ、さらに隣接予測モードの評価を行わず、予測画像を生成し評価値を計算する処理を省く。従って、予測モードを決定するための演算量を削減することができる。   As described above, when the prediction mode of the current block is temporarily set using the strong correlation between the prediction mode of the current block and the prediction mode of the adjacent block, if the evaluation value is sufficiently small, the adjacent prediction mode is further evaluated. First, the process of generating the predicted image and calculating the evaluation value is omitted. Therefore, the amount of calculation for determining the prediction mode can be reduced.

以下、本発明にかかる実施例5の画像処理を説明する。なお、実施例5において、実施例1〜4と略同様の構成については、同一符号を付して、その詳細説明を省略する。   Hereinafter, image processing according to the fifth embodiment of the present invention will be described. Note that the same reference numerals in the fifth embodiment denote the same parts as in the first to fourth embodiments, and a detailed description thereof will be omitted.

図17は実施例5のイントラ予測部1010の構成例を示すブロック図である。   FIG. 17 is a block diagram illustrating a configuration example of the intra prediction unit 1010 according to the fifth embodiment.

画素選択部2201は、現ブロックの画像から所定画素を選択し、その画素値を入力する。ここでは、図3に示す画素a、d、m、pの四画素を選択する例を説明する。予測モード設定部2202は、画素選択部2201が選択した画素の値から一意に予測モードを設定する。予測画像生成部2203は、局所復号画像から予測モード設定部202が設定した予測モードに対応する予測画像を生成し出力する。   The pixel selection unit 2201 selects a predetermined pixel from the image of the current block and inputs the pixel value. Here, an example in which four pixels a, d, m, and p shown in FIG. 3 are selected will be described. The prediction mode setting unit 2202 uniquely sets the prediction mode from the value of the pixel selected by the pixel selection unit 2201. The predicted image generation unit 2203 generates and outputs a predicted image corresponding to the prediction mode set by the prediction mode setting unit 202 from the locally decoded image.

図18は四画素の値の組み合わせと予測モードの関係を示すテーブルを示す図で、予測モード設定部2202はこのテーブルに従い予測モードを設定する。   FIG. 18 is a diagram showing a table showing the relationship between combinations of four pixel values and the prediction mode. The prediction mode setting unit 2202 sets the prediction mode according to this table.

例えば、画素a、d、m、pが同値の場合は、DC予測が最適と考えられ、予測モード2を設定するようにテーブルを記述する。また、画素aとmの値が類似し、画素dとpの値が類似する場合、垂直方向の相関が高いと考えられ、予測モード0を設定するようにテーブルを記述する。また、画素aとdの値が類似し、画素mとpの値が類似する場合、水平方向の相関が高いと考えられ、予測モード1を設定するようにテーブルを記述する。   For example, when pixels a, d, m, and p have the same value, DC prediction is considered optimal, and the table is described so as to set prediction mode 2. If the values of the pixels a and m are similar and the values of the pixels d and p are similar, the vertical correlation is considered high, and the table is described so that the prediction mode 0 is set. Further, when the values of the pixels a and d are similar and the values of the pixels m and p are similar, the horizontal correlation is considered to be high, and the table is described so that the prediction mode 1 is set.

このように、画素a、d、m、pの四値の組み合わせについて、設定すべき予測モードをテーブルに記述しておけば、各予測モードの予測画像の生成や、評価値の算出を行わずに、予測モードを決定することができる。   In this way, if the prediction mode to be set is described in the table for the combination of the four values of the pixels a, d, m, and p, the prediction image for each prediction mode is not generated and the evaluation value is not calculated. In addition, the prediction mode can be determined.

図19は実施例5のイントラ予測部1010の動作を説明するフローチャートである。   FIG. 19 is a flowchart for explaining the operation of the intra prediction unit 1010 according to the fifth embodiment.

イントラ予測部1010は、局所復号画像を入力し(S2301)、現ブロックの画像を入力する(S2302)。そして、画素選択部2201により、所定画素の画素値を入力し(S2303)、図18に示すテーブルを利用する予測モード設定部2202により、所定画素の画素値の組み合わせに対応する予測モードを設定する(S2304)。そして、予測画像生成部2203により、予測モードに対応する予測画像を生成し出力する(S2305)。   The intra prediction unit 1010 inputs a locally decoded image (S2301), and inputs an image of the current block (S2302). Then, the pixel value of the predetermined pixel is input by the pixel selection unit 2201 (S2303), and the prediction mode corresponding to the combination of the pixel values of the predetermined pixel is set by the prediction mode setting unit 2202 using the table shown in FIG. (S2304). Then, the predicted image generation unit 2203 generates and outputs a predicted image corresponding to the prediction mode (S2305).

画素選択部2201が選択する画素の位置や数に制約はない。たとえば、a、b、c、d、e、h、i、l、m、n、o、pの12画素を選ぶことも可能である。   There are no restrictions on the position or number of pixels selected by the pixel selection unit 2201. For example, it is possible to select 12 pixels of a, b, c, d, e, h, i, l, m, n, o, and p.

このように、符号化対象のブロックの所定画素の値を取得し、所定画素の値の組み合わせに基づき、符号化ブロックをフレーム内予測符号化する場合の予測モードを設定することで、予測モードを決定するための演算量を削減することができる。   In this way, by obtaining the value of the predetermined pixel of the block to be encoded and setting the prediction mode in the case of intra-frame predictive encoding of the encoded block based on the combination of the values of the predetermined pixel, the prediction mode is set. The amount of calculation for determination can be reduced.

以下、本発明にかかる実施例6の画像処理を説明する。なお、実施例6において、実施例1〜5と略同様の構成については、同一符号を付して、その詳細説明を省略する。   The image processing according to the sixth embodiment of the present invention will be described below. Note that the same reference numerals in the sixth embodiment denote the same parts as in the first to fifth embodiments, and a detailed description thereof will be omitted.

実施例5と異なるのは、現ブロックの所定画素の値の組み合わせから選択される予測モード(以下、選択予測モード)と、選択予測モードに隣接する予測モードの三つの予測モードの評価値を計算する。そして、評価値の比較から、より精度よく予測モードを決定することである。   The difference from the fifth embodiment is that the evaluation values of three prediction modes, that is, a prediction mode selected from a combination of values of predetermined pixels of the current block (hereinafter, selected prediction mode) and a prediction mode adjacent to the selected prediction mode are calculated. To do. Then, the prediction mode is determined more accurately from the comparison of the evaluation values.

図20は実施例5のイントラ予測部1010の構成例を示すブロック図である。   FIG. 20 is a block diagram illustrating a configuration example of the intra prediction unit 1010 according to the fifth embodiment.

予測モード設定部2202は、画素選択部2201が選択した四画素の値の組み合わせから予測モードを選択する。そして、選択予測モードと、選択予測モードの隣接予測モードをそれぞれ予測画像生成部2204、2205、2206に設定する。選択予測モードは、必ずしも九種類の予測モードすべての中から選ぶ必要はない。ここでは、選択予測モードの候補を予測モード0、1、3、4の四種類として説明する。   The prediction mode setting unit 2202 selects a prediction mode from the combination of four pixel values selected by the pixel selection unit 2201. Then, the selected prediction mode and the adjacent prediction mode of the selected prediction mode are set in the predicted image generation units 2204, 2205, and 2206, respectively. The selection prediction mode does not necessarily need to be selected from all nine types of prediction modes. Here, the selection prediction mode candidates are described as four types of prediction modes 0, 1, 3, and 4.

予測モード設定部2202は、ブロックの四隅の画素a、d、m、pにおける相互の差分絶対値|a-d|、|a-m|、|a-p|、|d-m|、|d-p|、|m-p|を計算して評価値とする。そして、どの評価値が最小かによって予測モードを選択する。   The prediction mode setting unit 2202 calculates absolute differences | ad |, | am |, | ap |, | dm |, | dp |, and | mp | of the mutual differences at the pixels a, d, m, and p at the four corners of the block. To obtain an evaluation value. Then, the prediction mode is selected depending on which evaluation value is the smallest.

図21は最小の評価値と予測モードの関係を示すテーブルを示す図で、予測モード設定部2202はこのテーブルに従い予測モードを選択する。   FIG. 21 is a diagram showing a table showing the relationship between the minimum evaluation value and the prediction mode. The prediction mode setting unit 2202 selects a prediction mode according to this table.

図22は四つの画素値の相対的な大きさを模式的に示す図である。図22(a)の例は画素aとmの差分絶対値が最小であり、垂直方向の相関が強いと考えられ、予測モード0を選択する。図22(b)の例は画素aとdの差分絶対値が最小であり、水平方向の相関が強いと考えられ、仮の予測モード1を選択する。図22(c)の例は、画素dとmの差分絶対値が最小であり、右上から左下への斜め方向の相関が強いと考えられ、予測モード3を選択する。図22(d)の例は、画素aとpの差分絶対値が最小であり、左上から右下への斜め方向の相関が強いと考えられ、予測モード4を選択する。   FIG. 22 is a diagram schematically showing the relative sizes of the four pixel values. In the example of FIG. 22 (a), the difference absolute value between the pixels a and m is the smallest, and it is considered that the correlation in the vertical direction is strong, so the prediction mode 0 is selected. In the example of FIG. 22 (b), the difference absolute value between the pixels a and d is the smallest, and it is considered that the correlation in the horizontal direction is strong, so the provisional prediction mode 1 is selected. In the example of FIG. 22 (c), the difference absolute value between the pixels d and m is the smallest, and it is considered that the correlation in the oblique direction from the upper right to the lower left is strong, and the prediction mode 3 is selected. In the example of FIG. 22 (d), the difference absolute value between the pixels a and p is the smallest, and it is considered that the correlation in the oblique direction from the upper left to the lower right is strong, and the prediction mode 4 is selected.

図23は選択予測モードと隣接予測モードの関係を示すテーブルを示す図で、予測モード設定部2202はこのテーブルに従い隣接予測モードを設定する。なお、図23には、隣接予測モードは最大二種類とする例を示したが、DC予測を加え最大三種類にするなど、隣接予測モードの数に制限はない。   FIG. 23 is a diagram showing a table showing the relationship between the selected prediction mode and the adjacent prediction mode, and the prediction mode setting unit 2202 sets the adjacent prediction mode according to this table. Note that FIG. 23 shows an example in which the maximum number of adjacent prediction modes is two, but there is no limit to the number of adjacent prediction modes, such as adding DC prediction to a maximum of three types.

予測画像生成部2204〜2206はそれぞれ、局所復号画像から設定された予測モードの予測画像を生成する。SAD算出部2207〜2209はそれぞれ、現ブロックの画像と予測画像の差分絶対和を計算して評価値とする。予測モード判定部2210は、SAD算出部2207〜2209が算出した評価値から最小の評価値を判定し、最小の評価値に対応する予測モードを最終の予測モードに決定する。セレクタ2210は、予測モード判定部2211が決定した予測モードの予測画像を選択的に出力する。   Each of the predicted image generation units 2204 to 2206 generates a predicted image in the prediction mode set from the locally decoded image. Each of the SAD calculating units 2207 to 2209 calculates an absolute difference between the current block image and the predicted image to obtain an evaluation value. The prediction mode determination unit 2210 determines the minimum evaluation value from the evaluation values calculated by the SAD calculation units 2207 to 2209, and determines the prediction mode corresponding to the minimum evaluation value as the final prediction mode. The selector 2210 selectively outputs the prediction image of the prediction mode determined by the prediction mode determination unit 2211.

図24は実施例6のイントラ予測部1010の動作を説明するフローチャートである。   FIG. 24 is a flowchart for explaining the operation of the intra prediction unit 1010 according to the sixth embodiment.

イントラ予測部1010は、画素選択部2201により所定画素の画素値を入力(S2303)すると、予測モード設定部2202により、予測モードを選択する(S2604)。そして、予測画像生成部により、選択予測モードに対応する予測画像を生成する(S2605)。   When the pixel value of a predetermined pixel is input from the pixel selection unit 2201 (S2303), the intra prediction unit 1010 selects a prediction mode from the prediction mode setting unit 2202 (S2604). Then, a predicted image corresponding to the selected prediction mode is generated by the predicted image generation unit (S2605).

次に、イントラ予測部1010は、予測モード設定部2202により、選択予測モードに隣接する予測モードを設定し(S2606)、予測画像生成部により、隣接予測モードに対応する予測画像を生成する(S2607)。そして、隣接予測モードに対応する予測画像の生成が終了すると(S2608)、SAD算出部により、各予測モードの評価値を計算する(S2609)。   Next, the intra prediction unit 1010 sets a prediction mode adjacent to the selected prediction mode by the prediction mode setting unit 2202 (S2606), and generates a prediction image corresponding to the adjacent prediction mode by the prediction image generation unit (S2607). ). Then, when the generation of the prediction image corresponding to the adjacent prediction mode is finished (S2608), the SAD calculation unit calculates the evaluation value of each prediction mode (S2609).

評価値の計算が終了すると(S2610)、イントラ予測部1010は、予測モード判定部2211により、最小の評価値をもつ予測モードを決定し(S2611)、セレクタ2210により、決定した予測モードの予測画像を選択的に出力する(S2612)。   When the calculation of the evaluation value is completed (S2610), the intra prediction unit 1010 determines the prediction mode having the minimum evaluation value by the prediction mode determination unit 2211 (S2611), and the prediction image of the prediction mode determined by the selector 2210 Are selectively output (S2612).

このように、現ブロックの所定画素の値の組み合わせから選択される予測モードと、選択予測モードに隣接する予測モードの三つの予測モードの評価値を計算して予測モードを決定する。従って、予測モードを決定するための演算量を削減するとともに、より精度よく予測モードを決定することができる。   Thus, the prediction mode is determined by calculating the evaluation values of the three prediction modes, that is, the prediction mode selected from the combination of the values of the predetermined pixels of the current block and the prediction mode adjacent to the selected prediction mode. Accordingly, the calculation amount for determining the prediction mode can be reduced, and the prediction mode can be determined with higher accuracy.

[他の実施例]
なお、本発明は、複数の機器(例えばコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置、制御装置など)に適用してもよい。
[Other embodiments]
Note that the present invention can be applied to a system including a plurality of devices (for example, a computer, an interface device, a reader, a printer, etc.), but an apparatus (for example, a copier, a facsimile machine, a control device) including a single device. Etc.).

また、本発明の目的は、上記実施例の機能を実現するコンピュータプログラムを記録した記憶媒体をシステムまたは装置に供給し、そのシステムまたは装置のコンピュータ(CPUやMPU)が前記コンピュータプログラムを実行することでも達成される。この場合、記憶媒体から読み出されたソフトウェア自体が上記実施例の機能を実現することになり、そのコンピュータプログラムと、そのコンピュータプログラムを記憶する、コンピュータが読み取り可能な記憶媒体は本発明を構成する。   Another object of the present invention is to supply a storage medium storing a computer program for realizing the functions of the above embodiments to a system or apparatus, and the computer (CPU or MPU) of the system or apparatus executes the computer program. But it is achieved. In this case, the software read from the storage medium itself realizes the functions of the above embodiments, and the computer program and the computer-readable storage medium storing the computer program constitute the present invention. .

また、前記コンピュータプログラムの実行により上記機能が実現されるだけではない。つまり、そのコンピュータプログラムの指示により、コンピュータ上で稼働するオペレーティングシステム(OS)および/または第一、第二、第三、…のプログラムなどが実際の処理の一部または全部を行い、それによって上記機能が実現される場合も含む。   Further, the above functions are not only realized by the execution of the computer program. That is, according to the instruction of the computer program, the operating system (OS) running on the computer and / or the first, second, third,... This includes cases where functions are realized.

また、前記コンピュータプログラムがコンピュータに接続された機能拡張カードやユニットなどのデバイスのメモリに書き込まれていてもよい。つまり、そのコンピュータプログラムの指示により、第一、第二、第三、…のデバイスのCPUなどが実際の処理の一部または全部を行い、それによって上記機能が実現される場合も含む。   The computer program may be written in a memory of a device such as a function expansion card or unit connected to the computer. That is, the case where the CPU or the like of the first, second, third,... Device performs part or all of the actual processing according to the instruction of the computer program, thereby realizing the above functions.

本発明を前記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応または関連するコンピュータプログラムが格納される。   When the present invention is applied to the storage medium, the storage medium stores a computer program corresponding to or related to the flowchart described above.

予測画像を生成するために用いられる隣接ブロックを示す図、The figure which shows the adjacent block used in order to produce | generate a prediction image, H.264の4×4画素ブロックの符号化における、予測の方向ごとの九種類の予測モードを示す図、The figure which shows nine kinds of prediction modes for every direction of prediction in encoding of 4 × 4 pixel block of H.264, 各予測モードと予測画素値の関係を説明する図、The figure explaining the relationship between each prediction mode and a prediction pixel value, 実施例の符号化装置の構成例を示すブロック図、A block diagram showing a configuration example of an encoding device of an embodiment, イントラ予測部の構成例を示すブロック図、A block diagram showing a configuration example of an intra prediction unit, 画素選択部が選択する画素の位置を示す図、The figure which shows the position of the pixel which a pixel selection part selects, イントラ予測部の動作を説明するフローチャート、A flowchart for explaining the operation of the intra prediction unit; 実施例2のイントラ予測部の構成例を示すブロック図、Block diagram showing a configuration example of the intra prediction unit of the second embodiment, 実施例2のイントラ予測部の動作を説明するフローチャート、Flowchart explaining the operation of the intra prediction unit of the second embodiment, イントラ予測部の別の構成例を示すブロック図、A block diagram showing another configuration example of the intra prediction unit, 符号化装置をコンピュータ装置で実現する例を説明するブロック図、FIG. 2 is a block diagram illustrating an example in which the encoding device is realized by a computer device; 実施例3のイントラ予測部の構成例を示すブロック図、Block diagram showing a configuration example of the intra prediction unit of the third embodiment, 実施例3のイントラ予測部の動作を説明するフローチャート、A flowchart for explaining the operation of the intra prediction unit of the third embodiment, 実施例3のイントラ予測部の動作を説明するフローチャート、A flowchart for explaining the operation of the intra prediction unit of the third embodiment, 仮予測モードと隣接予測モードの関係を示すテーブルを示す図、The figure which shows the table which shows the relationship between temporary prediction mode and adjacent prediction mode, 実施例4のイントラ予測部の構成例を示すブロック図、Block diagram showing a configuration example of the intra prediction unit of Example 4, 実施例4のイントラ予測部の動作を説明するフローチャート、Flowchart explaining the operation of the intra prediction unit of the fourth embodiment, 実施例5のイントラ予測部の構成例を示すブロック図、Block diagram showing a configuration example of the intra prediction unit of Example 5, 四画素の値の組み合わせと予測モードの関係を示すテーブルを示す図、The figure which shows the table which shows the relationship between the combination of the value of four pixels, and prediction mode, 実施例5のイントラ予測部の動作を説明するフローチャート、Flowchart explaining the operation of the intra prediction unit of Example 5, 実施例5のイントラ予測部の構成例を示すブロック図、Block diagram showing a configuration example of the intra prediction unit of Example 5, 最小の評価値と予測モードの関係を示すテーブルを示す図、The figure which shows the table which shows the relationship between the minimum evaluation value and prediction mode, 四つの画素値の相対的な大きさを模式的に示す図、A diagram schematically showing the relative size of the four pixel values, 選択予測モードと隣接予測モードの関係を示すテーブルを示す図、The figure which shows the table which shows the relationship between selection prediction mode and adjacent prediction mode, 実施例6のイントラ予測部の動作を説明するフローチャートである。12 is a flowchart for explaining the operation of an intra prediction unit according to the sixth embodiment.

Claims (18)

動画像のフレームをブロック単位に符号化する画像処理装置であって、
符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像を生成する生成手段と、
前記符号化対象のブロックと前記複数の予測画像から各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算する計算手段と、
前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定する設定手段とを有することを特徴とする画像処理装置。
An image processing apparatus that encodes a frame of a moving image in units of blocks,
Generating means for generating a plurality of prediction images corresponding to a plurality of prediction modes in the case of intra-frame predictive encoding of a block to be encoded;
Calculating means for obtaining a value of a pixel at a position corresponding to each prediction mode from the block to be encoded and the plurality of prediction images, and calculating an evaluation value indicating a difference between the pixel values;
An image processing apparatus comprising: a setting unit configured to set a prediction mode of the block to be encoded based on an evaluation value corresponding to each of the plurality of prediction modes.
動画像のフレームをブロック単位に符号化する画像処理装置であって、
符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像について、各予測モードに応じた位置の画素を生成する第一の生成手段と、
前記符号化対象のブロックと前記複数の予測画像の前記各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算する計算手段と、
前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定する設定手段と、
前記設定された予測モードの予測画像を生成する第二の生成手段とを有することを特徴とする画像処理装置。
An image processing apparatus that encodes a frame of a moving image in units of blocks,
First generation means for generating a pixel at a position corresponding to each prediction mode for a plurality of prediction images corresponding to each of a plurality of prediction modes in the case of intra-frame prediction encoding of a block to be encoded;
Calculating means for obtaining a value of a pixel at a position corresponding to each prediction mode of the encoding target block and the plurality of prediction images, and calculating an evaluation value indicating a difference between the pixel values;
Setting means for setting a prediction mode of the block to be encoded based on an evaluation value corresponding to each of the plurality of prediction modes;
An image processing apparatus comprising: a second generation unit configured to generate a prediction image in the set prediction mode.
前記第二の生成手段は、前記設定された予測モードに応じた位置以外の画素を生成し、前記第一の生成手段が生成した前記設定された予測モードに応じた位置の画素と合成して、前記予測画像を生成することを特徴とする請求項2に記載された画像処理装置。   The second generation unit generates a pixel other than the position corresponding to the set prediction mode, and combines the pixel with a position corresponding to the set prediction mode generated by the first generation unit. 3. The image processing apparatus according to claim 2, wherein the predicted image is generated. 前記予測モードに応じた位置の画素は、前記予測モードの予測方向に対し、前記予測画像の生成に用いる画素から最も遠い位置にある画素であることを特徴とする請求項1から請求項3の何れか一項に記載された画像処理装置。   The pixel at a position corresponding to the prediction mode is a pixel that is farthest from a pixel used to generate the prediction image with respect to a prediction direction of the prediction mode. An image processing apparatus according to any one of the above. 動画像のフレームをブロック単位に符号化する画像処理装置であって、
符号化対象のブロックに隣接する複数の符号化済みブロックの予測モード情報を取得する取得手段と、
前記予測モード情報が示す予測モードによって、前記符号化対象のブロックをフレーム内予測符号化する場合の第一の予測画像を生成する第一の生成手段と、
前記符号化対象のブロックと前記第一の予測画像の対応する画素値の間の差分を示す第一の評価値を計算する第一の計算手段と、
前記第一の評価値に基づき、前記予測モード情報が示す予測モードを選択する選択手段と、
前記選択された予測モードの予測方向に隣接する予測方向をもつ予測モードによって、前記符号化対象のブロックをフレーム内予測符号化する場合の第二の予測画像を生成する第二の生成手段と、
前記符号化対象のブロックと前記第二の予測画像の対応する画素値の間の差分を示す第二の評価値を計算する第二の計算手段と、
前記第一および第二の評価値に基づき、前記符号化対象のブロックの予測モードを設定する設定手段とを有することを特徴とする画像処理装置。
An image processing apparatus that encodes a frame of a moving image in units of blocks,
Obtaining means for obtaining prediction mode information of a plurality of encoded blocks adjacent to a block to be encoded;
First generation means for generating a first prediction image when the block to be encoded is subjected to intraframe prediction encoding according to the prediction mode indicated by the prediction mode information;
First calculation means for calculating a first evaluation value indicating a difference between the encoding target block and the corresponding pixel value of the first predicted image;
Selection means for selecting a prediction mode indicated by the prediction mode information based on the first evaluation value;
Second generation means for generating a second prediction image when the block to be encoded is subjected to intraframe prediction encoding by a prediction mode having a prediction direction adjacent to the prediction direction of the selected prediction mode;
Second calculation means for calculating a second evaluation value indicating a difference between the corresponding pixel value of the block to be encoded and the second predicted image;
An image processing apparatus comprising: a setting unit configured to set a prediction mode of the encoding target block based on the first and second evaluation values.
前記設定手段は、前記選択手段が選択した予測モードに対応する前記第一の評価値が所定の閾値未満の場合は、前記符号化対象のブロックの予測モードに前記選択手段が選択した予測モードを設定することを特徴とする請求項5に記載された画像処理装置。   When the first evaluation value corresponding to the prediction mode selected by the selection unit is less than a predetermined threshold, the setting unit sets the prediction mode selected by the selection unit to the prediction mode of the block to be encoded. 6. The image processing device according to claim 5, wherein the image processing device is set. 前記設定手段は、前記選択された予測モードに隣接する予測モードがない場合は、前記符号化対象のブロックの予測モードに前記選択手段が選択した予測モードを設定することを特徴とする請求項5または請求項6の何れか一項に記載された画像処理装置。   The setting unit, when there is no prediction mode adjacent to the selected prediction mode, sets the prediction mode selected by the selection unit as the prediction mode of the block to be encoded. An image processing apparatus according to claim 6. 前記第二の生成手段は、前記選択された予測モードがDC予測モードの場合、垂直方向および水平方向の予測モードを前記隣接する予測モードにすることを特徴とする請求項5から請求項7の何れか一項に記載された画像処理装置。   8. The second generation unit according to claim 5, wherein when the selected prediction mode is a DC prediction mode, a prediction mode in a vertical direction and a horizontal direction is set to the adjacent prediction mode. An image processing apparatus according to any one of the above. 動画像のフレームをブロック単位に符号化する画像処理装置であって、
符号化対象のブロックの所定画素の値を取得する取得手段と、
前記所定画素の値の組み合わせに基づき、前記符号化ブロックをフレーム内予測符号化する場合の予測モードを設定する設定手段とを有することを特徴とする画像処理装置。
An image processing apparatus that encodes a frame of a moving image in units of blocks,
Obtaining means for obtaining a value of a predetermined pixel of a block to be encoded;
An image processing apparatus comprising: a setting unit configured to set a prediction mode when the encoded block is subjected to intraframe prediction encoding based on a combination of values of the predetermined pixels.
動画像のフレームをブロック単位に符号化する画像処理装置であって、
符号化対象のブロックの所定画素の値を取得する取得手段と、
前記所定画素の値の組み合わせに基づき、前記符号化ブロックをフレーム内予測符号化する場合の複数の予測モードを選択する選択手段と、
前記複数の予測モードそれぞれに対応する複数の予測画像を生成する生成手段と、
前記符号化対象のブロックと前記複数の予測画像の対応する画素値の間の差分を示す評価値を計算する計算手段と、
前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定する設定手段とを有することを特徴とする画像処理装置。
An image processing apparatus that encodes a frame of a moving image in units of blocks,
Obtaining means for obtaining a value of a predetermined pixel of a block to be encoded;
Selection means for selecting a plurality of prediction modes when the encoded block is subjected to intraframe prediction encoding based on a combination of values of the predetermined pixels;
Generating means for generating a plurality of prediction images corresponding to each of the plurality of prediction modes;
Calculation means for calculating an evaluation value indicating a difference between corresponding pixel values of the block to be encoded and the plurality of predicted images;
An image processing apparatus comprising: a setting unit configured to set a prediction mode of the block to be encoded based on an evaluation value corresponding to each of the plurality of prediction modes.
前記所定画素はブロックの四隅の画素であり、前記選択手段は、前記四隅の画素の値の組み合わせの中で差分が最小の方向に一致する予測方向をもつ予測モードと、前記予測方向に隣接する予測方向をもつ予測モードを選択することを特徴とする請求項10に記載された画像処理装置。   The predetermined pixels are pixels at the four corners of the block, and the selection unit is adjacent to the prediction mode having a prediction direction in which the difference matches the direction with the smallest difference among the combinations of the pixel values at the four corners. 11. The image processing apparatus according to claim 10, wherein a prediction mode having a prediction direction is selected. 動画像のフレームをブロック単位に符号化する画像処理方法であって、
符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像を生成し、
前記符号化対象のブロックと前記複数の予測画像から各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算し、
前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定することを特徴とする画像処理方法。
An image processing method for encoding a frame of a moving image in units of blocks,
Generating a plurality of prediction images corresponding to a plurality of prediction modes in the case of intra-frame predictive encoding of a block to be encoded,
Obtaining a value of a pixel at a position corresponding to each prediction mode from the block to be encoded and the plurality of prediction images, and calculating an evaluation value indicating a difference between the pixel values;
An image processing method, comprising: setting a prediction mode of the encoding target block based on an evaluation value corresponding to each of the plurality of prediction modes.
動画像のフレームをブロック単位に符号化する画像処理方法であって、
符号化対象のブロックをフレーム内予測符号化する場合の複数の予測モードそれぞれに対応する複数の予測画像について、各予測モードに応じた位置の画素を生成し、
前記符号化対象のブロックと前記複数の予測画像の前記各予測モードに応じた位置の画素の値を取得して、画素値の間の差分を示す評価値を計算し、
前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定し、
前記設定された予測モードの予測画像を生成することを特徴とする画像処理方法。
An image processing method for encoding a frame of a moving image in units of blocks,
For a plurality of prediction images corresponding to each of a plurality of prediction modes in the case of intra-frame predictive encoding of a block to be encoded, a pixel at a position corresponding to each prediction mode is generated,
Obtaining a value of a pixel at a position corresponding to each prediction mode of the block to be encoded and the plurality of prediction images, and calculating an evaluation value indicating a difference between the pixel values;
Based on the evaluation value corresponding to each of the plurality of prediction modes, the prediction mode of the block to be encoded is set,
An image processing method characterized by generating a prediction image of the set prediction mode.
動画像のフレームをブロック単位に符号化する画像処理方法であって、
符号化対象のブロックに隣接する複数の符号化済みブロックの予測モード情報を取得し、
前記予測モード情報が示す予測モードによって、前記符号化対象のブロックをフレーム内予測符号化する場合の第一の予測画像を生成し、
前記符号化対象のブロックと前記第一の予測画像の対応する画素値の間の差分を示す第一の評価値を計算し、
前記第一の評価値に基づき、前記予測モード情報が示す予測モードを選択し、
前記選択された予測モードの予測方向に隣接する予測方向をもつ予測モードによって、前記符号化対象のブロックをフレーム内予測符号化する場合の第二の予測画像を生成し、
前記符号化対象のブロックと前記第二の予測画像の対応する画素値の間の差分を示す第二の評価値を計算し、
前記第一および第二の評価値に基づき、前記符号化対象のブロックの予測モードを設定することを特徴とする画像処理方法。
An image processing method for encoding a frame of a moving image in units of blocks,
Obtain prediction mode information of multiple encoded blocks adjacent to the block to be encoded,
According to a prediction mode indicated by the prediction mode information, a first prediction image in the case where the block to be encoded is subjected to intraframe prediction encoding is generated,
Calculating a first evaluation value indicating a difference between a corresponding pixel value of the block to be encoded and the first predicted image;
Based on the first evaluation value, select a prediction mode indicated by the prediction mode information,
Generating a second prediction image in a case where the block to be encoded is subjected to intraframe prediction encoding by a prediction mode having a prediction direction adjacent to the prediction direction of the selected prediction mode;
Calculating a second evaluation value indicating a difference between a corresponding pixel value of the block to be encoded and the second predicted image;
An image processing method comprising: setting a prediction mode of the encoding target block based on the first and second evaluation values.
動画像のフレームをブロック単位に符号化する画像処理方法であって、
符号化対象のブロックの所定画素の値を取得し、
前記所定画素の値の組み合わせに基づき、前記符号化ブロックをフレーム内予測符号化する場合の予測モードを設定することを特徴とする画像処理方法。
An image processing method for encoding a frame of a moving image in units of blocks,
Get the value of the specified pixel of the block to be encoded,
An image processing method, comprising: setting a prediction mode for intra-frame predictive encoding of the encoded block based on a combination of the predetermined pixel values.
動画像のフレームをブロック単位に符号化する画像処理方法であって、
符号化対象のブロックの所定画素の値を取得し、
前記所定画素の値の組み合わせに基づき、前記符号化ブロックをフレーム内予測符号化する場合の複数の予測モードを選択し、
前記複数の予測モードそれぞれに対応する複数の予測画像を生成し、
前記符号化対象のブロックと前記複数の予測画像の対応する画素値の間の差分を示す評価値を計算し、
前記複数の予測モードそれぞれに対応する評価値に基づき、前記符号化対象のブロックの予測モードを設定することを特徴とする画像処理方法。
An image processing method for encoding a frame of a moving image in units of blocks,
Get the value of the specified pixel of the block to be encoded,
Based on a combination of the predetermined pixel values, select a plurality of prediction modes when the encoded block is subjected to intraframe predictive encoding,
Generating a plurality of prediction images corresponding to each of the plurality of prediction modes;
Calculating an evaluation value indicating a difference between corresponding block values of the encoding target block and the plurality of predicted images;
An image processing method, comprising: setting a prediction mode of the encoding target block based on an evaluation value corresponding to each of the plurality of prediction modes.
コンピュータ装置を制御して、請求項1から請求項11の何れか一項に記載された画像処理装置の各手段として機能させることを特徴とするコンピュータプログラム。   12. A computer program for controlling a computer device to function as each unit of the image processing device according to any one of claims 1 to 11. 請求項17に記載されたコンピュータプログラムが記録されたことを特徴とするコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium on which the computer program according to claim 17 is recorded.
JP2007125956A 2007-05-10 2007-05-10 Image processing apparatus and method Expired - Fee Related JP4921240B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007125956A JP4921240B2 (en) 2007-05-10 2007-05-10 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007125956A JP4921240B2 (en) 2007-05-10 2007-05-10 Image processing apparatus and method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2011155934A Division JP2011205711A (en) 2011-07-14 2011-07-14 Image processor and method thereof

Publications (3)

Publication Number Publication Date
JP2008283481A true JP2008283481A (en) 2008-11-20
JP2008283481A5 JP2008283481A5 (en) 2010-06-24
JP4921240B2 JP4921240B2 (en) 2012-04-25

Family

ID=40143922

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007125956A Expired - Fee Related JP4921240B2 (en) 2007-05-10 2007-05-10 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4921240B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011199629A (en) * 2010-03-19 2011-10-06 Fujitsu Ltd Moving image coding apparatus, moving image coding method, moving image coding computer program and video transmission device
JP2015179944A (en) * 2014-03-19 2015-10-08 日本電信電話株式会社 Method and program for determining intra-prediction direction
JP2016511975A (en) * 2013-02-01 2016-04-21 クゥアルコム・インコーポレイテッドQualcomm Incorporated Simplified mode decision for intra prediction
JP2020519186A (en) * 2017-09-28 2020-06-25 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Intra-frame prediction method, device, video coding device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004304724A (en) * 2003-04-01 2004-10-28 Sony Corp Image processing apparatus, its method and encoder
JP2005160048A (en) * 2003-10-28 2005-06-16 Matsushita Electric Ind Co Ltd Intra-picture prediction coding method
JP2006246431A (en) * 2005-02-07 2006-09-14 Matsushita Electric Ind Co Ltd Image coding apparatus and method
JP2007104117A (en) * 2005-09-30 2007-04-19 Seiko Epson Corp Image processing apparatus and program for allowing computer to execute image processing method
JP2008048065A (en) * 2006-08-11 2008-02-28 Toshiba Corp Moving image encoding apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004304724A (en) * 2003-04-01 2004-10-28 Sony Corp Image processing apparatus, its method and encoder
JP2005160048A (en) * 2003-10-28 2005-06-16 Matsushita Electric Ind Co Ltd Intra-picture prediction coding method
JP2006246431A (en) * 2005-02-07 2006-09-14 Matsushita Electric Ind Co Ltd Image coding apparatus and method
JP2007104117A (en) * 2005-09-30 2007-04-19 Seiko Epson Corp Image processing apparatus and program for allowing computer to execute image processing method
JP2008048065A (en) * 2006-08-11 2008-02-28 Toshiba Corp Moving image encoding apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011199629A (en) * 2010-03-19 2011-10-06 Fujitsu Ltd Moving image coding apparatus, moving image coding method, moving image coding computer program and video transmission device
JP2016511975A (en) * 2013-02-01 2016-04-21 クゥアルコム・インコーポレイテッドQualcomm Incorporated Simplified mode decision for intra prediction
JP2015179944A (en) * 2014-03-19 2015-10-08 日本電信電話株式会社 Method and program for determining intra-prediction direction
JP2020519186A (en) * 2017-09-28 2020-06-25 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Intra-frame prediction method, device, video coding device, and storage medium
US11363276B2 (en) 2017-09-28 2022-06-14 Tencent Technology (Shenzhen) Company Limited Intra-frame prediction method and apparatus, video coding device, and storage medium

Also Published As

Publication number Publication date
JP4921240B2 (en) 2012-04-25

Similar Documents

Publication Publication Date Title
JP6686206B2 (en) Image coding device, image coding method and program, image decoding device, image decoding method and program
US9883186B2 (en) Method and apparatus for encoding/decoding motion vector
US10212452B2 (en) Method and apparatus for encoding and decoding image through intra prediction
US8837840B2 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
JP4528694B2 (en) Video encoding device
JP5111127B2 (en) Moving picture coding apparatus, control method therefor, and computer program
JP4921240B2 (en) Image processing apparatus and method
CN106028031B (en) Video encoding device and method, video decoding device and method
US8649615B2 (en) Moving picture compression coding apparatus
US9319680B2 (en) Image encoding apparatus and its control method
TWI600327B (en) Receiving device, transmitting device, and video transmitting method
JP2011205711A (en) Image processor and method thereof
JP2019102861A (en) Moving image encoding device, moving image encoding method, and moving image encoding program
JP2008193501A (en) Image encoding device and image encoding method
JP2009049513A (en) Moving picture encoding device and moving picture encoding method
JP4008846B2 (en) Image encoding apparatus, image encoding method, image encoding program, and recording medium recording the program
JP2023063113A (en) Encoding device and method, and electronic apparatus

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100510

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100510

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110510

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110520

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110714

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120106

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120202

R151 Written notification of patent or utility model registration

Ref document number: 4921240

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20150210

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees