JP4519723B2 - Encoding or decoding apparatus for moving image data using motion vectors - Google Patents

Encoding or decoding apparatus for moving image data using motion vectors Download PDF

Info

Publication number
JP4519723B2
JP4519723B2 JP2005187186A JP2005187186A JP4519723B2 JP 4519723 B2 JP4519723 B2 JP 4519723B2 JP 2005187186 A JP2005187186 A JP 2005187186A JP 2005187186 A JP2005187186 A JP 2005187186A JP 4519723 B2 JP4519723 B2 JP 4519723B2
Authority
JP
Japan
Prior art keywords
motion vector
block
motion
macroblock
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005187186A
Other languages
Japanese (ja)
Other versions
JP2007006399A (en
Inventor
和夫 金子
幸二 斉藤
和幸 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2005187186A priority Critical patent/JP4519723B2/en
Publication of JP2007006399A publication Critical patent/JP2007006399A/en
Application granted granted Critical
Publication of JP4519723B2 publication Critical patent/JP4519723B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は,動きベクトルを利用する動画像データの符号化または復号化装置に関し,特に,動きベクトルを格納するメモリとそのメモリ制御部を改良して補正された予測用動きベクトルの生成を容易にした符号化または復号化装置に関する。   The present invention relates to an apparatus for encoding or decoding moving image data using a motion vector, and more particularly to easily generate a motion vector for prediction by improving a memory for storing a motion vector and its memory control unit. The present invention relates to an encoding or decoding apparatus.

動画像データの符号化及び復号化の方式として,MPEG2やH261などが普及している。この動画像データの符号化・復号化の方法によれば,フレームの画像データを16×16のマクロブロックMB単位で処理するとともに,現フレームの画像データを符号化する場合,現フレームの画像データの移動方向を示す動きベクトルと,例えば以前のフレームの画像データとその動きベクトルとから生成した予測画像データと現フレームの画像データとの差分データ(予測誤差データ)とを符号化圧縮する。そして,復号化する時は,再生済みの画像データと現フレームの動きベクトルとから生成される予測画像データに差分データを加算して現フレームの画像データを再生する。再生された画像データはさらにその後のフレームの画像データの再生に利用される。このように,画像データそのものを符号化し圧縮するのではなく,動きベクトルと差分データのみを符号化圧縮することで,符号化データのデータ量を小さくすることができる。また,同じ位置の画像データの差分データを利用するよりも,動画像の動く方向を加味した位置の画像を参照画像データとすることで差分(予測誤差)を小さくすることができ,符号化率を高めることができる。   MPEG2 and H261 are widely used as a method for encoding and decoding moving image data. According to this method of encoding / decoding moving image data, when processing image data of a frame in units of 16 × 16 macroblocks MB and encoding image data of the current frame, the image data of the current frame And a difference vector (prediction error data) between the predicted image data generated from the previous frame image data and the motion vector and the current frame image data, for example, are encoded and compressed. When decoding, the difference data is added to the predicted image data generated from the reproduced image data and the motion vector of the current frame to reproduce the image data of the current frame. The reproduced image data is further used for reproducing image data of subsequent frames. In this way, the amount of encoded data can be reduced by encoding and compressing only the motion vector and the difference data, rather than encoding and compressing the image data itself. In addition, the difference (prediction error) can be reduced by using the image at the position in consideration of the moving direction of the moving image as the reference image data, rather than using the difference data of the image data at the same position. Can be increased.

かかる動画像データの符号化と復号化については,例えば特許文献1,2に記載されている。   Such encoding and decoding of moving image data are described in Patent Documents 1 and 2, for example.

一方,動きベクトルに基づいて予測画像データを生成するにあたり,対象となる現マクロブロックの動きベクトルではなく,参照先マクロブロックの周囲のマクロブロック(候補マクロブロック)の動きベクトルを利用して,それら動きベクトルの中央値を補償された動きベクトルとして算出し,その補償動きベクトルにもとづいて予測画像データを生成することが提案されている。これは,メディアン予測演算と称され,参照先マクロブロックの周囲にある候補マクロブロックの動きベクトルの情報を加味することで,より高精度の動きベクトルを求めることができ,その補償動きベクトルを利用することで差分データ(予測誤差データ)をより小さくし,もって符号化率のより一層の向上を図っている。
特開2000−102016号公報 特開2004−48552号公報
On the other hand, when generating predicted image data based on motion vectors, the motion vectors of the macroblocks (candidate macroblocks) around the reference destination macroblock are used instead of the motion vectors of the current target macroblock. It has been proposed to calculate a median value of motion vectors as a compensated motion vector and generate predicted image data based on the compensated motion vector. This is called a median prediction calculation. By adding information on motion vectors of candidate macroblocks around the reference macroblock, a more accurate motion vector can be obtained and the compensated motion vector is used. By doing so, the difference data (prediction error data) is made smaller, and the coding rate is further improved.
JP 2000-102016 A JP 2004-48552 A

しかしながら,次世代の動画像符号化・復号化方式であるMPEG4やH.263方式では,マクロブロックに2つの動きベクトルを持たせるようにし,動画ベクトルについてより激しいまたは細かい動きへの追従性を高めて,予測誤差を小さくしている。さらに,H.264方式では,マクロブロックに最大で16の動きベクトルを持たせることができ,動きベクトルの持たせ方に応じて,この動き補償用のブロックタイプ(以下MCブロックタイプと称する)は7種類になる。   However, MPEG4 and H.264, which are next-generation video encoding / decoding systems. In the H.263 method, the macroblock is provided with two motion vectors, and the followability to more intense or fine motion is enhanced for the moving image vector, thereby reducing the prediction error. In addition, H. In the H.264 system, a macroblock can have up to 16 motion vectors, and there are seven types of block types for motion compensation (hereinafter referred to as MC block types) depending on how the motion vectors are provided. .

上記のようにマクロブロックによって異なる動き補償用ブロックタイプ(MCブロックタイプ)を有するため,メディアン予測演算時に候補となるブロックの動きベクトルのアドレス管理が複雑化し,処理効率が低下するという課題がある。   Since the motion compensation block type (MC block type) varies depending on the macroblock as described above, there is a problem that the address management of the motion vector of the candidate block at the time of median prediction calculation is complicated and the processing efficiency is lowered.

そこで,本発明の目的は,メディアン予測演算時の候補ブロックの動きベクトルへのアクセスを容易にして処理効率を高めた動画像データの符号化・復号化装置を提供することにある。   Accordingly, an object of the present invention is to provide a moving image data encoding / decoding device that facilitates access to motion vectors of candidate blocks at the time of median prediction calculation and improves processing efficiency.

上記の目的を達成するために,本発明の第1の側面によれば,所定の画素単位からなるマクロブロックに対し,当該マクロブロック内の動画の動きに対応する動きベクトルと,当該動きベクトルにより予測される予測画像データとの差分である予測誤差データとを有する符号化データから,前記動きベクトルに基づく予測画像データを生成し,前記予測誤差データを加算して画像データを再生する動画像データの復号化または符号化装置において,前記マクロブロックに対応して当該マクロブロックの動きベクトルを格納する動きベクトルメモリと,当該マクロブロックに割り当てられた動きベクトルの種類に対応する動き補償ブロックタイプに依存することなく,当該マクロブロックの動きベクトルを最小動き補償ブロック単位で前記動きベクトルメモリに格納し,メディアン予測演算における候補ブロックの動きベクトルを現マクロブロックの動き補償ブロックタイプに応じたアドレスに基づいて前記動きベクトルメモリから読み出すメモリ制御部とを有する。   In order to achieve the above object, according to the first aspect of the present invention, for a macroblock consisting of a predetermined pixel unit, a motion vector corresponding to the motion of a moving image in the macroblock, and the motion vector Moving image data for generating predicted image data based on the motion vector from encoded data having prediction error data that is a difference from predicted image data to be predicted, and adding the prediction error data to reproduce the image data Depends on the motion vector memory that stores the motion vector of the macroblock corresponding to the macroblock and the motion compensation block type corresponding to the type of motion vector assigned to the macroblock Without moving the motion vector of the macroblock in units of the minimum motion compensation block. Stored in Kutorumemori, and a memory controller for reading the motion vector of the candidate block in the median prediction calculation from the motion vector memory based on the address corresponding to the motion compensation block type of the current macroblock.

上記の第1の側面において,好ましい態様では,前記動き補償ブロックタイプは,前記マクロブロックに対して単一の動きベクトルを有する第1のタイプと,前記マクロブロックを細分化した複数の動き補償ブロックに対応して複数の動きベクトルを有する第2のタイプとを少なくとも有し,前記最小動き補償ブロックは,前記第2のタイプでの最小に細分化されうるブロックである。   In the first aspect described above, in a preferred embodiment, the motion compensation block type includes a first type having a single motion vector for the macroblock and a plurality of motion compensation blocks obtained by subdividing the macroblock. At least a second type having a plurality of motion vectors, and the minimum motion compensation block is a block that can be subdivided into a minimum in the second type.

ここで候補ブロックとは,この現マクロブロックの動きベクトルに基づいて特定される参照先マクロブロックの周囲,例えば上,右上,左に位置するマクロブロックである。勧告されている符号化・復号化方式によれば,候補ブロックの動きベクトルを加味して予測用動きベクトルを求めることで,予測画像データとの差分である予測誤差を小さくすることができる。   Here, the candidate blocks are macroblocks located around the reference macroblock specified based on the motion vector of the current macroblock, for example, at the upper, upper right, and left. According to the recommended encoding / decoding method, the prediction error, which is a difference from the predicted image data, can be reduced by obtaining the motion vector for prediction in consideration of the motion vector of the candidate block.

本発明によれば,マクロブロックの動き補償ブロックタイプに依存することなく動きベクトルを最小動き補償ブロック単位で格納するので,メディアン予測演算時の候補ブロックの動きベクトルの読み出しを簡単化でき,処理効率を高めることができる。   According to the present invention, since the motion vector is stored in units of the minimum motion compensation block without depending on the motion compensation block type of the macroblock, the reading of the motion vector of the candidate block at the time of median prediction calculation can be simplified, and the processing efficiency Can be increased.

以下,図面にしたがって本発明の実施の形態について説明する。但し,本発明の技術的範囲はこれらの実施の形態に限定されず,特許請求の範囲に記載された事項とその均等物まで及ぶものである。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the technical scope of the present invention is not limited to these embodiments, but extends to the matters described in the claims and equivalents thereof.

図1は,本実施の形態における動画像データの符号化回路と復号化回路の構成図である。図1(A)の符号化回路において,動画像を構成するフレーム毎の画像データIMGが供給され,符号化データCDが出力される。動きベクトル生成部28は,供給された画像データIMGについて16x16画素からなるマクロブロック毎に動きベクトルMVを生成する。フレームメモリ24には以前のフレームの画像データが格納されており,予測画像作成部26が現フレームの動きベクトルMVと例えば前フレームの画像データとから予測画像データ27を生成する。そして,減算器10が画像データIMGと予測画像データ27の差分データを予測誤差データ11として生成する。この予測誤差データ11は,DCT器12が離散コサイン変換を行い,量子化器14が量子化し,量子化されたデータが可変長符号化器16で可変長符号化され,その符号化圧縮された符号化データCDが復号化回路に供給される。一方,量子化されたデータは,逆量子化器18で逆量子化され,逆DCT器20で逆離散コサイン変換されて復号化され,この復号化された予測誤差データが加算器22で予測画像データ27に加算され,元の画像データがローカル復号画像データとしてフレームメモリ24に格納される。   FIG. 1 is a configuration diagram of a moving image data encoding circuit and a decoding circuit according to the present embodiment. In the encoding circuit of FIG. 1A, image data IMG for each frame constituting a moving image is supplied, and encoded data CD is output. The motion vector generation unit 28 generates a motion vector MV for each macroblock composed of 16 × 16 pixels with respect to the supplied image data IMG. The frame memory 24 stores image data of the previous frame, and the predicted image creation unit 26 generates predicted image data 27 from the motion vector MV of the current frame and, for example, image data of the previous frame. Then, the subtracter 10 generates difference data between the image data IMG and the predicted image data 27 as the prediction error data 11. The prediction error data 11 is subjected to discrete cosine transform by the DCT unit 12, quantized by the quantizer 14, and the quantized data is variable-length encoded by the variable-length encoder 16 and encoded and compressed. The encoded data CD is supplied to the decoding circuit. On the other hand, the quantized data is inversely quantized by the inverse quantizer 18, decoded by inverse discrete cosine transform by the inverse DCT unit 20, and the decoded prediction error data is predicted by the adder 22. The original image data is added to the data 27 and stored in the frame memory 24 as local decoded image data.

一方,図1(B)の符号化回路では,符号化データCDが可変長復号化器30にて復号化される。復号化された予測誤差データ31は逆量子化器32と逆DCT器34でそれぞれ逆量子化及び逆離散コサイン変換される。また,復号化された動きベクトルMVは予測用動きベクトル生成器42に供給される。予測用動きベクトル生成器42は,例えば前フレームのマクロブロック毎または動き補償ブロック(MCブロック)毎に動きベクトルを格納する動きベクトルメモリ44から,動きベクトルMVに対応する参照先マクロブロックの周囲のブロックの動きベクトルMV1,2,3を読み出し,予測用動きベクトルPMVを求める。予測画像作成部38は,この予測用動きベクトルPMVと例えば前フレームの画像データとに基づき,予測画像データ39を生成する。そして,加算器36が復号化された予測誤差データ35と予測画像データ39とを加算して復号化された画像データIMGを出力する。この復号化された画像データIMGはフレームメモリ40に格納され,次のフレームの画像の予測画像生成に利用される。   On the other hand, in the encoding circuit of FIG. 1B, the encoded data CD is decoded by the variable length decoder 30. The decoded prediction error data 31 is subjected to inverse quantization and inverse discrete cosine transform by an inverse quantizer 32 and an inverse DCT unit 34, respectively. The decoded motion vector MV is supplied to the prediction motion vector generator 42. The motion vector generator 42 for prediction uses, for example, a motion vector memory 44 that stores a motion vector for each macroblock or motion compensation block (MC block) of the previous frame, and the surroundings of the reference destination macroblock corresponding to the motion vector MV. The block motion vectors MV1, 2, and 3 are read out to obtain a prediction motion vector PMV. The predicted image creation unit 38 generates predicted image data 39 based on the motion vector for prediction PMV and, for example, image data of the previous frame. Then, the adder 36 adds the decoded prediction error data 35 and the predicted image data 39 and outputs decoded image data IMG. The decoded image data IMG is stored in the frame memory 40 and is used for generating a predicted image of an image of the next frame.

図2は,動きベクトルと予測画像及び予測誤差を説明する図である。図2(A)に示されるように,時刻aにおける画像がその後の時刻bにおいて右方向に移動する場合,その移動情報を動きベクトルmvとして時刻bのマクロブロックに割り当てる。動きベクトルmvは,時刻aの画像のうち時刻bのマクロブロックの画像に最も近い画像の位置に対応して生成される。したがって,動きベクトルmvで再生される予測画像と時刻bでの画像との間には何らかの差分(予測誤差)が生じることになる。したがって,動画像符号化回路は,この動きベクトルと予測誤差データとを符号化する。   FIG. 2 is a diagram for explaining a motion vector, a predicted image, and a prediction error. As shown in FIG. 2A, when the image at time a moves to the right at the subsequent time b, the movement information is assigned to the macroblock at time b as a motion vector mv. The motion vector mv is generated corresponding to the position of the image closest to the macro block image at time b in the image at time a. Therefore, some difference (prediction error) occurs between the predicted image reproduced with the motion vector mv and the image at time b. Therefore, the moving image encoding circuit encodes the motion vector and the prediction error data.

図2(B)に示されるように,復号化回路では,時刻bの画像50を再生するためには,時刻aでの画像において,画像50に対応する位置52から動きベクトルmvに応じた位置54の画像を予測画像とし,その予測画像に予測誤差を加算して画像50を再生する。   As shown in FIG. 2B, in the decoding circuit, in order to reproduce the image 50 at time b, the position corresponding to the motion vector mv from the position 52 corresponding to the image 50 in the image at time a. 54 images are set as predicted images, and a prediction error is added to the predicted images to reproduce the image 50.

図3は,マクロブロックと動きベクトルの関係を示す図である。図3(A)に示されるとおり,フレームの画像56は16×16画素のマクロブロックMBに分割され,各マクロブロックMBに対して矢印で示す動きベクトル情報が与えられる。また,図3(B)に示されるとおり,マクロブロックMBに対して複数の動きベクトル情報が与えられる場合もある。このように,1つのマクロブロックMBを複数のブロックに分割しその分割したブロック毎に動きベクトル情報を与えることで,急激に変化する動画像に追従して符号化を行うことができる。図3(B)の例では,一部のマクロブロックMBは上下のブロックに分割されそれぞれのブロックに動きベクトルが与えられている。それ以外のマクロブロックMBには単一の動きベクトルが与えられる。   FIG. 3 is a diagram illustrating the relationship between macroblocks and motion vectors. As shown in FIG. 3A, the frame image 56 is divided into 16 × 16 pixel macroblocks MB, and motion vector information indicated by arrows is given to the macroblocks MB. In addition, as shown in FIG. 3B, a plurality of pieces of motion vector information may be given to the macroblock MB. As described above, by dividing one macro block MB into a plurality of blocks and giving motion vector information to each of the divided blocks, encoding can be performed following a rapidly changing moving image. In the example of FIG. 3B, some macro blocks MB are divided into upper and lower blocks, and motion vectors are given to the respective blocks. A single motion vector is given to the other macroblocks MB.

図4は,予測用動きベクトルを説明する図である。また,図5は,予測用動きベクトルを利用した復号化処理のフローチャート図である。両図を参照しながら,復号化処理について説明する。図4には,前フレームFMn-1と現フレームFMnが示されている。ここでは,簡単化のために予測画像データが前フレームの画像データから生成されることを前提にしている。   FIG. 4 is a diagram for explaining the motion vector for prediction. FIG. 5 is a flowchart of the decoding process using the motion vector for prediction. The decoding process will be described with reference to both figures. FIG. 4 shows the previous frame FMn-1 and the current frame FMn. Here, for simplification, it is assumed that predicted image data is generated from image data of the previous frame.

今,現フレームのマクロブロックMBの画像を再生するとすると,そのマクロブロックMBの動きベクトルMVに基づいて参照先マクロブロックの位置MMCを求め,当該位置MMCに対応する位置の前フレーム画像の参照マクロブロックRMBを検出する(S10)。そして,前フレームの参照マクロブロックRMBの周囲にある上と右上と左の候補ブロックの動きベクトルMV0,MV2,MV3を動きベクトルメモリから読み出す(S12)。さらに,読み出した3つの動きベクトルMV1,2,3の中央値を予測用動きベクトルPMVとして求める(S14)。そして,この予測用動きベクトルPMVに基づく位置にある前フレームFMn-1のマクロブロックの画像データを予測画像データとし,それに差分データ(予測誤差データ)を加算して現フレームFMnのマクロブロックMBの画像データを再生する(S16)。   Now, when the image of the macro block MB of the current frame is reproduced, the position MMC of the reference macro block is obtained based on the motion vector MV of the macro block MB, and the reference macro of the previous frame image at the position corresponding to the position MMC is obtained. Block RMB is detected (S10). Then, the motion vectors MV0, MV2 and MV3 of the upper, upper right and left candidate blocks around the reference macroblock RMB of the previous frame are read from the motion vector memory (S12). Further, the median value of the three read motion vectors MV1, 2, 3 is obtained as the prediction motion vector PMV (S14). Then, the image data of the macro block of the previous frame FMn−1 located at the position based on the motion vector for prediction PMV is used as the predicted image data, and difference data (prediction error data) is added to the image data to add the macro block MB of the current frame FMn. Image data is reproduced (S16).

図6は,動き補償ブロックタイプを説明する図である。図3(B)で説明したとおり,動画像の符号化・復号化方式には,1つのマクロブロックに複数の動きベクトルを与える場合がある。図6には,H.264方式で採用されている動き補償ブロックタイプ(MCブロックタイプ)を示す。画像信号は16x16画素のマクロブロック60の単位で画像信号メモリ(フレームメモリ)に格納される。それに対して,各マクロブロックには動きベクトルMVが与えられるが,その動きベクトルMVは動き補償ブロックタイプ(MCブロックタイプ)に応じて単一または複数割り当てられる。   FIG. 6 is a diagram for explaining the motion compensation block type. As described with reference to FIG. 3B, in the moving image encoding / decoding method, a plurality of motion vectors may be given to one macroblock. In FIG. The motion compensation block type (MC block type) employed in the H.264 system is shown. The image signal is stored in an image signal memory (frame memory) in units of 16 × 16 pixel macroblocks 60. On the other hand, a motion vector MV is given to each macroblock, and the motion vector MV is assigned as a single or a plurality according to the motion compensation block type (MC block type).

図6に示すMCブロックタイプは,16x16画素に1つの動きベクトルMVが割り当てられるMCブロックタイプ61と,上下16x8画素ブロックにそれぞれ動きベクトルMVが割り当てられるMCブロックタイプ62と,左右8x16画素ブロックにそれぞれ動きベクトルMVが割り当てられるMCブロックタイプ63と,4つの8x8画素ブロックにそれぞれ動きベクトルMVが割り当てられるMCブロックタイプ64と,8つの8x4画素ブロックにそれぞれ動きベクトルMVが割り当てられるMCブロックタイプ65と,8つの4x8画素ブロックにそれぞれ動きベクトルMVが割り当てられるMCブロックタイプ66と,16の4x4画素ブロックにそれぞれ動きベクトルMVが割り当てられるMCブロックタイプ67の7種類ある。MCブロックタイプ67は,最小動き補償ブロック(4x4)毎に動きベクトルが割り当てられる。   The MC block type shown in FIG. 6 is MC block type 61 in which one motion vector MV is assigned to 16 × 16 pixels, MC block type 62 in which motion vectors MV are assigned to upper and lower 16 × 8 pixel blocks, and left and right 8 × 16 pixel blocks, respectively. MC block type 63 to which motion vector MV is assigned, MC block type 64 to which motion vector MV is assigned to each of four 8 × 8 pixel blocks, MC block type 65 to which motion vector MV is assigned to each of eight 8 × 4 pixel blocks, 7 types of MC block type 66 in which motion vector MV is assigned to each of 8 4 × 8 pixel blocks and MC block type 67 in which motion vector MV is assigned to 16 4 × 4 pixel blocks. A. In the MC block type 67, a motion vector is assigned to each minimum motion compensation block (4 × 4).

そのため,動きベクトルメモリに格納される動きベクトルMVの情報は,各マクロブロックのMCブロックタイプに応じて異なる個数になる。これをメモリのアドレス空間で考えると,MCブロックタイプに応じて各マクロブロックの動きベクトル情報の格納アドレス数が1,2,4,8,16個と異なることを意味する。したがって,動きベクトルメモリから候補ブロックの動きベクトルを読み出す場合,MCブロックタイプを考慮して対応するアドレスの動きベクトルを読み出す必要がある。   Therefore, the number of pieces of motion vector MV information stored in the motion vector memory varies depending on the MC block type of each macro block. Considering this in the memory address space, this means that the number of motion vector information storage addresses of each macroblock differs from 1, 2, 4, 8, and 16 according to the MC block type. Therefore, when reading the motion vector of the candidate block from the motion vector memory, it is necessary to read the motion vector of the corresponding address in consideration of the MC block type.

図7は,異なるMCブロックタイプ間の問題点を示す図である。この例では,現マクロブロック70のMCブロックタイプが8×8のブロック毎に動きベクトルmv0〜3を有するものであり,この現マクロブロック70から読み出すべき候補マクロブロック72が16x16のブロックに一つの動きベクトルmv0を有するものとする。この場合,現マクロブロック70の動きベクトルメモリ71には,MCブロックタイプ情報に加えて4つの動きベクトルmv0〜3が格納され,マクロブロック72の動きベクトルメモリ73には,MCブロックタイプ情報に加えて1つの動きベクトルmv0が格納される。   FIG. 7 is a diagram illustrating problems between different MC block types. In this example, the MC block type of the current macroblock 70 has motion vectors mv0 to 3 for each 8 × 8 block, and one candidate macroblock 72 to be read from the current macroblock 70 is one in a 16 × 16 block. Assume that a motion vector mv0 is included. In this case, the motion vector memory 71 of the current macroblock 70 stores four motion vectors mv0-3 in addition to the MC block type information, and the motion vector memory 73 of the macroblock 72 stores the MC block type information. One motion vector mv0 is stored.

現マクロブロック70の動きベクトルmv0〜3の3つのブロックに対して読み出すべき候補マクロブロック72の動きベクトルは全て同じ動きベクトル情報mv0になる。しかし,候補マクロブロック72のMCブロックタイプが異なるタイプの場合は,読み出すべき候補マクロブロックの動きベクトルは異なってくる。つまり,互いのMCブロックタイプに応じて,どの動きベクトルを読み出すべきかをその都度演算により求める必要があり,煩雑な処理が要求される。   The motion vectors of candidate macroblocks 72 to be read for the three blocks of motion vectors mv0-3 of the current macroblock 70 are all the same motion vector information mv0. However, if the MC block type of the candidate macroblock 72 is different, the motion vector of the candidate macroblock to be read is different. That is, it is necessary to calculate which motion vector should be read out in accordance with each MC block type, and complicated processing is required.

図8は,本実施の形態におけるメディアン予測での候補マクロブロックへの参照を示す図である。図7で説明したとおり,現マクロブロックのMCブロックタイプと候補マクロブロックのMCブロックタイプとの組合せにより,候補マクロブロックの参照すべき動きベクトルが異なることを説明する。図8中,MBは現マクロブロック,MB1,2,3は,上,右上,左の候補マクロブロックである。   FIG. 8 is a diagram illustrating reference to candidate macroblocks in median prediction according to the present embodiment. As described with reference to FIG. 7, it will be described that the motion vector to be referred to by the candidate macroblock differs depending on the combination of the MC block type of the current macroblock and the MC block type of the candidate macroblock. In FIG. 8, MB is the current macro block, and MB 1, 2, and 3 are the upper, upper right, and left candidate macro blocks.

図8(a)〜(d)は現マクロブロックMBが4つの8x8ブロックに対応して動きベクトルが割り当てられるMCブロックタイプであり,それぞれ4つの8x8ブロックに対応して参照すべき候補マクロブロックMB1〜3のブロックが太枠で示されている。この場合,上の候補ブロックMB1は16x16ブロックのMCブロックタイプ,右上の候補ブロックMB2は2個の8x16ブロックのMCブロックタイプ,左の候補ブロックMB3は2個の16x8ブロックのMCブロックタイプである。   FIGS. 8A to 8D show MC block types in which a motion vector is assigned to the current macroblock MB corresponding to four 8 × 8 blocks, and candidate macroblock MB1 to be referred to corresponding to four 8 × 8 blocks, respectively. -3 blocks are indicated by thick frames. In this case, the upper candidate block MB1 is an MC block type of 16 × 16 blocks, the upper right candidate block MB2 is two MC block types of 8 × 16 blocks, and the left candidate block MB3 is an MC block type of two 16 × 8 blocks.

図8(a)では,太枠に示されるとおり,現マクロブロックMBのブロック3x0に対して,マクロブロックMB1では1つのブロックの動きベクトルが,MB2では左側の8x16ブロックの動きベクトルが,MB3では上側の16x8ブロックの動きベクトルがそれぞれ読み出される。同様に,図8(b)では,現マクロブロックMBのブロック3x1に対して,マクロブロックMB1では1つのブロックの動きベクトルが,MB2では右側の8x16ブロックの動きベクトルが,MB3では上側の16x8ブロックの動きベクトルがそれぞれ読み出される。図8(c)では,現マクロブロックMBのブロック3x2に対して,マクロブロックMB1では1つのブロックの動きベクトルが,MB2では左側の8x16ブロックの動きベクトルが,MB3では下側の16x8ブロックの動きベクトルがそれぞれ読み出される。そして,図8(d)では,現マクロブロックMBのブロック3x3に対して,マクロブロックMB1では1つのブロックの動きベクトルが,MB2では右側の8x16ブロックの動きベクトルが,MB3では下側の16x8ブロックの動きベクトルがそれぞれ読み出される。   In FIG. 8 (a), as indicated by the thick frame, for the block 3x0 of the current macroblock MB, the motion vector of one block in the macroblock MB1, the motion vector of the left 8x16 block in MB2, and the block in MB3 The motion vectors of the upper 16 × 8 block are read out. Similarly, in FIG. 8B, with respect to the block 3x1 of the current macroblock MB, the motion vector of one block in the macroblock MB1, the motion vector of the right 8x16 block in MB2, and the upper 16x8 block in MB3 Are respectively read out. In FIG. 8C, with respect to the block 3x2 of the current macroblock MB, the motion vector of one block in the macroblock MB1, the motion vector of the left 8x16 block in MB2, and the motion of the lower 16x8 block in MB3 Each vector is read out. In FIG. 8D, with respect to the block 3x3 of the current macroblock MB, the motion vector of one block in the macroblock MB1, the motion vector of the right 8x16 block in MB2, and the lower 16x8 block in MB3 Are respectively read out.

図8(e)は,現マクロブロックMBが16x16ブロックに対応して1つの動きベクトルが割り当てられるMCブロックタイプであり,候補ブロックMB1は4つの8x8ブロック,候補ブロックMB2は上下16x8ブロックのMCブロックタイプであり,候補ブロックMB3は左右8x16ブロックのMCブロックタイプである。この場合,現マクロブロックMBの16x16ブロックに対して,マクロブロックMB1では左下のブロック0x2の動きベクトルが,MB2では下側のブロック1x1の動きベクトルが,MB3では右側のブロック2x1の動きベクトルがそれぞれ読み出される。   FIG. 8E shows an MC block type in which one motion vector is assigned to the current macroblock MB corresponding to 16 × 16 blocks. The candidate block MB1 has four 8 × 8 blocks, and the candidate block MB2 has upper and lower 16 × 8 MC blocks. The candidate block MB3 is an MC block type of 8 × 16 blocks on the left and right. In this case, the motion vector of the lower left block 0x2 in the macro block MB1, the motion vector of the lower block 1x1 in MB2, and the motion vector of the right block 2x1 in MB3 are compared to the 16x16 block of the current macro block MB, respectively. Read out.

図8(f)は,現マクロブロックMBが上下16x8ブロックに対応して2つの動きベクトルが割り当てられるMCブロックタイプであり,候補ブロックMB1は4つの8x8ブロック,候補ブロックMB2は上下16x8ブロックのMCブロックタイプであり,候補ブロックMB3は左右8x16ブロックのMCブロックタイプである。この場合,現マクロブロックMBの上側ブロック3x0に対して,マクロブロックMB1では左下のブロック0x2の動きベクトルが,MB2では下側のブロック1x1の動きベクトルが,MB3では右側のブロック2x1の動きベクトルがそれぞれ読み出される。   FIG. 8 (f) shows an MC block type in which two motion vectors are assigned to the current macroblock MB corresponding to the upper and lower 16 × 8 blocks, the candidate block MB1 is four 8 × 8 blocks, and the candidate block MB2 is the upper and lower 16 × 8 MC. Candidate block MB3 is an MC block type of 8 × 16 blocks on the left and right. In this case, with respect to the upper block 3x0 of the current macroblock MB, the motion vector of the lower left block 0x2 in the macroblock MB1, the motion vector of the lower block 1x1 in MB2, and the motion vector of the right block 2x1 in MB3. Each is read out.

以上の通り,現マクロブロックのMCブロックタイプと候補マクロブロックのMCブロックタイプとの組合せに依存して,読み出すべき動きベクトルの位置が異なっている。そして,読み出した動きベクトルの中央値が演算され,それが補償された動きベクトルとして予測画像データの生成に利用される。   As described above, the position of the motion vector to be read differs depending on the combination of the MC block type of the current macroblock and the MC block type of the candidate macroblock. Then, the median value of the read motion vectors is calculated and used as a compensated motion vector for generating predicted image data.

図9は,動きベクトルメモリの構成例を示す図である。これにより読み出すべき動きベクトルの位置が異なることを示す。図9には,図8(b)(c)の例が示される。動きベクトルメモリ内には,上側の候補マクロブロックMB1にはブロック0x0の動きベクトルが,右上の候補マクロブロックMB2にはブロック1x0,1x1の動きベクトルが,左の候補マクロブロックMB3にはブロック2x0,2x1の動きベクトルが,そして現マクロブロックMBにはブロック3x0〜3x3の動きベクトルがそれぞれ格納されている。そして,図8(b)のように現マクロブロックのブロック3x1に対しては,実線で示される先のブロックの動きベクトルを読み出す必要があるのに対して,図8(c)のように現マクロブロックのブロック3x2に対しては,破線で示される先のブロックの動きベクトルを読み出す必要がある。このように両マクロブロックのMCブロックタイプに応じて,実線と破線で示したとおり読み出すべき動きベクトルの格納位置(メモリ内アドレス)が異なる。したがって,現マクロブロックと候補マクロブロックのMCブロックタイプ情報を基にして読み出すべき動きベクトルのアドレスを求める必要があり,処理工数の増大になる。   FIG. 9 is a diagram illustrating a configuration example of the motion vector memory. This indicates that the position of the motion vector to be read is different. FIG. 9 shows examples of FIGS. 8B and 8C. In the motion vector memory, the upper candidate macroblock MB1 has a motion vector of block 0x0, the upper right candidate macroblock MB2 has a motion vector of blocks 1x0 and 1x1, and the left candidate macroblock MB3 has a block 2x0, 2 × 1 motion vectors are stored, and the current macroblock MB stores motion vectors 3 × 0 to 3 × 3. Then, for the current macroblock block 3x1 as shown in FIG. 8 (b), it is necessary to read the motion vector of the previous block indicated by the solid line, whereas as shown in FIG. 8 (c). For the block 3x2 of the macro block, it is necessary to read the motion vector of the previous block indicated by the broken line. As described above, according to the MC block type of both macroblocks, the storage position (address in memory) of the motion vector to be read differs as shown by the solid line and the broken line. Therefore, it is necessary to obtain the address of the motion vector to be read based on the MC block type information of the current macroblock and the candidate macroblock, which increases the number of processing steps.

図10は,本実施の形態における動きベクトルメモリへの動きベクトル書き込み方法を示す図である。本実施の形態では,MCブロックタイプに依存することなく各マクロブロックに対して16種類の動きベクトルを動きベクトルメモリに格納する。つまり,動きベクトルメモリに最小動き補償ブロック単位で動きベクトルを書き込む。   FIG. 10 is a diagram showing a motion vector writing method to the motion vector memory in the present embodiment. In the present embodiment, 16 types of motion vectors are stored in the motion vector memory for each macro block without depending on the MC block type. That is, the motion vector is written in the motion vector memory in units of the minimum motion compensation block.

図10(a)はMCブロックタイプが16x16ブロックに1つの動きベクトルが与えられるタイプの場合であり,動きベクトルメモリには16のブロック0〜15に対応して同じ動きベクトルを重複して格納する。図10(b)はMCブロックタイプが上下2つの16x8ブロックにそれぞれ動きベクトルが与えられるタイプの場合であるが,動きベクトルメモリには16のブロック0〜15に対応して同じ2つの動きベクトルを重複して格納する。つまり,動きベクトルメモリにはブロック0〜7に対応して第1の動きベクトルを重複して格納し,ブロック8〜15に対応して第2の動きベクトルを重複して格納する。   FIG. 10A shows a case where the MC block type is a type in which one motion vector is given to a 16 × 16 block, and the same motion vector is redundantly stored in the motion vector memory corresponding to 16 blocks 0 to 15. . FIG. 10B shows a case in which the motion vector is given to the 16 × 8 blocks of the upper and lower two MC block types, but the same two motion vectors corresponding to the 16 blocks 0 to 15 are stored in the motion vector memory. Store duplicates. That is, in the motion vector memory, the first motion vector is redundantly stored corresponding to the blocks 0 to 7, and the second motion vector is redundantly stored corresponding to the blocks 8-15.

図10(c)はMCブロックタイプが4つの8x8ブロックにそれぞれ動きベクトルが与えられるタイプの場合であるが,動きベクトルメモリには16のブロック0〜15に対応して4つの動きベクトルを重複して格納する。つまり,動きベクトルメモリにはブロック0,1,4,5に対応して第1の動きベクトルを重複して格納し,ブロック2,3,6,7に対応して第2の動きベクトルを重複して格納し,ブロック8,9,12,13に対応して第3の動きベクトルを重複して格納し,ブロック10,11,14,15に対応して第4の動きベクトルを重複して格納する。   FIG. 10 (c) shows a case where the motion vector is assigned to four 8 × 8 blocks each having an MC block type. In the motion vector memory, four motion vectors corresponding to 16 blocks 0 to 15 are overlapped. Store. That is, the motion vector memory stores the first motion vector redundantly corresponding to blocks 0, 1, 4 and 5, and the second motion vector corresponding to blocks 2, 3, 6 and 7 The third motion vector is stored correspondingly to the blocks 8, 9, 12, and 13, and the fourth motion vector is stored corresponding to the blocks 10, 11, 14, and 15. Store.

さらに,図10(d)はMCブロックタイプが最小動き補償ブロックである16個の4x4ブロックにそれぞれ動きベクトルが与えられるタイプの場合であり,これら16個の動きベクトルは動きベクトルメモリ内にその最小動き補償ブロック0〜15に対応して格納される。   Further, FIG. 10 (d) shows a case where a motion vector is given to each of 16 4 × 4 blocks whose MC block type is a minimum motion compensation block, and these 16 motion vectors are stored in the motion vector memory in the minimum. Stored corresponding to motion compensation blocks 0-15.

図11は,本実施の形態における動きベクトルメモリへの動きベクトル書き込み方法を示す図である。図11(a)(b)(c)は図10(a)(b)(c)に対応する。図11(a)に示すとおり,MCブロックタイプが16x16ブロックの場合,動きベクトルメモリにはそのアドレス0x0〜0xF(16進法)に1つの動きベクトルmv0が重複して格納される。また,図11(b)に示すとおり,MCブロックタイプが2つの16x8ブロックの場合,動きベクトルメモリにはアドレス0x0〜0x7に動きベクトルmv0が,アドレス0x8〜0xFに動きベクトルmv1がそれぞれ重複して格納される。そして,図11(c)に示すように,MCブロックタイプが4つの8x8ブロックの場合,動きベクトルメモリのアドレス0x0〜0x3に動きベクトルmv0が,アドレス0x4〜0x7に動きベクトルmv1が,アドレス0x8〜0xBに動きベクトルmv2が,アドレス0xC〜0xFに動きベクトルmv3がそれぞれ重複して格納される。   FIG. 11 is a diagram showing a motion vector writing method to the motion vector memory in the present embodiment. 11A, 11B, and 11C correspond to FIGS. 10A, 10B, and 10C. As shown in FIG. 11A, when the MC block type is 16 × 16 blocks, one motion vector mv0 is stored in the motion vector memory in duplicate at addresses 0x0 to 0xF (hexadecimal). As shown in FIG. 11B, when the MC block type is two 16x8 blocks, the motion vector memory has the motion vector mv0 overlapping at addresses 0x0 to 0x7 and the motion vector mv1 overlapping at addresses 0x8 to 0xF. Stored. As shown in FIG. 11C, when the MC block type is four 8x8 blocks, the motion vector mv0 is at addresses 0x0 to 0x3, the motion vector mv1 is at addresses 0x4 to 0x7, and the addresses 0x8 to The motion vector mv2 is stored redundantly at 0xB, and the motion vector mv3 is stored redundantly at addresses 0xC to 0xF.

以上のように,MCブロックタイプにかかわらず,各マクロブロックに対して動きベクトルメモリの16の格納アドレス領域に動きベクトルを格納する。このように最小動き補償ブロック単位で動きベクトルをメモリ内に格納することにより,候補マクロブロックの動きベクトルの読み出し動作では,現マクロブロックのMCブロックタイプのみに依存してどの動きベクトルを読み出せば良いか決定することができる。   As described above, regardless of the MC block type, motion vectors are stored in 16 storage address areas of the motion vector memory for each macro block. As described above, by storing the motion vector in the memory in units of the minimum motion compensation block, in the motion vector reading operation of the candidate macroblock, which motion vector should be read only depending on the MC block type of the current macroblock. You can decide if it ’s good.

図12は,本実施の形態における動きベクトルメモリの読み出し方法を示す図である。図12には,図8(b)(c)の場合の読み出し位置が実線と破線で示されている。本実施の形態によれば,各マクロブロックに対し動きベクトルメモリ内の16のアドレスに動きベクトルが書き込まれる。図8に示すとおり,図8(b)の場合は現マクロブロックMBのブロック3x1に対応して読み出すべき動きベクトルのブロックは斜線矩形で示した通りであり,上ブロックMB1ではアドレス0xC,右上ブロックMB2ではアドレス1xE,左ブロックMB3ではアドレス2x4の動きベクトルが読み出される。また,図8(c)の場合は,現マクロブロックMBのブロック3x2に対応して,上ブロックMB1ではアドレス0xE,右上ブロックMB2ではアドレス1xC,左ブロックMB3ではアドレス2xBの動きベクトルが読み出される。図8(a)(d)の場合も同様である。   FIG. 12 is a diagram illustrating a motion vector memory reading method according to the present embodiment. In FIG. 12, the readout positions in the cases of FIGS. 8B and 8C are indicated by solid lines and broken lines. According to the present embodiment, a motion vector is written at 16 addresses in the motion vector memory for each macroblock. As shown in FIG. 8, in the case of FIG. 8 (b), the block of the motion vector to be read corresponding to the block 3x1 of the current macroblock MB is as shown by the hatched rectangle. In the upper block MB1, the address 0xC, the upper right block The motion vector at address 1xE is read in MB2 and the address 2x4 is read in left block MB3. In the case of FIG. 8C, the motion vector of the address 0xE in the upper block MB1, the address 1xC in the upper right block MB2, and the address 2xB in the left block MB3 is read out corresponding to the block 3x2 of the current macroblock MB. The same applies to FIGS. 8A and 8D.

また,図8(e)(f)のように現マクロブロックMBのMCブロックタイプが異なると,それに対応して読み出すべきアドレスも異なる。しかしながら,読み出し先のマクロブロックMB1,2,3のMCブロックタイプに依存することなく,現マクロブロックのタイプにのみ依存して読み出しアドレスを確定することができる。各マクロブロックに対して16のアドレス位置に動きベクトルが格納されているからである。   Further, as shown in FIGS. 8E and 8F, when the MC block type of the current macro block MB is different, the address to be read is also different correspondingly. However, the read address can be determined only depending on the type of the current macroblock without depending on the MC block type of the macroblocks MB1, 2, and 3 to be read. This is because motion vectors are stored at 16 address positions for each macroblock.

このように,本実施の形態では,メディアン予測工程での候補マクロブロック内の動きベクトルの読み出し動作において,現マクロブロックのMCブロックタイプが判明すればそれに基づいて読み出し先の候補マクロブロックのMCブロックタイプに依存することなく,動きベクトルメモリ内の読み出しアドレスを確定することができる。   As described above, in the present embodiment, when the MC block type of the current macroblock is found in the motion vector read operation in the candidate macroblock in the median prediction process, the MC block of the candidate macroblock to be read is based on the MC block type. The read address in the motion vector memory can be determined without depending on the type.

なお,現マクロブロックのMCブロックタイプに対応して,各ブロックにおいて読み出すべき候補マクロブロック内のブロックの位置は,MPEG4やH.264などの勧告により指定されている。そこで,勧告により指定されているブロックの位置の例えば先頭アドレスの動きベクトルを読み出すことで,簡単に指定ブロックの動きベクトルを読み出すことができる。読み出し先のマクロブロックのMCブロックタイプに依存することなく,全て16アドレス位置に動きベクトルが格納されるので,読み出しアドレスの特定は現マクロブロックのMCブロックタイプに応じて一義的であり,読み出しアドレスの生成に際して特別の演算処理は必要ない。   Corresponding to the MC block type of the current macroblock, the position of the block in the candidate macroblock to be read in each block is MPEG4 or H.264. It is specified by recommendations such as H.264. Therefore, the motion vector of the designated block can be easily read out by reading out, for example, the motion vector at the head address at the position of the block designated by the recommendation. Since the motion vector is stored at all 16 address positions without depending on the MC block type of the macro block to be read, the specification of the read address is unambiguous according to the MC block type of the current macro block. There is no need for special arithmetic processing when generating.

図13は,本実施の形態におけるメモリ制御部の構成図である。このメモリ制御部45は,動きベクトルメモリ44(図1(B)参照)に対するメモリインターフェースであり,メモリ44に格納すべき動きベクトルMVをメモリ内の所定のアドレスに書き込み制御し,メモリ44から読み出すべき動きベクトルをメモリ内の対応アドレスから読み出し制御する。読み出されたデータMV1,2,3は,予測用動きベクトル生成部42に供給され,その中央値を求めるなどの演算処理により予測用動きベクトルPMVが生成される。   FIG. 13 is a configuration diagram of the memory control unit in the present embodiment. The memory control unit 45 is a memory interface for the motion vector memory 44 (see FIG. 1B). The memory control unit 45 controls writing of a motion vector MV to be stored in the memory 44 to a predetermined address in the memory and reads it from the memory 44. The power vector is read from the corresponding address in the memory and controlled. The read data MV1, 2, 3 are supplied to the prediction motion vector generation unit 42, and a prediction motion vector PMV is generated by an arithmetic process such as obtaining the median value.

メモリ制御部45は,マクロブロックの格納すべき動きベクトルMVをメモリ44に書き込むための回路451,452,453と,現マクロブロックに対して読み出すべき動きベクトルMV1,2,3を読み出すための回路454,455を有する。   The memory control unit 45 includes circuits 451, 452, and 453 for writing a motion vector MV to be stored in the macroblock in the memory 44, and a circuit for reading out the motion vectors MV1, 2, and 3 to be read out for the current macroblock. 454, 455.

図1(B)に示したとおり,可変長復号化器30で復号化された動きベクトルMVは,一旦動きベクトルメモリ44に書き込まれる。その時,処理中のマクロブロックMBのアドレスが書き込みアドレス制御部451に与えられると,それが16の書き込みアドレスWAddを順次生成する。また,そのマクロブロックのMCブロックタイプがMVブロックタイプ識別部452に供給され,図6の例では7種類のタイプのいずれかであることが識別され,その識別結果に応じて,タイミング調整及びデータ拡張処理部453が,書き込みアドレスWAddのタイミングに同期して格納動きベクトルMVを書き込みデータWDataとして動きベクトルメモリ44に供給する。   As shown in FIG. 1B, the motion vector MV decoded by the variable length decoder 30 is once written in the motion vector memory 44. At this time, when the address of the macro block MB being processed is given to the write address control unit 451, it sequentially generates 16 write addresses WAAdd. Further, the MC block type of the macro block is supplied to the MV block type identifying unit 452, and in the example of FIG. 6, it is identified that it is one of seven types, and timing adjustment and data are determined according to the identification result. The extension processing unit 453 supplies the stored motion vector MV to the motion vector memory 44 as write data WData in synchronization with the timing of the write address WAAdd.

図14は,本実施の形態におけるメモリ制御部の書き込み動作と読み出し動作のタイミングチャート図である。図14(A)(B)に書き込み動作が示される。まず,処理中のマクロブロックMBのMCブロックタイプが16x16の場合は,動きベクトルは1個しかない。そこで,書き込みアドレス制御部451が16個のアドレスをメモリ44に供給するタイミングに同期して,タイミング調整及びデータ拡張処理部453が1つの動きベクトルを書き込みデータWdataとしてメモリ44に与える。それにより,メモリ44の16のアドレスには1つの動きベクトル(16x16(0))が書き込まれる。その結果,図11(a)のようになる。   FIG. 14 is a timing chart of a write operation and a read operation of the memory control unit in the present embodiment. 14A and 14B show the write operation. First, when the MC block type of the macro block MB being processed is 16 × 16, there is only one motion vector. Therefore, in synchronization with the timing at which the write address control unit 451 supplies 16 addresses to the memory 44, the timing adjustment and data expansion processing unit 453 gives one motion vector to the memory 44 as write data Wdata. Thereby, one motion vector (16 × 16 (0)) is written to 16 addresses of the memory 44. As a result, it becomes as shown in FIG.

次に,図11(c)の場合で説明すると,書き込みアドレス制御部451が16個のアドレスをメモリ44に供給するタイミングに同期して,タイミング調整及びデータ拡張処理部453が4種類の動きベクトル(8x8(0)〜(3))を書き込みデータWdataとしてメモリ44に与える。図14中,データラッチ選択信号は,タイミング調整及びデータ拡張処理部453内の制御信号であり,MCブロックタイプ(4x4)に応答して,タイミング調整及びデータ拡張処理部453は,データラッチ選択信号0〜3に応じて格納動きベクトルMVを対応する内部レジスタ(図示せず)にラッチし,ラッチされた動きベクトルを書き込みデータWdataとしてメモリ44に供給する。   Next, in the case of FIG. 11C, in synchronization with the timing at which the write address control unit 451 supplies 16 addresses to the memory 44, the timing adjustment and data expansion processing unit 453 has four types of motion vectors. (8 × 8 (0) to (3)) is given to the memory 44 as the write data Wdata. In FIG. 14, the data latch selection signal is a control signal in the timing adjustment and data extension processing unit 453. In response to the MC block type (4 × 4), the timing adjustment and data extension processing unit 453 receives the data latch selection signal. In response to 0-3, the stored motion vector MV is latched in a corresponding internal register (not shown), and the latched motion vector is supplied to the memory 44 as write data Wdata.

さらに,MCブロックタイプが4x4の場合は,16種類の格納動きベクトル4x4(0)〜(15)が,16個の書き込みアドレスWAddに対応してメモリ44に書き込みデータWDataとして与えられる。そして,内部のデータラッチ信号に応答して16種類の動きベクトルが内蔵ラッチ回路にラッチされる。   Further, when the MC block type is 4 × 4, 16 kinds of stored motion vectors 4 × 4 (0) to (15) are given to the memory 44 as write data WData corresponding to 16 write addresses WAAdd. In response to the internal data latch signal, 16 types of motion vectors are latched in the built-in latch circuit.

次に読み出し動作について説明する。動きベクトルメモリの読み出し動作は,図12で説明したとおりである。MCブロックタイプ識別部455は,現マクロブロックのMCブロックタイプを供給されてそれを識別し,読み出しアドレス制御部454は,現マクロブロックに対応する参照マクロブロックのアドレスと識別されたMCブロックタイプに応じて,3つの読み出しアドレスを生成する。その読み出しアドレスに対応してメモリ44から読み出された動きベクトルMV1,2,3が,予測用動きベクトル生成部42に出力される。   Next, the reading operation will be described. The reading operation of the motion vector memory is as described with reference to FIG. The MC block type identification unit 455 is supplied with the MC block type of the current macroblock and identifies it, and the read address control unit 454 determines the MC block type identified as the address of the reference macroblock corresponding to the current macroblock. In response, three read addresses are generated. The motion vectors MV1, 2, 3 read from the memory 44 corresponding to the read address are output to the motion vector generator 42 for prediction.

図14(C)は,MCブロックタイプが16x16ブロックの場合(図8(e)の例)と8x8ブロックの場合(図8(a)〜(d)の例)の読み出し動作を示す。16x16ブロックの場合,現マクロブロックのMCブロックタイプに対応して,読み出すべき3つの動きベクトルのブロック位置が特定される。したがって,読み出しアドレス制御部454は,アドレスA1,A2,A3を読み出しアドレスRAddとしてメモリ44に供給し,それに対応して動きベクトルmv1,2,3が読み出しデータRDataとして出力される。予測用動きベクトル生成部42は,それらから予測用動きベクトルPMVを生成する。8x8ブロックの場合も同様に,現マクロブロックのMCブロックタイプに対応して読み出すべき3つの動きベクトルのブロック位置が特定される。よって,読み出しアドレス制御部454は,アドレスA11,A12,A13を生成し,それに対応して動きベクトルmv11,12,13が読み出され,予測用動きベクトルPMVが生成される。   FIG. 14C shows the read operation when the MC block type is 16 × 16 blocks (example in FIG. 8E) and 8 × 8 blocks (examples in FIGS. 8A to 8D). In the case of a 16 × 16 block, the block positions of three motion vectors to be read are specified corresponding to the MC block type of the current macroblock. Therefore, the read address control unit 454 supplies the addresses A1, A2, and A3 as the read address RAdd to the memory 44, and correspondingly, the motion vectors mv1, 2, and 3 are output as the read data RData. The prediction motion vector generation unit 42 generates a prediction motion vector PMV from them. Similarly, in the case of the 8 × 8 block, the block positions of the three motion vectors to be read are specified corresponding to the MC block type of the current macro block. Therefore, the read address control unit 454 generates addresses A11, A12, and A13, and the motion vectors mv11, 12, and 13 are read correspondingly to generate the prediction motion vector PMV.

読み出しアドレス制御部454は,図12に示したとおり,現マクロブロックのMCブロックタイプに応じてどのアドレスの動きベクトルを読み出すべきかを特定することができ,読み出す先のマクロブロックのMCブロックタイプに依存することなく,画一的に読み出しアドレスを生成することができる。   As shown in FIG. 12, the read address control unit 454 can specify which address's motion vector should be read according to the MC block type of the current macroblock. The read address can be generated uniformly without depending on it.

上記の実施の形態では,図1の復号化回路の動きベクトルメモリ44に対するメモリ制御を対象にして説明した。しかしながら,図1の符号化回路においてもローカル復号画像データを生成する時の動きベクトル生成部28における予測用動きベクトル生成工程においても適用することができる。   In the above embodiment, the memory control for the motion vector memory 44 of the decoding circuit of FIG. 1 has been described. However, the encoding circuit of FIG. 1 can also be applied to a prediction motion vector generation process in the motion vector generation unit 28 when generating local decoded image data.

以上の実施の形態をまとめると,次の付記のとおりである。   The above embodiment is summarized as follows.

(付記1)所定の画素単位からなるマクロブロックに対し,当該マクロブロック内の動画の動きに対応する動きベクトルと,当該動きベクトルにより予測される予測画像データとの差分である予測誤差データとが与えられる符号化データから,前記動きベクトルに基づく予測画像データを生成し,前記予測誤差データを加算して画像データを再生する動画像データの復号化または符号化装置において,
前記マクロブロックに対応して当該マクロブロックの動きベクトルを格納する動きベクトルメモリと,
当該マクロブロックに割り当てられた動きベクトルの種類を示す動き補償ブロックタイプに依存することなく,当該マクロブロックの動きベクトルを最小動き補償ブロック単位で前記動きベクトルメモリに格納し,メディアン予測演算における候補ブロックの動きベクトルを現マクロブロックの動き補償ブロックタイプに応じたアドレスに基づいて前記動きベクトルメモリから読み出すメモリ制御部とを有する動画像データの符号化または復号化装置。
(Supplementary note 1) For a macroblock consisting of a predetermined pixel unit, a prediction error data which is a difference between a motion vector corresponding to a motion of a moving image in the macroblock and predicted image data predicted by the motion vector In the decoding or encoding device of moving image data, which generates predicted image data based on the motion vector from the given encoded data and adds the prediction error data to reproduce the image data,
A motion vector memory for storing a motion vector of the macroblock corresponding to the macroblock;
The motion vector of the macroblock is stored in the motion vector memory in units of the minimum motion compensation block without depending on the motion compensation block type indicating the type of motion vector assigned to the macroblock, and the candidate block in the median prediction calculation And a memory control unit that reads out the motion vector from the motion vector memory based on an address corresponding to the motion compensation block type of the current macroblock.

(付記2)付記1において,
前記動き補償ブロックタイプは,前記マクロブロックに対して単一の動きベクトルを有する第1のタイプと,前記マクロブロックを細分化した複数の動き補償ブロックに対応して複数の動きベクトルを有する第2のタイプとを少なくとも有し,
前記最小動き補償ブロックは,前記第2のタイプでの最小に細分化されうるブロックであることを特徴とする動画像データの符号化または復号化装置。
(Appendix 2) In Appendix 1,
The motion compensation block type includes a first type having a single motion vector for the macroblock and a second type having a plurality of motion vectors corresponding to a plurality of motion compensation blocks obtained by subdividing the macroblock. And at least
The apparatus for encoding or decoding moving image data, wherein the minimum motion compensation block is a block that can be subdivided into a minimum in the second type.

(付記3)付記1において,
前記メモリ制御部は,前記マクロブロックに最小動き補償ブロックよりも大きいブロックに動きベクトルが割り当てられている場合は,前記動きベクトルメモリの最小動き補償ブロックに対応する複数アドレスに当該動きベクトルを繰り返し格納することを特徴とする動画像データの符号化または復号化装置。
(Appendix 3) In Appendix 1,
The memory control unit repeatedly stores the motion vector at a plurality of addresses corresponding to the minimum motion compensation block of the motion vector memory when a motion vector is assigned to a block larger than the minimum motion compensation block. An apparatus for encoding or decoding moving image data.

(付記4)付記1において,
前記メモリ制御部は,前記候補ブロックの動きベクトルを前記動きベクトルメモリから読み出す時に,前記現マクロブロックの動き補償ブロックの位置に応じたアドレスに基づいて前記動きベクトルを読み出すことを特徴とする動画像データの符号化または復号化装置。
(Appendix 4) In Appendix 1,
The moving image, wherein the memory control unit reads the motion vector based on an address corresponding to a position of a motion compensation block of the current macroblock when reading the motion vector of the candidate block from the motion vector memory. Data encoding / decoding device.

(付記5)付記1において,
さらに,前記読み出された複数の候補ブロックの動きベクトルから予測用動きベクトルを演算する予測用動きベクトル生成部を有することを特徴とする動画像データの符号化または復号化装置。
(Appendix 5) In Appendix 1,
Furthermore, the apparatus for encoding or decoding moving image data, further comprising a prediction motion vector generation unit that calculates a prediction motion vector from the motion vectors of the plurality of read candidate blocks.

本実施の形態における動画像データの符号化回路と復号化回路の構成図である。It is a block diagram of the encoding circuit and decoding circuit of moving image data in the present embodiment. 動きベクトルと予測画像及び予測誤差を説明する図である。It is a figure explaining a motion vector, a prediction image, and a prediction error. マクロブロックと動きベクトルの関係を示す図である。It is a figure which shows the relationship between a macroblock and a motion vector. 予測用動きベクトルを説明する図である。It is a figure explaining the motion vector for prediction. 予測用動きベクトルを利用した復号化処理のフローチャート図である。It is a flowchart figure of the decoding process using the motion vector for prediction. 動き補償ブロックタイプを説明する図である。It is a figure explaining a motion compensation block type. 異なるMCブロックタイプ間の問題点を示す図である。It is a figure which shows the problem between different MC block types. 本実施の形態におけるメディアン予測での候補マクロブロックへの参照を示す図である。It is a figure which shows the reference to the candidate macroblock in the median prediction in this Embodiment. 動きベクトルメモリの構成例を示す図である。It is a figure which shows the structural example of a motion vector memory. 本実施の形態における動きベクトルメモリへの動きベクトル書き込み方法を示す図である。It is a figure which shows the motion vector writing method to the motion vector memory in this Embodiment. 本実施の形態における動きベクトルメモリへの動きベクトル書き込み方法を示す図である。It is a figure which shows the motion vector writing method to the motion vector memory in this Embodiment. 本実施の形態における動きベクトルメモリの読み出し方法を示す図である。It is a figure which shows the reading method of the motion vector memory in this Embodiment. 本実施の形態におけるメモリ制御部の構成図である。It is a block diagram of the memory control part in this Embodiment. 本実施の形態におけるメモリ制御部の書き込み動作と読み出し動作のタイミングチャート図である。FIG. 6 is a timing chart of a write operation and a read operation of the memory control unit in the present embodiment.

符号の説明Explanation of symbols

42:予測用動きベクトル生成部
44:動きベクトルメモリ 45:メモリ制御部
451:書き込みアドレス制御部 454:読み出しアドレス制御部
MV:格納動きベクトル MV1,2,3:読み出し動きベクトル
PMV:予測用動きベクトル
42: Prediction motion vector generation unit 44: Motion vector memory 45: Memory control unit 451: Write address control unit 454: Read address control unit MV: Stored motion vector MV1, 2, 3: Read motion vector PMV: Motion vector for prediction

Claims (1)

所定の画素単位からなるマクロブロックに対し,当該マクロブロック内の動画の動きに対応する動きベクトルと,当該動きベクトルにより予測される予測画像データとの差分である予測誤差データとが与えられる符号化データから,前記動きベクトルに基づく予測画像データを生成し,前記予測誤差データを加算して画像データを再生する動画像データの復号化または符号化装置において,
前記マクロブロックに対応して当該マクロブロックの動きベクトルを格納する動きベクトルメモリと,
複数の動きベクトルを前記マクロブロックに割り当て且つブロックサイズの異なる複数種類の動き補償ブロックの当該ブロックサイズを示す補償ブロックタイプに依存することなく,当該マクロブロックの動きベクトルを最小動き補償ブロック単位で前記動きベクトルメモリに格納し,メディアン予測演算における候補ブロックの動きベクトルを現マクロブロックの動き補償ブロックタイプに応じたアドレスに基づいて前記動きベクトルメモリから読み出すメモリ制御部とを有する動画像データの符号化または復号化装置において,
前記メモリ制御部は,前記マクロブロックに最小動き補償ブロックよりも大きいブロックに動きベクトルが割り当てられている場合は,前記動きベクトルメモリの最小動き補償ブロックに対応する複数アドレスに当該動きベクトルを繰り返し格納することを特徴とする動画像データの符号化または復号化装置。
Coding in which a macroblock composed of a predetermined pixel unit is provided with a motion vector corresponding to a motion of a moving image in the macroblock and prediction error data which is a difference between predicted image data predicted by the motion vector In the decoding or encoding device for moving image data, which generates predicted image data based on the motion vector from the data and adds the prediction error data to reproduce the image data,
A motion vector memory for storing a motion vector of the macroblock corresponding to the macroblock;
Assigning a plurality of motion vectors to the macro block and not depending on a compensation block type indicating the block size of a plurality of types of motion compensation blocks having different block sizes, the motion vector of the macro block in units of the minimum motion compensation block. Coding of moving image data having a memory control unit stored in the motion vector memory and reading out the motion vector of the candidate block in the median prediction calculation from the motion vector memory based on the address corresponding to the motion compensation block type of the current macroblock Or in the decryption device,
The memory control unit repeatedly stores the motion vector at a plurality of addresses corresponding to the minimum motion compensation block of the motion vector memory when a motion vector is assigned to the macro block that is larger than the minimum motion compensation block. An apparatus for encoding or decoding moving image data.
JP2005187186A 2005-06-27 2005-06-27 Encoding or decoding apparatus for moving image data using motion vectors Expired - Fee Related JP4519723B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005187186A JP4519723B2 (en) 2005-06-27 2005-06-27 Encoding or decoding apparatus for moving image data using motion vectors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005187186A JP4519723B2 (en) 2005-06-27 2005-06-27 Encoding or decoding apparatus for moving image data using motion vectors

Publications (2)

Publication Number Publication Date
JP2007006399A JP2007006399A (en) 2007-01-11
JP4519723B2 true JP4519723B2 (en) 2010-08-04

Family

ID=37691525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005187186A Expired - Fee Related JP4519723B2 (en) 2005-06-27 2005-06-27 Encoding or decoding apparatus for moving image data using motion vectors

Country Status (1)

Country Link
JP (1) JP4519723B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101452859B1 (en) 2009-08-13 2014-10-23 삼성전자주식회사 Method and apparatus for encoding and decoding motion vector
KR101522850B1 (en) 2010-01-14 2015-05-26 삼성전자주식회사 Method and apparatus for encoding/decoding motion vector

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000050284A (en) * 1998-07-13 2000-02-18 Motorola Inc Video signal coding and decoding method and device using storage and collection of motion vector
JP2004274411A (en) * 2003-03-10 2004-09-30 Sony Corp Picture encoder and picture decoder, and picture encoding method and picture decoding method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000050284A (en) * 1998-07-13 2000-02-18 Motorola Inc Video signal coding and decoding method and device using storage and collection of motion vector
JP2004274411A (en) * 2003-03-10 2004-09-30 Sony Corp Picture encoder and picture decoder, and picture encoding method and picture decoding method

Also Published As

Publication number Publication date
JP2007006399A (en) 2007-01-11

Similar Documents

Publication Publication Date Title
JP3863510B2 (en) Motion vector encoding / decoding method and apparatus
US9516336B2 (en) Video decoding device, video decoding method, video decoding program, and video decoding integrated circuit
KR101103723B1 (en) Video encoding method, decoding method, device thereof, program thereof, and recording medium containing the program
JP2015119502A (en) Method and apparatus for estimating motion vector using plurality of motion vector predictors, encoder, decoder, and decoding method
JP5426655B2 (en) Compressed video encoding device, compressed video decoding device, compressed video encoding method, and compressed video decoding method
JP2009201112A (en) Coding and decoding methods for direct mode
JP2010041354A (en) Moving image coding method, coding device and coding program
JP2008066913A (en) Image data processing method, program for image data processing method, recording medium recorded with program for image data processing method, and image data processor
JP2008141288A (en) Motion vector detection device and motion vector detection method
KR102210274B1 (en) Apparatuses, methods, and computer-readable media for encoding and decoding video signals
JP2004242309A (en) Motion picture encoding/decoding method in interlace scan system and apparatus therefor
JP2914448B2 (en) Motion vector prediction encoding method and motion vector decoding method, prediction encoding device and decoding device, and recording medium recording motion vector prediction encoding program and decoding program
JP4519723B2 (en) Encoding or decoding apparatus for moving image data using motion vectors
JP2003259377A (en) Moving picture encoding method, moving picture decoding method, and code string format
JP2006246277A (en) Re-encoding apparatus, re-encoding method, and re-encoding program
JP4383367B2 (en) Motion vector detection device
JP5281597B2 (en) Motion vector prediction method, motion vector prediction apparatus, and motion vector prediction program
KR100708183B1 (en) Image storing device for motion prediction, and method for storing data of the same
JP2007097063A (en) Motion picture encoding program, motion picture encoding method and motion picture encoding apparatus
JP3129279B2 (en) Encoding device, encoding method, and recording medium
JP6825699B2 (en) Moving image processing device, moving image processing method, and moving image processing program
JP4118180B2 (en) Coding / decoding system
JPH1023415A (en) Method and device for encoding and decoding picture
JP2008199521A (en) Image processing apparatus and method thereof
JPH10304373A (en) Moving image decoding method and moving image decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080226

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080731

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100119

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100323

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100519

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

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees