JP2006157531A - Apparatus for coding and decoding moving image - Google Patents

Apparatus for coding and decoding moving image Download PDF

Info

Publication number
JP2006157531A
JP2006157531A JP2004345704A JP2004345704A JP2006157531A JP 2006157531 A JP2006157531 A JP 2006157531A JP 2004345704 A JP2004345704 A JP 2004345704A JP 2004345704 A JP2004345704 A JP 2004345704A JP 2006157531 A JP2006157531 A JP 2006157531A
Authority
JP
Japan
Prior art keywords
vector
difference vector
motion
accuracy
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004345704A
Other languages
Japanese (ja)
Other versions
JP4241588B2 (en
Inventor
Shigeru Fukushima
茂 福島
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2004345704A priority Critical patent/JP4241588B2/en
Publication of JP2006157531A publication Critical patent/JP2006157531A/en
Application granted granted Critical
Publication of JP4241588B2 publication Critical patent/JP4241588B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an apparatus for coding and decoding a moving image capable of minimizing an increase in a code amount of a motion vector while inserting an interpolation pixel among actual pixels to improve the accuracy of motion compensation. <P>SOLUTION: Motion vectors are divided into motion vectors with integer pixel accuracy that can be represented by an integer and motion vectors with fractional accuracy that has to be represented by a fraction. In the case of a motion vector with integer accuracy, the motion vector is converted into a value obtained by multiplying it by prescribed value to encode the value. In the case of a motion vector with fractional accuracy, the motion vector is converted into a value obtained by multiplying an integer part by a prescribed number and adding a prescribed odd number value to encode the value, while a fractional part is regarded as motion vector accuracy information and encoded as different information. In decoding, in the case of integer accuracy, a division is performed by the prescribed value to calculate a motion vector, and in the case of fractional accuracy, subtraction is performed by a prescribed odd number value, and a value divided by the prescribed value is added to the motion vector accuracy information to calculate the motion vector. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、動画像の符号化復号化装置に関するものである。   The present invention relates to a moving picture coding / decoding apparatus.

MPEGに代表される動画像の圧縮符号化では、連続する画像間の相関を用いて符号量を圧縮する動き補償予測符号化(以下簡単に動き補償と呼ぶ)が多く用いられる。動き補償は、画像を例えば16×16画素のブロックに分割して前記各ブロックを順次、符号化対象画像ブロックとして設定することで行われる。   In motion picture compression coding represented by MPEG, motion compensation predictive coding (hereinafter simply referred to as motion compensation) in which a code amount is compressed using a correlation between successive pictures is often used. Motion compensation is performed by dividing an image into blocks of 16 × 16 pixels, for example, and sequentially setting each block as an encoding target image block.

動き補償では、符号化対象画像ブロックに対して、その符号化を行うために使用される参照画像における対応するブロック領域がどの程度ずれた位置に存在するのかを表す動きベクトルが用いられる。参照画像において、符号化対象画像ブロックとの誤差評価値が最小になる動きベクトルを検出し、動き補償に使用すると、符号化効率が最も良好になる。誤差評価値とは、対応するブロック間の相違の度合いを表現したもので、ブロックマッチングにより求められる。   In motion compensation, a motion vector that indicates how much the corresponding block region in the reference image used for encoding the image block to be encoded exists at a shifted position is used. In the reference image, when the motion vector that minimizes the error evaluation value with respect to the encoding target image block is detected and used for motion compensation, the encoding efficiency becomes the best. The error evaluation value expresses the degree of difference between corresponding blocks, and is obtained by block matching.

ブロックマッチングは、符号化対象画像ブロックを参照画像中の検出範囲内の画像と、画素単位で全ての位置毎にマッチングをとり、マッチング評価関数を計算し、誤差評価値を求める手法である。マッチング評価関数としては、例えばブロック内の全画素について、画素毎の画素値の差分の絶対値の和をとったもの(絶対値差分和)等が用いられる。   Block matching is a technique for matching an encoding target image block with an image within a detection range in a reference image at every position in units of pixels, calculating a matching evaluation function, and obtaining an error evaluation value. As the matching evaluation function, for example, a sum of absolute values of pixel value differences (absolute value difference sum) for all pixels in the block is used.

このような動き補償では、参照画像の実際の画素の間に補間画素を挿入して、分数精度の動きを捉えることができるようにすることで、動き補償の精度を向上させる手法が従来より用いられている。   In such motion compensation, a technique that improves the accuracy of motion compensation by inserting interpolated pixels between actual pixels of the reference image so that fractional motion can be captured has been used. It has been.

図5は実際の画素の間に1個の補間画素を挿入した1/2画素精度の補間を施した様子を示した図である。1/2画素精度の補間画素値の算出には、隣接する実際の画素値の平均をとる方法などがある。   FIG. 5 is a diagram showing a state in which interpolation with 1/2 pixel accuracy is performed by inserting one interpolation pixel between actual pixels. The calculation of the interpolated pixel value with 1/2 pixel accuracy includes a method of averaging the adjacent actual pixel values.

図6は実際の画素の間に3個の補間画素を挿入した1/4画素精度の補間を施した様子を示した図である、1/4画素精度の動き補償は、1/2画素精度の動き補償よりも、動き補償の精度がさらに向上する。1/4画素精度の補間画素値の算出には前記1/2画素精度の補間画素を算出後に、更に隣接する実際の画素または1/2画素精度の補間画素との平均をとる方法などがある。   FIG. 6 is a diagram showing a state in which interpolation with 1/4 pixel accuracy in which three interpolation pixels are inserted between actual pixels is performed. Motion compensation with 1/4 pixel accuracy is 1/2 pixel accuracy. Therefore, the accuracy of motion compensation is further improved than that of motion compensation. The calculation of the interpolated pixel value with the ¼ pixel accuracy includes a method of calculating the average with the adjacent actual pixel or the interpolated pixel with the ½ pixel accuracy after calculating the interpolated pixel with the ½ pixel accuracy. .

しかし、このように動き補償の精度を向上させるために実際の画素間に補間画素を増やしていけばいくほど、動きベクトルの符号量は増加する。
例えば、補間画素を用いずに実際の画素のみで動き補償を行う場合は、1画素の動きを表すための動きベクトルの分解能は1で表わせるが、1/2画素精度の補間画素を用いた動き補償の場合は、実際の画素の間に補間画素が1個入るので、実際の画素の1画素分の動きを表すためには動きベクトルの分解能として2が必要となる。同様に、1/4画素精度の補間画素を用いた動き補償では、実際の画素の間に補間画素が3個入るので、実際の画素の1画素分の動きを表すためには動きベクトルの分解能として4が必要となる。従って、実際の画素の1画素の動きを表す動きベクトルの大きさは、補間画素を増やせば増やすほど大きくなることになる。
However, as the number of interpolated pixels increases between actual pixels in order to improve the accuracy of motion compensation in this way, the amount of code of the motion vector increases.
For example, when motion compensation is performed using only actual pixels without using interpolated pixels, the resolution of a motion vector for representing the motion of one pixel can be represented by 1, but interpolated pixels with 1/2 pixel accuracy are used. In the case of motion compensation, since one interpolation pixel is inserted between actual pixels, 2 is necessary as the resolution of the motion vector in order to represent the motion of one pixel of the actual pixel. Similarly, in motion compensation using interpolated pixels with ¼ pixel accuracy, there are three interpolated pixels between actual pixels. Therefore, in order to represent the motion of one actual pixel, the resolution of the motion vector 4 is required. Therefore, the magnitude of the motion vector representing the movement of one pixel of the actual pixel increases as the number of interpolation pixels increases.

通常、動きベクトルの表現方法としては実際の画素までの位置を示す動きベクトルを整数として表し、補間画素までの位置を示す動きベクトルを、整数と分数、または整数と少数で表す。例えば、1/2画素精度の補間画素を用いた動き補償の場合を例にとると、実際の画素で2画素分離れた位置を示す動きベクトルは2となり、更にその1つ先の補間画素への位置を示す動きベクトルは5/2、または2と1/2、または2.5と表す。   Usually, as a motion vector expression method, a motion vector indicating a position up to an actual pixel is expressed as an integer, and a motion vector indicating a position up to an interpolation pixel is expressed as an integer and a fraction, or an integer and a decimal. For example, in the case of motion compensation using an interpolation pixel with 1/2 pixel accuracy, the motion vector indicating the position separated by two pixels in the actual pixel is 2, and further to the next interpolation pixel. The motion vector indicating the position of is represented by 5/2, or 2 and 1/2, or 2.5.

以下本説明では、上記のとおり、整数のみで表せる実際の画素までの位置を示す動きベクトルを整数画素精度の動きベクトルと呼び、整数と分数、または整数と少数で表さなければならない補間画素までの位置を示す動きベクトルを分数画素精度の動きベクトルと呼んで区別して説明することとする。   Hereinafter, in this description, as described above, a motion vector indicating a position up to an actual pixel that can be represented only by an integer is referred to as an integer pixel precision motion vector, up to an interpolation pixel that must be represented by an integer and a fraction, or an integer and a decimal. A motion vector that indicates the position of the position will be referred to as a fractional pixel precision motion vector for distinction.

補間画素を用いて動き補償の精度を向上させながら、動きベクトルの符号量の増加を抑制するために、従来からさまざまな提案がなされている。例えば特許文献1では、符号化対象画像ブロックの動きベクトルを、周辺の各ブロックの動きベクトルから予測する予測ベクトルを適応的に選択して動きベクトルの符号量の増加を抑制する動画像符号化復号化装置が提案されている。
[従来の符号化装置]
以下、この従来の動画像符号化装置の構成について図3を用いて説明する。従来の動画像符号化装置は、画像メモリ301と、画像補間手段302と、動きベクトル検出手段303と、動き補償手段304と、直交変換手段305と、量子化手段306と、逆量子化手段307と、逆直交変換手段308と、動きベクトルメモリ309と、差分ベクトル算出手段310と、エントロピー符号化手段311とから構成されている。
Various proposals have heretofore been made in order to suppress an increase in the code amount of a motion vector while improving the accuracy of motion compensation using interpolated pixels. For example, in Patent Document 1, a moving image coding decoding that suppresses an increase in the amount of code of a motion vector by adaptively selecting a motion vector of a current image block to be predicted from motion vectors of surrounding blocks. A device has been proposed.
[Conventional encoding device]
Hereinafter, the configuration of this conventional moving image encoding apparatus will be described with reference to FIG. A conventional moving image coding apparatus includes an image memory 301, an image interpolation unit 302, a motion vector detection unit 303, a motion compensation unit 304, an orthogonal transform unit 305, a quantization unit 306, and an inverse quantization unit 307. , An inverse orthogonal transform unit 308, a motion vector memory 309, a difference vector calculation unit 310, and an entropy encoding unit 311.

画像メモリ301は、符号化対象画像の各ブロックを符号化し再度復号化した復号画像を、次の符号化対象画像の各ブロックの符号化に用いる為の参照画像として記憶する。
画像補間手段302は、前記参照画像の実際の画素間を補間画素で補間した参照補間画像を生成する。
The image memory 301 stores a decoded image obtained by encoding and re-decoding each block of the encoding target image as a reference image to be used for encoding each block of the next encoding target image.
The image interpolating unit 302 generates a reference interpolation image obtained by interpolating between actual pixels of the reference image with interpolation pixels.

動きベクトル検出手段303は、画像補間手段302で生成した参照補間画像を用いて符号化対象画像ブロックの動きベクトル検出を行う。そして検出した動きベクトルを動き補償手段304と差分ベクトル算出手段310に供給し、動きベクトルメモリ309に記憶する。   The motion vector detection unit 303 detects the motion vector of the encoding target image block using the reference interpolation image generated by the image interpolation unit 302. Then, the detected motion vector is supplied to the motion compensation unit 304 and the difference vector calculation unit 310 and stored in the motion vector memory 309.

動き補償手段304は、動きベクトル検出手段303で検出した動きベクトルと画像補間手段302で生成した参照補間画像とを用いて動き補償を行い、予測画像ブロックを生成する。   The motion compensation unit 304 performs motion compensation using the motion vector detected by the motion vector detection unit 303 and the reference interpolation image generated by the image interpolation unit 302 to generate a predicted image block.

直交変換手段305は、符号化対象画像ブロックと予測画像ブロックの差分信号を直交変換し、変換した差分信号を量子化手段306に供給する。
量子化手段306は、直交変換手段305で変換した差分信号を量子化し、量子化した差分信号を逆量子化手段307とエントロピー符号化手段311に供給する。
The orthogonal transform unit 305 performs orthogonal transform on the difference signal between the encoding target image block and the prediction image block, and supplies the converted difference signal to the quantization unit 306.
The quantization unit 306 quantizes the difference signal transformed by the orthogonal transformation unit 305 and supplies the quantized difference signal to the inverse quantization unit 307 and the entropy encoding unit 311.

逆量子化手段307は、量子化手段306で量子化した差分信号を逆量子化し、逆量子化した差分信号を逆直交変換手段308に供給する。
逆直交変換手段308は、逆量子化手段307で逆量子化した差分信号を逆直交変換する。
The inverse quantization unit 307 inversely quantizes the difference signal quantized by the quantization unit 306 and supplies the inversely quantized difference signal to the inverse orthogonal transform unit 308.
The inverse orthogonal transform unit 308 performs inverse orthogonal transform on the differential signal inversely quantized by the inverse quantization unit 307.

動きベクトルメモリ309は、動きベクトル検出手段303で検出した動きベクトルを記憶する。
差分ベクトル算出手段310は、動きベクトル検出手段303で検出した動きベクトルと、動きベクトルメモリ309に記憶してある符号化対象画像ブロックの周辺ブロックの動きベクトルとの差分(以下差分ベクトルと呼ぶ)を算出する。そして、最も差分が小さくなる差分ベクトルと周辺ブロック選択情報とをエントロピー符号化手段311に供給する。
The motion vector memory 309 stores the motion vector detected by the motion vector detection unit 303.
The difference vector calculation unit 310 calculates a difference (hereinafter referred to as a difference vector) between the motion vector detected by the motion vector detection unit 303 and the motion vector of the peripheral block of the encoding target image block stored in the motion vector memory 309. calculate. Then, the difference vector having the smallest difference and the surrounding block selection information are supplied to the entropy encoding means 311.

ここで、差分ベクトル算出手段310の動作について図7のフローチャートと図8を用いて説明する。
まず、図8のように、符号化対象画像ブロックの左側のブロックの動きベクトル(MV1)と、符号化対象画像ブロックの動きベクトルとの差分ベクトルを算出する(S21)。算出した差分ベクトルが、値の最も小さい差分ベクトル(以下最小差分ベクトルと呼ぶ)かどうか判定し(S22)、最小差分ベクトルの場合は、最小差分ベクトルをこの判定した差分ベクトルにおきかえることで更新する(S23)。ここで、最初に判定するMV1に対する差分ベクトルについては必ず最小差分ベクトルと判定する。また最小差分ベクトルの判定は、差分ベクトルのx成分y成分の和で判定する。
Here, the operation of the difference vector calculation means 310 will be described using the flowchart of FIG. 7 and FIG.
First, as shown in FIG. 8, a difference vector between the motion vector (MV1) of the left block of the encoding target image block and the motion vector of the encoding target image block is calculated (S21). It is determined whether or not the calculated difference vector is the smallest difference vector (hereinafter referred to as the minimum difference vector) (S22). If the calculated difference vector is the minimum difference vector, the difference vector is updated by replacing the determined difference vector with the determined difference vector. (S23). Here, the difference vector for MV1 to be determined first is always determined to be the minimum difference vector. The minimum difference vector is determined by the sum of the x component and y component of the difference vector.

これまでの処理を、符号化対象画像ブロックの上側のブロックの動きベクトル(MV2)、符号化対象画像ブロックの右上側のブロックの動きベクトル(MV3)について繰り返し(S24)す。そして、決定した最小差分ベクトルと、最小差分ベクトルに対応するブロックの位置情報とを出力する(S25)。   The above processing is repeated for the motion vector (MV2) of the upper block of the encoding target image block and the motion vector (MV3) of the upper right block of the encoding target image block (S24). Then, the determined minimum difference vector and block position information corresponding to the minimum difference vector are output (S25).

再び図3に戻って説明する。エントロピー符号化手段311は、量子化手段306で量子化した差分信号と、差分ベクトル算出手段310で選択した差分ベクトルと周辺ブロック選択情報とをそれぞれエントロピー符号化し、符号化データを外部に出力する。   Returning to FIG. 3, the description will be continued. The entropy encoding unit 311 entropy-encodes the difference signal quantized by the quantization unit 306, the difference vector selected by the difference vector calculation unit 310, and the surrounding block selection information, and outputs the encoded data to the outside.

以上の処理で符号化が行われる。
[従来の復号化装置」
次に、従来の動画像復号化装置の動作について図4を用いて説明する。
Encoding is performed by the above processing.
[Conventional Decoding Device]
Next, the operation of the conventional video decoding device will be described with reference to FIG.

この従来の動画像復号化装置は図4に示すとおり、エントロピー復号化手段401と、画像メモリ402と、画像補間手段403と、動きベクトル算出手段404と、動きベクトルメモリ405と、動き補償手段406と、逆量子化手段407と、逆直交変換手段408と、から構成されている。   As shown in FIG. 4, the conventional moving image decoding apparatus includes an entropy decoding unit 401, an image memory 402, an image interpolation unit 403, a motion vector calculation unit 404, a motion vector memory 405, and a motion compensation unit 406. And an inverse quantization means 407 and an inverse orthogonal transform means 408.

エントロピー復号化手段401は、入力した符号データをエントロピー復号化する。そして、復号化した差分ベクトルと周辺ブロック選択情報とを動きベクトル算出手段404に供給すると共に、復号化した差分信号を逆量子化手段407に供給する。   The entropy decoding unit 401 performs entropy decoding on the input code data. Then, the decoded difference vector and the neighboring block selection information are supplied to the motion vector calculation unit 404 and the decoded difference signal is supplied to the inverse quantization unit 407.

画像メモリ402は、既に全ブロックの復号が終了している復号画像を、次の復号対象画像の各ブロックの復号化に用いる為の参照画像として記憶する。
画像補間手段403は、参照画像の画素を補間した参照補間画像を生成する。
The image memory 402 stores a decoded image for which all blocks have already been decoded as a reference image to be used for decoding each block of the next decoding target image.
The image interpolation unit 403 generates a reference interpolation image obtained by interpolating the pixels of the reference image.

動きベクトル算出手段404は、エントロピー復号化手段401で復号化した周辺ブロック選択情報に応じて、動きベクトルメモリ405に記憶している復号化対象画像ブロックの周辺ブロックの動きベクトルの中から予測ベクトルを選択する。そして選択した周辺ブロックの予測ベクトルと、復号化した復号化対象画像ブロックの差分ベクトルとを加算することで復号化対象画像ブロックの完全な動きベクトルを算出する。算出した復号化対象画像ブロックの動きベクトルを、動きベクトルメモリ405と動き補償手段406に供給する。   The motion vector calculation unit 404 selects a prediction vector from the motion vectors of the peripheral blocks of the decoding target image block stored in the motion vector memory 405 according to the peripheral block selection information decoded by the entropy decoding unit 401. select. Then, a complete motion vector of the decoding target image block is calculated by adding the prediction vector of the selected peripheral block and the decoded difference vector of the decoding target image block. The calculated motion vector of the decoding target image block is supplied to the motion vector memory 405 and the motion compensation unit 406.

動きベクトルメモリ405は、動きベクトル算出手段404で算出した動きベクトルを記憶する。
動き補償手段406は、動きベクトル算出手段404で算出した復号化対象画像ブロックの動きベクトルと、画像補間手段403で生成した参照補間画像とを用いて動き補償を行い、予測画像を生成する。
The motion vector memory 405 stores the motion vector calculated by the motion vector calculation unit 404.
The motion compensation unit 406 performs motion compensation using the motion vector of the decoding target image block calculated by the motion vector calculation unit 404 and the reference interpolation image generated by the image interpolation unit 403 to generate a predicted image.

逆量子化手段407は、エントロピー復号化手段401で復号化した差分信号を逆量子化し、逆量子化した差分信号を逆直交変換手段408に供給する。
逆直交変換手段408は、逆量子化手段407で逆量子化した差分信号を逆直交変換する。
The inverse quantization means 407 inversely quantizes the difference signal decoded by the entropy decoding means 401 and supplies the inversely quantized difference signal to the inverse orthogonal transform means 408.
The inverse orthogonal transform unit 408 performs inverse orthogonal transform on the difference signal inversely quantized by the inverse quantization unit 407.

以上の処理で復号化が行われる。
特開平11−112994号公報
Decoding is performed by the above processing.
JP-A-11-112994

前述の特許文献1の動画像符号化装置によれば、符号化対象画像ブロックの動きベクトルと周辺ブロックの動きベクトルとの差分が最も小さい最小差分ベクトルを予測ベクトルとすることによって、動きベクトルの符号量を削減できるとしている。   According to the above-described moving picture coding apparatus disclosed in Patent Document 1, a motion vector code is obtained by using a minimum difference vector having the smallest difference between a motion vector of an encoding target image block and a motion vector of a peripheral block as a prediction vector. The amount can be reduced.

しかしながら、符号化対象画像ブロックに対して周辺のどの位置のブロックの動きベクトルを予測ベクトルとして選択したかという周辺ブロック選択情報を符号化する必要がある。従って、周辺ブロックの動きベクトルのメジアン(中央値)を予測ベクトルとする一般的な方式と比較して、動きベクトルの符号量増加の抑制効果はそれほど大きくなく、動きベクトル情報送信に必要な発生符号量増加の抑制効果も大きいとは言い難い。   However, it is necessary to encode peripheral block selection information indicating which peripheral block motion vector is selected as a prediction vector for the encoding target image block. Therefore, compared with a general method in which the median (median value) of motion vectors of surrounding blocks is used as a prediction vector, the effect of suppressing the increase in the amount of code of motion vectors is not so large, and the generated codes necessary for motion vector information transmission It is difficult to say that the effect of suppressing the increase in the amount is large.

また、従来の動画像符号化復号化装置では、動き補償の精度を向上させるために、実際の画素間の補間画素を増やして、画素の精度を細かくしていけばいくほど、動きベクトルの符号量が増加する。従って、一旦動き補償の精度を所定レベルに設定すると、その設定した精度よりも低い精度で動き補償を行えばよい場合においても動きベクトルは設定した動き補償精度を基に生成される。よって、本来精度を低くしたので動きベクトルの符号量も低く抑えたいのだが、はじめから動き補償精度を低く設定した場合に比較してあまり符号量が少なくならない。   In addition, in the conventional video encoding / decoding device, in order to improve the accuracy of motion compensation, the number of interpolated pixels between actual pixels is increased, and the more accurate the pixel is, the more the motion vector code is encoded. The amount increases. Therefore, once the accuracy of motion compensation is set to a predetermined level, a motion vector is generated based on the set motion compensation accuracy even when motion compensation should be performed with an accuracy lower than the set accuracy. Therefore, since the accuracy is originally lowered, it is desired to keep the code amount of the motion vector low. However, the code amount is not so small as compared with the case where the motion compensation accuracy is set low from the beginning.

本発明は上記課題を鑑みてなされたものである。
本発明は、符号化対象画像の実際の画素間に補間画素を挿入して動き補償の精度を向上させながらも、発生する動きベクトルの符号量の増加を最小限に抑制することが可能な動画像符号化復号化装置を実現することを目的とする。
The present invention has been made in view of the above problems.
The present invention is a moving image that can suppress an increase in the amount of code of a generated motion vector to a minimum while inserting interpolation pixels between actual pixels of an encoding target image to improve the accuracy of motion compensation. An object is to realize an image encoding / decoding device.

また本発明は、動き補償の精度を高く設定しておいたまま低い精度の動き補償を行った場合に、動きベクトルの符号量を、はじめから動き補償精度を低く設定した場合と同等の低い量に押さえることが可能な動画像符号化復号化装置を実現することも目的とする。   In addition, the present invention provides a motion vector code amount that is as low as when motion compensation accuracy is initially set low when motion compensation is performed with low accuracy while setting motion compensation accuracy high. It is another object of the present invention to realize a moving image encoding / decoding device that can be suppressed to a low level.

そこで上記課題を解決するために本発明は、下記の装置を提供するものである。
(1)符号化対象画像を複数の画素の2次元配列からなる符号化対象画像ブロックに分割し、前記符号化対象画像ブロック単位で順次、動き補償予測符号化、直交変換符号化、量子化、エントロピー符号化を行い、かつ前記動き補償予測符号化を行う際に参照する画像として、既に符号化が完了した画像を再度復号化した画像の画素間に補間画素を挿入した参照補間画像を用いる動画像符号化装置において、
前記符号化対象画像ブロックにそれぞれ隣接する既に符号化が完了している複数の画像ブロックの動きベクトルから前記符号化対象画像ブロックの予測ベクトルを算出し、算出した前記予測ベクトルと実際に符号化を行って得られた前記符号化対象画像ブロックの動きベクトルとの差分である差分ベクトルを算出する、差分ベクトル算出手段(110)と、
前記差分ベクトル算出手段にて算出した差分ベクトルが、前記参照補間画像の実際の画素の位置を指し示す整数画素精度の差分ベクトルの場合は、前記整数の値に応じた偶数または奇数のうちいずれか一方の種類の第一の変換差分ベクトルを生成し、生成した前記第一の変換差分ベクトルに応じて第一の符号データを生成し、前記差分ベクトル算出手段にて算出した差分ベクトルが、前記参照補間画像の補間画素の位置を指し示す分数画素精度の差分ベクトルの場合は、前記分数画素精度の差分ベクトルの分子を分母で除算して得られる整数の値に応じた前記第一の変換差分ベクトルで採用した奇数または偶数と異なる他方の種類の第二の変換差分ベクトルを生成し、生成した前記第二の変換差分ベクトルに応じて第二の符号データを生成し、前記分数画素精度の差分ベクトルの分子を分母で除算して得られる剰余値をベクトル精度情報とし、前記ベクトル精度情報に応じた第三の符号データを生成する動きベクトル符号量抑制手段(111)と、
前記動きベクトル符号量抑制手段にて生成した前記第一の符号データ及び前記第二の符号データ及び前記第三の符号データと、符号化対象画像を符号化した符号化データを用いて前記エントロピー符号化を行い符号列データを生成すると共に、前記符号列データを外部へ出力するエントロピー符号化手段(112)と、
を有することを特徴とする動画像符号化装置。
(2)前記動画像符号化装置にて生成された符号列データを入力として、エントロピー復号化、逆量子化、逆直交変換復号化、動き補償予測復号化を行い、前記符号化対象画像を復号する動画像復号化装置において、
前記符号列データを入力として前記エントロピー復号化を行い、前記符号化対象画像の符号化データと、前記第一の符号データと、前記第二の符号データと、前記第三の符号データと、を生成する、エントロピー復号化手段(201)と、
前記エントロピー復号化手段により生成した前記第一の符号データに応じた前記第一の変換差分ベクトルを生成し、生成した前記第一の変換差分ベクトルに応じて整数画素精度の差分ベクトルを算出し、前記エントロピー復号化手段により生成した前記第二の符号データに応じた前記第二の変換差分ベクトルを生成し、生成した前記第二の変換差分ベクトルに応じた分数画素精度の差分ベクトルの整数値を算出し、前記エントロピー復号化手段により生成した前記第三の符号データに応じた前記ベクトル精度情報を生成し、算出した前記分数画素精度の差分ベクトルの整数値と前記ベクトル精度情報とを加算して分数画素精度の差分ベクトルを算出する、差分ベクトル算出手段(204)と、
今回の復号化の対象となる画像ブロックにそれぞれ隣接する既に復号化が完了している複数の画像ブロックの動きベクトルから前記復号化対象画像ブロックの予測ベクトルを算出し、算出した前記予測ベクトルと前記差分ベクトル算出手段にて算出した、前記整数画素精度の差分ベクトルまたは前記分数画素精度の差分ベクトルとを加算して、前記復号化対象画像ブロックの復号化に実際に使用する動きベクトルを生成する、動きベクトル算出手段(205)と、
を有することを特徴とする動画像復号化装置。
Therefore, in order to solve the above problems, the present invention provides the following apparatus.
(1) An encoding target image is divided into encoding target image blocks each including a two-dimensional array of a plurality of pixels, and motion compensation prediction encoding, orthogonal transform encoding, quantization, A moving image that uses a reference interpolation image in which interpolation pixels are inserted between pixels of an image obtained by performing reencoding on an image that has already been encoded as an image that is subjected to entropy coding and is referred to when performing the motion compensation predictive coding In an image encoding device,
The prediction vector of the encoding target image block is calculated from the motion vectors of the plurality of image blocks that have already been encoded adjacent to the encoding target image block, respectively, and the calculated prediction vector and the actual encoding are encoded. Difference vector calculation means (110) for calculating a difference vector that is a difference from the motion vector of the encoding target image block obtained by performing;
If the difference vector calculated by the difference vector calculating means is an integer pixel precision difference vector indicating the actual pixel position of the reference interpolated image, either an even number or an odd number according to the integer value The first conversion difference vector of the type is generated, first code data is generated according to the generated first conversion difference vector, and the difference vector calculated by the difference vector calculation means is the reference interpolation In the case of a differential vector with fractional pixel precision indicating the position of an interpolated pixel in the image, the first converted differential vector according to an integer value obtained by dividing the numerator of the differential vector precision with fractional pixel by the denominator is used. Generate the second conversion difference vector of the other type different from the odd or even number, and generate the second code data according to the generated second conversion difference vector Motion vector code amount suppression means (111) for generating third code data corresponding to the vector accuracy information, using a remainder value obtained by dividing the numerator of the difference vector with fractional pixel accuracy by a denominator; ,
The entropy code using the first code data, the second code data, and the third code data generated by the motion vector code amount suppression unit and the encoded data obtained by encoding the encoding target image Entropy encoding means (112) for generating the code string data by outputting the code string data to the outside;
A moving picture encoding apparatus comprising:
(2) Using the code string data generated by the video encoding device as an input, entropy decoding, inverse quantization, inverse orthogonal transform decoding, and motion compensated prediction decoding are performed, and the encoding target image is decoded. In the moving picture decoding apparatus,
The entropy decoding is performed with the code string data as input, the encoded data of the encoding target image, the first code data, the second code data, and the third code data. Generating entropy decoding means (201);
Generating the first conversion difference vector according to the first code data generated by the entropy decoding means, calculating an integer pixel precision difference vector according to the generated first conversion difference vector; The second conversion difference vector corresponding to the second code data generated by the entropy decoding means is generated, and an integer value of the difference vector with fractional pixel accuracy corresponding to the generated second conversion difference vector is obtained. Calculating, generating the vector accuracy information according to the third code data generated by the entropy decoding means, and adding the calculated integer value of the difference vector of the fractional pixel accuracy and the vector accuracy information A difference vector calculating means (204) for calculating a difference vector with fractional pixel precision;
The prediction vector of the decoding target image block is calculated from the motion vectors of a plurality of image blocks that have already been decoded and are adjacent to the image block to be decoded this time, and the calculated prediction vector and the calculated vector The motion vector actually used for decoding the decoding target image block is generated by adding the difference vector of integer pixel accuracy or the difference vector of fractional pixel accuracy calculated by the difference vector calculation means, Motion vector calculation means (205);
A moving picture decoding apparatus comprising:

本発明によれば、符号化対象画像の実際の画素間に補間画素を挿入して動き補償の精度を向上させながらも、発生する動きベクトルの符号量の増加を最小限に抑制することが可能となる。   According to the present invention, it is possible to suppress an increase in the amount of code of a generated motion vector while minimizing the accuracy of motion compensation by inserting interpolation pixels between actual pixels of an encoding target image. It becomes.

またベクトル精度情報の偏りを考慮して、出現確率の高いベクトル精度情報に短いビット長の符号を割り当てることにより、動きベクトルの符号量の増加を更に抑制することが可能となる。   In addition, in consideration of the bias of the vector accuracy information, it is possible to further suppress the increase in the code amount of the motion vector by assigning a short bit length code to the vector accuracy information having a high appearance probability.

更に本発明によれば、動き補償の精度を高く設定しておいたまま低い精度の動き補償を行った場合に、動きベクトルの符号量を、はじめから動き補償精度を低く設定した場合と同等の低い量に押さえることが可能となる。   Furthermore, according to the present invention, when low-precision motion compensation is performed while the motion compensation accuracy is set high, the motion vector code amount is equivalent to that when the motion compensation accuracy is set low from the beginning. It becomes possible to hold down to a low amount.

本発明の一実施例の動画像符号化復号化装置で用いる、補間画素を用いても動きベクトルの符号量の増加を抑えることが可能な、動きベクトル符号量抑制手段の内容を以下に説明する。本説明では動きベクトルを従来例で説明した差分ベクトルに置き換えて説明する。実際の符号化においては符号量を抑制するため、動きベクトルをそのまま使用するのではなく差分ベクトルを用いることが多いためである。   The contents of the motion vector code amount suppression means used in the video encoding / decoding device of one embodiment of the present invention, which can suppress the increase in the code amount of the motion vector even by using interpolation pixels, will be described below. . In this description, the motion vector is replaced with the difference vector described in the conventional example. This is because in actual encoding, in order to suppress the code amount, a motion vector is not used as it is, but a difference vector is often used.

補間画素を用いて動き補償を行う場合の差分ベクトルの表現方法は前述の背景技術の項で説明したとおり、実際の画素までの位置を示す差分ベクトルは、整数として表すのが一般的であり、また補間画素までの位置を示す差分ベクトルは、整数と分数、または整数と少数で表すのが一般的である。本説明ではそれぞれを、整数画素精度の差分ベクトル、分数画素精度の差分ベクトルと定義しているのは前述したとおりである。   As described in the background art section above, the difference vector representing the motion compensation using the interpolated pixels is generally expressed as an integer as the difference vector indicating the position up to the actual pixel. In general, the difference vector indicating the position to the interpolation pixel is represented by an integer and a fraction, or an integer and a decimal. In this description, as described above, each is defined as a difference vector with integer pixel precision and a difference vector with fractional pixel precision.

本実施例の動画像符号化復号化装置で用いる動きベクトル符号量抑制手段では上記整数画素精度の差分ベクトル、及び分数画素精度の差分ベクトルをそれぞれ以下のように変換する。   The motion vector code amount suppression means used in the moving picture coding / decoding apparatus of the present embodiment converts the difference vector with integer pixel precision and the difference vector with fractional pixel precision as follows.

整数画素精度の差分ベクトルは、差分ベクトルの値に所定の偶数値(本説明では2)を乗算して偶数値に変換したものを、新たな整数画素精度の差分ベクトルとする。
また、分数画素精度の差分ベクトルは、差分ベクトルを整数部分と分数部分に分けて変換する。差分ベクトルの整数部分は、値に所定の偶数値(本説明では2)を乗算し、乗算結果に所定奇数値(本説明では1)を加算して奇数値に変換したものを分数画素精度の整数部分の差分ベクトルの値とする。差分ベクトルの分数部分は、別途規定する変換割当に従って変換し、変換した値をベクトル精度情報とする。そして、前記分数画素精度の整数部分の差分ベクトルの値と前記ベクトル精度情報との組み合わせで、新たな分数画素精度の差分ベクトルを構成する。
The difference vector of integer pixel accuracy is obtained by multiplying the value of the difference vector by a predetermined even value (2 in this description) to convert it to an even value, and a new difference vector of integer pixel accuracy is obtained.
Also, the difference vector with fractional pixel precision is converted by dividing the difference vector into an integer part and a fractional part. The integer part of the difference vector is obtained by multiplying the value by a predetermined even value (2 in this description), adding a predetermined odd value (1 in this description) to the multiplication result, and converting it to an odd value with fractional pixel precision. The value of the difference vector of the integer part is used. The fractional part of the difference vector is converted in accordance with a conversion assignment specified separately, and the converted value is used as vector accuracy information. Then, a new fractional pixel precision difference vector is formed by combining the fraction vector precision integer vector difference vector value and the vector precision information.

上記のような変換を施した各差分ベクトルを本説明では変換差分ベクトルと呼ぶ。
このように、差分ベクトルを符号データとする際に、整数画素精度の差分ベクトルを偶数値で表し、分数画素精度の差分ベクトルを奇数値とベクトル精度情報とで表すと、分数画素精度の差分ベクトルの場合にのみ、ベクトル精度情報を符号データとして付加すれば良くなる。従って、整数画素精度の差分ベクトルを符号データにする場合には、ベクトル精度情報を付加する必要が無いので、符号量は分数精度の差分ベクトルの約半分になり、全体的な差分ベクトルの符号量の増加を抑制できる。
Each difference vector subjected to the above-described conversion is referred to as a conversion difference vector in this description.
Thus, when the difference vector is used as code data, the difference vector of integer pixel accuracy is represented by an even value, and the difference vector of fractional pixel accuracy is represented by an odd value and vector accuracy information. Only in this case, it is sufficient to add vector accuracy information as code data. Therefore, when a difference vector with integer pixel accuracy is used as code data, since it is not necessary to add vector accuracy information, the code amount is about half of the difference vector with fractional accuracy, and the code amount of the overall difference vector is Can be suppressed.

また、分数画素精度の差分ベクトルを符号データにする場合は、ベクトル精度情報が独立した符号データとなる。従って、予めベクトル精度情報の出現確率に偏りが予想される場合には、出現確率の高いベクトル精度情報に短いビット長の符号を割り当てることにより、動きベクトルの符号量の増加を更に抑制できる。   Further, when a differential vector with fractional pixel accuracy is used as code data, the vector accuracy information becomes independent code data. Therefore, when a bias is expected in the appearance probability of the vector accuracy information in advance, an increase in the code amount of the motion vector can be further suppressed by assigning a short bit length code to the vector accuracy information having a high appearance probability.

本説明では、整数画素精度の差分ベクトルを偶数値に、分数画素精度の差分ベクトルの整数部分を奇数値に変換したが、もちろん整数画素精度の差分ベクトルを奇数値に、分数画素精度の差分ベクトルの整数部分を偶数値に変換しても良い。   In this description, the integer pixel precision difference vector is converted to an even value, and the integer part of the fraction pixel precision difference vector is converted to an odd value. The integer part of may be converted to an even value.

以下、従来の場合と本実施例とで実際に符号割り当てを行った場合の符号量の比較を行った例を説明する。
図10は、1/4画素精度の場合の従来の差分ベクトルと、その差分ベクトルへ割り当てる割当符号データの関係を示す表である。図11はその差分ベクトルを求めた周辺ブロックの位置情報へ割り当てる割当符号データの関係を示す表である。
Hereinafter, an example will be described in which code amounts are compared in the case where code allocation is actually performed between the conventional case and the present embodiment.
FIG. 10 is a table showing the relationship between a conventional difference vector in the case of 1/4 pixel accuracy and allocation code data assigned to the difference vector. FIG. 11 is a table showing the relationship of allocation code data to be assigned to the position information of the neighboring blocks for which the difference vector has been obtained.

また図12は、1/4画素精度の場合の従来の差分ベクトルと、その差分ベクトルに対応する本実施例の変換差分ベクトルと、その変換差分ベクトルへ割り当てる割当符号データとの関係を示す表である。図13は、1/4画素精度の場合の従来の差分ベクトルと、その差分ベクトルに対応する本実施例のベクトル精度情報と、そのベクトル精度情報へ割り当てる割当符号データとを示す表である。   FIG. 12 is a table showing the relationship between the conventional difference vector in the case of 1/4 pixel accuracy, the conversion difference vector of the present embodiment corresponding to the difference vector, and the allocation code data assigned to the conversion difference vector. is there. FIG. 13 is a table showing a conventional difference vector in the case of ¼ pixel accuracy, vector accuracy information of this embodiment corresponding to the difference vector, and allocation code data assigned to the vector accuracy information.

図14は、上記のようにそれぞれ割り当てた各割当符号データに対して実際の動き補償時の動きベクトルの出現確率を付与した第一の例である。これは、1/4画素精度、2/4画素精度、3/4画素精度の動きベクトルの出現確率が同等な場合の例である。この例で実際の動き補償時の動きベクトルの符号量を、従来例と本実施例とで算出し比較してみる。   FIG. 14 is a first example in which motion vector appearance probabilities at the time of actual motion compensation are assigned to the respective allocation code data allocated as described above. This is an example of the case where the appearance probabilities of motion vectors with 1/4 pixel accuracy, 2/4 pixel accuracy, and 3/4 pixel accuracy are equal. In this example, the code amount of the motion vector at the time of actual motion compensation is calculated and compared between the conventional example and this example.

20本の動きベクトルが出現確率通りに出現した場合を仮定する。従って出現確率5%につき動きベクトルは1回出現することになる。
このとき、従来の方法で動きベクトルを符号データとする場合は、差分ベクトルの符号量は、
(1bit×6回) [差分ベクトル0時]
+(3bit×3回) [差分ベクトル1/4時]
+(3bit×3回) [差分ベクトル2/4時]
+(5bit×3回) [差分ベクトル3/4時]
+(5bit×5回) [差分ベクトル1時]
=64bit
また上記差分ベクトルを求めた周辺ブロックの位置情報の符号量は、
(1bit×6回) [差分ベクトル0時]
+(3bit×3回) [差分ベクトル1/4時]
+(3bit×3回) [差分ベクトル2/4時]
+(1bit×3回) [差分ベクトル3/4時]
+(3bit×5回) [差分ベクトル1時]
=42bit
合計106ビットが差分ベクトルの符号量となる。
Assume that 20 motion vectors appear according to the appearance probability. Therefore, the motion vector appears once per 5% appearance probability.
At this time, when a motion vector is used as code data by the conventional method, the code amount of the difference vector is
(1 bit x 6 times) [When difference vector is 0]
+ (3bit x 3 times) [Difference vector 1/4]
+ (3bit x 3 times) [Difference vector 2/4]
+ (5bit x 3 times) [Difference vector 3/4]
+ (5bit x 5 times) [Difference vector 1 o'clock]
= 64bit
In addition, the code amount of the position information of the neighboring blocks from which the difference vector is obtained
(1 bit x 6 times) [When difference vector is 0]
+ (3bit x 3 times) [Difference vector 1/4]
+ (3bit x 3 times) [Difference vector 2/4]
+ (1 bit x 3 times) [Difference vector 3/4]
+ (3bit x 5 times) [Difference vector 1 o'clock]
= 42bit
A total of 106 bits is the code amount of the difference vector.

一方、本発明で動きベクトルを符号データとする場合は、変換差分ベクトルの符号量は、
(1bit×6回) [差分ベクトル0時]
+(3bit×3回) [差分ベクトル1/4時]
+(3bit×3回) [差分ベクトル2/4時]
+(3bit×3回) [差分ベクトル3/4時]
+(3bit×5回) [差分ベクトル1時]
=48bit
また、ベクトル精度情報の符号量は、
(1bit×3回) [差分ベクトル1/4時]
+(2bit×3回) [差分ベクトル2/4時]
+(2bit×3回) [差分ベクトル3/4時]
=12ビット
合計60ビットが動きベクトルの符号量となる。
On the other hand, when the motion vector is code data in the present invention, the code amount of the conversion difference vector is
(1 bit x 6 times) [When difference vector is 0]
+ (3bit x 3 times) [Difference vector 1/4]
+ (3bit x 3 times) [Difference vector 2/4]
+ (3bit x 3 times) [Difference vector 3/4]
+ (3bit x 5 times) [Difference vector 1 o'clock]
= 48bit
Also, the code amount of the vector accuracy information is
(1 bit x 3 times) [Difference vector 1/4]
+ (2bit x 3 times) [Difference vector 2/4]
+ (2bit x 3 times) [Difference vector 3/4]
= 12 bits A total of 60 bits is the code amount of the motion vector.

従って本実施例の方が従来例より46ビット少ない符号量で同等の精度の動き補償が可能となる。
次に、図15は、上記図14の説明と同様に、それぞれ割り当てた各割当符号データに対して実際の動き補償時の動きベクトルの出現確率を付与した第二の例である。これは、1/4画素精度の動きベクトルの出現確率が他の分数画素精度の動きベクトルより高い場合の例である。このとき1/4画素精度の動きベクトルに割り当てている割当符号データのビット長が他の分数精度の動きベクトルの割当符号データのビット長より短くなっていることに着目する。
Therefore, the present embodiment can perform motion compensation with the same accuracy with a code amount of 46 bits less than the conventional example.
Next, FIG. 15 is a second example in which the appearance probability of the motion vector at the time of actual motion compensation is assigned to each assigned code data as in the description of FIG. This is an example when the appearance probability of a motion vector with ¼ pixel accuracy is higher than that with other fractional pixel accuracy motion vectors. At this time, attention is paid to the fact that the bit length of the assigned code data assigned to the motion vector of 1/4 pixel accuracy is shorter than the bit length of the assigned code data of other fractional accuracy motion vectors.

この例で実際の動き補償時の動きベクトルの符号量を、従来例と本実施例とで算出し比較してみる。
20本の動きベクトルが出現確率通りに出現した場合を仮定する。従って出現確率5%につき動きベクトルは1回出現することになる。
In this example, the code amount of the motion vector at the time of actual motion compensation is calculated and compared between the conventional example and this example.
Assume that 20 motion vectors appear according to the appearance probability. Therefore, the motion vector appears once per 5% appearance probability.

このとき、従来の方法で動きベクトルを符号データとする場合は、差分ベクトルの符号量は、
(1bit×8回) [差分ベクトル0時]
+(3bit×2回) [差分ベクトル1/4時]
+(3bit×1回) [差分ベクトル2/4時]
+(5bit×1回) [差分ベクトル3/4時]
+(5bit×8回) [差分ベクトル1時]
=62bit
また上記差分ベクトルを求めた周辺ブロックの位置情報の符号量は、
(1bit×8回) [差分ベクトル0時]
+(3bit×2回) [差分ベクトル1/4時]
+(3bit×1回) [差分ベクトル2/4時]
+(1bit×1回) [差分ベクトル3/4時]
+(3bit×5回) [差分ベクトル1時]
=33bit
合計95ビットが動きベクトルの符号量となる。

一方、本発明で動きベクトルを符号データとする場合は、変換差分ベクトルの符号量は、
(1bit×8回) [差分ベクトル0時]
+(3bit×2回) [差分ベクトル1/4時]
+(3bit×1回) [差分ベクトル2/4時]
+(3bit×1回) [差分ベクトル3/4時]
+(3bit×8回) [差分ベクトル1時]
=44bit
また、ベクトル精度情報の符号量は、
(1bit×2回) [差分ベクトル1/4時]
+(2bit×1回) [差分ベクトル2/4時]
+(2bit×1回) [差分ベクトル3/4時]
=6ビット
合計50ビットが動きベクトルの符号量となる
従って本実施例の方が従来例より45ビット少ない符号量で同等の精度の動き補償が可能となる。
At this time, when a motion vector is used as code data by the conventional method, the code amount of the difference vector is
(1 bit x 8 times) [Difference vector 0]
+ (3bit x 2 times) [Difference vector 1/4]
+ (3bit x 1 time) [Difference vector 2/4]
+ (5bit x 1 time) [Difference vector 3/4]
+ (5bit x 8 times) [Difference vector 1 o'clock]
= 62bit
In addition, the code amount of the position information of the neighboring blocks from which the difference vector is obtained
(1 bit x 8 times) [Difference vector 0]
+ (3bit x 2 times) [Difference vector 1/4]
+ (3bit x 1 time) [Difference vector 2/4]
+ (1 bit x 1 time) [Difference vector 3/4]
+ (3bit x 5 times) [Difference vector 1 o'clock]
= 33bit
A total of 95 bits is the code amount of the motion vector.

On the other hand, when the motion vector is code data in the present invention, the code amount of the conversion difference vector is
(1 bit x 8 times) [Difference vector 0]
+ (3bit x 2 times) [Difference vector 1/4]
+ (3bit x 1 time) [Difference vector 2/4]
+ (3bit x 1 time) [Difference vector 3/4]
+ (3 bits x 8 times) [Difference vector 1 o'clock]
= 44bit
Also, the code amount of the vector accuracy information is
(1 bit x 2) [Difference vector 1/4]
+ (2bit x 1 time) [Difference vector 2/4]
+ (2bit x 1 time) [Difference vector 3/4]
= 6 bits A total of 50 bits is the code amount of the motion vector. Therefore, the present embodiment can perform motion compensation with the same accuracy with a code amount of 45 bits less than the conventional example.

このように、本実施例によれば従来と比較して大幅に動きベクトルの符号量の増加を抑制できることがわかる。
またベクトル精度情報の偏りを考慮して、出現確率の高いベクトル精度情報に短いビット長の符号を割り当てることにより、動きベクトルの符号量の増加を更に抑制できることがわかる。
Thus, according to the present embodiment, it can be seen that an increase in the code amount of the motion vector can be significantly suppressed as compared with the conventional case.
It can also be seen that an increase in the code amount of the motion vector can be further suppressed by assigning a short bit length code to the vector accuracy information having a high appearance probability in consideration of the bias of the vector accuracy information.

次に、前記1/4画素精度の動き補償を1/8画素精度など更に精度の良い動き補償に拡張しておき、実際には1/4画素精度の運用を行う場合の例を説明する。
図16は1/8画素精度に拡張した時の、従来の差分ベクトルと、その差分ベクトルへ割り当てる割当符号データの関係を示す表である。
Next, an example will be described in which the motion compensation with 1/4 pixel accuracy is expanded to motion compensation with higher accuracy such as 1/8 pixel accuracy, and actually the operation with 1/4 pixel accuracy is performed.
FIG. 16 is a table showing the relationship between a conventional difference vector and assigned code data assigned to the difference vector when expanded to 1/8 pixel accuracy.

また図17は1/8画素精度に拡張した時の、従来の差分ベクトルと、その差分ベクトルに対応する本実施例の変換差分ベクトルと、その変換差分ベクトルへ割り当てる割当符号データの関係を示す表である。図18は1/8画素精度に拡張した時の、従来の差分ベクトルと、その差分ベクトルに対応する本実施例のベクトル精度情報と、そのベクトル精度情報へ割り当てる割当符号データを示す表である。   FIG. 17 is a table showing the relationship between the conventional difference vector, the conversion difference vector of this embodiment corresponding to the difference vector, and the assigned code data assigned to the conversion difference vector when expanded to 1/8 pixel accuracy. It is. FIG. 18 is a table showing a conventional difference vector when expanded to 1/8 pixel accuracy, vector accuracy information of this embodiment corresponding to the difference vector, and allocation code data assigned to the vector accuracy information.

図19は、上記のようにそれぞれ1/8画素精度に拡張して割り当てた割当符号データに対して実際の動き補償時の動きベクトルの出現確率を付与した例である。この例は1/4画素精度に動き補償精度を下げて運用する例なので、1/8、3/8、5/8、7/8の動きベクトルは実際には運用しないために出現確率は0%になっている。   FIG. 19 is an example in which the appearance probability of a motion vector at the time of actual motion compensation is assigned to the assigned code data allocated with 1/8 pixel accuracy expanded as described above. Since this example is an example in which the motion compensation accuracy is lowered to 1/4 pixel accuracy, the motion vectors of 1/8, 3/8, 5/8, and 7/8 are not actually used, so the appearance probability is 0. %It has become.

このような条件で実際の動き補償時の動きベクトルの符号量を、従来例と本実施例とで算出し比較してみる。
20本の動きベクトルが出現確率通りに出現した場合を仮定する。従って出現確率5%につき動きベクトルは1回出現することになる。
Under such conditions, the code amount of the motion vector at the time of actual motion compensation is calculated and compared between the conventional example and this embodiment.
Assume that 20 motion vectors appear according to the appearance probability. Therefore, the motion vector appears once per 5% appearance probability.

このとき、従来の方法で動きベクトルを符号データとする場合は、差分ベクトルの符号量は、
(1bit×8回) [差分ベクトル0時]
+(3bit×0回) [差分ベクトル1/8時]
+(3bit×2回) [差分ベクトル2/8時]
+(5bit×0回) [差分ベクトル3/8時]
+(5bit×1回) [差分ベクトル4/8時]
+(5bit×0回) [差分ベクトル5/8時]
+(5bit×1回) [差分ベクトル6/8時]
+(7bit×0回) [差分ベクトル7/8時]
+(7bit×8回) [差分ベクトル1時]
=80bit
また上記差分ベクトルを求めた周辺ブロックの位置情報の符号量は、
(1bit×8回) [差分ベクトル0時]
+(3bit×2回) [差分ベクトル2/8時]
+(3bit×1回) [差分ベクトル4/8時]
+(1bit×1回) [差分ベクトル6/8時]
+(3bit×5回) [差分ベクトル1時]
=33bit
合計113ビットが動きベクトルの符号量となる。
At this time, when a motion vector is used as code data by the conventional method, the code amount of the difference vector is
(1 bit x 8 times) [Difference vector 0]
+ (3bit x 0) [Difference vector 1/8]
+ (3bit x 2 times) [Difference vector 2/8]
+ (5bit x 0) [Difference vector 3/8]
+ (5bit x 1 time) [Difference vector 4/8]
+ (5bit x 0) [Difference vector 5/8]
+ (5bit x 1 time) [Difference vector 6/8]
+ (7bit x 0) [Difference vector 7/8]
+ (7bit x 8 times) [Difference vector 1 o'clock]
= 80bit
In addition, the code amount of the position information of the neighboring blocks from which the difference vector is obtained
(1 bit x 8 times) [Difference vector 0]
+ (3bit x 2 times) [Difference vector 2/8]
+ (3bit x 1 time) [Difference vector 4/8]
+ (1 bit x 1 time) [Difference vector 6/8 o'clock]
+ (3bit x 5 times) [Difference vector 1 o'clock]
= 33bit
A total of 113 bits is the code amount of the motion vector.

一方、本発明で動きベクトルを符号データとする場合は、変換差分ベクトルの符号量は、
(1bit×8回) [差分ベクトル0時]
+(3bit×0回) [差分ベクトル1/8時]
+(3bit×2回) [差分ベクトル2/8時]
+(3bit×0回) [差分ベクトル3/8時]
+(3bit×1回) [差分ベクトル4/8時]
+(3bit×0回) [差分ベクトル5/8時]
+(3bit×1回) [差分ベクトル6/8時]
+(3bit×0回) [差分ベクトル7/8時]
+(3bit×8回) [差分ベクトル1時]
=44bit
また、ベクトル精度情報の符号量は、
(5bit×0回) [差分ベクトル1/8時]
+(1bit×2回) [差分ベクトル2/8時]
+(5bit×0回) [差分ベクトル3/8時]
+(3bit×1回) [差分ベクトル4/8時]
+(5bit×0回) [差分ベクトル5/8時]
+(3bit×1回) [差分ベクトル6/4時]
+(5bit×0回) [差分ベクトル7/8時]
=8ビット
合計52ビットが動きベクトルの符号量となる
従って本実施例の方が従来例より61ビット少ない符号量で同等の精度の動き補償が可能となる。
On the other hand, when the motion vector is code data in the present invention, the code amount of the conversion difference vector is
(1 bit x 8 times) [Difference vector 0]
+ (3bit x 0) [Difference vector 1/8]
+ (3bit x 2 times) [Difference vector 2/8]
+ (3bit x 0) [Difference vector 3/8]
+ (3bit x 1 time) [Difference vector 4/8]
+ (3bit x 0) [Difference vector 5/8 o'clock]
+ (3bit x 1 time) [Difference vector 6/8]
+ (3bit x 0) [Difference vector 7/8]
+ (3 bits x 8 times) [Difference vector 1 o'clock]
= 44bit
Also, the code amount of the vector accuracy information is
(5bit x 0) [Difference vector 1/8]
+ (1bit x 2 times) [Difference vector 2/8]
+ (5bit x 0) [Difference vector 3/8]
+ (3bit x 1 time) [Difference vector 4/8]
+ (5bit x 0) [Difference vector 5/8]
+ (3bit x 1 time) [Difference vector 6/4]
+ (5bit x 0) [Difference vector 7/8]
= 8 bits A total of 52 bits is the code amount of the motion vector. Therefore, the present embodiment can perform motion compensation with the same accuracy with a code amount of 61 bits less than the conventional example.

また、図15の例で求めた符号量と比較すると、従来の場合は、はじめから1/4画素精度で動き補償を行った場合の符号量が95ビットであるのに対して、今回の場合は113ビットとなり、かなり動きベクトルの符号量が増加してしまう。   Compared with the code amount obtained in the example of FIG. 15, in the conventional case, the code amount when motion compensation is performed with 1/4 pixel accuracy from the beginning is 95 bits. Becomes 113 bits, and the code amount of the motion vector is considerably increased.

一方本実施例によれば、はじめから1/4画素精度で動き補償を行った場合の符号量が50ビットであるのに対して、今回の場合は52ビットであり、ほとんど符号量が増加しないで済んでいることがわかる。   On the other hand, according to the present embodiment, the code amount when motion compensation is performed with 1/4 pixel accuracy from the beginning is 50 bits, whereas in this case, the code amount is 52 bits, and the code amount hardly increases. You can see that

以下、上記で述べた動きベクトル符号量抑制手段を用いた、本発明の一実施例となる動画像符号化復号化装置の全体の動作を図面を参照しながら説明する。
本実施例の動画像符号化装置の動作について図2を用いて説明する。
[符号化装置]
本実施例の動画像符号化装置は、図1に示すとおり、画像メモリ101と、画像補間手段102と、動きベクトル検出手段103と、動き補償手段104と、直交変換手段105と、量子化手段106と、逆量子化手段107と、逆直交変換手段108と、動きベクトルメモリ109と、差分ベクトル算出手段110と、動きベクトル符号量抑制手段111と、エントロピー符号化手段112と、から構成されている。
The overall operation of the moving picture coding / decoding apparatus according to an embodiment of the present invention using the motion vector code amount suppression means described above will be described below with reference to the drawings.
The operation of the moving picture coding apparatus according to the present embodiment will be described with reference to FIG.
[Encoding device]
As shown in FIG. 1, the moving picture coding apparatus according to the present embodiment includes an image memory 101, an image interpolation unit 102, a motion vector detection unit 103, a motion compensation unit 104, an orthogonal transformation unit 105, and a quantization unit. 106, an inverse quantization unit 107, an inverse orthogonal transform unit 108, a motion vector memory 109, a difference vector calculation unit 110, a motion vector code amount suppression unit 111, and an entropy encoding unit 112. Yes.

画像メモリ101は、符号化対象画像の各ブロックを符号化し再度復号化した復号画像ブロックを、次の符号化対象画像の各ブロックの符号化に用いる為に所定数分(例えば1画面分)記憶する。   The image memory 101 stores a predetermined number (for example, one screen) of decoded image blocks obtained by encoding and re-decoding each block of the encoding target image for use in encoding each block of the next encoding target image. To do.

画像補間手段102は、前記複数の復号画像ブロックを結合して参照画像を生成し、更に前記参照画像の実際の画素間を所定数(本説明では3個)の補間画素で補間した参照補間画像を生成する。   The image interpolation unit 102 combines the plurality of decoded image blocks to generate a reference image, and further interpolates between the actual pixels of the reference image with a predetermined number (three in this description) of interpolation pixels. Is generated.

動きベクトル検出手段103は、画像補間手段102で生成した参照補間画像を用いて符号化対象画像ブロックの動きベクトル検出を行う。そして検出した動きベクトルを動き補償手段104と差分ベクトル算出手段110に供給し、動きベクトルメモリ109に記憶する。   The motion vector detection unit 103 detects a motion vector of the encoding target image block using the reference interpolation image generated by the image interpolation unit 102. The detected motion vector is supplied to the motion compensation unit 104 and the difference vector calculation unit 110 and stored in the motion vector memory 109.

動き補償手段104は、動きベクトル検出手段103で検出した動きベクトルと画像補間手段102で生成した参照補間画像とを用いて動き補償を行い、予測画像ブロックを生成する。   The motion compensation unit 104 performs motion compensation using the motion vector detected by the motion vector detection unit 103 and the reference interpolation image generated by the image interpolation unit 102 to generate a predicted image block.

直交変換手段105は、符号化対象画像ブロックと予測画像ブロックの差分信号を直交変換し、変換した直交変換信号を量子化手段106に供給する。
量子化手段106は、直交変換手段105で変換した差分信号を量子化し、量子化した量子化信号を逆量子化手段107とエントロピー符号化手段112に供給する。
The orthogonal transform unit 105 performs orthogonal transform on the difference signal between the encoding target image block and the predicted image block, and supplies the transformed orthogonal transform signal to the quantization unit 106.
The quantization means 106 quantizes the difference signal transformed by the orthogonal transformation means 105 and supplies the quantized quantized signal to the inverse quantization means 107 and the entropy coding means 112.

逆量子化手段107は、量子化手段106で量子化した量子化信号を逆量子化し、逆量子化した逆量子化信号を逆直交変換手段108に供給する。
逆直交変換手段108は、逆量子化手段107で逆量子化した逆量子化信号を逆直交変換し、逆直交変換信号を生成する。
The inverse quantization means 107 inversely quantizes the quantized signal quantized by the quantization means 106 and supplies the inversely quantized inverse quantized signal to the inverse orthogonal transform means 108.
The inverse orthogonal transform means 108 performs inverse orthogonal transform on the inversely quantized signal inversely quantized by the inverse quantization means 107 to generate an inverse orthogonal transform signal.

動きベクトルメモリ109は、動きベクトル検出手段103で検出した動きベクトルを所定数分(例えば4本)記憶する。
差分ベクトル算出手段110は、動きベクトルメモリ109に記憶してある符号化対象画像ブロックの周辺ブロックの動きベクトルから予測ベクトルを算出する。次に、この算出した予測ベクトルと動きベクトル検出手段103で検出した動きベクトルとの差分(以下差分ベクトルと呼ぶ)を算出する。そして、算出した差分ベクトルを動きベクトル符号量抑制手段111に供給する。
The motion vector memory 109 stores a predetermined number (for example, four) of motion vectors detected by the motion vector detecting means 103.
The difference vector calculation unit 110 calculates a prediction vector from the motion vectors of the peripheral blocks of the encoding target image block stored in the motion vector memory 109. Next, a difference (hereinafter referred to as a difference vector) between the calculated prediction vector and the motion vector detected by the motion vector detection unit 103 is calculated. Then, the calculated difference vector is supplied to the motion vector code amount suppression unit 111.

前記予測ベクトルの算出方法としては、例えば図8のMV1〜MV3の各動きベクトルの中央値(メジアン)をとる方法がある。メジアンは、例えばMV1が(−3,1)、MV2が(−2,5)、MV3が(2,4)の場合(−2,4)となる。予測ベクトルの算出方法は上記方法に限らず、周辺の各ブロックの動きベクトルの代表値を算出する方法であればどのような方法でもよい。   As a method of calculating the prediction vector, for example, there is a method of taking the median value (median) of each motion vector of MV1 to MV3 in FIG. For example, the median is (−2, 4) when MV1 is (−3,1), MV2 is (−2,5), and MV3 is (2,4). The calculation method of the prediction vector is not limited to the above method, and any method may be used as long as it is a method for calculating the representative value of the motion vector of each of the surrounding blocks.

動きベクトル符号量抑制手段111の動作は、発明を実施するための最良の形態項で説明したとおりであるが再度簡単説明する。
差分ベクトル算出手段110で算出した差分ベクトルの値が整数画素精度の場合は、その差分ベクトル値を所定偶数(本説明では2)で乗算して偶数値に変換する。そして更に変換した偶数値(整数精度の変換差分ベクトル)を図12の割当表に従って所定の割当符号データに変換し、エンロピー符号化手段112に供給する。
The operation of the motion vector code amount suppression means 111 is as described in the best mode for carrying out the invention, but will be briefly described again.
If the value of the difference vector calculated by the difference vector calculation means 110 is integer pixel precision, the difference vector value is multiplied by a predetermined even number (2 in this description) to be converted into an even value. Further, the converted even value (integer precision conversion difference vector) is converted into predetermined allocation code data according to the allocation table of FIG. 12 and supplied to the entropy encoding means 112.

また差分ベクトルの値が分数画素精度の場合は、その差分ベクトル値の整数部分を所定偶数(本説明では2)で乗算し更に所定奇数値(本説明では1)を加えた奇数値に変換すると共に、小数点以下の分数部分の値を、差分ベクトルとは別にベクトル精度情報として生成する。そして、変換した奇数値(分数精度の変換差分ベクトル)を図12の割当表に従って所定の割当符号データに変換し、エンロピー符号化手段112に供給する。またベクトル精度情報は図13の割当表に従って所定の割当符号データに変換し、エンロピー符号化手段112に供給する。   If the value of the difference vector is fractional pixel precision, the integer part of the difference vector value is multiplied by a predetermined even number (2 in this description) and further converted to an odd value obtained by adding a predetermined odd value (1 in this description). At the same time, the fractional value after the decimal point is generated as vector accuracy information separately from the difference vector. Then, the converted odd value (conversion difference vector with fractional precision) is converted into predetermined allocation code data according to the allocation table of FIG. 12 and supplied to the entropy encoding means 112. Further, the vector accuracy information is converted into predetermined allocation code data according to the allocation table of FIG.

本説明では、整数画素精度の差分ベクトルを偶数値に、分数画素精度の差分ベクトルの整数部分を奇数値に変換したが、もちろん整数画素精度の差分ベクトルを奇数値に、分数画素精度の差分ベクトルの整数部分を偶数値に変換しても良い。   In this description, the integer pixel precision difference vector is converted to an even value, and the integer part of the fraction pixel precision difference vector is converted to an odd value. The integer part of may be converted to an even value.

エントロピー符号化手段112は、量子化手段106で量子化した量子化信号と、動きベクトル符号量抑制手段111で生成した各割当符号データとを多重化してエントロピー符号化し、生成した符号列データを外部に出力する。   The entropy encoding unit 112 multiplexes the quantized signal quantized by the quantizing unit 106 and each assigned code data generated by the motion vector code amount suppression unit 111 to perform entropy encoding, and generates the generated code string data externally. Output to.

ここで、動きベクトル符号量抑制手段111の動作について再度図9のフローチャートを用いて説明する。図9は、動きベクトル符号量抑制手段111のフローチャートである。まず、差分ベクトル算出手段110で算出された差分ベクトルの画素精度が、分数精度かどうか判定し(S11)、分数精度ではなく整数精度の場合は、差分ベクトルを偶数値に変換して送信する(S12)。分数精度の場合は、差分ベクトルを奇数値に変換して送信する(S13)。また、分数精度の場合は、差分ベクトルとは別にベクトル精度情報を送信する(S14)。   Here, the operation of the motion vector code amount suppression means 111 will be described again using the flowchart of FIG. FIG. 9 is a flowchart of the motion vector code amount suppression unit 111. First, it is determined whether or not the pixel accuracy of the difference vector calculated by the difference vector calculation means 110 is fractional accuracy (S11). If the accuracy is integer accuracy instead of fractional accuracy, the difference vector is converted to an even value and transmitted ( S12). In the case of fractional accuracy, the difference vector is converted into an odd value and transmitted (S13). In the case of fractional accuracy, vector accuracy information is transmitted separately from the difference vector (S14).

以上の処理で符号化が行われる。
[復号化装置]
次に、本実施例の動画像復号化装置の動作について図2を用いて説明する。
Encoding is performed by the above processing.
[Decryption device]
Next, the operation of the moving picture decoding apparatus according to the present embodiment will be described with reference to FIG.

本実施例の動画像復号化装置は、図2に示すとおり、エントロピー復号化手段201と、画像メモリ202と、画像補間手段203と、差分ベクトル算出手段204と、動きベクトル算出手段205と、動きベクトルメモリ206と、動き補償手段207と、逆量子化手段208と、逆直交変換手段209と、から構成されている。   As shown in FIG. 2, the moving picture decoding apparatus according to the present embodiment includes an entropy decoding unit 201, an image memory 202, an image interpolation unit 203, a difference vector calculation unit 204, a motion vector calculation unit 205, a motion The vector memory 206, motion compensation means 207, inverse quantization means 208, and inverse orthogonal transform means 209 are configured.

エントロピー復号化手段201は、入力した符号列データをエントロピー復号化する。そして、復号化して得られた各割当符号データを差分ベクトル算出手段204に供給すると共に、復号化した量子化信号を逆量子化手段208に供給する。   The entropy decoding unit 201 performs entropy decoding on the input code string data. Then, each allocation code data obtained by decoding is supplied to the difference vector calculation means 204 and the decoded quantized signal is supplied to the inverse quantization means 208.

逆量子化手段208は、エントロピー復号化手段201で復号化した量子化信号を逆量子化して直交変換信号を生成し、逆直交変換手段209に供給する。
逆直交変換手段209は、逆量子化手段208で逆量子化した直交変換信号を逆直交変換し、逆直交変換信号を生成する。
The inverse quantization unit 208 dequantizes the quantized signal decoded by the entropy decoding unit 201 to generate an orthogonal transform signal, and supplies the orthogonal transform signal to the inverse orthogonal transform unit 209.
The inverse orthogonal transform unit 209 performs inverse orthogonal transform on the orthogonal transform signal inversely quantized by the inverse quantization unit 208 to generate an inverse orthogonal transform signal.

差分ベクトル算出手段204は、エントロピー復号化手段201で復号化した
各割当符号データを、図12及び図13の割当表に従って変換差分ベクトルとベクトル精度情報とを生成する。
The difference vector calculation means 204 generates a conversion difference vector and vector accuracy information for each assigned code data decoded by the entropy decoding means 201 in accordance with the assignment tables shown in FIGS.

生成した変換差分ベクトルが偶数値(整数画素精度の変換差分ベクトル)の場合は、所定整数値(本説明では2)で除算して差分ベクトルを算出する。
生成した変換差分ベクトルが奇数値(分数画素精度の変換差分ベクトル)の場合は、1を減算した後に所定整数値(本説明では2)で除算して差分ベクトルの整数部分を算出し、更に動きベクトル精度情報を加算して、差分ベクトルを算出する。
If the generated conversion difference vector is an even value (conversion difference vector with integer pixel accuracy), the difference vector is calculated by dividing by a predetermined integer value (2 in this description).
When the generated conversion difference vector is an odd value (conversion difference vector with fractional pixel precision), 1 is subtracted and then divided by a predetermined integer value (2 in this description) to calculate the integer part of the difference vector, and further the motion The vector accuracy information is added to calculate a difference vector.

例えば、変換差分ベクトルが3でベクトル精度情報が1/4の場合、差分ベクトルは1と1/4(または5/4)となる。また、変換差分ベクトルが6の場合、差分ベクトルは3となる
本説明では、整数画素精度の差分ベクトルを偶数値に、分数画素精度の差分ベクトルの整数部分を奇数値に変換している例であるが、もちろん整数画素精度の差分ベクトルを奇数値に、分数画素精度の差分ベクトルの整数部分を偶数値に変換していても同様の処理で実現できる。
For example, when the conversion difference vector is 3 and the vector accuracy information is 1/4, the difference vector is 1 and 1/4 (or 5/4). In addition, when the conversion difference vector is 6, the difference vector is 3. In this description, the integer vector precision difference vector is converted to an even value, and the fractional pixel precision difference vector is converted to an odd value. Of course, the same processing can be realized even if the difference vector of integer pixel accuracy is converted to an odd value and the integer part of the difference vector of fractional pixel accuracy is converted to an even value.

動きベクトル算出手段205は、動きベクトルメモリ206に記憶している復号化対象画像ブロックの周辺ブロックの動きベクトルの中央値(メジアン)を算出する。この中央値が復号化対象画像ブロックの予測ベクトルとなる。そして、差分ベクトル算出手段204で算出した差分ベクトルを、予測ベクトルに加算することで動きベクトルを算出する。算出した動きベクトルを、動きベクトルメモリ206と動き補償手段207に供給する。   The motion vector calculation means 205 calculates the median (median) of the motion vectors of the peripheral blocks of the decoding target image block stored in the motion vector memory 206. This median value becomes the prediction vector of the decoding target image block. Then, the motion vector is calculated by adding the difference vector calculated by the difference vector calculating means 204 to the prediction vector. The calculated motion vector is supplied to the motion vector memory 206 and motion compensation means 207.

動きベクトルメモリ206は、動きベクトル算出手段205で算出した動きベクトルを所定ブロック数分記憶する。
動き補償手段207は、動きベクトル算出手段205で算出した復号化対象画像ブロックの動きベクトルと、画像補間手段203で生成した参照補間画像とを用いて動き補償を行い、予測画像ブロックを生成する。
The motion vector memory 206 stores the motion vectors calculated by the motion vector calculation means 205 for a predetermined number of blocks.
The motion compensation unit 207 performs motion compensation using the motion vector of the decoding target image block calculated by the motion vector calculation unit 205 and the reference interpolation image generated by the image interpolation unit 203 to generate a predicted image block.

画像メモリ202は、既に復号が終了した所定数の復号画像ブロックを、次の復号対象画像の各ブロックの復号化に用いる為に記憶する。
画像補間手段203は、前記複数の復号画像ブロックを結合して参照画像を生成し、更に前記参照画像の実際の画素間を所定数(本説明では3個)の補間画素で補間した参照補間画像を生成する。
The image memory 202 stores a predetermined number of decoded image blocks that have already been decoded for use in decoding each block of the next decoding target image.
The image interpolation means 203 combines the plurality of decoded image blocks to generate a reference image, and further interpolates between the actual pixels of the reference image with a predetermined number (three in this description) of interpolation pixels. Is generated.

逆直交変換手段209で生成した逆直交変換信号と動き補償手段207で生成した予測画像ブロックとを加算して復号画像ブロックを生成し、前記画像メモリ202に供給すると共に、復号画像ブロックを画像信号として外部に出力する。   The inverse orthogonal transform signal generated by the inverse orthogonal transform unit 209 and the predicted image block generated by the motion compensation unit 207 are added to generate a decoded image block, which is supplied to the image memory 202 and the decoded image block is converted into an image signal. Output to the outside.

以上の処理で復号化が行われる。
このように本実施例の動画像符号化復号化装置によれば、従来と比較して大幅に動きベクトルの符号量の増加を抑制することが可能となる。
Decoding is performed by the above processing.
As described above, according to the moving picture coding / decoding apparatus of the present embodiment, it is possible to significantly suppress an increase in the amount of motion vector codes as compared with the conventional art.

またベクトル精度情報の偏りを考慮して、出現確率の高いベクトル精度情報に短いビット長の符号を割り当てることにより、動きベクトルの符号量の増加を更に抑制することが可能となる。   In addition, in consideration of the bias of the vector accuracy information, it is possible to further suppress the increase in the code amount of the motion vector by assigning a short bit length code to the vector accuracy information having a high appearance probability.

更に、動き補償の精度を高く設定しておいたまま低い精度の動き補償を行った場合に、動きベクトルの符号量を、はじめから動き補償精度を低く設定した場合と同等の低い量に押さえることが可能となる。   In addition, when motion compensation with low accuracy is performed with high motion compensation accuracy, the amount of motion vector code is reduced to the same low amount as when motion compensation accuracy is initially set low. Is possible.

さらにまた、本発明は上記した動画像符号化装置の機能をコンピュータに実現させるためのプログラムも含むものである。これらのプログラムは、記録媒体から読み取られてコンピュータに取り込まれてもよいし、通信ネットワークを介して伝送されてコンピュータに取り込まれてもよい。

Furthermore, the present invention includes a program for causing a computer to realize the functions of the above-described moving picture coding apparatus. These programs may be read from a recording medium and loaded into a computer, or may be transmitted via a communication network and loaded into a computer.

本発明の動画像符号化装置の一実施の形態のブロック図である。It is a block diagram of one embodiment of a moving picture coding apparatus of the present invention. 本発明の動画像復号化装置の一実施の形態のブロック図である。It is a block diagram of one embodiment of a moving picture decoding apparatus of the present invention. 従来の動画像符号化装置のブロック図である。It is a block diagram of the conventional moving image encoder. 従来の動画像復号化装置のブロック図である。It is a block diagram of the conventional moving image decoding apparatus. 1/2画素精度補間画素の様子を示した図である。It is the figure which showed the mode of the 1/2 pixel precision interpolation pixel. 1/4画素精度補間画素の様子を示した図である。It is the figure which showed the mode of the 1/4 pixel precision interpolation pixel. 従来の差分ベクトル算出手段310のフローチャートである。It is a flowchart of the conventional difference vector calculation means 310. 従来の予測ベクトル選択の様子を示した図である。It is the figure which showed the mode of the conventional prediction vector selection. 動きベクトル符号量抑制手段111のフローチャートである。It is a flowchart of the motion vector code amount suppression means 111. 従来の1/4画素精度の場合の差分ベクトルへの割り当て符号を示した表である。It is the table | surface which showed the assignment code to the difference vector in the case of the conventional 1/4 pixel precision. 従来の周辺ブロック位置情報への割り当て符号を示した表である。It is the table | surface which showed the assignment code to the conventional surrounding block position information. 本実施例の1/4画素精度の場合の変換差分ベクトルへの割り当て符号の例を示す表である。It is a table | surface which shows the example of the allocation code | symbol to the conversion difference vector in the case of 1/4 pixel precision of a present Example. 本実施例の1/4画素精度の場合のベクトル精度情報への割り当て符号の例を示す表である。It is a table | surface which shows the example of the allocation code | symbol to the vector accuracy information in the case of 1/4 pixel accuracy of a present Example. 1/4画素精度の場合の従来と本実施例とで、動きベクトルの出現確率と出現回数の第一の具体例を示した表である。6 is a table showing a first specific example of the appearance probability and the number of appearances of a motion vector in the conventional case and the present embodiment in the case of ¼ pixel accuracy. 1/4画素精度の場合の従来と本実施例とで、動きベクトルの出現確率と出現回数の第二の具体例を示した表である。It is the table | surface which showed the 2nd specific example of the appearance probability of a motion vector, and the frequency | count of appearance with the past in the case of 1/4 pixel precision, and a present Example. 従来の1/8画素精度の場合の差分ベクトルへの割り当て符号を示した表である。It is the table | surface which showed the assignment code to the difference vector in the case of the conventional 1/8 pixel precision. 本実施例の1/8画素精度の場合の変換差分ベクトルへの割り当て符号の例を示す表である。It is a table | surface which shows the example of the allocation code | symbol to the conversion difference vector in the case of 1/8 pixel precision of a present Example. 本実施例の1/8画素精度の場合のベクトル精度情報への割り当て符号の例を示す表である。It is a table | surface which shows the example of the allocation code | symbol to the vector precision information in the case of 1/8 pixel precision of a present Example. 1/8画素精度の場合の従来と本実施例とで、動きベクトルの出現確率と出現回数の具体例を示した表である。5 is a table showing a specific example of the appearance probability and the number of appearances of a motion vector in the conventional case and the present embodiment in the case of 1/8 pixel accuracy.

符号の説明Explanation of symbols

101 画像メモリ
102 画像補間手段
103 動きベクトル検出手段
104 動き補償手段
105 直交変換手段
106 量子化手段
107 逆量子化手段
108 逆直交変換手段
109 動きベクトルメモリ
110 差分ベクトル算出手段
111 動きベクトル符号量抑制手段
112 エントロピー符号化手段
201 エントロピー復号化手段
202 画像メモリ
203 画像補間手段
204 動きベクトルメモリ
205 動きベクトル算出手段
206 動き補償手段
207 逆量子化手段
208 逆直交変換手段


DESCRIPTION OF SYMBOLS 101 Image memory 102 Image interpolation means 103 Motion vector detection means 104 Motion compensation means 105 Orthogonal transformation means 106 Quantization means 107 Inverse quantization means 108 Inverse orthogonal transformation means 109 Motion vector memory 110 Difference vector calculation means 111 Motion vector code amount suppression means DESCRIPTION OF SYMBOLS 112 Entropy encoding means 201 Entropy decoding means 202 Image memory 203 Image interpolation means 204 Motion vector memory 205 Motion vector calculation means 206 Motion compensation means 207 Inverse quantization means 208 Inverse orthogonal transform means


Claims (2)

符号化対象画像を複数の画素の2次元配列からなる符号化対象画像ブロックに分割し、前記符号化対象画像ブロック単位で順次、動き補償予測符号化、直交変換符号化、量子化、エントロピー符号化を行い、かつ前記動き補償予測符号化を行う際に参照する画像として、既に符号化が完了した画像を再度復号化した画像の画素間に補間画素を挿入した参照補間画像を用いる動画像符号化装置において、
前記符号化対象画像ブロックにそれぞれ隣接する既に符号化が完了している複数の画像ブロックの動きベクトルから前記符号化対象画像ブロックの予測ベクトルを算出し、算出した前記予測ベクトルと実際に符号化を行って得られた前記符号化対象画像ブロックの動きベクトルとの差分である差分ベクトルを算出する、差分ベクトル算出手段と、
前記差分ベクトル算出手段にて算出した差分ベクトルが、前記参照補間画像の実際の画素の位置を指し示す整数画素精度の差分ベクトルの場合は、前記整数の値に応じた偶数または奇数のうちいずれか一方の種類の第一の変換差分ベクトルを生成し、生成した前記第一の変換差分ベクトルに応じて第一の符号データを生成し、前記差分ベクトル算出手段にて算出した差分ベクトルが、前記参照補間画像の補間画素の位置を指し示す分数画素精度の差分ベクトルの場合は、前記分数画素精度の差分ベクトルの分子を分母で除算して得られる整数の値に応じた前記第一の変換差分ベクトルで採用した奇数または偶数と異なる他方の種類の第二の変換差分ベクトルを生成し、生成した前記第二の変換差分ベクトルに応じて第二の符号データを生成し、前記分数画素精度の差分ベクトルの分子を分母で除算して得られる剰余値をベクトル精度情報とし、前記ベクトル精度情報に応じた第三の符号データを生成する動きベクトル符号量抑制手段と、
前記動きベクトル符号量抑制手段にて生成した前記第一の符号データ及び前記第二の符号データ及び前記第三の符号データと、符号化対象画像を符号化した符号化データを用いて前記エントロピー符号化を行い符号列データを生成すると共に、前記符号列データを外部へ出力するエントロピー符号化手段と、
を有することを特徴とする動画像符号化装置。
An encoding target image is divided into encoding target image blocks each including a two-dimensional array of a plurality of pixels, and motion compensation prediction encoding, orthogonal transform encoding, quantization, and entropy encoding are sequentially performed in units of the encoding target image blocks. And using a reference interpolated image in which interpolated pixels are inserted between pixels of an image obtained by re-decoding an image that has already been encoded as an image to be referred to when performing the motion compensation predictive encoding In the device
The prediction vector of the encoding target image block is calculated from the motion vectors of the plurality of image blocks that have already been encoded adjacent to the encoding target image block, respectively, and the calculated prediction vector and the actual encoding are encoded. A difference vector calculation means for calculating a difference vector that is a difference from a motion vector of the encoding target image block obtained by performing;
If the difference vector calculated by the difference vector calculating means is an integer pixel precision difference vector indicating the actual pixel position of the reference interpolated image, either an even number or an odd number according to the integer value The first conversion difference vector of the type is generated, first code data is generated according to the generated first conversion difference vector, and the difference vector calculated by the difference vector calculation means is the reference interpolation In the case of a differential vector with fractional pixel precision indicating the position of an interpolated pixel in the image, the first converted differential vector according to an integer value obtained by dividing the numerator of the differential vector precision with fractional pixel by the denominator is used. Generate the second conversion difference vector of the other type different from the odd or even number, and generate the second code data according to the generated second conversion difference vector A motion vector code amount control means for said remainder value obtained molecules difference vector fractional pixel precision by dividing the denominator and vector accuracy information, to generate a third code data corresponding to the vector accuracy information,
The entropy code using the first code data, the second code data, and the third code data generated by the motion vector code amount suppression unit and the encoded data obtained by encoding the encoding target image Entropy encoding means for generating code string data and outputting the code string data to the outside;
A moving picture encoding apparatus comprising:
前記動画像符号化装置にて生成された符号列データを入力として、エントロピー復号化、逆量子化、逆直交変換復号化、動き補償予測復号化を行い、前記符号化対象画像を復号する動画像復号化装置において、
前記符号列データを入力として前記エントロピー復号化を行い、前記符号化対象画像の符号化データと、前記第一の符号データと、前記第二の符号データと、前記第三の符号データと、を生成する、エントロピー復号化手段と、
前記エントロピー復号化手段により生成した前記第一の符号データに応じた前記第一の変換差分ベクトルを生成し、生成した前記第一の変換差分ベクトルに応じて整数画素精度の差分ベクトルを算出し、前記エントロピー復号化手段により生成した前記第二の符号データに応じた前記第二の変換差分ベクトルを生成し、生成した前記第二の変換差分ベクトルに応じた分数画素精度の差分ベクトルの整数値を算出し、前記エントロピー復号化手段により生成した前記第三の符号データに応じた前記ベクトル精度情報を生成し、算出した前記分数画素精度の差分ベクトルの整数値と前記ベクトル精度情報とを加算して分数画素精度の差分ベクトルを算出する、差分ベクトル算出手段と、
今回の復号化の対象となる画像ブロックにそれぞれ隣接する既に復号化が完了している複数の画像ブロックの動きベクトルから前記復号化対象画像ブロックの予測ベクトルを算出し、算出した前記予測ベクトルと前記差分ベクトル算出手段にて算出した、前記整数画素精度の差分ベクトルまたは前記分数画素精度の差分ベクトルとを加算して、前記復号化対象画像ブロックの復号化に実際に使用する動きベクトルを生成する、動きベクトル算出手段と、
を有することを特徴とする動画像復号化装置。


A moving image for decoding the encoding target image by performing entropy decoding, inverse quantization, inverse orthogonal transform decoding, motion compensation predictive decoding, using code string data generated by the moving image encoding device as an input In the decryption device,
The entropy decoding is performed with the code string data as input, the encoded data of the encoding target image, the first code data, the second code data, and the third code data. Generating entropy decoding means;
Generating the first conversion difference vector according to the first code data generated by the entropy decoding means, calculating an integer pixel precision difference vector according to the generated first conversion difference vector; The second conversion difference vector corresponding to the second code data generated by the entropy decoding means is generated, and an integer value of the difference vector with fractional pixel accuracy corresponding to the generated second conversion difference vector is obtained. Calculating, generating the vector accuracy information according to the third code data generated by the entropy decoding means, and adding the calculated integer value of the difference vector of the fractional pixel accuracy and the vector accuracy information A difference vector calculating means for calculating a difference vector with fractional pixel accuracy;
The prediction vector of the decoding target image block is calculated from the motion vectors of a plurality of image blocks that have already been decoded and are adjacent to the image block to be decoded this time, and the calculated prediction vector and the calculated vector The motion vector actually used for decoding the decoding target image block is generated by adding the difference vector of integer pixel accuracy or the difference vector of fractional pixel accuracy calculated by the difference vector calculation means, A motion vector calculating means;
A moving picture decoding apparatus comprising:


JP2004345704A 2004-11-30 2004-11-30 Moving picture encoding apparatus and moving picture decoding apparatus Expired - Fee Related JP4241588B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004345704A JP4241588B2 (en) 2004-11-30 2004-11-30 Moving picture encoding apparatus and moving picture decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004345704A JP4241588B2 (en) 2004-11-30 2004-11-30 Moving picture encoding apparatus and moving picture decoding apparatus

Publications (2)

Publication Number Publication Date
JP2006157531A true JP2006157531A (en) 2006-06-15
JP4241588B2 JP4241588B2 (en) 2009-03-18

Family

ID=36635265

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004345704A Expired - Fee Related JP4241588B2 (en) 2004-11-30 2004-11-30 Moving picture encoding apparatus and moving picture decoding apparatus

Country Status (1)

Country Link
JP (1) JP4241588B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015105662A1 (en) * 2014-01-08 2015-07-16 Microsoft Technology Licensing, Llc Selection of motion vector precision
TWI504241B (en) * 2011-06-27 2015-10-11 Nippon Telegraph & Telephone Video encoding method and apparatus, video decoding method and apparatus, and programs product thereof
JP2017135730A (en) * 2007-10-16 2017-08-03 エルジー エレクトロニクス インコーポレイティド Method and apparatus for processing video signal
US9774881B2 (en) 2014-01-08 2017-09-26 Microsoft Technology Licensing, Llc Representing motion vectors in an encoded bitstream
US9942560B2 (en) 2014-01-08 2018-04-10 Microsoft Technology Licensing, Llc Encoding screen capture data
CN110944210A (en) * 2012-05-14 2020-03-31 卢卡·罗萨托 Motion compensation and motion estimation using continuous coordinate system
CN113068049A (en) * 2021-03-16 2021-07-02 上海富瀚微电子股份有限公司 Fractional pixel motion estimation apparatus

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10306259B2 (en) 2007-10-16 2019-05-28 Lg Electronics Inc. Method and an apparatus for processing a video signal
JP2017135730A (en) * 2007-10-16 2017-08-03 エルジー エレクトロニクス インコーポレイティド Method and apparatus for processing video signal
US10820013B2 (en) 2007-10-16 2020-10-27 Lg Electronics Inc. Method and an apparatus for processing a video signal
TWI504241B (en) * 2011-06-27 2015-10-11 Nippon Telegraph & Telephone Video encoding method and apparatus, video decoding method and apparatus, and programs product thereof
US9667963B2 (en) 2011-06-27 2017-05-30 Nippon Telegraph And Telephone Corporation Method and apparatus for encoding video, method and apparatus for decoding video, and programs therefor
CN110944210B (en) * 2012-05-14 2022-03-01 卢卡·罗萨托 Motion compensation and motion estimation system using continuous coordinate system
CN110944210A (en) * 2012-05-14 2020-03-31 卢卡·罗萨托 Motion compensation and motion estimation using continuous coordinate system
RU2679979C1 (en) * 2014-01-08 2019-02-14 МАЙКРОСОФТ ТЕКНОЛОДЖИ ЛАЙСЕНСИНГ, ЭлЭлСи Representing motion vectors in encoded bitstream
US9942560B2 (en) 2014-01-08 2018-04-10 Microsoft Technology Licensing, Llc Encoding screen capture data
AU2014376190B2 (en) * 2014-01-08 2018-12-20 Microsoft Technology Licensing, Llc Selection of motion vector precision
WO2015105662A1 (en) * 2014-01-08 2015-07-16 Microsoft Technology Licensing, Llc Selection of motion vector precision
RU2682859C1 (en) * 2014-01-08 2019-03-21 МАЙКРОСОФТ ТЕКНОЛОДЖИ ЛАЙСЕНСИНГ, ЭлЭлСи Selection of motion vector precision
US9900603B2 (en) 2014-01-08 2018-02-20 Microsoft Technology Licensing, Llc Selection of motion vector precision
US10313680B2 (en) 2014-01-08 2019-06-04 Microsoft Technology Licensing, Llc Selection of motion vector precision
CN105900420B (en) * 2014-01-08 2019-06-11 微软技术许可有限责任公司 Select motion vector accuracy
US10587891B2 (en) 2014-01-08 2020-03-10 Microsoft Technology Licensing, Llc Representing motion vectors in an encoded bitstream
US9774881B2 (en) 2014-01-08 2017-09-26 Microsoft Technology Licensing, Llc Representing motion vectors in an encoded bitstream
US9749642B2 (en) 2014-01-08 2017-08-29 Microsoft Technology Licensing, Llc Selection of motion vector precision
CN105900420A (en) * 2014-01-08 2016-08-24 微软技术许可有限责任公司 Selection of motion vector precision
CN113068049A (en) * 2021-03-16 2021-07-02 上海富瀚微电子股份有限公司 Fractional pixel motion estimation apparatus

Also Published As

Publication number Publication date
JP4241588B2 (en) 2009-03-18

Similar Documents

Publication Publication Date Title
US11070802B2 (en) Moving image coding device, moving image decoding device, moving image coding/decoding system, moving image coding method and moving image decoding method
RU2612613C2 (en) Method and apparatus for performing interpolation based on transform and inverse transform
JP5302010B2 (en) Re-sampling and image resizing algorithm for multi-resolution video encoding and decoding
JP5144545B2 (en) Moving picture codec apparatus and method
JP5073004B2 (en) Image coding apparatus, image coding method, image decoding apparatus, and image decoding method
JP4993676B2 (en) Image coding apparatus and image coding method
CN111201795B (en) Memory access window and padding for motion vector modification
KR102238058B1 (en) Encoder, decoder and method
JP2011029863A (en) Decoding processing method
JP2005318297A (en) Method and device for encoding/decoding dynamic image
KR101444691B1 (en) Reference Frame Composing and Indexing Apparatus and Method
JP4241588B2 (en) Moving picture encoding apparatus and moving picture decoding apparatus
JP6280679B2 (en) Frame thinning device, frame interpolation device, video encoding device, video decoding device, and programs thereof
JP2008011431A (en) Image coding apparatus
WO2011121716A1 (en) Moving image encoding method, decoding method, encoder apparatus and decoder apparatus
JP6875566B2 (en) Moving image prediction coding device, moving image prediction decoding device, moving image prediction coding method, moving image prediction decoding method and moving image prediction decoding program
JP4415651B2 (en) Image encoding apparatus and image decoding apparatus
JP5281597B2 (en) Motion vector prediction method, motion vector prediction apparatus, and motion vector prediction program
JP6004852B2 (en) Method and apparatus for encoding and reconstructing pixel blocks
JP6499334B2 (en) Bidirectional motion vector prediction apparatus, video encoding apparatus, video decoding apparatus, and programs thereof
JP2013017128A (en) Intra-prediction mode estimation device, image encoder, image decoder and program
JP2012120108A (en) Interpolation image generating apparatus and program, and moving image decoding device and program
JP6487002B2 (en) Decryption method and decryption apparatus
JP5404857B2 (en) Image coding apparatus, image coding method, image decoding apparatus, and image decoding method
JP6071618B2 (en) Image processing apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080916

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081017

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081114

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081222

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees