JP5310614B2 - Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method - Google Patents
Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method Download PDFInfo
- Publication number
- JP5310614B2 JP5310614B2 JP2010060855A JP2010060855A JP5310614B2 JP 5310614 B2 JP5310614 B2 JP 5310614B2 JP 2010060855 A JP2010060855 A JP 2010060855A JP 2010060855 A JP2010060855 A JP 2010060855A JP 5310614 B2 JP5310614 B2 JP 5310614B2
- Authority
- JP
- Japan
- Prior art keywords
- picture
- vector
- block
- time interval
- motion
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 54
- 239000013598 vector Substances 0.000 claims abstract description 694
- 238000004364 calculation method Methods 0.000 claims description 52
- 230000001131 transforming effect Effects 0.000 claims description 5
- 230000001172 regenerating effect Effects 0.000 claims description 4
- 238000013139 quantization Methods 0.000 description 58
- 230000002123 temporal effect Effects 0.000 description 34
- 230000008569 process Effects 0.000 description 20
- 238000012545 processing Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 8
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 8
- 230000002457 bidirectional effect Effects 0.000 description 6
- 230000006835 compression Effects 0.000 description 4
- 238000007906 compression Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- FGXWKSZFVQUSTL-UHFFFAOYSA-N domperidone Chemical compound C12=CC=CC=C2NC(=O)N1CCCN(CC1)CCC1N1C2=CC=C(Cl)C=C2NC1=O FGXWKSZFVQUSTL-UHFFFAOYSA-N 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/573—Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、例えば、符号化対象ピクチャを他のピクチャの情報を用いて符号化する動画像符号化装置、動画像符号化方法、及び符号化された動画像を復号する動画像復号装置ならびに動画像復号方法に関する。 The present invention relates to, for example, a moving picture coding apparatus, a moving picture coding method, a moving picture decoding apparatus for decoding a coded moving picture, and a moving picture, which encode a picture to be coded using information of another picture. The present invention relates to an image decoding method.
動画像データは、一般に非常に大きなデータ量を有する。そのため、動画像データを扱う装置は、動画像データを他の装置へ送信しようとする場合、あるいは、動画像データを記憶装置に記憶しようとする場合、動画像データを符号化することにより圧縮する。代表的な動画像の符号化方式として、International Standardization Organization/International Electrotechnical Commission(ISO/IEC)で策定されたMoving Picture Experts Group phase 2(MPEG-2)、MPEG-4、あるいはH.264 MPEG-4 Advanced Video Coding(H.264 MPEG-4 AVC)が広く利用されている。
このような符号化方式では、符号化対象のピクチャと、その前後のピクチャの情報を用いて、符号化対象のピクチャを符号化するインター符号化方法が採用されている。インター符号化方法では、符号化対象のピクチャが複数のブロックに分割される。そして、各ブロックに対して、ピクチャ間での動きを補償するために、前後の既に符号化されたピクチャを復号した参照ピクチャから、最も類似している領域がブロックマッチングにより求められる。そして、その最も類似する領域と、符号化対象ブロックとの空間的な移動量が動きベクトルとして算出される。この動きベクトルを用いて、参照ピクチャ上の符号化対象ブロックと最も類似するブロックを、符号化対象ブロックとピクチャ上の同じ位置に移動することにより、予測画像が生成される。そして予測画像と符号化対象ブロックとの差分情報と動きベクトルとが符号化される。そのため、インター符号化方法は、冗長な情報を取り除くことができるので、一般に、符号化対象の1枚のピクチャ内に含まれる情報のみを用いてそのピクチャを符号化するイントラ符号化方法の圧縮効率よりも高い圧縮効率を達成することができる。
また、動き補償の精度を向上するために、符号化対象ピクチャと複数の参照ピクチャとの間で算出された複数の動きベクトルを用いて動き補償する方法が開発されている(例えば、特許文献1を参照)。さらに、ブロックマッチングを行う参照ピクチャ上の探索範囲を、対象ブロック周囲の動きベクトルのばらつき度合いに応じて決定する技術が提案されている(例えば、特許文献2を参照)。
The moving image data generally has a very large amount of data. Therefore, a device that handles moving image data compresses the moving image data by encoding it when transmitting the moving image data to another device or when storing the moving image data in the storage device. . As a typical moving image encoding method, Moving Picture Experts Group phase 2 (MPEG-2), MPEG-4, or H.264 MPEG-4 established by the International Standardization Organization / International Electrotechnical Commission (ISO / IEC) Advanced Video Coding (H.264 MPEG-4 AVC) is widely used.
In such an encoding method, an inter-encoding method is used in which the encoding target picture is encoded using information on the encoding target picture and the pictures before and after the encoding target picture. In the inter coding method, a picture to be coded is divided into a plurality of blocks. For each block, in order to compensate for motion between pictures, the most similar region is obtained by block matching from reference pictures obtained by decoding previous and subsequent encoded pictures. Then, a spatial movement amount between the most similar region and the encoding target block is calculated as a motion vector. By using this motion vector, the block most similar to the encoding target block on the reference picture is moved to the same position on the encoding target block and the picture, thereby generating a predicted image. Then, the difference information between the predicted image and the encoding target block and the motion vector are encoded. Therefore, since the inter coding method can remove redundant information, in general, the compression efficiency of the intra coding method in which the picture is coded using only information included in one picture to be coded. Higher compression efficiency can be achieved.
In addition, in order to improve the accuracy of motion compensation, a motion compensation method using a plurality of motion vectors calculated between a current picture and a plurality of reference pictures has been developed (for example, Patent Document 1). See). Further, a technique has been proposed in which a search range on a reference picture for performing block matching is determined according to the degree of variation in motion vectors around the target block (see, for example, Patent Document 2).
動きベクトルは、各ブロックに対して作成される。特に、2枚以上の参照ピクチャを用いて予測画像が生成される双方向予測ピクチャに対しては、各ブロックについて複数の動きベクトルが算出される。そこで、圧縮効率をさらに高めるために、動きベクトルの符号化に要する情報量を削減することが望ましい。そこで、H.264 MPEG-4 AVCでは、インター符号化方式の一つとして、双方向予測ピクチャについての動きベクトルに関する符号量を削減するための時間ダイレクトモードが採用されている。時間ダイレクトモードでは、既に符号化されている参照ピクチャP1上で双方向予測ピクチャの符号化対象ブロックと同じ位置にあるブロックの動きベクトルが、符号化対象ブロックの動きベクトルを決定するための基準ベクトルとして求められる。そして、符号化対象ブロックの動きベクトルは、基準ベクトルを、符号化対象ブロックが含まれるピクチャと参照ピクチャP1との時間間隔t1と、基準ベクトルの参照元と参照先のピクチャ間の時間間隔t2との比(t1/t2)で調節することにより算出される。この場合、動画像符号化装置は、基準ベクトルは既に符号化されているので、双方向予測ピクチャについての動きベクトルを符号化された動画像データに含めなくてもよい。そのため、動画像符号化装置は、時間ダイレクトモードを利用することにより、圧縮効率をさらに高めることができる。 A motion vector is created for each block. In particular, for bi-predictive pictures in which a predictive picture is generated using two or more reference pictures, a plurality of motion vectors are calculated for each block. Therefore, in order to further increase the compression efficiency, it is desirable to reduce the amount of information required for encoding motion vectors. Therefore, in H.264 MPEG-4 AVC, a temporal direct mode for reducing a code amount related to a motion vector for a bi-predictive picture is adopted as one of inter-coding schemes. In the temporal direct mode, the motion vector of the block at the same position as the encoding target block of the bi-predictive picture on the reference picture P1 that has already been encoded is a reference vector for determining the motion vector of the encoding target block As required. Then, the motion vector of the encoding target block includes a reference vector, a time interval t1 between the picture including the encoding target block and the reference picture P1, and a time interval t2 between the reference source picture of the reference vector and the reference destination picture. It is calculated by adjusting the ratio (t1 / t2). In this case, since the reference vector is already encoded, the moving image encoding apparatus may not include the motion vector for the bi-predictive picture in the encoded moving image data. Therefore, the moving picture coding apparatus can further increase the compression efficiency by using the time direct mode.
また、符号化対象ピクチャの符号化対象ブロックと同じ位置にある参照ピクチャ上のブロックには、符号化対象ブロックに写っている像と実際には異なる動きをする像が写っている可能性がある。このような場合、符号化対象ブロックと同じ位置にある参照ピクチャ上のブロックについての動きベクトルが基準ベクトルであるとき、符号化対象ブロックと予測画像との対応画素間の差分値のばらつきが大きくなり、符号化効率が低下するおそれがある。そこで、参照ピクチャの各ブロックについて求められた動きベクトルのうち、符号化対象ブロックを透過する動きベクトルを基準ベクトルの算出に利用する技術が提案されている(例えば、特許文献3を参照)。 In addition, the block on the reference picture at the same position as the encoding target block of the encoding target picture may include an image that actually moves differently from the image shown in the encoding target block. . In such a case, when the motion vector for the block on the reference picture at the same position as the encoding target block is the reference vector, the variation in the difference value between corresponding pixels of the encoding target block and the predicted image becomes large. There is a risk that the encoding efficiency may be reduced. Thus, a technique has been proposed in which, among the motion vectors obtained for each block of the reference picture, a motion vector that passes through the encoding target block is used for calculating a reference vector (see, for example, Patent Document 3).
H.264 MPEG-4 AVCでは、インター符号化されるピクチャに対する参照ピクチャとして、既に符号化されている複数のピクチャが用いられる。そのため、時間ダイレクトモードが適用される符号化対象ピクチャの着目ブロックと同じ位置にある参照ピクチャP1上のブロックが動き補償のために参照する過去参照ピクチャP2と参照ピクチャP1の両方が、符号化対象ピクチャよりも時間的に後となることがある。このような場合、参照ピクチャP1と過去参照ピクチャP2間の時間間隔t2は、符号化対象ピクチャと参照ピクチャP1との時間間隔t1よりも短いことがある。
このような場合、(t1/t2)が1よりも大きいので、符号化対象ブロックの動きベクトルの時間方向の長さが、基準ベクトルの時間方向の長さよりも長くなる。その結果として、符号化対象ブロックの動きベクトルの動き補償精度が粗くなるので、符号化対象ブロックに対する予測画像の予測精度が低下してしまい、予測画像と符号化対象ブロックとの相違が大きくなって符号化効率が低下するおそれがあった。
In H.264 MPEG-4 AVC, a plurality of pictures that are already coded are used as reference pictures for pictures to be inter-coded. Therefore, both the past reference picture P2 and the reference picture P1 that the block on the reference picture P1 at the same position as the target block of the encoding target picture to which the temporal direct mode is applied refer to for motion compensation are to be encoded. It may be later in time than the picture. In such a case, the time interval t2 between the reference picture P1 and the past reference picture P2 may be shorter than the time interval t1 between the encoding target picture and the reference picture P1.
In such a case, since (t1 / t2) is greater than 1, the time direction length of the motion vector of the current block is longer than the length of the reference vector in the time direction. As a result, since the motion compensation accuracy of the motion vector of the encoding target block becomes coarse, the prediction accuracy of the prediction image with respect to the encoding target block decreases, and the difference between the prediction image and the encoding target block increases. There is a possibility that the encoding efficiency may be lowered.
そこで、本明細書は、時間ダイレクトモードにおいて符号化対象ブロックに写っている像の動きに対する動き補償の精度を向上できる動画像符号化装置を提供することを目的とする。また、そのような動画像符号化装置にて符号化された動画像データを復号する動画像復号装置を提供することを他の目的とする。 Therefore, an object of the present specification is to provide a moving picture coding apparatus capable of improving the accuracy of motion compensation for the movement of an image shown in a coding target block in the temporal direct mode. Another object of the present invention is to provide a moving picture decoding apparatus that decodes moving picture data encoded by such a moving picture encoding apparatus.
一つの実施形態によれば、動画像データに含まれるピクチャを動き補償を用いて符号化する動画像符号化装置が提供される。この動画像符号化装置は、動画像データに含まれる複数の符号化済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部と、符号化済みピクチャのうちの第1の参照ピクチャ上で、動画像データに含まれる符号化対象ピクチャを分割した複数のブロックのうちの第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして記憶部から読み出し、基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは第1の参照ピクチャと符号化対象ピクチャ間の第1の時間間隔が、第1の参照ピクチャと第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定するピクチャ間隔比較部と、第1の時間間隔が第2の時間間隔よりも短い場合に、基準候補ベクトルを第1のブロックに対する基準ベクトルとし、かつ第1の参照ピクチャを基準ベクトルの参照元ピクチャ、第2の参照ピクチャを基準ベクトルの参照先ピクチャとし、一方、第1の時間間隔が第2の時間間隔よりも長い場合に、第2の参照ブロックを参照元とする第2の動きベクトルを記憶部から読み出し、第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを参照先ピクチャとし、第1の参照ピクチャを参照元ピクチャとする基準ベクトルを算出する基準ベクトル決定部と、基準ベクトルを、参照先ピクチャと参照元ピクチャ間の時間間隔に対する参照先ピクチャと符号化対象ピクチャ間の時間間隔の比に応じて分割することにより、第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出するダイレクト動きベクトル計算部と、第1のダイレクト動きベクトルに従って参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、第2のダイレクト動きベクトルに従って参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、第1の動き補償画像と第2の動き補償画像に基づいて第1のブロックに対する予測画像を生成する予測画像生成部と、予測画像と第1のブロックの対応する画素の差を表す誤差信号を符号化する符号化部とを有する。 According to one embodiment, there is provided a moving image encoding apparatus that encodes a picture included in moving image data using motion compensation. The moving image encoding apparatus stores a motion compensation motion vector obtained for each of a plurality of encoded pictures included in moving image data, and a first reference of the encoded pictures. A first motion vector based on a first reference block at a position corresponding to the first block among a plurality of blocks obtained by dividing a picture to be encoded included in moving image data on a picture is used as a reference. The first time interval between the second reference picture or the first reference picture including the second reference block that is read from the storage unit as a candidate vector and includes the second reference block that is the reference destination of the reference candidate vector is A picture interval comparison unit for determining whether or not a second time interval is longer than a second time interval between one reference picture and a second reference picture, and the first time interval is a second time interval The reference candidate vector is the reference vector for the first block, the first reference picture is the reference source picture of the reference vector, the second reference picture is the reference destination picture of the reference vector, When the time interval of 1 is longer than the second time interval, the second motion vector having the second reference block as a reference source is read from the storage unit, and a block to which the second motion vector is referenced is included A reference vector determining unit that calculates a reference vector having the third reference picture as a reference destination picture and the first reference picture as a reference source picture, and a reference to the time interval between the reference destination picture and the reference source picture By dividing according to the ratio of the time interval between the previous picture and the current picture to be encoded, the first and second directories for the first block are divided. A direct motion vector calculation unit that calculates a motion vector and a motion compensation of the reference picture according to the first direct motion vector to create a first motion compensated image and a reference source picture according to the second direct motion vector A predicted image generating unit that generates a second motion compensated image by performing motion compensation on the first block and generates a predicted image for the first block based on the first motion compensated image and the second motion compensated image; And an encoding unit that encodes an error signal representing a difference between corresponding pixels of the first block.
また他の実施形態によれば、動画像データに含まれるピクチャを動き補償を用いて符号化する動画像符号化方法が提供される。この動画像符号化方法は、動画像データに含まれる符号化済みピクチャのうちの第1の参照ピクチャ上で、動画像データに含まれる符号化対象ピクチャを分割した複数のブロックのうちの第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして、動画像データに含まれる複数の符号化済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部から読み出し、基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは第1の参照ピクチャと符号化対象ピクチャ間の第1の時間間隔が、第1の参照ピクチャと第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、第1の時間間隔が第2の時間間隔よりも短い場合に、基準候補ベクトルを第1のブロックに対する基準ベクトルとし、かつ第1の参照ピクチャを基準ベクトルの参照元ピクチャ、第2の参照ピクチャを基準ベクトルの参照先ピクチャとし、一方、第1の時間間隔が第2の時間間隔よりも長い場合に、第2の参照ブロックを参照元とする第2の動きベクトルを記憶部から読み出し、第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを参照先ピクチャとし、第1の参照ピクチャを参照元ピクチャとする基準ベクトルを算出し、基準ベクトルを、参照先ピクチャと参照元ピクチャ間の時間間隔に対する参照先ピクチャと符号化対象ピクチャ間の時間間隔の比に応じて分割することにより、第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、第1のダイレクト動きベクトルに従って参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、第2のダイレクト動きベクトルに従って参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、第1の動き補償画像と第2の動き補償画像に基づいて第1のブロックに対する予測画像を生成し、予測画像と第1のブロックの対応する画素の差を表す誤差信号を符号化することを含む。 According to another embodiment, there is provided a moving picture coding method for coding a picture included in moving picture data using motion compensation. In this moving image encoding method, a first of a plurality of blocks obtained by dividing an encoding target picture included in moving image data on a first reference picture among encoded pictures included in moving image data. For motion compensation obtained for each of a plurality of encoded pictures included in moving image data, with the first motion vector having the first reference block at the position corresponding to the block as a reference source as a reference candidate vector A first time interval between the second reference picture or the first reference picture that includes the second reference block that is the reference destination of the reference candidate vector and the current picture to be encoded Is longer than the second time interval between the first reference picture and the second reference picture, and the first time interval is shorter than the second time interval. The reference candidate vector is a reference vector for the first block, the first reference picture is the reference source picture of the reference vector, the second reference picture is the reference destination picture of the reference vector, and the first time When the interval is longer than the second time interval, the second motion vector having the second reference block as a reference source is read from the storage unit, and a third motion vector reference block is included. A reference vector having a reference picture as a reference picture and a first reference picture as a reference picture is calculated, and the reference vector is defined between the reference picture and the encoding target picture for the time interval between the reference picture and the reference picture. The first and second direct motion vectors for the first block are calculated by dividing according to the ratio of the time intervals of Creating a first motion compensated image by motion compensation of the reference picture according to the direct motion vector, and creating a second motion compensated image by motion compensating the reference source picture according to the second direct motion vector; Generating a prediction image for the first block based on the first motion compensation image and the second motion compensation image, and encoding an error signal indicating a difference between corresponding pixels of the prediction image and the first block. Including.
さらに他の実施形態によれば、符号化された動画像データを復号する動画像復号装置が提供される。この動画像復号装置は、動画像データに含まれる、複数の復号済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部と、動画像データに含まれる復号対象ピクチャを分割した複数のブロックのうちの第1のブロックに対応する符号化データを可変長復号することにより、第1のブロックに対応する量子化信号を再生する可変長復号部と、復号済みピクチャのうちの第1の参照ピクチャ上で、第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして記憶部から読み出し、基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは第1の参照ピクチャと復号対象ピクチャ間の第1の時間間隔が、第1の参照ピクチャと第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定するピクチャ間隔比較部と、第1の時間間隔が第2の時間間隔よりも短い場合に、基準候補ベクトルを第1のブロックに対する基準ベクトルとし、かつ第1の参照ピクチャを基準ベクトルの参照元ピクチャ、第2の参照ピクチャを基準ベクトルの参照先ピクチャとし、一方、第1の時間間隔が第2の時間間隔よりも長い場合に、第2の参照ブロックを参照元とする第2の動きベクトルを記憶部から読み出し、第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを参照先ピクチャとし、第1の参照ピクチャを参照元ピクチャとする基準ベクトルを算出する基準ベクトル決定部と、基準ベクトルを、参照先ピクチャと参照元ピクチャ間の時間間隔に対する参照先ピクチャと復号対象ピクチャ間の時間間隔の比に応じて分割することにより、第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出するダイレクト動きベクトル計算部と、第1のダイレクト動きベクトルに従って参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、第2のダイレクト動きベクトルに従って参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、第1の動き補償画像と第2の動き補償画像に基づいて第1のブロックに対する予測画像を生成する予測画像生成部と、第1のブロックについての量子化信号を逆量子化及び逆直交変換することにより第1のブロックに含まれる各画素の予測誤差信号を再生し、各画素の予測誤差信号を予測画像の対応する画素の値に加算することにより、第1のブロックを再生する復号部とを有する。 According to still another embodiment, there is provided a moving image decoding apparatus that decodes encoded moving image data. The moving image decoding apparatus divides a decoding target picture included in moving image data and a storage unit that stores a motion compensation motion vector obtained for each of a plurality of decoded pictures included in moving image data. A variable length decoding unit that reproduces a quantized signal corresponding to the first block by performing variable length decoding on encoded data corresponding to the first block of the plurality of blocks, and a first of the decoded pictures On the reference picture of 1, the first motion vector having the first reference block at the position corresponding to the first block as a reference source is read from the storage unit as a reference candidate vector, and is a reference destination of the reference candidate vector A first time interval between the second reference picture including the second reference block or the first reference picture and the picture to be decoded is the first reference picture. A picture interval comparison unit that determines whether or not the second time interval is longer than a second time interval between the first reference picture and the second reference picture, and if the first time interval is shorter than the second time interval, the reference candidate vector is The first reference picture is the reference source picture of the reference vector, the second reference picture is the reference destination picture of the reference vector, and the first time interval is greater than the second time interval. If it is long, the second motion vector with the second reference block as the reference source is read from the storage unit, the third reference picture including the reference block of the second motion vector is set as the reference destination picture, A reference vector determination unit that calculates a reference vector using one reference picture as a reference source picture, and references the reference vector to a time interval between the reference destination picture and the reference source picture A direct motion vector calculation unit that calculates the first and second direct motion vectors for the first block by dividing according to the ratio of the time interval between the picture and the decoding target picture, and according to the first direct motion vector A first motion compensated image is created by motion compensation of the reference picture, and a second motion compensated image is created by motion compensation of the reference source picture according to the second direct motion vector. A predicted image generating unit that generates a predicted image for the first block based on the compensated image and the second motion compensated image; and a first by performing inverse quantization and inverse orthogonal transform on the quantized signal for the first block. The prediction error signal of each pixel included in the block is reproduced, and the prediction error signal of each pixel is set to the value of the corresponding pixel of the prediction image. And a decoding unit that reproduces the first block by adding.
さらに他の実施形態によれば、符号化された動画像データを復号する動画像復号方法が提供される。この動画像復号方法は、動画像データに含まれる、複数の復号済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶部に記憶させ、動画像データに含まれる復号対象ピクチャを分割した複数のブロックのうちの第1のブロックに対応する符号化データを可変長復号することにより、第1のブロックに対応する量子化信号を再生し、復号済みピクチャのうちの第1の参照ピクチャ上で、第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして記憶部から読み出し、基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは第1の参照ピクチャと復号対象ピクチャ間の第1の時間間隔が、第1の参照ピクチャと第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、第1の時間間隔が第2の時間間隔よりも短い場合に、基準候補ベクトルを第1のブロックに対する基準ベクトルとし、かつ第1の参照ピクチャを基準ベクトルの参照元ピクチャ、第2の参照ピクチャを基準ベクトルの参照先ピクチャとし、第1の時間間隔が第2の時間間隔よりも長い場合に、第2の参照ブロックを参照元とする第2の動きベクトルを記憶部から読み出し、第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを参照先ピクチャとし、第1の参照ピクチャを参照元ピクチャとする基準ベクトルを算出し、基準ベクトルを、参照先ピクチャと参照元ピクチャ間の時間間隔に対する参照先ピクチャと復号対象ピクチャ間の時間間隔の比に応じて分割することにより、第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、第1のダイレクト動きベクトルに従って参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、第2のダイレクト動きベクトルに従って参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、第1の動き補償画像と第2の動き補償画像に基づいて第1のブロックに対する予測画像を生成し、第1のブロックについての量子化信号を逆量子化及び逆直交変換することにより第1のブロックに含まれる各画素の予測誤差信号を再生し、各画素の予測誤差信号を予測画像の対応する画素の値に加算することにより、第1のブロックを再生することを含む。 According to still another embodiment, a moving image decoding method for decoding encoded moving image data is provided. In this moving image decoding method, a motion compensation motion vector obtained for each of a plurality of decoded pictures included in moving image data is stored in a storage unit, and a decoding target picture included in the moving image data is divided. By performing variable length decoding on the encoded data corresponding to the first block of the plurality of blocks, the quantized signal corresponding to the first block is reproduced, and the first reference picture among the decoded pictures is reproduced. Then, a first motion vector having the first reference block at a position corresponding to the first block as a reference source is read from the storage unit as a reference candidate vector, and a second reference block which is a reference destination of the reference candidate vector The first reference picture including the first reference picture and the first reference picture and the first time interval between the picture to be decoded are the first reference picture and the second reference picture. It is determined whether the second time interval is longer than the second time interval, and if the first time interval is shorter than the second time interval, the reference candidate vector is set as the reference vector for the first block, and the first The reference picture of the reference vector is the reference source picture of the reference vector, the second reference picture is the reference destination picture of the reference vector, and the second reference block is referred to when the first time interval is longer than the second time interval. The second motion vector is read from the storage unit, the third reference picture including the block to which the second motion vector is referenced is the reference destination picture, and the first reference picture is the reference source picture. And dividing the reference vector according to the ratio of the time interval between the reference picture and the decoding target picture with respect to the time interval between the reference picture and the reference picture. Thus, the first and second direct motion vectors for the first block are calculated, and a reference motion picture is compensated according to the first direct motion vector to create a first motion compensated image, Creating a second motion compensated image by motion compensating the reference source picture according to the direct motion vector, generating a predicted image for the first block based on the first motion compensated image and the second motion compensated image; The quantized signal for the first block is inversely quantized and inverse orthogonal transformed to reproduce the prediction error signal of each pixel included in the first block, and the prediction error signal of each pixel is converted to the corresponding pixel of the predicted image. Regenerating the first block by adding to the value of.
本発明の目的及び利点は、請求項において特に指摘されたエレメント及び組み合わせにより実現され、かつ達成される。
上記の一般的な記述及び下記の詳細な記述の何れも、例示的かつ説明的なものであり、請求項のように、本発明を限定するものではないことを理解されたい。
The objects and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims.
It should be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention as claimed.
本明細書に開示された動画像符号化装置は、時間ダイレクトモードにおいて符号化対象ブロックに写っている像の動きに対する動き補償の精度を向上できる。また、本明細書に開示された動画像復号装置は、そのような動画像符号化装置にて符号化された動画像データを復号することができる。 The moving image encoding apparatus disclosed in the present specification can improve the accuracy of motion compensation for the motion of an image shown in an encoding target block in the temporal direct mode. Moreover, the moving image decoding apparatus disclosed in this specification can decode moving image data encoded by such a moving image encoding apparatus.
以下、図を参照しつつ、一つの実施形態による、動画像符号化装置について説明する。
この動画像符号化装置は、双方向予測ピクチャである符号化対象ピクチャの着目ブロックの動きベクトルを時間ダイレクトモードにて決定する際、参照ピクチャ上で着目ブロックと同じ位置にある参照ブロックの動きベクトルを基準候補ベクトルとする。そしてこの動画像符号化装置は、基準候補ベクトルの参照先のブロックが含まれるピクチャである過去参照ピクチャを検出する。動画像符号化装置は、参照ピクチャと過去参照ピクチャ間の時間間隔が、符号化対象ピクチャと参照ピクチャまたは過去参照ピクチャ間の時間間隔よりも短い場合、参照ブロックが参照する過去参照ピクチャ上の第2の参照ブロックの動きベクトルを求める。そしてこの動画像符号化装置は、第1の参照ブロックの動きベクトルと、第2の参照ブロックの動きベクトルとを加算して、着目ブロックに対する基準ベクトルを決定する。これにより、この動画像符号化装置は、基準ベクトルの参照元と参照先のピクチャ間の時間間隔を符号化対象ピクチャと基準ベクトルの参照先のピクチャ間の時間間隔よりも長くすることで、時間ダイレクトモードにおける動きベクトルの動き補償精度を向上する。
Hereinafter, a moving picture coding apparatus according to an embodiment will be described with reference to the drawings.
When determining the motion vector of the target block of the encoding target picture, which is a bi-predictive picture, in the temporal direct mode, the moving picture encoding device detects the motion vector of the reference block at the same position as the target block on the reference picture Is a reference candidate vector. Then, the moving picture encoding apparatus detects a past reference picture that is a picture including a reference destination block of a standard candidate vector. When the time interval between the reference picture and the past reference picture is shorter than the time interval between the encoding target picture and the reference picture or the past reference picture, the moving picture coding apparatus performs the process on the past reference picture referenced by the reference block. The motion vector of the 2 reference blocks is obtained. The moving picture coding apparatus adds the motion vector of the first reference block and the motion vector of the second reference block to determine a reference vector for the block of interest. Thus, the moving image encoding apparatus makes the time interval between the reference vector reference source picture and the reference destination picture longer than the time interval between the encoding target picture and the reference vector reference destination picture. Improve motion compensation accuracy of motion vectors in direct mode.
なお、ピクチャは、フレームまたはフィールドの何れであってもよい。フレームは、動画像データ中の一つの静止画像であり、一方、フィールドは、フレームから奇数行のデータあるいは偶数行のデータのみを取り出すことにより得られる静止画像である。 Note that the picture may be either a frame or a field. The frame is one still image in the moving image data, while the field is a still image obtained by extracting only odd-numbered data or even-numbered data from the frame.
また動画像データは、Group Of Pictures(GOP)単位で符号化される。GOPは、連続する複数のピクチャを含み、各ピクチャに対する符号化方法が規定された構造を表す。また、以下では、GOPに含まれるピクチャのうち、既に符号化されている1枚のピクチャの情報を用いてインター符号化されるピクチャをPピクチャと表記する。さらに、既に符号化されている2枚のピクチャの情報を用いてインター符号化されるピクチャをBピクチャと表記する。なお、Bピクチャが参照する2枚の参照ピクチャの一方がそのBピクチャよりも時間的に前のピクチャであり、他方がそのBピクチャよりも時間的に後のピクチャであってもよい。あるいは、2枚の参照ピクチャの何れも、Bピクチャよりも時間的に前のピクチャであってもよい。さらに、2枚の参照ピクチャの何れも、Bピクチャよりも時間的に後のピクチャであってもよい。
また、イントラ符号化のみの対象となり、インター符号化されないピクチャをIピクチャと表記する。
The moving image data is encoded in group of pictures (GOP) units. The GOP includes a plurality of consecutive pictures and represents a structure in which an encoding method for each picture is defined. In the following, among pictures included in a GOP, a picture that is inter-coded using information of one picture that has already been coded is referred to as a P picture. Furthermore, a picture that is inter-coded using information of two pictures that have already been coded is denoted as a B picture. Note that one of the two reference pictures referred to by the B picture may be a picture temporally preceding the B picture, and the other may be a picture temporally subsequent to the B picture. Alternatively, any of the two reference pictures may be a picture temporally prior to the B picture. Further, both of the two reference pictures may be temporally later than the B picture.
In addition, a picture that is only subject to intra coding and not inter coded is referred to as an I picture.
図1は、一つの実施形態による動画像符号化装置の概略構成図である。動画像符号化装置1は、符号化部10、復号部14、参照画像記憶部15、動きベクトル計算部16、動きベクトル計算部17、ピクチャ間隔比較部18、基準ベクトル決定部19、ダイレクト動きベクトル計算部20、予測モード判定部21及び予測画像生成部22を有する。
動画像符号化装置1が有するこれらの各部は、それぞれ別個の回路として形成される。あるいは動画像符号化装置1が有するこれらの各部は、その各部に対応する回路が集積された一つの集積回路として動画像符号化装置1に実装されてもよい。さらに、動画像符号化装置1が有するこれらの各部は、動画像符号化装置1が有するプロセッサ上で実行されるコンピュータプログラムにより実現される、機能モジュールであってもよい。
FIG. 1 is a schematic configuration diagram of a moving image encoding apparatus according to an embodiment. The moving
Each of these units included in the moving
符号化対象となるピクチャは、例えば、動画像符号化装置1全体を制御する制御部(図示せず)により所定数の画素を持つ複数のブロックに分割される。この符号化処理の単位となるブロックを、以下ではマクロブロックと呼ぶ。そして動画像符号化装置1には、各マクロブロックが、例えばH.264 MPEG-4 AVCに規定された順序で入力される。
例えば、各マクロブロックは、横16×縦16画素を含む。あるいは、各マクロブロックは、横8×縦8画素を含んでもよい。
For example, a picture to be encoded is divided into a plurality of blocks having a predetermined number of pixels by a control unit (not shown) that controls the entire moving
For example, each macroblock includes 16 horizontal x 16 vertical pixels. Alternatively, each macroblock may include 8 × 8 pixels.
符号化部10は、動画像データのうち、符号化対象となる現在のピクチャを符号化する。そのために、符号化部10は、予測誤差信号生成部11と、直交変換・量子化部12と、可変長符号化部13とを有する。
予測誤差信号生成部11は、入力されたマクロブロックと、予測画像生成部19により生成された予測画像との差分演算を実行する。そして直交変換・量子化部12は、その差分演算により得られたマクロブロック内の各画素に対応する差分値を、予測誤差信号とする。
予測誤差信号生成部11は、予測誤差信号を直交変換・量子化部12へ渡す。
The
The prediction error
The prediction error
直交変換・量子化部12は、入力されたマクロブロックの予測誤差信号を直交変換することにより、予測誤差信号の水平方向の周波数成分及び垂直方向の周波数成分を表す周波数信号を求める。例えば、直交変換・量子化部12は、直交変換処理として、離散コサイン変換(Discrete Cosine Transform、DCT)を予測誤差信号に対して実行することにより、周波数信号として、マクロブロックごとのDCT係数の組を得る。
The orthogonal transform /
次に、直交変換・量子化部12は、周波数信号を量子化する。この量子化処理は、一定区間に含まれる信号値を一つの信号値で表す処理である。そしてその一定区間は、量子化幅と呼ばれる。例えば、直交変換・量子化部12は、周波数信号から、量子化幅に相当する所定数の下位ビットを切り捨てることにより、その周波数信号を量子化する。量子化幅は、量子化パラメータによって決定される。例えば、直交変換・量子化部12は、量子化パラメータの値に対する量子化幅の値を表す関数にしたがって、使用される量子化幅を決定する。またその関数は、量子化パラメータの値に対する単調増加関数とすることができ、予め設定される。
あるいは、水平方向及び垂直方向の周波数成分のそれぞれに対応する量子化幅を規定する量子化マトリクスが、予め複数準備され、直交変換・量子化部12が有するメモリに記憶される。そして直交変換・量子化部12は、量子化パラメータにしたがって、それら量子化マトリクスのうちの特定の量子化マトリクスを選択する。そして直交変換・量子化部12は、選択された量子化マトリクスを参照して、周波数信号の各周波数成分に対する量子化幅を決定してもよい。
Next, the orthogonal transform /
Alternatively, a plurality of quantization matrices that define the quantization width corresponding to each of the frequency components in the horizontal direction and the vertical direction are prepared in advance and stored in a memory included in the orthogonal transform /
また直交変換・量子化部12は、MPEG-2、MPEG-4、H.264 MPEG-4 AVCなどの動画像符号化規格に対応した様々な量子化パラメータ決定方法の何れかに従って量子化パラメータを決定すればよい。直交変換・量子化部12は、例えば、MPEG-2の標準テストモデル5に関する量子化パラメータの算出方法を用いることができる。なお、MPEG-2の標準テストモデル5に関する量子化パラメータの算出方法に関しては、例えば、http://www.mpeg.org/MPEG/MSSG/tm5/Ch10/Ch10.htmlで特定されるURLを参照されたい。
直交変換・量子化部12は、量子化処理を実行することにより、周波数信号の各周波数成分を表すために使用されるビットの数を削減できるので、入力されたマクロブロックに含まれる情報量を低減できる。直交変換・量子化部12は、量子化信号を可変長符号化部13及び復号部14に供給する。
Further, the orthogonal transform /
The orthogonal transform /
可変長符号化部13は、直交変換・量子化部12から受け取った量子化された信号及び動きベクトル計算部16から受け取った動きベクトルを符号化することにより、データ量が圧縮された符号化信号を生成する。そのために、可変長符号化部13は、例えば、その量子化信号に対して、生起確率が高い信号値ほど短くなる、可変長の符号語を割り当てる可変長符号化処理を実行する。例えば、可変長符号化部13は、可変長符号化処理として、ハフマン符号化処理あるいは算術符号化処理を用いることができる。
The variable
可変長符号化部13により生成された符号化信号に対して、動画像符号化装置1は、マクロブロックごとの予測モードなどを含む所定の情報をヘッダ情報として付加することにより、符号化された動画像データを含むデータストリームを生成する。動画像符号化装置1は、そのデータストリームを磁気記録媒体、光記録媒体あるいは半導体メモリなどを有する記憶部(図示せず)に記憶するか、あるいはそのデータストリームを他の機器へ出力する。
The encoded video signal generated by the variable-
復号部14は、直交変換・量子化部12から受け取った量子化信号に、量子化パラメータにより決定された量子化幅に相当する所定数を乗算することにより逆量子化する。この逆量子化により、入力されたマクロブロックの周波数信号、例えば、DCT係数の組が復元される。その後、復号部14は、周波数信号を逆直交変換処理する。例えば、直交変換・量子化部12においてDCT処理が行われる場合、復号部14は、逆量子化信号に対して逆DCT処理を実行する。逆量子化処理及び逆直交変換処理を量子化信号に対して実行することにより、符号化前の予測誤差信号と同程度の情報を有する予測誤差信号が再生される。
The
復号部14は、インター符号化されるピクチャについて、参照画像を動き補償することにより作成された予測画像の各画素値に、その画素に対応する再生された予測誤差信号を加算する。一方、復号部14は、イントラ符号化されるピクチャについての既に符号化されたマクロブロックに基づいて生成された予測画像の各画素値に、その画素に対応する、再生された予測誤差信号を加算する。これらの処理を各マクロブロックについて実行することにより、復号部14は、その後に符号化されるマクロブロックに対する予測画像を生成するために利用される参照画像を生成する。
復号部14は、得られた参照画像を参照画像記憶部15に記憶させる。
For a picture to be inter-coded, the
The
参照画像記憶部15は、例えば、フレームメモリを有する。そして参照画像記憶部15は、復号部14から受け取った参照画像を一時的に記憶する。そして参照画像記憶部15は、動きベクトル計算部16、予測モード判定部21及び予測画像生成部22にその参照画像を供給する。なお、参照画像記憶部15は、予め定められた所定枚数分の参照画像を記憶し、参照画像の枚数がその所定枚数を超えると、符号化順序が古い参照画像から順に破棄する。
The reference
動きベクトル計算部16は、インター符号化用の予測画像を生成するために、入力されたマクロブロックと参照画像とを用いて、動きベクトルを求める。動きベクトルは、入力されたマクロブロックと、そのマクロブロックに最も類似する参照画像との空間的な移動量を表す。
動きベクトル計算部16は、入力されたマクロブロックと、参照画像とのブロックマッチングを実行することにより、入力されたマクロブロックと最も一致する参照画像及びその参照画像が含まれるピクチャ上での位置を決定する。
The motion
The motion
動きベクトル計算部16は、入力されたマクロブロックのピクチャ上の位置と、そのマクロブロックに最も一致する参照画像との水平方向及び垂直方向の移動量と、その参照画像が属するピクチャを表す識別情報を、それぞれ要素とするベクトルを動きベクトルとする。
動きベクトル計算部16は、求めた動きベクトルを、動きベクトル記憶部17、予測モード判定部21、予測画像生成部22及び符号化部10へ渡す。
The motion
The motion
動きベクトル記憶部17は、動きベクトル計算部16により求められた動きベクトルを、時間ダイレクトモードにおける基準ベクトルを決定するために一時的に記憶する。そこで、動きベクトル記憶部17は、各マクロブロックについて求められた動きベクトルが基準ベクトルの算出のために利用される可能性のある間、例えば、符号化順序に従って数枚程度のピクチャの各マクロブロックに対する動きベクトルを記憶する。そして動きベクトル記憶部17は、記憶している動きベクトルを、ピクチャ間隔比較部18及び基準ベクトル決定部19へ渡す。
The motion
ピクチャ間隔比較部18、基準ベクトル決定部19及びダイレクト動きベクトル計算部20は、予測モードとして時間ダイレクトモードが用いられる場合における基準ベクトル及び動きベクトルを決定する。ここで、動画像符号化装置1における基準ベクトル及び動きベクトルの決定方法について説明する。
The picture
図2は、時間ダイレクトモードにおいて、符号化対象ピクチャと参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも短い場合の基準ベクトル及び動きベクトルを示す図である。
図2において、ピクチャP1〜P8は、左から順に時間順に並べられており、それぞれフィールドである。このうち、ピクチャP1、B3、B5及びP7は、元のフレームの奇数行のデータを含むトップフィールドであり、一方、ピクチャP2、B4、B6及びP8は、元のフレームの偶数行のデータを含むボトムフィールドである。またピクチャP1とピクチャP2は、同一のフレームに含まれ、パリティの異なるフィールドである。同様に、ピクチャB3とピクチャB4、ピクチャB5とピクチャB6、及びピクチャP7とピクチャP8は、それぞれ同一のフレームに含まれ、パリティの異なるフィールドである。
また、ピクチャP1、P2、P7及びP8はPピクチャであり、一方、ピクチャB3〜B6はBピクチャである。このように、ピクチャP1〜P8のGOPは、いわゆるIBBPとなっている。そのため、符号化順序は、P1→P2→P7→P8→B3→B4→B5→B6の順序である。ここでは、BピクチャであるピクチャB3が符号化対象ピクチャであり、ブロック201が着目するブロックである。このとき、ピクチャP1、P2、P7及びP8については符号化が完了している。
FIG. 2 is a diagram illustrating a base vector and a motion vector when the time interval between the current picture and the reference picture is shorter than the time interval between the reference picture and the past reference picture in the temporal direct mode.
In FIG. 2, pictures P1 to P8 are arranged in time order from the left, and are fields. Of these, the pictures P1, B3, B5 and P7 are top fields containing odd-numbered rows of data in the original frame, while the pictures P2, B4, B6 and P8 contain even-numbered rows of data in the original frame. It is a bottom field. The picture P1 and the picture P2 are fields that are included in the same frame and have different parity. Similarly, the picture B3 and the picture B4, the picture B5 and the picture B6, and the picture P7 and the picture P8 are fields that are included in the same frame and have different parity.
Pictures P1, P2, P7 and P8 are P pictures, while pictures B3 to B6 are B pictures. Thus, the GOP of the pictures P1 to P8 is a so-called IBBP. Therefore, the coding order is P1 → P2 → P7 → P8 → B3 → B4 → B5 → B6. Here, a picture B3 which is a B picture is a coding target picture, and a
この場合、参照ピクチャは、ピクチャB3の直前に符号化された同パリティのピクチャP7となり、そして参照ピクチャ上で着目するブロック201と同じ位置にあるブロック202が参照ブロックとなる。したがって、ブロック202について求められた動きベクトルがブロック201についての基準ベクトルmvCol(Vx,Vy)となる。そして、基準ベクトルmvCol(Vx,Vy)の参照先であるブロック203が含まれるピクチャP1が過去参照ピクチャである。なお、Vx、Vyは、それぞれ、ブロック203とブロック202との水平方向の位置の差及び垂直方向の位置の差である。この場合、ブロック201の二つの動きベクトルmvL0、mvL1は、それぞれ次式により決定される。
図2に示された例では、時間間隔tdの方が時間間隔tbよりも長い。そのため、基準ベクトルmvColに含まれる動き予測の誤差がtb/tdに応じて小さくなる。したがって、ブロック201に写っている像とブロック202に写っている像が同じ方向及び同じ移動量で動いていると、基準ベクトルmvColから算出される動きベクトルは、高い動き予測精度を持つことができる。
In this case, the reference picture is the picture P7 of the same parity encoded immediately before the picture B3, and the
In the example shown in FIG. 2, the time interval td is longer than the time interval tb. Therefore, the motion prediction error included in the reference vector mvCol is reduced according to tb / td. Therefore, when the image shown in the
図3は、時間ダイレクトモードにおいて、符号化対象ピクチャと参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも長い場合における、従来技術による基準ベクトル及び動きベクトルを示す図である。図3に示されたピクチャP1〜P8も、フィールドである。また図3に示されたピクチャP1〜P8のピクチャタイプ及び符号化順序は、それぞれ、図2に示されたピクチャP1〜P8とのピクチャタイプ及び符号化順序と同一である。
図3の例では、BピクチャであるピクチャB4が符号化対象ピクチャであり、ピクチャB4上のブロック301が着目するブロックである。このとき、ピクチャP1、P2、P7及びP8については符号化が完了している。
FIG. 3 is a diagram illustrating a reference vector and a motion vector according to the related art when the time interval between the current picture and the reference picture is longer than the time interval between the reference picture and the past reference picture in the temporal direct mode. is there. Pictures P1 to P8 shown in FIG. 3 are also fields. Also, the picture types and coding order of the pictures P1 to P8 shown in FIG. 3 are the same as the picture types and coding order of the pictures P1 to P8 shown in FIG. 2, respectively.
In the example of FIG. 3, a picture B4 that is a B picture is a coding target picture, and a
図3に示された例では、ピクチャB4の直前に符号化されたフレームにおいて、ピクチャB4と同じパリティのピクチャP8が参照ピクチャとなり、そして参照ピクチャ上で着目するブロック301と同じ位置にあるブロック302が参照ブロックとなる。したがって、ブロック302について求められた動きベクトルがブロック301についての基準ベクトルmvCol(Vx,Vy)となる。そして、基準ベクトルmvCol(Vx,Vy)の参照先であるブロック303が含まれるピクチャP7が過去参照ピクチャである。この場合も、ブロック301の二つの動きベクトルmvL0、mvL1は、それぞれ(1)式により決定される。
図3に示された例では、時間間隔tdの方が時間間隔tbよりも短い。そのため、基準ベクトルmvColに含まれる動き予測の誤差がtb/tdに応じて大きくなる。この例では、tbがtdの3倍となっているので、mvL0、mvL1に含まれる動き予測の誤差は、それぞれ、基準ベクトルに含まれる動き予測の誤差の3倍、4倍となる。したがって、ブロック301に写っている像とブロック302に写っている像が同じ方向及び同じ移動量で動いていたとしても、基準ベクトルmvColから算出される動きベクトルが持つ動き予測精度は低くなる可能性がある。
また、例えば、H.264 MPEG-4 AVCに準拠した動画像符号化装置は、1/4画素単位で動き補償を行うことができる。しかし、上記のように、tb/tdが1よりも大きいと、時間ダイレクトモードにおいて算出される動きベクトルの水平方向及び垂直方向の移動量は、(1)式に従って、基準ベクトルの水平方向及び垂直方向の移動量に1よりも大きい係数を乗じた値となる。このように、従来技術による動画像符号化装置は、動画像補償における移動量の最小単位よりも大きい単位でしか動き補償を行うことができない。
In the example shown in FIG. 3, in the frame encoded immediately before the picture B4, the picture P8 having the same parity as the picture B4 becomes the reference picture, and the
In the example shown in FIG. 3, the time interval td is shorter than the time interval tb. Therefore, the motion prediction error included in the reference vector mvCol increases in accordance with tb / td. In this example, since tb is 3 times td, the motion prediction errors included in mvL0 and mvL1 are 3 times and 4 times the motion prediction errors included in the reference vector, respectively. Therefore, even if the image shown in the
In addition, for example, a moving image encoding device compliant with H.264 MPEG-4 AVC can perform motion compensation in units of 1/4 pixels. However, as described above, when tb / td is larger than 1, the horizontal and vertical movement amounts of the motion vector calculated in the temporal direct mode are the horizontal and vertical directions of the reference vector according to the equation (1). The value obtained by multiplying the amount of movement in the direction by a coefficient greater than 1. As described above, the moving image coding apparatus according to the conventional technique can perform motion compensation only in a unit larger than the minimum unit of the moving amount in moving image compensation.
図4は、時間ダイレクトモードにおいて、符号化対象ピクチャと参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも長い場合における、一つの実施形態による基準ベクトル及び動きベクトルを示す図である。図4に示されたピクチャP1〜P8も、フィールドである。また図4に示されたピクチャP1〜P8のピクチャタイプ及び符号化順序は、それぞれ、図2に示されたピクチャP1〜P8とのピクチャタイプ及び符号化順序と同一である。
図4の例では、BピクチャであるピクチャB4が符号化対象ピクチャであり、ピクチャB4上のブロック401が着目するブロックである。このとき、ピクチャP1、P2、P7及びP8については符号化が完了している。
FIG. 4 shows a reference vector and a motion vector according to an embodiment when the time interval between the current picture and the reference picture is longer than the time interval between the reference picture and the past reference picture in the temporal direct mode. FIG. Pictures P1 to P8 shown in FIG. 4 are also fields. Also, the picture types and coding order of the pictures P1 to P8 shown in FIG. 4 are the same as the picture types and coding order of the pictures P1 to P8 shown in FIG. 2, respectively.
In the example of FIG. 4, a picture B4 that is a B picture is a coding target picture, and a block 401 on the picture B4 is a block of interest. At this time, encoding has been completed for the pictures P1, P2, P7, and P8.
図4に示された例でも、ピクチャB4の直前に符号化されたフレームにおいて、ピクチャB4と同じパリティのピクチャP8が参照ピクチャとなり、そして参照ピクチャ上で着目するブロック401と同じ位置にあるブロック402が参照ブロックとなる。そしてブロック401に対する基準ベクトルを決定するために、動画像符号化装置1は、参照ブロック402の動きベクトルMV1(Vx1,Vy1)を参照する。この動きベクトルMV1(Vx1,Vy1)は、ピクチャP8と同じフレームに含まれるピクチャP7上のブロック403を参照している。そのため、ピクチャP7が過去参照ピクチャとなる。なお、Vx1、Vy1は、それぞれ、ブロック403と、ブロック402との水平方向の位置の差及び垂直方向の位置の差である。
Also in the example shown in FIG. 4, in the frame encoded immediately before picture B4, picture P8 having the same parity as picture B4 becomes the reference picture, and block 402 is located at the same position as block 401 of interest on the reference picture. Becomes a reference block. Then, in order to determine the reference vector for the block 401, the moving
符号化対象ピクチャB4と過去参照ピクチャP7間の時間間隔tbは、参照ピクチャP8と過去参照ピクチャP7間の時間間隔tdよりも長い。一方、基準ベクトルは、時間間隔tbよりも長い時間間隔を持つ二つのピクチャ間での動きを表すベクトルであることが好ましい。このように基準ベクトルを決定することにより、基準ベクトルに含まれる動きの予測誤差が、tbとtdの比に応じて拡大されることが防止される。 The time interval tb between the encoding target picture B4 and the past reference picture P7 is longer than the time interval td between the reference picture P8 and the past reference picture P7. On the other hand, the reference vector is preferably a vector representing a motion between two pictures having a time interval longer than the time interval tb. By determining the reference vector in this way, it is possible to prevent the motion prediction error included in the reference vector from being enlarged according to the ratio of tb and td.
ここで、ブロック402はブロック403を参照しているので、ブロック402とブロック403には同一の像が写っている可能性が高い。また、図4に示されるように、ブロック403について求められた動きベクトルMV2(Vx2,Vy2)の参照先が、ピクチャP1に含まれるブロック404であると、ブロック403とブロック404にも同一の像が写っている可能性が高い。そのため、ブロック402とブロック404にも同一の像が写っている可能性が高い。なお、Vx2、Vy2は、それぞれ、ブロック404と、ブロック403との水平方向の位置の差及び垂直方向の位置の差である。
そこで、本実施形態による動画像符号化装置1は、ブロック402について求められた動きベクトルMV1(Vx1,Vy1)に、ブロック403について求められた動きベクトルMV2(Vx2,Vy2)を加算することにより基準ベクトルmvCol(Vx,Vy)を算出する。
このように基準ベクトルを算出することにより、基準ベクトルの参照元となる参照ピクチャP8と、その基準ベクトルの参照先となるピクチャP1間の時間間隔td'は、ピクチャB4とピクチャP1間の時間間隔tb'よりも長くなる。このため、ブロック401に写っている像とブロック402、404に写っている像が同じ方向及び同じ移動量で動いていると、基準ベクトルmvColから算出される動きベクトルは、高い動き予測精度を持つことができる。
Here, since the
Therefore, the moving
By calculating the reference vector in this way, the time interval td ′ between the reference picture P8 that is the reference source of the reference vector and the picture P1 that is the reference destination of the reference vector is the time interval between the picture B4 and the picture P1. longer than tb '. For this reason, if the image shown in the block 401 and the images shown in the
なお、この実施形態においても、ブロック401の二つの動きベクトルmvL0、mvL1は、それぞれ(1)式により決定される。ただし、時間間隔tbは、基準ベクトルの参照先のブロック404が含まれるピクチャP1と符号化対象ピクチャB4間の時間間隔となる。また時間間隔tdは、基準ベクトルの参照先のブロック404が含まれるピクチャP1と基準ベクトルの参照元のブロック402が含まれるピクチャP8との時間間隔となる。そして動きベクトルmvL0は、ピクチャP1を参照する動きベクトルである。また、動きベクトルmvL1は、ピクチャP8を参照する動きベクトルである。
Also in this embodiment, the two motion vectors mvL0 and mvL1 of the block 401 are each determined by equation (1). However, the time interval tb is a time interval between the picture P1 including the
ピクチャ間隔比較部18は、入力されたマクロブロックが含まれる符号化対象ピクチャの直前において符号化された参照ピクチャ上で、入力されたマクロブロックと対応する位置にあるマクロブロックを参照ブロックとして特定する。そしてピクチャ間隔比較部18は、参照ブロックについて求められた動きベクトルを基準候補ベクトルとして、動きベクトル記憶部17から読み込む。
なお、参照ブロックは、参照ピクチャ上で入力されたマクロブロックと同じ位置にあるブロックとすることができる。あるいは、参照ブロックは、その参照ブロックを参照元とする動きベクトルの延長線上に入力されたマクロブロックが存在するブロックであってもよい。
ピクチャ間隔比較部18は、参照ブロックが含まれる参照ピクチャと、基準候補ベクトルが参照する参照先のピクチャである過去参照ピクチャ間の時間間隔tdと、符号化対象ピクチャと過去参照ピクチャ間の時間間隔tbとを比較する。そしてピクチャ間隔比較部18は、tbがtdよりも長いか否かの判定結果を基準ベクトル決定部19に通知する。
あるいは、ピクチャ間隔比較部18は、符号化対象ピクチャと参照ピクチャとの時間間隔tb2が、時間間隔tdよりも長いか否かの判定結果を基準ベクトル決定部19に通知してもよい。さらに、ピクチャ間隔比較部18は、tbがtdよりも長いか否かの判定結果と、tb2がtdよりも長いか否かの判定結果の両方を基準ベクトル決定部19に通知してもよい。
The picture
The reference block can be a block at the same position as the macroblock input on the reference picture. Alternatively, the reference block may be a block in which a macroblock input on an extension line of a motion vector having the reference block as a reference source exists.
The picture
Alternatively, the picture
動画像データに含まれるピクチャがフィールドである場合、参照ピクチャと過去参照ピクチャが、同一のフレームに含まれる、異なるパリティのフィールドとなることがある。この場合、参照ピクチャと過去参照ピクチャとは時間的に連続しており、符号化対象ピクチャと参照ピクチャの時間間隔よりも参照ピクチャと過去参照ピクチャの時間間隔の方が短い。そこで、参照ピクチャと過去参照ピクチャが、同一のフレームに含まれるフィールドであれば、ピクチャ間隔比較部18は、符号化対象ピクチャと参照ピクチャとの時間間隔tb2が時間間隔tdよりも長いと判定してもよい。
When the picture included in the moving image data is a field, the reference picture and the past reference picture may be different parity fields included in the same frame. In this case, the reference picture and the past reference picture are temporally continuous, and the time interval between the reference picture and the past reference picture is shorter than the time interval between the current picture and the reference picture. Therefore, if the reference picture and the past reference picture are fields included in the same frame, the picture
基準ベクトル決定部19は、入力されたマクロブロックに対する基準ベクトルを決定する。その際、基準ベクトル決定部19は、ピクチャ間隔比較部18から通知された時間間隔tbまたはtb2とtdとの比較結果に応じて、基準ベクトルの作成方法を選択する。
具体的には、時間間隔tb及びtb2よりも時間間隔tdの方が長い場合、基準ベクトル決定部19は、従来の時間ダイレクトモードと同様に基準ベクトルを決定する。すなわち、基準ベクトル決定部19は、入力されたマクロブロックが含まれる符号化対象ピクチャの直前において符号化された参照ピクチャ上で、入力されたマクロブロックと同じ位置にあるマクロブロックについての動きベクトルを基準ベクトルとする。
なお、ピクチャ間隔比較部18がtbとtdとの比較結果のみを基準ベクトル決定部19に通知する場合、基準ベクトル決定部19は、tbよりも時間間隔tdの方が長い場合、従来の時間ダイレクトモードと同様に基準ベクトルを決定する。また、ピクチャ間隔比較部18がtb2とtdとの比較結果のみを基準ベクトル決定部19に通知する場合、基準ベクトル決定部19は、tb2よりも時間間隔tdの方が長い場合、従来の時間ダイレクトモードと同様に基準ベクトルを決定する。
The reference
Specifically, when the time interval td is longer than the time intervals tb and tb2, the reference
When the picture
一方、時間間隔tbまたはtb2よりも時間間隔tdの方が短い場合、基準ベクトル決定部19は、図4に関して説明したように基準ベクトルを決定する。そのために、基準ベクトル決定部19は、参照ピクチャ上で入力されたマクロブロックと対応する位置にある参照ブロックを参照元とする動きベクトルMV(Vx1,Vy1)を動きベクトル記憶部17から読み込む。さらに基準ベクトル決定部19は、動きベクトルMV1(Vx1,Vy1)の参照先となる過去参照ピクチャ上のマクロブロックを参照元とする動きベクトルMV2(Vx2,Vy2)を動きベクトル記憶部17から読み込む。そして基準ベクトル決定部19は、次式に従って基準ベクトルmvCol(Vx,Vy)を求める。
基準ベクトル決定部19は、基準ベクトルmvCol(Vx,Vy)と、その基準ベクトルの参照元のピクチャを示す基準元ピクチャ番号及び参照先のピクチャを示す基準先ピクチャ番号をダイレクト動きベクトル計算部20へ渡す。基準元ピクチャ番号は、上記の参照ピクチャを表す番号となる。一方、基準先ピクチャ番号は、tb/td及びtb2/tdが1未満である場合、過去参照ピクチャを表す番号となり、tb/tdまたはtb2/tdが1より大きくなる場合、動きベクトルMV2(Vx2,Vy2)の参照先のピクチャを表す番号となる。
The reference
ダイレクト動きベクトル計算部20は、基準先ピクチャ番号に基づいて、基準先ピクチャ番号に示されたピクチャと入力されたマクロブロックが含まれる符号化対象ピクチャ間の時間間隔tbを算出する。またダイレクト動きベクトル計算部20は、基準先ピクチャ番号及び基準元ピクチャ番号に基づいて、基準ベクトルの参照先のピクチャと参照元のピクチャ間の時間間隔tdを算出する。そしてダイレクト動きベクトル計算部20は、基準ベクトル及び時間間隔tb、tdを上記の(1)式に入力することにより、入力されたマクロブロックを参照元とする二つの動きベクトルmvL0、mvL1を算出する。すなわち、ダイレクト動きベクトル計算部20は、基準ベクトルを、基準ベクトルの参照先と参照元のピクチャ間の時間間隔tdに対する符号化対象ピクチャと参照先ピクチャとの時間間隔tbの比に応じて分割することで、二つの動きベクトルmvL0、mvL1を算出する。そしてダイレクト動きベクトル計算部20は、二つの動きベクトルmvL0、mvL1に、それら動きベクトルの参照先のピクチャを示す番号として、それぞれ基準先ピクチャ番号及び基準元ピクチャ番号を関連付ける。
ダイレクト動きベクトル計算部20は、算出した二つの動きベクトルmvL0、mvL1を予測モード判定部21へ渡す。
The direct motion
The direct motion
予測モード判定部21は、入力されたマクロブロックに対する予測画像の生成方法を規定する予測モードを決定する。予測モード判定部21は、例えば、図示しない制御部から取得した、入力されたマクロブロックが含まれる符号化対象のピクチャのタイプを示す情報に基づいて、そのマクロブロックの予測モードを決定する。符号化対象のピクチャのタイプがIピクチャであれば、予測モード判定部21は適用される予測モードとしてイントラ符号化モードを選択する。
The prediction
また、符号化対象のピクチャのタイプがPピクチャであれば、予測モード判定部21は、例えば、適用される予測モードとして、インター符号化モード及びイントラ符号化モードの何れかを選択する。なお、インター符号化モードとして、時間的に前のピクチャを参照する前方向予測モードか、時間的に後のピクチャを参照する後方向予測モードかは、符号化対象のピクチャのGOP内の位置を示す情報に基づいて決定される。
さらに、符号化対象のピクチャのタイプがBピクチャであれば、予測モード判定部21は、適用される予測モードを、イントラ符号化モード、前方向予測モード、後方向予測モード、双方向予測モード及び時間ダイレクトモードの中から選択する。
Also, if the type of the picture to be encoded is a P picture, the prediction
Furthermore, if the type of the picture to be encoded is a B picture, the prediction
予測モード判定部21は、複数の予測モードの中から一つの予測モードを選択する場合、各予測モードについてのマクロブロックの符号化されたデータ量の評価値であるコストをそれぞれ算出する。そして予測モード判定部21は、コストが最小となる予測モードを、入力されたマクロブロックに対して適用される予測モードとする。
各モードに対するコストは、例えば、次のように計算される。
The cost for each mode is calculated as follows, for example.
予測モード判定部21は、(3)式に従って、選択対象となる予測モードのそれぞれについてコストを算出する。そして予測モード判定部21は、コストが最小となる予測モードを、入力されたマクロブロックに対して適用される予測モードとして選択する。
なお、予測モード判定部21は、特定の予測モード、例えば、時間ダイレクトモードが選択され易くなるように、または選択され難くなるように、(3)式によって算出されるその特定の予測モードのコスト値にオフセット値を加えるか、補正係数を乗じてもよい。
予測モード判定部21は、選択した予測モードを予測画像生成部22に通知する。
The prediction
The prediction
The prediction
予測画像生成部22は、予測モード判定部21によって選択された予測モードに従って予測画像を生成する。予測画像生成部22は、入力されたマクロブロックが前方向予測モード、後方向予測モードによってインター符号化される場合、参照画像記憶部15から得た参照画像を、動きベクトル計算部16から提供される動きベクトルに基づいて動き補償する。そして予測画像生成部22は、動き補償されたマクロブロック単位のインター符号化用の予測画像を生成する。なお、動き補償は、動きベクトルで表された、マクロブロックとそれに対して最も類似する参照画像上のブロックの位置ずれ量を相殺するように、その最も類似する参照画像上のブロックの位置を移動する処理である。
また、入力されたマクロブロックが双方向予測モードまたは時間ダイレクトモードによってインター符号化される場合、予測画像生成部22は、二つの動きベクトルのそれぞれによって特定された参照画像を、その対応する動きベクトルで動き補償する。そして予測画像生成部22は、動き補償により得られた二つの補償画像の対応する画素間で画素値を平均することにより予測画像を生成する。あるいは、予測画像生成部22は、その二つの補償画像の対応する画素の値に、対応する動きベクトルの時間方向の長さが短いほど大きい重み係数を乗じて加重平均することにより、予測画像を生成してもよい。ただし、時間ダイレクトモードによってインター符号化される場合、予測画像生成部22は、ダイレクト動きベクトル計算部20によって算出された二つの動きベクトルを利用する。
The predicted
When the input macroblock is inter-coded in the bidirectional prediction mode or the temporal direct mode, the predicted
また予測画像生成部22は、入力されたマクロブロックがイントラ符号化される場合、入力されたマクロブロックに隣接するマクロブロックから予測画像を生成する。その際、予測画像生成部22は、例えば、H.264 MPEG-4 AVCに規定されている水平モード、DCモード、プレーンモードなどに従って予測画像を生成する。
予測画像生成部22は、生成された予測画像を予測誤差信号生成部11へ渡す。
Moreover, the prediction
The predicted
図5は、動画像符号化装置1により実行される、双方向予測ピクチャに対する動画像符号化処理の動作フローチャートである。動画像符号化装置1は、双方向予測ピクチャに含まれるマクロブロックごとに図5に示される動画像符号化処理を実行する。
動きベクトル計算部16は、入力されたマクロブロックで参照される可能性の有る参照画像を参照画像記憶部15から読み込む。そして動きベクトル計算部16は、参照画像及び入力されたマクロブロックに基づいて動きベクトルを算出する(ステップS101)。動きベクトル計算部16は、求めた動きベクトルを、その動きベクトルの参照元である入力マクロブロックが含まれる符号化対象ピクチャのピクチャ番号及び参照先のピクチャのピクチャ番号とともに動きベクトル記憶部17に記憶させる。また動きベクトル計算部16は、求めた動きベクトルを予測モード判定部21へ渡す。
FIG. 5 is an operation flowchart of the moving image encoding process for the bi-predictive picture executed by the moving
The motion
ピクチャ間隔比較部18は、動きベクトル記憶部17から、入力されたマクロブロックが含まれる符号化対象ピクチャの直前に符号化された参照ピクチャ上で入力されたマクロブロックと対応する位置にあるマクロブロックを参照元とする動きベクトルを読み出す。そしてピクチャ間隔比較部18は、その動きベクトルを基準候補ベクトルMV1(Vx1,Vy1)とする。ピクチャ間隔比較部18は、基準候補ベクトルMV1(Vx1,Vy1)の参照元の参照ピクチャ及び参照先の過去参照ピクチャ間の時間間隔tdを算出する(ステップS102)。また、ピクチャ間隔比較部18は、符号化対象ピクチャと過去参照ピクチャ間の時間間隔tbと符号化対象ピクチャと参照ピクチャ間の時間間隔tb2のいずれか一方または両方を算出する(ステップS103)。そしてピクチャ間隔比較部18は、時間間隔tbあるいはtb2が時間間隔tdよりも長いか否か判定する(ステップS104)。ピクチャ間隔比較部18は、時間間隔tbあるいはtb2が時間間隔tdよりも長いか否かの判定結果を基準ベクトル決定部19に通知する。
The picture
時間間隔tb及びtb2が時間間隔tdよりも短い場合(ステップS104−No)、基準ベクトル決定部19は、基準候補ベクトルMV1(Vx1,Vy1)を基準ベクトルmvCol(Vx,Vy)とする(ステップS105)。なお、時間間隔tbまたはtb2の何れか一方しか求められていない場合、その求められている方の時間間隔が時間間隔tdよりも短い場合も、基準ベクトル決定部19は、基準候補ベクトルを基準ベクトルとする。
一方、時間間隔tbあるいはtb2が時間間隔tdよりも長い場合(ステップS104−Yes)、基準ベクトル決定部19は、基準候補ベクトルMV1(Vx1,Vy1)の参照先のマクロブロックを参照元とする動きベクトルMV2(Vx2,Vy2)を動きベクトル記憶部17から読み込む。そして基準ベクトル決定部19は、基準候補ベクトルMV1(Vx1,Vy1)と動きベクトルMV2(Vx2,Vy2)の和を、基準ベクトルmvCol(Vx,Vy)とする(ステップS106)。
When the time intervals tb and tb2 are shorter than the time interval td (step S104—No), the reference
On the other hand, when the time interval tb or tb2 is longer than the time interval td (step S104—Yes), the reference
ステップS105またはS106の後、基準ベクトル決定部19は、求めた基準ベクトル及び基準ベクトルの参照先及び参照元のピクチャの番号をダイレクト動きベクトル計算部20へ渡す。
ダイレクト動きベクトル計算部20は、基準ベクトルの参照先及び参照元のピクチャ間の時間間隔tdと、符号化対象ピクチャと基準ベクトルの参照先のピクチャ間の時間間隔tbを算出する。そしてダイレクト動きベクトル計算部20は、基準ベクトルと、時間間隔tbとtdとの比(tb/td)を(1)式に入力することにより、二つの動きベクトルmvL0、mvL1を算出する(ステップS107)。ダイレクト動きベクトル計算部20は、求めた二つの動きベクトルを予測モード判定部21へ渡す。
After step S105 or S106, the reference
The direct motion
予測モード判定部21は、イントラ符号化モード、前方向予測モード、後方向予測モード、双方向予測モード、時間ダイレクトモードのそれぞれについて入力されたマクロブロックの符号量の評価値を表すコストを算出する。そして予測モード判定部21は、コストが最小となる予測モードを入力されたマクロブロックに適用する予測モードとして選択する(ステップS108)。
予測モード判定部21は、選択した予測モードを予測画像生成部22へ通知する。
The prediction
The prediction
予測画像生成部22は、参照画像記憶部15から読み込んだ参照画像に基づいて、選択した予測モードに応じた予測画像を生成する(ステップS109)。予測画像生成部22は、生成した予測画像を符号化部10の予測誤差信号生成部11へ渡す。そして予測誤差信号生成部11は、入力されたマクロブロックと予測画像生成部19により生成された予測画像間の予測誤差信号を算出する(ステップS110)。符号化部10の直交変換・量子化部12は、予測誤差信号生成部11により算出された予測誤差信号を直交変換及び量子化して量子化信号を生成する(ステップS111)。直交変換・量子化部12は、量子化信号を復号部14及び符号化部10の可変長符号化部13へ渡す。
The predicted
復号部14は、量子化信号を逆量子化及び逆直交変換して得られたマクロブロックの各画素の予測誤差信号を、予測画像の各画素に加えることによりマクロブロックを再生する(ステップS112)。そして復号部14は、得られたマクロブロックを所定の順序に従って結合することにより再現されるピクチャを参照画像として参照画像記憶部15に記憶する。
また、符号化部10の可変長符号化部13は、量子化信号及び動きベクトルなどの関連情報を可変長符号化する(ステップS113)。そして可変長符号化部13は、可変長符号化された符号化データを出力する。
そして動画像符号化装置1は、一つのマクロブロックに対する動画像符号化処理を終了する。
The
In addition, the variable
Then, the moving
なお、ステップS101とステップS102〜S107の処理の順序は入れ替わっても良い。また、Iピクチャに含まれるマクロブロックについては、ステップS101〜S108の処理は省略される。そしてステップS109において、予測画像生成部22は、イントラ符号化用の予測画像を生成する。また、Pピクチャに含まれるマクロブロックについては、ステップS102〜S107の処理は省略される。そしてステップS108において、予測モード判定部21は、イントラ符号化モードと、前方向予測モード及び後方向予測モードの何れか一方とについてのコストを算出する。そして予測モード判定部21は、コストが最小となる予測モードを入力されたマクロブロックに適用する予測モードとして選択する。さらに、インター符号化及びイントラ符号化の何れも行われないマクロブロックに対しては、ステップS101〜S110の処理は省略される。そしてステップS111において、直交変換・量子化部12は、入力されたマクロブロックを直交変換する。
Note that the order of the processing of step S101 and steps S102 to S107 may be switched. Also, the processing of steps S101 to S108 is omitted for the macroblock included in the I picture. In step S109, the predicted
以上に説明してきたように、この動画像符号化装置は、時間ダイレクトモードが適用されるマクロブロックに対して、基準ベクトルの参照元のピクチャと参照先のピクチャ間の時間間隔が長くなるように基準ベクトルを設定する。具体的には、動画像符号化装置は、基準ベクトルの参照元と参照先のピクチャ間の時間間隔が、そのマクロブロックが含まれる符号化対象ピクチャと基準ベクトルの参照先または参照元のピクチャ間の時間間隔よりも長くなるように、基準ベクトルを設定する。そのため、この動画像符号化装置は、基準ベクトルに含まれる動き予測の誤差が、基準ベクトルから算出される動きベクトルにおいて拡大されることを防止できる。したがって、この動画像符号化装置は、時間ダイレクトモードにおける基準ベクトルのマクロブロックに写っている像の動きに対する予測精度を向上できる。その結果として、この動画像符号化装置は、時間ダイレクトモードが適用されるマクロブロックを増やせるとともに、動画像データの符号化効率を向上できる。 As described above, this moving picture encoding apparatus increases the time interval between the reference source picture and the reference destination picture of the reference vector for the macroblock to which the temporal direct mode is applied. Set the reference vector. Specifically, the video encoding apparatus determines that the time interval between the reference source of the reference vector and the reference destination picture is between the encoding target picture including the macroblock and the reference destination reference picture or the reference source picture. The reference vector is set so as to be longer than the time interval. Therefore, this moving picture coding apparatus can prevent the motion prediction error included in the reference vector from being expanded in the motion vector calculated from the reference vector. Therefore, this moving picture coding apparatus can improve the prediction accuracy with respect to the motion of the image shown in the macroblock of the reference vector in the temporal direct mode. As a result, this moving picture coding apparatus can increase the number of macroblocks to which the temporal direct mode is applied and can improve the coding efficiency of moving picture data.
なお、一つのマクロブロック内に複数のサブブロックが規定されることもある。例えば、縦16画素×横16画素のマクロブロック内に、縦8画素×横8画素のサブブロックが4個含まれたり、縦4画素×横4画素のサブブロックが16個含まれることがある。あるいは、縦16画素×横16画素のマクロブロック内に、縦8画素×横16画素のサブブロックあるいは縦16画素×横8画素のサブブロックが2個含まれることがある。さらに、一つのマクロブロック内に大きさの異なるサブブロックが複数含まれることもある。そこで、参照ブロックが複数のサブブロックに分割されている場合、基準ベクトル決定部19は、一つのマクロブロックに対して、サブブロックごとに基準ベクトルを決定してもよい。例えば、一つの参照ブロックに4個のサブブロックが含まれる場合、基準ベクトル決定部19は、符号化対象ピクチャの着目する一つのマクロブロックに対して4個の基準ベクトルを求める。そしてダイレクト動きベクトル計算部20は、サブブロックごとに求められた基準ベクトルごとに、(1)式に従って動きベクトルを作成する。
A plurality of sub blocks may be defined in one macro block. For example, within a macro block of 16 pixels vertically by 16 pixels horizontally, 4 sub blocks of 8 pixels vertical by 8 pixels wide may be included, or 16 sub blocks of 4 pixels vertical by 4 pixels horizontal may be included. . Alternatively, there may be two sub-blocks of vertical 8 pixels × horizontal 16 pixels or vertical 16 pixels × horizontal 8 pixels in a macro block of vertical 16 pixels × horizontal 16 pixels. Furthermore, a plurality of sub-blocks having different sizes may be included in one macro block. Therefore, when the reference block is divided into a plurality of subblocks, the reference
また、動きベクトルは、マクロブロックのサイズよりも小さい単位で空間方向の移動量を指定できる。そのため、参照ピクチャ上の参照ブロックを、その参照ブロックについての動きベクトルMV1(Vx1,Vy1)によって空間的に移動させた移動ブロックが、過去参照ピクチャの何れのマクロブロックとも完全に一致しないこともある。そこで基準ベクトル決定部19は、参照ブロックの中心位置(RefCx1,RefCy1)に、その参照ブロックの動きベクトルMV1を加えた移動中心位置(RefCx1+Vx1,RefCy1+Vy1)が含まれる、過去参照ピクチャ上のマクロブロックを対応ブロックとして決定する。そして基準ベクトル決定部19は、対応ブロックについて求められた動きベクトルを、基準ベクトルを決定するための動きベクトルMV2(Vx2,Vy2)とする。
なお、上記のように、参照ブロックが複数のサブブロックに分割されている場合、基準ベクトル決定部19は、参照ブロックに含まれるサブブロックごとに、過去参照ピクチャ上の対応するブロックを決定する。すなわち、基準ベクトル決定部19は、各サブブロックの中心位置に、そのサブブロックの動きベクトルを加えた位置が含まれる、過去参照ピクチャ上のサブブロックを対応サブブロックとして決定する。そして基準ベクトル決定部19は、対応サブブロックについて求められた動きベクトルを、基準ベクトルを決定するための動きベクトルMV2(Vx2,Vy2)とする。
The motion vector can specify the amount of movement in the spatial direction in units smaller than the size of the macroblock. Therefore, a moving block obtained by spatially moving a reference block on a reference picture using a motion vector MV1 (Vx1, Vy1) for the reference block may not completely match any macroblock in the past reference picture. . Therefore, the reference
As described above, when the reference block is divided into a plurality of sub-blocks, the reference
また基準ベクトル決定部19は、過去参照ピクチャ上の各マクロブロックのうち、移動ブロックと少なくとも一部が重なるマクロブロックについての動きベクトルを、その重なった領域の面積で加重平均することにより、動きベクトルMV2(Vx2,Vy2)を求めてもよい。
同様に、参照ブロックが複数のサブブロックに分割されている場合、基準ベクトル決定部19は、参照ブロックに含まれる着目サブブロックを、そのサブブロックについての動きベクトルで移動させた移動サブブロックを求めてもよい。そして基準ベクトル決定部19は、過去参照ピクチャ上の各サブブロックのうち、移動サブブロックと少なくとも一部が重なるサブブロックについての動きベクトルを、その重なった領域の面積で加重平均する。基準ベクトル決定部19は、その加重平均された動きベクトルを、着目するサブブロックの動きベクトルMV2(Vx2,Vy2)としてもよい。
In addition, the reference
Similarly, when the reference block is divided into a plurality of sub-blocks, the reference
図6は、参照ブロック内のサブブロックを基準候補ベクトルによって移動させた移動サブブロックと、過去参照ピクチャの複数のサブブロックとの対応関係の一例を示す図である。
図6に示されるように、この例では、移動サブブロック601は、過去参照ピクチャのサブブロック611〜614と重なっている。移動サブブロック601の左上端点の座標は(msbl, msbt)であり、移動サブブロック601の右下端点の座標は(msbr, msbb)である。なお、移動サブブロック601の移動元となる、参照ピクチャ上の着目サブブロックの左上端点及び右下端点の座標が、それぞれ(sbl, sbt)、(sbr, sbb)であり、着目サブブロックの動きベクトルがMV1(Vx1,Vy1)であれば、それらの座標に以下の関係がある。
(msbl, msbt) = (sbl+Vx1, sbt+Vy1)
(msbr, msbb) = (sbr+Vx1, sbb+Vy1)
FIG. 6 is a diagram illustrating an example of a correspondence relationship between a moving sub-block obtained by moving a sub-block in a reference block using a reference candidate vector and a plurality of sub-blocks of a past reference picture.
As shown in FIG. 6, in this example, the moving sub-block 601 overlaps the sub-blocks 611 to 614 of the past reference picture. The coordinates of the upper left end point of the moving sub-block 601 are (msb l , msb t ), and the coordinates of the lower right end point of the moving
(msb l , msb t ) = (sb l + Vx1, sb t + Vy1)
(msb r , msb b ) = (sb r + Vx1, sb b + Vy1)
また、過去参照ピクチャ上のサブブロック611の左上端点及び右下端点の座標は、それぞれ(Rsbx1, Rsby1)、(Rsbx2, Rsby2)である。同様に、サブブロック612の左上端点及び右下端点の座標は、それぞれ(Rsbx2, Rsby1)、(Rsbx3, Rsby2)である。また、サブブロック613の左上端点及び右下端点の座標は、それぞれ(Rsbx1, Rsby2)、(Rsbx2, Rsby3)である。そしてサブブロック614の左上端点及び右下端点の座標は、それぞれ(Rsbx2, Rsby2)、(Rsbx3, Rsby3)である。
この場合、移動サブブロック601とサブブロック611〜614のそれぞれとが重なる領域621〜624の面積s1〜s4は、以下のようになる。
S1 = (Rsbx2 - msbl) * (Rsby2 - msbt)
S2 = (msbr - Rsbx2) * (Rsby2 - msbt)
S3 = (Rsbx2 - msbl) * (msbb - Rsby2)
S4 = (msbr - Rsbx2) * (msbb - Rsby2)
そこで、サブブロック611〜614のそれぞれの動きベクトルがMVs1(Vxs1,Vys1)〜MVs4(Vxs4,Vys4)であれば、着目サブブロックの基準ベクトルを決定するための動きベクトルMV2(Vx2,Vy2)の水平方向移動量Vx2及び垂直方向移動量Vy2は、次のように求められる。
Vx2 = (S1 * Vxs1 + S2 * Vxs2 + S3 * Vxs3 + S4 * Vxs4)/(S1+S2+S3+S4)
Vy2 = (S1 * Vys1 + S2 * Vys2 + S3 * Vys3 + S4 * Vys4)/(S1+S2+S3+S4)
Further, the coordinates of the upper left end point and the lower right end point of the sub-block 611 on the past reference picture are (Rsb x1 , Rsb y1 ) and (Rsb x2 , Rsb y2 ), respectively. Similarly, the coordinates of the upper left end point and the lower right end point of the sub-block 612 are (Rsb x2 , Rsb y1 ) and (Rsb x3 , Rsb y2 ), respectively. Further, the coordinates of the upper left end point and the lower right end point of the sub-block 613 are (Rsb x1 , Rsb y2 ) and (Rsb x2 , Rsb y3 ), respectively. The coordinates of the upper left end point and the lower right end point of the sub-block 614 are (Rsb x2 , Rsb y2 ) and (Rsb x3 , Rsb y3 ), respectively.
In this case, areas s 1 to s 4 of regions 621 to 624 where the moving
S 1 = (Rsb x2 -msb l ) * (Rsb y2 -msb t )
S 2 = (msb r -Rsb x2 ) * (Rsb y2 -msb t )
S 3 = (Rsb x2 -msb l ) * (msb b -Rsb y2 )
S 4 = (msb r -Rsb x2 ) * (msb b -Rsb y2 )
Therefore, if the motion vectors of the sub-blocks 611 to 614 are MVs1 (Vxs1, Vys1) to MVs4 (Vxs4, Vys4), the motion vector MV2 (Vx2, Vy2) for determining the reference vector of the target sub-block The horizontal direction movement amount Vx2 and the vertical direction movement amount Vy2 are obtained as follows.
Vx2 = (S 1 * Vxs1 + S 2 * Vxs2 + S 3 * Vxs3 + S 4 * Vxs4) / (S 1 + S 2 + S 3 + S 4 )
Vy2 = (S 1 * Vys1 + S 2 * Vys2 + S 3 * Vys3 + S 4 * Vys4) / (S 1 + S 2 + S 3 + S 4 )
また、基準ベクトル決定部19は、符号化対象ピクチャと参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも長い場合、入力されたマクロブロックに対する基準ベクトルを、別の方法で求めてよい。
他の実施形態によれば、基準ベクトル決定部19は、基準ベクトルを、参照ピクチャ上の参照ブロックの基準候補ベクトルMV1(Vx1,Vy1)の参照先である過去参照ピクチャ上のマクロブロックについての動きベクトルMV2(Vx2,Vy2)に基づいて算出する。例えば、基準ベクトル決定部19は、次式に従って基準ベクトルmvCol(Vx,Vy)を算出する。
According to another embodiment, the reference
図7は、時間ダイレクトモードにおいて、符号化対象ピクチャと参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも長い場合における、他の実施形態による基準ベクトル及び動きベクトルを示す図である。
図7に示されたピクチャP1〜P8も、フィールドである。また図7に示されたピクチャP1〜P8のピクチャタイプ及び符号化順序は、それぞれ、図2に示されたピクチャP1〜P8とのピクチャタイプ及び符号化順序と同一である。
図7の例では、BピクチャであるピクチャB4が符号化対象ピクチャであり、ピクチャB4上のブロック701が着目するブロックである。このとき、ピクチャP1、P2、P7及びP8については符号化が完了している。
FIG. 7 shows a reference vector and a motion vector according to another embodiment when the time interval between the current picture and the reference picture is longer than the time interval between the reference picture and the past reference picture in the temporal direct mode. FIG.
Pictures P1 to P8 shown in FIG. 7 are also fields. Also, the picture types and encoding order of the pictures P1 to P8 shown in FIG. 7 are the same as the picture types and encoding order of the pictures P1 to P8 shown in FIG. 2, respectively.
In the example of FIG. 7, a picture B4 that is a B picture is a coding target picture, and a
図7に示された例では、参照ピクチャは、ピクチャB4の直前に符号化され、ピクチャB4と同じパリティのピクチャP8となり、そして参照ピクチャ上で着目するブロック701と同じ位置にあるブロック702が参照ブロックとなる。そしてブロック701に対する基準ベクトルを決定するために、基準ベクトル決定部19は、参照ブロック702の動きベクトルMV1(Vx1,Vy1)を参照する。この動きベクトルMV1(Vx1,Vy1)は、ピクチャP8と同じフレームに含まれるピクチャP7上のブロック703を参照している。そのため、ピクチャP7が過去参照ピクチャとなる。なお、Vx1、Vy1は、それぞれ、ブロック703と、ブロック702との水平方向の位置の差及び垂直方向の位置の差である。
In the example shown in FIG. 7, the reference picture is encoded immediately before the picture B4, becomes the picture P8 having the same parity as the picture B4, and the
符号化対象ピクチャB4と過去参照ピクチャP7間の時間間隔tbは、参照ピクチャP8と過去参照ピクチャP7間の時間間隔tdよりも長い。
そこで、基準ベクトル決定部19は、ブロック703についての動きベクトルMV2(Vx2,Vy2)を動きベクトル記憶部17から読み込む。そして基準ベクトル決定部19は、(3)式に従って基準ベクトルmvCol(Vx,Vy)を算出する。ここで時間間隔taは、MV2(Vx2,Vy2)の参照先のブロック704が含まれるピクチャP1と過去参照ピクチャP7との時間間隔であり、時間間隔td'は、ピクチャP1と参照ピクチャP8間の時間間隔である。すなわち、基準ベクトルの参照先のピクチャがピクチャP1となり、基準ベクトルの参照元のピクチャがP8となる。なお、Vx2、Vy2は、それぞれ、ブロック704と、ブロック703との水平方向の位置の差及び垂直方向の位置の差である。
The time interval tb between the encoding target picture B4 and the past reference picture P7 is longer than the time interval td between the reference picture P8 and the past reference picture P7.
Therefore, the reference
このように基準ベクトルを算出することによっても、基準ベクトルの参照元のピクチャP8と参照先のピクチャP1間の時間間隔tdは、符号化対象ピクチャB4と基準ベクトルの参照先のピクチャP1間の時間間隔tbよりも長くなる。このため、ブロック701に写っている像とブロック702、704に写っている像が同じ方向及び同じ移動量で動いていると、基準ベクトルmvColから算出される動きベクトルは、高い動き予測精度を持つことができる。
なお、この実施形態においても、ブロック701の二つの動きベクトルmvL0、mvL1は、それぞれ(1)式により決定される。ただし、動きベクトルmvL0は、ピクチャP1を参照先とする動きベクトルである。また、動きベクトルmvL1は、ピクチャP8を参照先とする動きベクトルである。
Also by calculating the reference vector in this way, the time interval td between the reference source picture P8 of the reference vector and the reference destination picture P1 is equal to the time between the encoding target picture B4 and the reference destination picture P1 of the reference vector. It becomes longer than the interval tb. For this reason, when the image shown in the
Also in this embodiment, the two motion vectors mvL0 and mvL1 of the
さらに、符号化対象の動画像データに含まれるピクチャがフィールドである場合、同一フレームに含まれる異なるパリティの2枚のピクチャにおいて、そのフレームの同じ領域に対応するマクロブロックに写っている像は類似する可能性が高い。そこで、図7に示されたように、過去参照ピクチャと参照ピクチャが同一フレームに含まれる場合、基準ベクトル決定部19は、過去参照ピクチャ上で参照ブロックと同一の位置にあるマクロブロックを特定する。そして基準ベクトル決定部19は、特定されたマクロブロックについての動きベクトルを、基準ベクトルの決定に用いる動きベクトルMV2(Vx2,Vy2)としてもよい。
Furthermore, when the picture included in the moving image data to be encoded is a field, in two pictures of different parity included in the same frame, the images reflected in the macroblock corresponding to the same area of the frame are similar. There is a high possibility of doing. Therefore, as illustrated in FIG. 7, when the past reference picture and the reference picture are included in the same frame, the reference
また、符号化対象となる動画像データに含まれる何れかのBピクチャが、他のPピクチャまたはBピクチャをインター符号化するために参照されるピクチャであってもよい。このような場合、符号化対象となる動画像データに含まれるピクチャがフレームであっても、符号化対象ピクチャと過去参照ピクチャ間の時間間隔tbが、過去参照ピクチャと参照ピクチャ間の時間間隔tdよりも長くなることがある。 Also, any B picture included in the moving image data to be encoded may be a picture that is referred to in order to inter-code another P picture or B picture. In such a case, even if the picture included in the moving image data to be encoded is a frame, the time interval tb between the encoding target picture and the past reference picture is equal to the time interval td between the past reference picture and the reference picture. May be longer.
図8は、他の例による、時間ダイレクトモードにおいて、符号化対象ピクチャと参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも長い場合における基準ベクトル及び動きベクトルを示す図である。
図8において、ピクチャP1及びP7はPピクチャであり、一方、ピクチャB2〜B6はBピクチャである。このうち、ピクチャB3及びB5は、他のBピクチャが参照可能なピクチャである。符号化順序は、P0→P7→B3→B5→B2→B4→B6の順序であるとする。この例では、BピクチャであるピクチャB2が符号化対象ピクチャであり、ブロック801が着目するブロックである。このとき、ピクチャP1、B3、B5及びP7については符号化が完了している。
FIG. 8 is a diagram showing a reference vector and a motion vector when the time interval between the current picture and the reference picture is longer than the time interval between the reference picture and the past reference picture in the temporal direct mode according to another example. It is.
In FIG. 8, pictures P1 and P7 are P pictures, while pictures B2 to B6 are B pictures. Among these, pictures B3 and B5 are pictures that can be referred to by other B pictures. Assume that the encoding order is P0 → P7 → B3 → B5 → B2 → B4 → B6. In this example, a picture B2, which is a B picture, is a coding target picture, and a
図8に示された例では、参照ピクチャは、ピクチャB2の直前に符号化されたピクチャB5となり、そして参照ピクチャ上で着目するブロック801と同じ位置にあるブロック802が参照ブロックとなる。そしてブロック801に対する基準ベクトルを決定するために、参照ブロック802の動きベクトルMV1(Vx1,Vy1)が参照される。この動きベクトルMV1(Vx1,Vy1)は、ピクチャB2よりも時間的に後のピクチャB3上のブロック803を参照している。そのため、ピクチャB3が過去参照ピクチャとなる。なお、Vx1、Vy1は、それぞれ、ブロック803と、ブロック802との水平方向の位置の差及び垂直方向の位置の差である。
なお、ピクチャB5はBピクチャであるため、ブロック802に対して二つの動きベクトルが規定されている可能性がある。この場合、基準ベクトルを決定するための動きベクトルMV1(Vx1,Vy1)として、例えば、H.264 MPEG-4 AVCに規定される、List0に示される動きベクトルが優先的に利用される。そして、例えば、予測モード判定の結果などにより、List0に示される動きベクトルが存在しない場合に、List1に示される動きベクトルが動きベクトルMV1(Vx1,Vy1)として利用される。
In the example shown in FIG. 8, the reference picture is the picture B5 encoded immediately before the picture B2, and the
Note that since the picture B5 is a B picture, two motion vectors may be defined for the
このように、符号化対象ピクチャB2よりも参照ピクチャB5と過去参照ピクチャB3の両方が時間的に後にある場合、符号化対象ピクチャB2と参照ピクチャB5間の時間間隔tb2は、過去参照ピクチャB3と参照ピクチャB5間の時間間隔tdよりも長い。
そこで、ピクチャ間隔比較部18は、参照ピクチャと過去参照ピクチャの両方が、符号化対象ピクチャよりも時間的に後側にある場合、tb2がtdよりも長いとの判定結果を基準ベクトル決定部19へ通知してもよい。
また、ピクチャ間隔比較部18は、参照ピクチャと過去参照ピクチャの両方が、符号化対象ピクチャよりも時間的に前側にある場合、tbがtdよりも長いとの判定結果を基準ベクトル決定部19へ通知してもよい。
この場合も、基準ベクトル決定部19は、(2)式または(4)式に従って基準ベクトルmvCol(Vx,Vy)を求めることができる。
As described above, when both the reference picture B5 and the past reference picture B3 are temporally behind the encoding target picture B2, the time interval tb2 between the encoding target picture B2 and the reference picture B5 is the same as the past reference picture B3. It is longer than the time interval td between the reference pictures B5.
Therefore, the picture
Also, the picture
Also in this case, the reference
図9は、上記の各実施形態による動画像符号化装置により符号化された動画像データを復号する動画像復号装置の概略構成図である。動画像復号装置3は、可変長復号部31、予測モード判定部32、動きベクトル記憶部33、ピクチャ間隔比較部34、基準ベクトル決定部35、ダイレクト動きベクトル計算部36、予測画像生成部37、復号部38、記憶部39及び結合部40を有する。
動画像復号装置3が有するこれらの各部は、それぞれ別個の回路として形成される。あるいは動画像復号装置3が有するこれらの各部は、その各部に対応する回路が集積された一つの集積回路として動画像復号装置3に実装されてもよい。さらに、動画像復号装置3が有するこれらの各部は、動画像復号装置3が有するプロセッサ上で実行されるコンピュータプログラムにより実現される、機能モジュールであってもよい。
FIG. 9 is a schematic configuration diagram of a moving picture decoding apparatus that decodes moving picture data encoded by the moving picture encoding apparatus according to each of the above embodiments. The moving
Each of these units included in the
動画像復号装置3は、符号化された動画像データを含むデータストリームを、例えば、通信ネットワーク及び動画像復号装置3を通信ネットワークに接続するためのインターフェース回路を介して取得する。そして動画像復号装置3は、そのデータストリームを、図示しないバッファメモリに記憶させる。動画像復号装置3は、符号化された動画像データを、符号化されたマクロブロック単位でバッファメモリから読み出し、そのマクロブロック単位のデータを可変長復号部31へ入力する。
The moving
可変長復号部31は、マクロブロック単位で符号化されているデータを可変長復号する。そして可変長復号部31は、量子化された予測誤差信号である量子化信号を再生する。また可変長復号部31は、着目するマクロブロックが、時間ダイレクトモード以外のインター符号化モードによってインター符号化されたマクロブロックであれば、そのマクロブロックについての動きベクトルを可変長復号する。そして可変長復号部31は、再生した動きベクトルを予測画像生成部37及び動きベクトル記憶部33へ渡す。また可変長復号部31は、量子化信号を復号部38へ渡す。
The variable
予測モード判定部32は、符号化された動画像データに含まれるヘッダ情報から、復号対象ピクチャの着目するマクロブロックに対して適用された予測モードを特定する。そして予測モード判定部32は、適用された予測モードが時間ダイレクトモードである場合、ピクチャ間隔比較部34、基準ベクトル決定部35及びダイレクト動きベクトル計算部36に、時間ダイレクトモード用の動きベクトルを求めさせる。
また予測モード判定部32は、着目するマクロブロックに対して適用された予測モードを予測画像生成部37へ通知する。
The prediction
The prediction
動きベクトル記憶部33は、動画像符号化装置1の動きベクトル記憶部17と同様の機能を有する。また、ピクチャ間隔比較部34、基準ベクトル決定部35及びダイレクト動きベクトル計算部36は、それぞれ、動画像符号化装置1のピクチャ間隔比較部18、基準ベクトル決定部19及びダイレクト動きベクトル計算部20の機能と同様の機能を有する。
The motion
すなわち、動きベクトル記憶部33は、時間ダイレクトモードにおける基準ベクトルの決定に利用される可能性のある、複数枚のピクチャ分の再生された動きベクトルを記憶する。
ピクチャ間隔比較部34は、復号対象のピクチャにおいて着目するマクロブロックと、直前に復号されている参照ピクチャ上で対応する位置にある参照ブロックを参照元とする動きベクトルを動きベクトル記憶部33から読み出し、基準候補ベクトルとする。そしてピクチャ間隔比較部34は、基準候補ベクトルの参照先のマクロブロックが含まれるピクチャを過去参照ピクチャとする。そしてピクチャ間隔比較部34は、復号対象ピクチャと参照ピクチャまたは過去参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも長いか否か判定する。なお、その判定方法の詳細は、動画像符号化装置1のピクチャ間隔比較部18についての説明を参照されたい。そしてピクチャ間隔比較部34は、その判定結果を基準ベクトル決定部35に通知する。
なお、参照ブロックは、参照ピクチャ上で着目するマクロブロックと同じ位置にあるマクロブロックとすることができる。あるいは、参照ブロックは、基準候補ベクトルの延長線上に着目するマクロブロックが存在する参照ピクチャ上のマクロブロックとしてもよい。
That is, the motion
The picture
Note that the reference block can be a macroblock located at the same position as the macroblock of interest on the reference picture. Alternatively, the reference block may be a macroblock on a reference picture in which a macroblock of interest exists on an extension line of the standard candidate vector.
基準ベクトル決定部35は、復号対象ピクチャと参照ピクチャ及び過去参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも短い場合、基準候補ベクトルを基準ベクトルとする。
一方、復号対象ピクチャと参照ピクチャまたは過去参照ピクチャ間の時間間隔が、参照ピクチャと過去参照ピクチャ間の時間間隔よりも長い場合、基準ベクトル決定部35は、基準候補ベクトルの参照先のマクロブロックを参照元とする動きベクトルMV2(Vx2,Vy2)を動きベクトル記憶部33から読み出す。そして基準ベクトル決定部35は、動きベクトルMV2(Vx2,Vy2)に基づいて、上記の(2)式または(4)式に従って基準ベクトルを決定する。基準ベクトル決定部35は、基準ベクトルをダイレクト動きベクトル計算部36へ渡す。
When the time interval between the decoding target picture, the reference picture, and the past reference picture is shorter than the time interval between the reference picture and the past reference picture, the reference
On the other hand, when the time interval between the decoding target picture and the reference picture or the past reference picture is longer than the time interval between the reference picture and the past reference picture, the reference
ダイレクト動きベクトル計算部36は、基準ベクトルと上記の(1)式に従って、二つの動きベクトルを算出する。そしてダイレクト動きベクトル計算部36は、算出した二つの動きベクトルを予測画像生成部37へ渡す。
The direct motion
予測画像生成部37は、動画像符号化装置1の予測画像生成部22の機能と同様の機能を有する。そして予測画像生成部37は、復号対象ピクチャ上の着目するマクロブロックについて適用された予測モードに応じて、予測画像を生成する。
予測画像生成部37は、記憶部39から、着目するマクロブロックを符号化する際に用いられた参照画像を読み込む。そして適用された予測モードが前方向予測モードまたは後方向予測モードなど、インター符号化モードの何れかであれば、予測画像生成部37は動きベクトルを用いてその参照画像を動き補償することにより予測画像を生成する。その際、予測モードが時間ダイレクトモードであれば、予測画像生成部37はダイレクト動きベクトル計算部36により算出された二つの動きベクトルを用いて動き補償を行う。
また、適用された予測モードがイントラ符号化モードであれば、予測画像生成部37は、そのイントラ符号化モードのうちの適用された予測画像生成モードに従って参照画像から予測画像を生成する。
予測画像生成部37は、生成した予測画像を復号部38へ渡す。
The predicted
The predicted
If the applied prediction mode is the intra coding mode, the predicted
The predicted
復号部38は、可変長復号部31から受け取った量子化信号に、符号化された動画像データに含まれるヘッダ情報から取得した量子化パラメータにより決定された量子化幅に相当する所定数を乗算することにより逆量子化する。この逆量子化により、着目するマクロブロックの周波数信号、例えば、DCT係数の組が復元される。その後、復号部38は、周波数信号を逆直交変換処理する。逆量子化処理及び逆直交変換処理を量子化信号に対して実行することにより予測誤差信号が再生される。
The
復号部38は、インター符号化されるピクチャについて、動き補償された予測画像の各画素値に、その画素に対応する再生された予測誤差信号を加算する。一方、復号部38は、イントラ符号化されるピクチャについて、既に符号化されたマクロブロックに基づいて生成された予測画像の各画素値に、その画素に対応する、再生された予測誤差信号を加算する。これらの処理を着目するマクロブロックについて実行することにより、復号部38は、着目するマクロブロックを再生できる。そして復号部38は、再生されたマクロブロックの符号化順序に従って結合することにより、ピクチャを再生する。復号部38は、再生されたピクチャを記憶部39に記憶させる。
For the picture to be inter-coded, the
記憶部39は、例えば、フレームメモリを有する。そして記憶部39は、復号部38から受け取ったピクチャを一時的に記憶する。そして記憶部39は、予測画像生成部37にそのピクチャを参照画像として供給する。また記憶部39は、そのピクチャを結合部40へ出力する。なお、記憶部39は、予め定められた所定枚数分のピクチャを記憶し、記憶されているデータ量がその所定枚数に相当する量を超えると、符号化順序が古いピクチャから順に破棄する。
The
結合部40は、再生されたピクチャを時間順に再配置して、動画像データを再生する。結合部40は、再生した動画像データを出力する。出力された動画像データは、例えば、図示しない記憶装置に記憶される。あるいは、出力された動画像データは、動画像復号装置3と接続された、図示しない表示装置に表示される。
The combining
図10は、動画像復号装置3により実行される、動画像復号処理の動作フローチャートである。動画像復号装置3は、マクロブロックごとに図10に示される動画像復号処理を実行する。
可変長復号部31は、マクロブロック単位で符号化されているデータを可変長復号することにより、量子化された予測誤差信号及び動きベクトルを再生する(ステップS201)。可変長復号部31は、再生した動きベクトルを予測画像生成部37及び動きベクトル記憶部33へ渡す。また可変長復号部31は、量子化された予測誤差信号を復号部38へ渡す。
また、予測モード判定部32は、符号化された動画像データに含まれるヘッダ情報から、復号対象ピクチャの着目するマクロブロックに対して適用された予測モードを特定する(ステップS202)。そして予測モード判定部32は、着目するマクロブロックに対して適用された予測モードを予測画像生成部37へ通知する。
また予測モード判定部32は、適用された予測モードが時間ダイレクトモードか否か判定する(ステップS203)。適用された予測モードが時間ダイレクトモードである場合(ステップS203−Yes)、予測モード判定部32は、ピクチャ間隔比較部34、基準ベクトル決定部35及びダイレクト動きベクトル計算部36に、時間ダイレクトモード用の動きベクトルを求めさせる。
FIG. 10 is an operation flowchart of a video decoding process executed by the
The variable
Also, the prediction
Moreover, the prediction
そこでピクチャ間隔比較部34は、動きベクトル記憶部39から、着目するマクロブロックと参照ピクチャ上の対応する位置にある参照ブロックを参照元とする動きベクトルを読み出し、その動きベクトルを基準候補ベクトルMV1(Vx1,Vy1)とする。そしてピクチャ間隔比較部34は、基準候補ベクトルMV1(Vx1,Vy1)の参照元の参照ピクチャ及び参照先の過去参照ピクチャ間の時間間隔tdを算出する(ステップS204)。また、ピクチャ間隔比較部34は、着目するマクロブロックが含まれる復号対象ピクチャと過去参照ピクチャ間の時間間隔tbあるいは復号対象ピクチャと参照ピクチャ間の時間間隔tb2を算出する(ステップS205)。そしてピクチャ間隔比較部34は、時間間隔tbあるいはtb2が時間間隔tdよりも長いか否か判定する(ステップS206)。そしてピクチャ間隔比較部34は、時間間隔tbあるいはtb2が時間間隔tdよりも長いか否かの判定結果を基準ベクトル決定部35に通知する。
Therefore, the picture
時間間隔tb及びtb2が時間間隔tdよりも短い場合(ステップS206−No)、基準ベクトル決定部35は、基準候補ベクトルMV1(Vx1,Vy1)を基準ベクトルmvCol(Vx,Vy)とする(ステップS207)。
一方、時間間隔tbあるいはtb2が時間間隔tdよりも長い場合(ステップS206−Yes)、基準ベクトル決定部35は、基準候補ベクトルMV1(Vx1,Vy1)の参照先のマクロブロックについての動きベクトルMV2(Vx2,Vy2)に基づいて基準ベクトルmvCol(Vx,Vy)を算出する(ステップS208)。具体的には、基準ベクトル決定部35は、(2)式または(4)式に従って基準ベクトルmvCol(Vx,Vy)を算出する。また、参照ブロックを基準候補ベクトルMV1(Vx1,Vy1)を用いて動き補償することにより得られる移動ブロックが、過去参照ピクチャ上の何れのマクロブロックとも完全に一致しないことがある。この場合、基準ベクトル決定部35は、過去参照ピクチャ上の複数のマクロブロックのうち、移動ブロックの中心位置が含まれるマクロブロックの動きベクトルを動きベクトルMV2(Vx2,Vy2)とする。基準ベクトル決定部35は、過去参照ピクチャ上の複数のマクロブロックのうち、移動ブロックと少なくとも一部が重なる領域を持つマクロブロックの動きベクトルを、その領域の面積に応じて加重平均することにより、動きベクトルMV2(Vx2,Vy2)を求めてもよい。
また、参照ブロックが複数のサブブロックに分割されている場合、基準ベクトル決定部35は、サブブロックごとに基準ベクトルを求める。
ステップS207またはS208の後、基準ベクトル決定部35は、求めた基準ベクトル及び基準ベクトルの参照先及び参照元のピクチャの番号をダイレクト動きベクトル計算部36へ渡す。
When the time intervals tb and tb2 are shorter than the time interval td (step S206—No), the reference
On the other hand, when the time interval tb or tb2 is longer than the time interval td (step S206—Yes), the reference
When the reference block is divided into a plurality of sub-blocks, the reference
After step S207 or S208, the reference
ダイレクト動きベクトル計算部36は、基準ベクトルの参照先及び参照元のピクチャ間の時間間隔tdと、復号対象ピクチャと基準ベクトルの参照先のピクチャ間の時間間隔tbを算出する。そしてダイレクト動きベクトル計算部36は、基準ベクトルと、時間間隔tbとtdとの比(tb/td)を(1)式に入力することにより、二つの動きベクトルを算出する(ステップS209)。ダイレクト動きベクトル計算部36は、求めた二つの動きベクトルを予測画像生成部37へ渡す。
The direct motion
ステップS209の後、あるいは適用された予測モードが時間ダイレクトモードでない場合(ステップS203−No)、予測画像生成部37は、記憶部39から、既に復号されたピクチャを参照画像として読み出す。そして予測画像生成部37は、参照画像に基づいて、着目マクロブロックについて適用された予測モードに応じた予測画像を生成する(ステップS210)。予測画像生成部37は、生成した予測画像を復号部38へ渡す。
After step S209 or when the applied prediction mode is not the temporal direct mode (step S203—No), the predicted
復号部38は、量子化信号を逆量子化及び逆直交変換して得られた各画素の予測誤差信号を、予測画像の各画素に加えることにより着目マクロブロックを再生する(ステップS211)。そして復号部38は、再生された着目マクロブロックをマクロブロックの符号化順序に従って順次結合することにより、ピクチャを再生する(ステップS212)。復号部38は、再生したピクチャを記憶部39に記憶する。
結合部40は、再生されたピクチャを時間順に並べ替えて出力する。
そして動画像復号装置3は、動画像復号処理を終了する。
The
The combining
Then, the moving
なお、動画像符号化装置1の各部の機能をプロセッサ上で実行可能なコンピュータプログラムは、コンピュータによって読み取り可能な媒体に記録された形で提供されてもよい。同様に、動画像復号装置3の各部の機能をプロセッサ上で実行可能なコンピュータプログラムは、コンピュータによって読み取り可能な媒体に記録された形で提供されてもよい。
Note that the computer program capable of executing the functions of the respective units of the moving
ここに挙げられた全ての例及び特定の用語は、読者が、本発明及び当該技術の促進に対する本発明者により寄与された概念を理解することを助ける、教示的な目的において意図されたものであり、本発明の優位性及び劣等性を示すことに関する、本明細書の如何なる例の構成、そのような特定の挙げられた例及び条件に限定しないように解釈されるべきものである。本発明の実施形態は詳細に説明されているが、本発明の精神及び範囲から外れることなく、様々な変更、置換及び修正をこれに加えることが可能であることを理解されたい。 All examples and specific terms listed herein are intended for instructional purposes to help the reader understand the concepts contributed by the inventor to the present invention and the promotion of the technology. It should be construed that it is not limited to the construction of any example herein, such specific examples and conditions, with respect to showing the superiority and inferiority of the present invention. Although embodiments of the present invention have been described in detail, it should be understood that various changes, substitutions and modifications can be made thereto without departing from the spirit and scope of the present invention.
以上説明した実施形態及びその変形例に関し、更に以下の付記を開示する。
(付記1)
動画像データに含まれるピクチャを動き補償を用いて符号化する動画像符号化装置であって、
前記動画像データに含まれる複数の符号化済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部と、
前記符号化済みピクチャのうちの第1の参照ピクチャ上で、前記動画像データに含まれる符号化対象ピクチャを分割した複数のブロックのうちの第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして前記記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記符号化対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定するピクチャ間隔比較部と、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、一方、前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出する基準ベクトル決定部と、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記符号化対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出するダイレクト動きベクトル計算部と、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成する予測画像生成部と、
前記予測画像と前記第1のブロックの対応する画素の差を表す誤差信号を符号化する符号化部と、
を有する動画像符号化装置。
(付記2)
前記基準ベクトル決定部は、前記第1の時間間隔が前記第2の時間間隔よりも長い場合、前記基準候補ベクトルに前記第2の動きベクトルを加算することにより、前記基準ベクトルを算出する、付記1に記載の動画像符号化装置。
(付記3)
前記基準ベクトル決定部は、前記第1の時間間隔が前記第2の時間間隔よりも長い場合、前記第2の動きベクトルに、前記第1の時間間隔に対する前記第3の参照ピクチャと前記第1の参照ピクチャ間の時間間隔の比を乗じることにより、前記基準ベクトルを算出する、付記1に記載の動画像符号化装置。
(付記4)
前記時間間隔比較部は、前記第1の参照ピクチャ及び前記第2の参照ピクチャが同一フレームに含まれるフィールドである場合、前記第1の時間間隔が前記第2の時間間隔よりも長いと判定する、付記1〜3の何れか一項に記載の動画像符号化装置。
(付記5)
前記時間間隔比較部は、前記第1の参照ピクチャと前記第2の参照ピクチャの両方が、前記符号化対象ピクチャよりも時間的に後のピクチャである場合、または前記第1の参照ピクチャと前記第2の参照ピクチャの両方が、前記符号化対象ピクチャよりも時間的に前のピクチャである場合、前記第1の時間間隔が前記第2の時間間隔よりも長いと判定する、付記1〜3の何れか一項に記載の動画像符号化装置。
(付記6)
前記基準ベクトル決定部は、前記第1の時間間隔が前記第2の時間間隔よりも長い場合、前記第1の参照ブロックを前記基準候補ベクトルで空間的に移動させた移動ブロックの中心位置が含まれる、前記第2の参照ピクチャ上のブロックを、前記第2の参照ブロックとする、付記1〜5の何れか一項に記載の動画像符号化装置。
(付記7)
前記基準ベクトル決定部は、前記第1の時間間隔が前記第2の時間間隔よりも長い場合、前記第1の参照ブロックを前記基準候補ベクトルで空間的に移動させた移動ブロックと重なる領域を持つ、前記第2の参照ピクチャ上の複数のブロックのそれぞれについての動きベクトルを前記記憶部から読み出し、読み出したそれぞれの動きベクトルを、当該動きベクトルに対応するブロックと前記移動ブロックとが重なる領域の面積に応じて加重平均することにより、前記第2の動きベクトルを算出する、付記1〜5の何れか一項に記載の動画像符号化装置。
(付記8)
動画像データに含まれるピクチャを動き補償を用いて符号化する動画像符号化方法であって、
前記動画像データに含まれる符号化済みピクチャのうちの第1の参照ピクチャ上で、前記動画像データに含まれる符号化対象ピクチャを分割した複数のブロックのうちの第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして、前記動画像データに含まれる複数の符号化済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記符号化対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、
前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出し、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記符号化対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成し、
前記予測画像と前記第1のブロックの対応する画素の差を表す誤差信号を符号化する、
ことを含む動画像符号化方法。
(付記9)
動画像データに含まれるピクチャを動き補償を用いて符号化する動画像符号化用コンピュータプログラムであって、
前記動画像データに含まれる符号化済みピクチャのうちの第1の参照ピクチャ上で、前記動画像データに含まれる符号化対象ピクチャを分割した複数のブロックのうちの第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして、前記動画像データに含まれる複数の符号化済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記符号化対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、
前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出し、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記符号化対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成し、
前記予測画像と前記第1のブロックの対応する画素の差を表す誤差信号を符号化する、
ことをコンピュータに実行させるコンピュータプログラム。
(付記10)
符号化された動画像データを復号する動画像復号装置であって、
前記動画像データに含まれる、複数の復号済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部と、
前記動画像データに含まれる復号対象ピクチャを分割した複数のブロックのうちの第1のブロックに対応する符号化データを可変長復号することにより、前記第1のブロックに対応する量子化信号を再生する可変長復号部と、
前記復号済みピクチャのうちの第1の参照ピクチャ上で、前記第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして前記記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記復号対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定するピクチャ間隔比較部と、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、一方、前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出する基準ベクトル決定部と、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記復号対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出するダイレクト動きベクトル計算部と、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成する予測画像生成部と、
前記第1のブロックについての前記量子化信号を逆量子化及び逆直交変換することにより前記第1のブロックに含まれる各画素の予測誤差信号を再生し、当該各画素の予測誤差信号を前記予測画像の対応する画素の値に加算することにより、前記第1のブロックを再生する復号部と、
を有する動画像復号装置。
(付記11)
符号化された動画像データを復号する動画像復号方法であって、
前記動画像データに含まれる、複数の復号済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶部に記憶させ、
前記動画像データに含まれる復号対象ピクチャを分割した複数のブロックのうちの第1のブロックに対応する符号化データを可変長復号することにより、前記第1のブロックに対応する量子化信号を再生し、
前記復号済みピクチャのうちの第1の参照ピクチャ上で、前記第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして前記記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記復号対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、
前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出し、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記復号対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成し、
前記第1のブロックについての前記量子化信号を逆量子化及び逆直交変換することにより前記第1のブロックに含まれる各画素の予測誤差信号を再生し、当該各画素の予測誤差信号を前記予測画像の対応する画素の値に加算することにより、前記第1のブロックを再生する、
ことを含む動画像復号方法。
(付記12)
符号化された動画像データを復号する動画像復号用コンピュータプログラムであって、
前記動画像データに含まれる、複数の復号済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶部に記憶させ、
前記動画像データに含まれる復号対象ピクチャを分割した複数のブロックのうちの第1のブロックに対応する符号化データを可変長復号することにより、前記第1のブロックに対応する量子化信号を再生し、
前記復号済みピクチャのうちの第1の参照ピクチャ上で、前記第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして前記記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記復号対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、
前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出し、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記復号対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成し、
前記第1のブロックについての前記量子化信号を逆量子化及び逆直交変換することにより前記第1のブロックに含まれる各画素の予測誤差信号を再生し、当該各画素の予測誤差信号を前記予測画像の対応する画素の値に加算することにより、前記第1のブロックを再生する、
ことをコンピュータに実行させるコンピュータプログラム。
The following supplementary notes are further disclosed regarding the embodiment described above and its modifications.
(Appendix 1)
A moving image encoding apparatus that encodes a picture included in moving image data using motion compensation,
A storage unit for storing motion compensation motion vectors obtained for each of a plurality of encoded pictures included in the moving image data;
A first reference at a position corresponding to a first block among a plurality of blocks obtained by dividing a picture to be encoded included in the moving image data on a first reference picture of the encoded pictures A first motion vector having a block as a reference source is read from the storage unit as a reference candidate vector, and a second reference picture including the second reference block that is a reference destination of the reference candidate vector or the first reference A picture interval comparison unit for determining whether a first time interval between a picture and the encoding target picture is longer than a second time interval between the first reference picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is set as a reference picture of the reference vector, and when the first time interval is longer than the second time interval, the second reference picture is set as a reference source. The motion vector is read from the storage unit, the third reference picture including the reference destination block of the second motion vector is set as the reference destination picture, and the first reference picture is set as the reference source picture. A reference vector determining unit for calculating a reference vector;
By dividing the reference vector according to a ratio of a time interval between the reference destination picture and the encoding target picture with respect to a time interval between the reference destination picture and the reference source picture, a first vector for the first block is divided. A direct motion vector calculator for calculating the first and second direct motion vectors;
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. A prediction image generation unit that generates a motion compensation image and generates a prediction image for the first block based on the first motion compensation image and the second motion compensation image;
An encoding unit that encodes an error signal representing a difference between corresponding pixels of the predicted image and the first block;
A moving picture encoding apparatus having:
(Appendix 2)
The reference vector determination unit calculates the reference vector by adding the second motion vector to the reference candidate vector when the first time interval is longer than the second time interval. The moving image encoding apparatus according to 1.
(Appendix 3)
When the first time interval is longer than the second time interval, the reference vector determination unit includes, as the second motion vector, the third reference picture for the first time interval and the first time interval. The moving picture coding apparatus according to
(Appendix 4)
The time interval comparison unit determines that the first time interval is longer than the second time interval when the first reference picture and the second reference picture are fields included in the same frame. The moving image encoding device according to any one of
(Appendix 5)
The time interval comparison unit may be configured such that when both the first reference picture and the second reference picture are temporally later than the encoding target picture, or the first reference picture and the second reference picture
(Appendix 6)
If the first time interval is longer than the second time interval, the reference vector determination unit includes a center position of a moving block obtained by spatially moving the first reference block by the reference candidate vector. The moving picture encoding device according to any one of
(Appendix 7)
When the first time interval is longer than the second time interval, the reference vector determination unit has an area overlapping with a moving block obtained by spatially moving the first reference block by the reference candidate vector. The motion vector for each of the plurality of blocks on the second reference picture is read from the storage unit, and the area of the area where the block corresponding to the motion vector and the moving block overlap each other is read out. The moving image encoding apparatus according to any one of
(Appendix 8)
A video encoding method for encoding a picture included in video data using motion compensation,
A position corresponding to the first block of the plurality of blocks obtained by dividing the picture to be encoded included in the moving image data on the first reference picture of the encoded pictures included in the moving image data The motion compensation motion vector obtained for each of a plurality of encoded pictures included in the moving image data is stored using the first motion vector having the first reference block in the reference source as a reference candidate vector. The first reference interval including the second reference block including the second reference block that is the reference destination of the reference candidate vector, or the first time interval between the first reference picture and the encoding target picture is, Determining whether it is longer than a second time interval between the first reference picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is a reference picture of the reference vector,
When the first time interval is longer than the second time interval, a second motion vector having the second reference block as a reference source is read from the storage unit, and the second motion vector is referred to Calculating the reference vector with the third reference picture including the previous block as the reference destination picture, and with the first reference picture as the reference source picture;
By dividing the reference vector according to a ratio of a time interval between the reference destination picture and the encoding target picture with respect to a time interval between the reference destination picture and the reference source picture, a first vector for the first block is divided. Calculating the first and second direct motion vectors;
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. Creating a motion compensated image, generating a predicted image for the first block based on the first motion compensated image and the second motion compensated image;
Encoding an error signal representing a difference between corresponding pixels of the predicted image and the first block;
A moving picture encoding method including the above.
(Appendix 9)
A moving image coding computer program for coding a picture included in moving image data using motion compensation,
A position corresponding to the first block of the plurality of blocks obtained by dividing the picture to be encoded included in the moving image data on the first reference picture of the encoded pictures included in the moving image data The motion compensation motion vector obtained for each of a plurality of encoded pictures included in the moving image data is stored using the first motion vector having the first reference block in the reference source as a reference candidate vector. The first reference interval including the second reference block including the second reference block that is the reference destination of the reference candidate vector, or the first time interval between the first reference picture and the encoding target picture is, Determining whether it is longer than a second time interval between the first reference picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is a reference picture of the reference vector,
When the first time interval is longer than the second time interval, a second motion vector having the second reference block as a reference source is read from the storage unit, and the second motion vector is referred to Calculating the reference vector with the third reference picture including the previous block as the reference destination picture, and with the first reference picture as the reference source picture;
By dividing the reference vector according to a ratio of a time interval between the reference destination picture and the encoding target picture with respect to a time interval between the reference destination picture and the reference source picture, a first vector for the first block is divided. Calculating the first and second direct motion vectors;
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. Creating a motion compensated image, generating a predicted image for the first block based on the first motion compensated image and the second motion compensated image;
Encoding an error signal representing a difference between corresponding pixels of the predicted image and the first block;
A computer program that causes a computer to execute.
(Appendix 10)
A video decoding device for decoding encoded video data, comprising:
A storage unit for storing motion compensation motion vectors obtained for each of a plurality of decoded pictures included in the moving image data;
Reproducing the quantized signal corresponding to the first block by variable-length decoding the encoded data corresponding to the first block among a plurality of blocks obtained by dividing the decoding target picture included in the moving image data A variable length decoding unit,
On the first reference picture of the decoded pictures, the first motion vector having the first reference block at the position corresponding to the first block as a reference source is used as a reference candidate vector from the storage unit. The first reference interval between the first reference picture and the decoding target picture that is read and includes the second reference block that is the reference destination of the reference candidate vector is the first reference A picture interval comparison unit that determines whether or not a picture is longer than a second time interval between the picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is set as a reference picture of the reference vector, and when the first time interval is longer than the second time interval, the second reference picture is set as a reference source. The motion vector is read from the storage unit, the third reference picture including the reference destination block of the second motion vector is set as the reference destination picture, and the first reference picture is set as the reference source picture. A reference vector determining unit for calculating a reference vector;
The first vector for the first block is divided by dividing the reference vector according to a ratio of a time interval between the reference picture and the decoding target picture with respect to a time interval between the reference picture and the reference picture. And a direct motion vector calculation unit for calculating a second direct motion vector;
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. A prediction image generation unit that generates a motion compensation image and generates a prediction image for the first block based on the first motion compensation image and the second motion compensation image;
By dequantizing and inverse orthogonal transforming the quantized signal for the first block, the prediction error signal of each pixel included in the first block is reproduced, and the prediction error signal of each pixel is predicted. A decoding unit that reproduces the first block by adding to the value of the corresponding pixel of the image;
A video decoding device comprising:
(Appendix 11)
A video decoding method for decoding encoded video data, comprising:
A motion compensation motion vector obtained for each of a plurality of decoded pictures included in the moving image data is stored in a storage unit;
Reproducing the quantized signal corresponding to the first block by variable-length decoding the encoded data corresponding to the first block among a plurality of blocks obtained by dividing the decoding target picture included in the moving image data And
On the first reference picture of the decoded pictures, the first motion vector having the first reference block at the position corresponding to the first block as a reference source is used as a reference candidate vector from the storage unit. The first reference interval between the first reference picture and the decoding target picture that is read and includes the second reference block that is the reference destination of the reference candidate vector is the first reference Determining whether it is longer than a second time interval between a picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is a reference picture of the reference vector,
When the first time interval is longer than the second time interval, a second motion vector having the second reference block as a reference source is read from the storage unit, and the second motion vector is referred to Calculating the reference vector with the third reference picture including the previous block as the reference destination picture, and with the first reference picture as the reference source picture;
The first vector for the first block is divided by dividing the reference vector according to a ratio of a time interval between the reference picture and the decoding target picture with respect to a time interval between the reference picture and the reference picture. And a second direct motion vector,
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. Creating a motion compensated image, generating a predicted image for the first block based on the first motion compensated image and the second motion compensated image;
By dequantizing and inverse orthogonal transforming the quantized signal for the first block, the prediction error signal of each pixel included in the first block is reproduced, and the prediction error signal of each pixel is predicted. Regenerating the first block by adding to the value of the corresponding pixel of the image;
A moving picture decoding method.
(Appendix 12)
A moving picture decoding computer program for decoding encoded moving picture data,
A motion compensation motion vector obtained for each of a plurality of decoded pictures included in the moving image data is stored in a storage unit;
Reproducing the quantized signal corresponding to the first block by variable-length decoding the encoded data corresponding to the first block among a plurality of blocks obtained by dividing the decoding target picture included in the moving image data And
On the first reference picture of the decoded pictures, the first motion vector having the first reference block at the position corresponding to the first block as a reference source is used as a reference candidate vector from the storage unit. The first reference interval between the first reference picture and the decoding target picture that is read and includes the second reference block that is the reference destination of the reference candidate vector is the first reference Determining whether it is longer than a second time interval between a picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is a reference picture of the reference vector,
When the first time interval is longer than the second time interval, a second motion vector having the second reference block as a reference source is read from the storage unit, and the second motion vector is referred to Calculating the reference vector with the third reference picture including the previous block as the reference destination picture, and with the first reference picture as the reference source picture;
The first vector for the first block is divided by dividing the reference vector according to a ratio of a time interval between the reference picture and the decoding target picture with respect to a time interval between the reference picture and the reference picture. And a second direct motion vector,
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. Creating a motion compensated image, generating a predicted image for the first block based on the first motion compensated image and the second motion compensated image;
By dequantizing and inverse orthogonal transforming the quantized signal for the first block, the prediction error signal of each pixel included in the first block is reproduced, and the prediction error signal of each pixel is predicted. Regenerating the first block by adding to the value of the corresponding pixel of the image;
A computer program that causes a computer to execute.
1 動画像符号化装置
10 符号化部
11 予測誤差信号生成部
12 直交変換・量子化部
13 可変長符号化部
14 復号部
15 参照画像記憶部
16 動きベクトル計算部
17 動きベクトル記憶部
18 ピクチャ間隔比較部
19 基準ベクトル決定部
20 ダイレクト動きベクトル計算部
21 予測モード判定部
22 予測画像生成部
3 動画像復号装置
31 可変長符号化部
32 予測モード判定部
33 動きベクトル記憶部
34 ピクチャ間隔比較部
35 基準ベクトル決定部
36 ダイレクト動きベクトル計算部
37 予測画像生成部
38 復号部
39 記憶部
40 結合部
DESCRIPTION OF
Claims (8)
前記動画像データに含まれる複数の符号化済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部と、
前記符号化済みピクチャのうちの第1の参照ピクチャ上で、前記動画像データに含まれる符号化対象ピクチャを分割した複数のブロックのうちの第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして前記記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記符号化対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定するピクチャ間隔比較部と、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、一方、前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出する基準ベクトル決定部と、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記符号化対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出するダイレクト動きベクトル計算部と、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成する予測画像生成部と、
前記予測画像と前記第1のブロックの対応する画素の差を表す誤差信号を符号化する符号化部と、
を有する動画像符号化装置。 A moving image encoding apparatus that encodes a picture included in moving image data using motion compensation,
A storage unit for storing motion compensation motion vectors obtained for each of a plurality of encoded pictures included in the moving image data;
A first reference at a position corresponding to a first block among a plurality of blocks obtained by dividing a picture to be encoded included in the moving image data on a first reference picture of the encoded pictures A first motion vector having a block as a reference source is read from the storage unit as a reference candidate vector, and a second reference picture including the second reference block that is a reference destination of the reference candidate vector or the first reference A picture interval comparison unit for determining whether a first time interval between a picture and the encoding target picture is longer than a second time interval between the first reference picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is set as a reference picture of the reference vector, and when the first time interval is longer than the second time interval, the second reference picture is set as a reference source. The motion vector is read from the storage unit, the third reference picture including the reference destination block of the second motion vector is set as the reference destination picture, and the first reference picture is set as the reference source picture. A reference vector determining unit for calculating a reference vector;
By dividing the reference vector according to a ratio of a time interval between the reference destination picture and the encoding target picture with respect to a time interval between the reference destination picture and the reference source picture, a first vector for the first block is divided. A direct motion vector calculator for calculating the first and second direct motion vectors;
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. A prediction image generation unit that generates a motion compensation image and generates a prediction image for the first block based on the first motion compensation image and the second motion compensation image;
An encoding unit that encodes an error signal representing a difference between corresponding pixels of the predicted image and the first block;
A moving picture encoding apparatus having:
前記動画像データに含まれる符号化済みピクチャのうちの第1の参照ピクチャ上で、前記動画像データに含まれる符号化対象ピクチャを分割した複数のブロックのうちの第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして、前記動画像データに含まれる複数の符号化済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記符号化対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、
前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出し、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記符号化対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成し、
前記予測画像と前記第1のブロックの対応する画素の差を表す誤差信号を符号化する、
ことを含む動画像符号化方法。 A video encoding method for encoding a picture included in video data using motion compensation,
A position corresponding to the first block of the plurality of blocks obtained by dividing the picture to be encoded included in the moving image data on the first reference picture of the encoded pictures included in the moving image data The motion compensation motion vector obtained for each of a plurality of encoded pictures included in the moving image data is stored using the first motion vector having the first reference block in the reference source as a reference candidate vector. The first reference interval including the second reference block including the second reference block that is the reference destination of the reference candidate vector, or the first time interval between the first reference picture and the encoding target picture is, Determining whether it is longer than a second time interval between the first reference picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is a reference picture of the reference vector,
When the first time interval is longer than the second time interval, a second motion vector having the second reference block as a reference source is read from the storage unit, and the second motion vector is referred to Calculating the reference vector with the third reference picture including the previous block as the reference destination picture, and with the first reference picture as the reference source picture;
By dividing the reference vector according to a ratio of a time interval between the reference destination picture and the encoding target picture with respect to a time interval between the reference destination picture and the reference source picture, a first vector for the first block is divided. Calculating the first and second direct motion vectors;
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. Creating a motion compensated image, generating a predicted image for the first block based on the first motion compensated image and the second motion compensated image;
Encoding an error signal representing a difference between corresponding pixels of the predicted image and the first block;
A moving picture encoding method including the above.
前記動画像データに含まれる、複数の復号済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶する記憶部と、
前記動画像データに含まれる復号対象ピクチャを分割した複数のブロックのうちの第1のブロックに対応する符号化データを可変長復号することにより、前記第1のブロックに対応する量子化信号を再生する可変長復号部と、
前記復号済みピクチャのうちの第1の参照ピクチャ上で、前記第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして前記記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記復号対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定するピクチャ間隔比較部と、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、一方、前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出する基準ベクトル決定部と、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記復号対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出するダイレクト動きベクトル計算部と、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成する予測画像生成部と、
前記第1のブロックについての前記量子化信号を逆量子化及び逆直交変換することにより前記第1のブロックに含まれる各画素の予測誤差信号を再生し、当該各画素の予測誤差信号を前記予測画像の対応する画素の値に加算することにより、前記第1のブロックを再生する復号部と、
を有する動画像復号装置。 A video decoding device for decoding encoded video data, comprising:
A storage unit for storing motion compensation motion vectors obtained for each of a plurality of decoded pictures included in the moving image data;
Reproducing the quantized signal corresponding to the first block by variable-length decoding the encoded data corresponding to the first block among a plurality of blocks obtained by dividing the decoding target picture included in the moving image data A variable length decoding unit,
On the first reference picture of the decoded pictures, the first motion vector having the first reference block at the position corresponding to the first block as a reference source is used as a reference candidate vector from the storage unit. The first reference interval between the first reference picture and the decoding target picture that is read and includes the second reference block that is the reference destination of the reference candidate vector is the first reference A picture interval comparison unit that determines whether or not a picture is longer than a second time interval between the picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is set as a reference picture of the reference vector, and when the first time interval is longer than the second time interval, the second reference picture is set as a reference source. The motion vector is read from the storage unit, the third reference picture including the reference destination block of the second motion vector is set as the reference destination picture, and the first reference picture is set as the reference source picture. A reference vector determining unit for calculating a reference vector;
The first vector for the first block is divided by dividing the reference vector according to a ratio of a time interval between the reference picture and the decoding target picture with respect to a time interval between the reference picture and the reference picture. And a direct motion vector calculation unit for calculating a second direct motion vector;
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. A prediction image generation unit that generates a motion compensation image and generates a prediction image for the first block based on the first motion compensation image and the second motion compensation image;
By dequantizing and inverse orthogonal transforming the quantized signal for the first block, the prediction error signal of each pixel included in the first block is reproduced, and the prediction error signal of each pixel is predicted. A decoding unit that reproduces the first block by adding to the value of the corresponding pixel of the image;
A video decoding device comprising:
前記動画像データに含まれる、複数の復号済みピクチャのそれぞれについて求められた動き補償用の動きベクトルを記憶部に記憶させ、
前記動画像データに含まれる復号対象ピクチャを分割した複数のブロックのうちの第1のブロックに対応する符号化データを可変長復号することにより、前記第1のブロックに対応する量子化信号を再生し、
前記復号済みピクチャのうちの第1の参照ピクチャ上で、前記第1のブロックと対応する位置にある第1の参照ブロックを参照元とする第1の動きベクトルを基準候補ベクトルとして前記記憶部から読み出し、当該基準候補ベクトルの参照先である第2の参照ブロックが含まれる第2の参照ピクチャまたは前記第1の参照ピクチャと前記復号対象ピクチャ間の第1の時間間隔が、前記第1の参照ピクチャと前記第2の参照ピクチャ間の第2の時間間隔よりも長いか否か判定し、
前記第1の時間間隔が前記第2の時間間隔よりも短い場合に、前記基準候補ベクトルを前記第1のブロックに対する基準ベクトルとし、かつ前記第1の参照ピクチャを当該基準ベクトルの参照元ピクチャ、前記第2の参照ピクチャを当該基準ベクトルの参照先ピクチャとし、
前記第1の時間間隔が前記第2の時間間隔よりも長い場合に、前記第2の参照ブロックを参照元とする第2の動きベクトルを前記記憶部から読み出し、当該第2の動きベクトルの参照先のブロックが含まれる第3の参照ピクチャを前記参照先ピクチャとし、前記第1の参照ピクチャを前記参照元ピクチャとする前記基準ベクトルを算出し、
前記基準ベクトルを、前記参照先ピクチャと前記参照元ピクチャ間の時間間隔に対する前記参照先ピクチャと前記復号対象ピクチャ間の時間間隔の比に応じて分割することにより、前記第1のブロックに対する第1及び第2のダイレクト動きベクトルを算出し、
前記第1のダイレクト動きベクトルに従って前記参照先ピクチャを動き補償することにより第1の動き補償画像を作成するとともに、前記第2のダイレクト動きベクトルに従って前記参照元ピクチャを動き補償することにより第2の動き補償画像を作成し、前記第1の動き補償画像と前記第2の動き補償画像に基づいて前記第1のブロックに対する予測画像を生成し、
前記第1のブロックについての前記量子化信号を逆量子化及び逆直交変換することにより前記第1のブロックに含まれる各画素の予測誤差信号を再生し、当該各画素の予測誤差信号を前記予測画像の対応する画素の値に加算することにより、前記第1のブロックを再生する、
ことを含む動画像復号方法。 A video decoding method for decoding encoded video data, comprising:
A motion compensation motion vector obtained for each of a plurality of decoded pictures included in the moving image data is stored in a storage unit;
Reproducing the quantized signal corresponding to the first block by variable-length decoding the encoded data corresponding to the first block among a plurality of blocks obtained by dividing the decoding target picture included in the moving image data And
On the first reference picture of the decoded pictures, the first motion vector having the first reference block at the position corresponding to the first block as a reference source is used as a reference candidate vector from the storage unit. The first reference interval between the first reference picture and the decoding target picture that is read and includes the second reference block that is the reference destination of the reference candidate vector is the first reference Determining whether it is longer than a second time interval between a picture and the second reference picture;
When the first time interval is shorter than the second time interval, the reference candidate vector is set as a reference vector for the first block, and the first reference picture is a reference source picture of the reference vector; The second reference picture is a reference picture of the reference vector,
When the first time interval is longer than the second time interval, a second motion vector having the second reference block as a reference source is read from the storage unit, and the second motion vector is referred to Calculating the reference vector with the third reference picture including the previous block as the reference destination picture, and with the first reference picture as the reference source picture;
The first vector for the first block is divided by dividing the reference vector according to a ratio of a time interval between the reference picture and the decoding target picture with respect to a time interval between the reference picture and the reference picture. And a second direct motion vector,
A first motion compensated image is created by motion compensation of the reference picture according to the first direct motion vector, and a second motion compensation is performed by motion compensating the reference source picture according to the second direct motion vector. Creating a motion compensated image, generating a predicted image for the first block based on the first motion compensated image and the second motion compensated image;
By dequantizing and inverse orthogonal transforming the quantized signal for the first block, the prediction error signal of each pixel included in the first block is reproduced, and the prediction error signal of each pixel is predicted. Regenerating the first block by adding to the value of the corresponding pixel of the image;
A moving picture decoding method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010060855A JP5310614B2 (en) | 2010-03-17 | 2010-03-17 | Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method |
US13/038,491 US8553764B2 (en) | 2010-03-17 | 2011-03-02 | Method and device for encoding moving picture and method and device for decoding moving picture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010060855A JP5310614B2 (en) | 2010-03-17 | 2010-03-17 | Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011199362A JP2011199362A (en) | 2011-10-06 |
JP5310614B2 true JP5310614B2 (en) | 2013-10-09 |
Family
ID=44647233
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010060855A Expired - Fee Related JP5310614B2 (en) | 2010-03-17 | 2010-03-17 | Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method |
Country Status (2)
Country | Link |
---|---|
US (1) | US8553764B2 (en) |
JP (1) | JP5310614B2 (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6034010B2 (en) * | 2011-10-24 | 2016-11-30 | ソニー株式会社 | Encoding apparatus, encoding method, and program |
JP2013102297A (en) * | 2011-11-07 | 2013-05-23 | Canon Inc | Image encoding method, image encoder and program, image decoding method, and image decoder and program |
CN107493474B (en) * | 2011-11-08 | 2021-01-12 | 株式会社Kt | Method for decoding video signal by using decoding device |
JP5979848B2 (en) * | 2011-11-08 | 2016-08-31 | キヤノン株式会社 | Image encoding method, image encoding device and program, image decoding method, image decoding device and program |
US9531990B1 (en) * | 2012-01-21 | 2016-12-27 | Google Inc. | Compound prediction using multiple sources or prediction modes |
US8737824B1 (en) | 2012-03-09 | 2014-05-27 | Google Inc. | Adaptively encoding a media stream with compound prediction |
US9185414B1 (en) | 2012-06-29 | 2015-11-10 | Google Inc. | Video encoding using variance |
US9628790B1 (en) | 2013-01-03 | 2017-04-18 | Google Inc. | Adaptive composite intra prediction for image and video compression |
FR3002062B1 (en) * | 2013-02-14 | 2017-06-23 | Envivio France | SYSTEM AND METHOD FOR DYNAMICALLY REDUCING ENTROPY OF A SIGNAL BEFORE A DATA COMPRESSION DEVICE. |
US9374578B1 (en) | 2013-05-23 | 2016-06-21 | Google Inc. | Video coding using combined inter and intra predictors |
US9609343B1 (en) | 2013-12-20 | 2017-03-28 | Google Inc. | Video coding using compound prediction |
JP6607040B2 (en) * | 2014-01-15 | 2019-11-20 | 日本電気株式会社 | Motion vector search apparatus, motion vector search method, and recording medium for storing motion vector search program |
CN107852500B (en) * | 2015-08-24 | 2020-02-21 | 华为技术有限公司 | Motion vector field encoding method and decoding method, encoding and decoding device |
JP7298266B2 (en) * | 2019-04-19 | 2023-06-27 | 富士通株式会社 | Information processing device, information processing method and information processing program |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2883585B2 (en) | 1991-05-31 | 1999-04-19 | 株式会社東芝 | Moving picture coding apparatus and moving picture coding method |
JP3226020B2 (en) * | 1997-05-28 | 2001-11-05 | 日本電気株式会社 | Motion vector detection device |
CN101715128B (en) * | 2001-11-21 | 2014-01-01 | 摩托罗拉移动有限责任公司 | Method and apparatus of encoding image sequence with a plurality of images |
JP2004208259A (en) * | 2002-04-19 | 2004-07-22 | Matsushita Electric Ind Co Ltd | Motion vector calculating method |
JP3977716B2 (en) * | 2002-09-20 | 2007-09-19 | 株式会社東芝 | Video encoding / decoding method and apparatus |
JP2007067731A (en) * | 2005-08-30 | 2007-03-15 | Sanyo Electric Co Ltd | Coding method |
JP4527677B2 (en) * | 2006-03-15 | 2010-08-18 | 富士通株式会社 | Moving picture coding method, moving picture coding apparatus, moving picture coding program |
JP2009021864A (en) | 2007-07-12 | 2009-01-29 | Canon Inc | Motion vector searching apparatus |
JP4523024B2 (en) * | 2007-08-08 | 2010-08-11 | パナソニック株式会社 | Image coding apparatus and image coding method |
-
2010
- 2010-03-17 JP JP2010060855A patent/JP5310614B2/en not_active Expired - Fee Related
-
2011
- 2011-03-02 US US13/038,491 patent/US8553764B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
US20110228840A1 (en) | 2011-09-22 |
US8553764B2 (en) | 2013-10-08 |
JP2011199362A (en) | 2011-10-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5310614B2 (en) | Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method | |
CN112584173B (en) | Coding and decoding method and equipment thereof | |
JP5373626B2 (en) | Method, apparatus, encoder, decoder, and decoding method for estimating a motion vector using a plurality of motion vector predictors | |
JP4373702B2 (en) | Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, moving picture encoding program, and moving picture decoding program | |
JP5580453B2 (en) | Direct mode encoding and decoding apparatus | |
JP2019115060A (en) | Encoder, encoding method, decoder, decoding method and program | |
JP5052134B2 (en) | Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, and image decoding program | |
JP4898467B2 (en) | Coding mode determination method and apparatus for variable block size motion prediction | |
JP5277257B2 (en) | Video decoding method and video encoding method | |
JP5821542B2 (en) | Video encoding device and video decoding device | |
TWI621351B (en) | Image prediction decoding device, image prediction decoding method and image prediction decoding program | |
JP4527677B2 (en) | Moving picture coding method, moving picture coding apparatus, moving picture coding program | |
JP2004056823A (en) | Motion vector encoding/decoding method and apparatus | |
JP5895469B2 (en) | Video encoding device and video decoding device | |
JP2007329693A (en) | Image encoding device and method | |
JP5983430B2 (en) | Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method | |
JP2011029863A (en) | Decoding processing method | |
JP2009290889A (en) | Motion picture encoder, motion picture decoder, motion picture encoding method, motion picture decoding method, motion picture encoding program, and motion picture decoding program | |
JP5281597B2 (en) | Motion vector prediction method, motion vector prediction apparatus, and motion vector prediction program | |
KR20110134404A (en) | Method for predicting a block of image data, decoding and coding devices implementing said method | |
JP5281596B2 (en) | Motion vector prediction method, motion vector prediction apparatus, and motion vector prediction program | |
JP2015035660A (en) | Image encoder, image encoding method, and image encoding program | |
JP5533885B2 (en) | Moving picture encoding apparatus and moving picture decoding apparatus | |
US20130215966A1 (en) | Image encoding method, image decoding method, image encoding device, image decoding device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130108 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130527 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130604 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130617 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 5310614 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |