JP2011249986A - Motion compensation apparatus - Google Patents
Motion compensation apparatus Download PDFInfo
- Publication number
- JP2011249986A JP2011249986A JP2010119296A JP2010119296A JP2011249986A JP 2011249986 A JP2011249986 A JP 2011249986A JP 2010119296 A JP2010119296 A JP 2010119296A JP 2010119296 A JP2010119296 A JP 2010119296A JP 2011249986 A JP2011249986 A JP 2011249986A
- Authority
- JP
- Japan
- Prior art keywords
- processing unit
- interpolation
- vertical
- horizontal
- addition
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、圧縮された動画像の復号時の動き補償技術に関する。 The present invention relates to a motion compensation technique when decoding a compressed moving image.
動画像の圧縮技術として、ITU−TのH.264、SMPTEのVC−1、ISOのMEPG2やMEPG4などが知られている。これらの動画圧縮技術は様々な分野で標準規格として使われており、例えばDVDの場合にはMPEG2が、Blu−ray Discの場合にはH.264が使われている。 As a moving image compression technique, ITU-T's H.264 standard. H.264, SMPTE VC-1, ISO MPEG2 and MPEG4 are known. These moving image compression techniques are used as standards in various fields. For example, MPEG2 is used for DVD and H.264 is used for Blu-ray Disc. H.264 is used.
このように、動画像の圧縮に関して複数の規格(コーデック)が存在し、圧縮された動画像を復号する際に、該動画像の圧縮規格に応じた復号を行う必要がある。近年、1つのハードウェア(H/W)により、異なる圧縮規格の動画像の復号に対応することが望まれている。 As described above, there are a plurality of standards (codecs) regarding the compression of moving images. When a compressed moving image is decoded, it is necessary to perform decoding according to the compression standard of the moving image. In recent years, it has been desired that one hardware (H / W) can cope with decoding of moving images of different compression standards.
一般的に、圧縮された動画像の復号は、エントロピー復号、逆量子化、逆変換、動き補償、ループフィルタなどからなる。これらの処理のうちに、動き補償を担うH/W部分の回路規模が大きくなりやすい傾向がある。 In general, decoding of a compressed moving image includes entropy decoding, inverse quantization, inverse transform, motion compensation, a loop filter, and the like. Among these processes, the circuit scale of the H / W part responsible for motion compensation tends to increase.
圧縮時の動き補償は、効率良く圧縮するために、連続するフレーム間で画素がどのように動いたかを検出して動きベクトルを得る処理である。復号時の動き補償は、1つまたは複数の参照画素の画素値から、動きベクトルが示す位置における画素の画素値(輝度、色差など)を求める処理である。動き補償は、動画像の圧縮規格によって仕様が異なる。なお、参照画素は、参照フレームに実在する画素を意味する。 Motion compensation at the time of compression is a process for obtaining a motion vector by detecting how a pixel moves between consecutive frames in order to compress efficiently. Motion compensation at the time of decoding is a process for obtaining a pixel value (luminance, color difference, etc.) of a pixel at a position indicated by a motion vector from pixel values of one or a plurality of reference pixels. The specifications of motion compensation differ depending on the moving image compression standard. The reference pixel means a pixel that actually exists in the reference frame.
ここで、様々な圧縮規格について、復号時の動き補償を説明する。分かりやすいように、本明細書及び図面に用いられる符号と用語をいくつか定義する。 Here, motion compensation at the time of decoding will be described for various compression standards. For the sake of clarity, some symbols and terms used in this specification and drawings are defined.
特別な説明がある場合を除き、各図において、黒い矩形は参照画素を示し、大文字の英字は参照画素を区別するための符号である。参照画素は、図示に関わらず縦横方向に等間隔に配列されている。参照画素の位置を「整数位置」という。また、動きベクトルが示す位置を「目標位置」という。なお、誤解が生じない前提下で、「画素」を「画素値」として用いる場合もある。 Unless otherwise specified, in each figure, a black rectangle indicates a reference pixel, and an uppercase alphabetic character is a code for distinguishing the reference pixel. The reference pixels are arranged at equal intervals in the vertical and horizontal directions regardless of the illustration. The position of the reference pixel is called “integer position”. The position indicated by the motion vector is referred to as a “target position”. Note that “pixel” may be used as “pixel value” under the assumption that no misunderstanding occurs.
目標位置が整数位置である場合に、該整数位置の参照画素は目標位置の画素として用いられる。一方、目標位置が整数位置ではない場合に、複数の参照画素を用いて補間することにより目標位置の画素を求める必要がある。補間により求められる画素を補間画素という。補間の精度は規格によって異なる。参照画素の間隔を1/4単位に分けた位置まで補間する場合、補間の精度は「1/4精度」と呼ばれる。この場合、水平方向または垂直方向に隣接する2つの参照画素間で3つの補間画素を求めることができる。また、参照画素の間隔を1/2単位に分けた位置まで補間する場合、補間の精度は「1/2精度」と呼ばれる。この場合、水平方向または垂直方向に隣接する2つの参照画素間で1つのみ補間画素を求めることができる。 When the target position is an integer position, the reference pixel at the integer position is used as the pixel at the target position. On the other hand, when the target position is not an integer position, it is necessary to obtain a pixel at the target position by interpolation using a plurality of reference pixels. Pixels obtained by interpolation are called interpolation pixels. The accuracy of interpolation varies depending on the standard. When interpolation is performed up to a position where the interval between reference pixels is divided into ¼ units, the accuracy of the interpolation is called “¼ accuracy”. In this case, three interpolation pixels can be obtained between two reference pixels adjacent in the horizontal direction or the vertical direction. In addition, when interpolation is performed up to a position where the interval between reference pixels is divided into ½ units, the accuracy of the interpolation is called “½ precision”. In this case, only one interpolation pixel can be obtained between two reference pixels adjacent in the horizontal direction or the vertical direction.
図15は、参照画素と補間画素の位置関係を示す。図15に示すように、黒い矩形と大文字とにより表わされる画素A〜Lは参照画素であり、それらの位置は整数位置である。白い矩形と小文字により表わされる画素a〜vは、補間画素である。 FIG. 15 shows the positional relationship between the reference pixel and the interpolation pixel. As shown in FIG. 15, pixels A to L represented by black rectangles and capital letters are reference pixels, and their positions are integer positions. Pixels a to v represented by white rectangles and small letters are interpolation pixels.
画素aは、水平方向に隣接する2つの参照画素(画素C、D)の間の3つの補間画素(画素a、b、c)の中の、該2つの参照画素のうちの左側の参照画素(画素C)に最も近い補間画素である。画素tも同様である。画素aと画素tの位置は、「水平方向が1/4位置であり、垂直方向が0位置である」と表現され、以下「1/4,0」と表記する。 The pixel a is a reference pixel on the left side of the two reference pixels among the three interpolation pixels (pixels a, b, and c) between two reference pixels (pixels C and D) adjacent in the horizontal direction. The interpolated pixel closest to (pixel C). The same applies to the pixel t. The positions of the pixel a and the pixel t are expressed as “the horizontal direction is a 1/4 position and the vertical direction is a 0 position”, and are hereinafter referred to as “1/4, 0”.
画素cは、水平方向に隣接する2つの参照画素(画素C、D)の間の3つの補間画素(画素a、b、c)の中の、該2つの参照画素のうちの右側の参照画素(画素D)に最も近い補間画素である。画素vも同様である。画素cと画素vの位置は、「水平方向が3/4位置であり、垂直方向が0位置である」と表現され、以下「3/4,0」と表記する。 The pixel c is a reference pixel on the right side of the two reference pixels among the three interpolation pixels (pixels a, b, c) between two reference pixels (pixels C, D) adjacent in the horizontal direction. This is the closest interpolation pixel to (pixel D). The same applies to the pixel v. The positions of the pixel c and the pixel v are expressed as “the horizontal direction is a 3/4 position and the vertical direction is a 0 position”, and are hereinafter referred to as “3/4, 0”.
画素bは、横方向に隣接する2つの参照画素(画素C、D)の間の3つの補間画素(画素a、b、c)のうちの中央の補間画素である。画素uも同様である。画素bと画素uの位置は、「水平方向が1/2位置であり、垂直方向が0位置である」と表現され、以下「1/2,0」と表記する。 The pixel b is a central interpolation pixel among three interpolation pixels (pixels a, b, and c) between two reference pixels (pixels C and D) adjacent in the horizontal direction. The same applies to the pixel u. The positions of the pixel b and the pixel u are expressed as “the horizontal direction is a 1/2 position and the vertical direction is a 0 position”, and are hereinafter referred to as “1/2, 0”.
同様に、画素dと画素hの位置は、「0,1/4」であり、画素nと画素sの位置は、「0,3/4」である。また、画素iと画素mの位置は、「0,1/2」である。 Similarly, the positions of the pixel d and the pixel h are “0, 1/4”, and the positions of the pixel n and the pixel s are “0, 3/4”. The positions of the pixel i and the pixel m are “0, 1/2”.
それ以外の各補間画素の位置も、参照画素との位置関係に応じて表現される。例えば、画素eの位置は「1/4,1/4」であり、画素fの位置は、「1/2,1/4」である。 The position of each other interpolation pixel is also expressed according to the positional relationship with the reference pixel. For example, the position of the pixel e is “1/4, 1/4”, and the position of the pixel f is “1/2, 1/4”.
なお、以下において、「1/2,0」、「0,1/2」、「1/2,1/2」の位置の補間画素を「1/2精度」の補間画素といい、他の位置の補間画素を「1/4精度」の補間画素という。 In the following, the interpolation pixels at the positions “1/2, 0”, “0, 1/2”, and “1/2, 1/2” are referred to as “1/2 precision” interpolation pixels. The interpolated pixel at the position is referred to as “¼ accuracy” interpolated pixel.
すなわち、補間精度が1/2精度である場合には、全ての補間画素は1/2精度の補間画素である。補間精度が1/4精度である場合には、補間画素は、1/2精度の補間画素と1/4精度の補間画素のいずれである。 That is, when the interpolation accuracy is ½ accuracy, all the interpolation pixels are ½ accuracy interpolation pixels. When the interpolation accuracy is ¼ accuracy, the interpolation pixel is either a ½ accuracy interpolation pixel or a ¼ accuracy interpolation pixel.
図16を参照して、H.264の場合の輝度の動き補償を説明する。
まず、1/2精度の補間画素を求める処理を説明する。
H.264では、1/2精度の補間画素を求める際に、6タップのリニアフィルタが用いられる。「1/2,0」位置の補間画素bを求める処理は、式(1)と式(2)に示される。
First, a process for obtaining a half-precision interpolation pixel will be described.
H. In H.264, a 6-tap linear filter is used when obtaining a half-precision interpolation pixel. The processing for obtaining the interpolated pixel b at the “1/2, 0” position is shown in equations (1) and (2).
式(2)における「>>5」は「右側に5ビットシフトする」となるシフト処理を表す。「Clip()」は、()内の値をunsigned 8bit(0〜255)に丸める処理であり、具体的には、()内の値が負になった場合に0とし、上限値(255)を超えた場合に上限値とする処理である。以下の説明において、ある値(例えばT)に対して所定値(ここでは16)を加算してシフトし、シフトした後の値に対して、必要に応じて0または上限値にする処理をまとめてTに対する「加算・シフト処理」という。加算する所定値と、シフトするビット数は、加算・シフト処理のパラメータという。 “>> 5” in Equation (2) represents a shift process that “shifts to the right by 5 bits”. “Clip ()” is a process of rounding the value in () to unsigned 8 bits (0 to 255). Specifically, when the value in () becomes negative, it is set to 0, and the upper limit value (255 ) Exceeds the upper limit value. In the following description, a process of adding a predetermined value (16 in this case) to a certain value (for example, T) and shifting it, and setting the shifted value to 0 or an upper limit as necessary is summarized. This is called “addition / shift processing” for T. The predetermined value to be added and the number of bits to be shifted are called addition / shift processing parameters.
すなわち、「1/2,0」位置の画素bは、水平方向に並ぶ6つの参照画素(E、F、G、H、I、J)に対して補間を行って得た値(b')を加算・シフト処理することによって得られる。 That is, the pixel b at the position “1/2, 0” is a value (b ′) obtained by performing interpolation on six reference pixels (E, F, G, H, I, J) arranged in the horizontal direction. Is obtained by adding and shifting.
同様に、「1/2,0」位置の画素sも、水平方向に並ぶ6つの参照画素(K、L、M、N、P、Q)に対して補間を行って得た値(s')を加算・シフト処理することによって得られる。 Similarly, the pixel s at the position “1/2, 0” is also a value (s ′) obtained by performing interpolation on six reference pixels (K, L, M, N, P, Q) arranged in the horizontal direction. ) Are added and shifted.
以下、説明及び図面において、「aa」、「bb」のような、2つの同一の小文字の英字は、式(1)におけるb'に対応し、加算・シフト処理が施される前の補間画素の値を示す。
図16におけるaa、bb、gg、hhは、求める際に用いられる6つの参照画素が異なる点を除き、式(1)に示すb'を求める処理と同様の手法で算出される。
Hereinafter, in the description and drawings, two identical lowercase letters such as “aa” and “bb” correspond to b ′ in Expression (1), and are interpolated pixels before addition / shift processing is performed. Indicates the value of.
Aa, bb, gg, and hh in FIG. 16 are calculated by the same method as the process for obtaining b ′ shown in Expression (1) except that the six reference pixels used for obtaining are different.
「0,1/2」位置の画素hを求める処理は、式(3)と式(4)に示される。
すなわち、「1/2,0」位置の画素hは、垂直方向に並ぶ6つの参照画素(A、C、G、M、R、T)に対して補間を行って得た値(h')を加算・シフト処理することによって得られる。この加算・シフト処理のパラメータは、「0,1/2」位置の画素を求める際の加算・シフト処理のパラメータと同様の「16」と「5ビット」である。 That is, the pixel h at the position “1/2, 0” is a value (h ′) obtained by performing interpolation on six reference pixels (A, C, G, M, R, T) arranged in the vertical direction. Is obtained by adding and shifting. The parameters of the addition / shift processing are “16” and “5 bits”, which are the same as the parameters of the addition / shift processing when obtaining the pixel at the “0, 1/2” position.
同様に、「1/2,0」位置の画素mも、垂直方向に並ぶ6つの参照画素(B、D、H、N、S、U)に対して補間を行って得た値(m')を加算・シフト処理することによって得られる。 Similarly, the pixel m at the position “1/2, 0” is a value (m ′) obtained by performing interpolation on six reference pixels (B, D, H, N, S, U) arranged in the vertical direction. ) Are added and shifted.
cc、dd、ee、ffは、式(3)に示すh'を求める処理と同様の手法で算出される。 cc, dd, ee, and ff are calculated by the same method as the process for obtaining h ′ shown in Expression (3).
「1/2,1/2」位置の画素jを求める処理は、式(5)と式(7)、または、式(6)と式(7)により示される2通りのいずれか一方である。いずれを使用するかはエンコード時に指定される。
他の各1/4位置の画素、3/4位置の画素を求める処理は、2つの画素(参照画素または補間画素)の平均をとる処理であり、式(8)〜(19)にそれぞれ示される。
VC−1の場合、復号時の輝度の動き補償は、BicubicとBilinearの2種類がある。いずれを用いるかは、エンコード時に指定される。 In the case of VC-1, there are two types of motion compensation for luminance at the time of decoding: Bicubic and Bilinear. Which is used is specified at the time of encoding.
図17と図18を参照して、Bicubicの場合を説明する。
図17においても、1つの小文字の英字は補間画素を表し、2つの小文字の英字は、加算・シフト処理前の補間画素を表す。VC−1のBicubicの場合、補間画素は、4つの画素(参照画素または別の補間画素)から求められる。例えば、画素aは、同じ行に並ぶ4つの参照画素(画素E、F、G、H)から求められ、画素dは、同じ列に並ぶ4つの参照画素(B、F、J、N)から求められる。また、画素rは、同じ行に並ぶ4つの補間画素(画素nn、n、s、ss)から求められる。
The case of Bicubic will be described with reference to FIGS.
Also in FIG. 17, one lowercase alphabetic character represents an interpolation pixel, and two lowercase alphabetic characters represent an interpolation pixel before addition / shift processing. In the case of VC-1 Bicubic, an interpolation pixel is obtained from four pixels (a reference pixel or another interpolation pixel). For example, the pixel a is obtained from four reference pixels (pixels E, F, G, H) arranged in the same row, and the pixel d is obtained from four reference pixels (B, F, J, N) arranged in the same column. Desired. Further, the pixel r is obtained from four interpolation pixels (pixels nn, n, s, ss) arranged in the same row.
図18を参照して、より具体的に説明する。図18において、画素Q1、Q2、Q3、Q4は、参照画素または補間画素であり、それらの並ぶ方向は、縦または横のいずれか一方である。画素wは、画素Q1〜Q4から求められる補間画素である。 A more specific description will be given with reference to FIG. In FIG. 18, pixels Q1, Q2, Q3, and Q4 are reference pixels or interpolation pixels, and the direction in which they are arranged is either vertical or horizontal. The pixel w is an interpolation pixel obtained from the pixels Q1 to Q4.
画素wが1/4位置の画素である場合、それを求める処理は、下記の式(20)に示される。
画素wが1/2位置の画素である場合、それを求める処理は、下記の式(21)に示される。
画素wが3/4位置の画素である場合、それを求める処理は、下記の式(22)に示される。
式(20)、(21)、(22)において、「shift」はシフト量を示す。また、「rnd」は丸め値を示す。丸め値とシフト量は、画素wの位置によって異なる。なお、式(20)〜(22)に示していないが、これらの式によって求められた値は、必要に応じてunsigned 8bitに丸められる。 In the expressions (20), (21), and (22), “shift” indicates the shift amount. “Rnd” indicates a rounded value. The rounding value and the shift amount differ depending on the position of the pixel w. Although not shown in the equations (20) to (22), values obtained by these equations are rounded to unsigned 8 bits as necessary.
すなわち、VC−1のBicubicの場合、補間画素は、4つの画素(参照画素または補間画素)に対して補間を行って得た値を加算・シフト処理することにより求められる。 In other words, in the case of VC-1 Bicubic, an interpolation pixel is obtained by performing addition / shift processing on values obtained by performing interpolation on four pixels (reference pixel or interpolation pixel).
VC−1のBilinearの場合、補間画素は、2次元の線形補間により求められる。図19を参照して、2次元の線形補間を説明する。 In the case of VC-1 Bilinear, the interpolation pixel is obtained by two-dimensional linear interpolation. Two-dimensional linear interpolation will be described with reference to FIG.
2次元の線形補間により補間画素eを求める際に、該画素eを囲む上、下、左、右の4つの参照画素(A、B、C、D)が用いられる。図19において、「xFrc」と「8−xFrc」は水平距離を示し、「yFrc」と「8−yFrc」は垂直距離を示す。 When the interpolation pixel e is obtained by two-dimensional linear interpolation, four reference pixels (A, B, C, and D) surrounding the pixel e are used. In FIG. 19, “xFrc” and “8-xFrc” indicate horizontal distances, and “yFrc” and “8-yFrc” indicate vertical distances.
2次元の線形補間により補間画素eを求める処理は、下記の式(23)に示される。
すなわち、VC−1のBilinearの場合、補間画素は、該補間画素を囲む上、下、左、右の4つの参照画素に対して2次元の線形補間を求めて得た値を加算・シフト処理することにより得られる。加算・シフト処理のパラメータは「rnd」と「shift」であり、求められる補間画素の位置によって異なる。なお。式(23)が示す2次元の線形補間は、通常、キュービックフィルタにより行われる。 In other words, in the case of VC-1 Bilinear, the interpolation pixel adds and shifts the values obtained by obtaining two-dimensional linear interpolation for the four upper, lower, left, and right reference pixels surrounding the interpolation pixel. Can be obtained. The parameters of the addition / shift processing are “rnd” and “shift”, and differ depending on the position of the interpolated pixel to be obtained. Note that. The two-dimensional linear interpolation indicated by the equation (23) is usually performed by a cubic filter.
MPEG4は、1/2精度の動き補償モード(half−pel motion compensation:hmc)と、1/4精度の動き補償モード(quarter−pel motion compensation:qmc)がある。MPEG2は、動き補償の精度が1/2である。 MPEG4 has a half-precision motion compensation mode (half-pel motion compensation: hmc) and a quarter-precision motion compensation mode (quarter-pel motion compensation: qmc). MPEG2 has a motion compensation accuracy of 1/2.
図20を参照して、MPEG4のqmcの場合に補間画素を求める処理を説明する。これらの処理は、式(24)〜(39)に示される。これらの式におけるC[]は、係数である。また、「rc」は、rounding_controlのことであり、丸め処理の制御を行うためのパラメータである。「/256」は8ビットシフトすることを意味する。
式(25)と(26)が示すように、MPEG4のqmcの場合、(1/2,0)位置の補間画素bi(例えば図20におけるb−1とb1)と(0,1/2)位置の補間画素(図20におけるc)は、8つの参照画素に対して補間(8タップのフィルタ)を行って得た値を加算・シフト処理することにより得られ、加算・シフト処理のパラメータは「128−rc」と「8ビット」である。 As shown in equations (25) and (26), in the case of MPEG4 qmc, the interpolation pixel b i (for example, b −1 and b 1 in FIG. 20) and (0, 1/1) at the position (1/2, 0). 2) The interpolated pixel at the position (c in FIG. 20) is obtained by performing addition / shift processing on values obtained by performing interpolation (8-tap filter) on the eight reference pixels. The parameters are “128-rc” and “8 bits”.
式(27)が示すように、(1/2,1/2)位置の補間画素(図20におけるd)は、8つの(1/2,0)位置の補間画素に対して補間を行って得た値を加算・シフト処理することにより得られる。 As shown in the equation (27), the interpolation pixel (d in FIG. 20) at the (1/2, 1/2) position is interpolated with respect to the interpolation pixels at the eight (1/2, 0) positions. It is obtained by adding and shifting the obtained value.
式(30)が示すように、(1/4,1/2)位置の補間画素(図20におけるk)は、8つの(1/4,1/2)位置の補間画素に対して補間を行って得た値を加算・シフト処理することにより得られ、加算・シフト処理のパラメータは「128−rc」と「8ビット」である。また、式(31)が示すように、(3/4,1/2)位置の補間画素(図20におけるl)は、8つの(3/4,1/2)位置の補間画素に対して補間を行って得た値を加算・シフト処理することにより得られ、加算・シフト処理のパラメータは「128−rc」と「8ビット」である。 As shown in Expression (30), the interpolation pixel (k in FIG. 20) at the position (1/4, 1/2) is interpolated with respect to the interpolation pixels at 8 (1/4, 1/2) positions. The obtained value is obtained by performing addition / shift processing, and parameters of the addition / shift processing are “128-rc” and “8 bits”. Further, as shown in the equation (31), the interpolation pixel at (3/4, 1/2) position (l in FIG. 20) is equal to the eight (3/4, 1/2) position interpolation pixels. The value obtained by performing the interpolation is obtained by performing addition / shift processing, and the parameters of the addition / shift processing are “128-rc” and “8 bits”.
式(28)、(29)、(32)、(36)が示すように、(1/4,0)位置の補間画素(ei)、(3/4,0)位置の補間画素(fi)、(0,1/2)位置の補間画素(g)、((0,3/4)位置の補間画素(m)は、1つの参照画素と1つの補間画素を平均することにより求められる。 As shown in equations (28), (29), (32), and (36), the interpolation pixel (e i ) at the position (1/4, 0) and the interpolation pixel (f at the position (3/4, 0) i ) The interpolation pixel (g) at the position (0, 1/2) and the interpolation pixel (m) at the position (0, 3/4) are obtained by averaging one reference pixel and one interpolation pixel. It is done.
他の補間画素は、式(33)〜(35)、式(37)〜(39)が示すように、2つの補間画素を平均することにより求められる。 The other interpolation pixels are obtained by averaging the two interpolation pixels as shown in equations (33) to (35) and equations (37) to (39).
図21を参照して、MPEG2とMPEG4の1/2精度の動き補償を説明する。この場合、補間画素は、(1/2,0)位置の補間画素(図21におけるb、e)と、(0,1/2)位置の補間画素(図21におけるc)と、(1/2,1/2)位置の補間画素(図21のおけるd)のいずれである。これらの異なる位置の補間画素を求める処理は、下記の式(40)〜(42)に示される。なお、MPEG2の場合、rounding_controlというパラメータが無いため、これらの式における「rc」は、0である。
式(40)と(41)が示すように、(1/2,0)位置と(0,1/2)位置の補間画素は、2つの参照画素を平均することにより求められる。また、(1/2,1/2)位置の補間画素は、4つの参照画素に対して2次元の線形補間をして得た値を加算・シフト処理することにより求められる。4つの参照画素に対する2次元の線形補間は、通常、キュービックフィルタにより行われる。 As shown in equations (40) and (41), the interpolation pixels at the (1/2, 0) position and the (0, 1/2) position are obtained by averaging two reference pixels. Further, the interpolation pixel at the (1/2, 1/2) position is obtained by adding / shifting values obtained by performing two-dimensional linear interpolation on the four reference pixels. The two-dimensional linear interpolation for the four reference pixels is usually performed by a cubic filter.
以上、種々の圧縮規格によって定められた輝度の動き補償について説明した。色差については、これらのいずれの規格も、補間画素は、図19に示す2次元の線形補間(キュービックフィルタ)によって求められる。 The luminance motion compensation defined by various compression standards has been described above. As for the color difference, in any of these standards, the interpolation pixel is obtained by two-dimensional linear interpolation (cubic filter) shown in FIG.
このように、動画像の圧縮規格によって復号時の動き補償の仕様が異なる。複数の圧縮規格に対応するために、規格毎に動き補償を担うH/Wを設けるようにすると、回路規模が大きくなってしまうという問題がある。 In this way, the motion compensation specifications at the time of decoding differ depending on the moving image compression standard. In order to cope with a plurality of compression standards, there is a problem that if the H / W for performing motion compensation is provided for each standard, the circuit scale becomes large.
特許文献1には、複数の圧縮規格に対応可能な動き補償技術が開示されている。図22を参照して説明する。
図22は、特許文献1の図4であり、マルチコーデック対応の動き補償装置を示す。この装置における動き補償エンジン40は、DMA I/F30、垂直フィルタ41、第1水平フィルタ42、第2水平フィルタ43、キュービック整列部44、キュービックフィルタ45を有する。垂直フィルタ41、第1水平フィルタ42、第2水平フィルタ43は、共に一次元の補間を行うフィルタであり、キュービックフィルタ45は、2次元の線形補間を行う。キュービック整列部44は、キュービックフィルタ45に入力するデータ(画素値)を選択する。動き補償の際に、圧縮規格(コーデック)に応じて、1つ以上のフィルタが選択される。
FIG. 22 is FIG. 4 of
例えば、H.264の場合、垂直フィルタ41、第1水平フィルタ42、第2水平フィルタ43の順にフィルタが選択され、1/2精度の補間画素までが算出される。その後、キュービックフィルタ45により1/4精度の補間画素が算出される。
For example, H.M. In the case of H.264, the filters are selected in the order of the
VC−1のBilinear、MPEG4の1/2精度モードとMPEG2、各コーデックの色差の動き補償の場合、キュービック整列部44のみが用いられ、垂直フィルタ41、第1水平フィルタ42、第2水平フィルタ43が用いられない。
In the case of VC-1 Bilinear,
この技術は、複数のコーデック間で共有可能なフィルタを共有させ、コーデックに応じてフィルタを選択的に使い分けることにより、部品数を減らし、回路規模を減らすことができるとされている。 According to this technique, a filter that can be shared among a plurality of codecs is shared, and a filter is selectively used according to the codec, thereby reducing the number of components and reducing the circuit scale.
図22に示す装置における動き補償エンジン40は、水平方向における一次元の補間、垂直方向における一次元の補間、2次元の線形補間のために、水平フィルタ、垂直フィルタ、キュービックフィルタをそれぞれ備える。
The
また、H.264の場合における1/4精度の画素を算出するために、キュービックフィルタ45が用いられる。前述したように、H.264の場合、1/4精度の画素の算出処理は、単純な平均処理(式(8)〜(19)である。この処理にキュービックフィルタを用いるのは過剰仕様と考えられる。
H. The
本発明は、上記事情に鑑みてなされたものであり、マルチコーデックに対応可能な動き補償装置の回路規模をより削減できる技術を提供する。 The present invention has been made in view of the above circumstances, and provides a technique that can further reduce the circuit scale of a motion compensation device that can handle multi-codecs.
本発明の一つの態様は、圧縮された動画像のデコード時に動き補償を行い、動きベクトルが示す位置である目標位置における画素の画素値を求める動き補償装置であり、複数の圧縮規格に対応する。 One aspect of the present invention is a motion compensation device that performs motion compensation at the time of decoding a compressed moving image and obtains a pixel value of a pixel at a target position that is a position indicated by a motion vector, and supports a plurality of compression standards. .
該動き補償装置は、制御部と、水平フィルタリング処理部と、垂直フィルタリング処理部と、加算・シフト処理部と、平均処理部とを備える、 The motion compensation apparatus includes a control unit, a horizontal filtering processing unit, a vertical filtering processing unit, an addition / shift processing unit, and an average processing unit.
水平フィルタリング処理部は、水平フィルタを有する。該水平フィルタは、制御部から2つ以上の値が入力され、該2つ以上の値に対して一次元の補間を行って水平補間値を得るものである。また、水平フィルタは、入力される上記2つ以上の値の個数と、補間パラメータとが可変である。 The horizontal filtering processing unit has a horizontal filter. The horizontal filter receives two or more values from the control unit, and performs a one-dimensional interpolation on the two or more values to obtain a horizontal interpolation value. In the horizontal filter, the number of the two or more values to be input and the interpolation parameter are variable.
垂直フィルタリング処理部は、垂直フィルタを有する。該垂直フィルタは、制御部から2つ以上の値が入力され、該2つ以上の値に対して一次元の補間を行って垂直補間値を得るものである。また、垂直フィルタは、入力される上記2つ以上の値の個数と、補間パラメータとが可変である。 The vertical filtering processing unit has a vertical filter. The vertical filter receives two or more values from the control unit, and performs a one-dimensional interpolation on the two or more values to obtain a vertical interpolation value. In the vertical filter, the number of input two or more values and the interpolation parameter are variable.
加算・シフト処理部は、水平フィルタリング処理部からの水平補間値、または垂直フィルタリング処理部からの垂直補間値が入力され、該水平補間値または垂直補間値に所定値を加算した後に所定ビット数シフトする加算・シフト処理を行って加算・シフト値を得る。上記所定値と所定ビット数は、加算・シフト処理のパラメータである。 The addition / shift processing unit receives a horizontal interpolation value from the horizontal filtering processing unit or a vertical interpolation value from the vertical filtering processing unit, adds a predetermined value to the horizontal interpolation value or the vertical interpolation value, and then shifts a predetermined number of bits. An addition / shift process is performed to obtain an addition / shift value. The predetermined value and the predetermined number of bits are parameters for addition / shift processing.
平均処理は、2つの値が入力され、該2つの値の平均値を求めるものである。この2つの値は、制御部と加算・シフト処理部のいずれか一方または両方から入力される。 In the averaging process, two values are input and an average value of the two values is obtained. These two values are input from one or both of the control unit and the addition / shift processing unit.
水平フィルタリング処理部は、処理結果である水平補間値を制御部と加算・シフト処理部に出力可能である。 The horizontal filtering processing unit can output a horizontal interpolation value as a processing result to the control unit and the addition / shift processing unit.
垂直フィルタリング処理部は、処理結果である垂直補間値を制御部と加算・シフト処理部に出力可能である。 The vertical filtering processing unit can output a vertical interpolation value as a processing result to the control unit and the addition / shift processing unit.
加算・シフト処理部は、処理結果である加算・シフト値を目標位置における画素の画素値として外部に出力可能であると共に、加算・シフト値を制御部と平均処理部に出力可能である。 The addition / shift processing unit can output the addition / shift value as the processing result to the outside as the pixel value of the pixel at the target position, and can output the addition / shift value to the control unit and the average processing unit.
平均処理部は、処理結果である平均値を目標位置における画素の画素値として外部に出力可能であると共に、制御部に出力可能である。 The average processing unit can output the average value as the processing result to the outside as the pixel value of the pixel at the target position, and can output the average value to the control unit.
制御部は、目標位置が参照画素の位置となる整数位置以外であるときに、動画像の圧縮規格と目標位置に応じて、下記の各処理を行う。
(1)水平フィルタと、垂直フィルタと、加算・シフト処理部のパラメータの設定。
(2)各処理部による処理結果の出力先の制御。
(3)処理結果の出力先が制御部である場合における該処理結果の保持。
(4)1つ以上の参照画素の画素値と、保持された1つ以上の水平補間値と、保持された1つ以上の垂直補間値と、保持された1つ以上の加算・シフト値と、保持された1つ以上の平均値のうちの1つ以上の値を、水平フィルタと、垂直フィルタと、平均処理部とのうちのいずれかへの出力。
When the target position is other than the integer position that is the position of the reference pixel, the control unit performs the following processes according to the compression standard of the moving image and the target position.
(1) Setting of parameters of the horizontal filter, the vertical filter, and the addition / shift processing unit.
(2) Control of the output destination of the processing result by each processing unit.
(3) Retaining the processing result when the output destination of the processing result is the control unit.
(4) The pixel value of one or more reference pixels, the retained one or more horizontal interpolation values, the retained one or more vertical interpolation values, and the retained one or more addition / shift values, , Outputting one or more values of the held one or more average values to any of the horizontal filter, the vertical filter, and the average processing unit.
また、制御部は、圧縮規格と目標位置によって、目標位置の画素値を求めるために、4つの値に対して2次元の線形補間を行ってキュービック補間値を得る処理が必要な場合に、水平フィルタと垂直フィルタの片方に上記4つの値を2つずつ出力し、その後、該片方のフィルタにより得られた2つの水平補間値または2つの垂直補間値を他方のフィルタに出力することによって上記キュービック補間値を得る。 In addition, in order to obtain a pixel value at the target position according to the compression standard and the target position, the control unit performs horizontal conversion when performing processing to obtain a cubic interpolation value by performing two-dimensional linear interpolation on the four values. The cubic value is output by outputting two of the four values to one of the filter and the vertical filter, and then outputting two horizontal interpolation values or two vertical interpolation values obtained by the one filter to the other filter. Get the interpolated value.
なお、上記態様の装置を方法やシステムに置き換えて表現したもの、本発明の態様としては有効である。 It should be noted that the above-described apparatus is replaced with a method or system, and is effective as an aspect of the present invention.
本発明にかかる技術によれば、複数の圧縮規格に対応する動き補償装置の回路規模を抑制することができる。 According to the technique according to the present invention, the circuit scale of a motion compensation device corresponding to a plurality of compression standards can be suppressed.
以下、図面を参照して本発明の実施の形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、様々な処理を行う機能ブロックとして図面に記載される各要素は、ハードウェア的には、CPU、メモリ、その他の回路で構成することができ、ソフトウェア的には、メモリにロードされたプログラムなどによって実現される。なお、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。 Embodiments of the present invention will be described below with reference to the drawings. For clarity of explanation, the following description and drawings are omitted and simplified as appropriate. Each element described in the drawings as a functional block for performing various processes can be configured by a CPU, a memory, and other circuits in terms of hardware, and a program loaded in the memory in terms of software. Etc. Note that, in each drawing, the same element is denoted by the same reference numeral, and redundant description is omitted as necessary.
<第1の実施の形態>
図1は、本発明の第1の実施の形態にかかる動画像復号装置80を示す。図1において、本発明の動き補償技術を説明する上で必要な構成要素のみを示し、逆量子化を担う機能ブロックなど、通常の動画像装置に備えられ、本発明の動き補償技術を説明する際に特に必要の無い他のものを省略する。
<First Embodiment>
FIG. 1 shows a moving
動画像復号装置80は、メモリ84、DMA(Direct Memory Access)コントローラ114、エントロピー復号部88、DMA IF90(IF:Interface)、動き補償エンジン100を備え、これらはシステムバス82に接続されている。
The moving
メモリ84は、既に復号された参照ピクチャを記憶している。メモリ84に記憶された参照ピクチャにおける各画素は、参照画素となる。また、メモリ84は、エントロピー復号部88により得られた、現在の復号対象となるピクチャの各動きベクトルも記憶する。
The
エントロピー復号部88は、エントロピー復号を行うものであり、動画像の圧縮規格を示すコーデック信号と、現在の復号対象となるピクチャ(以下注目ピクチャという)の各動きベクトルを得る。エントロピー復号部88は、システムバス82を介して、コーデック信号を動き補償エンジン100に出力し、動きベクトルをメモリ84に出力する。
The
動き補償エンジン100は、動き補償を行うものであり、注目ピクチャにおける、各動きベクトルが示す位置(目標位置)における画素を求める。動き補償エンジン100は、メモリ84から動きベクトルを逐次読み出して、コーデック信号が示す圧縮規格と、動きベクトルが示す目標位置に応じて、メモリ84から必要な参照画素を読み出す。動き補償エンジン100は、DMA IF90を介して、メモリ84から動きベクトルと参照画素の読出しを行う。なお、本実施の形態における動き補償エンジン100は、H.264、VC−1、MPEG4、MPEG2に対応する。
The
DMA IF90は、システムバス82を介して、動き補償エンジン100が読み出す動きベクトルと参照画素についてDMAコントローラ86にDMAリクエストを出す。DMAコントローラ86は、DMA IF90からのDMAリクエストに応じて動きベクトルと参照画素の出力をメモリ84に行わせ、システムバス82、DMA IF90を介して動き補償エンジン100に供する。
The DMA IF 90 issues a DMA request to the
図2は、動き補償エンジン100を示す。動き補償エンジン100は、制御部110、水平フィルタリング処理部120、垂直フィルタリング処理部140、加算・シフト処理部160、平均処理部170を備える。
FIG. 2 shows the
水平フィルタリング処理部120は、水平フィルタ130を備える。水平フィルタ130は、制御部110から水平方向に並ぶ2つ以上の画素の画素値が入力され、該2つ以上の画素値に対して補間を行って1つの補間値を得る。以下、この補間値を水平補間値という。なお、制御部110から水平フィルタ130に入力される2つ以上の画素値は、参照画素の画素値である場合と、参照画素の画素値ではない場合がある。これについては後述する。
The horizontal
水平フィルタ130は、入力される画素値の数と、補間パラメータが可変である。入力される画素値の数とパラメータは、制御部110により制御される。
The
また、水平フィルタリング処理部120は、水平フィルタ130により得られた水平補間値を制御部110と加算・シフト処理部160に出力可能である。水平補間値の出力先は、制御部110により制御される。
Further, the horizontal
図3は、水平フィルタ130の構成例を示す。図3の水平フィルタ130は、8つのレジスタfR0〜fR7、7つの加算器(sum0〜sum6)、4つの乗算器mul0〜mul3を有する。
FIG. 3 shows a configuration example of the
レジスタfR0〜fR7には、制御部110によりそれぞれの値が設定される。加算器sum0、加算器sum1、加算器sum2、加算器sum3は、レジスタfR3とレジスタfR4の加算、レジスタfR2とレジスタfR5の加算、レジスタfR1とレジスタfR6の加算、レジスタfR0とレジスタfR7の加算をそれぞれ行う。
Each value is set by the
乗算器mul0は、乗算器mul1、乗算器mul2、乗算器mul3は、加算器sum0の出力と係数a0の乗算、加算器sum1の出力と係数a1の乗算、加算器sum2の出力と係数a2の乗算、加算器sum3の出力と係数a3の乗算をそれぞれ行う。 The multiplier mul0 is the multiplier mul1, the multiplier mul2, the multiplier mul3 is the output of the adder sum0 and the coefficient a0, the output of the adder sum1 and the coefficient a1, and the output of the adder sum2 and the coefficient a2. , The output of the adder sum3 and the coefficient a3 are respectively multiplied.
加算器sum4は乗算器mul0と乗算器mul1の出力を加算し、加算器sum5は乗算器mul2と乗算器mul3の出力を加算する。 The adder sum4 adds the outputs of the multiplier mul0 and the multiplier mul1, and the adder sum5 adds the outputs of the multiplier mul2 and the multiplier mul3.
加算器sum6は、加算器sum4と加算器sum5の出力を加算する。加算器sum6の出力は、水平フィルタ130の出力(水平補間値)となる。 The adder sum6 adds the outputs of the adder sum4 and the adder sum5. The output of the adder sum6 is the output of the horizontal filter 130 (horizontal interpolation value).
レジスタfR0〜fR7の値と、係数a0〜a3は、制御部110により設定される。レジスタfR0〜fR7の全てに値が設定された場合に、水平フィルタ130は、8タップのフィルタとなる。制御部110は、一部のレジスタに値を設定しないことにより水平フィルタのタップ数を調整可能である。なお、レジスタに値を設定しないことは、該レジスタの値を「0」に設定することと等価である。
The values of the registers fR0 to fR7 and the coefficients a0 to a3 are set by the
例えば、制御部110がレジスタfR0〜fR7の全てに対して値を設定する場合、水平フィルタ130は、8タップのフィルタになる。また、制御部110がレジスタfR1〜fR6に対してのみ値を設定する場合、水平フィルタ130は6タップのフィルタになる。さらに、制御部110がレジスタfR2とレジスタfR5に対してのみ値を設定する場合、水平フィルタ130は4タップのフィルタになる。さらに、制御部110がレジスタfR3とレジスタfR4に対してのみ値を設定する場合、水平フィルタ130は2タップのフィルタになる。
For example, when the
図2に戻って説明する。
水平フィルタリング処理部120は、水平フィルタ130により得られた水平補間値を制御部110と加算・シフト処理部160に出力可能である。制御部110と加算・シフト処理部160のいずれに出力するかは、制御部110により制御される。
Returning to FIG.
The horizontal
垂直フィルタリング処理部140は、垂直フィルタ150を備える。垂直フィルタ150は、制御部110から垂直方向に並び2つ以上の画素の画素値が入力され、該2つ以上の画素値に対して補間を行って1つの補間値を得る。以下、この補間値を垂直補間値という。なお、制御部110から垂直フィルタ150に入力される2つ以上の画素値は、参照画素の画素値である場合と、参照画素の画素値ではない場合がある。これについては後述する。
The vertical
垂直フィルタ150は、入力される画素値の数と、補間パラメータが可変である。入力される画素値の数とパラメータは、制御部110により制御される。
The vertical filter 150 is variable in the number of input pixel values and interpolation parameters. The number of input pixel values and parameters are controlled by the
また、垂直フィルタリング処理部140は、垂直フィルタリング処理部140により得られた垂直補間値を制御部110と加算・シフト処理部160に出力可能である。垂直補間値の出力先は、制御部110により制御される。
The vertical
なお、垂直フィルタ150の具体的な構成は、図3に示す水平フィルタ130と同様とすることができ、ここで説明を省略する。
Note that the specific configuration of the vertical filter 150 can be the same as that of the
加算・シフト処理部160は、水平フィルタリング処理部120から水平補間値が入力されたとき、または垂直フィルタリング処理部140から垂直補間値が入力されたときに、入力された水平補間値または垂直補間値に対して加算・シフト処理を行う。加算・シフト処理は、入力された値に対して所定値を加算して所定ビット数をシフトした後に、必要に応じて丸めるものである。本実施の形態において、画素値が8ビットであり、加算・シフト処理部160により行われる加算・シフト処理は、入力された値に対して所定値を加算して所定ビット数シフトした後に、必要に応じて出力値を「0」または「256」にする処理である。なお、加算・シフト処理のパラメータ(加算する所定値とシフトする所定ビット数)は、制御部110により制御される。加算・シフト処理部160の処理結果は、以下加算・シフト値という。
When the horizontal interpolation value is input from the horizontal
加算・シフト処理部160は、加算・シフト値を目標位置における画素の画素値として外部(例えば、図示しない、動き補償エンジン100の次段の処理ブロックなど)に出力可能であると共に、加算・シフト値を制御部110と平均処理部170に出力可能である。加算・シフト値の出力先は、制御部110により制御される。
The addition /
平均処理部170は、2つの値が入力され、該2つの値の平均値を算出する。該2つの値は、制御部110と加算・シフト処理部160のいずれか一方または両方から入力される。平均処理部170に入力される2つの値の詳細については、後述する。
The average processing unit 170 receives two values and calculates an average value of the two values. The two values are input from one or both of the
平均処理部170は、処理結果である平均値を外部と制御部110に出力可能である。平均値の出力先は、制御部110により制御される。
The average processing unit 170 can output an average value as a processing result to the outside and the
制御部110は、動きベクトルにより示される目標位置が整数位置である場合に、該整数位置の参照画素をメモリ84から読み出して外部に出力する。これは、輝度と色差のいずれについても同様である。
When the target position indicated by the motion vector is an integer position, the
動きベクトルにより示される目標位置が整数位置ではない場合に、制御部110は、輝度について、コーデック信号が示す圧縮規格と、目標位置とに応じて下記の処理を行う。
(1)水平フィルタ130、垂直フィルタ150、加算・シフト処理部160のパラメータの設定。
(2)各処理部による処理結果の出力先の制御。
(3)処理結果の出力先が制御部110である場合における該処理結果の保持。
(4)1つ以上の参照画素の画素値と、保持された1つ以上の水平補間値と、保持された1つ以上の垂直補間値と、保持された1つ以上の加算・シフト値と、保持された1つ以上の平均値のうちの1つ以上の値を各処理部のうちのいずれかへの出力。
When the target position indicated by the motion vector is not an integer position, the
(1) Parameter setting of the
(2) Control of the output destination of the processing result by each processing unit.
(3) Retaining the processing result when the output destination of the processing result is the
(4) The pixel value of one or more reference pixels, the retained one or more horizontal interpolation values, the retained one or more vertical interpolation values, and the retained one or more addition / shift values, , Outputting one or more values of the held one or more average values to any one of the processing units.
また、制御部110は、圧縮規格と目標位置によって、目標位置の画素値を求めるために、4つの値に対して2次元の線形補間を行ってキュービック補間値を得る処理が必要な場合に、水平フィルタ130と垂直フィルタ150の片方に上記4つの値を2つずつ出力し、その後、該片方のフィルタにより得られた2つの水平補間値または2つの垂直補間値を他方のフィルタに出力することによって上記キュービック補間値を得る。
In addition, the
補間画素は、加算・シフト処理部160または平均処理部170により外部に出力される。図4は、本実施の形態において、加算・シフト処理部160により外部に出力される補間画素と、平均処理部170により外部に出力される補間画素を示す。
The interpolated pixels are output to the outside by the addition /
図4に示すように、輝度の場合、H.264の全ての1/2精度の補間画素が加算・シフト処理部160から外部に出力され、全ての1/4制度の補間画素が平均処理部170から外部に出力される。
As shown in FIG. All the H.264 half-precision interpolation pixels are output from the addition /
VC−1のBicubicとVC−1のBilinearの場合、全ての補間画素が加算・シフト処理部160から外部に出力される。
In the case of VC-1 Bicubic and VC-1 Bilinear, all interpolation pixels are output from the addition /
MPEG4のqmcモードの場合、全ての1/2精度の補間画素と一部の1/4精度の補間画素が加算・シフト処理部160から外部に出力され、他の1/4精度の補間画素が平均処理部170から外部に出力される。
In the case of the MPEG4 qmc mode, all ½ precision interpolation pixels and some ¼ precision interpolation pixels are output to the outside from the addition /
MPEG4のhmcモードとMPEG2の場合、(1/2,1/2)位置の補間画素が加算・シフト処理部160から出力され、他の位置の補間画素が平均処理部170から外部に出力される。
In the MPEG4 hmc mode and MPEG2, the interpolation pixel at the (1/2, 1/2) position is output from the addition /
なお、色差については、全ての規格において、全ての補間画素が加算・シフト処理部160から外部に出力される。
For color differences, all interpolation pixels are output from the addition /
圧縮規格毎に補間画素を求める際の制御部110の動作を詳細に説明する。
まず、輝度について説明する。
The operation of the
First, luminance will be described.
<H.264の場合>
1.1/2精度の補間画素のうちの、(1/2,0)位置の補間画素(輝度)
図16における補間画素bを例にする。
この場合、制御部110は、メモリ84から参照画素E、F、G、H、I、Jを読み出すと共に、前述した式(1)が示す処理が行われるように水平フィルタ130の設定をし、式(2)が示す処理が行われるように加算・シフト処理部160を設定する。また、水平フィルタ130の出力先が加算・シフト処理部160になり、加算・シフト処理部160の出力先が外部になるように制御をする。これにて、補間画素bが求められ、加算・シフト処理部160から外部に出力される。
<H. For H.264>
1. Interpolated pixel (luminance) at (1/2, 0) position among interpolated pixels of 1/2 accuracy
The interpolation pixel b in FIG. 16 is taken as an example.
In this case, the
2.1/2精度の補間画素のうちの、(0,1/2)位置の補間画素(輝度)
図16における補間画素hを例にする。
この場合、制御部110は、メモリ84から参照画素A、C、G、M、R、Tを読み出すと共に、前述の式(3)が示す処理が行われるように垂直フィルタ150の設定をし、式(4)が示す処理が行われるように加算・シフト処理部160を設定する。また、垂直フィルタ150の出力先が加算・シフト処理部160になり、加算・シフト処理部160の出力先が外部になるように制御をする。これにて、補間画素hが求められ、加算・シフト処理部160から外部に出力される。
2. Interpolated pixel (luminance) at (0, 1/2) position among interpolated pixels of 1/2 accuracy
The interpolation pixel h in FIG. 16 is taken as an example.
In this case, the
3.1/2精度の補間画素のうちの、(1/2,1/2)位置の補間画素(輝度)
図16における補間画素jを例にする。
この場合、2通りの求め方がある。
(1)式(5)と式(7)により求める場合
制御部110は、上述した(0,1/2)位置の補間画素を求める際と同様に、画素ccを求めるための6個の参照画素をメモリ84から読み出すと共に、式(3)に対応する処理が行われるように垂直フィルタ150を設定する。この場合、制御部110は、垂直フィルタ150の出力先が制御部110になるように制御する。すなわち、画素ccの位置について、加算・シフト処理の前の補間画素の画素値(垂直補間値)が制御部110に出力される。
3. Interpolation pixel (luminance) at (1/2, 1/2) position among interpolation pixels of 1/2 accuracy
The interpolation pixel j in FIG. 16 is taken as an example.
In this case, there are two ways to obtain it.
(1) When Obtaining by Expression (5) and Expression (7) As in the case of obtaining the interpolation pixel at the (0, 1/2) position described above, the
制御部110は、垂直フィルタ150からの垂直補間値ccを保持しておき、同様の手順で、垂直補間値dd、h'、m'、ee、ffを垂直フィルタ150に求めさせ、保持する。
The
そして、制御部110は、保持した6個の垂直補間値cc、dd、h'、m'、ee、ffを水平フィルタ130に出力し、式(5)が示す処理が行われるように水平フィルタ130を設定する。このとき、制御部110は、水平フィルタ130の出力先が加算・シフト処理部160になるように制御すると共に、式(7)が示す処理が行われるように加算・シフト処理部160を設定し、加算・シフト処理部160の出力先が外部になるように制御する。これにて、補間画素jが求められ、加算・シフト処理部160から外部に出力される。
Then, the
(2)式(6)と式(7)により補間画素jを求める場合
制御部110は、水平フィルタ130に水平補間値aa、bb、b'、s'、gg、hhを求めさせ、保持する。そして、該6個の水平補間値を垂直フィルタ150に出力し、式(6)が示す処理が行われるように垂直フィルタ150を設定する。このとき、制御部110は、垂直フィルタ150の出力先が加算・シフト処理部160になるように制御すると共に、式(7)が示す処理が行われるように加算・シフト処理部160を設定し、加算・シフト処理部160の出力先が外部になるように制御する。これにて、補間画素jが求められ、加算・シフト処理部160から外部に出力される。
(2) When Interpolation Pixel j is Obtained by Equation (6) and Equation (7) The
4.1/4精度の補間画素(輝度)
H.264の場合の1/4精度の補間画素は、1つの参照画素と1つの1/2精度の補間画素の平均(式(8)〜(11))、または2つの1/2精度の補間画素の平均(式(9)〜(19))により求められる。
4. 1/4 precision interpolation pixel (luminance)
H. In the case of H.264, the interpolation pixel with ¼ accuracy is the average of one reference pixel and one ½ accuracy interpolation pixel (equations (8) to (11)), or two ½ accuracy interpolation pixels. Of the average (formulas (9) to (19)).
(1)1つの参照画素と1つの1/2精度の補間画素の平均により求められる場合
制御部110は、上述した通りに、1/2精度の補間画素を水平フィルタ130及び/または垂直フィルタ150と、加算・シフト処理部160に求めさせ、加算・シフト処理部160の出力先が平均処理部170になるように制御する。制御部110は、上記の1つの参照画素をメモリ84から読み出して、加算・シフト処理部160から1/2精度の補間画素が平均処理部170への出力に伴い、該参照画素を平均処理部170に出力する。また、平均処理部170の出力先が外部になるように制御する。
これにて、図16における補間画素a、c、d、nが求められ、平均処理部170から外部に出力される。
(1) When Obtained by Average of One Reference Pixel and One Half Precision Interpolation Pixel As described above, the
Thus, the interpolated pixels a, c, d, and n in FIG. 16 are obtained and output from the average processing unit 170 to the outside.
(2)2つの1/2精度の補間画素の平均により求められる場合
制御部110は、まず、片方の1/2精度の補間画素を求めさせる。この場合、制御部110は、加算・シフト処理部160の出力先が制御部110になるように制御すると共に、加算・シフト処理部160からの片方の1/2精度の補間画素を保持する。
(2) When Obtained by Average of Two Half-Precision Interpolated Pixels First, the
そして、制御部110は、他方の1/2精度の補間画素を求めさせる。この場合、制御部110は、加算・シフト処理部160の出力先が平均処理部170になるように制御すると共に、加算・シフト処理部160から他方の1/2精度の補間画素が平均処理部170への出力に伴い、保持した片方の1/2精度の補間画素を平均処理部170に出力する。また、平均処理部170の出力先が外部になるように制御する。
これにて、図16における補間画素f、i、k、q、e、g、p、rが求められ、平均処理部170から外部に出力される。
And the
Thus, the interpolated pixels f, i, k, q, e, g, p, and r in FIG. 16 are obtained and output from the average processing unit 170 to the outside.
すなわち、H.264の場合、輝度について、全ての1/2精度の補間画素は加算・シフト処理部160から外部に出力され、全ての1/4精度の補間画素は平均処理部170から外部に出力される。
That is, H.I. In the case of H.264, all the ½ precision interpolation pixels are output from the addition /
<VC−1のBicubicの場合>
図17と図18を参照して、補間画素wを例にして説明する。
<VC-1 Bicubic>
The interpolation pixel w will be described as an example with reference to FIGS.
1.4つの参照画素から求められる補間画素(輝度)の場合
この場合、図18における画素Q1、Q2、Q3、Q4は、参照画素であり、図17における補間画素a、dは、1/4位置の補間画素wに該当し、補間画素b、h、mは1/2位置の補間画素wに該当し、補間画素c、nは、3/4位置の補間画素wに該当する。
In the case of an interpolation pixel (luminance) obtained from 1.4 reference pixels In this case, the pixels Q1, Q2, Q3, and Q4 in FIG. 18 are reference pixels, and the interpolation pixels a and d in FIG. This corresponds to the interpolation pixel w at the position, the interpolation pixels b, h, and m correspond to the interpolation pixel w at the 1/2 position, and the interpolation pixels c and n correspond to the interpolation pixel w at the 3/4 position.
この場合、制御部110は、当該補間画素wを求めるために必要な4つの参照画素Q1〜Q4をメモリ84から読出し、水平フィルタ130または垂直フィルタ150に出力すると共に、水平フィルタ130または垂直フィルタ150の出力先が加算・シフト処理部160になり、加算・シフト処理部160の出力先が外部になるように制御し、補間画素wの位置に応じたパラメータを水平フィルタ130または垂直フィルタ150、加算・シフト処理部160に設定する。
In this case, the
具体的には、上記4つの参照画素Q1〜Q4が水平に並び、補間画素wが1/4位置の画素である場合には、制御部110は、該4つの参照画素Q1〜Q4を水平フィルタ130に出力し、式(20)が示す処理が行われるように水平フィルタ130と加算・シフト処理部160のパラメータを設定する。
Specifically, when the four reference pixels Q1 to Q4 are arranged horizontally and the interpolation pixel w is a pixel at the 1/4 position, the
また、上記4つの参照画素Q1〜Q4が水平に並び、補間画素wが1/2位置の画素である場合には、制御部110は、該4つの参照画素Q1〜Q4を水平フィルタ130に出力し、式(21)が示す処理が行われるように水平フィルタ130と加算・シフト処理部160のパラメータを設定する。
When the four reference pixels Q1 to Q4 are arranged horizontally and the interpolation pixel w is a pixel at a 1/2 position, the
また、上記4つの参照画素Q1〜Q4が水平に並び、補間画素wが3/4位置の画素である場合には、制御部110は、該4つの参照画素Q1〜Q4を水平フィルタ130に出力し、式(22)が示す処理が行われるように水平フィルタ130と加算・シフト処理部160のパラメータを設定する。
When the four reference pixels Q1 to Q4 are arranged horizontally and the interpolation pixel w is a pixel at the 3/4 position, the
一方、上記4つの参照画素Q1〜Q4が垂直に並ぶ場合には、制御部110は、参照画素Q1〜Q4を垂直フィルタ150に出力し、補間画素wの位置(1/4位置か、1/2位置か、3/4位置か)に応じて式(20)〜式(22)のいずれかの処理が行われるように垂直フィルタ150と加算・シフト処理部160のパラメータを設定する。
On the other hand, when the four reference pixels Q1 to Q4 are arranged vertically, the
2.4つの補間画素から求められる補間画素(輝度)の場合
この場合、図18における画素Q1、Q2、Q3、Q4は、補間画素である。例えば、図17における補間画素pは、この場合の1/4位置の補間画素に該当し、qはこの場合の1/2位置の補間画素に該当し、補間画素rはこの場合の3/4位置の補間画素に該当する。
2. In the case of an interpolation pixel (luminance) obtained from four interpolation pixels In this case, the pixels Q1, Q2, Q3, and Q4 in FIG. 18 are interpolation pixels. For example, the interpolation pixel p in FIG. 17 corresponds to the interpolation pixel at the 1/4 position in this case, q corresponds to the interpolation pixel at the 1/2 position in this case, and the interpolation pixel r is 3/4 in this case. Corresponds to the position interpolation pixel.
制御部110は、まず、補間画素wを求めるための4つの補間画素Q1〜Q4を求めさせる。例えば、補間画素rを求める場合、まず、垂直フィルタ150と加算・シフト処理部160に補間画素nn、n、s、ssを順次求めさせると共に、加算・シフト処理部160の出力先が制御部110になるように制御する。4つの補間画素nn、n、s、ssは、共に4つの参照画素から求められる補間画素であるため、上記で説明した手法で求められる。
The
制御部110は、加算・シフト処理部160からの補間画素nn、n、sを保持し、補間画素ssが加算・シフト処理部160から出力されると、該4つの補間画素nn、n、s、ssを水平フィルタ130に出力すると共に、式(22)が示す処理が行われるように水平フィルタ130と加算・シフト処理部160を設定する。また、加算・シフト処理部160の出力先が外部になるように制御する。
The
このように、VC−1のBicubicの場合、輝度について、全ての補間画素が加算・シフト処理部160から出力される。
Thus, in the case of VC-1 Bicubic, all the interpolated pixels are output from the addition /
<VC−1のBilinearの場合>
前述したように、この場合、全ての補間画素は、式(23)が示す処理により求められる。式(23)における加算・シフト処理の前の部分は、通常キュービックフィルタにより行われる。
<VC-1 Biline>
As described above, in this case, all the interpolated pixels are obtained by the process shown in Expression (23). The part before the addition / shift processing in Expression (23) is normally performed by a cubic filter.
図5を参照して、本実施の形態において、式(23)を示す処理を実現する手法を説明する。
補間画素eを求めるために、制御部110は、まず、メモリ84から参照画素AとBを読み出して水平フィルタ130に出力し、下記の式(43)が示す処理が行われ、水平フィルタ130の出力先が制御部110になるように水平フィルタ130を設定する。これにより、水平フィルタ130から、画素Fの位置の水平補間値が得られる。制御部110は、水平フィルタ130からの画素Fの水平補間値を保持する。
In order to obtain the interpolation pixel e, the
そして、制御部110は、メモリ84から参照画素CとDを読み出して水平フィルタ130に出力し、式(44)が示す処理が行われ、水平フィルタ130の出力先が制御部110になるように水平フィルタ130を設定する。
Then, the
制御部110は、水平フィルタ130から画素Gの水平補間値を得ると、保持している画素Fの水平補間値と、画素Gの水平補間値を垂直フィルタ150に出力し、式(45)が示す処理が行われるように垂直フィルタ150と加算・シフト処理部160のパラメータを設定すると共に、垂直フィルタ150の出力先が加算・シフト処理部160になり、加算・シフト処理部160の出力先が外部になるように制御する。
When the horizontal interpolation value of the pixel G is obtained from the
式(43)〜(45)が示す処理は、式(23)が示す処理と等価であるため、このようにして、VC−1のBilinearの場合、輝度について、全ての補間画素は、加算・シフト処理部160から外部に出力される。
Since the processing represented by the equations (43) to (45) is equivalent to the processing represented by the equation (23), in the case of VC-1 Bilinear, all the interpolated pixels are added / The data is output from the
勿論、式(43)〜(45)の代わりに、式(23)が示す処理と等価であるため、下記の式(46)〜(48)が示すように処理してもよい。図6を参照して説明する。
補間画素eを求めるために、制御部110は、まず、メモリ84から参照画素AとCを読み出して垂直フィルタ150に出力し、式(46)が示す処理が行われ、垂直フィルタ150の出力先が制御部110になるように垂直フィルタ150を設定する。これにより、垂直フィルタ150から、画素Fの位置の垂直補間値が得られる。制御部110は、垂直フィルタ150からの画素Fの垂直補間値を保持する。
In order to obtain the interpolation pixel e, the
そして、制御部110は、メモリ84から参照画素BとDを読み出して垂直フィルタ150に出力し、式(47)が示す処理が行われ、垂直フィルタ150の出力先が制御部110になるように垂直フィルタ150を設定する。
Then, the
制御部110は、垂直フィルタ150から画素Gの垂直補間値を得ると、保持している画素Fの垂直補間値と、画素Gの垂直補間値を水平フィルタ130に出力し、式(48)が示す処理が行われるように水平フィルタ130と加算・シフト処理部160のパラメータを設定すると共に、水平フィルタ130の出力先が加算・シフト処理部160になり、加算・シフト処理部160の出力先が外部になるように制御する。
When the
この場合も、全ての補間画素は、加算・シフト処理部160から外部に出力される。
Also in this case, all the interpolated pixels are output from the addition /
<MPEG4のqmcモードの場合>
この場合、1/4精度まで補間画素を求める必要がある。
1.1/2精度の補間画素(輝度)の場合
(1)(1/2,0)位置の補間画素
図20における補間画素b−1とb1は、この場合の補間画素に該当する。8つの参照画素に対して式(25)が示す処理が行われるように、制御部110は、水平フィルタ130と加算・シフト処理部160の設定及び制御を行う。補間画素b−1とb1を求める処理は、水平フィルタ130のタップ数、及び各パラメータが異なる以外、H.264の場合の(1/2,0)位置の補間画素を求める処理と同様であるので、ここで詳細な説明を省略する。
<MPEG4 qmc mode>
In this case, it is necessary to obtain interpolated pixels up to ¼ precision.
1. In the case of an interpolation pixel (luminance) with 1/2 accuracy (1) Interpolation pixel at position (1/2, 0) Interpolation pixels b −1 and b 1 in FIG. 20 correspond to the interpolation pixel in this case. The
(2)1/2精度の補間画素のうちの、(0,1/2)位置の補間画素
図20における補間画素cは、この場合の補間画素に該当する。8つの参照画素に対して式(26)が示す処理が行われるように、制御部110は、垂直フィルタ150と加算・シフト処理部160の設定及び制御を行う。補間画素cを求める処理は、垂直フィルタ150のタップ数、及び各パラメータが異なる以外、H.264の場合の(0,1/2)位置の補間画素を求める処理と同様であるので、ここで詳細な説明を省略する。
(2) Interpolation pixel at position (0, 1/2) among interpolation pixels of 1/2 precision The interpolation pixel c in FIG. 20 corresponds to the interpolation pixel in this case. The
(3)1/2精度の補間画素のうちの、(1/2,1/2)位置の補間画素
図20における補間画素dは、この場合の補間画素に該当する。この場合、まず、制御部110は、補間画素dを求めるための8つの(1/2,0)位置の補間画素を水平フィルタ130と加算・シフト処理部160に求めさせると共に、加算・シフト処理部160から出力されたこの8つの補間画素を保持する。そして、保持された8つの補間画素を垂直フィルタ150に出力し、式(27)が示す処理が行われるように垂直フィルタ150と加算・シフト処理部160を設定する。また、加算・シフト処理部160の出力先が外部になるように加算・シフト処理部160を制御する。
すなわち、MPEG4のqmcモードの場合、全ての1/2精度の補間画素は、加算・シフト処理部160から外部に出力される。
(3) Interpolation Pixel at (1/2, 1/2) Position Among Interpolation Pixels of 1/2 Precision The interpolation pixel d in FIG. 20 corresponds to the interpolation pixel in this case. In this case, first, the
That is, in the MPEG4 qmc mode, all the half-precision interpolation pixels are output from the addition /
2.1/4精度の補間画素(輝度)の場合
(1)(1/4,0)位置と(3/4,0)位置の補間画素
図20における補間画素eとfは、この場合の補間画素に該当する。式(28)と(29)が示すように、補間画素eとfは、1つの参照画素と1つの(1/2,0)位置の補間画素の平均により求められる。そのため、制御部110は、まず、上述したように、水平フィルタ130と加算・シフト処理部160に該(1/2,0)位置の補間画素を求めさせ、加算・シフト処理部160の出力先が平均処理部170になるように制御する。加算・シフト処理部160から該(1/2,0)位置の補間画素が平均処理部170への出力に伴い、上記1つの参照画素を平均処理部170に出力する。また、平均処理部170の出力先が外部になるように制御する。これにて、平均処理部170から外部に(1/4,0)位置または(3/4,0)位置の補間画素が出力される。
2. In the case of an interpolation pixel (luminance) with a precision of ¼ (1) (1/4, 0) position and (3/4, 0) position interpolation pixel The interpolation pixels e and f in FIG. Corresponds to interpolation pixel. As shown in equations (28) and (29), the interpolation pixels e and f are obtained by averaging one reference pixel and one (1/2, 0) position interpolation pixel. Therefore, as described above, the
(2)(1/4,1/2)位置と(3/4,1/2)位置の補間画素
図20における補間画素kとlは、この場合の補間画素に該当する。
(2) Interpolated Pixels at (1/4, 1/2) Position and (3/4, 1/2) Position Interpolated pixels k and l in FIG. 20 correspond to the interpolated pixels in this case.
式(30)が示すように、(1/4,1/2)位置の補間画素kは、8つの(1/4,0)位置の補間画素に対して8タップの垂直方向の補間を行って得た値(ここでは垂直補間値)を加算・シフト処理することにより得られる。制御部110は、まず、この8つの(1/4,0)位置の補間画素が求められるように設定や制御を行う。この場合、制御部110は、平均処理部170の出力先が制御部110になるように制御をし、平均処理部170からの出力を保持する。
As shown in Equation (30), the interpolation pixel k at the (1/4, 1/2) position performs 8-tap vertical interpolation on the 8 (1/4, 0) interpolation pixels. It is obtained by adding and shifting the value obtained here (vertical interpolation value here). First, the
そして、制御部110は、平均処理部170からの8つの(1/4,0)位置の補間画素を垂直フィルタ150に出力し、式(30)が示す処理が行われるように垂直フィルタ150と加算・シフト処理部160を設定する。また、加算・シフト処理部160の出力先が外部になるように制御する。
Then, the
式(31)が示すように、(3/4,1/2)位置の補間画素lは、8つの(3/4,0)位置の補間画素に対して8タップの垂直方向の補間を行って得た垂直補間値を加算・シフト処理することにより得られる。補間画素lを求める処理は、8つの(1/4,0)位置の補間画素の代わりに8つの(3/4,0)位置の補間画素が使用される点を除き、(1/4,1/2)位置の補間画素kを求める処理と同様であるので、ここで詳細な説明を省略する。 As shown in Expression (31), the interpolation pixel l at the (3/4, 1/2) position performs 8-tap vertical interpolation on the eight (3/4, 0) interpolation pixels. It is obtained by adding and shifting the vertical interpolation value obtained in this way. The process for obtaining the interpolated pixel l is (1/4, except that 8 (3/4, 0) position interpolated pixels are used instead of 8 (1/4, 0) position interpolated pixels. Since this is the same as the process for obtaining the interpolation pixel k at the 1/2) position, detailed description thereof is omitted here.
このように、MPEG4のqmcモードの場合、1/4精度の補間画素のうちの、(1/4,1/2)位置と(3/4,1/2)位置の補間画素は、加算・シフト処理部160から外部に出力される。
As described above, in the qmc mode of MPEG4, the interpolation pixels at the (1/4, 1/2) position and the (3/4, 1/2) position among the interpolation pixels of 1/4 accuracy are added and The data is output from the
(3)他の1/4精度の補間画素
図20におけるg、h、i、j、m、n、o、pは、この場合の補間画素に該当する。式(32)〜(39)が示すように、上述した各補間画素は、1つの参照画素と1つの1/2精度の補間画素の平均値(式(32)、(36))、または2つの1/2精度の補間画素の平均値(式(34)、(35)、(38))、または2つの1/4精度の補間画素の平均値(式(33)、(37)、(39))である。この場合の各補間画素は、平均処理部170から外部に出力される。
(3) Other ¼ precision interpolation pixels g, h, i, j, m, n, o, and p in FIG. 20 correspond to the interpolation pixels in this case. As shown in equations (32) to (39), each interpolation pixel described above is an average value of one reference pixel and one half-precision interpolation pixel (equations (32), (36)), or 2 The average value of two ½ precision interpolation pixels (Equations (34), (35), (38)), or the average value of two ¼ accuracy interpolation pixels (Equations (33), (37), ( 39)). Each interpolation pixel in this case is output from the average processing unit 170 to the outside.
<MPEG4のhmcモードとMPEG2の場合>
1.(1/2,0)と(0,1/2)位置の補間画素
図21における補間画素b、c、eは、この場合の補間画素に該当する。式(40)と(41)が示すように、これらの補間画素は、2つの参照画素の平均値により求められる。そのため、制御部110は、メモリ84から該補間画素を求めるために必要な2つの参照画素を読み出して平均処理部170に出力し、平均処理部170の出力先が外部になるように制御する。すなわち、この場合、(1/2,0)と(0,1/2)位置の補間画素は、平均処理部170から外部に出力される。
<For MPEG4 hmc mode and MPEG2>
1. Interpolated pixels at positions (1/2, 0) and (0, 1/2) Interpolated pixels b, c, and e in FIG. 21 correspond to the interpolated pixels in this case. As shown in equations (40) and (41), these interpolated pixels are obtained from the average value of the two reference pixels. Therefore, the
2.(1/2,1/2)位置の補間画素
図21における画素dは、この場合の補間画素に該当する。式(42)が示すように、この補間画素は、上下左右の4つの参照画素の平均値であり、通常キュービックフィルタにより求められる。
2. Interpolated Pixel at (1/2, 1/2) Position Pixel d in FIG. 21 corresponds to the interpolated pixel in this case. As shown in the equation (42), this interpolation pixel is an average value of four reference pixels of upper, lower, left, and right, and is usually obtained by a cubic filter.
本実施の形態において、VC−1のBilinearの場合と同様の手法で、補間画素dが求められる。図5と図6、及び式(43)〜(45)における「xFrc」、「yFrc」が「0.5」に固定され、パラメータ「rnd」が異なる点を除き、補間画素dを求める処理は、VC−1のBilinearの場合に補間画素eを求める処理と同様であるので、ここで詳細な説明を省略する。なお、MPEG2の場合は、「rnd」というパラメータが無いので、加算・シフト処理部160に対して「rnd」が「0」に設定される。
In the present embodiment, the interpolation pixel d is obtained by the same method as in the case of VC-1 Bilinear. The processing for obtaining the interpolated pixel d is performed except that “xFrc” and “yFrc” in FIGS. 5 and 6 and equations (43) to (45) are fixed to “0.5” and the parameter “rnd” is different. In the case of VC-1 Bilinear, the process is the same as the process for obtaining the interpolated pixel e, and a detailed description thereof will be omitted here. In the case of MPEG2, since there is no parameter “rnd”, “rnd” is set to “0” for the addition /
すなわち、MPEG4のhmcモードとMPEG2の場合、(1/2,1/2)位置の補間画素は加算・シフト処理部160から出力される。
That is, in the MPEG4 hmc mode and MPEG2, the interpolation pixel at the (1/2, 1/2) position is output from the addition /
<色差の補間画素の場合>
色差の補間画素は、VC−1のBilinearの場合と同様の手法で求められる。
<In the case of interpolated pixels for color difference>
The interpolated pixels of the color difference are obtained by the same method as in the case of VC-1 Bilinear.
本実施の形態の動画像復号装置80における動き補償エンジン100は、制御部110と、水平フィルタ130を備えた水平フィルタリング処理部120と、垂直フィルタ150を備えた垂直フィルタリング処理部140と、加算・シフト処理部160と、平均処理部170とを有する。水平フィルタリング処理部120と垂直フィルタリング処理部140の出力先は、制御部110と加算・シフト処理部160間で切り換え可能である。加算・シフト処理部160の出力先は、制御部110と、平均処理部170と、外部との間で切り換え可能である。平均処理部170の出力先は、外部と制御部110間で切り換え可能である。制御部110は、動画像の圧縮規格と目標位置に応じて、各処理部のパラメータの設定、各処理部の出力先の制御、いずれかの処理部から制御部110に出力された該処理部の処理結果の保持、参照画素及び/または保持中の値をいずれかの処理への出力などを行うことにより、目標位置の補間画素を求める。
The
目標位置の補間画素を求めるために、上下左右に隣接する4つの画素に対して2次元の補間が必要な場合に、制御部110は、該4つの画素を、水平に並ぶ2つの画素ずつ水平フィルタ130に出力し、その後、水平フィルタ130により得られた2つの水平補間値を垂直フィルタ150に出力する。または、4つの画素を、垂直に並ぶ2つの画素ずつ垂直フィルタ150に出力し、その後、垂直フィルタ150により得られた2つの垂直補間値を水平フィルタ130に出力する。
When two-dimensional interpolation is required for four pixels that are adjacent vertically and horizontally in order to obtain an interpolation pixel at the target position, the
このように、本実施の形態における動き補償エンジン100は、複数の圧縮規格に対応できると共に、2つのフィルタによりキュービックフィルタの機能を実現できている。そのため、動き補償装置の回路規模が小さくできる。
As described above, the
また、図22に示す動き補償装置は、補間処理が垂直フィルタ、水平フィルタの順に固定されている。しかし、MPEG4のASP(Advanced Simple Profile)では、1/4精度の動き補償の際に、補間処理が水平フィルタ、垂直フィルタの順で定められている。従って、図22に示す動き補償装置は、MPEG4の1/4精度の動き補償には対応できない。 In the motion compensation device shown in FIG. 22, the interpolation processing is fixed in the order of the vertical filter and the horizontal filter. However, in the ASP (Advanced Simple Profile) of MPEG4, interpolation processing is determined in the order of the horizontal filter and the vertical filter at the time of 1/4 precision motion compensation. Therefore, the motion compensation apparatus shown in FIG. 22 cannot cope with motion compensation with 1/4 accuracy of MPEG4.
対して、本実施の形態における動き補償エンジン100によれば、制御部110により、水平フィルタと垂直フィルタの処理順番が任意に調整可能であり、MPEG4の1/4精度の動き補償にも対応できる。
On the other hand, according to the
<第2の実施の形態>
図7は、本発明の第2の実施の形態にかかる動き補償エンジン200を示す。動き補償エンジン200は、図2に示す動き補償エンジン100の代わりに図1に示す動画像復号装置80に設けることができる。
<Second Embodiment>
FIG. 7 shows a
動き補償エンジン200は、制御部210、水平フィルタリング処理部120、垂直フィルタリング処理部140、加算・シフト処理部260、平均処理部270を備える。
The
水平フィルタリング処理部120と垂直フィルタリング処理部140は、動き補償エンジン100における水平フィルタリング処理部120と垂直フィルタリング処理部140と同様であり、ここで詳細な説明を省略する。
The horizontal
加算・シフト処理部260は、動き補償エンジン100における加算・シフト処理部160と同様の機能を実現するものであるが、水平加算・シフト処理部262と垂直加算・シフト処理部264に分けられている。平均処理部270は、動き補償エンジン100における平均処理部170と同様の機能を実現するものであるが、水平平均処理部272と垂直平均処理部274に分けられている。
The addition /
水平加算・シフト処理部262は、水平フィルタリング処理部120からの水平補間値が入力され、該水平補間値に対して加算・シフト処理を行う。加算・シフト処理のパラメータが可変であり、処理結果の加算・シフト値の出力先は、制御部210と水平平均処理部272間で切り換え可能である。水平加算・シフト処理部262は、パラメータが制御部210により設定され、出力先が制御部210により制御される。
The horizontal addition /
水平加算・シフト処理部262は、水平フィルタリング処理部120からの水平補間値が入力され、該水平補間値に対して加算・シフト処理を行う。加算・シフト処理のパラメータが可変であり、処理結果の加算・シフト値の出力先は、外部、制御部210、水平平均処理部272間で切り換え可能である。水平加算・シフト処理部262は、パラメータが制御部210により設定され、出力先が制御部210により制御される。
The horizontal addition /
垂直加算・シフト処理部264は、垂直フィルタリング処理部140からの垂直補間値が入力され、該垂直補間値に対して加算・シフト処理を行う。加算・シフト処理のパラメータが可変であり、処理結果の加算・シフト値の出力先は、外部と、制御部210、垂直平均処理部274間で切り換え可能である。垂直加算・シフト処理部264も、パラメータが制御部210により設定され、出力先が制御部210により制御される。
The vertical addition / shift processing unit 264 receives the vertical interpolation value from the vertical
水平平均処理部272は、2つの値が入力され、該2つの値の平均値を求めるものである。この2つの値は、制御部210と水平加算・シフト処理部262のいずれか一方または両方から入力される。水平平均処理部272は、出力先が外部と制御部210間で切り換え可能である。水平平均処理部272の出力先は、制御部210により制御される。
The horizontal
垂直平均処理部274は、2つの値が入力され、該2つの値の平均値を求めるものである。この2つの値は、制御部210と垂直加算・シフト処理部264のいずれか一方または両方から入力される。垂直平均処理部274も、出力先が外部と制御部210間で切り換え可能である。垂直平均処理部274の出力先は、制御部210により制御される。
The vertical average processing unit 274 receives two values and calculates an average value of the two values. These two values are input from one or both of the
制御部210は、補間画素を求める際に、制御部110が加算・シフト処理部160に対して行う設定と制御を、適宜、水平加算・シフト処理部262と垂直加算・シフト処理部264に対して行い、制御部110が平均処理部170に対して行う設定と制御を、適宜、水平平均処理部272と垂直平均処理部274に対して行う。これらの点を除き、動き補償エンジン100における制御部110と同様の動作をするので、ここで詳細な説明を省略する。
When determining the interpolation pixel, the
本実施の形態にかかる動き補償エンジン200は、図2に示す動き補償エンジン100と同様の効果を得ることができる。また、加算・シフト処理部260を水平加算・シフト処理部262と垂直加算・シフト処理部264に分け、平均処理部270を水平平均処理部272と垂直平均処理部274に分けることによって、制御部210による制御が単純にできる。
The
勿論、動き補償エンジン200に対して、加算・シフト処理部260の代わりに、動き補償エンジン100における加算・シフト処理部160を設け、または平均処理部270の代わりに、動き補償エンジン100における平均処理部170を設けるようにしてもよい。
Of course, the
<第3の実施の形態>
図8は、本発明の第3の実施の形態にかかる動き補償エンジン300を示す。動き補償エンジン300は、図2に示す動き補償エンジン100の代わりに図1に示す動画像復号装置80に設けることができる。動き補償エンジン300では、垂直フィルタリング処理部は、並行して動作可能な複数の垂直フィルタを備える。
<Third Embodiment>
FIG. 8 shows a
図8に示すように、動き補償エンジン300は、制御部310、水平フィルタリング処理部320、垂直フィルタリング処理部340、水平加算・シフト処理部360、4つの垂直加算・シフト処理部372〜378、水平平均処理部380、垂直平均処理部390を備える。水平フィルタリング処理部320は、水平フィルタ330を有し、垂直フィルタリング処理部340は、4つの垂直フィルタ342〜348を有し、該4つの垂直フィルタ342〜348は、4つの垂直加算・シフト処理部372〜378にそれぞれ対応する。
As shown in FIG. 8, the
水平フィルタ330、水平加算・シフト処理部360、水平平均処理部380は、図7に示す動き補償エンジン200の水平フィルタ130、水平加算・シフト処理部262、水平平均処理部272と同様の動作をする。垂直加算・シフト処理部372〜378は、動き補償エンジン200の垂直フィルタ150と同様の動作をする。垂直平均処理部390は、垂直加算・シフト処理部378と、垂直加算・シフト処理部376と、制御部310に接続され、これらの機能ブロックのうちのいずれか2つから値の入力がされる。
The
制御部310は、水平レジスタ群312と垂直レジスタ群314備える。水平レジスタ群312は、水平フィルタ330の8つのレジスタにそれぞれ対応し、該8つのレジスタに設定する値をそれぞれ格納する8つのレジスタを有する。垂直レジスタ群314は、垂直フィルタリング処理部340に含まれる4つの垂直フィルタのレジスタ(計32個)にそれぞれ対応し、該32個のレジスタに設定する値をそれぞれ格納する32個のレジスタを有する。
The
制御部310は、目標位置が整数位置である場合に、該目標位置の参照画素をメモリ84から読み出して外部に出力する。目標位置が整数位置ではない場合に、補間画素を求めるための種々の設定や制御を行う。例として、いくつかの圧縮規格と目標位置の場合について説明する。説明において参照する図面において、実線枠により示動作する機能ブロックを意味し、点線枠により動作しない機能ブロックを示す。なお、分かりやすくように、動作しない機能ブロックへの入力線と、該機能ブロックからの出力線とを図示しないようにする。
When the target position is an integer position, the
図9は、H.264の場合に、輝度について、動き補償エンジン300による(1/4,1/2)位置の補間画素を求める処理を説明するための図である。図16における補間画素iがこの場合の補間画素に該当するため、補間画素iを例にする。
FIG. 6 is a diagram for explaining processing for obtaining an interpolation pixel at a position of (1/4, 1/2) by the
制御部310は、DMAコントローラ86を介してメモリ84から参照画素E、F、G、H、I、Jを読み出し、水平レジスタ群312の8つのレジスタのうちの6つを介して、水平フィルタ330の8つのレジスタのうちの6つにそれぞれ設定する。また、式(1)が示す処理が行われるように水平フィルタ330のパラメータを設定すると共に、水平フィルタ330の出力先が制御部310になるように制御する。
The
制御部310は、水平フィルタ330により得られた水平補間値b'を、垂直レジスタ群314における、垂直フィルタ346に対応する8つのレジスタのうちの1つに一時的に保持する。制御部310は、b'を求めるときと同様の処理で、aa、bb、s'、gg、hhを水平フィルタリング処理部320に求めさせて、保持する。
The
制御部310は、aa、bb、b'、s'、gg、hhが求められると、制御部310は、該6つの水平補間値を垂直フィルタ346の8つのレジスタのうちの6つにそれぞれ設定する。また、式(6)が示す処理が行われるように垂直フィルタ346のパラメータを設定し、垂直フィルタ346の出力先が垂直加算・シフト処理部376になるように制御する。
When the
並行して、制御部310は、メモリ84から6つの参照画素A、C、G、M、R、Tを読み出して垂直フィルタ348の8つのレジスタ内の6つにそれぞれ設定する。また、式(3)が示す処理が行われるように垂直フィルタ348のパラメータを設定すると共に、垂直フィルタ348の出力先が垂直加算・シフト処理部378になるように制御する。
In parallel, the
また、制御部310は、垂直加算・シフト処理部376に対して式(7)に示す加算・シフト処理のパラメータを設定し、垂直加算・シフト処理部378に対して式(4)が示す加算・シフト処理のパラメータを設定し、垂直加算・シフト処理部376と垂直加算・シフト処理部378の出力先が垂直平均処理部390になり、垂直平均処理部390の出力先が外部になるように制御する。
In addition, the
垂直加算・シフト処理部376は、垂直フィルタ346が出力した垂直補間値(j')を式(7)に示す加算・シフト処理し、補間画素jを得て垂直平均処理部390に出力する。垂直加算・シフト処理部378は、垂直フィルタ348が出力した垂直補間値(h')を式(4)に示す加算・シフト処理し、補間画素hを得て垂直平均処理部390に出力する。
The vertical addition /
垂直平均処理部390は、式(13)が示すように、補間画素jと補間画素hを平均して補間画素iとなる平均値を得て外部に出力する。
The vertical
図10は、VC−1のBicubicの場合に、輝度について、(3/4,3/4)位置の補間画素を求める処理を説明するための図である。図17における補間画素rがこの場合の補間画素に該当するため、補間画素rを例にする。 FIG. 10 is a diagram for explaining processing for obtaining an interpolation pixel at a position (3/4, 3/4) with respect to luminance in the case of VC-1 Bicubic. Since the interpolation pixel r in FIG. 17 corresponds to the interpolation pixel in this case, the interpolation pixel r is taken as an example.
制御部310は、メモリ84から参照画素「A、E、I、M」、「B、F、J、N」、「C、G、K、O」、「D、H、L、P」を読み出して、垂直フィルタ342〜348のレジスタにそれぞれ設定する。また、式(22)が示す処理が行われるように、垂直フィルタ342〜348と、垂直加算・シフト処理部372〜378のパラメータを設定すると共に、各垂直フィルタの出力先が該垂直フィルタに対応する垂直加算・シフト処理部になり、各加算・シフト処理部の出力先が制御部310になるように制御する。
The
制御部310は、水平レジスタ群312を介して、垂直加算・シフト処理部372から出力した補間画素nn、n、s、ssを水平フィルタ330の8つのレジスタのうちの4つにそれぞれ設定する。また、式(22)が示す処理が行われるように、水平フィルタ330と水平加算・シフト処理部360のパラメータを設定し、水平フィルタ330の出力先が水平加算・シフト処理部360になり、水平加算・シフト処理部360の出力先が外部になるように制御する。
これにて、補間画素rは、水平加算・シフト処理部360から外部に出力される。
The
Thus, the interpolation pixel r is output from the horizontal addition /
図11は、MPEG4のqmcモードで、輝度について、(1/4,3/4)位置の補間画素を求める処理を説明するための図である。図20における補間画素nがこの場合の補間画素に該当するため、補間画素nを例にする。 FIG. 11 is a diagram for explaining processing for obtaining an interpolation pixel at a (1/4, 3/4) position with respect to luminance in the qmc mode of MPEG4. Since the interpolation pixel n in FIG. 20 corresponds to the interpolation pixel in this case, the interpolation pixel n is taken as an example.
制御部310は、メモリ84から8つの参照画素A−4,−1、A−3,−1、A−2,−1、A−1,−1、A1,−1、A2,−1、A3,−1、A4,−1を読み出して、水平フィルタ330の8つのレジスタにそれぞれ設定する。また、式(25)が示す処理が行われるように、水平フィルタ330と水平加算・シフト処理部360のパラメータを設定し、水平フィルタ330の出力先が水平加算・シフト処理部360になり、水平加算・シフト処理部360の出力先が水平平均処理部380になり、水平平均処理部380の出力先が制御部310になるように制御する。これにより、水平加算・シフト処理部360から補間画素b−1となる加算・シフト値が得られ、水平平均処理部380に出力される。
並行して、制御部310は、参照画素A1,−1を水平平均処理部380に出力する。これにより、水平平均処理部380から、b−1とA1,−1の平均値が得られ、制御部310に出力される。この平均値は、式(28)が示すように、補間画素e−1である。
In parallel, the
制御部310は、e−1を求めるときと同様の処理で、e−4、e−3、e−2、e1、e2、e3、e4を水平フィルタ330、水平加算・シフト処理部360、水平平均処理部380に求めさせて、垂直レジスタ群314に一時的に保持する。
The
e−4、e−3、e−2、e−1、e1、e2、e3、e4が求められると、制御部310は、この8つの補間画素を垂直フィルタ348に設定する。また、式(30)が示す処理が行われるように、垂直フィルタ348と垂直加算・シフト処理部378のパラメータを設定し、垂直フィルタ348の出力先が垂直加算・シフト処理部378になり、垂直加算・シフト処理部378の出力先が垂直平均処理部390になり、垂直平均処理部390の出力先が外部になるように制御する。
When e −4 , e −3 , e −2 , e −1 , e 1 , e 2 , e 3 , and e 4 are obtained, the
垂直加算・シフト処理部378から補間画素kとなる加算・シフト値が垂直平均処理部390に出力される。並行して、制御部310は、補間画素e1を垂直平均処理部390に出力する。これにより、垂直平均処理部390から、kとe1の平均値が得られ、外部に出力される。この平均値が、式(37)が示すように、補間画素nである。
The addition / shift value to be the interpolation pixel k is output from the vertical addition /
図12は、VC−1のBilinearの場合、輝度について、補間画素を求める処理を説明するための図である。この場合、各補間画素は、図19と式(23)が示すように、該補間画素を囲む上下左右の4つの参照画素に対して2次元の線形補間を行うことにより得られる。 FIG. 12 is a diagram for explaining processing for obtaining an interpolated pixel for luminance in the case of VC-1 Bilinear. In this case, as shown in FIG. 19 and Expression (23), each interpolation pixel is obtained by performing two-dimensional linear interpolation on four reference pixels on the top, bottom, left, and right surrounding the interpolation pixel.
本実施の形態において、図19と式(23)が示す処理は、図5と式(43)〜(45)に示すように行われる。具体的には、図12に示すように、制御部310は、補間画素eを求めるために、まず、メモリ84から参照画素AとBを読み出して水平フィルタ330の8つのレジスタのうちの2つに設定する。また、式(43)が示す処理が行われるように、水平フィルタ330に対して、パラメータ「xFrc」と「8−xFrc」を設定し、水平フィルタ330の出力先が制御部310になるように制御する。
In the present embodiment, the processing shown in FIG. 19 and equation (23) is performed as shown in FIG. 5 and equations (43) to (45). Specifically, as shown in FIG. 12, the
水平フィルタ330の出力は、画素Fである。制御部310は、画素Fを垂直レジスタ群314の1つのレジスタに保持すると共に、参照画素C、Dを水平フィルタ330に設定し、画素Gを求めさせる。
The output of the
水平フィルタ330により画素Gが求められると、制御部310は、画素FとGを垂直フィルタ348の8つのレジスタのうちの2つに設定する。また、式(45)が示す処理が行われるように、垂直フィルタ348のパラメータ「yFrc」と「8−yFrc」、垂直加算・シフト処理部378のパラメータ「rnd」を設定し、垂直フィルタ348の出力先が垂直加算・シフト処理部378になり、垂直加算・シフト処理部378の出力先が外部になるように制御する。
When the pixel G is obtained by the
これにより、垂直加算・シフト処理部378から、補間画素eとなる加算・シフト値が外部に出力される。
Thus, the vertical addition /
図13は、MPEG4のhmcモードまたはMPEG2の場合、輝度について、(1/2,0)位置の補間画素を求める処理を説明するための図である。図21における補間画素bがこの場合の補間画素に該当するため、補間画素bを例にする。 FIG. 13 is a diagram for explaining a process for obtaining an interpolation pixel at the (1/2, 0) position with respect to luminance in the MPEG4 hmc mode or MPEG2. Since the interpolation pixel b in FIG. 21 corresponds to the interpolation pixel in this case, the interpolation pixel b is taken as an example.
図13に示すように、制御部310は、メモリ84から参照画素A、Bを読み出して水平平均処理部380に出力し、水平平均処理部380の出力先が外部になるように制御する。これにより、参照画素AとBの平均値が水平平均処理部380から外部に出力される。この平均値は、補間画素bとなる。
As illustrated in FIG. 13, the
MPEG4のhmcモードまたはMPEG2の場合、輝度について、(1/2,1/2)位置の補間画素(図21における補間画素d)を求める際に、式(42)が示す2次元の線形補間が必要である。これについて、図12に示すVC−1Bilinear時の2次元の線形補間と同様な手法で行われる。 In the case of the MPEG4 hmc mode or MPEG2, the two-dimensional linear interpolation represented by the equation (42) is performed when obtaining the interpolation pixel at the (1/2, 1/2) position (interpolation pixel d in FIG. 21) for luminance. is necessary. This is performed by a method similar to the two-dimensional linear interpolation at the time of VC-1 Bilinear shown in FIG.
色差については、H.264、VC−1、MPEG4、MPEG2のいずれの規格においても、2次元の線形補間により補間画素が求められる。この場合も、図12に示すVC−1Bilinear時の2次元の線形補間と同様な手法で補間画素を求めればよい。 For color difference, see H.C. In any of the H.264, VC-1, MPEG4, and MPEG2 standards, an interpolation pixel is obtained by two-dimensional linear interpolation. Also in this case, an interpolation pixel may be obtained by a method similar to the two-dimensional linear interpolation at the time of VC-1 Bilinear shown in FIG.
本第3の実施の形態にかかる動き補償エンジン300は、前述した動き補償エンジン100と動き補償エンジン200と同様の効果を得ることができると共に、並行して動作可能な複数の垂直フィルタを設けることにより、処理の高速化を図ることができる。
The
<第4の実施の形態>
動き補償エンジンに垂直フィルタを複数設けると共に、水平フィルタも複数設けてもよい。図14は、並行して動作可能な4つの水平フィルタと、並行して動作可能な8つの垂直フィルタを備えた動き補償エンジン400を示す。
<Fourth embodiment>
A plurality of vertical filters and a plurality of horizontal filters may be provided in the motion compensation engine. FIG. 14 shows a
動き補償エンジン400は、制御部410、水平フィルタリング処理部420、垂直フィルタリング処理部440、加算・シフト処理部460、水平平均処理部472、垂直平均処理部474を備える。
The
水平フィルタリング処理部420は、4つの水平フィルタを有し、該4つの水平フィルタは、前述した各実施の形態における動き補償エンジンの水平フィルタと同様の構成を有する。
The horizontal
垂直フィルタリング処理部440は、8つの垂直フィルタを有し、該8つの垂直フィルタは、前述した各実施の形態における動き補償エンジンの垂直フィルタと同様の構成を有する。
The vertical
加算・シフト処理部460は、水平フィルタリング処理部420の各水平フィルタにそれぞれ対応する4つの水平加算・シフト処理部と、垂直フィルタリング処理部440の各垂直フィルタとそれぞれ対応する8つの垂直加算・シフト処理部を有する。
The addition /
水平平均処理部472と垂直平均処理部474は、平均処理部472を構成する。
The horizontal
水平フィルタリング処理部420における各水平フィルタの出力先は、相対応する水平加算・シフト処理部と、制御部410間で切り換え可能である。垂直フィルタリング処理部440における各垂直フィルタの出力先は、相対応する垂直加算・シフト処理部と、制御部410間で切り換え可能である。
The output destination of each horizontal filter in the horizontal
加算・シフト処理部460の各水平加算・シフト処理部の出力先は、水平平均処理部472、制御部410、外部間で切り換え可能である。加算・シフト処理部460の各垂直加算・シフト処理部の出力先は、垂直平均処理部474、制御部410、外部間で切り換え可能である。
The output destination of each horizontal addition / shift processing unit of the addition /
水平平均処理部472と垂直平均処理部474の出力先は、制御部410と外部間で切り換え可能である。
The output destinations of the horizontal
制御部410は、目標位置が整数位置であるときに、該整数位置の参照画素を読み出して外部に出力する。一方、目標位置が整数位置ではないときに、コーデック信号が示す圧縮規格と目標位置とに応じて、各処理部のパラメータの設定、各処理部の出力先の制御、該処理部の処理結果の出力先が制御部410であるときにおいて該処理結果の保持、各処理部に出力する値などの設定および制御を行うことによって、目標位置の補間画素を求める。
When the target position is an integer position, the
本実施の形態の動き補償エンジン400は、前述した各動き補償エンジンの効果を得ることができると共に、並行して動作可能な水平フィルタと垂直フィルタの数が多いので、より高速な処理ができる。
The
以上、実施の形態をもとに本発明を説明した。実施の形態は例示であり、本発明の主旨から逸脱しない限り、上述した実施の形態に対してさまざまな変更、増減を行ってもよい。これらの変更、増減が行われた変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described above based on the embodiment. The embodiment is an exemplification, and various modifications and changes may be made to the above-described embodiment without departing from the gist of the present invention. It will be understood by those skilled in the art that modifications in which these changes and increases / decreases are also within the scope of the present invention.
例えば、上述した各実施の形態において、各処理部のパラメータは、制御部により設定される。これらの処理部の内部に、圧縮規格と目標位置に応じてパラメータを切り換える機能ブロックを設けるようにしてもよい。この場合、これらの機能ブロックは、上述した各実施の形態における制御部の一部になる。 For example, in each embodiment described above, the parameters of each processing unit are set by the control unit. A functional block for switching parameters according to the compression standard and the target position may be provided inside these processing units. In this case, these functional blocks become part of the control unit in each of the above-described embodiments.
また、上述した各実施の形態において、各処理部の出力先は、制御部により制御される。これらの処理部の内部に、圧縮規格と目標位置に応じて出力先を切り換えるセレクタを設けるようにしてもよい。この場合、これらのセレクタは、上述した各実施の形態における制御部の一部になる。 Moreover, in each embodiment mentioned above, the output destination of each process part is controlled by the control part. A selector for switching the output destination according to the compression standard and the target position may be provided inside these processing units. In this case, these selectors become part of the control unit in each of the above-described embodiments.
30 DMA I/F
40 動き補償エンジン
41 垂直フィルタ
42 第1水平フィルタ
43 第2水平フィルタ
44 キュービック整列部
45 キュービックフィルタ
80 動画像復号装置
82 システムバス
84 メモリ
86 DMAコントローラ
88 エントロピー復号部
90 DMA IF
100 動き補償エンジン
110 制御部
120 水平フィルタリング処理部
130 水平フィルタ
140 垂直フィルタリング処理部
150 垂直フィルタ
160 加算・シフト処理部
170 平均処理部
200 動き補償エンジン
210 制御部 260 加算・シフト処理部
262 水平加算・シフト処理部
264 垂直加算・シフト処理部
270 平均処理部
272 水平平均処理部
274 垂直平均処理部
300 動き補償エンジン
310 制御部
312 水平レジスタ群
314 垂直レジスタ群
320 水平フィルタリング処理部
330 水平フィルタ
340 垂直フィルタリング処理部
342〜348 垂直フィルタ
360 水平加算・シフト処理部
372〜378 垂直加算・シフト処理部
380 水平平均処理部
390 垂直平均処理部
400 動き補償エンジン
410 制御部 420
水平フィルタリング処理部
440 垂直フィルタリング処理部
460 加算・シフト処理部
472 水平平均処理部
474 垂直平均処理部
30 DMA I / F
40
100
Horizontal
Claims (5)
制御部と、
前記制御部から2つ以上の値が入力され、該2つ以上の値に対して補間を行って水平補間値を得る水平フィルタであって、入力される前記2つ以上の値の個数と、前記補間のパラメータとが可変な前記水平フィルタを有する水平フィルタリング処理部と、
前記制御部から2つ以上の値が入力され、該2つ以上の値に対して補間を行って垂直補間値を得る垂直フィルタであって、入力される前記2つ以上の値の個数と、前記補間のパラメータとが可変な前記垂直フィルタを有する垂直フィルタリング処理部と、
前記水平フィルタリング処理部から前記水平補間値、または前記垂直フィルタリング処理部から前記垂直補間値が入力され、該水平補間値または垂直補間値に所定値を加算した後に所定ビット数シフトする加算・シフト処理を行って加算・シフト値を得る加算・シフト処理部であって、前記所定値と所定ビット数からなるパラメータが可変な前記加算・シフト処理部と、
2つの値が入力され、該2つの値の平均値を求める平均処理部であって、前記2つの値は、前記制御部と前記加算・シフト処理部のいずれか一方または両方から入力される前記平均処理部とを備え、
前記水平フィルタリング処理部は、前記水平補間値を前記制御部と前記加算・シフト処理部に出力可能であり、
前記垂直フィルタリング処理部は、前記垂直補間値を前記制御部と前記加算・シフト処理部に出力可能であり、
前記加算・シフト処理部は、前記加算・シフト値を前記目標位置における画素の画素値として外部に出力可能であると共に、前記加算・シフト値を前記制御部と前記平均処理部に出力可能であり、
前記平均処理部は、前記平均値を前記目標位置における画素の画素値として外部に出力可能であると共に、前記制御部に出力可能であり、
前記制御部は、
前記目標位置が参照画素の位置となる整数位置以外であるときに、前記動画像の圧縮規格と前記目標位置に応じて、
前記水平フィルタと、前記垂直フィルタと、前記加算・シフト処理部のパラメータの設定と、
前記各処理部による処理結果の出力先の制御と、
前記処理結果の出力先が前記制御部である場合における該処理結果の保持と、
1つ以上の参照画素の画素値と、保持された1つ以上の前記水平補間値と、保持された1つ以上の前記垂直補間値と、保持された1つ以上の前記加算・シフト値と、保持された1つ以上の前記平均値とのうちの1つ以上の値を、前記水平フィルタと、前記垂直フィルタと、前記平均処理部とのうちのいずれかへの出力とを行い、
4つの値に対して2次元の線形補間を行ってキュービック補間値を得る処理に際して、
前記水平フィルタと前記垂直フィルタの片方に前記4つの値を2つずつ出力し、その後、前記片方のフィルタにより得られた2つの水平補間値または2つの垂直補間値を他方のフィルタに出力することを特徴とする動き補償装置。 In the motion compensation device corresponding to a plurality of compression standards, performing motion compensation at the time of decoding a compressed moving image, and obtaining a pixel value of a pixel at a target position which is a position indicated by a motion vector,
A control unit;
Two or more values are input from the control unit, a horizontal filter that obtains a horizontal interpolation value by performing interpolation on the two or more values, the number of the two or more values to be input; A horizontal filtering processing unit having the horizontal filter with variable interpolation parameters;
Two or more values are input from the control unit, and a vertical filter that obtains a vertical interpolation value by performing interpolation on the two or more values, the number of the two or more values to be input; A vertical filtering processing unit having the vertical filter with variable interpolation parameters;
Addition / shift processing in which the horizontal interpolation value is input from the horizontal filtering processing unit or the vertical interpolation value is input from the vertical filtering processing unit, a predetermined value is added to the horizontal interpolation value or the vertical interpolation value, and then a predetermined number of bits are shifted. An addition / shift processing unit that obtains an addition / shift value by performing the addition / shift processing unit in which a parameter consisting of the predetermined value and a predetermined number of bits is variable;
An average processing unit that receives two values and calculates an average value of the two values, wherein the two values are input from either one or both of the control unit and the addition / shift processing unit An average processing unit,
The horizontal filtering processing unit can output the horizontal interpolation value to the control unit and the addition / shift processing unit,
The vertical filtering processing unit can output the vertical interpolation value to the control unit and the addition / shift processing unit,
The addition / shift processing unit can output the addition / shift value to the outside as a pixel value of a pixel at the target position, and can output the addition / shift value to the control unit and the average processing unit. ,
The average processing unit can output the average value to the outside as a pixel value of a pixel at the target position, and can output to the control unit.
The controller is
When the target position is other than an integer position as a reference pixel position, according to the compression standard of the moving image and the target position,
Setting the parameters of the horizontal filter, the vertical filter, and the addition / shift processing unit;
Control of the output destination of the processing result by each processing unit;
Holding the processing result when the output destination of the processing result is the control unit;
A pixel value of one or more reference pixels, one or more retained horizontal interpolation values, one or more retained vertical interpolation values, and one or more retained addition / shift values. One or more values of the held one or more average values are output to any of the horizontal filter, the vertical filter, and the average processing unit,
In the process of obtaining a cubic interpolation value by performing two-dimensional linear interpolation on the four values,
Two of the four values are output to one of the horizontal filter and the vertical filter, and then two horizontal interpolation values or two vertical interpolation values obtained by the one filter are output to the other filter. A motion compensation device characterized by the above.
前記水平フィルタリング処理部から前記水平補間値が入力され、該水平補間値に所定値を加算した後に所定ビット数シフトする加算・シフト処理を行う水平加算・シフト処理部と、
前記垂直フィルタリング処理部から前記垂直補間値が入力され、該垂直補間値に所定値を加算した後に所定ビット数シフトする加算・シフト処理を行う垂直加算・シフト処理部とを備えることを特徴とする請求項1に記載の動き補償装置。 The addition / shift processing unit
The horizontal interpolation value is input from the horizontal filtering processing unit, and after adding a predetermined value to the horizontal interpolation value, a horizontal addition / shift processing unit that performs addition / shift processing for shifting a predetermined number of bits;
And a vertical addition / shift processing unit that performs addition / shift processing for shifting the predetermined number of bits after the vertical interpolation value is input from the vertical filtering processing unit and the predetermined value is added to the vertical interpolation value. The motion compensation apparatus according to claim 1.
2つの値が入力され、該2つの値の平均値を求める水平平均処理部であって、前記2つの値は、前記制御部と前記水平加算・シフト処理部のいずれか一方または両方から入力される前記水平平均処理部と、
2つの値が入力され、該2つの値の平均値を求める垂直平均処理部であって、前記2つの値は、前記制御部と前記垂直加算・シフト処理部のいずれか一方または両方から入力される前記垂直平均処理部とを備えることを特徴とする請求項2に記載の動き補償装置。 The average processing unit is
A horizontal average processing unit that receives two values and calculates an average value of the two values, and the two values are input from one or both of the control unit and the horizontal addition / shift processing unit. The horizontal average processing unit,
A vertical average processing unit that receives two values and calculates an average value of the two values, and the two values are input from one or both of the control unit and the vertical addition / shift processing unit. The motion compensation apparatus according to claim 2, further comprising: the vertical average processing unit.
前記加算・シフト処理部は、複数の前記垂直フィルタにそれぞれ対応する複数の前記垂直加算・シフト処理部を備えることを特徴とする請求項3に記載の動き補償装置。 The vertical filtering processing unit includes a plurality of the vertical filters operable in parallel,
The motion compensation apparatus according to claim 3, wherein the addition / shift processing unit includes a plurality of the vertical addition / shift processing units respectively corresponding to the plurality of vertical filters.
前記加算・シフト処理部は、複数の前記水平フィルタにそれぞれ対応する複数の前記水平加算・シフト処理部を備えることを特徴とする請求項4に記載の動き補償装置。 The horizontal filtering processing unit includes a plurality of the horizontal filters operable in parallel,
The motion compensation apparatus according to claim 4, wherein the addition / shift processing unit includes a plurality of horizontal addition / shift processing units respectively corresponding to the plurality of horizontal filters.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010119296A JP2011249986A (en) | 2010-05-25 | 2010-05-25 | Motion compensation apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010119296A JP2011249986A (en) | 2010-05-25 | 2010-05-25 | Motion compensation apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011249986A true JP2011249986A (en) | 2011-12-08 |
Family
ID=45414733
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010119296A Pending JP2011249986A (en) | 2010-05-25 | 2010-05-25 | Motion compensation apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011249986A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016116039A (en) * | 2014-12-12 | 2016-06-23 | Nttエレクトロニクス株式会社 | Decimal pixel generation method |
KR20170023842A (en) * | 2014-06-27 | 2017-03-06 | 삼성전자주식회사 | System and method for motion compensation in video coding |
-
2010
- 2010-05-25 JP JP2010119296A patent/JP2011249986A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20170023842A (en) * | 2014-06-27 | 2017-03-06 | 삼성전자주식회사 | System and method for motion compensation in video coding |
KR102412699B1 (en) * | 2014-06-27 | 2022-06-24 | 삼성전자주식회사 | System and method for motion compensation in video coding |
JP2016116039A (en) * | 2014-12-12 | 2016-06-23 | Nttエレクトロニクス株式会社 | Decimal pixel generation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
ES2278087T3 (en) | APPROXIMATE BICUBIC FILTER. | |
RU2251820C2 (en) | Extrapolation of movement vector for video sequence code conversion | |
AU2015213328B2 (en) | Image coding method, image decoding method, image coding apparatus, and image decoding apparatus | |
US7746930B2 (en) | Motion prediction compensating device and its method | |
JP2007060673A (en) | Device and method for image prediction, device and method for image encoding and decoding, recording medium, and program | |
US9462189B2 (en) | Piecewise perspective transform engine | |
JP5323252B2 (en) | Video encoding method, decoding method, encoding device, and decoding device | |
JP2011249986A (en) | Motion compensation apparatus | |
JP2009015637A (en) | Computational unit and image filtering apparatus | |
JP2008141249A (en) | Motion vector detector and its method | |
JP5612177B2 (en) | Video encoding method, decoding method, encoding device, and decoding device | |
JP6487002B2 (en) | Decryption method and decryption apparatus | |
JP2005348176A (en) | Image processor | |
KR101742765B1 (en) | Interpolator and interpolator pixel generation method | |
JP2006031597A (en) | Motion vector detection device | |
KR20090082672A (en) | Fast search method for sub-pixel motion estimation in H.264 | |
CN114026867A (en) | Resolution adaptive video encoding and decoding | |
JP4155102B2 (en) | Pixel value calculation device, moving image encoding device, and moving image decoding device | |
KR101022984B1 (en) | Apparatus and Method for Real Time Motion Estimation | |
JP2014057198A (en) | Image processor, image processing system and image processing method | |
CN113966617A (en) | Clipping sample values for MIP downscaling prediction | |
KR20060107639A (en) | Efficient image interplation method for horizontal scale using inpainting | |
JP2015111961A (en) | Image decoding method and image decoding device | |
WO2010001562A1 (en) | Filter processing device and semiconductor device | |
JP2015033105A (en) | Motion picture encoding device |