JP2008283402A - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP2008283402A
JP2008283402A JP2007125024A JP2007125024A JP2008283402A JP 2008283402 A JP2008283402 A JP 2008283402A JP 2007125024 A JP2007125024 A JP 2007125024A JP 2007125024 A JP2007125024 A JP 2007125024A JP 2008283402 A JP2008283402 A JP 2008283402A
Authority
JP
Japan
Prior art keywords
prediction
block
image
encoding
image processing
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
JP2007125024A
Other languages
Japanese (ja)
Other versions
JP2008283402A5 (en
JP4921239B2 (en
Inventor
Tadashi Ohira
正 大平
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 JP2007125024A priority Critical patent/JP4921239B2/en
Publication of JP2008283402A publication Critical patent/JP2008283402A/en
Publication of JP2008283402A5 publication Critical patent/JP2008283402A5/ja
Application granted granted Critical
Publication of JP4921239B2 publication Critical patent/JP4921239B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To set a suitable prediction mode from many prediction modes by suppressing processing loads when performing intra-frame prediction encoding. <P>SOLUTION: A block divider 11 divides an encoding object block into sub blocks in two or more sizes. A measuring unit 12 calculates the feature quantity of the image of the sub block and determines a prediction block size to be used when performing the intra-frame prediction encoding of the encoding object block on the basis of the feature quantity. A prediction mode judging unit 14, 16 or 18 sets the prediction mode of a prediction image for the infra-frame prediction encoding on the basis of the feature quantity of the sub block smaller than the prediction block size. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

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

動画像の符号化方式として、フレーム内符号化方式であるMotion JPEGやDigital Videoなどの符号化方式や、フレーム間予測符号化を用いたH.261、H.263、MPEG-1、MPEG-2が知られている。近年ではH.264などの符号化方式も知られている。これらは、ISO (International Organization for Standardization)やITU (International Telecommunication Union)によって国際標準化されている。   As a moving image encoding method, an intra-frame encoding method such as Motion JPEG or Digital Video, or H.261, H.263, MPEG-1, or MPEG-2 using inter-frame predictive encoding is used. It has been known. In recent years, encoding schemes such as H.264 are also known. These are internationally standardized by ISO (International Organization for Standardization) and ITU (International Telecommunication Union).

フレーム内符号化方式は、フレーム単位に独立に符号化を行う方式で、フレームの管理が容易なため、動画像の編集や特殊再生が必要な装置に最適である。また、フレーム間予測符号化方式は、フレーム間の画像の差分に基づくフレーム間予測を用いるため、高能率符号化という特徴をもつ。   The intra-frame coding method is a method of performing coding independently for each frame, and is easy to manage the frame, so that it is most suitable for an apparatus that requires editing of moving images and special reproduction. In addition, the inter-frame predictive coding scheme has a feature of high-efficiency coding because it uses inter-frame prediction based on the image difference between frames.

H.264方式は、フレーム内符号化およびフレーム間予測符号化ともに、現ブロックの画像と予測画像のブロックの画像の差分画像を符号化することで、従来の符号化方式よりも高能率符号化を実現する。   The H.264 method encodes the difference image between the current block image and the predicted image block image for both intra-frame coding and inter-frame prediction coding, thereby enabling more efficient coding than the conventional coding method. Is realized.

H.264方式のフレーム内符号化は、符号化対象のm×n画素のブロック(通常は16×16画素)に対する予測画像を、符号化対象ブロックと同一フレーム内の、符号化済みの画像を復号した画素(局所復号画像)を用いて予測するイントラ予測を行う。   H.264 intra-frame coding is a method that uses a predicted image for an m × n pixel block (usually 16 × 16 pixels) to be encoded as an encoded image in the same frame as the encoding target block. Intra prediction is performed using the decoded pixel (local decoded image).

H.264の場合、イントラ予測に使用する複数の予測モードが存在する。イントラ予測によるフレーム内予測符号化では、符号化対象ブロックに対し、一つのイントラ予測モードを用いて予測画像を生成し、予測画像とブロックの画像の差分画像およびイントラ予測モードを示す情報を符号化することで符号化を行う。   In the case of H.264, there are a plurality of prediction modes used for intra prediction. In intra-frame predictive coding based on intra prediction, a prediction image is generated for a block to be encoded using one intra prediction mode, and a difference image between the prediction image and the block image and information indicating the intra prediction mode are encoded. By doing so, encoding is performed.

H.264におけるイントラ予測は、符号化対象ブロックの周辺の、局所復号画像の画素を用いて空間予測を行い、符号化対象ブロックに対応する予測画像を生成する。   In intra prediction in H.264, spatial prediction is performed using pixels of a locally decoded image around a block to be encoded, and a predicted image corresponding to the block to be encoded is generated.

図1と図2はイントラ予測モードを説明する図である。   1 and 2 are diagrams for explaining the intra prediction mode.

例えば、16×16画素のブロックに対してイントラ予測モードは四種類存在する。図1(a)は垂直方向予測モード(予測モード0)を示し、符号化対象ブロックの上に隣接する16個の復号画素を用いて、符号化対象ブロックの予測画像を生成する。   For example, there are four types of intra prediction modes for a block of 16 × 16 pixels. FIG. 1A shows a vertical prediction mode (prediction mode 0), and a prediction image of a coding target block is generated using 16 decoded pixels adjacent on the coding target block.

図1(b)は水平方向予測モード(予測モード1)を示し、符号化対象ブロックの左に隣接する16個の復号画素を用いて、符号化対象ブロックに対応する予測画像を生成する。   FIG. 1B shows a horizontal prediction mode (prediction mode 1), and a prediction image corresponding to the encoding target block is generated using 16 decoded pixels adjacent to the left of the encoding target block.

図1(c)はDC予測モード(予測モード2)を示し、符号化対象ブロックの左と上に隣接する32個の復号画素を用いて、符号化対象ブロックの予測画像を生成する。つまり、32画素の平均値を符号化対象ブロックの予測画素にする。   FIG. 1 (c) shows a DC prediction mode (prediction mode 2), which generates a predicted image of the encoding target block using 32 decoded pixels adjacent to the left and above the encoding target block. That is, the average value of 32 pixels is used as the prediction pixel of the encoding target block.

図1(d)は平面予測モード(予測モード3)を示し、符号化対象ブロックの左と上に隣接する32個の復号画素を使用して、符号化対象ブロックの予測画像を生成する。   FIG. 1 (d) shows a planar prediction mode (prediction mode 3), which generates a predicted image of the encoding target block using 32 decoded pixels adjacent to the left and above the encoding target block.

また、4×4画素のブロックに対してイントラ予測モードは九種類存在する。図2(a)は垂直方向予測モード(予測モード0)を示し、符号化対象ブロックの上に隣接する四つの復号画素を用いて、符号化対象ブロックの予測画像を生成する。   Nine types of intra prediction modes exist for a 4 × 4 pixel block. FIG. 2 (a) shows the vertical prediction mode (prediction mode 0), and a prediction image of the encoding target block is generated using four decoding pixels adjacent on the encoding target block.

図2(b)は水平方向予測モード(予測モード1)を示し、符号化対象ブロックの左に隣接する四つの復号画素を用いて、符号化対象ブロックの予測画像を生成する。   FIG. 2B shows a horizontal prediction mode (prediction mode 1), and a prediction image of the encoding target block is generated using four decoded pixels adjacent to the left of the encoding target block.

図2(c)はDC予測モード(予測モード2)を示し、符号化対象ブロックの左と上に隣接する八つの復号画素を用いて、符号化対象ブロックの予測画像を生成する。つまり、八画素の平均値を符号化対象ブロックの予測画素にする。   FIG. 2 (c) shows a DC prediction mode (prediction mode 2), and a prediction image of the encoding target block is generated using eight decoded pixels adjacent to the left and above the encoding target block. That is, the average value of eight pixels is used as the prediction pixel of the encoding target block.

さらに、図2(d)〜(i)に示す、斜め左下方向(予測モード3)、斜め右下方向(予測モード4)、斜めやや右下方向(予測モード5)、水平やや下方向(予測モード6)、斜めやや左下方向(予測モード7)、水平やや上方向(予測モード8)がある。つまり、八つの予測方向の予測モードと、DC予測モードの合計九種類のイントラ予測モードが存在する。   Furthermore, as shown in FIGS. 2 (d) to (i), the diagonally lower left direction (prediction mode 3), the diagonally lower right direction (prediction mode 4), the diagonally lower right direction (prediction mode 5), and the horizontal slightly downward direction (prediction) Mode 6), diagonally slightly lower left (prediction mode 7), horizontal slightly upward (prediction mode 8). That is, there are a total of nine types of intra prediction modes, that is, prediction modes in eight prediction directions and DC prediction modes.

また、8×8画素のブロックに対しては、4×4画素のブロックと同様に、九種類のイントラ予測モードが存在する。このように、複雑なイントラ予測を行うH.264は、従来の符号化方式よりも高能率符号化を実現する。   In addition, for an 8 × 8 pixel block, nine types of intra prediction modes exist as in the 4 × 4 pixel block. As described above, H.264 that performs complicated intra prediction realizes higher efficiency encoding than the conventional encoding scheme.

イントラ予測処理は、最後に予測モードを決定することを目的とする。予測画像と符号化対象ブロックの画像の差分画素が示す予測誤差を最小にする予測モードを見付けるには、全予測モードについて予測誤差を算出し、予測誤差が最小の予測モードを探せばよい。さらに精度を上げるならば、全予測モードについて発生符号量を算出し、符号量が最小の予測モードを探せばよい。   The purpose of the intra prediction process is to finally determine the prediction mode. In order to find the prediction mode that minimizes the prediction error indicated by the difference pixel between the prediction image and the image of the encoding target block, it is only necessary to calculate the prediction error for all prediction modes and find the prediction mode with the smallest prediction error. In order to further improve the accuracy, the generated code amount is calculated for all prediction modes, and the prediction mode with the minimum code amount may be searched.

しかし、予測誤差または発生符号量が最小の予測モードを探すために、言い換えれば高画質化のために、多数の予測モードの予測誤差または発生符号量を計算することは、予測モードを決定するまでの処理負荷を大きくし、リアルタイム処理を困難にする。一方、イントラ予測処理を安易に省略すれば、予測精度が低下して符号量が削減できず、結果として、画質が低下する。   However, in order to search for a prediction mode with the smallest prediction error or generated code amount, in other words, to improve the image quality, calculating the prediction error or generated code amount of a large number of prediction modes until the prediction mode is determined. The processing load is increased, making real-time processing difficult. On the other hand, if the intra prediction process is easily omitted, the prediction accuracy is lowered and the code amount cannot be reduced, and as a result, the image quality is lowered.

特開2004-304724公報JP2004-304724 INTERNATIONAL STANDARD ISO/IEC, 14496-10: Information technology - Coding of audio-visual objects―Part 10 : Advanced video codingINTERNATIONAL STANDARD ISO / IEC, 14496-10: Information technology-Coding of audio-visual objects―Part 10: Advanced video coding

本発明は、フレーム内予測符号化する場合に、処理負荷を抑えて、多数の予測モードから好適な予測モードを設定することを目的とする。   An object of the present invention is to set a suitable prediction mode from a large number of prediction modes while suppressing the processing load when performing intraframe prediction encoding.

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

本発明にかかる画像処理装置は、動画像のフレームをブロック単位に符号化する画像処理装置であって、符号化対象ブロックを複数のサイズのサブブロックに分割する分割手段と、前記サブブロックの画像の特徴量を計算する計算手段と、前記特徴量に基づき、前記符号化対象ブロックをフレーム内予測符号化する場合の予測ブロックサイズを決定する決定手段と、前記予測ブロックサイズより小さいサブブロックの特徴量に基づき、前記フレーム内予測符号化に用いる予測画像の予測モードを設定する設定手段とを有することを特徴とする。   An image processing apparatus according to the present invention is an image processing apparatus that encodes a frame of a moving image in block units, a dividing unit that divides an encoding target block into a plurality of sub-blocks, and an image of the sub-block. Calculating means for calculating a feature amount of the subblock, determining means for determining a prediction block size when intra-frame predictive coding is performed on the encoding target block based on the feature amount, and features of sub-blocks smaller than the prediction block size And setting means for setting a prediction mode of a prediction image used for the intra-frame prediction encoding based on the amount.

本発明にかかる画像処理方法は、動画像のフレームをブロック単位に符号化する画像処理方法であって、符号化対象ブロックを複数のサイズのサブブロックに分割し、前記サブブロックの画像の特徴量を計算し、前記特徴量に基づき、前記符号化対象ブロックをフレーム内予測符号化する場合の予測ブロックサイズを決定し、前記予測ブロックサイズより小さいサブブロックの特徴量に基づき、前記フレーム内予測符号化に用いる予測画像の予測モードを設定することを特徴とする。   An image processing method according to the present invention is an image processing method for encoding a frame of a moving image in units of blocks, wherein the encoding target block is divided into a plurality of sub-blocks, and the feature amount of the image of the sub-block And calculating a prediction block size when the encoding target block is subjected to intraframe prediction encoding based on the feature amount, and determining the intraframe prediction code based on a subblock feature amount smaller than the prediction block size. The prediction mode of the prediction image used for conversion is set.

本発明によれば、フレーム内予測符号化する場合に、処理負荷を抑えて、多数の予測モードから好適な予測モードを設定することができる。   ADVANTAGE OF THE INVENTION According to this invention, when performing intra-frame prediction encoding, a suitable prediction mode can be set from many prediction modes, suppressing processing load.

以下、本発明にかかる実施例の画像処理を図面を参照して詳細に説明する。なお、以下では、16×16画素のブロックを説明するが、4×4画素のブロックや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 16 × 16 pixel block will be described, but the same processing can be performed for a 4 × 4 pixel block and an 8 × 8 pixel block.

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

減算器101は、符号化対象のフレーム(以下、現フレーム)の符号化対象のブロック(以下、現ブロック)の画像と、予測画像の差分を計算して、差分画像を出力する。直交変換(DCT)部102は、差分画像を直交変換する。量子化部103は、直交変換係数を量子化する。可変長符号化部104は、ハフマン符号化や算術符号化を使用して、量子化された直交変換係数から符号を生成する。   The subtractor 101 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 102 orthogonally transforms the difference image. The quantization unit 103 quantizes the orthogonal transform coefficient. The variable length coding unit 104 generates a code from the quantized orthogonal transform coefficient using Huffman coding or arithmetic coding.

予測画像の生成には、既に符号化したデータを局所的に復号した画像(以下、局所復号画像)を用いる。逆量子化部106は、量子化された直交変換係数を逆量子化する。逆DCT部107は、逆量子化によって得られた直交変換係数を逆DCTして、局所復号画像を生成する。加算器117は、フレーム間予測符号化の場合、逆DCT部107が出力する画像と、予測画像を加算する。ブロック歪除去部111は、ブロック歪と呼ばれる量子化ステップが大きい場合に発生し易い視覚的な劣化を抑制する。上記の復号処理は、ローカルデコードとも呼ばれる。フレームメモリ(FM)113は、ローカルデコードした画像を一時記憶する。   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 106 inversely quantizes the quantized orthogonal transform coefficient. The inverse DCT unit 107 performs inverse DCT on the orthogonal transform coefficient obtained by inverse quantization to generate a local decoded image. In the case of inter-frame predictive coding, the adder 117 adds the image output from the inverse DCT unit 107 and the predicted image. The block distortion removing unit 111 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) 113 temporarily stores locally decoded images.

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

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

モード判定部105は、現フレームをフレーム内予測符号化するか、フレーム間予測符号化するかを判定し、判定結果に応じてスイッチ108と109を制御する。フレーム内予測符号化するイントラピクチャ(Iピクチャ)の場合、スイッチ109を介してイントラ予測部110の予測画像が減算器101に入力される。また、スイッチ108はオープンである。一方、フレーム間予測符号化する予測ピクチャ(Pピクチャ)または双方向予測ピクチャ(Bピクチャ)の場合、スイッチ109を介して、動き補償部110の予測画像が減算器101に入力される。また、スイッチ108を介して、動き補償部110の予測画像が加算器117に入力される。   The mode determination unit 105 determines whether the current frame is subjected to intraframe prediction encoding or interframe prediction encoding, and controls the switches 108 and 109 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 110 is input to the subtractor 101 via the switch 109. The switch 108 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 110 is input to the subtractor 101 via the switch 109. Also, the predicted image of the motion compensation unit 110 is input to the adder 117 via the switch 108.

このように、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はエンコーダをコンピュータ装置1100で実現する例を説明するブロック図である。   FIG. 11 is a block diagram for explaining an example in which the encoder is realized by the computer apparatus 1100.

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

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

コンピュータ装置1100は、入力装置1003から入力されるビデオデータ、または、HDD 1006に格納されたビデオデータをモニタ1005に表示する。あるいは、ビデオデータを符号化して、出力装置1004に出力したり、ネットワーク1008を介してサーバやクライアントに伝送する。   The computer device 1100 displays video data input from the input device 1003 or video data stored in the HDD 1006 on the monitor 1005. Alternatively, the video data is encoded and output to the output device 1004 or transmitted to the server or client via the network 1008.

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

ブロック分割器11は、現ブロックの画像(以下、現画像)を入力して、ブロックサイズが2×2、4×4、8×8画素のサブブロックに分割する。測定器12は、4×4、8×8画素の画像と閾値α、β、γを入力して、現ブロックの特徴量を測定し、予測ブロックサイズを決定して、特徴量とブロックサイズ決定情報を出力する。閾値α、β、γは、入力された画像に依存するので、統計的もしくは経験的に求めることが好ましい。例えば、対象画像がほぼ平坦な画像である場合はα:1200、β:2500、γ:90などである。セレクタ13は、測定器12のブロックサイズ決定情報に対応するモード判定器および予測器を動作させる。   The block divider 11 inputs an image of the current block (hereinafter, the current image) and divides it into sub-blocks having block sizes of 2 × 2, 4 × 4, and 8 × 8 pixels. The measuring instrument 12 inputs 4 × 4, 8 × 8 pixel images and threshold values α, β, γ, measures the feature amount of the current block, determines the predicted block size, and determines the feature amount and block size. Output information. Since the threshold values α, β, and γ depend on the input image, it is preferable to obtain them statistically or empirically. For example, when the target image is a substantially flat image, α is 1200, β is 2500, γ is 90, and the like. The selector 13 operates a mode determiner and a predictor corresponding to the block size determination information of the measuring device 12.

4×4モード判定器14は、測定器12から特徴量を入力し、4×4ブロックサイズにおける予測モードを判定する。4×4予測器15は、4×4モード判定器13が判定した予測モードに従い、FM 113の局所復号画像から4×4画素サイズの予測画像を生成し、4×4予測モードを示す情報と予測画像を出力する。つまり、現ブロック当り、16組の4×4予測モードを示す情報と予測画像を出力する。なお、4×4モード判定器14と4×4予測器15は、ブロックサイズ決定情報が4×4を示す場合に、セレクタ13によって動作する。   The 4 × 4 mode determiner 14 receives the feature amount from the measuring device 12 and determines the prediction mode in the 4 × 4 block size. The 4 × 4 predictor 15 generates a 4 × 4 pixel size predicted image from the local decoded image of the FM 113 according to the prediction mode determined by the 4 × 4 mode determiner 13, and indicates information indicating the 4 × 4 prediction mode. Output a predicted image. That is, information indicating 16 sets of 4 × 4 prediction modes and a prediction image are output per current block. The 4 × 4 mode determiner 14 and the 4 × 4 predictor 15 are operated by the selector 13 when the block size determination information indicates 4 × 4.

8×8モード判定器16は、測定器12から特徴量を入力し、8×8ブロックサイズにおける予測モードを判定する。8×8予測器17は、8×8モード判定器16が判定した予測モードに従い、FM 113の局所復号画像から8×8画素サイズの予測画像を生成し、8×8予測モードを示す情報と予測画像を出力する。つまり、現ブロック当り、四組の4×4予測モードを示す情報と予測画像を出力する。なお、8×8モード判定器16と8×8予測器17は、ブロックサイズ決定情報が8×8を示す場合に、セレクタ13によって動作する。   The 8 × 8 mode determiner 16 receives the feature amount from the measuring device 12 and determines the prediction mode in the 8 × 8 block size. The 8 × 8 predictor 17 generates an 8 × 8 pixel size predicted image from the FM 113 local decoded image according to the prediction mode determined by the 8 × 8 mode determiner 16, and indicates the 8 × 8 prediction mode. Output a predicted image. That is, for each current block, information indicating four sets of 4 × 4 prediction modes and a prediction image are output. The 8 × 8 mode determiner 16 and the 8 × 8 predictor 17 are operated by the selector 13 when the block size determination information indicates 8 × 8.

16×16モード判定器18は、測定器12から特徴量を入力し、16×16ブロックサイズにおける予測モードを判定する。16×16予測器19は、16×16モード判定器18が判定した予測モードに従い、FM 113の局所復号画像から16×16画素サイズの予測画像を生成し、16×16予測モードを示す情報と予測画像を出力する。なお、16×16モード判定器18と16×16予測器19は、ブロックサイズ決定情報が16×16を示す場合に、セレクタ13によって動作する。   The 16 × 16 mode determiner 18 receives the feature amount from the measuring device 12 and determines the prediction mode in the 16 × 16 block size. The 16 × 16 predictor 19 generates a 16 × 16 pixel size predicted image from the locally decoded image of the FM 113 according to the prediction mode determined by the 16 × 16 mode determiner 18, and indicates information indicating the 16 × 16 prediction mode. Output a predicted image. The 16 × 16 mode determiner 18 and the 16 × 16 predictor 19 are operated by the selector 13 when the block size determination information indicates 16 × 16.

●測定器
図5は測定器12の構成例を示すブロック図である。
Measuring Instrument FIG. 5 is a block diagram showing a configuration example of the measuring instrument 12.

特徴算出器20は、詳細は後述するが、4×4画素のブロック(以下、4×4サブブロック)、つまり16個のサブブロックそれぞれの画素値の総和を計算し、16個の総和の分散値Aを計算する。さらに、8×8画素のブロック(以下、8×8サブブロック)、つまり四個のサブブロックそれぞれの画素値の総和を計算し、四個の総和の分散値Bを計算する。   As will be described in detail later, the feature calculator 20 calculates the sum of pixel values of 4 × 4 pixel blocks (hereinafter referred to as 4 × 4 sub-blocks), that is, 16 sub-blocks, and distributes the 16 sums. Calculate the value A. Further, the sum of pixel values of an 8 × 8 pixel block (hereinafter, 8 × 8 sub-block), that is, four sub-blocks is calculated, and a variance value B of the four sums is calculated.

閾値比較器21は、詳細は後述するが、特徴算出器20から入力した特徴量(分散値AとB)と、閾値αとβを比較して予測ブロックサイズを決定し、ブロックサイズ決定情報と閾値γを出力する。特徴算出器22は、詳細は後述するが、予測ブロックサイズに依存した特徴量を計算し出力する。   Although details will be described later, the threshold comparator 21 determines the predicted block size by comparing the feature amounts (variance values A and B) input from the feature calculator 20 with the threshold values α and β, and block size determination information The threshold value γ is output. As will be described in detail later, the feature calculator 22 calculates and outputs a feature amount that depends on the predicted block size.

[イントラ予測部の動作]
図6はイントラ予測部110の動作を説明するフローチャートで、1ブロック分の処理を示す。
[Operation of intra prediction unit]
FIG. 6 is a flowchart for explaining the operation of the intra prediction unit 110, and shows processing for one block.

イントラ予測部110は、現画像と閾値α、β、γを入力し(S10)、ブロック分割器11により現画像を2×2、4×4、8×8のサブブロックに分割する(S11)。そして、4×4と8×8のサブブロックの特徴量(分散値A、B)を計算して、特徴量と閾値α、βから予測ブロックサイズを決定する(S12)。ブロックサイズ決定情報はセレクタ13へ、特徴量と閾値γは4×4モード判定器14、8×8モード判定器16、16×16モード判定器18へ入力される(S13)。   The intra prediction unit 110 inputs the current image and threshold values α, β, and γ (S10), and the block divider 11 divides the current image into 2 × 2, 4 × 4, and 8 × 8 sub-blocks (S11). . Then, the feature amounts (variance values A and B) of the 4 × 4 and 8 × 8 sub-blocks are calculated, and the predicted block size is determined from the feature amounts and the threshold values α and β (S12). The block size determination information is input to the selector 13, and the feature value and the threshold γ are input to the 4 × 4 mode determiner 14, the 8 × 8 mode determiner 16, and the 16 × 16 mode determiner 18 (S13).

次に、イントラ予測部110は、ブロックサイズ決定情報が4×4を示す否かを判定し(S14)、4×4を示す場合は、16個の4×4サブブロックに対して、上記の4×4モード判定器14と4×4予測器15による処理を行う(S16)。   Next, the intra prediction unit 110 determines whether or not the block size determination information indicates 4 × 4 (S14), and when 4 × 4 is indicated, for the 16 4 × 4 sub-blocks, the intra prediction unit 110 determines whether the block size determination information indicates 4 × 4 or not. Processing by the 4 × 4 mode determiner 14 and the 4 × 4 predictor 15 is performed (S16).

また、イントラ予測部110は、ブロックサイズ決定情報が8×8を示す否かを判定し(S15)、8×8を示す場合は、四個の8×8サブブロックに対して、上記の8×8モード判定器16と8×8予測器17による処理を行う(S17)。   Further, the intra prediction unit 110 determines whether or not the block size determination information indicates 8 × 8 (S15), and when 8 × 8 is indicated, for the 8 × 8 sub-blocks, the 8 Processing by the × 8 mode determiner 16 and the 8 × 8 predictor 17 is performed (S17).

また、ブロックサイズ決定情報が4×4、8×8を示さない場合、イントラ予測部110は、16×16画素の現ブロックに対して、上記の16×16モード判定器18と16×16予測器19による処理を行う(S18)。   If the block size determination information does not indicate 4 × 4 or 8 × 8, the intra prediction unit 110 performs the above 16 × 16 mode determination unit 18 and 16 × 16 prediction on the current block of 16 × 16 pixels. The processing by the device 19 is performed (S18).

●測定器の動作
図7は測定器12の動作を説明するフローチャートである。
FIG. 7 is a flowchart for explaining the operation of the measuring instrument 12.

測定器12は、サブブロックと閾値α、β、γを入力し(S100)、特徴算出器20により、分散値Aを計算し(S101)、分散値Bを計算する(S102)。そして、閾値比較器21により、分散値Aと閾値αを比較して(S103)、A>αであれば4×4を示すブロックサイズ決定情報と閾値γを出力する(S105)。そして、特徴算出器22により、64個の2×2画素のサブブロック(以下、2×2サブブロック)それぞれの画素値の総和と、上下左右に隣接する四個の2×2サブブロック間の分散値Cを計算し、総和と分散値Cを出力する(S106)。なお、分散値Cは、現ブロックに対して16個出力される。   The measuring device 12 inputs the sub-block and the threshold values α, β, and γ (S100), the feature calculator 20 calculates the variance value A (S101), and calculates the variance value B (S102). Then, the threshold value comparator 21 compares the variance value A with the threshold value α (S103), and if A> α, outputs block size determination information indicating 4 × 4 and the threshold value γ (S105). Then, by the feature calculator 22, the sum of the pixel values of each of the 64 2 × 2 pixel sub-blocks (hereinafter referred to as 2 × 2 sub-blocks) and the four 2 × 2 sub-blocks adjacent to each other vertically and horizontally The variance value C is calculated, and the sum and the variance value C are output (S106). Note that 16 variance values C are output for the current block.

A≦αの場合、測定器12は、分散値Bと閾値βを比較して(S104)、B<βであれば8×8を示すブロックサイズ決定情報と閾値γを出力する(S107)。そして、特徴量算出器22により、16個の4×4サブブロックそれぞれの画素値の総和と、上下左右に隣接する四個の4×4サブブロック間の分散値Dを計算し、総和と分散値Dを出力する(S108)。なお、分散値Dは、現ブロックに対して四個出力される。   When A ≦ α, the measuring device 12 compares the variance value B with the threshold value β (S104), and if B <β, outputs the block size determination information indicating 8 × 8 and the threshold value γ (S107). Then, the feature amount calculator 22 calculates the sum of the pixel values of each of the 16 4 × 4 sub-blocks and the variance value D between the four 4 × 4 sub-blocks adjacent to the top, bottom, left, and right. The value D is output (S108). Note that four variance values D are output for the current block.

また、A≦αかつB≧βの場合、測定器12は、16×16を示すブロックサイズ決定情報と閾値γを出力する(S109)。そして、特徴量算出器20が計算した、四個の8×8サブブロックそれぞれの画素値の総和と、分散値Bを出力する(S110)。なお、分散値Bは、現ブロックに対して一個出力される。   If A ≦ α and B ≧ β, the measuring device 12 outputs block size determination information indicating 16 × 16 and a threshold value γ (S109). Then, the sum of the pixel values of each of the four 8 × 8 sub-blocks calculated by the feature amount calculator 20 and the variance value B are output (S110). One variance value B is output for the current block.

●4×4予測モード判定器の動作
図8は4×4予測モード判定器14の動作を説明するフローチャートである。
FIG. 8 is a flowchart for explaining the operation of the 4 × 4 prediction mode determiner 14.

4×4予測モード判定器14は、閾値γを入力し(S200)、カウンタiを0にリセットする(S201)。そして、i番目の4×4サブブロックが含む四個の2×2サブブロックそれぞれの画素値の総和a、b、c、dと、それらサブブロック間の分散値C[i]を入力する(S202)。なお、総和a、b、c、dとサブブロックの関係は下記のとおりである。
┌─┬─┐
│ a│ b│
├─┼─┤
│ c│ d│
└─┴─┘
The 4 × 4 prediction mode determination unit 14 inputs the threshold value γ (S200), and resets the counter i to 0 (S201). Then, the sum of pixel values a, b, c, d of the four 2 × 2 sub-blocks included in the i-th 4 × 4 sub-block and the variance value C [i] between these sub-blocks are input ( S202). The relationship between the sums a, b, c, d and the sub-blocks is as follows.
┌─┬─┐
│ a│ b│
├─┼─┤
│ c│ d│
└─┴─┘

次に、4×4予測モード判定器14は、γとC[i]を比較して(S203)、C[i]<γであれば、予測モード2を出力する(S205)。一方、γ≧C[i]であれば、次の比較を行う(S204)。
|a - b|+|c - d| > |a - c|+|b - d| …(1)
Next, the 4 × 4 prediction mode determiner 14 compares γ and C [i] (S203), and outputs a prediction mode 2 if C [i] <γ (S205). On the other hand, if γ ≧ C [i], the following comparison is performed (S204).
| a-b | + | c-d |> | a-c | + | b-d |… (1)

式(1)が真ならば、4×4予測モード判定器14は、FM 113の局所復号画像から、予測モード1、6、8、3、4(水平重視)の予測画像を生成し(S206)、予測モードを選択し出力する(S207)。また、式(1)が偽ならば、FM 113の局所復号画像から、予測モード0、5、7、3、4(垂直重視)の予測画像を生成し(S208)、予測モードを選択して出力する(S209)。これらの場合、上記の五種類の予測モードの予測画像を生成して、現ブロックの画像との例えば差分絶対値和を算出し、差分絶対値和が最小の予測モードを選択することになる。   If Expression (1) is true, the 4 × 4 prediction mode determiner 14 generates a prediction image of prediction modes 1, 6, 8, 3, 4 (horizontal emphasis) from the locally decoded image of FM 113 (S206). ), The prediction mode is selected and output (S207). If the expression (1) is false, a prediction image of prediction modes 0, 5, 7, 3, 4 (vertical importance) is generated from the FM 113 local decoded image (S208), and the prediction mode is selected. Output (S209). In these cases, prediction images of the above five types of prediction modes are generated, and for example, the sum of absolute differences with the image of the current block is calculated, and the prediction mode with the smallest sum of absolute differences is selected.

次に、カウンタiをインクリメントし(S210)、i<16ならば処理をステップS202に戻し、i=16になるまで、上記の処理を繰り返す。   Next, the counter i is incremented (S210). If i <16, the process returns to step S202, and the above process is repeated until i = 16.

●8×8予測モード判定器の動作
図9は8×8予測モード判定器16の動作を説明するフローチャートである。
FIG. 9 is a flowchart for explaining the operation of the 8 × 8 prediction mode determiner 16.

8×8予測モード判定器16は、閾値γを入力し(S300)、カウンタiを0にリセットする(S301)。そして、i番目の8×8サブブロックが含む四個の4×4サブブロックそれぞれの画素値の総和a、b、c、dと、それらサブブロック間の分散値D[i]を入力する(S302)。   The 8 × 8 prediction mode determiner 16 inputs the threshold value γ (S300), and resets the counter i to 0 (S301). Then, the sum of pixel values a, b, c, d of the four 4 × 4 sub-blocks included in the i-th 8 × 8 sub-block and the variance value D [i] between these sub-blocks are input ( S302).

次に、8×8予測モード判定器16は、γとD[i]を比較して(S303)、D[i]<γであれば、予測モード2を出力する(S305)。一方、γ≧D[i]であれば、式(1)の比較を行う(S304)。   Next, the 8 × 8 prediction mode determiner 16 compares γ and D [i] (S303), and outputs a prediction mode 2 if D [i] <γ (S305). On the other hand, if γ ≧ D [i], the comparison of Expression (1) is performed (S304).

式(1)が真ならば、8×8予測モード判定器16は、FM 113の局所復号画像から、予測モード1、6、8、3、4(水平重視)の予測画像を生成し(S306)、予測モードを選択し出力する(S307)。また、式(1)が偽ならば、FM 113の局所復号画像から、予測モード0、5、7、3、4(垂直重視)の予測画像を生成し(S308)、予測モードを選択して出力する(S309)。これらの場合、上記の五種類の予測モードの予測画像を生成して、現ブロックの画像との例えば差分絶対値和を算出し、差分絶対値和が最小の予測モードを選択することになる。   If Expression (1) is true, the 8 × 8 prediction mode determiner 16 generates prediction images of prediction modes 1, 6, 8, 3, and 4 (horizontal emphasis) from the locally decoded image of FM 113 (S306). ), The prediction mode is selected and output (S307). If the expression (1) is false, a prediction image of prediction modes 0, 5, 7, 3, 4 (vertical importance) is generated from the FM 113 local decoded image (S308), and the prediction mode is selected. Output (S309). In these cases, prediction images of the above five types of prediction modes are generated, and for example, the sum of absolute differences with the image of the current block is calculated, and the prediction mode with the smallest sum of absolute differences is selected.

次に、カウンタiをインクリメントし(S310)、i<4ならば処理をステップS302に戻し、i=4になるまで、上記の処理を繰り返す。   Next, the counter i is incremented (S310), and if i <4, the process returns to step S302, and the above process is repeated until i = 4.

●16×16予測モード判定器の動作
図10は16×16予測モード判定器18の動作を説明するフローチャートである。
FIG. 10 is a flowchart for explaining the operation of the 16 × 16 prediction mode determiner 18.

16×16予測モード判定器18は、閾値γを入力する(S401)。そして、16×16サブブロックが含む四個の8×8サブブロックそれぞれの画素値の総和a、b、c、dと、それらサブブロック間の分散値Bを入力する(S402)。   The 16 × 16 prediction mode determiner 18 inputs a threshold value γ (S401). Then, the sum a, b, c, d of the pixel values of the four 8 × 8 sub-blocks included in the 16 × 16 sub-block and the variance value B between these sub-blocks are input (S402).

次に、16×16予測モード判定器18は、γとBを比較して(S403)、B<γであれば、予測モード0を出力する(S405)。一方、γ≧D[i]であれば、式(1)の比較を行う(S404)。   Next, the 16 × 16 prediction mode determiner 18 compares γ and B (S403), and outputs a prediction mode 0 if B <γ (S405). On the other hand, if γ ≧ D [i], the comparison of Expression (1) is performed (S404).

式(1)が真ならば、16×16予測モード判定器18は、FM 113の局所復号画像から、予測モード1、3(水平重視)の予測画像を生成し(S406)、予測モードを選択し出力する(S407)。また、式(1)が偽ならば、FM 113の局所復号画像から、予測モード2、3(垂直重視)の予測画像を生成し(S408)、予測モードを選択して出力する(S409)。これらの場合、上記の二種類の予測モードの予測画像を生成して、現ブロックの画像との例えば差分絶対値和を算出し、差分絶対値和が最小の予測モードを選択することになる。   If Equation (1) is true, the 16 × 16 prediction mode determiner 18 generates a prediction image of prediction modes 1 and 3 (horizontal emphasis) from the FM 113 local decoded image (S406), and selects the prediction mode And output (S407). If the expression (1) is false, a prediction image of prediction modes 2 and 3 (vertical importance) is generated from the locally decoded image of the FM 113 (S408), and the prediction mode is selected and output (S409). In these cases, a prediction image of the above two types of prediction modes is generated, for example, the sum of absolute differences with the image of the current block is calculated, and the prediction mode with the smallest sum of absolute differences is selected.

このように、多数の予測モードから好適な予測モードを選択する場合、処理量を削減し、かつ、予測精度を向上して、画質の向上を図ることができる。   As described above, when a suitable prediction mode is selected from a large number of prediction modes, it is possible to reduce the processing amount and improve the prediction accuracy, thereby improving the image quality.

以下、本発明にかかる実施例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.

[イントラ予測部]
図12は実施例2のイントラ予測部110の構成例を示すブロック図である。図4に示す構成と異なるのは、測定器12がレート制御部115から量子化パラメータQPを入力する点である。
[Intra prediction section]
FIG. 12 is a block diagram illustrating a configuration example of the intra prediction unit 110 according to the second embodiment. The difference from the configuration shown in FIG. 4 is that measuring device 12 receives quantization parameter QP from rate control section 115.

●測定器
図13は測定器12の構成例を示すブロック図である。
Measuring Instrument FIG. 13 is a block diagram showing a configuration example of the measuring instrument 12.

QPメモリ23は、直前の1フレーム分の量子化パラメータを格納する。閾値修正器24は、現ブロックの量子化ステップを入力し、現ブロックの量子化ステップとメモリ23に格納された1フレーム分の量子化ステップから、閾値α、βを修正する。   The QP memory 23 stores quantization parameters for the immediately preceding frame. The threshold value corrector 24 inputs the quantization step of the current block, and corrects the threshold values α and β from the quantization step of the current block and the quantization step for one frame stored in the memory 23.

[イントラ予測部の動作]
イントラ予測部110全体の動作は、ステップS10で現画像と閾値α、β、γ以外に量子化ステップを入力する点を除けば、実施例1(図6)と同様なので、その詳細説明を省略する。また、測定器12の動作は、ステップS100で量子化ステップによって閾値α、βを修正する点を除けば、実施例1(図7)と同様なので、その詳細説明を省略する。
[Operation of intra prediction unit]
The overall operation of the intra prediction unit 110 is the same as that of the first embodiment (FIG. 6) except that the quantization step is input in addition to the current image and the threshold values α, β, γ in step S10, and thus detailed description thereof is omitted. To do. The operation of the measuring instrument 12 is the same as that of the first embodiment (FIG. 7) except that the threshold values α and β are corrected by the quantization step in step S100, and thus detailed description thereof is omitted.

●閾値の修正
閾値修正器24は、式(2)により、閾値α、βを修正する(S100)。
α = α×(1 + QP/QP')
β = β×(1 + QP/QP') …(2)
ここで、QPは現ブロックの量子化ステップ
QP'は前フレームの現ブロックに対応するブロックの量子化ステップ
Threshold Correction The threshold corrector 24 corrects the thresholds α and β according to equation (2) (S100).
α = α × (1 + QP / QP ')
β = β × (1 + QP / QP ')… (2)
Where QP is the quantization step of the current block
QP 'is the quantization step of the block corresponding to the current block of the previous frame

なお、現ブロックのサイズは、フレーム間で異なる場合がある。そこで、式(2)の計算に使用する量子化ステップQPはすべて16×16に換算した値にする。具体的には、4×4の場合は4×4サブブロック16個分の平均値、8×8ブロックの場合は8×8サブブロック四個分の平均値にする。   Note that the size of the current block may differ between frames. Therefore, the quantization steps QP used for the calculation of Expression (2) are all converted to 16 × 16. Specifically, the average value for 16 4 × 4 sub-blocks in the case of 4 × 4, and the average value for four 8 × 8 sub-blocks in the case of 8 × 8 blocks.

つまり、式(2)によって閾値α、βは増加する。従って、動画像の符号化が進むに連れて、4×4よりは8×8、8×8よりは16×16のブロックサイズが選択され易くなり、より大きなブロックサイズで符号化することにより、発生符号量が抑制される。とくに、発生符号量を増やせる傾向を示すQP<QP'の場合に比べて、発生符号量を増やせない傾向を示すQP>QP'の場合は、α、βの増加傾向を強くして、より大きなブロックサイズの符号化を優先する。言い換えれば、閾値修正器24は、二つの量子化ステップQPとQP'が発生符号量の抑制傾向を示す場合、閾値α、βを増加して、予測ブロックサイズをより大きいサイズに誘導する。   That is, the threshold values α and β are increased by the equation (2). Therefore, as moving picture encoding progresses, it becomes easier to select a block size of 8 × 8 rather than 4 × 4 and 16 × 16 rather than 8 × 8, and by encoding with a larger block size, The generated code amount is suppressed. In particular, when QP> QP ′, which indicates a tendency to increase the amount of generated code, compared to the case of QP <QP ′, which indicates a tendency to increase the amount of generated code, the increase tendency of α and β is increased and larger. Give priority to block-size encoding. In other words, when the two quantization steps QP and QP ′ show a tendency to suppress the generated code amount, the threshold corrector 24 increases the thresholds α and β to induce the predicted block size to a larger size.

以下、本発明にかかる実施例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.

[イントラ予測部]
図14は実施例3のイントラ予測部110の構成例を示すブロック図である。図4に示す構成と異なるのは、測定器12がレート制御部115から現フレームの予測符号量と、前フレームの発生符号量を入力する点である。
[Intra prediction section]
FIG. 14 is a block diagram illustrating a configuration example of the intra prediction unit 110 according to the third embodiment. The difference from the configuration shown in FIG. 4 is that measuring instrument 12 inputs the predicted code amount of the current frame and the generated code amount of the previous frame from rate control section 115.

●測定器
図15は測定器12の構成例を示すブロック図である。
Measuring Instrument FIG. 15 is a block diagram showing a configuration example of the measuring instrument 12.

閾値修正器25は、現フレームの予測符号量と、前フレームの発生符号量から閾値α、βを修正する。   The threshold value corrector 25 corrects the threshold values α and β from the predicted code amount of the current frame and the generated code amount of the previous frame.

[イントラ予測部の動作]
イントラ予測部110全体の動作は、ステップS10で現画像と閾値α、β、γ以外に予測符号量と発生符号量を入力する点を除けば、実施例1(図6)と同様なので、その詳細説明を省略する。また、測定器12の動作は、ステップS100で予測符号量と発生符号量によって閾値α、βを修正する点を除けば、実施例1(図7)と同様なので、その詳細説明を省略する。
[Operation of intra prediction unit]
The overall operation of the intra prediction unit 110 is the same as that of the first embodiment (FIG. 6) except that the prediction code amount and the generated code amount are input in addition to the current image and the threshold values α, β, γ in step S10. Detailed description is omitted. The operation of the measuring instrument 12 is the same as that of the first embodiment (FIG. 7) except that the threshold values α and β are corrected by the predicted code amount and the generated code amount in step S100, and thus detailed description thereof is omitted.

●閾値の修正
閾値修正器25は、式(3)により、閾値α、βを修正する(S100)。
α = α×(1 + R/R')
β = β×(1 + R/R') …(3)
ここで、R'は前フレームの発生符号量
Rは現フレームの予測符号量
Threshold Correction The threshold corrector 25 corrects the thresholds α and β using equation (3) (S100).
α = α × (1 + R / R ')
β = β × (1 + R / R ') (3)
Here, R ′ is the generated code amount of the previous frame
R is the predicted code amount of the current frame

なお、予測符号量Rの単位が1フレームの符号量で、かつ、発生符号量R'が現ブロックの符号化済みブロックの発生符号量の累積値の場合、予測符号量Rを、現フレームの符号化済みブロック数に換算する。
R = R×Ne/Na …(4)
ここで、Neはフレーム内の符号化済みブロック数
Naはフレーム内の全ブロック数
Note that when the unit of the predicted code amount R is the code amount of one frame and the generated code amount R ′ is a cumulative value of the generated code amount of the encoded block of the current block, the predicted code amount R is Convert to the number of encoded blocks.
R = R × Ne / Na (4)
Where Ne is the number of encoded blocks in the frame
Na is the total number of blocks in the frame

つまり、式(3)によって閾値α、βは増加する。従って、動画像の符号化が進むに連れて、4×4よりは8×8、8×8よりは16×16のブロックサイズが選択され易くなり、より大きなブロックサイズで符号化することにより、発生符号量が抑制される。とくに、発生符号量が減少傾向を示すR<R'の場合に比べて、発生符号量が増加傾向を示すR>R'の場合は、α、βの増加傾向を強くして、より大きなブロックサイズの符号化を優先する。言い換えれば、閾値修正器25は、予測符号量Rと発生符号量R'が符号量の増加傾向を示す場合、閾値α、βを増加して、予測ブロックサイズをより大きいサイズに誘導する。   That is, the threshold values α and β are increased by the equation (3). Therefore, as moving picture encoding progresses, it becomes easier to select a block size of 8 × 8 rather than 4 × 4 and 16 × 16 rather than 8 × 8, and by encoding with a larger block size, The generated code amount is suppressed. In particular, compared to the case of R <R ′ where the generated code amount shows a decreasing tendency, when R> R ′ where the generated code amount shows an increasing tendency, the increasing tendency of α and β is strengthened, and a larger block. Prioritize size encoding. In other words, when the predicted code amount R and the generated code amount R ′ show an increasing tendency of the code amount, the threshold corrector 25 increases the thresholds α and β to induce the predicted block size to a larger size.

[変形例]
上記の各実施例では、ブロックサイズを三種類とする例を説明したが、ブロックサイズを限定して、4×4を除く8×8と16×16を処理対象としてもよいし、あるいは、8×8を除く4×4と16×16を処理対象としてもよい。
[Modification]
In each of the above-described embodiments, an example in which the block size is three types has been described. However, the block size is limited, and 8 × 8 and 16 × 16 except for 4 × 4 may be processed, or 8 The processing target may be 4 × 4 and 16 × 16 except for × 8.

また、図8のステップS206、S207、図9のステップS306、S307には、水平重視の予測モード1、6、8、3、4を対象とする例を示したが、簡略化のために、予測モード1、6、7のみにしてもよい。同様に、図8のステップS208、S209、図9のステップS308、S309には、垂直重視の予測モード0、5、7、3、4を対象とする例を示したが、簡略化のために、予測モード1、6、7のみにしてもよい。   In addition, in steps S206 and S207 in FIG. 8 and steps S306 and S307 in FIG. 9, an example in which the prediction modes 1, 6, 8, 3, and 4 with emphasis on the horizontal are shown, but for simplification, Only prediction modes 1, 6, and 7 may be used. Similarly, steps S208 and S209 in FIG. 8 and steps S308 and S309 in FIG. 9 show examples targeting the prediction modes 0, 5, 7, 3, and 4 that emphasize verticality. However, only prediction modes 1, 6, and 7 may be used.

[他の実施例]
なお、本発明は、複数の機器(例えばコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置、制御装置など)に適用してもよい。
[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 explaining intra prediction mode, イントラ予測モードを説明する図、The figure explaining intra prediction mode, 実施例のH.264方式のエンコーダの構成例を示すブロック図、Block diagram showing a configuration example of an H.264 encoder of the embodiment, イントラ予測部の構成例を示すブロック図、A block diagram showing a configuration example of an intra prediction unit, 測定器の構成例を示すブロック図、Block diagram showing a configuration example of a measuring instrument, イントラ予測部の動作を説明するフローチャート、A flowchart for explaining the operation of the intra prediction unit; 測定器の動作を説明するフローチャート、Flowchart explaining the operation of the measuring device, 4×4予測モード判定器の動作を説明するフローチャート、A flowchart for explaining the operation of the 4 × 4 prediction mode determiner, 8×8予測モード判定器の動作を説明するフローチャート、A flowchart for explaining the operation of the 8 × 8 prediction mode determiner, 16×16予測モード判定器の動作を説明するフローチャート、A flowchart for explaining the operation of the 16 × 16 prediction mode determiner, エンコーダをコンピュータ装置で実現する例を説明するブロック図、A block diagram for explaining an example in which an encoder is realized by a computer device; 実施例2のイントラ予測部の構成例を示すブロック図、Block diagram showing a configuration example of the intra prediction unit of the second embodiment, 測定器の構成例を示すブロック図、Block diagram showing a configuration example of a measuring instrument, 実施例3のイントラ予測部の構成例を示すブロック図、Block diagram showing a configuration example of the intra prediction unit of the third embodiment, 測定器の構成例を示すブロック図である。It is a block diagram which shows the structural example of a measuring device.

Claims (11)

動画像のフレームをブロック単位に符号化する画像処理装置であって、
符号化対象ブロックを複数のサイズのサブブロックに分割する分割手段と、
前記サブブロックの画像の特徴量を計算する計算手段と、
前記特徴量に基づき、前記符号化対象ブロックをフレーム内予測符号化する場合の予測ブロックサイズを決定する決定手段と、
前記予測ブロックサイズより小さいサブブロックの特徴量に基づき、前記フレーム内予測符号化に用いる予測画像の予測モードを設定する設定手段とを有することを特徴とする画像処理装置。
An image processing apparatus that encodes a frame of a moving image in units of blocks,
Dividing means for dividing the block to be encoded into a plurality of sub-blocks of a plurality of sizes;
Calculating means for calculating the feature quantity of the image of the sub-block;
A determination unit that determines a prediction block size in the case of performing intra-frame prediction encoding on the encoding target block based on the feature amount;
An image processing apparatus, comprising: a setting unit configured to set a prediction mode of a prediction image used for the intra-frame prediction encoding based on a feature amount of a sub-block smaller than the prediction block size.
さらに、前記設定された予測モードにより、前記予測画像を生成する生成手段を有することを特徴とする請求項1に記載された画像処理装置。   2. The image processing apparatus according to claim 1, further comprising generating means for generating the predicted image in accordance with the set prediction mode. 前記設定手段は、重視する予測方向を判定する第一の判定手段、および、前記重視する予測方向に対応する予測モードの中から設定する予測モードを判定する第二の判定手段を有することを特徴とする請求項1または請求項2に記載された画像処理装置。   The setting means includes first determination means for determining a prediction direction to be emphasized, and second determination means for determining a prediction mode to be set from prediction modes corresponding to the prediction direction to be emphasized. The image processing device according to claim 1 or 2. 前記決定手段は、前記複数のサイズのサブブロックの特徴量と閾値の比較によって、前記予測ブロックサイズを決定することを特徴とする請求項1から請求項3の何れか一項に記載された画像処理装置。   The image according to any one of claims 1 to 3, wherein the determining unit determines the predicted block size by comparing a feature amount of a plurality of sub-blocks of a plurality of sizes with a threshold value. Processing equipment. 前記決定手段は、前記符号化対象ブロックの量子化ステップと、前フレームの前記符号化対象ブロックに対応するブロックの量子化ステップを入力する入力手段、および、前記二つの量子化ステップによって前記閾値を修正する修正手段を有することを特徴とする請求項4に記載された画像処理装置。   The determination means includes an input means for inputting a quantization step of the encoding target block, a quantization step of a block corresponding to the encoding target block of the previous frame, and the threshold value by the two quantization steps. 5. The image processing apparatus according to claim 4, further comprising correction means for correcting. 前記修正手段は、前記二つの量子化ステップが発生符号量の抑制傾向を示す場合、前記閾値を増加して、前記予測ブロックサイズをより大きいサイズに誘導することを特徴とする請求項5に記載された画像処理装置。   6. The correction unit according to claim 5, wherein when the two quantization steps show a tendency to suppress the generated code amount, the correction unit increases the threshold value to induce the prediction block size to a larger size. Image processing apparatus. 前記決定手段は、符号化対象のフレームの予測符号量と前フレームの発生符号量を入力する入力手段、および、前記予測符号量と前記発生符号量によって前記閾値を修正する修正手段を有することを特徴とする請求項4に記載された画像処理装置。   The determination unit includes an input unit that inputs a predicted code amount of a frame to be encoded and a generated code amount of a previous frame, and a correction unit that corrects the threshold based on the predicted code amount and the generated code amount. 5. The image processing apparatus according to claim 4, wherein the image processing apparatus is characterized. 前記修正手段は、前記予測符号量と前記発生符号量が符号量の増加傾向を示す場合、前記閾値を増加して、前記予測ブロックサイズをより大きいサイズに誘導することを特徴とする請求項7に記載された画像処理装置。   8. The correction means, when the prediction code amount and the generated code amount indicate an increase tendency of the code amount, increasing the threshold value to induce the prediction block size to a larger size. The image processing apparatus described in 1. 動画像のフレームをブロック単位に符号化する画像処理方法であって、
符号化対象ブロックを複数のサイズのサブブロックに分割し、
前記サブブロックの画像の特徴量を計算し、
前記特徴量に基づき、前記符号化対象ブロックをフレーム内予測符号化する場合の予測ブロックサイズを決定し、
前記予測ブロックサイズより小さいサブブロックの特徴量に基づき、前記フレーム内予測符号化に用いる予測画像の予測モードを設定することを特徴とする画像処理方法。
An image processing method for encoding a frame of a moving image in units of blocks,
Divide the target block into sub-blocks of multiple sizes,
Calculating the feature quantity of the image of the sub-block;
Based on the feature amount, determine a prediction block size when the encoding target block is subjected to intraframe prediction encoding,
An image processing method, wherein a prediction mode of a prediction image used for the intraframe prediction encoding is set based on a feature amount of a sub-block smaller than the prediction block size.
コンピュータ装置を制御して、請求項1から請求項8の何れか一項に記載された画像処理装置の各手段として機能させることを特徴とするコンピュータプログラム。   9. 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 8. 請求項10に記載されたコンピュータプログラムが記録されたことを特徴とするコンピュータが読み取り可能な記憶媒体。   11. A computer-readable storage medium in which the computer program according to claim 10 is recorded.
JP2007125024A 2007-05-09 2007-05-09 Image processing apparatus and method Expired - Fee Related JP4921239B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007125024A JP4921239B2 (en) 2007-05-09 2007-05-09 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007125024A JP4921239B2 (en) 2007-05-09 2007-05-09 Image processing apparatus and method

Publications (3)

Publication Number Publication Date
JP2008283402A true JP2008283402A (en) 2008-11-20
JP2008283402A5 JP2008283402A5 (en) 2010-06-24
JP4921239B2 JP4921239B2 (en) 2012-04-25

Family

ID=40143859

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007125024A Expired - Fee Related JP4921239B2 (en) 2007-05-09 2007-05-09 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4921239B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010067668A1 (en) * 2008-12-08 2010-06-17 シャープ株式会社 Image encoder and image decoder
JP2010288080A (en) * 2009-06-11 2010-12-24 Sony Corp Image processing apparatus and image processing method
WO2015001700A1 (en) * 2013-07-01 2015-01-08 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Image encoding method and image encoding device
JP2016208392A (en) * 2015-04-27 2016-12-08 日本電信電話株式会社 Code amount estimation method, code amount estimation device and code amount estimation program
JP2018511231A (en) * 2015-03-06 2018-04-19 クアルコム,インコーポレイテッド High-speed video coding method using block segmentation
JP2021513234A (en) * 2018-02-01 2021-05-20 テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド Video coding methods, computer equipment, and storage media

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2019333452B2 (en) 2018-08-28 2023-06-15 Huawei Technologies Co., Ltd. Picture partitioning method and apparatus
KR102616713B1 (en) 2019-01-08 2023-12-20 후아웨이 테크놀러지 컴퍼니 리미티드 Image prediction methods, devices and systems, devices and storage media
WO2020143684A1 (en) * 2019-01-08 2020-07-16 华为技术有限公司 Image prediction method, device, apparatus and system and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006014342A (en) * 2004-06-27 2006-01-12 Apple Computer Inc Selection of coding type for coding video data and of predictive mode
JP2006121273A (en) * 2004-10-20 2006-05-11 Victor Co Of Japan Ltd Method and device for encoding conversion

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006014342A (en) * 2004-06-27 2006-01-12 Apple Computer Inc Selection of coding type for coding video data and of predictive mode
JP2006121273A (en) * 2004-10-20 2006-05-11 Victor Co Of Japan Ltd Method and device for encoding conversion

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010067668A1 (en) * 2008-12-08 2010-06-17 シャープ株式会社 Image encoder and image decoder
JP2010288080A (en) * 2009-06-11 2010-12-24 Sony Corp Image processing apparatus and image processing method
US8472741B2 (en) 2009-06-11 2013-06-25 Sony Corporation Image processing apparatus and image processing method
US9264714B2 (en) 2009-06-11 2016-02-16 Sony Corporation Image processing apparatus and image processing method
WO2015001700A1 (en) * 2013-07-01 2015-01-08 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Image encoding method and image encoding device
JPWO2015001700A1 (en) * 2013-07-01 2017-02-23 サン パテント トラスト Image coding method and image coding apparatus
JP2018511231A (en) * 2015-03-06 2018-04-19 クアルコム,インコーポレイテッド High-speed video coding method using block segmentation
US10085027B2 (en) 2015-03-06 2018-09-25 Qualcomm Incorporated Adaptive mode checking order for video encoding
JP2016208392A (en) * 2015-04-27 2016-12-08 日本電信電話株式会社 Code amount estimation method, code amount estimation device and code amount estimation program
JP2021513234A (en) * 2018-02-01 2021-05-20 テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド Video coding methods, computer equipment, and storage media
JP7024098B2 (en) 2018-02-01 2022-02-22 テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド Video coding methods, computer equipment, and storage media

Also Published As

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

Similar Documents

Publication Publication Date Title
JP4921239B2 (en) Image processing apparatus and method
US20120014444A1 (en) Method and apparatus for encoding and decoding image through intra prediction
EP2384003A1 (en) Device, method and program for image prediction encoding, device, method and program for image prediction decoding, and encoding/decoding system and method
US20090225871A1 (en) Image encoding apparatus
JP6501532B2 (en) Image coding apparatus, image coding method and program
US10349071B2 (en) Motion vector searching apparatus, motion vector searching method, and storage medium storing motion vector searching program
JP4732184B2 (en) Moving picture encoding apparatus and control method therefor, computer program, and storage medium
JP2006180298A (en) Image encoding control method and its device
US8964836B2 (en) Method and apparatus for spatial predictive encoding and/or decoding of video data
JP5649296B2 (en) Image encoding device
JP4257789B2 (en) Video encoding device
KR101345072B1 (en) Motion picture coding apparatus, motion picture coding method and computer-readable recording medium storing motion picture coding program
JP2006295408A (en) Image coding device and image coding program
JP2009049969A (en) Device and method of coding moving image and device and method of decoding moving image
WO2014006959A1 (en) Video prediction encoding device, video prediction encoding method, video prediction encoding program, video prediction decoding device, video prediction decoding method, and video prediction decoding program
JP2009246511A (en) Moving image encoder, control method thereof, and computer program
JP6875566B2 (en) Moving image prediction coding device, moving image prediction decoding device, moving image prediction coding method, moving image prediction decoding method and moving image prediction decoding program
JP2013121044A (en) Image encoder and image encoding method
JP4857243B2 (en) Image encoding apparatus, control method therefor, and computer program
JP2010035025A (en) Encoding device and method therefor
JP2017073602A (en) Moving image coding apparatus, moving image coding method, and computer program for moving image coding
JP2006295734A (en) Re-encoding apparatus, re-encoding method, and re-encoding program
WO2011105230A1 (en) Filter coefficient encoding device, filter coefficient decoding device, video encoding device, video decoding device, and data structure
JP6646125B2 (en) Video prediction decoding method and video prediction decoding device
JP2008092137A (en) Image coding apparatus and image coding method

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

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110509

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110708

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

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

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