JP5086675B2 - Filter calculator and motion compensation device - Google Patents
Filter calculator and motion compensation device Download PDFInfo
- Publication number
- JP5086675B2 JP5086675B2 JP2007079161A JP2007079161A JP5086675B2 JP 5086675 B2 JP5086675 B2 JP 5086675B2 JP 2007079161 A JP2007079161 A JP 2007079161A JP 2007079161 A JP2007079161 A JP 2007079161A JP 5086675 B2 JP5086675 B2 JP 5086675B2
- Authority
- JP
- Japan
- Prior art keywords
- unit
- input
- filter
- output
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Complex Calculations (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
本発明は、動画の圧縮符号化復号に使用される動き補償処理におけるフィルタ演算を実行するために好適なフィルタ処理装置及びこれを具備する動き補償処理装置に関する。 The present invention relates to a filter processing apparatus 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 apparatus including the filter processing apparatus.
次世代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.
ところで、特許文献1には、乗算器の数を極力少なくし、回路規模を小さくした離散コサイン変換器が開示されている。図13は、特許文献1に記載の離散コサイン変換器を示す図である。この離散コサイン変換器は、加算器612、640、642、差分器610、レジスタ614、マルチプレクサ616、652、マルチプレクサ乗算器618、620、622、634、バタフライ加算器626、628、630、632、644、646、648、650、乗算器624、636、638、及び量子化器654を有する。画像データの交流成分として差分器610による差分データを得て、これに対しDCTを行う。そして、差分についてのDCTとすることによって、必要な係数の数が少なくなるため、乗算器の数を減少できる。さらに、同一の係数を異なるデータに対し乗算する場合にはマルチプレクサ乗算器618、620、622、634を用い、時分割で乗算を行う。このため、乗算器の数をさらに減少することができる。また、乗算すべき係数を量子化器654の量子化テーブルに対し予め乗算しておくため、乗算回数を減少することができる。このように、特許文献1に記載の離散コサイン変換器は、離散コサイン変換の特性を利用し、乗算とバタフライ演算を利用して高速に同演算を実行するものである。
By the way,
また、特許文献2には、空間フィルタリング等の画像信号処理を時系列的に行なう信号処理装置が開示されている。この信号処理装置は、同じ部分積乗算器を繰り返し用いることで乗算器の回路規模を削減するものである。図14は、特許文献2に記載の情報処理装置におけるプロセッサ、レジスタ回路及び係数レジスタを示す図である。情報処理装置は、入出力バッファ回路740、5個の係数W1〜W5を保持する係数レジスタ711、及びプロセッサ710を有する。入出力バッファ回路740は、バス820に、5行分の画素データを保持するRAM746、及び画素データD1〜D5をそれぞれ保持する5個のレジスタ741〜745を有する。プロセッサ710は、2個の乗算器710a、710b、加算器710c、レジスタ710d、ゲート回路710e、データ入力側のマルチプレクサ710f、710g、及び係数入力側のマルチプレクサ710h、710iを有する。
この情報処理装置においては、乗算器710a、710bにてそれぞれ部分積P1=W1×D1、P2=W2×D2を計算する。部分積P1、P2及びレジスタ710dの値がゲート回路710eを解して加算器710cに入力され、和が求められ、その結果がレジスタ710dに保持される。ゲート回路710eには図示しない制御回路からゲート信号が印加されレジスタ710dの値が部分積と加算される。次に乗算器710a、710bにてそれぞれ部分積P3=W3×D3、P4=W4×D4を計算し、前回の部分積の和に加算される。さらに、乗算器710aにて部分積P5=W5×D5が計算され、乗算器710bには零が入力される。よって、P5のみ前回までの部分積の和に加算され、レジスタ710dに保持される。レジスタ710dの内容をゲート717及びバス810を解して図示せぬメモリセル部に保存する。こうして注目データD3について隣接するデータD2、D1、D4、D5についての5次のベクトルコンボリューションインテグラルを得ることができる。このように、特許文献2に記載の情報処理装置においては、ベクトルコンボリューションの次数5に対し2個の乗算器710a、710bとすることができる。
しかしながら、特許文献1に記載の離散コサイン変換器においては、高速に乗算を実施するために、大規模な乗算器を使用するため回路規模が大きいという問題点がある。また汎用的に処理させるために、特に画像の性質を利用するものではないため、演算精度が求められる場合には、その分だけ演算器も演算精度分だけ回路規模も大きくなり、消費電力増大につながる。
However, the discrete cosine transformer described in
また、特許文献2に記載の情報処理装置においては、プロセッサ内においては、乗算器を5つ設ける場合に比して演算時間が3倍となってしまうという問題点がある。
In addition, the information processing apparatus described in
本発明に係るフィルタ演算器は、乗数と被乗数とをブースアルゴリズムを用いて積和演算するフィルタ演算器であって、前記乗数が入力される入力部と、前記ブースアルゴリズムに従って前記入力部からの出力をデコードして1又は複数の符号データを求め、対応する被乗数と当該1又は複数の符号データのそれぞれとの積を求める繰り返し演算を行う2以上の演算部と、前記入力部からの出力を選択して前記演算部のいずれかに入力する入力選択セレクタと、前記入力部からの出力に基づき前記各演算部における繰り返し演算回数及び繰り返し演算タイミングを決定し、この決定結果に基づき前記入力選択セレクタを制御する制御部とを有するものである。
A filter arithmetic unit according to the present invention is a filter arithmetic unit that performs a product-sum operation on a multiplier and a multiplicand using a Booth algorithm, and an input unit to which the multiplier is input, and an output from the input unit according to the
本発明にかかる動き補償処理装置は、予測画像を生成する動き補償処理装置であって、垂直方向の入力データに対してフィルタ演算を行なう第1フィルタ演算器と、水平方向の入力データに応じてフィルタ演算を行なう第2フィルタ演算器と、前記第1及び第2フィルタ演算器の演算結果又は第1及び第2のフィルタ演算に入力する入力データに対して重み付けを行なう重み付け演算部とを備え、前記第1及び第2フィルタ演算器は、入力データとフィルタ係数とをブースアルゴリズムを用いて積和演算するフィルタ演算器であって、乗数と被乗数とをブースアルゴリズムを用いて積和演算するフィルタ演算器であって、前記乗数が入力される入力部と、前記ブースアルゴリズムに従って前記入力部からの出力をデコードして1又は複数の符号データを求め、対応する被乗数と当該1又は複数の符号データのそれぞれとの積を求める繰り返し演算を行う2以上の演算部と、前記入力部からの出力を選択して前記演算部のいずれかに入力する入力選択セレクタと、前記入力部からの出力に基づき前記各演算部における繰り返し演算回数及び繰り返し演算タイミングを決定し、この決定結果に基づき前記入力選択セレクタを制御する制御部とを有するものである。 A motion compensation processing apparatus according to the present invention is a motion compensation processing apparatus that generates a predicted image, and includes a first filter arithmetic unit that performs a filter operation on vertical input data and a horizontal input data. A second filter arithmetic unit that performs a filter operation, and a weighting arithmetic unit that performs weighting on the operation results of the first and second filter arithmetic units or input data input to the first and second filter operations, The first and second filter arithmetic units are filter arithmetic units that perform a product-sum operation on input data and filter coefficients using a Booth algorithm, and a filter operation that performs a product-sum operation on a multiplier and a multiplicand using a Booth algorithm. An input unit to which the multiplier is input, and an output from the input unit according to the Booth algorithm to decode one or more codes Two or more arithmetic units that perform data calculation and perform a repetitive calculation to obtain a product of the corresponding multiplicand and each of the one or more code data, and an output from the input unit to select any one of the arithmetic units An input selection selector for input, and a control unit that determines the number of repetition operations and the repetition operation timing in each of the operation units based on an output from the input unit, and controls the input selection selector based on the determination result. is there.
本発明においては、入力部からの出力に基づき各演算部における繰り返し演算回数及び繰り返し演算タイミングを決定し、この決定結果に基づき入力選択セレクタを制御し、入力部からの出力を選択して演算部のいずれかに入力することにより、一の入力部からの出力に対し、複数の演算部を共有化することができ、ハードウェアを削減しつつ繰り返し演算回数を最小限として演算処理時間の短縮化を図ることができる。 In the present invention, the number of repetitive operations and the repetitive operation timing in each operation unit are determined based on the output from the input unit, the input selection selector is controlled based on the determination result, and the output from the input unit is selected to calculate the operation unit By inputting to either of these, multiple arithmetic units can be shared with respect to the output from one input unit, reducing the number of repeated operations and reducing the processing time while reducing hardware Can be achieved.
本発明によれば、ハードウェア量及び消費電力を削減することができるブースアルゴリズムを利用したフィルタ演算器及び動き補償装置を提供することができる。 According to the present invention, it is possible to provide a filter arithmetic unit and a motion compensation device using a booth algorithm that can reduce the amount of hardware and power consumption.
以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。本実施の形態は、ブースアルゴリズムを利用したフィルタ演算器において、演算器を有効利用することで、繰り返し演算回数を減少して処理速度を向上させるものである。 Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In the present embodiment, in the filter arithmetic unit using the Booth algorithm, the arithmetic unit is effectively used to reduce the number of repetitive calculations and improve the processing speed.
先ず、本実施の形態にかかるフィルタ演算器を適用することができる画像復号装置について説明する。ここでは、一例として、H.264及びVC−1における動き補償処理におけるフィルタ演算を実行するフィルタ演算器に適用した場合について説明する。なお、本発明は、H.264及びVC−1の両規格におけるフィルタ演算が可能な動き補償回路について説明するが、H.264のみのフィルタ演算を行なう動き補償回路、VC−1のみのフィルタ演算を行なう動き補償回路、又はその他MPEG(Moving Picture Experts Group)2、4等のフィルタ演算器にも適用可能であることは勿論である。 First, an image decoding apparatus to which the filter arithmetic unit according to this embodiment can be applied will be described. Here, as an example, a case will be described in which the present invention is applied to a filter computing unit that executes filter computation in motion compensation processing in H.264 and VC-1. 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 can also be applied to a motion compensation circuit that performs a filter operation of only H.264, a motion compensation circuit that performs a filter operation of only VC-1, or other filter operation units such as MPEG (Moving Picture Experts Group) 2, 4 and the like. It is.
先ず、H.264、VC−1の画像復号装置について説明する。図1及び図2は、それぞれ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規格に適用される。 First, an H.264, VC-1 image decoding apparatus will be described. 1 and 2 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.
図1に示すように、H.264の画像復号装置200は、可変長復号部202と、逆量子化部203と、逆アダマール変換部204と、加算器205と、デブロッキングフィルタ206と、動き補償部212と、重み付け予測部211と、画面内予測部210と、復号画像208を表示するモニタ209を有する。
As shown in FIG. 1, an H.264
可変長復号部202は、圧縮データ201が入力され可変長符号化された圧縮データを、変換テーブルに基づき可変長復号する。そして、可変長復号された復号データは、逆量子化部203にて逆量子化され、逆アダマール変換部204にて逆アダマール変換され加算器205へ送られる。加算器205の出力は、デブロッキングフィルタ206によりブロック歪を除去されて復号画像208とされ、モニタ209を介して表示される。
The variable-
ここで、加算器205の出力が画面内予測部210にも入力され、予測画像213が生成される。また、復号画像が動き補償部212にて動き補償処理が行なわれ、重み付け予測部211にて重み付けされて予測画像213が生成される。加算器205は、Iフレーム処理の際には画面内予測部210からの予測画像213に予測誤差を加算し出力する。一方、P、Bフレーム処理の際には、切替部207にて切り替え、重み付け予測部211から送られる予測画像213に予測誤差を加算して出力する。
Here, the output of the
また、図2に示すように、VC−1の画像復号装置220も、画像復号装置200とほぼ同様に構成され、可変長復号部222、逆量子化部223、逆DCT変換部224、加算器225、ループフィルタ226、重み付け予測部229、動き補償部230、及び復号画像227を表示するモニタ228を有する。VC−1の画像復号装置220は、画面内予測を行なわない点、重み付け予測を行なってから動き補償処理を行う点、デブロッキングフィルタ206の代わりにループフィルタ226が使用される点が異なる。
(3−2)動き補償部
As shown in FIG. 2, the VC-1
(3-2) Motion compensation unit
図3は、H.264及びVC−1の規格に準拠したフィルタ演算を含む動き補償処理を実行する動き補償(MC)部を示すブロック図である。この動き補償部300は、H.264及びVC−1のいずれの動き補償部でも使用可能な構成とされている。すなわち、両規格にて共有できる。この動き補償部300は、フィルタ演算器302、303と、セレクタ301、304、307、310、313と、乗算器304、312、加算器306、308、311と、ラインメモリ309とを有する。
FIG. 3 is a block diagram showing a motion compensation (MC) unit that executes a motion compensation process including a filter operation conforming to the standards of H.264 and VC-1. This
H.264では、フィルタ演算器302、303にてフィルタ演算施した後、上述した重み付け係数を使用してオフセット付き重み補間信号を求め、予測画像213を得る。ここで、入力INから入力された参照ピクチャR0の画素値が、フィルタ演算器302にて垂直方向フィルタによるフィルタ演算が実行され、フィルタ演算器303にて水平方向フィルタによるフィルタ演算が施される。そして、生成されたフィルタ演算済みのデータがラインメモリ309に格納される。次に、参照ピクチャR1の画素値が入力INから入力されると、同様に、フィルタ演算器302、303にてフィルタ演算が施され、フィルタ演算済みのデータに乗算器305にて重み係数を乗算し、加算器306にてオフセット値を加算する。一方、ラインメモリに格納されているデータがセレクタ313を介して乗算器312にて重み付き係数と乗算され、これらが加算器308にて加算され、オフセット付き重み補間信号W0X0+W1X1+Dを生成する。生成されたデータは、ラインメモリ309を経て出力OUTから出力される。
H. In H.264, after the filter operation is performed by the
VC−1の場合は、入力INからのデータがセレクタ313、セレクタ310を介し、更にセレクタ304から乗算器305、加算器306を介し、そしてセレクタ301を介してフィルタ演算器302、303に入力される。フィルタ演算器303の結果は、セレクタ304、セレクタ307を介してそのままラインメモリ309へ格納され、出力OUTから出力される。乗算器312、加算器311、乗算器305、加算器306では、以下の重み付けが実行される。
H=(iScale×F+iShift+32)>>6
ここで、Fは入力値、iScale、iShiftは重み係数を示す。
In the case of VC-1, 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.
このように構成された動き補償部300は、セレクタ301、304、307、310、313にてフィルタ演算器302、303への入力、出力を適宜選択するため、重み付けをフィルタ演算後に実行するH.264であっても、重み付けをフィルタ演算前に実行するVC−1であっても、いずれの演算にも適用可能である。
The
次に、このような動き補償部等に使用することができるフィルタ演算器について詳細に説明する。なお、本実施の形態においては、H.264やVC−1を例にとって説明するが、本フィルタ演算器は、MPEG4、2などにおけるフィルタ演算器としても使用することが可能である。 Next, a filter arithmetic unit that can be used for such a motion compensation unit will be described in detail. In the present embodiment, H.264 is used. This filter arithmetic unit can be used as a filter arithmetic unit in MPEG4, 2 or the like.
図4は、フィルタ演算器302、303の詳細を示す図であって、本実施の形態にかかるフィルタ演算器を示すブロック図である。フィルタ演算器302、303は同様の構成のため、ここではフィルタ演算器1として説明する。また、本実施の形態においては、5つのフィルタ係数を有し、5つの画素値から一の演算結果を求めるフィルタ演算を実行する場合について説明するため、5つの演算部101〜105を有する。ただし、例えば、H.264であれば、輝度信号Gyが6タップフィルタ、色差信号Gcは2タップフィルタのフィルタ演算であり、VC−1であれば輝度信号Gyが4タップフィルタ、色差信号Gcは2タップフィルタのフィルタ演算となり、それぞれフィルタ係数に対応するフィルタ演算器を用いる。なお、フィルタ演算器を1又はフィルタ係数未満の数のみ用意して、フィルタ演算器を繰り返し使用して演算を行なうようにしてもよい。
FIG. 4 is a diagram showing details of the
本実施の形態にかかるフィルタ演算器1は、ブースデコーダ及び部分積生成部からなり、繰り返し演算を行う演算部101〜105を共有することでフィルタ演算器の規模を大幅に小さくしつつ、演算部101〜105を高効率に利用することで演算処理速度を向上するものである。また、減算器121〜125により、現在の画像データと1つ前の画像データとの差分をとってフィルタ演算することで演算量を低減し、これにより、演算時間を短縮化する。さらに、演算部101〜105の各演算結果を一の加算器21にて加算することで、隣接する演算部を利用した場合であっても演算結果を元に戻すことなく加算処理を行なうことができる。
The
ここで、本実施の形態にかかるフィルタ演算器は、ブースのアルゴリズムを使用して乗算を行うフィルタ演算器である。そこで、本実施の形態にかかるフィルタ演算器の理解を容易とするため、先ず、2次のブースアルゴリズムを利用した乗算器について説明する。 Here, the filter arithmetic unit according to the present embodiment is a filter arithmetic unit that performs multiplication using Booth's algorithm. In order to facilitate understanding of the filter arithmetic unit according to the present embodiment, first, 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
ここで、下記表1に示すように、符号データ(−2・y[2i+1]+y[2i]+y[2i-1])の値の組み合わせは8通りしかなく、0、±1、±2の値のみしかとらない。よって、乗算器は、0、±X、±2Xに22iを乗算した値(部分積)を算出して加算する値の組み合わせの対応(真理値表)として書ける。また、符号データの値は8通りしかないため、ブースデコーダは、単なる組み合わせ論理回路により得ることができる。 Here, as shown in Table 1 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. Further, since there are only 8 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.
図5は、このような2次のブースのアルゴリズムに従って乗算を実行する乗算器を示すブロック図である。乗算器400は、被乗数Xを出力するレジスタF0と、乗数Yを出力するレジスタF7を有する。更に、乗数Y及び被乗数Xが入力され部分積を生成する部分積生成ユニット401と、部分積生成ユニット401にて生成された部分積を加算する加算器450とを有する。部分積生成ユニット401は、4つの部分積生成部410、420、430、440を有する。
FIG. 5 is a block diagram showing a multiplier that performs multiplication in accordance with 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を求める。図5においては、これらの部分積を求める部分積生成部を、それぞれ410、420、430、440としている。なお、本実施の形態においては、ブースデコーダでデコードする乗数Yが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. 5, the partial product generators for obtaining these partial products are 410, 420, 430, and 440, respectively. In the present embodiment, the multiplier Y decoded by the Booth decoder is described by taking 8 bits as an example, but it is needless to say that the multiplier Y 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は、図6(a)のように表すことができる。乗数を2ビットごとに区切り、各組と下位組の最上位ビットの計3ビット(ただしy−1=0)のデータから符号データが得られる。これらに被乗数Xを乗算し、対応するビットシフト(×2i)を演算することで部分積を生成することができる。このため、図6(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=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×358)×26} ・・・部分積生成部410にて演算
+{(0×358)×24} ・・・部分積生成部420にて演算
+{(−1×358)×22} ・・・部分積生成部430にて演算
+{(−1×358)×20} ・・・部分積生成部440にて演算
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 × 358) × 2 6 }... Operation by 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.
このような部分積生成ユニットを使用すると図5に示すフィルタ演算器は図7に示すような演算回路となる。図7は、従来の構成のフィルタ演算器を示す図である。すなわち上述したように、例えば8ビットであれば4つの部分積生成部を要し、例えば10ビットであれば5つの部分積生成部を要する。なお、図7には簡単のため3つの部分積生成部のみを示している。 When such a partial product generation unit is used, the filter arithmetic unit shown in FIG. 5 becomes an arithmetic circuit as shown in FIG. FIG. 7 is a diagram illustrating a filter arithmetic unit having a conventional configuration. That is, as described above, for example, if it is 8 bits, four partial product generators are required, and if it is 10 bits, for example, five partial product generators are required. FIG. 7 shows only three partial product generators for simplicity.
図7を簡単に説明すると、フィルタ演算器501はレジスタ(フリップフロップ:FF)502、510、511、513、516、部分積生成部503〜505、加算器509、加算器512、514、リミッタ回路515を有する。部分積生成部503〜505はそれぞれブースデコーダ506〜508を有する。画素データが乗数Yとして入力されFF502に保持される。FF502から、各ビットに応じた部分積生成部503〜505へ値が入力され部分積が生成される。加算器509はそれを加算し、上位ビットと下位ビットをそれぞれFF512、511に入力する。加算器512はFF510及びFF511からの値を加算してFF513に出力する加算器514はFF513からの値とフィルタ係数Bとを加算し、リミッタ回路515は加算器514の値を例えば0〜255の範囲に制限してFF516へ出力する。
Briefly describing FIG. 7, the filter
このフィルタ演算器は、
[出力画素]=Lim([入力画素]×A+B)
の演算を実行する。ここで、Aはフィルタ係数を示す。Bは各フィルタ演算において必要に応じて加算される所定の定数である。従来のフィルタ演算器においては、外部のメモリ等から読み出したデータは、バースト的に読み出される。この際、通常、高速演算する場合は、大規模な乗算器によりパイプライン処理する方式になっている。このため、例えば入力画素データが10ビットであれば部分積生成部が5つ必要となり、回路規模が大きく、よって消費電力も大きい。
This filter operator
[Output pixel] = Lim ([Input pixel] × A + B)
Execute the operation. Here, A indicates a filter coefficient. B is a predetermined constant added as needed in each filter operation. In a conventional filter arithmetic unit, data read from an external memory or the like is read in bursts. At this time, in general, when high-speed computation is performed, the pipeline processing is performed by a large-scale multiplier. For this reason, for example, if the input pixel data is 10 bits, five partial product generation units are required, which results in a large circuit scale and thus high power consumption.
そこで、本実施の形態においては、図7示す部分積生成部503〜505を1つの部分積生成部とし、1つの部分積生成部を繰り返し使用することで回路規模を縮小し、消費電力を削減する。なお、本実施の形態においては、後述するように、5タップのフィルタ演算を行うため、繰り返し演算を行う演算部を5つ有している。したがって、図7に示す例であれば、演算部は1つでよい。また、上述したように、各演算部101〜105を有効利用することで演算時間の短縮化を図る。さらに、隣接する画素値の差分データを用いることで演算値を小さい値とすることができ、演算処理時間の更なる短縮化を図る。
Therefore, in the present embodiment, the partial
図4に戻って、フィルタ演算器1は、乗数となる画素値と被乗数となるフィルタ係数とをブースアルゴリズムを用いて積和演算するフィルタ演算器であって、画素値が入力される入力部と、ブースアルゴリズムに従って入力部からの出力をデコードして1又は複数の符号データを求め、対応するフィルタ係数と当該1又は複数の符号データのそれぞれとの積を求める繰り返し演算を行う2以上の演算部10jと、入力部からの出力を選択して演算部のいずれかに入力する入力選択セレクタ13jと、入力部からの出力に基づき各演算部10jにおける繰り返し演算回数及び繰り返し演算タイミングを決定し、この決定結果に基づき入力選択セレクタ13jを制御する制御部31とを有する。さらに、各演算部10jからの出力を全て加算する加算器21と、加算器21の値を保持するレジスタ22と、レジスタ22の値を制限するリミッタ回路23と、リミッタ回路23からの出力を保持するレジスタ24と、レジスタ22の出力又は0を選択出力するセレクタ25とを有する。
Returning to FIG. 4, the
入力部は、現在の画素値を格納するレジスタF00〜F04とそれぞれこれに対応する前回の画素値を格納するレジスタF01〜F05と、これらの差分データを取る減算器12j(121〜125)と、F01〜F05の画素値又は0を選択出力するセレクタ111〜115と、減算結果を格納するレジスタF06〜F09、F0Aとを有する。演算部101〜105は、同様の構成であるため、演算部101について説明すると、演算部101は、レジスタF06に格納された値のうち後述する繰り返し演算回数に応じた3ビットの値を選択して出力する選択器141、選択器141が選択出力した値をブースのアルゴリズムに従ってデコードして符号データを生成するブースデコーダ151、当該符号データとある係数(フィルタ係数A)とを乗算する乗算部161、繰り返し演算回数に応じてビットシフトするビットシフト部171、乗算部161による乗算回数を決定する繰り返し回数決定部181を有する。ブースデコーダ151、乗算部161、及びビットシフト部171により部分積生成部を構成する。なお、繰り返し回数決定部181は選択部141、ビットシフト部171を繰り返し演算回数及びそのタイミングに基づき制御するものであるが、制御部31によりこれらの制御を行なってもよい。
The input unit includes registers F00 to F04 that store current pixel values, registers F01 to F05 that store previous pixel values corresponding thereto, and subtractors 12 j (12 1 to 12 5 ) that take the difference data therebetween. ) and has a
ここで、本フィルタ演算器1では、A乃至Eをフィルタ係数とすると、以下演算を行うものとして説明する。
[出力画素]=Lim(A*F1+B*F2+C*F3+D*F4+E*F5)
Here, in this filter
[Output Pixel] = Lim (A * F1 + B * F2 + C * F3 + D * F4 + E * F5)
このフィルタ演算器1は、通常外部メモリからのデータはバースト的に転送されてくるため、必ずしも常に連続にデータが入力されるとは限らない。また画像データは隣同士の画素同士には比較的相関関係があるため、画素同士の差分は比較的小さい。以上の特徴を利用することで、小規模な部分積生成部を使用し回路規模を大幅に削減させることができる。同時に前データとの差分が少ない場合にはほぼ連続的にデータを出力させ、例外的に差分が大きくなり乗算時間が伸びてもバーストデータ間に若干の時間があるため、それほどの性能劣化を伴わずに処理を可能にすることができる。更に、回路規模削減により消費電力を削減することも可能である。
Since the data from the external memory is normally transferred in bursts in the
さらに、本実施の形態のように、5つのフィルタ係数からなるフィルタ演算を行なう場合、各フィルタ係数に対する演算を並列に高速処理させようとすると演算効率が低下することがあり、所望の高速処理が得られない場合がある。または、制御が複雑になるとい場合がある。そこで、本実施の形態においては、演算部101〜105の前段に入力選択セレクタ131〜135を設け、演算処理を行なっていない(演算が終了した)演算部を利用して演算効率を向上し、演算処理を高速化する。
Furthermore, when performing a filter operation consisting of five filter coefficients as in the present embodiment, the calculation efficiency may be reduced if an operation for each filter coefficient is processed in parallel at a high speed. It may not be obtained. Or there are cases where the control becomes complicated. Therefore, in the present embodiment, the
以下、本実施の形態にかかるフィルタ演算器1について更に詳細に説明する。減算器121〜125は、レジスタF01〜F05に保持されている1つ前の画像値からレジスタF00〜F04に保持されている現在の画像値を減算して差分データを求める。この理由について説明する。図8は、画像について水平方向の隣り合った画素間の差信号の振幅分布を示す図である(画像情報圧縮、テレビジョン学会偏、P71)。横軸は振幅、縦軸は周波数を示す。差信号は0近傍の狭い範囲に集中する。よって、減算器121〜125により差信号を求めることで、0に近い値とすることができる。差分データとして入力を0に近い値とすることで、後述する繰り返し演算回数を最小限とすることができ、演算処理時間を短縮化することができる。この値はF06〜F09、F0Aに保持される。なお、本実施の形態においては、画素値は8ビット、減算後の値は符号ビットを含めて9ビットとする。
Hereinafter, the
次に、レジスタF06〜F09、F0Aの減算結果に基づき制御部31が演算部での繰り返し演算回数及びそのタイミングを求め、これに基づき各演算部101〜105での繰り返し演算回数及び繰り返し演算タイミングを決定する。すなわち、例えば、レジスタF07からの出力は、演算部102のみならず、必要に応じて演算部101、103でも行なう。
Next, based on the subtraction results of the registers F06 to F09 and F0A, the
以下では具体的な数値を例に説明する。F00〜F05まで、下記表3のように、10、11、6、39、34、35という値が入力されることとする。この場合、各画素値の差分は、1、−5、33、−5、1となり、各乗算部(×20、×22、×24、×26)で使用される符号データは下記表のようになって、演算部101〜105の繰り返し演算回数は、それぞれ、1、2、4、2、1回となる。ここで、レジスタF06〜F09、F0Aの出力結果をそれぞれ対応する演算部101〜105で行なう場合、自身の演算ということとする。
Hereinafter, specific numerical values will be described as an example. From F00 to F05, the
制御部31は、これらの各演算部101〜105における繰り返し演算回数がなるべく均一になるようセレクタ131〜135を制御する。すなわち、繰り返し演算回数が多い演算部は繰り返し演算回数が少ない演算部も使用して演算を行なうようにする。本例においては、演算部101が自身の演算と演算部102の演算を1回、演算部102は自身の演算1回と演算部103の演算を1回、演算部104は、自身の演算1回と演算部103の演算を1回行うことで、各演算部101〜105が2回ずつ演算を行うこととなる。演算部101〜105を各演算部で共有しない場合は、繰り返し演算回数が最も多い4回分の演算時間が必要であるが、本実施の形態のように、セレクタ131〜135を設けて隣り合う演算部101〜105を共有することで、繰り返し演算回数を半分に減らし、演算処理の高速化を図ることができる。
なお、本実施の形態においては、演算部101〜105で乗算される被乗数をフィルタ係数A〜Eとして説明しているが、被乗数が画素値であって、乗数がフィルタ係数の場合、すなわち、乗数がある定められた値である場合は、予め演算回数がわかっている。そのような場合は、制御部31を設けることなく、予め演算部101〜105の演算回数が均一となるようレジスタF06〜F09、F0Aの出力を振り分けるようにすればよい。
In the present embodiment, the multiplicands multiplied by the
次に、制御部31における繰り返し演算回数及び繰り返し演算タイミング決定方法について説明する。表3に示すように、各演算部101〜105の繰り返し演算回数を加算すると合計10回であり、各演算部101〜105がそれぞれ2回ずつ繰り返し演算を行えばよいことがわかる。そこで、制御部31は、各演算部101〜105の繰り返し演算回数が2回ずつとなるように、セレクタ131〜135を切替制御する。これにより、例えば、演算部101は自身の第1回繰り返し演算と、演算部102の第2回繰り返し演算を行う。演算部102は、自身の第1回繰り返し演算と、演算部103の第3回繰り返し演算を行う演算部103は、自身の第1、2回繰り返し演算を行う。演算部104は、自身の第1繰り返し演算と、演算部103の第4回繰り返し演算を行う。演算部105は自身の第1回繰り返し演算と演算部104の第2回繰り返し演算を行う。
Next, a method for determining the number of repeated calculations and the repeated calculation timing in the
一方、従来方法の場合、表4に示すように、演算部単独の繰り返し演算回数は最大4回となる。更に、合計の繰り返し演算回数は17回となる。従って、本例の場合は、隣合う演算部を共有しても全体の繰り返し演算回数は4回のままとなる。これに対し、隣合う画素の差分を取る場合は、演算部単独の繰り返し演算回数は最大4回となり従来と同様となるが、更に隣合う演算部を共有することで上述のように繰り返し演算回数が2回と大幅に減らすことができる。なお、本例の場合、差分をとらないと繰り返し演算回数が減少しないが、本例のように水平方向に隣接する演算部のみならず、後述するように、垂直方向に隣接する演算部同士を共有することで、演算回数を減少さる能力を向上することができる。 On the other hand, in the case of the conventional method, as shown in Table 4, the number of repetitive calculations of the calculation unit alone is a maximum of four times. Furthermore, the total number of repeated calculations is 17. Therefore, in the case of this example, even if the adjacent calculation units are shared, the total number of repeated calculations remains four. On the other hand, when the difference between adjacent pixels is taken, the number of iterations of the computation unit alone is the maximum of 4 times, which is the same as the conventional one, but by further sharing the neighboring computation unit, the number of iterations as described above. Can be greatly reduced to twice. In the case of this example, if the difference is not taken, the number of repeated computations does not decrease, but not only the computation units adjacent in the horizontal direction as in this example, but also computation units adjacent in the vertical direction as described later. By sharing, the ability to reduce the number of operations can be improved.
図9は、本実施の形態と参考例との比較により、隣接画素の差分を取り、かつ隣合う演算部を共有した場合の効果を示す図である。参考例は、隣接画素の差分を取るのみで、隣り合う演算部を共有しない場合を示す。図9に示すように、本来ならば、最大4回の繰り返し演算を必要とするが、本実施の形態においては、2回の繰り返し演算で全ての演算を終了することができる。すなわち、演算速度を2倍とすることができる。 FIG. 9 is a diagram illustrating an effect when the difference between adjacent pixels is obtained and the adjacent calculation units are shared by comparing the present embodiment with the reference example. The reference example shows a case where only the difference between adjacent pixels is taken and adjacent calculation units are not shared. As shown in FIG. 9, originally, a maximum of four iterations are required, but in this embodiment, all the computations can be completed with two iterations. That is, the calculation speed can be doubled.
ここで、セレクタ13jの具体的な制御方法としては、以下に説明する方法がある。制御部31は、全演算部10jの繰り返し演算回数の総数を求め、各演算部10jにおける平均繰り返し演算回数を算出する。平均繰り返し演算回数は小数点切り上げの整数とし、当該整数回分繰り返し演算を行うよう、セレクタ13jを制御する。この場合、例えば、繰り返し演算回数は9ビットの並びに応じてカウントするが、予め9ビットの並びに応じた繰り返し演算回数が対応付けられたテーブルを用意し、図10(a)に示すように、このテーブル41を参照して各演算部10kの繰り返し演算回数をカウントし、この繰り返し演算回数の総数に応じてセレクタ13jを制御する方法がある。
Here, as a specific control method of the
また、繰り返し演算回数の総数を求める他の方法としては、各レジスタF06〜F09、F0Aに格納される9ビットの上位ビットから符号を判定していき、符号の変化点を検出する方法がある。(y−1、y0、y1)=データ群S0、(y1、y2、y3)=データ群S1、(y3、y4、y5)=データ群S2、(y5、y6、y7)=データ群S3、(y7、y8、y8)=データ群S4、としたとき、例えば、−5であれば、上位ビットy8から検査していくとビットy3までは全て1であり、ビットy2で0となるため、変化点はデータ群S1に含まれる。この場合は、データ群S0、S1の演算のみを行なえばよく、繰り返し演算回数は2回である。すなわち、変化点が出現する以降のデータ群の演算のみを行えばよい。33であれば、変化点はデータ群S3に含まれ、この場合は、データ群S0からデータ群S3までの4グループの演算を行えばよく、繰り返し演算回数は4回である。このようにして求めた繰り返し演算回数を加算することで、繰り返し演算総数を求め、演算部101〜105の総数で除して平均繰り返し演算回数を求めることができる。
As another method for obtaining the total number of repetitive operations, there is a method of detecting the sign change point by determining the sign from the higher 9 bits stored in the registers F06 to F09 and F0A. (Y −1 , y 0 , y 1 ) =
さらに、繰り返し演算回数の総数を求める他の方法としては、データ群毎に、データ群が(000)又は(111)であるか否かを検出するようにしてもよい。データ群が(000)又は(111)である場合は、2次のブースデコード結果が0になるため、演算する必要がない。この場合は、上位ビット側からであっても下位ビット側からであっても、又は全ビット同時に行なうようにしてもよい。例えば33であれば、データ群S0、S2、S3が演算対象であり繰り返し演算回数は3回である。このように、単純に「33」は6ビットで表せるから、演算回数が4回とするよりも繰り返し演算回数を減らすことができる。 Furthermore, as another method for obtaining the total number of repeated operations, it may be detected for each data group whether the data group is (000) or (111). When the data group is (000) or (111), the secondary booth decoding result is 0, so that there is no need for calculation. In this case, the processing may be performed from the upper bit side, the lower bit side, or all the bits simultaneously. For example, in the case of 33, the data group S0, S2, S3 is a calculation target, and the number of repeated calculations is three. Thus, since “33” can be simply represented by 6 bits, the number of repeated operations can be reduced as compared with the case where the number of operations is four.
図10(b)は、データ群毎に(000)又は(111)であるか否かを検出する回路の一例を示す図である。9ビットのデータをデータ群S0〜S4に分け、それぞれ判定部51〜55に入力し、(000)又は(111)であるか否かを判定する。例えば、(000)又は(111)であれば0を、そうでなければ1を出力する。テーブル56は判定部51〜55の出力に応じて繰り返し演算回数を出力する。このとき、どのデータ群の演算を行なうかの情報、すなわち繰り返し演算タイミングを示す情報(以下データ群情報という。)を一緒に出力する。
FIG. 10B is a diagram illustrating an example of a circuit that detects whether the data group is (000) or (111). The 9-bit data is divided into data groups S0 to S4, which are input to the
図10(c)は、変化点がどの位置にあるかを検出することで繰り返し演算回数を決定する具体的な回路の一例を示す図である。上位ビットからFF61に画像データを入力する。FF61に保持された上位のビットと次に入力されるそれより下位のビットとを比較器62で比較し、一致であれば例えば"0"、不一致であれば例えば"1"を出力する。カウンタ63はダウンカウンタでありカウント値を9から0までカウントする。回数決定部64は、"1"が入力されたときのカウンタ値に基づき、繰り返し演算回数を選択部14、ビットシフト部17へ出力する。以上のようにして、制御部31は、繰り返し演算回数と、どのデータ群で演算が必要かを示すデータ群情報とを求める。なお、繰り返し演算回数及びデータ群情報を繰り返し回数決定部181〜185で決定し、これらのデータを基に制御部31が各演算部101〜105で実行する演算を決定してもよい。
FIG. 10C is a diagram illustrating an example of a specific circuit that determines the number of repetitive computations by detecting where the change point is located. Image data is input to the
選択部131〜135は、繰り返し演算回数及びデータ群情報に応じてレジスタF06〜F09、F0Aからの入力を選択する。すなわち、本例においては、選択部131は、繰り返し演算回数1回目のときは、レジスタF06の値(y1,y0,0)=(0,1,0)を選択し、2回目のときは、レジスタF07の値(y3,y2,y1)=(1,0,1)を選択する。同様に、選択部132は、1回目の演算の際はレジスタF07の値(y1,y0,0)=(1,1,0)を選択し、2回目はレジスタF08の値(y5,y4,y3)=(1,0,0)を選択する。選択部133は、繰り返し演算回数1回目のときは、レジスタF08の値(y1,y0,0)=(0,1,0)を選択し、2回目のときもレジスタF08の値(y3,y2,y1)=(0,0,0)を選択する。選択部134は、繰り返し演算回数1回目のときは、レジスタF09の値(y1,y0,0)=(1,1,0)を選択し、2回目のときはレジスタF08の値(y7,y6,y5)=(0,0,1)を選択する。選択部135は、繰り返し演算回数1回目のときは、レジスタF0Aの値(y1,y0,0)=(0,1,0)を選択し、2回目のときはレジスタF09の値(y3,y2,y1)=(1,0,1)を選択する。
The
なお、本実施の形態においては、隣接する演算部同士のみ共有することができることとして説明するが、演算部101と105とを共有してもよい。または、例えば演算部101と演算部104など、いずれの演算部とも共有できるようにしてもよい。
In the present embodiment, it is described as being able to share only calculation unit adjacent to, the
ブースデコーダ15kは、上述したように、各3ビットのデータ群から表3に示す符号データを求める。乗算部16kは上述したように、符号データにフィルタ係数Aを乗算してビットシフト部17kへ出力する。
The
データ群情報はビットシフト部171〜175へ入力されており、データ群情報(繰り返し演算タイミング)に基づき、0ビットシフト(×20、1ビットシフト(×22)、2ビットシフト(×24)、3ビットシフト(×26)を適切に行なう。さらに、本実施の形態においては、ビットシフト部171〜175の後段に、全演算部101〜105の演算結果を全て加算する一の加算器21が設けられているため、例えばF02からの出力データは、隣の演算部101で演算されるが、もとの演算部102に戻さず、そのまま加算器21に入力して加算することができる。
Data group information is inputted to the bit shift section 17 1-17 5, based on the data group information (repeated calculation timing), 0 bit shift (× 2 0, 1 bit shift (× 2 2), 2-bit shift ( × 2 4), 3-bit shift (× 2 6) appropriately performed. further, in this embodiment, in the subsequent stage of the
加算器21は、本例においては、上述したように2回ですべての演算が終了するため、レジスタ22に保存されている前回の演算値に対し、2回分の演算値を加算しこれを出力する。この加算器21は、各データ群S0〜S4から得られた部分積を加算すると共に、前回の加算結果に今回の加算結果を加算することで、現在の画素データのフィルタ演算結果を得ることができる。すなわち、前回の加算結果及び今回の加算結果はいずれも差分データにフィルタ係数Aを乗算した部分積和からなるため、これらを加算することで、差分データではない画素データのフィルタ演算結果を求めることができる。
In this example, the
なお、加算器21は、必要であれば係数a等を加算処理し、演算結果をリミッタ回路23へ出力する。リミッタ回路23は、例えば0〜255までの間に演算結果がおさまるよう制限して結果をレジスタ24に出力する。セレクタ25は、初回の繰り返し演算の際には0を選択し、その他レジスタ22の値を選択出力する。
The
本実施の形態においては、符号データ×フィルタ係数を行なう演算部10j(ブースデコーダ15j及び乗算部16j)を備え、演算部10jを繰り返し使用することで演算規模を縮小したフィルタ演算器において、隣合う演算部10jを共有化することで各演算部10jを使用する繰り返し演算回数を平準化する。このことにより、例えば、ある一の演算部の繰り返し演算回数が4回で、これに隣接する演算部の繰り返し演算回数が2回である場合、一の演算部の演算1回分を隣接する演算部で行わせることにより両者の演算回数を3回とし、最大繰り返し演算回数を減らすことができる。
In the present embodiment, a filter arithmetic unit that includes a calculation unit 10 j (
さらに、画像データは隣同士の画素同士には比較的相関関係があるため、画素同士の差分も比較的小さことを利用し、入力画像データについて現在のデータと次のデータとの差分をとってフィルタ係数と乗算し、それを加算してフィルタ演算を行なう。このとき、差分をとった入力データは0近傍の値となるため、繰り返し演算回数を大幅に減少させることができる。なお、通常外部メモリからのデータはバースト的に転送されてくるため、常に連続にデータが入力されるわけではない。すなわち、データ入力の待ち時間があるため、たとえ繰り返し演算が含まれても待ち時間の間に行なうことができる。 Furthermore, since the image data is relatively correlated with the adjacent pixels, the difference between the pixels is utilized, and the difference between the current data and the next data is obtained for the input image data. The filter coefficient is multiplied and added to perform a filter operation. At this time, the input data taking the difference becomes a value in the vicinity of 0, so that the number of repeated calculations can be greatly reduced. Since data from the external memory is normally transferred in bursts, data is not always input continuously. In other words, since there is a waiting time for data input, even if repetitive calculation is included, it can be performed during the waiting time.
以上のように演算部を繰り返し且つ共有して使用することで、回路規模を大幅に削減させることができると共に、各演算部で実行する繰り返し演算回数平均化し、処理時間を大幅に減少することができる。また、隣接画素間の値を演算に利用することで更に繰り返し演算回数を減少させて消費電力を削減することができる。 As described above, the operation unit can be used repeatedly and shared, so that the circuit scale can be greatly reduced, and the number of repeated operations executed by each operation unit can be averaged to significantly reduce the processing time. it can. Further, by using the value between adjacent pixels for the calculation, the number of repeated calculations can be further reduced to reduce the power consumption.
次に、本実施の形態における変形例について説明する。図11及び図12は、本実施の形態にかかる変形例を示す図である。上述の実施の形態においては、水平方向で隣り合う演算部10jを共有することで繰り返し演算回数を減少させるものとして説明したが、本変形例においては、垂直方向で隣合う演算部も共有することで、更に繰り返し演算回数を減少させるものである。なお、上述の実施の形態と同様、垂直方向の演算部のみを共有するようにしてもよいことは勿論である。
Next, a modification of the present embodiment will be described. 11 and 12 are diagrams showing a modification example according to the present embodiment. In the above-described embodiment, it has been described that the number of repetitive calculations is reduced by sharing the
図11に示すフィルタ演算器100は、図4に示すフィルタ演算器1が5つ集まったものであり、これらのフィルタ演算器を11、12、13、14、15とし、特に区別する必要がない場合は、フィルタ演算器1ということとする。本フィルタ演算器100は、フィルタ演算器1を5つ並列に接続することで、垂直方向に5画素同時に演算することができる。そして、垂直方向に隣接するフィルタ演算器1の演算部を共有する。なお、本変形例では、フィルタ演算器1に水平方向に連続する5つの画素値が入力され、フィルタ演算器11、12、13、14、15には垂直方向に連続する5つの画素値が入力されるものとして説明するが、垂直フィルタの場合には、フィルタ演算器1に垂直方向に連続する5つの画素値が入力され、フィルタ演算器11、12、13、14、15には水平方向に連続する5つの画素値が入力される。
A filter arithmetic unit 100 shown in FIG. 11 is a collection of five filter
フィルタ演算器11は演算部10j(101〜105)を有し、フィルタ演算器12は演算部10k(106〜1010)を有し、フィルタ演算器13は演算部10l(1011〜1015)を有し、フィルタ演算器14は演算部10m(1016〜1020)を有し、フィルタ演算器15は演算部10n(1021〜1025)を有する。図12は、演算部101〜1025の詳細を示すブロック図である。演算部101〜1025は基本的には同様の構成を有するため、ここでは、フィルタ演算器12の演算部107について説明する。
Filter operation unit 1 1 includes an arithmetic unit 10 j (10 1 ~10 5) , the filter operation unit 1 2 includes an arithmetic unit 10 k (10 6 ~10 10) , the filter operation unit 1 3 calculation unit a 10 l a (1011 15), the filter operation unit 1 4 has an arithmetic unit 10 m (10 16 to 10 20), the filter operation unit 1 5 calculation unit 10 n (10 21 to 10 25 ). FIG. 12 is a block diagram illustrating details of the
図12に示すように、演算部107は、水平方向には演算部106、108と隣接し、演算部を相互に共有する。このため、セレクタ113には、演算部106、108のそれぞれレジスタF06、F08の値が入力される。また、これら25個の演算部101〜1025において、セレクタ113がどのレジスタからのデータを選択して繰り返し演算を行うかは、図示せぬ制御部によって制御されているものとする。
As illustrated in FIG. 12, the
この演算部107は、垂直方向には、演算部102、1012と隣接し、これらの演算部とも演算部を共有する。したがって、セレクタ113には、演算部102、1012のそれぞれレジスタF02、F12の値が入力される。セレクタ113は、図示せぬ制御部の制御のもと、隣接する演算部106、108、102、1012と演算部107の繰り返し演算回数が平準化するよう各演算部の繰り返し演算回数を割り当て、これに応じてセレクタ1113にその演算に応じた入力を選択させる。
The arithmetic unit 107 is in the vertical direction, adjacent to the
さらに、本変形例においては、垂直方向の演算も実施することから、繰り返し演算後のデータを元のフィルタ演算器1に戻す必要がある。このため、水平方向においては、出力側も隣接演算部102、1012と接続されており、セレクタ113が演算部102、1012のレジスタF02、F12の値を選択した場合は、それぞれ演算結果を元の演算部11、13へ出力する。このため、隣接水平画素の演算部102、1012の出力が入力される出力選択セレクタ114を有している。この出力選択セレクタ114も、図示せぬ制御部の制御のもと、自身の演算結果又は水平隣接演算部の演算結果、具体的には、演算部107であれば、ビットシフト部107の出力、シフトレジスタ102の出力、又はビットシフト部1012の出力を選択し、加算器21に出力する。また、演算部107の出力は、演算部102、1012の出力に接続された出力選択セレクタに入力される。
Furthermore, in this modification example, since the calculation in the vertical direction is also performed, it is necessary to return the data after the repeated calculation to the
なお、垂直方向、水平方向で制御部を物理的に別途設けてもよいことは勿論である。また、水平方向及び垂直方向のいずれにおいても演算部107を使用したい場合は、例えば水平方向の演算部の使用を優先するなど、各繰り返し演算は優先度を有していてもよい。さらに、水平方向においてもフィルタ演算器11とフィルタ演算器15とを接続し、両者で演算部を共有するようにしてもよい。さらにまた、水平、垂直方向に隣接する演算部のみならず、斜め方向、すなわち、演算部107であれば、演算部101、103、1011、1013とも演算部を共有してもよい。
Of course, the control unit may be physically provided separately in the vertical direction and the horizontal direction. Also, if you want to use the operation section 107 in both the horizontal and vertical directions, for example, priority is given to the use of horizontal operation unit, the repetitive operation may have a priority. Furthermore, to connect the
本変形例においても、上述したように、演算部を共有することで、繰り返し演算回数の最大数を低減することができ、演算処理速度を高速化する。特に、水平方向のみならず、垂直方向の演算部も共有することで、一の演算部は、共有できる演算部を例えば隣接8近傍の演算部とすることができ、より効率よく演算回数を平均化することができる。 Also in this modification, as described above, by sharing the calculation unit, the maximum number of repeated calculations can be reduced, and the calculation processing speed is increased. In particular, by sharing not only the horizontal calculation unit but also the vertical calculation unit, one calculation unit can make a calculation unit that can be shared, for example, a calculation unit in the vicinity of the adjacent eight, and more efficiently average the number of calculations. Can be
また、本変形例においては、上述の実施の形態と同様に、小規模なセレクタと加算器(Full ADDER)を追加した簡易な制御により、稼働率が高い演算部への演算を稼働率が低い演算部に分担させ(融通し合い)、複数サイクル時間を削減するものであるが、垂直方向のデータ相関性が高い場合は、垂直方向のフィルタ演算器の演算部に負荷が集中するのを防ぐために、入力されるデータを例えば1サイクルずつずらす。このように、タイミングずらすことにより、更に処理速度の低下することなく、高速に演算することが可能になる。 Further, in this modified example, as in the above-described embodiment, a simple operation with a small selector and an adder (Full ADDER) is added, so that an operation to a calculation unit with a high operation rate is performed at a low operation rate. The calculation unit shares (consolidates) and reduces the multiple cycle time. However, when the data correlation in the vertical direction is high, the load is prevented from concentrating on the calculation unit of the filter operator in the vertical direction. Therefore, the input data is shifted, for example, by one cycle. Thus, by shifting the timing, it becomes possible to perform high-speed computation without further reducing the processing speed.
なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。例えば、上述の実施の形態では、ハードウェアの構成として説明したが、これに限定されるものではなく、任意の処理を、CPU(Central Processing Unit)にコンピュータプログラムを実行させることにより実現することも可能である。この場合、コンピュータプログラムは、記録媒体に記録して提供することも可能であり、また、インターネットその他の伝送媒体を介して伝送することにより提供することも可能である。 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, in the above-described embodiment, the hardware configuration has been described. However, the present invention is not limited to this, and arbitrary processing may be realized by causing a CPU (Central Processing Unit) to execute a computer program. Is possible. In this case, the computer program can be provided by being recorded on a recording medium, or can be provided by being transmitted via the Internet or another transmission medium.
1、11、12、13、14、15、100、302、303、501 フィルタ演算器
101〜1025、10j、10k、10l、10m、10n演算部
11、111〜115、25、301、304、307、310、313 セレクタ
12j、121〜125 減算器
13、131〜135、113入力選択セレクタ
14、141〜145 選択部
15j、151〜155、506〜508 ブースデコーダ
16j、161〜165、503〜505 部分積生成部
17、171〜175、413、423、433、443 ビットシフト部
181〜185 繰り返し回数決定部
21 加算器
22、24 レジスタ
23 リミッタ回路
31 制御部
41、56 テーブル
51〜55 判定部
62 比較器
63 カウンタ
64 回数決定部
200、220 画像復号装置
201、221 圧縮データ
202、222 可変長復号部
203、223 逆量子化部
204 逆アダマール変換部
205、225 加算器
206 デブロッキングフィルタ
207 切替部
208、227 復号画像
209、228 モニタ
210 画面内予測部
211、229 重み付け予測部
212、230、300 動き補償部
213、233 予測画像
224 逆DCT変換部
226 ループフィルタ
304、305、312、400、412、422、432、442 乗算器
306、308、311、450、612 加算器
309 ラインメモリ
401 部分積生成ユニット
1,11,1 2, 1 3, 1 4, 1 5, 100,302,303,501
Claims (12)
前記乗数が入力される入力部と、
前記ブースアルゴリズムに従って前記入力部からの出力をデコードして1又は複数の符号データを求め、対応する前記被乗数と当該1又は複数の符号データのそれぞれとの積を求める繰り返し演算を行う2以上の演算部と、
前記入力部からの出力を選択して前記2以上の演算部のいずれかに入力する入力選択セレクタと、
前記入力部からの出力に基づき前記2以上の演算部のそれぞれにおける繰り返し演算回数及び繰り返し演算タイミングを決定し、この決定結果に基づき前記入力選択セレクタを制御する制御部とを有するフィルタ演算器。 A filter arithmetic unit that performs a product-sum operation on a multiplier and a multiplicand using a Booth algorithm,
An input unit for inputting the multiplier;
The sought by decoding one or more encoded data output from the input unit in accordance with Booth's algorithm, two or more operations to perform the iterative operations for obtaining the product of the respective corresponding said multiplicand and the one or more encoded data And
An input selection selector that selects an output from the input unit and inputs it to one of the two or more arithmetic units;
A filter arithmetic unit comprising: a control unit that determines the number of repeated calculations and a repeated calculation timing in each of the two or more calculation units based on an output from the input unit, and controls the input selection selector based on the determination result .
ことを特徴とする請求項1記載のフィルタ演算器。 The filter arithmetic unit according to claim 1, wherein the input unit includes a subtractor that obtains a difference between current input data and previous input data, and outputs the subtraction result.
前記入力部は、現在の入力データと前回の入力データとの差分を求める減算器を有し、当該減算結果を出力し、
前記第1加算器は、前記前回の入力データの入力分から求めた累積結果に、前記減算結果から前記演算部で求めた乗算結果を累積加算する
ことを特徴とする請求項1記載のフィルタ演算器。 Has one of the first adder for adding the respective output results of the two or more arithmetic unit,
The input unit includes a subtractor that obtains a difference between current input data and previous input data, and outputs the subtraction result.
The first adder, the cumulative result obtained from the input of the input data of the previous result of the subtraction of claims 1 filter operation, wherein the cumulative addition of the multiplication result obtained by the arithmetic unit vessel.
前記入力選択セレクタは、前記演算部毎に対応して設けられ、自己に対応する前記入力部、及び水平方向に隣接する画素値が入力される前記入力部からの出力のいずれかを選択して自己に対応する前記演算部に入力する
ことを特徴とする請求項1乃至3のいずれか1項記載のフィルタ演算器。 The input unit is provided corresponding to each arithmetic unit,
The input selection selector, said each arithmetic unit provided in correspondence, the input unit corresponding to the self, and by selecting one of the output from the input unit pixel value is input horizontally adjacent The filter arithmetic unit according to claim 1, wherein the filter arithmetic unit inputs to the arithmetic unit corresponding to the self.
前記入力選択セレクタは、前記演算部毎に対応して設けられ、自己に対応する前記入力部からの出力、及び垂直方向に隣接する画素値が入力される前記入力部からの出力のいずれかを選択して自己に対応する前記演算部に入力する
ことを特徴とする請求項1乃至3のいずれか1項記載のフィルタ演算器。 The input unit is provided corresponding to each arithmetic unit,
The input selection selector provided corresponding to each of the arithmetic unit, output from the input unit corresponding to the self, and one of the output from the input unit pixel value is input vertically adjacent The filter arithmetic unit according to claim 1, wherein the filter arithmetic unit is selected and input to the arithmetic unit corresponding to itself.
前記入力選択セレクタは、前記演算部毎に対応して設けられ、自己に対応する前記入力部の出力、並びに水平及び垂直方向に隣接する画素値が入力される前記入力部からの出力のいずれかを選択して自己に対応する前記演算部に入力する
ことを特徴とする請求項1又は2記載のフィルタ演算器。 The input unit is provided corresponding to each arithmetic unit,
The input selection selector provided corresponding to each of the arithmetic unit, one of the outputs from the input unit outputs of the input unit corresponding to the self, the well is pixel values adjacent in the horizontal and vertical directions is input select filter operation unit according to claim 1 or 2, wherein the input to the arithmetic unit corresponding to the self.
一の水平方向の画素値に基づき前記演算部で得られた出力結果を、当該水平方向に対応して設けられた前記第2加算器にて加算するよう選択する出力選択セレクタとを有し、
前記入力部は、現在の入力データと前回の入力データとの差分を求める減算器を有し、当該減算結果を出力し、
前記第2加算器は、前記出力選択セレクタから選択入力される値に基づいて、一の水平方向における前回の入力データの入力分から求めた累積結果に、当該水平方向の画素値の減算結果から前記演算部で求めた乗算結果を累積加算する
ことを特徴とする請求項5又は6記載のフィルタ演算器。 A second adder provided corresponding to each horizontal direction for adding output results obtained by each of the two or more arithmetic units based on one horizontal pixel value;
An output selection selector that selects an output result obtained by the arithmetic unit based on one horizontal pixel value to be added by the second adder provided corresponding to the horizontal direction;
The input unit includes a subtractor that obtains a difference between current input data and previous input data, and outputs the subtraction result.
The second adder, based on the value selected from the output selection selector, adds the result obtained by subtracting the pixel value in the horizontal direction to the accumulated result obtained from the previous input data input in one horizontal direction. The filter arithmetic unit according to claim 5 or 6, wherein the multiplication results obtained by the arithmetic unit are cumulatively added.
前記入力部から出力される出力データを下位から2ビット毎に区切り、各組のいずれかとその下位組の最上位ビットの計3ビットを選択する選択部と、
前記選択部から出力される3ビットのデータを前記ブースアルゴリズムに従ってデコードして前記符号データを生成するブースデコーダと、
前記符号データと前記被乗数との積を求める乗算器と、
前記乗算器からの出力結果を所定ビットシフトするビットシフト部とを有する
ことを特徴とする請求項1乃至7のいずれか1項記載のフィルタ演算器。 The computing unit is
A selection unit that divides the output data output from the input unit every two bits from the lower order and selects a total of 3 bits, one of each set and the most significant bit of the lower set,
A Booth decoder to generate the code data decoding in accordance with the Booth algorithm 3-bit data output from the selector,
A multiplier for obtaining a product of the code data and the multiplicand;
The filter arithmetic unit according to claim 1, further comprising: a bit shift unit that shifts an output result from the multiplier by a predetermined bit.
ことを特徴とする請求項1乃至8のいずれか1項記載のフィルタ演算器。 The control unit searches for a position where there is a change in the bit value in order from the upper bit of the subtraction result output from the input unit, which is the difference between the current input data and the previous input data. The filter arithmetic unit according to any one of claims 1 to 8, wherein the number of repetitive operations and the repetitive operation timing are determined based on the search result.
ことを特徴とする請求項1乃至8のいずれか1項記載のフィルタ演算器。 The control unit changes the bit value for all bits from the lower bit to the upper bit of the subtraction result output from the input unit, which is the difference between the current input data and the previous input data. searches the is located, the repetition number of operations and filter operation unit of any one of claims 1 to 8, characterized in that determining the repeat calculation timing based on the search results.
ことを特徴とする請求項1乃至8のいずれか1項記載のフィルタ演算器。 The control unit divides a subtraction result output from the input unit, which is a difference between the current input data and the previous input data, every two bits from the lower order, as a group per total of three-bit bit, for each group, determines whether all the bit values are either identical, and determines the repetition number of operations and the repetitive operation timing based on the determination result The filter arithmetic unit according to any one of claims 1 to 8.
垂直方向の入力データに対してフィルタ演算を行なう第1フィルタ演算器と、
水平方向の入力データに応じてフィルタ演算を行なう第2フィルタ演算器と、
前記第1及び第2フィルタ演算器の演算結果又は第1及び第2のフィルタ演算に入力する入力データに対して重み付けを行なう重み付け演算部とを備え、
前記第1及び第2フィルタ演算器は、入力データとフィルタ係数とをブースアルゴリズムを用いて積和演算するフィルタ演算器であって、
乗数と被乗数とを前記ブースアルゴリズムを用いて積和演算するフィルタ演算器であって、
前記乗数が入力される入力部と、
前記ブースアルゴリズムに従って前記入力部からの出力をデコードして1又は複数の符号データを求め、対応する前記被乗数と当該1又は複数の符号データのそれぞれとの積を求める繰り返し演算を行う2以上の演算部と、
前記入力部からの出力を選択して前記演算部のいずれかに入力する入力選択セレクタと、
前記入力部からの出力に基づき前記2以上の演算部のそれぞれにおける繰り返し演算回数及び繰り返し演算タイミングを決定し、この決定結果に基づき前記入力選択セレクタを制御する制御部とを有する動き補償処理装置。 A motion compensation processing device for generating a predicted image,
A first filter calculator for performing a filter operation on the input data in the vertical direction;
A second filter arithmetic unit that performs a filter operation according to horizontal input data;
A weighting operation unit that performs weighting on the operation results of the first and second filter operation units or input data input to the first and second filter operations,
The first and second filter arithmetic units are filter arithmetic units that perform a product-sum operation on input data and filter coefficients using a Booth algorithm,
A a multiplier and multiplicand filter calculator for calculating a product sum with the Booth algorithm,
An input unit for inputting the multiplier;
The sought by decoding one or more encoded data output from the input unit in accordance with Booth's algorithm, two or more operations to perform the iterative operations for obtaining the product of the respective corresponding said multiplicand and the one or more encoded data And
An input selection selector for selecting an output from the input unit and inputting the output to any of the arithmetic units;
A motion compensation processing apparatus comprising: a control unit that determines the number of repetition calculations and a repetition calculation timing in each of the two or more calculation units based on an output from the input unit, and controls the input selection selector based on the determination result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007079161A JP5086675B2 (en) | 2007-03-26 | 2007-03-26 | Filter calculator and motion compensation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007079161A JP5086675B2 (en) | 2007-03-26 | 2007-03-26 | Filter calculator and motion compensation device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008242594A JP2008242594A (en) | 2008-10-09 |
JP5086675B2 true JP5086675B2 (en) | 2012-11-28 |
Family
ID=39913903
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007079161A Expired - Fee Related JP5086675B2 (en) | 2007-03-26 | 2007-03-26 | Filter calculator and motion compensation device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5086675B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4988627B2 (en) * | 2008-03-05 | 2012-08-01 | ルネサスエレクトロニクス株式会社 | Filter calculator and motion compensation device |
JP5668391B2 (en) * | 2010-09-27 | 2015-02-12 | 富士通セミコンダクター株式会社 | Arithmetic circuit |
US12019700B2 (en) | 2018-05-22 | 2024-06-25 | Nec Corporation | Signal processing apparatus, method, program, and recording medium |
US11327718B2 (en) | 2020-03-19 | 2022-05-10 | Kabushiki Kaisha Toshiba | Arithmetic circuitry for power-efficient multiply-add operations |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62105287A (en) * | 1985-11-01 | 1987-05-15 | Fanuc Ltd | Signal processor |
JP2606326B2 (en) * | 1988-10-25 | 1997-04-30 | 日本電気株式会社 | Multiplier |
JPH04229323A (en) * | 1990-12-27 | 1992-08-18 | Sony Corp | Arithmetic circuit |
JPH0644291A (en) * | 1992-07-22 | 1994-02-18 | Kyocera Corp | Discrete cosine converter and information encoder |
JPH08152994A (en) * | 1994-11-29 | 1996-06-11 | Mitsubishi Electric Corp | Multiplier and digital filter |
JP4516051B2 (en) * | 2006-05-24 | 2010-08-04 | ルネサスエレクトロニクス株式会社 | Filter processing device, multiplier, and motion compensation processing device |
JP4963194B2 (en) * | 2006-06-01 | 2012-06-27 | ルネサスエレクトロニクス株式会社 | Filter processing device, multiplier, and motion compensation processing device |
JP4519807B2 (en) * | 2006-06-05 | 2010-08-04 | ルネサスエレクトロニクス株式会社 | Multiplier and filter processing apparatus |
JP4963220B2 (en) * | 2006-11-21 | 2012-06-27 | ルネサスエレクトロニクス株式会社 | Filter calculator and motion compensation device |
-
2007
- 2007-03-26 JP JP2007079161A patent/JP5086675B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008242594A (en) | 2008-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4881270B2 (en) | Filter calculator and motion compensation device | |
CN107241605B (en) | Video encoder and video encoding method | |
US8848799B2 (en) | Utilizing thresholds and early termination to achieve fast motion estimation in a video encoder | |
JP2015522988A (en) | Motion compensation and motion prediction using a continuous coordinate system | |
US5563813A (en) | Area/time-efficient motion estimation micro core | |
JP4988627B2 (en) | Filter calculator and motion compensation device | |
JP4963220B2 (en) | Filter calculator and motion compensation device | |
JP5086675B2 (en) | Filter calculator and motion compensation device | |
JP4188647B2 (en) | Method for executing motion prediction during video encoding, video encoding system, and video encoding apparatus | |
JP4516051B2 (en) | Filter processing device, multiplier, and motion compensation processing device | |
JP4519807B2 (en) | Multiplier and filter processing apparatus | |
JP4957780B2 (en) | Motion compensated predictive coding apparatus, motion compensated predictive coding method, and program | |
JP4963194B2 (en) | Filter processing device, multiplier, and motion compensation processing device | |
JP5195674B2 (en) | Image encoding device | |
JP2011186592A (en) | Filter operation unit, filter operation method, and motion compensation processing device | |
KR101345127B1 (en) | Butterfly processing method for processing complexity reduction by process skip and hevc system using the same | |
JP2011090362A (en) | Filter computing unit, filter operation method, and motion compensation processing device | |
JP5589628B2 (en) | Inner product calculation device and inner product calculation method | |
JP2008532335A (en) | Image interpolation method and pixel interpolation device | |
TWI402771B (en) | Fast inverse integer dct method on multi-core processor | |
Katayama et al. | A novel GAN-Based Intra Prediction Mode for HEVC | |
JP5353560B2 (en) | Image processing circuit and image encoding apparatus | |
KR101742765B1 (en) | Interpolator and interpolator pixel generation method | |
Li et al. | FPGA-based MSB-first bit-serial variable block size motion estimation processor | |
JP5287624B2 (en) | Image processing circuit and image encoding apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100215 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120607 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120619 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120815 |
|
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: 20120828 |
|
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: 20120907 |
|
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: 20150914 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 |