JP2011175542A - Image data processor - Google Patents

Image data processor Download PDF

Info

Publication number
JP2011175542A
JP2011175542A JP2010040279A JP2010040279A JP2011175542A JP 2011175542 A JP2011175542 A JP 2011175542A JP 2010040279 A JP2010040279 A JP 2010040279A JP 2010040279 A JP2010040279 A JP 2010040279A JP 2011175542 A JP2011175542 A JP 2011175542A
Authority
JP
Japan
Prior art keywords
value
data
difference
pixel
depth
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.)
Withdrawn
Application number
JP2010040279A
Other languages
Japanese (ja)
Inventor
Toshiyuki Yoshitake
敏幸 吉武
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010040279A priority Critical patent/JP2011175542A/en
Publication of JP2011175542A publication Critical patent/JP2011175542A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image data processor that efficiently encodes and decodes depth values. <P>SOLUTION: The image data processor includes a floating point separation unit separating floating point data into two parts, i.e. an exponential part serving as a first part and an imaginary part serving as a second part, the floating point data indicating the depth value of one pixel in three-dimensional graphics description; a difference generation unit for computing a first difference value, i.e., the difference between a predicted value of the first part and the value of the first part, as integer data, and computing a second difference value, i.e., the difference between a predicted value of the second part and the value of the second part, as integer data; and an encoder encoding the first difference value and the second difference value into variable-length codes. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本願開示は、一般にデータ処理装置に関し、詳しくは画像データを符号化及び復号化する画像データ処理装置に関する。   The present disclosure relates generally to a data processing device, and more particularly to an image data processing device that encodes and decodes image data.

近年、3次元グラフィックス描画LSI(大規模集積回路)に対してより高い描画性能と描画品質とが要求されるようになってきている。これは、フルハイビジョン化などにより表示画面サイズが拡大したり、動きを滑らかに見せるために高いフレームレートで描画するようになってきたためである。この高い描画性能を実現するために、単位時間当たりに多数のオブジェクトを描画する必要がある。また、高い描画品質を実現するために、同時に複数のテクスチャを使用したり、アンチエイリアシングのために表示面積よりも広い面積を描画する必要がある。これらのことを実現するためには、より多くのメモリアクセスが必要になるが、メモリアクセスの増大によりメモリ帯域が逼迫して高性能化のネックになってしまう。これを回避するためには、メモリバス幅を広げて1クロックあたりの転送データ量を増大させるか、メモリクロック速度を上げて時間当たりのメモリ転送回数を増加させる方法がある。しかし、バス幅を広げるためには接続するメモリの個数を増やす必要があり、クロック速度を上げるためにはより高性能なメモリを使用する必要があるため、何れの方法もコストが増大することになる。   In recent years, higher drawing performance and drawing quality have been required for three-dimensional graphics drawing LSIs (large scale integrated circuits). This is because the display screen size has been enlarged due to full high-definition or the like, and drawing has been performed at a high frame rate in order to make the movement look smooth. In order to realize this high drawing performance, it is necessary to draw a large number of objects per unit time. In order to realize high drawing quality, it is necessary to use a plurality of textures at the same time or to draw an area larger than the display area for anti-aliasing. In order to realize these things, more memory access is required, but the memory bandwidth becomes tight due to the increase in memory access, which becomes a bottleneck for high performance. In order to avoid this, there is a method of increasing the memory bus width to increase the amount of transfer data per clock, or increasing the memory clock speed to increase the number of memory transfers per hour. However, in order to widen the bus width, it is necessary to increase the number of memories to be connected, and in order to increase the clock speed, it is necessary to use a higher performance memory. Become.

図1は、3次元グラフィックス描画の原理を示す図である。3次元グラフィックスの描画では、描画対象の3次元オブジェクトをポリゴンと呼ばれる3角形または4角形に分割し、ポリゴンを単位として描画する。その際、XYZ座標のZ軸方向が視点から見た奥行き方向となるようにポリゴン10が3次元空間上に配置され、表示スクリーンであるXY平面に視点位置から見えるポリゴン像11が投影される。各ポリゴンは視点から見て最も手前にある画素のみが描画される。他のポリゴンによって隠される部分は描画されない。これによって視点から見えるシーンが描画され、描画結果がディスプレイに表示される。各ポリゴンを構成する画素を描画する際に、既に描画済みの他のポリゴンに対して当該画素が最も手前にあるかどうかを判断するために、デプス値及びデプスバッファが使用される。デプス値は3次元空間でのZ座標として表現される。描画された各画素のデプス値はデプスバッファに格納される。新しく描画しようとしている着目画素のデプス値が、デプスバッファの該当画素位置の値より奥を示す値であれば、その着目画素は他のポリゴンによって隠蔽されていると判断し、画素色を描画しない。一方、着目画素のデプス値が、デプスバッファの該当画素位置の値より手前を示す値であれば、その着目画素は視点から見える場所にあると判断し、画素色を描画するとともにデプスバッファの値を更新する。デプス値による描画の有無の判定(デプステスト)は描画を行おうとする画素毎に行うので、多くのメモリアクセスを必要とする。このデプスバッファアクセスで発生するメモリアクセスの量を削減することが大きな課題となっている。   FIG. 1 is a diagram showing the principle of 3D graphics drawing. In drawing three-dimensional graphics, a three-dimensional object to be drawn is divided into triangles or quadrangles called polygons, and drawing is performed in units of polygons. At that time, the polygon 10 is arranged in the three-dimensional space so that the Z-axis direction of the XYZ coordinates is the depth direction seen from the viewpoint, and the polygon image 11 seen from the viewpoint position is projected onto the XY plane as a display screen. For each polygon, only the pixel closest to the viewpoint is drawn. Portions hidden by other polygons are not drawn. As a result, a scene visible from the viewpoint is drawn, and the drawing result is displayed on the display. When drawing a pixel constituting each polygon, a depth value and a depth buffer are used to determine whether the pixel is closest to another polygon already drawn. The depth value is expressed as a Z coordinate in a three-dimensional space. The depth value of each drawn pixel is stored in the depth buffer. If the depth value of the target pixel to be newly drawn is a value indicating the depth behind the value of the corresponding pixel position in the depth buffer, it is determined that the target pixel is hidden by another polygon, and the pixel color is not drawn. . On the other hand, if the depth value of the pixel of interest is a value indicating the front side of the value of the corresponding pixel position of the depth buffer, the pixel of interest is determined to be visible from the viewpoint, and the pixel color is drawn and the value of the depth buffer Update. Since the determination of the presence / absence of drawing based on the depth value (depth test) is performed for each pixel to be drawn, many memory accesses are required. Reducing the amount of memory access that occurs in this depth buffer access is a major issue.

特開2004−212621号公報Japanese Patent Laid-Open No. 2004-212621 特開2006−186531号公報JP 2006-186531 A

以上を鑑みると、デプス値を効率的に符号化及び復号化する画像データ処理装置が望まれる。   In view of the above, an image data processing apparatus that efficiently encodes and decodes depth values is desired.

画像データ処理装置は、3次元グラフィックス描画の1つの画素のデプス値を示す浮動小数点データを指数部の第1部分と符号及び仮数部の第2部分との2つの部分に分離する浮動小数分離部と、前記第1部分の予測値と前記第1部分の値との差分である第1の差分値を整数データとして演算するとともに、前記第2部分の予測値と前記第2部分の値との差分である第2の差分値を整数データとして演算する差分生成部と、前記第1の差分値と前記第2の差分値とを可変長符号化する符号化器とを含むことを特徴とする。   Image data processing apparatus separates floating-point data indicating a depth value of one pixel of three-dimensional graphics rendering into two parts: a first part of an exponent part and a second part of a sign and mantissa part And a first difference value that is a difference between the predicted value of the first part and the value of the first part as integer data, and the predicted value of the second part and the value of the second part A difference generation unit that calculates a second difference value that is a difference between the first difference value and the second difference value as an integer data; and an encoder that performs variable-length encoding on the first difference value and the second difference value. To do.

本願開示の少なくとも1つの実施例によれば、浮動小数点演算ではなく整数演算が行なわれるので、演算に起因する誤差が発生することがない。また指数部と符号付き仮数部とに分けて処理を行なうので、効率的な符号化を実現することができる。   According to at least one embodiment of the present disclosure, since an integer operation is performed instead of a floating point operation, an error caused by the operation does not occur. Further, since the processing is performed separately for the exponent part and the signed mantissa part, efficient encoding can be realized.

3次元グラフィックス描画の原理を示す図である。It is a figure which shows the principle of three-dimensional graphics drawing. 浮動小数点データを指数部の第1部分と符号及び仮数部の第2部分との2つの部分に分離する様子を示す図である。It is a figure which shows a mode that floating point data is isolate | separated into two parts, the 1st part of an exponent part, and the 2nd part of a code | symbol and mantissa part. 差分値の演算の一例を示す図である。It is a figure which shows an example of the calculation of a difference value. 差分演算時のビット数拡張を示す図である。It is a figure which shows the bit number expansion at the time of difference calculation. 整数データの分割を示す図である。It is a figure which shows the division | segmentation of integer data. グラフィクスLSIとメモリとの構成を示す図である。It is a figure which shows the structure of graphics LSI and memory. ポリゴン描画処理におけるデプスデータの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a depth data process in a polygon drawing process. 描画&デプスデータRAMの入れ替え処理を示す図である。It is a figure which shows the replacement process of drawing & depth data RAM. 図8のステップS1のブロック符号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the block encoding process of step S1 of FIG. 図8のステップS4のブロック復号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the block decoding process of FIG.8 S4. 図8のステップS2のブロックデータ出力処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the block data output process of FIG.8 S2. メモリの構造を示す図である。It is a figure which shows the structure of memory. 図8のステップS3のブロックデータ読込処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the block data reading process of step S3 of FIG. 図8のステップS1に示すデータ符号化処理を実行する構成及び処理の流れを示す図である。It is a figure which shows the structure and flow of a process which perform the data encoding process shown to FIG.8 S1. 図8のステップS4に示すデータ復号化処理を実行する構成及び処理の流れを示す図である。It is a figure which shows the structure and flow of a process which perform the data decoding process shown to FIG.8 S4.

以下に、本発明の実施例を添付の図面を用いて詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

デプスバッファに格納するデプス値ではなく、画素値(画素色)を表わすデータの場合であれば、圧縮方式として例えば差分圧縮が考えられる。1つの画素の色は、R(赤)成分、G(緑)成分、及びB(青)成分の3色で表現され、各色成分の階調は例えば8ビットの整数値(0〜255)として表わされる。画像は隣接する画素間の相関が非常に高いので、隣接画素の色成分ごとの差分値を算出すると、差分値は0近くに分布する。この差分値をハフマン符号化することにより、画像データの圧縮を行うことができる。   In the case of data representing pixel values (pixel colors) instead of the depth values stored in the depth buffer, for example, differential compression can be considered as a compression method. The color of one pixel is expressed by three colors of an R (red) component, a G (green) component, and a B (blue) component, and the gradation of each color component is, for example, an 8-bit integer value (0 to 255). Represented. Since the image has a very high correlation between adjacent pixels, when the difference value for each color component of the adjacent pixel is calculated, the difference value is distributed close to zero. Image data can be compressed by Huffman encoding this difference value.

それに対して、デプスバッファに格納するデプス値は、32ビットの浮動小数点データで表現される。デプス値の場合も隣接する画素間の相関が非常に高いので、差分圧縮を適用することが考えられるが、浮動小数点データ間の差分を計算した場合、演算時の下位ビットの桁落ちによる演算誤差が発生する。差分圧縮の場合には、伸長時に差分値を累積的に加算していくので、誤差も累積されることになる。描画画素のデプス値に誤差が発生すると、隠れるべき画素が描画されたり、描画されるべき画素が隠れたりし、ユーザの意図したものとは全く異なる描画結果になってしまう。そのためデプス値データの圧縮過程で誤差が発生することは許容されない。従って、浮動小数点データの差分計算を行なうことは現実的ではない。   On the other hand, the depth value stored in the depth buffer is represented by 32-bit floating point data. Even in the case of depth values, the correlation between adjacent pixels is very high, so it may be possible to apply differential compression. However, if the difference between floating-point data is calculated, the calculation error due to the loss of the lower bits during the calculation Will occur. In the case of differential compression, the difference values are cumulatively added at the time of decompression, so that errors are also accumulated. When an error occurs in the depth value of the drawing pixel, the pixel to be hidden is drawn or the pixel to be drawn is hidden, resulting in a completely different drawing result from that intended by the user. Therefore, an error is not allowed to occur during the compression process of the depth value data. Therefore, it is not realistic to perform the difference calculation of floating point data.

32ビット浮動小数点表示のビットパターンを32ビットの整数として取り扱い、整数同士の差分を算出してデータ圧縮を行うことも考えられる。しかしながら、元が浮動小数点表示であるデプス値をそのまま整数データとして扱った場合には、画素間の相関が低くなってしまう。そのため、符号化の効率(圧縮率)が悪くなってしまう。特に正の値と、負の値の差分を計算するときに、差分が大きな値となることがある。これは、指数部が127をバイアスした正の整数の形式で表現されており、実際の指数部分は値から127を減算することによって求めるためである。例えば−1.0は0xBF800000,+1.0は0x3F800000と表され、−127と+127の間の計算となり、その差分値は大きな値となる。また、デプス値を画素値と同様の方法で8ビットの4要素に分割すると、分割箇所が指数部の途中となってしまい、要素間の差分を計算した際に大きな差分値を発生させる。   It is also conceivable to treat the bit pattern of the 32-bit floating point display as a 32-bit integer, calculate the difference between the integers, and perform data compression. However, when a depth value originally represented by a floating-point number is treated as integer data as it is, the correlation between pixels is lowered. Therefore, the encoding efficiency (compression rate) is deteriorated. In particular, when calculating the difference between a positive value and a negative value, the difference may be a large value. This is because the exponent part is expressed in the form of a positive integer biased by 127, and the actual exponent part is obtained by subtracting 127 from the value. For example, -1.0 is expressed as 0xBF800000, and +1.0 is expressed as 0x3F800000, which is a calculation between -127 and +127, and the difference value is a large value. Further, when the depth value is divided into four 8-bit elements in the same manner as the pixel value, the divided portion is in the middle of the exponent part, and a large difference value is generated when the difference between the elements is calculated.

そこで、3次元グラフィックス描画の1つの画素のデプス値を示す浮動小数点データを指数部の第1部分と符号及び仮数部の第2部分との2つの部分に分離する。次に、第1部分の予測値と第1部分の値との差分である第1の差分値を整数データとして演算するとともに、第2部分の予測値と第2部分の値との差分である第2の差分値を整数データとして演算する。更に、上記のようにして求めた第1の差分値と第2の差分値とを可変長符号化する。以下に、これらの処理について説明する。   Therefore, the floating-point data indicating the depth value of one pixel of the three-dimensional graphics drawing is separated into two parts: a first part of the exponent part and a second part of the sign and mantissa part. Next, the first difference value, which is the difference between the predicted value of the first part and the value of the first part, is calculated as integer data, and is the difference between the predicted value of the second part and the value of the second part. The second difference value is calculated as integer data. Further, the first difference value and the second difference value obtained as described above are subjected to variable length coding. Hereinafter, these processes will be described.

図2は、浮動小数点データを指数部の第1部分と符号及び仮数部の第2部分との2つの部分に分離する様子を示す図である。図2に示されるように、32ビット浮動小数点データ20は、1ビットの符号21、8ビットの指数部22、及び23ビットの仮数部23を含む。このうち指数部22を8ビット整数の第1部分24とする。また1ビットの符号21と23ビットの仮数部23とを合わせて、24ビット符号付き整数の第2部分25とする。このように32ビット浮動小数点データを2つの整数に分解する。   FIG. 2 is a diagram showing how floating point data is separated into two parts, a first part of the exponent part and a second part of the sign and mantissa part. As shown in FIG. 2, the 32-bit floating point data 20 includes a 1-bit code 21, an 8-bit exponent part 22, and a 23-bit mantissa part 23. Of these, the exponent part 22 is the first part 24 of an 8-bit integer. The 1-bit code 21 and the 23-bit mantissa part 23 are combined to form a second part 25 of a 24-bit signed integer. In this way, the 32-bit floating point data is decomposed into two integers.

図3は、差分値の演算の一例を示す図である。図3は所定の方向(例えば走査方向)に連続する4つの画素の第1部分E0乃至E3及び第2部分F0乃至F3を示す。4つの画素の第1部分E0乃至E3間の1階差分がdE0乃至dE2であり、4つの画素の第2部分F0乃至F3間の1階差分がdE0乃至dE2である。例えば、dE1=E2−E1である。またdE0乃至dE2間の差分、即ち第1部分E0乃至E3間の2階差分がd2E0乃至d2E1であり、dF0乃至dF2間の差分、即ち第2部分F0乃至F3間の2階差分がd2F0乃至d2F1である。例えば、d2E1=dE2−dE1である。   FIG. 3 is a diagram illustrating an example of the calculation of the difference value. FIG. 3 shows first portions E0 to E3 and second portions F0 to F3 of four pixels that are continuous in a predetermined direction (for example, the scanning direction). The first-order differences between the first portions E0 to E3 of the four pixels are dE0 to dE2, and the first-order differences between the second portions F0 to F3 of the four pixels are dE0 to dE2. For example, dE1 = E2-E1. Further, the difference between dE0 to dE2, that is, the second difference between the first portions E0 to E3 is d2E0 to d2E1, and the difference between dF0 to dF2, that is, the second difference between the second portions F0 to F3 is d2F0 to d2F1. It is. For example, d2E1 = dE2-dE1.

例えば、着目画素のデプス値の第2部分の値がF2であり、1つ前の隣接画素のデプス値の第2部分の値がF1であるとする。このとき、同一値が連続するであろうという予測判断により得られる着目画素の予測値はF1であり、この予測値F1と着目画素の第2部分の値F2との差分F2−F1を演算する。これは1階差分であり、1階差分の場合の上記予測値は隣接画素のデプス値である。隣接画素としては、1つ前の画素(走査方向を左から右とすると1つ左の画素)に限らずに、例えば1つ上の画素等であってもよい。   For example, it is assumed that the value of the second part of the depth value of the pixel of interest is F2, and the value of the second part of the depth value of the previous adjacent pixel is F1. At this time, the predicted value of the target pixel obtained by the prediction determination that the same value will continue is F1, and the difference F2-F1 between the predicted value F1 and the value F2 of the second portion of the target pixel is calculated. . This is a first-order difference, and the predicted value in the case of the first-order difference is a depth value of an adjacent pixel. The adjacent pixel is not limited to the previous pixel (one pixel left if the scanning direction is left to right), but may be, for example, one pixel above.

また、着目画素のデプス値の第2部分の値がF2であり、1つ前の隣接画素のデプス値の第2部分の値がF1であり、1つ後の隣接画素のデプス値の第2部分の値がF3であるとする。このとき、一定の増加量又は減少量で値が変化するとの予測判断により得られる着目画素の予測値は(F3+F1)/2であり、この予測値と着目画素の第2部分の値F2との差分(F3+F1)/2−F2を演算する。この差分は、2倍すればF3+F1−2F2となり、これは(F3−F2)−(F2−F1)に等しい。これは2階差分であり、2階差分の場合の上記予測値は着目画素の周辺画素の値F1及びF3の平均値である。周辺画素としては、1つ前の画素及び1つ後の画素に限らずに、例えば周囲8画素等であってもよい。   Further, the value of the second portion of the depth value of the pixel of interest is F2, the value of the second portion of the depth value of the previous adjacent pixel is F1, and the second of the depth values of the next adjacent pixel. Assume that the value of the part is F3. At this time, the predicted value of the target pixel obtained by the prediction determination that the value changes with a constant increase or decrease is (F3 + F1) / 2, and the predicted value and the value F2 of the second portion of the target pixel are The difference (F3 + F1) / 2−F2 is calculated. If this difference is doubled, F3 + F1-2F2 is obtained, which is equal to (F3-F2)-(F2-F1). This is a second-order difference, and the predicted value in the case of the second-order difference is an average value of the values F1 and F3 of the peripheral pixels of the target pixel. The peripheral pixels are not limited to the immediately preceding pixel and the immediately following pixel, but may be, for example, 8 surrounding pixels.

デプス値は、一定の増加量又は減少量を有する変化(即ち一様な傾き)を示すことが多く、仮数部に対応する第2部分について上記のように2階差分をとれば、大多数の値がゼロ近辺に分布することになる。従って、例えばゼロを中心とする正規分布等を仮定したハフマン符号化テーブルを用意しておけば、ゼロ近辺の値には符号長の短い符号が割り当てられ、高効率の符号化を実現することができる。また指数部については、一定値であることが多く、2階差分をとれば、同様に大多数の値がゼロ近辺に分布することになる。従って、同様に2階差分値を可変長符号化すれば、高効率の符号化を実現することができる。なお指数部については、1階差分をとるだけでも大多数の値がゼロ近辺に分布するので、1階差分した結果を符号化する構成としてもよい。このような予測処理及び符号化処理においては、浮動小数点演算ではなく整数演算が行なわれるので、演算に起因する誤差が発生することがない。また指数部と符号付き仮数部とに分けて処理を行なうので、効率的な符号化を実現することができる。   The depth value often shows a change (that is, a uniform slope) having a constant increase or decrease, and if a second-order difference is taken as described above for the second part corresponding to the mantissa part, the majority The values will be distributed around zero. Therefore, for example, if a Huffman coding table assuming a normal distribution centered on zero is prepared, a code with a short code length is assigned to a value near zero, so that highly efficient coding can be realized. it can. The exponent part is often a constant value, and if a second-order difference is taken, the majority of the values are similarly distributed around zero. Therefore, if the second-order differential value is similarly variable-length encoded, highly efficient encoding can be realized. As for the exponent part, even if only the first-order difference is taken, the majority of the values are distributed in the vicinity of zero. Therefore, the result of the first-order difference may be encoded. In such prediction processing and encoding processing, integer arithmetic is performed instead of floating point arithmetic, so that an error caused by the arithmetic does not occur. Further, since the processing is performed separately for the exponent part and the signed mantissa part, efficient encoding can be realized.

図4は、差分演算時のビット数拡張を示す図である。上記のように差分演算を行なう場合、指数部である第1部分については、1階差分時には負の演算結果を表現するために1ビットの拡張が必要になり、2階差分時には演算結果を桁あふれ無く表現するために更に1ビットの拡張が必要になる。また符号付き仮数部である第2部分については、1階差分時及び2階差分時の各々において、演算結果を桁あふれ無く表現するために1ビットの拡張が必要になる。従って、図4に示すように、指数部である第1部分については、元の8ビット整数データが1階差分後には9ビット整数データとなり、2階差分後には10ビット整数データとなる。また符号付き仮数部である第2部分については、元の24ビット整数データが1階差分後には25ビット整数データとなり、2階差分後には26ビット整数データとなる。   FIG. 4 is a diagram illustrating the bit number expansion during the difference calculation. When performing the difference calculation as described above, the first part, which is the exponent part, requires a 1-bit extension to express a negative calculation result when the first-order difference is used, and the calculation result is displayed as a digit when the second-order difference is used. In order to express without overflow, it is necessary to extend one bit further. Further, for the second part, which is a signed mantissa part, 1-bit extension is required to express the calculation result without overflowing in each of the first-order difference and the second-order difference. Therefore, as shown in FIG. 4, for the first part which is the exponent part, the original 8-bit integer data becomes 9-bit integer data after the first-order difference and becomes 10-bit integer data after the second-order difference. For the second part, which is a signed mantissa, the original 24-bit integer data becomes 25-bit integer data after the first-order difference and becomes 26-bit integer data after the second-order difference.

なお可変長符号化する際、ビット数が長いままのデータを符号化することは効率的でない。ハフマン符号化等の可変長符号化では、一般に、符号化対象のデータと符号化後の符号化データとが1対1に対応する可変長符号化テーブルを使用する。符号化対象データが与えられると、この符号化テーブルを参照して対応する符号化データを求めることにより、符号化を行なう。この際、26ビット整数をそのまま符号化しようとすると、符号化テーブルのエントリ数が226個となり、膨大なメモリ空間を使用してしまう。そこで、26ビット整数のデータをビット数のより少ない複数のデータに分割し、この分割した後の複数のデータを別個に可変長符号化することが好ましい。なお指数部のデータについても必要に応じて細かく分割してもよい。 When performing variable length encoding, it is not efficient to encode data with a long number of bits. In variable-length coding such as Huffman coding, generally, a variable-length coding table in which data to be coded and coded data after coding correspond one-to-one is used. When data to be encoded is given, encoding is performed by referring to the encoding table to obtain corresponding encoded data. In this case, an attempt to directly encode the 26-bit integer, the number of entries coding table becomes 2 26, thereby using a large memory space. Therefore, it is preferable to divide the 26-bit integer data into a plurality of data having a smaller number of bits and separately perform the variable length coding on the plurality of divided data. The exponent data may also be finely divided as necessary.

図5は、整数データの分割を示す図である。図5に示すように、例えば、符号部と仮数部との2階差分データである26ビットの整数データを、上位から9ビット、9ビット、8ビットの3つのデータ長が短いデータに分割する。ビット数の組み合わせはこの分割例に限定されるものではなく、他のビット数の組み合わせを使用してもよい。例えば、7ビット、7ビット、6ビット、6ビットのように4つに分割してもよい。   FIG. 5 is a diagram showing division of integer data. As shown in FIG. 5, for example, 26-bit integer data, which is second-order difference data between the sign part and the mantissa part, is divided into three data lengths of 9 bits, 9 bits, and 8 bits from the upper order that are short. . The combination of the number of bits is not limited to this division example, and other combinations of the number of bits may be used. For example, you may divide into four like 7 bits, 7 bits, 6 bits, and 6 bits.

図6は、グラフィクスLSIとメモリとの構成を示す図である。図6においては、デプスデータの処理に関係する部分が主に示されており、描画データ(画素色データ等)についての処理部分の全体は示されていない。図6のグラフィクスLSI60は、外部メモリ66にバスを介して接続されている。グラフィクスLSI60は、グラフィクス描画コア61、描画&デプスデータRAM62、伸長回路部63、圧縮回路部64、及びメモリコントローラ部65を含む。外部メモリ66は、デプスバッファ67及びブロック長バッファ68を含む。   FIG. 6 is a diagram illustrating a configuration of the graphics LSI and the memory. In FIG. 6, the part related to the processing of the depth data is mainly shown, and the whole processing part for the drawing data (pixel color data and the like) is not shown. The graphics LSI 60 in FIG. 6 is connected to the external memory 66 via a bus. The graphics LSI 60 includes a graphics drawing core 61, a drawing & depth data RAM 62, an expansion circuit unit 63, a compression circuit unit 64, and a memory controller unit 65. The external memory 66 includes a depth buffer 67 and a block length buffer 68.

各画素のデプス値(第1部分と第2部分とに分離されたデータ)の符号化データが、外部メモリ66のデプスバッファ67に格納されている。また最も最近アクセスしたデプス値は、グラフィクスLSI60内の描画&デプスデータRAM62に格納されている。描画&デプスデータRAM62は、一部のデータを手元に置いておくキャッシュメモリと同様の役割を果たす。描画&デプスデータRAM62に格納されるのは、表示画面に対応する全体の画像のうちの一部の小領域のデータであり、例えば16×16画素のブロックに対するデプス値及び描画色データが格納される。また外部メモリ66のデプスバッファ67には、このブロック単位で、デプス値の符号化データが格納される。符号化の結果、16×16画素のブロックに対するデプス値の符号化データのビット数は一定ではなくなるので、各ブロックに対する有効データの長さを示すデータがブロック長バッファ68に格納されている。グラフィクスLSI60による一連の描画処理により、外部メモリ66の所定の領域には、表示画面に対応した画像の全画素について描画色データが書き込まれることになる。   The encoded data of the depth value of each pixel (data separated into the first part and the second part) is stored in the depth buffer 67 of the external memory 66. The most recently accessed depth value is stored in the drawing & depth data RAM 62 in the graphics LSI 60. The drawing & depth data RAM 62 plays a role similar to that of a cache memory in which a part of data is kept at hand. The drawing & depth data RAM 62 stores data of some small areas of the entire image corresponding to the display screen. For example, the depth value and drawing color data for a block of 16 × 16 pixels are stored. The Depth value encoded data is stored in the depth buffer 67 of the external memory 66 in units of blocks. As a result of the encoding, the number of bits of the encoded data of the depth value for the block of 16 × 16 pixels is not constant, so that data indicating the length of effective data for each block is stored in the block length buffer 68. By a series of drawing processes by the graphics LSI 60, drawing color data is written in a predetermined area of the external memory 66 for all pixels of the image corresponding to the display screen.

図7は、ポリゴン描画処理におけるデプスデータの処理の流れを示すフローチャートである。ある1つのポリゴンの描画処理が開始されると、ステップS1で、ポリゴン図形が描画画素に分解される。即ち、ポリゴン内部に入る画素を特定し、これらの画素を所定の順番で走査する。このようにして、順に走査される一つ一つの画素について、所定の描画処理が実行されることになる。ステップS2で、着目画素について、描画位置及び描画色等を生成する。例えば、着目ポリゴンの頂点を結んだ辺上に位置する画素から水平方向に一画素ずつ走査していくことで、現在処理対象の着目画素の画素位置が定まる。また着目ポリゴンの頂点毎に求めた画像パラメータに基づいて、ポリゴン内部に含まれる各画素の画像パラメータを補間により求める。例えば、上記のように水平方向に一画素ずつ走査し、水平方向のパラメータ値の増分を加算していくことで、各画素におけるデプス値や描画色等の画像パラメータを求める。画像パラメータには、RGB各色の輝度、奥行き方向の距離を表すデプス値、テクスチャ表示のためのテクスチャ座標値等が含まれる。上記ステップS1及びS2の処理は、グラフィクス描画コア61により実行される。   FIG. 7 is a flowchart showing the flow of depth data processing in polygon rendering processing. When drawing processing of one polygon is started, the polygon figure is decomposed into drawing pixels in step S1. That is, the pixels that enter the polygon are specified, and these pixels are scanned in a predetermined order. In this manner, a predetermined drawing process is executed for each pixel that is sequentially scanned. In step S2, a drawing position, a drawing color, and the like are generated for the pixel of interest. For example, by scanning one pixel at a time in the horizontal direction from a pixel located on the side connecting the vertices of the target polygon, the pixel position of the target pixel to be processed is determined. Further, based on the image parameter obtained for each vertex of the target polygon, the image parameter of each pixel included in the polygon is obtained by interpolation. For example, scanning is performed pixel by pixel in the horizontal direction as described above, and image parameter such as depth value and drawing color in each pixel is obtained by adding the increment of the parameter value in the horizontal direction. The image parameters include the luminance of each RGB color, a depth value representing a distance in the depth direction, a texture coordinate value for texture display, and the like. The processing in steps S1 and S2 is executed by the graphics drawing core 61.

ステップS3で、着目画素位置を含むブロックが描画&デプスデータRAM62に格納されているか否かを判定する。着目画素位置を含むブロックが描画&デプスデータRAM62に格納されている場合には、ステップS5に進み、デプス値比較及び画素書き込みが行なわれる。着目画素位置を含むブロックが描画&デプスデータRAM62に格納されていない場合には、ステップS4で、描画&デプスデータRAMの入れ替え処理を実行する。これにより、現在描画&デプスデータRAM62に格納されているブロックのデータ(デプス値及び描画色データ)を外部メモリ66に格納し、更に、着目画素位置を含むブロックのデータを外部メモリ66から読み出して描画&デプスデータRAM62に格納する。なおここで、現在描画&デプスデータRAM62に格納されているデータを外部メモリ66に格納する処理は、手元のデータに行なった更新処理を外部メモリ66上のデータに反映させるために実行される。この入れ替え処理後、ステップS5に進み、デプス値比較及び画素書き込みが行なわれる。   In step S <b> 3, it is determined whether or not a block including the target pixel position is stored in the drawing & depth data RAM 62. When the block including the target pixel position is stored in the drawing & depth data RAM 62, the process proceeds to step S5, where depth value comparison and pixel writing are performed. If the block including the pixel position of interest is not stored in the drawing & depth data RAM 62, a drawing & depth data RAM replacement process is executed in step S4. As a result, the block data (depth value and drawing color data) currently stored in the drawing & depth data RAM 62 is stored in the external memory 66, and the block data including the target pixel position is read out from the external memory 66. The drawing & depth data is stored in the RAM 62. Here, the process of storing the data currently stored in the drawing & depth data RAM 62 in the external memory 66 is executed in order to reflect the update process performed on the local data in the data on the external memory 66. After this replacement process, the process proceeds to step S5, where depth value comparison and pixel writing are performed.

デプス値比較及び画素書き込み処理は、グラフィクス描画コア61により実行される。このデプス値比較及び画素書き込み処理では、着目画素に対して計算された着目ポリゴンのデプス値と既に描画済みのデータのデプス値(描画&デプスデータRAM62に格納されているデプス値)とを比較する。着目ポリゴンの方が、描画済みのデータよりも手前に位置するのであれば描画処理及びデプス値更新処理を行なう。即ち、ステップS2で生成された描画色を、描画&デプスデータRAM62に格納されているブロックの着目画素の描画色として書き込む(既存の描画色データに上書きする)。また更に、ステップS2で生成されたデプス値を、描画&デプスデータRAM62に格納されているブロックの着目画素のデプス値として書き込む(既存のデプスデータに上書きする)。なお着目ポリゴンの方が、描画済みのデータよりも奥に位置するのであれば描画処理及びデプス値更新処理を行なわない。   The depth value comparison and the pixel writing process are executed by the graphics drawing core 61. In this depth value comparison and pixel writing process, the depth value of the target polygon calculated for the target pixel is compared with the depth value of the already drawn data (the depth value stored in the drawing & depth data RAM 62). . If the target polygon is positioned in front of the drawn data, the drawing process and the depth value update process are performed. That is, the drawing color generated in step S2 is written as the drawing color of the pixel of interest in the block stored in the drawing & depth data RAM 62 (overwriting existing drawing color data). Furthermore, the depth value generated in step S2 is written as the depth value of the pixel of interest of the block stored in the drawing & depth data RAM 62 (overwriting existing depth data). If the target polygon is located behind the already drawn data, the drawing process and the depth value update process are not performed.

ステップS6で、ポリゴン図形内に未描画の画素があるか否かを判定する。未描画の画素が有る場合には、ステップS2に戻り、以降の処理を繰り返す。未描画の画素が無い場合には、着目ポリゴンの描画処理を終了する。   In step S6, it is determined whether or not there is an undrawn pixel in the polygon graphic. If there are undrawn pixels, the process returns to step S2 and the subsequent processing is repeated. If there is no undrawn pixel, the drawing process for the target polygon is terminated.

図8は、描画&デプスデータRAMの入れ替え処理を示す図である。ステップS1で、図6の圧縮回路部64がブロック符号化処理を実行する。即ち、描画&デプスデータRAM62に格納されるデプス値のブロックに対して、前述の浮動小数点データ分離、差分データ生成、及び可変長符号化の各処理が実行される。ステップS2で、図6のメモリコントローラ部65がブロックデータ出力処理を実行する。即ち、メモリコントローラ部65が、圧縮回路部64の生成した符号化データを、デプスバッファ67中の所定のブロック格納位置に格納すると共に、ブロック長データをブロック長バッファ68に格納する。   FIG. 8 is a diagram illustrating a process of replacing the drawing & depth data RAM. In step S1, the compression circuit unit 64 in FIG. 6 executes block coding processing. That is, the above-described processing of floating point data separation, differential data generation, and variable length encoding is executed on the block of depth values stored in the drawing & depth data RAM 62. In step S2, the memory controller unit 65 of FIG. 6 executes block data output processing. That is, the memory controller unit 65 stores the encoded data generated by the compression circuit unit 64 in a predetermined block storage position in the depth buffer 67 and stores the block length data in the block length buffer 68.

ステップS3で、図6のメモリコントローラ部65がブロックデータ読込処理を実行する。即ち、メモリコントローラ部65が、着目画素を含むブロックについて、ブロック長バッファ68のブロック長が示す長さのデータを、デプスバッファ67中の所定のブロック格納位置の先頭から読み出す。ステップS4で、図6の伸長回路部63がブロック復号化処理を実行する。即ち、ステップS3で読み出された符号化データを復号化して差分値データを生成し、差分値データに基づいて第1部分の値と第2部分の値とを算出し、第1部分(指数部)と第2部分(符号付き仮数部)とを結合することにより浮動小数点データを復元する。復元した浮動小数点形式のデプス値のブロックは、描画&デプスデータRAM62に格納される。   In step S3, the memory controller unit 65 in FIG. 6 executes block data read processing. That is, the memory controller unit 65 reads data having a length indicated by the block length of the block length buffer 68 from the head of a predetermined block storage position in the depth buffer 67 for the block including the target pixel. In step S4, the decompression circuit unit 63 in FIG. 6 executes block decoding processing. That is, the encoded data read in step S3 is decoded to generate difference value data, the first part value and the second part value are calculated based on the difference value data, and the first part (exponent) Part) and the second part (signed mantissa part) are combined to restore the floating point data. The restored floating-point format depth value block is stored in the drawing & depth data RAM 62.

なお描画色データについても、描画&デプスデータRAM62の描画色データに対して必要に応じて所定の符号化処理が実行され、更に、外部メモリ66の所定の領域に書き込まれる。また更に、着目画素を含むブロックについて、外部メモリ66の所定の領域から描画色データが描画&デプスデータRAM62に読み込まれる。この時、必要に応じて復号化処理が実行される。   As for the drawing color data, a predetermined encoding process is performed on the drawing color data in the drawing & depth data RAM 62 as necessary, and the drawing color data is written in a predetermined area of the external memory 66. Further, for the block including the pixel of interest, the drawing color data is read from the predetermined area of the external memory 66 into the drawing & depth data RAM 62. At this time, a decoding process is executed as necessary.

図9は、図8のステップS1のブロック符号化処理の流れを示すフローチャートである。ブロック符号化処理が開始されると、ステップS1で、データ符号化処理が実行される。これは描画&デプスデータRAM62に格納されるブロックの各画素のデプス値に対して、前述の浮動小数点データ分離、差分データ生成、及び可変長符号化の各処理を実行するものである。ステップS2で、ブロック内に未符号化のデータが残っているか否かを判定する。未符号化のデータが有る場合には、ステップS1に戻り、処理を繰り返す。未符号化のデータが無い場合には、ブロック符号化処理を終了する。   FIG. 9 is a flowchart showing the flow of the block encoding process in step S1 of FIG. When the block encoding process is started, the data encoding process is executed in step S1. This executes the above-described floating point data separation, difference data generation, and variable length encoding processing on the depth value of each pixel of the block stored in the drawing & depth data RAM 62. In step S2, it is determined whether uncoded data remains in the block. If there is unencoded data, the process returns to step S1 and the process is repeated. If there is no unencoded data, the block encoding process is terminated.

図10は、図8のステップS4のブロック復号化処理の流れを示すフローチャートである。ブロック復号化処理が開始されると、ステップS1で、データ復号化処理が実行される。これは外部メモリ66から読み出されたブロックの各画素の符号化デプス値に対して、前述の復号化、差分値データからの各データの復元、及び浮動小数点データの復元の各処理を実行するものである。ステップS2で、読み込んだデータ内に未復号化のデータが残っているか否かを判定する。未復号化のデータが有る場合には、ステップS1に戻り、処理を繰り返す。未復号化のデータが無い場合には、ブロック復号化処理を終了する。   FIG. 10 is a flowchart showing the flow of the block decoding process in step S4 of FIG. When the block decoding process is started, the data decoding process is executed in step S1. This executes the above-described decoding, restoration of each data from the difference value data, and restoration of the floating-point data on the coded depth value of each pixel of the block read from the external memory 66. Is. In step S2, it is determined whether or not undecoded data remains in the read data. If there is undecrypted data, the process returns to step S1 and the process is repeated. If there is no undecoded data, the block decoding process is terminated.

図11は、図8のステップS2のブロックデータ出力処理の流れを示すフローチャートである。ステップS1で、ブロックデータ長を算出する。即ち、圧縮回路部64による可変長符号化により生成された符号化データの長さ(ビット長又はバイト長等)を算出する。ステップS2で、外部メモリ66のデプスバッファ67の所定のブロック位置にブロックデータを書き込む。ステップS3で、ブロックデータ長を書き出す。即ち、外部メモリ66のブロック長バッファ68に、ステップS1で算出したブロックデータ長を示すデータを書き込む。   FIG. 11 is a flowchart showing the flow of block data output processing in step S2 of FIG. In step S1, the block data length is calculated. That is, the length (bit length, byte length, etc.) of the encoded data generated by the variable length encoding by the compression circuit unit 64 is calculated. In step S2, block data is written in a predetermined block position of the depth buffer 67 of the external memory 66. In step S3, the block data length is written. That is, data indicating the block data length calculated in step S1 is written into the block length buffer 68 of the external memory 66.

図12は、メモリの構造を示す図である。外部メモリ66のメモリ空間中にデプスバッファ67の領域とブロック長バッファ68の領域とが設けられている。なお描画色データを書き込む領域も、外部メモリ66のメモリ空間中に設けられている。デプスバッファ67は、複数のブロック領域121に分割されている。各ブロック領域は予め決められた固定長であり、符号化データ125は、各ブロック領域の先頭から詰めて格納される。ブロック長バッファ68は、複数のブロックデータ長格納領域122に分割されている。各ブロックデータ長格納領域には、対応するブロックに格納される符号化データ125のデータ長を示すデータが格納されている。例えば、3番目のブロックデータ長格納領域には、3番目のブロックに格納される符号化データ125(ブロック2データ)のデータ長を示すデータ(ブロック2データ長)が格納されている。   FIG. 12 is a diagram illustrating the structure of the memory. A depth buffer 67 area and a block length buffer 68 area are provided in the memory space of the external memory 66. An area for writing drawing color data is also provided in the memory space of the external memory 66. The depth buffer 67 is divided into a plurality of block areas 121. Each block area has a predetermined fixed length, and the encoded data 125 is stored from the beginning of each block area. The block length buffer 68 is divided into a plurality of block data length storage areas 122. Each block data length storage area stores data indicating the data length of the encoded data 125 stored in the corresponding block. For example, data (block 2 data length) indicating the data length of the encoded data 125 (block 2 data) stored in the third block is stored in the third block data length storage area.

図13は、図8のステップS3のブロックデータ読込処理の流れを示すフローチャートである。ステップS1で、ブロックデータ長を読み込む。即ち、所望のブロックについて、ブロック長バッファ68に格納されているデータ長を示すデータを読み込む。ステップS2で、ブロックデータを読み込む。即ち、ステップS1で読み込んだデータが示すデータ長分のバイト数(又はワード数等)のデータをデプスバッファ67の対応するブロックから読み出す。   FIG. 13 is a flowchart showing the flow of the block data reading process in step S3 of FIG. In step S1, the block data length is read. That is, for the desired block, data indicating the data length stored in the block length buffer 68 is read. In step S2, block data is read. That is, the data corresponding to the data length indicated by the data read in step S 1 is read from the corresponding block of the depth buffer 67.

図14は、図8のステップS1に示すデータ符号化処理を実行する構成及び処理の流れを示す図である。図14に示す構成は、図6の圧縮回路部64の構成に相当し、Z値入力部141、浮動小数分離部142、1階差分生成部143、2階差分生成部144、差分データ分割部145、符号化部146、及び符号化テーブル147を含む。データ符号化処理が開始されると、Z値入力部141は、描画&デプスデータRAM62から着目画素のデプス値を読み込む。浮動小数分離部142は、デプス値の浮動小数点データを指数部の第1部分と符号及び仮数部の第2部分との2つの部分に分離する。1階差分生成部143は、上記第1部分と第2部分との各々について別個に、1階差分を求める。即ち、着目画素に隣接する画素(前回読み込んだ画素)の第1部分と着目画素の第1部分との差分を求めると共に、着目画素に隣接する画素(前回読み込んだ画素)の第2部分と着目画素の第2部分との差分を求める。隣接する画素(前回読み込んだ画素)の第1部分と第2部分のとのデータは内部レジスタ等に保持しておいてよい。2階差分生成部144は、第1部分と第2部分との各々について別個に、1階差分値に基づいて2階差分を求める。例えば、着目画素に隣接する画素(前回読み込んだ画素)について求めた1階差分値と着目画素について求めた1階差分値との差分を求める。隣接する画素(前回読み込んだ画素)の1階差分値のデータは内部レジスタ等に保持しておいてよい。   FIG. 14 is a diagram showing a configuration for executing the data encoding process shown in step S1 of FIG. 8 and a flow of the process. The configuration shown in FIG. 14 corresponds to the configuration of the compression circuit unit 64 in FIG. 6, and includes a Z value input unit 141, a floating-point separation unit 142, a first-order difference generation unit 143, a second-order difference generation unit 144, and a difference data division unit. 145, an encoding unit 146, and an encoding table 147. When the data encoding process is started, the Z value input unit 141 reads the depth value of the pixel of interest from the drawing & depth data RAM 62. The floating point separation unit 142 separates the floating point data of the depth value into two parts, a first part of the exponent part and a second part of the sign and mantissa part. The first floor difference generation unit 143 obtains a first floor difference separately for each of the first part and the second part. That is, the difference between the first portion of the pixel adjacent to the target pixel (previously read pixel) and the first portion of the target pixel is obtained, and the second portion of the pixel adjacent to the target pixel (previously read pixel) and the target A difference from the second part of the pixel is obtained. Data of the first part and the second part of adjacent pixels (pixels read last time) may be held in an internal register or the like. The second floor difference generation unit 144 obtains the second floor difference based on the first floor difference value separately for each of the first part and the second part. For example, the difference between the first-order difference value obtained for the pixel adjacent to the target pixel (the pixel read last time) and the first-order difference value obtained for the target pixel is obtained. Data of the first-order difference value of adjacent pixels (pixels read last time) may be held in an internal register or the like.

差分データ分割部145は、少なくとも第2部分について求めた2階差分値のデータをビット数のより少ない複数のデータに分割する。符号化部146は、符号化テーブル147を参照して、第1部分と第2部分との各々について求めた2階差分値を可変長符号化する。なおブロックの先頭画素の第1部分と第2部分とのデータについては、1階差分演算に用いられると共に、そのまま符号化データとして出力される。このデータについては、符号化処理してから出力してもよい。またブロックの先頭画素及び次の画素の第1部分と第2部分との1階差分値については、2階差分演算に用いられると共に、そのまま符号化データとして出力される。この1階差分値については、符号化処理してから出力してもよい。   The difference data dividing unit 145 divides the second-order difference value data obtained for at least the second portion into a plurality of data having a smaller number of bits. The encoding unit 146 refers to the encoding table 147 and performs variable-length encoding on the second-order difference value obtained for each of the first part and the second part. Note that the data of the first part and the second part of the first pixel of the block are used for the first-order difference calculation and output as encoded data as they are. This data may be output after being encoded. Further, the first-order difference value between the first pixel and the second part of the first pixel and the next pixel of the block is used for the second-order difference calculation and is directly output as encoded data. The first-order difference value may be output after being encoded.

図15は、図8のステップS4に示すデータ復号化処理を実行する構成及び処理の流れを示す図である。図15に示す構成は、図6の伸長回路部63の構成に相当し、復号化部151、差分データ結合部152、2階差分加算部153、1階差分加算部154、浮動小数結合部155、Z値出力部156、及び復号化テーブル157を含む。データ符号化処理が開始されると、復号化部151は、符号化されたデプス値(第1部分と第2部分とに分離されたデータ)を受け取り、復号化テーブル157を参照して、復号化データを求める。この際、先頭画素のデプス値と先頭画素及び次の画素の1階差分値とは、符号化されていないので、そのままの値がそれぞれ浮動小数結合部155と2階差分加算部153とに送られる。差分データ結合部152は、復号化部151により可変長復号されたデータの第2部分に相当するデータを結合することにより、26ビット整数データの2階差分データを生成する。2階差分加算部153は、2階差分値を直前の2階差分値に加算することにより1階差分値を生成する。1階差分加算部154は、1階差分値を直前の1階差分値に加算することにより1階差分値を生成する。これにより、第1部分である指数部データと第2部分である符号付き仮数部データとを生成する。これらのデータは浮動小数結合部155により結合されて、浮動小数形式のデータに変換される。Z値出力部156は、浮動小数点データをデプス値として出力する。なお符号化及び復号化に使用する符号化テーブル及び復号化テーブルとしては、それぞれの処理対象毎に異なった値のテーブルを用意すれば最適化をおこなうことができる。或いは、共通化することによりテーブル容量を小さくしてもよい。   FIG. 15 is a diagram showing a configuration for executing the data decoding process shown in step S4 of FIG. 8 and a flow of the process. The configuration shown in FIG. 15 corresponds to the configuration of the decompression circuit unit 63 of FIG. , A Z value output unit 156, and a decoding table 157. When the data encoding process is started, the decoding unit 151 receives the encoded depth value (data separated into the first part and the second part) and refers to the decoding table 157 to perform decoding. Find the data. At this time, since the depth value of the first pixel and the first-order difference value of the first pixel and the next pixel are not encoded, the values as they are are sent to the floating-point combination unit 155 and the second-order difference addition unit 153, respectively. It is done. The difference data combining unit 152 generates second-order difference data of 26-bit integer data by combining data corresponding to the second portion of the data variable-length decoded by the decoding unit 151. Second floor difference addition section 153 generates the first floor difference value by adding the second floor difference value to the immediately preceding second floor difference value. The first floor difference adding unit 154 generates a first floor difference value by adding the first floor difference value to the immediately preceding first floor difference value. Thereby, exponent part data as the first part and signed mantissa part data as the second part are generated. These data are combined by the floating-point coupling unit 155 and converted into data in the floating-point format. The Z value output unit 156 outputs floating point data as a depth value. Note that the encoding table and the decoding table used for encoding and decoding can be optimized by preparing tables having different values for each processing target. Alternatively, the table capacity may be reduced by sharing the table capacity.

上記の処理により、32ビット浮動小数で表現されるデプス値を誤差無く圧縮することができる。非圧縮の元データに対する圧縮後のデータの圧縮率としては、20%〜30%を実現することができる。   By the above processing, the depth value expressed by a 32-bit floating point number can be compressed without error. As a compression ratio of the compressed data with respect to the uncompressed original data, 20% to 30% can be realized.

以上、本発明を実施例に基づいて説明したが、本発明は上記実施例に限定されるものではなく、特許請求の範囲に記載の範囲内で様々な変形が可能である。   As mentioned above, although this invention was demonstrated based on the Example, this invention is not limited to the said Example, A various deformation | transformation is possible within the range as described in a claim.

60 グラフィクスLSI
61 グラフィクス描画コア
62 描画&デプスデータRAM
63 伸長回路部
64 圧縮回路部
65 メモリコントローラ部
66 外部メモリ
67 デプスバッファ
68 ブロック長バッファ
60 Graphics LSI
61 Graphics Drawing Core 62 Drawing & Depth Data RAM
63 Decompression circuit unit 64 Compression circuit unit 65 Memory controller unit 66 External memory 67 Depth buffer 68 Block length buffer

Claims (5)

3次元グラフィックス描画の1つの画素のデプス値を示す浮動小数点データを指数部の第1部分と符号及び仮数部の第2部分との2つの部分に分離する浮動小数分離部と、
前記第1部分の予測値と前記第1部分の値との差分である第1の差分値を整数データとして演算するとともに、前記第2部分の予測値と前記第2部分の値との差分である第2の差分値を整数データとして演算する差分生成部と、
前記第1の差分値と前記第2の差分値とを可変長符号化する符号化器と
を含むことを特徴とする画像データ処理装置。
A floating-point separator that separates floating-point data indicating the depth value of one pixel of three-dimensional graphics rendering into two parts, a first part of the exponent part and a second part of the sign and mantissa part;
The first difference value, which is the difference between the predicted value of the first part and the value of the first part, is calculated as integer data, and the difference between the predicted value of the second part and the value of the second part A difference generation unit that calculates a second difference value as integer data;
An image data processing apparatus comprising: an encoder that performs variable length coding on the first difference value and the second difference value.
着目画素に対する前記予測値は、前記着目画素の周辺画素の平均値であることを特徴とする請求項1記載の画像データ処理装置。   The image data processing apparatus according to claim 1, wherein the predicted value for the target pixel is an average value of peripheral pixels of the target pixel. 前記符号化器は、少なくとも前記第2の差分値のデータをビット数のより少ない複数のデータに分割する差分データ分割部を含み、前記差分データ分割部が分割した前記複数のデータを別個に可変長符号化することを特徴とする請求項1又は2記載の画像データ処理装置。   The encoder includes a difference data dividing unit that divides at least the data of the second difference value into a plurality of data having a smaller number of bits, and the plurality of pieces of data divided by the difference data dividing unit are individually variable. 3. The image data processing apparatus according to claim 1, wherein the image data processing apparatus performs long encoding. 前記符号化器により符号化されたデータを復号化して前記第1の差分値と前記第2の差分値とを生成する復号化部と、
前記復号化器により復号化された前記第1の差分値と前記第2の差分値とに基づいて前記第1部分の値と前記第2部分の値とを算出する差分加算部と、
前記差分加算部により算出された前記第1部分の値と前記第2部分の値とを結合することにより前記浮動小数点データを復元する浮動小数結合部と
を更に含むことを特徴とする請求項1乃至3何れか一項記載の画像データ処理装置。
A decoding unit that decodes data encoded by the encoder to generate the first difference value and the second difference value;
A difference adding unit that calculates the value of the first part and the value of the second part based on the first difference value and the second difference value decoded by the decoder;
2. The method according to claim 1, further comprising: a floating point coupling unit that restores the floating point data by coupling the value of the first part and the value of the second part calculated by the difference adding unit. 4. The image data processing device according to any one of items 3 to 3.
前記差分データ分割部は、前記第2の差分値のデータを3つのデータに分割することを特徴とする請求項3又は4記載の画像データ処理装置。   The image data processing apparatus according to claim 3 or 4, wherein the difference data dividing unit divides the data of the second difference value into three data.
JP2010040279A 2010-02-25 2010-02-25 Image data processor Withdrawn JP2011175542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010040279A JP2011175542A (en) 2010-02-25 2010-02-25 Image data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010040279A JP2011175542A (en) 2010-02-25 2010-02-25 Image data processor

Publications (1)

Publication Number Publication Date
JP2011175542A true JP2011175542A (en) 2011-09-08

Family

ID=44688330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010040279A Withdrawn JP2011175542A (en) 2010-02-25 2010-02-25 Image data processor

Country Status (1)

Country Link
JP (1) JP2011175542A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013105157A1 (en) * 2012-01-13 2013-07-18 パナソニック株式会社 Image generating device, image generating method, image generating program, and integrated circuit
WO2013190690A1 (en) * 2012-06-21 2013-12-27 三菱電機株式会社 Encoding device, decoding device, encoding method, encoding program, decoding method, and decoding program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013105157A1 (en) * 2012-01-13 2013-07-18 パナソニック株式会社 Image generating device, image generating method, image generating program, and integrated circuit
US9165400B2 (en) 2012-01-13 2015-10-20 Panasonic Intellectual Property Management Co., Ltd. Image generation apparatus, image generation method, image generation program, and integrated circuit for rendering a target pixel in a target scene by using Z-buffering
WO2013190690A1 (en) * 2012-06-21 2013-12-27 三菱電機株式会社 Encoding device, decoding device, encoding method, encoding program, decoding method, and decoding program
JP5619326B2 (en) * 2012-06-21 2014-11-05 三菱電機株式会社 Encoding device, decoding device, encoding method, encoding program, decoding method, and decoding program
US8947274B2 (en) 2012-06-21 2015-02-03 Mitsubishi Electric Corporation Encoding apparatus, decoding apparatus, encoding method, encoding program, decoding method, and decoding program

Similar Documents

Publication Publication Date Title
US11625883B2 (en) Random accessible lossless parameter data compression for tile based 3D computer graphics systems
JP5573316B2 (en) Image processing method and image processing apparatus
GB2550965B (en) Encoding and decoding arrays of data elements
JPH1098719A (en) Image data transmitting method, image processor, and recording medium
KR20160146542A (en) Video processing system
US20130033513A1 (en) Texture compression and decompression
EP2504814B1 (en) Decoding system and method operable on encoded texture element blocks
US10186236B2 (en) Universal codec
US9336561B2 (en) Color buffer caching
JP2011175542A (en) Image data processor
JP5367552B2 (en) Image processing apparatus and image processing program
US20070002044A1 (en) System and method for a compressed hierarachical stencil buffer
KR102531605B1 (en) Hybrid block based compression
US7911478B2 (en) Drawing device, drawing method, and drawing program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20130507