JPH08101919A - Numerical converter and device for turning coordinate value to integer - Google Patents
Numerical converter and device for turning coordinate value to integerInfo
- Publication number
- JPH08101919A JPH08101919A JP6237468A JP23746894A JPH08101919A JP H08101919 A JPH08101919 A JP H08101919A JP 6237468 A JP6237468 A JP 6237468A JP 23746894 A JP23746894 A JP 23746894A JP H08101919 A JPH08101919 A JP H08101919A
- Authority
- JP
- Japan
- Prior art keywords
- floating point
- mantissa
- integer
- maximum exponent
- exponent
- 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.)
- Granted
Links
Landscapes
- Image Generation (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、3次元コンピュータ・
グラフィックス・システムで表現力を飛躍的に向上させ
る手法であるテクスチャ・マッピング処理を行う数値変
換装置および座標値整数化装置に関する。The present invention relates to a three-dimensional computer
The present invention relates to a numerical conversion device and a coordinate value integer conversion device that perform texture mapping processing, which is a method of dramatically improving the expressiveness of a graphics system.
【0002】[0002]
【従来の技術】テクスチャ・マッピングは、コンピュー
タ・グラフィックスで三角形や四角形を描画する際に、
その表面にあらかじめ用意しておいたイメージデータを
張り付ける手法で、リアリティの高い画像を生成するも
のである。図7に例としてテクスチャ・マッピングを施
した四角形が回転しているようすを示す。2. Description of the Related Art Texture mapping is used to draw triangles and squares in computer graphics.
The image data prepared in advance is attached to the surface of the image to generate a highly realistic image. As an example, FIG. 7 shows that a quadrangle subjected to texture mapping is rotated.
【0003】一般的に、テクスチャ・マッピングは、描
画時には三角形単位に行なわれ、以下のようにして処理
する。 1)三角形の各頂点に対して、テクスチャ座標(S,
T,Q)を与える。 2)三角形の内部の点のテクスチャ座標(s,t,q)
を頂点のテクスチャ座標から線形補間して求める。 3)イメージデータ上の位置(u,v)をu=s/q,
v=t/qの除算より求める。Generally, texture mapping is performed in units of triangles at the time of drawing, and is processed as follows. 1) For each vertex of the triangle, texture coordinates (S,
T, Q) is given. 2) Texture coordinates (s, t, q) of points inside the triangle
Is obtained by linear interpolation from the texture coordinates of the vertices. 3) The position (u, v) on the image data is u = s / q,
Obtained by dividing v = t / q.
【0004】一般的なコンピュータ・グラフィックス・
システムは、図8に示すようなジオメトリ部100とレ
ンダリング部101の2つから構成されるものが多い。
ジオメトリ部100では、座標変換、ライティング計
算、クリッピング処理等の幾何学的計算が行なわれ、レ
ンダリング部101ではラインの発生や三角形の塗りつ
ぶし等の処理が行なわれる。ジオメトリ部100では浮
動小数点計算を行ない、その結果を整数に変換してレン
ダリング部101へ転送し、レンダリング部101では
整数計算を行なうことが一般的である。[0004] General computer graphics
Many systems are composed of two parts, a geometry part 100 and a rendering part 101 as shown in FIG.
The geometry unit 100 performs geometrical calculations such as coordinate conversion, lighting calculation, and clipping process, and the rendering unit 101 performs processes such as line generation and triangle filling. It is general that the geometry unit 100 performs floating point calculation, converts the result into an integer and transfers the result to the rendering unit 101, and the rendering unit 101 performs integer calculation.
【0005】このとき、転送されるデータとしては、X
YZ座標、カラー(R,G,B)、テクスチャ座標
(S,T,Q)等がある。テクスチャ座標以外のデー
タ、たとえばカラーは8ビットの整数で表現して、0≦
R,G,B≦255の範囲にすることが多く、他のデー
タも同様にnビットの整数に変換できる。At this time, the data to be transferred is X
There are YZ coordinates, colors (R, G, B), texture coordinates (S, T, Q) and the like. Data other than texture coordinates, such as color, is represented by an 8-bit integer, and 0 ≦
In many cases, R, G, and B ≦ 255 are set, and other data can be similarly converted into an n-bit integer.
【0006】しかし、テクスチャ座標は−∞≦S,T,
Q≦∞の範囲を表現しなければならず、有限のビット長
の整数では表現できない。However, the texture coordinates are -∞≤S, T,
The range of Q ≦ ∞ must be expressed, and cannot be expressed by an integer with a finite bit length.
【0007】このため、図9(a)に示すように、ジオ
メトリ部100aではテクスチャ座標を浮動小数点数の
まま転送し、レンダリング部101aにおいてテクスチ
ャ・マヅピソグの計算を浮動小数点計算によって行なう
方法があるが、浮動小数点演算器は整数演算器に比べて
回路規模が大きく、また回路が複雑であるため、小規模
で高速なシステムを構成するのが困難であるという問題
があった。また、図9(b)に示すように、ジオメトリ
部100bでテクスチャ座標の範囲に制限を加えて有限
のビット長の整数にしてレンダリング部101bに転送
する方法もあるが、張り付けるイメージデータの大きさ
にも制限を与えるとともに、テクスチャ座標の値が小さ
い場合には有効なビット長も小さくなるので精度も悪く
なるという問題があった。For this reason, as shown in FIG. 9A, there is a method in which the geometry part 100a transfers the texture coordinates as floating point numbers, and the rendering part 101a performs the calculation of the texture Madupisog by the floating point calculation. Since the floating point arithmetic unit has a larger circuit scale than the integer arithmetic unit and the circuit is complicated, there is a problem that it is difficult to configure a small-scale and high-speed system. As shown in FIG. 9B, there is also a method of limiting the texture coordinate range in the geometry section 100b and converting the texture coordinate range into an integer with a finite bit length, and transferring the integer to the rendering section 101b. There is also a problem in that the accuracy is deteriorated because the effective bit length also becomes small when the texture coordinate value is small, in addition to the limitation.
【0008】[0008]
【発明が解決しようとする課題】すなわち、テクスチャ
・マッピングを行なう際、ジオメトリ部100で計算し
たテクスチャ座標が有限のビット長の整数で表現できな
いため、テクスチャ座標を浮動小数点数のまま転送し、
レンダリング部101において浮動小数点計算を行なう
方法があるが、回路規模が大きくなり、また回路が複雑
であるため、小規模で高速なシステムを構成するのが困
難である。That is, when texture mapping is performed, the texture coordinates calculated by the geometry unit 100 cannot be expressed by an integer having a finite bit length. Therefore, the texture coordinates are transferred as floating point numbers,
Although there is a method of performing floating point calculation in the rendering unit 101, it is difficult to configure a small-scale and high-speed system because the circuit scale is large and the circuit is complicated.
【0009】また、テクスチャ座標の範囲に制限を加え
て有限のビット長の整数にして転送する方法もあるが、
張り付けるイメージデータの大きさにも制限を与えると
ともに、精度も悪化する。There is also a method in which the range of texture coordinates is limited and an integer having a finite bit length is transferred.
The size of the image data to be pasted is also limited, and the accuracy also deteriorates.
【0010】本発明は、上記事情に鑑みてなされたもの
であり、小規模でありながらテクスチャ座標に制限を加
えることなく、また精度も悪化させることのない数値変
換装置を提供することを目的とする。The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a numerical conversion device that is small in scale, does not impose restrictions on texture coordinates, and does not deteriorate accuracy. To do.
【0011】[0011]
【課題を解決するための手段】本発明の数値変換装置
は、浮動小数点数を整数に変換する数値変換装置におい
て、複数の浮動小数点数を保持する浮動小数点保持手段
としての浮動小数点レジスタ10a乃至10iと、浮動
小数点レジスタ10a乃至10i内の浮動小数点数から
最大の指数を検出する最大指数検出手段としての最大指
数検出装置11と、最大指数検出装置11が検出した最
大の指数と浮動小数点レジスタ10a乃至10i内の各
々の浮動小数点数の指数との差分を求めて差分をシフト
量として仮数をシフトする仮数シフト手段としての仮数
シフト装置12a乃至12iと、仮数シフト装置12a
乃至12iでシフトされた仮数を符号化する符号化手段
としての符号化装置13a乃至13iとを備えて構成さ
れる。According to the numerical conversion device of the present invention, in a numerical conversion device for converting a floating point number into an integer, floating point registers 10a to 10i as floating point holding means for holding a plurality of floating point numbers. And a maximum exponent detecting device 11 as a maximum exponent detecting means for detecting the maximum exponent from the floating point numbers in the floating point registers 10a to 10i, and the maximum exponent detected by the maximum exponent detecting device 11 and the floating point registers 10a to 10a. Mantissa shift devices 12a to 12i as mantissa shift means for calculating the difference between the exponent of each floating point number in 10i and shifting the mantissa using the difference as the shift amount, and the mantissa shift device 12a.
To 12i to 12i, encoding devices 13a to 13i are provided as encoding means for encoding the mantissas.
【0012】[0012]
【作用】本発明の数値変換装置では、最大指数検出装置
11で検出した最大の指数を基準値とし、仮数シフト装
置12a乃至12iで算出された前記差分を相対値とし
て、符号化装置13a乃至13iが浮動小数点レジスタ
10a乃至10iに保持されている各々の浮動小数点数
の相対的な大きさを保持したまま整数に変換すること
で、テクスチャ座標に制限を加えることなく、また精度
も悪化させることもなく、小規模に構成することを可能
とする。In the numerical converter of the present invention, the maximum exponent detected by the maximum exponent detector 11 is used as a reference value, and the differences calculated by the mantissa shifters 12a to 12i are used as relative values, and the encoders 13a to 13i are used. By converting each floating point number held in the floating point registers 10a to 10i into an integer while holding the relative size of each floating point number, there is no restriction on the texture coordinates and the accuracy is also deteriorated. Without, it is possible to configure on a small scale.
【0013】[0013]
【実施例】実施例として、IEEE32ビット浮動小数
点で与えられたテクスチャ座標を32ビットの整数に変
換する場合を以下に述べる。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS As an embodiment, the case of converting texture coordinates given by IEEE 32-bit floating point into a 32-bit integer will be described below.
【0014】本実施例の数値変換装置は、図1に示すよ
うに、浮動小数点保持手段としての浮動小数点レジスタ
10a乃至10i、最大指数検出手段としての最大指数
検出装置11、仮数シフト手段としての仮数シフト装置
12a乃至12i、符号化手段としての符号化装置13
a乃至13iより構成され、浮動小数点レジスタ10a
乃至10iに保持される浮動小数点数を、最大指数検出
装置11において前記の浮動小数点レジスタ10a乃至
10iに保持される浮動小数点数の最大指数を検出し、
仮数シフト装置12a乃至12iにおいて前記の最大指
数と各々の指数との差分で仮数をシフトし、符号化装置
13a乃至13iにおいて符号化を行ない、相対的大き
さを保持する整数に変換する装置である。As shown in FIG. 1, the numerical conversion apparatus of this embodiment has floating point registers 10a to 10i as floating point holding means, maximum exponent detecting apparatus 11 as maximum exponent detecting means, and mantissa as mantissa shift means. Shift devices 12a to 12i, encoding device 13 as encoding means
a to 13i, and a floating point register 10a
To 10i, the maximum exponent detection device 11 detects the maximum exponent of the floating point numbers held in the floating point registers 10a to 10i,
In the mantissa shift devices 12a to 12i, the mantissa is shifted according to the difference between the maximum exponent and each exponent, the encoding devices 13a to 13i perform encoding, and convert the integers to hold the relative size. .
【0015】ここで、浮動小数点数で与えられたテクス
チャ座標の相対的大きさを保持する整数に変換するのは
以下の理由による。Here, the reason why the relative size of the texture coordinates given by the floating point number is converted into an integer holding the texture coordinate is as follows.
【0016】すなわち、三角形の3頂点のテクスチャ座
標を(S1,T1,Q1)、(S2,T2,Q2)、
(S3,T3,Q3)、この頂点データを線形補間して
得られる三角形内部のある点のテクスチャ座標を(s,
t,q)とすると、3頂点のテクスチャ座標を各々α倍
して(αS1,αT1,αQ1)、(αS2,αT2,
αQ2)、(αS3,αT3,αQ3)とした場合の前
記と同一点の三角形内部の点のテクスチャ座標もα倍さ
れて(αs,αt,αq)となる。That is, the texture coordinates of the three vertices of the triangle are (S1, T1, Q1), (S2, T2, Q2),
(S3, T3, Q3), the texture coordinates of a point inside the triangle obtained by linearly interpolating this vertex data are (s,
t, q), the texture coordinates of the three vertices are multiplied by α (αS1, αT1, αQ1), and (αS2, αT2,
When αQ2) and (αS3, αT3, αQ3) are set, the texture coordinates of a point inside the same triangle as described above are also multiplied by α to become (αs, αt, αq).
【0017】一方、求めるイメージデータ上の位置
(u,v)は、u=s/q,v=t/qであるから、頂
点のテクスチャ座標をα倍した場合も、u=αs/αq
=s/q,v=αt/αq=t/qとなり結果的に同じ
位置が求められる。このことは、頂点に与えるテクスチ
ャ座標はその相対的な大きさが保持されていれば良いこ
とを示している。On the other hand, since the position (u, v) on the image data to be obtained is u = s / q and v = t / q, u = αs / αq even when the texture coordinate of the vertex is multiplied by α.
= S / q, v = αt / αq = t / q, and consequently the same position is obtained. This indicates that the texture coordinates given to the vertices have only to retain their relative sizes.
【0018】浮動小数点レジスタ10a乃至10iは、
浮動小数点数を保持する32ビットの記憶装置で、図2
に示すように、格納されているデータは、1ビットの符
号SIGN(i)、8ビットの指数EXP(i)、23
ビットの仮数MAN(i)より構成される。The floating point registers 10a-10i are
A 32-bit storage device that holds floating point numbers
As shown in, the stored data is 1-bit code SIGN (i), 8-bit exponent EXP (i), 23
It consists of a mantissa MAN (i) of bits.
【0019】最大指数検出装置11は、9つの浮動小数
点レジスタ10a乃至10iの浮動小数点数のうち最大
の指数を検出する装置で、図3(a)または(b)に示
すように8つの最大値選択装置30a乃至30hで構成
される。最大値選択装置30a乃至30hは、2つの入
力のうち大きい方を選択する装置で、これをトーナメン
ト方式に8つ接続することにより、最大指数MAXEX
Pを検出する。The maximum exponent detection device 11 is a device for detecting the maximum exponent of the floating-point numbers of the nine floating-point registers 10a to 10i. As shown in FIG. 3A or 3B, the maximum exponent detection device 11 has eight maximum values. It is composed of the selection devices 30a to 30h. The maximum value selection devices 30a to 30h are devices that select the larger one of the two inputs, and by connecting eight of them to the tournament method, the maximum index MAXEX
Detect P.
【0020】仮数シフト装置12a乃至12iは、最大
指数MAXEXPと各指数EXP(i)の差分を求め
て、それをシフト量SFTM(i)として各仮数MAN
(i)を元とするデータSTFS(i)を右シフトする
ことにより符号なし31ビット整数を生成する装置で、
図4(a)に示すように、引算器40、最上位ビット生
成装置41、シフト装置42より構成される。The mantissa shift devices 12a to 12i find the difference between the maximum exponent MAXEXP and each exponent EXP (i) and use it as the shift amount SFTM (i) for each mantissa MAN.
A device for generating an unsigned 31-bit integer by right-shifting data STFS (i) based on (i),
As shown in FIG. 4A, the subtractor 40, the most significant bit generation device 41, and the shift device 42 are included.
【0021】引算器40では、MAXEXP−EXP
(i)を計算して、シフト量SFTM(i)を求める。
最上位ビット生成装置41は、省略されていた仮数の暗
黙の最上位ビットMSB(i)を求める装置である。最
上位ビットは通常は1であるが、指数が0の場合には特
別なケースとして0になるので、EXP(i)が0であ
るかを判定して、0であればMSB(i)を0にし、そ
れ以外はMSB(i)を1にする。シフト装置42で
は、MSB(i)、MAN(i)より構成されるデータ
SFTS(i)を、SFTM(i)で右シフトを行な
い、符号なし31ビット整数SFT(i)を求める。シ
フトされるデータSFTS(i)は、例えば図4(b)
に示すように、ビット30には最上位ビット生成装置4
1で求めたMSB(i)が、ビット29〜7には各仮数
MAN(i)が、残りのビット6〜0に0が入る、符号
なし31ビット整数である。In the subtractor 40, MAXEXP-EXP is used.
(I) is calculated to obtain the shift amount SFTM (i).
The most significant bit generation device 41 is a device for obtaining the implicit most significant bit MSB (i) of the omitted mantissa. The most significant bit is usually 1, but when the exponent is 0, it becomes 0 as a special case, so it is determined whether EXP (i) is 0, and if 0, MSB (i) is determined. Set to 0, otherwise set MSB (i) to 1. In the shift device 42, the data SFTS (i) composed of MSB (i) and MAN (i) is right-shifted by SFTM (i) to obtain an unsigned 31-bit integer SFT (i). The shifted data SFTS (i) is, for example, as shown in FIG.
As shown in FIG.
The MSB (i) obtained in 1 is an unsigned 31-bit integer in which each mantissa MAN (i) is placed in bits 29 to 7 and 0 is placed in the remaining bits 6 to 0.
【0022】仮数シフト装置12a乃至12iの動作例
としてMAXEXP、EXP(i)、MAN(i)が以
下の値である場合を示す(数値は2進数)。 MAXEXP=00110000 EXP(i)=00101000 MAN(i)=01001010010100101001010 引算器40においてSFTM(i)が計算され、 SFTM(i)=MAXEXP−EXP(i) =00001000(十進数で8)As an operation example of the mantissa shift devices 12a to 12i, the case where MAXEXP, EXP (i), and MAN (i) have the following values (numerical values are binary numbers) is shown. MAXEXP = 00110000 EXP (i) = 00101000 MAN (i) = 01001010010100101001010 SFTM (i) is calculated in the subtractor 40, and SFTM (i) = MAXEXP-EXP (i) = 00001000 (8 in decimal)
【0023】次に、最上位ビット生成装置41におい
て、EXP(i)が0でないので、 MSB(i)=1 シフト装置42において、シフトされるデータSFTS
(i)は、 SFTS(i)=|MSB(i)| MAN(i) |0000000 =| 1 |01001010010100101001010|0000000 =1010010100101001010010100000000 となり、SFTS(i)をSFTM(i)(8ビット)
で右シフトしてSFT(i)が求められる。 SFT(i)=0000000010100101001010010100101Next, in the most significant bit generator 41, since EXP (i) is not 0, MSB (i) = 1 shift device 42 shifts the data SFTS.
(I) is SFTS (i) = | MSB (i) | MAN (i) | 0000000 = | 1 | 01001010010100101001010 | 0000000 = 1010010100101001010010100000000, and SFTS (i) is SFTM (i) (8 bits).
Then, SFT (i) is obtained by right shifting. SFT (i) = 0000000010100101001010010100101
【0024】また、もし変換する浮動小数点数がMAX
EXPを持つものだとすると、EXP(i)=MAXE
XPより、SFTM(i)=MAXEXP−EXP
(i)=0となり、シフト量が0になるので、 SFT(i)=1010010100101001010010100000000 となる。If the floating point number to be converted is MAX
If it has EXP, EXP (i) = MAXE
From XP, SFTM (i) = MAXEXP-EXP
Since (i) = 0 and the shift amount becomes 0, SFT (i) = 1010010100101001010010100000000.
【0025】このように、最大指数をもつ浮動小数点数
は整数化されるとき、最上位に必ず1がたち、有効ビッ
ト長すべてが使われることになる。As described above, when a floating-point number having the maximum exponent is converted into an integer, 1 is always set at the highest level, and all effective bit lengths are used.
【0026】符号化装置43は、各符号SIGN(i)
により、仮数シフト装置12a乃至12iが生成した符
号なし31ビット整数SFT(i)の符号化を行ない、
符号付き32ビット整数FIX(i)に変換する装置
で、図5に示すように、マイナス化装置50、選択装置
51より構成される。The encoding device 43 uses each code SIGN (i).
The unsigned 31-bit integer SFT (i) generated by the mantissa shift units 12a to 12i is encoded by
This is a device for converting into a signed 32-bit integer FIX (i), and comprises a minus device 50 and a selection device 51, as shown in FIG.
【0027】マイナス化装置50は、入力した正のデー
タを負のデータに変換する装置で、SFT(i)入力に
対して−SFT(i)を生成する。選択装置51は、S
IGN(i)が0ならばSFT(i)を、SIGN
(i)が1ならば−SFT(i)を選択し、符号ビット
として最上位ビット(ビット31)にSIGN(i)を
付加して、32ビットの符号付き整数FIX(i)を生
成する。符号化装置43の例を以下に示す。The minus device 50 is a device for converting input positive data into negative data, and generates -SFT (i) for SFT (i) input. The selection device 51 uses S
If IGN (i) is 0, SFT (i) is set to SIGN
If (i) is 1, -SFT (i) is selected, and SIGN (i) is added to the most significant bit (bit 31) as a sign bit to generate a 32-bit signed integer FIX (i). An example of the encoding device 43 is shown below.
【0028】 FIX(i)=0000000010100101001010010100101 入力 (1)SIGN(i)=0の場合 FIX(i) =|SIGN(i)|SFT(i)| =00000000010100101001010010l00101 (2)SICN(i)=1の場合 FIX(i) =|SIGN(i)|−SFT(i)| =11l1111110l01101011010ll01011011FIX (i) = 0000000010100101001010010100101 Input (1) When SIGN (i) = 0 FIX (i) = | SIGN (i) | SFT (i) | = 00000000010100101001010010l00101 (2) SICN (i) = 1 FIX (i) = | SIGN (i) | -SFT (i) | = 11l1111110l01101011010ll01011011
【0029】以上の実施例により、浮動小数点数で与え
られたテクスチャ座標は、それらの相対的な大きさを保
持したまま整数に変換できる。また、どのような大きさ
の浮動小数点数を与えても、最も大きな指数をもつ浮動
小数点数が整数化したときに有効ビット長すべてが使用
されるように変換されるので、精度良く変換されること
になる。According to the above-described embodiment, the texture coordinates given by the floating point number can be converted into an integer while keeping their relative sizes. Even if you give a floating-point number of any size, it will be converted so that all the effective bit lengths will be used when the floating-point number with the largest exponent is converted to an integer, so it will be converted accurately. It will be.
【0030】また、上述の座標値整数化装置を使用する
ことにより、図6に示すようなレンダリング装置60を
構成することが可能になる。Further, by using the coordinate value integerizing device described above, it is possible to construct the rendering device 60 as shown in FIG.
【0031】すなわち、図6において、座標値整数化装
置61は、上述の浮動小数点数から整数に変換する装置
で、浮動小数点テクスチャ座標(Sf,Tf,Qf)を
整数テクスチャ座標(Si,Ti,Qi)に変換する装
置である。補間装置62は、座標整数化装置61によっ
て変換された三角形の頂点の整数テクスチャ座標(S
i,Ti,Qi)から三角形内部の整数テクスチャ座標
(s,t,q)を補間を行なって求める装置である。除
算装置63は補間装置62で求めた三角形内部の整数テ
クスチャ座標(s,t,q)からu=s/q,v=t/
qの除算を行なってイメージデータ上の位置を求める装
置である。That is, in FIG. 6, the coordinate value integer conversion device 61 is a device for converting the above floating point number into an integer, and converts the floating point texture coordinates (Sf, Tf, Qf) into integer texture coordinates (Si, Ti, It is a device for converting into Qi). The interpolating device 62 converts the integer texture coordinates (S of the vertex of the triangle converted by the coordinate integer converting device 61 (S
It is a device that interpolates integer texture coordinates (s, t, q) inside the triangle from i, Ti, Qi). The divider 63 calculates u = s / q, v = t / from the integer texture coordinates (s, t, q) inside the triangle obtained by the interpolator 62.
This is a device for dividing q to obtain a position on image data.
【0032】このレンダリング装置60は、浮動小数点
テクスチャ座標を最適な整数に変換するので、変換後の
計算を精度を悪化させることなく、回路規模の大きな浮
動小数点計算装置ではなく回路規模の小さな整数計算装
置で構成できる。Since the rendering device 60 converts the floating-point texture coordinates into the optimum integer, it does not deteriorate the accuracy of the calculation after the conversion, and the floating-point calculation device does not have a large circuit scale, but a small-scale integer calculation. It can be configured with a device.
【0033】[0033]
【発明の効果】以上説明したように本発明の数値変換装
置によれば、最大指数検出手段で検出した最大の指数を
基準値とし、仮数シフト手段で算出された差分を相対値
として、符号化手段が浮動小数点保持手段に保持されて
いる各々の浮動小数点数の相対的な大きさを保持したま
ま整数に変換するので、テクスチャ座標に制限を加える
ことなく、また精度も悪化させることもなく、小規模に
構成することができるという効果がある。As described above, according to the numerical conversion apparatus of the present invention, the maximum exponent detected by the maximum exponent detecting means is used as a reference value, and the difference calculated by the mantissa shifting means is used as a relative value for encoding. Since the means converts into an integer while holding the relative size of each floating point number held in the floating point holding means, there is no restriction on texture coordinates and there is no deterioration in accuracy. The effect is that it can be configured on a small scale.
【図1】本発明の数値変換装置の一実施例の構成を示す
構成図である。FIG. 1 is a configuration diagram showing a configuration of an embodiment of a numerical conversion device of the present invention.
【図2】図1の浮動小数点レジスタに格納されるデータ
の構成を示す構成図である。FIG. 2 is a configuration diagram showing a configuration of data stored in a floating point register in FIG.
【図3】図1の最大指数検出装置の構成を示す構成図で
ある。FIG. 3 is a configuration diagram showing a configuration of the maximum index detection device of FIG.
【図4】図1の仮数シフト装置の構成を示す構成図であ
る。FIG. 4 is a configuration diagram showing the configuration of the mantissa shift device of FIG.
【図5】図1の符号化装置の構成を示す構成図である。5 is a configuration diagram showing a configuration of the encoding device in FIG. 1. FIG.
【図6】図1の整数化変換装置を使用したレンダリング
装置の構成を示す構成図である。6 is a configuration diagram showing a configuration of a rendering device using the integer conversion device of FIG. 1. FIG.
【図7】テクスチャ・マッピングの概念を説明する図で
ある。FIG. 7 is a diagram illustrating the concept of texture mapping.
【図8】グラフィックス・システムの一般例を説明する
図である。FIG. 8 is a diagram illustrating a general example of a graphics system.
【図9】従来例の数値変換装置の構成を示す構成図であ
る。FIG. 9 is a configuration diagram showing a configuration of a conventional numerical value conversion device.
10a乃至10i 浮動小数点レジスタ 11 最大指数検出装置 12a乃至12i 仮数シフト装置 13a乃至13i 符号化装置 30a乃至30h 最大値選択装置 40 引算器 41 最上位ビット生成装置 42 シフト装置 50 マイナス装置 51 選択装置 61 座標整数化装置 62 補間装置 63 除算装置 10a to 10i Floating point register 11 Maximum exponent detection device 12a to 12i Mantissa shift device 13a to 13i Encoding device 30a to 30h Maximum value selection device 40 Subtractor 41 Most significant bit generation device 42 Shift device 50 Minus device 51 Selection device 61 Coordinate integer conversion device 62 Interpolation device 63 Division device
───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 9365−5H G06F 15/72 A 9365−5H 450 A ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location 9365-5H G06F 15/72 A 9365-5H 450 A
Claims (4)
装置において、 複数の浮動小数点数を保持する浮動小数点保持手段と、 前記浮動小数点保持手段内の浮動小数点数から最大の指
数を検出する最大指数検出手段と、 前記最大指数検出手段が検出した前記最大の指数と前記
浮動小数点保持手段内の各々の前記浮動小数点数の指数
との差分を求めて前記差分をシフト量として仮数をシフ
トする仮数シフト手段と、 前記仮数シフト手段でシフトされた仮数を符号化する符
号化手段とを備え、 前記最大の指数を基準値とし、前記差分が相対値とし
て、各々の前記浮動小数点数の相対的な大きさを保持し
たまま整数に変換することを特徴とする数値変換装置。1. A numerical conversion device for converting a floating point number into an integer, a floating point holding means for holding a plurality of floating point numbers, and a maximum for detecting a maximum exponent from the floating point number in the floating point holding means. An exponent detecting unit, and a mantissa for shifting the mantissa using the difference as a shift amount by obtaining a difference between the maximum exponent detected by the maximum exponent detecting unit and the exponent of each floating point number in the floating point holding unit. Shift means, and encoding means for encoding the mantissa shifted by the mantissa shift means, the maximum exponent as a reference value, the difference as a relative value, relative to each of the floating point number A numerical conversion device characterized by converting to an integer while maintaining the size.
点保持手段と、 前記浮動小数点保持手段内の浮動小数点数から最大の指
数を検出する最大指数検出手段と、 前記最大指数検出手段が検出した前記最大の指数と前記
浮動小数点保持手段内の各々の前記浮動小数点数の指数
との差分を求めて前記差分をシフト量として仮数をシフ
トする仮数シフト手段と、 前記仮数シフト手段でシフトされた仮数を符号化する符
号化手段とを備え、 前記最大の指数を基準値とし、前記差分が相対値とし
て、各々の前記浮動小数点数の相対的な大きさを保持し
たまま整数に変換すると共に、 複数の浮動小数点同次座標を入力し、すべての座標値の
相対的な大きさを保ったまま盤数に変換し、正規化後の
値が等価な整数同次座標を出力することを特徴とする座
標値整数化装置。2. A floating point holding means for holding a plurality of floating point numbers, a maximum exponent detecting means for detecting a maximum exponent from the floating point numbers in the floating point holding means, and a maximum exponent detecting means for detecting the maximum exponent. A mantissa shift unit that shifts the mantissa using the difference as a shift amount by obtaining a difference between the maximum exponent and the exponent of each floating point number in the floating point holding unit; and a mantissa shifted by the mantissa shift unit. Encoding means for encoding, the maximum exponent as a reference value, the difference as a relative value, while the relative size of each of the floating point number is converted into an integer while holding, It is characterized by inputting the floating-point homogeneous coordinates of, converting it to the number of boards while keeping the relative size of all coordinate values, and outputting the integer homogeneous coordinates whose normalized values are equivalent. seat Integer apparatus.
点保持手段と、 前記浮動小数点保持手段内の浮動小数点数から最大の指
数を検出する最大指数検出手段と、 前記最大指数検出手段が検出した前記最大の指数と前記
浮動小数点保持手段内の各々の前記浮動小数点数の指数
との差分を求めて前記差分をシフト量として仮数をシフ
トする仮数シフト手段と、 前記仮数シフト手段でシフトされた仮数を符号化する符
号化手段とを備え、 前記最大の指数を基準値とし、前記差分が相対値とし
て、各々の前記浮動小数点の数相対的な大きさを保持し
たまま整数に変換すると共に、 複数の浮動小数点同次座標を入力し、複数の同次座標の
すべての座標値の相対的な大きさを保ったまま整数に変
換し、正規化後の値が等価でかつ補間可能な複数の整数
同次座標を出力することを特徴とする座標値整数化装
置。3. Floating point holding means for holding a plurality of floating point numbers, maximum exponent detecting means for detecting a maximum exponent from the floating point numbers in the floating point holding means, and maximum exponent detecting means A mantissa shift unit that shifts the mantissa using the difference as a shift amount by obtaining a difference between the maximum exponent and the exponent of each floating point number in the floating point holding unit; and a mantissa shifted by the mantissa shift unit. Encoding means for encoding, the maximum exponent as a reference value, the difference as a relative value, while converting the floating point number relative magnitude of each of the floating point is converted into an integer, Floating-point homogeneous coordinates are input and converted into integers while maintaining the relative size of all coordinate values of multiple homogeneous coordinates, and the normalized values are equivalent and interpolable multiple integers Coordinates integer unit and outputs the coordinates.
形の頂点のテクスチャ座標であって、 テクスチャ座標を整数計算で補間する補間手段を有する
ことを特徴とする請求項3に記載の座標値整数化装置。4. The coordinate according to claim 3, wherein the plurality of floating-point homogeneous coordinates are texture coordinates of vertices of a polygon, and the interpolation means interpolates the texture coordinates by integer calculation. Value integerizer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP23746894A JP3384470B2 (en) | 1994-09-30 | 1994-09-30 | Numerical value conversion device and method, and coordinate value integer conversion device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP23746894A JP3384470B2 (en) | 1994-09-30 | 1994-09-30 | Numerical value conversion device and method, and coordinate value integer conversion device and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08101919A true JPH08101919A (en) | 1996-04-16 |
JP3384470B2 JP3384470B2 (en) | 2003-03-10 |
Family
ID=17015782
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP23746894A Expired - Fee Related JP3384470B2 (en) | 1994-09-30 | 1994-09-30 | Numerical value conversion device and method, and coordinate value integer conversion device and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3384470B2 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5127916A (en) * | 1974-09-03 | 1976-03-09 | Matsushita Electric Ind Co Ltd | |
EP0864968A1 (en) * | 1997-03-14 | 1998-09-16 | Nokia Mobile Phones Ltd. | Denormalization circuit |
WO2001042903A1 (en) * | 1999-12-07 | 2001-06-14 | Hitachi, Ltd. | Data processing apparatus and data processing system |
KR100443395B1 (en) * | 2000-11-13 | 2004-08-23 | 엔이씨 일렉트로닉스 가부시키가이샤 | Circuit and method for generating fixed point data with reduced circuit scale |
JP2014179065A (en) * | 2013-02-18 | 2014-09-25 | Fujitsu Ltd | Data processing device, data processing method, and data processing program |
US9203557B2 (en) | 2012-09-14 | 2015-12-01 | Fujitsu Limited | Receiver and receiving method |
JP2017527014A (en) * | 2014-07-15 | 2017-09-14 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Vector scaling instructions for use in arithmetic logic units |
-
1994
- 1994-09-30 JP JP23746894A patent/JP3384470B2/en not_active Expired - Fee Related
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5127916A (en) * | 1974-09-03 | 1976-03-09 | Matsushita Electric Ind Co Ltd | |
EP0864968A1 (en) * | 1997-03-14 | 1998-09-16 | Nokia Mobile Phones Ltd. | Denormalization circuit |
WO2001042903A1 (en) * | 1999-12-07 | 2001-06-14 | Hitachi, Ltd. | Data processing apparatus and data processing system |
KR100443395B1 (en) * | 2000-11-13 | 2004-08-23 | 엔이씨 일렉트로닉스 가부시키가이샤 | Circuit and method for generating fixed point data with reduced circuit scale |
US7263539B2 (en) | 2000-11-13 | 2007-08-28 | Nec Electronics Corporation | Circuit and method for generating fixed point data with reduced circuit scale |
US9203557B2 (en) | 2012-09-14 | 2015-12-01 | Fujitsu Limited | Receiver and receiving method |
JP2014179065A (en) * | 2013-02-18 | 2014-09-25 | Fujitsu Ltd | Data processing device, data processing method, and data processing program |
US9658986B2 (en) | 2013-02-18 | 2017-05-23 | Fujitsu Limited | Advanced computational processes and methods of using the same |
JP2017527014A (en) * | 2014-07-15 | 2017-09-14 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Vector scaling instructions for use in arithmetic logic units |
Also Published As
Publication number | Publication date |
---|---|
JP3384470B2 (en) | 2003-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7330864B2 (en) | System and method for using native floating point microprocessor instructions to manipulate 16-bit floating point data representations | |
US5973705A (en) | Geometry pipeline implemented on a SIMD machine | |
US7755634B1 (en) | System, method and computer program product for branching during programmable vertex processing | |
US5862066A (en) | Methods and apparatus for fast check of floating point zero or negative zero | |
US20080263122A1 (en) | Multi-function floating point arithmetic pipeline | |
JPS62297984A (en) | Visual display generator for curved image | |
JP2010113624A (en) | Device and method for drawing bezier curve and program | |
US20120059866A1 (en) | Method and apparatus for performing floating-point division | |
JPH01147782A (en) | Graphic display device | |
US20200348910A1 (en) | Transcendental calculation unit apparatus and method | |
JP3736741B2 (en) | Data processing unit | |
US6611265B1 (en) | Multi-stage fixed cycle pipe-lined lighting equation evaluator | |
US7143126B2 (en) | Method and apparatus for implementing power of two floating point estimation | |
JP3384470B2 (en) | Numerical value conversion device and method, and coordinate value integer conversion device and method | |
US6260054B1 (en) | Reciprocal generator using piece-wise-linear segments of varying width with floating-point format | |
KR100919236B1 (en) | A method for 3D Graphic Geometric Transformation using Parallel Processor | |
TWI389028B (en) | Multipurpose multiply-add functional unit | |
US7636095B2 (en) | Pixel delta interpolation method and apparatus | |
US6891538B1 (en) | Dual mode device and method for generating vector cross products or dot products | |
US6606097B1 (en) | Circuit for generating frame buffer values | |
US5850227A (en) | Bit map stretching using operand routing and operation selective multimedia extension unit | |
JPH02226381A (en) | Apparatus for displaying parametric function using adaptive forward difference and integer arithmetics and realization thereof using integer arithmetics | |
US6559856B1 (en) | Apparatus for fixed-point graphics and method therefor | |
US6711603B1 (en) | Fractional, arithmetic unit, fractional arithmetic method, set-up engine for handling graphic images and computer-readable medium | |
JPH11212955A (en) | Arithmetic unit and image processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20021128 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071227 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081227 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091227 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091227 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101227 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111227 Year of fee payment: 9 |
|
LAPS | Cancellation because of no payment of annual fees |