Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3872076B2 - Motion compensation device - Google Patents
[go: Go Back, main page]

JP3872076B2 - Motion compensation device - Google Patents

Motion compensation device Download PDF

Info

Publication number
JP3872076B2
JP3872076B2 JP2004301445A JP2004301445A JP3872076B2 JP 3872076 B2 JP3872076 B2 JP 3872076B2 JP 2004301445 A JP2004301445 A JP 2004301445A JP 2004301445 A JP2004301445 A JP 2004301445A JP 3872076 B2 JP3872076 B2 JP 3872076B2
Authority
JP
Japan
Prior art keywords
vector
motion
motion vector
distortion
unit
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.)
Expired - Fee Related
Application number
JP2004301445A
Other languages
Japanese (ja)
Other versions
JP2005073291A (en
Inventor
篤道 村上
英雄 大平
博文 西川
研一 浅野
悦久 山田
俊一 関口
光太郎 浅井
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 JP2004301445A priority Critical patent/JP3872076B2/en
Publication of JP2005073291A publication Critical patent/JP2005073291A/en
Application granted granted Critical
Publication of JP3872076B2 publication Critical patent/JP3872076B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

この発明は、ディジタル映像送信装置、ディジタルCATVやディジタル放送システムなどに適用される動き補償装置に関するものである。   The present invention relates to a motion compensation device applied to a digital video transmission device, a digital CATV, a digital broadcasting system, and the like.

図18は電子情報通信学会技術研究報告VOL.95,No.217、P2〜8(1995)記載の「MPEG2実時間符号化システムチップセットの開発」に示された従来のディジタル画像符号化方式を説明するブロック図である。
図18において、400は入力画像202と参照画像152とを入力して予測画像204と最適ベクトル449を出力する動き補償処理部、222は入力画像202と予測画像204との差分を求めて残差信号223を出力する差分器、401は入力される残差信号223を符号化して差分符号化データ450を出力する差分信号符号化処理部、402は入力される最適ベクトル449を符号化して動きベクトル符号化データ451を出力する動きベクトル符号化処理部である。
FIG. 18 shows the technical report VOL. 95, no. 217, P2-8 (1995), is a block diagram for explaining a conventional digital image coding system shown in "Development of MPEG2 real-time coding system chip set".
In FIG. 18, reference numeral 400 denotes a motion compensation processing unit that inputs an input image 202 and a reference image 152 and outputs a predicted image 204 and an optimal vector 449, and 222 calculates a residual between the input image 202 and the predicted image 204. A difference unit that outputs a signal 223, 401 a differential signal encoding processing unit that encodes an input residual signal 223 and outputs differential encoded data 450, and 402 encodes an input optimal vector 449 to generate a motion vector. It is a motion vector encoding processing unit that outputs encoded data 451.

次に、上記構成に係る動作について説明する。
動き補償処理部400は、現フレームの画像である入力画像202と前フレームの画像である参照画像152とを入力して、入力画像202に最も似かよった画像を参照画像152の中から検索する。検索方法は、入力画像202と参照画像152との差分絶対値和をとり、参照画像の中で最も小さい歪みを与える画像を最適画像、すなわち予測画像204とする。このとき、図19に示すごとく、最適画像(予測画像)が現フレームにおける入力画像の位置からどのくらい空間的に動いているかを示したのが動きベクトルである。この動きベクトルは最適ベクトル449として動きベクトル符号化処理部402に送信され動きベクトル符号化処理部402にて符号化され出力される。
Next, the operation according to the above configuration will be described.
The motion compensation processing unit 400 inputs an input image 202 that is an image of the current frame and a reference image 152 that is an image of the previous frame, and searches the reference image 152 for an image most similar to the input image 202. In the search method, the sum of absolute differences between the input image 202 and the reference image 152 is calculated, and the image that gives the smallest distortion among the reference images is set as the optimum image, that is, the predicted image 204. At this time, as shown in FIG. 19, a motion vector indicates how much the optimum image (predicted image) moves from the position of the input image in the current frame. This motion vector is transmitted to the motion vector encoding processing unit 402 as an optimum vector 449, and is encoded and output by the motion vector encoding processing unit 402.

一方、動き補償処理部400によって予測された後の予測誤差信号については、動き補償処理部400で選択された最適な予測画像204と入力画像202との差分を差分器222で取り、その残差信号223を差分信号符号化処理部401により符号化して出力する。この処理の符号化処理における発生情報量は、差分信号符号化処理部401で発生する差分符号化データ450の情報量と動きベクトル符号化処理部402で発生する動きベクトル符号化データ451の情報量を合わせた値となる。   On the other hand, for the prediction error signal after being predicted by the motion compensation processing unit 400, the difference between the optimum predicted image 204 selected by the motion compensation processing unit 400 and the input image 202 is obtained by the subtractor 222, and the residual is obtained. The signal 223 is encoded by the differential signal encoding processing unit 401 and output. The amount of information generated in the encoding process of this process is the information amount of the difference encoded data 450 generated by the difference signal encoding processing unit 401 and the information amount of the motion vector encoded data 451 generated by the motion vector encoding processing unit 402. Is the combined value.

従来の装置は、上述したように動き補償処理部400において差分絶対値和の最小を示すベクトルを最適ベクトルとしているが、画像符号化処理では、動き補償によって最適ベクトルとして選ばれたベクトルが符号化(動きベクトル符号化)されると同時に、現ブロックと最適ベクトル位置の前ブロックの残差(予測誤差)に対してさらに符号化(残差符号化)されることになる。そして、動きベクトル符号化による情報量と残差符号化による情報量を合わせた情報が符号化量となる。そのため、例えば最適ベクトルとされたものが符号化したら非常に情報量が大きくなってしまう場合などは、上記方法で選ばれた最適ベクトルが符号化量を最小にするとは限らない。
また、一般的に動き補償予測には輝度情報のみを使用してベクトルを求めているが、輝度信号が同じで色差信号が異なる画像では誤った動きベクトルを抽出してしまう。
In the conventional apparatus, as described above, the motion compensation processing unit 400 uses the vector indicating the minimum difference sum as the optimal vector, but in the image encoding process, the vector selected as the optimal vector by the motion compensation is encoded. At the same time as (motion vector coding), the residual (prediction error) between the current block and the previous block at the optimum vector position is further coded (residual coding). The information amount obtained by combining the information amount by the motion vector encoding and the information amount by the residual encoding is the encoding amount. For this reason, for example, if the information vector becomes very large if the optimal vector is encoded, the optimal vector selected by the above method does not always minimize the encoding amount.
In general, motion compensation prediction uses only luminance information to determine a vector. However, an incorrect motion vector is extracted from images having the same luminance signal and different color difference signals.

この発明は上記のような問題点を解消するためになされたものであり、最適ベクトルを決定するために、予測差分の差分絶対値和だけでなく、動きベクトルを符号化するための符号量をも考慮することにより、トータルの符号化効率を向上させることができる動き補償装置と動画像符号化装置及び方法を得ることを目的とする。   The present invention has been made to solve the above problems, and in order to determine the optimum vector, not only the sum of absolute differences of prediction differences but also the amount of code for encoding a motion vector is determined. In view of the above, it is an object of the present invention to obtain a motion compensation apparatus, a moving picture coding apparatus, and a method capable of improving the total coding efficiency.

この発明に係る動き補償装置は、動画像符号化を行う符号化を行う際、ブロック単位に前フレームのデータから動きを予測し情報量削減を行う動き補償装置において、前フレームのデータを格納する前フレームメモリ部と、現フレームのブロックデータと上記フレームメモリ部に格納された前フレームの探索範囲データの部分画像領域からパターンマッチングを行い、最小の歪を与える動きベクトルと歪値とを計算する最小歪計算部と、現在の最適動きベクトルを得るための比較参照情報となる動きベクトルである特定ベクトルを入力し、現フレームのブロックデータと当該特定ベクトルに対応する前フレームのブロックデータとの歪を計算し、上記特定ベクトルと計算された歪とを出力する特定ベクトル歪計算部と、上記最小歪計算部から出力される歪と上記特定ベクトル歪計算部から出力される歪とに基づいて最適動きベクトルを出力する最適ベクトル出力部とを備え、上記特定ベクトル歪計算部は、上記最適ベクトル出力手段から出力される最適動きベクトルを特定ベクトルとして入力し、上記最適ベクトル出力部は、上記最小歪計算部からの最小歪を与える動きベクトルと上記特定ベクトル歪計算部から出力される特定ベクトルとの差分の値に応じて、差分の値が小さければ小さいオフセット値を与え、差分の値が大きければ大きいオフセット値を与えるべくオフセット値を適応的に変更して与えるオフセット値計算部と、上記最小歪計算部からの歪値に上記オフセット値計算部からのオフセット値を加算して上記最小歪計算部からの歪に重み付けを行う加算器と、重み付けされた最小歪計算部からの歪と上記特定ベクトル歪計算部からの歪とを比較する比較器と、この比較器の比較結果に基づいて最小歪を与える動きベクトルと特定ベクトルとのいずれかを選択して最適動きベクトルとして出力するセレクタとを備えたことを特徴とするThe motion compensator according to the present invention stores the data of the previous frame in the motion compensator that predicts the motion from the data of the previous frame and reduces the amount of information when performing the encoding for moving image encoding. Performs pattern matching from the previous frame memory unit, the block data of the current frame, and the partial image area of the search range data of the previous frame stored in the frame memory unit, and calculates the motion vector and distortion value that give the minimum distortion Input a specific vector, which is a motion vector as comparison reference information for obtaining the current optimal motion vector, by inputting the minimum distortion calculation unit, and the distortion between the block data of the current frame and the block data of the previous frame corresponding to the specific vector A specific vector distortion calculation unit that outputs the specific vector and the calculated distortion, and the minimum distortion calculation unit. An optimal vector output unit that outputs an optimal motion vector based on the strain that is applied and the distortion that is output from the specific vector distortion calculation unit, and the specific vector distortion calculation unit is output from the optimal vector output means The optimal vector output unit is input as a specific vector, and the optimal vector output unit sets the difference value between the motion vector that gives the minimum distortion from the minimum distortion calculation unit and the specific vector output from the specific vector distortion calculation unit. Accordingly, if the difference value is small, a small offset value is given, and if the difference value is large, the offset value is adaptively changed so as to give a large offset value. An adder for adding the offset value from the offset value calculation unit to the distortion value and weighting the distortion from the minimum distortion calculation unit; A comparator that compares the distortion from the calculated minimum distortion calculation unit with the distortion from the specific vector distortion calculation unit, and a motion vector or specific vector that gives the minimum distortion based on the comparison result of the comparator. And a selector that selects and outputs an optimum motion vector .

以上のように、この発明によれば、最適ベクトルを決定するために、歪量として予測差分の差分絶対値和だけでなく、ベクトル符号量の符号量をも考慮することにより、トータルの符号化効率を向上させることが可能となる。予測誤差信号の符号量を大きく増加させることなく、動きベクトルの符号量を効果的に削減することが可能である。これは特に、画像データの符号量に対して動きパラメータの符号量の比率が高くなる低ビットレート符号化の際に、全体の符号量と符号化歪みのバランスの良い符号化を行うことができ、効果的である。 As described above, according to the present invention, in order to determine the optimal vector, the total coding is performed by considering not only the sum of absolute differences of prediction differences but also the code amount of the vector code amount as the distortion amount. Efficiency can be improved. It is possible to effectively reduce the code amount of the motion vector without greatly increasing the code amount of the prediction error signal. This is particularly true when performing a low bit rate encoding in which the ratio of the code amount of the motion parameter to the code amount of the image data is high, so that the overall code amount and encoding distortion can be well balanced. Is effective.

参考例1.
図1は参考例1に係る動き補償装置を示すブロック構成図である。
図1に示すように、参考例1に係る動き補償装置は、現フレームの画像である入力画像202と前フレームの画像である参照画像201とを入力して、入力画像202に最も似かよった画像ブロックを参照画像201の中から検索して動きベクトルに従った予測画像を抽出する際の入力画像202と参照画像201との間の動きベクトル203と予測画像204を出力する動き補償処理部200と、入力画像202と予測画像204との歪量として差分絶対値和206を計算して出力する歪量演算部としての差分絶対値和演算部205と、動きベクトル203を入力して符号化しベクトル符号量208を出力するベクトル値符号化部207と、動きベクトル203と差分絶対値和206及びベクトル符号量208を入力して、差分絶対値和206とベクトル符号量208から算出される評価関数を評価する動きベクトル203のすべてに対し求めて評価関数が最小値を示す動きベクトルを最適ベクトル210として出力する最適ベクトル決定部209とを備えている。
Reference Example 1
FIG. 1 is a block diagram showing a motion compensation apparatus according to Reference Example 1.
As shown in FIG. 1, the motion compensation device according to the first reference example inputs an input image 202 that is an image of the current frame and a reference image 201 that is an image of the previous frame, and is an image most similar to the input image 202. A motion compensation processing unit 200 that outputs a motion vector 203 and a predicted image 204 between the input image 202 and the reference image 201 when a block is searched from the reference image 201 and a predicted image according to the motion vector is extracted; The difference absolute value sum calculation unit 205 as a distortion amount calculation unit that calculates and outputs the difference absolute value sum 206 as the distortion amount between the input image 202 and the predicted image 204, and the motion vector 203 is input and encoded. The vector value encoding unit 207 that outputs the quantity 208, the motion vector 203, the difference absolute value sum 206, and the vector code quantity 208 are input, and the difference absolute value sum 2 6 and an optimal vector determination unit 209 that outputs a motion vector having an evaluation function having a minimum value as an optimal vector 210 for all the motion vectors 203 that evaluate the evaluation function calculated from the vector code amount 208. .

次に、上記構成に係る参考例1の動作について説明する。
動き補償処理部200は、入力画像202に対して、参照画像201から動きベクトル203に従った予測画像204を抽出する。差分絶対値和演算部205では、入力画像202と予測画像204とから差分絶対値和206を計算する。 一方、予測画像204を抽出するために使用した動きベクトル203はベクトル値符号化部207と最適ベクトル決定部209とに入力される。ベクトル値符号化部207に入力された動きベクトル203は符号化されベクトル符号量208を出力する。ここで、ベクトル値符号化部207では可変長符号化などが用いられることが多い。最適ベクトル決定部209では、差分絶対値和206とベクトル符号量208と動きベクトル203とが入力され、差分絶対値和206とベクトル符号量208とから算出される評価関数を、評価する複数の動きベクトル全てについて演算し、評価関数の値が最小値を示す動きベクトルを最適ベクトル210として出力する。ここで、使用される評価関数としては、例えば差分絶対値和206とベクトル符号量208とに重み付け加算を行ったものである。
Next, the operation of Reference Example 1 according to the above configuration will be described.
The motion compensation processing unit 200 extracts a predicted image 204 according to the motion vector 203 from the reference image 201 with respect to the input image 202. The difference absolute value sum calculation unit 205 calculates the difference absolute value sum 206 from the input image 202 and the predicted image 204. On the other hand, the motion vector 203 used to extract the predicted image 204 is input to the vector value encoding unit 207 and the optimal vector determination unit 209. The motion vector 203 input to the vector value encoding unit 207 is encoded and a vector code amount 208 is output. Here, the vector value encoding unit 207 often uses variable length encoding or the like. The optimum vector determination unit 209 receives the difference absolute value sum 206, the vector code amount 208, and the motion vector 203, and evaluates an evaluation function calculated from the difference absolute value sum 206 and the vector code amount 208. All vectors are calculated, and a motion vector whose evaluation function value indicates the minimum value is output as the optimal vector 210. Here, as an evaluation function to be used, for example, a weighted addition is performed on the sum of absolute differences 206 and the vector code amount 208.

このように、最適ベクトル210の決定に、差分絶対値和206だけを使用するのではなく、ベクトル符号量208を併用することにより、トータルの符号化効率を向上させることが可能である。特に、低レート符号化においてはベクトルの符号量が全体の符号量の半分以上を占めることもあり、ベクトル符号量を考慮した動きベクトル選択は重要である。
すなわち、動きベクトルを符号化するために符号量と予測誤差信号を符号化するための情報量を評価値として使用して最適ベクトルを選択することで、従来の動き補償予測に比べ最終的な符号化結果がより効率のよいものとなる。
As described above, it is possible to improve the total coding efficiency by using the vector code amount 208 in combination instead of using only the absolute difference sum 206 in determining the optimum vector 210. In particular, in low-rate encoding, the code amount of a vector may occupy half or more of the entire code amount, and motion vector selection considering the vector code amount is important.
That is, by selecting the optimal vector using the amount of code for encoding a motion vector and the amount of information for encoding a prediction error signal as an evaluation value, the final code is compared with the conventional motion compensated prediction. The result will be more efficient.

参考例2.
図2は参考例2に係る動き補償装置を示すブロック構成図である。
図1に示す参考例1と同一部分は同一符号を示し、その説明は省略する。新たな符号として、211は図1で歪量演算部として使用した差分絶対値和演算部205の代わりに用いた差分二乗和演算部である。差分二乗和は、差分絶対値和と比べ二乗演算を行うため、より複雑な演算が必要であるが、信号に含まれるパワー(電力)を評価することができる。一般に、パワーの方がより高精度に予測誤差信号を評価することが可能で、参考例1に比べ精度の高い予測を行うことにより、より正しく最適ベクトルを求めることが可能となる。
Reference Example 2
FIG. 2 is a block diagram showing a motion compensation apparatus according to Reference Example 2.
The same parts as those of the reference example 1 shown in FIG. As a new code, reference numeral 211 denotes a difference square sum calculation unit used instead of the difference absolute value sum calculation unit 205 used as the distortion amount calculation unit in FIG. Since the sum of squared differences performs a square calculation compared to the sum of absolute differences, a more complicated calculation is required, but the power (power) included in the signal can be evaluated. In general, it is possible to evaluate a prediction error signal with higher accuracy in power, and it is possible to obtain an optimal vector more correctly by performing prediction with higher accuracy than in Reference Example 1.

参考例3.
図3は参考例3に係る動き補償装置を説明するためのもので、参考例1及び2におけるベクトル値符号化部207の内部構成図である。
図3に示すように、ベクトル値符号化部207は、入力される動きベクトル203を遅延する遅延器213と、入力された動きベクトル203と遅延器213を介した動きベクトルとの差分を取って差分ベクトルを出力する差分器214と、上記差分ベクトルを符号化して動きベクトル符号量208を出力する差分ベクトル符号化部215とを備えている。
Reference Example 3
FIG. 3 is a diagram for explaining the motion compensation apparatus according to Reference Example 3, and is an internal configuration diagram of the vector value encoding unit 207 in Reference Examples 1 and 2.
As shown in FIG. 3, the vector value encoding unit 207 obtains a delay unit 213 that delays the input motion vector 203 and a difference between the input motion vector 203 and the motion vector that has passed through the delay unit 213. A difference unit 214 that outputs a difference vector and a difference vector encoding unit 215 that encodes the difference vector and outputs a motion vector code amount 208 are provided.

ベクトル値符号化部207に入力された動きベクトル203は、以前に入力され遅延器213に蓄積された動きベクトルとの差分が差分器214で取られ、この差分ベクトルを差分ベクトル符号化部215によって符号化される。動きベクトルは、画面内の局所的に見ると似通った値をとることが多い。従って、既に使用された近辺の動きベクトルとの差分をとることにより符号化する値を小さくすることが可能であり、ベクトル符号量を少なくして符号化効率の向上を図ることができる。   The difference between the motion vector 203 input to the vector value encoding unit 207 and the motion vector previously input and accumulated in the delay unit 213 is obtained by the difference unit 214, and this difference vector is obtained by the difference vector encoding unit 215. Encoded. The motion vector often takes a similar value when viewed locally in the screen. Therefore, it is possible to reduce the value to be encoded by taking a difference from a nearby motion vector that has already been used, and to improve the encoding efficiency by reducing the vector code amount.

参考例4.
図4は参考例4に係る動き補償装置を示すブロック構成図である。
図4において、図1に示す参考例1と同一部分は同一符号を付してその説明は省略する。新たな符号として、216aは入力画像202から平均値を分離した平均値分離入力画像217を得る第1の平均値分離部、216bは予測画像204から平均値を分離した平均値分離予測画像218を得る第2の平均値分離部、219は平均値分離入力画像217と平均値分離予測画像218とを入力して平均値分離入力画像217と平均値分離予測画像219との間の歪量を求める歪量演算部であり、この歪量演算部219は、参考例1及び2と同様に、差分絶対値和または差分二乗和の演算による評価値220を求め、最適ベクトル決定部209に入力するようになされ、最適ベクトル決定部209では、上記動きベクトル203と上記差分絶対値和または差分二乗和の演算による評価値220を入力して、評価値220を評価する複数の動きベクトル203のすべてに対し求めて、評価値が最小値を示す動きベクトルを最適ベクトル210として出力する。
Reference Example 4
FIG. 4 is a block diagram showing a motion compensation apparatus according to Reference Example 4.
In FIG. 4, the same parts as those of the reference example 1 shown in FIG. As a new code, 216a is a first average value separation unit that obtains an average value separated input image 217 obtained by separating the average value from the input image 202, and 216b is an average value separated predicted image 218 obtained by separating the average value from the predicted image 204. The obtained second average value separation unit 219 receives the average value separation input image 217 and the average value separation prediction image 218 and obtains a distortion amount between the average value separation input image 217 and the average value separation prediction image 219. As in Reference Examples 1 and 2, the distortion amount calculation unit 219 obtains an evaluation value 220 based on the calculation of the sum of absolute differences or the sum of squares of differences, and inputs the evaluation value 220 to the optimal vector determination unit 209. The optimum vector determination unit 209 receives the motion vector 203 and the evaluation value 220 obtained by calculating the sum of absolute differences or the sum of squared differences, and evaluates the evaluation value 220. Seeking for for all motion vectors 203, evaluation value is output as the optimum vector 210 a motion vector indicating the minimum value.

図4に示すように、入力画像203及び予測画像204は、各々平均値分離部216a及び216bによって平均値の分離が行われる。歪量演算部219により、平均値を分離された平均値分離予測画像217と平均値を分離された平均値分離入力画像218との間で図1及び図2で説明した差分絶対値和あるいは差分二乗和の演算による評価値220を求め、最適ベクトル決定部209に入力し、最適ベクトル210を求める。   As shown in FIG. 4, the input image 203 and the predicted image 204 are subjected to average value separation by average value separation units 216a and 216b, respectively. The difference absolute value sum or difference described with reference to FIGS. 1 and 2 between the average value separated predicted image 217 from which the average value has been separated by the distortion amount calculation unit 219 and the average value separated input image 218 from which the average value has been separated. An evaluation value 220 obtained by calculating the sum of squares is obtained and input to the optimum vector determination unit 209 to obtain the optimum vector 210.

このように、平均値を分離して評価することは、画像のレベルに依存しない動き補償を可能とすることを示す。例えば、フェードイン画像や輝度の変化が激しい画像などの場合、従来の動き探索では正確な動きを検出できなかったが、平均値を分離することによりこれらの場合にでもより精度の高い動きベクトル検出が可能となる。
すなわち、入力画像と予測画像の両方の平均値を分離した画像同士で動き予測評価を行うことにより、画像のレベルに依存しない動き補償を可能にすることができ、変化の激しい画像でもより精度の高い動きベクトル検出が可能になる。
Thus, separating and evaluating the average value indicates that motion compensation independent of the image level is possible. For example, in the case of a fade-in image or an image with a sharp change in luminance, the conventional motion search could not detect an accurate motion, but by separating the average value, even in these cases, a more accurate motion vector detection Is possible.
That is, by performing motion prediction evaluation between images obtained by separating the average values of both the input image and the predicted image, motion compensation independent of the level of the image can be made possible, and even more rapidly changing images can be made more accurate. High motion vector detection is possible.

なお、ここでは記述していないが、図1及び図2で説明したように、動きベクトル符号量208を他の評価値として用い、最適ベクトルの決定に役立てることも当然可能である。また、同様に、図3で説明したようにベクトル符号化に差分ベクトル符号化を行うことも効果がある。   Although not described here, as described with reference to FIGS. 1 and 2, it is naturally possible to use the motion vector code amount 208 as another evaluation value to help determine the optimum vector. Similarly, as described with reference to FIG. 3, it is also effective to perform differential vector coding for vector coding.

参考例5.
図5は参考例5に係る動き補償装置を示すブロック構成図である。
図5において、図1に示す参考例1と同一部分は同一符号を付して示し、その説明は省略する、新たな符号として、222は入力画像202と予測画像204とを減算して予測誤差223を求める減算器、224は予測誤差223を周波数係数225に変換するDCTやFFT等の周波数解析部、226は変換された周波数係数225に基づいて重み付け等を行い評価値227を生成する評価値生成部であり、最適ベクトル決定部209は、動きベクトル203と評価値227を入力して、複数の取りうる動きベクトルのうち、上記評価値227が最小値を示す動きベクトルを最適ベクトル210として出力する。
Reference Example 5
FIG. 5 is a block diagram showing a motion compensation apparatus according to Reference Example 5.
In FIG. 5, the same parts as those of the reference example 1 shown in FIG. 1 are denoted by the same reference numerals and the description thereof is omitted. As a new reference numeral 222, a prediction error is obtained by subtracting the input image 202 and the predicted image 204. 223 is a subtractor for calculating 223, 224 is a frequency analysis unit such as DCT or FFT that converts the prediction error 223 into the frequency coefficient 225, and 226 is an evaluation value that generates an evaluation value 227 by performing weighting based on the converted frequency coefficient 225 The optimal vector determination unit 209, which is a generation unit, receives the motion vector 203 and the evaluation value 227, and outputs, as an optimal vector 210, a motion vector having the minimum evaluation value 227 among a plurality of possible motion vectors. To do.

図5に示すように、入力画像202と予測画像204は減算器222により予測誤差223とされ、予測誤差は周波数解析部224において周波数係数225に変換される。変換された周波数係数は評価値生成部226において評価演算がなされ、評価値227として出力される。   As shown in FIG. 5, the input image 202 and the predicted image 204 are converted into a prediction error 223 by the subtractor 222, and the prediction error is converted into a frequency coefficient 225 by the frequency analysis unit 224. The converted frequency coefficient is evaluated in the evaluation value generation unit 226 and output as an evaluation value 227.

このように、予測誤差の周波数解析を行い、周波数係数を求めることは、予測誤差を変換符号化する際の処理とほぼ同様のことを行うことに相当する。例えば求められた周波数係数のうち低域成分に重みを付けて評価値を生成することにより、予測誤差を変換符号化する際の符号量をかなり正確に予測することができる。この符号量を評価値として使用することにより、より効率の良い符号化を行うことが期待できる。
すなわち、予測差分の周波数解析を行い周波数係数を求め、その係数から評価値を求めることにより、予測誤差の符号化まで含み、変換符号化後の符号量をかなり正確に予測することが可能で、効率のよい符号化が可能となる。
As described above, the frequency analysis of the prediction error and the determination of the frequency coefficient are equivalent to performing substantially the same process as when transform encoding the prediction error. For example, by generating an evaluation value by weighting the low frequency component of the obtained frequency coefficients, it is possible to predict the amount of code when transform encoding the prediction error with considerable accuracy. By using this code amount as an evaluation value, it can be expected to perform more efficient encoding.
In other words, frequency analysis of the prediction difference is performed to obtain a frequency coefficient, and by calculating an evaluation value from the coefficient, it is possible to predict the coding amount after transform coding, including the prediction error coding, fairly accurately, Efficient encoding is possible.

参考例6.
図6は参考例6に係る動き補償装置を示すブロック構成図である。
図6において、図1及び図5に示す参考例1及び5と同一符号は同一部分を示し、その説明は省略する。新たな符号として、228は減算器222からの予測誤差223を差分符号化して差分画像符号量229を出力する差分画像符号化部であり、ベクトル決定部209は、動きベクトル203と上記差分画像符号量209及びベクトル値符号化部208からのベクトル符号量208を入力して、複数の取りうる動きベクトル203のうち、上記差分画像符号量209に上記ベクトル符号量208を加えた符号量が最小となる動きベクトルを最適ベクトル210として出力する。
Reference Example 6
FIG. 6 is a block diagram showing a motion compensation apparatus according to Reference Example 6.
6, the same reference numerals as those in Reference Examples 1 and 5 shown in FIGS. 1 and 5 denote the same parts, and the description thereof is omitted. As a new code, 228 is a differential image encoding unit that differentially encodes the prediction error 223 from the subtractor 222 and outputs a differential image code amount 229. The vector determination unit 209 includes the motion vector 203 and the differential image code. The amount 209 and the vector code amount 208 from the vector value encoding unit 208 are input, and among the plurality of possible motion vectors 203, the code amount obtained by adding the vector code amount 208 to the difference image code amount 209 is the minimum. This motion vector is output as the optimum vector 210.

図6に示すように、入力画像202と予測画像204は減算器222により予測誤差223とされ、予測誤差は差分画像符号化部228によって符号化が行なわれ、符号量229が出力される。予測誤差を差分符号化することは、通常の符号化処理を行うことと同等であり、さらに、これにベクトル符号量を加えることにより、動きベクトル203を用いた際のほぼ完全な符号量が算出できる。従って、本構成をとることにより、取りうる総ての動きベクトルの中で符号量が最も最適となるベクトルを求めることが可能となる。
すなわち、予測誤差を符号化し符号化情報量を求め、さらに、ベクトル符号化の符号量とを用いることにより、そのベクトルにおけるほぼ完全な符号量を得ることが可能になり、歪みと符号量との関係において最適な符号かを行うことが可能となる。
As shown in FIG. 6, the input image 202 and the predicted image 204 are converted into a prediction error 223 by the subtractor 222, and the prediction error is encoded by the difference image encoding unit 228, and a code amount 229 is output. Differential encoding of the prediction error is equivalent to performing normal encoding processing, and by adding the vector code amount to this, a nearly complete code amount when using the motion vector 203 is calculated. it can. Therefore, by adopting this configuration, it is possible to obtain a vector having the most optimal code amount among all possible motion vectors.
That is, by encoding the prediction error to obtain the encoded information amount, and further using the vector encoding code amount, it becomes possible to obtain a nearly complete code amount in the vector, and the distortion and code amount It is possible to determine whether the code is optimal in the relationship.

参考例7.
図7は参考例7に係る動き補償装置を示すブロック構成図である。
図7において、図1に示す参考例1と同一部分は同一符号を付して示し、その説明は省略する。新たな符号として、230aは入力画像202から入力画像輝度信号231と入力画像色差信号232とを分離する第1の輝度色差分離部、230bは予測画像204から予測画像輝度信号233と予測画像色差信号234とを分離する第2の輝度色差分離部、235aは第1の輝度色差分離部230aからの入力画像輝度信号231と第2の輝度色差分離部230bからの予測画像輝度信号233との差分を求める第2の減算器、235bは第1の輝度色差分離部230aからの入力画像色差信号232と第2の輝度色差分離部230bからの予測画像色差信号234との差分を求める第1の減算器、237は第1の減算器235bからの出力に基づいて色差評価値を生成する色差評価値生成部、236は第2の減算器235aからの出力に基づいて輝度評価値を生成する輝度評価値生成部、238は色差評価値生成部237からの色差評価値と輝度評価値生成部236からの輝度評価値とに基づいて最適ベクトル決定用総評価値239を演算する評価値演算部としての加算器であり、ベクトル決定部209は、動きベクトル203と最適ベクトル決定用総評価値239とを入力して、複数の取りうる動きベクトルのうち、最適ベクトル決定用総評価値が最小となる動きベクトルを最適ベクトル210として出力する。
Reference Example 7
FIG. 7 is a block diagram showing a motion compensation apparatus according to Reference Example 7.
In FIG. 7, the same parts as those of the reference example 1 shown in FIG. As a new code, 230a is a first luminance / color difference separation unit that separates the input image luminance signal 231 and the input image color difference signal 232 from the input image 202, and 230b is a predicted image luminance signal 233 and a predicted image color difference signal from the predicted image 204. 234a separates the difference between the input image luminance signal 231 from the first luminance color difference separation unit 230a and the predicted image luminance signal 233 from the second luminance color difference separation unit 230b. A second subtractor 235b to be obtained is a first subtractor for obtaining a difference between the input image color difference signal 232 from the first luminance color difference separation unit 230a and the predicted image color difference signal 234 from the second luminance color difference separation unit 230b. 237 is a color difference evaluation value generation unit that generates a color difference evaluation value based on the output from the first subtractor 235b, and 236 is the output from the second subtractor 235a. Based on the color difference evaluation value from the color difference evaluation value generation unit 237 and the luminance evaluation value from the luminance evaluation value generation unit 236, a luminance evaluation value generation unit 238 that generates a luminance evaluation value based on the luminance evaluation value generation unit 238 The vector determination unit 209 inputs the motion vector 203 and the optimum evaluation value for optimal vector determination 239, and determines the optimal vector among a plurality of possible motion vectors. The motion vector having the minimum total evaluation value is output as the optimum vector 210.

図7に示すように、入力画像202と予測画像204は各々輝度色差分離部230a、230bに入力され、入力画像輝度信号231、入力画像色差信号232、予測画像輝度信号233、予測画像色差信号234とに分離される。分離された信号のうち、輝度信号同士あるいは色差信号同士の差分を減算器235a、235bによって求め、これらを各々独立に輝度評価値生成部236及び色差評価値生成部237とで評価値を算出する。算出された輝度評価値と色差評価値とは加算器238によって加算され、総評価値239を得る。この総評価値に従い、複数の取りうる動きベクトルのうち、総評価値が最小となる動きベクトルが最適ベクトル210となる。   As shown in FIG. 7, the input image 202 and the predicted image 204 are respectively input to the luminance / color difference separation units 230 a and 230 b, and the input image luminance signal 231, the input image color difference signal 232, the predicted image luminance signal 233, and the predicted image color difference signal 234. And separated. Among the separated signals, the difference between the luminance signals or the color difference signals is obtained by the subtracters 235a and 235b, and the evaluation values are calculated by the luminance evaluation value generation unit 236 and the color difference evaluation value generation unit 237, respectively. . The calculated luminance evaluation value and color difference evaluation value are added by an adder 238 to obtain a total evaluation value 239. According to the total evaluation value, the motion vector having the minimum total evaluation value among the plurality of possible motion vectors is the optimal vector 210.

従来の動き補償予測では、輝度成分のみで評価値を算出するのが一般的である。輝度色差に分離して評価値を求めることは、輝度だけでは求められない動きを色差画像を使用することにより求めることが出来ることを示す。輝度成分と色差成分とを分離すると、輝度信号では変化まったく無いが、色差成分では明確に変化がみられる画像が存在する。このような画像の場合、輝度成分だけで動き補償を行うと、色差成分の変化を追うことが不可能であり、誤ったベクトルを求めてしまう。色差成分も同時に評価することにより上記のような場合に最適なベクトルを求めることが可能となる。
このように、輝度信号のみならず色差信号を動き補償予測の評価値に加えることにより、輝度信号だけではなく評価が不可能であった色の動きの再現性を向上させることができる。
In conventional motion compensation prediction, an evaluation value is generally calculated using only a luminance component. Obtaining an evaluation value by separating into luminance and color differences indicates that a motion that cannot be obtained only by luminance can be obtained by using a color difference image. When the luminance component and the color difference component are separated, there is an image that does not change at all in the luminance signal but clearly changes in the color difference component. In the case of such an image, if motion compensation is performed using only the luminance component, it is impossible to follow the change of the color difference component, and an incorrect vector is obtained. By simultaneously evaluating the color difference component, it is possible to obtain an optimum vector in the above case.
In this way, by adding not only the luminance signal but also the color difference signal to the evaluation value of the motion compensation prediction, it is possible to improve the reproducibility of not only the luminance signal but also the color movement that cannot be evaluated.

なお、ここでは記述していないが、加算器238で、輝度評価値と色差評価値との加算において重み付け加算を行うことにより、より最適な評価値を求めることが可能となる。   Although not described here, it is possible to obtain a more optimal evaluation value by performing weighted addition in the addition of the luminance evaluation value and the color difference evaluation value by the adder 238.

参考例8.
図8は参考例8に係る動き補償装置を示すブロック構成図である。
図8において、図7に示す参考例7と同一部分は同一符号を付して示し、その説明は省略する。新たな符号として、230cは動きベクトル203から動きベクトル輝度信号242と動きベクトル色差信号243とを分離する第3の輝度色差分離部、244は輝度評価値生成部237からの輝度評価値と色差評価値生成部237からの色差評価値とを比較して評価値比較差を出力する評価値演算部としての輝度色差評価値比較部であり、動き補償処理部200は、入力画像202と参照画像201とを入力し、入力画像202と参照画像201との間の動きベクトルと、入力画像202の輝度成分に対して、参照画像201から動きベクトル輝度信号に従って抽出した予測画像輝度信号204及び動きベクトル色差信号に従って抽出した予測画像色差信号241とを出力し、ベクトル決定部209は、動きベクトル輝度信号242及び動きベクトル色差信号243と上記評価値比較差を入力して、複数の取りうる動きベクトルのうち、上記評価値比較差が最小となる動きベクトルを最適ベクトルとして出力するようになっている。
Reference Example 8
FIG. 8 is a block diagram showing a motion compensation apparatus according to Reference Example 8.
8, the same parts as those of the reference example 7 shown in FIG. 7 are denoted by the same reference numerals, and the description thereof is omitted. As a new code, 230c is a third luminance color difference separation unit that separates the motion vector luminance signal 242 and the motion vector color difference signal 243 from the motion vector 203, and 244 is a luminance evaluation value and color difference evaluation from the luminance evaluation value generation unit 237. The luminance color difference evaluation value comparison unit as an evaluation value calculation unit that compares the color difference evaluation value from the value generation unit 237 and outputs an evaluation value comparison difference. The motion compensation processing unit 200 includes an input image 202 and a reference image 201. And the predicted image luminance signal 204 and the motion vector color difference extracted from the reference image 201 according to the motion vector luminance signal with respect to the motion vector between the input image 202 and the reference image 201 and the luminance component of the input image 202. The predicted image color difference signal 241 extracted according to the signal is output, and the vector determination unit 209 outputs the motion vector luminance signal 242 and the motion image. Enter the vector chrominance signal 243 and the evaluation value comparison difference, among the motion vectors more can be taken, and outputs a motion vector the evaluation value comparison difference becomes minimum as an optimum vector.

図8に示すように、入力画像202の輝度成分に対して、参照画像201から動きベクトル輝度信号242に従った予測画像輝度信号240が、動きベクトル色差信号243に従った予測画像色差信号241が各々求められる。入力画像202は輝度色差分離部230aにより輝度信号231と色差信号232とに分離される。輝度信号の入力画像と予測画像とで、色差信号の入力画像と予測画像とで各々差分が取られ、各々輝度評価値と色差評価値とが演算され、輝度色差評価値比較部244に入力される。比較部244では重み付けをされた比較が行われ、より適切と判断された評価値を最適ベクトル決定部209に出力する。最適ベクトル決定部209は、輝度、色差の各々のベクトルを入力されており、先の入力である評価値により、輝度、色差ベクトルのうち選択されたものを最適ベクトル210として出力する。   As shown in FIG. 8, with respect to the luminance component of the input image 202, a predicted image luminance signal 240 according to the motion vector luminance signal 242 from the reference image 201 and a predicted image color difference signal 241 according to the motion vector color difference signal 243 are obtained. Each is required. The input image 202 is separated into a luminance signal 231 and a color difference signal 232 by the luminance / color difference separation unit 230a. The difference between the input image of the luminance signal and the predicted image is taken between the input image of the color difference signal and the predicted image, and the luminance evaluation value and the color difference evaluation value are calculated and input to the luminance / color difference evaluation value comparison unit 244. The The comparison unit 244 performs weighted comparison and outputs an evaluation value determined to be more appropriate to the optimum vector determination unit 209. The optimum vector determination unit 209 receives the luminance and chrominance vectors, and outputs the selected one of the luminance and chrominance vectors as the optimum vector 210 based on the evaluation value that is the previous input.

実施の形態.
図9は実施の形態に係る動き補償装置を示すブロック構成図である。
図9に示す動き補償装置は、動画像符号化を行う符号化を行う際、ブロック単位に前フレームのデータから動きを予測し情報量削減を行う動き補償装置であって、前フレームのデータを格納する前フレームメモリ部104と、現フレームのブロックデータ150と前フレームの探索範囲データ151の特定領域からパターンマッチングを行い、最小の歪を与える動きベクトル155と最小歪154とを計算する最小歪計算部101と、現フレームのブロックデータ150と外部より入力される1つ以上の特定ベクトル153に対応する前フレームのブロックデータ152との歪156を計算する特定ベクトル歪計算部102と、上記最小歪計算部101から出力される歪と上記特定ベクトル歪計算部102から出力される歪とに基づいて最適動きベクトル157を出力する最適ベクトル出力部103とを備えている。
Form state of implementation.
Figure 9 is a block diagram showing a motion compensation device according to the shape condition of the embodiment.
The motion compensation apparatus shown in FIG. 9 is a motion compensation apparatus that predicts motion from data of the previous frame in units of blocks and performs information amount reduction when performing encoding for moving image encoding. The minimum distortion for calculating the motion vector 155 and the minimum distortion 154 that perform the pattern matching from the specific areas of the previous frame memory unit 104 to be stored, the block data 150 of the current frame, and the search range data 151 of the previous frame A calculation unit 101; a specific vector distortion calculation unit 102 for calculating distortion 156 between block data 150 of the current frame and block data 152 of the previous frame corresponding to one or more specific vectors 153 input from the outside; Optimum based on the distortion output from the distortion calculation unit 101 and the distortion output from the specific vector distortion calculation unit 102 And an optimal vector output unit 103 for outputting can vector 157.

次に図9について動作について説明する。
最小歪計算部101においては、現フレームのブロックデータ150に対して、前フレームの探索範囲データ151から最小となる最小歪154と最小歪を与える動きベクトル155を計算し、出力する。一方、特定ベクトル歪計算部102では、外部より与えられた特定ベクトル153に対応するデータ152を前フレームメモリ部104からとりだし、そのデータと、現フレームのブロックデータ150との歪156を計算し出力する。
最小歪計算部101からの最小歪154と特定ベクトル歪計算部102からの歪156をもとに、最適ベクトル出力部103において、最適ベクトルを計算する。
Next, the operation of FIG. 9 will be described.
The minimum distortion calculation unit 101 calculates and outputs a minimum distortion 154 and a motion vector 155 that give the minimum distortion from the search range data 151 of the previous frame for the block data 150 of the current frame. On the other hand, the specific vector distortion calculation unit 102 extracts the data 152 corresponding to the specific vector 153 given from the outside from the previous frame memory unit 104, calculates the distortion 156 between the data and the block data 150 of the current frame, and outputs it. To do.
Based on the minimum distortion 154 from the minimum distortion calculation unit 101 and the distortion 156 from the specific vector distortion calculation unit 102, the optimal vector output unit 103 calculates an optimal vector.

最適ベクトル出力部103の最適ベクトル計算方法としては、例えば、図11があげられる。すなわち、最小歪計算部101からの最小歪154にオフセット値110を加算し、その結果と特定ベクトル歪計算部102からの歪156を比較器112で比較し、小さい値を与えるベクトルを最適動きベクトル156として出力する。   As an optimal vector calculation method of the optimal vector output unit 103, for example, FIG. That is, the offset value 110 is added to the minimum distortion 154 from the minimum distortion calculation unit 101, the result is compared with the distortion 156 from the specific vector distortion calculation unit 102 by the comparator 112, and a vector giving a small value is determined as the optimum motion vector. It outputs as 156.

また、図10に示す如く、最適ベクトル出力部103の出力である最適動きベクトル157を特定ベクトル歪計算部102の入力と特定ベクトル153として入力することにより、1つ前のブロックの最適ベクトルを特定ベクトルとして入力することにより、前のブロックの最適ベクトルが現ブロックの最適ベクトルとして選ばれた場合には、動きベクトルの可変長符号化における情報量が大幅に減ることが実現できる。   Further, as shown in FIG. 10, the optimum motion vector 157 output from the optimum vector output unit 103 is input as the input of the specific vector distortion calculation unit 102 and the specific vector 153, thereby specifying the optimal vector of the previous block. By inputting as a vector, when the optimal vector of the previous block is selected as the optimal vector of the current block, the amount of information in variable length coding of the motion vector can be significantly reduced.

また、最適ベクトル出力部103は、図12に示す如く、最小歪計算部101からの歪に加える重み付けのオフセット値を、最小歪を与える動きベクトル155と特定ベクトル153との差分の大きさにより適応的に変更して与えるオフセット値計算部114をさらに備え、差分の値によりオフセット値を決定するようにしてもよい。例えば、ベクトルの差分が小さい時は、小さいオフセットを与える。差分が大きい時は、大きいオフセットを与える。これにより、ある程度ベクトルの差分が大きい時は、
特定ベクトルの値 ≦ ((最小歪)+オフセット)
であれば、特定ベクトルが最適動きベクトルとして選択される。
これにより、可変長符号化の際の発生情報量を大幅に削減可能となる。
Further, as shown in FIG. 12, the optimum vector output unit 103 adapts the weighting offset value added to the distortion from the minimum distortion calculation unit 101 according to the magnitude of the difference between the motion vector 155 giving the minimum distortion and the specific vector 153. The offset value calculation unit 114 may be further changed and given, and the offset value may be determined based on the difference value. For example, when the vector difference is small, a small offset is given. When the difference is large, a large offset is given. As a result, when the vector difference is large to some extent,
Specific vector value ≤ ((minimum distortion) + offset)
If so, the specific vector is selected as the optimum motion vector.
As a result, the amount of information generated at the time of variable length coding can be greatly reduced.

参考例9
次に、以下の参考例では、簡単な構成での実現性と汎用性を有しつつ、トータルの符号量と歪みのバランスを考慮して、符号化歪みの低減に貢献しないと考えられる動きベクトルを、符号量最小となる予測ベクトルに補正し、全体の歪みの増大を抑えながら動きベクトルの符号量を削減する動画像符号化装置及び方法を提供する。本手法は、従来技術で述べたような各種の国際標準動画像符号化方式への適用が可能であり、符号化系全体で符号量を効果的に削減するという目的で、前述した各参考例および実施の形態と一致する。
Reference Example 9
Next, in the following reference example , a motion vector that has a feasibility and versatility with a simple configuration and is considered not to contribute to the reduction of coding distortion in consideration of the balance of the total code amount and distortion. Are encoded into a prediction vector that minimizes the code amount, and a moving picture coding apparatus and method for reducing the code amount of a motion vector while suppressing an increase in overall distortion are provided. This method can be applied to various international standard video encoding methods as described in the prior art, and each reference example described above is used for the purpose of effectively reducing the code amount in the entire encoding system. and consistent with the embodiment.

まず、この参考例9に係る動画像符号化装置では、動き補償予測に基づく動画像符号化装置において、動き補償予測に用いられる参照画像データを格納してなるメモリと、入力マクロブロックと上記メモリからの参照画像データとに基づいて最小予測誤差を与える動きベクトルを検出する動き検出部と、入力マクロブロックの動き補償予測に利用する動きベクトルを符号化する際に用いる予測ベクトルを導出する予測ベクトル導出部と、与えられた動きベクトルに基づいて上記メモリ内の参照画像データの対応する位置の画像データを動きベクトルに対応する予測画像として取り出す動き補償部と、上記動き検出部により得られる動きベクトルに基づいて上記動き補償部から出力される予測画像を用いて予測誤差量を求め、該予測誤差量を第1の閾値を用いて閾値判定し、判定結果、予測誤差量が第1の閾値より大きい場合には上記予測ベクトル導出部により得られる予測ベクトルを上記動き補償部に出力させると共に、予測誤差量が第1の閾値より小さい場合には上記動き検出部により得られる動きベクトルを上記動き補償部に出力させる閾値処理部と、予測ベクトルに対応する予測画像による予測誤差信号を生成し、その予測誤差信号の発生符号量推定値を第2の閾値を用いて閾値判定を行い、判定結果、予測誤差信号の発生符号量推定値が第2の閾値より大きい場合には上記動き検出部により得られる動きベクトルを最終動きベクトルとして出力させると共に、予測誤差信号の発生符号量推定値が第2の閾値より小さい場合には上記予測ベクトルを最終動きベクトルとして出力させ、かつ最終動きベクトルに対応する予測画像を最終予測画像として出力する予測画像判定部とを備え、画像データの符号量に対して動きパラメータ(動きベクトル)の符号量の比率が高くなる低ビットレート符号化の際にも、全体の符号量と符号化歪みのバランスの良い符号化を行うものである。 First, in the moving picture coding apparatus according to the reference example 9 , in the moving picture coding apparatus based on motion compensated prediction, a memory that stores reference picture data used for motion compensated prediction, an input macroblock, and the memory A motion detection unit for detecting a motion vector that gives a minimum prediction error based on reference image data from the image, and a prediction vector for deriving a prediction vector used for encoding a motion vector used for motion compensated prediction of an input macroblock A derivation unit, a motion compensation unit that extracts image data at a position corresponding to the reference image data in the memory based on the given motion vector as a predicted image corresponding to the motion vector, and a motion vector obtained by the motion detection unit Based on the prediction image output from the motion compensation unit, the prediction error amount is obtained, and the prediction error amount is calculated. When the threshold value is determined by using the threshold value, and the prediction result indicates that the prediction error amount is larger than the first threshold value, the prediction vector obtained by the prediction vector deriving unit is output to the motion compensation unit, and the prediction error amount is When the threshold value is smaller than 1, a threshold value processing unit that outputs the motion vector obtained by the motion detection unit to the motion compensation unit, and a prediction error signal based on a prediction image corresponding to the prediction vector are generated. A threshold determination is performed on the generated code amount estimated value using the second threshold. If the generated code amount estimated value of the prediction error signal is larger than the second threshold, the motion vector obtained by the motion detecting unit is determined. In addition to outputting as the final motion vector, if the estimated code amount estimate value of the prediction error signal is smaller than the second threshold, the prediction vector is output as the final motion vector. And a predictive image determination unit that outputs a predictive image corresponding to the final motion vector as a final predictive image, and a low bit that increases the ratio of the code amount of the motion parameter (motion vector) to the code amount of the image data Also in rate coding, coding is performed with a good balance between the overall code amount and coding distortion.

参考例9は、一般の動き補償予測と離散的コサイン変換(discrete cosine transform,以下、単にDCTとも称す)・量子化による動画像符号化装置に、本参考例に係る技術要素を組み込んだ例を示す。
図13は本参考例9における動画像符号化装置の内部構成図である。
図13に示す参考例9における動きベクトルを用いた動き補償予測に基づく動画像符号化装置には、主要な構成として、動き補償予測に用いられる参照画像データを格納してなるフレームメモリ34と、入力マクロブロック3と上記メモリ34からの参照画像データとに基づいて最小予測誤差を与える動きベクトル21を検出する動き検出部20と、入力マクロブロック3の動き補償予測に利用する動きベクトルを符号化する際に用いる予測ベクトル28を導出する予測ベクトル導出部27と、与えられた動きベクトルに基づいて上記メモリ34内の参照画像データの対応する位置の画像データを動きベクトルに対応する予測画像23,29として取り出す動き補償部22と、上記動き検出部20により得られる動きベクトル21に基づいて上記動き補償部22から出力される予測画像23を用いて予測誤差量を求め、該予測誤差量を第1の閾値を用いて閾値判定し、判定結果、予測誤差量が第1の閾値より大きい場合には上記予測ベクトル導出部27により得られる予測ベクトル28を上記動き補償部22に出力させると共に、予測誤差量が第1の閾値より小さい場合には上記動き検出部20により得られる動きベクトル21を上記動き補償部22に出力させる最小歪み閾値処理部24と、予測ベクトル28に対応する予測画像29による予測誤差信号を生成し、その予測誤差信号の発生符号量推定値を第2の閾値を用いて閾値判定を行い、判定結果、予測誤差信号の発生符号量推定値が第2の閾値より大きい場合には上記動き検出部20により得られる動きベクトル21を最終動きベクトル33として出力させると共に、予測誤差信号の発生符号量推定値が第2の閾値より小さい場合には上記予測ベクトル28を最終動きベクトル33として出力させ、かつ最終動きベクトル33に対応する予測画像37を最終予測画像として出力する最終予測画像判定部30とを動き補償予測部19内に備えている。
The present reference example 9 is an example in which the technical elements according to the present reference example are incorporated into a moving picture coding apparatus based on general motion compensation prediction, discrete cosine transform (hereinafter also referred to simply as DCT) / quantization. Indicates.
FIG. 13 is an internal configuration diagram of the moving picture coding apparatus according to the ninth embodiment .
The moving picture coding apparatus based on motion compensated prediction using a motion vector in Reference Example 9 shown in FIG. 13 has, as a main configuration, a frame memory 34 that stores reference picture data used for motion compensated prediction, Based on the input macroblock 3 and the reference image data from the memory 34, a motion detector 20 that detects a motion vector 21 that gives a minimum prediction error, and a motion vector used for motion compensated prediction of the input macroblock 3 are encoded. A prediction vector derivation unit 27 for deriving a prediction vector 28 to be used for the prediction, and a prediction image 23 corresponding to the motion vector from the image data corresponding to the reference image data in the memory 34 based on the given motion vector. 29 based on the motion compensation unit 22 extracted as 29 and the motion vector 21 obtained by the motion detection unit 20 The prediction error amount is obtained using the prediction image 23 output from the motion compensation unit 22, the threshold value is determined using the first threshold value, and the determination result is that the prediction error amount is greater than the first threshold value. In this case, the prediction vector 28 obtained by the prediction vector deriving unit 27 is output to the motion compensation unit 22, and when the prediction error amount is smaller than the first threshold, the motion vector 21 obtained by the motion detection unit 20 is output. Are generated by the minimum distortion threshold processing unit 24 that outputs the motion compensation unit 22 and the prediction image 29 corresponding to the prediction vector 28, and the generated code amount estimated value of the prediction error signal is set as the second threshold value. Threshold value determination is performed, and if the generated code amount estimated value of the prediction error signal is larger than the second threshold value, the motion vector 21 obtained by the motion detection unit 20 is finally determined. The prediction vector 28 is output as the final motion vector 33 when the generated code amount estimation value of the prediction error signal is smaller than the second threshold, and the prediction image corresponding to the final motion vector 33 is output. The motion compensated prediction unit 19 includes a final predicted image determination unit 30 that outputs 37 as a final predicted image.

なお、その他の符号として、2は入力映像信号1に基づいて入力マクロブロック3を生成するマクロブロック生成部、5は入力マクロブロック3と予測誤差信号4との入力に基づいてモード判定し、モード選択情報6と符号化対象画像信号7を出力するモード判定部、8は符号化対象画像信号7を離散的コサイン変換してDCT係数データを出力するDCT部、10はDCT係数データ9を量子化して量子化DCT係数データを出力する量子化部、12は量子化DCT係数データ11を逆量子化して逆量子化DCT係数データ13を出力する逆量子化部、14は逆量子化DCT係数データ13に基づいて復号画像データ15を復元する逆DCT部、16は復号再生画像、17はモード判定部5からのモード選択情報6に従って制御されるスイッチ、26と32は動き補償予測部19内のスイッチ、38は量子化DCT係数データ11、モード選択情報6、動きベクトル33を所定のシンタックス、可変長符号化方法でビットストリーム39の形に多重化して出力する可変長符号化・多重化部である。   As other codes, 2 is a macroblock generation unit that generates an input macroblock 3 based on the input video signal 1, 5 is a mode determination based on the input of the input macroblock 3 and the prediction error signal 4, and mode A mode determination unit that outputs the selection information 6 and the encoding target image signal 7, 8 is a DCT unit that performs discrete cosine transform on the encoding target image signal 7 and outputs DCT coefficient data, and 10 quantizes the DCT coefficient data 9. A quantization unit that outputs quantized DCT coefficient data, 12 an inverse quantization unit that inversely quantizes the quantized DCT coefficient data 11 and outputs inversely quantized DCT coefficient data 13, and 14 an inverse quantized DCT coefficient data 13 , The inverse DCT unit for restoring the decoded image data 15, 16 the decoded reproduction image, 17 the switch controlled according to the mode selection information 6 from the mode determination unit 5 H, 26 and 32 are switches in the motion compensation prediction unit 19, 38 is quantized DCT coefficient data 11, mode selection information 6, and motion vector 33 in the form of a bit stream 39 in a predetermined syntax and variable length coding method. This is a variable length coding / multiplexing unit that multiplexes and outputs.

また、図14は本参考例9に係る動画像符号化装置及び方法を説明するための図13の動き補償予測部19を含む動きベクトル検出の処理過程を示すフローチャートである。
以下、図13および図14をもとに説明する。
(1)符号化装置の全体動作
まず、図13の符号化装置の全体の動作について簡単に説明する。入力映像信号1には1フレームに対応するデータが入力され、このフレームデータはマクロブロック生成部2によって、入力マクロブロック3に分割される。各入力マクロブロックについて、モード判定部5において、イントラ(フレーム内)符号化されるかインター(フレーム間)符号化されるかが決定される。判定に用いられるのは、入力マクロブロック3と、動き補償予測部19の処理によって得られる予測画像37と入力マクロブロック3との差分信号である予測誤差信号4であり、所定の判定方法により符号化効率が高いと判断された信号が符号化対象画像信号7として選択される。この時の判定方法は種々の方法を取り得るが、本発明の技術要素にあたらないため、詳細は割愛する。また、予測画像37および動きベクトル33を生成する動き補償予測部19の処理の詳細は後述する。
FIG. 14 is a flowchart showing a motion vector detection process including the motion compensation prediction unit 19 of FIG. 13 for explaining the moving picture coding apparatus and method according to the ninth embodiment.
Hereinafter, a description will be given with reference to FIGS. 13 and 14.
(1) Overall Operation of Encoding Device First, the overall operation of the encoding device in FIG. 13 will be briefly described. Data corresponding to one frame is input to the input video signal 1, and this frame data is divided into input macroblocks 3 by the macroblock generator 2. For each input macroblock, the mode determination unit 5 determines whether to perform intra (intraframe) encoding or inter (interframe) encoding. What is used for the determination is a prediction error signal 4 which is a difference signal between the input macroblock 3 and the predicted image 37 obtained by the processing of the motion compensation prediction unit 19 and the input macroblock 3, and is encoded by a predetermined determination method. A signal determined to have high encoding efficiency is selected as the encoding target image signal 7. Various determination methods can be used at this time, but the details are omitted because they do not correspond to the technical elements of the present invention. Details of the process of the motion compensation prediction unit 19 that generates the predicted image 37 and the motion vector 33 will be described later.

符号化対象画像信号7は、DCT部8において各8×8画素からなるブロックごとにDCTされ、DCT係数データ9に変換される。DCT係数データ9は量子化部10により所定の方法で量子化され、量子化DCT係数データ11として可変長符号化・多重化部38に送られる。また、量子化DCT係数データ11は、逆量子化部12において逆量子化DCT係数データ13に戻され、逆DCT部14において復号画像データ15に復元される。ここで、モード判定部5からのモード選択情報6に従ってスイッチ17が制御され、イントラ符号化モードのときは「0」を、インター符号化モードのときは予測画像37を加算して復号再生画像16を得る。   The encoding target image signal 7 is DCTed for each block of 8 × 8 pixels in the DCT unit 8 and converted to DCT coefficient data 9. The DCT coefficient data 9 is quantized by the quantization unit 10 by a predetermined method and sent to the variable length encoding / multiplexing unit 38 as the quantized DCT coefficient data 11. Also, the quantized DCT coefficient data 11 is returned to the inverse quantized DCT coefficient data 13 by the inverse quantization unit 12 and restored to the decoded image data 15 by the inverse DCT unit 14. Here, the switch 17 is controlled according to the mode selection information 6 from the mode determination unit 5, and “0” is added in the intra coding mode, and the predicted image 37 is added in the inter coding mode, and the decoded reproduced image 16 is added. Get.

復号再生画像16は、後の動き補償予測に用いるため、フレームメモリ34に格納される。動き補償予測部19は予測画像37を出力するほか、予測画像37を得るための動きベクトル33を、可変長符号化・多重化部38に出力する。
可変長符号化・多重化部38は、量子化DCT係数データ11、動きベクトル33、モード選択情報6などを所定のシンタックス、可変長符号化方法でビットストリーム39の形に多重化して出力する。ここで、所定のシンタックスとは前述の国際標準動画符号化規格で定められるデータ多重化ルールを意味する。
The decoded reproduction image 16 is stored in the frame memory 34 for use in later motion compensation prediction. In addition to outputting the predicted image 37, the motion compensated prediction unit 19 outputs a motion vector 33 for obtaining the predicted image 37 to the variable length encoding / multiplexing unit 38.
The variable length coding / multiplexing unit 38 multiplexes the quantized DCT coefficient data 11, the motion vector 33, the mode selection information 6 and the like into a bit stream 39 in a predetermined syntax and variable length coding method, and outputs the multiplexed data. . Here, the predetermined syntax means a data multiplexing rule defined by the aforementioned international standard moving picture coding standard.

(2)動き補償予測部19の動作
動き補償予測部19の内部構成は図13に示す通りである。図14のフローチャートを併用しながら詳細に動作を説明する。
(2−1)動き検出処理(ステップS1)
まず、ステップS1に示すように、入力マクロブロック3に対して、最小予測誤差(最小マッチング歪み)を与える動きベクトル21を求める。この処理は、動き検出部20において行う。予測誤差には、従来の技術で述べた差分絶対値和(SAD)や、画素差分の自乗をマクロブロック輝度成分の全画素について総和をとる差分自乗和などがあるが、以下ではSADを用いるものとする。動き検出部20は、入力マクロブロック3と、フレームメモリ34中の参照画像の与えられた動きベクトル探索範囲の中に含まれる画像データとの間で、SADを最小にする参照画像データ位置を求め、入力マクロブロック3のフレーム内位置からの偏移を動きベクトル21として出力する。予測誤差の計算に用いるフレームメモリ34中の参照画像データは、画像データバス35を介して動き検出部20に送り込まれる。
(2) Operation of Motion Compensation Prediction Unit 19 The internal configuration of the motion compensation prediction unit 19 is as shown in FIG. The operation will be described in detail with the use of the flowchart of FIG.
(2-1) Motion detection process (step S1)
First, as shown in step S1, a motion vector 21 that gives a minimum prediction error (minimum matching distortion) to the input macroblock 3 is obtained. This process is performed in the motion detector 20. Examples of the prediction error include the sum of absolute differences (SAD) described in the prior art and the sum of squares of differences in which the squares of pixel differences are summed for all the pixels of the macroblock luminance component, but in the following, SAD is used. And The motion detection unit 20 obtains a reference image data position that minimizes SAD between the input macroblock 3 and image data included in the motion vector search range to which the reference image in the frame memory 34 is given. The deviation of the input macroblock 3 from the position in the frame is output as the motion vector 21. The reference image data in the frame memory 34 used for calculation of the prediction error is sent to the motion detection unit 20 via the image data bus 35.

次いで、スイッチ26は、この動きベクトル21をスルーで動き補償部22に受け渡す。動き補償部22は、動きベクトル21により、フレームメモリ34中の参照画像データの対応する位置の画像データを、画像データバス36を介して予測画像23として取り出して出力する。予測画像23は、まず最終予測画像判定部30に送られるが、この時点では最終予測画像判定部30は、予測画像23をそのまま最終予測画像37としてスルーで出力する。   Next, the switch 26 passes this motion vector 21 to the motion compensation unit 22 through. The motion compensation unit 22 extracts and outputs the image data at the position corresponding to the reference image data in the frame memory 34 as the predicted image 23 via the image data bus 36 based on the motion vector 21. The predicted image 23 is first sent to the final predicted image determination unit 30. At this time, the final predicted image determination unit 30 outputs the predicted image 23 as it is as the final predicted image 37 as it is.

(2−2)モード判定(ステップS2、S3)
次に、ステップS2において、イントラ/インター判定を行う。この処理は動き補償予測部19ではなく、モード判定部5で(1)で述べたように行われる。次いで、ステップS3において、モード選択情報6が「インターモード」を示しているか否かを判定する。イントラモード、すなわち入力マクロブロック3を直接符号化対象信号とするモードであれば、ここで動き補償予測部19の処理は終了する。
(2-2) Mode determination (steps S2, S3)
Next, in step S2, intra / inter determination is performed. This process is performed not by the motion compensation prediction unit 19 but by the mode determination unit 5 as described in (1). Next, in step S3, it is determined whether or not the mode selection information 6 indicates “inter mode”. If it is an intra mode, that is, a mode in which the input macroblock 3 is a direct encoding target signal, the process of the motion compensation prediction unit 19 ends here.

(2−3)動きベクトルの効率判定(ステップS4)
インターモード、すなわち入力マクロブロック3と最終予測画像37との差分画像(予測誤差信号)を符号化対象信号とするモードであれば、以下に説明する手順と動作に従って、符号量と符号化歪みのバランスを考慮してトータルで効率のよい動きベクトルを改めて決定する。まず、インターモードの場合は、最小マッチング歪み閾値処理部24を起動し、予測画像23によるSADについて、あらかじめ定められた閾値TH1に基づいて閾値判定を行う(ステップS4)。ここで、TH1を実験的もしくは経験的に決定して予測効率を図る値として定めておけば、TH1よりも大きなSADを生じる場合、動きベクトル21による動き補償予測は、予測効率がそれほど良くないと判断できる。つまり、このマクロブロックでは動きベクトル21を用いて予測誤差信号を得ても、その予測誤差信号を符号化するには多くの符号量を必要とすることがある程度推察できる。したがって、この時の動きベクトル21は、動きベクトル21自身の符号量を費やしてまで動き補償予測を行う価値が低いと判断し、動きベクトルの符号量の削減を図る。
(2-3) Motion vector efficiency determination (step S4)
In the inter mode, that is, in a mode in which a difference image (prediction error signal) between the input macroblock 3 and the final predicted image 37 is an encoding target signal, the code amount and the encoding distortion are determined according to the procedure and operation described below. A total and efficient motion vector is determined again in consideration of balance. First, in the case of the inter mode, the minimum matching distortion threshold value processing unit 24 is activated, and threshold determination is performed on the SAD based on the predicted image 23 based on a predetermined threshold value TH1 (step S4). Here, if TH1 is experimentally or empirically determined and set as a value for achieving prediction efficiency, when a SAD larger than TH1 is generated, the motion-compensated prediction using the motion vector 21 is not so good in prediction efficiency. I can judge. That is, even if a prediction error signal is obtained using the motion vector 21 in this macroblock, it can be inferred to some extent that a large amount of code is required to encode the prediction error signal. Therefore, it is determined that the motion vector 21 at this time is not worth performing motion compensation prediction until the code amount of the motion vector 21 itself is consumed, and the code amount of the motion vector is reduced.

逆に、SADがTH1よりも小さい値になる場合は、動きベクトル21の予測効率を認め、それをそのまま最終的な動きベクトルとして用いて符号化を行う。
(2−4)動きベクトルの置換処理(ステップS5〜S9)
上記ステップS4で、SADがTH1より大きいと判断された場合には、動きベクトル21を、実際に差分符号化する際に用いる予測ベクトルに置き換えることを検討する。一般に、既存の動画像符号化標準方式では、動きベクトルは近傍の動きベクトルで予測してその差分値を符号化することが多い。動きベクトルは近傍と似通った値をとることが多いため、予測差分がゼロに近いほど符号長の短い符号を割り当てて符号化するのが一般的である。したがって、動きベクトルを予測ベクトルに一致させることで、動きベクトルの符号量は最小になるので、この置換によって予測誤差信号の符号量が極端に大きくならないならば、トータルで符号量を削減した効率のよい符号化を行うことができる。
On the contrary, when SAD becomes a value smaller than TH1, the prediction efficiency of the motion vector 21 is recognized, and it is used as it is as a final motion vector for encoding.
(2-4) Motion vector replacement processing (steps S5 to S9)
If it is determined in step S4 that SAD is greater than TH1, it is considered to replace the motion vector 21 with a prediction vector that is actually used for differential encoding. In general, in the existing moving picture coding standard method, a motion vector is often predicted by a nearby motion vector, and the difference value is often coded. Since the motion vector often takes a value similar to that of the neighborhood, it is common to code by assigning a code having a shorter code length as the prediction difference is closer to zero. Therefore, by making the motion vector coincide with the prediction vector, the code amount of the motion vector is minimized. Therefore, if the code amount of the prediction error signal does not become extremely large by this replacement, the efficiency of reducing the total code amount can be improved. Good encoding can be performed.

最小マッチング歪み閾値処理部24は、ステップS4でSADがTH1より大きいと判断すると、制御信号25によりスイッチ26を切り換え、予測ベクトル導出部27に動きベクトル21を与える。予測ベクトル導出部27はステップS5の処理を行い、動きベクトル21を実際に符号化する場合に使用する動きベクトル符号化用の予測ベクトル28を導出する。たとえば、予測の方法を直前のマクロブロックの動きベクトルを予測ベクトルとして差分をとる(これはMPEG−1やMPEG−2で採用されている)。すると、動きベクトル21が(−2,8)、直前のマクロブロックの動きベクトルが(0,4)であった場合は、符号化する動きベクトルデータはその差分で(2,4)となる。なお、ここで、動きベクトル(x,y)とは、被予測マクロブロックの画素位置から水平方法へx画素(右方向を正とする)、垂直方向へy画素(下方向を正とする)だけ偏移した位置のフレームメモリ中の画素を予測画素とすることを意味する。予測ベクトル導出部27は、予測ベクトルに相当する(0,4)を置換候補ベクトルとして出力する。   If the minimum matching distortion threshold value processing unit 24 determines that SAD is larger than TH1 in step S4, the control signal 25 switches the switch 26 and provides the motion vector 21 to the prediction vector deriving unit 27. The prediction vector deriving unit 27 performs the process of step S5 and derives a motion vector encoding prediction vector 28 used when the motion vector 21 is actually encoded. For example, as a prediction method, a difference is obtained using a motion vector of the immediately preceding macroblock as a prediction vector (this is adopted in MPEG-1 and MPEG-2). Then, when the motion vector 21 is (−2, 8) and the motion vector of the immediately preceding macroblock is (0, 4), the motion vector data to be encoded is (2, 4) as the difference. Here, the motion vector (x, y) means x pixels from the pixel position of the predicted macroblock to the horizontal method (right direction is positive), and y pixels in the vertical direction (down direction is positive). This means that a pixel in the frame memory at a position shifted by only a predicted pixel is used as a predicted pixel. The prediction vector deriving unit 27 outputs (0, 4) corresponding to the prediction vector as a replacement candidate vector.

動き補償部22は、予測ベクトル28を受け、前述の予測画像23の取得と同様の手順で予測ベクトル28に対応する予測画像29を出力する。
予測画像29は、最終予測画像判定部30に、予測画像23とともに入力される。最終予測画像判定部30は、ここでは予測画像29による予測誤差信号を生成し(入力マクロブロック3との差分をとることで得られる。ステップS6に相当)、その予測誤差信号の符号化効率をチェックする。これは、動きベクトル21を予測ベクトル28で置換した場合に、それによって予測誤差信号の符号量が大幅に増加してしまうと動きベクトルの置換が逆効果になってしまうためであり、予測誤差信号の符号量の程度をある程度測ることが目的である。
The motion compensation unit 22 receives the prediction vector 28 and outputs a prediction image 29 corresponding to the prediction vector 28 in the same procedure as the acquisition of the prediction image 23 described above.
The predicted image 29 is input to the final predicted image determination unit 30 together with the predicted image 23. Here, the final predicted image determination unit 30 generates a prediction error signal based on the predicted image 29 (obtained by taking the difference from the input macroblock 3; corresponding to step S6), and determines the encoding efficiency of the prediction error signal. To check. This is because when the motion vector 21 is replaced with the prediction vector 28 and the code amount of the prediction error signal is greatly increased, the replacement of the motion vector has an adverse effect. The purpose is to measure the degree of the amount of codes to some extent.

チェックの方法は、予測誤差信号の発生符号量推定値としての輝度成分の分散値を用いた閾値判定による(ステップS7、S8)。この判定方法の根拠は以下の通りである。
予測誤差信号は、一般にゼロ近辺にピークを持つラプラス、ガウス系の分布を有する。符号化は、この予測誤差信号をDCTによって周波数成分に変換して、その係数分布が低周波に偏ることを利用して冗長度を削減するため、高周波成分に立つ係数の発生頻度が符号化効率の測度になる。高周波成分の含有率は、予測誤差信号の信号分布の分散によってある程度代表される。分散が大きいほど信号分布のすそ野が広がり、DCT係数の高周波成分の発生頻度が高くなる。
The check method is based on threshold determination using the variance value of the luminance component as the generated code amount estimation value of the prediction error signal (steps S7 and S8). The basis for this determination method is as follows.
The prediction error signal generally has a Laplace-Gaussian distribution with a peak near zero. In the encoding, the prediction error signal is converted into a frequency component by DCT, and the redundancy is reduced by utilizing the fact that the coefficient distribution is biased to a low frequency. It becomes the measure of. The content rate of the high frequency component is represented to some extent by the variance of the signal distribution of the prediction error signal. The greater the variance, the broader the signal distribution, and the higher the frequency of the high frequency component of the DCT coefficient.

このような観点から、特に符号量の多くを占める輝度成分の分散値σ2を閾値判定に用いて、この分散値が閾値TH2よりも小さい場合、動きベクトル置換による予測誤差信号の符号量増加はある程度抑えられるものとして動きベクトルの置換を認める(ステップS9)。逆に、輝度成分の分散値がTH2よりも大きくなる場合は、動きベクトル置換がかえって予測誤差信号の符号量増加を招くものと判定し、動きベクトルの置換を認めず、最小SADを与える動きベクトル21を最終的な動きベクトルとする。   From this point of view, when the variance value σ2 of the luminance component that occupies most of the code amount is used for threshold determination, and this variance value is smaller than the threshold TH2, the code amount increase of the prediction error signal due to motion vector replacement is to some extent. Motion vector replacement is accepted as a suppression (step S9). On the contrary, when the variance value of the luminance component is larger than TH2, it is determined that the motion vector replacement causes an increase in the code amount of the prediction error signal, and the motion vector that gives the minimum SAD without allowing the motion vector replacement is recognized. Let 21 be the final motion vector.

最終予測画像判定部30は、以上の輝度信号分散値に基づく置換の可否判定を行い、その結果として、制御信号31によってスイッチ32を切り換え、最終動きベクトル33を出力させるとともに、最終動きベクトル33に対応する最終予測画像37を予測画像23、予測画像29のいずれかから選択して出力する。すなわち、インターモードでは、以上の処理を経た後の最終予測画像37を用いてインター符号化を実施すると共に、最終動きベクトル33を可変長符号化・多重化部38に送って符号化する。   The final predicted image determination unit 30 determines whether or not replacement is possible based on the above luminance signal variance value. As a result, the switch 32 is switched by the control signal 31 to output the final motion vector 33 and to the final motion vector 33. The corresponding final predicted image 37 is selected from either the predicted image 23 or the predicted image 29 and output. That is, in the inter mode, inter coding is performed using the final predicted image 37 after the above processing, and the final motion vector 33 is sent to the variable length coding / multiplexing unit 38 for coding.

上述した図14に示す動きベクトルを用いた動き補償予測に基づく動画像符号化方法における処理ステップを要約すると次の通りとなる。
すなわち、図14に示す動画像符号化方法は、入力マクロブロックと参照画像データとに基づいて最小予測誤差(最小マッチング歪み)を与える動きベクトルを検出する動きベクトル検出ステップS1と、入力マクロブロックと動きベクトルに対応する予測画像とに基づく予測誤差信号を第1の閾値を用いて閾値判定する第1の閾値判定ステップS4と、第1の閾値判定結果、予測誤差信号が第1の閾値より大きい場合には動きベクトルを符号化する際に用いる予測ベクトルを導出する予測ベクトル導出ステップS5と、予測ベクトルに対応する予測画像による予測誤差信号を生成する予測誤差信号生成ステップS6と、予測誤差信号の発生符号量推定値を算出する算出ステップS7と、算出された予測誤差信号の発生符号量推定値を第2の閾値を用いて閾値判定する第2の閾値判定ステップS8と、第2の閾値判定結果、予測誤差信号の発生符号量推定値が第2の閾値より小さい場合に動きベクトルを上記予測ベクトルに置換する置換ステップS9とを備え、動きベクトルを用いて動き予測符号化を実施する。
The processing steps in the moving picture coding method based on the motion compensation prediction using the motion vector shown in FIG. 14 are summarized as follows.
That is, the moving picture coding method shown in FIG. 14 includes a motion vector detection step S1 for detecting a motion vector that gives a minimum prediction error (minimum matching distortion) based on an input macroblock and reference picture data, A first threshold determination step S4 for determining a prediction error signal based on a prediction image corresponding to a motion vector using a first threshold, a first threshold determination result, and the prediction error signal is greater than the first threshold In this case, a prediction vector derivation step S5 for deriving a prediction vector to be used when coding a motion vector, a prediction error signal generation step S6 for generating a prediction error signal based on a prediction image corresponding to the prediction vector, and a prediction error signal A calculation step S7 for calculating the generated code amount estimated value, and the calculated generated code amount estimated value of the prediction error signal are set to a second value. A second threshold determination step S8 for determining a threshold using a value, and the second threshold determination result, and when the generated code amount estimated value of the prediction error signal is smaller than the second threshold, the motion vector is replaced with the prediction vector. A replacement step S9, and performs motion prediction encoding using a motion vector.

以上の構成の符号化装置及び方法により、予測誤差信号の符号量削減に貢献しない動きベクトルを閾値判定によって特定し、予測誤差信号の符号量増加を抑えながら動きベクトルの符号量を削減して符号化を行うことができるため、動き情報、画像情報のトータルの符号化効率にとって最適な動きベクトルの選択が可能になる。   With the coding apparatus and method having the above configuration, a motion vector that does not contribute to the reduction of the code amount of the prediction error signal is specified by threshold determination, and the code amount of the motion vector is reduced while suppressing an increase in the code amount of the prediction error signal. Therefore, it is possible to select an optimal motion vector for the total encoding efficiency of motion information and image information.

なお、本参考例9では、閾値TH1およびTH2の具体的な決定方法については述べなかったが、これらの値は特定の符号化ビットレートやフレームレートなどに応じて最適値が変わってくるため、状況に応じたチューニングのパラメータとして利用することができる。これらの値を最適に設定することで符号化効率を高めることが可能である。 In this reference example 9 , the specific determination method of the thresholds TH1 and TH2 has not been described, but these values vary depending on the specific encoding bit rate, frame rate, etc. It can be used as a tuning parameter according to the situation. It is possible to increase the encoding efficiency by setting these values optimally.

参考例9の符号化装置では、従来の動きベクトル探索に比べ、SADの閾値処理、予測ベクトルおよび予測ベクトルによる予測誤差信号の導出、予測ベクトルによる予測誤差信号の輝度信号の分散値の計算と閾値処理が追加される構成となる。しかし、SADおよび分散値の閾値処理は条件分岐1つだけで実現できるほか、予測ベクトル導出は従来の動きベクトル符号化に際しても必要なため特別な追加機構ではない。 Compared to the conventional motion vector search, the encoding apparatus of Reference Example 9 calculates SAD threshold processing, derivation of a prediction error signal using a prediction vector and a prediction vector, calculation of a variance value of a luminance signal of the prediction error signal using the prediction vector, and A threshold process is added. However, SAD and variance threshold processing can be realized with only one conditional branch, and prediction vector derivation is not a special additional mechanism because it is necessary for conventional motion vector coding.

また、予測ベクトルによる予測誤差信号の導出は、マクロブロック分のバッファリングと予測ベクトルの一時記憶により、最小SADを与える動きベクトルを検出する過程(動き検出部20)で実施してしまうことも可能であり、分散値計算も1マクロブロックあたり1回の処理(しかも、ステップS4で動きベクトル置換の候補となるマクロブロックについてのみ)だけであるので、極めて少ない演算量の追加で実現可能である。ハードウエアで構成する場合は、多少の内部構成素子の追加が必要になるが、ソフトウエアで符号化装置を構成する場合には少しの演算量増加だけで実現可能である。   Also, the prediction error signal can be derived from the prediction vector in the process of detecting the motion vector that gives the minimum SAD (motion detection unit 20) by buffering the macroblock and temporarily storing the prediction vector. Since the variance calculation is also performed only once per macroblock (and only for the macroblock that is a candidate for motion vector replacement in step S4), it can be realized with an extremely small amount of calculation. When it is configured by hardware, it is necessary to add some internal components, but when the encoding device is configured by software, it can be realized with a slight increase in the amount of calculation.

また、本参考例9では、動き量を表現するパラメータとして動きベクトルを用いて説明したが、アフィンパラメータや透視変換パラメータなどより複雑な動きパラメータを用いて予測を行う場合にも適用可能である。これらの複雑な動きパラメータに対しては、予測ベクトル導出部27において、パラメータ符号化の際にもっとも冗長度を削減して符号化できるパラメータを算出すればよい。 In the ninth embodiment , the motion vector is used as a parameter for expressing the amount of motion. However, the present embodiment is applicable to a case where prediction is performed using a more complicated motion parameter such as an affine parameter or a perspective transformation parameter. For these complex motion parameters, the predictive vector deriving unit 27 may calculate parameters that can be encoded with the least redundancy at the time of parameter encoding.

参考例10
上述した参考例9において、最小SADを与える動きベクトルは、いくつかのモードから選択されたものでもよい。たとえば、MPEG−4の最終草案(ISO/IEC JTC1/SC29WG11/N2202)や、ITU−T勧告H.263のオプションの1つであるAdvanced Prediction Modeによれば、動きベクトルとして、マクロブロックあたり1つのベクトルを求める「1MVモード」と、DCTの単位となる4つの8画素×8ラインのブロックあたりに1つの動きベクトルを求める「4MVモード」が選択できる。この場合、「1MVモード」と「4MVモード」とを比較して最小のSADを与えるモードを選択するように構成できる。
Reference Example 10
In Reference Example 9 described above, the motion vector that provides the minimum SAD may be selected from several modes. For example, according to the final draft of MPEG-4 (ISO / IEC JTC1 / SC29WG11 / N2202) and Advanced Prediction Mode which is one of the options of ITU-T recommendation H.263, one motion vector per macroblock is used. A “1MV mode” for obtaining a vector and a “4MV mode” for obtaining one motion vector per block of four 8 pixels × 8 lines as a unit of DCT can be selected. In this case, the “1MV mode” and the “4MV mode” are compared to select a mode that gives the minimum SAD.

この処理は、図13における動き検出部20の内部で実施するように構成でき、図14のステップS1のサブステップとして位置づけることができる。
また、この場合の予測ベクトル導出部27は、近傍動きベクトルのメディアン値を用いた予測ベクトルの算出を行うように構成する。
This processing can be configured to be performed inside the motion detection unit 20 in FIG. 13, and can be positioned as a sub-step of step S1 in FIG.
In this case, the prediction vector deriving unit 27 is configured to calculate a prediction vector using the median value of the neighboring motion vector.

図15に、MPEG−4最終草案に基づく動きベクトルの予測の仕組みを示す。図15において、MVは被予測動きベクトル、MV1〜MV3は予測ベクトル算出のために必要となる動きベクトルを示し、(a)はマクロブロック中左上のブロックの動きベクトルの場合、(b)はマクロブロック中右上のブロックの動きベクトルの場合、(c)はマクロブロック中左下のブロックの動きベクトルの場合、(d)はマクロブロック中右下のブロックの動きベクトルの場合の動きベクトルMV1〜MV3の位置をそれぞれ定めている。   FIG. 15 shows a motion vector prediction mechanism based on the MPEG-4 final draft. In FIG. 15, MV indicates a motion vector to be predicted, MV1 to MV3 indicate motion vectors necessary for calculating a prediction vector, (a) indicates a motion vector of the upper left block in the macroblock, and (b) indicates a macro. In the case of the motion vector of the upper right block in the block, (c) is the motion vector of the lower left block in the macro block, (d) is the motion vector MV1 to MV3 in the case of the motion vector of the lower right block in the macro block. Each position is determined.

予測ベクトル(Px,Py)は、下式で求められる。
Px =Median(MV1x,MV2x,MV3x)
Py =Median(MV1y,MV2y,MV3y)
ただし、MV1=(MV1x,MV1y)
MV2=(MV2x,MV2y)
MV3=(MV3x,MV3y)
また、関数Median( )は、3つの引数の中央値を出力する。
The prediction vector (Px, Py) is obtained by the following equation.
Px = Median (MV1x, MV2x, MV3x)
Py = Median (MV1y, MV2y, MV3y)
However, MV1 = (MV1x, MV1y)
MV2 = (MV2x, MV2y)
MV3 = (MV3x, MV3y)
The function Median () outputs the median value of the three arguments.

図15は「4MVモード」の説明図になっているが、「1MVモード」では同図(a)の場合で説明できる。
「1MVモード」の場合は、図3の(a)を用いて、MVをマクロブロック全体の動きベクトルとみなして予測ベクトルを求める。MV1〜MV3は、それぞれそれらが属するマクロブロックの動きベクトルモードが「1MVモード」の場合は、4つのブロックすべてが同じ動きベクトルであるとみなす。
参考例10によれば、MPEG−4やH.263などの低ビットレート符号化をターゲットとする符号化装置において本発明を活用することができる。
FIG. 15 is an explanatory diagram of the “4MV mode”, but the “1MV mode” can be described in the case of FIG.
In the case of “1MV mode”, a prediction vector is obtained using (a) of FIG. 3 while regarding MV as a motion vector of the entire macroblock. When the motion vector mode of the macroblock to which each of the MV1 to MV3 belongs is “1MV mode”, all the four blocks are regarded as the same motion vector.
According to the tenth reference example , the present invention can be utilized in an encoding device that targets low bit rate encoding such as MPEG-4 and H.263.

参考例11
参考例11では、参考例9で説明した動きベクトル置換処理のON/OFFをフレーム単位に切り換える構成を持つ符号化装置について説明する。動き補償予測の効率が極めて高いフレームでは、動きベクトルの置換が逆効果になることがあり、それを防ぐこと、フレーム全体でON/OFFすることで置換処理を行わないフレームにおける演算量を削減できることなどが効果としてあげられる。
Reference Example 11
In the present reference example 11 , an encoding apparatus having a configuration for switching ON / OFF of the motion vector replacement process described in the reference example 9 in units of frames will be described. For frames with very high efficiency of motion compensation prediction, motion vector replacement may have an adverse effect, and it is possible to prevent this, and to reduce the amount of computation in frames where replacement processing is not performed by turning ON / OFF the entire frame. And so on.

すなわち、この参考例11では、動き検出部20からの動きベクトルと最小予測誤差量の入力に基づいてフレームアクティビティの値を算出し、算出された値に基づいて最小マッチング歪み閾値処理部24及び最終予測画像判定部30による予測ベクトルを用いた動きベクトルの置き換え処理をフレーム単位で切り換え制御するフレームアクティビティ算出部40をさらに備え、フレームごとに動きパラメータ置換処理のON/OFFを制御できるようにすることより、全体の符号量と符号化歪みのバランスの良い符号化をより柔軟に行う。 That is, in the reference example 11 , the value of the frame activity is calculated based on the input of the motion vector and the minimum prediction error amount from the motion detection unit 20, and the minimum matching distortion threshold processing unit 24 and the final value are calculated based on the calculated value. A frame activity calculation unit 40 that switches and controls motion vector replacement processing using a prediction vector by the predicted image determination unit 30 in units of frames, so that ON / OFF of motion parameter replacement processing can be controlled for each frame. Thus, encoding with a good balance between the overall code amount and encoding distortion is performed more flexibly.

図16に本参考例11における動き補償予測部19の内部構成を示す。
同図において、図13に示す参考例9と同一部分は同一符号を付してその説明は省略する。新たな符号として、40は動き検出部20からの動きベクトル21と最小予測誤差41の入力に基づいてフレームアクティビティの値を算出し、算出された値に基づいて最小マッチング歪み閾値処理部24及び最終予測画像判定部30による予測ベクトルを用いた動きベクトルの置き換え処理をフレーム単位で切り換え制御する制御信号42を出力するフレームアクティビティ算出部であり、43と44はその制御信号に基づいて動きベクトルの置き換え処理を行うためのスイッチである。
FIG. 16 shows an internal configuration of the motion compensation prediction unit 19 in the present reference example 11 .
In the figure, the same parts as those of the reference example 9 shown in FIG. As a new code, 40 calculates the value of the frame activity based on the input of the motion vector 21 and the minimum prediction error 41 from the motion detection unit 20, and based on the calculated value, the minimum matching distortion threshold processing unit 24 and the final value. A frame activity calculation unit that outputs a control signal 42 that controls switching of motion vectors using predicted vectors by the predicted image determination unit 30 in units of frames. 43 and 44 are motion vector replacements based on the control signals. This is a switch for performing processing.

また、図17は、図16の動き補償予測部19を用いた場合の動き補償予測処理手順を示すフローチャートである。以下、図16及び図17をもとに、本参考例11における動き補償予測部19の動作を詳しく説明する。符号化装置全体の構成は参考例9で説明した図13と等価で、動き補償予測部19だけが置き換わるものとし、モード判定部5の動作も参考例9と同じであるとする。 FIG. 17 is a flowchart showing a motion compensation prediction processing procedure when the motion compensation prediction unit 19 in FIG. 16 is used. Hereinafter, the operation of the motion compensation prediction unit 19 in Reference Example 11 will be described in detail with reference to FIGS. 16 and 17. The overall configuration of the encoding apparatus is equivalent to that of FIG. 13 described in Reference Example 9 , and only the motion compensation prediction unit 19 is replaced. The operation of the mode determination unit 5 is also the same as that of Reference Example 9 .

(1)動き検出処理(ステップS1)
まず、参考例9と同様に、ステップS1に示すように、入力マクロブロック3に対して、最小予測誤差を与える動きベクトル21を求める。この動きベクトル検出の処理を、1フレームにわたってすべて実施しておき、各マクロブロックの動きベクトル21と最小SAD41をフレームアクティビティ算出部40に入力する。フレームアクティビティ算出部40は、当該フレームにて動きベクトル置換の処理を行うか否かの判定基準となるフレームアクティビティを計算する(ステップS10)。このフレームアクティビティの値から、動きベクトル置換を行うと判断した場合には、制御信号42によってスイッチ26、43、44をすべて参考例9の処理を行う方向へ動作させる。さもなくばスイッチ26、43、44を強制的に最小SADを与える動きベクトル21に基づいて動き補償予測を行うように動作させる。これらのスイッチの切り換えは、図17におけるステップS11に相当し、図17ではマクロブロック単位の切り換えを行う。これはフレーム単位で実施しても良いが、以下ではマクロブロック単位にフレームアクティビティの値に基づいて選択するものとして説明する。
(1) Motion detection process (step S1)
First, as in Reference Example 9 , as shown in step S1, a motion vector 21 that gives a minimum prediction error is obtained for the input macroblock 3. All the motion vector detection processes are performed over one frame, and the motion vector 21 and the minimum SAD 41 of each macroblock are input to the frame activity calculation unit 40. The frame activity calculation unit 40 calculates a frame activity that is a criterion for determining whether or not to perform motion vector replacement processing in the frame (step S10). If it is determined from this frame activity value that motion vector replacement is to be performed, all the switches 26, 43, 44 are operated in the direction in which the processing of the reference example 9 is performed by the control signal 42. Otherwise, the switches 26, 43 and 44 are forced to operate so as to perform motion compensation prediction based on the motion vector 21 which gives the minimum SAD. Switching of these switches corresponds to step S11 in FIG. 17, and in FIG. 17, switching is performed in units of macroblocks. Although this may be performed in units of frames, the following description will be made assuming that selection is performed in units of macroblocks based on the value of frame activity.

フレームアクティビティの値としては、フレーム全体の動きの大きさや複雑さなどが考えられる。具体的な量では、フレーム全体にわたる最小SADの総和や、フレーム全体の動きベクトルのばらつきの度合いを示す動きベクトル分散などが考えられる。たとえば、フレーム間で動きが複雑な場合には平行移動のみで動きを捉えようとする動きベクトルでは十分な予測効率が得られない可能性が高い。この場合は動きベクトルが有効に作用していない個所が多いことが予想されるので、動きベクトル置換の機構をONにしておく。逆に、動きが単調で予測効率が十分得られるような場合には動きベクトル置換の機構をOFFにし、最小SADの動きベクトルを常に用いるようにする、などの制御を考えることができる。最小SADの総和が大きいフレームでは前フレームからの動きが複雑で動きを捉え切れないケースが考えられるし、動きベクトルの分散が大きい場合についても動きの複雑さが大きいとみなすことができる。しかしながら、フレームアクティビティの定義は様々考えられる。   As the value of the frame activity, the size and complexity of the movement of the entire frame can be considered. Specific amounts may include the sum of the minimum SAD over the entire frame, motion vector variance indicating the degree of variation in the motion vector of the entire frame, and the like. For example, when the motion between frames is complicated, there is a high possibility that sufficient prediction efficiency cannot be obtained with a motion vector that captures the motion only by parallel movement. In this case, since it is expected that there are many places where the motion vector does not act effectively, the motion vector replacement mechanism is turned on. Conversely, when the motion is monotonous and sufficient prediction efficiency is obtained, it is possible to consider a control such as turning off the motion vector replacement mechanism and always using the motion vector of the minimum SAD. In a frame where the sum of the minimum SAD is large, there may be a case where the motion from the previous frame is complicated and the motion cannot be captured, and even when the motion vector variance is large, the motion complexity can be regarded as large. However, there are various definitions of frame activity.

以下では動きベクトル置換のON/OFF切り換えに最も最適なアクティビティを用いることを前提として説明を続ける。
(2)モード判定(ステップS2、S3)
次に、ステップS2において、イントラ/インター判定を行う。この処理は動き補償予測部19ではなく、モード判定部5で(1)で述べたように行われる。次いで、ステップS3において、モード選択情報6が「インターモード」を示しているか否かを判定する。イントラモード、すなわち入力マクロブロック3を直接符号化対象信号とするモードであれば、ここで動き補償予測部19の処理は終了する。
The following description will be continued on the assumption that the most optimal activity is used for ON / OFF switching of motion vector replacement.
(2) Mode determination (steps S2, S3)
Next, in step S2, intra / inter determination is performed. This process is performed not by the motion compensation prediction unit 19 but by the mode determination unit 5 as described in (1). Next, in step S3, it is determined whether or not the mode selection information 6 indicates “inter mode”. If it is an intra mode, that is, a mode in which the input macroblock 3 is a direct encoding target signal, the process of the motion compensation prediction unit 19 ends here.

(3)フレームアクティビティに基づく動きベクトル置換処理のON/OFF判定(ステップS11)
(1)で説明したように、ステップS11において、ステップS10で求めたフレームアクティビティをもとに、動きベクトル置換処理(ステップS4〜S9)に処理を進めるか、最小SADを与える動きベクトルをそのまま使用することにして動き補償予測の処理を終了させるかを判定する。
(3) ON / OFF determination of motion vector replacement processing based on frame activity (step S11)
As described in (1), in step S11, based on the frame activity obtained in step S10, the process proceeds to the motion vector replacement process (steps S4 to S9), or the motion vector that gives the minimum SAD is used as it is. It is determined whether to end the motion compensation prediction process.

(4) 動きベクトルの置換処理(ステップS4〜S9)
(3)で動きベクトル置換処理を行うと判定された場合は、インターモードにおいて、参考例1で述べた手順により、符号量と符号化歪みのバランスを考慮してトータルで効率のよい動きベクトルを改めて決定する。この時、スイッチ43と44は、参考例1の動作を行うように制御されるものとする。この場合の処理手順は参考例9で述べた方法とまったく同じであるため、ここでの説明は割愛する。
(4) Motion vector replacement processing (steps S4 to S9)
If it is determined in (3) that the motion vector replacement process is to be performed, a total and efficient motion vector is calculated in the inter mode in accordance with the procedure described in Reference Example 1 in consideration of the balance between the code amount and the coding distortion. Determine again. At this time, the switches 43 and 44 are controlled to perform the operation of the reference example 1. Since the processing procedure in this case is exactly the same as the method described in the reference example 9 , the description here is omitted.

上述したように、図17に示す動きベクトルを用いた動き補償予測に基づく動画像符号化方法における処理ステップでは、図14に示す処理ステップに対し、動きベクトルと最小予測誤差に基づいてフレームアクティビティの値を算出し、算出された値に基づいてフレーム単位で動きベクトルと予測ベクトルの置換を行うか否かの切換制御を行う制御ステップをさらに備えて、動き予測符号化を実施している。   As described above, in the processing step in the moving picture coding method based on motion compensated prediction using the motion vector shown in FIG. 17, the frame activity of the frame activity based on the motion vector and the minimum prediction error is different from the processing step shown in FIG. A motion prediction encoding is performed by further comprising a control step of calculating a value and performing switching control as to whether or not to replace the motion vector and the prediction vector in units of frames based on the calculated value.

以上の構成の符号化装置及び方法により、フレーム単位およびマクロブロック単位で、予測誤差信号の符号量削減に貢献しない動きベクトルを閾値判定によって特定し、予測誤差信号の符号量増加を抑えながら動きベクトルの符号量を削減して符号化を行うことができるため、動き情報、画像情報のトータルの符号化効率にとって最適な動きベクトルの選択をより柔軟に行えるようになる。これによって、動きベクトルの置換が有効でないフレームについてははじめから置換処理をOFFにして効率の低下を防ぐことができる。また、処理がOFFの場合は置換処理の演算量もフレームの単位で削減できる。   By the coding apparatus and method having the above-described configuration, a motion vector that does not contribute to the reduction of the code amount of the prediction error signal is identified by threshold determination in a frame unit and a macro block unit, and the motion vector is suppressed while suppressing an increase in the code amount of the prediction error signal. Therefore, it is possible to select the motion vector optimal for the total encoding efficiency of motion information and image information more flexibly. As a result, for a frame for which motion vector replacement is not effective, the replacement process can be turned off from the beginning to prevent a reduction in efficiency. Further, when the processing is OFF, the calculation amount of the replacement processing can be reduced in units of frames.

参考例11の符号化装置及び方法では、参考例9の符号化装置及び方法に比べ、さらにフレームアクティビティ算出の処理過程が追加になるが、これはフレームにつき1回しか実施しないため、全体としての演算量の増加には大きく影響しない。 In the encoding apparatus and method of the present reference example 11 , compared with the encoding apparatus and method of the reference example 9 , a process process for calculating the frame activity is further added. However, since this is performed only once per frame, Does not significantly affect the increase in the amount of computation.

また、本参考例11では、フレームアクティビティを、フレームメモリ34内の過去に符号化された画像データと、入力された原画像との間で計算するように構成したが、この構成では符号化歪みを含んだ画像と原画像との間でアクティビティ計算をすることになり、厳密なフレーム間アクティビティは算出できない。そのため、過去のフレームの原画像をバッファリングするフレームメモリを設けることにより、原画像同士でフレーム間のアクティビティを算出することも可能である。 In this reference example 11 , the frame activity is calculated between the image data encoded in the past in the frame memory 34 and the input original image. The activity is calculated between the image including the original image and the original image, and the exact inter-frame activity cannot be calculated. Therefore, by providing a frame memory for buffering the original image of the past frame, it is possible to calculate the activity between the frames of the original images.

また、本参考例11における符号化装置において、参考例10で述べたように「1MVモード」「4MVモード」に対応できるように構成することで、MPEG−4やH.263などの低ビットレート符号化装置への適用が可能である。 Further, the encoding apparatus according to the present reference example 11 is configured to be compatible with the “1MV mode” and the “4MV mode” as described in the reference example 10 , so that a low bit rate such as MPEG-4 or H.263 is achieved. Application to an encoding device is possible.

この発明の参考例1に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 1 of this invention. この発明の参考例2に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 2 of this invention. この発明の参考例3に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 3 of this invention. この発明の参考例4に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 4 of this invention. この発明の参考例5に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 5 of this invention. この発明の参考例6に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 6 of this invention. この発明の参考例7に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 7 of this invention. この発明の参考例8に係る動き補償装置を示すブロック構成図である。It is a block block diagram which shows the motion compensation apparatus which concerns on the reference example 8 of this invention. この発明の実施の形態に係る動き補償装置を示すブロック構成図である。It is a block diagram showing a motion compensation device according to the shape condition of the present invention. この発明の実施の形態に係る動き補償装置の変形例を示すブロック構成図である。It is a block diagram showing a modified example of the motion compensator according to the shape condition of the present invention. この発明の実施の形態に係る動き補償装置の他の変形例を示すブロック構成図である。It is a block diagram showing another modified example of the motion compensator according to the shape condition of the present invention. この発明の実施の形態に係る動き補償装置のさらに他の変形例を示すブロック構成図である。It is a further block diagram showing another modified example of the motion compensator according to the shape condition of the present invention. この発明の参考例9に係る動画像符号化装置を示すブロック構成図である。It is a block block diagram which shows the moving image encoder which concerns on the reference example 9 of this invention. 図13の符号化装置における動き補償予測部19の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the motion compensation estimation part 19 in the encoding apparatus of FIG. この発明の参考例10に係るMPEG−4またはITU−T勧告H.263における動きベクトルの予測値の算出方法を説明する説明図である。MPEG-4 or ITU-T Recommendation H.264 according to Reference Example 10 of the present invention. 263 is an explanatory diagram illustrating a method for calculating a motion vector prediction value in H.263. FIG. この発明の参考例11に係る動画像符号化装置を示すブロック構成図である。It is a block block diagram which shows the moving image encoder which concerns on the reference example 11 of this invention. 図16の符号化装置における動き補償予測部19の処理の流れを示すフローチャートである。FIG. 17 is a flowchart showing a processing flow of a motion compensation prediction unit 19 in the encoding device of FIG. 16. FIG. 従来の動き補償装置を示すブロック構成図である。It is a block block diagram which shows the conventional motion compensation apparatus. 最適画像(予測画像)を求める説明図である。It is explanatory drawing which calculates | requires an optimal image (predicted image).

符号の説明Explanation of symbols

101 最小歪検出部、102 特定ベクトル歪計算部、103 最適ベクトル出力部、104 前フレームメモリ、110 オフセット値、111 加算器、112 比較器、113 セレクタ、114 オフセット計算部、152 特定ベクトルに対する前フレームデータ、153 特定ベクトル、154 最小歪データ、155 最小歪を与える動きベクトル、156 特定ベクトルに対する歪データ、157 最適動きベクトル、201 参照画像、202 入力画像、203 動きベクトル、204 予測画像、205 差分絶対値和演算部、206 差分絶対値和、207 動きベクトル値符号化部、208 動きベクトル符号量、209 最適ベクトル決定部、210 最適ベクトル、211 差分二乗和演算部、212 差分二乗和、213 遅延器、214 差分演算器、215 差分ベクトル符号化器、216a,216b 平均値分離部、217 平均値分離予測画像、218 平均値分離入力画像、219 歪量演算部(評価値演算器)、220 評価値、222 差分器、223 予測誤差、224 周波数解析部、225 周波数係数、226 評価値生成部、227 評価値、228 符号化部、229 符号化情報量、230a,230b,230c 輝度色差分離部、231 予測画像輝度信号、232 予測画像色差信号、233 入力画像輝度信号、234 入力画像色差信号、235a,235b 差分器、236 輝度評価値生成部、237 色差評価値生成部、238 加算器、239 総評価値、240 輝度成分のみの予測画像、241 色差成分のみの予測画像、242 動きベクトル輝度信号、243 動きベクトル色差信号、244 輝度色差評価値比較部、20 動き検出部、22 動き補償部、24 最小マッチング閾値処理部、27 予測ベクトル導出部、30 最終予測画像判定部、34 フレームメモリ、40 フレームアクティビティ算出部。   DESCRIPTION OF SYMBOLS 101 Minimum distortion detection part, 102 Specific vector distortion calculation part, 103 Optimal vector output part, 104 Previous frame memory, 110 Offset value, 111 Adder, 112 Comparator, 113 Selector, 114 Offset calculation part, 152 Previous frame with respect to specific vector Data, 153 specific vector, 154 minimum distortion data, 155 motion vector giving minimum distortion, 156 distortion data for specific vector, 157 optimal motion vector, 201 reference image, 202 input image, 203 motion vector, 204 prediction image, 205 absolute difference Value sum operation unit, 206 Difference absolute value sum, 207 Motion vector value encoding unit, 208 Motion vector code amount, 209 Optimal vector determination unit, 210 Optimal vector, 211 Difference square sum operation unit, 212 Difference square sum, 213 Extender, 214 Difference calculator, 215 Difference vector encoder, 216a, 216b Average value separation unit, 217 Average value separation predicted image, 218 Average value separation input image, 219 Distortion amount calculation unit (evaluation value calculator), 220 Evaluation value, 222 differentiator, 223 prediction error, 224 frequency analysis unit, 225 frequency coefficient, 226 evaluation value generation unit, 227 evaluation value, 228 encoding unit, 229 encoded information amount, 230a, 230b, 230c luminance color difference separation unit 231 predicted image luminance signal, 232 predicted image color difference signal, 233 input image luminance signal, 234 input image color difference signal, 235a, 235b differentiator, 236 luminance evaluation value generation unit, 237 color difference evaluation value generation unit, 238 adder, 239 Total evaluation value, 240 predicted image of only luminance component, 241 predicted image of only color difference component, 24 2 motion vector luminance signal, 243 motion vector color difference signal, 244 luminance color difference evaluation value comparison unit, 20 motion detection unit, 22 motion compensation unit, 24 minimum matching threshold processing unit, 27 prediction vector derivation unit, 30 final prediction image determination unit, 34 frame memory, 40 frame activity calculator.

Claims (1)

動画像符号化を行う符号化を行う際、ブロック単位に前フレームのデータから動きを予測し情報量削減を行う動き補償装置において、
前フレームのデータを格納する前フレームメモリ部と、
フレームのブロックデータと上記フレームメモリ部に格納された前フレームの探索範囲データの部分画像領域からパターンマッチングを行い、最小の歪を与える動きベクトルと歪値とを計算する最小歪計算部と、
現在の最適動きベクトルを得るための比較参照情報となる動きベクトルである特定ベクトルを入力し、現フレームのブロックデータと当該特定ベクトルに対応する前フレームのブロックデータとの歪を計算し、上記特定ベクトルと計算された歪とを出力する特定ベクトル歪計算部と、
上記最小歪計算部から出力される歪と上記特定ベクトル歪計算部から出力される歪とに基づいて最適動きベクトルを出力する最適ベクトル出力部と
を備え
上記特定ベクトル歪計算部は、上記最適ベクトル出力手段から出力される最適動きベクトルを特定ベクトルとして入力し、
上記最適ベクトル出力部は、上記最小歪計算部からの最小歪を与える動きベクトルと上記特定ベクトル歪計算部から出力される特定ベクトルとの差分の値に応じて、差分の値が小さければ小さいオフセット値を与え、差分の値が大きければ大きいオフセット値を与えるべくオフセット値を適応的に変更して与えるオフセット値計算部と、上記最小歪計算部からの歪値に上記オフセット値計算部からのオフセット値を加算して上記最小歪計算部からの歪に重み付けを行う加算器と、重み付けされた最小歪計算部からの歪と上記特定ベクトル歪計算部からの歪とを比較する比較器と、この比較器の比較結果に基づいて最小歪を与える動きベクトルと特定ベクトルとのいずれかを選択して最適動きベクトルとして出力するセレクタとを備えたことを特徴とする動き補償装置。
In the motion compensation device that predicts the motion from the data of the previous frame in units of blocks and performs the information amount reduction when performing the coding for moving image coding,
A previous frame memory unit for storing data of the previous frame;
A minimum distortion calculation unit that performs pattern matching from the block data of the current frame and the partial image region of the search range data of the previous frame stored in the frame memory unit, and calculates a motion vector and a distortion value that give the minimum distortion;
Enter a specific vector is a motion vector to be compared reference information for obtaining the current optimal motion vectors, it calculates the distortion of the block data of the previous frame corresponding to the block data and the specific vectors of the current frame, the specific A specific vector distortion calculation unit for outputting a vector and the calculated distortion;
An optimal vector output unit that outputs an optimal motion vector based on the distortion output from the minimum distortion calculation unit and the distortion output from the specific vector distortion calculation unit ;
The specific vector distortion calculation unit inputs the optimal motion vector output from the optimal vector output means as a specific vector,
The optimum vector output unit has a small offset if the difference value is small according to the difference value between the motion vector giving the minimum distortion from the minimum distortion calculation unit and the specific vector output from the specific vector distortion calculation unit. An offset value calculator that adaptively changes the offset value to give a large offset value if the difference value is large, and an offset from the offset value calculator to the distortion value from the minimum distortion calculator An adder that adds a value to weight the distortion from the minimum distortion calculation unit, a comparator that compares the weight from the weighted minimum distortion calculation unit and the distortion from the specific vector distortion calculation unit, and A selector that selects either a motion vector that gives the minimum distortion or a specific vector based on the comparison result of the comparator and outputs it as an optimal motion vector; Motion compensation unit for the butterflies.
JP2004301445A 1997-12-25 2004-10-15 Motion compensation device Expired - Fee Related JP3872076B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004301445A JP3872076B2 (en) 1997-12-25 2004-10-15 Motion compensation device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP35740297 1997-12-25
JP2004301445A JP3872076B2 (en) 1997-12-25 2004-10-15 Motion compensation device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP20636198A Division JPH11243551A (en) 1997-12-25 1998-07-22 Motion compensation device and video encoding device and method

Publications (2)

Publication Number Publication Date
JP2005073291A JP2005073291A (en) 2005-03-17
JP3872076B2 true JP3872076B2 (en) 2007-01-24

Family

ID=34424966

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004301445A Expired - Fee Related JP3872076B2 (en) 1997-12-25 2004-10-15 Motion compensation device

Country Status (1)

Country Link
JP (1) JP3872076B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4713972B2 (en) * 2005-07-27 2011-06-29 株式会社東芝 Encoder
JP4563981B2 (en) * 2006-10-23 2010-10-20 日本電信電話株式会社 VIDEO ENCODING METHOD, VIDEO ENCODING DEVICE, VIDEO ENCODING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM
JP5138048B2 (en) * 2007-12-19 2013-02-06 ドルビー ラボラトリーズ ライセンシング コーポレイション Adaptive motion estimation
JP6239838B2 (en) * 2013-03-15 2017-11-29 キヤノン株式会社 Moving picture encoding apparatus, control method thereof, and imaging apparatus
JP6145084B2 (en) * 2014-12-11 2017-06-07 日本電信電話株式会社 Size determining method, size determining apparatus and computer program

Also Published As

Publication number Publication date
JP2005073291A (en) 2005-03-17

Similar Documents

Publication Publication Date Title
CA2256071C (en) Motion compensating apparatus, moving image coding apparatus and method
EP0874526B1 (en) Motion compensation encoding apparatus and motion compensation encoding method for high-efficiency encoding of video information through selective use of previously derived motion vectors in place of motion vectors derived from motion estimation
KR100719647B1 (en) Image data conversion device and image data conversion method
KR100750136B1 (en) Image encoding and decoding method and apparatus
JP3933718B2 (en) System for processing signals representing images
KR100391027B1 (en) A method and apparatus for predictive encoding of video information
JP3214705B2 (en) Image decoding device
KR101420957B1 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
US5500689A (en) System for detecting a video signal image intensity gradient
US20040223548A1 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, moving picture encoding program, and moving picture decoding program
TWI554079B (en) Dynamic image decoding device, dynamic image decoding method, dynamic image decoding program
JPH09154137A (en) Method and apparatus for compressing video information usingmovement-dependent estimation
KR20060044942A (en) Motion vector estimation using line and column vectors
JPH06311502A (en) Video transmission equipment
JPH10336672A (en) Encoding system converter and motion vector detection method therefor
JP3872076B2 (en) Motion compensation device
JP5649296B2 (en) Image encoding device
KR20050098292A (en) Predictive encoding of motion vectors including a flag notifying the presence of coded residual motion vector data
US6922490B2 (en) Image compression of selected regions based on transmission bit rate, motion, and/or region information, and bit selection before compression based on transmission bit rate
JP2002094987A (en) Video signal encoder
JPH11122619A (en) Video encoding and decoding method
JP2001016594A (en) Video motion compensation method
KR20010073608A (en) An Efficient Edge Prediction Methods In Spatial Domain Of Video Coding
JP3690259B2 (en) High-speed moving image encoding apparatus and high-speed moving image encoding method
JP2868445B2 (en) Moving image compression method and apparatus

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060627

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060825

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061017

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061018

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20091027

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101027

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111027

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121027

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131027

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees