JP2011249986A - Motion compensation apparatus - Google Patents

Motion compensation apparatus Download PDF

Info

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
Application number
JP2010119296A
Other languages
Japanese (ja)
Inventor
Masanori Sasajima
正則 笹島
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2010119296A priority Critical patent/JP2011249986A/en
Publication of JP2011249986A publication Critical patent/JP2011249986A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To suppress the circuit scale of a motion compensation apparatus supporting multi-codec.SOLUTION: To find an interpolation pixel, a control unit 110 controls so as to make a horizontal filter 130, which performs interpolation in a horizontal direction, output required reference pixels to an appropriate input port according to the compression standard or a target position. Then the control unit 110 controls so that the interpolation values obtained from the horizontal filter 130 is output to an appropriate input port of a vertical filter 150, which performs interpolation in a vertical direction. This allows two-dimensional linear interpolation and processing specific to the compression standard can be realized by the same horizontal filter and the vertical filter.

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)に示される。

Figure 2011249986
Referring to FIG. Next, luminance motion compensation in the case of H.264 will be described.
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).
Figure 2011249986

式(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)に示される。

Figure 2011249986
The processing for obtaining the pixel h at the “0, 1/2” position is shown in Equation (3) and Equation (4).
Figure 2011249986

すなわち、「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通りのいずれか一方である。いずれを使用するかはエンコード時に指定される。

Figure 2011249986
すなわち、画素jは、水平方向に並ぶ6つの補間画素の加算・シフト処理前の画素値(cc、dd、h'、m'、ee、ff)に対して補間を行って得た値(j')を加算・シフト処理することにより得られる。加算・シフト処理のパラメータは、「512」と「10ビット」である。 The process for obtaining the pixel j at the position “1/2, 1/2” is one of two types represented by Expression (5) and Expression (7) or Expression (6) and Expression (7). . Which one to use is specified during encoding.
Figure 2011249986
That is, the pixel j is a value obtained by performing interpolation on the pixel values (cc, dd, h ′, m ′, ee, ff) before the addition / shift processing of the six interpolation pixels arranged in the horizontal direction (j It can be obtained by adding and shifting '). The parameters for the addition / shift processing are “512” and “10 bits”.

他の各1/4位置の画素、3/4位置の画素を求める処理は、2つの画素(参照画素または補間画素)の平均をとる処理であり、式(8)〜(19)にそれぞれ示される。

Figure 2011249986
The other processes for obtaining the pixels at the quarter positions and the pixels at the quarter positions are the processes of taking the average of the two pixels (reference pixels or interpolation pixels) and are shown in equations (8) to (19), respectively. It is.
Figure 2011249986

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)に示される。

Figure 2011249986
When the pixel w is a pixel at the 1/4 position, the process for obtaining it is expressed by the following equation (20).
Figure 2011249986

画素wが1/2位置の画素である場合、それを求める処理は、下記の式(21)に示される。

Figure 2011249986
When the pixel w is a pixel at the 1/2 position, a process for obtaining it is expressed by the following equation (21).
Figure 2011249986

画素wが3/4位置の画素である場合、それを求める処理は、下記の式(22)に示される。

Figure 2011249986
When the pixel w is a pixel at the 3/4 position, a process for obtaining it is expressed by the following equation (22).
Figure 2011249986

式(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)に示される。

Figure 2011249986
The process for obtaining the interpolation pixel e by two-dimensional linear interpolation is represented by the following equation (23).
Figure 2011249986

すなわち、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ビットシフトすることを意味する。

Figure 2011249986
With reference to FIG. 20, a process for obtaining an interpolation pixel in the case of MPEG4 qmc will be described. These processes are shown in equations (24) to (39). C [] in these equations is a coefficient. “Rc” is a rounding_control, and is a parameter for controlling the rounding process. “/ 256” means 8-bit shift.
Figure 2011249986

式(25)と(26)が示すように、MPEG4のqmcの場合、(1/2,0)位置の補間画素b(例えば図20におけるb−1とb)と(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)位置の補間画素(e)、(3/4,0)位置の補間画素(f)、(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である。

Figure 2011249986
With reference to FIG. 21, motion compensation with 1/2 accuracy of MPEG2 and MPEG4 will be described. In this case, the interpolation pixel is an interpolation pixel (b, e in FIG. 21) at the position (1/2, 0), an interpolation pixel (c in FIG. 21) at the position (0, 1/2), (1 / 2, 1/2) is any of the interpolation pixels (d in FIG. 21). Processing for obtaining these interpolated pixels at different positions is shown in the following equations (40) to (42). In the case of MPEG2, since there is no parameter called rounding_control, “rc” in these equations is 0.
Figure 2011249986

式(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を参照して説明する。   Patent Document 1 discloses a motion compensation technique that can support a plurality of compression standards. This will be described with reference to FIG.

図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 Patent Document 1 and shows a multi-codec motion compensation device. The motion compensation engine 40 in this apparatus includes a DMA I / F 30, a vertical filter 41, a first horizontal filter 42, a second horizontal filter 43, a cubic alignment unit 44, and a cubic filter 45. The vertical filter 41, the first horizontal filter 42, and the second horizontal filter 43 are all filters that perform one-dimensional interpolation, and the cubic filter 45 performs two-dimensional linear interpolation. The cubic alignment unit 44 selects data (pixel value) to be input to the cubic filter 45. At the time of motion compensation, one or more filters are selected according to the compression standard (codec).

例えば、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 vertical filter 41, the first horizontal filter 42, and the second horizontal filter 43, and up to ½ precision interpolation pixels are calculated. Thereafter, the cubic filter 45 calculates an interpolation pixel with ¼ accuracy.

VC−1のBilinear、MPEG4の1/2精度モードとMPEG2、各コーデックの色差の動き補償の場合、キュービック整列部44のみが用いられ、垂直フィルタ41、第1水平フィルタ42、第2水平フィルタ43が用いられない。   In the case of VC-1 Bilinear, MPEG4 1/2 accuracy mode and MPEG2, motion compensation of color difference of each codec, only the cubic alignment unit 44 is used, and the vertical filter 41, the first horizontal filter 42, and the second horizontal filter 43 are used. Is not used.

この技術は、複数のコーデック間で共有可能なフィルタを共有させ、コーデックに応じてフィルタを選択的に使い分けることにより、部品数を減らし、回路規模を減らすことができるとされている。   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.

特開2008−125078号公報JP 2008-125078 A

図22に示す装置における動き補償エンジン40は、水平方向における一次元の補間、垂直方向における一次元の補間、2次元の線形補間のために、水平フィルタ、垂直フィルタ、キュービックフィルタをそれぞれ備える。   The motion compensation engine 40 in the apparatus shown in FIG. 22 includes a horizontal filter, a vertical filter, and a cubic filter for one-dimensional interpolation in the horizontal direction, one-dimensional interpolation in the vertical direction, and two-dimensional linear interpolation.

また、H.264の場合における1/4精度の画素を算出するために、キュービックフィルタ45が用いられる。前述したように、H.264の場合、1/4精度の画素の算出処理は、単純な平均処理(式(8)〜(19)である。この処理にキュービックフィルタを用いるのは過剰仕様と考えられる。   H. The cubic filter 45 is used to calculate a ¼ precision pixel in the H.264 case. As described above, H.P. In the case of H.264, the 1/4 precision pixel calculation process is a simple average process (formulas (8) to (19)).

本発明は、上記事情に鑑みてなされたものであり、マルチコーデックに対応可能な動き補償装置の回路規模をより削減できる技術を提供する。   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.

本発明の第1の実施の形態にかかる動画像復号装置を示す図である。It is a figure which shows the moving image decoding apparatus concerning the 1st Embodiment of this invention. 図1に示す動画像復号装置における動き補償エンジンを示す図である。It is a figure which shows the motion compensation engine in the moving image decoding apparatus shown in FIG. 図2に示す動き補償エンジンにおける水平フィルタを示す図である。It is a figure which shows the horizontal filter in the motion compensation engine shown in FIG. 規格毎に、加算・シフト処理部と平均処理部が出力する補間画素の種類を示す図である。It is a figure which shows the kind of interpolation pixel which an addition / shift process part and an average process part output for every specification. 本発明の技術による2次元の線形補間の手法を説明するための図である(その1)。It is a figure for demonstrating the method of the two-dimensional linear interpolation by the technique of this invention (the 1). 本発明の技術による2次元の線形補間の手法を説明するための図である(その2)。It is a figure for demonstrating the method of the two-dimensional linear interpolation by the technique of this invention (the 2). 本発明の第2の実施の形態にかかる動き補償エンジンを示す図である。It is a figure which shows the motion compensation engine concerning the 2nd Embodiment of this invention. 本発明の第3の実施の形態にかかる動き補償エンジンを示す図である。It is a figure which shows the motion compensation engine concerning the 3rd Embodiment of this invention. 図8に示す動き補償エンジンによる補間画素の算出例を説明するための図である(その1)。FIG. 9 is a diagram for explaining an example of calculating interpolation pixels by the motion compensation engine shown in FIG. 8 (part 1); 図8に示す動き補償エンジンによる補間画素の算出例を説明するための図である(その2)。FIG. 9 is a diagram for explaining an example of calculating interpolation pixels by the motion compensation engine shown in FIG. 8 (part 2); 図8に示す動き補償エンジンによる補間画素の算出例を説明するための図である(その3)。FIG. 9 is a diagram for explaining an example of calculation of interpolation pixels by the motion compensation engine shown in FIG. 8 (No. 3). 図8に示す動き補償エンジンによる補間画素の算出例を説明するための図である(その4)。FIG. 9 is a diagram for explaining an example of calculation of interpolation pixels by the motion compensation engine shown in FIG. 8 (No. 4). 図8に示す動き補償エンジンによる補間画素の算出例を説明するための図である(その5)。FIG. 9 is a diagram for explaining an example of calculation of interpolation pixels by the motion compensation engine shown in FIG. 8 (No. 5). 本発明の第4の実施の形態にかかる動き補償エンジンを示す図である。It is a figure which shows the motion compensation engine concerning the 4th Embodiment of this invention. 参照画素と補間画素の位置関係を説明するための図である。It is a figure for demonstrating the positional relationship of a reference pixel and an interpolation pixel. H.264の場合における補間画素(輝度)の求め方を説明するための図である。H. 2 is a diagram for explaining how to obtain an interpolation pixel (luminance) in the case of H.264. VC−1のBicubicの場合における補間画素(輝度)の求め方を説明するための図である(その1)。It is a figure for demonstrating how to obtain | require the interpolation pixel (luminance) in the case of VC-1 Bicubic (the 1). VC−1のBicubicの場合における補間画素(輝度)の求め方を説明するための図である(その2)。It is a figure for demonstrating how to obtain | require the interpolation pixel (luminance) in the case of VC-1 Bicubic (the 2). 2次元の線形補間を説明するための図である。It is a figure for demonstrating two-dimensional linear interpolation. MPEG4のqmcモードの場合における補間画素(輝度)の求め方を説明するための図である。It is a figure for demonstrating how to obtain | require the interpolation pixel (luminance) in the case of the qmc mode of MPEG4. MPEG4のhmcモードとMPEG2の場合における補間画素(輝度)の求め方を説明するための図である。It is a figure for demonstrating how to obtain | require the interpolation pixel (luminance) in the hmc mode of MPEG4 and MPEG2. 特許文献1に開示された動き補償装置を示す図である。It is a figure which shows the motion compensation apparatus disclosed by patent document 1. FIG.

以下、図面を参照して本発明の実施の形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、様々な処理を行う機能ブロックとして図面に記載される各要素は、ハードウェア的には、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 picture decoding apparatus 80 according to the first embodiment of the present invention. In FIG. 1, only the components necessary for explaining the motion compensation technique of the present invention are shown, and the motion compensation technique of the present invention is provided in a normal moving image apparatus such as a functional block responsible for inverse quantization. Others that are not particularly necessary are omitted.

動画像復号装置80は、メモリ84、DMA(Direct Memory Access)コントローラ114、エントロピー復号部88、DMA IF90(IF:Interface)、動き補償エンジン100を備え、これらはシステムバス82に接続されている。   The moving picture decoding apparatus 80 includes a memory 84, a DMA (Direct Memory Access) controller 114, an entropy decoding unit 88, a DMA IF 90 (IF: Interface), and a motion compensation engine 100, which are connected to a system bus 82.

メモリ84は、既に復号された参照ピクチャを記憶している。メモリ84に記憶された参照ピクチャにおける各画素は、参照画素となる。また、メモリ84は、エントロピー復号部88により得られた、現在の復号対象となるピクチャの各動きベクトルも記憶する。   The memory 84 stores reference pictures that have already been decoded. Each pixel in the reference picture stored in the memory 84 becomes a reference pixel. The memory 84 also stores each motion vector of the current decoding target picture obtained by the entropy decoding unit 88.

エントロピー復号部88は、エントロピー復号を行うものであり、動画像の圧縮規格を示すコーデック信号と、現在の復号対象となるピクチャ(以下注目ピクチャという)の各動きベクトルを得る。エントロピー復号部88は、システムバス82を介して、コーデック信号を動き補償エンジン100に出力し、動きベクトルをメモリ84に出力する。   The entropy decoding unit 88 performs entropy decoding, and obtains a codec signal indicating a compression standard for moving images and each motion vector of a current picture to be decoded (hereinafter referred to as a target picture). The entropy decoding unit 88 outputs the codec signal to the motion compensation engine 100 and the motion vector to the memory 84 via the system bus 82.

動き補償エンジン100は、動き補償を行うものであり、注目ピクチャにおける、各動きベクトルが示す位置(目標位置)における画素を求める。動き補償エンジン100は、メモリ84から動きベクトルを逐次読み出して、コーデック信号が示す圧縮規格と、動きベクトルが示す目標位置に応じて、メモリ84から必要な参照画素を読み出す。動き補償エンジン100は、DMA IF90を介して、メモリ84から動きベクトルと参照画素の読出しを行う。なお、本実施の形態における動き補償エンジン100は、H.264、VC−1、MPEG4、MPEG2に対応する。   The motion compensation engine 100 performs motion compensation, and obtains a pixel at a position (target position) indicated by each motion vector in a target picture. The motion compensation engine 100 sequentially reads out motion vectors from the memory 84 and reads out necessary reference pixels from the memory 84 according to the compression standard indicated by the codec signal and the target position indicated by the motion vector. The motion compensation engine 100 reads a motion vector and a reference pixel from the memory 84 via the DMA IF 90. It should be noted that the motion compensation engine 100 in this embodiment is an H.264 standard. H.264, VC-1, MPEG4, and MPEG2.

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 DMA controller 86 for the motion vector and the reference pixel read by the motion compensation engine 100 via the system bus 82. The DMA controller 86 causes the memory 84 to output a motion vector and a reference pixel in response to a DMA request from the DMA IF 90, and supplies the motion compensation engine 100 via the system bus 82 and the DMA IF 90.

図2は、動き補償エンジン100を示す。動き補償エンジン100は、制御部110、水平フィルタリング処理部120、垂直フィルタリング処理部140、加算・シフト処理部160、平均処理部170を備える。   FIG. 2 shows the motion compensation engine 100. The motion compensation engine 100 includes a control unit 110, a horizontal filtering processing unit 120, a vertical filtering processing unit 140, an addition / shift processing unit 160, and an average processing unit 170.

水平フィルタリング処理部120は、水平フィルタ130を備える。水平フィルタ130は、制御部110から水平方向に並ぶ2つ以上の画素の画素値が入力され、該2つ以上の画素値に対して補間を行って1つの補間値を得る。以下、この補間値を水平補間値という。なお、制御部110から水平フィルタ130に入力される2つ以上の画素値は、参照画素の画素値である場合と、参照画素の画素値ではない場合がある。これについては後述する。   The horizontal filtering processing unit 120 includes a horizontal filter 130. The horizontal filter 130 receives pixel values of two or more pixels arranged in the horizontal direction from the control unit 110, and performs interpolation on the two or more pixel values to obtain one interpolation value. Hereinafter, this interpolation value is referred to as a horizontal interpolation value. Note that two or more pixel values input from the control unit 110 to the horizontal filter 130 may be pixel values of reference pixels or may not be pixel values of reference pixels. This will be described later.

水平フィルタ130は、入力される画素値の数と、補間パラメータが可変である。入力される画素値の数とパラメータは、制御部110により制御される。   The horizontal filter 130 has variable number of input pixel values and interpolation parameters. The number of input pixel values and parameters are controlled by the control unit 110.

また、水平フィルタリング処理部120は、水平フィルタ130により得られた水平補間値を制御部110と加算・シフト処理部160に出力可能である。水平補間値の出力先は、制御部110により制御される。   Further, the horizontal filtering processing unit 120 can output the horizontal interpolation value obtained by the horizontal filter 130 to the control unit 110 and the addition / shift processing unit 160. The output destination of the horizontal interpolation value is controlled by the control unit 110.

図3は、水平フィルタ130の構成例を示す。図3の水平フィルタ130は、8つのレジスタfR0〜fR7、7つの加算器(sum0〜sum6)、4つの乗算器mul0〜mul3を有する。   FIG. 3 shows a configuration example of the horizontal filter 130. The horizontal filter 130 in FIG. 3 includes eight registers fR0 to fR7, seven adders (sum0 to sum6), and four multipliers mul0 to mul3.

レジスタfR0〜fR7には、制御部110によりそれぞれの値が設定される。加算器sum0、加算器sum1、加算器sum2、加算器sum3は、レジスタfR3とレジスタfR4の加算、レジスタfR2とレジスタfR5の加算、レジスタfR1とレジスタfR6の加算、レジスタfR0とレジスタfR7の加算をそれぞれ行う。   Each value is set by the control unit 110 in the registers fR0 to fR7. The adder sum0, the adder sum1, the adder sum2, and the adder sum3 respectively add the register fR3 and the register fR4, add the register fR2 and the register fR5, add the register fR1 and the register fR6, and add the register fR0 and the register fR7. Do.

乗算器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 control unit 110. When values are set in all of the registers fR0 to fR7, the horizontal filter 130 is an 8-tap filter. The control unit 110 can adjust the number of taps of the horizontal filter by not setting values in some registers. Not setting a value in the register is equivalent to setting the value of the register to “0”.

例えば、制御部110がレジスタfR0〜fR7の全てに対して値を設定する場合、水平フィルタ130は、8タップのフィルタになる。また、制御部110がレジスタfR1〜fR6に対してのみ値を設定する場合、水平フィルタ130は6タップのフィルタになる。さらに、制御部110がレジスタfR2とレジスタfR5に対してのみ値を設定する場合、水平フィルタ130は4タップのフィルタになる。さらに、制御部110がレジスタfR3とレジスタfR4に対してのみ値を設定する場合、水平フィルタ130は2タップのフィルタになる。   For example, when the control unit 110 sets values for all of the registers fR0 to fR7, the horizontal filter 130 is an 8-tap filter. When the control unit 110 sets values only for the registers fR1 to fR6, the horizontal filter 130 is a 6-tap filter. Furthermore, when the control unit 110 sets values only for the registers fR2 and fR5, the horizontal filter 130 is a 4-tap filter. Further, when the control unit 110 sets values only for the registers fR3 and fR4, the horizontal filter 130 is a 2-tap filter.

図2に戻って説明する。
水平フィルタリング処理部120は、水平フィルタ130により得られた水平補間値を制御部110と加算・シフト処理部160に出力可能である。制御部110と加算・シフト処理部160のいずれに出力するかは、制御部110により制御される。
Returning to FIG.
The horizontal filtering processing unit 120 can output the horizontal interpolation value obtained by the horizontal filter 130 to the control unit 110 and the addition / shift processing unit 160. The control unit 110 controls which of the control unit 110 and the addition / shift processing unit 160 outputs the data.

垂直フィルタリング処理部140は、垂直フィルタ150を備える。垂直フィルタ150は、制御部110から垂直方向に並び2つ以上の画素の画素値が入力され、該2つ以上の画素値に対して補間を行って1つの補間値を得る。以下、この補間値を垂直補間値という。なお、制御部110から垂直フィルタ150に入力される2つ以上の画素値は、参照画素の画素値である場合と、参照画素の画素値ではない場合がある。これについては後述する。   The vertical filtering processing unit 140 includes a vertical filter 150. The vertical filter 150 receives pixel values of two or more pixels arranged in the vertical direction from the control unit 110, and interpolates the two or more pixel values to obtain one interpolation value. Hereinafter, this interpolation value is referred to as a vertical interpolation value. Note that two or more pixel values input from the control unit 110 to the vertical filter 150 may be pixel values of reference pixels or may not be pixel values of reference pixels. This will be described later.

垂直フィルタ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 control unit 110.

また、垂直フィルタリング処理部140は、垂直フィルタリング処理部140により得られた垂直補間値を制御部110と加算・シフト処理部160に出力可能である。垂直補間値の出力先は、制御部110により制御される。   The vertical filtering processing unit 140 can output the vertical interpolation value obtained by the vertical filtering processing unit 140 to the control unit 110 and the addition / shift processing unit 160. The output destination of the vertical interpolation value is controlled by the control unit 110.

なお、垂直フィルタ150の具体的な構成は、図3に示す水平フィルタ130と同様とすることができ、ここで説明を省略する。   Note that the specific configuration of the vertical filter 150 can be the same as that of the horizontal filter 130 shown in FIG.

加算・シフト処理部160は、水平フィルタリング処理部120から水平補間値が入力されたとき、または垂直フィルタリング処理部140から垂直補間値が入力されたときに、入力された水平補間値または垂直補間値に対して加算・シフト処理を行う。加算・シフト処理は、入力された値に対して所定値を加算して所定ビット数をシフトした後に、必要に応じて丸めるものである。本実施の形態において、画素値が8ビットであり、加算・シフト処理部160により行われる加算・シフト処理は、入力された値に対して所定値を加算して所定ビット数シフトした後に、必要に応じて出力値を「0」または「256」にする処理である。なお、加算・シフト処理のパラメータ(加算する所定値とシフトする所定ビット数)は、制御部110により制御される。加算・シフト処理部160の処理結果は、以下加算・シフト値という。   When the horizontal interpolation value is input from the horizontal filtering processing unit 120 or when the vertical interpolation value is input from the vertical filtering processing unit 140, the addition / shift processing unit 160 inputs the horizontal interpolation value or the vertical interpolation value. Addition / shift processing is performed on. In the addition / shift process, a predetermined value is added to the input value to shift the predetermined number of bits, and then rounded as necessary. In the present embodiment, the pixel value is 8 bits, and the addition / shift processing performed by the addition / shift processing unit 160 is necessary after adding a predetermined value to the input value and shifting the predetermined number of bits. The output value is set to “0” or “256” according to the above. The addition / shift processing parameters (a predetermined value to be added and a predetermined number of bits to be shifted) are controlled by the control unit 110. The processing result of the addition / shift processing unit 160 is hereinafter referred to as an addition / shift value.

加算・シフト処理部160は、加算・シフト値を目標位置における画素の画素値として外部(例えば、図示しない、動き補償エンジン100の次段の処理ブロックなど)に出力可能であると共に、加算・シフト値を制御部110と平均処理部170に出力可能である。加算・シフト値の出力先は、制御部110により制御される。   The addition / shift processing unit 160 can output the addition / shift value as a pixel value of the pixel at the target position to the outside (for example, a processing block in the next stage of the motion compensation engine 100, not shown), and the addition / shift. The value can be output to the control unit 110 and the average processing unit 170. The output destination of the addition / shift value is controlled by the control unit 110.

平均処理部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 control unit 110 and the addition / shift processing unit 160. Details of the two values input to the average processing unit 170 will be described later.

平均処理部170は、処理結果である平均値を外部と制御部110に出力可能である。平均値の出力先は、制御部110により制御される。   The average processing unit 170 can output an average value as a processing result to the outside and the control unit 110. The output destination of the average value is controlled by the control unit 110.

制御部110は、動きベクトルにより示される目標位置が整数位置である場合に、該整数位置の参照画素をメモリ84から読み出して外部に出力する。これは、輝度と色差のいずれについても同様である。   When the target position indicated by the motion vector is an integer position, the control unit 110 reads the reference pixel at the integer position from the memory 84 and outputs it to the outside. This is the same for both luminance and color difference.

動きベクトルにより示される目標位置が整数位置ではない場合に、制御部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 control unit 110 performs the following processing for luminance according to the compression standard indicated by the codec signal and the target position.
(1) Parameter setting of the horizontal filter 130, the vertical filter 150, and the addition / shift processing unit 160.
(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 110.
(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 control unit 110 performs a two-dimensional linear interpolation on the four values to obtain a cubic interpolation value in order to obtain a pixel value at the target position according to the compression standard and the target position. Two of the four values are output to one of the horizontal filter 130 and the vertical filter 150, and then two horizontal interpolation values or two vertical interpolation values obtained by the one filter are output to the other filter. To obtain the cubic interpolation value.

補間画素は、加算・シフト処理部160または平均処理部170により外部に出力される。図4は、本実施の形態において、加算・シフト処理部160により外部に出力される補間画素と、平均処理部170により外部に出力される補間画素を示す。   The interpolated pixels are output to the outside by the addition / shift processing unit 160 or the average processing unit 170. FIG. 4 shows the interpolation pixels output to the outside by the addition / shift processing unit 160 and the interpolation pixels output to the outside by the average processing unit 170 in the present embodiment.

図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 / shift processing unit 160 to the outside, and all the 1 / 4-system interpolation pixels are output from the average processing unit 170 to the outside.

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 / shift processing unit 160 to the outside.

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 / shift processing unit 160, and other ¼ precision interpolation pixels are output. Output from the average processing unit 170 to the outside.

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 / shift processing unit 160, and the interpolation pixel at the other position is output from the average processing unit 170 to the outside. .

なお、色差については、全ての規格において、全ての補間画素が加算・シフト処理部160から外部に出力される。   For color differences, all interpolation pixels are output from the addition / shift processing unit 160 to the outside in all standards.

圧縮規格毎に補間画素を求める際の制御部110の動作を詳細に説明する。
まず、輝度について説明する。
The operation of the control unit 110 when obtaining the interpolation pixel for each compression standard will be described in detail.
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 control unit 110 reads the reference pixels E, F, G, H, I, and J from the memory 84 and sets the horizontal filter 130 so that the processing expressed by the above-described equation (1) is performed. The addition / shift processing unit 160 is set so that the process indicated by Expression (2) is performed. Further, control is performed so that the output destination of the horizontal filter 130 is the addition / shift processing unit 160 and the output destination of the addition / shift processing unit 160 is external. Thus, the interpolation pixel b is obtained and output from the addition / shift processing unit 160 to the outside.

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 control unit 110 reads the reference pixels A, C, G, M, R, and T from the memory 84 and sets the vertical filter 150 so that the process represented by the above-described equation (3) is performed. The addition / shift processing unit 160 is set so that the process indicated by Expression (4) is performed. Further, control is performed so that the output destination of the vertical filter 150 is the addition / shift processing unit 160 and the output destination of the addition / shift processing unit 160 is external. Thus, the interpolation pixel h is obtained and output from the addition / shift processing unit 160 to the outside.

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 control unit 110 obtains six references for obtaining the pixel cc. The pixel is read from the memory 84, and the vertical filter 150 is set so that the processing corresponding to Expression (3) is performed. In this case, the control unit 110 performs control so that the output destination of the vertical filter 150 is the control unit 110. That is, for the position of the pixel cc, the pixel value (vertical interpolation value) of the interpolation pixel before the addition / shift processing is output to the control unit 110.

制御部110は、垂直フィルタ150からの垂直補間値ccを保持しておき、同様の手順で、垂直補間値dd、h'、m'、ee、ffを垂直フィルタ150に求めさせ、保持する。   The control unit 110 holds the vertical interpolation value cc from the vertical filter 150 and causes the vertical filter 150 to obtain and hold the vertical interpolation values dd, h ′, m ′, ee, and ff in the same procedure.

そして、制御部110は、保持した6個の垂直補間値cc、dd、h'、m'、ee、ffを水平フィルタ130に出力し、式(5)が示す処理が行われるように水平フィルタ130を設定する。このとき、制御部110は、水平フィルタ130の出力先が加算・シフト処理部160になるように制御すると共に、式(7)が示す処理が行われるように加算・シフト処理部160を設定し、加算・シフト処理部160の出力先が外部になるように制御する。これにて、補間画素jが求められ、加算・シフト処理部160から外部に出力される。   Then, the control unit 110 outputs the held six vertical interpolation values cc, dd, h ′, m ′, ee, and ff to the horizontal filter 130, and the horizontal filter is processed so that the processing represented by Expression (5) is performed. 130 is set. At this time, the control unit 110 controls the output destination of the horizontal filter 130 to be the addition / shift processing unit 160 and sets the addition / shift processing unit 160 so that the processing shown in Expression (7) is performed. The output destination of the addition / shift processing unit 160 is controlled to be external. Thus, the interpolation pixel j is obtained and output from the addition / shift processing unit 160 to the outside.

(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 control unit 110 causes the horizontal filter 130 to obtain and hold the horizontal interpolation values aa, bb, b ′, s ′, gg, and hh. . Then, the six horizontal interpolation values are output to the vertical filter 150, and the vertical filter 150 is set so that the processing shown in Expression (6) is performed. At this time, the control unit 110 controls the output destination of the vertical filter 150 to be the addition / shift processing unit 160 and sets the addition / shift processing unit 160 so that the processing shown in Expression (7) is performed. The output destination of the addition / shift processing unit 160 is controlled to be external. Thus, the interpolation pixel j is obtained and output from the addition / shift processing unit 160 to the outside.

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 control unit 110 converts the half precision interpolation pixel into the horizontal filter 130 and / or the vertical filter 150. Then, the addition / shift processing unit 160 determines that the output destination of the addition / shift processing unit 160 is the average processing unit 170. The control unit 110 reads out the above one reference pixel from the memory 84, and outputs the reference pixel from the addition / shift processing unit 160 to the average processing unit 170 as the half-precision interpolation pixel is output to the average processing unit 170. Output to 170. Further, control is performed so that the output destination of the average processing unit 170 is external.
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 control unit 110 obtains one half-precision interpolated pixel. In this case, the control unit 110 controls the output destination of the addition / shift processing unit 160 to be the control unit 110 and holds one half-precision interpolation pixel from the addition / shift processing unit 160.

そして、制御部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 control part 110 calculates | requires the interpolation pixel of the other half precision. In this case, the control unit 110 performs control so that the output destination of the addition / shift processing unit 160 is the average processing unit 170, and the other half-precision interpolation pixel is added from the addition / shift processing unit 160 to the average processing unit. Along with the output to 170, the held one half precision interpolation pixel is output to the average processing unit 170. Further, control is performed so that the output destination of the average processing unit 170 is external.
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 / shift processing unit 160 to the outside, and all the ¼ precision interpolation pixels are output from the average processing unit 170 to the outside.

<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 control unit 110 reads out the four reference pixels Q1 to Q4 necessary for obtaining the interpolation pixel w from the memory 84, outputs them to the horizontal filter 130 or the vertical filter 150, and also outputs the horizontal filter 130 or the vertical filter 150. Is output to the addition / shift processing unit 160, and the output destination of the addition / shift processing unit 160 is controlled to be external, and the parameter corresponding to the position of the interpolation pixel w is added to the horizontal filter 130 or the vertical filter 150. Set in the shift processing unit 160.

具体的には、上記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 control unit 110 applies the four reference pixels Q1 to Q4 to the horizontal filter. The parameters of the horizontal filter 130 and the addition / shift processing unit 160 are set so that the processing shown in Expression (20) is performed.

また、上記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 control unit 110 outputs the four reference pixels Q1 to Q4 to the horizontal filter 130. Then, the parameters of the horizontal filter 130 and the addition / shift processing unit 160 are set so that the processing represented by the equation (21) is performed.

また、上記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 control unit 110 outputs the four reference pixels Q1 to Q4 to the horizontal filter 130. Then, the parameters of the horizontal filter 130 and the addition / shift processing unit 160 are set so that the processing represented by the equation (22) is performed.

一方、上記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 control unit 110 outputs the reference pixels Q1 to Q4 to the vertical filter 150, and the position of the interpolation pixel w (1/4 position or 1 / The parameters of the vertical filter 150 and the addition / shift processing unit 160 are set so that any one of the expressions (20) to (22) is performed according to whether the position is 2 position or 3/4 position.

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 control unit 110 first obtains four interpolation pixels Q1 to Q4 for obtaining the interpolation pixel w. For example, when obtaining the interpolation pixel r, first, the vertical filter 150 and the addition / shift processing unit 160 sequentially obtain the interpolation pixels nn, n, s, and ss, and the output destination of the addition / shift processing unit 160 is the control unit 110. Control to become. The four interpolated pixels nn, n, s, and ss are all interpolated pixels obtained from the four reference pixels, and thus are obtained by the method described above.

制御部110は、加算・シフト処理部160からの補間画素nn、n、sを保持し、補間画素ssが加算・シフト処理部160から出力されると、該4つの補間画素nn、n、s、ssを水平フィルタ130に出力すると共に、式(22)が示す処理が行われるように水平フィルタ130と加算・シフト処理部160を設定する。また、加算・シフト処理部160の出力先が外部になるように制御する。   The control unit 110 holds the interpolation pixels nn, n, and s from the addition / shift processing unit 160, and when the interpolation pixel ss is output from the addition / shift processing unit 160, the four interpolation pixels nn, n, and s. , Ss are output to the horizontal filter 130, and the horizontal filter 130 and the addition / shift processing unit 160 are set so that the processing shown in Expression (22) is performed. Also, control is performed so that the output destination of the addition / shift processing unit 160 is external.

このように、VC−1のBicubicの場合、輝度について、全ての補間画素が加算・シフト処理部160から出力される。   Thus, in the case of VC-1 Bicubic, all the interpolated pixels are output from the addition / shift processing unit 160 in terms of luminance.

<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の水平補間値を保持する。

Figure 2011249986
With reference to FIG. 5, a method for realizing the processing represented by Expression (23) in the present embodiment will be described.
In order to obtain the interpolation pixel e, the control unit 110 first reads the reference pixels A and B from the memory 84 and outputs the reference pixels A and B to the horizontal filter 130, and the processing expressed by the following equation (43) is performed. The horizontal filter 130 is set so that the output destination is the control unit 110. Thereby, a horizontal interpolation value at the position of the pixel F is obtained from the horizontal filter 130. The control unit 110 holds the horizontal interpolation value of the pixel F from the horizontal filter 130.
Figure 2011249986

そして、制御部110は、メモリ84から参照画素CとDを読み出して水平フィルタ130に出力し、式(44)が示す処理が行われ、水平フィルタ130の出力先が制御部110になるように水平フィルタ130を設定する。   Then, the control unit 110 reads the reference pixels C and D from the memory 84 and outputs the reference pixels C and D to the horizontal filter 130, so that the processing indicated by Expression (44) is performed, and the output destination of the horizontal filter 130 is the control unit 110. The horizontal filter 130 is set.

制御部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 horizontal filter 130, the control unit 110 outputs the horizontal interpolation value of the pixel F and the horizontal interpolation value of the pixel G to the vertical filter 150, and Expression (45) is obtained. The parameters of the vertical filter 150 and the addition / shift processing unit 160 are set so that the processing shown in FIG. 4 is performed, and the output destination of the vertical filter 150 is the addition / shift processing unit 160, and the output destination of the addition / shift processing unit 160 is Control to be external.

式(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 shift processing unit 160 to the outside.

勿論、式(43)〜(45)の代わりに、式(23)が示す処理と等価であるため、下記の式(46)〜(48)が示すように処理してもよい。図6を参照して説明する。

Figure 2011249986
Of course, instead of the equations (43) to (45), the processing is equivalent to the processing represented by the equation (23), and therefore, the processing may be performed as the following equations (46) to (48). This will be described with reference to FIG.
Figure 2011249986

補間画素eを求めるために、制御部110は、まず、メモリ84から参照画素AとCを読み出して垂直フィルタ150に出力し、式(46)が示す処理が行われ、垂直フィルタ150の出力先が制御部110になるように垂直フィルタ150を設定する。これにより、垂直フィルタ150から、画素Fの位置の垂直補間値が得られる。制御部110は、垂直フィルタ150からの画素Fの垂直補間値を保持する。   In order to obtain the interpolation pixel e, the control unit 110 first reads the reference pixels A and C from the memory 84 and outputs the reference pixels A and C to the vertical filter 150, and the processing shown in Expression (46) is performed. The vertical filter 150 is set so that becomes the control unit 110. Thereby, a vertical interpolation value at the position of the pixel F is obtained from the vertical filter 150. The control unit 110 holds the vertical interpolation value of the pixel F from the vertical filter 150.

そして、制御部110は、メモリ84から参照画素BとDを読み出して垂直フィルタ150に出力し、式(47)が示す処理が行われ、垂直フィルタ150の出力先が制御部110になるように垂直フィルタ150を設定する。   Then, the control unit 110 reads the reference pixels B and D from the memory 84 and outputs the reference pixels B and D to the vertical filter 150, so that the processing represented by Expression (47) is performed, and the output destination of the vertical filter 150 is the control unit 110. The vertical filter 150 is set.

制御部110は、垂直フィルタ150から画素Gの垂直補間値を得ると、保持している画素Fの垂直補間値と、画素Gの垂直補間値を水平フィルタ130に出力し、式(48)が示す処理が行われるように水平フィルタ130と加算・シフト処理部160のパラメータを設定すると共に、水平フィルタ130の出力先が加算・シフト処理部160になり、加算・シフト処理部160の出力先が外部になるように制御する。   When the control unit 110 obtains the vertical interpolation value of the pixel G from the vertical filter 150, the control unit 110 outputs the held vertical interpolation value of the pixel F and the vertical interpolation value of the pixel G to the horizontal filter 130. The parameters of the horizontal filter 130 and the addition / shift processing unit 160 are set so that the processing shown in FIG. 4 is performed, and the output destination of the horizontal filter 130 becomes the addition / shift processing unit 160, and the output destination of the addition / shift processing unit 160 is Control to be external.

この場合も、全ての補間画素は、加算・シフト処理部160から外部に出力される。   Also in this case, all the interpolated pixels are output from the addition / shift processing unit 160 to the outside.

<MPEG4のqmcモードの場合>
この場合、1/4精度まで補間画素を求める必要がある。
1.1/2精度の補間画素(輝度)の場合
(1)(1/2,0)位置の補間画素
図20における補間画素b−1とbは、この場合の補間画素に該当する。8つの参照画素に対して式(25)が示す処理が行われるように、制御部110は、水平フィルタ130と加算・シフト処理部160の設定及び制御を行う。補間画素b−1とbを求める処理は、水平フィルタ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 control unit 110 performs setting and control of the horizontal filter 130 and the addition / shift processing unit 160 so that the process represented by Expression (25) is performed on the eight reference pixels. The process for obtaining the interpolated pixels b −1 and b 1 is the same as that for H.P. Since this is the same as the process for obtaining the interpolation pixel at the position (1/2, 0) in the case of H.264, detailed description thereof is omitted here.

(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 control unit 110 performs setting and control of the vertical filter 150 and the addition / shift processing unit 160 so that the process represented by Expression (26) is performed on the eight reference pixels. The process for obtaining the interpolated pixel c is the same as that for the H.P. Since this is the same as the process for obtaining the interpolation pixel at the (0, 1/2) position in the case of H.264, detailed description thereof is omitted here.

(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 control unit 110 causes the horizontal filter 130 and the addition / shift processing unit 160 to obtain interpolation pixels at eight (1/2, 0) positions for obtaining the interpolation pixel d, and the addition / shift processing. The eight interpolation pixels output from the unit 160 are held. Then, the held eight interpolation pixels are output to the vertical filter 150, and the vertical filter 150 and the addition / shift processing unit 160 are set so that the processing represented by Expression (27) is performed. Further, the addition / shift processing unit 160 is controlled so that the output destination of the addition / shift processing unit 160 is external.
That is, in the MPEG4 qmc mode, all the half-precision interpolation pixels are output from the addition / shift processing unit 160 to the outside.

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 control unit 110 first causes the horizontal filter 130 and the addition / shift processing unit 160 to obtain an interpolation pixel at the (1/2, 0) position, and outputs the output destination of the addition / shift processing unit 160. Is controlled to become the average processing unit 170. The interpolation pixel at the (1/2, 0) position is output from the addition / shift processing unit 160 to the average processing unit 170, and the one reference pixel is output to the average processing unit 170. Further, control is performed so that the output destination of the average processing unit 170 is external. As a result, the interpolation pixel at the (1/4, 0) position or the (3/4, 0) position is output from the average processing unit 170 to the outside.

(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 control unit 110 performs setting and control so that interpolation pixels at the eight (1/4, 0) positions are obtained. In this case, the control unit 110 performs control so that the output destination of the average processing unit 170 is the control unit 110, and holds the output from the average processing unit 170.

そして、制御部110は、平均処理部170からの8つの(1/4,0)位置の補間画素を垂直フィルタ150に出力し、式(30)が示す処理が行われるように垂直フィルタ150と加算・シフト処理部160を設定する。また、加算・シフト処理部160の出力先が外部になるように制御する。   Then, the control unit 110 outputs the interpolation pixels at eight (1/4, 0) positions from the average processing unit 170 to the vertical filter 150, and the vertical filter 150 and the vertical filter 150 so that the processing represented by Expression (30) is performed. The addition / shift processing unit 160 is set. Also, control is performed so that the output destination of the addition / shift processing unit 160 is external.

式(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 shift processing unit 160 to the outside.

(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 control unit 110 reads out the two reference pixels necessary for obtaining the interpolation pixel from the memory 84 and outputs them to the average processing unit 170, and controls the output destination of the average processing unit 170 to be external. That is, in this case, the interpolation pixels at the positions (1/2, 0) and (0, 1/2) are output from the average processing unit 170 to the outside.

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 / shift processing unit 160.

すなわち、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 / shift processing unit 160.

<色差の補間画素の場合>
色差の補間画素は、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 motion compensation engine 100 in the moving picture decoding apparatus 80 according to the present embodiment includes a control unit 110, a horizontal filtering processing unit 120 including a horizontal filter 130, a vertical filtering processing unit 140 including a vertical filter 150, an addition / A shift processing unit 160 and an average processing unit 170 are included. The output destinations of the horizontal filtering processing unit 120 and the vertical filtering processing unit 140 can be switched between the control unit 110 and the addition / shift processing unit 160. The output destination of the addition / shift processing unit 160 can be switched among the control unit 110, the average processing unit 170, and the outside. The output destination of the average processing unit 170 can be switched between the outside and the control unit 110. The control unit 110 sets parameters of each processing unit, controls the output destination of each processing unit, and outputs the processing unit output from one of the processing units to the control unit 110 according to the compression standard of the moving image and the target position. The interpolated pixel at the target position is obtained by holding the processing result of this step, outputting the reference pixel and / or the value being held to any of the processes.

目標位置の補間画素を求めるために、上下左右に隣接する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 control unit 110 converts the four pixels horizontally into two pixels arranged horizontally. Then, the two horizontal interpolation values obtained by the horizontal filter 130 are output to the vertical filter 150. Alternatively, four pixels are output to the vertical filter 150 by two pixels arranged vertically, and then the two vertical interpolation values obtained by the vertical filter 150 are output to the horizontal filter 130.

このように、本実施の形態における動き補償エンジン100は、複数の圧縮規格に対応できると共に、2つのフィルタによりキュービックフィルタの機能を実現できている。そのため、動き補償装置の回路規模が小さくできる。   As described above, the motion compensation engine 100 according to the present embodiment can cope with a plurality of compression standards and can realize the function of a cubic filter by two filters. Therefore, the circuit scale of the motion compensation device can be reduced.

また、図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 motion compensation engine 100 in the present embodiment, the processing order of the horizontal filter and the vertical filter can be arbitrarily adjusted by the control unit 110, and the motion compensation with 1/4 accuracy of MPEG4 can be supported. .

<第2の実施の形態>
図7は、本発明の第2の実施の形態にかかる動き補償エンジン200を示す。動き補償エンジン200は、図2に示す動き補償エンジン100の代わりに図1に示す動画像復号装置80に設けることができる。
<Second Embodiment>
FIG. 7 shows a motion compensation engine 200 according to the second embodiment of the present invention. The motion compensation engine 200 can be provided in the video decoding device 80 shown in FIG. 1 instead of the motion compensation engine 100 shown in FIG.

動き補償エンジン200は、制御部210、水平フィルタリング処理部120、垂直フィルタリング処理部140、加算・シフト処理部260、平均処理部270を備える。   The motion compensation engine 200 includes a control unit 210, a horizontal filtering processing unit 120, a vertical filtering processing unit 140, an addition / shift processing unit 260, and an average processing unit 270.

水平フィルタリング処理部120と垂直フィルタリング処理部140は、動き補償エンジン100における水平フィルタリング処理部120と垂直フィルタリング処理部140と同様であり、ここで詳細な説明を省略する。   The horizontal filtering processing unit 120 and the vertical filtering processing unit 140 are the same as the horizontal filtering processing unit 120 and the vertical filtering processing unit 140 in the motion compensation engine 100, and detailed description thereof is omitted here.

加算・シフト処理部260は、動き補償エンジン100における加算・シフト処理部160と同様の機能を実現するものであるが、水平加算・シフト処理部262と垂直加算・シフト処理部264に分けられている。平均処理部270は、動き補償エンジン100における平均処理部170と同様の機能を実現するものであるが、水平平均処理部272と垂直平均処理部274に分けられている。   The addition / shift processing unit 260 implements the same function as the addition / shift processing unit 160 in the motion compensation engine 100, but is divided into a horizontal addition / shift processing unit 262 and a vertical addition / shift processing unit 264. Yes. The average processing unit 270 implements the same function as the average processing unit 170 in the motion compensation engine 100, but is divided into a horizontal average processing unit 272 and a vertical average processing unit 274.

水平加算・シフト処理部262は、水平フィルタリング処理部120からの水平補間値が入力され、該水平補間値に対して加算・シフト処理を行う。加算・シフト処理のパラメータが可変であり、処理結果の加算・シフト値の出力先は、制御部210と水平平均処理部272間で切り換え可能である。水平加算・シフト処理部262は、パラメータが制御部210により設定され、出力先が制御部210により制御される。   The horizontal addition / shift processing unit 262 receives the horizontal interpolation value from the horizontal filtering processing unit 120 and performs addition / shift processing on the horizontal interpolation value. The parameter of the addition / shift processing is variable, and the output destination of the addition / shift value of the processing result can be switched between the control unit 210 and the horizontal average processing unit 272. In the horizontal addition / shift processing unit 262, parameters are set by the control unit 210, and an output destination is controlled by the control unit 210.

水平加算・シフト処理部262は、水平フィルタリング処理部120からの水平補間値が入力され、該水平補間値に対して加算・シフト処理を行う。加算・シフト処理のパラメータが可変であり、処理結果の加算・シフト値の出力先は、外部、制御部210、水平平均処理部272間で切り換え可能である。水平加算・シフト処理部262は、パラメータが制御部210により設定され、出力先が制御部210により制御される。   The horizontal addition / shift processing unit 262 receives the horizontal interpolation value from the horizontal filtering processing unit 120 and performs addition / shift processing on the horizontal interpolation value. The parameter of the addition / shift processing is variable, and the output destination of the addition / shift value of the processing result can be switched between the outside, the control unit 210, and the horizontal average processing unit 272. In the horizontal addition / shift processing unit 262, parameters are set by the control unit 210, and an output destination is controlled by the control unit 210.

垂直加算・シフト処理部264は、垂直フィルタリング処理部140からの垂直補間値が入力され、該垂直補間値に対して加算・シフト処理を行う。加算・シフト処理のパラメータが可変であり、処理結果の加算・シフト値の出力先は、外部と、制御部210、垂直平均処理部274間で切り換え可能である。垂直加算・シフト処理部264も、パラメータが制御部210により設定され、出力先が制御部210により制御される。   The vertical addition / shift processing unit 264 receives the vertical interpolation value from the vertical filtering processing unit 140 and performs addition / shift processing on the vertical interpolation value. The parameter of the addition / shift process is variable, and the output destination of the addition / shift value of the process result can be switched between the outside, the control unit 210, and the vertical average processing unit 274. The parameters of the vertical addition / shift processing unit 264 are also set by the control unit 210 and the output destination is controlled by the control unit 210.

水平平均処理部272は、2つの値が入力され、該2つの値の平均値を求めるものである。この2つの値は、制御部210と水平加算・シフト処理部262のいずれか一方または両方から入力される。水平平均処理部272は、出力先が外部と制御部210間で切り換え可能である。水平平均処理部272の出力先は、制御部210により制御される。   The horizontal average processing unit 272 receives two values and calculates an average value of the two values. These two values are input from either one or both of the control unit 210 and the horizontal addition / shift processing unit 262. The horizontal average processing unit 272 can switch the output destination between the outside and the control unit 210. The output destination of the horizontal average processing unit 272 is controlled by the control unit 210.

垂直平均処理部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 control unit 210 and the vertical addition / shift processing unit 264. The vertical average processing unit 274 can also switch the output destination between the outside and the control unit 210. The output destination of the vertical average processing unit 274 is controlled by the control unit 210.

制御部210は、補間画素を求める際に、制御部110が加算・シフト処理部160に対して行う設定と制御を、適宜、水平加算・シフト処理部262と垂直加算・シフト処理部264に対して行い、制御部110が平均処理部170に対して行う設定と制御を、適宜、水平平均処理部272と垂直平均処理部274に対して行う。これらの点を除き、動き補償エンジン100における制御部110と同様の動作をするので、ここで詳細な説明を省略する。   When determining the interpolation pixel, the control unit 210 performs the setting and control performed by the control unit 110 on the addition / shift processing unit 160 with respect to the horizontal addition / shift processing unit 262 and the vertical addition / shift processing unit 264 as appropriate. The setting and control performed by the control unit 110 for the average processing unit 170 are appropriately performed for the horizontal average processing unit 272 and the vertical average processing unit 274. Except for these points, the operation similar to that of the control unit 110 in the motion compensation engine 100 is performed, and thus detailed description thereof is omitted here.

本実施の形態にかかる動き補償エンジン200は、図2に示す動き補償エンジン100と同様の効果を得ることができる。また、加算・シフト処理部260を水平加算・シフト処理部262と垂直加算・シフト処理部264に分け、平均処理部270を水平平均処理部272と垂直平均処理部274に分けることによって、制御部210による制御が単純にできる。   The motion compensation engine 200 according to the present embodiment can obtain the same effects as those of the motion compensation engine 100 shown in FIG. Further, the addition / shift processing unit 260 is divided into a horizontal addition / shift processing unit 262 and a vertical addition / shift processing unit 264, and the average processing unit 270 is divided into a horizontal average processing unit 272 and a vertical average processing unit 274, thereby controlling the control unit. The control by 210 can be simplified.

勿論、動き補償エンジン200に対して、加算・シフト処理部260の代わりに、動き補償エンジン100における加算・シフト処理部160を設け、または平均処理部270の代わりに、動き補償エンジン100における平均処理部170を設けるようにしてもよい。   Of course, the motion compensation engine 200 is provided with the addition / shift processing unit 160 in the motion compensation engine 100 instead of the addition / shift processing unit 260, or the average processing in the motion compensation engine 100 instead of the average processing unit 270. A portion 170 may be provided.

<第3の実施の形態>
図8は、本発明の第3の実施の形態にかかる動き補償エンジン300を示す。動き補償エンジン300は、図2に示す動き補償エンジン100の代わりに図1に示す動画像復号装置80に設けることができる。動き補償エンジン300では、垂直フィルタリング処理部は、並行して動作可能な複数の垂直フィルタを備える。
<Third Embodiment>
FIG. 8 shows a motion compensation engine 300 according to the third embodiment of the present invention. The motion compensation engine 300 can be provided in the video decoding device 80 shown in FIG. 1 instead of the motion compensation engine 100 shown in FIG. In the motion compensation engine 300, the vertical filtering processing unit includes a plurality of vertical filters operable in parallel.

図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 motion compensation engine 300 includes a control unit 310, a horizontal filtering processing unit 320, a vertical filtering processing unit 340, a horizontal addition / shift processing unit 360, four vertical addition / shift processing units 372 to 378, horizontal An average processing unit 380 and a vertical average processing unit 390 are provided. The horizontal filtering processing unit 320 includes a horizontal filter 330, the vertical filtering processing unit 340 includes four vertical filters 342 to 348, and the four vertical filters 342 to 348 include four vertical addition / shift processing units. 372 to 378, respectively.

水平フィルタ330、水平加算・シフト処理部360、水平平均処理部380は、図7に示す動き補償エンジン200の水平フィルタ130、水平加算・シフト処理部262、水平平均処理部272と同様の動作をする。垂直加算・シフト処理部372〜378は、動き補償エンジン200の垂直フィルタ150と同様の動作をする。垂直平均処理部390は、垂直加算・シフト処理部378と、垂直加算・シフト処理部376と、制御部310に接続され、これらの機能ブロックのうちのいずれか2つから値の入力がされる。   The horizontal filter 330, horizontal addition / shift processing unit 360, and horizontal average processing unit 380 operate in the same manner as the horizontal filter 130, horizontal addition / shift processing unit 262, and horizontal average processing unit 272 of the motion compensation engine 200 shown in FIG. To do. The vertical addition / shift processing units 372 to 378 operate in the same manner as the vertical filter 150 of the motion compensation engine 200. The vertical average processing unit 390 is connected to the vertical addition / shift processing unit 378, the vertical addition / shift processing unit 376, and the control unit 310, and values are input from any two of these functional blocks. .

制御部310は、水平レジスタ群312と垂直レジスタ群314備える。水平レジスタ群312は、水平フィルタ330の8つのレジスタにそれぞれ対応し、該8つのレジスタに設定する値をそれぞれ格納する8つのレジスタを有する。垂直レジスタ群314は、垂直フィルタリング処理部340に含まれる4つの垂直フィルタのレジスタ(計32個)にそれぞれ対応し、該32個のレジスタに設定する値をそれぞれ格納する32個のレジスタを有する。   The control unit 310 includes a horizontal register group 312 and a vertical register group 314. The horizontal register group 312 has eight registers respectively corresponding to the eight registers of the horizontal filter 330 and storing values set in the eight registers. The vertical register group 314 corresponds to the registers of the four vertical filters included in the vertical filtering processing unit 340 (32 in total), and has 32 registers that respectively store the values set in the 32 registers.

制御部310は、目標位置が整数位置である場合に、該目標位置の参照画素をメモリ84から読み出して外部に出力する。目標位置が整数位置ではない場合に、補間画素を求めるための種々の設定や制御を行う。例として、いくつかの圧縮規格と目標位置の場合について説明する。説明において参照する図面において、実線枠により示動作する機能ブロックを意味し、点線枠により動作しない機能ブロックを示す。なお、分かりやすくように、動作しない機能ブロックへの入力線と、該機能ブロックからの出力線とを図示しないようにする。   When the target position is an integer position, the control unit 310 reads the reference pixel at the target position from the memory 84 and outputs it to the outside. When the target position is not an integer position, various settings and controls are performed for obtaining an interpolation pixel. As an example, the case of several compression standards and target positions will be described. In the drawings to be referred to in the description, functional blocks indicated by solid line frames are functional blocks, and functional blocks not operated by dotted line frames are illustrated. For easy understanding, the input lines to the function blocks that do not operate and the output lines from the function blocks are not shown.

図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 motion compensation engine 300 for luminance in the case of H.264. Since the interpolation pixel i in FIG. 16 corresponds to the interpolation pixel in this case, the interpolation pixel i is taken as an example.

制御部310は、DMAコントローラ86を介してメモリ84から参照画素E、F、G、H、I、Jを読み出し、水平レジスタ群312の8つのレジスタのうちの6つを介して、水平フィルタ330の8つのレジスタのうちの6つにそれぞれ設定する。また、式(1)が示す処理が行われるように水平フィルタ330のパラメータを設定すると共に、水平フィルタ330の出力先が制御部310になるように制御する。   The control unit 310 reads the reference pixels E, F, G, H, I, and J from the memory 84 via the DMA controller 86, and the horizontal filter 330 via six of the eight registers of the horizontal register group 312. Are set in six of the eight registers respectively. In addition, the parameters of the horizontal filter 330 are set so that the processing represented by Expression (1) is performed, and the output destination of the horizontal filter 330 is controlled to be the control unit 310.

制御部310は、水平フィルタ330により得られた水平補間値b'を、垂直レジスタ群314における、垂直フィルタ346に対応する8つのレジスタのうちの1つに一時的に保持する。制御部310は、b'を求めるときと同様の処理で、aa、bb、s'、gg、hhを水平フィルタリング処理部320に求めさせて、保持する。   The control unit 310 temporarily holds the horizontal interpolation value b ′ obtained by the horizontal filter 330 in one of eight registers corresponding to the vertical filter 346 in the vertical register group 314. The control unit 310 causes the horizontal filtering processing unit 320 to determine and hold aa, bb, s ′, gg, and hh in the same process as when determining b ′.

制御部310は、aa、bb、b'、s'、gg、hhが求められると、制御部310は、該6つの水平補間値を垂直フィルタ346の8つのレジスタのうちの6つにそれぞれ設定する。また、式(6)が示す処理が行われるように垂直フィルタ346のパラメータを設定し、垂直フィルタ346の出力先が垂直加算・シフト処理部376になるように制御する。   When the control unit 310 obtains aa, bb, b ′, s ′, gg, and hh, the control unit 310 sets the six horizontal interpolation values in six of the eight registers of the vertical filter 346, respectively. To do. In addition, the parameters of the vertical filter 346 are set so that the processing represented by Expression (6) is performed, and control is performed so that the output destination of the vertical filter 346 becomes the vertical addition / shift processing unit 376.

並行して、制御部310は、メモリ84から6つの参照画素A、C、G、M、R、Tを読み出して垂直フィルタ348の8つのレジスタ内の6つにそれぞれ設定する。また、式(3)が示す処理が行われるように垂直フィルタ348のパラメータを設定すると共に、垂直フィルタ348の出力先が垂直加算・シフト処理部378になるように制御する。   In parallel, the control unit 310 reads the six reference pixels A, C, G, M, R, and T from the memory 84 and sets them in six in the eight registers of the vertical filter 348, respectively. Further, the parameters of the vertical filter 348 are set so that the processing represented by the expression (3) is performed, and control is performed so that the output destination of the vertical filter 348 becomes the vertical addition / shift processing unit 378.

また、制御部310は、垂直加算・シフト処理部376に対して式(7)に示す加算・シフト処理のパラメータを設定し、垂直加算・シフト処理部378に対して式(4)が示す加算・シフト処理のパラメータを設定し、垂直加算・シフト処理部376と垂直加算・シフト処理部378の出力先が垂直平均処理部390になり、垂直平均処理部390の出力先が外部になるように制御する。   In addition, the control unit 310 sets the addition / shift processing parameters shown in Expression (7) for the vertical addition / shift processing unit 376, and the addition shown by Expression (4) for the vertical addition / shift processing unit 378. Set the parameters of the shift processing so that the output destination of the vertical addition / shift processing unit 376 and the vertical addition / shift processing unit 378 is the vertical average processing unit 390 and the output destination of the vertical average processing unit 390 is external Control.

垂直加算・シフト処理部376は、垂直フィルタ346が出力した垂直補間値(j')を式(7)に示す加算・シフト処理し、補間画素jを得て垂直平均処理部390に出力する。垂直加算・シフト処理部378は、垂直フィルタ348が出力した垂直補間値(h')を式(4)に示す加算・シフト処理し、補間画素hを得て垂直平均処理部390に出力する。   The vertical addition / shift processing unit 376 performs addition / shift processing shown in Expression (7) on the vertical interpolation value (j ′) output from the vertical filter 346, obtains an interpolation pixel j, and outputs it to the vertical average processing unit 390. The vertical addition / shift processing unit 378 adds and shifts the vertical interpolation value (h ′) output from the vertical filter 348 as shown in Expression (4), obtains an interpolation pixel h, and outputs it to the vertical average processing unit 390.

垂直平均処理部390は、式(13)が示すように、補間画素jと補間画素hを平均して補間画素iとなる平均値を得て外部に出力する。   The vertical average processing unit 390 averages the interpolation pixel j and the interpolation pixel h to obtain an average value that becomes the interpolation pixel i and outputs the average value to the outside, as shown in Expression (13).

図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 control unit 310 stores reference pixels “A, E, I, M”, “B, F, J, N”, “C, G, K, O”, “D, H, L, P” from the memory 84. This is read out and set in the registers of the vertical filters 342 to 348, respectively. In addition, the parameters of the vertical filters 342 to 348 and the vertical addition / shift processing units 372 to 378 are set so that the processing shown in Expression (22) is performed, and the output destination of each vertical filter corresponds to the vertical filter. The vertical addition / shift processing unit controls the output destination of each addition / shift processing unit to be the control unit 310.

制御部310は、水平レジスタ群312を介して、垂直加算・シフト処理部372から出力した補間画素nn、n、s、ssを水平フィルタ330の8つのレジスタのうちの4つにそれぞれ設定する。また、式(22)が示す処理が行われるように、水平フィルタ330と水平加算・シフト処理部360のパラメータを設定し、水平フィルタ330の出力先が水平加算・シフト処理部360になり、水平加算・シフト処理部360の出力先が外部になるように制御する。
これにて、補間画素rは、水平加算・シフト処理部360から外部に出力される。
The control unit 310 sets the interpolation pixels nn, n, s, and ss output from the vertical addition / shift processing unit 372 in four of the eight registers of the horizontal filter 330 via the horizontal register group 312. Further, the parameters of the horizontal filter 330 and the horizontal addition / shift processing unit 360 are set so that the processing represented by the expression (22) is performed, and the output destination of the horizontal filter 330 becomes the horizontal addition / shift processing unit 360, Control is performed so that the output destination of the addition / shift processing unit 360 is external.
Thus, the interpolation pixel r is output from the horizontal addition / shift processing unit 360 to the outside.

図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に出力される。 Control unit 310, eight reference pixels from the memory 84 A -4, -1, A -3 , -1, A -2, -1, A -1, -1, A 1, -1, A 2, - 1 , A 3, −1 , A 4, −1 are read out and set in the eight registers of the horizontal filter 330, respectively. Further, the parameters of the horizontal filter 330 and the horizontal addition / shift processing unit 360 are set so that the processing represented by the equation (25) is performed, and the output destination of the horizontal filter 330 becomes the horizontal addition / shift processing unit 360, Control is performed so that the output destination of the addition / shift processing unit 360 is the horizontal average processing unit 380 and the output destination of the horizontal average processing unit 380 is the control unit 310. As a result, an addition / shift value corresponding to the interpolation pixel b −1 is obtained from the horizontal addition / shift processing unit 360 and is output to the horizontal average processing unit 380.

並行して、制御部310は、参照画素A1,−1を水平平均処理部380に出力する。これにより、水平平均処理部380から、b−1とA1,−1の平均値が得られ、制御部310に出力される。この平均値は、式(28)が示すように、補間画素e−1である。 In parallel, the control unit 310 outputs the reference pixel A 1, −1 to the horizontal average processing unit 380. As a result, an average value of b −1 and A 1, −1 is obtained from the horizontal average processing unit 380 and output to the control unit 310. This average value is the interpolated pixel e −1 as shown in Equation (28).

制御部310は、e−1を求めるときと同様の処理で、e−4、e−3、e−2、e、e、e、eを水平フィルタ330、水平加算・シフト処理部360、水平平均処理部380に求めさせて、垂直レジスタ群314に一時的に保持する。 The control unit 310 performs processing similar to that for obtaining e −1 , e −4 , e −3 , e −2 , e 1 , e 2 , e 3 , e 4 to the horizontal filter 330, horizontal addition / shift processing 360 and the horizontal average processing unit 380, and temporarily hold them in the vertical register group 314.

−4、e−3、e−2、e−1、e、e、e、eが求められると、制御部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 control unit 310 sets the eight interpolation pixels in the vertical filter 348. Further, the parameters of the vertical filter 348 and the vertical addition / shift processing unit 378 are set so that the processing represented by the expression (30) is performed, and the output destination of the vertical filter 348 becomes the vertical addition / shift processing unit 378, so Control is performed so that the output destination of the addition / shift processing unit 378 is the vertical average processing unit 390 and the output destination of the vertical average processing unit 390 is external.

垂直加算・シフト処理部378から補間画素kとなる加算・シフト値が垂直平均処理部390に出力される。並行して、制御部310は、補間画素eを垂直平均処理部390に出力する。これにより、垂直平均処理部390から、kとeの平均値が得られ、外部に出力される。この平均値が、式(37)が示すように、補間画素nである。 The addition / shift value to be the interpolation pixel k is output from the vertical addition / shift processing unit 378 to the vertical average processing unit 390. In parallel, the control unit 310 outputs the interpolation pixel e 1 to the vertical average processing unit 390. As a result, an average value of k and e 1 is obtained from the vertical average processing unit 390 and output to the outside. This average value is the interpolated pixel n as shown in Expression (37).

図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 control unit 310 first reads the reference pixels A and B from the memory 84 and obtains two of the eight registers of the horizontal filter 330 in order to obtain the interpolation pixel e. Set to. In addition, parameters “xFrc” and “8-xFrc” are set for the horizontal filter 330 so that the processing indicated by Expression (43) is performed, and the output destination of the horizontal filter 330 is the control unit 310. Control.

水平フィルタ330の出力は、画素Fである。制御部310は、画素Fを垂直レジスタ群314の1つのレジスタに保持すると共に、参照画素C、Dを水平フィルタ330に設定し、画素Gを求めさせる。   The output of the horizontal filter 330 is a pixel F. The control unit 310 holds the pixel F in one register of the vertical register group 314 and sets the reference pixels C and D in the horizontal filter 330 to obtain the pixel G.

水平フィルタ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 horizontal filter 330, the control unit 310 sets the pixels F and G in two of the eight registers of the vertical filter 348. Further, the parameters “yFrc” and “8-yFrc” of the vertical filter 348 and the parameter “rnd” of the vertical addition / shift processing unit 378 are set so that the processing represented by the equation (45) is performed. Control is performed so that the output destination is the vertical addition / shift processing unit 378 and the output destination of the vertical addition / shift processing unit 378 is external.

これにより、垂直加算・シフト処理部378から、補間画素eとなる加算・シフト値が外部に出力される。   Thus, the vertical addition / shift processing unit 378 outputs the addition / shift value to be the interpolation pixel e to the outside.

図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 control unit 310 reads the reference pixels A and B from the memory 84 and outputs the reference pixels A and B to the horizontal average processing unit 380 so that the output destination of the horizontal average processing unit 380 is external. As a result, the average value of the reference pixels A and B is output from the horizontal average processing unit 380 to the outside. This average value is the interpolation pixel b.

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 motion compensation engine 300 according to the third embodiment can provide the same effects as those of the motion compensation engine 100 and the motion compensation engine 200 described above, and is provided with a plurality of vertical filters operable in parallel. As a result, the processing speed can be increased.

<第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 motion compensation engine 400 with four horizontal filters that can operate in parallel and eight vertical filters that can operate in parallel.

動き補償エンジン400は、制御部410、水平フィルタリング処理部420、垂直フィルタリング処理部440、加算・シフト処理部460、水平平均処理部472、垂直平均処理部474を備える。   The motion compensation engine 400 includes a control unit 410, a horizontal filtering processing unit 420, a vertical filtering processing unit 440, an addition / shift processing unit 460, a horizontal average processing unit 472, and a vertical average processing unit 474.

水平フィルタリング処理部420は、4つの水平フィルタを有し、該4つの水平フィルタは、前述した各実施の形態における動き補償エンジンの水平フィルタと同様の構成を有する。   The horizontal filtering processing unit 420 includes four horizontal filters, and the four horizontal filters have the same configuration as the horizontal filter of the motion compensation engine in each of the above-described embodiments.

垂直フィルタリング処理部440は、8つの垂直フィルタを有し、該8つの垂直フィルタは、前述した各実施の形態における動き補償エンジンの垂直フィルタと同様の構成を有する。   The vertical filtering processing unit 440 includes eight vertical filters, and the eight vertical filters have the same configuration as the vertical filter of the motion compensation engine in each of the above-described embodiments.

加算・シフト処理部460は、水平フィルタリング処理部420の各水平フィルタにそれぞれ対応する4つの水平加算・シフト処理部と、垂直フィルタリング処理部440の各垂直フィルタとそれぞれ対応する8つの垂直加算・シフト処理部を有する。   The addition / shift processing unit 460 includes four horizontal addition / shift processing units corresponding to the horizontal filters of the horizontal filtering processing unit 420 and eight vertical addition / shifts corresponding to the vertical filters of the vertical filtering processing unit 440, respectively. It has a processing part.

水平平均処理部472と垂直平均処理部474は、平均処理部472を構成する。   The horizontal average processing unit 472 and the vertical average processing unit 474 constitute an average processing unit 472.

水平フィルタリング処理部420における各水平フィルタの出力先は、相対応する水平加算・シフト処理部と、制御部410間で切り換え可能である。垂直フィルタリング処理部440における各垂直フィルタの出力先は、相対応する垂直加算・シフト処理部と、制御部410間で切り換え可能である。   The output destination of each horizontal filter in the horizontal filtering processing unit 420 can be switched between the corresponding horizontal addition / shift processing unit and the control unit 410. The output destination of each vertical filter in the vertical filtering processing unit 440 can be switched between the corresponding vertical addition / shift processing unit and the control unit 410.

加算・シフト処理部460の各水平加算・シフト処理部の出力先は、水平平均処理部472、制御部410、外部間で切り換え可能である。加算・シフト処理部460の各垂直加算・シフト処理部の出力先は、垂直平均処理部474、制御部410、外部間で切り換え可能である。   The output destination of each horizontal addition / shift processing unit of the addition / shift processing unit 460 can be switched among the horizontal average processing unit 472, the control unit 410, and the outside. The output destination of each vertical addition / shift processing unit of the addition / shift processing unit 460 can be switched among the vertical average processing unit 474, the control unit 410, and the outside.

水平平均処理部472と垂直平均処理部474の出力先は、制御部410と外部間で切り換え可能である。   The output destinations of the horizontal average processing unit 472 and the vertical average processing unit 474 can be switched between the control unit 410 and the outside.

制御部410は、目標位置が整数位置であるときに、該整数位置の参照画素を読み出して外部に出力する。一方、目標位置が整数位置ではないときに、コーデック信号が示す圧縮規格と目標位置とに応じて、各処理部のパラメータの設定、各処理部の出力先の制御、該処理部の処理結果の出力先が制御部410であるときにおいて該処理結果の保持、各処理部に出力する値などの設定および制御を行うことによって、目標位置の補間画素を求める。   When the target position is an integer position, the control unit 410 reads the reference pixel at the integer position and outputs it to the outside. On the other hand, when the target position is not an integer position, according to the compression standard and the target position indicated by the codec signal, the parameter setting of each processing unit, the control of the output destination of each processing unit, the processing result of the processing unit When the output destination is the control unit 410, interpolation of the target position is obtained by holding the processing result and setting and controlling the value output to each processing unit.

本実施の形態の動き補償エンジン400は、前述した各動き補償エンジンの効果を得ることができると共に、並行して動作可能な水平フィルタと垂直フィルタの数が多いので、より高速な処理ができる。   The motion compensation engine 400 of the present embodiment can obtain the effects of the motion compensation engines described above, and can perform higher-speed processing because there are a large number of horizontal filters and vertical filters operable in parallel.

以上、実施の形態をもとに本発明を説明した。実施の形態は例示であり、本発明の主旨から逸脱しない限り、上述した実施の形態に対してさまざまな変更、増減を行ってもよい。これらの変更、増減が行われた変形例も本発明の範囲にあることは当業者に理解されるところである。   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 Motion Compensation Engine 41 Vertical Filter 42 First Horizontal Filter 43 Second Horizontal Filter 44 Cubic Alignment Unit 45 Cubic Filter 80 Video Decoding Device 82 System Bus 84 Memory 86 DMA Controller 88 Entropy Decoding Unit 90 DMA IF
100 Motion Compensation Engine 110 Control Unit 120 Horizontal Filtering Processing Unit 130 Horizontal Filter 140 Vertical Filtering Processing Unit 150 Vertical Filter 160 Addition / Shift Processing Unit 170 Average Processing Unit 200 Motion Compensation Engine 210 Control Unit 260 Addition / Shift Processing Unit 262 Horizontal Addition / Shift Processing Unit 262 Shift processing unit 264 Vertical addition / shift processing unit 270 Average processing unit 272 Horizontal average processing unit 274 Vertical average processing unit 300 Motion compensation engine 310 Control unit 312 Horizontal register group 314 Vertical register group 320 Horizontal filtering processing unit 330 Horizontal filter 340 Vertical filtering Processing unit 342-348 Vertical filter 360 Horizontal addition / shift processing unit 372-378 Vertical addition / shift processing unit 380 Horizontal average processing unit 390 Vertical average processing unit 400 Can compensation engine 410 control unit 420
Horizontal filtering processing unit 440 Vertical filtering processing unit 460 Addition / shift processing unit 472 Horizontal average processing unit 474 Vertical average processing unit

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.
JP2010119296A 2010-05-25 2010-05-25 Motion compensation apparatus Pending JP2011249986A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (3)

* Cited by examiner, † Cited by third party
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