JPH1083387A - Integer converting operation method - Google Patents

Integer converting operation method

Info

Publication number
JPH1083387A
JPH1083387A JP8238828A JP23882896A JPH1083387A JP H1083387 A JPH1083387 A JP H1083387A JP 8238828 A JP8238828 A JP 8238828A JP 23882896 A JP23882896 A JP 23882896A JP H1083387 A JPH1083387 A JP H1083387A
Authority
JP
Japan
Prior art keywords
bits
integer
algorithm
shift operation
right shift
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8238828A
Other languages
Japanese (ja)
Inventor
Tomoko Ide
知子 井手
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP8238828A priority Critical patent/JPH1083387A/en
Publication of JPH1083387A publication Critical patent/JPH1083387A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PROBLEM TO BE SOLVED: To suppress deterioration in operation precision by performing right- shift operation with a specific-bit rounding function for an output result. SOLUTION: A maximum bit detecting circuit 101 detects the number Mx of bits that can represent a maximum value of x(i) as to each block and a prescaling part 102 multiplies real-number constants c(i) and x(i) to obtain p(i). A carry part 103 multiplies p(k) by 2 raised to (M+Cn-Mx-k)th power. At this time, (k) is an integer which is larger than 0 and less than (Mp+Cn-Mx). Then Mp is the number of bits to be operated into an integer and Cn is a constant. Then an integer converting operation part 104 rounds the output of the carry part 103 to obtain an integer, thereby finding an integer P(i) consisting of <=Mp bits. Further, an arithmetic part 105 adds respective P(i)'s and integrates them with the constant. Further, a carry part 106 carries the output of the arithmetic output by (Mp+Cm-Mx-k) bits through right-shift operation with a rounding function.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、IDCTにおける
整数化演算方法に関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to an integer conversion method in IDCT.

【0002】[0002]

【従来の技術】従来の8点IDCT演算方法(Y.Ar
ai他,Trans IEICE,E71,pp.10
95−1097,Nov‘88)を、図2(a)に示
す。
2. Description of the Related Art A conventional 8-point IDCT calculation method (Y.Ar
Ai et al., Trans IEICE, E71, pp. 10
95-1097, Nov'88) is shown in FIG.

【0003】プリスケーリング部201では、DCT係
数x(i)と定数c(i)の積算を行いp(i)を得
る。ここで、c(i)は、(数1)にて計算される実数
である。
The pre-scaling unit 201 integrates the DCT coefficient x (i) and a constant c (i) to obtain p (i). Here, c (i) is a real number calculated by (Equation 1).

【0004】[0004]

【数1】 (Equation 1)

【0005】演算部202の詳細を、図2(b)に示
す。これは、各p(i)を用いて積算5回、和算29回
の演算で8点の結果y(i)を得アルゴリズムである。
ここでの演算はすべて実数に対応しているが、出力y
(i)を整数とする場合、各y(i)を四捨五入整数化
する。
FIG. 2B shows the details of the arithmetic section 202. This is an algorithm that obtains eight results y (i) by performing an integration 5 times and a summation 29 times using each p (i).
Although all the operations here correspond to real numbers, the output y
When (i) is an integer, each y (i) is rounded to an integer.

【0006】次に、一般的な画像の復号化方法を、図2
(c)に示す。ハフマン復号部203において、入力ビ
ット列をハフマン復号してh(i)を得、逆量子化部2
04にて、h(i)とスケールファクタQ(i)の掛け
算によりDCT係数x(i)を得る。Q(i)が初期値
Q0(i)と変数αの積で表される場合、Q0(i)に
c(i)を掛けた値を予め用意しておけば、図2(a)
のプリスケーリング部をなくすことができる。これによ
り、8点IDCTの計算が積算5回、和算29回のみで
実行できる。
Next, a general image decoding method will be described with reference to FIG.
It is shown in (c). In the Huffman decoding unit 203, the input bit sequence is Huffman decoded to obtain h (i), and the inverse quantization unit 2
At 04, a DCT coefficient x (i) is obtained by multiplying h (i) by the scale factor Q (i). When Q (i) is represented by the product of the initial value Q0 (i) and the variable α, if a value obtained by multiplying Q0 (i) by c (i) is prepared in advance, FIG.
Can be eliminated. As a result, the calculation of the 8-point IDCT can be performed with only 5 integrations and 29 additions.

【0007】これを8×8点に拡張したものを、図2
(d)に示す。プリスケーリング部205において、x
(i,j)とc(i)×c(j)の積p(i,j)を求
め、各i行毎に演算部206に入力する。演算部206
では、図2(b)と同様の処理を行い、kを0から7ま
での整数とすると、入力p(k)はp(i,k)に対応
し、出力y(k)はpr(i,k)に対応する。pr
(i,j)は、j列毎に演算部207に入力される。演
算部207では、図2(b)と同様の処理を行い、入力
p(k)はpr(k,j)に対応し、出力y(k)はy
(k,j)に対応する。
FIG. 2 is a diagram showing an example in which this is expanded to 8 × 8 points.
(D). In the pre-scaling unit 205, x
The product p (i, j) of (i, j) and c (i) × c (j) is obtained and input to the arithmetic unit 206 for each i row. Arithmetic unit 206
Then, the same processing as in FIG. 2B is performed, and if k is an integer from 0 to 7, the input p (k) corresponds to p (i, k), and the output y (k) is pr (i , K). pr
(I, j) is input to the arithmetic unit 207 every j columns. The arithmetic unit 207 performs the same processing as in FIG. 2B, where the input p (k) corresponds to pr (k, j) and the output y (k) is y
(K, j).

【0008】図2(b)において、入力p(i)はMp
ビットの整数であり、演算結果を四捨五入整数化したも
のをy(i)とする場合、 DCT係数x(i,j)が
常にMビットで表せる数とすると、p(i,j)に2の
(Mp−M+2)乗を掛けた値を四捨五入整数化すれ
ば、Mpビットで表せる値になる。
In FIG. 2B, the input p (i) is Mp
If y (i) is an integer obtained by rounding the operation result to a rounded integer, assuming that the DCT coefficient x (i, j) is always a number that can be represented by M bits, p (i, j) is 2 If the value multiplied by (Mp−M + 2) is rounded to an integer, the value can be represented by Mp bits.

【0009】ここで、Mpが十分に大きければ、整数化
による演算精度の劣化は少ないが、Mpに制限がある場
合、IEEEのIDCT演算の精度基準(Std118
0−1990,Dec6‘90)を満足しなくなる場合
がある、という問題が生じる。
Here, if Mp is sufficiently large, there is little deterioration in the calculation accuracy due to the conversion to an integer, but if Mp is limited, the accuracy standard of the IDCT calculation of IEEE (Std118)
0-1990, Dec6'90) may not be satisfied.

【0010】[0010]

【発明が解決しようとする課題】本発明の課題は、演算
部への入力を整数化したことによるに演算精度の劣化を
抑制することにある。
SUMMARY OF THE INVENTION An object of the present invention is to suppress the deterioration of the calculation accuracy due to converting the input to the calculation unit into an integer.

【0011】[0011]

【課題を解決するための手段】上記課題を解決するため
に、1ブロックの中のDCT係数x(i、j)の最大値
を表せるビット数Mxを求め、 p(i、j)に2の
(MpーMx+2)乗を掛けた値を四捨五入整数化す
る。これにより、従来と比較すると、各ブロックにつき
(M−Mx)ビット分の精度を向上できる。
In order to solve the above-mentioned problem, the number of bits Mx that can represent the maximum value of the DCT coefficient x (i, j) in one block is obtained, and 2 of p (i, j) is obtained. The value multiplied by (Mp−Mx + 2) is rounded to an integer. As a result, the accuracy of (M-Mx) bits for each block can be improved as compared with the related art.

【0012】図1に、本発明の構成を示す。図1(a)
において、入力ブロックは要素x(0)〜x(n)で構
成されている。最大ビット検出部101において、各ブ
ロックにつきx(i)の最大値を表せるビット数Mxを
検出する。プリスケーリング部102において、実数定
数c(i)とx(i)の掛け算を行い、その結果をp
(i)とする。桁上げ部103において、p(i)と2
の(Mp+CnーMxーk)乗を掛ける。このとき、k
は0以上(Mp+Cn−Mx)以下の整数とする。Mp
は整数化するビット数、Cnはc(i)に2のCn乗を
掛けた値が最も1に近くなるような1以下の数を与える
定数である。整数化部104において、桁上げ部103
の出力を四捨五入整数化し、Mpビット以内の整数P
(i)を求める。演算部105において、各P(i)に
対し和算、及び、定数との積算を行う。桁下げ部106
において、演算部の出力を丸め機能付きの右シフト演算
により、(Mp+CnーMxーk)ビットの桁下げす
る。
FIG. 1 shows the configuration of the present invention. FIG. 1 (a)
In, the input block is composed of elements x (0) to x (n). The maximum bit detector 101 detects the number of bits Mx that can represent the maximum value of x (i) for each block. The prescaling unit 102 multiplies a real constant c (i) by x (i), and divides the result by p
(I). In the carry unit 103, p (i) and 2
Multiplied by (Mp + Cn-Mx-k). At this time, k
Is an integer of 0 or more and (Mp + Cn-Mx) or less. Mp
Is the number of bits to be converted into an integer, and Cn is a constant that gives a number less than or equal to 1 so that the value obtained by multiplying c (i) by 2 to the power of Cn is closest to 1. In the integer conversion unit 104, the carry unit 103
Is rounded to an integer, and an integer P within Mp bits
Find (i). The arithmetic unit 105 performs addition and integration of each P (i) with a constant. Carry-down unit 106
In (2), the output of the operation unit is lowered by (Mp + Cn-Mx-k) bits by a right shift operation with a rounding function.

【0013】図1(b)において、入力1ブロックの構
成、最大ビット検出部101の処理は図1(a)と同じ
である。プリスケーリング部107において、乗算はM
pビット同士の整数に限る。C(i)はc(i)に2の
(Mp+Cnーm)乗を掛けて整数化したものである。
ここで、mは1以上(Mp+Cn)以下の整数とする。
C(i)とx(i)の掛け算を行い、桁下げ部108に
おいて、丸め機能付きの右シフト演算により、(Mx+
kーm)ビットの桁下げする。ここで、kは0以上(M
p+CnーMx)以下の整数とする。桁下げ部108の
出力をP(i)とし、以下、演算部105、桁下げ部1
06において、図1(a)と同じ処理を行う。
In FIG. 1B, the configuration of one input block and the processing of the maximum bit detector 101 are the same as those in FIG. 1A. In the prescaling unit 107, the multiplication is M
Limited to p-bit integers. C (i) is an integer obtained by multiplying c (i) by 2 to the power of (Mp + Cnm).
Here, m is an integer of 1 or more and (Mp + Cn) or less.
The multiplication of C (i) and x (i) is performed, and the carry-down unit 108 performs (Mx +
km) carry down the bits. Here, k is 0 or more (M
(p + Cn-Mx). The output of the carry unit 108 is defined as P (i).
At 06, the same processing as in FIG.

【0014】[0014]

【発明実施の形態】次に、本発明を2次元IDCTに適
用し、演算部の入力を16にする例を2つ示す。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, two examples in which the present invention is applied to a two-dimensional IDCT and the number of inputs to the arithmetic unit is 16 will be described.

【0015】図3に、本発明の実施例を示す。入力ブロ
ックは64個の要素x(i,j)で構成され、最大ビッ
ト検出部301において、ブロック中の要素の最大値を
表せるビット数Mxを検出する。プリスケーリング部3
02において、x(i,j)とC(i,j)の乗算をす
る。ここで、C(i,j)は、c(i)とc(j)の積
に2の17乗を掛けた値を四捨五入整数化した定数であ
る。c(i),c(j)は(数1)にて得られる実数定
数である。桁下げ部303において、(Mx−1)ビッ
トの丸め機能付きの右シフト演算によりP(i,j)を
得、i行毎に演算部304に入力する。演算部304は
図2(b)と同じ構成である。ここで、図2(b)の入
力p(i)は16ビットの整数、演算結果を四捨五入整
数化したものをy(i)とする。kを0から7までの整
数とすると、図2(b)の入力p(k)は図3のP
(i,k)に対応し、図2(b)の出力y(k)は図3
のPr(i,k)に対応する。演算部304の出力Pr
(i,j)をj列毎に演算部305に入力する。演算部
305は、図2(b)と同じ構成であり、 入力p
(k)はPr(k,j)に対応し、出力y(k)はY
(k,j)に対応する。桁下げ部306において、Y
(i,j)に対し、(16+2ーMx)ビットの丸め機
能付きの右シフト演算を行う。
FIG. 3 shows an embodiment of the present invention. The input block is composed of 64 elements x (i, j), and the maximum bit detector 301 detects the number of bits Mx that can represent the maximum value of the elements in the block. Prescaling unit 3
In 02, x (i, j) is multiplied by C (i, j). Here, C (i, j) is a constant obtained by rounding a value obtained by multiplying the product of c (i) and c (j) by 2 to the 17th power. c (i) and c (j) are real constants obtained by (Equation 1). In the carry unit 303, P (i, j) is obtained by a right shift operation with a rounding function of (Mx-1) bits, and is input to the operation unit 304 for every i rows. The arithmetic unit 304 has the same configuration as that of FIG. Here, the input p (i) in FIG. 2B is a 16-bit integer, and y (i) is a result obtained by rounding the calculation result to an integer. Assuming that k is an integer from 0 to 7, the input p (k) in FIG.
(I, k), and the output y (k) of FIG.
(Pr (i, k)). Output Pr of arithmetic unit 304
(I, j) is input to the arithmetic unit 305 every j columns. The operation unit 305 has the same configuration as that of FIG.
(K) corresponds to Pr (k, j) and output y (k) is Y
(K, j). In the lowering section 306, Y
A right shift operation with a rounding function of (16 + 2−Mx) bits is performed on (i, j).

【0016】図4に、本発明の別の実施例を示す。入力
ブロックは64個の要素x(i,j)で構成され、最大
ビット検出部401において、ブロック中の要素の最大
値をあらわせるビット数Mxと、 i行中の最大ビット
値を表せるビット数Mr(i)を検出する。プリスケー
リング部402において、x(i,j)とC(i,j)
の乗算をする。ここで、C(i,j)は、c(i)とc
(j)の積に2の(17+Cr(i))乗を掛けた値を
四捨五入整数化した定数である。c(i),c(j)は
(数1)にて得られる実数定数であり、Cr(i)はi
が6のとき1、iが7のとき2、その他は0の整数であ
る。桁下げ部403において、(Mr(i)−1)ビッ
トの丸め機能付きの右シフト演算によりP(i,j)を
得、i行毎に演算部404に入力する。演算部404で
は、前の実施例と同様に図2(b)と同じ処理を行い、
kを0から7までの整数とすると、入力p(k)はP
(i,k)に対応し、出力y(k)はPr(i,k)に
対応する。桁下げ部405において、Pr(i,j)に
(Cr(i)+Mx−Mr(i))ビットの丸め機能付
きの右シフト演算を行いPr2(i,j)を得、j列毎
に演算部406に入力する。演算部406では、前の実
施例と同様に図2(b)と同じ処理を行い、kを0から
7までの整数とすると、 入力p(k)はPr2(k,
j)に対応し、出力y(k)はY(k,j)に対応す
る。桁下げ部407において、演算部406の出力結果
Y(i,j)に対し、(16+2ーMx)ビットの丸め
機能付きの右シフト演算を行う。
FIG. 4 shows another embodiment of the present invention. The input block is composed of 64 elements x (i, j), and the maximum bit detection unit 401 determines the number of bits Mx representing the maximum value of the element in the block, and the number of bits representing the maximum bit value in the i-th row. Mr (i) is detected. In the pre-scaling unit 402, x (i, j) and C (i, j)
Multiply by Where C (i, j) is c (i) and c (i, j)
This is a constant obtained by rounding a value obtained by multiplying the product of (j) by 2 to the power of (17 + Cr (i)). c (i) and c (j) are real constants obtained by (Equation 1), and Cr (i) is i
Is an integer of 1 when i is 6, 2 when i is 7, and 0 otherwise. In the carry unit 403, P (i, j) is obtained by a right shift operation with a rounding function of (Mr (i) -1) bits, and is input to the operation unit 404 for every i rows. The arithmetic unit 404 performs the same processing as in FIG.
If k is an integer from 0 to 7, the input p (k) is P
(I, k) and the output y (k) corresponds to Pr (i, k). The carry-down unit 405 performs a right shift operation with a rounding function of (Cr (i) + Mx-Mr (i)) bits on Pr (i, j) to obtain Pr2 (i, j), and performs an operation for every j columns Input to the unit 406. The arithmetic unit 406 performs the same processing as in FIG. 2B as in the previous embodiment, and if k is an integer from 0 to 7, the input p (k) is Pr2 (k,
j), and the output y (k) corresponds to Y (k, j). The carry unit 407 performs a right shift operation with a rounding function of (16 + 2−Mx) bits on the output result Y (i, j) of the operation unit 406.

【0017】[0017]

【発明の効果】本発明によれば、演算部が専用LSI化
され、変更が出来ない場合でも、前後の処理により平均
的な演算精度を向上できる。
According to the present invention, even when the operation unit is a dedicated LSI and cannot be changed, the average operation accuracy can be improved by the preceding and following processes.

【0018】また、演算部への入力ビット数を削減でき
るので、演算部を専用LSI化するときの回路規模を縮
小できる。
Further, since the number of input bits to the operation unit can be reduced, the circuit scale when the operation unit is made into a dedicated LSI can be reduced.

【0019】さらに、本発明を2次元IDCTに適用す
ると、演算部への入力が16ビットでもIEEEの精度
基準を満足する。これにより、演算部が16ビットの演
算器で構成できれば、16ビットを4並列に処理できる
特殊命令を備えたプロセッサによるIDCT演算が可能
となり、プロセッサによる画像複合化処理をさらに高速
化できる。
Further, when the present invention is applied to a two-dimensional IDCT, even if the input to the arithmetic unit is 16 bits, the accuracy criterion of IEEE is satisfied. Thus, if the operation unit can be configured by a 16-bit operation unit, the IDCT operation can be performed by a processor having a special instruction capable of processing 16 bits in four parallel, and the image decoding processing by the processor can be further accelerated.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の基本構成である整数化演算法示す図で
ある。
FIG. 1 is a diagram illustrating an integer operation method which is a basic configuration of the present invention.

【図2】従来の技術を示す図である。FIG. 2 is a diagram showing a conventional technique.

【図3】本発明の実施例を示す図である。FIG. 3 is a diagram showing an embodiment of the present invention.

【図4】本発明の他の実施例を示す図である。FIG. 4 is a diagram showing another embodiment of the present invention.

【符号の説明】[Explanation of symbols]

101,301,401・・・最大ビット検出部、10
2,107,201,205,302,402・・・プ
リスケーリング部、103・・・桁上げ部、104・・
・整数化部、105,202,206,207,30
4,305,404,406・・・演算部、106,1
08,303,306,403,405,407・・・
桁下げ部、203・・・ハフマン復号部、204・・・
逆量子化部。
101, 301, 401... Maximum bit detector, 10
2, 107, 201, 205, 302, 402 ... pre-scaling unit, 103 ... carry unit, 104 ...
-Integer unit, 105, 202, 206, 207, 30
4, 305, 404, 406... Arithmetic unit, 106, 1
08, 303, 306, 403, 405, 407 ...
Carry-over unit, 203 ... Huffman decoding unit, 204 ...
Inverse quantization unit.

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】1つのブロックを構成する要素x(i)が
整数であり、各x(i)と実数定数c(i)との乗算結
果p(i)を用いた線形演算を行い、N個の結果を出力
する演算アルゴリズムにおいて、ブロック内の要素x
(i) の最大値を表せるビット数Mxを求め、p
(i)を整数化するときのビット数をMp、c(i)の
最大値に2のCn乗を掛けた値が最も1に近い1以下の
値を与える整数をCn、kを0以上( Mp+CnーM
x)以下の整数とし、2の(Mp+CnーMxーk)乗
とp(i)を掛けた後に四捨五入整数化した値をP
(i)とし、P(i)を用いた線形演算からなるアルゴ
リズムを実行し、N個の出力結果に対し(Mp+Cnー
Mxーk)ビットの丸め機能付きの右シフト演算をする
ことを特徴とした整数化演算法。
An element x (i) constituting one block is an integer, and a linear operation is performed using a multiplication result p (i) of each x (i) and a real number constant c (i), and N In the operation algorithm that outputs the results, the element x in the block
(I) Find the number of bits Mx that can represent the maximum value of
The number of bits when (i) is converted to an integer is Mp, the maximum value of c (i) multiplied by 2 to the power of Cn is Cn, and an integer that gives a value of 1 or less, which is closest to 1, is 0 or more ( Mp + Cn-M
x) An integer less than or equal to 2 (Mp + Cn-Mx-k) multiplied by p (i) and then rounded to an integer,
(I), an algorithm consisting of a linear operation using P (i) is executed, and a right shift operation with a rounding function of (Mp + Cn-Mx-k) bits is performed on N output results. Integer arithmetic method.
【請求項2】請求項1において、x(i)とc(i)の
乗算をMpビットの整数演算で行う場合、mを1以上
(MpーCn)以下の整数とし、c(i)に2の(Mp
+Cnーm)乗を掛けた値を四捨五入により(Mpー
m)ビットに整数化したものをC(i)とし、C(i)
とx(i)を掛けた後に(Mx+k−m)ビットの丸め
機能付きの右シフト演算をし、その後、上記第1項と同
様の演算アルゴリズムを実行し、N個の出力結果に対し
(Mp+CnーMxーk)ビットの丸め機能付きの右シ
フト演算をすることを特徴とした整数化演算法。
2. In claim 1, when multiplying x (i) and c (i) by an Mp-bit integer operation, m is an integer of 1 or more and (Mp-Cn) or less, and c (i) is 2 (Mp
+ (Cn-m) raised to the power of (Mpm) bits and converted to an integer by rounding to C (i), and C (i)
Multiplied by x (i), a right shift operation with a rounding function of (Mx + km) bits is performed, and then the same operation algorithm as in the first term is executed, and (Mp + Cn) is performed on N output results. -Mx-k) An integer operation method characterized by performing a right shift operation with a bit rounding function.
【請求項3】請求項1において、1ブロックがN×Nの
行列で構成され、各要素をx(i、j)とし、各要素に
c(i、j)を掛けた結果をp(i、j)とし、i行ご
とに線形演算からなるアルゴリズムを実行し、その結果
に対し、列方向に同じアルゴリズムを実行するN×N点
IDCTアルゴリズムにおいて、ブロック内の要素x
(i,j)の最大値を求め、その値を表現し得るビット
数Mxを求め、 p(i、j)を整数化するときのビッ
ト数をMp、c(i、j)の最大値に2のCn乗を掛け
た値が最も1に近い1以下の値を与える整数をCn、k
を0以上( Mp+CnーMx)以下の整数とし、2の
(Mp+CnーMxーk)乗とp(i、j)を掛けた値
を四捨五入整数化し、行方向のアルゴリズムを実行した
後、mrを0以上の整数とし、mrビットの丸め機能付
きの右シフト演算をし、その後列方向のアルゴリズムを
実行し、N×N個の出力結果に対し、(Mp+CnーM
xーkーmr)ビットの丸め機能付きの右シフト演算を
することを特徴とした整数化演算法。
3. A method according to claim 1, wherein one block is composed of an N × N matrix, each element is x (i, j), and the result of multiplying each element by c (i, j) is p (i, j). , J), an algorithm consisting of a linear operation is executed for every i rows, and the result is subjected to the same algorithm in the column direction.
The maximum value of (i, j) is obtained, the number of bits Mx capable of expressing the value is obtained, and the number of bits when p (i, j) is converted to an integer is set to the maximum value of Mp, c (i, j). Cn, k are integers that give a value of 1 or less, the value obtained by multiplying 2 to the power of Cn is closest to 1
Is an integer not less than 0 and not more than (Mp + Cn-Mx), a value obtained by multiplying 2 to the power of (Mp + Cn-Mx-k) and p (i, j) is rounded to an integer, and after executing the row direction algorithm, mr is An integer greater than or equal to 0, a right shift operation with a rounding function of mr bits is performed, and then an algorithm in the column direction is executed. For the N × N output results, (Mp + Cn−M
(x-k-mr) Integer conversion method characterized by performing a right shift operation with a function of rounding bits.
【請求項4】請求項1〜3において、x(i、j)とc
(i、j)の乗算をMp整数演算で行う場合、c(i、
j)に2の(Mp+Cnーm)乗を掛けた値を(Mpー
m)ビットに整数化したものをC(i、j)とし、 C
(i、j)とx(i、j)を掛けた後に(Mx+k−
m)ビットの丸め機能付きの右シフト演算をし、行方向
のアルゴリズムを実行した後、 mrビットの丸め機能
付きの右シフト演算をし、その後列方向のアルゴリズム
を実行し、N×N個の出力結果に対し、(Mp+Cnー
Mxーkーmr)ビットの丸め機能付きの右シフト演算
をすることを特徴とした整数化演算法。
4. The method according to claim 1, wherein x (i, j) and c
When the multiplication of (i, j) is performed by Mp integer operation, c (i,
j) multiplied by 2 to the power of (Mp + Cnm) is converted to an integer of (Mpm) bits to obtain C (i, j).
After multiplying (i, j) and x (i, j), (Mx + k−
m) Perform a right shift operation with a rounding function of bits and execute an algorithm in the row direction, then perform a right shift operation with a round function of mr bits, and then execute an algorithm in the column direction to obtain N × N An integer operation method characterized by performing a right shift operation with a rounding function of (Mp + Cn-Mx-k-mr) bits on an output result.
【請求項5】請求項1〜4において、行方向アルゴリズ
ムを実行した結果に対し、(Mp+CnーMxーkーm
r)ビットの右シフト演算をし、その後。列方向のアル
ゴリズムを実行した結果に対し、mrビットの右シフト
演算することを特徴とした整数化演算法。
5. The method according to claim 1, wherein (Mp + Cn-Mx-km)
r) Perform a right shift operation on bits, and then. An integer operation method characterized by performing a right shift operation of mr bits on a result of executing an algorithm in a column direction.
【請求項6】請求項1〜5において、入力x(i、j)
の各i行毎に要素の最大値を求め、その値を表現し得る
ビット数Mr(i)を求め、 k(i)を0以上( Mp
+CnーMr(i))以下の整数とし、i行毎に2の
(Mp+CnーMr(i)ーk(i))乗とp(i、
j)を掛けたものを四捨五入整数化し、行方向アルゴリ
ズムを実行した結果に対し、i行毎に(Mp+CnーM
r(i)ーk(i)ーmr)ビットの丸め機能付きの右
シフト演算を実行し、その後、列方向のアルゴリズムを
実行した結果に対し、mrビットの丸め機能付きの右シ
フト演算することを特徴とした整数化演算法。
6. The method according to claim 1, wherein the input x (i, j)
, The maximum value of the element is obtained for each i row, the number of bits Mr (i) capable of expressing the value is obtained, and k (i) is set to 0 or more (Mp
+ Cn-Mr (i)) and an integer less than or equal to 2 (Mp + Cn-Mr (i) -k (i)) and p (i,
j) is rounded to an integer, and the result of executing the row direction algorithm is calculated as (Mp + Cn-M) for every i rows.
r (i) -k (i) -mr) performing a right shift operation with a rounding function of bits, and then performing a right shift operation with a rounding function of mr bits on the result of executing an algorithm in a column direction. An integer operation method characterized by the following.
【請求項7】請求項1〜6において、C(i、j)とx
(i、j)を掛けた後に、行毎に(Mr(i)+k
(i)−m )ビットの丸め機能付きの右シフト演算を
し、行方向のアルゴリズムを実行した結果に対し、i行
毎に(Mp+CnーMr(i)ーk(i)ーmr)ビッ
トの丸め機能付きの右シフト演算を実行し、その後、列
方向のアルゴリズムを実行した結果に対し、mrビット
の丸め機能付きの右シフト演算することを特徴とした整
数化演算法。
7. The method according to claim 1, wherein C (i, j) and x
After multiplying by (i, j), (Mr (i) + k
(I) -m) The result of performing a right shift operation with a rounding function of bits and executing an algorithm in the row direction is compared with (Mp + Cn-Mr (i) -k (i) -mr) bits for every i rows. An integer conversion method comprising performing a right shift operation with a rounding function, and then performing a right shift operation with a rounding function of mr bits on a result of executing an algorithm in a column direction.
【請求項8】請求項1〜6において、c(i,j)の各
i行要素中の最大値に2のCr(i)乗を掛けた値が、
c(i,j)の行列全体の最大値以下である場合、i行
毎に2の(Mp+Cn+Cr(i)ーMr(i)ーk
(i))乗とp(i、j)を掛けたものを四捨五入整数
化し、行方向アルゴリズムを実行した結果に対し、行毎
に(Mp+Cn+Cr(i)ーMr(i)ーk(i)ー
mr)ビットの丸め機能付きの右シフト演算を実行し、
その後、列方向のアルゴリズムを実行した結果に対し、
mrビットの丸め機能付きの右シフト演算することを特
徴とした整数化演算法。
8. The method according to claim 1, wherein a value obtained by multiplying the maximum value of c (i, j) in each i-th row element by 2 to the power of Cr (i) is:
If it is less than or equal to the maximum value of the entire matrix of c (i, j), 2 (Mp + Cn + Cr (i) -Mr (i) -k
(I)) The result of multiplying the power to p (i, j) is rounded to an integer, and the result of executing the row direction algorithm is calculated as (Mp + Cn + Cr (i) -Mr (i) -k (i)- mr) perform a right shift operation with bit rounding function,
Then, the result of executing the column-wise algorithm,
An integer operation method characterized by performing a right shift operation with an mr bit rounding function.
【請求項9】請求項1〜8において、c(i、j)に2
の(Mp+Cn+Cr(i)ーm)乗を掛けた値を(M
pーm)ビットに整数化したものをC(i、j)とし、
C(i、j)とx(i、j)を掛けた後に、行毎に
(Mr(i)+k(i)−m)ビットの丸め機能付きの
右シフト演算をし、行方向のアルゴリズムを実行した結
果に対し、行毎に(Mp+Cn+Cr(i)ーMr
(i)ーk(i)ーmr)ビットの丸め機能付きの右シ
フト演算を実行し、その後、列方向のアルゴリズムを実
行した結果に対し、mrビットの丸め機能付きの右シフ
ト演算することを特徴とした整数化演算法。
9. The method according to claim 1, wherein c (i, j) is 2
Multiplied by (Mp + Cn + Cr (i) -m) to the value (M
C (i, j) is an integer converted to (pm) bits.
After multiplying C (i, j) and x (i, j), a right shift operation with a rounding function of (Mr (i) + k (i) -m) bits is performed for each row, and an algorithm in the row direction is obtained. For the execution result, (Mp + Cn + Cr (i) -Mr
(I) -k (i) -mr) performing a right shift operation with a rounding function of bits and then performing a right shift operation with a rounding function of mr bits on the result of executing the algorithm in the column direction. Integerization algorithm featured.
【請求項10】請求項1〜9において、 行方向アルゴ
リズムを実行した結果に対し、行毎に(Mp+Cn+C
r(i)+MxーMr(i)ーk(i)ーmr)ビット
の丸め機能付きの右シフト演算を実行し、その後、列方
向のアルゴリズムを実行した結果に対し、(mrーM
x)ビットの丸め機能付きの右シフト演算することを特
徴とした整数化演算法。
10. The method according to claim 1, wherein (Mp + Cn + C
r (i) + Mx-Mr (i) -k (i) -mr) performs a right-shift operation with a rounding function of bits, and then executes the algorithm in the column direction to obtain the result of (mr-M
x) An integer operation method characterized by performing a right shift operation with a bit rounding function.
【請求項11】請求項1〜10において、列方向のアル
ゴリズムを実行する前の値をPr(i,j)とし、各P
r(i,j)を桁下げしてMp2ビット以内の数にした
後、列方向のアルゴリズムを実行する場合、Pr(i,
j)の各j列中の最大ビットMc(j)を求め、Mc
(j)がMp2以上のとき、Pr(i,j)を(Mc
(j)ーMp2)ビットの丸め機能付きの右シフト演算
を実行し、その後、列方向のアルゴリズムを実行した結
果に対し、( mr−Mc(j)+Mp2ーMx)ビッ
トの丸め機能付きの右シフト演算することを特徴とした
整数化演算法。
11. A method according to claim 1, wherein a value before execution of the algorithm in the column direction is Pr (i, j),
After executing r (i, j) down to a number within Mp2 bits and then executing the column direction algorithm, Pr (i, j)
j), the maximum bit Mc (j) in each j column is determined, and Mc
When (j) is equal to or more than Mp2, Pr (i, j) is changed to (Mc
(J) -Mp2) A right shift operation with a rounding function of bits is performed, and then, a result of executing an algorithm in a column direction is added to a right-side with a rounding function of (mr-Mc (j) + Mp2-Mx) bits. An integer operation method characterized by performing a shift operation.
JP8238828A 1996-09-10 1996-09-10 Integer converting operation method Pending JPH1083387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8238828A JPH1083387A (en) 1996-09-10 1996-09-10 Integer converting operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8238828A JPH1083387A (en) 1996-09-10 1996-09-10 Integer converting operation method

Publications (1)

Publication Number Publication Date
JPH1083387A true JPH1083387A (en) 1998-03-31

Family

ID=17035884

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8238828A Pending JPH1083387A (en) 1996-09-10 1996-09-10 Integer converting operation method

Country Status (1)

Country Link
JP (1) JPH1083387A (en)

Similar Documents

Publication Publication Date Title
US6369725B1 (en) Method for binary to decimal conversion
EP0736205B1 (en) Method and apparatus for performing a fast hadamard transform
KR19980701802A (en) Log / Inverse Log Converter, Calculation Device and Log Value Generation Method
JPH0652214A (en) Reverse discrete cosine conversion arithmetic unit
US6223197B1 (en) Constant multiplier, method and device for automatically providing constant multiplier and storage medium storing constant multiplier automatic providing program
US6065031A (en) Log converter utilizing offset and method of use thereof
CN106682258B (en) Multi-operand addition optimization method and system in high-level comprehensive tool
Liu et al. A high-throughput subspace pursuit processor for ECG recovery in compressed sensing using square-root-free MGS QR decomposition
JP2001222410A (en) Divider
JP3129392B2 (en) Two-dimensional IDCT circuit
JPH09325955A (en) Square root arithmetic circuit for sum of squares
JPH1083387A (en) Integer converting operation method
JP3660075B2 (en) Dividing device
JP3415569B2 (en) Decimal data division method and program recording medium therefor
JPH1091614A (en) Method for converting idct into integer
US5886911A (en) Fast calculation method and its hardware apparatus using a linear interpolation operation
JP4405452B2 (en) Inverse conversion circuit
JP2645422B2 (en) Floating point processor
JP3252954B2 (en) Multiplication method and multiplication circuit
JPH0981541A (en) Accumulator
Teja et al. Implementation of vedic multiplier using modified architecture by routing rearrangement for high-optimization
JP2777265B2 (en) High radix square root arithmetic unit
JP3142356B2 (en) Quantizer and image data quantizer
JP2753922B2 (en) Fixed-point division method
EP4004710A1 (en) Matrix multiplication in hardware using modular math