JP4963194B2 - Filter processing device, multiplier, and motion compensation processing device - Google Patents
Filter processing device, multiplier, and motion compensation processing device Download PDFInfo
- Publication number
- JP4963194B2 JP4963194B2 JP2006153363A JP2006153363A JP4963194B2 JP 4963194 B2 JP4963194 B2 JP 4963194B2 JP 2006153363 A JP2006153363 A JP 2006153363A JP 2006153363 A JP2006153363 A JP 2006153363A JP 4963194 B2 JP4963194 B2 JP 4963194B2
- Authority
- JP
- Japan
- Prior art keywords
- partial product
- filter
- product generation
- unit
- generation unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、動画の圧縮符号化復号に使用される動き補償処理におけるフィルタ演算を実行するために好適なフィルタ処理装置及び乗算器、並びにこれらを具備する動き補償処理装置に関する。 The present invention relates to a filter processing device and a multiplier suitable for executing a filter operation in a motion compensation process used for compression coding / decoding of a moving image, and a motion compensation processing device including these.
次世代DVD(Digital Versatile Disk)やDTV(デジタルテレビ)に採用が決定しているH.264/AVCやVC−1といった新しいコーデックがある。これらの復号装置においては、動き補償部での動き補償予測フィルタのフィルタ演算をブースのアルゴリズムを適用した乗算器で構成される場合がある。 H. has been decided to be adopted for the next generation DVD (Digital Versatile Disk) and DTV (digital television). There are new codecs such as H.264 / AVC and VC-1. In these decoding apparatuses, the filter operation of the motion compensation prediction filter in the motion compensation unit may be configured by a multiplier to which Booth's algorithm is applied.
乗算器の演算時間は、部分積加算をするために必要とする時間と桁上げ信号吸収をするために必要な時間の総和であり、演算速度を高速にする上でこれらの処理時間の短縮が問題となる。その対策として加算回路を減らすために部分積の数そのものを削減する必要がある。そのためには乗数の連続する複数ビットを一まとめのグループにして、このグループに対応した部分積を生成すれば部分積を削減することができる。そこで部分積数削減のために用いられるのが2次のブースである。2次のブースとは、乗数を2ビットごとに区切り、各組と下位組の最上位ビットの計3ビットをひとまとめにするというアルゴリズムを適用した部分積削減の手法である。 The operation time of the multiplier is the sum of the time required to add the partial products and the time required to absorb the carry signal. In order to increase the operation speed, the processing time can be shortened. It becomes a problem. As a countermeasure, it is necessary to reduce the number of partial products in order to reduce the number of adder circuits. For this purpose, partial products can be reduced by grouping together a plurality of bits having consecutive multipliers and generating a partial product corresponding to this group. Therefore, the secondary booth is used to reduce the partial product number. The secondary booth is a partial product reduction technique to which an algorithm is applied in which a multiplier is divided every 2 bits, and a total of 3 bits of the most significant bits of each group and the lower group are combined.
しかしながら、上記のようなコーデックのフィルタ演算を行なう際、これをブースのアルゴリズムを適用した乗算器で構成すると、多数の乗算器が必要となり回路規模が増大する。また、同様にH.264の画面内予測における予測画像の生成に使用されるフィルタ演算をブースのアルゴリズムを適用した乗算器で適用すると回路規模は増大する。 However, when the codec filter operation as described above is performed by a multiplier to which the Booth algorithm is applied, a large number of multipliers are required and the circuit scale increases. Similarly, H. When the filter operation used to generate a predicted image in the H.264 intra-screen prediction is applied by a multiplier to which the Booth algorithm is applied, the circuit scale increases.
これは、H.264やVC−1といった規格では、従来のMPEG(Moving Picture Experts Group)2などに比べて極めて複雑な演算を要求されるからである。下記表1に、MPEG2、H.264、VC−1の機能比較を示す。 This is because of H.C. This is because standards such as H.264 and VC-1 require extremely complicated calculations as compared to conventional MPEG (Moving Picture Experts Group) 2 and the like. Table 1 below shows MPEG2, H.264. H.264, VC-1 functional comparison.
ところで、従来、動き補償のフィルタ演算回路の規模を縮小させる技術が特許文献1に開示されている。図12は、特許文献1に記載の画像処理装置における累積加算フィルタ(ディジタルフィルタ)を示すブロック図である。図12に示すように、従来のディジタルフィルタは、入力画像信号の画素ライン数を計測し、そのカウンタモジューロが拡大縮小率に応じて選択的に切り替えられるカウンタ503と、カウンタ503の係数値に応じたフィルタ係数を出力する係数データメモリ502と、入力画像信号に対しフィルタ係数を乗算する乗算器501と、乗算器501の出力又は累積加算値を保持する累積加算メモリ506と、乗算器501の出力に累積加算メモリ506内の保持内容を加算する加算器504と、カウンタ503の係数値に従って乗算器501又は加算器504の出力を選択的に累積加算メモリ506に伝達するセレクタ505とを有する。乗算器501、加算器504を1つとし、累積演算によりフィルタ出力を得ることで所要ハードウェア量を削減している。
しかしながら、上記特許文献1のように、累積演算することでハードウェア量を削減しようとしても、ステップ数が増大し、処理速度が遅くなり現実的ではない。特に、H.264やVC−1といったフィルタのタップ数が多い場合には、演算が複雑になるため、更に処理速度が遅くなるという問題点がある。
However, as in
本発明にかかるフィルタ処理装置は、複数のフィルタについて、複数の入力データとフィルタを構成する複数のフィルタ係数のそれぞれとをブースアルゴリズムを用いて積和演算するフィルタ処理装置であって、前記入力データと当該入力データに対応付けられたフィルタ係数とからなる1以上の組データが入力され、1以上の部分積を生成する複数の部分積生成ユニットと、前記複数の部分積生成ユニットにより生成される部分積の総和を生成する加算部と、前記組データに応じ、前記複数の部分積生成ユニットを1以上選択して当該組データを入力する部分積生成部選択部とを有するものである。 A filter processing apparatus according to the present invention is a filter processing apparatus that performs a product-sum operation on a plurality of filters using a Booth algorithm for a plurality of input data and a plurality of filter coefficients constituting the filter. And one or more sets of data composed of filter coefficients associated with the input data are input and generated by a plurality of partial product generation units that generate one or more partial products and the plurality of partial product generation units An addition unit that generates a sum of partial products, and a partial product generation unit selection unit that selects one or more of the plurality of partial product generation units and inputs the set data according to the set data.
本発明においては、一の組データから生成すべき部分積の一部が一の部分積生成ユニットでは生成不能な場合、2以上の部分積生成ユニットを使用して部分積を生成することで、個々の部分積生成ユニットの演算能力又は回路規模を低く抑えることができる。 In the present invention, when a partial product to be generated from one set of data cannot be generated by one partial product generation unit, a partial product is generated using two or more partial product generation units. The calculation capability or circuit scale of each partial product generation unit can be kept low.
本発明によれば、処理速度を低下させることなくハードウェア量を削減することができるブースアルゴリズムを利用したフィルタ処理装置、乗算器、及びこれを利用した動き補償処理装置を提供することができる。 According to the present invention, it is possible to provide a filter processing device, a multiplier, and a motion compensation processing device using the same, which use a Booth algorithm that can reduce the amount of hardware without reducing the processing speed.
以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。この実施の形態は、本発明を、異なる種類のフィルタ演算を実効させるフィルタ処理器(乗算器)に適用したものである。本実施の形態は、ブースアルゴリズムを利用したフィルタ演算器において、部分積生成ユニットの機能と、乗数となるフィルタ係数とに着目し、冗長な回路を省略することでハードウェア量を削減する。なお、本実施の形態においては、フィルタ演算器として説明するが、複数種類の予め定められた乗数群と任意の被乗数群とを乗算させる乗算器とすることも可能である。 Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In this embodiment, the present invention is applied to a filter processor (multiplier) that executes different types of filter operations. In this embodiment, the filter operation unit using the Booth algorithm pays attention to the function of the partial product generation unit and the filter coefficient to be a multiplier, and reduces the amount of hardware by omitting redundant circuits. In this embodiment, although described as a filter computing unit, a multiplier that multiplies a plurality of types of predetermined multiplier groups and an arbitrary multiplicand group may be used.
(1)ブースのアルゴリズムを適用した乗算器
本実施の形態にかかるフィルタ演算器は、ブースのアルゴリズムを使用して乗算を行うフィルタ演算器である。ここでは先ず、本発明の理解を容易とするため、2次のブースアルゴリズムを利用した乗算器について説明しておく。
(1) Multiplier to which Booth's algorithm is applied The filter arithmetic unit according to the present embodiment is a filter arithmetic unit that performs multiplication using the Booth's algorithm. Here, first, in order to facilitate understanding of the present invention, a multiplier using a second order Booth algorithm will be described.
乗数Yを符号付き8ビット整数
Y=−y[7]・27+y[6]・26+y[5]・25+y[4]・24+y[3]・23+y[2]・22+y[1]・21+y[0]・20
とすると、任意整数である被乗数Xとの積P=X×Yは以下のようになる。
Multiplier Y is a signed 8-bit integer Y = −y [7] · 2 7 + y [6] · 2 6 + y [5] · 2 5 + y [4] · 2 4 + y [3] · 2 3 + y [2]・ 2 2 + y [1] ・ 2 1 + y [0] ・ 2 0
Then, the product P = X × Y with the multiplicand X, which is an arbitrary integer, is as follows.
この(−2・y[2i+1]+y[2i]+y[2i-1])を算出するものをブースデコーダ、X×(−2・y[2i+1}+y[2i]+y[2i-1])×22iを部分積という。ここで、本明細書においては、ブースデコーダにより求められるデコード値(−2・y[2i+1]+y[2i]+y[2i-1])を符号データということとする。また、X×(−2・y[2i+1}+y[2i]+y[2i-1])×22i(部分積)を生成する回路を部分積生成ユニット、X×(−2・y[2i+1}+y[2i]+y[2i-1])×22iのうち、各iに対応した部分積を生成する回路を部分積生成部、符号データ(−2・y[2i+1]+y[2i]+y[2i-1])を求める回路をブースデコーダ、符号データ×被乗数からなる演算を行ない部分積を求める回路を乗算部、部分積のうち、×22iの演算を実行する部分をビットシフト部ということとする。 What calculates (−2 · y [2i + 1] + y [2i] + y [2i-1]) is a booth decoder, X × (−2 · y [2i + 1} + y [2i] + y [2i-1]) × 2 2i is called partial product. In this specification, the decode value (−2 · y [2i + 1] + y [2i] + y [2i−1]) obtained by the Booth decoder is referred to as code data. In addition, a circuit for generating X × (−2 · y [2i + 1} + y [2i] + y [2i−1]) × 2 2i (partial product) is a partial product generation unit, and X × (−2 · y [2i + 1} + Y [2i] + y [2i-1]) × 2 2i , a circuit that generates a partial product corresponding to each i is represented by a partial product generation unit, code data (−2 · y [2i + 1] + y [2i] + y [ 2i-1]) is a booth decoder, a circuit that performs an operation consisting of code data × multiplicand to obtain a partial product is a multiplication unit, and a portion of the partial product that is to execute an operation of × 2 2i is a bit shift unit. And
ここで、下記表2に示すように、符号データ(−2・y[2i+1]+y[2i]+y[2i-1])の値の組み合わせは8通りしかなく、0、±1、±2の値のみしかとらない。よって、乗算器は、0、±X、±2Xに22iを乗算した値(部分積)を算出して加算する値の組み合わせの対応(真理値表)として書ける。ここで、符号データの値は8通りしかないため、ブースデコーダは、単なる組み合わせ論理回路により得ることができる。 Here, as shown in Table 2 below, there are only eight combinations of values of the code data (−2 · y [2i + 1] + y [2i] + y [2i−1]), and 0, ± 1, ± 2 Takes only a value. Therefore, the multiplier can calculate a value (partial product) obtained by multiplying 0, ± X, ± 2X by 2 2i and write it as a correspondence (truth table) of combinations of values to be added. Here, since there are only eight values of the code data, the booth decoder can be obtained by a simple combinational logic circuit.
0、±X、±2Xのうち、2Xの生成は1ビットのシフトで行なうことができる。一方、負数の生成は被乗数Xが2の補数表現であるのでXの各ビットを反転させ最下位ビットに1を加えればよい。これを実現するために、例えば、符号データ(−2・y[2i+1]+y[2i]+y[2i-1])を生成する回路(ブースデコーダ)は、乗数Yの入力に対して部分積の絶対値(0、X、2X)を選択するための2つの信号と反転を選択するための1つの信号とからなる3つの信号を生成する。また、乗算部は、この3つの信号を受けて、絶対値が0の場合は0を、Xの場合は被乗数X を、2Xの場合は被乗数Xを1ビットシフトしたものを選択し、さらに、反転が必要な場合はその値を反転させて部分積を生成することができる。さらに、×22iを実行するビットシフト部は、単純にビット線を2iだけシフトさせればよい。 Of 0, ± X, and ± 2X, 2X can be generated by a 1-bit shift. On the other hand, since the multiplicand X is expressed in the complement of 2 when generating the negative number, it is only necessary to invert each bit of X and add 1 to the least significant bit. In order to realize this, for example, a circuit (Booth decoder) that generates code data (−2 · y [2i + 1] + y [2i] + y [2i−1]) Three signals including two signals for selecting an absolute value (0, X, 2X) and one signal for selecting inversion are generated. Further, the multiplication unit receives these three signals, and when the absolute value is 0, it is 0, and when it is X, the multiplicand X In the case of 2X, the multiplicand X shifted by 1 bit is selected, and if the inversion is necessary, the value can be inverted to generate a partial product. Furthermore, the bit shift unit that executes x2 2i may simply shift the bit line by 2i.
図1は、このような2次のブースのアルゴリズムに従って乗算を実行する乗算器を示すブロック図である。乗算器400は、被乗数Xを出力するレジスタF0と、乗数Yを出力するレジスタF7を有する。更に、乗数Y及び被乗数Xが入力され部分積を生成する部分積生成ユニット401と、部分積生成ユニット401にて生成された部分積を加算する加算器450とを有する。部分積生成ユニット401は、4つの部分積生成部410、420、430、440を有する
FIG. 1 is a block diagram illustrating a multiplier that performs multiplication according to such a second order Booth algorithm. The
各部分積生成部は、上述したように、乗数Yのうち所定ビットが入力され、ブースのアルゴリズムに従って符号データ(0、±1、±2)を生成するブースデコーダと、得られた符号データと被乗数Xとの乗算結果を出力する乗算部と、乗算部の演算結果のビットシフトを行なうビットシフト部とから構成されるものとする。 As described above, each partial product generator receives a predetermined bit of the multiplier Y, generates a code data (0, ± 1, ± 2) according to Booth's algorithm, and the obtained code data It is assumed that a multiplication unit that outputs a multiplication result with the multiplicand X and a bit shift unit that performs a bit shift of a calculation result of the multiplication unit.
各部分積生成部は、X×(−2・y[2i+1}+y[2i]+y[2i-1])×22iの"i"に対応したものとなっており、例えば乗数Yが8ビット(y0〜y7とする)であれば、i=0〜3であり、それぞれX×(−2・y1+y0+0)×20、X×(−2・y3+y2+y1)×22、X×(−2・y5+y4+y3)×24、X×(−2・y7+y6+y5)×26を求める。図1においては、これらの部分積を求める部分積生成部を、それぞれ410、420、430、440としている。なお、本実施の形態においては、ブースデコーダでデコードする乗数Xが8ビットを例にとって説明するが、これ未満、又は以上であってもよいことは勿論である。その場合は、部分積生成部の個数を適宜調整すればよい。 Each partial product generator corresponds to “i” of X × (−2 · y [2i + 1} + y [2i] + y [2i−1]) × 2 2i . For example, the multiplier Y is 8 bits. (Y 0 to y 7 ), i = 0 to 3, and X × (−2 · y 1 + y 0 +0) × 2 0 and X × (−2 · y 3 + y 2 + y 1, respectively. ) × 2 2 , X × (−2 · y 5 + y 4 + y 3 ) × 2 4 , and X × (−2 · y 7 + y 6 + y 5 ) × 2 6 are obtained. In FIG. 1, the partial product generation units for obtaining these partial products are 410, 420, 430, and 440, respectively. In the present embodiment, the multiplier X decoded by the Booth decoder will be described by taking 8 bits as an example, but it is needless to say that the multiplier X may be less than or more than this. In that case, what is necessary is just to adjust the number of partial product production | generation parts suitably.
次に、実際の演算を例にとって、この乗算器400の動作について説明する。8ビットの乗数Yは、図2(a)のように表すことができる。乗数を2ビットごとに区切り、各組と下位組の最上位ビットの計3ビット(ただしy−1=0)のデータから符号データが得られる。これらに被乗数を乗算し、対応するビットシフト(×2i)を演算することで部分積を生成することができる。このため、図2(b)に示すように、レジスタF7は8ビットを出力するシフトレジスタからなり、乗数Y{y0〜y7}を出力する。このとき部分積生成部410には、乗数Yのうち下位2ビット{y0、y1}、部分積生成部420、430、440にはそれぞれ、{y1、y2、y3}、{y3、y4、y5}、{y5、y6、y7}を入力する。部分積生成部410は、入力されたこれらの所定ビットから符号データを生成するブースデコーダ411と、得られた符号データと被乗数Xとの乗算を行なう乗算部412と、乗算結果を所定ビットシフトするビットシフト部413とを有する。他の部分積生成部420、430、440も同様に構成される。ここでは、被乗数X=358(166H)、乗数Y=123(7BH)の乗算について説明する。下記表2は、演算工程における各出力値を示す。
Next, the operation of the
×Y=358×123=44034(AC02H)
Y=123(7BH)
=(−2・0+1+1)・26
+(−2・1+1+1)・24
+(−2・1+0+1)・22
+(−2・1+1+0)・20
=2・26+0・24+(−1)・22+(−1)・20
よって、下記となる。
X×Y={(2×356)×26} ・・・部分積生成部410にて演算
+{(0×356)×24} ・・・部分積生成部420にて演算
+{(−1×356)×22} ・・・部分積生成部430にて演算
+{(−1×356)×20} ・・・部分積生成部440にて演算
× Y = 358 × 123 = 44034 (AC02H)
Y = 123 (7BH)
= (-2 ・ 0 + 1 + 1) ・ 2 6
+ (− 2 · 1 + 1 + 1) · 2 4
+ (-2 · 1 + 0 + 1) · 2 2
+ (-2 · 1 + 1 + 0) · 2 0
= 2 · 2 6 + 0 · 2 4 + (− 1) · 2 2 + (− 1) · 2 0
Therefore, it becomes the following.
X × Y = {(2 × 356) × 2 6 }... Operation in partial
先ず、被乗数入力部F0からは"358"が各部分積生成部410、420、430、440に入力される。乗数入力部F7からは、各部分積生成部410、420、430、440に、それぞれ{y0、y1}={1、1}、{y1、y2、y3}={1、0、1}、{y3、y4、y5}={1、1、1}、{y5、y6、y7}={1、1、0}が入力される。ブースデコーダ411、421、431、441は入力された所定ビットから、それぞれ(−2・y[2i+1}+y[2i]+y[2i-1])=(−2・y1+y0+0)、(−2・y3+y2+y1)、(−2・y5+y4+y3)、(−2・y7+y6+y5)の演算に対応する符号データを出力する。上記の式より本例では、各ブースデコーダ411、421、431、441は、それぞれ、"−1"、"−1"、"0"、"2"を出力する。
First, “358” is input to each partial
各乗算部412、422、432、442は、上記符号データ×被乗数Xを演算して、それぞれビットシフト部413、423、433、443へ入力する。ビットシフト部413はそのまま加算器450へ出力する。なお、本例においては説明の明確のためビットシフト部413を設けているが設ける必要はない。ビットシフト部423、433、443は、受け取った結果をそれぞれ2ビット、4ビット、6ビットシフトさせた後、加算器450へ入力する。
Each of the
本例の加算器450は、全加算器(フルアダー)451、452と、半加算器(ハーフアダー)453と、結果を受け取るレジスタ454とを有する。各ビットシフト部413、423、433、443から入力された値は、加算器450にて加算され、乗算結果Pとして出力される。
The
このように、2次のブースのアルゴリズムを使用すると、乗数を、0、±1、±2の符号データ×22iとし、被乗数と演算を行なわせるので、部分積の個数が略半分となる。よって加算器にて加算する部分積の個数を略半減させることができるので、乗算器を小型化することができる。 In this way, when the second-order Booth algorithm is used, the multiplier is set to 0, ± 1, ± 2 code data × 2 2i and the calculation is performed with the multiplicand, so that the number of partial products is substantially halved. Therefore, the number of partial products to be added by the adder can be substantially halved, so that the multiplier can be reduced in size.
ここで、部分積生成ユニットの機能について説明する。フィルタ演算器を構成する部分積生成ユニットは、複数の部分積生成部を備えるが、その演算能力に応じて当該部分積生成部の構成を異なるもとすることができる。すなわち、図1、2に示す部分積生成ユニットは、4つの部分積生成部を設け、X×(−2・y[2i+1}+y[2i]+y[2i-1])×22iのi=3まで、×64までの演算能力を有する。一方、乗数Xを6ビットで表すことができれば部分積生成部は3つ、すなわち×16までの演算能力を有すればよく、乗数Xを4ビットで表すことができればこれらの組は2つ、すなわち×4の演算能力を有すればよい。 Here, the function of the partial product generation unit will be described. Although the partial product generation unit constituting the filter arithmetic unit includes a plurality of partial product generation units, the configuration of the partial product generation unit may be different depending on the calculation capability. That is, the partial product generation unit shown in FIGS. 1 and 2 includes four partial product generation units, and i = (X × (−2 · y [2i + 1} + y [2i] + y [2i−1]) × 2 2i ) It has a computing capacity of up to 3 and up to x64. On the other hand, if the multiplier X can be represented by 6 bits, the partial product generation unit only needs to have three computing powers, that is, up to × 16, and if the multiplier X can be represented by 4 bits, these sets are two. That is, it only needs to have a computing capacity of x4.
このように部分積生成ユニットは、乗数Xに応じて部分積生成部が演算可能な最大の桁数が異なる。よって、生成可能な部分積の数が異なる。また、入力されるフィルタ係数によっては、例えば×1、×4、×16、×64のうち、×16の部分積生成部430のみを除いたような構成とすることも可能である。すなわち、部分積生成部を3つのみでも×64までの演算を可能な構成とすることもできる。更にまた、×1に対応する部分積生成部のビットシフト部は省略することが可能である。また、後述するように、符号データによっても部分積生成部の構成を異ならせることも可能である。つまり、生成される符号データが常に"0、1"であるような部分積生成部には、符号データ"0、1"にのみ対応できればよい。よって少なくとも符号データと入力データを乗算する乗算部は不要である。更に、生成される符号データが常に"0"であるような部分積生成部は、符号データ"0"にのみ対応できればよい。この場合は、出力が常に"0"となるため、乗算部及びビットシフト部は不要である。このように、フィルタ演算器に入力されるフィルタ係数が予め定められており、生成される符号データが予め定まる場合には、その符号データに応じた部分積生成部の構成とすることができる。
In this way, the partial product generation unit differs in the maximum number of digits that can be calculated by the partial product generation unit according to the multiplier X. Therefore, the number of partial products that can be generated is different. Further, depending on the input filter coefficient, for example, it is possible to configure such that only the x16 partial
このように、部分積生成ユニットは、それを構成する部分積生成部の個数、演算可能な最大桁数、生成可能な部分積の数、対応可能な符号データの種類などが異なり、演算能力を異ならせることができる。よって、後述するように、入力されるフィルタ係数や、当該フィルタ係数から得られる符号データ等に応じて最小限の演算能力の部分積生成ユニットとすれば、回路規模の削減につながる。 In this way, the partial product generation unit differs in the number of partial product generation units constituting it, the maximum number of digits that can be calculated, the number of partial products that can be generated, the types of code data that can be handled, etc. Can be different. Therefore, as will be described later, if a partial product generation unit having a minimum computing capacity is used in accordance with input filter coefficients, code data obtained from the filter coefficients, and the like, the circuit scale can be reduced.
(2)ハードウェア低減の原理
上述したように、本実施の形態にかかるフィルタ演算器は、部分積生成ユニットを構成する部分積生成部の演算能力とフィルタ係数(乗数)とに着目してハードウェア量を削減する。本実施の形態にかかるフィルタ演算器は、例えば、後述するH.264やVC−1の動き補償処理や、H.264の画面内予測処理等に使用されるフィルタ演算を実行させる演算器に適用することで得にそのハードウェア削減効果が大きくなる。これらはタップ数の多いフィルタの演算であって、極めて複雑であり、非常に大きな演算回路を必要とするからである。なお、上記フィルタ演算に限らず、複数のフィルタ演算を実行させるフィルタ演算器に適用することができる。またフィルタ演算に限らず、予め定められた乗数と任意の被乗数とを乗算する乗算器に適用することも可能である。
(2) Principle of Hardware Reduction As described above, the filter arithmetic unit according to the present embodiment is hardware based on the calculation capability and filter coefficient (multiplier) of the partial product generation unit constituting the partial product generation unit. Reduce the amount of wear. The filter arithmetic unit according to the present embodiment is, for example, an H.264 described later. H.264 and VC-1 motion compensation processing, By applying to a computing unit that executes a filter calculation used for H.264 intra-screen prediction processing or the like, the hardware reduction effect is greatly increased. This is because these operations are performed by a filter having a large number of taps, are extremely complicated, and require a very large arithmetic circuit. Note that the present invention is not limited to the above filter calculation, and can be applied to a filter calculator that executes a plurality of filter calculations. Further, the present invention is not limited to the filter operation, and can be applied to a multiplier that multiplies a predetermined multiplier and an arbitrary multiplicand.
先ず、簡単なフィルタ演算の例をとって、上記ブースのアルゴリズムを適用したフィルタ演算器のハードウェア削減の原理について説明する。図3は、フィルタ係数及びその符号データを示す図である。図3に示すように、フィルタ演算#1は、
G1=20×f0−8×f1+1×f2
を実行するものとする。ここで、f0、f1、f2は入力される入力データ(被乗数)、これに対応するフィルタ係数(乗数)が20、−8、1である。また、フィルタ演算#2は、
G2=9×f0−1×f1+16×f2
を実行するものとする。つまり、フィルタ演算#2における各フィルタ係数は9、−1、16である。
First, the principle of the hardware reduction of the filter arithmetic unit to which the Booth algorithm is applied will be described using a simple filter arithmetic example. FIG. 3 is a diagram showing filter coefficients and their code data. As shown in FIG. 3, the
G1 = 20 * f0-8 * f1 + 1 * f2
Shall be executed. Here, f0, f1, and f2 are input data (multiplicands) to be input, and the filter coefficients (multipliers) corresponding thereto are 20, -8, and 1, respectively. Also, the
G2 = 9 * f0-1 * f1 + 16 * f2
Shall be executed. That is, the filter coefficients in the
図4は、このフィルタ演算を行なうため、上述の乗算器を組み合せた通常のフィルタ演算器を示す図である。フィルタ演算器500は、係数データメモリ502と、被乗数f0、f1、f2である入力データを入力するレジスタF0、F1、F2と、入力データと当該入力データに対応付けられたフィルタ係数とからなる組データがそれぞれ入力される3つの部分積生成ユニット510、520、530と、加算器540とを有する。
FIG. 4 is a diagram showing a normal filter arithmetic unit in which the above-described multipliers are combined to perform this filter operation. The
部分積生成ユニット510は、上記組データとして、フィルタ演算#1では入力データf0及びフィルタ係数"20"が入力され、フィルタ演算#2では入力データf0及びフィルタ係数"9"が入力される。そして、X×(−2・y[2i+1}+y[2i]+y[2i-1])×22i(Xは乗数)のi=0、1、2、すなわち×1、×4、×16に対応する部分積を求めるそれぞれ513、512、511を有する。
The partial
部分積生成ユニット520、530も同様に、フィルタ演算#1で、入力データf1及びフィルタ係数"−8"、入力データf2及びフィルタ係数"1"が入力され、フィルタ演算#2で、入力データf1及びフィルタ係数"−1"、入力データf2及びフィルタ係数"16"が入力される。また、それぞれ部分積生成部523、522、521とそれぞれ部分積生成部523、522、521を有する。加算器540は、8つの全加算器541、レジスタ542、543及び半加算器544を有する。
Similarly, the partial
係数データメモリ502は、図2のレジスタF7に相当するものであり、3つのレジスタとして構成することも可能である。この係数データメモリ502より、フィルタ演算#1の場合には、部分積生成ユニット510、520、530にそれぞれ20、−8、1が入力される。またフィルタ演算#2の場合には、それぞれ9、−1、16が入力される。
The
次に、このフィルタ演算器500の動作について説明する。例えばフィルタ演算#1において、部分積生成ユニット510には、フィルタ係数"20"該当する2又は3ビットが各部分積生成部513、512、511に入力される。レジスタF0からは乗算すべき入力データ(被乗数)が入力される。なお、本実施の形態においては、乗数は、レジスタF0、F1、F2にシリアルに入力されるものとして説明するが、各レジスタF0〜F2にパラレルに入力するようにしてもよい。
Next, the operation of the
部分積生成部511、512、513は、図3に示すように、入力された所定ビットをブースのアルゴリズムにしたがってデコードした符号データを生成する。そして、符号データとレジスタF0からの入力データとを乗算し、部分積生成部511は演算結果を4ビットシフトして加算器540に出力する。部分積生成部512は演算結果を2ビットシフトして加算器540に出力する。部分積生成部513は演算結果をそのまま加算器540に出力する。他の部分積生成ユニット520、530も同様に演算する。
As shown in FIG. 3, the partial
ところで、フィルタ演算#1、#2における各符号データは、図5のようになっている。ここで、部分積生成部511〜513、521〜523、531〜533は、それぞれブースデコーダ(Booth Decoder:BTD)B00〜B02、B10〜B12、B20〜B22を有するものとする。
By the way, the respective code data in the
各ブースデコーダで演算される符号データ(−2・y[2i+1]+y[2i]+y[2i-1])は、図5に示すようになるが、ここで、部分積生成部532のブースデコーダB21は、いずれのフィルタ演算においても符号データが"0"であり、部分積を生成する必要がない。また、フィルタ演算#1において、部分積生成部533のブースデコーダB22の符号データが"1"であるとき、部分積生成部513のブースデコーダB02の符号データは"0"であって部分積を生成する必要がない。逆に、フィルタ演算#2において、部分積生成部533のブースデコーダB22の符号データが"0"であり、部分積を生成する必要がないのに対し、部分積生成部513のブースデコーダB02の符号データは"1"となり部分積を生成する必要がある。同様に、フィルタ演算#2において、部分積生成部531のブースデコーダB20の符号データが"1"であって、部分積生成部511のブースデコーダB00の符号データは"0"となり部分積を生成する必要がない。
The code data (−2 · y [2i + 1] + y [2i] + y [2i−1]) calculated by each booth decoder is as shown in FIG. 5. Here, the booth decoder of the
ここで、部分積生成部513、533は、同様の機能を有する。そして、フィルタ演算#1において部分積生成部513は使用する必要がなく、フィルタ演算#2では部分積生成部533は使用する必要がない。また、部分積生成部521、531は、同様の機能を有し、フィルタ演算#1において部分積生成部521は使用する必要がなく、フィルタ演算#2では部分積生成部531は使用する必要がない。そこで、本実施の形態においては、これら二つの部分積生成部511、531、及び521、531を共有することで、部分積生成部の個数を減らし、後段の加算器への入力数を減らすことで加算器の回路規模を削減する。
Here, the partial
図6は、本発明の実施の形態にかかるフィルタ演算器を示す図である。図6に示すように、フィルタ演算器1は、係数データメモリ2と、入力データf0、f1、f2を入力するレジスタF0〜F2と、部分積生成ユニット3、4と、加算器10とを有する。更に、セレクタ5〜8を有する。
FIG. 6 is a diagram showing a filter arithmetic unit according to the embodiment of the present invention. As shown in FIG. 6, the filter
部分積生成ユニット3、4は、入力データf0〜f2と当該入力データf0〜f2に対応付けられたフィルタ係数とからなる1以上の組データが入力され、1以上の部分積を生成する。部分積生成ユニット3及び4は、それぞれ、X×(−2・y[2i+1}+y[2i]+y[2i-1])×22i(Xは乗数、フィルタ係数)のi=0、1、2、すなわち×1、×4、×16に対応する部分積を求めるそれぞれ部分積生成部33、32、31、及び部分積生成部43、42、41を有する。
The partial
部分積生成部31は、ブースデコーダB00、乗算部M00、4ビットシフト部S00を有する。部分積生成部32は、ブースデコーダB01、乗算部M01、及び2ビットシフト部S01を有する。部分積生成部33は、ブースデコーダB02及び乗算部M02を有する。部分積生成ユニット4の構成も同様に、部分積生成部41、42、43が、ブースデコーダB10、B11、B12、乗算部M10、M11、M12、及びビットシフト部S10、S11を有している。なお、部分積生成部43は、ビットシフト部は必要ない。
The partial
また、セレクタ7、8は、入力データf0〜f2を入力すべき部分積生成部を選択する部分積生成部選択部として機能する。また、セレクタ5、6は、フィルタ係数を入力すべき部分積生成部を選択する部分積生成部選択部として機能する。すなわち、これらのセレクタ5〜8は、上記組データを、部分積生成ユニット3、4のいずれか1以上に入力するものであって、例えば部分積生成ユニット3により、一の組データから生成すべき部分積の一部が生成不能な場合、部分積生成ユニット3共に部分積生成ユニット4の部分積生成部に当該組データを入力して部分積を生成させる。つまり、一の組データの演算を一の部分積生成ユニットではなく、複数の部分積生成ユニットで行なわせる。このことにより、本フィルタ演算器1は、上述のフィルタ演算器500と同様の演算を可能としつつ、部分積生成ユニットを1つ減らして2つとすることができる。
The
このように、本実施の形態にかかるフィルタ演算器1は、図5に示すレジスタF2(入力データf0)に対応する部分積生成ユニットを有していない。図5に示す入力データf2の演算のうち、ブースデコーダB22を使用して行なうべきフィルタ演算#1は、代用部分積生成部としての部分積生成部33にて行なわせる。すなわち、部分積生成部33の入力データf0に対応するフィルタ係数の所定ビットから生成される符号データは"0"であるため、部分積を生成する必要がないため、これを代用するのである。このため、部分積生成部33の入力には、レジスタF0からのデータf0とレジスタF2からのデータf2を選択出力するセレクタ7が設けられている。また、このときの部分積生成部33のブースデコーダB02へのフィルタ係数の入力を切り替えるためのセレクタ5が設けられている。フィルタ演算#1における入力データf2の他の演算は、いずれも符号データが"0"になるため、部分積を計算する必要はない。よって、セレクタ5、7を設けることで、レジスタF0〜F2に入力される入力データf0〜f2と、フィルタ係数20、−8、1との乗算が実行可能となる。
Thus, the
また、同様に、図5に示す入力データf2の演算のうち、ブースデコーダB20を使用して行なうべきフィルタ演算#2は、代用部分積生成部としての部分積生成部41にて行なわせる。すなわち、部分積生成部41の入力データf1に対応するフィルタ係数の所定ビットから生成される符号データは"0"であるため、部分積を生成する必要がないため、これを代用するのである。このため、部分積生成部41の入力には、レジスタF1からのデータf1とレジスタF2からのデータf2を選択出力するセレクタ8が設けられている。また、このときの部分積生成部41のブースデコーダB10へのフィルタ係数の入力を切り替えるためのセレクタ6が設けられている。フィルタ演算#2におけるF2の他の演算は、いずれも符号データが"0"になるため、部分積を計算する必要はない。よって、セレクタ6、8を設けることで、レジスタF0〜F2に入力される被乗数と、フィルタ係数9、−1、16との乗算が実行可能となる。
Similarly, of the operations of the input data f2 shown in FIG. 5, the
本実施の形態においては、部分積生成ユニット3、4においてフィルタ演算に使用されない非活性な部分積生成部を利用し、部分積を生成する。この際、必要に応じて部分積生成ユニット3、4には、セレクタ5〜8により、2種以上の入力データと当該入力データに対応付けられたフィルタ係数とからなる組データが入力され、各部分積生成ユニット3、4はこの組データに応じた部分積を生成する。このように、フィルタ演算時に非活性な部分積生成部を利用して他のフィルタ係数演算を行なわせることで、本例においては部分積生成ユニットを図4に比して1つ分減らすことができる。
In the present embodiment, the partial
特に、フィルタ演算を実行する際、複数の部分積生成ユニットにおける同一機能の部分積生成部にて生成される部分積が常に1以上、0となる場合、同一機能の部分積生成部を一つにまとめ、複数の部分積生成ユニット間で部分積生成部を共有することができ、部分積生成部の個数、加算器への入力数を減らすことができ、よって加算器の回路規模を削減することができる。 In particular, when executing the filter operation, if the partial products generated by the partial product generating unit having the same function in the plurality of partial product generating units are always 1 or more and 0, one partial product generating unit having the same function is provided. In summary, a partial product generation unit can be shared among a plurality of partial product generation units, and the number of partial product generation units and the number of inputs to the adder can be reduced, thereby reducing the circuit scale of the adder. be able to.
すなわち、本実施の形態においては、3つの組データの演算を、2つの部分積生成ユニットで実行する。通常、一の組データの演算は、一の部分積生成ユニットで実行されるが、本実施の形態においては、部分積生成部選択部としてのセレクタ5〜8を設けることで、一の組データの演算を2以上の部分積生成ユニットで演算可能な構成とすると共に、2つの組データを一の部分積生成ユニット内で演算可能な構成とする。このことにより、同じ部分積生成ユニット内において、ある組データの演算中に非活性(未使用)又は符号データが"0"になる部分積生成部を含む場合、他の組データの演算の代用部分積生成部として使用することができる。こうして、部分積生成ユニット間で部分積生成部を共有させることができ、全体として部分積生成部を有効利用することで、部分積生成部の個数を減少させることができる。
That is, in the present embodiment, three sets of data are calculated by two partial product generation units. Usually, one set data operation is performed by one partial product generation unit. However, in this embodiment, by providing
(3)具体例
次に、本発明を適用した具体例について説明する。ここでは、H.264及びVC−1の両規格における動き補償処理におけるフィルタ演算を実行するフィルタ演算器に適用した場合について説明する。なお、本発明は、H.264及びVC−1の両規格におけるフィルタ演算が可能な動き補償回路について説明するが、H.264のみのフィルタ演算を行なう動き補償回路、VC−1のみのフィルタ演算を行なう動き補償回路にも適用可能であることは勿論である。
(3) Specific Example Next, a specific example to which the present invention is applied will be described. Here, a case will be described in which the present invention is applied to a filter arithmetic unit that executes a filter operation in motion compensation processing in both the H.264 and VC-1 standards. In addition, this invention is H.264. A motion compensation circuit capable of performing a filter operation in both H.264 and VC-1 standards will be described. Of course, the present invention is also applicable to a motion compensation circuit that performs a filter operation of only H.264 and a motion compensation circuit that performs a filter operation of only VC-1.
(3−1)画像復号装置
ここでは先ず、H.264、VC−1の画像復号装置について説明する。図7及び図8は、それぞれH.264及びVC−1に準拠して符号化された圧縮画像を復号する復号装置を示すブロック図である。H.264は、MPEG4 AVC(Advanced Video Coding)とも呼ばれ、データ圧縮率は、MPEG−2の2倍以上、MPEG−4の1.5倍以上とすることができる圧縮符号化方式である。また、VC−1(Windows Media Video(WMV)9)(登録商標)はマイクロソフト社が開発した動画圧縮技術であり、H.264と同程度のデータ圧縮率を有する。これらのアドバンスドコーデック(高圧縮コーデック)は、HD DVD(High Definition DVD)、又はブルーレイディスク等の次世代DVD規格に適用される。
(3-1) Image Decoding Device Here, first, an H.264, VC-1 image decoding device will be described. 7 and 8 are block diagrams illustrating a decoding device that decodes a compressed image encoded in accordance with H.264 and VC-1. H. H.264 is also referred to as MPEG4 AVC (Advanced Video Coding), and is a compression encoding method that can make the data compression rate more than twice that of MPEG-2 and 1.5 times that of MPEG-4. VC-1 (Windows Media Video (WMV) 9) (registered trademark) is a video compression technology developed by Microsoft Corporation. The data compression rate is about the same as H.264. These advanced codecs (high compression codecs) are applied to next-generation DVD standards such as HD DVD (High Definition DVD) or Blu-ray Disc.
図7に示すように、H.264の画像復号装置170は、可変長復号部172、逆量子化部173、逆アダマール変換部174、加算器175、デブロッキングフィルタ176、動き補償部182、重み付け予測部181、画面内予測部180及び復号画像178を表示するモニタ179を有する。
As shown in FIG. 7, the H.264
可変長復号部172は、圧縮データ171が入力され可変長符号化された圧縮データを、変換テーブルに基づき可変長復号する。そして、可変長復号された復号データは、逆量子化部173にて逆量子化され、逆アダマール変換部174にて逆アダマール変換され加算器175へ送られる。加算器175の出力は、デブロッキングフィルタ176によりブロック歪を除去され、復号画像178とされ、モニタ179を介して表示される。
The variable-
ここで、加算器175の出力が画面内予測部180にも入力され、予測画像183が生成される。また、復号画像が動き補償部182にて動き補償処理が行なわれ、重み付け予測部181にて重み付けされて予測画像183が生成される。加算器175は、Iフレーム処理の際には画面内予測部180からの予測画像183に予測誤差を加算し出力する。一方、P、Bフレーム処理の際には、切替部177にて切り替え、重み付け予測部181から送られる予測画像183に予測誤差を加算して出力する。
Here, the output of the
また、図8に示すように、VC−1の画像復号装置190も、画像復号装置170とほぼ同様に構成され、可変長復号部192、逆量子化部193、逆DCT変換部194、加算器195、ループフィルタ196、重み付け予測部199、動き補償部200、及び復号画像197を表示するモニタ198を有する。VC−1の画像復号装置190は、画面内予測を行なわない点、重み付け予測を行なってから動き補償処理を行う点、デブロッキングフィルタ176の代わりにループフィルタ196が使用される点が異なる。
As shown in FIG. 8, the VC-1
(3−2)動き補償部
図9は、H.264及びVC−1の規格に準拠したフィルタ演算を含む動き補償処理を実行する動き補償(MC)部を示すブロック図である。この動き補償部150は、H.264及びVC−1のいずれの動き補償部でも使用可能な構成とされている。すなわち、両規格にて共有できる。この動き補償部150は、フィルタ演算部1c、1dと、セレクタ151、154、157、160、161と、乗算器152、159、加算器153、155、158と、ラインメモリ156とを有する。
(3-2) Motion Compensation Unit FIG. 9 is a block diagram showing a motion compensation (MC) unit that executes a motion compensation process including a filter operation based on the standards of H.264 and VC-1. This
H.264では、フィルタ演算部1c、1dにてフィルタ演算施した後、上述した重み付け係数を使用してオフセット付き重み補間信号を求め、予測画像183を得る。ここで、入力INから入力された参照ピクチャR0の画素値が、フィルタ演算部1cにて垂直方向フィルタによるフィルタ演算が実行され、フィルタ演算部1dにて水平方向フィルタによるフィルタ演算が施される。そして、生成されたフィルタ演算済みのデータがラインメモリ156に格納される。次に、参照ピクチャR1の画素値が入力INから入力されると、同様に、フィルタ演算部1c、1dにてフィルタ演算が施され、フィルタ演算済みのデータに乗算器152にて重み係数を乗算し、加算器153にてオフセット値を加算する。一方、ラインメモリに格納されているデータがセレクタ160を介して乗算器159にて重み付き係数と乗算され、これらが加算器155にて加算され、オフセット付き重み補間信号W0X0+W1X1+Dを生成する。生成されたデータは、ラインメモリ156を経て出力OUTから出力される。
H. In H.264, after the filter operation is performed by the
VC−1の場合は、入力INからのデータがセレクタ160、セレクタ157を介し、更にセレクタ151から乗算器152、加算器153をとおり、そしてセレクタ161を介してフィルタ演算器1c、1dに入力される。フィルタ演算部1dの結果は、セレクタ151、セレクタ154を介してそのままラインメモリ156へ格納され、出力OUTから出力される。乗算器159、加算器158、乗算器152、加算器153では、以下の重み付けが実行される。
H=(iScale×F+iShift+32)>>6
ここで、Fは入力値、iScale、iShiftは重み係数を示す。
In the case of VC-1, the data from the input IN is input to the filter
H = (iScale × F + iShift + 32) >> 6
Here, F is an input value, and iScale and iShift are weighting factors.
このように構成された動き補償部150は、セレクタ161、151、154、160にてフィルタ演算部1c、1dへの入力、出力を適宜選択するため、重み付けをフィルタ演算後に実行するH.264であっても、重み付けをフィルタ演算前に実行するVC−1であっても、いずれの演算にも適用可能である。
The
(3−3)フィルタ演算器
次に、H.264及びVC−1の両規格のフィルタ演算が可能なフィルタ演算部1c、1eについて更に詳細に説明する。図10は、フィルタ演算部1c、1eの詳細を示す図であって、本実施の形態にかかるフィルタ演算器を示すブロック図である。また、下記表4は、H.264及びVC−1における輝度信号Gy、色差信号Gcに対するフィルタ係数を示す。更に、図11は、上述のH.264及びVC−1のフィルタ演算をフィルタ演算器100で実行させる際の各部分積生成部で生成される符号データを示す図である。
(3-3) Filter computing unit The
この表4に示すように、H.264は、輝度信号Gyが6タップフィルタ、色差信号Gcは2タップフィルタのフィルタ演算となる。また、VC−1の輝度信号Gyが4タップフィルタ、色差信号Gcは2タップフィルタのフィルタ演算となる。フィルタ演算器1は、これら全てのフィルタ演算を可能としつつ、上述の方法により、ハードウェア資源を削減したものである。
As shown in Table 4, H. In H.264, the luminance signal Gy is a 6-tap filter, and the color difference signal Gc is a 2-tap filter. The luminance signal Gy of VC-1 is a 4-tap filter, and the color difference signal Gc is a 2-tap filter. The
図10に示すように、フィルタ演算器1は、入力される画素値(入力データf0〜f5)を格納するレジスタF0〜F5と、部分積生成部選択部102と、係数データメモリ103と、部分積生成ユニット110、120、130、140、140、160と、加算器104とを有する。部分積生成部選択部102は、入力データf0〜f5及びこれに乗算すべきフィルタ係数の演算が可能な1以上の部分積生成ユニットを選択して入力データf0〜f5を入力する。係数データメモリ103は、上記入力データf0〜f5に対応するフィルタ係数を各部分積生成ユニットに入力する。この場合、上述と同様、必要に応じて、2以上の、入力データ及びそれに対応したフィルタ係数からなる組データが1つの部分積生成ユニットに入力される。
As shown in FIG. 10, the filter
部分積生成ユニット110は、フィルタ係数から符号データを生成し、F0〜F5のいずれかを介して入力される入力データとの乗算結果を求めるブースデコーダ及び乗算部の機能を有する回路部(BTD・乗算部)114を有する。部分積生成ユニット120は、×4、×1に対応するBTD・乗算部123、124を有する。なお、本図においては、×4、16、64のビットシフト部は図示を省略している。
The partial
部分積生成ユニット130は、×4、×1にそれぞれ対応するBTD・乗算部132、133を有する。部分積生成ユニット140は、×64、×16、×4にそれぞれ対応するBTD・乗算部141、142、143を有する。部分積生成ユニット150は、×4、×1にそれぞれ対応するBTD・乗算部153、154を有する。部分積生成ユニット60は、×1に対応するBTD・乗算部164を有する。
The partial
これらの部分積生成ユニットにおいて、各フィルタ演算にて入力されるフィルタ係数は図11のようになる。ここで、例えば、H.264の色差信号Gcの演算においては、部分積生成ユニット120、140、150、160は使用しない。
In these partial product generation units, the filter coefficients input in each filter calculation are as shown in FIG. Here, for example, the partial
ところで、VC−1の輝度信号Gyの演算の場合、フィルタ係数は−4、53、18、−3であり、いずれの部分積生成ユニットを使用してもフィルタ係数"53"の部分積を生成することができない。そこで、部分積生成部選択部102は、このフィルタ係数"53"の演算の場合には、部分積生成ユニット140及び110を使用させる。フィルタ係数"53"の演算には、×64、×16、×4、×1に対応する部分積生成部が必要であるが、部分積生成ユニット140には、×1に対応する部分積生成部が存在しない。そこで、部分積生成部選択部102は、部分積生成ユニット110の×1を演算可能なBTD・乗算部114を、部分積生成ユニット140と共に使用してフィルタ係数"53"の演算をさせる(図11のA1参照)。
By the way, in the case of the calculation of the luminance signal Gy of VC-1, the filter coefficients are −4, 53, 18, and −3, and the partial product of the filter coefficient “53” is generated regardless of which partial product generation unit is used. Can not do it. Therefore, the partial product generation
また、フィルタ係数"18"の演算には、×1と×16に対応する部分積生成部が必要であるが、いずれの部分積生成ユニットも両演算機能を備えたものが存在しない。そこで、部分積生成部選択部102は、×1に対応する部分積生成部として部分積生成ユニット160のBTD・乗算部164を使用し、×16に対応する部分積生成部として部分積生成ユニット130のBTD・乗算部132(図11のA2参照)を使用させる。
Further, for the calculation of the filter coefficient “18”, partial product generation units corresponding to × 1 and × 16 are required, but none of the partial product generation units has both calculation functions. Therefore, the partial product generation
このようにフィルタ係数を、入力データとフィルタ係数の乗算をするに適切な1又は2以上の部分積生成ユニットを選択して入力させ、また、当該フィルタ係数に対応する入力データを部分積生成部選択部102により部分積生成ユニットに入力させることで、部分積生成ユニットの演算機能を超えた演算を行なわせることができると共に、部分積生成部の個数を最小限に抑えることができる。
Thus, the filter coefficient is input by selecting one or more partial product generation units suitable for multiplying the input data and the filter coefficient, and the input data corresponding to the filter coefficient is input to the partial product generation unit. By causing the
なお、本実施の形態においては、使用されない部分積生成部を利用することで、演算を可能とする場合について説明したが、上述したように、生成される符号データが"0"となる部分積生成部を利用して演算させることも可能である。また、本実施の形態においては、入力データを適宜選択して部分積生成ユニットに入力する部分積生成部選択部102を設けた場合について説明したが、フィルタ係数についても、同様に部分積生成部選択部を設け、選択した部分積生成ユニットに入力すればよい。
In the present embodiment, a case has been described in which an operation can be performed by using a partial product generation unit that is not used. However, as described above, the partial product in which the generated code data is “0”. It is also possible to perform calculation using the generation unit. In the present embodiment, the case where the partial product generation
いずれにせよ、フィルタ演算において、一の部分積生成ユニットにより、一の組データから生成すべき部分積の一部が生成不能な場合、2以上の部分積生成ユニットを使用して一の組データを演算させる。この場合、生成される部分積が"0"となる部分積生成部、又は当該フィルタ演算には使用されない非活性(未使用)部分積生成部を含む部分積生成ユニットを選択し、当該生成不能な部分積を生成させる。このことにより、部分積が"0"となる部分積生成部又は非活性な部分積生成部を有効利用することができ、部分積生成部の個数を最小限に抑えることができる。 In any case, in the filter operation, when one partial product generation unit cannot generate a part of a partial product to be generated from one set data, one set data is generated using two or more partial product generation units. Is calculated. In this case, a partial product generation unit in which the generated partial product is “0” or a partial product generation unit including an inactive (unused) partial product generation unit that is not used in the filter operation is selected and cannot be generated. To generate a partial product. This makes it possible to effectively use a partial product generation unit having a partial product of “0” or an inactive partial product generation unit, and to minimize the number of partial product generation units.
例えば図11の例では、部分積生成ユニット140は、フィルタ係数"53"を演算するためには、×1、×4、×16、×64の4つの部分積生成部を具備する必要があるが、この×1に対応する部分積生成部を省略した構成とし、"53"の演算を行なう場合には、部分積生成ユニット140及びこのとき未使用の部分積生成ユニット110の2つの部分積生成ユニットにより演算を行なわせる。すなわち、部分積生成ユニット110は、部分積生成ユニット140の不足する部分積生成部の代用となる。図11の例では、フィルタ演算"53"とこれに対応する入力データからなる組データから生成すべき部分積の一部は、いずれの部分積生成ユニットでも生成不能であるが、2以上の部分積生成ユニットを使用すれば演算が可能となる。このように、フィルタ演算器100は、組データに応じて、当該組データを演算させるための1又は2以上の部分積生成ユニットを選択する部分積生成部選択部102を備えることで、全ての組みデータについて、それらを演算可能な対応する部分積生成ユニットを備えていなくても、部分積生成ユニット又は部分積生成ユニットを構成する部分積生成部の組み合せにより演算させることができ、結果部分積生成部の個数を減少させることができる。
For example, in the example of FIG. 11, the partial
なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。例えば、本実施の形態は、画像復号装置として説明したが、画像符号化の際の動き補償部としても使用可能である。また、上記に例示したフィルタ演算のみならず、予め定められた乗数が入力される乗算器に本発明を適用することで、冗長な回路を削減しハードウェア低減することができる。 It should be noted that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention. For example, although the present embodiment has been described as an image decoding device, it can also be used as a motion compensation unit in image encoding. Further, by applying the present invention not only to the filter operation exemplified above but also to a multiplier to which a predetermined multiplier is input, redundant circuits can be reduced and hardware can be reduced.
また、本実施の形態においては、2次のブースのアルゴリズムを適用した乗算器(フィルタ演算器)について説明したが、これに限るものではない。すなわち、3次以上の高次のブースのアルゴリズムであっても同様に適用することができる。 In the present embodiment, the multiplier (filter arithmetic unit) to which the second-order Booth algorithm is applied has been described. However, the present invention is not limited to this. That is, even a third-order or higher-order booth algorithm can be similarly applied.
1、1c、1d、100 フィルタ演算器
2、103、502 係数データメモリ
3、4、110、120、130、140、150、160、401、510、520、530 部分積生成ユニット
5〜8、154、157、160、161、505 セレクタ
10、104、153、155、158、175、450、540 加算器
31〜33、41〜43、410、420、430、511〜513、521〜523、531〜533 部分積生成部
102 部分積生成部選択部
114、123、124、132、133、141、142、143、153、154、164 BTD・乗算部
150 動き補償部
151 セレクタ
152、159 乗算器
156 ラインメモリ
160 部分積生成ユニット
170 画像復号装置
171 圧縮データ
172 可変長復号部
173 逆量子化部
174 逆アダマール変換部
176 デブロッキングフィルタ
177 切替部
178 復号画像
179 モニタ
180 画面内予測部
181 重み付け予測部
182 補償部
183 予測画像
190 画像復号装置
192 可変長復号部
193 逆量子化部
194 変換部
195 加算器
196 ループフィルタ
197 復号画像
198 モニタ
199 予測部
200 補償部
400、501 乗算器
411、421、431、441 ブースデコーダ
412、422、432、442 乗算部
413、423、433、443 ビットシフト部
454、542 レジスタ
500 フィルタ演算器
503 カウンタ
506 累積加算メモリ
541 全加算器
544 半加算器
1, 1c, 1d, 100 Filter operation unit 2, 103, 502 Coefficient data memory 3, 4, 110, 120, 130, 140, 150, 160, 401, 510, 520, 530 Partial product generation units 5-8, 154 157, 160, 161, 505 Selector 10, 104, 153, 155, 158, 175, 450, 540 Adders 31-33, 41-43, 410, 420, 430, 511-513, 521-523, 531 533 Partial product generation unit 102 Partial product generation unit selection unit 114, 123, 124, 132, 133, 141, 142, 143, 153, 154, 164 BTD / multiplication unit 150 Motion compensation unit 151 Selector 152, 159 Multiplier 156 Line Memory 160 Partial product generation unit 170 Image decoding device 171 Compressed data 172 Variable length decoding unit 173 Inverse quantization unit 174 Inverse Hadamard transform unit 176 Deblocking filter 177 Switching unit 178 Decoded image 179 Monitor 180 In-screen prediction unit 181 Weighted prediction unit 182 Compensation unit 183 Predicted image 190 Image decoding device 192 Variable length decoding unit 193 Inverse quantization unit 194 Conversion unit 195 Adder 196 Loop filter 197 Decoded image 198 Monitor 199 Prediction unit 200 Compensation unit 400, 501 Multiplier 411, 421, 431, 441 Booth decoder 412, 422, 432, 442 Multiplication unit 413, 423, 433, 443 Bit shift units 454, 542 Register 500 Filter calculator 503 Counter 506 Cumulative addition memory 541 Full adder 544 Half adder
Claims (17)
前記入力データと当該入力データに対応付けられたフィルタ係数とからなる1以上の組データが入力され、1以上の部分積を生成する複数の部分積生成ユニットと、
前記複数の部分積生成ユニットにより生成される部分積の総和を生成する加算部と、
前記組データに応じ、前記複数の部分積生成ユニットを1以上選択して当該組データを入力する部分積生成部選択部とを有するフィルタ処理装置。 For a plurality of filters, a filter processing device that performs a sum of products operation using a Booth algorithm with a plurality of input data and a plurality of filter coefficients constituting the filter,
A plurality of partial product generation units that receive one or more set data including the input data and filter coefficients associated with the input data, and generate one or more partial products;
An adding unit for generating a sum of partial products generated by the plurality of partial product generating units;
A filter processing apparatus comprising: a partial product generation unit selection unit that selects one or more of the plurality of partial product generation units and inputs the set data according to the set data.
ことを特徴とする請求項1記載のフィルタ処理装置。 The partial product generation unit selection unit generates one partial product generation unit and another partial product generation when a partial product to be generated from the one set data cannot be generated by one partial product generation unit. The filter processing apparatus according to claim 1, wherein the set data is input to the unit to generate a partial product.
ことを特徴とする請求項1又は2記載のフィルタ処理装置。 The filter processing apparatus according to claim 1, wherein the number of the partial product generation units is smaller than a maximum number of filter coefficients constituting the plurality of filters.
ことを特徴とする請求項1乃至3のいずれか1項記載のフィルタ処理装置。 4. The filter processing device according to claim 1, wherein at least one of the plurality of partial product generation units has a different computing ability from the others. 5.
ことを特徴とする請求項4項記載のフィルタ処理装置。 The filter processing apparatus according to claim 4, wherein the plurality of partial product generation units include a largest partial product that can be generated and having a different number of digits.
ことを特徴とする請求項4又は5項記載のフィルタ処理装置。 The filter processing apparatus according to claim 4, wherein the plurality of partial product generation units include ones having different numbers of partial products that can be generated.
ことを特徴とする請求項1乃至6のいずれか1項記載のフィルタ処理装置。 The filter processing apparatus according to claim 1, wherein the partial product generation unit includes a plurality of partial product generation units corresponding to i of 2 2i (i ≧ 0).
前記代用部分積生成部は、前記他の部分積生成部に入力されるフィルタ係数の所定ビットからブースのアルゴリズムに従ってデコードした符号データが零になるものである
ことを特徴とする請求項7記載のフィルタ処理装置。 The partial product generation unit selection unit generates one partial product generation unit and another partial product generation when a partial product to be generated from the one set data cannot be generated by one partial product generation unit. A substitute partial product generation unit included in a unit is selected, and the set data is input to generate a partial product,
8. The substitute partial product generation unit is one in which code data decoded according to Booth's algorithm from a predetermined bit of a filter coefficient input to the other partial product generation unit becomes zero. Filter processing device.
ことを特徴とする請求項7記載のフィルタ処理装置。 The partial product generation unit selection unit generates one partial product generation unit and another partial product generation when a partial product to be generated from the one set data cannot be generated by one partial product generation unit. The filter processing apparatus according to claim 7, wherein an unused partial product generation unit included in the unit is selected, and the set data is input to generate a partial product.
ことを特徴とする請求項7乃至9のいずれか1項記載のフィルタ処理装置。 A booth decoder for obtaining code data decoded in accordance with Booth's algorithm from a predetermined bit of the filter coefficient, at least part of the plurality of partial product generators corresponding to i of 2 2i (i ≧ 0); 10. The multiplier according to claim 7, further comprising: a multiplier that obtains a product of the Booth decoder and the input data; and a bit shift unit that shifts a selection result of the multiplier by a predetermined bit according to the i. The filter processing apparatus of Claim 1.
ことを特徴とする請求項7乃至10のいずれか1項記載のフィルタ処理装置。 The partial product generation unit includes only a bit shift unit that bit-shifts the input data when the code data decoded according to Booth's algorithm is 1 for the predetermined bit of the associated filter coefficient. The filter processing device according to claim 7, wherein the filter processing device is a filter processing device.
ことを特徴とする請求項7乃至10のいずれか1項記載のフィルタ処理装置。 The partial product generation unit obtains code data decoded according to the Booth algorithm from the predetermined bits of the filter coefficient when the code data decoded according to the Booth algorithm is 0 for the predetermined bit of the associated filter coefficient The filter processing apparatus according to claim 7, comprising only a booth decoder.
ことを特徴とする請求項7乃至10のいずれか1項記載のフィルタ処理装置。 The partial partial product generation unit is characterized in that one or more of code data decoded in accordance with Booth's algorithm is either −2, −1, or −1 for predetermined bits of associated filter coefficients. Item 11. The filter processing device according to any one of Items 7 to 10.
H.264に準拠した動き補償処理及び/又は画面内予測処理におけるフィルタ演算を実行する
ことを特徴とする請求項1乃至13のいずれか1項記載のフィルタ処理装置。 One of the filters is a 6-tap filter,
H. The filter processing device according to any one of claims 1 to 13, wherein a filter operation in motion compensation processing and / or intra-screen prediction processing compliant with H.264 is executed.
H.264、又はH.264及びVC−1に準拠した動き補償処理におけるフィルタ演算を実行するフィルタ演算器である
ことを特徴とする請求項1乃至13のいずれか1項記載のフィルタ処理装置。 One of the filters is a 6-tap filter,
H. H.264 or H.264 The filter processing device according to any one of claims 1 to 13, wherein the filter processing device executes a filter operation in a motion compensation process based on H.264 and VC-1.
前記被乗数と当該被乗数に対応付けられた乗数とからなる組データが入力され、1以上の部分積を生成する複数の部分積生成ユニットと、
前記複数の部分積生成ユニットにより生成される部分積の総和を生成する加算部と、
前記組データに応じ、前記複数の部分積生成ユニットを1以上選択して当該組データを入力する部分積生成部選択部とを有する乗算器。 A multiplier applying a booth algorithm that performs multiplication of multiple types of multiplier groups and multiplicand groups,
A plurality of partial product generation units that receive the set data including the multiplicand and a multiplier associated with the multiplicand and generate one or more partial products;
An adding unit for generating a sum of partial products generated by the plurality of partial product generating units;
A multiplier having a partial product generation unit selection unit that selects one or more of the plurality of partial product generation units according to the set data and inputs the set data.
垂直方向の入力データに対してフィルタ演算を行なう第1フィルタ演算部と、
水平方向の入力データに応じてフィルタ演算を行なう第2フィルタ演算部と、
前記第1及び第2フィルタ演算部の演算結果又は第1及び第2のフィルタ演算に入力する入力データに対して重み付けを行なう重み付け演算部とを有し、
前記第1及び第2フィルタ演算部は、複数のフィルタについて、複数の前記入力データとフィルタを構成する複数のフィルタ係数のそれぞれとをブースアルゴリズムを用いて積和演算するフィルタ演算部であって、
前記入力データと当該入力データに対応付けられたフィルタ係数とからなる1以上の組データが入力され、1以上の部分積を生成する複数の部分積生成ユニットと、
前記複数の部分積生成ユニットにより生成される部分積の総和を生成する加算部と、
前記前記組データに応じ、前記複数の部分積生成ユニットを1以上選択して当該組データを入力する部分積生成部選択部とを有する動き補償処理装置。 A motion compensation processing device for generating a predicted image,
A first filter operation unit that performs a filter operation on vertical input data;
A second filter operation unit that performs a filter operation according to horizontal input data;
A weighting calculation unit that performs weighting on calculation results of the first and second filter calculation units or input data input to the first and second filter calculations;
The first and second filter operation units are filter operation units that perform a product-sum operation on a plurality of filters using a Booth algorithm with each of the plurality of input data and a plurality of filter coefficients constituting the filter,
A plurality of partial product generation units that receive one or more set data including the input data and filter coefficients associated with the input data, and generate one or more partial products;
An adding unit for generating a sum of partial products generated by the plurality of partial product generating units;
A motion compensation processing device comprising: a partial product generation unit selection unit that selects one or more of the plurality of partial product generation units according to the set data and inputs the set data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006153363A JP4963194B2 (en) | 2006-06-01 | 2006-06-01 | Filter processing device, multiplier, and motion compensation processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006153363A JP4963194B2 (en) | 2006-06-01 | 2006-06-01 | Filter processing device, multiplier, and motion compensation processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007324980A JP2007324980A (en) | 2007-12-13 |
JP4963194B2 true JP4963194B2 (en) | 2012-06-27 |
Family
ID=38857374
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006153363A Expired - Fee Related JP4963194B2 (en) | 2006-06-01 | 2006-06-01 | Filter processing device, multiplier, and motion compensation processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4963194B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5086675B2 (en) * | 2007-03-26 | 2012-11-28 | ルネサスエレクトロニクス株式会社 | Filter calculator and motion compensation device |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06204795A (en) * | 1992-12-16 | 1994-07-22 | Mega Chips:Kk | Digital filter |
JPH0773022A (en) * | 1993-03-08 | 1995-03-17 | Nkk Corp | Method and device for digital signal processing |
JPH08152994A (en) * | 1994-11-29 | 1996-06-11 | Mitsubishi Electric Corp | Multiplier and digital filter |
JPH09101877A (en) * | 1995-10-06 | 1997-04-15 | Ricoh Co Ltd | Operation method and device for multipilcation |
JP3558436B2 (en) * | 1995-12-27 | 2004-08-25 | 松下電器産業株式会社 | Multiplier and product-sum operation unit |
-
2006
- 2006-06-01 JP JP2006153363A patent/JP4963194B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2007324980A (en) | 2007-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4881270B2 (en) | Filter calculator and motion compensation device | |
US9172959B2 (en) | Method and encoding/decoding of video using common merging candidate set of asymmetric partitions | |
JP4988627B2 (en) | Filter calculator and motion compensation device | |
JP4516051B2 (en) | Filter processing device, multiplier, and motion compensation processing device | |
JP4963220B2 (en) | Filter calculator and motion compensation device | |
CN101083769B (en) | Coder/decoder and coding/decoding method for processing N bit video data | |
JP4519807B2 (en) | Multiplier and filter processing apparatus | |
JP4963194B2 (en) | Filter processing device, multiplier, and motion compensation processing device | |
JP5086675B2 (en) | Filter calculator and motion compensation device | |
KR101412964B1 (en) | Low area and high performance multi-mode 1D transform block for HEVC and data processing method using thereof | |
KR101151352B1 (en) | Context-based adaptive variable length coding decoder for h.264/avc | |
JP5195674B2 (en) | Image encoding device | |
JP2011186592A (en) | Filter operation unit, filter operation method, and motion compensation processing device | |
Vimala et al. | Enhanced ambtc for image compression using block classification and interpolation | |
JP2009124353A (en) | Data transform apparatus and control method thereof | |
KR20100013142A (en) | Copression methode for frame memmory | |
JP2008532335A (en) | Image interpolation method and pixel interpolation device | |
JP2011090362A (en) | Filter computing unit, filter operation method, and motion compensation processing device | |
Ahmad | Efficient HEVC and VVC motion estimation hardware | |
KR20130137951A (en) | Method of inverse transform for ultra-high resoultion video codec | |
Hatim et al. | Efficient hardware architecture for direct 2D DCT computation and its FPGA implementation | |
Hsia et al. | A configurable IP for mode decision of H. 264/AVC encoder | |
KR101742765B1 (en) | Interpolator and interpolator pixel generation method | |
KR101760779B1 (en) | Method for transformation and quantization based on transformation mode and apparatus for transformation and quantization based on transformation mode | |
US20130223516A1 (en) | Block quantizer in h.264 with reduced computational stages |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090413 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120321 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120322 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150406 Year of fee payment: 3 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |