JP2005328383A - Dynamic image encoding device and program - Google Patents

Dynamic image encoding device and program Download PDF

Info

Publication number
JP2005328383A
JP2005328383A JP2004145300A JP2004145300A JP2005328383A JP 2005328383 A JP2005328383 A JP 2005328383A JP 2004145300 A JP2004145300 A JP 2004145300A JP 2004145300 A JP2004145300 A JP 2004145300A JP 2005328383 A JP2005328383 A JP 2005328383A
Authority
JP
Japan
Prior art keywords
image
value
prediction
predicted
motion vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004145300A
Other languages
Japanese (ja)
Inventor
Toshiaki Shimada
敏明 嶋田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2004145300A priority Critical patent/JP2005328383A/en
Publication of JP2005328383A publication Critical patent/JP2005328383A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a dynamic image encoding device which can select a predictive image close to an actual image to be encoded, while suppressing an increase in the amount of operation on motion compensation. <P>SOLUTION: The dynamic image encoding device comprises a motion vector search range specifying part 12 for specifying a search range of the motion vector; a predictive image area specifier 13 for specifying a predictive image specifier to be compensated for motion prediction within a search range of the motion vector; an image corrector 2 for correcting an image characteristic value of the predictive image so as to match an image characteristic value of an image to be encoded as correction for motion prediction; an evaluation computer 10 for computing a predictive evaluation value of the predictive image on the basis of matching processing of the predictive image corrected for the motion prediction and the image to be encoded; and a motion vector selecting 11 for selecting a motion vector used for encoding the image to be encoded based on the predictive evaluation value. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、動き予測により動画像を符号化する動画像符号化装置及びこれをコンピュータに実現させるプログラムに関するものである。   The present invention relates to a moving image encoding apparatus that encodes a moving image by motion prediction, and a program for causing a computer to realize the same.

従来の動画像符号化装置としては、例えば特許文献1に開示されるものがある。この装置では、符号化対象フレーム内や符号化対象ブロック内の画素の値の平均値及び参照画像フレーム内や予測画像ブロック内の画素の値の平均値に基づいて符号化対象ブロック内の画素の値を補正する。例えば、符号化対象ブロック内の画素の値及び予測画像ブロック内の画素の値からそれぞれのブロック内の各画素の値の平均値を減算する補正を施す。   As a conventional moving image encoding device, for example, there is one disclosed in Patent Document 1. In this apparatus, based on the average value of the pixel values in the encoding target frame or the encoding target block and the average value of the pixel values in the reference image frame or the predicted image block, the pixel values in the encoding target block are calculated. Correct the value. For example, correction is performed by subtracting the average value of each pixel in each block from the value of the pixel in the encoding target block and the value of the pixel in the predicted image block.

また、この他に、特許文献1には、符号化対象フレーム(若しくは符号化対象ブロック)内の画素の値の平均値を参照画像フレーム(若しくは予測画像ブロック)内の画素の値の平均値に合わせるように符号化対象ブロック内の各画素を補正する処理、符号化対象ブロック内の画素の値の平均値が参照画像フレーム内の画素の値の平均値と等しくなるように符号化対象ブロック内の各画素の値を補正する処理や、符号化対象フレーム内の画素の値の平均値と参照画像フレーム内の画素の値の平均値との比に応じて符号化対象ブロック内の各画素の値を補正する処理などが開示されている。   In addition to this, Patent Document 1 discloses that the average value of the pixels in the encoding target frame (or the encoding target block) is changed to the average value of the pixels in the reference image frame (or the predicted image block). Processing for correcting each pixel in the encoding target block so as to match, the average value of the pixel value in the encoding target block is equal to the average value of the pixel value in the reference image frame Processing for correcting the value of each pixel in the encoding target block, or according to the ratio of the average value of the pixel values in the encoding target frame and the average value of the pixel values in the reference image frame A process for correcting the value is disclosed.

上述のようにして補正した符号化対象ブロック内の画素の値と予測画像ブロック内の画素の値との差分に基づいて画素値の差分絶対値和などの予測評価値を算出し、この予測評価値が最小となる動きベクトルを選択する。そして、この予測評価値に基づいて決定した符号化モードに従って符号化対象ブロックを符号化する。   Based on the difference between the pixel value in the coding target block corrected as described above and the pixel value in the predicted image block, a prediction evaluation value such as a sum of absolute differences of pixel values is calculated, and this prediction evaluation is performed. Select the motion vector with the smallest value. Then, the encoding target block is encoded in accordance with the encoding mode determined based on the prediction evaluation value.

このような処理を符号化対象ブロックに施すことで、時間の経過に伴って画面全体の輝度が変化するような画像であっても、当該輝度変化による影響を取り除きつつ予測評価値を求めて動き補償を実行している。   By applying such processing to the block to be encoded, even if the brightness of the entire screen changes over time, the prediction evaluation value is obtained while removing the influence of the brightness change and moves. Running compensation.

特開2000−106675号公報JP 2000-106675 A

従来の動画像符号化装置では、符号化対象ブロック及び予測画像ブロック内の画素の値の平均値をそれぞれ求める場合、それに伴って各ブロックについて上記平均値を使用した演算を施す必要があり、動き補償予測に関する演算時間が長時間化したり、演算に要するデータを記憶するためのメモリなどのハードウェアも必要であるという課題があった。   In the conventional moving image encoding device, when obtaining the average value of the pixel values in the encoding target block and the prediction image block, it is necessary to perform an operation using the average value for each block accordingly. There has been a problem that the computation time related to compensation prediction is prolonged, and hardware such as a memory for storing data required for the computation is also required.

また、符号化対象フレーム(若しくは符号化対象ブロック)内の画素の値の平均値を参照画像フレーム(若しくは予測画像ブロック)内の画素の値の平均値に合わせるように符号化対象ブロック内の画素の値を補正する処理は、符号化対象画像に最も近い予測画像を探索するという動き探索の本来の目的から逸脱するものであり、符号化対象画像に最も近い予測画像を探索することができるとは限らない。   Also, the pixels in the encoding target block so that the average value of the pixels in the encoding target frame (or encoding target block) matches the average value of the pixels in the reference image frame (or prediction image block). The process of correcting the value deviates from the original purpose of motion search, which is to search for the predicted image closest to the encoding target image, and can search for the predicted image closest to the encoding target image. Is not limited.

例えば、動き探索において、一般的に参照画像フレームと符号化対象ブロックとは同じサイズではなく、動きベクトル探索領域が参照画像フレームの一部領域であることが多い。このため、符号化対象ブロック内の画素の値の平均値を参照画像フレーム内の画素の値の平均値に合わせるような補正を施しても、参照画像フレーム内の実際に動き探索の対象となる一部領域内の画素の値の平均値とは合わない場合があり得る。   For example, in motion search, the reference image frame and the encoding target block are generally not the same size, and the motion vector search region is often a partial region of the reference image frame. For this reason, even if correction is performed so that the average value of the pixel values in the encoding target block matches the average value of the pixel values in the reference image frame, it is actually a motion search target in the reference image frame. There may be a case where the average value of the pixels in the partial area does not match.

これは、符号化対象フレーム内の画素の値の平均値と参照画像フレーム内の画素の値の平均値とが等しくなるように符号化対象ブロック内の画素の値を補正したり、参照画像フレーム内の画素の値の平均値と符号化対象フレーム内の画素の値の平均値との比に応じて符号化対象ブロック内の画素の値を補正する場合においても同様のことがいえる。   This is because the pixel value in the encoding target block is corrected so that the average value of the pixel value in the encoding target frame is equal to the average value of the pixel value in the reference image frame, or the reference image frame The same applies to the case where the pixel value in the encoding target block is corrected in accordance with the ratio of the average value of the pixel values in the encoding target frame and the average value of the pixel values in the encoding target frame.

また、特許文献1に開示される動画像符号化装置では、補正した符号化対象ブロック内の画素の値と補正した予測画像ブロック内の画素の値との差分に基づいて算出した予測評価値が最小となる動きベクトルを選択しているが、符号化処理自体は、補正されていない元の符号化対象画像及び元の予測画像を入力して実行される。このため、画素の値を補正した画像を基にして算出した予測評価値が最小となる動きベクトル以外に符号化効率のよい動きベクトルが存在し、これを探索し切れない可能性がある。   Moreover, in the moving image encoding device disclosed in Patent Document 1, the prediction evaluation value calculated based on the difference between the pixel value in the corrected encoding target block and the pixel value in the corrected prediction image block is Although the minimum motion vector is selected, the encoding process itself is executed by inputting the original image to be encoded and the original predicted image that have not been corrected. For this reason, there is a possibility that there is a motion vector with good encoding efficiency in addition to the motion vector having the smallest predicted evaluation value calculated based on the image in which the pixel value is corrected, and this cannot be fully searched.

例えば、MPEG−2では、前方向予測や後方向予測、両方向予測などに相当するインター予測であるフレーム間予測においてそのDC成分係数(直流成分係数)に可変長符号化コードが割り当てられる。この可変長符号化コードは、上記DC成分係数が大きさに比例したコード長が割り当てられ、例えば画素の値が補正されてない元の参照画像と符号化対象画像の差分によって求めたDC成分係数が大きいほど長い可変長符号化コードが割り当てられることになる。   For example, in MPEG-2, a variable-length code is assigned to a DC component coefficient (DC component coefficient) in inter-frame prediction, which is inter prediction equivalent to forward prediction, backward prediction, bidirectional prediction, and the like. The variable length encoded code is assigned a code length proportional to the size of the DC component coefficient. For example, the DC component coefficient obtained from the difference between the original reference image whose pixel value is not corrected and the encoding target image The longer the variable length coding code is assigned, the larger.

従って、画素の値を補正した画像を基に算出した予測評価値が最小となる動きベクトルで予測した予測画像によって求めたDC成分係数が、例えば予測評価値が最小のものの次に小さい(予測評価値が2番目に小さい)動きベクトルにより予測した予測画像によって求めたDC成分係数の値より大きいと、予測評価値が2番目に最小となる上記動きベクトルに対応する予測画像を用いた方が符号化効率がよい。   Accordingly, the DC component coefficient obtained from the predicted image predicted with the motion vector that minimizes the predicted evaluation value calculated based on the image with the corrected pixel value is, for example, the next smaller than the one with the smallest predicted evaluation value (predictive evaluation). If the value of the DC component coefficient obtained by the predicted image predicted by the motion vector (the second smallest value) is larger than the value of the DC component coefficient, the predicted image corresponding to the motion vector having the second smallest estimated evaluation value is encoded. High efficiency.

この発明は、上記のような課題を解決するためになされたものであり、動きベクトル探索範囲内にある予測画像領域の画素の値を補正して求めたマッチング評価値に基づいて動きベクトルを選択することで、動き補償に関する演算量の増加を抑制しつつ、実際の符号化対象画像に近い予測画像を選択することができ、例えばフラッシュ画像のようにフレームの一部の画像の輝度が変化する画像を含む動画像や絵柄が同じで輝度や色差等が異なる画像であっても符号化効率のよい動きベクトルを選択することができる動画像符号化装置及びこれをコンピュータに実現させるプログラムを得ることを目的とする。   The present invention has been made to solve the above-described problems, and selects a motion vector based on a matching evaluation value obtained by correcting a pixel value of a predicted image region within a motion vector search range. By doing so, it is possible to select a predicted image that is close to the actual encoding target image while suppressing an increase in the amount of computation related to motion compensation. For example, the luminance of a part of the frame changes like a flash image. To obtain a moving picture coding apparatus capable of selecting a motion vector with high coding efficiency even if the moving picture and the picture including the image are the same, and the luminance and color difference are different, and a program for causing the computer to realize the moving picture coding apparatus With the goal.

この発明に係る動画像符号化装置は、動きベクトルの探索範囲を指定する探索範囲指定部と、動きベクトルの探索範囲内において動き予測用の補正を施すべき予測画像指定領域を指定する領域指定部と、動き予測用の補正として符号化対象画像の画像特徴値に合うように予測画像指定領域の予測画像の画像特徴値を補正する予測画像補正部と、動き予測用の補正が施された予測画像と符号化対象画像とのマッチング処理により、符号化対象画像との差異の度合いを示す予測画像の予測評価値を算出する評価値算出部と、予測評価値に基づいて符号化対象画像の符号化に用いる動きベクトルを選択する動きベクトル選択部とを備えるものである。   A moving image encoding apparatus according to the present invention includes a search range specifying unit that specifies a search range of a motion vector, and an area specifying unit that specifies a predicted image specifying region to be corrected for motion prediction within the search range of a motion vector A prediction image correction unit that corrects the image feature value of the prediction image in the prediction image designation region so as to match the image feature value of the encoding target image as a motion prediction correction, and a prediction subjected to the motion prediction correction An evaluation value calculation unit that calculates a prediction evaluation value of a prediction image indicating a degree of difference between the image and the encoding target image by a matching process between the image and the encoding target image, and a code of the encoding target image based on the prediction evaluation value And a motion vector selection unit that selects a motion vector used for conversion.

この発明によれば、動きベクトルの探索範囲を指定する探索範囲指定部と、動きベクトルの探索範囲内において動き予測用の補正を施すべき予測画像指定領域を指定する領域指定部と、動き予測用の補正として符号化対象画像の画像特徴値に合うように予測画像指定領域の予測画像の画像特徴値を補正する予測画像補正部と、動き予測用の補正が施された予測画像と符号化対象画像とのマッチング処理により、符号化対象画像との差異の度合いを示す予測画像の予測評価値を算出する評価値算出部と、予測評価値に基づいて符号化対象画像の符号化に用いる動きベクトルを選択する動きベクトル選択部とを備えるので、実際に動きベクトル探索される範囲内で指定された注目すべき予測画像が符号化対象画像の画像特徴値に合うように補正されることから、入力画像の絵柄に近い画像を選択することができるという効果がある。これにより、例えばフェードインやフェードアウト、フラッシュ画像のような輝度変化のある画像や、絵柄が類似しているが輝度や色差等が異なる画像のように、輝度変化や輝度や色差などの違いにより符号化対象画像の動きを正確に追随していない動きベクトルが選択されて正しい動きベクトルが選択候補から外れる可能性が高い画像であっても、符号化効率のよい予測画像を選択することができるという効果がある。   According to the present invention, a search range designating unit for designating a motion vector search range, a region designating unit for designating a predicted image designating region to be corrected for motion prediction within the motion vector search range, and a motion prediction A prediction image correction unit that corrects the image feature value of the prediction image in the prediction image designation region so as to match the image feature value of the encoding target image, and a prediction image that has undergone correction for motion prediction and the encoding target An evaluation value calculation unit that calculates a prediction evaluation value of a prediction image indicating a degree of difference from the encoding target image by matching processing with the image, and a motion vector used for encoding the encoding target image based on the prediction evaluation value A motion vector selection unit that selects the image to be corrected so that the predicted image of interest specified within the range in which the motion vector search is actually performed matches the image feature value of the encoding target image. From Rukoto, there is an effect that it is possible to select an image close to the pattern of the input image. As a result, for example, images with brightness changes such as fade-in, fade-out, and flash images, or images with similar patterns but different brightness and color differences, etc. It is possible to select a prediction image with high encoding efficiency even if a motion vector that does not accurately follow the motion of the encoding target image is selected and the correct motion vector is likely to be excluded from the selection candidates. effective.

実施の形態1.
図1は、この発明の実施の形態1による動画像符号化装置の構成を示すブロック図である。実施の形態1による動画像符号化装置1は、画像補正部2、動き予測部3、画像メモリ部4、差分演算部5、符号化部6、復号部7、復号加算部8及び可変長符号化部9から構成される。動画像符号化装置1は、例えば汎用コンピュータなどを用いて、本発明に従う動画像符号化プログラムを実行させることによって具現化することができる。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a configuration of a moving picture coding apparatus according to Embodiment 1 of the present invention. The moving image encoding apparatus 1 according to Embodiment 1 includes an image correction unit 2, a motion prediction unit 3, an image memory unit 4, a difference calculation unit 5, an encoding unit 6, a decoding unit 7, a decoding addition unit 8, and a variable length code. It comprises the conversion unit 9. The moving image encoding apparatus 1 can be realized by executing a moving image encoding program according to the present invention using, for example, a general-purpose computer.

つまり、上記動画像符号化プログラムをコンピュータに実行させて上記構成要素2〜9として機能させることにより、本発明の動画像符号化装置における特徴的なデータ処理を実行することができる。なお、以下の説明において、本発明の動画像符号化装置を具現化するコンピュータ自体の構成及びその基本的な機能は、当業者が当該分野の技術常識に基づいて容易に認識できるものであり、本発明の本質に直接関わるものではないので詳細な記載を省略することにする。   That is, by causing the computer to execute the moving image encoding program to function as the constituent elements 2 to 9, characteristic data processing in the moving image encoding device of the present invention can be executed. In the following description, the configuration of the computer itself that embodies the video encoding device of the present invention and the basic functions thereof can be easily recognized by those skilled in the art based on the common general technical knowledge in the field, Since it is not directly related to the essence of the present invention, detailed description will be omitted.

図2は、図1中の動き予測部の構成を示すブロック図である。動き予測部3は、評価値算出部10、動きベクトル選択部11、動きベクトル探索範囲指定部(探索範囲指定部)12及び予測画像領域指定部(領域指定部)13から構成される。なお、以降の説明では、動き予測部3の内部に動きベクトル探索範囲指定部12及び予測画像領域指定部13を設けた構成を例に示すが、動きベクトル探索範囲指定部12及び予測画像領域指定部13のいずれか一方又はその両方が動き予測部3と独立した要素として構成してもよい。   FIG. 2 is a block diagram showing a configuration of the motion prediction unit in FIG. The motion prediction unit 3 includes an evaluation value calculation unit 10, a motion vector selection unit 11, a motion vector search range designation unit (search range designation unit) 12, and a predicted image region designation unit (region designation unit) 13. In the following description, a configuration in which the motion vector search range specifying unit 12 and the predicted image region specifying unit 13 are provided inside the motion predicting unit 3 is shown as an example. However, the motion vector search range specifying unit 12 and the predicted image region specifying Either one or both of the units 13 may be configured as elements independent of the motion prediction unit 3.

また、この場合においても、動きベクトル探索範囲指定部12及び予測画像領域指定部13を動画像符号化プログラムの一つのプログラムモジュールとしてそれぞれ構成することで、本発明の動画像符号化装置の構成要素としてコンピュータを機能させることができる。   Also in this case, by configuring the motion vector search range specifying unit 12 and the predicted image region specifying unit 13 as one program module of the moving image encoding program, the constituent elements of the moving image encoding device of the present invention As a computer can function.

次に動作について説明する。
本実施の形態では、各フレーム画像を複数の画像ブロックに分割してブロック毎に符号化する場合を例に挙げて説明する。なお、本発明は、画像ブロックの形状及びブロックサイズによって制限されるものではない。
Next, the operation will be described.
In the present embodiment, a case where each frame image is divided into a plurality of image blocks and encoded for each block will be described as an example. Note that the present invention is not limited by the shape and block size of the image block.

先ず、符号化すべき動画像のフレーム画像を分割した符号化対象ブロックは、入力画像データaとして、画像補正部2、動き予測部3及び差分演算部5に入力される。なお、入力画像データaには、符号化対象画像のフレーム画像内の画像ブロック位置などを特定するデータが含まれる。動き予測部3に入力された入力画像データaは、さらに内部の評価値算出部10及び動きベクトル探索範囲指定部12に入力される。   First, an encoding target block obtained by dividing a frame image of a moving image to be encoded is input to the image correction unit 2, the motion prediction unit 3, and the difference calculation unit 5 as input image data a. The input image data a includes data for specifying an image block position in the frame image of the encoding target image. The input image data a input to the motion prediction unit 3 is further input to the internal evaluation value calculation unit 10 and the motion vector search range specification unit 12.

動きベクトル探索範囲指定部12では、入力画像データaから符号化対象フレーム画像内での画像ブロック位置を特定し、これに従って当該符号化対象ブロックに対応する動きベクトルを探索するための動きベクトル探索範囲を指定する。動きベクトル探索範囲の指定方法としては、符号化対象ブロックの位置に従って参照画像中の妥当な範囲が決定できればよい。このようにして指定された動きベクトル探索範囲を特定する情報は、動きベクトル探索範囲指定部12により生成されて予測画像領域指定部13に出力される。   The motion vector search range specifying unit 12 specifies an image block position in the encoding target frame image from the input image data a, and searches for a motion vector corresponding to the encoding target block according to the specified position. Is specified. As a method for specifying the motion vector search range, an appropriate range in the reference image may be determined according to the position of the encoding target block. Information for specifying the motion vector search range specified in this way is generated by the motion vector search range specifying unit 12 and output to the predicted image region specifying unit 13.

予測画像領域指定部13は、動きベクトル探索範囲指定部12から指定された動きベクトル探索範囲内の一部又は全部の領域を予測画像指定領域として指定し、指定した領域の予測画像データを読み出すための予測画像指定領域読み出し信号dを生成して画像メモリ部4に出力する。   The predicted image region designating unit 13 designates a part or all of the region within the motion vector search range designated by the motion vector search range designating unit 12 as a predicted image designated region, and reads the predicted image data of the designated region. Is generated and output to the image memory unit 4.

画像メモリ部4には、符号化対象ブロックについて動き予測をする際に参照する参照画像フレームの画像データが記憶されている。画像メモリ部4は、予測画像領域指定部13から入力した予測画像指定領域読み出し信号dに基づいて、参照画像フレームを、動きベクトル探索範囲が指定され且つその範囲内に予測画像指定領域が指定された予測画像フレームとして認識し、この予測画像フレームデータから予測画像指定領域の予測画像データfを読み出して予測画像補正部2に出力する。
なお、上記例では、入力画像データaには、符号化対象画像のフレーム画像内の画像ブロック位置などを特定する位置情報などのデータを含むようにしたが、位置情報などのデータは入力画像データaとは独立した別のデータとしてもよく、本発明を制限するものではない。
The image memory unit 4 stores image data of a reference image frame that is referred to when motion prediction is performed on the encoding target block. Based on the predicted image designation area read signal d input from the predicted image area designation section 13, the image memory section 4 designates a reference image frame with a motion vector search range and a predicted image designation area within the range. As a predicted image frame, the predicted image data f in the predicted image designation area is read from the predicted image frame data and output to the predicted image correction unit 2.
In the above example, the input image data a includes data such as position information for specifying the image block position in the frame image of the encoding target image, but the data such as the position information is input image data. It may be other data independent of a, and does not limit the present invention.

図3は、図1中の画像メモリ部に記憶される予測画像フレーム、これに規定された動き探索範囲、予測画像指定領域及び予測画像ブロックを示す図である。図に示すように、画像メモリ部4に記憶される予測画像フレーム14内に、動きベクトル探索範囲指定部12により動きベクトル探索範囲15が指定される。
なお、図示の例では、動きベクトル探索範囲15が予測画像フレーム14より小さい領域である場合を示しているが、予測画像フレーム14と同一かその内部に含まれていればよく、動きベクトル探索範囲15の大きさにより本発明が限定されるものではない。
FIG. 3 is a diagram showing a predicted image frame, a motion search range defined in the predicted image frame, a predicted image designation area, and a predicted image block stored in the image memory unit in FIG. As shown in the figure, the motion vector search range 15 is specified by the motion vector search range specifying unit 12 in the predicted image frame 14 stored in the image memory unit 4.
The illustrated example shows a case where the motion vector search range 15 is an area smaller than the predicted image frame 14, but the motion vector search range only needs to be the same as or included in the predicted image frame 14. The present invention is not limited by the size of 15.

また、図示の例では、この探索範囲15内の一部領域として、予測画像領域指定部13により予測画像指定領域16が指定されている。本発明では、斜線を付した領域で示す予測画像ブロック17を予測画像指定領域16から抽出して動き予測に利用する。予測画像ブロック17は、符号化対象の入力画像ブロックと同一サイズである。   In the illustrated example, a predicted image specifying area 16 is specified by the predicted image area specifying unit 13 as a partial area in the search range 15. In the present invention, the predicted image block 17 indicated by the hatched area is extracted from the predicted image designation area 16 and used for motion prediction. The predicted image block 17 has the same size as the input image block to be encoded.

なお、図示の例では、予測画像指定領域16が動きベクトル探索範囲15より小さい領域であり、予測画像ブロック17より大きい領域である場合を示しているが、この大小関係に限定されるものではない。   In the illustrated example, the predicted image designation region 16 is a region smaller than the motion vector search range 15 and a region larger than the predicted image block 17, but is not limited to this magnitude relationship. .

例えば、予測画像指定領域16は、動きベクトル探索範囲15と同じサイズでも、予測画像ブロック17と同じサイズでもよい。つまり、動きベクトル探索範囲15と同一かその内部に含まれ、予測画像ブロック17と同一かそれ以上のサイズの領域であればよい。これは、符号化対象の入力画像ブロックに対応する予測画像ブロックを動きベクトル探索範囲15から選択するためである。   For example, the predicted image designation area 16 may be the same size as the motion vector search range 15 or the same size as the predicted image block 17. In other words, it may be an area that is the same as or included in the motion vector search range 15 and that is the same size or larger than the predicted image block 17. This is because a prediction image block corresponding to the input image block to be encoded is selected from the motion vector search range 15.

画像補正部2では、符号化対象の入力画像ブロックの入力画像データa及び予測画像指定領域16の予測画像データfを入力すると、これらデータa,fに基づいて動き予測に用いる予測画像指定領域16の予測画像を補正する。   When the input image data a of the input image block to be encoded and the predicted image data f of the predicted image designation area 16 are input to the image correction unit 2, the predicted image designation area 16 used for motion prediction based on these data a and f. The predicted image is corrected.

ここで、画像補正部2による予測画像の補正処理について詳細に説明する。
図4は、図1中の画像補正部の構成を示すブロック図である。図に示すように、画像補正部2は、入力画像特徴値算出部18、予測画像特徴値算出部19及び予測画像補正部20から構成される。
Here, prediction image correction processing by the image correction unit 2 will be described in detail.
FIG. 4 is a block diagram showing the configuration of the image correction unit in FIG. As shown in the figure, the image correction unit 2 includes an input image feature value calculation unit 18, a predicted image feature value calculation unit 19, and a predicted image correction unit 20.

なお、入力画像特徴値算出部18、予測画像特徴値算出部19及び予測画像補正部20は、本発明に従う動画像符号化プログラムを構成するプログラムモジュールとして構成する。これにより、当該動画像符号化プログラムを実行するコンピュータを、上記構成要素18〜20として機能させることができる。   The input image feature value calculation unit 18, the predicted image feature value calculation unit 19, and the predicted image correction unit 20 are configured as a program module that configures a moving image encoding program according to the present invention. As a result, a computer that executes the moving picture encoding program can be caused to function as the constituent elements 18 to 20.

入力画像特徴値算出部18は、符号化対象の入力画像ブロックの入力画像データaを入力して画像特徴を解析し、それを数値化した入力画像特徴値を算出する。一方、予測画像特徴値算出部19は、予測画像指定領域16の予測画像データfを入力して画像特徴を解析し、それを数値化した予測画像特徴値jを算出する。   The input image feature value calculation unit 18 inputs the input image data a of the input image block to be encoded, analyzes the image feature, and calculates an input image feature value obtained by digitizing the image feature. On the other hand, the predicted image feature value calculation unit 19 inputs the predicted image data f in the predicted image designation area 16, analyzes the image feature, and calculates a predicted image feature value j obtained by quantifying the image feature.

なお、画像特徴値としては、予測画像指定領域16の予測画像及び入力画像ブロック内の画素の値に対する画素平均値、画素最大値、画素最小値、画素値中央値、画素値の最大頻度値や画素値範囲などが考えられるが、予測画像指定領域16の予測画像に対して加減演算により入力画像ブロックの画像特徴値に合わせることができる特徴値であればよい。   Note that the image feature value includes a pixel average value, a pixel maximum value, a pixel minimum value, a pixel value median value, a pixel value maximum frequency value for the predicted image in the predicted image designation area 16 and the pixel values in the input image block, A pixel value range or the like is conceivable, but any feature value that can be adjusted to the image feature value of the input image block by the addition / subtraction operation on the predicted image in the predicted image designation area 16 may be used.

また、画像特徴値は、入力画像ブロックの画像特徴を最も表す特徴値を選択するものとする。画素の値としては、輝度成分の他、色差成分やRGB成分などについての各画素値やその他の画像信号成分の画素値であってもよい。   Further, as the image feature value, a feature value that best represents the image feature of the input image block is selected. The pixel value may be a pixel value for each of the color difference component, the RGB component, and other image signal components in addition to the luminance component.

補正の方法としては、重み係数等により乗算にて画像特徴値を補正する場合も考えられるが、以下のような理由により、本発明では、予測画像指定領域の予測画像の補正を入力画像ブロックの画像特徴値に合わせる補正を加減演算により実行する。   As a correction method, it is conceivable that the image feature value is corrected by multiplication using a weighting coefficient or the like. However, in the present invention, the prediction image in the prediction image designation region is corrected in the input image block for the following reason. Correction to match the image feature value is executed by addition / subtraction calculation.

例えば、MPEG−2等で一般的な予測差分画像をDCT変換する処理は、乗算により補正された予測画像から選択した動きベクトルに対応する補正前の元の予測画像で予測差分画像をDCT変換する。このため、乗算により補正された予測画像と補正前の予測画像とでは交流成分(AC成分)が異なり、補正前後で予測画像の絵柄が異なってしまう場合がある。   For example, a general process for DCT conversion of a prediction difference image in MPEG-2 or the like performs DCT conversion of a prediction difference image using an original prediction image before correction corresponding to a motion vector selected from the prediction image corrected by multiplication. . For this reason, the AC image (AC component) differs between the predicted image corrected by multiplication and the predicted image before correction, and the pattern of the predicted image may be different before and after correction.

そこで、加減演算にて予測画像の画像特徴値を入力画像ブロックの画像特徴値に合わせる補正を実行することで、補正前後では予測画像のDC成分は異なるもののAC成分は変わらない。本発明では、符号化対象の入力画像ブロックの絵柄に最も似た予測画像を選択することが目的であるため、補正によってもAC成分が変更されない加減演算により予測画像の補正を行うものとする。   Therefore, by performing correction to adjust the image feature value of the predicted image to the image feature value of the input image block by addition / subtraction calculation, the DC component of the predicted image is different before and after the correction, but the AC component is not changed. In the present invention, since the purpose is to select a predicted image that most closely resembles the design of the input image block to be encoded, the predicted image is corrected by an addition / subtraction operation in which the AC component is not changed even by correction.

予測画像補正部20は、入力画像特徴値算出部18から入力画像特徴値を入力し、さらに予測画像特徴値算出部19から予測画像データf及びその予測画像特徴値jを入力して、入力画像特徴値及び予測画像特徴値jに基づき、予測画像データfで規定される予測画像を補正する。補正した予測画像の予測画像データbは、予測画像補正部20から動き予測部3に出力される。   The predicted image correction unit 20 receives the input image feature value from the input image feature value calculation unit 18, and further receives the predicted image data f and its predicted image feature value j from the predicted image feature value calculation unit 19, Based on the feature value and the predicted image feature value j, the predicted image defined by the predicted image data f is corrected. The predicted image data b of the corrected predicted image is output from the predicted image correction unit 20 to the motion prediction unit 3.

具体的には、動きベクトル探索範囲15内で動き予測用に指定された予測画像指定領域16の予測画像特徴値jを入力画像データaにより求まる入力画像ブロックの入力画像特徴値に合わせるように、予測画像データfにより求まる予測画像指定領域16の予測画像を補正する。   Specifically, the predicted image feature value j of the predicted image designation area 16 designated for motion prediction within the motion vector search range 15 is matched with the input image feature value of the input image block obtained from the input image data a. The predicted image in the predicted image designation area 16 obtained from the predicted image data f is corrected.

図5は、予測画像指定領域の予測画像及び符号化対象の入力画像ブロックの画素値とその発生頻度との関係を示すグラフであり、予測画像指定領域の予測画像特徴値を入力画像データの入力画像特徴値に合わせるように予測画像指定領域の予測画像を補正する処理を説明するものである。なお、(a)から(f)に示すグラフにおいて、破線の曲線は予測画像指定領域16の予測画像の画素値分布を表す曲線であり、実線の曲線は符号化対象の入力画像ブロックの画素値分布を表す曲線である。また、横軸は画素値であり、縦軸は各画像領域内の画素値の発生頻度を表している。   FIG. 5 is a graph showing the relationship between the predicted image in the predicted image designation area and the pixel value of the input image block to be encoded and the frequency of occurrence thereof. The predicted image feature value in the predicted image designation area is input to the input image data. A process for correcting the predicted image in the predicted image designation area so as to match the image feature value will be described. In the graphs shown in (a) to (f), the dashed curve is a curve representing the pixel value distribution of the predicted image in the predicted image designation area 16, and the solid curve is the pixel value of the input image block to be encoded. It is a curve showing distribution. The horizontal axis represents pixel values, and the vertical axis represents the frequency of occurrence of pixel values in each image area.

(a)は、予測画像及び入力画像の画素値とその発生頻度との関係を示すグラフにおいて、画素平均値を画素特徴値として予測画像データを入力画像データの画像特徴に合わせる補正をする場合を示している。図において、予測画像指定領域16の予測画像の画素値分布を表す曲線(破線曲線)に付した縦破線、及び、入力画像の画素値分布を表す曲線(実線曲線)に付した縦実線は、それぞれ予測画像指定領域16の予測画像及び入力画像ブロックの画素平均値の位置を示している。   (A) is a graph showing the relationship between the predicted image and the pixel value of the input image and the frequency of occurrence thereof, and a case where correction is performed to match the predicted image data with the image feature of the input image data using the pixel average value as the pixel feature value. Show. In the figure, a vertical broken line attached to a curve (broken line curve) representing the pixel value distribution of the predicted image in the predicted image designation area 16 and a vertical solid line attached to a curve (solid line curve) representing the pixel value distribution of the input image are as follows: The positions of the predicted image in the predicted image designation area 16 and the average pixel value of the input image block are shown.

予測画像補正部20は、入力画像特徴値算出部18から入力画像ブロックの画像特徴値(画素平均値)を入力し、さらに予測画像特徴値算出部19から予測画像指定領域16の予測画像データf及びその画像特徴値jを入力すると、予測画像指定領域16の予測画像の各画素の値を、図中の横実線矢印で示すように両画像間の画素平均値の差分だけ増加(加算)させて、入力画像ブロックの画像特徴値に合わせる補正を実行する。   The predicted image correction unit 20 receives the image feature value (pixel average value) of the input image block from the input image feature value calculation unit 18 and further predicts the predicted image data f in the predicted image designation area 16 from the predicted image feature value calculation unit 19. When the image feature value j is input, the value of each pixel of the predicted image in the predicted image designation area 16 is increased (added) by the difference in pixel average value between the two images as indicated by the horizontal solid arrow in the figure. Thus, correction that matches the image feature value of the input image block is executed.

(b)は、予測画像及び入力画像の画素値とその発生頻度との関係を示すグラフにおいて、画素中央値を画素特徴値として予測画像データを入力画像データの画像特徴に合わせる補正をする場合を示している。図において、予測画像指定領域16の予測画像の画素値分布を表す曲線(破線曲線)に付した縦破線、及び、入力画像の画素値分布を表す曲線(実線曲線)に付した縦実線は、それぞれ予測画像指定領域16の予測画像及び入力画像ブロックの画素中央値の位置を示している。   (B) is a graph showing the relationship between the predicted image and the pixel value of the input image and the frequency of occurrence thereof, and a case where correction is performed to match the predicted image data to the image feature of the input image data using the pixel median as the pixel feature value. Show. In the figure, a vertical broken line attached to a curve (broken line curve) representing the pixel value distribution of the predicted image in the predicted image designation area 16 and a vertical solid line attached to a curve (solid line curve) representing the pixel value distribution of the input image are as follows: The positions of the predicted image in the predicted image designation area 16 and the pixel median value of the input image block are shown.

予測画像補正部20は、入力画像特徴値算出部18から入力画像ブロックの画像特徴値(画素中央値)を入力し、さらに予測画像特徴値算出部19から予測画像指定領域16の予測画像データf及びその画像特徴値jを入力すると、予測画像指定領域16の予測画像の各画素の値を、図中の横実線矢印で示すように両画像間の画素中央値の差分だけ増加(加算)させて、入力画像ブロックの画像特徴値に合わせる補正を実行する。   The predicted image correction unit 20 receives the image feature value (pixel median value) of the input image block from the input image feature value calculation unit 18, and further predicts the predicted image data f in the predicted image designation area 16 from the predicted image feature value calculation unit 19. And its image feature value j are input, the value of each pixel of the predicted image in the predicted image designation area 16 is increased (added) by the difference in the pixel median value between the two images as shown by the horizontal solid arrow in the figure. Thus, correction that matches the image feature value of the input image block is executed.

(c)は、予測画像及び入力画像の画素値とその発生頻度との関係を示すグラフにおいて、画素値の最大頻度値を画素特徴値として予測画像データを入力画像データの画像特徴に合わせる補正をする場合を示している。図において、予測画像指定領域16の予測画像の画素値分布を表す曲線(破線曲線)に付した縦破線、及び、入力画像の画素値分布を表す曲線(実線曲線)に付した縦実線は、それぞれ予測画像指定領域16の予測画像及び入力画像ブロックの画素値の最大頻度値の位置を示している。   (C) is a graph showing the relationship between the predicted image and the pixel value of the input image and the frequency of occurrence thereof, and correcting the predicted image data to the image feature of the input image data using the maximum frequency value of the pixel value as the pixel feature value. Shows when to do. In the figure, a vertical broken line attached to a curve (broken line curve) representing the pixel value distribution of the predicted image in the predicted image designation area 16 and a vertical solid line attached to a curve (solid line curve) representing the pixel value distribution of the input image are as follows: The positions of the maximum frequency values of the pixel values of the predicted image and the input image block in the predicted image designation area 16 are shown.

予測画像補正部20は、入力画像特徴値算出部18から入力画像ブロックの画像特徴値(画素値の最大頻度値)を入力し、さらに予測画像特徴値算出部19から予測画像指定領域16の予測画像データf及びその画像特徴値jを入力すると、予測画像指定領域16の予測画像の各画素の値を、図中の横実線矢印で示すように両画像間の最大頻度値の差分だけ増加(加算)させて、入力画像ブロックの画像特徴値に合わせる補正を実行する。   The predicted image correction unit 20 receives the image feature value (maximum frequency value of pixel values) of the input image block from the input image feature value calculation unit 18, and further predicts the predicted image designation area 16 from the predicted image feature value calculation unit 19. When the image data f and its image feature value j are input, the value of each pixel of the predicted image in the predicted image designation area 16 is increased by the difference in the maximum frequency value between the two images as indicated by the horizontal solid arrow in the figure ( Correction) to match the image feature value of the input image block.

(d)は、予測画像及び入力画像の画素値とその発生頻度との関係を示すグラフにおいて、画素値最大値を画素特徴値として予測画像データを入力画像データの画像特徴に合わせる補正をする場合を示している。図において、予測画像指定領域16の予測画像の画素値分布を表す曲線(破線曲線)に付した縦破線、及び、入力画像の画素値分布を表す曲線(実線曲線)に付した縦実線は、それぞれ予測画像指定領域16の予測画像及び入力画像ブロックの画素値最大値の位置を示している。   (D) is a graph showing the relationship between the predicted image and the pixel value of the input image and the frequency of occurrence, and correcting the predicted image data to match the image feature of the input image data with the maximum pixel value as the pixel feature value. Is shown. In the figure, a vertical broken line attached to a curve (broken line curve) representing the pixel value distribution of the predicted image in the predicted image designation area 16 and a vertical solid line attached to a curve (solid line curve) representing the pixel value distribution of the input image are as follows: The positions of the predicted image in the predicted image designation area 16 and the pixel value maximum value of the input image block are shown.

予測画像補正部20は、入力画像特徴値算出部18から入力画像ブロックの画像特徴値(画素値最大値)を入力し、さらに予測画像特徴値算出部19から予測画像指定領域16の予測画像データf及びその画像特徴値jを入力すると、予測画像指定領域16の予測画像の各画素の値を、図中の横実線矢印で示すように両画像間の画素値最大値の差分だけ増加(加算)させて、入力画像ブロックの画像特徴値に合わせる補正を実行する。   The predicted image correction unit 20 receives the image feature value (pixel value maximum value) of the input image block from the input image feature value calculation unit 18 and further predicts the predicted image data in the predicted image designation area 16 from the predicted image feature value calculation unit 19. When f and its image feature value j are input, the value of each pixel of the predicted image in the predicted image designation area 16 is increased (added) by the difference between the maximum pixel values between the two images as indicated by the horizontal solid arrow in the figure. ) To perform correction to match the image feature value of the input image block.

(e)は、予測画像及び入力画像の画素値とその発生頻度との関係を示すグラフにおいて、画素値最小値を画素特徴値として予測画像データを入力画像データの画像特徴に合わせる補正をする場合を示している。図において、予測画像指定領域16の予測画像の画素値分布を表す曲線(破線曲線)に付した縦破線、及び、入力画像の画素値分布を表す曲線(実線曲線)に付した縦実線は、それぞれ予測画像指定領域16の予測画像及び入力画像ブロックの画素値最小値の位置を示している。   (E) is a graph showing the relationship between the predicted image and the pixel value of the input image and the frequency of occurrence, and correcting the predicted image data to match the image feature of the input image data with the minimum pixel value as the pixel feature value. Is shown. In the figure, a vertical broken line attached to a curve (broken line curve) representing the pixel value distribution of the predicted image in the predicted image designation area 16 and a vertical solid line attached to a curve (solid line curve) representing the pixel value distribution of the input image are as follows: The positions of the predicted image in the predicted image designation area 16 and the minimum pixel value of the input image block are shown.

予測画像補正部20は、入力画像特徴値算出部18から入力画像ブロックの画像特徴値(画素値最小値)を入力し、さらに予測画像特徴値算出部19から予測画像指定領域16の予測画像データf及びその画像特徴値jを入力すると、予測画像指定領域16の予測画像の各画素の値を、図中の横実線矢印で示すように両画像間の画素値最小値の差分だけ増加(加算)させて、入力画像ブロックの画像特徴値に合わせる補正を実行する。   The predicted image correction unit 20 receives the image feature value (pixel value minimum value) of the input image block from the input image feature value calculation unit 18, and further predicts image data in the predicted image designation area 16 from the predicted image feature value calculation unit 19. When f and its image feature value j are input, the value of each pixel of the predicted image in the predicted image designation area 16 is increased (added) by the difference of the minimum pixel value between the two images as indicated by the horizontal solid arrow in the figure. ) To perform correction to match the image feature value of the input image block.

(f)は、予測画像及び入力画像の画素値とその発生頻度との関係を示すグラフにおいて、画素値範囲を画素特徴値として予測画像データを入力画像データの画像特徴に合わせる補正をする場合を示している。図において、予測画像指定領域16の予測画像の画素値分布を表す曲線(破線曲線)に付した縦破線、及び、入力画像の画素値分布を表す曲線(実線曲線)に付した縦実線は、それぞれ予測画像指定領域16の予測画像及び入力画像ブロックにおいて発生した画素値範囲を示している。   (F) is a graph showing the relationship between the predicted image and the pixel value of the input image and the frequency of occurrence thereof, and correcting the predicted image data to match the image feature of the input image data with the pixel value range as the pixel feature value. Show. In the figure, a vertical broken line attached to a curve (broken line curve) representing the pixel value distribution of the predicted image in the predicted image designation area 16 and a vertical solid line attached to a curve (solid line curve) representing the pixel value distribution of the input image are as follows: Each pixel value range generated in the predicted image and the input image block in the predicted image designation area 16 is shown.

予測画像補正部20は、入力画像特徴値算出部18から入力画像ブロックの画像特徴値(画素値範囲)を入力し、さらに予測画像特徴値算出部19から予測画像指定領域16の予測画像データf及びその画像特徴値jを入力すると、予測画像指定領域16の予測画像の各画素の値を、図中の横実線矢印で示すように両画像間の画素値範囲の差分だけ増加(加算)させて、入力画像ブロックの画像特徴値に合わせる補正を実行する。   The predicted image correction unit 20 receives the image feature value (pixel value range) of the input image block from the input image feature value calculation unit 18, and further predicts the predicted image data f in the predicted image designation region 16 from the predicted image feature value calculation unit 19. And its image feature value j are input, the value of each pixel of the predicted image in the predicted image designation area 16 is increased (added) by the difference in the pixel value range between the two images, as indicated by the horizontal solid arrow in the figure. Thus, correction that matches the image feature value of the input image block is executed.

上述のように、本発明では、実際に動きベクトルを探索する範囲内で指定された予測画像指定領域の予測画像の画像特徴値を入力画像ブロックの画像特徴値に合わせるように補正する。   As described above, in the present invention, the image feature value of the predicted image in the predicted image designation area designated within the range in which the motion vector is actually searched is corrected to match the image feature value of the input image block.

例えば、フラッシュ画像のような輝度変化が大きい画像では、予測画像を補正せずに動きベクトルの予測評価値を算出すると、予測評価値が大きくなり過ぎる傾向がある。この場合、符号化対象ブロックの動きに対応する動きベクトルであっても、動きベクトル選択候補から外れる場合がある。   For example, in an image having a large luminance change such as a flash image, if a predicted evaluation value of a motion vector is calculated without correcting the predicted image, the predicted evaluation value tends to be too large. In this case, even a motion vector corresponding to the motion of the encoding target block may be excluded from motion vector selection candidates.

これに対して、本発明のように予測画像を補正すると、入力画像ブロックに近い画像を予測画像として選択することができ、フラッシュ画像であっても符号化効率のよい予測画像を選択することが可能となる。また、絵柄が類似しているが輝度や色差等が異なるような予測画像に対しても入力画像ブロックの絵柄に最も似た画像を選択することができる。   On the other hand, when the predicted image is corrected as in the present invention, an image close to the input image block can be selected as a predicted image, and a predicted image with good coding efficiency can be selected even for a flash image. It becomes possible. In addition, an image that is most similar to the pattern of the input image block can be selected for predicted images that have similar patterns but differ in brightness, color difference, and the like.

動き予測部3内の評価値算出部10は、入力画像データa及び予測画像補正部20からの予測画像データbを入力して予測評価値iを算出し、動きベクトル選択部11に出力する。具体的には、予測画像データbを用いて、入力画像データaにより特定される符号化対象の入力画像ブロックに対応する、予測画像指定領域16内の予測画像ブロック(予測画像指定領域16と同一サイズである場合を含む)17を求め、補正された予測画像と符号化対象の入力画像ブロックとのマッチング処理を行い、これら画像間の画素値差分などを用いて上記予測画像と符号化対象の入力画像ブロックとの差異の度合いを示す予測評価値i(例えば、画素値差分絶対値和など)を算出する。   The evaluation value calculation unit 10 in the motion prediction unit 3 receives the input image data a and the prediction image data b from the prediction image correction unit 20, calculates a prediction evaluation value i, and outputs it to the motion vector selection unit 11. Specifically, using the predicted image data b, the predicted image block (the same as the predicted image specifying region 16) in the predicted image specifying region 16 corresponding to the input image block to be encoded specified by the input image data a. 17 (including the case of the size), and the corrected predicted image and the input image block to be encoded are matched, and the predicted image and the encoding target are compared using a pixel value difference between the images. A predicted evaluation value i (for example, sum of absolute value of pixel value difference) indicating the degree of difference from the input image block is calculated.

上述したように、本発明では、加減演算により予測画像を補正するので、補正した予測画像と補正前の予測画像とでは直流成分(DC成分)が異なる。このため、予測評価値が最小の動きベクトル候補に対する補正前の予測画像が、常に符号化効率が最もよいとは限らない。また、予測評価値が最小の動きベクトルが複数存在する場合もあり得る。   As described above, in the present invention, since the predicted image is corrected by the addition / subtraction calculation, the corrected predicted image and the predicted image before correction have different direct current components (DC components). For this reason, the prediction image before correction with respect to the motion vector candidate with the smallest prediction evaluation value does not always have the best encoding efficiency. In addition, there may be a plurality of motion vectors having the smallest predicted evaluation value.

そこで、最小の予測評価値以外に幾つかの予測評価値の選択候補を抽出することを目的として、予測評価値を評価するための閾値を設定する。この閾値は、固定値として予め設定するものや、入力画像又は予測画像の画像特徴から任意に設定及び更新される可変値でもよい。但し、どの場合においても、符号化効率のよい動きベクトルの候補を選択できる範囲での値を設定する。   Therefore, a threshold for evaluating the predicted evaluation value is set for the purpose of extracting some selection candidates for the predicted evaluation value in addition to the minimum predicted evaluation value. This threshold value may be set in advance as a fixed value, or may be a variable value that is arbitrarily set and updated from the image characteristics of the input image or predicted image. However, in any case, a value is set in a range in which motion vector candidates with good coding efficiency can be selected.

例えば、異なる複数の予測評価値について動きベクトルの情報量や量子化ステップ、S/N値などのパラメータの統計をとり、同時に画質評価を行って決定した値であって、許容される符号化効率を与え得る予測評価値の最上限値が上記閾値として設定される。   For example, it is a value determined by taking statistics of parameters such as motion vector information amount, quantization step, S / N value, etc. for a plurality of different prediction evaluation values, and evaluating the image quality at the same time. Is set as the threshold value.

評価値算出部10は、予測評価値iを算出するたびに上記閾値との比較を行い、当該閾値を超える予測評価値iを除外し、これ以下の予測評価値iを抽出して動きベクトル選択部11に出力する。   The evaluation value calculation unit 10 performs comparison with the threshold value every time the predicted evaluation value i is calculated, excludes the predicted evaluation value i exceeding the threshold value, extracts a predicted evaluation value i less than the threshold value, and selects a motion vector To the unit 11.

動きベクトル選択部11では、評価値算出部10が抽出した予測評価値iが1つであれば、この予測評価値iに基づいて動きベクトル探索範囲15で探索された動きベクトルを選択する。つまり、予測評価値iに対応する予測画像ブロックの移動量を動きベクトルとして求める。   If there is one prediction evaluation value i extracted by the evaluation value calculation unit 10, the motion vector selection unit 11 selects a motion vector searched in the motion vector search range 15 based on the prediction evaluation value i. That is, the movement amount of the predicted image block corresponding to the predicted evaluation value i is obtained as a motion vector.

一方、評価値算出部10により複数の予測評価値iが抽出されると、動きベクトル選択部11は、これら予測評価値iにより決定される動きベクトル候補の中から、符号化効率を考慮して指定した条件によって動きベクトルを選択する。   On the other hand, when a plurality of prediction evaluation values i are extracted by the evaluation value calculation unit 10, the motion vector selection unit 11 considers encoding efficiency from among motion vector candidates determined by these prediction evaluation values i. Select a motion vector according to specified conditions.

例えば、抽出された複数の予測評価値iの各々に対応する予測画像についてその補正前の元の予測画像の画像特徴値が入力画像ブロックの画像特徴値に最も近いものを求め、この画像特徴値を与える予測画像の予測評価値iにより動きベクトル候補を選択する。これは、入力画像ブロックの画像特徴値に最も近い動きベクトル候補がDC成分の可変長符号化効率が最もよいためである。   For example, for the predicted image corresponding to each of the extracted prediction evaluation values i, the image feature value of the original predicted image before the correction is determined to be closest to the image feature value of the input image block, and this image feature value A motion vector candidate is selected based on the predicted evaluation value i of the predicted image that gives. This is because the motion vector candidate closest to the image feature value of the input image block has the best DC component variable-length encoding efficiency.

なお、入力画像ブロックの画像特徴値に最も近い動きベクトル候補が複数存在する場合、動きベクトル選択部11が、上述した複数の予測評価値にそれぞれ対応する動きベクトル候補の中で直前の符号化動きベクトルに対して、水平成分及び垂直成分のそれぞれの差の和が最小の動きベクトル等、情報量が少なく符号化効率のよい動きベクトルを選択するようにしてもよい。   When there are a plurality of motion vector candidates closest to the image feature value of the input image block, the motion vector selection unit 11 performs the immediately preceding coded motion among the motion vector candidates corresponding to the plurality of prediction evaluation values described above. A motion vector with a small amount of information and good coding efficiency, such as a motion vector having the smallest sum of differences between the horizontal component and the vertical component, may be selected.

このように、本発明では、予測評価値iが最小のもののみを選択するのではなく、上記閾値により複数の予測評価値iを抽出し、予測評価値以外の条件(例えば、予測画像についての補正値など)にて上記複数の予測評価値に対応する動きベクトルをそれぞれ評価して、総合的に符号化効率の良い動きベクトルを選択する。これにより、入力画像の絵柄に近い画像を選択することができる。例えばDC成分係数の可変長符号化効率が最もよい動きベクトルを選択することができる。   Thus, in the present invention, instead of selecting only the smallest predicted evaluation value i, a plurality of predicted evaluation values i are extracted based on the threshold value, and a condition other than the predicted evaluation value (for example, for a predicted image) The motion vector corresponding to the plurality of prediction evaluation values is evaluated by a correction value or the like, and a motion vector having a high coding efficiency is selected. Thereby, an image close to the pattern of the input image can be selected. For example, it is possible to select a motion vector having the best variable length coding efficiency of DC component coefficients.

動きベクトル選択部11は、上述のようにして動きベクトルを選択すると、選択した動きベクトルに関する動きベクトル情報cを生成して画像メモリ部4及び可変長符号化部9に出力する。   When the motion vector selection unit 11 selects a motion vector as described above, the motion vector selection unit 11 generates motion vector information c regarding the selected motion vector and outputs the motion vector information c to the image memory unit 4 and the variable length encoding unit 9.

画像メモリ部4では、動きベクトル情報cに対応する予測画像ブロックの予測画像データeを読み出して差分演算部5及び復号加算部8に出力する。差分演算部5では、符号化対象の入力画像ブロックの入力画像データaとこれに対応する予測画像ブロックの予測画像データeとの差分演算を行って予測差分画像データとして符号化部6に出力する。   In the image memory unit 4, the predicted image data e of the predicted image block corresponding to the motion vector information c is read and output to the difference calculation unit 5 and the decoding addition unit 8. The difference calculation unit 5 performs a difference calculation between the input image data a of the input image block to be encoded and the prediction image data e of the prediction image block corresponding to the input image block, and outputs the result to the encoding unit 6 as prediction difference image data. .

符号化部6は、入力した予測差分画像データを符号化し、この符号化データを復号部7及び可変長符号化部9に出力する。復号部7では、符号化部6からの符号化データを復号し、予測差分画像復号データとして復号加算部8に出力する。なお、符号化部6及び復号部7は、任意の動画像符号化復号処理でよく、MPEG−2やMPEG−4、ベクトル量子化などに限定されるものではない。   The encoding unit 6 encodes the input prediction difference image data and outputs the encoded data to the decoding unit 7 and the variable length encoding unit 9. The decoding unit 7 decodes the encoded data from the encoding unit 6 and outputs the decoded data to the decoding addition unit 8 as predicted difference image decoded data. The encoding unit 6 and the decoding unit 7 may be arbitrary moving image encoding / decoding processes, and are not limited to MPEG-2, MPEG-4, vector quantization, or the like.

復号加算部8は、予測画像データeと復号加算部8からの予測差分画像復号データとの加算演算を行って復号加算画像データgとして画像メモリ部4に出力する。この復号加算画像データgが予測画像(参照)フレームの画像データとなり、予測画像指定領域読み出し信号dに基づいて画像メモリ部4から当該予測画像フレーム内の予測画像指定領域の予測画像データfが読み出される。   The decoding addition unit 8 performs an addition operation on the predicted image data e and the prediction difference image decoded data from the decoding addition unit 8 and outputs the result to the image memory unit 4 as decoded addition image data g. This decoded added image data g becomes image data of a predicted image (reference) frame, and predicted image data f of the predicted image specified region in the predicted image frame is read from the image memory unit 4 based on the predicted image specified region read signal d. It is.

可変長符号化部9では、動きベクトル情報c及び符号化部6からの符号化データを可変長符号化し、可変長符号化データhとして出力する。なお、可変長符号化部9による可変長符号化処理は、任意の可変長符号化処理でよく、この処理方法の違いなどにより本発明の内容が制限されるものではない。   In the variable length encoding unit 9, the motion vector information c and the encoded data from the encoding unit 6 are variable length encoded and output as variable length encoded data h. The variable length encoding process by the variable length encoding unit 9 may be an arbitrary variable length encoding process, and the contents of the present invention are not limited by the difference in the processing method.

以上のように、この実施の形態1によれば、実際に動きベクトル探索する範囲内で指定した予測指定画像と符号化対象の入力画像ブロックの画像特徴値に基づいて、予測指定画像の画像特徴値を入力画像ブロックの画像特徴値に合わせるように補正するので、フラッシュ画像のような輝度変化のある画像や絵柄が類似しているが輝度や色差等が異なる画像のように、輝度変化や輝度や色差などの違いにより符号化対象ブロックの動きを正確に追随していない動きベクトルが選択されて正しい動きベクトルが選択候補から外れる可能性が高い画像であっても、入力画像ブロックの絵柄に近い画像を選択することができる。また、入力画像ブロックの絵柄に近い画像を符号化することで、符号化効率のよい予測画像を選択することができる。   As described above, according to the first embodiment, the image feature of the prediction designated image is based on the prediction designated image designated within the range of the actual motion vector search and the image feature value of the input image block to be encoded. Since the value is corrected to match the image feature value of the input image block, the brightness change and brightness are similar to images with different brightness and images such as flash images but similar in brightness and color difference. Even if the motion vector that does not accurately follow the motion of the encoding target block due to differences in color or color difference is selected and the correct motion vector is likely to be excluded from the selection candidates, it is close to the pattern of the input image block An image can be selected. In addition, by encoding an image close to the design of the input image block, a prediction image with high encoding efficiency can be selected.

なお、上記実施の形態1では、予測画像補正部20が、予測画像領域指定部13により指定された予測画像指定領域16の予測画像における複数種類の画像特徴値を、符号化対象の入力画像ブロックの上記各種類に対応する画像特徴値に合わせるように補正する例を示したが、各種類の画像特徴値について補正を行った予測画像を用いて予測評価値をそれぞれ求め、これら予測評価値に基づいて動きベクトルを選択するようにしても良い。   In the first embodiment, the predicted image correction unit 20 converts the plurality of types of image feature values in the predicted image in the predicted image specification region 16 specified by the predicted image region specification unit 13 into the input image block to be encoded. In the above example, correction is performed so as to match the image feature values corresponding to each of the above-described types. A motion vector may be selected based on this.

例えば、複数種類の画像特徴値として、画素平均値、画素値最大頻度値、画素値範囲を扱う場合で説明する。勿論、画像特徴値としては、画素平均値、画素値最大頻度値及び画素値範囲に限定されるものではなく、予測指定領域の予測画像に対して加減演算により入力画像ブロックの画像特徴値に合わせられる特徴値であればよい。例えば、画素値中央値や画素値最大値などがあり、その種類の選択は任意でよい。   For example, a case where a pixel average value, a pixel value maximum frequency value, and a pixel value range are handled as a plurality of types of image feature values will be described. Of course, the image feature value is not limited to the pixel average value, the pixel value maximum frequency value, and the pixel value range, and is adjusted to the image feature value of the input image block by addition / subtraction operation on the prediction image of the prediction designated area. Any feature value may be used. For example, there are a median pixel value, a maximum pixel value, etc., and the type can be arbitrarily selected.

先ず、評価値算出部10が、予測画像補正部20により各種類の画像特徴値を基にして補正された予測画像と符号化対象の入力画像ブロックとのマッチングを行って予測評価値を求める。ここでは、画素平均値、画素値最大頻度値及び画素値範囲に基づいてそれぞれ補正された予測画像を用いて予測評価値が求められることになる。   First, the evaluation value calculation unit 10 obtains a prediction evaluation value by matching the prediction image corrected by the prediction image correction unit 20 based on each type of image feature value and the input image block to be encoded. Here, the predicted evaluation value is obtained using the predicted image corrected based on the pixel average value, the pixel value maximum frequency value, and the pixel value range.

続いて、動きベクトル選択部11は、評価値算出部10により画像特徴値毎に算出された予測評価値に基づいて動きベクトルを決定する。この動きベクトルの決定方法としては、例えば画像特徴値毎に算出された予測評価値のうち最小のものに対応する動きベクトルを選択したり、画像特徴値毎に算出されたそれぞれの予測評価値のうち小さい順に複数ずつ候補を選出し、予測画像の補正値(例えば、予測画像と入力画像との画像特徴値の差分)等その他の要因と合わせて総合的に予測評価値を判定して動きベクトルを選択してもよい。このように構成することでも、上記実施の形態1と同様な効果を得ることができる。   Subsequently, the motion vector selection unit 11 determines a motion vector based on the predicted evaluation value calculated for each image feature value by the evaluation value calculation unit 10. As a method of determining this motion vector, for example, a motion vector corresponding to the smallest one of prediction evaluation values calculated for each image feature value is selected, or each prediction evaluation value calculated for each image feature value is selected. A plurality of candidates are selected in ascending order, and a motion vector is determined by comprehensively determining a prediction evaluation value together with other factors such as a correction value of the prediction image (for example, a difference between image feature values of the prediction image and the input image). May be selected. Even with this configuration, the same effect as in the first embodiment can be obtained.

また、上記実施の形態1では、予測指定領域の予測画像の画像特徴値を符号化対象の入力画像ブロックの画像特徴値に合わせるように補正する例を示したが、このような補正を施すと、本実施の形態による動画像符号化装置において予め指定した取り扱うべき画素値の範囲を、補正後の予測画像における画素値が超えてしまう場合がある。   In the first embodiment, the example in which the image feature value of the prediction image in the prediction designated region is corrected to match the image feature value of the input image block to be encoded has been described. In some cases, the pixel value in the corrected predicted image may exceed the range of pixel values that should be handled in advance in the moving picture coding apparatus according to the present embodiment.

例えば、本実施の形態による動画像符号化装置において、画素値を8ビットの範囲で表現することを予め指定していた場合を考える(勿論、本発明は、8ビットに限定されるものではなく、8ビット以下でも8ビット以上でもよい)。   For example, in the moving picture encoding apparatus according to the present embodiment, consider a case in which it is specified in advance that a pixel value is expressed in an 8-bit range (of course, the present invention is not limited to 8 bits). 8 bits or less or 8 bits or more).

この場合、図5(a)に示すように画像特徴値として画素平均値を選び、予測指定領域の予測画像の画素平均値を入力画像ブロックの画素平均値に合わせる補正を施すと、補正すべき予測画像の画素値平均値と入力画像ブロックの画素値平均値との組み合わせによって、上述した8ビットの範囲を超えることがある。この傾向は、画像特徴値として上記実施の形態で述べたその他の画像特徴値を選択した場合においても同様である。   In this case, as shown in FIG. 5A, when a pixel average value is selected as the image feature value and correction is performed to match the pixel average value of the predicted image in the prediction designated area with the pixel average value of the input image block, the correction should be performed. The combination of the average pixel value of the predicted image and the average pixel value of the input image block may exceed the 8-bit range described above. This tendency is the same even when the other image feature value described in the above embodiment is selected as the image feature value.

ここで、予め指定した画素値範囲であればさらに規定した画素値範囲の画素を予測画像で補正する画素として設定しても良い。例えば、画素値が8ビットで表現される全ての画素領域でなくても、8ビット全域0〜255のうち16〜235の画素値範囲を補正すべき有効領域としてもよい。また、予め指定した画素値範囲内に入力画像ブロックの画素値範囲がある場合、入力画像ブロックの画素値範囲を予測画像で補正すべき画素領域としてもよい。   Here, if the pixel value range is specified in advance, pixels in a further specified pixel value range may be set as pixels to be corrected by the predicted image. For example, the pixel value range of 16 to 235 out of the entire 8-bit range of 0 to 255 may be set as the effective region to be corrected even if the pixel value is not the entire pixel region expressed by 8 bits. In addition, when the pixel value range of the input image block is within the pixel value range designated in advance, the pixel value range of the input image block may be a pixel region to be corrected by the predicted image.

そこで、予測画像補正部20が、符号化対象の入力画像ブロックの画像特徴値に合うように補正した予測画像の画素値が予め指定した画素値の取り得るべき範囲にあるか否かを判定し、当該画素値範囲内にないと判定された画素値がある場合、この予測画像の画素値を予め指定した画素値範囲内になるようにさらに補正するようにしてもよい。   Therefore, the predicted image correction unit 20 determines whether or not the pixel value of the predicted image corrected so as to match the image feature value of the input image block to be encoded is within a range that can be taken by the pixel value specified in advance. When there is a pixel value determined not to be within the pixel value range, the pixel value of the predicted image may be further corrected so as to be within a pixel value range designated in advance.

この場合の補正の方法としては、予め指定した画素値範囲を超えたり、これに満たなかったりした画素値を除くために、予測指定領域の予測画像の画素値範囲に下限又は上限の境界値を設定するリミット処理などがある。   As a correction method in this case, a lower limit or an upper limit boundary value is set in the pixel value range of the predicted image in the prediction specified region in order to exclude a pixel value that exceeds or does not satisfy the pixel value range specified in advance. There are limit processing to be set.

また、予め指定した画素値の取り得るべき範囲にあるか否かは、例えば指定したビット数で画素値が表現されているか、若しくは、指定したビット数で表すことができる画素値範囲内のデータであるかなどを基準として判定する。   Whether or not the pixel value is within a range that can be taken in advance is determined by whether the pixel value is expressed by a specified number of bits, or data within a pixel value range that can be expressed by a specified number of bits. It is determined on the basis of whether or not.

このように補正後の予測画像の画素値を予め指定した画素値範囲内になるようにさらに補正するのは、例えば入力画像ブロックの絵柄により近い画像を予測画像として選択するためであり、最初の補正で予測画像の画素値に含まれるノイズ成分の除去等を想定している。   The reason why the pixel value of the corrected predicted image is further corrected to fall within the pixel value range specified in advance is to select an image closer to the pattern of the input image block as the predicted image, for example. It is assumed that the noise component included in the pixel value of the predicted image is removed by the correction.

つまり、予測画像の画素値の一部が最初の補正によって入力画像ブロックの画素値範囲からずれる場合、ずれた一部の画素値を上記予め指定した画素値範囲内にさらに補正することで、入力画像ブロックの絵柄に近い画像を予測画像とすることができ、ひいては符号化対象の入力画像ブロックの動きに合致した動きベクトルの候補とすることができる。   That is, when a part of the pixel value of the predicted image deviates from the pixel value range of the input image block due to the first correction, the corrected pixel value is further corrected within the above-specified pixel value range to obtain the input. An image close to the pattern of the image block can be used as a predicted image, and as a result, a motion vector candidate that matches the motion of the input image block to be encoded can be used.

具体的な処理としては、予測画像補正部20が、予め指定した画素値範囲に基づいて、最初の補正を施した予測画像の画素のうち、さらに補正が必要な画素をカウントし、予め設定した閾値を基準としてカウント値の大小を判定する。このとき、カウント値が上記閾値より小さい予測画像候補データはさらに補正し、カウント値が上記閾値より大きければこの予測画像候補データを予測画像として使用しないか、若しくは、最初の補正のみを行った予測画像候補データを用いて予測評価値を算出する。   As a specific process, the predicted image correction unit 20 counts pixels that need further correction out of the pixels of the predicted image subjected to the first correction based on a pixel value range specified in advance, and sets them in advance. The magnitude of the count value is determined based on the threshold value. At this time, the prediction image candidate data whose count value is smaller than the threshold value is further corrected. If the count value is larger than the threshold value, the prediction image candidate data is not used as the prediction image, or the prediction is performed with only the first correction. A prediction evaluation value is calculated using the image candidate data.

なお、上述した閾値としては、入力画像ブロックの画像特徴に近くなるように補正した予測画像の画像特徴がさらなる補正によって変更されてしまうと、入力画像ブロックにより近い画像特徴を有する予測画像を探索するという本来の趣旨を逸脱してしまうため、最初の補正により決定された予測画像の画像特徴が変更されない最大限の基準値であればよい。例えば、最初の補正を施した予測画像に対してさらに補正してもその画像特徴を変更しない最大限の画素数全体の割合や画素数を設定する。   Note that, as the above-described threshold, when the image feature of the predicted image corrected so as to be close to the image feature of the input image block is changed by further correction, a predicted image having an image feature closer to the input image block is searched. Therefore, the maximum reference value may be used as long as the image feature of the predicted image determined by the first correction is not changed. For example, the maximum ratio of the total number of pixels and the number of pixels that do not change the image characteristics even if the prediction image subjected to the first correction is further corrected are set.

また、この閾値は、固定値として予め設定するものや、入力画像又は予測画像の画像特徴から任意に設定及び更新される可変値でもよい。但し、どの場合においても、最初の補正が施された予測画像の画像特徴を概ね損なわない範囲での値を設定する。   This threshold value may be set in advance as a fixed value, or may be a variable value that is arbitrarily set and updated from the image characteristics of the input image or the predicted image. However, in any case, a value is set in a range that does not substantially impair the image characteristics of the predicted image subjected to the first correction.

このように、予測指定領域の予測画像の画像特徴値を入力画像ブロックの画像特徴値に合わせるように補正した予測画像が指定された画素値範囲を超えた場合、この予測画像をさらに補正するように構成することで、予め指定した画素値範囲を超えるノイズ成分等を除去して入力画像の絵柄に近い画像を選択することができ、ひいては符号化効率のよい予測画像を選択することができる。   As described above, when the predicted image corrected so that the image feature value of the predicted image in the prediction specified region matches the image feature value of the input image block exceeds the specified pixel value range, the predicted image is further corrected. With this configuration, it is possible to select an image close to the pattern of the input image by removing noise components exceeding the pixel value range specified in advance, and thus to select a prediction image with high coding efficiency.

実施の形態2.
図6は、この発明の実施の形態2による動画像符号化装置の画像補正部及び動き予測部の構成を示すブロック図である。実施の形態2による動き予測部3aは、上記実施の形態1で示した評価値算出部10、動きベクトル選択部11、動きベクトル探索範囲指定部12及び予測画像領域指定部13の他、予測画像特徴値差分算出部(差分算出部)21、オフセット値設定部22及び更新評価値算出部23を構成要素として有する。
Embodiment 2. FIG.
FIG. 6 is a block diagram showing the configuration of the image correction unit and the motion prediction unit of the video encoding apparatus according to Embodiment 2 of the present invention. The motion prediction unit 3a according to the second embodiment includes a predicted image in addition to the evaluation value calculation unit 10, the motion vector selection unit 11, the motion vector search range designation unit 12, and the predicted image region designation unit 13 described in the first embodiment. A feature value difference calculation unit (difference calculation unit) 21, an offset value setting unit 22, and an update evaluation value calculation unit 23 are included as components.

これらの構成要素10〜13,21〜23は、本発明に従う動画像符号化プログラムを構成するプログラムモジュールとして構成する。これにより、当該動画像符号化プログラムを実行するコンピュータを、上記構成要素10〜13,21〜23として機能させることができる。   These components 10 to 13 and 21 to 23 are configured as a program module that configures a moving image encoding program according to the present invention. As a result, the computer that executes the moving picture coding program can function as the components 10 to 13 and 21 to 23.

なお、図6において、上記実施の形態1で示した図2及び図4と同一若しくはこれに相当する構成要素やデータには同一符号を付しており、また、これら以外の図1に示した構成要素4〜9についても同一構成であり、これらに関する重複した説明は省略する。   In FIG. 6, the same reference numerals are given to the same components or data corresponding to or equivalent to those in FIGS. 2 and 4 shown in the first embodiment, and the other components are shown in FIG. 1. The constituent elements 4 to 9 have the same configuration, and a duplicate description thereof will be omitted.

次に動作について説明する。
ここでは、上記実施の形態1と異なる処理を詳細に説明する。
入力画像特徴値算出部18は、符号化対象の入力画像ブロックに関する入力画像データaを入力して画像特徴を解析し、それを数値化した入力画像特徴値を算出する。一方、予測画像特徴値算出部19は、予測画像指定領域の予測画像データfを入力して画像特徴を解析し、それを数値化した予測画像特徴値jを算出して予測画像補正部20及び動き予測部3aの予測画像特徴値差分値算出部21に出力する。
Next, the operation will be described.
Here, processing different from that of the first embodiment will be described in detail.
The input image feature value calculation unit 18 inputs the input image data a related to the input image block to be encoded, analyzes the image feature, and calculates an input image feature value obtained by digitizing the image feature. On the other hand, the predicted image feature value calculation unit 19 inputs the predicted image data f of the predicted image designation region, analyzes the image feature, calculates a predicted image feature value j obtained by quantifying the image feature, and calculates the predicted image correction unit 20 and This is output to the predicted image feature value difference value calculation unit 21 of the motion prediction unit 3a.

なお、画像特徴値としては、予測画像指定領域の予測画像及び入力画像ブロック内の画素の値に対する画素平均値、画素最大値、画素最小値、画素値中央値、画素値の最大頻度値や、画素値の発生範囲などが考えられるが、予測画像指定領域の予測画像に対して加減演算により入力画像ブロックの画像特徴値に合わせることができる特徴値であればよい。   In addition, as the image feature value, the pixel average value, the pixel maximum value, the pixel minimum value, the pixel value median value, the pixel value maximum frequency value for the predicted image in the predicted image designation region and the pixel value in the input image block, The generation range of the pixel value is conceivable, but any feature value that can be adjusted to the image feature value of the input image block by the addition / subtraction operation on the prediction image in the prediction image designation region may be used.

また、画像特徴値は、入力画像ブロックの画像特徴を最も表す特徴値を選択するものとする。画素の値としては、輝度成分の他、色差成分やRGB成分などについての各画素値やその他の画像信号成分の画素値であってもよい。   Further, as the image feature value, a feature value that best represents the image feature of the input image block is selected. The pixel value may be a pixel value for each of the color difference component, the RGB component, and other image signal components in addition to the luminance component.

補正の方法としては、重み係数等により乗算にて画像特徴値を補正する場合も考えられるが、補正によってもAC成分が変更されない加減演算により予測画像指定領域の予測画像の補正を入力画像ブロックの画像特徴値に合わせる補正を実行する。   As a correction method, it is conceivable that the image feature value is corrected by multiplication using a weighting coefficient or the like. However, the correction of the predicted image in the predicted image designated region is performed by the addition / subtraction operation in which the AC component is not changed by the correction. Perform correction to match the image feature value.

予測画像補正部20は、予測画像特徴値算出部19から入力した予測画像データf及びその予測画像特徴値jの他、入力画像特徴値算出部18から入力画像特徴値を入力して、入力画像特徴値及び予測画像特徴値jに基づき、予測画像データfで規定される予測画像を補正する。補正した予測画像の予測画像データbは、予測画像補正部20から動き予測部3aに出力される。   The predicted image correcting unit 20 inputs the input image feature value from the input image feature value calculating unit 18 in addition to the predicted image data f and the predicted image feature value j input from the predicted image feature value calculating unit 19, and the input image Based on the feature value and the predicted image feature value j, the predicted image defined by the predicted image data f is corrected. The predicted image data b of the corrected predicted image is output from the predicted image correction unit 20 to the motion prediction unit 3a.

具体的には、動きベクトル探索範囲内で動き予測用に指定された予測画像指定領域の予測画像特徴値jを入力画像データaの入力画像特徴値に合わせるように、予測画像データfで規定される予測画像指定領域の予測画像を補正する。   Specifically, it is defined by the predicted image data f so that the predicted image feature value j of the predicted image specified area specified for motion prediction within the motion vector search range matches the input image feature value of the input image data a. The predicted image in the predicted image designation area is corrected.

動き予測部3aでは、内部の評価値算出部10が入力画像データa及び予測画像データbを入力し、予測画像特徴値差分値算出部21が入力画像データa、予測画像データb及び予測画像特徴値jを入力し、動きベクトル探索範囲指定部12が入力画像データaを入力する。   In the motion prediction unit 3a, the internal evaluation value calculation unit 10 inputs the input image data a and the prediction image data b, and the prediction image feature value difference value calculation unit 21 inputs the input image data a, the prediction image data b, and the prediction image feature. The value j is input, and the motion vector search range specifying unit 12 inputs the input image data a.

評価値算出部10は、上記実施の形態1と同様にして入力画像データaにより求まる入力画像ブロックに対応する予測画像の予測評価値iを算出し、更新評価値算出部23に出力する。具体的には、予測画像データbを用いて、入力画像データaにより特定される符号化対象の入力画像ブロックに対応する、予測画像指定領域内の予測画像ブロック(予測画像指定領域と同一サイズである場合を含む)を求め、これらの差を予測評価値iとして算出する。   The evaluation value calculation unit 10 calculates the prediction evaluation value i of the prediction image corresponding to the input image block obtained from the input image data a in the same manner as in the first embodiment, and outputs it to the update evaluation value calculation unit 23. Specifically, using the predicted image data b, a predicted image block (with the same size as the predicted image specified region) in the predicted image specified region corresponding to the input image block to be encoded specified by the input image data a. And the difference between them is calculated as a predicted evaluation value i.

上述したように、本発明では、加減演算により予測画像を補正するので、補正した予測画像と補正前の予測画像とでは直流成分(DC成分)が異なる。このため、予測評価値が最小の動きベクトル候補に対応する補正前の予測画像が、常に符号化効率が最もよいとは限らない。また、予測評価値が最小の動きベクトルが複数存在する場合もあり得る。   As described above, in the present invention, since the predicted image is corrected by the addition / subtraction calculation, the corrected predicted image and the predicted image before correction have different direct current components (DC components). For this reason, the prediction image before correction corresponding to the motion vector candidate having the smallest prediction evaluation value does not always have the best encoding efficiency. In addition, there may be a plurality of motion vectors having the smallest predicted evaluation value.

そこで、本実施の形態2においても、最小の予測評価値以外に幾つかの予測評価値の選択候補を抽出することを目的として、予測評価値を評価するための閾値を設定する。この閾値は、固定値として予め設定するものや、入力画像又は予測画像の画像特徴から任意に設定及び更新される可変値でもよい。但し、どの場合においても、符号化効率のよい動きベクトルの候補を選択できる範囲での値を設定する。   Therefore, also in the second embodiment, a threshold for evaluating the prediction evaluation value is set for the purpose of extracting some selection candidates for the prediction evaluation value in addition to the minimum prediction evaluation value. This threshold value may be set in advance as a fixed value, or may be a variable value that is arbitrarily set and updated from the image characteristics of the input image or predicted image. However, in any case, a value is set in a range in which motion vector candidates with good coding efficiency can be selected.

例えば、異なる複数の予測評価値について動きベクトルの情報量や量子化ステップ、S/N値などのパラメータの統計をとり、同時に画質評価を行って決定した値であって、許容される符号化効率を与え得る予測評価値の最上限値が上記閾値として設定される。   For example, it is a value determined by taking statistics of parameters such as motion vector information amount, quantization step, S / N value, etc. for a plurality of different prediction evaluation values, and evaluating the image quality at the same time. Is set as the threshold value.

評価値算出部10は、予測評価値iを算出するたびに上記閾値との比較を行い、当該閾値を超える予測評価値iを除外し、閾値以下の予測評価値iを抽出して更新評価値算出部23に出力する。   The evaluation value calculation unit 10 compares the predicted evaluation value i with the threshold value every time it calculates the predicted evaluation value i, excludes the predicted evaluation value i exceeding the threshold value, extracts the predicted evaluation value i below the threshold value, and updates the evaluation value It outputs to the calculation part 23.

予測画像特徴値差分値算出部21は、補正した予測画像の予測画像データbに基づいて当該予測画像の画像特徴値を算出し、予測画像特徴値算出部19から別途入力した補正前の予測画像の画像特徴値jとの間で補正前後の予測画像特徴値の差分値kを算出する。この差分値kは、オフセット値設定部22に出力される。   The predicted image feature value difference value calculating unit 21 calculates an image feature value of the predicted image based on the predicted image data b of the corrected predicted image, and the predicted image before correction separately input from the predicted image feature value calculating unit 19. The difference value k of the predicted image feature value before and after the correction is calculated with respect to the image feature value j. The difference value k is output to the offset value setting unit 22.

なお、オフセット値設定部22への入力データとしては、予測画像特徴値差分値算出部21により、補正前後の予測画像の画像特徴値の差分値を小区間にクラス分けしたデータを差分値kとしてもよく、補正前後の予測画像の画像特徴値の差がわかるデータであればよい。   Note that as input data to the offset value setting unit 22, data obtained by classifying the difference values of the image feature values of the predicted image before and after the correction into small sections by the predicted image feature value difference value calculation unit 21 as the difference value k. In other words, any data can be used as long as the difference between the image feature values of the predicted images before and after the correction is known.

オフセット値設定部22では、入力した補正前後の予測画像特徴値の差分値kに基づいてオフセット値lを設定し(例えば、差分値kの関数値)、更新評価値算出部23に出力する。なお、入力画像ブロックに近い絵柄の予測画像を選択するため、オフセット値lは、画像特徴値の中で入力画像ブロックの画像特徴値に近い程、小さい値となる傾向になるように設定する。   The offset value setting unit 22 sets the offset value l based on the input difference value k between the predicted image feature values before and after correction (for example, a function value of the difference value k), and outputs it to the update evaluation value calculation unit 23. In order to select a predicted image having a pattern close to the input image block, the offset value l is set so that the closer to the image feature value of the input image block, the smaller the image feature value.

従って、補正前後の予測画像の画像特徴値の差分値kが小さい方がオフセット値lが小さい傾向となる。これは、補正前後の予測画像の画像特徴値の差分値kが小さい方が、予測差分画像のDC成分を可変長符号化した場合の符号化効率が高いためである。   Therefore, the offset value l tends to be smaller when the difference value k of the image feature values of the predicted image before and after correction is smaller. This is because the smaller the difference value k of the image feature values of the predicted image before and after the correction, the higher the encoding efficiency when the DC component of the predicted difference image is variable length encoded.

また、予めシーケンス単位やピクチャ単位でオフセット値lを設定しても、ピクチャ内で分割された領域毎や符号化単位ブロック毎にオフセット値lを設定してもよい。但し、符号化効率を考慮してオフセット値lの大きさを決める必要がある。   Alternatively, the offset value l may be set in advance for each sequence or picture, or the offset value l may be set for each region or coding unit block divided in the picture. However, it is necessary to determine the size of the offset value l in consideration of the encoding efficiency.

更新評価値算出部23では、評価値算出部10から入力した予測評価値iとオフセット値設定部22から入力したオフセット値lとを加算して、予測画像の補正前後の予測評価値のずれを反映させた更新評価値mを算出し動きベクトル選択部11に出力する。   In the update evaluation value calculation unit 23, the prediction evaluation value i input from the evaluation value calculation unit 10 and the offset value l input from the offset value setting unit 22 are added, and the deviation of the prediction evaluation value before and after the correction of the prediction image is calculated. The reflected update evaluation value m is calculated and output to the motion vector selection unit 11.

動きベクトル選択部11は、更新評価値算出部23から入力した更新評価値mが最小となる動きベクトルを選択し、選択した動きベクトルに関する動きベクトル情報cを生成して後段の構成(画像メモリ部4及び可変長符号化部9)に出力する。   The motion vector selection unit 11 selects a motion vector that minimizes the update evaluation value m input from the update evaluation value calculation unit 23, generates motion vector information c related to the selected motion vector, and configures a subsequent configuration (image memory unit) 4 and the variable length coding unit 9).

一方、評価値算出部10が上記閾値に基づいて複数の予測評価値iを抽出した場合、更新評価値算出部23は、これら予測評価値iについてそれぞれ更新評価値mを算出する。これら更新評価値mは、オフセット値lを加算する前の予測評価値iの中から上記閾値により最小の予測評価値iから複数の評価値、つまり最小値付近のものとして選択された者に対応する。   On the other hand, when the evaluation value calculation unit 10 extracts a plurality of prediction evaluation values i based on the threshold value, the update evaluation value calculation unit 23 calculates an update evaluation value m for each of the prediction evaluation values i. These updated evaluation values m correspond to those selected from among the predicted evaluation values i before adding the offset value l as a plurality of evaluation values, that is, those near the minimum value, from the minimum predicted evaluation value i by the above threshold. To do.

動きベクトル選択部11では、更新評価値算出部23により最小値付近の予測評価値iについて算出された更新評価値mのうち、最小となる更新評価値mに対応する動きベクトル候補を選択する。   The motion vector selection unit 11 selects a motion vector candidate corresponding to the minimum update evaluation value m among the update evaluation values m calculated for the predicted evaluation value i near the minimum value by the update evaluation value calculation unit 23.

このようにすることで、予測評価値iが最小のもののみを選択するのではなく、上記閾値により複数の予測評価値iを抽出し、最小値付近の予測評価値iであって、これに対応する動きベクトルが何れも動きベクトル選択候補となり得るものの中から、最も符号化効率のよい予測画像に対応した動きベクトルを選択することが可能である。   In this way, instead of selecting only the smallest predicted evaluation value i, a plurality of predicted evaluation values i are extracted based on the threshold value, and the predicted evaluation value i near the minimum value is obtained. It is possible to select a motion vector corresponding to a predicted image with the highest coding efficiency from among the corresponding motion vectors that can be motion vector selection candidates.

また、上述したように、本実施の形態では、動きベクトル選択部11が更新評価値mに基づいて動きベクトルを選択する。この場合、画像特徴値毎のオフセット値lの間に大きな値の開きがあると、オフセット値が最も小さい画像特徴値に対応する動きベクトルが選択される可能性が高くなる。   Further, as described above, in the present embodiment, the motion vector selection unit 11 selects a motion vector based on the update evaluation value m. In this case, if there is a large difference between the offset values l for each image feature value, the possibility of selecting a motion vector corresponding to the image feature value having the smallest offset value increases.

このため、入力画像ブロックの画像特徴値に近い予測画像の画像特徴値のオフセット値とその他の画像特徴値のオフセット値とで大きな開きがありすぎると、符号化効率がより良い動きベクトル候補が破棄されてしまう可能性がある。   For this reason, if there is a large gap between the offset value of the image feature value of the predicted image close to the image feature value of the input image block and the offset value of other image feature values, motion vector candidates with better coding efficiency are discarded. There is a possibility of being.

具体的に説明する。例えば、入力画像の画素平均値と予測画像の画素平均値との差分値を差分値Aとし、これに基づいて求められるオフセット値をオフセット値Aとする。また、入力画像の画素値最大頻度値と予測画像の画素値最大頻度値との差分値を差分値Bとし、とし、これに基づいて求められるオフセット値をオフセット値Bとする。さらに、入力画像の画素値中央値と予測画像の画素値中央値との差分値を差分値Cとし、これに基づいて求められるオフセット値をオフセット値Cとする。差分値の大小関係が、差分値C<差分値B<差分値Aである場合、オフセット値の大小関係は、オフセット値C<オフセット値B<オフセット値Aであるものとする。   This will be specifically described. For example, the difference value between the pixel average value of the input image and the pixel average value of the predicted image is set as the difference value A, and the offset value obtained based on the difference value A is set as the offset value A. In addition, a difference value between the pixel value maximum frequency value of the input image and the pixel value maximum frequency value of the predicted image is set as a difference value B, and an offset value obtained based on the difference value B is set as an offset value B. Furthermore, the difference value between the pixel value median value of the input image and the pixel value median value of the predicted image is defined as a difference value C, and an offset value obtained based on the difference value C is defined as an offset value C. When the difference value magnitude relationship is difference value C <difference value B <difference value A, it is assumed that the offset value magnitude relationship is offset value C <offset value B <offset value A.

動きベクトル選択部11は、更新評価値算出部23により予測評価値iとオフセット値lとを加算した更新評価値mに基づいて動きベクトルを選択する。上述の例では、入力画像ブロックに一番近い画素値中央値の予測評価値iに加算するオフセット値Cが他のオフセット値A,Bよりも小さいため、入力画像ブロックに一番近い画素値中央値に対応する動きベクトル候補が優先的に選択されることになる。   The motion vector selection unit 11 selects a motion vector based on the update evaluation value m obtained by adding the prediction evaluation value i and the offset value l by the update evaluation value calculation unit 23. In the above example, the offset value C to be added to the predicted evaluation value i of the median pixel value closest to the input image block is smaller than the other offset values A and B. The motion vector candidate corresponding to the value is preferentially selected.

このとき、オフセット値Cが他のオフセット値A,Bよりも許容量を超えた範囲で小さい場合、画素値中央値に基づいて算出した更新評価値Cが、画素値平均値に基づいて算出した更新評価値A及び画素値最大頻度値に基づいて算出した更新評価値Bと比較して相対的に極端に小さくなってしまう。   At this time, when the offset value C is smaller in the range exceeding the allowable amount than the other offset values A and B, the update evaluation value C calculated based on the median pixel value is calculated based on the average pixel value. Compared with the update evaluation value B calculated based on the update evaluation value A and the pixel value maximum frequency value, it becomes relatively extremely small.

これは、画素値中央値に基づいて算出した更新評価値Cに対応する動きベクトルが選択される確率が高くなるが、オフセット値の大小関係を考慮しなければ、本来選択されるべき予測評価値に対応する動きベクトルが選択候補からはずれてしまい破棄される可能性も含んでいる。   This increases the probability that a motion vector corresponding to the updated evaluation value C calculated based on the pixel value median value is selected. However, if the magnitude relationship between the offset values is not considered, the predicted evaluation value that should be originally selected This includes the possibility that the motion vector corresponding to is deviated from the selection candidate and discarded.

そこで、オフセット値lは、入力画像ブロックの画像特徴値に近い予測画像の画像特徴値を優先的に選択させるような値であり、且つ符号化効率を考慮して動きベクトルが選択できる値にする必要がある。   Therefore, the offset value l is a value that preferentially selects an image feature value of a predicted image that is close to the image feature value of the input image block, and is a value that allows a motion vector to be selected in consideration of encoding efficiency. There is a need.

上述した例では、入力画像ブロックの画像特徴値に最も近い予測画像の画像特徴値を優先的に選択させるために、オフセット値Cを他のオフセット値より小さい値とする。このとき、動きベクトル候補として画素値中央値に対応する動きベクトルに偏り過ぎないようにするため、オフセット値Cと他のオフセット値A,Bとの相対的な大小関係に大きな開きが生じないように調整する。   In the above-described example, in order to preferentially select the image feature value of the predicted image closest to the image feature value of the input image block, the offset value C is set to a value smaller than other offset values. At this time, in order not to be too biased toward the motion vector corresponding to the median pixel value as a motion vector candidate, the relative magnitude relationship between the offset value C and the other offset values A and B does not greatly open. Adjust to.

つまり、オフセット値設定部22が複数の画像特徴値に対応するオフセット値をそれぞれ設定するにあたり、各オフセット値は任意の値を取り得るが(絶対値で表現しても良い)、これらの相対的な大小関係については、符号化効率を考慮して適宜決定して最も符号化効率が良い動きベクトルが選択される大小関係に調節する。   That is, when the offset value setting unit 22 sets offset values corresponding to a plurality of image feature values, each offset value can take an arbitrary value (which may be expressed as an absolute value), but the relative Such a magnitude relationship is appropriately determined in consideration of the coding efficiency and adjusted to a magnitude relationship in which the motion vector having the best coding efficiency is selected.

以上のように、この実施の形態2では、予測画像における補正前後の画像特徴値の差分値kを算出し、これに基づいてオフセット値lを設定し、予測評価値にそのオフセット値を加算した更新評価値に基づいて動きベクトルを選択するので、入力画像ブロックの絵柄に近い画像を選択することができる。また、入力画像ブロックの絵柄に近い画像を符号化することで、符号化効率のよい予測画像を選択することが可能である。   As described above, in the second embodiment, the difference value k between the image feature values before and after correction in the predicted image is calculated, the offset value l is set based on the difference value k, and the offset value is added to the predicted evaluation value. Since a motion vector is selected based on the update evaluation value, an image close to the design of the input image block can be selected. In addition, by encoding an image close to the design of the input image block, it is possible to select a predicted image with high encoding efficiency.

なお、上記実施の形態2では、予測画像特徴値差分値算出部21により補正した予測画像データbに基づいて補正後の予測画像特徴値を算出する例を示したが、補正後の予測画像特徴値は、予測画像特徴値差分値算出部21の外部で算出して算出結果の値を予測画像特徴値差分値算出部21に入力させる構成にしてもよい。つまり、本発明では、予測画像特徴値差分値算出部21により補正前後の予測画像の画像特徴値の差分値kを算出することができる構成であればよい。   In the second embodiment, an example in which the corrected predicted image feature value is calculated based on the predicted image data b corrected by the predicted image feature value difference value calculation unit 21 has been described. The value may be calculated outside the predicted image feature value difference value calculating unit 21 and the value of the calculation result may be input to the predicted image feature value difference value calculating unit 21. That is, in the present invention, any configuration may be used as long as the predicted image feature value difference value calculation unit 21 can calculate the difference value k of the image feature values of the predicted images before and after correction.

実施の形態3.
図7は、この発明の実施の形態3による動画像符号化装置の動きベクトル選択部及びその周辺構成を示すブロック図である。本実施の形態3による動画像符号化装置における動き予測部は、上記実施の形態2におけるオフセット値設定部22の代わりに、画像特徴値毎に優先順位を設定する優先順位設定部24を具備している。
Embodiment 3 FIG.
FIG. 7 is a block diagram showing a motion vector selection unit and its peripheral configuration of a video encoding apparatus according to Embodiment 3 of the present invention. The motion prediction unit in the video encoding apparatus according to the third embodiment includes a priority order setting unit 24 that sets a priority order for each image feature value, instead of the offset value setting unit 22 in the second embodiment. ing.

優先順位設定部24は、本発明に従う動画像符号化プログラムを構成するプログラムモジュールとして構成する。これにより、当該動画像符号化プログラムを実行するコンピュータを、優先順位設定部24として機能させることができる。   The priority order setting unit 24 is configured as a program module that configures a moving image encoding program according to the present invention. As a result, the computer that executes the moving picture encoding program can function as the priority order setting unit 24.

なお、図7において、上記実施の形態2で示した図6と同一若しくはこれに相当する構成要素やデータには同一符号を付しており、また、これら以外の図1に示した構成要素2,4〜9についても同一構成であり、これらに関する重複した説明は省略する。   In FIG. 7, the same reference numerals are given to the same components or data corresponding to or equivalent to those in FIG. 6 shown in the second embodiment, and the other components 2 shown in FIG. , 4 to 9 have the same configuration, and redundant description thereof will be omitted.

次に動作について説明する。
ここでは、上記実施の形態と異なる処理を詳細に説明する。
優先順位設定部24は、予測画像特徴値差分値算出部21から入力した予測画像特徴値の差分値kに基づいて画像特徴値毎に動きベクトルを選択する際の優先順位を設定し、優先順位に関するデータnとして動きベクトル選択部11に出力する。
Next, the operation will be described.
Here, processing different from the above embodiment will be described in detail.
The priority order setting unit 24 sets a priority order for selecting a motion vector for each image feature value based on the difference value k of the predicted image feature value input from the predicted image feature value difference value calculation unit 21, Is output to the motion vector selection unit 11 as data n.

ここで、予測画像特徴値差分値算出部21が優先順位設定部24に出力するデータとしては、補正前後の予測画像の画像特徴値の差分値kを単純に求めたものであってもよく、補正前後の予測画像の画像特徴値の差分値を小区間にクラス分けしたデータであってもよい。つまり、補正前後の予測画像の画像特徴値の差がわかるデータであればよく、これに基づいて予測画像の画像特徴値毎に動きベクトルを選択する際の優先順位を決定することができるデータであればよい。   Here, the data output by the predicted image feature value difference value calculation unit 21 to the priority order setting unit 24 may be obtained by simply obtaining the difference value k of the image feature values of the predicted image before and after correction, Data obtained by classifying the difference value of the image feature value of the predicted image before and after correction into small sections may be used. That is, any data can be used as long as the difference between the image feature values of the predicted image before and after the correction can be determined, and based on this data, the priority order for selecting a motion vector for each image feature value of the predicted image can be determined. I just need it.

優先順位設定部24は、入力画像ブロックに近い絵柄の予測画像を選択するため、予測画像の画像特徴値のうち入力画像ブロックの画像特徴値に近い順に優先順位を設定する。具体的には、補正前後での差分値が小さい予測画像の画像特徴値に関して優先順位が高くなるように設定される。   Since the priority order setting unit 24 selects a predicted image having a pattern close to the input image block, the priority order setting unit 24 sets the priority order in the order from the image feature value of the predicted image to the image feature value of the input image block. Specifically, the priority order is set to be higher with respect to the image feature value of the predicted image having a small difference value before and after correction.

これは、補正前後の画像特徴値の差分値が小さい予測画像の方が、予測差分画像のDC成分を可変長符号化した場合の符号化効率が高いためである。なお、予測画像の画像特徴値毎の優先順位は、予めシーケンス単位やピクチャ単位で設定しても、ピクチャ内で分割された領域毎や符号化単位ブロック毎に設定してもよい。   This is because a prediction image having a smaller difference value between image feature values before and after correction has higher encoding efficiency when the DC component of the prediction difference image is variable-length encoded. Note that the priority order for each image feature value of the predicted image may be set in advance for each sequence or picture, or may be set for each region divided within a picture or for each coding unit block.

図7では記載を省略したが、評価値算出部10は、上記実施の形態1、2と同様にして、最小の予測評価値のみならず、予測評価値を評価するための閾値に基づいて複数の予測評価値を抽出する。例えば、上記閾値としては、許容される符号化効率を与え得る予測評価値の最上限値が設定される。   Although not shown in FIG. 7, the evaluation value calculation unit 10 includes a plurality of evaluation values based on threshold values for evaluating not only the minimum predicted evaluation value but also the predicted evaluation value, as in the first and second embodiments. The predicted evaluation value of is extracted. For example, as the threshold value, a maximum upper limit value of a prediction evaluation value that can provide an acceptable encoding efficiency is set.

上記閾値以下として複数の予測評価値iが抽出されると、これらの予測評価値iは、評価値算出部10から動きベクトル選択部11に出力される他、図中特に記載を省略したが優先順位設定部24にも出力される。   When a plurality of prediction evaluation values i are extracted below the threshold, these prediction evaluation values i are output from the evaluation value calculation unit 10 to the motion vector selection unit 11 and are not particularly described in the figure but have priority. Also output to the rank setting unit 24.

優先順位設定部24では、評価値算出部10により上記閾値以下として抽出された複数の予測評価値iの大小関係などから、これら予測評価値iに対応する予測画像の画像特徴値に順位付けを行う。さらに、優先順位設定部24は、予測画像特徴値差分値算出部21から入力した予測画像特徴値の差分値kを用い、上述のようにして当該差分値kに対応し且つ上述した順位付けが行われた各画像特徴値について動きベクトル選択に関する優先順位を設定する。   The priority order setting unit 24 ranks the image feature values of the predicted images corresponding to the prediction evaluation values i based on the magnitude relationship of the plurality of prediction evaluation values i extracted by the evaluation value calculation unit 10 as being below the threshold value. Do. Furthermore, the priority order setting unit 24 uses the difference value k of the predicted image feature value input from the predicted image feature value difference value calculation unit 21, and corresponds to the difference value k as described above and the ranking described above. Priorities relating to motion vector selection are set for each performed image feature value.

このように処理するのは、以下のような理由からである。
例えば、差分値kに基づく優先順位が第1位の画像特徴値の予測画像であるにも関わらず、この予測画像の予測評価値iが上記閾値より大きいと、評価値算出部10は、当該予測評価値iを出力しない。
The reason for this processing is as follows.
For example, if the predicted evaluation value i of the predicted image is larger than the threshold value even though the priority based on the difference value k is the predicted image of the first image feature value, the evaluation value calculation unit 10 The predicted evaluation value i is not output.

また、フェードインやフラッシュにより輝度変化や色差変化等の変化の度合いが大きい画像などにおいては、補正前後の予測画像の画像特徴値の差分値kが大きく、これに基づき設定された優先順位が第2位や第3位に相当する画像特徴値の予測画像であってもその予測評価値iが上記閾値より小さければ、評価値算出部10により抽出される。   In addition, in an image having a large degree of change such as luminance change or color difference change due to fade-in or flash, the difference value k of the image feature value of the predicted image before and after correction is large, and the priority order set based on this is the first priority. Even if the predicted image of the image feature value corresponding to the second or third place is the predicted evaluation value i smaller than the threshold value, it is extracted by the evaluation value calculation unit 10.

この場合、動きベクトル選択部11は、差分値kに基づく優先順位が第2位や第3位の画像特徴値の予測画像に対応する動きベクトル候補を選択し、優先順位が第1位の画像特徴値の予測画像が選択されない。   In this case, the motion vector selection unit 11 selects a motion vector candidate corresponding to the predicted image having the second or third image feature value based on the difference value k, and the image having the first priority. The predicted image of the feature value is not selected.

そこで、上記閾値以下として抽出された複数の予測評価値iに対応する予測画像の画像特徴値に順位付けを行い、差分値kに対応し且つ上述した順位付けが行われた各画像特徴値について動きベクトル選択に関する優先順位を設定する。   Therefore, the image feature values of the prediction images corresponding to the plurality of prediction evaluation values i extracted as the threshold value or less are ranked, and each image feature value corresponding to the difference value k and subjected to the ranking described above is ranked. Set priorities for motion vector selection.

動きベクトル選択部11では、動きベクトル探索範囲で探索された動きベクトル候補が複数あれば、これらのうち優先順位設定部24から入力した優先順位が最も高い画像特徴値の予測画像に対応する動きベクトルを選択し、選択した動きベクトルに関する動きベクトル情報cを生成して後段の構成(画像メモリ部4及び可変長符号化部9)に出力する。   In the motion vector selection unit 11, if there are a plurality of motion vector candidates searched in the motion vector search range, the motion vector corresponding to the predicted image of the image feature value having the highest priority input from the priority order setting unit 24 among them. Is selected, and motion vector information c relating to the selected motion vector is generated and output to the subsequent configuration (image memory unit 4 and variable length encoding unit 9).

以上のように、この実施の形態3によれば、予測画像指定領域の予測画像の画像特徴値毎に動きベクトル選択に関する優先順位nを設定し、評価値算出部10より算出された予測評価値に対応する動きベクトル候補の中から優先順位に基づいて動きベクトルを選択するので、予測評価値及び画像特徴値の優先順位に基づいて入力画像ブロックの絵柄により近い画像を選択することができる。また、入力画像ブロックの絵柄により近い画像を符号化することで、符号化効率のよい予測画像を選択することが可能である。   As described above, according to the third embodiment, the priority order n related to motion vector selection is set for each image feature value of the predicted image in the predicted image designation region, and the predicted evaluation value calculated by the evaluation value calculation unit 10 is set. Since the motion vector is selected based on the priority order from among the motion vector candidates corresponding to, an image closer to the design of the input image block can be selected based on the priority order of the prediction evaluation value and the image feature value. In addition, by encoding an image closer to the design of the input image block, it is possible to select a predicted image with high encoding efficiency.

実施の形態4.
図8は、この発明の実施の形態4による動画像符号化装置の動きベクトル選択部及びその周辺構成を示すブロック図である。本実施の形態4による動画像符号化装置における動き予測部は、上記実施の形態2における構成に上記実施の形態3で示した優先順位設定部24を具備している。
Embodiment 4 FIG.
FIG. 8 is a block diagram showing a motion vector selection unit and its peripheral configuration of a video encoding apparatus according to Embodiment 4 of the present invention. The motion prediction unit in the moving picture coding apparatus according to the fourth embodiment includes the priority order setting unit 24 shown in the third embodiment in the configuration of the second embodiment.

これら構成要素も、上記実施の形態と同様に、本発明に従う動画像符号化プログラムを構成するプログラムモジュールとして構成し、当該動画像符号化プログラムをコンピュータに実行させることで、上記構成要素として機能させることができる。   Similar to the above-described embodiment, these components are also configured as program modules that configure the moving image encoding program according to the present invention, and the computer executes the moving image encoding program so as to function as the above-described components. be able to.

なお、図8において、上記実施の形態2で示した図6と同一若しくはこれに相当する構成要素やデータには同一符号を付しており、また、これら以外の図1に示した構成要素2,4〜9についても同一構成であり、これらに関する重複した説明は省略する。   In FIG. 8, the same reference numerals are given to the same components or data as those in FIG. 6 shown in the second embodiment, or the other components 2 shown in FIG. , 4 to 9 have the same configuration, and redundant description thereof will be omitted.

次に動作について説明する。
ここでは、上記実施の形態と異なる処理を詳細に説明する。
予測画像特徴値差分値算出部21からの差分値kは、オフセット値設定部22及び優先順位設定部24に出力される。この差分値kとしては、補正前後の予測画像の画像特徴値の差分値を小区間にクラス分けしたデータであってもよく、補正前後の予測画像の画像特徴値の差がわかるデータであればよい。
Next, the operation will be described.
Here, processing different from the above embodiment will be described in detail.
The difference value k from the predicted image feature value difference value calculation unit 21 is output to the offset value setting unit 22 and the priority order setting unit 24. The difference value k may be data obtained by classifying the difference values of the image feature values of the predicted image before and after the correction into small sections, as long as the difference between the image feature values of the predicted image before and after the correction is known. Good.

オフセット値設定部22では、上記実施の形態2と同様にして、予測画像特徴値差分値算出部21から入力した補正前後の予測画像特徴値の差分値kに基づいて、オフセット値lを設定し(例えば、差分値kの関数値)、更新評価値算出部23に出力する。   In the offset value setting unit 22, the offset value l is set based on the difference value k between the predicted image feature values before and after correction input from the predicted image feature value difference value calculation unit 21, as in the second embodiment. (For example, the function value of the difference value k) is output to the update evaluation value calculator 23.

上述したオフセット値lの設定は、入力画像ブロックに近い絵柄の予測画像を選択するため、予測画像の画像特徴値の中で入力画像ブロックの画像特徴値に近い程、小さいオフセット値となる傾向になるよう設定する。つまり、補正前後の予測画像の画像特徴値の差分値kが小さい程、オフセット値が小さくなる傾向となる。   Since the setting of the offset value 1 described above selects a predicted image having a pattern close to the input image block, the closer to the image feature value of the input image block, the smaller the offset value tends to be. Set to be. That is, the offset value tends to be smaller as the difference value k between the image feature values of the predicted images before and after correction is smaller.

また、オフセット値lは、画像特徴値に対して小区間にクラス分けされて階段状に量子的に値を設定してもよい。さらに、予めシーケンス単位やピクチャ単位でオフセット値を設定しても、ピクチャ内の領域毎や符号化単位ブロック毎にオフセット値を設定してもよい。   Further, the offset value l may be classified into small sections with respect to the image feature value, and the value may be set in a stepwise manner. Further, the offset value may be set in advance for each sequence or picture, or may be set for each region in the picture or for each coding unit block.

更新評価値算出部23では、上述のようにして設定されたオフセット値lと、上記実施の形態1と同様にして評価値算出部10が算出した予測評価値iとを加算して更新評価値mを算出する。この更新評価値mは、更新評価値算出部23から動きベクトル選択部11に出力される。なお、評価値算出部10が、上記実施の形態1で示した予測評価値を評価するための閾値により複数の予測評価値を抽出した場合、更新評価値算出部23は、これに応じて複数の更新評価値mを算出して動きベクトル選択部11に出力する。   The update evaluation value calculation unit 23 adds the offset value l set as described above and the predicted evaluation value i calculated by the evaluation value calculation unit 10 in the same manner as in the first embodiment to update the update evaluation value. m is calculated. The update evaluation value m is output from the update evaluation value calculation unit 23 to the motion vector selection unit 11. When the evaluation value calculation unit 10 extracts a plurality of prediction evaluation values based on the threshold value for evaluating the prediction evaluation value shown in the first embodiment, the update evaluation value calculation unit 23 has a plurality of update evaluation value calculation units 23 corresponding thereto. The update evaluation value m is calculated and output to the motion vector selection unit 11.

優先順位設定部24は、予測画像特徴値差分値算出部21から入力した差分値kに基づいて、画像特徴値毎に動きベクトルを選択する際の優先順位を設定し、優先順位に関するデータnとして動きベクトル選択部11に出力する。具体的には、入力画像ブロックに近い絵柄の予測画像を選択するため、予測画像の画像特徴値のうち入力画像ブロックの画像特徴値に近い順、つまり差分値kが小さい予測画像の画像特徴値に関して優先順位が高くなるように設定される。   The priority order setting unit 24 sets a priority order for selecting a motion vector for each image feature value based on the difference value k input from the predicted image feature value difference value calculation unit 21, and sets the priority order as data n. The result is output to the motion vector selection unit 11. Specifically, in order to select a predicted image having a pattern close to the input image block, among the image feature values of the predicted image, the image feature value of the predicted image having the smallest difference value k, in order from the image feature value of the input image block. Is set to have a higher priority.

これは、補正前後の画像特徴値の差分値が小さい予測画像の方が、予測差分画像のDC成分を可変長符号化した場合の符号化効率が高いためである。なお、予測画像の画像特徴値毎の優先順位は、予めシーケンス単位やピクチャ単位で設定しても、ピクチャ内で分割された領域毎や符号化単位ブロック毎に設定してもよい。   This is because a prediction image having a smaller difference value between image feature values before and after correction has higher encoding efficiency when the DC component of the prediction difference image is variable-length encoded. Note that the priority order for each image feature value of the predicted image may be set in advance for each sequence or picture, or may be set for each region divided within a picture or for each coding unit block.

動きベクトル選択部11には、更新評価値算出部23から入した更新評価値mと最小の更新評価値との差分に関する閾値が設定されており、更新評価値算出部23が算出した更新評価値mのうち、最小の更新評価値との間での差分が当該閾値以下である更新評価値mを抽出する。   The motion vector selection unit 11 is set with a threshold regarding the difference between the update evaluation value m input from the update evaluation value calculation unit 23 and the minimum update evaluation value, and the update evaluation value calculated by the update evaluation value calculation unit 23 is set. Among m, the update evaluation value m whose difference from the minimum update evaluation value is equal to or less than the threshold is extracted.

最小の更新評価値との差分に関する閾値としては、固定値として予め設定するものや、入力画像又は予測画像の画像特徴から任意に設定及び更新される可変値でもよい。但し、どの場合においても、符号化効率のよい動きベクトルの候補を複数選択できる範囲での値を設定する。   The threshold value regarding the difference from the minimum update evaluation value may be a preset value as a fixed value, or a variable value that is arbitrarily set and updated from the image characteristics of the input image or predicted image. However, in any case, a value is set within a range in which a plurality of motion vector candidates with high coding efficiency can be selected.

例えば、更新評価値mの最小値との差分について値を変更して、動きベクトルの情報量や量子化ステップ、S/N値などのパラメータの統計をとり、同時に画質評価を行って決定され、符号化効率の良い動きベクトルを与える上記差分の最上限値が上記閾値として設定される。   For example, by changing the value of the difference between the update evaluation value m and the minimum value, taking statistics of parameters such as the amount of information of the motion vector, the quantization step, and the S / N value, and simultaneously determining the image quality, The upper limit value of the difference that gives a motion vector with good coding efficiency is set as the threshold value.

このようにすることで、最小値付近の複数の更新評価値mであって、いずれの更新評価値mも動きベクトル候補を導き出せるものの中から入力画像に近い動きベクトルを選択することができる。   By doing so, it is possible to select a motion vector close to the input image from among a plurality of update evaluation values m near the minimum value, and any of the update evaluation values m can derive a motion vector candidate.

なお、上記閾値により抽出された更新評価値mに対応する予測画像の中には、差分値kにより設定された優先順位が最も高い画像特徴値を有するものが含まれない場合がある。つまり、最も優先順位の高い画像特徴値の更新評価値が上記閾値によって常に選別されるとは限らない。   The predicted image corresponding to the update evaluation value m extracted by the threshold value may not include an image having an image feature value with the highest priority set by the difference value k. That is, the update evaluation value of the image feature value with the highest priority is not always selected based on the threshold value.

そこで、動きベクトル選択部11は、上記閾値により選別した更新評価値mに対応する予測画像の画像特徴値のうち、優先順位設定部24から入力した優先順位が最も高い画像特徴値の予測画像に対応する動きベクトル候補を選択し、選択した動きベクトルに関する動きベクトル情報cを生成して後段の構成(画像メモリ部4及び可変長符号化部9)に出力する。   Therefore, the motion vector selection unit 11 selects the predicted image having the highest image feature value input from the priority setting unit 24 among the image feature values of the predicted image corresponding to the update evaluation value m selected by the threshold value. A corresponding motion vector candidate is selected, and motion vector information c relating to the selected motion vector is generated and output to the subsequent configuration (image memory unit 4 and variable length coding unit 9).

以上のように、この実施の形態4によれば、予測画像指定領域の予測画像の補正前後の画像特徴値の差分値kに基づいて、オフセット値lを設定し(例えば、差分値kの関数値)、オフセット値lと予測評価値iを加算してなる更新評価値mを算出すると共に、予測画像の画像特徴値毎に動きベクトル選択に関する優先順位を設定し、更新評価値m及び優先順位に基づいて符号化対象の入力画像ブロックの符号化に利用する動きベクトルを選択するので、入力画像ブロックの画像特徴値に近い予測画像の画像特徴値に対応する予測評価値を優先的に選択することができ、入力画像ブロックの絵柄に近い画像を選択することができる。また、入力画像の絵柄に近い画像を符号化することで符号化効率のよい予測画像を選択することが可能である。
なお、上記実施の形態1から実施の形態4では、コンピュータプログラムで本発明の装置を具現化する説明をしたが、全部又は一部をハードウエアで構成してもよく、本発明を制限するものではない。
As described above, according to the fourth embodiment, the offset value l is set based on the difference value k between the image feature values before and after the correction of the predicted image in the predicted image designation region (for example, a function of the difference value k). Value), an update evaluation value m obtained by adding the offset value l and the prediction evaluation value i, and a priority order for motion vector selection is set for each image feature value of the prediction image, and the update evaluation value m and the priority order are set. Since the motion vector used for encoding the input image block to be encoded is selected based on the image, the prediction evaluation value corresponding to the image feature value of the predicted image close to the image feature value of the input image block is preferentially selected. And an image close to the pattern of the input image block can be selected. Moreover, it is possible to select a prediction image with high encoding efficiency by encoding an image close to the pattern of the input image.
In the first to fourth embodiments, the apparatus of the present invention is embodied by a computer program. However, all or a part of the apparatus may be configured by hardware, which limits the present invention. is not.

この発明の実施の形態1による動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder by Embodiment 1 of this invention. 図1中の動き予測部の構成を示すブロック図である。It is a block diagram which shows the structure of the motion estimation part in FIG. 図1中の画像メモリ部に記憶される予測画像フレーム、これに規定された動き探索範囲、予測画像指定領域及び予測画像ブロックを示す図である。It is a figure which shows the prediction image frame memorize | stored in the image memory part in FIG. 1, the motion search range prescribed | regulated to this, a prediction image designation | designated area | region, and a prediction image block. 図1中の画像補正部の構成を示すブロック図である。It is a block diagram which shows the structure of the image correction part in FIG. 予測画像指定領域の予測画像及び入力画像の画素値とその発生頻度との関係を示すグラフである。It is a graph which shows the relationship between the predicted value of a predicted image designation | designated area | region, the pixel value of an input image, and its occurrence frequency. この発明の実施の形態2による動画像符号化装置の画像補正部及び動き予測部の構成を示すブロック図である。It is a block diagram which shows the structure of the image correction part and the motion estimation part of the moving image encoder by Embodiment 2 of this invention. この発明の実施の形態3による動画像符号化装置の動きベクトル選択部及びその周辺構成を示すブロック図である。It is a block diagram which shows the motion vector selection part and its periphery structure of the moving image encoder by Embodiment 3 of this invention. この発明の実施の形態4による動画像符号化装置の動きベクトル選択部及びその周辺構成を示すブロック図である。It is a block diagram which shows the motion vector selection part and its periphery structure of the moving image encoder by Embodiment 4 of this invention.

符号の説明Explanation of symbols

1 動画像符号化装置、2 画像補正部、3,3a 動き予測部、4 画像メモリ部、5 差分演算部、6 符号化部、7 復号部、8 復号加算部、9 可変長符号化部、10 評価値算出部、11 動きベクトル選択部、12 動きベクトル探索範囲指定部(探索範囲指定部)、13 予測画像領域指定部(領域指定部)、14 予測画像フレーム、15 動きベクトル探索範囲、16 予測画像指定領域、17 予測画像ブロック、18 入力画像特徴値算出部、19 予測画像特徴値算出部、20 予測画像補正部、21 予測画像特徴値差分算出部(差分算出部)、22 オフセット値設定部、23 更新評価値算出部、24 優先順位設定部。
DESCRIPTION OF SYMBOLS 1 Moving image encoder, 2 Image correction part, 3, 3a Motion estimation part, 4 Image memory part, 5 Difference calculating part, 6 Encoding part, 7 Decoding part, 8 Decoding addition part, 9 Variable length encoding part, DESCRIPTION OF SYMBOLS 10 Evaluation value calculation part, 11 Motion vector selection part, 12 Motion vector search range designation | designated part (search range designation | designated part), 13 Predictive image area designation | designated part (area | region designation | designated part), 14 Predictive image frame, 15 Motion vector search range, 16 Predicted image designation region, 17 Predicted image block, 18 Input image feature value calculating unit, 19 Predicted image feature value calculating unit, 20 Predicted image correcting unit, 21 Predicted image feature value difference calculating unit (difference calculating unit), 22 Offset value setting Part, 23 update evaluation value calculation part, 24 priority order setting part.

Claims (11)

動き予測により動画像を符号化する動画像符号化装置において、
動きベクトルの探索範囲を指定する探索範囲指定部と、
上記動きベクトルの探索範囲内に動き予測用の補正を施すべき予測画像指定領域を指定する領域指定部と、
上記動き予測用の補正として、符号化対象画像の画像特徴値に合うように上記予測画像指定領域の予測画像の画像特徴値を補正する予測画像補正部と、
上記動き予測用の補正が施された予測画像と上記符号化対象画像とのマッチング処理により、上記符号化対象画像との差異の度合いを示す上記予測画像の予測評価値を算出する評価値算出部と、
上記予測評価値に基づいて上記符号化対象画像の符号化に用いる動きベクトルを選択する動きベクトル選択部と
を備えたことを特徴とする動画像符号化装置。
In a video encoding device that encodes a video by motion prediction,
A search range specifying unit for specifying a search range of a motion vector;
An area designating unit for designating a predicted image designating area to be corrected for motion prediction within the motion vector search range;
As the motion prediction correction, a predicted image correction unit that corrects the image feature value of the predicted image in the predicted image designation region so as to match the image feature value of the encoding target image;
An evaluation value calculation unit that calculates a prediction evaluation value of the prediction image indicating a degree of difference between the encoding target image by a matching process between the prediction image subjected to the motion prediction correction and the encoding target image. When,
A motion image encoding device comprising: a motion vector selection unit that selects a motion vector used for encoding the encoding target image based on the prediction evaluation value.
予測画像補正部は、予測画像指定領域の予測画像において複数種類の画像特徴値を算出すると共に、符号化対象画像について上記複数種類の画像特徴に対応する画像特徴値をそれぞれ算出し、これらの値にそれぞれ合うように上記予測画像を補正し、
評価値算出部は、上記画像特徴値毎に補正された予測画像と上記符号化対象画像とのマッチング処理により上記予測画像の予測評価値を算出し、
動きベクトル選択部は、上記評価値算出部により上記画像特徴値毎に算出された予測評価値に基づいて動きベクトルを選択することを特徴とする請求項1記載の動画像符号化装置。
The predicted image correction unit calculates a plurality of types of image feature values in the predicted image of the predicted image designation area, calculates image feature values corresponding to the plurality of types of image features for the encoding target image, and sets these values. Correct the predicted image to fit each,
The evaluation value calculation unit calculates a prediction evaluation value of the prediction image by a matching process between the prediction image corrected for each image feature value and the encoding target image,
The moving image encoding apparatus according to claim 1, wherein the motion vector selection unit selects a motion vector based on the predicted evaluation value calculated for each image feature value by the evaluation value calculation unit.
予測画像補正部は、予測画像指定領域の予測画像に動き予測用の補正を施した際、上記予測画像における補正後の画素値が許容する画素値範囲を超える場合、上記予測画像の画素値が上記許容する画素値範囲内になるようにさらに補正することを特徴とする請求項1記載の動画像符号化装置。   When the prediction image correction unit performs motion prediction correction on the prediction image in the prediction image designation region, and the corrected pixel value in the prediction image exceeds an allowable pixel value range, the pixel value of the prediction image is The moving image encoding apparatus according to claim 1, further correcting so as to be within the permissible pixel value range. 評価値算出部は、動き予測用の補正が施された予測画像と符号化対象画像とのマッチング処理により算出した上記予測画像の予測評価値のうち、最小の予測評価値から複数の予測評価値を抽出するための閾値に基づいて予測評価値を抽出し、
動きベクトル選択部は、上記評価値算出部により上記閾値に基づいて複数の予測評価値が抽出された場合、これら予測評価値に対応する動きベクトル候補の中から上記符号化対象画像の符号化に用いる動きベクトルを選択することを特徴とする請求項1記載の動画像符号化装置。
The evaluation value calculation unit is configured to calculate a plurality of prediction evaluation values from the smallest prediction evaluation value among the prediction evaluation values of the prediction image calculated by the matching process between the prediction image subjected to the motion prediction correction and the encoding target image. Extract the predicted evaluation value based on the threshold for extracting
When a plurality of prediction evaluation values are extracted based on the threshold value by the evaluation value calculation unit, the motion vector selection unit encodes the encoding target image from among motion vector candidates corresponding to the prediction evaluation values. 2. The moving image encoding apparatus according to claim 1, wherein a motion vector to be used is selected.
動きベクトル選択部は、予測画像指定領域の予測画像の補正前の画像特徴値が、符号化対象画像の画像特徴値に最も近い動きベクトル候補を選択することを特徴とする請求項1記載の動画像符号化装置。   2. The moving image according to claim 1, wherein the motion vector selection unit selects a motion vector candidate whose image feature value before correction of the predicted image in the predicted image designation region is closest to the image feature value of the encoding target image. Image encoding device. 予測画像指定領域の予測画像における補正前後の画像特徴値の差分値を算出する差分値算出部と、
上記差分値算出部が算出した画像特徴値の差分値に基づいてオフセット値を設定するオフセット値設定部と、
上記オフセット値と上記予測評価値とを加算してなる更新評価値を算出する更新評価値算出部とを備え、
動きベクトル選択部は、評価値算出部より算出された予測評価値に対応する動きベクトル候補の中から、上記更新評価値に基づいて動きベクトルを選択することを特徴とする請求項1記載の動画像符号化装置。
A difference value calculation unit that calculates a difference value between image feature values before and after correction in the predicted image of the predicted image designation region;
An offset value setting unit that sets an offset value based on the difference value of the image feature value calculated by the difference value calculation unit;
An update evaluation value calculation unit that calculates an update evaluation value obtained by adding the offset value and the predicted evaluation value;
2. The moving image according to claim 1, wherein the motion vector selection unit selects a motion vector based on the update evaluation value from among motion vector candidates corresponding to the predicted evaluation value calculated by the evaluation value calculation unit. Image encoding device.
予測画像指定領域の予測画像の画像特徴値毎に動きベクトル選択に関する優先順位を設定する優先順位設定部を備え、
動きベクトル選択部は、評価値算出部より算出された予測評価値に対応する動きベクトル候補の中から、上記優先順位設定部により設定された優先順位に基づいて動きベクトルを選択することを特徴とする請求項1記載の動画像符号化装置。
A priority order setting unit that sets a priority order for motion vector selection for each image feature value of the predicted image in the predicted image designation region;
The motion vector selection unit selects a motion vector from motion vector candidates corresponding to the predicted evaluation value calculated by the evaluation value calculation unit based on the priority set by the priority setting unit. The moving picture coding apparatus according to claim 1.
予測画像指定領域の予測画像における補正前後の画像特徴値の差分値を算出する差分値算出部と、
上記差分値算出部が算出した画像特徴値の差分値に基づいてオフセット値を設定するオフセット値設定部と、
上記オフセット値と上記予測評価値を加算してなる更新評価値を算出する更新評価値算出部と、
上記予測画像指定領域の予測画像の画像特徴値毎に動きベクトル選択に関する優先順位を設定する優先順位設定部とを備え、
動きベクトル選択部は、評価値算出部より算出された予測評価値に対応する動きベクトル候補の中から、上記更新評価値算出部により算出された更新評価値及び上記優先順位設定部により設定された優先順位に基づいて動きベクトルを選択することを特徴とする請求項1記載の動画像符号化装置。
A difference value calculation unit that calculates a difference value between image feature values before and after correction in the predicted image of the predicted image designation region;
An offset value setting unit that sets an offset value based on the difference value of the image feature value calculated by the difference value calculation unit;
An update evaluation value calculation unit for calculating an update evaluation value obtained by adding the offset value and the prediction evaluation value;
A priority order setting unit that sets a priority order for motion vector selection for each image feature value of the predicted image in the predicted image designation region,
The motion vector selection unit is set by the update evaluation value calculated by the update evaluation value calculation unit and the priority order setting unit from among motion vector candidates corresponding to the predicted evaluation value calculated by the evaluation value calculation unit. 2. The moving picture encoding apparatus according to claim 1, wherein a motion vector is selected based on the priority order.
動き予測により動画像を符号化するにあたり、動きベクトルの探索範囲を指定する探索範囲指定部、
上記動きベクトルの探索範囲内に動き予測用の補正を施すべき予測画像指定領域を指定する領域指定部、
上記動き予測用の補正として、符号化対象画像の画像特徴値に合うように上記予測画像指定領域の予測画像の画像特徴値を補正する予測画像補正部、
上記動き予測用の補正が施された予測画像と上記符号化対象画像とのマッチング処理により、上記符号化対象画像との差異の度合いを示す上記予測画像の予測評価値を算出する評価値算出部、
上記評価値算出部より算出された予測評価値に対応する動きベクトル候補の中から、上記予測評価値に基づいて上記符号化対象画像の符号化に用いる動きベクトルを選択する動きベクトル選択部
としてコンピュータを機能させるプログラム。
When encoding a moving image by motion prediction, a search range specifying unit for specifying a search range of motion vectors,
An area designating unit for designating a predicted image designating area to be corrected for motion prediction within the motion vector search range;
As the motion prediction correction, a predicted image correction unit that corrects the image feature value of the predicted image in the predicted image designation region so as to match the image feature value of the encoding target image;
An evaluation value calculation unit that calculates a prediction evaluation value of the prediction image indicating a degree of difference between the encoding target image by a matching process between the prediction image subjected to the motion prediction correction and the encoding target image. ,
A motion vector selection unit that selects a motion vector used for encoding the encoding target image based on the prediction evaluation value from among motion vector candidates corresponding to the prediction evaluation value calculated by the evaluation value calculation unit. A program that makes it work.
動き予測により動画像を符号化するにあたり、動きベクトルの探索範囲を指定する探索範囲指定部、
上記動きベクトルの探索範囲内に動き予測用の補正を施すべき予測画像指定領域を指定する領域指定部、
上記動き予測用の補正として、符号化対象画像の画像特徴値に合うように上記予測画像指定領域の予測画像の画像特徴値を補正する予測画像補正部、
上記動き予測用の補正が施された予測画像と上記符号化対象画像とのマッチング処理により、上記符号化対象画像との差異の度合いを示す上記予測画像の予測評価値を算出する評価値算出部、
上記予測画像指定領域の予測画像における補正前後の画像特徴値の差分値を算出する差分値算出部、
上記差分値算出部が算出した画像特徴値の差分値に基づいてオフセット値を設定するオフセット値設定部と、
上記オフセット値と上記予測評価値を加算してなる更新評価値を算出する更新評価値算出部、
上記評価値算出部より算出された予測評価値に対応する動きベクトル候補の中から、上記更新評価値に基づいて上記符号化対象画像の符号化に用いる動きベクトルを選択する動きベクトル選択部
としてコンピュータを機能させるプログラム。
When encoding a moving image by motion prediction, a search range specifying unit for specifying a search range of motion vectors,
An area designating unit for designating a predicted image designating area to be corrected for motion prediction within the motion vector search range;
As the motion prediction correction, a predicted image correction unit that corrects the image feature value of the predicted image in the predicted image designation region so as to match the image feature value of the encoding target image;
An evaluation value calculation unit that calculates a prediction evaluation value of the prediction image indicating a degree of difference between the encoding target image by a matching process between the prediction image subjected to the motion prediction correction and the encoding target image. ,
A difference value calculation unit for calculating a difference value between image feature values before and after correction in the predicted image of the predicted image designation region;
An offset value setting unit that sets an offset value based on the difference value of the image feature value calculated by the difference value calculation unit;
An update evaluation value calculation unit for calculating an update evaluation value obtained by adding the offset value and the predicted evaluation value;
A computer as a motion vector selection unit that selects a motion vector used for encoding the encoding target image from the motion vector candidates corresponding to the predicted evaluation value calculated by the evaluation value calculation unit. A program that makes it work.
動き予測により動画像を符号化するにあたり、動きベクトルの探索範囲を指定する探索範囲指定部、
上記動きベクトルの探索範囲内に動き予測用の補正を施すべき予測画像指定領域を指定する領域指定部、
上記動き予測用の補正として、符号化対象画像の画像特徴値に合うように上記予測画像指定領域の予測画像の画像特徴値を補正する予測画像補正部、
上記動き予測用の補正が施された予測画像と上記符号化対象画像とのマッチング処理により、上記符号化対象画像との差異の度合いを示す上記予測画像の予測評価値を算出する評価値算出部、
上記予測画像指定領域の予測画像における補正前後の画像特徴値の差分値を算出する差分値算出部、
上記差分値算出部が算出した画像特徴値の差分値に基づいてオフセット値を設定するオフセット値設定部、
上記オフセット値と上記予測評価値を加算してなる更新評価値を算出する更新評価値算出部、
上記予測画像指定領域の予測画像の画像特徴値毎に動きベクトル選択に関する優先順位を設定する優先順位設定部、
上記評価値算出部より算出された予測評価値に対応する動きベクトル候補の中から、上記更新評価値算出部により算出された更新評価値及び上記優先順位設定部により設定された優先順位に基づいて上記符号化対象画像の符号化に用いる動きベクトルを選択する動きベクトル選択部
としてコンピュータを機能させるプログラム。
When encoding a moving image by motion prediction, a search range specifying unit for specifying a search range of motion vectors,
An area designating unit for designating a predicted image designating area to be corrected for motion prediction within the motion vector search range;
As the motion prediction correction, a predicted image correction unit that corrects the image feature value of the predicted image in the predicted image designation region so as to match the image feature value of the encoding target image;
An evaluation value calculation unit that calculates a prediction evaluation value of the prediction image indicating a degree of difference between the encoding target image by a matching process between the prediction image subjected to the motion prediction correction and the encoding target image. ,
A difference value calculation unit for calculating a difference value between image feature values before and after correction in the predicted image of the predicted image designation region;
An offset value setting unit that sets an offset value based on the difference value of the image feature value calculated by the difference value calculating unit;
An update evaluation value calculation unit for calculating an update evaluation value obtained by adding the offset value and the predicted evaluation value;
A priority order setting unit that sets a priority order for motion vector selection for each image feature value of the predicted image in the predicted image designation region;
Based on the update evaluation value calculated by the update evaluation value calculation unit and the priority set by the priority setting unit from among motion vector candidates corresponding to the predicted evaluation value calculated by the evaluation value calculation unit. A program that causes a computer to function as a motion vector selection unit that selects a motion vector used for encoding the encoding target image.
JP2004145300A 2004-05-14 2004-05-14 Dynamic image encoding device and program Pending JP2005328383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004145300A JP2005328383A (en) 2004-05-14 2004-05-14 Dynamic image encoding device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004145300A JP2005328383A (en) 2004-05-14 2004-05-14 Dynamic image encoding device and program

Publications (1)

Publication Number Publication Date
JP2005328383A true JP2005328383A (en) 2005-11-24

Family

ID=35474354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004145300A Pending JP2005328383A (en) 2004-05-14 2004-05-14 Dynamic image encoding device and program

Country Status (1)

Country Link
JP (1) JP2005328383A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007072895A1 (en) * 2005-12-21 2007-06-28 Matsushita Electric Industrial Co., Ltd. In-screen prediction mode decision method, image encoding method, and image encoding device
JP2015177342A (en) * 2014-03-14 2015-10-05 三菱電機株式会社 Image coding device, image decoding device, image coding method, and image decoding method
JP2015177294A (en) * 2014-03-14 2015-10-05 三菱電機株式会社 Terminal device and data management device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007072895A1 (en) * 2005-12-21 2007-06-28 Matsushita Electric Industrial Co., Ltd. In-screen prediction mode decision method, image encoding method, and image encoding device
JP2015177342A (en) * 2014-03-14 2015-10-05 三菱電機株式会社 Image coding device, image decoding device, image coding method, and image decoding method
JP2015177294A (en) * 2014-03-14 2015-10-05 三菱電機株式会社 Terminal device and data management device

Similar Documents

Publication Publication Date Title
JP4529919B2 (en) Adaptive quantization apparatus and adaptive quantization program
JP4166781B2 (en) Motion vector detection apparatus and motion vector detection method
US20060045186A1 (en) Apparatus and method for coding moving picture
US20070098075A1 (en) Motion vector estimating device and motion vector estimating method
JP4735375B2 (en) Image processing apparatus and moving image encoding method.
JP4252916B2 (en) Method for determining motion vector search range
TWI442776B (en) Motion vector predictive coding method, motion vector predictive decoding method, moving picture coding apparatus, moving picture decoding apparatus, and programs thereof
JP2013505615A (en) Video weighted motion compensation
RU2551473C2 (en) System of video coding, method of video coding and programme of video coding
JP2014241579A (en) Video compression device
JP6052319B2 (en) Video encoding device
JP5246603B2 (en) Synchronization control method and information processing apparatus
JP5566786B2 (en) Error absolute value sum estimation system and estimation method
JP5649296B2 (en) Image encoding device
JP2009071827A (en) Method and system for correcting predicted value based on color, image compressing/recovering method and system using the same
JP4469904B2 (en) Moving picture decoding apparatus, moving picture decoding method, and storage medium storing moving picture decoding program
JP2005328383A (en) Dynamic image encoding device and program
JP6295805B2 (en) Image coding method, image coding apparatus, and image coding program
US9948932B2 (en) Image processing apparatus and control method of image processing apparatus
JPH10304371A (en) Moving vector detecting device
KR101710238B1 (en) Method for matching block based on statistical distribution
JP2007074634A (en) Moving image compressing apparatus
JP2007129662A (en) Image encoder
JP2007060452A (en) Method, device, and program for moving image predictive coding and computer readable recording medium having the program recorded thereon
JP6758977B2 (en) Image processing equipment, image processing methods and programs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070405

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071015

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080715

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090407

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090603

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091027