JP2007049743A - Dynamic image encoding method and apparatus, and decoding method and apparatus - Google Patents

Dynamic image encoding method and apparatus, and decoding method and apparatus Download PDF

Info

Publication number
JP2007049743A
JP2007049743A JP2006282003A JP2006282003A JP2007049743A JP 2007049743 A JP2007049743 A JP 2007049743A JP 2006282003 A JP2006282003 A JP 2006282003A JP 2006282003 A JP2006282003 A JP 2006282003A JP 2007049743 A JP2007049743 A JP 2007049743A
Authority
JP
Japan
Prior art keywords
prediction
frame
macroblock
motion vector
encoded
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.)
Abandoned
Application number
JP2006282003A
Other languages
Japanese (ja)
Inventor
Shinichiro Koto
晋一郎 古藤
Takeshi Nakajo
健 中條
Yoshihiro Kikuchi
義浩 菊池
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2006282003A priority Critical patent/JP2007049743A/en
Publication of JP2007049743A publication Critical patent/JP2007049743A/en
Abandoned legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To lessen an increase in an operation quantity or overhead of encoded data for a fading image, and remarkably improve prediction efficiency. <P>SOLUTION: Moving compensation prediction inter-frame encoding is performed for encoding target macroblocks of a dynamic image by using at least one reference frame and using a moving vector between the encoding target macroblock and the reference frame. In this case, the moving compensation prediction inter-frame encoding is performed by switching, for each encoding target macroblock, a first prediction mode using at least one encoded frame of past in time as a reference frame, a second prediction mode using a encoded frame of future in time as a reference frame, a third prediction mode using a linear sum of the encoded frames of past and future in time as a reference frame, and a fourth prediction mode using a linear sum of the plurality of encoded frames of past in time as a reference frame. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、動き補償予測フレーム間符号化を用いた動画像符号化方法及び装置並びに動画像復号化方法及び装置に関する。   The present invention relates to a moving picture coding method and apparatus using motion compensated prediction interframe coding, and a moving picture decoding method and apparatus.

動画像の圧縮符号化技術として、MPEG1(ISO/IEC11172-2),MPEG2(ISO/IEC13818-2),MPEG4(ISO/IEC14496-2)などが広く実用化されている。これらの動画像符号化方式では、フレーム内符号化(イントラ符号化)、前方予測フレーム間符号化及び両方向予測フレーム間符号化の組み合わせによる符号化が行われ、これらの符号化モードで符号化されるフレームはそれぞれIピクチャ、Pピクチャ及びBピクチャと呼ばれる。Pピクチャは直前のPまたはIピクチャを参照フレームとして符号化され、Bピクチャは直前及び直後のPまたはIピクチャを参照フレームとして符号化される。前方予測フレーム間符号化及び両方向予測フレーム間符号化は、動き補償予測フレーム間符号化と呼ばれる。   MPEG1 (ISO / IEC11172-2), MPEG2 (ISO / IEC13818-2), MPEG4 (ISO / IEC14496-2), and the like have been widely put into practical use as moving image compression coding techniques. In these moving image encoding systems, encoding is performed by a combination of intra-frame encoding (intra encoding), forward prediction inter-frame encoding, and bidirectional prediction inter-frame encoding, and encoding is performed in these encoding modes. Each frame is called an I picture, a P picture, and a B picture. The P picture is encoded using the immediately preceding P or I picture as a reference frame, and the B picture is encoded using the immediately preceding and immediately following P or I picture as a reference frame. Forward prediction interframe coding and bidirectional prediction interframe coding are called motion compensated prediction interframe coding.

MPEG方式の動画像符号化においては、一つまたは複数の動画像フレームからマクロブロック毎に選択的に予測画像を生成することが可能である。Pピクチャでは、通常は一つの参照フレームからマクロブロック単位に予測画像を生成する。Bピクチャでは、前方または後方の参照フレームの何れか一方から予測画像を生成する場合と、前方及び後方の参照フレームからそれぞれ参照マクロブロックを抽出し、それらの参照ブロックの平均値から予測画像を生成する場合とがある。これらの予測モードの情報は、マクロブロック毎に符号化データに埋め込まれる。   In MPEG video encoding, a predicted image can be selectively generated for each macroblock from one or a plurality of video frames. In the P picture, normally, a predicted image is generated in units of macroblocks from one reference frame. In B picture, when predictive image is generated from either forward or backward reference frame, reference macroblock is extracted from forward and backward reference frames, respectively, and predicted image is generated from the average value of those reference blocks There is a case to do. Information on these prediction modes is embedded in encoded data for each macroblock.

このような動き補償予測フレーム間符号化では、マクロブロックのサイズまたはそれよりも大きな領域で、同じ映像がフレーム間で時間的に平行移動した場合には良好な予測結果が得られる。しかし、映像の時間的な拡大・縮小や回転、あるいはフェードイン・フェードアウトのような信号振幅の時間変動に対しては、必ずしも高い予測効率は得られない。固定ビットレートでの符号化では、このような高い予測効率が得られない映像が入力されると、大幅な画質劣化を招くことがある。一方、可変ビットレートの符号化では、画質劣化を抑制するために予測効率の悪い映像に対して多くの符号量が費やされてしまい、総符号量を増加させてしまう。   In such motion-compensated prediction interframe coding, a good prediction result can be obtained when the same video is temporally translated between frames in a macroblock size or larger area. However, high prediction efficiency cannot always be obtained with respect to temporal fluctuations in signal amplitude such as temporal enlargement / reduction and rotation of video, or fade-in / fade-out. In encoding at a fixed bit rate, if a video that cannot achieve such a high prediction efficiency is input, the image quality may be greatly degraded. On the other hand, in variable bit rate encoding, a large amount of code is consumed for video with poor prediction efficiency in order to suppress image quality deterioration, and the total code amount is increased.

映像の時間的な拡大・縮小や回転、及びフェードイン・フェードアウトは、動画像信号のアフィン変換で近似できるため、アフィン変換を用いた予測を行えば予測効率は大幅に向上する。しかし、アフィン変換のパラメータを推定するためには、符号化時に膨大なパラメータ推定演算が必要となる。具体的には、複数の変換パラメータで参照画像を変換させ、予測残差が最小となるパラメータを決定することが必要となり、変換演算の演算量が膨大になる。その結果、符号化の演算量あるいはハードウエア規模等のコストが膨大になってしまう。また、予測残差信号だけでなく変換パラメータ自体を符号化する必要があり、符号化データのオーバーヘッドが膨大になる。さらに、復号化時には逆アフィン変換が必要となり、復号化の演算量あるいはハードウエア規模のコストが膨大なものになってしまう。   Since temporal enlargement / reduction, rotation, and fade-in / fade-out of video can be approximated by affine transformation of moving image signals, prediction using affine transformation greatly improves the prediction efficiency. However, in order to estimate the affine transformation parameters, enormous parameter estimation calculations are required at the time of encoding. Specifically, it is necessary to convert the reference image with a plurality of conversion parameters and determine a parameter that minimizes the prediction residual, which increases the amount of conversion calculation. As a result, the amount of calculation for encoding or the cost of hardware becomes enormous. Further, it is necessary to encode not only the prediction residual signal but also the transformation parameter itself, and the overhead of encoded data becomes enormous. Furthermore, inverse affine transformation is required at the time of decoding, resulting in an enormous amount of decoding calculation or hardware cost.

上述したように、従来のMPEGなどの動画像符号化方法では、平行移動以外の動画像の時間変化に対して十分な予測効率が得られないという問題があり、また、アフィン変換を用いた動画像符号化及び復号化方法では、予測効率自体は改善されるものの、符号化データのオーバーヘッドの増加や、符号化及び復号化コストの大幅な増加を招くという問題があった。   As described above, the conventional moving picture coding method such as MPEG has a problem that sufficient prediction efficiency cannot be obtained with respect to a time change of a moving picture other than parallel movement, and a moving picture using affine transformation is used. In the image encoding and decoding method, although the prediction efficiency itself is improved, there is a problem that the overhead of encoded data is increased and the encoding and decoding costs are greatly increased.

本発明は、動画像の符号化及び復号化において、特に従来のMPEGなどの動画像符号化方法が不得意としていたフェード画像について、演算量や符号化データのオーバーヘッドの増加を小さくし、かつ予測効率を大幅に向上させることを目的とする。   The present invention reduces the amount of calculation and the increase in the overhead of encoded data, and predicts, particularly for faded images, which are not good at the conventional moving image encoding methods such as MPEG, in encoding and decoding of moving images. The objective is to greatly improve efficiency.

上記の課題を解決するため、本発明の第1の態様では動画像の符号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該符号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化において、前記複数の参照フレームから少なくとも一つの参照マクロブロックをそれぞれ抽出し、抽出した複数の参照マクロブロックについて所定の重み係数の組を用いて線形和を計算することにより予測マクロブロックを生成し、前記予測マクロブロックと符号化対象マクロブロックとの予測誤差信号を生成し、前記予測誤差信号、前記複数の参照フレームの組み合わせを示す第1インデックス、前記重み係数の組を示す第2インデックス、及び前記動きベクトルの情報を符号化する。   In order to solve the above-described problem, in the first aspect of the present invention, a plurality of reference frames in a predetermined combination and a plurality of reference frames to be encoded and at least one reference frame, In the moving picture coding in which motion compensation prediction interframe coding is performed using a motion vector between each of the plurality of reference frames, at least one reference macroblock is extracted from each of the plurality of reference frames. A prediction macroblock is generated by calculating a linear sum using a set of weight coefficients, a prediction error signal between the prediction macroblock and the encoding target macroblock is generated, the prediction error signal, and the plurality of reference frames A first index indicating a combination of weights, a second index indicating the set of weighting factors, and the To encode information can vector.

本発明の第2の態様では、動画像の符号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該符号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法または装置において、第1参照フレームから前記動きベクトルの候補に対応した第1参照マクロブロックを抽出し、前記動きベクトルの候補を少なくとも一つの第2参照フレームと符号化対象フレームとのフレーム間距離に応じてスケーリングし、前記第2参照フレームからスケーリングされた動きベクトルの候補に対応した少なくとも一つの第2参照マクロブロックを抽出し、前記第1及び第2参照マクロブロックについて所定の重み係数の組を用いて線形和を計算することにより予測マクロブロックを生成し、前記予測マクロブロックと符号化対象マクロブロックとの予測誤差信号を生成し、前記第1及び第2参照マクロブロックの線形和と前記符号化対象マクロブロックとの予測誤差信号の大きさに基づいて前記動きベクトルを決定し、前記予測誤差信号、前記第1及び第2参照フレームを示す第1インデックス、前記重み係数の組を示す第2インデックス、及び決定された前記動きベクトルの情報を符号化する
本発明の第3の態様では、動画像の符号化対象マクロブロックに対して、時間的に過去の少なくとも一つの参照フレーム及び該符号化対象マクロブロックと該参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法または装置において、前記符号化対象マクロブロックを含む符号化対象フレームの直前の前記符号化済みフレームにおける該符号化対象マクロブロックとフレーム内位置が同一の復号化対象マクロブロックの動きベクトルを用いるか、新たに前記動きベクトルを決定して符号化するかを符号化対象マクロブロック毎に切り替えて前記動き補償予測フレーム間符号化を行う。
In the second aspect of the present invention, a plurality of reference frames in a predetermined combination and a motion vector between the encoding target macroblock and at least one reference frame are used for the encoding target macroblock of the moving image. In the moving picture coding method or apparatus for performing motion compensated prediction inter-frame coding, a first reference macroblock corresponding to the motion vector candidate is extracted from a first reference frame, and the motion vector candidate is at least one Scaling according to the inter-frame distance between the second reference frame and the encoding target frame, extracting at least one second reference macroblock corresponding to the scaled motion vector candidate from the second reference frame; A linear sum is calculated using a predetermined set of weighting factors for the first and second reference macroblocks. To generate a prediction macroblock, generate a prediction error signal between the prediction macroblock and the encoding target macroblock, and generate a prediction error between the linear sum of the first and second reference macroblocks and the encoding target macroblock. The motion vector is determined based on a signal magnitude, the prediction error signal, a first index indicating the first and second reference frames, a second index indicating the set of weighting factors, and the determined motion In the third aspect of the present invention for encoding vector information, at least one reference frame in the past in time and the encoding target macroblock and the reference frame are encoded with respect to the encoding target macroblock of the moving image. In the moving picture coding method or apparatus for performing motion compensation prediction interframe coding using a motion vector between A motion vector of a decoding target macroblock having the same intra-frame position as that of the encoding target macroblock in the encoded frame immediately before the encoding target frame including the black block is used, or the motion vector is newly determined. The motion compensated prediction interframe coding is performed by switching whether to encode each macroblock to be encoded.

本発明の第4の態様では、動画像の符号化対象マクロブロックに対して、少なくとも一つの参照フレーム及び該符号化対象マクロブロックと該参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法または装置において、時間的に過去の少なくとも一つの符号化済みフレームを前記参照フレームとする第1予測モード、時間的に未来の符号化済みフレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化済みフレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化済みフレームの線形和を前記参照フレームとする第4予測モードを前記符号化対象マクロブロック毎に切り替えて前記動き補償予測フレーム間符号化を行う。   In the fourth aspect of the present invention, a motion compensated prediction frame is generated using at least one reference frame and a motion vector between the encoding target macroblock and the reference frame with respect to the encoding target macroblock of the moving image. In a video encoding method or apparatus for performing inter-coding, a first prediction mode in which at least one encoded frame in the past in time is the reference frame, and an encoded frame in the future in time is the reference frame A third prediction mode in which a linear sum of past and future encoded frames in time is used as the reference frame, and a linear sum of a plurality of temporally encoded frames in time. The motion compensation prediction interframe coding is performed by switching the fourth prediction mode as the reference frame for each of the encoding target macroblocks.

本発明の第5の態様では、動画像の復号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法または装置において、前記復号化対象マクロブロック毎の予測誤差信号、前記複数の参照フレームの組み合わせを示す第1インデックス、参照マクロブロックに対する線形和の重み係数の組を示す第2インデックス及び前記動きベクトルの情報を含む符号化データを復号化し、復号化された前記動きベクトル及び前記第1インデックスの情報に従って前記複数の参照フレームから複数の参照マクロブロックを抽出し、復号化された前記第2インデックスの情報によって示される前記重み係数の組を用いて、抽出した前記複数の参照マクロブロックの線形和を計算することにより予測マクロブロックを生成し、前記予測マクロブロックと復号化された前記復号化対象マクロブロック毎の予測誤差信号を加算することにより動画像信号を復号化する。   In the fifth aspect of the present invention, a plurality of reference frames in a predetermined combination and a motion vector between the decoding target macroblock and at least one reference frame are used for the decoding target macroblock of the moving image. In the video decoding method or apparatus for performing motion compensated prediction inter-frame decoding, a prediction error signal for each of the decoding target macroblocks, a first index indicating a combination of the plurality of reference frames, and a linear sum with respect to the reference macroblock A plurality of reference macros from the plurality of reference frames according to the decoded motion vector and the information of the first index according to the decoded motion vector and the information of the first index. The block is extracted and indicated by the decoded second index information. A prediction macroblock is generated by calculating a linear sum of the extracted plurality of reference macroblocks using the set of weighting factors, and the prediction for each decoding target macroblock decoded with the prediction macroblock The moving image signal is decoded by adding the error signal.

本発明の第6の態様では、動画像の復号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法または装置において、前記復号化対象マクロブロック毎の予測誤差信号、前記複数の参照フレームの組み合わせを示す第1インデックス、符号化済みフレームのフレーム番号を示す第2インデックス及び前記動きベクトルの情報を含む符号化データを復号化し、復号化された前記動きベクトル及び前記第1インデックスの情報に従って前記複数の参照フレームから複数の参照マクロブロックを抽出し、復号化された前記第2インデックスの情報に従って前記複数の参照フレームと前記符号化済みフレームとのフレーム間距離を算出し、算出された前記フレーム間距離に応じて決定される重み係数の組を用いて、抽出した前記複数の参照マクロブロックの線形和を計算することにより予測マクロブロックを生成し、前記予測マクロブロックと復号化された前記予測誤差信号を加算することにより動画像信号を復号化する。   In the sixth aspect of the present invention, a plurality of reference frames in a predetermined combination and a motion vector between the decoding target macroblock and at least one reference frame are used for the decoding target macroblock of the moving image. In the moving picture decoding method or apparatus for performing motion compensated prediction inter-frame decoding, a prediction error signal for each decoding target macroblock, a first index indicating a combination of the plurality of reference frames, and a frame of an encoded frame Decode encoded data including information on a second index indicating a number and the motion vector, and extract a plurality of reference macroblocks from the plurality of reference frames according to the decoded information on the motion vector and the first index. , The plurality of reference frames according to the decoded information of the second index And the encoded frame, and a linear sum of the extracted plurality of reference macroblocks is calculated using a set of weighting factors determined according to the calculated interframe distance. Thus, a prediction macroblock is generated, and the motion picture signal is decoded by adding the prediction macroblock and the decoded prediction error signal.

本発明の第7の態様では、動画像の復号化対象マクロブロックに対して、時間的に過去の少なくとも一つの参照フレーム及び該復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法または装置において、前記復号化対象マクロブロック毎の予測誤差信号と、符号化された第1動きベクトルまたは直前の符号化済みフレームにおけるフレーム内同一位置のマクロブロックの第2動きベクトルを用いることを示すフラグの何れかの情報を含む符号化データを受信して復号化し、前記第1動きベクトルの情報を受信した復号化対象マクロブロックに対しては復号化された前記第1動きベクトル、前記フラグを受信した復号化対象マクロブロックに対しては前記第2動きベクトルをそれぞれ用いて予測マクロブロック信号を生成し、前記予測マクロブロックと復号化された前記予測誤差信号を加算することにより動画像信号を復号化する。   In the seventh aspect of the present invention, with respect to a decoding target macroblock of a moving image, at least one reference frame in the past in time and a motion vector between the decoding target macroblock and at least one reference frame In the moving picture decoding method or apparatus for performing motion compensated prediction inter-frame decoding using, the prediction error signal for each decoding target macroblock and the encoded first motion vector or the immediately preceding encoded frame Decoding target macroblock that receives and decodes encoded data including any information of a flag indicating that the second motion vector of the macroblock at the same position in the frame is used, and receives the information of the first motion vector For the decoded first motion vector, for the decoding target macroblock that received the flag, Serial second motion vector using each generate a predictive macroblock signal, decodes the moving image signal by adding the predictive macroblock and the decoded the prediction error signal.

本発明の第8の態様では、動画像の復号化対象マクロブロックに対して、復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法または装置において、前記復号化対象マクロブロック毎の予測誤差信号の情報と、時間的に過去の少なくとも一つの符号化対象フレームを前記参照フレームとする第1予測モード、時間的に未来の符号化対象フレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化対象フレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化対象フレームの線形和を前記参照フレームとする第4予測モードのいずれかを示す予測モード情報及び前記動きベクトルの情報を含む符号化データを受信して復号化し、前記予測モード情報及び前記動きベクトルの情報を用いて予測マクロブロック信号を生成し、前記予測マクロブロック信号と復号化された前記予測誤差信号を加算することより動画像信号を復号化する。   In the eighth aspect of the present invention, motion compensated prediction interframe decoding is performed on a decoding target macroblock of a moving image using a motion vector between the decoding target macroblock and at least one reference frame. In the moving picture decoding method or apparatus, the prediction error signal information for each of the decoding target macroblocks and the first prediction mode in which at least one encoding target frame in the past is the reference frame, temporally A second prediction mode in which a future encoding target frame is the reference frame, a third prediction mode in which a linear sum of the past and future encoding target frames is the reference frame, and the temporal past Prediction mode information indicating any of the fourth prediction modes using a linear sum of a plurality of encoding target frames as the reference frame, and information on the motion vector Is received and decoded, a prediction macroblock signal is generated using the prediction mode information and the motion vector information, and the prediction macroblock signal and the decoded prediction error signal are added Thus, the moving image signal is decoded.

本発明の第9の態様では、動画像の符号化対象マクロブロックに対して、複数の参照フレームから選択された少なくとも一つの参照フレーム、及び該符号化対象マクロブロックと該少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法または装置において、前記動きベクトルが前記動画像の前記符号化対象マクロブロックに隣接する複数のマクロブロックに対する動きベクトルから選択された予測ベクトルと一致し、かつ前記符号化対象マクロブロックに対して選択された少なくとも一つの参照フレームが前記予測ベクトルが選択されたマクロブロックに対する参照フレームと一致し、前記動き補償予測フレーム間符号化における符号化すべき予測誤差信号が全て0である符号化対象マクロブロックに対して、前記動き補償予測フレーム間符号化をスキップし、次の符号化対象マクロブロックの動き補償予測フレーム間符号化に際して該動き補償予測フレーム間符号化をスキップしたマクロブロックの個数を符号化する。   In a ninth aspect of the present invention, for a coding target macroblock of a moving image, at least one reference frame selected from a plurality of reference frames, the coding target macroblock and the at least one reference frame, In a moving picture coding method or apparatus for performing motion compensated prediction interframe coding using a motion vector between the motion vectors, motion vectors for a plurality of macro blocks adjacent to the coding target macro block of the moving picture And at least one reference frame selected for the encoding target macroblock matches a reference frame for the macroblock for which the prediction vector is selected, and the motion compensated prediction frame A code in which prediction error signals to be encoded are all 0 in inter coding The number of macroblocks for which the motion compensation prediction interframe coding is skipped for the target macroblock and the motion compensation prediction interframe coding is skipped during the motion compensation prediction interframe coding of the next coding target macroblock. Is encoded.

本発明の第10の態様では、動画像の符号化対象マクロブロックに対して、複数の参照フレームから選択された少なくとも一つの第1参照フレーム、及び該符号化対象マクロブロックと該第1参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法または装置において、前記動き補償予測フレーム間符号化により得られる予測誤差信号、前記動き補償予測フレーム間符号化に用いる動きベクトルと前記符号化対象マクロブロックに隣接する複数のマクロブロックと第2参照フレームとの間の動きベクトルから選択された予測ベクトルとの差分ベクトル、及び前記第1参照フレームを示すインデックスと前記第2参照フレームを示すインデックスとの差分値を符号化する。   In the tenth aspect of the present invention, for a coding target macroblock of a moving image, at least one first reference frame selected from a plurality of reference frames, and the coding target macroblock and the first reference frame In a moving picture coding method or apparatus for performing motion compensated prediction interframe coding using a motion vector between a prediction error signal obtained by the motion compensated prediction interframe coding, and the motion compensated prediction interframe coding A difference vector between a motion vector used for the prediction vector, a prediction vector selected from motion vectors between a plurality of macroblocks adjacent to the encoding target macroblock and the second reference frame, and an index indicating the first reference frame; A difference value from an index indicating the second reference frame is encoded.

本発明の第11の態様では、動画像の復号化対象マクロブロックに対して、該復号化対象マクロブロックと複数の参照フレームの中から選択された少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法または装置において、動き補償予測フレーム間符号化により得られた前記復号化対象マクロブロック毎の予測誤差信号、直前にスキップしたマクロブロックの個数及び前記選択された少なくとも一つの参照フレームを示すインデックスの情報を含む符号化データを受信して復号化し、前記スキップしたマクロブロックにおいて該スキップしたマクロブロックに隣接する複数のマクロブロックの動きベクトルから一つの予測ベクトルを選択し、前記予測ベクトルが選択されたマクロブロックに対する少なくとも一つの参照フレーム及び前記予測ベクトルに従って予測マクロブロックを生成し、前記予測マクロブロックを前記スキップしたマクロブロックの復号化画像信号として出力する。   In an eleventh aspect of the present invention, for a decoding target macroblock of a moving image, a motion vector between the decoding target macroblock and at least one reference frame selected from a plurality of reference frames is calculated. In the moving picture decoding method or apparatus for performing motion compensation prediction interframe decoding using the prediction error signal for each decoding target macroblock obtained by motion compensation prediction interframe coding, the macroblock skipped immediately before Received and decoded encoded data including information on the number and an index indicating the selected at least one reference frame, and from motion vectors of a plurality of macroblocks adjacent to the skipped macroblock in the skipped macroblock A prediction vector is selected, and the prediction vector is selected. It generates a predictive macroblock in accordance with at least one reference frame and the predicted vector for the block, and outputs the prediction macroblock as the decoded image signal of the skipped macroblock.

本発明の第12の態様では、動画像の復号化対象マクロブロックに対して、該復号化対象マクロブロックと複数の参照フレームの中から選択された少なくとも一つの第1参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法または装置において、動き補償予測フレーム間符号化により得られた予測誤差信号、該動き補償予測フレーム間符号化に用いた動きベクトルと前記復号化対象マクロブロックに隣接する複数のマクロブロックと第2参照フレームとの間の動きベクトルから選択された予測ベクトルとの差分ベクトル、及び前記第1参照フレームを示す第1インデックスと前記第2参照フレームを示す第2インデックスとの差分値を含む符号化データを受信して復号化し、前記復号化対象マクロブロックに隣接する複数のマクロブロックから前記予測ベクトルを選択し、選択された予測ベクトルと復号化された前記差分ベクトルとを加算することにより前記動きベクトルを再生し、前記予測ベクトルが選択されたマクロブロックにおける参照フレームのインデックスと前記復号化した差分値とを加算することにより前記第1インデックスを再生し、前記再生された動きベクトル及び再生された第1インデックスに従って予測マクロブロックを生成し、生成された前記予測マクロブロックと前記復号化された予測誤差信号とを加算することにより前記復号化対象マクロブロックの復号化再生画像信号を生成する。   In the twelfth aspect of the present invention, for a decoding target macroblock of a moving image, motion between the decoding target macroblock and at least one first reference frame selected from a plurality of reference frames In a video decoding method or apparatus for performing motion compensation prediction interframe decoding using a vector, a prediction error signal obtained by motion compensation prediction interframe coding, and a motion vector used for the motion compensation prediction interframe coding And a difference vector between a prediction vector selected from motion vectors between a plurality of macroblocks adjacent to the decoding target macroblock and a second reference frame, a first index indicating the first reference frame, and the first index Receiving and decoding encoded data including a difference value from a second index indicating two reference frames; The prediction vector is selected from a plurality of macroblocks adjacent to the block, the motion vector is reproduced by adding the selected prediction vector and the decoded difference vector, and the macro from which the prediction vector is selected The first index is reproduced by adding the index of the reference frame in the block and the decoded difference value, and a predicted macroblock is generated according to the reproduced motion vector and the reproduced first index. The decoded macroblock and the decoded prediction error signal are added to generate a decoded reproduced image signal of the decoding target macroblock.

本発明の第13の態様では、動画像の符号化対象フレーム内の符号化対象ブロックに対して、所定の組み合わせの複数の参照フレーム及び該符号化対象ブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、前記符号化対象フレーム内の交流成分値と前記参照フレームの交流成分値との比から少なくとも一つの重み係数を決定するステップと、前記符号化対象フレーム内の直流成分値と前記参照フレームの直流成分値との差から少なくとも一つの直流オフセット値を決定するステップと、前記参照フレームから抽出した複数の参照ブロックについて前記重み係数を用いて線形和を計算しかつ前記直流オフセット値を加算することにより、予測ブロックを生成するステップと、前記予測ブロックと符号化対象ブロックとの予測誤差信号を生成するステップと、前記予測誤差信号、前記参照フレーム、前記重み係数、前記直流オフセット値及び前記動きベクトルのそれぞれの情報を符号化するステップとを具備する。   In the thirteenth aspect of the present invention, with respect to the encoding target block in the encoding target frame of the moving image, a plurality of reference frames in a predetermined combination and between the encoding target block and at least one reference frame are included. In the moving picture coding method for performing motion compensation prediction interframe coding using a motion vector, at least one weighting factor is determined from a ratio between an AC component value in the encoding target frame and an AC component value in the reference frame. Determining at least one DC offset value from a difference between a DC component value in the encoding target frame and a DC component value of the reference frame, and a plurality of reference blocks extracted from the reference frame Generate a prediction block by calculating a linear sum using a weighting factor and adding the DC offset value A step of generating a prediction error signal between the prediction block and the encoding target block, and encoding each information of the prediction error signal, the reference frame, the weighting factor, the DC offset value, and the motion vector. Comprising the steps of:

一方、動画像の復号化対象フレーム内の復号化対象ブロックに対して、所定の組み合わせの複数の参照フレーム及び該復号化対象ブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、予測ブロックと前記復号化対象ブロックとの予測誤差信号、前記参照フレーム、重み係数、直流オフセット値及び前記動きベクトルのそれぞれの情報を含む符号化データを復号化するステップと、前記参照フレームから抽出した複数の参照ブロックについて前記重み係数を用いて線形和を計算しかつ前記直流オフセット値を加算することにより、前記予測ブロックを生成するステップと、前記予測誤差信号及び予測ブロックの信号を用いて再生動画像信号を生成するステップとを具備する。   On the other hand, for a decoding target block in a decoding target frame of a moving image, motion compensation is performed using a plurality of reference frames in a predetermined combination and a motion vector between the decoding target block and at least one reference frame. In a video decoding method for performing inter-prediction frame decoding, encoding including information on each of a prediction error signal between a prediction block and the decoding target block, the reference frame, a weighting factor, a DC offset value, and the motion vector Decoding the data; generating a prediction block by calculating a linear sum using the weighting factor for a plurality of reference blocks extracted from the reference frame and adding the DC offset value; A step of generating a playback video signal using the prediction error signal and the prediction block signal. Comprising the door.

以上説明したように、本発明によれば、従来のMPEGなどの動画像符号化方式が不得意としていた、フェードイン・フェードアウトなどの映像に対して、符号化及び復号化の演算量やコストの大幅な増加を必要とせずに、予測効率を大幅に向上することが可能となり、また符号化データのオーバーヘッドも小さく、高画質で高能率な動画像符号化及び復号化を行うことが可能となる。   As described above, according to the present invention, the amount of computation and cost of encoding and decoding are reduced for video such as fade-in and fade-out, which has been unsatisfactory with conventional video encoding methods such as MPEG. The prediction efficiency can be greatly improved without requiring a large increase, and the overhead of encoded data is small, enabling high-quality and highly efficient video encoding and decoding. .

(第1の実施形態)
図1に、本発明の第1の実施形態に係る動画像符号化装置の構成を示す。図1に示す動画像符号化装置は、ハードウエアで実現してもよいし、コンピュータを用いてソフトウエアにより実行してもよい。一部の処理をハードウエアで実現し、他の処理をソフトウエアにより行ってもよい。この点は、後で説明する他の実施形態に係る動画像符号化装置においても同様である。
(First embodiment)
FIG. 1 shows the configuration of a video encoding apparatus according to the first embodiment of the present invention. The moving picture encoding apparatus shown in FIG. 1 may be realized by hardware, or may be executed by software using a computer. Some processing may be realized by hardware, and other processing may be performed by software. This also applies to moving picture coding apparatuses according to other embodiments described later.

図1においては、フレーム毎に入力される動画像信号100(符号化対象フレーム)に対して、第1参照フレームメモリ117に保存された符号化済みフレームと第2参照フレームメモリ118に保存された符号化済みフレームとから予測マクロブロック生成器119により予測マクロブロック信号130〜133が生成される。予測マクロブロック選択器120では、予測マクロブロック信号130〜133から最適な予測マクロブロック信号が選択され、選択された予測マクロブロック信号によって予測画像信号106が生成される。   In FIG. 1, the encoded frame stored in the first reference frame memory 117 and the second reference frame memory 118 are stored for the moving image signal 100 (frame to be encoded) input for each frame. Prediction macroblock signals 130 to 133 are generated by the prediction macroblock generator 119 from the encoded frame. In the prediction macroblock selector 120, an optimal prediction macroblock signal is selected from the prediction macroblock signals 130 to 133, and the prediction image signal 106 is generated by the selected prediction macroblock signal.

予測画像信号106は減算器110に入力され、入力動画像信号100に対する予測画像信号106の誤差を示す予測誤差信号101が生成される。予測誤差信号101は、DCT変換器112により離散コサイン変換され、これによって得られたDCT係数データが量子化器113により量子化されることにより量子化DCT係数データ102が生成される。量子化DCT係数データ102は二分岐され、一方で可変長符号化器114により符号化される。   The prediction image signal 106 is input to the subtractor 110, and a prediction error signal 101 indicating an error of the prediction image signal 106 with respect to the input moving image signal 100 is generated. The prediction error signal 101 is subjected to discrete cosine transform by the DCT transformer 112, and the DCT coefficient data obtained thereby is quantized by the quantizer 113 to generate quantized DCT coefficient data 102. The quantized DCT coefficient data 102 is bifurcated while being encoded by the variable length encoder 114.

量子化DCT係数データ102は、他方において逆量子化器115及び逆DCT変換器116を経て予測誤差信号として再生される。この再生された予測誤差信号が予測画像信号106と加算されることにより、局部復号化画像信号103が生成される。局部復号化画像信号103は、第1参照フレームメモリ117に入力される。第1参照フレームメモリ117には、入力動画像信号100である現在の符号化対象フレームの直前に符号化された符号化済みフレームの局部復号化画像信号103が参照フレームとして保存され、第1参照フレームメモリ117の出力に接続された第2参照フレームメモリ118には、さらにその前に符号化された符号化済みフレームの局部復号化画像信号が参照フレームとして保存される。   On the other hand, the quantized DCT coefficient data 102 is reproduced as a prediction error signal via an inverse quantizer 115 and an inverse DCT transformer 116. The reproduced prediction error signal is added to the prediction image signal 106, thereby generating a locally decoded image signal 103. The locally decoded image signal 103 is input to the first reference frame memory 117. The first reference frame memory 117 stores a locally decoded image signal 103 of a frame that has been encoded immediately before the current encoding target frame, which is the input moving image signal 100, as a reference frame. In the second reference frame memory 118 connected to the output of the frame memory 117, the locally decoded image signal of the encoded frame encoded before that is stored as a reference frame.

予測マクロブロック生成器119では、第1参照フレームメモリ117に保存された参照フレームから抽出した参照マクロブロック信号104のみから生成される予測マクロブロック信号130、第2参照フレームメモリ118に保存された参照フレームから抽出した参照マクロブロック信号105のみから生成される予測マクロブロック信号131、第1及び第2参照フレームメモリ117,118からそれぞれ抽出した参照マクロブロック信号104,105を平均化して生成される予測マクロブロック信号132、及び第1参照フレームメモリ117から抽出した参照マクロブロック信号104の振幅を2倍にした信号から、第2参照フレームメモリ118から抽出した参照マクロブロック信号105を減じて生成される予測マクロブロック信号133をそれぞれ生成する。   In the prediction macroblock generator 119, the prediction macroblock signal 130 generated only from the reference macroblock signal 104 extracted from the reference frame stored in the first reference frame memory 117 and the reference stored in the second reference frame memory 118. A prediction macroblock signal 131 generated from only the reference macroblock signal 105 extracted from the frame and a prediction macroblock signal 104 and 105 extracted from the first and second reference frame memories 117 and 118, respectively. It is generated by subtracting the reference macroblock signal 105 extracted from the second reference frame memory 118 from the signal obtained by doubling the amplitude of the macroblock signal 132 and the reference macroblock signal 104 extracted from the first reference frame memory 117. Predictive macrob The click signal 133 is generated.

予測マクロブロック選択器120では、予測マクロブロック生成器119で生成された複数の予測マクロブロック信号130〜133に対し、入力動画像信号100から抽出した符号化対象マクロブロック信号との差分を計算し、誤差が最小となる予測マクロブロック信号を符号化対象マクロブロック毎に選択する。   The prediction macroblock selector 120 calculates a difference between the plurality of prediction macroblock signals 130 to 133 generated by the prediction macroblock generator 119 and the encoding target macroblock signal extracted from the input moving image signal 100. The prediction macroblock signal that minimizes the error is selected for each encoding target macroblock.

さらに、予測マクロブロック選択器120は符号化対象マクロブロック毎に、選択した予測マクロブロック信号の符号化対象マクロブロック信号から見た相対的な位置を動きベクトル情報として、また選択した予測マクロブロック信号の生成方法(予測マクロブロック信号130〜133の生成方法)を予測モード情報として出力する。予測モード情報の詳細については、後に詳しく説明する。このような動きベクトルと予測モードの適用により、予測画像信号106が生成され、これに基づき予測誤差信号101が生成される。   Further, the prediction macroblock selector 120 uses, for each encoding target macroblock, the relative position of the selected prediction macroblock signal viewed from the encoding target macroblock signal as motion vector information, and the selected prediction macroblock signal. Is generated as prediction mode information (a generation method of the prediction macroblock signals 130 to 133). Details of the prediction mode information will be described later in detail. By applying the motion vector and the prediction mode, the predicted image signal 106 is generated, and the prediction error signal 101 is generated based on the predicted image signal 106.

入力動画像信号100の信号成分が輝度信号及び二つの色差信号で構成される場合、予測マクロブロック選択器120は各マクロブロックのそれぞれの信号成分に対して同一の動きベクトル及び予測モードを適用する。   When the signal component of the input moving image signal 100 includes a luminance signal and two color difference signals, the prediction macroblock selector 120 applies the same motion vector and prediction mode to each signal component of each macroblock. .

予測誤差信号101をDCT変換器112及び量子化器113を通して得られた量子化DCT係数データ102と、予測マクロブロック選択器120から出力される動きベクトル情報及び予測モード情報を含むサイド情報107は、可変長符号化器114により符号化され、符号化データ108として出力される。符号化データ108は、図示しない蓄積系や伝送系へ送出される。   The side information 107 including the quantized DCT coefficient data 102 obtained from the prediction error signal 101 through the DCT converter 112 and the quantizer 113, and the motion vector information and the prediction mode information output from the prediction macroblock selector 120, It is encoded by the variable length encoder 114 and output as encoded data 108. The encoded data 108 is sent to a storage system or transmission system (not shown).

本実施形態では、予測誤差信号101はDCT変換器112、量子化器113及び可変長符号化器114を経て符号化されるが、例えばDCT変換をウエーブレット変換に置き換えた構成としたり、あるいは可変長符号化を算術符号化に置き換えた構成としてもよい。   In the present embodiment, the prediction error signal 101 is encoded through the DCT converter 112, the quantizer 113, and the variable length encoder 114. For example, the DCT conversion is replaced with wavelet conversion, or the variable is variable. The long coding may be replaced with arithmetic coding.

(第2の実施形態)
図2には、本発明の第2の実施形態に係る動画像符号化装置の構成を示す。本実施形態では、図1に示した第1の実施形態の動画像符号化装置に対して、入力動画像信号100に対するフェード検出器140が付加されている。フェード検出器140では、入力動画像信号100のフレーム毎の平均輝度値を計算し、輝度の時間変化に一定の傾きがある場合は、入力動画像信号100の画像はフェード画像であると判定し、その判定結果をフェード検出信号141として予測モード選択器120に通知する。
(Second Embodiment)
FIG. 2 shows the configuration of a moving image encoding apparatus according to the second embodiment of the present invention. In the present embodiment, a fade detector 140 for the input moving image signal 100 is added to the moving image coding apparatus of the first embodiment shown in FIG. The fade detector 140 calculates an average luminance value for each frame of the input moving image signal 100, and determines that the image of the input moving image signal 100 is a fade image when there is a certain inclination in the luminance temporal change. Then, the determination result is notified to the prediction mode selector 120 as a fade detection signal 141.

予測モード選択器120では、フェード検出器140によって入力動画像信号100の画像がフェード画像と判定された場合は、予測モードを一つの参照フレームからの予測または複数の参照フレームの線形外挿あるいは線形内挿による予測の何れかに限定して、マクロブロック毎に最適な動きベクトル及び予測モードを決定する。決定された動きベクトル及び予測モードを示す第1フラグをマクロブロックのヘッダに書き込み、予測誤差信号101の符号化を行う。一方、予測モードの組を示す第2フラグをフレームのヘッダデータに書き込んで出力する。   In the prediction mode selector 120, when the image of the input moving image signal 100 is determined to be a fade image by the fade detector 140, the prediction mode is predicted from one reference frame or linear extrapolation or linearity of a plurality of reference frames. The motion vector and the prediction mode that are optimal for each macroblock are determined by limiting to any one of the predictions by interpolation. A first flag indicating the determined motion vector and prediction mode is written in the header of the macroblock, and the prediction error signal 101 is encoded. On the other hand, the second flag indicating the set of prediction modes is written in the header data of the frame and output.

さらに予測モード選択器120は、フェード検出器140によって入力動画像信号100の画像がフェード画像でないと判定された場合は、予測モードを一つの参照フレームからの予測または複数の参照フレームの平均値による予測のいずれかに限定して、同様に最適な動きベクトル及び予測モードを決定し、動きベクトル、予測モード及び予測誤差信号101の符号化を同様に行う。   Further, when the fade detector 140 determines that the image of the input moving image signal 100 is not a fade image, the prediction mode selector 120 sets the prediction mode based on prediction from one reference frame or an average value of a plurality of reference frames. Similarly to the prediction, the optimal motion vector and prediction mode are similarly determined, and the motion vector, the prediction mode, and the prediction error signal 101 are similarly encoded.

図2の動画像符号化装置から出力される符号化データ108を受信して復号化する場合は、予測モードを示す第1及び第2フラグからマクロブロック毎の予測モードを判断し、マクロブロック毎に送られる動きベクトル及び判断した予測モードから予測マクロブロック信号を生成し、符号化された予測誤差信号を復号化して予測信号と加算することで復号化を行う。
このような構成とすることで、予測モード情報の符号化オーバーヘッドを低減させることが可能となる。
When receiving and decoding the encoded data 108 output from the moving picture encoding apparatus of FIG. 2, the prediction mode for each macroblock is determined from the first and second flags indicating the prediction mode, and A prediction macroblock signal is generated from the motion vector sent to and the determined prediction mode, and the encoded prediction error signal is decoded and added to the prediction signal for decoding.
With such a configuration, it is possible to reduce the coding overhead of prediction mode information.

図3には、本発明の第1及び第2の実施形態に係る動画像復号化装置の構成を示す。図3に示す動画像復号化装置は、ハードウエアで実現してもよいし、コンピュータを用いてソフトウエアにより実行してもよい。一部の処理をハードウエアで実現し、他の処理をソフトウエアにより行ってもよい。この点は、後で説明する他の実施形態に係る動画像復号化装置においても同様である。   FIG. 3 shows the configuration of a moving picture decoding apparatus according to the first and second embodiments of the present invention. The moving picture decoding apparatus shown in FIG. 3 may be realized by hardware, or may be executed by software using a computer. Some processing may be realized by hardware, and other processing may be performed by software. This also applies to a moving picture decoding apparatus according to another embodiment described later.

本実施形態の動画像復号化装置は、図1または図2に示した動画像符号化装置に対応した構成となっている。すなわち、図3の動画像復号化装置には、図1あるいは図2に示した動画像符号化装置から出力される符号化データ108が伝送系または蓄積系を経て、符号化データ200として入力される。   The moving picture decoding apparatus according to the present embodiment has a configuration corresponding to the moving picture encoding apparatus shown in FIG. 1 or FIG. That is, the encoded data 108 output from the moving image encoding apparatus shown in FIG. 1 or 2 is input as encoded data 200 to the moving image decoding apparatus of FIG. 3 via the transmission system or the storage system. The

動画像復号化装置に入力された符号化データ200は、まず可変長符号復号化器214で可変長符号が復号化され、量子化DCT係数データ201と、動きベクトル情報及び予測モード情報を含むサイド情報202が抽出される。量子化DCT係数データ201は、逆量子化器215及び逆DCT変換器216を経て復号化されることにより予測誤差信号が再生される。予測誤差信号は予測画像信号206と加算され、復号化画像信号203が生成される。   The encoded data 200 input to the moving picture decoding apparatus is first decoded into a variable length code by a variable length code decoder 214, and includes side data including quantized DCT coefficient data 201, motion vector information, and prediction mode information. Information 202 is extracted. The quantized DCT coefficient data 201 is decoded through an inverse quantizer 215 and an inverse DCT transformer 216, thereby reproducing a prediction error signal. The prediction error signal is added to the prediction image signal 206, and a decoded image signal 203 is generated.

第1参照フレームメモリ217には、符号化データ200である現在の動画像フレームの直前に復号化されたフレームの復号化画像信号203が参照フレームとして保存され、第1参照フレームメモリ217の出力に接続された第2参照フレームメモリ218には、さらにその前に復号化されたフレームの復号化画像信号が参照フレームとして保存される。   In the first reference frame memory 217, a decoded image signal 203 of a frame decoded immediately before the current moving image frame that is the encoded data 200 is stored as a reference frame, and is output to the output of the first reference frame memory 217. The connected second reference frame memory 218 further stores a decoded image signal of a previously decoded frame as a reference frame.

予測マクロブロック生成器219では、第1参照フレームメモリ217に保存された参照フレームから抽出した参照マクロブロック信号のみから生成される予測マクロブロック信号、第2参照フレームメモリ218に保存された参照フレームから抽出した参照マクロブロック信号のみから生成される予測マクロブロック信号、第1及び第2参照フレームメモリ217,218からそれぞれ抽出した参照マクロブロック信号を平均化して生成される予測マクロブロック信号、及び第1参照フレームメモリ217から抽出した参照マクロブロック信号の振幅を2倍にした信号から、第2参照フレームメモリ218から抽出した参照マクロブロック信号を減じて生成される予測マクロブロック信号が生成される。これらの予測マクロブロック信号は、予測マクロブロック選択器220に入力される。   In the prediction macroblock generator 219, the prediction macroblock signal generated only from the reference macroblock signal extracted from the reference frame stored in the first reference frame memory 217 and the reference frame stored in the second reference frame memory 218 are used. A predicted macroblock signal generated only from the extracted reference macroblock signal, a predicted macroblock signal generated by averaging the reference macroblock signals extracted from the first and second reference frame memories 217 and 218, and the first A prediction macroblock signal generated by subtracting the reference macroblock signal extracted from the second reference frame memory 218 from the signal obtained by doubling the amplitude of the reference macroblock signal extracted from the reference frame memory 217 is generated. These prediction macroblock signals are input to the prediction macroblock selector 220.

予測マクロブロック選択器220には、さらに可変長復号化器214からのサイド情報202が入力される。予測マクロブロック選択器220では、サイド情報202に含まれる動きベクトル情報及び予測モード情報に応じて、予測マクロブロック生成器219から出力される予測マクロブロック信号のうち、符号化時に使用された予測マクロブロック信号と同じ信号が選択されることにより、予測画像信号206が生成される。   The prediction macroblock selector 220 further receives the side information 202 from the variable length decoder 214. In the prediction macroblock selector 220, the prediction macro used at the time of encoding among the prediction macroblock signals output from the prediction macroblock generator 219 according to the motion vector information and the prediction mode information included in the side information 202. A predicted image signal 206 is generated by selecting the same signal as the block signal.

(動き補償予測フレーム間符号化について)
図4は、第1及び第2の実施形態におけるフレーム間予測の関係を模式的に示した例であり、符号化/復号化対象フレーム302、その直前のフレーム301、さらにその前のフレーム300を示している。
(About motion compensation prediction interframe coding)
FIG. 4 is an example schematically showing the interframe prediction relationship in the first and second embodiments. The encoding / decoding target frame 302, the immediately preceding frame 301, and the preceding frame 300 are shown. Show.

フレーム302を符号化あるいは復号化しているとき、図1及び図2の第1参照メモリ117あるいは図3の第1参照フレーム217には、フレーム301の復号化画像信号が保存されており、また図1及び図2の第2参照フレームメモリ118あるいは図3の第2参照フレームメモリ218には、フレーム300の復号化画像信号が保存されている。   When the frame 302 is encoded or decoded, the decoded image signal of the frame 301 is stored in the first reference memory 117 of FIGS. 1 and 2 or the first reference frame 217 of FIG. 1 and the second reference frame memory 118 of FIG. 2 or the second reference frame memory 218 of FIG. 3 stores the decoded image signal of the frame 300.

符号化/復号化対象マクロブロック305に対して、参照フレーム300の参照マクロブロック303及び参照フレーム301の参照マクロブロック304のいずれか一方あるいは両方を用いて予測マクロブロックが生成される。動きベクトル306及び307は、それぞれ参照マクロブロック303及び304の位置を示すベクトルである。   For the encoding / decoding target macroblock 305, a prediction macroblock is generated using one or both of the reference macroblock 303 of the reference frame 300 and the reference macroblock 304 of the reference frame 301. Motion vectors 306 and 307 are vectors indicating the positions of the reference macroblocks 303 and 304, respectively.

符号化時には、符号化対象マクロブロック305に最適な動きベクトル及び予測モードの探索が行われる。復号化時には、サイド情報202に含まれる動きベクトル及び予測モードの情報を用いて、復号化対象マクロブロック305に対して予測マクロブロック信号が生成される。   At the time of encoding, a search for an optimal motion vector and prediction mode for the encoding target macroblock 305 is performed. At the time of decoding, a prediction macroblock signal is generated for the decoding target macroblock 305 using the motion vector and prediction mode information included in the side information 202.

図5及び図6は、第1及び第2の実施形態における予測モードのうち、複数の参照フレームの線形和による予測モードで用いる予測係数テーブルの例を示している。予測係数は、第1の実施形態ではマクロブロック毎、第2の実施形態ではフレーム毎にそれぞれ変化し、平均及び線形外挿の2つの係数の組が存在する。   5 and 6 show examples of prediction coefficient tables used in a prediction mode based on a linear sum of a plurality of reference frames among the prediction modes in the first and second embodiments. The prediction coefficient changes for each macroblock in the first embodiment and for each frame in the second embodiment, and there are two sets of coefficients, average and linear extrapolation.

図5あるいは図6中に示すインデックス(Code_number)をマクロブロック毎あるいはフレーム毎のヘッダデータとして符号化する。第2の実施形態では線形予測係数はフレーム毎に固定となるので、フレームのヘッダデータのみで符号化すればよい。図5に示す予測係数テーブルでは係数の数値を明示的に定義しており、図6に示す予測係数テーブルでは平均または線形予測(内挿または外挿)を示している。このようなインデックスを符号化することにより、線形予測係数を直接符号化する場合に比べて、符号化すべき情報量が削減でき、符号化オーバーヘッドを低減させることが可能となる。   The index (Code_number) shown in FIG. 5 or 6 is encoded as header data for each macroblock or each frame. In the second embodiment, since the linear prediction coefficient is fixed for each frame, it may be encoded using only the header data of the frame. The numerical value of the coefficient is explicitly defined in the prediction coefficient table shown in FIG. 5, and the average or linear prediction (interpolation or extrapolation) is shown in the prediction coefficient table shown in FIG. By encoding such an index, the amount of information to be encoded can be reduced and the encoding overhead can be reduced as compared with the case where the linear prediction coefficient is directly encoded.

図7は、本発明の第1及び第2の実施形態における種々の予測モードに関わる参照フレーム(Reference_frame)の組み合わせを示すテーブルである。図7において、Code_numbe=0は直前のフレーム(1フレーム前)からの予測モード、Code_numbe=1は2フレーム前からの予測モード、Code_numbe=3は1フレーム前及び2フレーム前からの線形和による予測モードの場合の参照フレームの組み合わせをそれぞれ示している。Code_number=3の場合には、上述の線形予測係数を用いた予測モードが用いられる。   FIG. 7 is a table showing combinations of reference frames (Reference_frame) related to various prediction modes in the first and second embodiments of the present invention. In FIG. 7, Code_numbe = 0 is a prediction mode from the immediately preceding frame (one frame before), Code_numbe = 1 is a prediction mode from two frames before, and Code_numbe = 3 is a prediction based on a linear sum from one frame and two frames before. Each reference frame combination in the mode is shown. When Code_number = 3, the prediction mode using the linear prediction coefficient described above is used.

第1及び第2の実施形態においては、参照フレームの組み合わせはマクロブロック毎に変化可能であり、図7のテーブルのインデックスはマクロブロック毎に符号化が行われる。   In the first and second embodiments, the combination of reference frames can be changed for each macroblock, and the index in the table of FIG. 7 is encoded for each macroblock.

(第3の実施形態)
図8及び図9は、本発明の第3の実施形態に係る動画像符号化装置及び動画像復号化装置の構成をそれぞれ示している。第1及び第2の実施形態では、最大2フレームの参照フレームからの線形和による予測を行うのに対して、第3の実施形態では3フレーム以上の参照フレームを用いて、マクロブロック毎の特定の1フレームを選択するか、あるいは複数の参照フレームの線形和のいずれかによる予測を可能としている。
(Third embodiment)
8 and 9 show the configurations of a moving picture encoding apparatus and a moving picture decoding apparatus according to the third embodiment of the present invention, respectively. In the first and second embodiments, prediction is performed based on a linear sum from a maximum of two reference frames. In the third embodiment, three or more reference frames are used to specify each macroblock. Can be predicted by either selecting one frame or by linear sum of a plurality of reference frames.

図8の動画像符号化装置では最大参照フレーム数(n)分の参照フレームメモリ117,118及び152を備え、図9の動画像復号化装置においても同様に最大参照フレーム数(n)分の参照フレームメモリ217,218及び252備えている。本実施形態では、線形和による予測の際は予測マクロブロック生成器151及び251において予測係数W1〜Wnと各参照フレームから抽出された参照マクロブロックとの積和演算を行い、その結果をWdビットだけ右シフトして予測画像信号を生成する。参照フレームの選択はマクロブロック毎に変更可能とし、線形予測係数はフレーム毎に変更可能とする。従って、線形予測係数の組をフレームのヘッダデータとして符号化し、参照フレームの選択はマクロブロック毎のヘッダデータとして符号化を行う。   8 includes reference frame memories 117, 118, and 152 corresponding to the maximum number of reference frames (n), and the moving image decoding apparatus in FIG. 9 similarly corresponds to the maximum number of reference frames (n). Reference frame memories 217, 218 and 252 are provided. In the present embodiment, when performing prediction by linear sum, the prediction macroblock generators 151 and 251 perform a sum-of-products operation between the prediction coefficients W1 to Wn and the reference macroblock extracted from each reference frame, and the result is the Wd bit. Only a right shift is performed to generate a predicted image signal. The selection of the reference frame can be changed for each macroblock, and the linear prediction coefficient can be changed for each frame. Therefore, a set of linear prediction coefficients is encoded as frame header data, and a reference frame is selected as header data for each macroblock.

図10に、本実施形態に関わる線形予測係数をフレームのヘッダとして符号化するためのデータシンタックスを示す。線形予測係数の符号化では、まず参照フレームの最大数をNumber_Of_Max_Referencesとして符号化し、次に線形予測係数の演算精度を示すWeightingFactorDenominatorExponent(図8及び図9におけるWd)を符号化し、さらにNumber_Of_Max_Referencesの数だけの各参照フレームに対する係数WeightingFactorNumerator[i](図8及び図9におけるW1〜Wn)を符号化する。i番目の参照フレームに対する線形予測係数は、以下の式で示される。

Figure 2007049743
FIG. 10 shows a data syntax for encoding the linear prediction coefficient according to the present embodiment as a frame header. In the encoding of the linear prediction coefficient, first, the maximum number of reference frames is encoded as Number_Of_Max_References, then WeightingFactorDenominatorExponent (Wd in FIGS. 8 and 9) indicating the calculation accuracy of the linear prediction coefficient is encoded, and the number of Number_Of_Max_References is further encoded. Coefficients WeightingFactorNumerator [i] (W1 to Wn in FIGS. 8 and 9) for each reference frame are encoded. The linear prediction coefficient for the i-th reference frame is expressed by the following equation.
Figure 2007049743

図11に、本実施形態に関わるマクロブロック毎に符号化される参照フレームの組み合わせテーブルを示す。Code_number=0は全ての参照フレームの線形和による予測を示し、Code_number=1以降は参照フレームが特定の1フレームであり、何フレーム前のフレームを参照フレームとするか示す。全ての参照フレームの線形和による予測を行う場合、図10に示した予測係数を用いた予測を行う。ここで、予測係数の一部を0とすることで、線形予測モードでは任意の参照フレームの組み合わせによる線形予測をフレーム単位に切り替えることが可能である。   FIG. 11 shows a reference frame combination table encoded for each macroblock according to the present embodiment. Code_number = 0 indicates prediction based on a linear sum of all reference frames, and after Code_number = 1, the reference frame is a specific one frame, and indicates how many frames before the reference frame. When performing prediction by linear sum of all reference frames, prediction using the prediction coefficient shown in FIG. 10 is performed. Here, by setting a part of the prediction coefficients to 0, in the linear prediction mode, it is possible to switch linear prediction based on a combination of arbitrary reference frames in units of frames.

図12及び図13は、本実施形態に関わる3フレーム以上の参照フレームを用いるフレーム間予測の関係を示している。図12は過去の複数の参照フレームを用いる例であり、また図13は過去及び未来の複数の参照フレームを用いる例である。図12においては、符号化対象フレーム804に対して参照フレーム800〜803が用いられる。   12 and 13 show the relationship of inter-frame prediction using three or more reference frames according to this embodiment. FIG. 12 shows an example using a plurality of past reference frames, and FIG. 13 shows an example using a plurality of past and future reference frames. In FIG. 12, reference frames 800 to 803 are used for the encoding target frame 804.

符号化時には、符号化対象マクロブロック813毎に、各参照フレームから各参照フレームに対する動きベクトル805〜808に応じて参照マクロブロック809〜812を抽出し、抽出した参照マクロブロック809〜812からの線形予測により予測マクロブロックを生成する。次に、複数の参照マクロブロック809〜812の中の一つ、あるいは線形予測による予測マクロブロックの何れかの予測モードで、予測誤差が最小となる動きベクトル及び予測モードの組を選択する。線形予測係数は、例えはフレーム間の平均輝度の時間変化等から符号化対象フレーム毎に1組決定される。決定された予測係数の組は符号化対象フレームのヘッダデータとして符号化され、また各マクロブロックの動きベクトル、予測モード及び予測誤差信号は、マクロブロック毎に符号化される。   At the time of encoding, reference macroblocks 809 to 812 are extracted from each reference frame according to motion vectors 805 to 808 for each reference frame for each encoding target macroblock 813, and linearity from the extracted reference macroblocks 809 to 812 is extracted. A prediction macroblock is generated by prediction. Next, a set of a motion vector and a prediction mode that minimizes the prediction error is selected in one of a plurality of reference macroblocks 809 to 812 or a prediction mode of a prediction macroblock based on linear prediction. One set of linear prediction coefficients is determined for each encoding target frame, for example, from a temporal change in average luminance between frames. The determined set of prediction coefficients is encoded as header data of the encoding target frame, and the motion vector, prediction mode, and prediction error signal of each macroblock are encoded for each macroblock.

復号化時はフレーム毎に受信した線形予測係数の組を用いて、マクロブロック毎に動きベクトル及び予測モードの情報から、複数の参照フレームより、予測マクロブロックを生成し、予測誤差信号と加算することで復号化を行う。   At the time of decoding, using a set of linear prediction coefficients received for each frame, a prediction macroblock is generated from a plurality of reference frames from motion vector and prediction mode information for each macroblock, and added to a prediction error signal. To perform decryption.

図13では、符号化対象フレーム902に対して参照フレーム900,901,903,904が用いられる。図13の場合、符号化時及び復号化時は符号化対象フレーム902及び参照フレーム900,901,903,904は900、901、903、904、902の順序となるようにフレームの並べ替えが行われ、符号化の場合は複数の局部復号化画像フレーム、復号化の場合は複数の符号化済みフレームをそれぞれ参照フレームとして用いる。   In FIG. 13, reference frames 900, 901, 903, and 904 are used for the encoding target frame 902. In the case of FIG. 13, the frames are rearranged so that the encoding target frame 902 and the reference frames 900, 901, 903, and 904 are in the order of 900, 901, 903, 904, and 902 at the time of encoding and decoding. In the case of encoding, a plurality of locally decoded image frames are used as reference frames, and in the case of decoding, a plurality of encoded frames are used as reference frames.

符号化対象マクロブロック911に対して、図12の例と同様に参照マクロブロック909,910,912,913の一つ、またはそれらからの線形予測による予測信号の何れかがマクロブロック毎に選択されて符号化される。   For the encoding target macroblock 911, one of the reference macroblocks 909, 910, 912, and 913 or a prediction signal based on linear prediction therefrom is selected for each macroblock as in the example of FIG. Encoded.

図14は、本発明の実施形態に係る動きベクトル情報の符号化方法及び復号化方法を示す図である。図4の例のように、複数の参照フレームを用いたフレーム間符号化において、符号化対象マクロブロック毎に複数の参照マクロブロック信号を用いて予測マクロブロック信号を生成する場合、マクロブロック毎に複数の動きベクトル情報を符号化する必要がある。したがって、参照するマクロブロックの数が増えるほど、符号化すべき動きベクトル情報のオーバーヘッドが増加し、符号化効率を低下させる原因となる。   FIG. 14 is a diagram illustrating an encoding method and a decoding method of motion vector information according to the embodiment of the present invention. As in the example of FIG. 4, in interframe coding using a plurality of reference frames, when generating a prediction macroblock signal using a plurality of reference macroblock signals for each encoding target macroblock, for each macroblock It is necessary to encode a plurality of motion vector information. Therefore, as the number of macroblocks to be referred to increases, the overhead of motion vector information to be encoded increases, which causes a decrease in encoding efficiency.

図14の例では、2つの参照フレームからそれぞれ参照マクロブロック信号を抽出して、予測マクロブロック信号を生成する場合に、一つの動きベクトルとその動きベクトルをフレーム間距離に応じてスケーリングした動きベクトルを用いる。符号化対象フレーム402に対して参照フレーム401及び400が用いられ、動きベクトル411及び410が検出される。黒で示した点は垂直方向の画素位置を示しており、白で示した点は1/4画素精度の補間点を示している。   In the example of FIG. 14, when a reference macroblock signal is extracted from each of two reference frames to generate a predicted macroblock signal, one motion vector and a motion vector obtained by scaling the motion vector according to the interframe distance Is used. Reference frames 401 and 400 are used for the encoding target frame 402, and motion vectors 411 and 410 are detected. A black point indicates a pixel position in the vertical direction, and a white point indicates an interpolation point with 1/4 pixel accuracy.

図14は、動き補償予測フレーム間符号化を1/4画素精度で行う例を示している。動き補償の画素精度は1画素、1/2画素及び1/8画素など、符号化方式毎に定義される。通常は、動きベクトルを動き補償の精度で表現し、参照画像を参照フレームの画像データから、補間して生成するのが一般的である。   FIG. 14 shows an example in which motion compensation prediction interframe coding is performed with 1/4 pixel accuracy. The pixel accuracy of motion compensation is defined for each encoding method, such as 1 pixel, 1/2 pixel, and 1/8 pixel. In general, a motion vector is generally expressed with motion compensation accuracy, and a reference image is generated by interpolation from image data of a reference frame.

図14では、符号化対象の画素405に着目すると、参照フレーム400からは2.5画素垂直方向に離れた点403を参照するものとし、2.5画素のずれを示す動きベクトル410が符号化される。一方、同画素405に対する参照フレーム401からの予測は、フレーム間距離に応じて前述の符号化された動きベクトル410をスケーリングすることにより生成する。ここでは、フレーム401に対する動きベクトルは、フレーム間距離を考慮し2.5/2=1.25画素となり、参照フレーム401における画素404が符号化対象フレーム402の画素405の参照画素として用いられる。   In FIG. 14, focusing on the pixel 405 to be encoded, it is assumed that a point 403 that is 2.5 pixels away from the reference frame 400 is referred to, and a motion vector 410 indicating a deviation of 2.5 pixels is encoded. Is done. On the other hand, the prediction from the reference frame 401 for the pixel 405 is generated by scaling the coded motion vector 410 described above according to the interframe distance. Here, the motion vector for the frame 401 is 2.5 / 2 = 1.25 pixels in consideration of the inter-frame distance, and the pixel 404 in the reference frame 401 is used as the reference pixel of the pixel 405 in the encoding target frame 402.

符号化時及び復号化時に同一の精度で動きベクトルのスケーリングを行うことで、各マクロブロック毎に符号化すべき動きベクトルは、符号化対象マクロブロックが複数のフレームを参照する場合でも一つの動きベクトルで済み、符号化オーバーヘッドの増加を防ぐことが可能となる。ここで、動きベクトルのスケーリング結果が、動き補償の精度のサンプル点上にない場合は、端数の四捨五入によりスケーリングされた動きベクトルを丸めるものとする。   By performing motion vector scaling with the same accuracy during encoding and decoding, the motion vector to be encoded for each macroblock is one motion vector even when the encoding target macroblock refers to multiple frames. Thus, it is possible to prevent an increase in coding overhead. Here, if the scaling result of the motion vector is not on the sample point of the accuracy of motion compensation, the scaled motion vector is rounded off by rounding off to the nearest whole number.

図15は、本発明の実施形態に係る、図14とは異なる動きベクトル情報の符号化方法及び復号化方法を示す図である。図14の例では、動画像の時間的な動きの速さが一定の場合に、符号化データに占める動きベクトルのオーバーヘッドを効率的に低減することが可能となる。一方、動画像の時間的な動きが単調ではあるが、動きの速さが一定ではない場合、単純にスケーリングした動きベクトルを用いると、予測効率の低下が発生して符号化効率の低下の原因となる場合がある。   FIG. 15 is a diagram illustrating an encoding method and a decoding method of motion vector information different from those in FIG. 14 according to the embodiment of the present invention. In the example of FIG. 14, it is possible to efficiently reduce the overhead of the motion vector in the encoded data when the temporal motion speed of the moving image is constant. On the other hand, if the temporal motion of a moving image is monotonous but the speed of motion is not constant, using a simply scaled motion vector will cause a decrease in prediction efficiency and cause a decrease in coding efficiency. It may become.

図15では図14と同様に、画素506の参照画素として、参照フレーム500及び501の2フレームの参照画素から予測画素を生成する。ここでは、フレーム500の画素503と、フレーム501の画素505が参照されるものとする。図14の例と同様に、フレーム500に対する動きベクトル510が符号化され、それに加えてフレーム501に対する動きベクトル511が、動きベクトル510をスケーリングしたベクトルとの差分ベクトル520として符号化される。動きベクトル510を1/2にスケーリングすることにより、フレーム501における画素504の位置が示され、本来の予測画素505と画素504との差分量を示す差分ベクトル520が符号化される。   In FIG. 15, as in FIG. 14, a prediction pixel is generated from the reference pixels of two frames of the reference frames 500 and 501 as the reference pixel of the pixel 506. Here, the pixel 503 of the frame 500 and the pixel 505 of the frame 501 are referred to. Similar to the example of FIG. 14, the motion vector 510 for the frame 500 is encoded, and in addition, the motion vector 511 for the frame 501 is encoded as a difference vector 520 with a vector obtained by scaling the motion vector 510. By scaling the motion vector 510 to ½, the position of the pixel 504 in the frame 501 is indicated, and a difference vector 520 indicating the difference amount between the original predicted pixel 505 and the pixel 504 is encoded.

通常、時間的に単調な動きに対して前述の差分ベクトルの大きさは小さくなるため、動きの速度が一定でない場合も、予測効率を低下させずに、かつ動きベクトルのオーバーヘッドの増加を抑えて、効率的な符号化行うことが可能となる。   Normally, the size of the above-mentioned difference vector becomes small with respect to monotonous motion in time, so even if the speed of motion is not constant, the increase in motion vector overhead is suppressed without reducing prediction efficiency. Thus, efficient encoding can be performed.

図16は、本発明の実施形態に係るさらに別の動きベクトル情報の符号化方法及び復号化方法を示す図である。図16の例では、フレーム603が符号化対象フレームであり、フレーム602を飛ばして、フレーム601及びフレーム600が参照フレームとなっている例である。さらに、画素606に対して、参照フレーム600の画素604及び参照フレーム601の画素605が予測画素を生成するための参照画素となっている。図14あるいは図15の例と同様に、参照フレーム600に対する動きベクトル611を符号化し、動きベクトル611をスケーリングした動きベクトルを用いて、参照フレーム601に対する動きベクトルを生成することも可能であるが、図16の場合は参照フレームと符号化対象フレームのフレーム間距離の関係から、動きベクトル611に対して2/3倍のスケーリングが必要となる。   FIG. 16 is a diagram illustrating still another motion vector information encoding method and decoding method according to the embodiment of the present invention. In the example of FIG. 16, the frame 603 is an encoding target frame, the frame 602 is skipped, and the frames 601 and 600 are reference frames. Furthermore, with respect to the pixel 606, the pixel 604 of the reference frame 600 and the pixel 605 of the reference frame 601 are reference pixels for generating a prediction pixel. Similarly to the example of FIG. 14 or FIG. 15, it is possible to encode the motion vector 611 for the reference frame 600 and generate a motion vector for the reference frame 601 using a motion vector obtained by scaling the motion vector 611. In the case of FIG. 16, the motion vector 611 needs to be scaled 2/3 times from the relationship between the frame distances of the reference frame and the encoding target frame.

図16の例に限らず、任意のスケーリングを行うためには、分母が2のべき乗でない任意の整数となり、除算が必要となる。動きベクトルのスケーリングは、符号化時及び復号化時のいずれでも必要であり、特に除算は、ハードウエア及びソフトウエアのいずれにおいても、コストや演算時間が多くかかるため、符号化及び復号化のコスト増をもたらしてしまう。図16では、符号化すべき動きベクトル611をフレーム間距離で正規化した動きベクトル610を符号化し、正規化された動きベクトル610を符号化対象フレームと各参照フレームとのフレーム間距離に応じて、スケーリングした動きベクトルと、本来の動きベクトルとの差分ベクトルを符号化する。つまり、参照画素604は、正規化された動きベクトル610を3倍した動きベクトルと、差分ベクトル620から生成され、参照画素605は、正規化された動きベクトル610を2倍した動きベクトルと、差分ベクトル621から生成される。   In order to perform arbitrary scaling, not limited to the example of FIG. 16, the denominator becomes an arbitrary integer that is not a power of 2, and division is required. Motion vector scaling is required for both encoding and decoding. In particular, division requires a lot of cost and calculation time in both hardware and software. It will increase. In FIG. 16, a motion vector 610 obtained by normalizing the motion vector 611 to be encoded is encoded, and the normalized motion vector 610 is converted according to the interframe distance between the encoding target frame and each reference frame. A difference vector between the scaled motion vector and the original motion vector is encoded. That is, the reference pixel 604 is generated from the motion vector obtained by multiplying the normalized motion vector 610 by three times and the difference vector 620, and the reference pixel 605 is obtained by subtracting the motion vector obtained by doubling the normalized motion vector 610 from the difference. Generated from vector 621.

このように図16の構成とすることで、予測効率を低下させずに、動きベクトルの符号化オーバーヘッドの増加を防ぎ、さらに、動きベクトルのスケーリングが乗算のみで実現できるため、符号化及び復号化の演算コストも抑えることが可能となる。   In this way, the configuration shown in FIG. 16 prevents an increase in the coding overhead of the motion vector without reducing the prediction efficiency, and further, the scaling of the motion vector can be realized only by multiplication. It is possible to reduce the calculation cost.

本発明の実施形態における動きベクトルあるいは差分ベクトルの符号化では、以下のように動きベクトルの空間相関あるいは時間相関を利用することで、動きベクトル符号量の一層の削減を実現する。
まず、図17を用いて空間相関を利用した動きベクトルの圧縮方法の例を説明する。図17中に示すA,B,C,D,Eは、1フレーム内の隣接するマクロブロックを示している。マクロブロックAの動きベクトルあるいは差分ベクトルを符号化する際、隣接するマクロブロックB,C,D,Eの動きベクトルから予測ベクトルを生成し、予測ベクトルと符号化すべきマクロブロックAの動きベクトルとの誤差のみを符号化し、復号側では符号化時と同様に予測ベクトルを計算し、符号化された誤算信号と加算することで、マクロブロックAの動きベクトルあるいは差分ベクトルの生成を行う。
In the encoding of the motion vector or the difference vector in the embodiment of the present invention, the motion vector code amount is further reduced by using the spatial correlation or the temporal correlation of the motion vector as follows.
First, an example of a motion vector compression method using spatial correlation will be described with reference to FIG. A, B, C, D, and E shown in FIG. 17 indicate adjacent macroblocks in one frame. When the motion vector or difference vector of the macroblock A is encoded, a prediction vector is generated from the motion vectors of the adjacent macroblocks B, C, D, and E, and the prediction vector and the motion vector of the macroblock A to be encoded are Only the error is encoded, and on the decoding side, a prediction vector is calculated in the same manner as the encoding, and is added to the encoded miscalculation signal, thereby generating a motion vector or a difference vector of the macroblock A.

動きベクトルの誤差の符号化は、可変長符号や算術符号を用いることで、高能率に圧縮することが可能である。動きベクトルの予測は、例えば、マクロブロックB,C,D,Eの動きベクトルの中央値あるいは平均値を予測ベクトルとして用いることで実現出来る。   The motion vector error can be encoded with high efficiency by using a variable length code or an arithmetic code. The motion vector prediction can be realized by using, for example, the median value or average value of the motion vectors of the macroblocks B, C, D, and E as the prediction vector.

次に、図18を用いて時間相関を利用した動きベクトルの圧縮方法の例を説明する。図18では、連続する2フレーム(F0、F1)を示している。図中、A,B,C,D,EはフレームF1内において隣接するマクロブロック、また、a,b,c,d,eはフレームF0におけるA,B,C,D,Eと同じ位置のマクロブロックをそれぞれ示している。ここで、マクロブロックAにおける動きベクトルあるいは差分ベクトルを符号化する際に、直前のフレームF0の同一位置のマクロブロックaの動きベクトルを予測ベクトルとし、予測ベクトルとマクロブロックAにおける符号化すべきベクトルとの誤差のみを符号化することで、動きベクトル情報を圧縮することが可能となる。   Next, an example of a motion vector compression method using time correlation will be described with reference to FIG. FIG. 18 shows two consecutive frames (F0, F1). In the figure, A, B, C, D, and E are adjacent macroblocks in the frame F1, and a, b, c, d, and e are the same positions as A, B, C, D, and E in the frame F0. Each macroblock is shown. Here, when the motion vector or the difference vector in the macroblock A is encoded, the motion vector of the macroblock a at the same position in the immediately preceding frame F0 is set as the prediction vector, and the prediction vector and the vector to be encoded in the macroblock A are It is possible to compress the motion vector information by encoding only the error.

さらに、時空間相関を利用し、フレームF1のマクロブロックB,C,D,E及びフレームF0のマクロブロックa,b,c,d,eの動きベクトルを用いて、マクロブロックAの動きベクトルを3次元予測し、予測ベクトルと符号化すべきベクトルとの誤差のみを符号化することで、さらに動きベクトルを高能率に圧縮することが可能となる。   Furthermore, using the space-time correlation, the motion vector of the macroblock A is calculated using the motion vectors of the macroblocks B, C, D, E of the frame F1 and the macroblocks a, b, c, d, e of the frame F0. By performing three-dimensional prediction and encoding only the error between the prediction vector and the vector to be encoded, the motion vector can be further highly efficiently compressed.

動きベクトルの3次元予測は、例えば、時空間に隣接する複数の動きベクトルの中央値あるいは平均値等から、予測ベクトル生成することで実現可能である。   For example, three-dimensional prediction of a motion vector can be realized by generating a prediction vector from a median value or an average value of a plurality of motion vectors adjacent to the space-time.

次に、本発明に関わるマクロブロックスキップの実施形態について説明する。動き補償予測符号化において、符号化すべき予測誤差信号がDCT及び量子化により全て0になったマクロブロックにおいて、符号化オーバヘッドを削減するため、予め定義された所定の条件を満たすマクロブロックにおいては、予想モードや動きベクトル等のマクロブロックのヘッダデータも含めて、一切のデータ符号化せず、次に符号化されるマクロブロックのヘッダにおいて、連続してスキップしたマクロブロックの数だけを符号化し、復号化時はスキップしたマクロブロックに関しては、予め定義された所定のモードでの復号化を行うものとする。   Next, a macroblock skip embodiment according to the present invention will be described. In the macro block in which the prediction error signal to be encoded becomes 0 by DCT and quantization in the motion compensated predictive encoding, in order to reduce the encoding overhead, in the macro block that satisfies the predetermined condition, Encoding only the number of macroblocks skipped continuously in the header of the macroblock to be encoded next without encoding any data, including the macroblock header data such as the prediction mode and motion vector, It is assumed that the macroblock skipped at the time of decoding is decoded in a predetermined mode defined in advance.

本発明の実施形態に関わるマクロブロックスキップの第1の態様では、予測に用いる参照フレームが予め定められたもの、動きベクトルの要素が全て0、符号化すべき予測誤差信号が全て0、の全ての条件を満たすものをマクロブロックスキップとして定義し、復号時は予め定められた参照フレームから、動きベクトルが0である場合と同様に予測マクロブロックを生成し、生成された予測マクロブロックを復号化されたマクロブロック信号として再生する。   In the first aspect of the macroblock skip according to the embodiment of the present invention, all reference frames used for prediction are predetermined, all motion vector elements are 0, and all prediction error signals to be encoded are 0. A condition that satisfies the condition is defined as a macroblock skip, and when decoding, a predicted macroblock is generated from a predetermined reference frame in the same manner as when the motion vector is 0, and the generated predicted macroblock is decoded. As a macroblock signal.

ここで、直前の2フレームの線形和を参照フレームとするということを参照フレームのスキップ条件とすることで、フェード画像等の信号強度が時間的に変化する映像においても、マクロブロックスキップを発生させることが可能となり、符号化効率を向上させることが可能となる。また、各フレームのヘッダデータとして、スキップ条件となる参照フレームのインデックスを送り、フレーム毎にスキップ条件を可変とする構成でもよい。フレームスキップ条件を、フレーム毎に可変にすることで、入力画像の性質に合わせて最適なスキップ条件を設定し、符号化オーバーヘッドを削減することが可能となる。   Here, by setting the linear sum of the previous two frames as a reference frame as a reference frame skip condition, macroblock skip is generated even in a video whose signal intensity changes with time, such as a fade image. Therefore, it is possible to improve the encoding efficiency. Alternatively, a configuration may be adopted in which an index of a reference frame serving as a skip condition is sent as header data of each frame, and the skip condition is variable for each frame. By making the frame skip condition variable for each frame, it is possible to set an optimal skip condition in accordance with the nature of the input image and to reduce the coding overhead.

本発明の実施形態に関わるマクロブロックスキップの第2の態様では、動きベクトルは予測符号化するものとし、動きベクトルの誤差信号が0の場合をマクロブロックスキップ条件とする。その他の条件は、マクロブロックスキップの上述した第1の態様と同様である。この第2の態様では、スキップしたマクロブロックの復号時は、まず予測動きベクトルを生成して、生成された予測動きベクトルを用いて、所定の参照フレームから予測画像を生成し、マクロブロックの復号化信号とする。   In the second mode of the macroblock skip according to the embodiment of the present invention, the motion vector is assumed to be predictive-coded, and the case where the motion vector error signal is 0 is set as the macroblock skip condition. Other conditions are the same as in the above-described first mode of macroblock skip. In the second aspect, when a skipped macroblock is decoded, a prediction motion vector is first generated, a prediction image is generated from a predetermined reference frame using the generated prediction motion vector, and decoding of the macroblock is performed. Signal.

本発明の実施形態に関わるマクロブロックスキップの第3の態様では、符号化すべき動きベクトル情報が直前のマクロブロックで符号化された動きベクトル情報と同一であることをスキップ条件とする。ここで、符号化すべき動きベクトル情報とは、動きベクトルの予測符号化を行う場合は、予測誤差ベクトルであり、予測符号化をしない場合は、動きベクトルそのものである。その他の条件は、上述した第1の態様と同様である。   In the third aspect of the macroblock skip according to the embodiment of the present invention, the skip condition is that the motion vector information to be encoded is the same as the motion vector information encoded in the immediately preceding macroblock. Here, the motion vector information to be encoded is a prediction error vector when performing motion vector predictive encoding, and is a motion vector itself when not performing predictive encoding. Other conditions are the same as in the first aspect described above.

この第3の態様では、スキップしたマクロブロックの復号時は、まず、符号化されるべき動きベクトル情報が0であるとして、動きベクトルの再生を行い、再生された動きベクトルに従って、所定の参照フレームから予測画像を生成し、マクロブロックの復号化信号とする。   In this third mode, when a skipped macroblock is decoded, first, motion vector information is reproduced assuming that the motion vector information to be encoded is 0, and a predetermined reference frame is reproduced according to the reproduced motion vector. A predicted image is generated from the above and used as a decoded signal of a macroblock.

本発明の実施形態に関わるマクロブロックスキップの第4の態様では、予測に用いる参照フレームの組み合わせが、直前に符号化されたマクロブロックと同一であり、他のスキップ条件は、上述した第1の態様と同じ構成とする。   In the fourth aspect of macroblock skip according to the embodiment of the present invention, the combination of reference frames used for prediction is the same as the macroblock encoded immediately before, and other skip conditions are the above-described first It is set as the same structure as an aspect.

本発明の実施形態に関わるマクロブロックスキップの第5の態様では、予測に用いる参照フレームの組み合わせが、直前に符号化されたマクロブロックと同一であり、他のスキップ条件は、上述した第2の態様と同じ構成とする。   In the fifth aspect of the macroblock skip according to the embodiment of the present invention, the combination of reference frames used for prediction is the same as that of the macroblock encoded immediately before, and other skip conditions are the above-described second conditions. It is set as the same structure as an aspect.

本発明に関わるマクロブロックスキップの第6の態様では、予測に用いる参照フレームの組み合わせが、直前に符号化されたマクロブロックと同一であり、他のスキップ条件は、上述した第3の態様と同じ構成とする。   In the sixth aspect of the macroblock skip according to the present invention, the combination of reference frames used for prediction is the same as that of the macroblock encoded immediately before, and other skip conditions are the same as those of the third aspect described above. The configuration.

上記第1から第6の態様のいずれのスキップ条件においても、隣接マクロブロック間の動きや信号強度の時間変化の相関が高いという性質を利用し、効率的にマクロブロックスキップを発生させ、符号化オーバヘッドを低減し、高能率な符号化を実現することが可能となる。   In any of the skip conditions of the first to sixth aspects, the macroblock skip is efficiently generated and encoded using the property that the correlation between the motions of adjacent macroblocks and the temporal change in signal strength is high. It is possible to reduce overhead and realize highly efficient encoding.

(第4の実施形態)
図19に、本発明の第4の実施形態に係る動画像符号化装置の構成を示す。本実施形態では、図8で示した第3の実施形態に係る動画像符号化装置に線形予測係数推定器701が付加された構成となっている。線形予測係数推定器701では、参照フレームと符号化対象フレームとのフレーム間距離や、入力フレームのフレーム内DC成分の時間変化などに応じて、複数参照フレームからの線形予測における予測係数の決定を行う。以下、具体的な予測係数決定に関する、複数の実施形態について説明する。
(Fourth embodiment)
FIG. 19 shows the configuration of a moving picture encoding apparatus according to the fourth embodiment of the present invention. In this embodiment, a linear prediction coefficient estimator 701 is added to the moving picture coding apparatus according to the third embodiment shown in FIG. The linear prediction coefficient estimator 701 determines a prediction coefficient in linear prediction from a plurality of reference frames according to the interframe distance between the reference frame and the encoding target frame, the temporal change of the intra-frame DC component of the input frame, and the like. Do. Hereinafter, a plurality of embodiments regarding specific prediction coefficient determination will be described.

図20は、過去2フレームからの線形和により予測する場合を示しており、符号化対象フレームF2に対して、参照フレームF0,F1が用いられる。Ra,Rbは、各参照フレームF0,F1と符号化対象フレームF2とのフレーム間距離を示している。参照フレームF0、F1に対する線形予測係数をそれぞれW0,W1とする。第1線形予測係数の組は(0.5,0.5)とし、すなわち2つの参照フレームの単純平均とする。第2線形予測係数は、フレーム間距離に応じた線形外挿により決定される。図20の例では、式(2)のようになる。例えば、フレーム間隔が一定の場合は、Rb=2*Raとなり、式(2)より線形予測係数は(W0,W1)=(−1,2)となる。

Figure 2007049743
FIG. 20 shows a case where prediction is performed using a linear sum from the past two frames, and reference frames F0 and F1 are used for the encoding target frame F2. Ra and Rb indicate interframe distances between the reference frames F0 and F1 and the encoding target frame F2. The linear prediction coefficients for the reference frames F0 and F1 are W0 and W1, respectively. A set of first linear prediction coefficients is (0.5, 0.5), that is, a simple average of two reference frames. The second linear prediction coefficient is determined by linear extrapolation according to the interframe distance. In the example of FIG. 20, it becomes like Formula (2). For example, when the frame interval is constant, Rb = 2 * Ra, and the linear prediction coefficient is (W0, W1) = (− 1, 2) from Equation (2).
Figure 2007049743

式(2)より、各参照フレームと符号化対象フレームとのフレーム間距離が任意に変化した場合でも、適切な線形予測が可能となる。例えばフレームスキップ等を用いた可変フレームレートの符号化や、参照フレームを過去の任意の2フレームを選択した場合でも、高い予測効率を維持することが可能となる。符号化時に、第1予測係数または第2予測係数の何れか一方を固定的に使用してもよいし、また適応的に選択しても良い。予測係数を適応的に選択する具体的な方法については、例えば各フレームのフレーム内の平均輝度値(DC値)を用いて決定することも可能である。   From equation (2), even when the interframe distance between each reference frame and the encoding target frame is arbitrarily changed, appropriate linear prediction is possible. For example, high prediction efficiency can be maintained even when variable frame rate encoding using frame skip or the like, or when two arbitrary past frames are selected as reference frames. At the time of encoding, either the first prediction coefficient or the second prediction coefficient may be used in a fixed manner, or may be selected adaptively. A specific method for adaptively selecting the prediction coefficient can be determined using, for example, an average luminance value (DC value) in each frame.

各フレームF0,F1,F2のフレーム内の平均輝度値をそれぞれDC(F0),DC(F1),DC(F2)とし、フレーム内DC成分について、各線形予測係数を用いた場合の予測誤差の大きさを、式(3)及び(4)のように計算する。

Figure 2007049743
The average luminance values in the frames F0, F1, and F2 are DC (F0), DC (F1), and DC (F2), respectively, and the prediction error in the case where each linear prediction coefficient is used for the DC component in the frame. The size is calculated as in equations (3) and (4).
Figure 2007049743

式(3)の値が式(4)の値より小さければ第1予測係数を選択し、式(4)の値が式(3)の値より小さければ第2予測係数を選択する。これらの予測係数は、符号化対象フレーム毎に変化させることで、映像信号の特性に応じて最適な、線形予測が可能となる。フレーム内DC値の比を用いて、第3及び第4予測係数を式(5)または(6)に示すようにフレーム毎に決定しても、効率的な線形予測が可能である。

Figure 2007049743
If the value of Expression (3) is smaller than the value of Expression (4), the first prediction coefficient is selected, and if the value of Expression (4) is smaller than the value of Expression (3), the second prediction coefficient is selected. By changing these prediction coefficients for each frame to be encoded, optimal linear prediction can be performed according to the characteristics of the video signal. Even if the third and fourth prediction coefficients are determined for each frame as shown in the equation (5) or (6) using the ratio of the DC value in the frame, efficient linear prediction is possible.
Figure 2007049743

式(5)に示す第3線形予測係数は、フレーム内DC値の比を加味した重みつき平均であり、式(6)に示す第4線形予測係数は、フレーム内DC値の比とフレーム間距離を加味した線形予測である。上記した第2から第6線形予測係数では、線形予測の際に除算を必要とするが、演算精度を符号化時と復号化時に一致させることで、除算を用いず乗算とビットシフトによる線形予測が可能となる。   The third linear prediction coefficient shown in Expression (5) is a weighted average that takes into account the ratio of the DC values within the frame, and the fourth linear prediction coefficient shown in Expression (6) is the ratio between the DC value within the frame and the inter-frame DC value. It is a linear prediction that takes distance into account. In the above second to sixth linear prediction coefficients, division is required for linear prediction, but linear prediction by multiplication and bit shift is performed without using division by matching the calculation accuracy at the time of encoding and decoding. Is possible.

具体的なシンタックスとしては、図10に示した例のように、2のべき乗の分母と整数の分子で、各線形予測係数を表現すればよい。図21は、時間的に前後の2フレームからの線形和により予測する場合を示しており、図中のF1が符号化対象フレーム、F0,F2がそれぞれ参照フレーム示す。またRa,Rbは各参照フレームと符号化対象フレームとのフレーム間距離を示している。また、参照フレームF0、F2に対する線形予測係数をそれぞれW0,W2とする。また、各フレームの輝度値のフレーム内平均値をDC(F0),DC(F1),DC(F2)とする。図20の場合と同様の4種類の予測係数の組の例を、式(7)〜式(10)に示す。

Figure 2007049743
As a specific syntax, each linear prediction coefficient may be expressed by a denominator of power of 2 and an integer numerator as in the example shown in FIG. FIG. 21 shows a case where prediction is performed by a linear sum from two frames preceding and following in time, F1 in the figure indicates an encoding target frame, and F0 and F2 indicate reference frames, respectively. Ra and Rb indicate the inter-frame distance between each reference frame and the encoding target frame. Also, the linear prediction coefficients for the reference frames F0 and F2 are W0 and W2, respectively. In addition, the average value of the luminance value of each frame is assumed to be DC (F0), DC (F1), and DC (F2). Expressions (7) to (10) show examples of sets of four types of prediction coefficients similar to the case of FIG.
Figure 2007049743

式(7)は単純平均予測、式(8)はフレーム間距離の重みつき平均予測、式(9)はDC値の比に基づく重みつき予測、式(10)はDC値の比とフレーム間距離に基づく重みつき予測である。   Equation (7) is a simple average prediction, Equation (8) is a weighted average prediction of interframe distance, Equation (9) is a weighted prediction based on a ratio of DC values, and Equation (10) is a ratio of DC values to an interframe. It is a weighted prediction based on distance.

図22は、過去3フレームからの線形和による予測を行う場合を示しており、F0,F1,F2が参照フレーム、F3が符号化対象フレームである。各参照フレームF0,F1,F2と符号化対象フレームF3とのフレーム間距離は、それぞれRc,Rb,Raで示される。図22においても、複数の線形予測係数の組が考えられる。その具体例を以下に示す。ここで、各参照フレームに対する線形予測係数をW0、W1,W2とする。   FIG. 22 shows a case of performing prediction by linear sum from the past three frames, where F0, F1, and F2 are reference frames, and F3 is a frame to be encoded. The interframe distances between the reference frames F0, F1, and F2 and the encoding target frame F3 are indicated by Rc, Rb, and Ra, respectively. Also in FIG. 22, a set of a plurality of linear prediction coefficients can be considered. Specific examples are shown below. Here, it is assumed that the linear prediction coefficients for each reference frame are W0, W1, and W2.

第1予測係数の組を式(11)に示す。第1予測係数は、3つの参照フレームからの単純平均予測である。第1予測係数の組による予測画像aF3 012 は、式(12)で示される。

Figure 2007049743
A set of first prediction coefficients is shown in Equation (11). The first prediction coefficient is a simple average prediction from three reference frames. A predicted image aF 3 012 based on the first set of prediction coefficients is expressed by Expression (12).
Figure 2007049743

第2、第3及び第4予測係数は、3つの参照フレームから2フレームを選択して、式(2)と同様に線形外挿による外挿予測を行うための係数であり、参照フレームF2及びF1から予測した符号化対象フレームF3の予測画像をeF3 12 とし、参照フレームF2及びF0から予測した符号化対象フレームF3の予測画像をeF3 02,参照フレームF1及びF0から予測した符号化対象フレームF3の予測画像をeF3 01 とすると、それぞれ式(13)(14)(15)で示される。

Figure 2007049743
The second, third, and fourth prediction coefficients are coefficients for selecting two frames from three reference frames and performing extrapolation prediction by linear extrapolation in the same manner as Expression (2). The prediction image of the encoding target frame F3 predicted from F1 is set to eF 3 12, and the prediction image of the encoding target frame F3 predicted from the reference frames F2 and F0 is set to eF 3 02 and the encoding target predicted from the reference frames F1 and F0. Assuming that the predicted image of the frame F3 is eF 3 01 , it is represented by the equations (13), (14), and (15), respectively.
Figure 2007049743

また、式(13)〜(15)を平均化した予測値をeF3 012 とすると、eF3 012 は式(16)で示され、これを第5予測係数とする。

Figure 2007049743
Also, assuming that a predicted value obtained by averaging equations (13) to (15) is eF 3 012 , eF 3 012 is represented by equation (16), which is the fifth prediction coefficient.
Figure 2007049743

上記第1から第5線形予測係数のどれか一つを用いても良いし、また、各フレームF0,F1,F2,F3それぞれのフレーム内平均輝度値DC(F0),DC(F1),DC(F2),DC(F3)を計算し、符号化対象フレームF3のフレーム内平均輝度値を上記5種類の線形予測で予測し、その予測誤差が最も小さい線形予測係数を符号化対象フレーム毎に切り替えて用いる構成でもよい。後者の構成を用いれば、入力画像の性質に合わせて最適な線形予測がフレーム単位に自動的に選択され、高能率な符号化が実現できる。   Any one of the first to fifth linear prediction coefficients may be used, and the average luminance values DC (F0), DC (F1), and DC in the frames F0, F1, F2, and F3, respectively. (F2) and DC (F3) are calculated, the intraframe average luminance value of the encoding target frame F3 is predicted by the above five types of linear prediction, and the linear prediction coefficient with the smallest prediction error is calculated for each encoding target frame. The structure used by switching may be used. If the latter configuration is used, an optimal linear prediction is automatically selected for each frame in accordance with the properties of the input image, and highly efficient encoding can be realized.

また、各フレームの平均輝度の比を上記第1から第5各線形予測係数に乗じた予測係数を用いる構成でもよい。例えば、第1予測係数に平均輝度値の比を乗じた場合は、予測係数は式(17)となる。上記他の予測係数についても同様である。

Figure 2007049743
Moreover, the structure using the prediction coefficient which multiplied the ratio of the average brightness | luminance of each flame | frame to each said 1st-5th linear prediction coefficient may be sufficient. For example, when the first prediction coefficient is multiplied by the ratio of the average luminance value, the prediction coefficient is expressed by Expression (17). The same applies to the other prediction coefficients.
Figure 2007049743

図23は、過去2フレームと未来1フレームからの線形和による予測を行う場合を示しており、F0,F1,F3が参照フレーム、F2が符号化対象フレームである。各参照フレームと符号化対象フレームとのフレーム間距離は、それぞれRc,Rb,Raで示される。この場合も、図22の例と同様に、フレーム間距離の比や、フレーム内DC値の比を用いて、複数の予測係数の組を決定することが可能であり、フレーム内DC値の予測誤差から、最適な予測係数の組をフレーム単位に決定することが可能である。
図23の予測構造における式(12)〜(17)に相当する線形予測式または予測係数を式(18)〜(23)にそれぞれ示す。

Figure 2007049743
FIG. 23 shows a case where prediction by linear sum from the past two frames and the future one frame is performed, where F0, F1, and F3 are reference frames, and F2 is an encoding target frame. The interframe distance between each reference frame and the encoding target frame is indicated by Rc, Rb, and Ra, respectively. Also in this case, similarly to the example of FIG. 22, it is possible to determine a set of a plurality of prediction coefficients by using the ratio of the inter-frame distance and the ratio of the intra-frame DC value. From the error, it is possible to determine the optimum set of prediction coefficients for each frame.
Expressions (18) to (23) show linear prediction expressions or prediction coefficients corresponding to the expressions (12) to (17) in the prediction structure of FIG.
Figure 2007049743

図24には、本発明の実施形態に関わる動画像符号化における、動きベクトル探索の第1の例を示す。図24は、図14で示したように連続する2フレームを参照フレームとして予測し、代表する一つの動きベクトルを符号化する場合の動きベクトル探索方法を示している。図中のF2が符号化対象フレームであり、F0及びF1が参照フレームを示している。また、10は符号化対象のマクロブロック示し、12、14,16,18は参照フレームにおける参照マクロブロックの候補の一部を示している。   FIG. 24 shows a first example of motion vector search in moving picture coding according to the embodiment of the present invention. FIG. 24 shows a motion vector search method in the case where two consecutive frames are predicted as reference frames as shown in FIG. 14 and one representative motion vector is encoded. F2 in the figure is the encoding target frame, and F0 and F1 indicate reference frames. Reference numeral 10 denotes a macroblock to be encoded, and 12, 14, 16, and 18 denote a part of reference macroblock candidates in a reference frame.

マクロブロック10に対して最適な動きベクトルを求めるため、動きベクトル探索範囲内で参照フレームF1に対する動きベクトル候補(図24では、動きベクトル候補11,15)と、それをフレーム間距離に応じてスケーリングした動きベクトル(図24では、動きベクトル候補11をスケーリングした動きベクトル13、動きベクトル候補15をスケーリングした動きベクトル17)を参照フレームF0に対する動きベクトルとして用い、2つの参照フレームF0、F1から抽出した参照マクロブロック14と12または16と18の線形和から予測マクロブロックを生成し、予測マクロブロックと符号化対象マクロブロック10との差分値を計算し、その差分値が最も小さくなる動きベクトルを動きベクトル探索結果としてマクロブロック毎に決定し、決定された動きベクトルを用いて、マクロブロック毎の動き補償予測符号化を行う。   In order to obtain an optimal motion vector for the macroblock 10, motion vector candidates for the reference frame F1 (in FIG. 24, motion vector candidates 11 and 15) within the motion vector search range, and scaled according to the interframe distance The motion vectors (in FIG. 24, the motion vector 13 obtained by scaling the motion vector candidate 11 and the motion vector 17 obtained by scaling the motion vector candidate 15) are used as motion vectors for the reference frame F0 and extracted from the two reference frames F0 and F1. A prediction macroblock is generated from the linear sum of the reference macroblocks 14 and 12 or 16 and 18, a difference value between the prediction macroblock and the encoding target macroblock 10 is calculated, and a motion vector having the smallest difference value is moved. Macros as vector search results Tsu determined for each click, using the determined motion vector, motion compensation predictive encoding for each macroblock.

動きベクトル決定の評価方法としては、上記以外にも差分値だけでなく、動きベクトル自体の符号化オーバーヘッドも加味して決定しても良いし、あるいは、差分信号と動きベクトルを実際に符号化したときの符号量が最小となる動きベクトルを選択する構成でもよい。上記のように動きベクトルを探索することで、F0及びF1に対する最適な動きベクトルを個別に探索する場合よりも、より少ない演算量で、正確な動きベクトルを得ることが可能となる。   As an evaluation method for determining a motion vector, in addition to the above, the determination may be made in consideration of not only the difference value but also the encoding overhead of the motion vector itself, or the difference signal and the motion vector are actually encoded. It is also possible to select a motion vector that minimizes the amount of code at that time. By searching for a motion vector as described above, it is possible to obtain an accurate motion vector with a smaller amount of computation than when searching optimal motion vectors for F0 and F1 individually.

図25は、本発明の実施形態に関わる動画像符号化における動きベクトル探索の第2の例を示している。図25は、図24の例と同様に図14で示したように、連続する2フレームを参照フレームとして予測し、代表する一つの動きベクトルを符号化する場合、あるいは代表する一つの動きベクトルと差分ベクトルを符号化する場合の、動きベクトル探索方法を示す。図中のF2が符号化対象フレームであり、F0及びF1が参照フレームを示している。また、10は符号化対象のマクロブロック示し、12、14,16,18は参照フレームにおける参照マクロブロックの候補の一部を示している。   FIG. 25 shows a second example of motion vector search in moving picture coding according to the embodiment of the present invention. FIG. 25 is similar to the example of FIG. 24, as shown in FIG. 14, when two consecutive frames are predicted as reference frames and one representative motion vector is encoded, or one representative motion vector A motion vector search method when a difference vector is encoded will be described. F2 in the figure is the encoding target frame, and F0 and F1 indicate reference frames. Reference numeral 10 denotes a macroblock to be encoded, and 12, 14, 16, and 18 denote a part of reference macroblock candidates in a reference frame.

第2動きベクトル探索では、まず第1動きベクトルと同様に、2つの参照フレーム対する一つの動きベクトルの探索を行う。図25において、動きベクトル11及びそれをスケーリングした動きベクトル13が、最適な動きベクトルとして選択されたものとする。次に、動きベクトル13の近傍領域で、フレームF0からの参照マクロブロックに対する動きベクトルの再探索を行う。再探索の際は、フレームF1から動きベクトル11を用いて抽出す参照マクロブロック12は固定とし、参照マクロブロック12と、フレームF0の動きベクトル13の近傍から抽出した参照マクロブロック14との線形和により予測マクロブロックを生成し、予測マクロブロックと符号化対象マクロブロックの差分が最小になるように、フレームF0に対する動きベクトルの再探索を行う。   In the second motion vector search, first, similarly to the first motion vector, one motion vector is searched for two reference frames. In FIG. 25, it is assumed that the motion vector 11 and the motion vector 13 obtained by scaling the motion vector 11 are selected as optimal motion vectors. Next, the motion vector is re-searched for the reference macroblock from the frame F0 in the vicinity region of the motion vector 13. In the re-search, the reference macroblock 12 extracted from the frame F1 using the motion vector 11 is fixed, and the linear sum of the reference macroblock 12 and the reference macroblock 14 extracted from the vicinity of the motion vector 13 of the frame F0 is fixed. To generate a prediction macroblock, and re-search the motion vector for the frame F0 so that the difference between the prediction macroblock and the encoding target macroblock is minimized.

動画像信号が固定フレームレートで、フレームF2とF1、及びF1とF0の間隔が等間隔である場合を例にとると、一定の動きを探索するためには、参照フレームF0に対する探索範囲は、参照フレームF1に対する探索範囲に対して、面積比で4倍の領域を探索する必要があり、F0、F1の両参照フレームに対して、同じ精度の動きベクトル探索を行うと、F1だけからの予測における動きベクトル探索に比べて、4倍の演算量を必要とする。   In the case where the moving image signal has a fixed frame rate and the frames F2 and F1 and the intervals between F1 and F0 are equal, for example, in order to search for a certain motion, the search range for the reference frame F0 is: It is necessary to search an area that is four times the area ratio with respect to the search range for the reference frame F1, and if a motion vector search with the same accuracy is performed for both reference frames F0 and F1, prediction from only F1 is performed. Compared to the motion vector search in FIG.

一方、第2動きベクトル探索方法によれば、まず、参照フレームF1に対するフルの精度での動きベクトル探索と、その動きベクトルを2倍にスケーリングした動きベクトルによる参照フレームF0に対する探索をおこない、次に参照フレームF0に対するフルの精度の再探索を行う2段階の構成とすることにより、動きベクトル探索の演算量をほぼ1/4に削減することが可能となる。   On the other hand, according to the second motion vector search method, first, a motion vector search with full accuracy with respect to the reference frame F1, a search with respect to the reference frame F0 by a motion vector obtained by scaling the motion vector twice, and then, By adopting a two-stage configuration for performing full-accuracy re-searching with respect to the reference frame F0, it is possible to reduce the amount of motion vector search computation to almost ¼.

第2動きベクトル探索方法では、参照フレームF0及びF1に対する動きベクトルが別々に求まることになる。これらの動きベクトルの符号化は、まず、参照フレームF1に対する動きベクトル11を符号化し、次に動きベクトル11をスケーリングした動きベクトル13と、参照フレームF0に対して再探索の結果得られた動きベクトルとの差分ベクトルをそれぞれ符号化することで、動きベクトルの符号化オーバーヘッドを低減することが出来る。   In the second motion vector search method, motion vectors for the reference frames F0 and F1 are obtained separately. These motion vectors are encoded by first encoding the motion vector 11 for the reference frame F1, then scaling the motion vector 11 and the motion vector obtained as a result of the re-search for the reference frame F0. By encoding each difference vector, the motion vector encoding overhead can be reduced.

また、再探索範囲が±1、つまり、動きベクトル11をスケーリングした動きベクトル13が1/2の粗い精度であるため、それをフルの精度にするための再探索のみの場合は、再探索された参照フレームF0に対する動きベクトルを1/2にスケーリングすることで、参照フレームF1に対する動きベクトル11は、再探索結果の如何によらず一意に再生することができるため、参照フレームF0に対する動きベクトルだけを符号化すればよい。復号化時は受信した動きベクトルを1/2にスケーリングすれば、参照フレームF1に対する動きベクトル11を得ることが出来る。   Further, since the re-search range is ± 1, that is, the motion vector 13 obtained by scaling the motion vector 11 has a coarse accuracy of ½, the re-search is performed when only the re-search is performed to make it full accuracy. By scaling the motion vector for the reference frame F0 to ½, the motion vector 11 for the reference frame F1 can be uniquely reproduced regardless of the re-search result, so only the motion vector for the reference frame F0 is obtained. May be encoded. At the time of decoding, if the received motion vector is scaled to ½, the motion vector 11 for the reference frame F1 can be obtained.

図26は、本発明の実施形態に関わる動画像符号化における、動きベクトル探索の第3の例を示している。図26は、図24の例と同様に図14で示したように、連続する2フレームを参照フレームとして予測し、代表する一つの動きベクトルを符号化する場合、あるいは代表する一つの動きベクトルと差分ベクトルを符号化する場合の、動きベクトル探索方法を示すものである。図中のF2が符号化対象フレームであり、F0及びF1が参照フレームを示している。また、10は符号化対象のマクロブロック示し、12、14,16,18は参照フレームにおける参照マクロブロックの候補の一部を示している。   FIG. 26 shows a third example of motion vector search in moving picture coding according to the embodiment of the present invention. As in the example of FIG. 24, FIG. 26 shows a case where two consecutive frames are predicted as reference frames and one representative motion vector is encoded, or one representative motion vector and The motion vector search method in the case of encoding a difference vector is shown. F2 in the figure is the encoding target frame, and F0 and F1 indicate reference frames. Reference numeral 10 denotes a macroblock to be encoded, and 12, 14, 16, and 18 denote a part of reference macroblock candidates in a reference frame.

第3動きベクトル探索では、第1の例あるいは第2の例と同様に、参照フレームF0及びF1に対する動きベクトルを探索し、さらに参照フレームF1に対する動きベクトルを再探索するという構成である。一般に動画像では、時間的に近いフレーム間の相関が強いという性質を利用し、第3動きベクトル探索では、符号化対象フレームF2に時間的に最も近い参照フレームF1に対する動きベクトルをより高精度に求めることで、予測効率を向上させることが可能となる。   In the third motion vector search, similarly to the first example or the second example, the motion vector for the reference frames F0 and F1 is searched, and the motion vector for the reference frame F1 is searched again. In general, a moving image utilizes the property that the correlation between temporally close frames is strong, and in the third motion vector search, the motion vector for the reference frame F1 closest in time to the encoding target frame F2 is more accurately determined. By obtaining, it becomes possible to improve the prediction efficiency.

図27は、本発明の実施形態に関わる動きベクトル符号化方法を示している。図中F2は符号化対象フレーム、F1は直前に符号化されたフレームを示し、30、31はそれぞれ符号化すべきマクロブロックであり、32,33はフレームF1におけるマクロブロック30及び31とフレーム内の同じ位置のマクロブロックを示している。また、34,35はそれぞれマクロブロック30、31の符号化すべき動きベクトルを示しており、36,37はマクロブロック32及び33の符号化された動きベクトルを示す。   FIG. 27 shows a motion vector encoding method according to the embodiment of the present invention. In the figure, F2 indicates a frame to be encoded, F1 indicates a frame encoded immediately before, 30 and 31 are macroblocks to be encoded, and 32 and 33 are macroblocks 30 and 31 in the frame F1 and in the frame, respectively. Macroblocks at the same position are shown. Reference numerals 34 and 35 denote motion vectors to be encoded of the macro blocks 30 and 31, respectively. Reference numerals 36 and 37 denote encoded motion vectors of the macro blocks 32 and 33, respectively.

本実施形態では、符号化すべき動きベクトルが直前の符号化対象フレームの同じ位置のマクロブロックにおける動きベクトルと同一である場合、動きベクトルは符号化せずに、動きベクトルが直前の符号化対象フレームにおける同一位置のマクロブロックと同一であることを示すフラグを予測モードとして符号化する。また、動きベクトルが直前の符号化対象フレームにおける同一位置のマクロブロックと同一でなければ、動きベクトル情報の符号化を行う。図27の例では、動きベクトル34と36が同一であり、従って動きベクトル34は符号化せず、また動きベクトル35と動きベクトル37は異なるため、動きベクトル35の情報は符号化を行う。   In this embodiment, when the motion vector to be encoded is the same as the motion vector in the macroblock at the same position in the immediately preceding encoding target frame, the motion vector is not encoded and the motion vector is immediately before the encoding target frame. A flag indicating that it is the same as the macroblock at the same position in is encoded as a prediction mode. If the motion vector is not the same as the macro block at the same position in the immediately preceding encoding target frame, the motion vector information is encoded. In the example of FIG. 27, since the motion vectors 34 and 36 are the same, the motion vector 34 is not encoded, and the motion vector 35 and the motion vector 37 are different, so the information of the motion vector 35 is encoded.

上記のように動きベクトル情報の符号化を行うことで、静止画像や時間的に一様な動きをしている場合に、動きベクトル情報の冗長性が低減され、符号化効率を向上させることが可能である。   By encoding motion vector information as described above, redundancy of motion vector information can be reduced and encoding efficiency can be improved when still images or temporally uniform motion is performed. Is possible.

図28は、本発明の実施形態に関わる他の動きベクトル符号化方法を示している。図28の例は、図27の例と同様に直前の符号化対象フレームにおける、同一位置のマクロブロックの動きベクトルと、符号化すべきマクロブロックの動きベクトルが同一の場合は、動きベクトルを符号化しないものであるが、動きベクトルの同一性の判断は、動きの角度が同一かどうかの判断を行うものである。図28において、F3が符号化対象フレームであり、フレームF3におけるマクロブロック40及び41は、直前の符号化対象フレームF2を参照フレームとし、動きベクトル44及び45を用いた動き補償予測を行う。フレームF1の直前の符号化対象フレームF2における、マクロブロック40同一位置のマクロブロック42では、フレームF2から2フレーム前のフレームF0を参照フレームとし、動きベクトル46を用いた動き補償予測を行うものとする。   FIG. 28 shows another motion vector encoding method according to the embodiment of the present invention. In the example of FIG. 28, when the motion vector of the macroblock at the same position and the motion vector of the macroblock to be encoded are the same in the immediately preceding encoding target frame as in the example of FIG. 27, the motion vector is encoded. Although it is not, the determination of the identity of the motion vectors is to determine whether or not the angles of motion are the same. In FIG. 28, F3 is an encoding target frame, and the macroblocks 40 and 41 in the frame F3 perform motion compensation prediction using the motion vectors 44 and 45 with the immediately preceding encoding target frame F2 as a reference frame. In the macroblock 42 in the same position as the macroblock 40 in the encoding target frame F2 immediately before the frame F1, the frame F0 two frames before the frame F2 is used as a reference frame, and motion compensation prediction using the motion vector 46 is performed. To do.

動きベクトル46と動きベクトル44は同一の角度を示しており、参照フレームとの距離が2倍違うため、ベクトルの大きさが2倍になっている。従って、動きベクトル44は、動きベクトル46をフレーム間距離に応じてスケーリングすることで再生可能であるため、動きベクトル44は符号化せずに、直前のフレームの動きベクトルを使うモードであることを示す予測モード情報を設定する。   The motion vector 46 and the motion vector 44 indicate the same angle, and the distance from the reference frame is twice different, so the size of the vector is doubled. Therefore, since the motion vector 44 can be reproduced by scaling the motion vector 46 in accordance with the distance between frames, the motion vector 44 is a mode that uses the motion vector of the immediately preceding frame without encoding. The prediction mode information to be shown is set.

また、マクロブロック41における動きベクトル45と、その直前フレームの同一位置のマクロブロック43における動きベクトル47とは、動きベクトルが同一角度を示しており、マクロブロック40と同様に動きベクトル45は符号化されない。上記のように動きベクトルが符号化されなかったマクロブロックについては、直前の符号化対象フレームの同一位置の動きベクトルを符号化対象フレームと参照フレームとのフレーム間距離に応じてスケーリングした動きベクトルを用いて、動き補償予測フレーム間符号化及び復号化を行う。   The motion vector 45 in the macroblock 41 and the motion vector 47 in the macroblock 43 at the same position in the immediately preceding frame have the same angle, and the motion vector 45 is encoded in the same way as the macroblock 40. Not. For macroblocks for which no motion vector is encoded as described above, a motion vector obtained by scaling the motion vector at the same position in the immediately previous encoding target frame according to the interframe distance between the encoding target frame and the reference frame is used. The motion compensated prediction interframe encoding and decoding are performed.

図29は、本発明の実施形態に関わる、マクロブロックスキップ及び参照フレームを示すインデックスの予測符号化を説明する図である。図中F3が符号化対象フレームであり、Aが符号化対象マクロブロック、B,C,D,Eが既に符号化された隣接マクロブロックを示す。また、F0,F1,F2は参照フレームであり、マクロブロック毎に一つまたは複数の参照フレームが選択されて動き補償予測符号化が行われる。マクロブロックAでは、フレームF1を参照フレームとして動きベクトル50による予測が行われ、マクロブロックB、C、Eでは、フレームF2、F1,F0をそれぞれ参照フレームとして、動きベクトル51、52,55による予測がそれぞれ行われる。また、マクロブロックDについては、F1及びF2の2つの参照フレームを用いた予測が行われる。マクロブロックAの動きベクトル50の符号化は、隣接マクロブロックB,C,D,Eの動きベクトルから予測ベクトルを選択し、予測ベクトルとマクロブロックAの動きベクトル50との差分ベクトルが符号化される。   FIG. 29 is a diagram illustrating predictive coding of a macroblock skip and an index indicating a reference frame according to the embodiment of the present invention. In the figure, F3 is an encoding target frame, A is an encoding target macroblock, and B, C, D, and E are adjacent macroblocks that have already been encoded. Further, F0, F1, and F2 are reference frames, and one or a plurality of reference frames are selected for each macroblock, and motion compensation prediction encoding is performed. In macroblock A, prediction is performed using motion vector 50 using frame F1 as a reference frame, and in macroblocks B, C, and E, prediction using motion vectors 51, 52, and 55 is performed using frames F2, F1, and F0 as reference frames, respectively. Each is done. For the macroblock D, prediction using two reference frames F1 and F2 is performed. For encoding the motion vector 50 of the macroblock A, a prediction vector is selected from the motion vectors of the adjacent macroblocks B, C, D, and E, and a difference vector between the prediction vector and the motion vector 50 of the macroblock A is encoded. The

予測ベクトルの決定は、例えば、隣接マクロブロックB,C,Eの動きベクトルの中央値となる動きベクトルを選択する方法や、あるいは、隣接マクロブロックB,C,D,Eの中で残差信号の大きさが最も小さいマクロブロックの動きベクトルを予測ベクトルとする等の方法で行う。   The prediction vector is determined by, for example, a method of selecting a motion vector that is a median of motion vectors of adjacent macroblocks B, C, and E, or a residual signal in adjacent macroblocks B, C, D, and E The motion vector of the macroblock with the smallest size is used as a prediction vector.

ここで、予測ベクトルと符号化すべきマクロブロックの動きベクトルとの差分が0となり、また、予測ベクトルが選択されたマクロブロックの参照フレームと、符号化すべきマクロブロックの参照フレームとが一致し、さらに符号化すべき予測誤差信号がすべて0となった場合は、マクロブロックの符号化はせずにスキップさせ、連続してスキップしたマクロブロックの数を次にスキップされずに符号化されるマクロブロックのヘッダ情報として符号化する。例えば、マクロブロックAに対する予測ベクトルがマクロブロックCの動きベクトル52となった場合、マクロブロックAとマクロブロックCとでは参照フレームは一致しており、また、動きベクトル50と動きベクトル52が一致しており、マクロブロックAの予測誤差信号が全て0である場合、マクロブロックAは符号化されずスキップされる。復号化時は、符号化時と同様の方法で予測ベクトルを選択し、予測ベクトルが選択されたマクロブロックの参照フレームを用いて予測画像を生成し、生成された予測画像をスキップしたマクロブロックの復号化画像とする。   Here, the difference between the prediction vector and the motion vector of the macroblock to be encoded is 0, the reference frame of the macroblock for which the prediction vector is selected matches the reference frame of the macroblock to be encoded, and When all the prediction error signals to be encoded are 0, the macro block is skipped without encoding, and the number of macro blocks skipped successively is encoded next without skipping. Encode as header information. For example, when the prediction vector for the macroblock A becomes the motion vector 52 of the macroblock C, the reference frames in the macroblock A and the macroblock C match, and the motion vector 50 and the motion vector 52 match. If the prediction error signals of the macroblock A are all zero, the macroblock A is skipped without being encoded. At the time of decoding, a prediction vector is selected in the same manner as at the time of encoding, a prediction image is generated using the reference frame of the macroblock for which the prediction vector is selected, and the generated prediction image is skipped. Let it be a decoded image.

上記マクロブロックスキップの少なくとも一つ以上の条件が満たされない場合は、予測ベクトルと符号化すべきマクロブックの動きベクトルとの差分ベクトルと、予測誤差信号と、参照フレームを示すインデックスを符号化する。   When at least one condition of the macroblock skip is not satisfied, a difference vector between a prediction vector and a motion vector of a macrobook to be encoded, a prediction error signal, and an index indicating a reference frame are encoded.

参照フレームを示すインデックスは、予測ベクトルが選択された隣接マクロブロックの参照フレームインデックスと、符号化対象フレームの参照フレームインデックスの差分値を符号化する。   The index indicating the reference frame encodes a difference value between the reference frame index of the adjacent macroblock for which the prediction vector is selected and the reference frame index of the encoding target frame.

上記の例のように、マクロブロックCの動きベクトル52がマクロブロックAの予測ベクトルとして選択された場合、動きベクトル50と動きベクトル52の差分ベクトルと、マクロブロックAの予測誤差信号が符号化され、また、例えば図11のテーブルに従って、参照フレームをインデックス(Code_number)で表現し、マクロブロックCの2フレーム前の参照フレームを示すインデックス2と、マクロブロックAの同インデックス2との差分値、すなわち0を参照フレームインデックス差分値として符号化する。   When the motion vector 52 of the macroblock C is selected as the prediction vector of the macroblock A as in the above example, the difference vector between the motion vector 50 and the motion vector 52 and the prediction error signal of the macroblock A are encoded. Further, for example, according to the table of FIG. 11, the reference frame is expressed by an index (Code_number), and the difference value between the index 2 indicating the reference frame two frames before the macroblock C and the index 2 of the macroblock A, that is, 0 is encoded as a reference frame index difference value.

図30は、本発明の実施形態に関わる他の動きベクトル符号化方法を示してている。図30において、フレームF2が符号化対象フレームを示しており、フレームF2は時間的に前後のフレームから動き補償予測を行うBピクチャであり、フレームF2におけるマクロブロック61では、フレームF3を後方予測の参照フレームとし、フレームF1を前方予測の参照フレームとしている。従って、フレームF3の符号化あるいは復号化は、F2の符号化あるいは復号化に先立って行われる。   FIG. 30 shows another motion vector encoding method according to the embodiment of the present invention. In FIG. 30, a frame F2 indicates an encoding target frame, and the frame F2 is a B picture that performs motion compensation prediction from temporally preceding and succeeding frames. In the macroblock 61 in the frame F2, the frame F3 is subjected to backward prediction. A reference frame is used, and a frame F1 is used as a reference frame for forward prediction. Therefore, the encoding or decoding of the frame F3 is performed prior to the encoding or decoding of F2.

ここで、符号化対象マクロブロック61における後方予測の参照フレームF3において、符号化対象マクロブロック61とフレーム内の同一位置のマクロブロック60に着目する。マクロブロック60が、フレームF0及びフレームF1の2フレームからの線形和による動き補償予測が用いられている場合、符号化対象マクロブロック61の前方予測の参照フレームF1に対するマクロブロック60の動きベクトル(図中62)をフレーム間距離に応じてスケーリングし、符号化対象マクロブロック61の前方予測及び後方予測の動きベクトルとして用いる。   Here, in the reference frame F3 for backward prediction in the encoding target macroblock 61, attention is focused on the macroblock 60 at the same position in the frame as the encoding target macroblock 61. When motion compensated prediction based on a linear sum from two frames F0 and F1 is used for the macroblock 60, the motion vector of the macroblock 60 with respect to the reference frame F1 for forward prediction of the encoding target macroblock 61 (see FIG. Medium 62) is scaled according to the inter-frame distance and used as a motion vector for forward prediction and backward prediction of the encoding target macroblock 61.

すなわち、フレームF1からフレームF2までのフレーム間距離をR1、フレームF2からフレームF3までのフレーム間距離をR2とすると、動きベクトル62に対してR1/(R1+R2)倍したものがマクロブロック61の前方予測の動きベクトル64となり、−R2/(R1+R2)倍したものがマクロブロック61の後方予測の動きベクトル65となる。   That is, if the interframe distance from the frame F1 to the frame F2 is R1, and the interframe distance from the frame F2 to the frame F3 is R2, the motion vector 62 multiplied by R1 / (R1 + R2) is the front of the macroblock 61. The motion vector 64 for prediction is multiplied by −R2 / (R1 + R2) to become the motion vector 65 for backward prediction of the macroblock 61.

符号化対象マクロブロック61では、上記動きベクトル情報は符号化せずに、上記の予測モード、すなわち、動きベクトルのスケーリングによる両方向予測を行うことを示すフラグのみを符号化する。   In the encoding target macroblock 61, the motion vector information is not encoded, and only the flag indicating that the prediction mode, that is, bidirectional prediction based on the scaling of the motion vector is performed, is encoded.

復号化時は、まずフレームF3が復号化され、フレームF3における復号化された各マクロブロックの動きベクトルが一時的に保存される。次にフレームF2において、上記の予測モードを示すフラグが設定されているマクロブロックにおいては、一時保存されているフレームF3における同一位置のマクロブロックの動きベクトルをスケーリングすることで、マクロブロック60における前方予測及び後方予測それぞれの動きベクトルを算出し、両方向予測復号化を行う。   At the time of decoding, the frame F3 is first decoded, and the motion vector of each decoded macroblock in the frame F3 is temporarily stored. Next, in the macro block in which the flag indicating the prediction mode is set in the frame F2, the motion vector of the macro block at the same position in the temporarily stored frame F3 is scaled, so that Motion vectors for prediction and backward prediction are calculated, and bidirectional prediction decoding is performed.

図31は、図30で示した両方向予測の別の例であり、図31では、フレームF2の符号化対象マクロブロック71の前方予測の参照フレームがF0であり、その他は図30と同様である。この場合、符号化対象マクロブロック71の前方及び後方の動きベクトルは、フレームF3の符号化対象マクロブロック71と同一位置のマクロブロック70の、フレームF0に対する動きベクトル73をフレーム間距離に応じてスケーリングして求める。   FIG. 31 is another example of the bi-directional prediction shown in FIG. 30. In FIG. 31, the reference frame for forward prediction of the encoding target macroblock 71 of the frame F2 is F0, and the others are the same as FIG. . In this case, the forward and backward motion vectors of the encoding target macroblock 71 are scaled according to the interframe distance of the motion vector 73 for the frame F0 of the macroblock 70 at the same position as the encoding target macroblock 71 of the frame F3. And ask.

すなわち、フレームF0からフレームF2までのフレーム間距離をR1,フレームF3からフレームF2までのフレーム間距離をR2,フレームF0からフレームF3までのフレーム間距離をR3とすると、動きベクトル73をR1/R3倍したものを符号化対象マクロブロック71の前方動きベクトル74とし、また、動きベクトル73を−R2/R3倍したものを符号化対象マクロブロック71の後方動きベクトル75とし、動きベクトル74及び動きベクトル75を用いて、符号化対象マクロブロック71の両方向予測符号化及び復号化を行う。   That is, if the interframe distance from the frame F0 to the frame F2 is R1, the interframe distance from the frame F3 to the frame F2 is R2, and the interframe distance from the frame F0 to the frame F3 is R3, the motion vector 73 is R1 / R3. The multiplied motion vector is the forward motion vector 74 of the encoding target macroblock 71, and the motion vector 73 multiplied by -R2 / R3 is the backward motion vector 75 of the encoding target macroblock 71. 75, bi-directional predictive encoding and decoding of the encoding target macroblock 71 is performed.

図30及び図31の例では、符号化対象の両方向予測マクロブロックにおける後方予測の参照フレームにおいて、符号化対象マクロブロックとフレーム内の同一位置のマクロブロックに着目し、そのマクロブロックが複数の前方参照フレームを使用する場合、符号化対象の両方向予測マクロブロックにおける前方参照フレームと同一の参照フレームに対する動きベクトルをスケーリングすることで、符号化対象マクロブロックの前方及び後方動きベクトルを生成する。   In the example of FIGS. 30 and 31, in the reference frame for backward prediction in the bidirectional prediction macroblock to be encoded, attention is paid to the macroblock at the same position in the frame as the encoding target macroblock, and the macroblock includes a plurality of forward blocks. When the reference frame is used, the forward and backward motion vectors of the encoding target macroblock are generated by scaling the motion vector for the same reference frame as the forward reference frame in the bidirectional prediction macroblock to be encoded.

以上のように、スケーリングにより動きベクトルを生成することで、動きベクトルを符号化する符号化オーバーヘッドを低減し、符号化効率を向上させることが可能となる。さらに、スケーリングのもととなる動きベクトルが複数存在する場合に、前方参照フレームが一致した動きベクトルを選択してスケーリングすることで、予測効率を向上させることが可能となり、高能率な符号化を実現することが可能となる。   As described above, by generating a motion vector by scaling, it is possible to reduce the coding overhead for coding the motion vector and improve the coding efficiency. In addition, when there are multiple motion vectors that are the basis of scaling, it is possible to improve the prediction efficiency by selecting and scaling the motion vectors that match the forward reference frame, enabling highly efficient encoding. It can be realized.

図32は、図30及び図31で示した両方向予測の別の例であり、図32では、フレームF3が符号化対象フレームであり、符号化化対象マクロブロック81が、フレームF4を後方参照フレームとし、フレームF2を前方参照フレームとする両方向予測を行う場合の例である。また、フレームF4におけるマクロブロック81と同一位置のマクロブロック80は、前方の2フレームF0及びF1からの線形和による予測を行っている。従って、図30及び図31と異なり、マクロブロック80と符号化対象マクロブロック81とでは、同一の前方参照フレームが用いられない。   FIG. 32 is another example of the bidirectional prediction shown in FIGS. 30 and 31. In FIG. 32, the frame F3 is the encoding target frame, and the encoding target macroblock 81 sets the frame F4 as the backward reference frame. And bi-directional prediction using the frame F2 as a forward reference frame. Further, the macro block 80 at the same position as the macro block 81 in the frame F4 performs prediction based on the linear sum from the two front frames F0 and F1. Therefore, unlike FIGS. 30 and 31, the macroblock 80 and the encoding target macroblock 81 do not use the same forward reference frame.

この場合、マクロブロック80の前方参照フレームF0,F1のうち、符号化対象マクロブロック81の前方参照フレームF2に最も時間的に近いフレームに対する動きベクトルをフレーム間距離に応じてスケーリングすることで、符号化対象マクロブロック81の前方及び後方ベクトルの生成を行う。すなわち、フレームF2からフレームF3までのフレーム間距離をR1、フレームF4からフレームF3までのフレーム間距離をR2、フレームF1からフレームF4までのフレーム間距離をR3とすると、符号化対象マクロブロック81の前方動きベクトル84は、マクロブロック80のフレームF1に対する動きベクトル82をR1/R3倍することにより得られ、また、符号化対象マクロブロック81の後方動きベクトル85は、動きベクトル82を−R2/R3倍することにより得られる。符号化対象マクロブロック81では、スケーリングにより得られた動きベクトル84及び85を用いて、両方向予測を行う。   In this case, among the forward reference frames F0 and F1 of the macroblock 80, the motion vector for the frame temporally closest to the forward reference frame F2 of the encoding target macroblock 81 is scaled according to the interframe distance, thereby The forward and backward vectors of the conversion target macroblock 81 are generated. That is, if the interframe distance from the frame F2 to the frame F3 is R1, the interframe distance from the frame F4 to the frame F3 is R2, and the interframe distance from the frame F1 to the frame F4 is R3, the encoding target macroblock 81 The forward motion vector 84 is obtained by multiplying the motion vector 82 of the macroblock 80 for the frame F1 by R1 / R3, and the backward motion vector 85 of the encoding target macroblock 81 is the motion vector 82 -R2 / R3. It is obtained by doubling. The encoding target macroblock 81 performs bi-directional prediction using the motion vectors 84 and 85 obtained by scaling.

以上のように、スケーリングにより動きベクトルを生成することで、動きベクトルを符号化する符号化オーバーヘッドを低減し、符号化効率を向上させることが可能となる。さらに、スケーリングのもととなる動きベクトルが複数存在し、且つ前方参照フレームが一致する動きベクトルが無い場合に、符号化対象マクロブロックの前方参照フレームに時間的に最も近い参照フレームに対する動きベクトルを選択してスケーリングすることで、予測効率を向上させることが可能となり、高能率な符号化を実現することが可能となる。   As described above, by generating a motion vector by scaling, it is possible to reduce the coding overhead for coding the motion vector and improve the coding efficiency. Furthermore, when there are a plurality of motion vectors to be scaled and there is no motion vector that matches the forward reference frame, the motion vector for the reference frame that is temporally closest to the forward reference frame of the encoding target macroblock is determined. By selecting and scaling, it becomes possible to improve prediction efficiency and to realize highly efficient encoding.

図33は、本発明の実施形態に関する動画像符号化方法のフローチャートを示す図である。また、図34は、本発明の実施形態に関する重み付き予測を説明する図である。まず、図34を用いて、実施形態に関する重み付き予測を説明を行い、次に図33による重み係数の決定方法について説明する。   FIG. 33 is a diagram showing a flowchart of the moving picture coding method according to the embodiment of the present invention. FIG. 34 is a diagram for explaining weighted prediction according to the embodiment of the present invention. First, the weighted prediction regarding the embodiment will be described with reference to FIG. 34, and then the weight coefficient determination method according to FIG. 33 will be described.

図34において、F0,F1,F2,F3は時間的に連続するフレームを示しており、F3が符号化対象フレームを示している。フレームF0,F1,F2は、符号化対象フレームF3に対する参照フレームである。   In FIG. 34, F0, F1, F2, and F3 indicate temporally continuous frames, and F3 indicates an encoding target frame. Frames F0, F1, and F2 are reference frames for the encoding target frame F3.

符号化対象フレームF3内の符号化対象画素ブロックA,B,C,Dのうち、ブロックA,B,CではそれぞれフレームF1,F0,F2から動き補償を伴う参照画素ブロック信号が生成される。これらの参照画素ブロック信号に対して、重み係数の乗算と直流オフセット値の加算により予測画素ブロック信号が生成される。さらに、予測画素ブロック信号と符号化対象画素ブロック信号との差分が計算され、参照フレームの識別情報、動きベクトル情報ともに差分信号が符号化される。   Among the encoding target pixel blocks A, B, C, and D in the encoding target frame F3, in the blocks A, B, and C, reference pixel block signals with motion compensation are generated from the frames F1, F0, and F2, respectively. A predicted pixel block signal is generated by multiplying these reference pixel block signals by weighting coefficients and adding a DC offset value. Further, the difference between the prediction pixel block signal and the encoding target pixel block signal is calculated, and the difference signal is encoded together with the identification information and the motion vector information of the reference frame.

ブロックDでは、フレームF0及びフレームF1から、それぞれ動き補償を伴って参照ブロック信号が生成され、これらの参照画素ブロック信号の線形結合に直流オフセット値を加算することで予測画素ブロック信号が生成される。符号化対象画素ブロックの信号と予測画素ブロック信号との差分信号が参照フレームの識別情報、動きベクトル情報とともに符号化される。   In the block D, a reference block signal is generated from each of the frames F0 and F1 with motion compensation, and a prediction pixel block signal is generated by adding a DC offset value to a linear combination of these reference pixel block signals. . The difference signal between the encoding target pixel block signal and the predicted pixel block signal is encoded together with the identification information and motion vector information of the reference frame.

一方、復号化時は参照フレームの識別情報及び動きベクトル情報の復号化が行われ、それらに基づいて上記参照画素ブロック信号が生成される。生成された参照画素ブロック信号に対して、重み係数の乗算及び直流オフセット値の加算を行うことで、予測画素ブロック信号が生成される。符号化された差分信号が復号化され、復号化された差分信号と予測画素ブロック信号を加算することにより、動画像の復号化が行われる。   On the other hand, at the time of decoding, the reference frame identification information and the motion vector information are decoded, and the reference pixel block signal is generated based on them. A prediction pixel block signal is generated by multiplying the generated reference pixel block signal by a weighting factor and adding a DC offset value. The encoded difference signal is decoded, and the decoded difference signal and the predicted pixel block signal are added to decode the moving image.

符号化時及び復号化時における予測画素ブロック信号の生成は、以下の計算により行われる。例えば、画素ブロックAの予測信号をpredAとし、フレームF1から切り出された参照画素ブロック信号をref[1]とすると、predAは以下のように計算される。

Figure 2007049743
Generation of the prediction pixel block signal at the time of encoding and decoding is performed by the following calculation. For example, assuming that the prediction signal of the pixel block A is predA and the reference pixel block signal cut out from the frame F1 is ref [1], predA is calculated as follows.
Figure 2007049743

ここで、w[1]は参照画素ブロックに対する重み係数、d[1]は直流オフセット値であり、これらの値は係数テーブルとして、符号化フレーム或いはスライス毎にヘッダデータとして符号化される。重み係数及び直流オフセット値は、符号化フレーム毎に対応する複数の参照フレームに対して個別に決定される。例えば、図34における画素ブロックBでは、参照画素ブロックref[0]がフレームF0から切り出されるため、予測信号predBは次式となる。

Figure 2007049743
Here, w [1] is a weighting factor for the reference pixel block, and d [1] is a DC offset value. These values are encoded as header data for each encoding frame or slice as a coefficient table. The weighting factor and the DC offset value are individually determined for a plurality of reference frames corresponding to each encoded frame. For example, in the pixel block B in FIG. 34, since the reference pixel block ref [0] is cut out from the frame F0, the prediction signal predB is expressed by the following equation.
Figure 2007049743

画素ブロックDでは、フレームF0及びF1からそれぞれ参照画素ブロックを切り出し、以下に示すように各々の参照画素ブロックに対して重み係数を乗じて直流オフセット値を加算した信号を平均化することにより、予測信号predDを生成する。

Figure 2007049743
In the pixel block D, a reference pixel block is cut out from each of the frames F0 and F1, and a signal obtained by multiplying each reference pixel block by a weighting coefficient and adding a DC offset value as shown below is predicted. A signal predD is generated.
Figure 2007049743

このようにして、本実施形態では各参照フレーム毎に重み係数と直流オフセット値が決定される。   In this way, in this embodiment, the weighting factor and the DC offset value are determined for each reference frame.

次に、図33を用いて本実施形態に係る符号化時における上記重み係数及び直流オフセット値の決定方法について説明する。図34に示したフレーム間予測関係、すなわちフレームF3が符号化対象フレームであり、フレームF0,F1,F2が参照フレームである場合を例にとって、図33のフローチャートに沿って説明する。   Next, a method for determining the weighting factor and the DC offset value at the time of encoding according to the present embodiment will be described with reference to FIG. The inter-frame prediction relationship shown in FIG. 34, that is, the case where the frame F3 is the encoding target frame and the frames F0, F1, and F2 are reference frames will be described as an example along the flowchart of FIG.

重み係数及び直流オフセット値は、複数の参照フレームに対してそれぞれ独立な値とし、符号化フレーム毎に或いはスライス毎に重み係数及び直流オフセット値のテーブルが符号化される。例えば、図34の符号化フレームF3では、フレームF0,F1,F2に対する重み係数及び直流オフセット値(w[0],d[0]), (w[1],d[1]), (w[2],d[2])がそれぞれ符号化される。また、これらの値を符号化フレーム内のスライス毎に変更してもよい。   The weighting factor and the DC offset value are independent values for a plurality of reference frames, and the table of the weighting factor and the DC offset value is encoded for each encoded frame or for each slice. For example, in the encoded frame F3 in FIG. 34, the weighting factors and DC offset values (w [0], d [0]), (w [1], d [1]), (w for the frames F0, F1, and F2. [2] and d [2]) are encoded respectively. These values may be changed for each slice in the encoded frame.

まず、符号化対象フレームF3のフレーム内全体或いはフレーム内のスライス毎の画素値の平均値DCcur(直流成分の大きさ、以下、直流成分値という)を以下のように計算する(ステップS10)。

Figure 2007049743
First, an average value DCcur (a magnitude of a direct current component, hereinafter referred to as a direct current component value) of pixel values for the entire frame of the encoding target frame F3 or for each slice in the frame is calculated as follows (step S10).
Figure 2007049743

ここで、F3(x,y)は、フレームF3の座標(x,y)の位置の画素値を表し、Nはフレーム或いはスライス内の画素数を示す。次に、以下の数式により符号化対象フレームF3のフレーム内全体或いはフレーム内のスライス毎の交流成分の大きさ(以下、交流成分値という)を計算する(ステップS11)。

Figure 2007049743
Here, F3 (x, y) represents the pixel value at the position of the coordinate (x, y) of the frame F3, and N represents the number of pixels in the frame or slice. Next, the size of the alternating current component (hereinafter referred to as an alternating current component value) for the entire frame of the encoding target frame F3 or for each slice in the frame is calculated by the following mathematical formula (step S11).
Figure 2007049743

交流成分値の測定においては、以下に示すような標準偏差を用いてもよいが、この場合、交流成分値を求める際の演算量が増加する。

Figure 2007049743
In the measurement of the AC component value, a standard deviation as shown below may be used, but in this case, the amount of calculation when obtaining the AC component value increases.
Figure 2007049743

数式(28)と(29)を比較して明らかなように、数式(28)による交流成分値の測定方法は、交流成分値を求める際の演算量を削減する効果がある。   As is apparent from the comparison between the equations (28) and (29), the AC component value measurement method according to the equation (28) has an effect of reducing the amount of calculation when obtaining the AC component value.

次に、参照フレーム番号を示すインデックスを“ref_id”とし、ref_idx番目の参照フレームについて、数式(27)及び数式(28)と同様に、参照フレームの直流成分値DCref[ref_idx], 及び交流成分値ACref[ref_idx]を計算する(ステップS13〜S14)。   Next, the index indicating the reference frame number is set to “ref_id”, and the ref_idx-th reference frame is the DC component value DCref [ref_idx] of the reference frame and the AC component value, as in the equations (27) and (28). ACref [ref_idx] is calculated (steps S13 to S14).

以上の計算結果から、ref_idx番目の参照フレームに対する直流オフセット値d[ref_idx]は、以下のように直流成分の差分として決定される(ステップS15)。

Figure 2007049743
From the above calculation results, the DC offset value d [ref_idx] with respect to the ref_idx-th reference frame is determined as a DC component difference as follows (step S15).
Figure 2007049743

重み係数w[ref_idx]は、以下のように交流成分の利得として決定される(ステップS16)。

Figure 2007049743
The weighting factor w [ref_idx] is determined as the gain of the AC component as follows (step S16).
Figure 2007049743

上記の計算を全ての参照フレーム(ref_idx=0からMAX_REF_IDXまで)について行う(ステップS17,S18)。ここで、MAX_REF_IDXは参照フレームの数を示している。全ての重み係数及び直流オフセット値が決定されたら、それらをテーブルデータとして符号化フレームまたはスライス毎に符号化し、符号化した重み係数及び直流オフセット値に従って各画素ブロックの重み付き予測符号化を行う。符号化及び復号化における予測画素ブロック信号の生成は、前述の数式(24)〜(26)のように計算される。   The above calculation is performed for all reference frames (from ref_idx = 0 to MAX_REF_IDX) (steps S17 and S18). Here, MAX_REF_IDX indicates the number of reference frames. When all weighting factors and DC offset values are determined, they are encoded as table data for each encoding frame or slice, and weighted predictive encoding of each pixel block is performed according to the encoded weighting factors and DC offset values. The generation of the prediction pixel block signal in the encoding and decoding is calculated as in the above mathematical formulas (24) to (26).

以上のように、参照フレーム毎に異なる重み係数及び直流オフセット値を用いて予測信号を生成し、予測符号化を行うことで、フレーム毎或いはスライス毎の信号振幅が時間変動したり、直流オフセット値が変動するような動画像信号に対しても、複数の参照フレームから適切に予測信号を生成することが可能となり、予測効率の高い、より高能率で高画質な符号化を実現することができる。   As described above, by generating a prediction signal using a different weighting factor and DC offset value for each reference frame and performing predictive encoding, the signal amplitude for each frame or slice varies with time, or the DC offset value It is possible to generate a prediction signal appropriately from a plurality of reference frames even for a moving image signal whose frequency fluctuates, and can realize high-efficiency and high-quality encoding with high prediction efficiency. .

次に、重み係数及び直流オフセット値の情報の符号化方法の具体例について説明する。図35、図36及び図37は、重み係数及び直流オフセット値の情報の符号化に関連するデータ構造を示している。   Next, a specific example of a method for encoding information on weighting factors and DC offset values will be described. FIG. 35, FIG. 36 and FIG. 37 show data structures related to the encoding of weight coefficient and DC offset value information.

図35は、符号化フレーム或いはスライスのヘッダデータ構造の一部を示しており、該符号化フレーム或いはスライスに対する参照フレームを指し示すインデックスの最大数“number_of_max_ref_idx”と、重み係数及び直流オフセット値の情報を示すデータテーブル “weighting_table()”が符号化される。“number_of_max_ref_idx”は、図33におけるMAX_REF_IDXと等価である。   FIG. 35 shows a part of the header data structure of an encoded frame or slice. The maximum number of indexes “number_of_max_ref_idx” indicating a reference frame for the encoded frame or slice, information on a weight coefficient and a DC offset value are shown in FIG. The indicated data table “weighting_table ()” is encoded. “Number_of_max_ref_idx” is equivalent to MAX_REF_IDX in FIG.

図36は、重み係数及び直流オフセットデータテーブルに関する符号化データ構造の第1の例を示している。この例では、フレーム或いはスライスのヘッダデータとして送られる最大参照フレームインデックス数“number_of_max_ref_idx”に従って、各参照フレームに対応する重み係数及び直流オフセット値のデータが符号化される。i番目の参照フレームに関する直流オフセット値d[i]は、整数画素値としてそのまま符号化される。   FIG. 36 shows a first example of the encoded data structure relating to the weighting factor and the DC offset data table. In this example, according to the maximum reference frame index number “number_of_max_ref_idx” sent as header data of a frame or a slice, the data of the weight coefficient and the DC offset value corresponding to each reference frame is encoded. The DC offset value d [i] for the i-th reference frame is directly encoded as an integer pixel value.

一方、i番目の参照フレームに関する重み係数w[i]は、一般に整数とはならない。そこで、重み係数w[i]を数式(32)で示すように、分母が2のべき乗となる有理数w’[i]で近似して、整数表現された分子w_numerator[i]、及び分母の2のべき数w_exponential_denominaotrに分けて符号化を行う。

Figure 2007049743
On the other hand, the weighting factor w [i] related to the i-th reference frame is generally not an integer. Therefore, the weighting factor w [i] is approximated by a rational number w ′ [i] whose denominator is a power of 2, as shown by the equation (32), and the numerator w_numerator [i] expressed as an integer and the denominator 2 Encoding is performed by dividing into a power number w_exponential_denominaotr.
Figure 2007049743

分子の値及び分母の2のべき数は、例えば数式(33)のように求めることが出来る。

Figure 2007049743
The value of the numerator and the power of 2 in the denominator can be obtained, for example, by Expression (33).
Figure 2007049743

符号化及び復号化の際は、上記符号化される近似値w’[i]を用いて、予測画像の生成を行う。数式(32)(33)に従うと、以下に示す利点がある。
数式(32)の重み係数表現では、符号化フレーム毎に重み係数の分母が固定であり、分子が参照フレーム毎に異なるものとしている。このようにすることで、各参照フレームに対する重み係数をそれぞれ独立に分母及び分子に分けて符号化する場合に比べて、符号化すべき重み係数のデータ量を削減することが可能となり、符号化オーバヘッドを削減して、符号化効率を向上させることが可能となる。
In encoding and decoding, a predicted image is generated using the encoded approximate value w ′ [i]. According to the equations (32) and (33), there are the following advantages.
In the weighting factor expression of Equation (32), the denominator of the weighting factor is fixed for each encoded frame, and the numerator is different for each reference frame. This makes it possible to reduce the amount of weight coefficient data to be encoded, compared to the case where the weight coefficient for each reference frame is independently divided into a denominator and a numerator and encoded. Thus, it is possible to improve the coding efficiency.

また、分母を2のべき乗とすると、参照画素ブロック信号への重み係数の乗算が整数の乗算とビットシフトで実現できるため、浮動小数点演算や除算といった処理が不要となり、符号化及び復号化のハード規模や演算量を削減することが可能となる。   Further, when the denominator is a power of 2, multiplication of the reference pixel block signal by a weighting coefficient can be realized by integer multiplication and bit shift, so that processing such as floating point arithmetic and division is not necessary, and encoding and decoding hardware It is possible to reduce the scale and the amount of calculation.

上記演算について、より具体的に説明する。数式(34)は、数式(24)(25)で示した予測式を一般化し、参照フレーム番号がiである画素ブロックに対する予測画像ブロック信号生成の予測式を示している。ここで、Prediが予測信号であり、ref[i]がi番目の参照フレームから切り出した参照画素ブロック信号、w[i]及びd[i]は、それぞれi番目の参照フレームから切り出された参照画素ブロックに対する重み係数と直流オフセット値を示している。

Figure 2007049743
The above calculation will be described more specifically. Formula (34) generalizes the prediction formulas shown in Formulas (24) and (25), and shows a prediction formula for generating a predicted image block signal for a pixel block whose reference frame number is i. Here, Pred i is a prediction signal, ref [i] is a reference pixel block signal cut out from the i-th reference frame, and w [i] and d [i] are cut out from the i-th reference frame, respectively. The weighting factor and DC offset value for the reference pixel block are shown.
Figure 2007049743

数式(35)は、数式(34)における重み係数w[i]を数式(32)で示す有理数表現した場合の予測式である。ここで、wn[i]は数式(32)におけるw_numerator[i]を示しており、wedはw_exponential_denominatorを示している。

Figure 2007049743
Formula (35) is a prediction formula when the weighting coefficient w [i] in Formula (34) is expressed as a rational number represented by Formula (32). Here, wn [i] indicates w_numerator [i] in Equation (32), and wed indicates w_exponential_denominator.
Figure 2007049743

一般に、任意のフェード画像等で有効な重み係数w[i]は整数とはならないため、数式(34)では浮動小数点の乗算が必要となる。さらに、w[i]を任意の有理数表現すると、整数の乗算と除算が必要になる。一方、数式(32)で示した分母が2のべき乗である有理数表現を行うことで、数式(35)に示すように整数係数wn[i]を用いた整数の乗算、四捨五入を考慮したオフセットを加算、wedビットの右ビットシフト、及び直流オフセット値の整数加算で重みつきの予測演算を行うことが可能となり、浮動小数点の乗算が不要となる。   In general, an effective weighting coefficient w [i] in an arbitrary fade image or the like is not an integer, and therefore, the floating-point multiplication is required in the equation (34). Furthermore, if w [i] is expressed as an arbitrary rational number, integer multiplication and division are required. On the other hand, by performing a rational number representation in which the denominator shown in Equation (32) is a power of 2, as shown in Equation (35), an integer multiplication using an integer coefficient wn [i] and an offset considering rounding off are performed. It is possible to perform a weighted prediction operation by addition, right bit shift of the wed bits, and integer addition of the DC offset value, eliminating the need for floating point multiplication.

また、参照フレーム番号iによらず、分母の大きさを示す2のべき数が符号化フレーム或いはスライス毎に共通化されており、符号化フレーム毎に参照フレーム番号iがとり得る値が複数ある場合でも、重み係数を符号化する際の符号量の増加を抑えることが出来る。   Moreover, a power of 2 indicating the size of the denominator is shared for each encoded frame or slice regardless of the reference frame number i, and there are a plurality of values that the reference frame number i can take for each encoded frame. Even in this case, it is possible to suppress an increase in the amount of code when the weighting coefficient is encoded.

数式(36)は、数式(35)と同様に数式で示した2つの参照フレームからの線形和による予測において、数式(32)の重み係数表現を適用した場合を示している。

Figure 2007049743
Equation (36) shows a case where the weighting factor expression of Equation (32) is applied to the prediction based on the linear sum from the two reference frames indicated by the equation, similarly to Equation (35).
Figure 2007049743

上記の2つの参照フレームからの線形和による予測においても、重み係数は一般に整数とはならないため、数式(26)では2回の浮動小数点の乗算が必要であるが、数式(36)では整数乗算、ビットシフト及び整数加算のみで、2つの参照フレームからの線形和による予測信号を生成することが可能なる。また、分母の大きさに関する情報wedも共通化されており、重み係数を符号化する際の符号量の増加を抑えることが可能となる。   Even in the prediction based on the linear sum from the two reference frames described above, since the weighting factor is not generally an integer, Equation (26) requires two floating-point multiplications, but Equation (36) requires integer multiplication. Only with bit shift and integer addition, it is possible to generate a prediction signal based on a linear sum from two reference frames. Also, information wed relating to the size of the denominator is shared, and it is possible to suppress an increase in the amount of code when the weighting coefficient is encoded.

また、数式(36)に従えば、重み係数の分子が8ビットで表現されるため、例えば画素信号値が8ビット表現されている場合は、16ビット固定の演算精度で、符号化及び復号化を行うことが可能となる。   Further, according to Equation (36), the numerator of the weighting coefficient is expressed by 8 bits. For example, when the pixel signal value is expressed by 8 bits, encoding and decoding are performed with a calculation accuracy fixed to 16 bits. Can be performed.

さらに、同一符号化フレーム内では、参照フレームによらず分母、すなわちシフト量が固定となるため、符号化或いは復号化において画素ブロック毎に参照フレームが切り替わる場合でも、シフト量を変更する必要が無くなり、演算量或いはハード規模を削減することが可能となる。   Furthermore, in the same encoded frame, the denominator, that is, the shift amount is fixed regardless of the reference frame, so that it is not necessary to change the shift amount even when the reference frame is switched for each pixel block in encoding or decoding. It is possible to reduce the calculation amount or the hardware scale.

一方、全ての参照フレームに対する重み係数が

Figure 2007049743
On the other hand, the weighting factor for all reference frames is
Figure 2007049743

の条件を満たすときは、数式(36)で計算される符号化すべき重み係数の分母及び分子を以下のように変換してもよい。

Figure 2007049743
When the above condition is satisfied, the denominator and numerator of the weighting coefficient to be encoded calculated by Expression (36) may be converted as follows.
Figure 2007049743

数式(38)は、有理数表現された各重み係数を既約分数に約分する作用がある。このように、変換して符号化することで、重み係数の精度を落とさずに、重み係数の符号化データのダイナミックレンジを小さくすることが可能となり、重み係数を符号化する符号量をさらに削減することが可能となる。   Equation (38) has the effect of dividing each weighting factor expressed as a rational number into an irreducible fraction. By converting and encoding in this way, it is possible to reduce the dynamic range of the encoded data of the weighting coefficient without reducing the accuracy of the weighting coefficient, and further reduce the amount of code for encoding the weighting coefficient. It becomes possible to do.

図37は、重み係数及び直流オフセットデータテーブルに関する符号化データ構造の第2の例を示している。図37に示す実施形態では、直流オフセット値の符号化については、図36の実施形態と同様であるが、重み係数の符号化に関しては、図36で示した実施形態とは異なり、分母を示す2のべき数の符号化は行わず、分母を固定値として有理数表現した重み係数の分子のみを符号化するものである。図37の実施形態では、例えば以下のように重み係数を有理数表現して、その分子w_numerator[i]のみを符号化すればよい。

Figure 2007049743
FIG. 37 shows a second example of the encoded data structure relating to the weighting factor and the DC offset data table. In the embodiment shown in FIG. 37, the encoding of the DC offset value is the same as that of the embodiment of FIG. 36, but the encoding of the weighting coefficient is different from the embodiment shown in FIG. Encoding of the powers of 2 is not performed, and only the numerator of the weight coefficient expressed as a rational number with the denominator as a fixed value is encoded. In the embodiment of FIG. 37, for example, a weighting factor is expressed as a rational number as follows, and only the numerator w_numerator [i] is encoded.
Figure 2007049743

本実施形態では、重み係数の分母を表す2のべき数が固定であるため、分母のべき数に関する情報を符号化フレーム毎に符号化する必要がなく、重み係数テーブルを符号化するための符号量をより削減することが可能となる。   In the present embodiment, since the power of 2 representing the denominator of the weighting coefficient is fixed, it is not necessary to encode information on the power of the denominator for each encoded frame, and the code for encoding the weighting coefficient table The amount can be further reduced.

また、固定化した分子(上記例では、“16”)の下で有理数表現する際に、分子の値を8ビットにクリッピングすることで、例えば、画素信号が8ビット表現されている場合は、16ビット固定の演算精度で符号化及び復号化を行うことが可能となる。   In addition, when a rational number is expressed under a fixed numerator (“16” in the above example), by clipping the value of the numerator to 8 bits, for example, when a pixel signal is expressed in 8 bits, It becomes possible to perform encoding and decoding with a calculation accuracy fixed to 16 bits.

さらに、本実施形態では重み係数の乗算に関するシフト量が固定化されているため、符号化及び復号化においてシフト量をフレーム毎にロードする機能の実装が不要となり、符号化或いは復号化装置またはソフトウエアの実装コストやハード規模を削減することが可能となる。   Furthermore, in this embodiment, since the shift amount relating to the multiplication of the weight coefficient is fixed, it is not necessary to implement a function for loading the shift amount for each frame in encoding and decoding, and an encoding or decoding device or software Hardware mounting cost and hardware scale can be reduced.

図38は、図35乃至図37で示したデータ構造を含む、動画像符号化データの時系列全体の構造を模式的に示したものである。符号化データの先頭には、画像サイズ等の1つの符号化シーケンス内全体で不変な複数の符号化パラメータの情報がシーケンスヘッダ(SH)として符号化される。次に、各画像フレーム或いはフィールドがそれぞれピクチャとして符号化され、各ピクチャはピクチャヘッダ(PH)とピクチャデータ(Picture data)の組として順次符号化される。   FIG. 38 schematically shows the structure of the entire time series of moving image encoded data including the data structure shown in FIGS. At the beginning of the encoded data, information on a plurality of encoding parameters that are invariant throughout the entire encoding sequence, such as the image size, is encoded as a sequence header (SH). Next, each image frame or field is encoded as a picture, and each picture is sequentially encoded as a set of a picture header (PH) and picture data (Picture data).

ピクチャヘッダ(PH)には、図35で示した参照フレームを指し示すインデックスの最大数“number_of_max_ref_idx”と、重み係数及び直流オフセットデータのテーブル“weighting_table()”が、それぞれMRI, WTとして符号化されている。“weighting_table()”(WT)では、図36に示すように各重み係数の共通の分母の大きさを示す2のべき数w_exponential_denominaotrがWEDとして符号化され、それに続けて各重み係数の分子の大きさを示すw_numerator[i]と直流オフセット値d[i]の組がそれぞれWN及びDとして符号化されている。   In the picture header (PH), the maximum number of indexes “number_of_max_ref_idx” indicating the reference frame shown in FIG. 35 and the table “weighting_table ()” of the weighting coefficient and DC offset data are encoded as MRI and WT, respectively. Yes. In “weighting_table ()” (WT), as shown in FIG. 36, a power of 2 indicating the common denominator of each weighting factor w_exponential_denominaotr is encoded as WED, followed by the magnitude of the numerator of each weighting factor. A set of w_numerator [i] and DC offset value d [i] indicating the above is encoded as WN and D, respectively.

重み係数の分子および直流オフセット値の組は、ピクチャヘッダに含まれている“number_of_max_ref_idx”(MRI)の数に基づいて、複数のWNとDの組が符号化される。各ピクチャデータ(Picture data)は1つまたは複数のスライス(SLC)に分割され、スライス毎に順次符号化される。各スライスでは、まずスライス内の各画素ブロックに関する符号化パラメータがスライスヘッダ(SH)として符号化され、スライスヘッダに続けて、1つまたは複数のマクロブロックデータ(MB)が順次符号化される。   The combination of the numerator of the weighting factor and the direct current offset value is encoded based on the number of “number_of_max_ref_idx” (MRI) included in the picture header. Each picture data (Picture data) is divided into one or a plurality of slices (SLC) and sequentially encoded for each slice. In each slice, first, encoding parameters for each pixel block in the slice are encoded as a slice header (SH), and one or a plurality of macroblock data (MB) are sequentially encoded following the slice header.

マクロブロックデータでは、該マクロブロック内の画素ブロックの予測モード情報(MBT)や動きベクトル情報(MV)などのマクロブロック内の各画素の符号化に関する情報が符号化され、最後に符号化すべき画素信号或いは予測誤差信号に対して、直交変換(例えば、離散コサイン変換)を施して符号化された直交変換係数(DCT)が含まれている。ここで、ピクチャヘッダに含まれている“number_of_max_ref_idx”(MRI)及び“weighting_table()”(WT)の両方或いはどちらか一方が、スライスヘッダ(SH)内で符号化される構成としてもよい。   In the macroblock data, information relating to the encoding of each pixel in the macroblock such as prediction mode information (MBT) and motion vector information (MV) of the pixel block in the macroblock is encoded, and finally the pixel to be encoded An orthogonal transform coefficient (DCT) encoded by performing orthogonal transform (for example, discrete cosine transform) on the signal or the prediction error signal is included. Here, a configuration may be adopted in which “number_of_max_ref_idx” (MRI) and “weighting_table ()” (WT) included in the picture header are encoded in the slice header (SH).

また、図37で示した重み係数テーブルデータの構成の場合、重み係数の分母の大きさを示すデータの符号化は省略可能であるため、図38におけるWEDの符号化は省略が可能である。   In the case of the configuration of the weighting coefficient table data shown in FIG. 37, the encoding of data indicating the size of the denominator of the weighting coefficient can be omitted, so that the WED encoding in FIG. 38 can be omitted.

図39は、本発明の実施形態に関する動画像復号化手順を示すフローチャートである。ここでは、図33を用いて説明した実施形態に係る動画像符号化装置で符号化された符号化データを入力して復号化を行う手順について説明する。   FIG. 39 is a flowchart showing a moving picture decoding procedure according to the embodiment of the present invention. Here, a description will be given of a procedure in which encoded data encoded by the moving image encoding apparatus according to the embodiment described with reference to FIG. 33 is input and decoding is performed.

入力される符号化データから、図35〜図37で説明した重み係数及び直流オフセットデータのテーブルを含む符号化フレームまたはスライスのヘッダデータの復号化を行い(ステップS30)、符号化ブロック毎の参照フレームを識別するための参照フレームインデックスを含む符号化ブロックのヘッダデータの復号化を行う(ステップS31)。   The encoded frame or slice header data including the weight coefficient and DC offset data tables described in FIGS. 35 to 37 is decoded from the input encoded data (step S30), and the reference is made for each encoded block. The header data of the encoded block including the reference frame index for identifying the frame is decoded (step S31).

画素ブロック毎に、参照フレームインデックスが指し示す参照フレームから参照画素ブロック信号の切り出しを行う(ステップS32)。該符号化ブロックの参照フレームインデックスに基づいて、復号化された重み係数及び直流オフセットデータのテーブルを参照することで、重み係数及び直流オフセット値が決定される。   For each pixel block, a reference pixel block signal is cut out from the reference frame indicated by the reference frame index (step S32). Based on the reference frame index of the coding block, the weighting factor and the DC offset value are determined by referring to the table of the decoded weighting factor and DC offset data.

こうして決定された重み係数及び直流オフセット値を用いて、参照画素ブロック信号から予測画素ブロック信号を生成し(ステップS33)、符号化された予測誤差信号の復号化を行い、復号化された予測誤差信号と予測画素ブロック信号を加算することで、復号化画像を生成する(ステップS34)。   A prediction pixel block signal is generated from the reference pixel block signal using the weighting coefficient and the DC offset value thus determined (step S33), the encoded prediction error signal is decoded, and the decoded prediction error is calculated. The decoded image is generated by adding the signal and the predicted pixel block signal (step S34).

符号化された各画素ブロックの復号化を順次行い、符号化フレーム内或いはスライス内の画素ブロックが全て復号化されたら、次のピクチャヘッダ或いはスライスヘッダの復号化を続けて行う。   Each encoded pixel block is sequentially decoded, and when all the pixel blocks in the encoded frame or slice are decoded, the next picture header or slice header is continuously decoded.

上述した手順で符号化方法及び復号化方法によって、信号振幅の時間変動や直流オフセット値の時間変動のある動画像信号に対しても、適切な予測画像を符号化及び復号化時に生成でき、より予測効率の高い、高能率で高画質な動画像符号化及び復号化を行うことが可能となる。   By the encoding method and the decoding method in the above-described procedure, an appropriate prediction image can be generated at the time of encoding and decoding even for a moving image signal having a time variation of the signal amplitude and a time variation of the DC offset value. It is possible to perform high-efficiency, high-quality video encoding and decoding with high prediction efficiency.

次に、上述した実施形態で開示した本発明の好ましい実施の態様を以下に列挙する。
(1) 動画像の符号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該符号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、(a)前記複数の参照フレームから少なくとも一つの参照マクロブロックをそれぞれ抽出し、(b)抽出した複数の参照マクロブロックについて所定の重み係数の組を用いて線形和を計算することにより予測マクロブロックを生成し、(c)前記予測マクロブロックと符号化対象マクロブロックとの予測誤差信号を生成し、前記予測誤差信号、前記複数の参照フレームの組み合わせを示す第1インデックス、前記重み係数の組を示す第2インデックス、及び前記動きベクトルの情報を符号化する。
<効果> このように複数の参照フレームの線形和による予測を行い、且つ線形和の係数を可変とすることで、フェードなどの時間的な信号強度の変化に対して、適切な予測が可能となり、符号化における予測効率を向上させることが可能となる。また、参照するフレームを適切に選択することにより、時間的にオクルージョン(見え隠れ)が発生する部分等で、適切な参照フレームを選択することで、予測効率を向上させることが可能となる。これらの、線形予測係数及び参照フレームの組み合わせを、インデックスとして符号化することで、符号化オーバーヘッドを抑制することが可能となる。
Next, preferred embodiments of the present invention disclosed in the above-described embodiment are listed below.
(1) A motion compensation prediction frame between a plurality of reference frames in a predetermined combination and a motion vector between the coding target macroblock and at least one reference frame with respect to a coding target macroblock of a moving image In the moving image encoding method for performing encoding, (a) at least one reference macroblock is extracted from each of the plurality of reference frames, and (b) a set of predetermined weight coefficients is used for the plurality of extracted reference macroblocks. (C) generating a prediction error signal between the prediction macroblock and the encoding target macroblock, and combining the prediction error signal and the plurality of reference frames. A first index indicating, a second index indicating the set of weighting factors, and information on the motion vector Encode.
<Effect> As described above, by predicting by linear sum of a plurality of reference frames and changing the coefficient of the linear sum to be variable, it is possible to perform appropriate prediction with respect to temporal signal intensity changes such as fading. Thus, it is possible to improve the prediction efficiency in encoding. In addition, by appropriately selecting a frame to be referred to, it is possible to improve prediction efficiency by selecting an appropriate reference frame in a portion where occlusion (visible / hidden) occurs temporally. By encoding the combination of the linear prediction coefficient and the reference frame as an index, the encoding overhead can be suppressed.

(2) (1)において、前記線形和の重み係数の組を示すインデックスをフレーム毎あるいは複数のフレーム毎のヘッダデータとして符号化し、前記予測誤差信号、前記複数の参照フレームの組み合わせを示すインデックス及び動きベクトルをマクロブロック毎に符号化する。
<効果> 一般に、フェードなどの時間的な信号強度の変化は、フレーム全体に渡って一様に発生し、また、オクルージョン等はフレーム内に局所的に発生する。(2)によれば信号強度の時間変化に対応させる線形予測係数は、フレーム毎に1組符号化し、また参照フレームの組み合わせを示すインデックスは、マクロブロック毎に可変とすることで、符号化効率の向上と符号化オーバーヘッドの削減を両立することが可能となり、オーバーヘッドを含めた符号化効率の向上を得ることが可能となる。
(2) In (1), an index indicating a set of weighting factors of the linear sum is encoded as header data for each frame or a plurality of frames, and the prediction error signal, an index indicating a combination of the plurality of reference frames, and A motion vector is encoded for each macroblock.
<Effect> In general, a temporal change in signal strength such as fading occurs uniformly over the entire frame, and occlusion occurs locally within the frame. According to (2), one set of linear prediction coefficients corresponding to temporal changes in signal strength is encoded for each frame, and the index indicating the combination of reference frames is variable for each macroblock, thereby improving the encoding efficiency. Thus, it is possible to achieve both improvement in encoding and reduction in encoding overhead, and it is possible to improve encoding efficiency including overhead.

(3) (1)または(2)において、前記符号化される動きベクトルが、前記複数の参照フレームのうち、特定の一つの参照フレームに関する動きベクトルである。
<効果> マクロブロック毎に複数の参照フレームを用いて動き補償予測符号化を行う場合、各参照フレームに対する動きベクトルを個別に符号化すると、符号化オーバーヘッドの増大を招いてしまう。しかし、(3)によれば、特定の参照フレームに対する動きベクトルを送り、他のフレームに対する動きベクトルは、送信した動きベクトルを符号化対象フレームと各参照フレームとのフレーム間距離に応じてスケーリングした動きベクトルを用いることで、符号化オーバーヘッドの増加を防ぎ、符号化効率を向上させることが可能となる。
(3) In (1) or (2), the encoded motion vector is a motion vector related to one specific reference frame among the plurality of reference frames.
<Effect> When motion compensation predictive coding is performed using a plurality of reference frames for each macroblock, if a motion vector for each reference frame is individually coded, an increase in coding overhead is caused. However, according to (3), a motion vector for a specific reference frame is sent, and a motion vector for another frame is scaled according to the interframe distance between the frame to be encoded and each reference frame. By using a motion vector, it is possible to prevent an increase in encoding overhead and improve encoding efficiency.

(4) (3)において、前記特定の一つの参照フレームに関する動きベクトルは、前記参照フレームと符号化されるフレームとのフレーム間距離に応じて正規化された動きベクトルである。
<効果> このように符号化すべき動きベクトルを、単位フレーム間距離で正規化した動きベクトルとすることで、任意の参照フレームに対する動きベクトルスケーリングを乗算あるいはシフト演算と加算処理により、低コストで生成することが可能となる。また、時間的に一様な動きを仮定すると、単位フレーム間距離で正規化することで、符号化すべき動きベクトルの大きさが最小となり、動きベクトルの情報量を軽減することが可能となり、符号化オーバーヘッドの削減効果が得られる。
(4) In (3), the motion vector related to the one specific reference frame is a motion vector normalized according to an interframe distance between the reference frame and a frame to be encoded.
<Effect> In this way, the motion vector to be encoded is a motion vector normalized by the distance between unit frames, so that motion vector scaling for an arbitrary reference frame is generated at low cost by multiplication or shift operation and addition processing. It becomes possible to do. Assuming uniform motion in time, normalizing with the distance between unit frames minimizes the size of the motion vector to be encoded, reducing the amount of motion vector information. The effect of reducing the overhead can be obtained.

(5) (3)において、前記特定の一つの参照フレームに関する動きベクトルは、前記複数の参照フレームのうち符号化されるフレームとのフレーム間距離が最も遠い参照フレームに対する動きベクトルである。
<効果> (3)によると動きベクトル符号量を軽減し、また動きベクトルのスケーリングを低コストで実現出来るが、一方で、参照フレームと符号化対象フレームとのフレーム間距離が大きくなるに従って、動き補償の精度の低下が発生する。これに対して(5)によれば、複数の参照フレームのうち、最もフレーム間距離の遠い参照フレームに対する動きベクトルを符号化し、他の参照フレームに対する動きベクトルは、符号化した動きベクトルをフレーム間距離に応じて内分して生成することが可能となり、各参照フレームに対する動き補償の精度の低下を抑えることが出来る。これにより、より予測効率が向上し、高能率な符号化を行うことが可能となる。
(5) In (3), the motion vector relating to the one specific reference frame is a motion vector for the reference frame having the longest interframe distance from the encoded frame among the plurality of reference frames.
<Effect> According to (3), it is possible to reduce the amount of motion vector coding and realize motion vector scaling at a low cost. On the other hand, as the interframe distance between the reference frame and the encoding target frame increases, the motion increases. A reduction in compensation accuracy occurs. On the other hand, according to (5), the motion vector for the reference frame with the longest interframe distance is encoded among the plurality of reference frames, and the motion vector for the other reference frame is the encoded motion vector between the frames. According to the distance, it can be generated by being divided internally, and a decrease in accuracy of motion compensation for each reference frame can be suppressed. As a result, prediction efficiency is further improved, and highly efficient encoding can be performed.

(6) (1)または(2)において、前記符号化される動きベクトルが、前記複数の参照フレームのうち、特定の一つの参照フレームに関する第1動きベクトルと、他の一つまたは複数の参照フレームに対する動きベクトルであり、他の一つまたは複数の参照フレームに対する動きベクトルが、前記第1動きベクトルを符号化対象フレームと前記一つまたは複数の参照フレームとのフレーム間距離に応じて、スケーリングした動きベクトルと前記一つまたは複数の動きベクトルとの差分ベクトルとして符号化される。
<効果> 局所的な映像の時間変化が平行移動で近似できる場合は、一つの動きベクトルとそれをフレーム間距離に応じてスケーリングした動きベクトルで、複数の参照フレームからの予測を行うことが可能である。しかし、時間的に一定の速度で変化しない場合は、必ずしもスケーリングのみでは適切な動き補償が困難となる。(6)によれば、複数の参照フレームに対する動きベクトルを一つの代表ベクトルと、それをスケーリングした動きベクトルと各参照フレームに対する最適な動きベクトルとの差分ベクトルを符号化することで、複数の動きベクトルを符号化する場合と比べて、動きベクトルの符号量を軽減することが可能となり、符号化オーバーヘッドの低減と予測効率の向上を両立させることが可能となる。
(6) In (1) or (2), the encoded motion vector includes a first motion vector related to one specific reference frame among the plurality of reference frames and one or more other references. A motion vector for a frame, and a motion vector for one or more other reference frames is scaled according to an interframe distance between the frame to be encoded and the one or more reference frames. The motion vector is encoded as a difference vector between the motion vector and the one or more motion vectors.
<Effect> When the temporal change of local video can be approximated by parallel movement, prediction from multiple reference frames can be performed with one motion vector and a motion vector scaled according to the distance between frames. It is. However, if it does not change at a constant speed in time, appropriate motion compensation is difficult only by scaling. According to (6), by encoding a motion vector for a plurality of reference frames as one representative vector and a difference vector between a scaled motion vector and an optimal motion vector for each reference frame, a plurality of motions are encoded. Compared with the case of encoding a vector, it is possible to reduce the amount of coding of a motion vector, and it is possible to achieve both reduction in encoding overhead and improvement in prediction efficiency.

(7) (6)において、前記第1動きベクトルは前記参照フレームと符号化されるフレームとのフレーム間距離に応じて正規化された動きベクトルである。   (7) In (6), the first motion vector is a motion vector normalized according to an interframe distance between the reference frame and a frame to be encoded.

(8) (6)において、前記第1動きベクトルは前記複数の参照フレームのうち、符号化されるフレームとのフレーム間距離が最も遠い参照フレームに対する動きベクトルである。   (8) In (6), the first motion vector is a motion vector for a reference frame having the longest interframe distance from a frame to be encoded among the plurality of reference frames.

(9) (1)〜(8)のいずれかおいて、前記複数の参照フレームの組み合わせを示すインデックスが予め定められた値であり、且つ前記符号化すべき動きベクトルの全ての要素が0であり、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果> マクロブロックをスキップする条件として、上記の条件を送受信側で一致させておけば、マクロブロック毎の符号化情報である参照フレームの組み合わせを示すインデックスや、大きさ0の動きベクトルや、0の残差信号を符号化して送ることなく、受信側で映像を再生することが可能となり、これらの符号化データ量を削減して符号化効率を向上させることが可能となる。さらに、信号強度の時間変化に応じた予測係数は、フレーム毎に符号化することで、映像信号の性質に合わせて、適応的なマクロブロックスキップを、符号化オーバーヘッドの増加なしに実現することが可能となる。
(9) In any one of (1) to (8), an index indicating a combination of the plurality of reference frames is a predetermined value, and all elements of the motion vector to be encoded are 0. In the macroblock in which the prediction error signals to be encoded are all 0, encoding is skipped without outputting any encoded data, and the number of skipped macroblocks in the macroblock to be encoded next is Encode.
<Effect> As a condition for skipping a macroblock, if the above conditions are matched on the transmission / reception side, an index indicating a combination of reference frames, which is encoding information for each macroblock, a motion vector of size 0, It is possible to reproduce video on the receiving side without encoding and sending a zero residual signal, and it is possible to reduce the amount of these encoded data and improve the encoding efficiency. Furthermore, by encoding the prediction coefficient according to the time change of the signal strength for each frame, adaptive macroblock skip can be realized without increasing the coding overhead according to the nature of the video signal. It becomes possible.

(10) (1)〜(8)のいずれかにおいて前記複数の参照フレームの組み合わせを示すインデックスが予め定められた値であり、且つ前記符号化すべき動きベクトルが、直前に符号化されたマクロブロックの動きベクトルと一致し、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果> フレーム内のマクロブロックよりも大きな領域が時間的に平行移動する場合などに、動きベクトル情報を送らずスキップマクロブロックとして符号化することが可能となり、符号化オーバーヘッドを削減して符号化効率を向上させることが可能となる。
(10) A macroblock in which an index indicating a combination of the plurality of reference frames in any one of (1) to (8) is a predetermined value, and the motion vector to be encoded is encoded immediately before In a macroblock that matches the motion vector of the above and the prediction error signal to be encoded is all 0, the encoding is skipped without outputting any encoded data, and the next macroblock to be encoded is skipped. The number of macroblocks that have been processed is encoded.
<Effect> When a region larger than the macroblock in the frame moves in parallel in time, it can be encoded as a skip macroblock without sending motion vector information, and the encoding overhead is reduced. Efficiency can be improved.

(11) (9)または(10)において、前記予め定められた参照フレームの組み合わせを示すインデックスは、直前に符号化された2フレームを参照フレームとして用いることを示す。
<効果> 直前に符号化された2フレームを参照画像とすることを、マクロブロックのスキップ条件とすることで、フェード等で信号強度が時間的に変化する場合においても、線形外挿等の線形予測により、容易に正確な予測画像が生成され、信号強度が時間変化しているにも関わらず、マクロブロックの符号化をスキップさせることが可能となり、予測効率向上と符号化オーバーヘッド低減の2つの効果により、より符号化効率を向上させることが可能となる。
(11) In (9) or (10), the index indicating the predetermined combination of reference frames indicates that two frames encoded immediately before are used as reference frames.
<Effect> By using two frames encoded immediately before as a reference image as a macroblock skip condition, even when the signal strength changes with time due to fading, linear extrapolation, etc. Prediction can easily generate an accurate prediction image, and it is possible to skip encoding of macroblocks even though the signal strength changes with time. Due to the effect, the encoding efficiency can be further improved.

(12) (9)または(10)において、前記予め定められた参照フレームの組み合わせを示すインデックスを符号化対象フレーム毎に変更可能とし、前記予め定められた参照フレームの組み合わせを示すインデックスを符号化対象フレームのヘッダデータとして符号化する。
<効果> 映像信号の時間変化に応じて、柔軟にマクロブロックスキップの条件を変更することが可能となる。符号化時にマクロブロックスキップが発生しやすいように、映像に応じてフレーム毎に適切にスキップ条件を変更することで、符号化オーバーヘッドを削減し高能率な符号化を実現することが可能となる。
(12) In (9) or (10), the index indicating the predetermined reference frame combination can be changed for each encoding target frame, and the index indicating the predetermined reference frame combination is encoded. It is encoded as header data of the target frame.
<Effect> It is possible to flexibly change the macroblock skip condition according to the time change of the video signal. By changing the skip condition appropriately for each frame in accordance with the video so that macroblock skip is likely to occur at the time of encoding, it is possible to reduce encoding overhead and realize highly efficient encoding.

(13) (1)〜(8)のいずれかにおいて、前記複数の参照フレームの組み合わせを示すインデックスが直前に符号化されたマクロブロックと同一であり、且つ前記符号化すべき動きベクトルの全ての要素が0であり、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果> 直前のマクロブロックと同様の参照フレームの組み合わせを用いることを、マクロブロックのスキップ条件とすることで、動画像信号における近傍領域の時空間特性の相関を利用して、効率的にマクロブロックをスキップさせて、符号化効率を向上させることが可能となる。
(13) In any one of (1) to (8), an index indicating a combination of the plurality of reference frames is the same as the macroblock encoded immediately before, and all elements of the motion vector to be encoded Is a macroblock in which the prediction error signal to be encoded is all 0, the encoding is skipped without outputting any encoded data, and the macroblock skipped in the next encoded macroblock Encode the number of blocks.
<Effect> By using the same reference frame combination as that of the immediately preceding macroblock as a macroblock skip condition, the macro can be efficiently used by utilizing the correlation of the spatio-temporal characteristics of neighboring regions in the moving image signal. It is possible to improve the coding efficiency by skipping blocks.

(14) (1)〜(8)のいずれかにおいて、前記複数の参照フレームの組み合わせを示すインデックスが直前に符号化されたマクロブロックと同一であり、且つ前記符号化すべき動きベクトルが、直前に符号化されたマクロブロックの動きベクトルと一致し、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果> (13)に加えて(14)の構成を兼ね備えることで、より符号化オーバーヘッドを削減して、符号化効率を向上させることが可能となる。
(14) In any one of (1) to (8), an index indicating a combination of the plurality of reference frames is the same as the macroblock encoded immediately before, and the motion vector to be encoded is In the macroblock that matches the motion vector of the encoded macroblock and the prediction error signal to be encoded is all 0, the encoding is skipped without outputting any encoded data, and then encoded. The number of skipped macroblocks is encoded.
<Effect> By having the configuration of (14) in addition to (13), it is possible to further reduce the coding overhead and improve the coding efficiency.

(15) (1)〜(8)のいずれかにおいて、前記符号化すべき動きベクトルを、フレーム内で隣接する一つまたは複数のマクロブロックの動きベクトルから予測し、前記符号化すべき動きベクトルと前記予測された動きベクトルとの差分ベクトルを符号化する。
<効果> (1)〜(8)による符号化効率の向上に加えて、動きベクトルの空間的な相関に着目し、符号化すべき動きベクトルをフレーム内の隣接するマクロブロックから予測して、差分ベクトルだけを符号化することで、動きベクトルの符号化オーバーヘッドを低減し、より符号化効率を向上させることが可能となる。
(15) In any one of (1) to (8), the motion vector to be encoded is predicted from the motion vectors of one or more macroblocks adjacent in a frame, and the motion vector to be encoded and the A difference vector from the predicted motion vector is encoded.
<Effect> In addition to improving the encoding efficiency by (1) to (8), focusing on the spatial correlation of motion vectors, the motion vector to be encoded is predicted from adjacent macroblocks in the frame, and the difference By encoding only the vector, it is possible to reduce the encoding overhead of the motion vector and further improve the encoding efficiency.

(16) (1)〜(8)のいずれかにおいて、前記符号化すべき動きベクトルを、直前に符号化されたフレーム内の同一位置のマクロブロックにおける動きベクトルから予測し、前記符号化すべき動きベクトルと前記予測された動きベクトルとの差分ベクトルを符号化する。
<効果> 動きベクトルの時間的な相関に着目し、符号化すべき動きベクトルを直前に符号化されたフレーム内の同一位置におけるマクロブロックの動きベクトルから予測して、差分ベクトルだけを符号化することで、動きベクトルの符号化オーバーヘッドを低減し、より符号化効率を向上させることが可能となる。
(16) In any one of (1) to (8), the motion vector to be encoded is predicted from the motion vector in the macroblock at the same position in the frame encoded immediately before, and the motion vector to be encoded And a difference vector between the predicted motion vector and the predicted motion vector.
<Effect> Focusing on temporal correlation of motion vectors, predicting the motion vector to be encoded from the motion vector of the macroblock at the same position in the frame encoded immediately before, and encoding only the difference vector Thus, it is possible to reduce the coding overhead of the motion vector and further improve the coding efficiency.

(17) (1)〜(8)のいずれかにおいて、前記符号化すべき動きベクトルを、フレーム内で隣接する一つまたは複数のマクロブロックの動きベクトル、及び直前に符号化されたフレーム内の同一位置のマクロブロックにおける動きベクトルから予測し、前記符号化すべき動きベクトルと前記予測された動きベクトルとの差分ベクトルを符号化する。
<効果> 動きベクトルの時空間的な相関に着目し、動きベクトルの予測をフレーム内及びフレーム間で行うことで、(15)及び(16)の両特徴を兼ね備えることが可能となり、より動きベクトルの符号化効率を向上させることが可能となる。
(17) In any one of (1) to (8), the motion vector to be encoded is the motion vector of one or more macroblocks adjacent in the frame and the same in the frame encoded immediately before. The motion vector in the macroblock at the position is predicted, and the difference vector between the motion vector to be encoded and the predicted motion vector is encoded.
<Effect> Focusing on the spatio-temporal correlation of motion vectors, by performing motion vector prediction within a frame and between frames, it becomes possible to combine both features (15) and (16), and more motion vectors The encoding efficiency can be improved.

(18) (15)〜(17)のいずれかにおいて、前記複数の参照フレームの組み合わせを示すインデックスが予め定められた値であり、且つ前記符号化すべき動きベクトルの差分ベクトルが0であり、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果> (15)〜(17)のいずれかの構成との相乗効果により、より符号化オーバーヘッドを低減させて符号化効率を向上させることが可能となる。
(18) In any one of (15) to (17), an index indicating a combination of the plurality of reference frames is a predetermined value, and a difference vector of the motion vector to be encoded is 0, and In the macroblock in which the prediction error signals to be encoded are all 0, encoding is skipped without outputting any encoded data, and the number of skipped macroblocks is encoded in the next macroblock to be encoded To do.
<Effect> Due to a synergistic effect with any of the configurations (15) to (17), it is possible to further reduce the coding overhead and improve the coding efficiency.

(19) (15)〜(17)のいずれかにおいて、前記複数の参照フレームの組み合わせを示すインデックスが予め定められた値であり、且つ前記符号化すべき動きベクトルの差分ベクトルが、直前に符号化されたマクロブロックの差分ベクトルと一致し、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果> (15)〜(17)のいずれかの構成と(10)の構成との相乗効果により、より符号化オーバーヘッドを低減させて符号化効率を向上させることが可能となる。
(19) In any one of (15) to (17), an index indicating a combination of the plurality of reference frames is a predetermined value, and the difference vector of the motion vector to be encoded is encoded immediately before. In a macroblock that matches the difference vector of the generated macroblock and whose prediction error signal to be encoded is all 0, the encoding is skipped without outputting any encoded data, and the next encoded macro In the block, the number of skipped macroblocks is encoded.
<Effect> Due to the synergistic effect of any of the configurations (15) to (17) and the configuration (10), it is possible to further reduce the coding overhead and improve the coding efficiency.

(20) (18)〜(19)のいずれかにおいて、前記予め定められた参照フレームの組み合わせを示すインデックスが直前に符号化された2フレームを参照フレームとして用いることを示す。
<効果> (18)〜(19)の構成と(11)の構成との相乗効果により、より符号化オーバーヘッドを低減させて符号化効率を向上させることが可能となる。
(20) In any one of (18) to (19), it is indicated that an index indicating the predetermined reference frame combination is used as a reference frame immediately before two frames encoded.
<Effect> Due to the synergistic effect of the configurations (18) to (19) and the configuration (11), it is possible to further reduce the coding overhead and improve the coding efficiency.

(21) (18)〜(19)のいずれかにおいて、前記予め定められた参照フレームの組み合わせを示すインデックスを符号化対象フレーム毎に変更可能とし、前記予め定められた参照フレームの組み合わせを示すインデックスを符号化対象フレームのヘッダデータとして符号化する。
<効果> (18)〜(19)の構成と(12)の構成との相乗効果により、より符号化オーバーヘッドを低減させて符号化効率を向上させることが可能となる。
(21) In any one of (18) to (19), an index indicating the predetermined combination of reference frames can be changed for each encoding target frame, and the index indicating the predetermined combination of reference frames Are encoded as header data of the encoding target frame.
<Effect> Due to the synergistic effect of the configurations (18) to (19) and the configuration (12), it is possible to further reduce the coding overhead and improve the coding efficiency.

(22) (15)〜(17)のいずれかにおいて、前記複数の参照フレームの組み合わせを示すインデックスが直前に符号化されたマクロブロックと同一であり、且つ前記符号化すべき動きベクトルの差分ベクトルの全ての要素が0であり、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果>(15)〜(17)のいずれかの構成と(13)の構成との相乗効果により、より符号化オーバーヘッドを低減させて符号化効率を向上させることが可能となる。
(22) In any one of (15) to (17), the index indicating the combination of the plurality of reference frames is the same as the macroblock encoded immediately before, and the difference vector of the motion vector to be encoded In a macroblock in which all elements are 0 and the prediction error signal to be encoded is all 0, encoding is skipped without outputting any encoded data, and in a macroblock to be encoded next, The number of skipped macroblocks is encoded.
<Effect> The synergistic effect of any of the configurations (15) to (17) and the configuration (13) makes it possible to further reduce the coding overhead and improve the coding efficiency.

(23) (15)〜(17)のいずれかにおいて、前記複数の参照フレームの組み合わせを示すインデックスが直前に符号化されたマクロブロックと同一であり、且つ前記符号化すべき動きベクトルの差分ベクトルが、直前に符号化されたマクロブロックの差分ベクトルと一致し、且つ前記符号化すべき予測誤差信号がすべて0であるマクロブロックにおいて、何ら符号化データを出力せずに符号化をスキップし、次に符号化されるマクロブロックにおいて、スキップしたマクロブロックの個数を符号化する。
<効果> (15)〜(17)のいずれかの構成と(14)の構成との相乗効果により、より符号化オーバーヘッドを低減させて符号化効率を向上させることが可能となる。
(23) In any one of (15) to (17), an index indicating a combination of the plurality of reference frames is the same as the macroblock encoded immediately before, and a difference vector of the motion vector to be encoded is In the macroblock that matches the difference vector of the macroblock coded immediately before and the prediction error signal to be coded is all 0, the coding is skipped without outputting any coded data, In the macroblock to be encoded, the number of skipped macroblocks is encoded.
<Effect> Due to the synergistic effect of any of the configurations (15) to (17) and the configuration (14), it is possible to further reduce the coding overhead and improve the coding efficiency.

(24) (1)〜(2)のいずれかにおいて、符号化対象フレームと複数の参照フレームとのフレーム間距離に応じて、前記線形和の重み係数の組を決定する。
<効果> フェードなどの信号強度の線形な時間変動に対して、符号化対象フレームと複数の参照フレームとのフレーム間距離に応じた線形内挿あるいは線形外挿予測により、適切な予測画像を容易に低コストで生成することが可能となり、予測効率の高い高能率な符号化を実現することが可能となる。
(24) In any one of (1) to (2), the set of weighting factors of the linear sum is determined according to the interframe distance between the encoding target frame and the plurality of reference frames.
<Effect> For linear temporal fluctuations in signal strength such as fading, appropriate prediction images can be easily obtained by linear interpolation or linear extrapolation prediction according to the interframe distance between the frame to be encoded and multiple reference frames Therefore, it is possible to generate at a low cost and to realize highly efficient encoding with high prediction efficiency.

(25) (1)〜(2)のいずれかにおいて、入力される動画像信号におけるフレームまたはフィールド内の平均DC値を計算し、複数の参照フレーム及び符号化対象フレームにおける前記DC値に基づいて、前記線形和の重み係数の組を決定する。
<効果> 符号化対象フレーム及び複数の参照フレームのフレーム内のDC値の時間変化から線形予測係数を算出することで、信号強度の時間変化が一定である場合のみならず、任意の信号強度の時間変動に対して、適切な予測画像を生成することが可能となり、より予測効率の高い高能率な符号化を実現することが可能となる。
(25) In any one of (1) to (2), an average DC value in a frame or a field in an input moving image signal is calculated, and based on the DC values in a plurality of reference frames and encoding target frames Then, a set of weighting factors of the linear sum is determined.
<Effect> By calculating the linear prediction coefficient from the temporal change of the DC value in the encoding target frame and the frames of the plurality of reference frames, not only when the temporal change of the signal strength is constant, but also of arbitrary signal strength It is possible to generate an appropriate prediction image with respect to temporal variation, and it is possible to realize highly efficient encoding with higher prediction efficiency.

(26) (1)〜(2)のいずれかにおいて、入力される動画像信号が可変フレームレートであるか、あるいは入力された動画像信号の任意のフレームを間引き可変フレームレート化する符号化器を有し、前記可変フレームレートの動画像信号を符号化する際、符号化対象フレームと複数の参照フレームとのフレーム間距離の変化に応じて、前記線形和の重み係数の組を決定する。
<効果> 符号化対象フレームと複数の参照フレームとのフレーム間距離が動的に変化するフレームレート可変の符号化に対しても、フレーム間距離に応じた適切な線形予測係数を用いることで、高い予測効率を維持して高能率な符号化を行うことが可能となる。
(26) The encoder according to any one of (1) to (2), wherein the input moving image signal has a variable frame rate, or an arbitrary frame of the input moving image signal is thinned to a variable frame rate. When the moving image signal having the variable frame rate is encoded, the set of weight coefficients of the linear sum is determined according to the change in the interframe distance between the encoding target frame and the plurality of reference frames.
<Effect> For encoding with variable frame rate in which the interframe distance between the encoding target frame and the plurality of reference frames dynamically changes, by using an appropriate linear prediction coefficient corresponding to the interframe distance, It is possible to perform highly efficient encoding while maintaining high prediction efficiency.

(27) 動画像の符号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該符号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、(a)第1参照フレームから前記動きベクトルの候補に対応した第1参照マクロブロックを抽出し、(b)前記動きベクトルの候補を少なくとも一つの第2参照フレームと符号化対象フレームとのフレーム間距離に応じてスケーリングし、(c)前記第2参照フレームからスケーリングされた動きベクトルの候補に対応した少なくとも一つの第2参照マクロブロックを抽出し、(d)前記第1及び第2参照マクロブロックについて所定の重み係数の組を用いて線形和を計算することにより予測マクロブロックを生成し、(e)前記予測マクロブロックと符号化対象マクロブロックとの予測誤差信号を生成し、(f)前記第1及び第2参照マクロブロックの線形和と前記符号化対象マクロブロックとの予測誤差信号の大きさに基づいて前記動きベクトルを決定し、(g)前記予測誤差信号、前記第1及び第2参照フレームを示す第1インデックス、前記重み係数の組を示す第2インデックス、及び決定された前記動きベクトルの情報を符号化する。
<効果> 一つの符号化対象マクロブロックに対して、複数の参照フレームから複数参照マクロブロックを抽出し、その線形和から予測マクロブロックを生成する場合、各参照フレームに対して個別に最適な動きベクトルを決定すると、演算量が膨大となってしまう。(27)の構成によれば、第1参照フレームに対する動きベクトル候補をスケーリングして、他の参照フレームに対する動きベクトル候補とすることで、最適な複数の動きベクトルを非常に少ない演算量で探索することが可能となり、符号化のコストを大幅に低減することが可能となる。
(27) A motion compensation prediction frame between a plurality of reference frames in a predetermined combination and a motion vector between the encoding target macroblock and at least one reference frame with respect to a coding target macroblock of a moving image. In the moving image encoding method for performing encoding, (a) extracting a first reference macroblock corresponding to the motion vector candidate from the first reference frame, and (b) extracting at least one second motion vector candidate from the first reference frame. (C) extracting at least one second reference macroblock corresponding to the scaled motion vector candidate from the second reference frame; and (c) extracting the second reference macroblock corresponding to the scaled motion vector candidate from the second reference frame. d) calculating a linear sum using a predetermined set of weighting factors for the first and second reference macroblocks; (E) generating a prediction error signal between the prediction macroblock and the encoding target macroblock, and (f) a linear sum of the first and second reference macroblocks and the encoding target. The motion vector is determined based on the magnitude of a prediction error signal with a macroblock, and (g) a first index indicating the prediction error signal, a first index indicating the first and second reference frames, and a set of the weighting coefficients. Two indexes and information of the determined motion vector are encoded.
<Effect> When a plurality of reference macroblocks are extracted from a plurality of reference frames for one encoding target macroblock and a prediction macroblock is generated from the linear sum, an optimal motion is individually performed for each reference frame. If the vector is determined, the calculation amount becomes enormous. According to the configuration of (27), the motion vector candidates for the first reference frame are scaled to become motion vector candidates for the other reference frames, thereby searching for an optimal plurality of motion vectors with a very small amount of calculation. Thus, the encoding cost can be greatly reduced.

(28) (27)において、前記決定された動きベクトルを、各参照フレームと符号化対象フレームとの距離に応じてスケーリングし、前記スケーリングした動きベクトル近傍で、前記予測誤差信号が小さくなるように、少なくとも一つの参照フレームに対応する参照マクロブロックを個別に再探索し、前記再探索の結果得られた動きベクトルを用いて、動き補償予測を行う。
<効果> スケーリングした動きベクトル候補の周辺でさらに動きベクトルの再探索を行うことで、より精度の高い動きベクトル探索を、少ない演算量で実現することが可能となり、僅かな演算量の増加で精度の高い動き補償予測を実現し、高能率な符号化を行うことが可能となる。
(28) In (27), the determined motion vector is scaled according to the distance between each reference frame and the encoding target frame so that the prediction error signal is reduced in the vicinity of the scaled motion vector. The reference macroblock corresponding to at least one reference frame is individually re-searched, and motion compensation prediction is performed using the motion vector obtained as a result of the re-search.
<Effects> By re-searching motion vectors around the scaled motion vector candidates, it is possible to achieve a more accurate motion vector search with a small amount of computation, and accuracy with a slight increase in the amount of computation. It is possible to realize highly efficient motion compensation prediction and perform highly efficient encoding.

(29) 動画像の符号化対象マクロブロックに対して、時間的に過去の少なくとも一つの参照フレーム及び該符号化対象マクロブロックと該参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、前記符号化対象マクロブロックを含む符号化対象フレームの直前の前記符号化済みフレームにおける該符号化対象マクロブロックとフレーム内位置が同一の復号化対象マクロブロックの動きベクトルを用いるか、新たに前記動きベクトルを決定して符号化するかを符号化対象マクロブロック毎に切り替えて前記動き補償予測フレーム間符号化を行う。
<効果> これまで説明した通り、動き補償予測符号化では、動きベクトル符号化のためのオーバーヘッドが符号化効率に影響する。特に、予測効率の高い映像の符号化時や、マクロブロックのサイズが小さく符号化すべき動きベクトルの数が多い符号化を行う場合には、動きベクトルの符号量が支配的になる場合がある。(29)の構成によれば、映像の動きの時間相関を利用して、直前のフレームの符号化対象マクロブロックと同じ位置のマクロブロックの動きベクトルを、そのまま利用可能なマクロブロックでは、動きベクトルを符号化せず、また、直前のフレームの動きベクトルを利用すると予測効率が低下するマクロブロックだけ、新たに動きベクトルを符号化することで、動きベクトル符号化のオーバーヘッドを削減し、高能率な符号化を実現することが可能となる。
(29) With respect to a macro block to be encoded of a moving image, at least one reference frame in the past in time and a motion vector between the encoding target macro block and the reference frame are used to inter-motion compensated prediction frames. In the moving image encoding method for performing encoding, a decoding target macroblock having the same intra-frame position as the encoding target macroblock in the encoded frame immediately before the encoding target frame including the encoding target macroblock The motion compensated prediction interframe coding is performed by switching for each coding target macroblock whether the motion vector is used or whether the motion vector is newly determined and coded.
<Effect> As described above, in motion compensation predictive coding, overhead for motion vector coding affects coding efficiency. In particular, when encoding video with high prediction efficiency, or when encoding with a large macroblock size and a large number of motion vectors to be encoded, the amount of motion vector coding may be dominant. According to the configuration of (29), the motion vector of the macro block at the same position as the encoding target macro block of the immediately preceding frame is used using the temporal correlation of the motion of the video, In addition, the motion vector coding overhead is reduced by encoding new motion vectors only for macroblocks whose prediction efficiency decreases when the motion vector of the previous frame is used. Encoding can be realized.

(30) 動画像の符号化対象マクロブロックに対して、少なくとも一つの参照フレーム及び該符号化対象マクロブロックと該参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、(a)時間的に過去の少なくとも一つの符号化済みフレームを前記参照フレームとする第1予測モード、(b)時間的に未来の符号化済みフレームを前記参照フレームとする第2予測モード、(c)該時間的に過去及び未来の符号化済みフレームの線形和を前記参照フレームとする第3予測モード、及び(d)該時間的に過去の複数の符号化済みフレームの線形和を前記参照フレームとする第4予測モードを前記符号化対象マクロブロック毎に切り替えて前記動き補償予測フレーム間符号化を行う。
<効果> MPEG2ビデオ符号化で用いられているBピクチャ(両方向予測符号化)では、前方1フレームからの予測、後方1フレームからの予測、及び前後フレームからの平均予測のいずれかがマクログロック単位に切り替えられる。平均予測では、平均化処理がループフィルタとして機能し、参照画像における原画のノイズや符号化ノイズを除去して、予測効率を向上させる効果がある。ただし、シーンチェンジの前後では、両方向予測は困難となり、前方または後方の1フレームからの予測となり、ループフィルタ効果が作用せず、予測効率の低下を招いていしまう。(30)の構成によれば、前方のみの予測においても、複数の参照フレームからの線形和により予測画像を生成するため、ループフィルタ効果による予測効率の改善を得ることが可能となる。
(30) A moving image in which motion compensation prediction interframe coding is performed on at least one reference frame and a motion vector between the coding target macroblock and the reference frame with respect to a coding target macroblock of a moving image. In an image encoding method, (a) a first prediction mode in which at least one encoded frame in the past in time is used as the reference frame, and (b) an encoded frame in the future in time is used as the reference frame. A second prediction mode, (c) a third prediction mode in which a linear sum of the temporally past and future encoded frames is used as the reference frame, and (d) a plurality of temporally past encoded frames. The motion compensation prediction interframe coding is performed by switching the fourth prediction mode using the linear sum of the reference frames as the reference frame for each of the encoding target macroblocks.
<Effect> In a B picture (bidirectional predictive coding) used in MPEG2 video coding, any one of prediction from one front frame, prediction from one rear frame, and average prediction from preceding and following frames is a macro clock unit. Can be switched to. In the average prediction, the averaging process functions as a loop filter, which has the effect of improving the prediction efficiency by removing the noise of the original picture and the coding noise in the reference image. However, bi-directional prediction is difficult before and after the scene change, and prediction is performed from one frame forward or backward, and the loop filter effect does not act, leading to a decrease in prediction efficiency. According to the configuration of (30), even in the prediction only in the forward direction, the prediction image is generated by the linear sum from the plurality of reference frames, so that it is possible to improve the prediction efficiency due to the loop filter effect.

(31) (30)において、前記線形和による予測が、フレーム間距離に応じた線形内挿及び線形外挿である。
<効果> フェード等で信号強度が時間変化する場合でも、複数のフレームからの線形内挿あるいは線形外挿予測により、容易に適切な予測画像を生成することが可能となり、高い予測効率を得ることが可能となる。
(31) In (30), the prediction based on the linear sum is linear interpolation and linear extrapolation according to the interframe distance.
<Effect> Even when the signal intensity changes with time due to fade or the like, it is possible to easily generate an appropriate prediction image by linear interpolation or linear extrapolation prediction from a plurality of frames, and to obtain high prediction efficiency. Is possible.

(32) 動画像の復号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、(a)前記復号化対象マクロブロック毎の予測誤差信号、前記複数の参照フレームの組み合わせを示す第1インデックス、参照マクロブロックに対する線形和の重み係数の組を示す第2インデックス及び前記動きベクトルの情報を含む符号化データを復号化し、(b)復号化された前記動きベクトル及び前記第1インデックスの情報に従って前記複数の参照フレームから複数の参照マクロブロックを抽出し、(c)復号化された前記第2インデックスの情報によって示される前記重み係数の組を用いて、抽出した前記複数の参照マクロブロックの線形和を計算することにより予測マクロブロックを生成し、(d)前記予測マクロブロックと復号化された前記復号化対象マクロブロック毎の予測誤差信号を加算することにより動画像信号を復号化する。
<効果> (1)により符号化された符号化データを復号化することが可能であり、(1)と同様の符号化効率改善効果を有する。
(32) With respect to a decoding target macroblock of a moving image, a plurality of reference frames in a predetermined combination and a motion vector between the decoding target macroblock and at least one reference frame are used for motion compensation prediction frames In the moving picture decoding method for decoding, a set of (a) a prediction error signal for each decoding target macroblock, a first index indicating a combination of the plurality of reference frames, and a weight coefficient of a linear sum for the reference macroblock (B) decoding a plurality of reference macroblocks from the plurality of reference frames according to the decoded motion vector and the information of the first index. (C) the weight indicated by the decoded second index information. A prediction macroblock is generated by calculating a linear sum of the extracted plurality of reference macroblocks using a set of only coefficients, and (d) for each decoding target macroblock decoded with the prediction macroblock The video signal is decoded by adding the prediction error signals.
<Effect> It is possible to decode the encoded data encoded by (1), and has the same encoding efficiency improvement effect as (1).

(33) (32)において、前記線形和の重み係数の組を示すインデックスを、フレーム毎あるいは複数のフレーム毎のヘッダデータとし受信し、前記予測誤差信号、前記複数の参照フレームの組み合わせを示すインデックス、及び動きベクトルをマクロブロック毎に受信して復号化する。
<効果> (2)により符号化された符号化データを復号化することが可能であり、(2)と同様の符号化効率改善効果を有する。
(33) In (32), an index indicating the set of weighting factors of the linear sum is received as header data for each frame or a plurality of frames, and the index indicating a combination of the prediction error signal and the plurality of reference frames , And the motion vector are received and decoded for each macroblock.
<Effect> It is possible to decode the encoded data encoded by (2), and has the same encoding efficiency improvement effect as (2).

(34) (32)または(33)において、前記受信した動きベクトルが、前記複数の参照フレームのうち、特定の一つの参照フレームに関する動きベクトルであり、前記受信した動きベクトルを復号化フレームと参照フレームとのフレーム間距離に応じてスケーリングし、前記スケーリングした動きベクトルを用いて、他の一つまたは複数の参照フレームに対する動きベクトルを生成する。
<効果> (3)により符号化された符号化データを復号化することが可能であり、(3)と同様の符号化効率改善効果を有する。
(34) In (32) or (33), the received motion vector is a motion vector related to a specific reference frame among the plurality of reference frames, and the received motion vector is referred to as a decoded frame. Scaling is performed according to the distance between frames, and a motion vector for one or more other reference frames is generated using the scaled motion vector.
<Effect> It is possible to decode the encoded data encoded by (3), and has the same encoding efficiency improvement effect as (3).

(35) (34)において、前記特定の一つの参照フレームに関する動きベクトルが、前記参照フレームと符号化されるフレームとのフレーム間距離に応じて正規化された動きベクトルである。
<効果> (4)により符号化された符号化データを復号化することが可能であり、(4)と同様の符号化効率改善効果を有する。
(35) In (34), the motion vector related to the one specific reference frame is a motion vector normalized according to an interframe distance between the reference frame and a frame to be encoded.
<Effect> It is possible to decode the encoded data encoded by (4), and has the same effect of improving the encoding efficiency as (4).

(36) (34)において、前記特定の一つの参照フレームに関する動きベクトルが、前記複数の参照フレームのうち、符号化されるフレームとのフレーム間距離が最も遠い参照フレームに対する動きベクトルである。
<効果> (5)により符号化された符号化データを復号化することが可能であり、(5)と同様の符号化効率改善効果を有する。
(36) In (34), the motion vector related to the one specific reference frame is a motion vector for the reference frame having the longest interframe distance from the encoded frame among the plurality of reference frames.
<Effect> It is possible to decode the encoded data encoded by (5), and has the same encoding efficiency improvement effect as (5).

(37) (32)または(33)において、前記受信した動きベクトルが、前記複数の参照フレームのうち、特定の一つの参照フレームに関する第1動きベクトルと、他の一つまたは複数の参照フレームに対する差分ベクトルであり、前記第1動きベクトルを、符号化対象フレームと前記一つまたは複数の参照フレームとのフレーム間距離に応じてスケーリングし、前記スケーリングされた動きベクトルと、前記受信した一つまたは複数の参照フレームに対する差分ベクトルとを加算することで、前記他の一つまたは複数の参照フレームに対する動きベクトルを生成する。
<効果> (6)により符号化された符号化データを復号化することが可能であり、(6)と同様の符号化効率改善効果を有する。
(37) In (32) or (33), the received motion vector corresponds to a first motion vector related to a specific one reference frame and the other one or more reference frames among the plurality of reference frames. A difference vector, wherein the first motion vector is scaled according to an inter-frame distance between a frame to be encoded and the one or more reference frames, and the scaled motion vector and the received one or By adding difference vectors for a plurality of reference frames, motion vectors for the other one or more reference frames are generated.
<Effect> It is possible to decode the encoded data encoded by (6), and has the same effect of improving the encoding efficiency as (6).

(38) (37)において、前記受信した第1動きベクトルが、前記参照フレームと符号化されるフレームとのフレーム間距離に応じて正規化された動きベクトルである。
<効果> (7)により符号化された符号化データを復号化することが可能であり、(7)と同様の符号化効率改善効果を有する。
(38) In (37), the received first motion vector is a motion vector normalized according to an interframe distance between the reference frame and a frame to be encoded.
<Effect> It is possible to decode the encoded data encoded by (7), and has the same encoding efficiency improvement effect as (7).

(39) (37)において、前記受信した第1動きベクトルが、前記複数の参照フレームのうち、符号化されるフレームとのフレーム間距離が最も遠い参照フレームに対する動きベクトルである。
<効果> (8)により符号化された符号化データを復号化することが可能であり、(8)と同様の符号化効率改善効果を有する。
(39) In (37), the received first motion vector is a motion vector for a reference frame having the longest interframe distance from a frame to be encoded among the plurality of reference frames.
<Effect> It is possible to decode the encoded data encoded by (8), and has the same encoding efficiency improvement effect as (8).

(40) (32)〜(39)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、マクロブロックを復号化するのに必要な全ての動きベクトルの要素が0であるものとして、予め定められた複数の参照フレームの組み合わせを用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから、前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (9)により符号化された符号化データを復号化することが可能であり、(9)と同様の符号化効率改善効果を有する。
(40) In any one of (32) to (39), when information on the number of macroblocks skipped for each macroblock is received and one or more macroblocks are skipped, each skipped macro Assuming that all motion vector elements necessary for decoding a macroblock are zero for a block, a reference macroblock is obtained from the plurality of reference frames using a predetermined combination of reference frames. Extraction is performed, a prediction macroblock is generated from the plurality of reference macroblocks by a linear sum based on an index indicating a set of received weight coefficients of the linear sum, and the prediction macroblock is used as a decoded image.
<Effect> It is possible to decode the encoded data encoded by (9), and has the same encoding efficiency improvement effect as (9).

(41) (32)〜(39)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、直前のスキップされずに符号化されたマクロブロックの動きベクトルと、予め定められた複数の参照フレームの組み合わせを用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから、前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (10)により符号化された符号化データを復号化することが可能であり、(10)と同様の符号化効率改善効果を有する。
(41) In any one of (32) to (39), when information on the number of skipped macroblocks is received for each macroblock, and one or more macroblocks are skipped, each skipped macro For a block, a reference macroblock is extracted from the plurality of reference frames using a motion vector of a macroblock encoded without skipping immediately before and a combination of a plurality of predetermined reference frames. A prediction macroblock is generated from a reference macroblock by a linear sum based on an index indicating the received set of linear sum weighting factors, and the prediction macroblock is used as a decoded image.
<Effect> It is possible to decode the encoded data encoded by (10), and has the same effect of improving the encoding efficiency as (10).

(42) (40)または(41)において、前記予め定められた参照フレームの組み合わせが、直前に復号化された2フレームである。
<効果> (11)により符号化された符号化データを復号化することが可能であり、(11)と同様の符号化効率改善効果を有する。
(42) In (40) or (41), the predetermined reference frame combination is two frames decoded immediately before.
<Effect> It is possible to decode the encoded data encoded by (11), and has the same encoding efficiency improvement effect as (11).

(43) (40)または(41)において、前記予め定められた参照フレームの組み合わせを示すインデックスを符号化されたフレームのヘッダデータとして受信し、前記受信したインデックスに従って、スキップしたマクロブロックの復号を行う。
<効果> (12)により符号化された符号化データを復号化することが可能であり、(12)と同様の符号化効率改善効果を有する。
(43) In (40) or (41), an index indicating a predetermined combination of reference frames is received as header data of an encoded frame, and decoding of a skipped macroblock is performed according to the received index. Do.
<Effect> It is possible to decode the encoded data encoded by (12), and has the same encoding efficiency improvement effect as (12).

(44) (32)〜(39)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、マクロブロックを復号化するのに必要な全ての動きベクトルの要素が0であるものとして、直前のスキップされずに符号化されたマクロブロックにおける複数の参照フレームの組み合わせを示すインデックス用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (13)により符号化された符号化データを復号化することが可能であり、(13)と同様の符号化効率改善効果を有する。
(44) In any one of (32) to (39), when information on the number of skipped macroblocks is received for each macroblock, and one or more macroblocks are skipped, each skipped macro For a block, assuming that all the motion vector elements necessary for decoding the macroblock are 0, use an index indicating a combination of a plurality of reference frames in the immediately preceding macroblock encoded without skipping. A reference macroblock is extracted from the plurality of reference frames, a prediction macroblock is generated from the plurality of reference macroblocks by a linear sum based on an index indicating a set of weight coefficients of the received linear sum, and the prediction macro A block is used as a decoded image.
<Effect> It is possible to decode the encoded data encoded by (13), and has the same effect of improving encoding efficiency as (13).

(45) (32)〜(39)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、直前のスキップされずに符号化されたマクロブロックの動きベクトルと、前記直前のスキップされずに符号化されたマクロブロックにおける複数の参照フレームの組み合わせを示すインデックス用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから、前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (14)により符号化された符号化データを復号化することが可能であり、(14)と同様の符号化効率改善効果を有する。
(45) In any one of (32) to (39), when information on the number of skipped macroblocks is received for each macroblock, and one or more macroblocks are skipped, each skipped macro For a block, the plurality of references using a motion vector of a macroblock encoded without skipping immediately before and an index indicating a combination of a plurality of reference frames in the macroblock encoded without skipping immediately before A reference macroblock is extracted from the frame, a prediction macroblock is generated from the plurality of reference macroblocks by a linear sum based on an index indicating a set of weighting factors of the received linear sum, and the prediction macroblock is decoded Used as an image.
<Effect> It is possible to decode the encoded data encoded by (14), and has the same effect of improving the encoding efficiency as (14).

(46) (32)〜(39)のいずれかにおいて、前記受信した動きベクトルが、フレーム内で隣接する一つまたは複数のマクロブロックの動きベクトルから予測した動きベクトルとの差分ベクトルとして符号化されており、前記隣接する複数のマクロブロックの復号化された動きベクトルから予測動きベクトルを生成し、前記受信した動きベクトルと加算することで、該当するマクロブロックの動きベクトルを復号化する。
<効果> (15)により符号化された符号化データを復号化することが可能であり、(15)と同様の符号化効率改善効果を有する。
(46) In any one of (32) to (39), the received motion vector is encoded as a difference vector with a motion vector predicted from motion vectors of one or a plurality of macroblocks adjacent in the frame. The motion vector of the corresponding macroblock is decoded by generating a motion vector predictor from the decoded motion vectors of the plurality of adjacent macroblocks and adding the motion vector to the received motion vector.
<Effect> It is possible to decode the encoded data encoded by (15), and has the same encoding efficiency improvement effect as (15).

(47) (32)〜(39)のいずれかにおいて、前記受信した動きベクトルが、直前のフレーム内の同一位置のマクロブロックにおける動きベクトルから予測した動きベクトルとの差分動きベクトルとして符号化されており、直前に復号化したフレームの同一位置のマクロブロックにおける復号化された動きベクトルから予測した動きベクトルと、前記受信した動きベクトルとを加算することにより、該当するマクロブロックの動きベクトルを復号化することを第47の特徴とする。
<効果> (16)により符号化された符号化データを復号化することが可能であり、(16)と同様の符号化効率改善効果を有する。
(47) In any one of (32) to (39), the received motion vector is encoded as a difference motion vector with a motion vector predicted from a motion vector in a macroblock at the same position in the immediately preceding frame. In addition, the motion vector predicted from the decoded motion vector in the macroblock at the same position in the frame decoded immediately before is added to the received motion vector, thereby decoding the motion vector of the corresponding macroblock. This is a 47th feature.
<Effect> It is possible to decode the encoded data encoded by (16), and has the same effect of improving the encoding efficiency as (16).

(48) (32)〜(39)のいずれかにおいて、前記受信した動きベクトルが、フレーム内で隣接する一つまたは複数のマクロブロック、及び直前のフレーム内の同一位置のマクロブロックにおける動きベクトルから予測した動きベクトルとの差分動きベクトルとして符号化されており、前記隣接する複数のマクロブロックの復号化された動きベクトルと、直前に復号化したフレームの同一位置のマクロブロックにおける復号化された動きベクトルから予測動きベクトルを生成し、前記予測動きベクトルと前記受信した動きベクトルとを加算することにより、該当するマクロブロックの動きベクトルを復号化する。
<効果> (17)により符号化された符号化データを復号化することが可能であり、(17)と同様の符号化効率改善効果を有する。
(48) In any one of (32) to (39), the received motion vector is obtained from motion vectors in one or more adjacent macroblocks in a frame and macroblocks at the same position in the immediately preceding frame. It is encoded as a difference motion vector with the predicted motion vector, and the decoded motion vector in the adjacent macroblock and the decoded motion in the macroblock at the same position in the frame decoded immediately before A motion vector of a corresponding macroblock is decoded by generating a motion vector predictor from the vector and adding the motion vector predictor and the received motion vector.
<Effect> It is possible to decode the encoded data encoded by (17), and has the same encoding efficiency improvement effect as (17).

(49) (46)〜(48)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、前記予測動きベクトルをスキップしたマクロブロックの動きベクトルとして、予め定められた複数の参照フレームの組み合わせを用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから、前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (18)により符号化された符号化データを復号化することが可能であり、(18)と同様の符号化効率改善効果を有する。
(49) In any one of (46) to (48), when information on the number of macroblocks skipped for each macroblock is received and one or more macroblocks are skipped, each skipped macro For a block, a reference macroblock is extracted from the plurality of reference frames using a combination of a plurality of predetermined reference frames as a motion vector of a macroblock in which the predicted motion vector is skipped, and the plurality of reference macroblocks Then, a predicted macroblock is generated by a linear sum based on the received index indicating the set of linear sum weighting factors, and the predicted macroblock is used as a decoded image.
<Effect> It is possible to decode the encoded data encoded by (18), and has the same encoding efficiency improvement effect as (18).

(50) (46)〜(48)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、直前のスキップされずに符号化されたマクロブロックの動きベクトルを前記予測動きベクトルに加算した動きベクトルと、予め定められた複数の参照フレームの組み合わせを用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから、前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (19)により符号化された符号化データを復号化することが可能であり、(19)と同様の符号化効率改善効果を有する。
(50) In any one of (46) to (48), when information on the number of macroblocks skipped for each macroblock is received and one or more macroblocks are skipped, each skipped macro For a block, using a combination of a motion vector obtained by adding a motion vector of a macroblock encoded without skipping immediately before to the predicted motion vector and a plurality of reference frames determined in advance, from the plurality of reference frames A reference macroblock is extracted, a prediction macroblock is generated from the plurality of reference macroblocks by a linear sum based on an index indicating a set of the received linear sum weight coefficients, and the prediction macroblock is used as a decoded image. Use.
<Effect> It is possible to decode the encoded data encoded by (19), and has the same encoding efficiency improvement effect as (19).

(51) (49)または(50)において、前記予め定められた参照フレームの組み合わせが、直前に復号化された2フレームである。
<効果> (20)により符号化された符号化データを復号化することが可能であり、(20)と同様の符号化効率改善効果を有する。
(51) In (49) or (50), the predetermined reference frame combination is two frames decoded immediately before.
<Effect> It is possible to decode the encoded data encoded by (20), and has the same encoding efficiency improvement effect as (20).

(52) (49)または(50)において、前記予め定められた参照フレームの組み合わせを示すインデックスを符号化されたフレームのヘッダデータとして受信し、前記受信したインデックスに従って、スキップしたマクロブロックの復号を行う。
<効果> (21)により符号化された符号化データを復号化することが可能であり、(21)と同様の符号化効率改善効果を有する。
(52) In (49) or (50), an index indicating the predetermined reference frame combination is received as header data of an encoded frame, and the skipped macroblock is decoded in accordance with the received index. Do.
<Effect> It is possible to decode the encoded data encoded by (21), and has the same encoding efficiency improvement effect as (21).

(53) (46)〜(48)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、前記予測動きベクトルをスキップしたマクロブロックの動きベクトルとして、直前のスキップされずに符号化されたマクロブロックにおける複数の参照フレームの組み合わせを示すインデックス用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから、前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (22)により符号化された符号化データを復号化することが可能であり、(22)と同様の符号化効率改善効果を有する。
(53) In any one of (46) to (48), when information on the number of skipped macroblocks is received for each macroblock and one or more macroblocks are skipped, each skipped macro For a block, a reference macro from the plurality of reference frames is used by using an index indicating a combination of a plurality of reference frames in a macroblock coded without skipping as a motion vector of a macroblock in which the predicted motion vector is skipped. A block is extracted, a prediction macroblock is generated from the plurality of reference macroblocks by a linear sum based on an index indicating a set of weight coefficients of the received linear sum, and the prediction macroblock is used as a decoded image.
<Effect> It is possible to decode the encoded data encoded by (22), and has the same encoding efficiency improvement effect as (22).

(54) (46)〜(48)のいずれかにおいて、マクロブロック毎にスキップしたマクロブロック数に関する情報を受信し、一つ以上のマクロブロックがスキップされている場合は、スキップされたそれぞれのマクロブロックについて、直前のスキップされずに符号化されたマクロブロックの差分動きベクトルを、前記予測動きベクトルに加算して動きベクトル生成し、前記直前のスキップされずに符号化されたマクロブロックにおける複数の参照フレームの組み合わせを示すインデックス用いて、前記複数の参照フレームから参照マクロブロックを抽出し、前記複数の参照マクロブロックから、前記受信した線形和の重み係数の組を示すインデックスに基づいた線形和により予測マクロブロックを生成し、前記予測マクロブロックを復号化画像として用いる。
<効果> (23)により符号化された符号化データを復号化することが可能であり、(23)と同様の符号化効率改善効果を有する。
(54) In any one of (46) to (48), when information on the number of macroblocks skipped for each macroblock is received and one or more macroblocks are skipped, each skipped macro For the block, a motion vector is generated by adding a difference motion vector of the macroblock encoded without skipping immediately before to the predicted motion vector, and a plurality of macroblocks encoded without skipping immediately before are encoded. A reference macroblock is extracted from the plurality of reference frames using an index indicating a combination of reference frames, and a linear sum based on an index indicating a set of received weight coefficients of the linear sum is extracted from the plurality of reference macroblocks. Generate a prediction macroblock and decode the prediction macroblock Used as a digitized image.
<Effect> It is possible to decode the encoded data encoded by (23), and has the same encoding efficiency improvement effect as (23).

(55) 動画像の復号化対象マクロブロックに対して、所定の組み合わせの複数の参照フレーム及び該復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、(a)前記復号化対象マクロブロック毎の予測誤差信号、前記複数の参照フレームの組み合わせを示す第1インデックス、符号化済みフレームのフレーム番号を示す第2インデックス及び前記動きベクトルの情報を含む符号化データを復号化し、(b)復号化された前記動きベクトル及び前記第1インデックスの情報に従って前記複数の参照フレームから複数の参照マクロブロックを抽出し、(c)復号化された前記第2インデックスの情報に従って前記複数の参照フレームと前記符号化済みフレームとのフレーム間距離を算出し、(d)算出された前記フレーム間距離に応じて決定される重み係数の組を用いて、抽出した前記複数の参照マクロブロックの線形和を計算することにより予測マクロブロックを生成し、(e)前記予測マクロブロックと復号化された前記予測誤差信号を加算することにより動画像信号を復号化する。
<効果> (24)により符号化された符号化データを復号化することが可能であり、(24)と同様の符号化効率改善効果を有する。
(55) Between motion compensation prediction frames using a plurality of reference frames in a predetermined combination and a motion vector between the decoding target macroblock and at least one reference frame for a decoding target macroblock of a moving image In the moving picture decoding method for decoding, (a) a prediction error signal for each decoding target macroblock, a first index indicating a combination of the plurality of reference frames, and a second index indicating a frame number of the encoded frame Decoding encoded data including index and motion vector information; and (b) extracting a plurality of reference macroblocks from the plurality of reference frames according to the decoded motion vector and the first index information. c) The plurality of reference frames according to the decoded information of the second index and the Calculate the inter-frame distance from the encoded frame, and (d) calculate the linear sum of the extracted reference macroblocks using a set of weighting factors determined according to the calculated inter-frame distance. Thus, a prediction macroblock is generated, and (e) a moving picture signal is decoded by adding the prediction macroblock and the decoded prediction error signal.
<Effect> It is possible to decode the encoded data encoded by (24), and has the same effect of improving the encoding efficiency as (24).

(56) 動画像の復号化対象マクロブロックに対して、時間的に過去の少なくとも一つの参照フレーム及び該復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、(a)前記復号化対象マクロブロック毎の予測誤差信号と、符号化された第1動きベクトルまたは直前の符号化済みフレームにおけるフレーム内同一位置のマクロブロックの第2動きベクトルを用いることを示すフラグの何れかの情報を含む符号化データを受信して復号化し、(b)前記第1動きベクトルの情報を受信した復号化対象マクロブロックに対しては復号化された前記第1動きベクトル、前記フラグを受信した復号化対象マクロブロックに対しては前記第2動きベクトルをそれぞれ用いて予測マクロブロック信号を生成し、(c)前記予測マクロブロックと復号化された前記予測誤差信号を加算することにより動画像信号を復号化する。
<効果> (29)により符号化された符号化データを復号化することが可能であり、(29)と同様の符号化効率改善効果を有する。
(56) Motion-compensated prediction for a decoding target macroblock of a moving image using at least one reference frame in the past in time and a motion vector between the decoding target macroblock and at least one reference frame In the moving picture decoding method for performing inter-frame decoding, (a) the prediction error signal for each decoding target macroblock and the encoded first motion vector or the same position in the frame in the immediately preceding encoded frame Receiving and decoding encoded data including any information of a flag indicating that the second motion vector of the macroblock is used; and (b) for the decoding target macroblock having received the information of the first motion vector. For the decoded first motion vector and the decoding target macroblock that has received the flag, the second motion vector is used. A prediction macroblock signal is generated using each of the vectors, and (c) the moving picture signal is decoded by adding the prediction macroblock and the decoded prediction error signal.
<Effect> It is possible to decode the encoded data encoded by (29), and has the same encoding efficiency improvement effect as (29).

(57) 動画像の復号化対象マクロブロックに対して、復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、(a)前記復号化対象マクロブロック毎の予測誤差信号の情報と、時間的に過去の少なくとも一つの符号化対象フレームを前記参照フレームとする第1予測モード、時間的に未来の符号化対象フレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化対象フレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化対象フレームの線形和を前記参照フレームとする第4予測モードのいずれかを示す予測モード情報及び前記動きベクトルの情報を含む符号化データを受信して復号化し、(b)前記予測モード情報及び前記動きベクトルの情報を用いて予測マクロブロック信号を生成し、(c)前記予測マクロブロック信号と復号化された前記予測誤差信号を加算することより動画像信号を復号化する。
<効果> (30)により符号化された符号化データを復号化することが可能であり、(30)と同様の符号化効率改善効果を有する。
(57) In a moving picture decoding method for performing motion compensation prediction interframe decoding on a moving picture decoding target macroblock using a motion vector between the decoding target macroblock and at least one reference frame. (A) Prediction error signal information for each decoding target macroblock, a first prediction mode in which at least one encoding target frame in the past is the reference frame, and a future encoding target in the future A second prediction mode in which a frame is the reference frame, a third prediction mode in which a linear sum of the temporally and future encoding target frames is the reference frame, and the temporally multiple encoding targets Encoded data including prediction mode information indicating one of the fourth prediction modes using a linear sum of frames as the reference frame, and information on the motion vector And (b) generating a prediction macroblock signal using the prediction mode information and the motion vector information, and (c) adding the prediction macroblock signal and the decoded prediction error signal. Thus, the moving image signal is decoded.
<Effect> It is possible to decode the encoded data encoded by (30), and has the same encoding efficiency improvement effect as (30).

(58) (57)において、前記線形和による予測がフレーム間距離に応じた線形内挿及び線形外挿である。
<効果> (31)により符号化された符号化データを復号化することが可能であり、(31)と同様の符号化効率改善効果を有する。
(58) In (57), the prediction based on the linear sum is linear interpolation and linear extrapolation according to the interframe distance.
<Effect> It is possible to decode the encoded data encoded by (31), and has the same encoding efficiency improvement effect as (31).

(59) 動画像の符号化対象マクロブロックに対して、複数の参照フレームから選択された少なくとも一つの参照フレーム、及び該符号化対象マクロブロックと該少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、前記動きベクトルが前記動画像の前記符号化対象マクロブロックに隣接する複数のマクロブロックに対する動きベクトルから選択された予測ベクトルと一致し、かつ前記符号化対象マクロブロックに対して選択された少なくとも一つの参照フレームが前記予測ベクトルが選択されたマクロブロックに対する参照フレームと一致し、前記動き補償予測フレーム間符号化における符号化すべき予測誤差信号が全て0である符号化対象マクロブロックに対して、前記動き補償予測フレーム間符号化をスキップし、次の符号化対象マクロブロックの動き補償予測フレーム間符号化に際して該動き補償予測フレーム間符号化をスキップしたマクロブロックの個数を符号化する。
<効果> (22)と同様に、隣接するマクロブロック間のフレーム間予測における動きベクトル及び参照フレーム選択の相関を利用して、効率的にマクロブロックスキップを発生させて、符号化オーバーヘッドを低減して符号化効率を向上させることが可能であるとともに、動きベクトルの予測で用いられた隣接マクロブロックと同一の参照フレームを用いることをスキップ条件とすることで、動きベクトルと参照フレームとの組みによる隣接マクロブロック間相関を利用して、さらに効率的にマクロブロックスキップを発生させることが可能となる。
(59) At least one reference frame selected from a plurality of reference frames, and a motion vector between the encoding target macroblock and the at least one reference frame, with respect to the encoding target macroblock of the moving image In the moving picture coding method using the motion compensated prediction interframe coding, the motion vector is identical to a prediction vector selected from motion vectors for a plurality of macroblocks adjacent to the coding target macroblock of the moving picture. And at least one reference frame selected for the encoding target macroblock matches a reference frame for the macroblock for which the prediction vector is selected, and the prediction to be encoded in the motion compensated prediction interframe coding For the macroblock to be encoded whose error signal is all zero Thus, the motion compensated prediction interframe coding is skipped, and the number of macroblocks for which the motion compensated prediction interframe coding is skipped at the time of motion compensated prediction interframe coding of the next encoding target macroblock is coded.
<Effect> Similar to (22), by using the correlation between the motion vector and the reference frame selection in the inter-frame prediction between adjacent macroblocks, the macroblock skip is efficiently generated and the coding overhead is reduced. It is possible to improve coding efficiency and to use a reference frame that is the same as the adjacent macroblock used in motion vector prediction as a skip condition. It is possible to generate a macro block skip more efficiently by using the correlation between adjacent macro blocks.

(60) 動画像の符号化対象マクロブロックに対して、複数の参照フレームから選択された少なくとも一つの第1参照フレーム、及び該符号化対象マクロブロックと該第1参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、前記動き補償予測フレーム間符号化により得られる予測誤差信号、前記動き補償予測フレーム間符号化に用いる動きベクトルと前記符号化対象マクロブロックに隣接する複数のマクロブロックと第2参照フレームとの間の動きベクトルから選択された予測ベクトルとの差分ベクトル、及び前記第1参照フレームを示すインデックスと前記第2参照フレームを示すインデックスとの差分値を符号化する。
<効果> (15)〜(17)と同様に、隣接するマクロブロック間の動きベクトルの相関を利用して、動きベクトル情報を効率的に符号化するとともに、複数の参照フレームの中から各マクロブロックが参照するフレームに関するインデックスについて、予測ベクトルが選択された隣接マクロブロックにおける参照フレームを示すインデックスと、符号化対象マクロブロックにおける参照フレームを示すインデックスとの差分値を符号化することにより、動きベクトルと参照フレームとの組みによる隣接マクロブロック間相関を利用して、参照フレームを示すインデックスの符号化効率を向上させることが可能となり、符号化オーバーヘッドを低減して高能率な動画像符号化を行うことが可能となる。
(60) At least one first reference frame selected from a plurality of reference frames for a coding target macroblock of a moving image, and a motion vector between the coding target macroblock and the first reference frame In the moving picture coding method for performing motion compensation prediction interframe coding using a motion compensation prediction interframe coding, a prediction error signal obtained by the motion compensation prediction interframe coding, a motion vector used for the motion compensation prediction interframe coding and the coding A difference vector between prediction vectors selected from motion vectors between a plurality of macroblocks adjacent to the target macroblock and the second reference frame, and an index indicating the first reference frame and an index indicating the second reference frame The difference value is encoded.
<Effect> Similar to (15) to (17), motion vector information is efficiently encoded using the correlation of motion vectors between adjacent macroblocks, and each macro is selected from a plurality of reference frames. A motion vector is encoded by encoding a difference value between an index indicating a reference frame in an adjacent macroblock for which a prediction vector is selected and an index indicating a reference frame in an encoding target macroblock with respect to an index related to a frame referred to by the block. It is possible to improve the coding efficiency of the index indicating the reference frame by using the correlation between adjacent macroblocks based on the combination of the frame and the reference frame, and perform highly efficient video coding by reducing the coding overhead. It becomes possible.

(61) 動画像の復号化対象マクロブロックに対して、該復号化対象マクロブロックと複数の参照フレームの中から選択された少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、(a)動き補償予測フレーム間符号化により得られた前記復号化対象マクロブロック毎の予測誤差信号、直前にスキップしたマクロブロックの個数及び前記選択された少なくとも一つの参照フレームを示すインデックスの情報を含む符号化データを受信して復号化し、(b)前記スキップしたマクロブロックにおいて該スキップしたマクロブロックに隣接する複数のマクロブロックの動きベクトルから一つの予測ベクトルを選択し、(c)前記予測ベクトルが選択されたマクロブロックに対する少なくとも一つの参照フレーム及び前記予測ベクトルに従って予測マクロブロックを生成し、(d)前記予測マクロブロックを前記スキップしたマクロブロックの復号化画像信号として出力する。
<効果> (59)により符号化された符号化データを復号化することが可能となり、(59)と同様の符号化効率改善効果を有する。
(61) For a decoding target macroblock of a moving image, a motion compensated prediction frame using a motion vector between the decoding target macroblock and at least one reference frame selected from a plurality of reference frames In the video decoding method for performing inter-decoding, (a) a prediction error signal for each decoding target macroblock obtained by motion compensated prediction interframe coding, the number of macroblocks skipped immediately before and the selected Encoded data including index information indicating at least one reference frame is received and decoded, and (b) one of motion vectors of a plurality of macroblocks adjacent to the skipped macroblock in the skipped macroblock. (C) a macroblock from which the prediction vector is selected. A prediction macroblock is generated according to at least one reference frame and the prediction vector, and (d) the prediction macroblock is output as a decoded image signal of the skipped macroblock.
<Effect> It becomes possible to decode the encoded data encoded by (59), and has the same encoding efficiency improvement effect as (59).

(62) 動画像の復号化対象マクロブロックに対して、該復号化対象マクロブロックと複数の参照フレームの中から選択された少なくとも一つの第1参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、(a)動き補償予測フレーム間符号化により得られた予測誤差信号、該動き補償予測フレーム間符号化に用いた動きベクトルと前記復号化対象マクロブロックに隣接する複数のマクロブロックと第2参照フレームとの間の動きベクトルから選択された予測ベクトルとの差分ベクトル、及び前記第1参照フレームを示す第1インデックスと前記第2参照フレームを示す第2インデックスとの差分値を含む符号化データを受信して復号化し、(b)前記復号化対象マクロブロックに隣接する複数のマクロブロックから前記予測ベクトルを選択し、(c)選択された予測ベクトルと復号化された前記差分ベクトルとを加算することにより前記動きベクトルを再生し、(d)前記予測ベクトルが選択されたマクロブロックにおける参照フレームのインデックスと前記復号化した差分値とを加算することにより前記第1インデックスを再生し、(e)前記再生された動きベクトル及び再生された第1インデックスに従って予測マクロブロックを生成し、(f)生成された前記予測マクロブロックと前記復号化された予測誤差信号とを加算することにより前記復号化対象マクロブロックの復号化再生画像信号を生成する。
<効果> (60)により符号化された符号化データを復号化することが可能となり、(60)と同様の符号化効率改善効果を有する。
(62) For a decoding target macroblock of a moving image, motion compensation is performed using a motion vector between the decoding target macroblock and at least one first reference frame selected from a plurality of reference frames. In a video decoding method for performing inter-prediction frame decoding, (a) a prediction error signal obtained by motion-compensated prediction inter-frame coding, a motion vector used for the motion-compensated prediction inter-frame coding, and the decoding target A difference vector between a prediction vector selected from motion vectors between a plurality of macroblocks adjacent to the macroblock and the second reference frame, and a first index indicating the first reference frame and the second reference frame are indicated. Receiving and decoding encoded data including a difference value from the second index, and (b) adjacent to the decoding target macroblock Selecting the prediction vector from a plurality of macroblocks to be reproduced, (c) regenerating the motion vector by adding the selected prediction vector and the decoded difference vector, and (d) selecting the prediction vector Regenerating the first index by adding the index of the reference frame in the reconstructed macroblock and the decoded difference value, and (e) predicting the macroblock according to the reconstructed motion vector and the reconstructed first index (F) The decoded prediction image signal of the decoding target macroblock is generated by adding the generated prediction macroblock and the decoded prediction error signal.
<Effect> It becomes possible to decode the encoded data encoded by (60), and has the same encoding efficiency improvement effect as (60).

前述したように、本発明に係る動画像符号化及び復号化の処理は、ハードウエア(装置)として実現してもよいし、コンピュータを用いてソフトウエアにより実行してもよい。一部の処理をハードウエアで実現し、他の処理をソフトウエアにより行ってもよい。従って、本発明によると(1)〜(62)で説明した動画像符号化または復号化処理をコンピュータに行わせるためのプログラムを提供することも可能である。   As described above, the moving image encoding and decoding processing according to the present invention may be realized as hardware (apparatus) or may be executed by software using a computer. Some processing may be realized by hardware, and other processing may be performed by software. Therefore, according to the present invention, it is also possible to provide a program for causing a computer to perform the moving image encoding or decoding processing described in (1) to (62).

本発明の第1の実施形態に係る動画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the moving image encoder which concerns on the 1st Embodiment of this invention. 本発明の第2の実施形態に係る動画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the moving image encoder which concerns on the 2nd Embodiment of this invention. 本発明の第1及び第2の実施形態に係る動画像復号化装置の構成を示すブロック図The block diagram which shows the structure of the moving image decoding apparatus which concerns on the 1st and 2nd embodiment of this invention. 本発明の実施形態に係るフレーム間予測の関係を示す図The figure which shows the relationship of the inter-frame prediction which concerns on embodiment of this invention. 本発明の実施形態に係る線形予測係数テーブルの例を示す図The figure which shows the example of the linear prediction coefficient table which concerns on embodiment of this invention. 本発明の実施形態に係る線形予測係数テーブルの例を示す図The figure which shows the example of the linear prediction coefficient table which concerns on embodiment of this invention. 本発明の実施形態に係る参照フレームを示すテーブルの例を示す図The figure which shows the example of the table which shows the reference frame which concerns on embodiment of this invention 本発明の第3の実施形態に係る動画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the moving image encoder which concerns on the 3rd Embodiment of this invention. 本発明の第3の実施形態に係る動画像復号化装置の構成を示すブロック図The block diagram which shows the structure of the moving image decoding apparatus which concerns on the 3rd Embodiment of this invention. 本発明の実施形態に係る線形予測係数を示すシンタックスの例を示す図The figure which shows the example of the syntax which shows the linear prediction coefficient which concerns on embodiment of this invention 本発明の実施形態に係る参照フレームを示すテーブルの例を示す図The figure which shows the example of the table which shows the reference frame which concerns on embodiment of this invention 本発明の実施形態に係るフレーム間予測の関係を示す図The figure which shows the relationship of the inter-frame prediction which concerns on embodiment of this invention. 本発明の実施形態に係るフレーム間予測の関係を示す図The figure which shows the relationship of the inter-frame prediction which concerns on embodiment of this invention. 本発明の実施形態に係る動きベクトル情報の符号化方法及び復号化方法の例を示す図The figure which shows the example of the encoding method of the motion vector information which concerns on embodiment of this invention, and a decoding method 本発明の実施形態に係る動きベクトル情報の符号化方法及び復号化方法の例を示す図The figure which shows the example of the encoding method of the motion vector information which concerns on embodiment of this invention, and a decoding method 本発明の実施形態に係る動きベクトル情報の符号化方法及び復号化方法の例を示す図The figure which shows the example of the encoding method of the motion vector information which concerns on embodiment of this invention, and a decoding method 本発明の実施形態に係る動きベクトル情報の予測符号化方法を説明する図The figure explaining the prediction encoding method of the motion vector information which concerns on embodiment of this invention 本発明の実施形態に係る動きベクトル情報の予測符号化方法を説明する図The figure explaining the prediction encoding method of the motion vector information which concerns on embodiment of this invention 本発明の第4の実施形態に係る動画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the moving image encoder which concerns on the 4th Embodiment of this invention. 本発明の実施形態に係る線形予測係数の決定方法の例を説明する図The figure explaining the example of the determination method of the linear prediction coefficient which concerns on embodiment of this invention 本発明の実施形態に係る線形予測係数の決定方法の例を説明する図The figure explaining the example of the determination method of the linear prediction coefficient which concerns on embodiment of this invention 本発明の実施形態に係る線形予測係数の決定方法の例を説明する図The figure explaining the example of the determination method of the linear prediction coefficient which concerns on embodiment of this invention 本発明の実施形態に係る線形予測係数の決定方法の例を説明する図The figure explaining the example of the determination method of the linear prediction coefficient which concerns on embodiment of this invention 本発明の実施形態に係る線形予測係数の決定方法の例を説明する図The figure explaining the example of the determination method of the linear prediction coefficient which concerns on embodiment of this invention 本発明の実施形態に係る動きベクトル探索方法を説明する図The figure explaining the motion vector search method which concerns on embodiment of this invention 本発明の実施形態に係る動きベクトル探索方法を説明する図The figure explaining the motion vector search method which concerns on embodiment of this invention 本発明の実施形態に係る動きベクトル符号化方法を説明する図The figure explaining the motion vector encoding method which concerns on embodiment of this invention 本発明の実施形態に係る動きベクトル符号化方法を説明する図The figure explaining the motion vector encoding method which concerns on embodiment of this invention 本発明の実施形態に係るフレーム間予測の関係を示す図The figure which shows the relationship of the inter-frame prediction which concerns on embodiment of this invention. 本発明の実施形態に係る動きベクトル符号化方法を説明する図The figure explaining the motion vector encoding method which concerns on embodiment of this invention 本発明の実施形態に係る動きベクトル符号化方法を説明する図The figure explaining the motion vector encoding method which concerns on embodiment of this invention 本発明の実施形態に係る動きベクトル符号化方法を説明する図The figure explaining the motion vector encoding method which concerns on embodiment of this invention 本発明の実施形態に関する動画像符号化の手順を示すフローチャートThe flowchart which shows the procedure of the moving image encoding regarding embodiment of this invention. 本発明の実施形態に関する重み付き予測を説明する図The figure explaining the weighted prediction regarding embodiment of this invention 本発明の実施形態に関するピクチャヘッダまたはスライスヘッダのデータ構造を示す図The figure which shows the data structure of the picture header or slice header regarding embodiment of this invention 本発明の実施形態に関する重み付き予測の係数テーブルのデータ構造の第1の例を示す図The figure which shows the 1st example of the data structure of the coefficient table of the weighted prediction regarding embodiment of this invention 本発明の実施形態に関する重み付き予測の係数テーブルのデータ構造の第2の例を示す図The figure which shows the 2nd example of the data structure of the coefficient table of the weighted prediction regarding embodiment of this invention. 本発明の実施形態に係る動画像符号化データのデータ構造を示す図The figure which shows the data structure of the moving image encoded data which concerns on embodiment of this invention. 本発明の実施形態に関する動画像復号化の手順を示すフローチャートThe flowchart which shows the procedure of the moving image decoding regarding embodiment of this invention.

符号の説明Explanation of symbols

100…入力動画像信号(符号化対象フレーム)
101…予測誤差信号
102…量子化DCT係数データ
103…局部復号化画像信号
104,105…参照マクロブロック信号
106…予測画像信号
107…サイド情報
108…符号化データ
111…減算器
112…DCT変換器
113…量子化器
114…可変長符号化器
115…逆量子化器
116…逆DCT変換器
117,118,152…参照フレームメモリ
119…予測マクロブロック生成器
120…予測マクロブロック選択器
140…フェード検出器
150…予測マクロブロック選択器
151…線形予測器
200…符号化データ
201…量子化DCT係数データ
202…サイド情報
203…復号化画像信号
204,205…参照マクロブロック信号
206…予測画像信号
214…可変長復号化器
215…逆量子化器
216…逆DCT変換器
217,218,252…参照フレームメモリ
219…予測マクロブロック生成器
220…予測マクロブロック選択器
250…予測マクロブロック選択器
251…線形予測器
100: Input video signal (frame to be encoded)
DESCRIPTION OF SYMBOLS 101 ... Prediction error signal 102 ... Quantization DCT coefficient data 103 ... Local decoded image signal 104, 105 ... Reference macroblock signal 106 ... Prediction image signal 107 ... Side information 108 ... Encoded data 111 ... Subtractor 112 ... DCT converter DESCRIPTION OF SYMBOLS 113 ... Quantizer 114 ... Variable length encoder 115 ... Inverse quantizer 116 ... Inverse DCT converter 117, 118, 152 ... Reference frame memory 119 ... Prediction macroblock generator 120 ... Prediction macroblock selector 140 ... Fade Detector 150 ... Prediction macroblock selector 151 ... Linear predictor 200 ... Encoded data 201 ... Quantized DCT coefficient data 202 ... Side information 203 ... Decoded image signal 204, 205 ... Reference macroblock signal 206 ... Predicted image signal 214 ... variable length decoder 215 ... inverse quantization 216 ... inverse DCT transformer 217,218,252 ... reference frame memory 219 ... prediction macroblock generator 220 ... prediction macroblock selector 250 ... prediction macroblock selector 251 ... linear predictor

Claims (6)

動画像の符号化対象マクロブロックに対して、少なくとも一つの参照フレーム及び該符号化対象マクロブロックと該参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化方法において、
時間的に過去の少なくとも一つの符号化済みフレームを前記参照フレームとする第1予測モード、時間的に未来の符号化済みフレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化済みフレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化済みフレームの線形和を前記参照フレームとする第4予測モードを前記符号化対象マクロブロック毎に切り替えて前記動き補償予測フレーム間符号化を行う動画像符号化方法。
Moving picture coding for performing motion compensated prediction inter-frame coding on a coding target macroblock of a moving picture using at least one reference frame and a motion vector between the coding target macroblock and the reference frame In the method
A first prediction mode in which at least one encoded frame in the past in time is used as the reference frame, a second prediction mode in which an encoded frame in the future in time is used as the reference frame, the time in the past and the future A third prediction mode in which the linear sum of the encoded frames of the reference frame is the reference frame, and a fourth prediction mode in which the reference frame is a linear sum of the plurality of temporally encoded frames. A moving picture coding method for performing the motion compensation prediction interframe coding by switching for each macroblock.
動画像の符号化対象マクロブロックに対して、少なくとも一つの参照フレーム及び該符号化対象マクロブロックと該参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化装置において、
時間的に過去の少なくとも一つの符号化済みフレームを前記参照フレームとする第1予測モード、時間的に未来の符号化済みフレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化済みフレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化済みフレームの線形和を前記参照フレームとする第4予測モードを前記符号化対象マクロブロック毎に切り替えて前記動き補償予測フレーム間符号化を行う手段を具備する動画像符号化装置。
Moving picture coding for performing motion compensated prediction inter-frame coding on a coding target macroblock of a moving picture using at least one reference frame and a motion vector between the coding target macroblock and the reference frame In the device
A first prediction mode in which at least one encoded frame in the past in time is used as the reference frame, a second prediction mode in which an encoded frame in the future in time is used as the reference frame, the time in the past and the future A third prediction mode in which the linear sum of the encoded frames of the reference frame is the reference frame, and a fourth prediction mode in which the reference frame is a linear sum of the plurality of temporally encoded frames. A moving picture coding apparatus comprising means for performing the motion compensated prediction interframe coding by switching for each macroblock.
動画像の符号化対象マクロブロックに対して、少なくとも一つの参照フレーム及び該符号化対象マクロブロックと該参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間符号化を行う動画像符号化処理をコンピュータに行わせるためのプログラムにおいて、
時間的に過去の少なくとも一つの符号化済みフレームを前記参照フレームとする第1予測モード、時間的に未来の符号化済みフレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化済みフレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化済みフレームの線形和を前記参照フレームとする第4予測モードを前記符号化対象マクロブロック毎に切り替えて前記動き補償予測フレーム間符号化を行う動画像符号化処理をコンピュータに行わせるためのプログラム。
Moving picture coding for performing motion compensated prediction inter-frame coding on a coding target macroblock of a moving picture using at least one reference frame and a motion vector between the coding target macroblock and the reference frame In a program for causing a computer to perform processing,
A first prediction mode in which at least one encoded frame in the past in time is used as the reference frame, a second prediction mode in which an encoded frame in the future in time is used as the reference frame, the time in the past and the future A third prediction mode in which the linear sum of the encoded frames of the reference frame is the reference frame, and a fourth prediction mode in which the reference frame is a linear sum of the plurality of temporally encoded frames. A program for causing a computer to perform a moving image coding process for performing the motion compensation prediction interframe coding by switching for each macroblock.
動画像の復号化対象マクロブロックに対して、復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化方法において、
前記復号化対象マクロブロック毎の予測誤差信号の情報と、時間的に過去の少なくとも一つの符号化対象フレームを前記参照フレームとする第1予測モード、時間的に未来の符号化対象フレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化対象フレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化対象フレームの線形和を前記参照フレームとする第4予測モードのいずれかを示す予測モード情報及び前記動きベクトルの情報を含む符号化データを受信して復号化するステップと、
前記予測モード情報及び前記動きベクトルの情報を用いて予測マクロブロック信号を生成するステップと、
前記予測マクロブロック信号と復号化された前記予測誤差信号を加算することより動画像信号を復号化するステップと、を具備する動画像復号化方法。
In a moving picture decoding method for performing motion compensation prediction inter-frame decoding using a motion vector between a decoding target macro block and at least one reference frame for a decoding target macro block of a moving picture,
Prediction error signal information for each decoding target macroblock, a first prediction mode in which at least one encoding target frame that is temporally past is the reference frame, and a temporally future encoding target frame is the reference A second prediction mode in which the frame is used, a third prediction mode in which a linear sum of the past and future encoding target frames is temporally used as the reference frame, and a linear sum of the plurality of temporally past encoding target frames. Receiving and decoding encoded data including prediction mode information indicating any one of the fourth prediction modes using the reference frame and the motion vector information;
Generating a prediction macroblock signal using the prediction mode information and the motion vector information;
A video decoding method comprising: decoding the video signal by adding the prediction macroblock signal and the decoded prediction error signal.
動画像の復号化対象マクロブロックに対して、復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化装置において、
前記復号化対象マクロブロック毎の予測誤差信号の情報と、時間的に過去の少なくとも一つの符号化対象フレームを前記参照フレームとする第1予測モード、時間的に未来の符号化対象フレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化対象フレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化対象フレームの線形和を前記参照フレームとする第4予測モードのいずれかを示す予測モード情報及び前記動きベクトルの情報を含む符号化データを受信して復号化する手段と、
前記予測モード情報及び前記動きベクトルの情報を用いて予測マクロブロック信号を生成する手段と、
前記予測マクロブロック信号と復号化された前記予測誤差信号を加算することより動画像信号を復号化する手段と、を具備する動画像復号化装置。
In a moving picture decoding apparatus that performs motion compensation prediction inter-frame decoding using a motion vector between a decoding target macro block and at least one reference frame for a decoding target macro block of the moving picture,
Prediction error signal information for each decoding target macroblock, a first prediction mode in which at least one encoding target frame that is temporally past is the reference frame, and a temporally future encoding target frame is the reference A second prediction mode in which the frame is used, a third prediction mode in which a linear sum of the past and future encoding target frames is temporally used as the reference frame, and a linear sum of the plurality of temporally past encoding target frames. Means for receiving and decoding encoded data including prediction mode information indicating any one of the fourth prediction modes using the reference frame and information on the motion vector;
Means for generating a prediction macroblock signal using the prediction mode information and the motion vector information;
A moving picture decoding apparatus comprising: means for decoding a moving picture signal by adding the predicted macroblock signal and the decoded prediction error signal.
動画像の復号化対象マクロブロックに対して、復号化対象マクロブロックと少なくとも一つの参照フレームとの間の動きベクトルを用いて動き補償予測フレーム間復号化を行う動画像復号化処理をコンピュータに行わせるためのプログラムにおいて、
前記復号化対象マクロブロック毎の予測誤差信号の情報と、時間的に過去の少なくとも一つの符号化対象フレームを前記参照フレームとする第1予測モード、時間的に未来の符号化対象フレームを前記参照フレームとする第2予測モード、該時間的に過去及び未来の符号化対象フレームの線形和を前記参照フレームとする第3予測モード、及び該時間的に過去の複数の符号化対象フレームの線形和を前記参照フレームとする第4予測モードのいずれかを示す予測モード情報及び前記動きベクトルの情報を含む符号化データを受信して復号化する処理と、
前記予測モード情報及び前記動きベクトルの情報を用いて予測マクロブロック信号を生成する処理と、
前記予測マクロブロック信号と復号化された前記予測誤差信号を加算することより動画像信号を復号化する処理とを含む動画像復号化処理をコンピュータに行わせるためのプログラム。
A moving image decoding process is performed on a computer for performing motion compensation prediction inter-frame decoding on a decoding target macro block of a moving image using a motion vector between the decoding target macro block and at least one reference frame. In the program to
Prediction error signal information for each decoding target macroblock, a first prediction mode in which at least one encoding target frame that is temporally past is the reference frame, and a temporally future encoding target frame is the reference A second prediction mode in which the frame is used, a third prediction mode in which a linear sum of the past and future encoding target frames is temporally used as the reference frame, and a linear sum of the plurality of temporally past encoding target frames. A process of receiving and decoding encoded data including prediction mode information indicating any one of the fourth prediction modes using the reference frame and information on the motion vector;
Processing to generate a prediction macroblock signal using the prediction mode information and the motion vector information;
A program for causing a computer to perform a moving picture decoding process including a process of decoding a moving picture signal by adding the predicted macroblock signal and the decoded prediction error signal.
JP2006282003A 2002-04-10 2006-10-16 Dynamic image encoding method and apparatus, and decoding method and apparatus Abandoned JP2007049743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006282003A JP2007049743A (en) 2002-04-10 2006-10-16 Dynamic image encoding method and apparatus, and decoding method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002108102 2002-04-10
JP2006282003A JP2007049743A (en) 2002-04-10 2006-10-16 Dynamic image encoding method and apparatus, and decoding method and apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2002341239A Division JP2004007379A (en) 2002-01-18 2002-11-25 Method for encoding moving image and method for decoding moving image

Publications (1)

Publication Number Publication Date
JP2007049743A true JP2007049743A (en) 2007-02-22

Family

ID=37852143

Family Applications (9)

Application Number Title Priority Date Filing Date
JP2006282005A Abandoned JP2007060693A (en) 2002-04-10 2006-10-16 Moving picture coding, decoding method and apparatus
JP2006282006A Abandoned JP2007060694A (en) 2002-04-10 2006-10-16 Moving picture coding, decoding method and apparatus
JP2006282003A Abandoned JP2007049743A (en) 2002-04-10 2006-10-16 Dynamic image encoding method and apparatus, and decoding method and apparatus
JP2006281999A Abandoned JP2007060690A (en) 2002-04-10 2006-10-16 Moving picture decoding method and apparatus
JP2006282001A Abandoned JP2007060692A (en) 2002-04-10 2006-10-16 Moving picture coding method and moving picture decoding method
JP2006282000A Abandoned JP2007060691A (en) 2002-04-10 2006-10-16 Moving picture coding method and apparatus
JP2006282002A Abandoned JP2007049742A (en) 2002-04-10 2006-10-16 Dynamic image encoding method and apparatus thereof, and decoding method and apparatus
JP2006282004A Abandoned JP2007049744A (en) 2002-04-10 2006-10-16 Dynamic image encoding method, and dynamic image decoding method
JP2006281869A Abandoned JP2007060688A (en) 2002-04-10 2006-10-16 Moving picture decoding method and apparatus

Family Applications Before (2)

Application Number Title Priority Date Filing Date
JP2006282005A Abandoned JP2007060693A (en) 2002-04-10 2006-10-16 Moving picture coding, decoding method and apparatus
JP2006282006A Abandoned JP2007060694A (en) 2002-04-10 2006-10-16 Moving picture coding, decoding method and apparatus

Family Applications After (6)

Application Number Title Priority Date Filing Date
JP2006281999A Abandoned JP2007060690A (en) 2002-04-10 2006-10-16 Moving picture decoding method and apparatus
JP2006282001A Abandoned JP2007060692A (en) 2002-04-10 2006-10-16 Moving picture coding method and moving picture decoding method
JP2006282000A Abandoned JP2007060691A (en) 2002-04-10 2006-10-16 Moving picture coding method and apparatus
JP2006282002A Abandoned JP2007049742A (en) 2002-04-10 2006-10-16 Dynamic image encoding method and apparatus thereof, and decoding method and apparatus
JP2006282004A Abandoned JP2007049744A (en) 2002-04-10 2006-10-16 Dynamic image encoding method, and dynamic image decoding method
JP2006281869A Abandoned JP2007060688A (en) 2002-04-10 2006-10-16 Moving picture decoding method and apparatus

Country Status (1)

Country Link
JP (9) JP2007060693A (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100919886B1 (en) * 2006-12-06 2009-09-30 한국전자통신연구원 Apparatus and method for controlling skip of motion compensation using characteristic of motion vector in image decoder
KR102139535B1 (en) 2007-10-16 2020-07-30 엘지전자 주식회사 A method and an apparatus for processing a video signal
KR101432775B1 (en) 2008-09-08 2014-08-22 에스케이텔레콤 주식회사 Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
JP5184447B2 (en) * 2009-06-22 2013-04-17 株式会社Kddi研究所 Video encoding apparatus and decoding apparatus
JP2012023634A (en) * 2010-07-15 2012-02-02 Toshiba Corp Video camera and imaging method
DK3657798T3 (en) * 2010-10-06 2022-10-31 Ntt Docomo Inc BI-PREDICTION IMAGE DECODING METHOD
AU2016253586B2 (en) * 2010-10-06 2018-04-19 Ntt Docomo, Inc. Image predictive encoding device, image predictive encoding method, image predictive encoding program, image predictive decoding device, image predictive decoding method, and image predictive decoding program
JPWO2013115024A1 (en) * 2012-01-31 2015-05-11 ソニー株式会社 Image processing apparatus, image processing method, program, and recording medium
US10592064B2 (en) 2013-09-17 2020-03-17 Amazon Technologies, Inc. Approaches for three-dimensional object display used in content navigation

Also Published As

Publication number Publication date
JP2007060691A (en) 2007-03-08
JP2007060688A (en) 2007-03-08
JP2007060693A (en) 2007-03-08
JP2007049744A (en) 2007-02-22
JP2007060690A (en) 2007-03-08
JP2007049742A (en) 2007-02-22
JP2007060692A (en) 2007-03-08
JP2007060694A (en) 2007-03-08

Similar Documents

Publication Publication Date Title
JP2004007379A (en) Method for encoding moving image and method for decoding moving image
KR100746316B1 (en) Video encoding method and apparatus
JP2007049743A (en) Dynamic image encoding method and apparatus, and decoding method and apparatus
JP2007060702A (en) Moving picture coding method, apparatus, and program

Legal Events

Date Code Title Description
A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20090226