JP2007293827A - Table value converter, and table value conversion and writing method - Google Patents
Table value converter, and table value conversion and writing method Download PDFInfo
- Publication number
- JP2007293827A JP2007293827A JP2007079022A JP2007079022A JP2007293827A JP 2007293827 A JP2007293827 A JP 2007293827A JP 2007079022 A JP2007079022 A JP 2007079022A JP 2007079022 A JP2007079022 A JP 2007079022A JP 2007293827 A JP2007293827 A JP 2007293827A
- Authority
- JP
- Japan
- Prior art keywords
- value
- conversion
- conversion module
- macro
- table value
- 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
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 351
- 238000000034 method Methods 0.000 title claims abstract description 66
- 238000012937 correction Methods 0.000 claims abstract description 159
- 230000015654 memory Effects 0.000 claims abstract description 71
- 238000012545 processing Methods 0.000 claims description 111
- 238000004364 calculation method Methods 0.000 claims description 61
- 230000008569 process Effects 0.000 claims description 28
- 230000006870 function Effects 0.000 claims description 24
- 230000009466 transformation Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 14
- 230000000694 effects Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
本発明は、ルックアップテーブルとして格納されているテーブルメモリの値を変換する上で有益なテーブル値変換装置及びテーブル値変換書き込み方法に関するものである。 The present invention relates to a table value conversion apparatus and a table value conversion writing method useful for converting values in a table memory stored as a lookup table.
通常、電子カメラ、デジタル複写機、レーザプリンタ等には、取得したデジタル画像データを所要に変換処理する画像処理装置が備えられている。そして、この種の画像処理装置には一般に、ルックアップテーブル(LUT)方式のテーブルメモリが設けられており、このテーブルメモリに例えば色補正値として格納されているテーブル値に基づいて画像データを変換することにより色補正が行われる。具体的には、取得した画像データをアドレスとして上記テーブルメモリをアクセスし、そのアドレスに対応したテーブル値を同テーブルメモリから読み出すことによって、この取得した画像データに対する色補正が実行される。 In general, an electronic camera, a digital copying machine, a laser printer, and the like are provided with an image processing device that converts acquired digital image data as required. In general, this type of image processing apparatus is provided with a look-up table (LUT) table memory, and image data is converted based on, for example, a table value stored as a color correction value in the table memory. By doing so, color correction is performed. Specifically, the table memory is accessed using the acquired image data as an address, and a table value corresponding to the address is read from the table memory, whereby color correction is performed on the acquired image data.
ところで、このようなLUT方式のテーブルメモリを用いて色補正を行う画像処理装置では、例えば出力する画像データのガンマ補正や、コントラスト又は彩度等の特性を強調すべく、上記テーブルメモリに格納されたテーブル値の書き換えが必要になることがある。そこで従来より、このようなテーブルメモリの書き換えを実現するための方法として、図13に例示するようないくつかの方法が提案されている。まず、その第1の方法では、図13(a)に示すように、各種特性に対応する複数のテーブルメモリTMを予めROM60に備えるとともに、例えばコントラストを強調させたいときにその特性に対応するテーブルメモリTMをCPU61を通じて読み込む。そして、その読み込んだテーブルメモリTMの値に基づいてマクロ62の持つLUT63を書き換えるようにしている(例えば特許文献1参照)。
By the way, in an image processing apparatus that performs color correction using such a LUT table memory, for example, gamma correction of image data to be output, and characteristics such as contrast or saturation are stored in the table memory. The table value may need to be rewritten. Therefore, conventionally, several methods as exemplified in FIG. 13 have been proposed as methods for realizing such rewriting of the table memory. First, in the first method, as shown in FIG. 13A, a plurality of table memories TM corresponding to various characteristics are provided in the
また、第2の方法では、図13(b)に示すように、予め基準となる基準テーブルメモリSTMをROM60に備えるとともに、CPU64を通じてその基準テーブルメモリSTMから読み込んだ値を適宜に補正し、この補正した値に基づいてマクロ62の持つLUT63を書き換えるようにしている(例えば特許文献2参照)。
Further, in the second method, as shown in FIG. 13B, a reference table memory STM serving as a reference is provided in the
そして、第3の方法として、図13(c)に示すように、LUT63を有するマクロ62に対して専用の演算器65を設置するようにし、LUT63を介して出力される画像データをこの演算器65を通じて所要に演算処理することによって、上記取得した画像データに必要とされる補正や強調処理等を施すようにした方法なども考えられている。
これらいずれの方法を採用する場合であれ、LUT方式のテーブルメモリに格納されているテーブル値の書き換え、もしくはテーブル値の演算処理が行われることで、上記取得した画像データに対する各種補正等は確かに可能となる。ただし、これらいずれの方法も、実用上はそれぞれ以下のような不都合の存在が無視できず、いまだ改良の余地を残すものとなっている。 Regardless of which method is used, rewriting of the table value stored in the LUT table memory or calculation processing of the table value is performed, so that various corrections to the acquired image data are surely performed. It becomes possible. However, in any of these methods, the following disadvantages cannot be ignored in practical use, and there is still room for improvement.
すなわち、図13(a)に示した第1の方法の場合には、通常、プログラムメモリとして用いられるROM60内に複数のテーブルメモリTMを用意することになるため、ROM60自体のメモリ容量が増大するという問題がある。また、図13(b)に示した第2の方法の場合には、CPU64が補正演算を行うことになるため、その演算負荷が増大し、ひいては画像処理にかかる全体の処理時間が増大してしまうといった問題がある。そして、図13(c)に示した第3の方法の場合には、一つのマクロに対して専用の一つの演算器を設置する必要があるため、マクロが増加するとそれに合わせて演算器も増加せざるを得ず、コストの増大が避けられない。
That is, in the case of the first method shown in FIG. 13A, since a plurality of table memories TM are usually prepared in the
本発明は上記問題点を解決するためになされたものであって、その目的は、ルックアップテーブル方式のテーブルメモリに格納されている値をより簡便且つ効率的に書き換えることのできるテーブル値変換装置及びテーブル値変換書き込み方法を提供することにある。 SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to provide a table value conversion apparatus that can more easily and efficiently rewrite values stored in a look-up table type table memory. And providing a table value conversion writing method.
上記目的を達成するため、請求項1に記載の発明では、雛形となるテーブル値が格納されているメモリから読み出されるテーブル値を補正し、特定の処理を行うハードウェアである機能マクロの別に設けられたルックアップテーブルのテーブル値を前記補正された値に基づいて書き換えるテーブル値変換装置であって、前記メモリから雛形となるテーブル値を読み出す中央演算処理装置の外部バス上に、同中央演算処理装置から出力されるデータに対して特定の補正演算を施しつつこの演算値に基づき前記マクロの持つルックアップテーブルのテーブル値を変換する変換モジュールを介在させることとした。 To achieve the above object, according to the first aspect of the present invention, a table value read from a memory storing a template table value is corrected, and a function macro that is hardware for performing a specific process is provided separately. A table value conversion device that rewrites a table value of a look-up table based on the corrected value, wherein the central processing processing is performed on an external bus of a central processing device that reads a table value as a template from the memory A conversion module for converting the table value of the lookup table of the macro based on the calculated value while performing a specific correction calculation on the data output from the apparatus is interposed.
このような構成によれば、中央演算処理装置すなわちCPUは、単に上記メモリから雛形となるテーブル値を読み出してこれをその外部バス(データバス)に出力するのみで、この出力されたテーブル値が、上記外部バス上に介在する変換モジュールによる補正演算を通じて自動的に変換されて対応するマクロの持つルックアップテーブルに書き込まれるようになる。これにより、上記メモリ(ROM)に格納すべきテーブル値についてはこれを最小限に抑えることができるとともに、CPUの演算負荷も大幅に軽減されるようになり、しかも、上記マクロの別にたとえ複数のルックアップテーブルが設けられる場合であれ、単一の変換モジュールを通じてそれらルックアップテーブルに書き込むべきテーブル値を変換することが可能となる。すなわち、簡便な構成でありながら、極めて効率のよいテーブル値の変換が実現されるようになる。 According to such a configuration, the central processing unit, that is, the CPU simply reads out the table value as a template from the memory and outputs it to the external bus (data bus). Then, it is automatically converted through a correction operation by a conversion module interposed on the external bus and written into a look-up table of a corresponding macro. As a result, the table values to be stored in the memory (ROM) can be minimized, and the calculation load on the CPU can be greatly reduced. Even if lookup tables are provided, table values to be written to the lookup tables can be converted through a single conversion module. That is, the table value can be converted very efficiently with a simple configuration.
請求項2に記載の発明では、前記変換モジュールは、同変換モジュールに設定される変換パラメータに従って前記特定の補正演算を実行することとした。変換モジュールをこのような構成とすることにより、上記補正演算にかかる自由度が増し、ひいては各種マクロの内容に応じたテーブル値の変換等も可能となる。 According to a second aspect of the present invention, the conversion module executes the specific correction calculation according to a conversion parameter set in the conversion module. With such a configuration of the conversion module, the degree of freedom for the correction calculation is increased, and conversion of table values according to the contents of various macros is possible.
請求項3に記載の発明では、前記変換モジュールに設定される変換パラメータが乗算値及び加算値及びクリップ下限値及びクリップ上限値からなり、前記乗算値をM、前記加算値をA、前記クリップ下限値をL、前記クリップ上限値をHとし、前記中央演算処理装置から出力されるデータをDATAin、前記変換モジュールが出力する演算値をDATAoutとするとき、前記変換モジュールは、前記補正演算として、演算
DATAout=max(L,min(H,DATAin×M+A))
ただし、max(a,b):a,bのうちの大きい方を選択する関数
min(a,b):a,bのうちの小さい方を選択する関数
を実行することとした。変換モジュールによる補正演算としてこのような演算手法を導入することにより、基本的には上記乗算値Mや加算値Aの設定を通じた自由度の高いテーブル値の変換が可能になるとともに、上記クリップ下限値L及びクリップ上限値Hの併用を通じて、いわばノイズ成分となるような所定の範囲から大きく外れるテーブル値の出現を好適に抑制することができるようにもなる。
According to a third aspect of the present invention, the conversion parameter set in the conversion module includes a multiplication value, an addition value, a clip lower limit value, and a clip upper limit value. The multiplication value is M, the addition value is A, and the clip lower limit value. When the value is L, the clip upper limit value is H, the data output from the central processing unit is DATAin, and the operation value output by the conversion module is DATAout, the conversion module calculates the correction operation as the correction operation.
DATAout = max (L, min (H, DATAin × M + A))
However, max (a, b): a function for selecting the larger of a and b
min (a, b): function that selects the smaller of a and b
It was decided to execute. By introducing such a calculation method as a correction calculation by the conversion module, it is basically possible to convert a table value with a high degree of freedom through the setting of the multiplication value M and the addition value A, and the clip lower limit. Through the combined use of the value L and the clip upper limit value H, it is possible to suitably suppress the appearance of a table value that deviates greatly from a predetermined range that becomes a noise component.
請求項4に記載の発明では、前記変換モジュールにより前記特定の補正演算の施されたデータに基づき前記テーブル値が書き換えられた前記マクロの持つルックアップテーブルから前記中央演算処理装置によって読み出される該書き換え後のテーブル値を、前記特定の補正演算の施される前のデータに相当するデータに逆変換して、該逆変換後のデータを前記中央演算処理装置に出力する逆変換モジュールを備えることとした。 According to a fourth aspect of the present invention, the rewrite read out by the central processing unit from a look-up table of the macro in which the table value is rewritten based on the data subjected to the specific correction operation by the conversion module. A reverse conversion module that reversely converts the later table value into data corresponding to the data before the specific correction calculation, and outputs the data after the reverse conversion to the central processing unit; did.
このような構成によれば、中央演算処理装置から出力されるライトデータとしてのテーブル値と、リードデータとして中央演算処理装置に入力されるテーブル値、すなわち逆変換後のデータとを同一値にすることができる。従って、例えばライトデータとリードデータとが不一致の場合に書き込みエラーと判断してしまうICE(In-Circuit Emulator)を中央演算処理装置として利用した場合であっても、書き込みエラーと判断されることを好適に抑制することができる。 According to such a configuration, the table value as write data output from the central processing unit and the table value input to the central processing unit as read data, that is, the data after reverse conversion are set to the same value. be able to. Therefore, for example, even when an ICE (In-Circuit Emulator) that determines a write error when the write data and the read data do not match is used as the central processing unit, it is determined that the write error is detected. It can suppress suitably.
請求項5に記載の発明では、前記変換モジュールは、同変換モジュールに設定される変換パラメータに従って前記特定の補正演算を実行することとした。変換モジュールをこのような構成とすることにより、上記補正演算にかかる自由度が増し、ひいては各種マクロの内容に応じたテーブル値の変換等も可能となる。また、前記逆変換モジュールは、前記変換パラメータに応じて該逆変換モジュールに設定される逆変換パラメータに従って前記逆変換を実行することとした。この逆変換モジュールに設定される逆変換パラメータにより、自由度の高い補正演算によって変換されたテーブル値についても確実に逆変換を実行することができる。 In the invention according to claim 5, the conversion module executes the specific correction calculation according to a conversion parameter set in the conversion module. With such a configuration of the conversion module, the degree of freedom for the correction calculation is increased, and conversion of table values according to the contents of various macros is possible. Further, the inverse transformation module performs the inverse transformation according to an inverse transformation parameter set in the inverse transformation module according to the transformation parameter. By the inverse transformation parameter set in the inverse transformation module, the inverse transformation can be surely executed even for the table value transformed by the correction operation with a high degree of freedom.
請求項6に記載の発明では、前記変換モジュールには、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルの所定アドレスが同変換モジュールにおける前記演算値の書き込み先のアドレスとして前記中央演算処理装置から入力され、前記変換モジュールは、同変換モジュールに設定される変換パラメータ及び前記書き込み先のアドレスの少なくとも一方に応じて補正値を生成し、該補正値に従って前記特定の補正演算を実行することとした。 In the invention according to claim 6, the conversion module includes a predetermined address of a lookup table of the macro specified by the central processing unit as the write destination address of the operation value in the conversion module. Input from an arithmetic processing unit, the conversion module generates a correction value according to at least one of a conversion parameter set in the conversion module and the write destination address, and executes the specific correction calculation according to the correction value It was decided to.
変換モジュールをこのような構成とすることにより、例えば書き込み先のアドレスを利用して補正値を生成した場合には、書き込み先のアドレスに応じて変動する補正値を生成することができ、その補正値を通じて上記補正演算にかかる自由度をさらに向上させることができる。 By adopting such a configuration for the conversion module, for example, when a correction value is generated using a write destination address, a correction value that varies depending on the write destination address can be generated. The degree of freedom for the correction calculation can be further improved through the value.
請求項7に記載の発明では、前記変換モジュールは、前記書き込み先のアドレスから所定の基準アドレスを減算して、該書き込み先のアドレスを、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブル内におけるアドレスに変換することとした。 In the invention according to claim 7, the conversion module subtracts a predetermined reference address from the write destination address, and uses the look-up address of the macro specified by the central processing unit as the write destination address. It was decided to convert it to an address in the uptable.
変換モジュールをこのような構成とすることにより、中央演算処理装置により書き込み先に指定されるマクロの持つルックアップテーブル内におけるアドレスに応じて変動する補正値を生成することができる。そして、その生成された補正値を通じて、上記補正演算にかかる自由度がさらに増し、ひいては各種マクロの内容に応じたテーブル値の変換等も可能となる。 By adopting such a configuration for the conversion module, it is possible to generate a correction value that varies according to the address in the lookup table of the macro specified as the write destination by the central processing unit. Then, the degree of freedom for the correction calculation is further increased through the generated correction value, and conversion of table values according to the contents of various macros is possible.
請求項8に記載の発明では、前記変換モジュールには、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルの所定アドレスが同変換モジュールにおける前記演算値の書き込み先のアドレスとして前記中央演算処理装置から入力され、前記変換モジュールは、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルを複数の領域に分割しつつ、前記書き込み先のアドレスの属する前記領域に応じて、前記補正値を生成するための第2演算器に入力される補正係数を設定する係数制御回路を備えることとした。 In the invention according to claim 8, the conversion module has a predetermined address of a lookup table of the macro specified by the central processing unit as the write destination address of the operation value in the conversion module. Input from the arithmetic processing unit, the conversion module divides the lookup table of the macro specified by the central processing unit into a plurality of areas, according to the area to which the address of the write destination belongs, A coefficient control circuit for setting a correction coefficient input to the second arithmetic unit for generating the correction value is provided.
このような構成によれば、係数制御回路により、書き込み先に指定されるマクロの持つルックアップテーブルの各領域毎に、異なる補正係数を設定することが可能となる。この補正係数を通じて、上記補正演算に利用される補正値の設定の自由度を向上させることができる。 According to such a configuration, it is possible to set a different correction coefficient for each region of the lookup table possessed by the macro designated as the write destination by the coefficient control circuit. Through this correction coefficient, the degree of freedom for setting the correction value used for the correction calculation can be improved.
請求項9に記載の発明では、雛形となるテーブル値が格納されているメモリから読み出されるテーブル値を補正し、特定の処理を行うハードウェアである機能マクロの別に設けられたルックアップテーブルのテーブル値を前記補正された値に基づき変換して当該ルックアップテーブルに書き込むテーブル値変換書き込み方法であって、前記メモリから雛形となるテーブル値を読み出す中央演算処理装置の外部バス上に、同中央演算処理装置から出力されるデータに対して特定の補正演算を施しつつこの演算値に基づき前記マクロの持つルックアップテーブルのテーブル値を変換する変換モジュールを介在させ、同マクロの持つルックアップテーブルへのテーブル値の書き換え時には、この変換モジュールを通じて補正演算された演算値を該当するルックアップテーブルに対して書き込むこととした。 In the invention according to claim 9, a table of a lookup table provided separately from a function macro that is hardware for performing a specific process by correcting a table value read from a memory storing a table value as a template. A table value conversion writing method for converting a value based on the corrected value and writing the value into the lookup table, wherein the central calculation is performed on an external bus of a central processing unit that reads a table value as a template from the memory. A conversion module that converts the table value of the lookup table of the macro based on the computation value while performing a specific correction computation on the data output from the processing device is interposed to the lookup table of the macro. When rewriting table values, the calculated values corrected through this conversion module That it was decided to write to the look-up table.
テーブル値に関するこのような書き込み方法により、中央演算処理装置すなわちCPUは、単に上記メモリから雛形となるテーブル値を読み出してこれをその外部バス(データバス)に出力するのみで、この出力されたテーブル値が、上記外部バス上に介在する変換モジュールによる補正演算を通じて自動的に変換されて対応するマクロの持つルックアップテーブルに書き込まれるようになる。これにより、上記メモリ(ROM)に格納すべきテーブル値についてはこれを最小限に抑えることができるとともに、CPUの演算負荷も大幅に軽減されるようになり、しかも、上記マクロの別にたとえ複数のルックアップテーブルが設けられる場合であれ、単一の変換モジュールを通じてそれらルックアップテーブルに書き込むべきテーブル値を変換することが可能となる。すなわち、簡便な構成でありながら、極めて効率のよいテーブル値の変換が実現されるようになる。 By such a writing method relating to table values, the central processing unit, that is, the CPU simply reads out the template table values from the memory and outputs them to the external bus (data bus). The value is automatically converted through a correction operation by a conversion module interposed on the external bus and written into a lookup table of a corresponding macro. As a result, the table values to be stored in the memory (ROM) can be minimized, and the calculation load on the CPU can be greatly reduced. Even if lookup tables are provided, table values to be written to the lookup tables can be converted through a single conversion module. That is, the table value can be converted very efficiently with a simple configuration.
請求項10に記載の発明では、特定のマクロのルックアップテーブルに対応して前記変換モジュールに前記特定の補正演算のための変換パラメータを設定した後、
a.前記中央演算処理装置を通じて前記メモリから前記雛形となるテーブル値を1アドレス分だけ読み込む処理、
b.この読み込みに対応して前記中央演算処理装置から前記特定のマクロのルックアップテーブルに対して書き込むべく出力される当該テーブル値を前記変換モジュールを通じて前記設定された変換パラメータに基づく補正演算により変換する処理、
c.この変換されたテーブル値を前記特定のマクロのルックアップテーブルの所定のアドレスに書き込む処理、
といったa.〜c.の処理を、前記メモリからのテーブル値読み込みアドレスと前記特定のマクロのルックアップテーブルへのテーブル値書き込みアドレスとをインクリメントしつつ、前記ルックアップテーブルの全てのテーブル値が書き換わるまで繰り返し実行することとした。このようなテーブル値の変換書き込み方法を通じて、いかなるマクロに関してもそのルックアップテーブルに対する確実なテーブル値の書き換えが可能となる。
In the invention according to
a. A process of reading the table value as the template from the memory through the central processing unit by one address;
b. Corresponding to this reading, a process of converting the table value output from the central processing unit to be written to the lookup table of the specific macro by a correction operation based on the set conversion parameter through the conversion module ,
c. A process of writing the converted table value to a predetermined address of the lookup table of the specific macro;
A. ~ C. The above process is repeatedly executed until the table value read address from the memory and the table value write address to the lookup table of the specific macro are incremented until all the table values in the lookup table are rewritten. It was. Through such a table value conversion writing method, it is possible to reliably rewrite the table value for the lookup table for any macro.
以上説明したように、本発明によれば、ルックアップテーブル方式のテーブルメモリに格納されている値をより簡便且つ効率的に書き換えることができる。 As described above, according to the present invention, it is possible to more easily and efficiently rewrite values stored in a lookup table type table memory.
(第1実施形態)
以下、本発明にかかるテーブル値変換装置及びテーブル値変換書き込み方法の第1実施形態を図1〜図3に従って説明する。図1は、本実施形態にかかるテーブル変換装置の全体構成をブロック図として示したものである。
(First embodiment)
A first embodiment of a table value conversion apparatus and a table value conversion writing method according to the present invention will be described below with reference to FIGS. FIG. 1 is a block diagram showing the overall configuration of the table conversion apparatus according to this embodiment.
同図1に示されるように、このテーブル値変換装置は、大きくは、中央演算処理装置(CPU)10と、同CPU10の外部バスOB上に介在するように設けられた変換モジュール20と、同外部バスOBに共通接続されたROM30及びマクロ40とを備えて構成されている。
As shown in FIG. 1, this table value conversion apparatus is roughly divided into a central processing unit (CPU) 10 and a
ここで、上記CPU10は、画像取込装置などによって取得されるデジタル画像データ等に基づきそのデータを変換する変換指令やテーブル値変換書き込み指令等をマクロ40(正確にはそのうちの特定のマクロ)に与えるなど、画像処理等にかかる処理を統括的に制御する部分である。
Here, the
また、上記マクロ40は、特定の画像処理等の処理を行うハードウェア群であり、ここでの例では、マクロA41、マクロB42及びマクロC43といった3種のマクロを含む複数のマクロから構成されている。そして、各マクロA41〜マクロC43は、ルックアップテーブル方式のテーブルメモリとして各々特性の異なるLUT51、52及び53を有しており、通常は、CPU10から上記変換指令とともに何らかのデータ(値)が与えられることで、これを自らが持つLUTに基づき変換するなどの処理を行う。
The macro 40 is a hardware group that performs processing such as specific image processing. In this example, the macro 40 includes a plurality of macros including three types of macros such as a macro A41, a macro B42, and a macro C43. Yes. Each of the macros A41 to C43 has
また、これら各マクロA41〜マクロC43と上記CPU10との間の外部バスOB上に介在する上記変換モジュール20は、乗算・加算・クリップ等の演算機能を有して、主に上記LUT51〜53のテーブル値変換書き込みを実行する際のCPU10の処理を補助、仲介する部分である。すなわち、このテーブル値変換書き込みの実行に際し、上記CPU10は、外部バスOBに共通接続されている上記ROM30からLUT書き換え用の雛形となる基準テーブルメモリSTMのテーブル値TBを読み込んで、この読み込んだテーブル値TBを外部バスOBを介して変換モジュール20に出力する。またこれに先立ち、CPU10は、設定信号SSを通じて、上記テーブル値TBの補正演算に用いるための変換パラメータを変換モジュール20に対して設定する。ちなみに、ここでCPU10が変換モジュール20に対して設定する変換パラメータには、後に詳述するように、乗算値M、加算値A、クリップ上限値H及びクリップ下限値Lがある。こうして変換パラメータが設定され、且つテーブル値TBが与えられた変換モジュール20は、その与えられたテーブル値TBに対して上記設定された変換パラメータに基づく補正演算を実行し、その補正したテーブル値CTBを上記マクロ40のうちCPU10によって指定されている特定のマクロに出力する。これにより、該当するマクロのLUTがこの補正されたテーブル値CTBによって更新、すなわち書き換えられることとなる。
The
このように、この実施形態では、上記変換モジュール20をCPU10の外部バスOB上に介在させたことで、テーブル値の変換に際しても、CPU10は、単に上記ROM30から雛形となる基準テーブルメモリSTMのテーブル値TBを読み込んでこれを同外部バスOBに出力するのみで済むようになる。そして、こうして出力されたテーブル値TBが上記変換モジュール20による補正演算を通じて自動的に変換されて、指定されているマクロの持つLUTに書き込まれるようになる。
As described above, in this embodiment, since the
なお、上記変換モジュール20は、CPU10によるROM30からのテーブル値TBの読み込み時には、このROM30から読み出されたテーブル値TBをそのままCPU10に出力するように設定されている。また、同変換モジュール20は、上記各マクロのLUTを通じた通常のデータ変換処理(画像処理)の実行時には動作しないようにも設定されている。すなわち、この実施形態のテーブル値変換装置にあって、LUTを通じたこのようなデータ変換処理の実行中は変換モジュール20がいわゆる「スルー」状態となるように設定されている。
The
図2は、この実施形態のテーブル値変換装置に採用されている変換モジュール20の特に上記テーブル値変換を行う補正演算回路についてその内部構成例を示したブロック図であり、以下、この図2を参照して、同変換モジュール20による補正演算態様について詳述する。
FIG. 2 is a block diagram showing an example of the internal configuration of a correction arithmetic circuit that performs the table value conversion of the
この変換モジュール20は、その補正演算回路として、基本的には、乗算器21と、加算器22と、クリップ回路23とを備えている。このうち、乗算器21には、CPU10からの設定信号SSによってレジスタ等に設定される変換パラメータである乗算値Mが入力される。そして、この乗算器21は、上記CPU10から入力される基準テーブルメモリSTMのテーブル値TBである入力データDATAinに上記乗算値Mを乗算してその演算値V1を加算器22に出力する。また、加算器22には、同じくCPU10からの設定信号SSによってレジスタ等に設定される変換パラメータである加算値Aが入力される。そして、この加算器22は、上記演算値V1に上記加算値Aを加算してその演算値V2をクリップ回路23に出力する。
The
一方、クリップ回路23は、第1及び第2比較器25A,25Bと、第1及び第2選択回路26A,26Bを備えている。そしてこのクリップ回路23において、上記演算値V2はまず、第1比較器25A及び第1選択回路26Aに入力される。ここで、第1比較器25Aには、上記加算器22から入力される演算値V2に併せて、上述同様、CPU10からの設定信号SSによってレジスタ等に設定される変換パラメータであるクリップ上限値Hが入力される。そして、この第1比較器25Aでは、上記演算値V2とクリップ上限値Hとを比較して、演算値V2がクリップ上限値Hよりも大きいか否かを示す比較信号S1を第1選択回路26Aに出力する。ここで、この第1選択回路26Aにも、第1比較器25Aと同様に、演算値V2とクリップ上限値Hとが入力されており、この第1選択回路26Aでは、第1比較器25Aから与えられる比較信号S1に基づき、演算値V2及びクリップ上限値Hのうちのいずれか小さい方を選択してこれを出力するように動作する。すなわち、演算値V2がクリップ上限値Hよりも小さい場合には演算値V2が、またクリップ上限値Hが演算値V2よりも小さい場合にはクリップ上限値Hが、それぞれ出力値V3としてこの第1選択回路26Aから第2比較器25B及び第2選択回路26Bに対して出力される。このうち、第2比較器25Bには、この出力値V3に併せて、やはりCPU10からの設定信号SSによってレジスタ等に設定される変換パラメータであるクリップ下限値Lが入力される。そして、この第2比較器25Bでは、第1選択回路26Aによる出力値V3とクリップ下限値Lとを比較して、出力値V3がクリップ下限値Lより小さいか否かを示す比較信号S2を第2選択回路26Bに出力する。この第2選択回路26Bにも、第2比較器25Bと同様に、第1選択回路26Aによる出力値V3とクリップ下限値Lとが入力されており、この第2選択回路26Bでは、上記第2比較器25Bから与えられる比較信号S2に基づき、出力値V3又はクリップ下限値Lのうちのいずれか大きい方を選択してこれを出力するように動作する。すなわち、第1選択回路26Aによる出力値V3がクリップ下限値Lよりも大きい場合には出力値V3が、またクリップ下限値Lが上記出力値V3よりも大きい場合にはクリップ下限値Lが、それぞれ当該変換モジュール20の出力データDATAoutとしてこの第2選択回路26Bからマクロ40に対して出力される。
On the other hand, the
このように、ここで採用される変換モジュール20は、上記CPU10から入力される上記基準テーブルメモリSTMのテーブル値TB、すなわち入力データDATAinに対して、補正演算
DATAout=max(L,min(H,DATAin×M+A))・・・(1)
ただし、max(a,b):a,bのうちの大きい方を選択する関数
min(a,b):a,bのうちの小さい方を選択する関数
を実行して出力データDATAoutを得るモジュールである。これによって、上記乗算値Mや加算値Aを通じた自由度の高いテーブル値の変換が可能になるとともに、上記クリップ上限値H及びクリップ下限値Lの併用を通じて、いわばノイズ成分となるような所定の範囲から大きく外れるテーブル値の出現を抑制して入力データDATAinを変換することが可能になる。なお、雛形である上記基準テーブルメモリSTMのテーブル値TBのままマクロ40のLUTに書き込む場合には、このテーブル値TBをそのままマクロ40に出力するような設定がCPU10によってなされる。
As described above, the
DATAout = max (L, min (H, DATAin × M + A)) (1)
However, max (a, b): a function for selecting the larger of a and b
min (a, b): function that selects the smaller of a and b
To obtain output data DATAout. As a result, it is possible to convert a table value with a high degree of freedom through the multiplication value M and the addition value A, and to use a predetermined value that becomes a noise component through the combined use of the clip upper limit value H and the clip lower limit value L. It is possible to convert the input data DATAin while suppressing the appearance of table values greatly deviating from the range. If the table value TB of the reference table memory STM, which is a template, is written to the LUT of the macro 40 as it is, the
図3は、こうしたテーブル値変換装置を用いたテーブル値変換書き込み方法についてその処理手順をフローチャートとして示したものであり、次に、この図3に基づいて同変換書き込み方法をさらに詳述する。なおここでは、上記マクロA41〜マクロC43のうち、マクロA41が持つLUT51へのテーブル値変換書き込みを例にとって説明する。
FIG. 3 is a flowchart showing the processing procedure of a table value conversion writing method using such a table value conversion apparatus. Next, the conversion writing method will be described in more detail with reference to FIG. Here, of the macros A41 to C43, the table value conversion writing to the
このマクロA41へのテーブル値変換書き込みに際し、上記CPU10はまず、ステップ1の処理として、上記設定信号SSを変換モジュール20に出力して、上記変換モジュール20にマクロA41のLUT51に対応した変換パラメータ、すなわち乗算値M、加算値A、クリップ上限値H及びクリップ下限値Lを設定する。ちなみにこの処理は、例えばユーザによって変換パラメータが入力設定されることに基づきCPU10がその旨を判断し、上記設定信号SSを通じてその設定内容に応じた変換パラメータを変換モジュール20に与えることによって行われる。また、CPU10によって、その都度の撮像環境等に応じた変換パラメータが自動的に変換モジュール20に設定されるようにしてもよい。そして、次にステップ2の処理として、CPU10は、上記ROM30から雛形となる基準テーブルメモリSTMのアドレスiのテーブル値TBを1アドレス分だけ読み込む。ちなみにこの処理は、例えばROM30の基準テーブルメモリSTMがアドレス0〜255のテーブル値TBを有する場合には、アドレス0のテーブル値TBから順に1アドレスずつ読み込む処理として行われる。
In writing the table value conversion to the
このようにテーブル値TBを読み込むと、CPU10は、次にステップ3の処理として、その読み込んだテーブル値TBを、マクロA41が持つLUT51の同一のアドレスiに書き込むべく外部バスOBに出力する。すなわち、上記ステップ2でROM30からアドレス0のテーブル値TBが読み込まれた場合には、CPU10はそのテーブル値TBを、マクロA41が持つLUT51のアドレス0のテーブル値を書き換えるための値として出力する。
When the table value TB is read in this way, the
次にステップ4の処理として、上記変換モジュール20は、このCPU10から出力されたテーブル値TBに対して上記ステップ1で設定された変換パラメータに基づく補正演算を施し補正処理を行う。具体的には、CPU10から出力されるテーブル値TBを入力データDATAinとし、補正後のテーブル値CTBを出力データDATAoutとして、上記(1)式の補正演算を実行する。
Next, as a process of step 4, the
こうしてテーブル値TBが補正されると、変換モジュール20は次に、ステップ5の処理として、この出力データDATAout、すなわち補正後のテーブル値CTBをマクロA41に出力する。すなわち、上記ステップ3でのCPU10による書き込み指令に従って、マクロA41の持つLUT51の所定のアドレスiにこの補正後のテーブル値CTBを書き込む。この処理によって、マクロA41のLUT51のアドレスiのテーブル値が補正後のテーブル値CTBに書き換えられる。
When the table value TB is corrected in this way, the
その後、ステップ6の処理として、上記ROM30からのテーブル値読み込みアドレス及び上記マクロA41のLUT51へのテーブル値書き込みアドレスであるアドレスiの値と、ROM30の基準テーブルメモリSTM及びマクロA41のLUT51の総アドレス数kとを比較する。この結果、アドレスiが総アドレス数k未満であると判断された場合には、CPU10は、次にステップ7の処理として、アドレスiをインクリメントして、上記ステップ2の処理に戻る。そして、アドレスiが総アドレス数kに達するまで、すなわち全てのアドレスのテーブル値が書き変わるまで、これらステップ2〜7の処理を繰り返し実行する。そして、ステップ6の処理において、アドレスiが総アドレス数kに達したと判断されると、このマクロA41のLUT51へのテーブル値変換書き込みを終了する。これによって、マクロA41のLUT51のテーブル値を全て、しかも確実に変換することができるようになる。
Thereafter, as the processing of step 6, the table value read address from the
以上詳述した本実施形態によれば、以下のような効果が得られるようになる。
(1)CPU10とマクロ40との間に、すなわち外部バスOB上に介在するかたちで、基準のテーブル値TBに対して補正演算を施しつつその補正されたテーブル値CTBをマクロ40の持つLUTに変換書き込みする変換モジュール20を設けた。これにより、単一の変換モジュール20を通じて複数のマクロのLUTに対するテーブル値TBの変換書き込みが可能となるため、コストを低減することができるようになる。また、上記ROM30に格納すべき基準テーブルメモリSTMについてもこれを最小限の容量に抑えることができるため、メモリ容量の増大を抑制することができるようになる。しかも、この変
換モジュール20によって、CPU10の演算負荷も大幅に軽減されるため、処理時間を短縮することができるようにもなる。すなわち、簡便な構成でありながら、各マクロの持つLUTへのテーブル値変換書き込みを極めて効率よく実現することが可能になる。
According to the embodiment described in detail above, the following effects can be obtained.
(1) The correction table value CTB is applied to the LUT of the macro 40 while performing a correction operation on the reference table value TB between the
(2)変換モジュール20は、CPU10によって設定される変換パラメータ、すなわち乗算値M、加算値A、クリップ上限値H及びクリップ下限値Lに基づき、補正演算
DATAout=max(L,min(H,DATAin×M+A))・・・(1)を実行して、CPU10からの入力データDATAin(テーブル値TB)をデータDATAout(テーブル値CTB)に変換するものとした。これにより、上記乗算値Mや加算値Aを通じた自由度の高いテーブル値の変換が可能になるとともに、上記クリップ上限値H及びクリップ下限値Lの併用を通じて、いわばノイズ成分となるような所定の範囲から大きく外れるテーブル値の出現を好適に抑制することができるようになる。
(2) The
(3)上記ROM30及びマクロA41〜マクロC43を上記変換モジュール20が介在するCPU10の外部バスOBに共通接続した。これにより、外部バスOBの利用効率が高められるようになるとともに、特にROM30を上記変換モジュール20の後段にバス接続するようにしたことで、装置全体としての設計自由度も高められるようになる。
(3) The
(4)各LUT51〜53を用いた通常のデータ変換(画像処理)時には、上記変換モジュール20が動作しないように設定することとした。これにより、通常のデータ変換(画像処理)時における不要な電力の消費を抑えることができるようになる。
(4) During normal data conversion (image processing) using the
(第2実施形態)
以下、本発明にかかるテーブル値変換装置の第2実施形態を図4〜図6に従って説明する。この実施形態のテーブル値変換装置は、変換モジュールが上記第1実施形態と異なっている。以下、第1実施形態との相違点を中心に説明する。
(Second Embodiment)
Hereinafter, a second embodiment of the table value conversion apparatus according to the present invention will be described with reference to FIGS. In the table value conversion apparatus of this embodiment, the conversion module is different from that of the first embodiment. Hereinafter, the difference from the first embodiment will be mainly described.
図4は、本実施形態のテーブル値変換装置に採用されている変換モジュール70の特にテーブル値変換を行う補正演算回路についてその内部構成例を示したブロック図である。
図4に示すように、この変換モジュール70は、その補正演算回路として、基本的には、減算器71と、第2演算器を構成する乗算器72及び加算器73とを備えている。このうち、減算器71には、CPU10によって指定される特定のマクロのLUTのアドレスAddrが該CPU10から入力される。すなわち、変換モジュール70に入力されるテーブル値TBの補正後のテーブル値CTBが書き込まれるマクロのアドレスAddrがCPU10から減算器71に入力される。
FIG. 4 is a block diagram showing an example of the internal configuration of a correction arithmetic circuit that performs table value conversion, in particular, of the
As shown in FIG. 4, the
図5は、CPU10から見たROM30及びマクロ40のアドレスマップである。図5に示すように、アドレス000H〜0FFHがROM30、アドレス180H〜27FHがマクロA41のLUT51、アドレス280H〜37FHがマクロB42のLUT52、アドレス400H〜4FFHがマクロC43のLUT53にそれぞれ割り当てられている。なお、周知ではあるが、「H」はその値が16進数であることを示す。
FIG. 5 is an address map of the
また、上記減算器71には、CPU10からの設定信号SSによって設定される基準アドレスRAが入力される。そして、減算器71は、上記アドレスAddrから上記基準アドレスRAを減算し、その減算により得られる補正値C1を乗算器72に出力する。本実施形態では、CPU10によって指定されるマクロがマクロA41のときには、基準アドレスRAがマクロA41のLUT51の先頭アドレス180Hに設定される。また、CPU10によって指定されるマクロがマクロB42のときには、基準アドレスRAがマクロB42のLUT52の先頭アドレス280Hに設定される。また、CPU10によって指定されるマクロがマクロC43のときには、基準アドレスRAがマクロC43のLUT53の先頭アドレス400Hに設定される。すなわち、本実施形態では、図6に示すように、各マクロ40のLUTの先頭アドレスがアドレスAddrして変換モジュール70に入力されたときに、補正値C1が「0」になるように基準アドレスRAが設定されている。なお、ここでの補正値C1は、CPU10によって指定される特定のマクロの持つLUT内におけるアドレスとなり、CPU10から入力されるアドレスAddrが先頭アドレスから1アドレス増加する毎にその値が「1」ずつ増加される。
The
上記補正値C1が入力される乗算器72には、同じくCPU10からの設定信号SSによってレジスタ等に設定される変換パラメータである乗算値Mが入力される。この乗算器72は、上記補正値C1に上記乗算値Mを乗算し、その乗算により得られる補正値C2(図6参照)を加算器73に出力する。
Similarly, the
加算器73は、CPU10から入力される基準テーブルメモリSTMのテーブル値TB(図6参照)である入力データDATAinに上記補正値C2を加算してその演算値を、当該変換モジュール70の出力データDATAoutとして特定のマクロが持つLUTの所定のアドレスに出力する。すなわち、加算器73は、補正後のテーブル値CTBを、CPU10によって指定されているLUTのアドレスAddrに出力する。これにより、CPU10によって指定されているLUTのアドレスAddrのテーブル値が補正後のテーブル値CTBに書き換えられる。
The
このように、ここで採用される変換モジュール70は、上記CPU10から入力される上記基準テーブルメモリSTMのテーブル値TB、すなわち入力データDATAinに対して、補正演算
DATAout=DATAin+{(Addr−RA)×M}・・・(2)
を実行して出力データDATAoutを得るモジュールである。これによって、上記乗算値Mを通じた自由度の高いテーブル値の変換が可能になるとともに、上記アドレスAddr及び基準アドレスRAの併用を通じて、基準テーブルメモリSTMのテーブル値TBの1アドレス毎に値が異なる補正値C2によるテーブル値の変換が可能になる。
As described above, the
To obtain output data DATAout. As a result, it is possible to convert a table value with a high degree of freedom through the multiplication value M, and the value differs for each address of the table value TB of the reference table memory STM through the combined use of the address Addr and the reference address RA. The table value can be converted by the correction value C2.
以上詳述した本実施形態によれば、第1実施形態の(1)、(3)、(4)の作用効果に加えて、以下のような効果が得られるようになる。
(5)変換モジュール70は、CPU10から入力されるアドレスAddrに所定の演算(本例では、減算と乗算)を施すようにした。これにより、基準テーブルメモリSTMのテーブル値TB(特定のマクロのLUT)の1アドレス毎に値が異なる補正値C2(図6参照)を容易に生成することができる。この補正値C2{=(Addr−RA)×M}を通じて、より自由度の高いテーブル値の変換が可能になる。ひいては、各マクロ40の内容に応じたテーブル値の変換も可能となる。
According to this embodiment described in detail above, the following effects can be obtained in addition to the functions and effects of the first embodiment (1), (3), and (4).
(5) The
なお、例えば専用のカウンタを設けて、そのカウンタのカウント値に基づいて変換パラメータを変更することにより、基準テーブルメモリSTMのテーブル値TBの1アドレス毎に値が異なる補正値を生成することができる。しかし、この生成方法では、上記専用のカウンタ等を設置する必要があるため、コストの増大が避けられない。これに対して、本実施形態の変換モジュール70では、CPU10から元々出力されているアドレスAddrに対して所定の演算を施す演算器を追加するのみでよいため、コストの増大を抑制することができる。
For example, by providing a dedicated counter and changing the conversion parameter based on the count value of the counter, a correction value having a different value for each address of the table value TB of the reference table memory STM can be generated. . However, in this generation method, since it is necessary to install the dedicated counter or the like, an increase in cost is inevitable. On the other hand, in the
(第3実施形態)
以下、本発明にかかるテーブル値変換装置の第3実施形態を図7〜図9に従って説明する。この実施形態のテーブル値変換装置は、変換モジュールが上記第1実施形態と異なっている。以下、第1実施形態との相違点を中心に説明する。
(Third embodiment)
Hereinafter, a third embodiment of the table value conversion apparatus according to the present invention will be described with reference to FIGS. In the table value conversion apparatus of this embodiment, the conversion module is different from that of the first embodiment. Hereinafter, the difference from the first embodiment will be mainly described.
図7は、本実施形態のテーブル値変換装置に採用されている変換モジュール80の特にテーブル値変換を行う補正演算回路についてその内部構成例を示したブロック図である。
図7に示すように、この変換モジュール80は、その補正演算回路として、基本的には、減算器81と、乗算器82と、加算器83と、加算器84と、係数制御回路85とを備えている。このうち、減算器81には、上記第2実施形態の減算器71と同様に、CPU10によって指定される特定のマクロのLUTのアドレスAddrが該CPU10から入力される。この減算器81には、CPU10からの設定信号SSによって設定される基準アドレスRAが入力される。そして、減算器81は、上記アドレスAddrから上記基準アドレスRAを減算し、その減算により得られる補正値C1(図8参照)を乗算器82に出力する。
FIG. 7 is a block diagram showing an example of an internal configuration of a correction arithmetic circuit that performs table value conversion of the
As shown in FIG. 7, the
上記CPU10から入力されるアドレスAddrは、係数制御回路85にも入力される。この係数制御回路85は、入力されるアドレスAddrに応じて、補正係数としての乗算値M及び加算値Aを設定する。詳述すると、係数制御回路85は、図8に示すように、LUT全域を複数個(本例では、3個)の領域R1,R2,R3に分割して、これらの領域R1〜R3毎に異なる乗算値M及び加算値Aを設定する。すなわち、係数制御回路85は、アドレスAddrが領域R1に含まれる場合に、乗算値Mを第1乗算値M1、加算値Aを第1加算値A1に設定する。また、係数制御回路85は、アドレスAddrが領域R2に含まれる場合に、乗算値Mを第2乗算値M2、加算値Aを第2加算値A2に設定する。また、係数制御回路85は、アドレスAddrが領域R3に含まれる場合に、乗算値Mを第3乗算値M3、加算値Aを第3加算値A3に設定する。
The address Addr input from the
上記補正値C1が入力される上記乗算器82には、アドレスAddrに応じて上記係数制御回路85により設定される乗算値M(第1〜第3乗算値M1〜M3)が入力される。この乗算器82は、上記補正値C1に上記乗算値Mを乗算し、その乗算により得られる補正値C2を加算器83に出力する。
The
加算器83には、アドレスAddrに応じて上記係数制御回路85により設定される加算値A(第1〜第3加算値A1〜A3)が入力される。この加算器83は、上記補正値C2に上記加算値Aを加算し、その加算により得られる補正値C3(図8参照)を加算器84に出力する。ここで得られる補正値C3は、図8に示すように、その傾きが領域R1〜R3毎に異なるようになっている。
The
加算器84は、CPU10から入力される基準テーブルメモリSTMのテーブル値TB(図8参照)である入力データDATAinに上記補正値C3を加算してその演算値を、当該変換モジュール80の出力データDATAoutとして特定のマクロが持つLUTの所定のアドレスに出力する。すなわち、加算器84は、補正後のテーブル値CTBを、CPU10によって指定されているLUTのアドレスAddrに出力する。これにより、CPU10によって指定されているLUTのアドレスAddrのテーブル値が補正後のテーブル値CTBに書き換えられる。
The
このように、ここで採用される変換モジュール80は、上記CPU10から入力される上記基準テーブルメモリSTMのテーブル値TB、すなわち入力データDATAinに対して、領域R1〜R3毎に下記式(3)〜(5)による補正演算を実行して出力データDATAoutを得るモジュールである。すなわち、変換モジュール80は、アドレスAddrが領域R1に含まれる場合には、下記式(3)により補正演算を実行し、アドレスAddrが領域R2に含まれる場合には、下記式(4)により補正演算を実行し、アドレスAddrが領域R3に含まれる場合には、下記式(5)により補正演算を実行する。
As described above, the
DATAout=DATAin+{(Addr−RA)×M1+A1}・・・(3)
DATAout=DATAin+{(Addr−RA)×M2+A2}・・・(4)
DATAout=DATAin+{(Addr−RA)×M3+A3}・・・(5)
これによって、係数制御回路85による領域R1〜R3毎の補正係数(乗算値M及び加算値A)の変更を通じて、LUTの1アドレス毎に値が異なり、且つ領域R1〜R3毎に傾きが異なる補正値C3に基づく補正が可能となる。
DATAout = DATAin + {(Addr−RA) × M1 + A1} (3)
DATAout = DATAin + {(Addr−RA) × M2 + A2} (4)
DATAout = DATAin + {(Addr−RA) × M3 + A3} (5)
As a result, through the change of the correction coefficient (multiplication value M and addition value A) for each of the regions R1 to R3 by the
図9は、上記係数制御回路85による補正係数(乗算値M及び加算値A)の設定方法についてその処理手順をフローチャートとして示したものであり、次に、この図9に基づいて同設定方法をさらに詳述する。
FIG. 9 is a flowchart showing the processing procedure of the correction coefficient (multiplication value M and addition value A) setting method by the
まず係数制御回路85は、ステップ10において、CPU10からアドレスAddrが入力される。このようにアドレスAddrが入力されると、係数制御回路85は、次にステップ11の処理として、その入力されたアドレスAddrと領域R2の先頭アドレスである第1比較アドレスAD1とを比較する。この結果、アドレスAddrが第1比較アドレスAD1未満であると判断された場合、すなわちアドレスAddrが領域R1に含まれると判断された場合には、係数制御回路85は、次にステップ12の処理として、乗算値Mを第1乗算値M1に、加算値Aを第1加算値A1に設定する。
First, the
一方、上記ステップ11において、アドレスAddrが第1比較アドレスAD1以上であると判断された場合には、係数制御回路85は、次にステップ13の処理として、上記アドレスAddrと領域R3の先頭アドレスである第2比較アドレスAD2とを比較する。この結果、アドレスAddrが第2比較アドレスAD2未満であると判断された場合、すなわちアドレスAddrが領域R2に含まれると判断された場合には、係数制御回路85は、次にステップ14の処理として、乗算値Mを第2乗算値M2に、加算値Aを第2加算値A2に設定する。
On the other hand, if it is determined in step 11 that the address Addr is equal to or higher than the first comparison address AD1, the
一方、上記ステップ13において、アドレスAddrが第2比較アドレスAD2以上であると判断された場合、すなわちアドレスAddrが領域R3に含まれると判断された場合には、係数制御回路85は、次にステップ15の処理として、乗算値Mを第3乗算値M3に、加算値Aを第3加算値A3に設定する。
On the other hand, if it is determined in step 13 that the address Addr is equal to or higher than the second comparison address AD2, that is, if it is determined that the address Addr is included in the region R3, the
以上詳述した本実施形態によれば、第1及び第2実施形態の(1)、(3)、(4)、(5)の作用効果に加えて、以下のような効果が得られるようになる。
(6)変換モジュール80内に備えた係数制御回路85は、CPU10から入力されるアドレスAddrの属する領域に応じて、補正係数としての乗算値M及び加算値Aを変更するようにした。このとき、アドレスAddrの属する領域の判定は、図9に示すように、該アドレスAddrと、各領域R1〜R3毎の先頭アドレスとしての第1及び第2比較アドレスAD1,AD2との比較により容易に判断することができる。これらにより、アドレスAddrに応じて一定の傾きで変化する補正値C1を、図8に示すように、領域R1〜R3毎で傾きの変化する補正値C3(補正値C2)に容易に変換することができる。このような各領域R1〜R3毎の補正係数の設定により、テーブル値の変換に使用される補正値C3の設定の自由度を向上させることができる。さらに、この補正値C3を通じて、より自由度の高いテーブル値の変換が可能になる。ひいては、各マクロ40の内容に応じたテーブル値の変換も可能となる。
According to this embodiment described in detail above, in addition to the effects of (1), (3), (4), and (5) of the first and second embodiments, the following effects can be obtained. become.
(6) The
(第4実施形態)
以下、本発明にかかるテーブル値変換装置の第4実施形態を図10〜図12に従って説明する。先の図1〜図9に示した部材と同一の部材にはそれぞれ同一の符号を付して示し、それら各要素についての詳細な説明は割愛する。
(Fourth embodiment)
A fourth embodiment of the table value conversion apparatus according to the present invention will be described below with reference to FIGS. The same members as those shown in FIGS. 1 to 9 are denoted by the same reference numerals, and detailed description of these elements is omitted.
図10に示すように、このテーブル値変換装置は、大きくは、上記CPU10と、同CPU10の外部バスOB上に介在するように設けられた変換モジュール90及び逆変換モジュール95と、上記ROM30と、上記マクロ40とを備えて構成されている。
As shown in FIG. 10, the table value conversion apparatus mainly includes the
ここで、上記変換モジュール90は、上記各実施形態で説明したように、乗算・加算等の演算機能を有して、主にマクロA41,B42にそれぞれ備えられたLUT51,52のテーブル値変換書き込みを実行する際のCPU10の処理を補助、仲介する部分である。すなわち、このテーブル値変換書き込みの実行に際し、CPU10は、上記ROM30から基準テーブルメモリSTMのテーブル値TBを読み込んで、この読み込んだテーブル値TBを変換モジュール90に出力する。またこれに先立ち、CPU10は、設定信号SSを通じて変換パラメータを変換モジュール90に対して設定する。ちなみに、ここでの変換パラメータには、乗算値M、加算値Aがある。こうして変換パラメータが設定され、且つテーブル値TBが与えられた変換モジュール90は、その与えられたテーブル値TBに対して上記設定された変換パラメータに基づく補正演算を実行し、その補正したテーブル値CTBを上記マクロ40のうちCPU10によって指定されている特定のマクロのLUTに出力する。これにより、該当するマクロのLUTがこの補正されたテーブル値CTBによって更新、すなわち書き換えられることとなる。
Here, as described in the above embodiments, the
逆変換モジュール95は、上記変換モジュール90における演算機能とは反対の演算機能(ここでは、除算・減算)を有して、主に上記CPU10により上記LUT51,52から補正後のテーブル値CTBがリードデータとして読み出される際に、その補正後のテーブル値CTBを補正前のテーブル値TBに相当するテーブル値TBaに逆変換する部分である。すなわち、このLUT51,52からの補正後のテーブル値CTB読み出しの実行に際し、CPU10は、外部バスOBに共通接続されているLUT51あるいはLUT52に書き込まれている補正後のテーブル値CTBを読み出す。ここで、CPU10によりLUT51,52から読み出される補正後のテーブル値CTBは、上記逆変換モジュール95を通じてCPU10に入力される。また上記読み出しに先立ち、CPU10は、設定信号SSを通じて、上記補正後のテーブル値CTBの逆変換処理に用いるための逆変換パラメータを逆変換モジュール95に対して設定する。ちなみに、ここでCPU10が逆変換モジュール95に対して設定する逆変換パラメータには、除算値N、減算値Bがある。なお、ここで、逆変換パラメータである除算値N及び減算値Bは、上記テーブル値変換書き込みの際に変換モジュール90に入力された変換パラメータである乗算値M及び加算値Aと同一値になるように設定されている。すなわち、乗算値M=除算値N、加算値A=減算値Bの関係になるように逆変換パラメータが設定されている。
The
こうして逆変換パラメータが設定され、且つ補正後のテーブル値CTBが与えられた逆変換モジュール95は、その与えられたテーブル値CTBに対して上記設定された逆変換パラメータに基づく逆変換処理を実行し、その逆変換により得られる補正前のテーブル値TBに相当するテーブル値TBaを上記CPU10に出力する。
The
なお、上記逆変換モジュール95は、CPU10によるROM30からのテーブル値TBの読み込み時には、このROM30から読み出されたテーブル値TBをそのままCPU10に出力するように設定されている。
The
図11は、本実施形態のテーブル値変換装置に採用されている変換モジュール90のテーブル値変換を行う補正演算回路についてその内部構成例を示したブロック図である。
図11に示すように、この変換モジュール80は、その補正演算回路として、基本的には、乗算器91と、加算器92とを備えている。このうち、乗算器91には、CPU10からの設定信号SSによって設定される変換パラメータである乗算値Mが入力される。そして、この乗算器91は、上記CPU10から入力される基準テーブルメモリSTMのテーブル値TBに上記乗算値Mを乗算してその演算値V11を加算器92に出力する。また、加算器92には、同じくCPU10からの設定信号SSによって設定される変換パラメータである加算値Aが入力される。そして、この加算器92は、上記演算値V11に上記加算値Aを加算してその演算値を、補正後のテーブル値CTBとして特定のマクロの持つLUTの所定のアドレスに出力する。これにより、CPU10によって指定されているアドレスのテーブル値が補正後のテーブル値CTBに書き換えられる。
FIG. 11 is a block diagram showing an example of the internal configuration of a correction arithmetic circuit that performs table value conversion of the
As shown in FIG. 11, the
このように、ここで採用される変換モジュール90は、上記CPU10から入力される上記基準テーブルメモリSTMのテーブル値TBに対して、補正演算
CTB=TB×M+A・・・(6)
を実行してテーブル値CTBを得るモジュールである。
As described above, the
CTB = TB × M + A (6)
To obtain a table value CTB.
図12は、本実施形態のテーブル値変換装置に採用されている逆変換モジュール95の逆変換処理を行う逆変換処理回路についてその内部構成例を示したブロック図。
図12に示すように、この逆変換モジュール95は、その逆変換処理回路として、基本的には、減算器96と、除算器97とを備えている。このうち、減算器96には、CPU10からの設定信号SSによってレジスタ等に設定される逆変換パラメータである減算値B(=加算値A)が入力される。そして、この減算器96は、CPU10によって指定されるマクロのLUTから入力される補正後のテーブル値CTBから上記減算値Bを減算してその演算値V12を除算器97に出力する。また、除算器97には、同じくCPU10からの設定信号SSによってレジスタ等に設定される逆変換パラメータである除算値N(=乗算値M)が入力される。そして、この除算器97は、上記演算値V12を上記除算値Nにより除算してその演算値をCPU10に出力する。これにより、補正後のテーブル値CTBが補正前のテーブル値TBに相当するテーブル値TBaに逆変換されてCPU10に入力される。
FIG. 12 is a block diagram showing an internal configuration example of an inverse conversion processing circuit that performs an inverse conversion process of the
As shown in FIG. 12, the
このように、ここで採用される逆変換モジュール95は、上記CPU10によって指定されるマクロのLUTから入力される補正後のテーブル値CTBに対して、逆変換処理
TBa=(CTB−B)/N
=(CTB−A)/M
=TB
を実行して補正前のテーブル値TB(それに相当するテーブル値TBa)を得るモジュールである。
As described above, the
TBa = (CTB-B) / N
= (CTB-A) / M
= TB
To obtain a table value TB before correction (table value TBa corresponding thereto).
以上詳述した本実施形態によれば、第1実施形態の(1)、(3)、(4)の作用効果に加えて、以下のような効果が得られるようになる。
(7)CPU10によって指定されるマクロのLUTから読み出される補正後のテーブル値CTBを逆変換して補正前のテーブル値TBに相当するテーブル値TBaを生成して、その逆変換後のテーブル値TBaをCPU10に出力する逆変換モジュール95を設けた。これにより、CPU10からライトデータとして出力されるテーブル値TBと、リードデータとしてCPU10に入力される逆変換後のテーブル値TBaとが同一値になる。従って、例えば上記CPU10を、ライトデータとリードデータとが不一致の場合に書き込みエラーと判断してしまうICE(In-Circuit Emulator)に変更したとしても、ライトデータとリードデータとが一致するため、書き込みエラーと判断されることを回避することができる。なお、このICEは、ソフトウェアのデバックやハードウェアの動作確認を行う場合に利用されるもので、組み込み用システムの開発では必須なものである。
According to this embodiment described in detail above, the following effects can be obtained in addition to the functions and effects of the first embodiment (1), (3), and (4).
(7) A table value TBa corresponding to the table value TB before correction is generated by reversely converting the corrected table value CTB read from the macro LUT designated by the
(他の実施形態)
なお、上記実施形態は、以下の態様で実施してもよい。
・上記各実施形態では、CPU10の外部バスOB上に設けられた変換モジュール20,70,80,90を介してその後段に、マクロA41〜マクロC43と共々、ROM30を共通接続するようにした。これに代えて、ROM30についてはこれを、CPU10に直接接続されるように設けてもよい。
(Other embodiments)
In addition, you may implement the said embodiment in the following aspects.
In each of the above embodiments, the
・上記各実施形態では、そのテーブル値変換書き込み方法として、上記ROM30からテーブル値TBを全てのアドレスについて1アドレスずつ読み込み、それら読み込んだテーブル値TB(正確には補正されたテーブル値CTB)を1アドレスずつ特定のマクロのLUT、例えばマクロA41のLUT51へ書き込むようにした。これに限らず、例えば特定のアドレスの範囲でそれらテーブル値TBを1アドレスずつ読み込み、その特定のアドレス範囲のテーブル値TBに補正演算を施しつつ、その補正されたテーブル値CTBを特定のマクロのLUTの対応するアドレスに書き込むようにしてもよい。全てのテーブル値の書き換えが不要な場合、すなわち一部のアドレス範囲のテーブル値のみの書き換えが必要な場合、これによって上記LUTのテーブル値変換書き込み時間を短縮することができるようになる。
In each of the above embodiments, as the table value conversion writing method, the table value TB is read from the
・上記各実施形態における変換モジュール20,70,80,90において、入力されるテーブル値TBに施す補正演算の種類は、特に制限されない。すなわち、上記各実施形態では、変換モジュール20,70,80,90に入力されるテーブル値TBに対して、主に乗算及び加算の補正演算を施すようにした。これに限らず、テーブル値TBに対して減算及び除算の補正演算を施すようにしてもよい。なお、この場合、上記第4実施形態においては、変換モジュール90の有する演算機能とは反対の演算機能を有するように逆変換モジュール95を構成することが望ましい。
In the
・上記第1実施形態では、変換モジュール20が実行する補正演算として、CPU10から出力されるテーブル値TBに対する乗算、加算及びクリッピングを行うようにした。これに限らず、例えばクリッピングを省略した補正演算を実行するようにしてもよい。または、乗算あるいは加算のみの補正演算を実行するようにしてもよい。
In the first embodiment, multiplication, addition, and clipping are performed on the table value TB output from the
・上記第2及び第3実施形態における変換モジュール70,80が、上記第1実施形態の変換モジュール20のクリップ回路23を備えるようにしてもよい。
・上記第2及び第3実施形態における変換モジュール70,80において、CPU10から入力されるアドレスAddrに施す補正演算の種類は、特に制限されない。
The
In the
・上記第2及び第3実施形態におけるアドレスの割り当ては、図5に示すアドレスマップに特に制限されない。
・上記第2及び第3実施形態では、基準アドレスRAを、各マクロ40のLUTの先頭アドレスがアドレスAddrとして変換モジュール70,80に入力されたときに補正値C1が「0」となるように設定するようにしたが、これに制限されない。例えば、基準アドレスRAを、各マクロ40のLUTの先頭アドレスがアドレスAddrとして入力されたときに補正値C1が例えば「+X(X:整数)」あるいは「−X」となるように設定することにより、LUTのアドレスに+方向あるいは−方向のオフセットを設定することができる。
The address assignment in the second and third embodiments is not particularly limited to the address map shown in FIG.
In the second and third embodiments, the correction value C1 is set to “0” when the reference address RA is input to the
・上記第2実施形態では、変換モジュール70において、変換パラメータである乗算値Mと、CPU10から入力されるアドレスAddrとに基づいて補正値C2を生成し、テーブル値TBに対してその補正値C2に従って補正演算(加算)を行うようにした。これに限らず、例えば変換パラメータである乗算値Mを、テーブル値TBに対する補正演算における補正値としてそのまま利用してもよい。また、CPU10から入力されるアドレスAddrと基準アドレスRAとに基づいて生成される補正値C1を、テーブル値TBに対する補正演算における補正値としてそのまま利用してもよい。
In the second embodiment, the
・上記第2及び第3実施形態における基準アドレスRAを省略してもよい。この場合、CPU10から変換モジュール70,80に入力されるアドレスAddrをそのまま補正値C2の生成に利用するようにしてもよい。あるいは、CPU10から変換モジュール70,80に入力されるアドレスAddrを、テーブル値TBに対する補正演算における補正値としてそのまま利用してもよい。
The reference address RA in the second and third embodiments may be omitted. In this case, the address Addr input from the
・上記第3実施形態では、LUT全域を3個の領域R1,R2,R3に分割するようにしたが、この領域の分割数は特に制限されない。
・上記第3実施形態における係数制御回路85は、補正係数として乗算値M及び加算値Aを領域R1〜R3毎に変更するようにした。これに限らず、例えば係数制御回路85により、補正係数として乗算値M及び加算値Aのいずれか一方を領域R1〜R3毎に変更するようにしてもよい。
In the third embodiment, the entire LUT is divided into three regions R1, R2, and R3. However, the number of divisions of this region is not particularly limited.
In the third embodiment, the
・上記第3実施形態の変換モジュール80の係数制御回路85を、上記第1及び第4実施形態の変換モジュール20,90及び逆変換モジュール95に適用してもよい。ここで、例えば第1実施形態の変換モジュール20に係数制御回路85を設ける場合には、係数制御回路85により、LUTのアドレスAddrが属する領域に応じて、第1演算器を構成する乗算器21及び加算器22に入力される補正係数としての乗算値M及び加算値Aが変更されるようになる。
The
以上の様々な実施の形態をまとめると、以下のようになる。
(付記1)
雛形となるテーブル値が格納されているメモリから読み出されるテーブル値を補正し、特定の処理を行うハードウェアである機能マクロの別に設けられたルックアップテーブルのテーブル値を前記補正された値に基づいて書き換えるテーブル値変換装置であって、
前記メモリから雛形となるテーブル値を読み出す中央演算処理装置の外部バス上に、同中央演算処理装置から出力されるデータに対して特定の補正演算を施しつつこの演算値に基づき前記マクロの持つルックアップテーブルのテーブル値を変換する変換モジュールを介在させたことを特徴とするテーブル値変換装置。
(付記2)
前記変換モジュールは、同変換モジュールに設定される変換パラメータに従って前記特定の補正演算を実行するものである付記1に記載のテーブル値変換装置。
(付記3)
前記変換モジュールに設定される変換パラメータが乗算値及び加算値及びクリップ下限値及びクリップ上限値からなり、前記乗算値をM、前記加算値をA、前記クリップ下限値をL、前記クリップ上限値をHとし、前記中央演算処理装置から出力されるデータをDATAin、前記変換モジュールが出力する演算値をDATAoutとするとき、前記変換モジュールは、前記補正演算として、演算
DATAout=max(L,min(H,DATAin×M+A))
ただし、max(a,b):a,bのうちの大きい方を選択する関数
min(a,b):a,bのうちの小さい方を選択する関数
を実行するものである付記2に記載のテーブル値変換装置。
(付記4)
前記メモリ及び前記マクロは前記変換モジュールが介在する前記中央演算処理装置の外部バスの後段に共通接続されており、前記変換モジュールは、同外部バスを介した前記中央演算処理装置による前記メモリからのテーブル値の読み込み時にはこの読み込まれるテーブル値を同中央演算処理装置に対してそのまま渡し、前記マクロの持つルックアップテーブルへのテーブル値の書き換え時に、前記中央演算処理装置から同外部バスに前記データとして出力される前記読み込まれたテーブル値に対して前記特定の演算処理を実行するものである付記1〜3のいずれか一つに記載のテーブル値変換装置。
The various embodiments described above can be summarized as follows.
(Appendix 1)
The table value read from the memory storing the template table value is corrected, and the table value of the lookup table provided separately for the function macro that is the hardware that performs the specific processing is based on the corrected value. A table value conversion device for rewriting
On the external bus of the central processing unit that reads out the table value as a model from the memory, a specific correction operation is performed on the data output from the central processing unit, and the macro has a look based on the calculated value. A table value conversion apparatus comprising a conversion module for converting a table value of an up table.
(Appendix 2)
The table value conversion apparatus according to
(Appendix 3)
The conversion parameters set in the conversion module are a multiplication value, an addition value, a clip lower limit value, and a clip upper limit value. The multiplication value is M, the addition value is A, the clip lower limit value is L, and the clip upper limit value is When H is H, data output from the central processing unit is DATAin, and an operation value output from the conversion module is DATAout, the conversion module calculates the correction operation as the correction operation.
DATAout = max (L, min (H, DATAin × M + A))
However, max (a, b): a function for selecting the larger of a and b
min (a, b): function that selects the smaller of a and b
The table value conversion device according to
(Appendix 4)
The memory and the macro are commonly connected to a subsequent stage of the external bus of the central processing unit with the conversion module interposed therebetween, and the conversion module is connected to the memory from the memory by the central processing unit via the external bus. When the table value is read, the table value to be read is passed to the central processing unit as it is, and when the table value is rewritten to the lookup table of the macro, the data is transferred from the central processing unit to the external bus as the data. The table value conversion device according to any one of
付記4に記載の発明では、前記メモリ及び前記マクロは前記変換モジュールが介在する前記中央演算処理装置の外部バスの後段に共通接続されており、前記変換モジュールは、同外部バスを介した前記中央演算処理装置による前記メモリからのテーブル値の読み込み時にはこの読み込まれるテーブル値を同中央演算処理装置に対してそのまま渡し、前記マクロの持つルックアップテーブルへのテーブル値の書き換え時に、前記中央演算処理装置から同外部バスに前記データとして出力される前記読み込まれたテーブル値に対して前記特定の演算処理を実行することとした。このようなかたちで外部バスを共通利用することで、同外部バスの利用効率が高められるようになるとともに、特に上記メモリについてもこれを、変換モジュールの後段にバス接続するようにしたことで、装置全体としての設計自由度も高められるようになる。
(付記5)
前記変換モジュールにより前記特定の補正演算の施されたデータに基づき前記テーブル値が書き換えられた前記マクロの持つルックアップテーブルから前記中央演算処理装置によって読み出される該書き換え後のテーブル値を、前記特定の補正演算の施される前のデータに相当するデータに逆変換して、該逆変換後のデータを前記中央演算処理装置に出力する逆変換モジュールを備える付記1又は2に記載のテーブル値変換装置。
(付記6)
前記変換モジュールは、同変換モジュールに設定される変換パラメータに従って前記特定の補正演算を実行し、
前記逆変換モジュールは、前記変換パラメータに応じて該逆変換モジュールに設定される逆変換パラメータに従って前記逆変換を実行するものである付記5に記載のテーブル値変換装置。
(付記7)
前記逆変換モジュールは前記中央演算処理装置の外部バス上に介在されており、前記メモリ及び前記マクロは前記変換モジュール及び前記逆変換モジュールが介在する前記中央演算処理装置の外部バスの後段に共通接続されており、前記逆変換モジュールは、同外部バスを介した前記中央演算処理装置による前記メモリからのテーブル値の読み込み時にはこの読み込まれるテーブル値を同中央演算処理装置に対してそのまま渡すものである付記4〜6のいずれか一つに記載のテーブル値変換装置。
(付記8)
前記変換モジュールには、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルの所定アドレスが同変換モジュールにおける前記演算値の書き込み先のアドレスとして前記中央演算処理装置から入力され、
前記変換モジュールは、同変換モジュールに設定される変換パラメータ及び前記書き込み先のアドレスの少なくとも一方に応じて補正値を生成し、該補正値に従って前記特定の補正演算を実行する付記1〜7にいずれか一つに記載のテーブル値変換装置。
(付記9)
前記変換モジュールは、前記書き込み先のアドレスから所定の基準アドレスを減算して、該書き込み先のアドレスを、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブル内におけるアドレスに変換する付記8に記載のテーブル値変換装置。
(付記10)
前記基準アドレスが、前記書き込み先に指定される前記マクロの持つルックアップテーブルの先頭アドレスである付記9に記載のテーブル値変換装置。
(付記11)
前記変換モジュールには、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルの所定アドレスが同変換モジュールにおける前記演算値の書き込み先のアドレスとして前記中央演算処理装置から入力され、
前記変換モジュールは、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルを複数の領域に分割しつつ、前記書き込み先のアドレスの属する前記領域に応じて、前記特定の補正演算を実行するための第1演算器に入力される補正係数を設定する係数制御回路を備える付記1〜10のいずれか一つに記載のテーブル値変換装置。
(付記12)
前記変換モジュールには、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルの所定アドレスが同変換モジュールにおける前記演算値の書き込み先のアドレスとして前記中央演算処理装置から入力され、
前記変換モジュールは、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルを複数の領域に分割しつつ、前記書き込み先のアドレスの属する前記領域に応じて、前記補正値を生成するための第2演算器に入力される補正係数を設定する係数制御回路を備える付記1〜11のいずれか一つに記載のテーブル値変換装置。
(付記13)
雛形となるテーブル値が格納されているメモリから読み出されるテーブル値を補正し、特定の処理を行うハードウェアである機能マクロの別に設けられたルックアップテーブルのテーブル値を前記補正された値に基づき変換して当該ルックアップテーブルに書き込む方法であって、
前記メモリから雛形となるテーブル値を読み出す中央演算処理装置の外部バス上に、同中央演算処理装置から出力されるデータに対して特定の補正演算を施しつつこの演算値に基づき前記マクロの持つルックアップテーブルのテーブル値を変換する変換モジュールを介在させ、同マクロの持つルックアップテーブルへのテーブル値の書き換え時には、この変換モジュールを通じて補正演算された演算値を該当するルックアップテーブルに対して書き込むようにしたことを特徴とするテーブル値変換書き込み方法。
(付記14)
前記変換モジュールを、同変換モジュールに設定される変換パラメータに従った補正演算が実行されるように構成し、前記マクロの持つルックアップテーブルに書き込まれる演算値が、この設定された変換パラメータに応じた値として決定されるようにした付記13に記載のテーブル値変換書き込み方法。
(付記15)
前記変換モジュールに設定する変換パラメータとして乗算値及び加算値及びクリップ下
限値及びクリップ上限値を用意するとともに、前記乗算値をM、前記加算値をA、前記クリップ下限値をL、前記クリップ上限値をHとし、前記中央演算処理装置から出力されるデータをDATAin、前記変換モジュールが出力する演算値をDATAoutとするとき、前記変換モジュールに、前記補正演算として、演算
DATAout=max(L,min(H,DATAin×M+A))
ただし、max(a,b):a,bのうちの大きい方を選択する関数
min(a,b):a,bのうちの小さい方を選択する関数
を実行させて前記マクロの持つルックアップテーブルに書き込むべき演算値を得る付記14に記載のテーブル値変換書き込み方法。
(付記16)
特定のマクロのルックアップテーブルに対応して前記変換モジュールに前記変換パラメータを設定した後、
a.前記中央演算処理装置を通じて前記メモリから前記雛形となるテーブル値を1アドレス分だけ読み込む処理、
b.この読み込みに対応して前記中央演算処理装置から前記特定のマクロのルックアップテーブルに対して書き込むべく出力される当該テーブル値を前記変換モジュールを通じて前記設定された変換パラメータに基づく補正演算により変換する処理、
c.この変換されたテーブル値を前記特定のマクロのルックアップテーブルの所定のアドレスに書き込む処理、
といったa.〜c.の処理を、前記メモリからのテーブル値読み込みアドレスと前記特定のマクロのルックアップテーブルへのテーブル値書き込みアドレスとをインクリメントしつつ、前記ルックアップテーブルの全てのテーブル値が書き換わるまで繰り返し実行する付記13又は14に記載のテーブル値変換書き込み方法。
In the invention according to attachment 4, the memory and the macro are commonly connected to a subsequent stage of the external bus of the central processing unit with the conversion module interposed therebetween, and the conversion module is connected to the central bus via the external bus. When the table value is read from the memory by the arithmetic processing unit, the read table value is passed to the central processing unit as it is, and when the table value is rewritten to the lookup table of the macro, the central processing unit The specific arithmetic processing is executed on the read table value output as the data to the external bus. By using the external bus in common in this way, the use efficiency of the external bus can be improved, and especially for the above memory, this is connected to the downstream of the conversion module, The degree of freedom of design of the entire device can be increased.
(Appendix 5)
The rewritten table value read by the central processing unit from the look-up table of the macro in which the table value has been rewritten based on the data subjected to the specific correction calculation by the conversion module, The table value conversion apparatus according to
(Appendix 6)
The conversion module performs the specific correction calculation according to a conversion parameter set in the conversion module,
The table value conversion apparatus according to appendix 5, wherein the inverse conversion module performs the inverse conversion in accordance with an inverse conversion parameter set in the inverse conversion module in accordance with the conversion parameter.
(Appendix 7)
The inverse conversion module is interposed on an external bus of the central processing unit, and the memory and the macro are commonly connected to a subsequent stage of the external bus of the central processing unit in which the conversion module and the inverse conversion module are interposed. The inverse conversion module passes the read table value as it is to the central processing unit when the central processing unit reads the table value from the memory via the external bus. The table value conversion device according to any one of appendices 4 to 6.
(Appendix 8)
A predetermined address of the lookup table of the macro specified by the central processing unit is input to the conversion module from the central processing unit as an address of the calculation value to be written in the conversion module.
The conversion module generates a correction value according to at least one of the conversion parameter set in the conversion module and the address of the write destination, and executes the specific correction calculation according to the correction value. The table value conversion apparatus as described in any one.
(Appendix 9)
The conversion module subtracts a predetermined reference address from the write destination address, and converts the write destination address into an address in a lookup table of the macro specified by the central processing unit. 9. The table value conversion device according to 8.
(Appendix 10)
The table value conversion device according to appendix 9, wherein the reference address is a head address of a lookup table included in the macro designated as the writing destination.
(Appendix 11)
A predetermined address of the lookup table of the macro specified by the central processing unit is input to the conversion module from the central processing unit as an address of the calculation value to be written in the conversion module.
The conversion module performs the specific correction calculation according to the area to which the write destination address belongs while dividing the lookup table of the macro specified by the central processing unit into a plurality of areas. 11. The table value conversion device according to any one of
(Appendix 12)
A predetermined address of the lookup table of the macro specified by the central processing unit is input to the conversion module from the central processing unit as an address of the calculation value to be written in the conversion module.
The conversion module generates the correction value according to the area to which the write destination address belongs while dividing the lookup table of the macro specified by the central processing unit into a plurality of areas. The table value conversion device according to any one of
(Appendix 13)
The table value read from the memory storing the template table value is corrected, and the table value of the lookup table provided separately for the function macro that is the hardware for performing the specific processing is based on the corrected value. A method of converting and writing to the lookup table,
On the external bus of the central processing unit that reads out the table value as a model from the memory, a specific correction operation is performed on the data output from the central processing unit, and the macro has a look based on the calculated value. When a conversion module that converts the table value of the up table is interposed, and the table value is rewritten to the lookup table of the macro, the calculated value corrected through the conversion module is written to the corresponding lookup table. A table value conversion writing method characterized by that.
(Appendix 14)
The conversion module is configured to execute a correction operation according to a conversion parameter set in the conversion module, and an operation value written in a lookup table of the macro is in accordance with the set conversion parameter. 14. The table value conversion writing method according to appendix 13, wherein the table value conversion writing method is determined as a determined value.
(Appendix 15)
A multiplication value, an addition value, a clip lower limit value, and a clip upper limit value are prepared as conversion parameters set in the conversion module, the multiplication value is M, the addition value is A, the clip lower limit value is L, and the clip upper limit value is set. Is H, and the data output from the central processing unit is DATAin, and the calculation value output from the conversion module is DATAout, the calculation to the conversion module is the correction calculation.
DATAout = max (L, min (H, DATAin × M + A))
However, max (a, b): a function for selecting the larger of a and b
min (a, b): function that selects the smaller of a and b
15. The table value conversion writing method according to appendix 14, wherein an operation value to be written in a lookup table of the macro is obtained by executing
(Appendix 16)
After setting the conversion parameters in the conversion module corresponding to a specific macro lookup table,
a. A process of reading the table value as the template from the memory through the central processing unit by one address;
b. Corresponding to this reading, a process of converting the table value output from the central processing unit to be written to the lookup table of the specific macro by a correction operation based on the set conversion parameter through the conversion module ,
c. A process of writing the converted table value to a predetermined address of the lookup table of the specific macro;
A. ~ C. Note that the above processing is repeatedly executed until the table value read address from the memory and the table value write address to the lookup table of the specific macro are incremented until all the table values in the lookup table are rewritten. The table value conversion writing method according to 13 or 14.
10 中央演算処理装置(CPU)
20,70,80,90 変換モジュール
21,91 乗算器(第1演算器)
22,73,84,92 加算器(第1演算器)
30 ROM
40 マクロ
41〜43 マクロA〜マクロC
51〜53 ルックアップテーブル(LUT)
71,81 減算器(第2乗算器)
72,82 乗算器(第2演算器)
83 加算器(第2演算器)
85 係数制御回路
95 逆変換モジュール
OB 外部バス
10 Central processing unit (CPU)
20, 70, 80, 90
22, 73, 84, 92 Adder (first arithmetic unit)
30 ROM
40 Macro 41-43 Macro A-Macro C
51-53 Look-up table (LUT)
71, 81 subtractor (second multiplier)
72,82 multiplier (second computing unit)
83 Adder (second computing unit)
85
Claims (10)
前記メモリから雛形となるテーブル値を読み出す中央演算処理装置の外部バス上に、同中央演算処理装置から出力されるデータに対して特定の補正演算を施しつつこの演算値に基づき前記マクロの持つルックアップテーブルのテーブル値を変換する変換モジュールを介在させたことを特徴とするテーブル値変換装置。 The table value read from the memory storing the template table value is corrected, and the table value of the lookup table provided separately for the function macro that is the hardware that performs the specific processing is based on the corrected value. A table value conversion device for rewriting
On the external bus of the central processing unit that reads out the table value as a model from the memory, a specific correction operation is performed on the data output from the central processing unit, and the macro has a look based on the calculated value. A table value conversion apparatus comprising a conversion module for converting a table value of an up table.
DATAout=max(L,min(H,DATAin×M+A))
ただし、max(a,b):a,bのうちの大きい方を選択する関数
min(a,b):a,bのうちの小さい方を選択する関数
を実行するものである請求項2に記載のテーブル値変換装置。 The conversion parameters set in the conversion module are a multiplication value, an addition value, a clip lower limit value, and a clip upper limit value. The multiplication value is M, the addition value is A, the clip lower limit value is L, and the clip upper limit value is When H is H, data output from the central processing unit is DATAin, and an operation value output from the conversion module is DATAout, the conversion module calculates the correction operation as the correction operation.
DATAout = max (L, min (H, DATAin × M + A))
However, max (a, b): a function for selecting the larger of a and b
min (a, b): function that selects the smaller of a and b
The table value conversion apparatus according to claim 2, wherein:
前記逆変換モジュールは、前記変換パラメータに応じて該逆変換モジュールに設定される逆変換パラメータに従って前記逆変換を実行するものである請求項4に記載のテーブル値変換装置。 The conversion module performs the specific correction calculation according to a conversion parameter set in the conversion module,
The table value conversion device according to claim 4, wherein the inverse conversion module performs the inverse conversion according to an inverse conversion parameter set in the inverse conversion module according to the conversion parameter.
前記変換モジュールは、同変換モジュールに設定される変換パラメータ及び前記書き込み先のアドレスの少なくとも一方に応じて補正値を生成し、該補正値に従って前記特定の補正演算を実行する請求項1〜5にいずれか一項に記載のテーブル値変換装置。 A predetermined address of the lookup table of the macro specified by the central processing unit is input to the conversion module from the central processing unit as an address of the calculation value to be written in the conversion module.
6. The conversion module according to claim 1, wherein the conversion module generates a correction value according to at least one of a conversion parameter set in the conversion module and the write destination address, and executes the specific correction calculation according to the correction value. The table value conversion apparatus as described in any one of Claims.
前記変換モジュールは、前記中央演算処理装置により指定される前記マクロの持つルックアップテーブルを複数の領域に分割しつつ、前記書き込み先のアドレスの属する前記領域に応じて、前記補正値を生成するための第2演算器に入力される補正係数を設定する係数制御回路を備える請求項1〜7のいずれか一項に記載のテーブル値変換装置。 A predetermined address of the lookup table of the macro specified by the central processing unit is input to the conversion module from the central processing unit as an address of the calculation value to be written in the conversion module.
The conversion module generates the correction value according to the area to which the write destination address belongs while dividing the lookup table of the macro specified by the central processing unit into a plurality of areas. The table value conversion apparatus as described in any one of Claims 1-7 provided with the coefficient control circuit which sets the correction coefficient input into said 2nd calculator.
前記メモリから雛形となるテーブル値を読み出す中央演算処理装置の外部バス上に、同中央演算処理装置から出力されるデータに対して特定の補正演算を施しつつこの演算値に基づき前記マクロの持つルックアップテーブルのテーブル値を変換する変換モジュールを介在させ、同マクロの持つルックアップテーブルへのテーブル値の書き換え時には、この変換モジュールを通じて補正演算された演算値を該当するルックアップテーブルに対して書き込むようにしたことを特徴とするテーブル値変換書き込み方法。 The table value read from the memory storing the template table value is corrected, and the table value of the lookup table provided separately for the function macro that is the hardware for performing the specific processing is based on the corrected value. A method of converting and writing to the lookup table,
On the external bus of the central processing unit that reads out the table value as a model from the memory, a specific correction operation is performed on the data output from the central processing unit, and the macro has a look based on the calculated value. When a conversion module that converts the table value of the up table is interposed, and the table value is rewritten to the lookup table of the macro, the calculated value corrected through the conversion module is written to the corresponding lookup table. A table value conversion writing method characterized by that.
a.前記中央演算処理装置を通じて前記メモリから前記雛形となるテーブル値を1アドレス分だけ読み込む処理、
b.この読み込みに対応して前記中央演算処理装置から前記特定のマクロのルックアップテーブルに対して書き込むべく出力される当該テーブル値を前記変換モジュールを通じて前記設定された変換パラメータに基づく補正演算により変換する処理、
c.この変換されたテーブル値を前記特定のマクロのルックアップテーブルの所定のアドレスに書き込む処理、
といったa.〜c.の処理を、前記メモリからのテーブル値読み込みアドレスと前記特定のマクロのルックアップテーブルへのテーブル値書き込みアドレスとをインクリメントしつつ、前記ルックアップテーブルの全てのテーブル値が書き換わるまで繰り返し実行する請求項9に記載のテーブル値変換書き込み方法。 After setting a conversion parameter for the specific correction operation in the conversion module corresponding to a lookup table of a specific macro,
a. A process of reading the table value as the template from the memory through the central processing unit by one address;
b. Corresponding to this reading, a process of converting the table value output from the central processing unit to be written to the lookup table of the specific macro by a correction operation based on the set conversion parameter through the conversion module ,
c. A process of writing the converted table value to a predetermined address of the lookup table of the specific macro;
A. ~ C. The process is repeatedly executed until all the table values of the lookup table are rewritten while incrementing the table value read address from the memory and the table value write address to the lookup table of the specific macro. Item 10. The table value conversion writing method according to Item 9.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007079022A JP5045179B2 (en) | 2006-03-29 | 2007-03-26 | Table value converter |
US12/056,036 US20080189511A1 (en) | 2006-03-29 | 2008-03-26 | Table value conversion device and method for converting and writing table value |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006091274 | 2006-03-29 | ||
JP2006091274 | 2006-03-29 | ||
JP2007079022A JP5045179B2 (en) | 2006-03-29 | 2007-03-26 | Table value converter |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007293827A true JP2007293827A (en) | 2007-11-08 |
JP5045179B2 JP5045179B2 (en) | 2012-10-10 |
Family
ID=38764361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007079022A Expired - Fee Related JP5045179B2 (en) | 2006-03-29 | 2007-03-26 | Table value converter |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5045179B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9544559B2 (en) | 2014-05-08 | 2017-01-10 | Socionext Inc. | Device and method for processing images |
JP2019503126A (en) * | 2015-12-09 | 2019-01-31 | ドルビー ラボラトリーズ ライセンシング コーポレイション | Low-computation lookup table construction with reduced interpolation error |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06223158A (en) * | 1992-11-24 | 1994-08-12 | Eastman Kodak Co | Method and system for guarantee of gradation consistency in radiation image network |
JPH07177366A (en) * | 1993-12-17 | 1995-07-14 | Canon Inc | Color image processor |
JPH07203231A (en) * | 1993-12-28 | 1995-08-04 | Canon Inc | Color picture processor |
JPH07264426A (en) * | 1994-03-25 | 1995-10-13 | Canon Inc | Color image processor |
JPH07273972A (en) * | 1994-03-31 | 1995-10-20 | Canon Inc | Color image processor |
JPH08212339A (en) * | 1995-02-08 | 1996-08-20 | Fuji Xerox Co Ltd | Image processor |
WO1998042142A1 (en) * | 1997-03-14 | 1998-09-24 | Sony Corporation | Color correction device, color correction method, picture processing device, and picture processing method |
JP2001061073A (en) * | 1999-08-20 | 2001-03-06 | Toshiba Tec Corp | Color image processing unit |
US6771275B1 (en) * | 2000-06-07 | 2004-08-03 | Oak Technology, Inc. | Processing system and method using a multi-dimensional look-up table |
JP2005136745A (en) * | 2003-10-30 | 2005-05-26 | Murata Mach Ltd | Color image processing apparatus |
-
2007
- 2007-03-26 JP JP2007079022A patent/JP5045179B2/en not_active Expired - Fee Related
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06223158A (en) * | 1992-11-24 | 1994-08-12 | Eastman Kodak Co | Method and system for guarantee of gradation consistency in radiation image network |
JPH07177366A (en) * | 1993-12-17 | 1995-07-14 | Canon Inc | Color image processor |
JPH07203231A (en) * | 1993-12-28 | 1995-08-04 | Canon Inc | Color picture processor |
JPH07264426A (en) * | 1994-03-25 | 1995-10-13 | Canon Inc | Color image processor |
JPH07273972A (en) * | 1994-03-31 | 1995-10-20 | Canon Inc | Color image processor |
JPH08212339A (en) * | 1995-02-08 | 1996-08-20 | Fuji Xerox Co Ltd | Image processor |
WO1998042142A1 (en) * | 1997-03-14 | 1998-09-24 | Sony Corporation | Color correction device, color correction method, picture processing device, and picture processing method |
JP2001061073A (en) * | 1999-08-20 | 2001-03-06 | Toshiba Tec Corp | Color image processing unit |
US6771275B1 (en) * | 2000-06-07 | 2004-08-03 | Oak Technology, Inc. | Processing system and method using a multi-dimensional look-up table |
JP2005136745A (en) * | 2003-10-30 | 2005-05-26 | Murata Mach Ltd | Color image processing apparatus |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9544559B2 (en) | 2014-05-08 | 2017-01-10 | Socionext Inc. | Device and method for processing images |
JP2019503126A (en) * | 2015-12-09 | 2019-01-31 | ドルビー ラボラトリーズ ライセンシング コーポレイション | Low-computation lookup table construction with reduced interpolation error |
US10542269B2 (en) | 2015-12-09 | 2020-01-21 | Dolby Laboratories Licensing Corporation | Low-complexity lookup table construction with reduced interpolation error |
Also Published As
Publication number | Publication date |
---|---|
JP5045179B2 (en) | 2012-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2006293663A (en) | Device for generating memory address and processor with same, and method of generating memory address | |
JP5045179B2 (en) | Table value converter | |
KR20170036378A (en) | Lens shading correction circuit and apparatus having the same | |
JP6300444B2 (en) | Image processing apparatus, image processing method, and program | |
US20080189511A1 (en) | Table value conversion device and method for converting and writing table value | |
JP6755811B2 (en) | Image processing equipment, image processing methods, and programs | |
US20070286529A1 (en) | Table value conversion device and method for converting and writing table value | |
JP2906814B2 (en) | Color signal converter | |
JP4892010B2 (en) | Image generation program, image generation apparatus, and image generation method | |
CN112017105A (en) | Color correction FPGA implementation device and method, color correction device and storage medium | |
JP4947154B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP5441535B2 (en) | Image processing apparatus and image processing method | |
JP5111310B2 (en) | Image processing method and image processing apparatus | |
JP6273764B2 (en) | Image processing device | |
US20100195125A1 (en) | Image conversion device, image conversion method, and conversion program | |
JP3722740B2 (en) | Video processing apparatus and video processing method | |
JP2017208719A (en) | Image processing apparatus | |
JP2021103346A (en) | Data conversion device, data conversion method, and program | |
JP2002300398A (en) | Image processor | |
JP2003091270A5 (en) | ||
JP3007248B2 (en) | Programming device | |
JP2007300637A (en) | Color profile generating apparatus and method | |
JP2006094160A (en) | Method, apparatus and program for image processing | |
TWI584197B (en) | Code dynamic generating system and method | |
Trakalo et al. | Design flow for implementing image processing in FPGAs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20080730 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20091109 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110622 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110628 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110829 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111206 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120125 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120619 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120702 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150727 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5045179 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |