JP6448410B2 - Data conversion apparatus, control method therefor, and program - Google Patents

Data conversion apparatus, control method therefor, and program Download PDF

Info

Publication number
JP6448410B2
JP6448410B2 JP2015037292A JP2015037292A JP6448410B2 JP 6448410 B2 JP6448410 B2 JP 6448410B2 JP 2015037292 A JP2015037292 A JP 2015037292A JP 2015037292 A JP2015037292 A JP 2015037292A JP 6448410 B2 JP6448410 B2 JP 6448410B2
Authority
JP
Japan
Prior art keywords
data
grid point
coordinate
axis
coordinates
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.)
Active
Application number
JP2015037292A
Other languages
Japanese (ja)
Other versions
JP2016163070A5 (en
JP2016163070A (en
Inventor
健太 寳▲崎▼
健太 寳▲崎▼
石川 尚
尚 石川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2015037292A priority Critical patent/JP6448410B2/en
Publication of JP2016163070A publication Critical patent/JP2016163070A/en
Publication of JP2016163070A5 publication Critical patent/JP2016163070A5/ja
Application granted granted Critical
Publication of JP6448410B2 publication Critical patent/JP6448410B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Record Information Processing For Printing (AREA)

Description

本発明は、ルックアップテーブルを用いたデータ変換装置およびその制御方法に関する。   The present invention relates to a data conversion apparatus using a lookup table and a control method thereof.

近年、画像の入力機器としてスキャナやデジタルカメラ、デジタルビデオカメラなどが普及している。一方、出力機器としてはインクジェットや電子写真などの方式を用いた各種カラープリンタが普及している。これらのカラー入出力機器はそれぞれ固有の色空間を有している。例えばスキャナで得たカラー画像をそのまま別のカラープリンタに転送して印刷した場合、印刷されたカラー画像の色がスキャナによって読みとられたオリジナルのカラー画像の色と一致することはほとんどない。このようなカラー画像等に対するデバイス間での色再現性の問題を解決するためには、入力デバイスの色空間を出力デバイスの色空間に変換する処理(色空間変換と呼ぶ)が必要となる。このような色空間変換は入出力機器の色再現性を高めるために入出力機器に搭載されている。   In recent years, scanners, digital cameras, digital video cameras, and the like have become widespread as image input devices. On the other hand, as an output device, various color printers using methods such as ink jet and electrophotography have become widespread. Each of these color input / output devices has a unique color space. For example, when a color image obtained by a scanner is transferred to another color printer and printed as it is, the color of the printed color image hardly matches the color of the original color image read by the scanner. In order to solve such a problem of color reproducibility between devices for a color image or the like, a process of converting the color space of the input device to the color space of the output device (referred to as color space conversion) is required. Such color space conversion is installed in the input / output device in order to improve the color reproducibility of the input / output device.

この色空間変換とは、具体的には入力ガンマ補正、輝度濃度変換、マスキング、黒生成、出力ガンマ補正等の一連の画像処理全体、もしくはその中の一部の処理を指す。一般的には、入力デバイスの3色(例えばレッド、ブルー、グリーンの3色。RGBとも略せる)のデジタル画像信号を同時に参照して、出力デバイスの3色(例えばシアン、マゼンタ、イエローの3色。CMYとも略せる)、あるいは4色(例えばシアン、マゼンタ、イエロー、ブラックの4色。CMYKとも略せる)のデジタル画像信号に変換することが多い。   The color space conversion specifically refers to the entire series of image processing such as input gamma correction, luminance density conversion, masking, black generation, output gamma correction, or a part of the processing. In general, three digital colors (for example, three colors of cyan, magenta, and yellow) of the output device are simultaneously referenced by simultaneously referring to digital image signals of three colors of the input device (for example, three colors of red, blue, and green; abbreviated as RGB). In many cases, the digital image signal is converted into a digital image signal of four colors (for example, four colors of cyan, magenta, yellow, and black; also abbreviated as CMYK).

色空間変換の実現方法として、予め変換結果をルックアップテーブル(以下、LUTと呼ぶ)としてメモリに記憶しておき、入力された画像信号に対してそのLUTを参照して変換結果を出力する方法がある。このLUTを用いた色空間変換方法では、LUTのメモリを削減するため補間演算を併用するのが一般的である。即ち、被変換色の代表点に対応する変換色のデータをメモリに記憶させ、メモリ内に記憶された数点の変換色データを元に補間演算を行い、新たな変換色データを算出することが行われている。RGBなどの軸上の代表点の取り方は細かいほど変換精度は高くなるが、必要なメモリの容量が増える。逆に代表点の取り方が粗いと変換精度は低くなるが、必要なメモリの容量は減る。軸上の代表点の数をグリッド数または格子点数と呼び、8から33までのグリッド数(格子点数)がよく使用されている。   As a method for realizing color space conversion, a conversion result is stored in advance in a memory as a lookup table (hereinafter referred to as LUT), and the conversion result is output by referring to the LUT for an input image signal. There is. In this color space conversion method using the LUT, an interpolation operation is generally used together to reduce the memory of the LUT. That is, the conversion color data corresponding to the representative point of the color to be converted is stored in the memory, and the interpolation calculation is performed based on several conversion color data stored in the memory to calculate new conversion color data. Has been done. The smaller the representative points on the axes such as RGB, the higher the conversion accuracy, but the more memory capacity is required. On the other hand, if the representative points are rough, the conversion accuracy decreases, but the required memory capacity decreases. The number of representative points on the axis is called the number of grids or the number of grid points, and the number of grids (number of grid points) from 8 to 33 is often used.

格子点上の代表点を参照する個数は補間方法によって異なる。例えば、立方体補間の場合は8点、四面体補間の場合は4点の代表点を参照して補間演算を行う。代表点の変換色データはメモリに格納されているので、複数の代表点の変換色データを参照するためにはメモリへの複数回のアクセスが発生するため、逐次的なアクセスを行っていては処理性能を上げることが出来ない。そこで、メモリを複数に分割し複数回のメモリアクセスを同時に行うことで、処理性能を向上させる方法が提案されている。   The number of references to the representative points on the grid points varies depending on the interpolation method. For example, interpolation calculation is performed with reference to eight representative points in the case of cubic interpolation and four representative points in the case of tetrahedral interpolation. Since the conversion color data of the representative point is stored in the memory, in order to refer to the conversion color data of a plurality of representative points, multiple accesses to the memory occur. Processing performance cannot be improved. Therefore, a method for improving the processing performance by dividing the memory into a plurality of parts and simultaneously performing a plurality of memory accesses has been proposed.

特許文献1では立方体補間を高速に実行するため、32格子点の変換色データを8個のメモリに分けて記憶し、並列に読み出すことで高速化を行っている。また、特許文献2には、2のべき乗では表せられない格子点数の変換色データをメモリに分割して記憶する方法が示されている。一例として33格子点の変換色データを8個のメモリに分割し、そのアドレスを17ビットで生成する方法について記載している。特許文献1,2のいずれにおいても、各軸の座標値の偶数/奇数が同一となる代表点が同一のメモリに格納される。たとえば、被変換色がRGBの3色の場合、RGBの各軸の座標値の偶数、奇数の組み合わせである(偶数、偶数、偶数)、(偶数、偶数、奇数)、・・・、(奇数、奇数、奇数)で、それぞれ別の8個のメモリに分割して格納することで高速処理を可能にしている。   In Patent Document 1, in order to execute cube interpolation at high speed, the conversion color data of 32 grid points is stored in 8 memories and read out in parallel to increase the speed. Further, Patent Document 2 discloses a method of storing converted color data of the number of grid points that cannot be expressed by a power of 2 in a memory. As an example, a method is described in which the converted color data of 33 grid points is divided into 8 memories and the addresses are generated with 17 bits. In both Patent Documents 1 and 2, representative points at which the even / odd coordinate values of each axis are the same are stored in the same memory. For example, when the colors to be converted are three colors of RGB, it is a combination of even and odd coordinate values of each axis of RGB (even, even, even), (even, even, odd), ..., (odd , Odd number, odd number) and divided and stored in eight different memories, respectively, to enable high-speed processing.

米国特許第4837722号明細書U.S. Pat. No. 4,837,722 特開2001−36755号公報JP 2001-36755 A

特許文献1では32格子点での処理を行うために合計32768(=32*32*32)個のデータを格納できるメモリが必要である。また、特許文献2では33格子点での処理を行うために35937(=33*33*33)個のデータを格納できるメモリが必要である。互いに必要なメモリ容量が異なるため、複数のグリッド数に対応するためには、最も大きい容量に合わせてメモリ分割を行う必要がある。また、一軸当たりの格子点数が奇数の場合に、上述のように8個のメモリにデータを分けると、各メモリに格納するデータ容量は各軸の座標値の偶数、奇数の組合せで異なってくる。偶数に属する格子点の数と奇数に属する格子点の数が異なるためである。従って、LUTを設定するために代表点の変換色データ(以下、格子点データと記す)をメモリに格納する際、メモリ毎に格子点データ数を意識して格納する必要があった。あるいは、このような制御をなくすために、最も容量の大きなメモリにあわせて不要なデータを追加して格納する必要があった。   In Patent Document 1, a memory capable of storing a total of 32768 (= 32 * 32 * 32) pieces of data is necessary to perform processing at 32 grid points. In Patent Document 2, a memory capable of storing 35937 (= 33 * 33 * 33) pieces of data is required to perform processing at 33 grid points. Since the necessary memory capacities are different from each other, it is necessary to divide the memory according to the largest capacity in order to support a plurality of grid numbers. Also, when the number of grid points per axis is odd, if the data is divided into eight memories as described above, the data capacity stored in each memory varies depending on the combination of even and odd coordinate values of each axis. . This is because the number of lattice points belonging to the even number and the number of lattice points belonging to the odd number are different. Therefore, when storing the conversion color data of the representative points (hereinafter referred to as grid point data) in the memory in order to set the LUT, it is necessary to store the data in consideration of the number of grid point data for each memory. Alternatively, in order to eliminate such control, it is necessary to add and store unnecessary data in accordance with the memory having the largest capacity.

一方、格子点データの参照時のLUTのアクセスの際は、各軸の格子点座標のLSBを連結したアドレスがRAMを選択するアドレス(以下、バンクアドレスと記す)になり、残りの上位ビットを連結したものがRAMへの実アドレスになる。上記33グリッドの場合、各軸には33個の格子点があるため、座標は各軸6ビットで表現され、LSBはバンクアドレスとして使用されるので、実アドレスは(6−1)+(6−1)+(6−1)=15ビットとなる。つまり、アドレス空間としては215=32768の容量を持つことになる。しかしながら、各軸の奇数番目の格子点のみあるいは偶数番目の格子点のみが参照されるので、各軸について参照される格子点の数は最大で17個(33/2+1)となる。すなわち、各メモリが実際に必要な容量は最大17×17×17=4913個の格子点データを格納できる容量であり、そのため、メモリアドレス上、飛び飛びのアドレスに格子点データが格納されることになってしまう。 On the other hand, when accessing the LUT when referring to grid point data, the address obtained by concatenating the LSBs of the grid point coordinates of each axis becomes the address for selecting the RAM (hereinafter referred to as a bank address), and the remaining upper bits are changed. The concatenated one becomes the real address to the RAM. In the case of the 33 grid, since there are 33 grid points on each axis, the coordinates are expressed by 6 bits for each axis, and the LSB is used as a bank address, so the real address is (6-1) + (6 -1) + (6-1) = 15 bits. That is, the address space has a capacity of 2 15 = 32768. However, since only odd-numbered grid points or even-numbered grid points on each axis are referred to, the maximum number of grid points referenced for each axis is 17 (33/2 + 1). In other words, the capacity actually required for each memory is a capacity capable of storing a maximum of 17 × 17 × 17 = 4913 pieces of grid point data. Therefore, the grid point data is stored at a jump address on the memory address. turn into.

本発明は上記課題に鑑みてなされたものであり、LUTを複数のメモリに分割して格納する際の、メモリアドレス生成に関して好適な構成を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a suitable configuration for memory address generation when an LUT is divided and stored in a plurality of memories.

上記の目的を達成するための本発明の一態様によるデータ変換装置は以下の構成を備える。すなわち、
各軸に2+1個の格子点を有するm次元のルックアップテーブルを参照して、m個の要素値を有する入力データを変換するデータ変換装置であって、
前記ルックアップテーブルは2個のメモリを有し、各座標の格子点データがその座標の各軸の座標値の奇数、偶数の組み合わせで特定されるメモリに格納されており、
前記入力データに基づいて、各軸の座標値がn+1ビットで表された、前記ルックアップテーブルの格子点座標を、補間処理に用いるためm+1個生成する生成手段と、
前記格子点座標の各軸の座標値の最下位ビットを連結して得られるmビットのデータに基づいて、前記2個のメモリからアクセス先のメモリを決定する決定手段と、
前記格子点座標を、(2n−1+1)個以下の連続するアドレスのいずれか一つに変換して得られたアドレスで、前記アクセス先のメモリにアクセスするアクセス手段と、を備える。
In order to achieve the above object, a data conversion apparatus according to an aspect of the present invention has the following arrangement. That is,
A data conversion device for converting input data having m element values by referring to an m-dimensional lookup table having 2 n +1 lattice points on each axis,
The look-up table has 2 m memories, and grid point data of each coordinate is stored in a memory specified by a combination of an odd number and an even number of coordinate values of each axis of the coordinates,
Generating means for generating m + 1 grid point coordinates of the lookup table in which the coordinate value of each axis is represented by n + 1 bits based on the input data for use in interpolation processing ;
Determining means for determining an access destination memory from the 2 m memories based on m-bit data obtained by concatenating the least significant bits of the coordinate values of the respective axes of the grid point coordinates;
Access means for accessing the access destination memory at an address obtained by converting the grid point coordinates into any one of (2 n-1 +1) m or less consecutive addresses.

本発明によれば、LUTを複数のメモリに分割して格納する際のメモリアドレス生成において、無駄なアドレスの生成が低減される。   According to the present invention, generation of useless addresses is reduced in memory address generation when the LUT is divided and stored in a plurality of memories.

第1実施形態によるAccording to the first embodiment 第1実施形態におけるデータ変換部の構成例を示すブロック図。The block diagram which shows the structural example of the data converter in 1st Embodiment. 座標生成部の構成を示すブロック図。The block diagram which shows the structure of a coordinate production | generation part. 単位立方体を6つの四面体に分割する例を示す図。The figure which shows the example which divides | segments a unit cube into six tetrahedrons. 下位データの大小比較に応じた順序データと係数を表す図。The figure showing the order data and coefficient according to the size comparison of low-order data. 第1実施形態におけるアドレス生成部の回路構成例を示すブロック図。The block diagram which shows the circuit structural example of the address generation part in 1st Embodiment. 第1実施形態におけるアドレス生成部の回路を4つに統合した図。The figure which integrated the circuit of the address generation part in 1st Embodiment into four. 第2実施形態におけるデータ変換部の構成例を示すブロック図。The block diagram which shows the structural example of the data converter in 2nd Embodiment. 第2実施形態におけるアドレス生成部の回路構成例を示すブロック図。The block diagram which shows the circuit structural example of the address generation part in 2nd Embodiment. 分割したメモリと対応するワード数とアドレスのビット幅を示す図。The figure which shows the bit width of the word number and address corresponding to the divided | segmented memory.

以下、添付の図面を参照して、本発明を好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に限定されるものではない。   Hereinafter, the present invention will be described in detail based on preferred embodiments with reference to the accompanying drawings. Note that the configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.

<第1実施形態>
図1Aは、第1実施形態による画像形成装置10の概略の構成例を示すブロック図である。格納部12に格納されている画像データは、RGBの3つの要素値を有する入力データである。画像入力部13は、格納部12から格納されている画像データを読み出し、画像処理部14へ供給する。画像処理部14は、RGB空間の画像データに周知の変換処理を施し、CMYK空間の画像データへ変換する。画像処理部14により得られたCMYK空間の画像データは印刷部15へ供給され、印刷される。画像処理部14は、ルックアップテーブルを参照して、3つの要素値を有する入力データを4つの要素値からなるデータへ変換するデータ変換部100を有する。なお、画像処理部14は、ROM22に格納されたプログラムを実行して、画像形成装置10の全体的な制御を実現するCPU21を有している。以下に説明するデータ変換部100の構成や機能の一部またはすべては、CPU21がROM22に格納されたプログラムを実行することにより実現されてもよいし、専用のハードウエアで実現されてもよい。
<First Embodiment>
FIG. 1A is a block diagram illustrating a schematic configuration example of an image forming apparatus 10 according to the first embodiment. The image data stored in the storage unit 12 is input data having three element values of RGB. The image input unit 13 reads the image data stored from the storage unit 12 and supplies it to the image processing unit 14. The image processing unit 14 performs well-known conversion processing on the image data in the RGB space and converts the image data into image data in the CMYK space. The image data in the CMYK space obtained by the image processing unit 14 is supplied to the printing unit 15 and printed. The image processing unit 14 includes a data conversion unit 100 that converts input data having three element values into data including four element values with reference to a lookup table. The image processing unit 14 includes a CPU 21 that executes a program stored in the ROM 22 and realizes overall control of the image forming apparatus 10. Part or all of the configuration and functions of the data conversion unit 100 described below may be realized by the CPU 21 executing a program stored in the ROM 22, or may be realized by dedicated hardware.

図1Bは、第1実施形態によるデータ変換処理を実行するデータ変換部100の構成例を示すブロック図である。データ変換部100では、m個の軸の各々に2+1個の格子点を有するm次元のルックアップテーブル(以下、LUT)を参照して、m個の要素値を有する入力データを変換する制御を行う。本実施形態のデータ変換部100は、LUTの参照によりRGBデータをCMYKデータへ変換するための3次元(m=3)のLUTを用いた例を説明する。より詳しくは、データ変換部100が、各色10ビットのRGBの画素データ(m=3)を入力し、17格子点(n=4)の3次元のLUTを用いた四面体補間処理による色変換を行い、各色10ビットのCMYKの画素データとして出力する例を示す。まず、入力されたRGBの各データは、基準点決定部101へ入力され、そこでLUTの各軸の格子点を特定する上位nビット(本例では上位4ビット)と、それ以外の下位ビットに分けられる。下位ビットは領域判定部102へ入力される。領域判定部102は、補間に用いる四面体の領域判定を行い、四面体を特定するのに用いられる順序データ(order[0]〜order[2])と、補間処理のための補間係数(係数0〜3)を出力する。他方、上位nビットは座標生成部103へ入力される。座標生成部103は、基準点決定部101からの上位ビットと、領域判定部102からの順序データとを参照して、四面体補間処理に用いる四面体の頂点を特定する格子点の座標を生成する。 FIG. 1B is a block diagram illustrating a configuration example of the data conversion unit 100 that executes data conversion processing according to the first embodiment. The data converter 100 converts input data having m element values with reference to an m-dimensional lookup table (hereinafter referred to as LUT) having 2 n +1 lattice points on each of m axes. Take control. The data conversion unit 100 according to the present embodiment will be described using an example of using a three-dimensional (m = 3) LUT for converting RGB data into CMYK data by referring to the LUT. More specifically, the data conversion unit 100 inputs 10-bit RGB pixel data (m = 3) for each color, and performs color conversion by tetrahedral interpolation using a three-dimensional LUT with 17 grid points (n = 4). And an example of outputting as 10-bit CMYK pixel data for each color is shown. First, each input RGB data is input to the reference point determination unit 101, where the upper n bits (upper 4 bits in this example) for specifying the grid points of each axis of the LUT and the other lower bits are specified. Divided. The lower bits are input to the area determination unit 102. The region determination unit 102 performs region determination of a tetrahedron used for interpolation, order data (order [0] to order [2]) used to identify the tetrahedron, and an interpolation coefficient (coefficient for interpolation processing) 0 to 3) are output. On the other hand, the upper n bits are input to the coordinate generation unit 103. The coordinate generation unit 103 generates the coordinates of the grid points that identify the vertices of the tetrahedron used for the tetrahedral interpolation processing by referring to the higher order bits from the reference point determination unit 101 and the order data from the region determination unit 102 To do.

座標生成部103で生成された格子点座標はアドレス生成部104へ入力される。アドレス生成部104は、入力された格子点座標から、アクセス先のメモリを指定するバンクデータと、そのアクセス先のメモリへアクセスするためのアドレスを生成し、出力する。生成されたアドレスはLUT部105へ入力され、バンクデータはセレクタ部106へ入力される。LUT部105では、入力されたアドレスにしたがってLUTから読み出された値が出力される。LUT部105は2個、本例では2=8個のメモリを有し、生成されたアドレスに従って各メモリから読み出された格子点データ(各色10ビットのCMYKデータ)を出力する。セレクタ部106はLUT部105から出力された格子点データとアドレス生成部104からのバンクデータにより、補間処理に必要な4つのデータを選択し、選択データとして出力する。補間部107では選択データと係数データとの積和演算による補間処理を行い、新たなCMYKの値を算出して出力する。以上が本実施形態のデータ変換部100による、四面体補間処理を含むデータ変換処理の大まかな流れである。次に、各構成要素の詳細な説明をしていく。 The grid point coordinates generated by the coordinate generation unit 103 are input to the address generation unit 104. The address generation unit 104 generates bank data specifying an access destination memory and an address for accessing the access destination memory from the input grid point coordinates and outputs the bank data. The generated address is input to the LUT unit 105, and the bank data is input to the selector unit 106. The LUT unit 105 outputs a value read from the LUT according to the input address. The LUT unit 105 has 2 m , 2 3 = 8 memories in this example, and outputs grid point data (10-bit CMYK data for each color) read from each memory according to the generated address. The selector unit 106 selects four data necessary for the interpolation processing based on the grid point data output from the LUT unit 105 and the bank data from the address generation unit 104, and outputs the selected data as selection data. The interpolation unit 107 performs an interpolation process by a product-sum operation of the selection data and the coefficient data, and calculates and outputs a new CMYK value. The above is a general flow of data conversion processing including tetrahedral interpolation processing by the data conversion unit 100 of the present embodiment. Next, each component will be described in detail.

基準点決定部101は、入力されたRGBの画素データ(RGB各10ビット)を、メモリから補間演算に必要な値(LUTの格子点の値)をリードするためのアドレス生成に必要な上位データと、補間演算時の係数として使用される下位データに分割する。上位データと下位データへ分ける方法は、公知の方法を用いれば良い。たとえば、一軸あたりの格子点数が2+1個の場合、入力データの各軸を2個の区間に分け、そのうちの一つを特定するための上位nビットが上位データとして出力される。一例を挙げると、1軸当たり17格子点(n=4)の場合、入力データの各軸を16区間に分けた時に入力データが属する区間を示す部分、すなわち上位4ビットが上位データとして出力される。これは各色の入力データ(10ビット)のうちの上位4ビットを抽出して出力することで実現され得る。一方、下位データは入力データの10ビットのうちの下位6ビットとなるが、それらはRGB成分で正規化されてから出力される。 The reference point determination unit 101 uses the input RGB pixel data (10 bits for each RGB) as upper data necessary for generating an address for reading a value necessary for an interpolation operation (LUT grid point value) from the memory. And subordinate data used as a coefficient at the time of interpolation calculation. A known method may be used as a method of dividing the upper data and the lower data. For example, when the number of grid points per axis is 2 n +1, each axis of the input data is divided into 2 n sections, and the upper n bits for specifying one of them are output as upper data. For example, in the case of 17 grid points per axis (n = 4), when each axis of the input data is divided into 16 sections, the portion indicating the section to which the input data belongs, that is, the upper 4 bits are output as the upper data. The This can be realized by extracting and outputting the upper 4 bits of the input data (10 bits) of each color. On the other hand, the lower data is the lower 6 bits of the 10 bits of the input data, but these are output after being normalized with the RGB components.

領域判定部102は、入力された下位データの示す座標が、選択された単位立方体を6つの四面体領域に分割したうちのどの四面体に属するかを決定する。単位立方体とは、上述の上位4ビットにより特定される格子点(基準点)を(x,y,z)とした場合に、(x,y,z)〜(x+1,y+1,z+1)の8個の格子点により特定される立方体である。図3(a)〜(f)に、単位立方体を分割する6つの四面体領域を示す。一番左下の出発点を基準点301と呼び、この点を基準として入力された下位データのうち値の大きい軸の方向を選んで進み、最終的に対角点304に到達する経路によって四面体が一つだけ決まる。基準点301からRGBいずれかの軸で距離が1だけ進んだ点を第1中間点302、さらに別の軸で距離が1つ進んだ点を第2中間点303、最後の点を対角点304と呼ぶ。基準点301と対角点304は6つの四面体で共通である。   The region determination unit 102 determines which tetrahedron of the divided unit cube into six tetrahedron regions belongs to the coordinates indicated by the input lower data. The unit cube is 8 from (x, y, z) to (x + 1, y + 1, z + 1), where (x, y, z) is the lattice point (reference point) specified by the upper 4 bits. It is a cube specified by individual lattice points. 3A to 3F show six tetrahedral regions that divide the unit cube. The lower left starting point is referred to as a reference point 301, and the direction of the axis with the larger value is selected from the lower data input with this point as a reference, and the tetrahedron is finally reached by a route that reaches the diagonal point 304. Only one is determined. The first intermediate point 302 is a point where the distance is advanced by one on the RGB axis from the reference point 301, the second intermediate point 303 is a point where the distance is further advanced by another axis, and the last point is a diagonal point. 304. The reference point 301 and the diagonal point 304 are common to the six tetrahedrons.

領域判定部102は、まず、入力されたRGBの各々の下位データの大きさを比較して、大きさの順序を示す順序データOrder[0]〜[2]を決定する。Order[0]は最も大きな値を持つ色を表し、Order[2]は最も小さな値を持つ色を表す。例えば、R成分の下位データをr、G成分の下位データをg、B成分の下位データをbとし、r>b>gとするとOrder[0]=0、Order[1]=2、Order[2]=1となる(0〜2はそれぞれr、g、bを示す)。下位データの大小比較のためにはr−gの値と、g−bの値と、b−rの値の3つの値の正負を調べれば良く、その結果に応じて得られるOrder[0]〜[2]を表にしたものを図4に示す。また、領域判定部102は同時に、補間のための係数0から係数3も算出する。係数0〜3の算出方法は、図4に示したとおりである。なお、図4の係数0の算出部分でWと書いているのは、正規化の1にあたるものであり、r+g+b=Wを満たす。   First, the area determination unit 102 compares the sizes of the input RGB subordinate data and determines the order data Order [0] to [2] indicating the order of the sizes. Order [0] represents the color having the largest value, and Order [2] represents the color having the smallest value. For example, if the lower data of the R component is r, the lower data of the G component is g, the lower data of the B component is b, and r> b> g, Order [0] = 0, Order [1] = 2, Order [ 2] = 1 (0 to 2 represent r, g, and b, respectively). In order to compare the magnitudes of the subordinate data, it is only necessary to check the positive / negative of the three values of the rg value, the gb value, and the br value, and Order [0] obtained according to the result. FIG. 4 shows a table of ~ [2]. At the same time, the region determination unit 102 also calculates coefficients 0 to 3 for interpolation. The calculation method of the coefficients 0 to 3 is as shown in FIG. In addition, what is written as W in the calculation part of the coefficient 0 in FIG. 4 corresponds to normalization 1 and satisfies r + g + b = W.

座標生成部103は、各色の上位4ビットのデータにしたがって、補間処理に必要な基準点、第1中間点、第2中間点、対角点の4点の座標を求める。図2に座標生成部103の内部構成を示す。まず、入力された上位nビット(4ビット)のデータ(上位データ)はビット拡張部201で5ビットのデータへ拡張される。これは、対角点の座標値が最大で(2+1,2+1,2+1)、すなわち(17,17,17)となるためである。3つのビット拡張部201により得られた5ビットのデータは、ビット連結器202、1軸加算器203、2軸加算器204、3軸加算器205に同時に入力される。また、1軸加算器203には領域判定部102からOrder[0]が、2軸加算器204には領域判定部102からOrder[0]とOrder[1]が入力される。 The coordinate generation unit 103 obtains coordinates of four points, that is, a reference point, a first intermediate point, a second intermediate point, and a diagonal point, necessary for the interpolation processing, according to the upper 4 bits of data of each color. FIG. 2 shows an internal configuration of the coordinate generation unit 103. First, the input upper n bits (4 bits) of data (upper data) is expanded to 5 bits of data by the bit expansion unit 201. This pair coordinates of the corner point up to (2 n +1,2 n +1,2 n +1 ), that is, to become a (17,17,17). The 5-bit data obtained by the three bit extension units 201 is simultaneously input to the bit coupler 202, the 1-axis adder 203, the 2-axis adder 204, and the 3-axis adder 205. Further, Order [0] is input from the region determination unit 102 to the 1-axis adder 203, and Order [0] and Order [1] are input from the region determination unit 102 to the 2-axis adder 204.

ビット連結器202は、3つのビット拡張部201から入力された5ビットのデータを連結し、基準点の座標(15ビット)として出力する。1軸加算器203は、Order[0]が示す色と対応した軸の座標値を基準点から1つ増加させて第1中間点の座標(15ビット)を得る。例えば、Order[0]が0であればR軸の座標値(ビット拡張部201−1からの5ビットデータ)を1つ増加させる。2軸加算器204は、Order[0]とOrder[1]の値に対応する2つの軸の座標値を基準点から1つずつ増加させて第2中間点の座標を得る。例えば、Order[0]が0で、Order[1]が2であれば、R軸とB軸の座標値を1だけ増加させて第2中間点の座標とする。3軸加算器205は、入力された全ての上位データにおいて、全ての軸の値を1ずつ加算して対角点の座標を得る。これにより補間に必要な4点の座標を求めることが出来る。また、図2が示すように、ビット連結器202、1軸加算器203、2軸加算器204、3軸加算器205は並列に動作することが可能であり、4つの格子点座標値を同時に得ることができる。上記のように1軸当たり17格子点の場合、各軸について0〜16の値を取り得るので、1軸あたり5ビットが必要となり、格子点座標としては3軸分の15ビットの値が出力される。より一般化すると、1軸当たりの格子点数が2+1の場合、格子点座標を表すために1軸当たりn+1ビットが必要となる。 The bit connector 202 concatenates the 5-bit data input from the three bit extension units 201 and outputs the data as reference point coordinates (15 bits). The 1-axis adder 203 increases the coordinate value of the axis corresponding to the color indicated by Order [0] by one from the reference point to obtain the first intermediate point coordinate (15 bits). For example, if Order [0] is 0, the R-axis coordinate value (5-bit data from the bit extension unit 201-1) is increased by one. The 2-axis adder 204 increases the coordinate values of the two axes corresponding to the values of Order [0] and Order [1] one by one from the reference point to obtain the coordinates of the second intermediate point. For example, if Order [0] is 0 and Order [1] is 2, the coordinate values of the R axis and the B axis are increased by 1 to obtain the coordinates of the second intermediate point. The triaxial adder 205 adds the values of all axes one by one to obtain the coordinates of the diagonal points in all the input high-order data. As a result, the coordinates of the four points necessary for interpolation can be obtained. Further, as shown in FIG. 2, the bit coupler 202, the 1-axis adder 203, the 2-axis adder 204, and the 3-axis adder 205 can operate in parallel, and the four grid point coordinate values are simultaneously obtained. Can be obtained. As described above, in the case of 17 grid points per axis, a value from 0 to 16 can be taken for each axis, so 5 bits per axis are required, and 15-bit values for 3 axes are output as grid point coordinates. Is done. More generally, if the number of grid points per axis is 2 n +1, n + 1 bits per axis are required to represent the grid point coordinates.

アドレス生成部104は、座標生成部103から入力された4つの格子点座標を元に、LUT部105のメモリからデータを読み出すためのアドレスを生成する。まず、本実施形態の補間処理で使用される具体的なメモリ構成について説明する。17格子点を有する3次元のLUTを用いて格子点の補間処理を行う場合、全てのデータを格納するのに必要なメモリ容量は17×17×17=4913個の格子点データに対応した容量となる。このメモリをMEM0からMEM7までの8個のメモリに分割し、それぞれのメモリへ格納される格子点データを、各軸の座標値の偶数、奇数の並びで分類して格納する。MEM0へは格子点座標が(偶数、偶数、偶数)に対応するデータを格納する。17格子点の場合、偶数座標は0から16の間に、0,2,4,6,8,10,12,14,16の9点が存在し、奇数座標は1,3,5,7,9,11,13,15の8点が存在する。したがって、MEM0へは9×9×9=729個のデータが格納される。   The address generation unit 104 generates an address for reading data from the memory of the LUT unit 105 based on the four grid point coordinates input from the coordinate generation unit 103. First, a specific memory configuration used in the interpolation processing of this embodiment will be described. When a grid point interpolation process is performed using a three-dimensional LUT having 17 grid points, the memory capacity required to store all data is a capacity corresponding to 17 × 17 × 17 = 4913 grid point data. It becomes. This memory is divided into eight memories MEM0 to MEM7, and the grid point data stored in each memory is classified and stored in an even-numbered and odd-numbered arrangement of coordinate values of each axis. Data corresponding to the grid point coordinates (even, even, even) is stored in MEM0. In the case of 17 grid points, there are 9 points of 0, 2, 4, 6, 8, 10, 12, 14, and 16 between even coordinates and 0, 16, and odd coordinates are 1, 3, 5, and 7 , 9, 11, 13, and 15 exist. Therefore, 9 × 9 × 9 = 729 pieces of data are stored in MEM0.

また、MEM1は格子点座標が(偶数、偶数、奇数)に対応するデータを格納し、必要なメモリの容量は9×9×8=648個のデータに対応する容量となる。MEM2は格子点座標が(偶数、奇数、偶数)に対するデータを格納し、必要なメモリの容量はMEM1と同じである。MEM3は格子点座標が(偶数、奇数、奇数)に対応するデータを格納し、必要なメモリの容量は9×8×8=576個のデータに相当する容量となる。以下も同様にメモリを用意していき、MEM7では格子点座標(奇数、奇数、奇数)に対応するデータを格納し、必要なメモリの容量は8×8×8=512個のデータに対応する容量となる。分割したメモリ毎にワード数をまとめたものを図9に示した。また、アドレスの指定に必要なビット幅はMEM0からMEM6までが10ビットで、MEM7だけは9ビットとすることが出来る。   Further, MEM1 stores data corresponding to lattice point coordinates (even, even, odd), and the necessary memory capacity is a capacity corresponding to 9 × 9 × 8 = 648 data. MEM2 stores data for grid point coordinates (even, odd, even), and the required memory capacity is the same as MEM1. The MEM 3 stores data corresponding to grid point coordinates (even, odd, odd), and the required memory capacity is equivalent to 9 × 8 × 8 = 576 data. In the following, memory is prepared in the same manner, MEM 7 stores data corresponding to grid point coordinates (odd, odd, odd), and the required memory capacity corresponds to 8 × 8 × 8 = 512 data. It becomes capacity. A summary of the number of words for each divided memory is shown in FIG. Further, the bit width necessary for address designation is 10 bits from MEM0 to MEM6, and only MEM7 can be 9 bits.

より一般化すると、格子点数が2+1の3次元のLUTを用いた補間処理に必要なデータ量は(2+1)である。このデータを8個のメモリへ座標の偶奇で分割すると、
[a] (2n−1+1)×(2n−1+1)×(2n−1+1)個の格子点データを格納するメモリが1つ、
[b] (2n−1+1)×(2n−1+1)×(2n−1)個の格子点データを格納するメモリが3つ、
[c] (2n−1+1)×(2n−1)×(2n−1)個の格子点データを格納するメモリが3つ、
[d] (2n−1)×(2n−1)×(2n−1)個の格子点データを格納するメモリが1つ、
という構成になる。[a]〜[c]のタイプの7つのメモリのアクセスに必要なアドレスのビット幅は3(n−1)+1ビットで、[d]のタイプの最も小さいメモリのアクセスに必要なアドレスのビット幅は3(n−1)ビットとすることが出来る。m次元のLUTの場合、アドレスのビット幅はm×(n−1)+1またはm×(n−1)となる。
More generally, the amount of data required for interpolation processing using a three-dimensional LUT having 2 n +1 grid points is (2 n +1) 3 . When this data is divided into 8 memories by even / odd coordinates,
[A] One memory for storing (2 n−1 +1) × (2 n−1 +1) × (2 n−1 +1) lattice point data,
[B] Three memories storing (2 n−1 +1) × (2 n−1 +1) × (2 n−1 ) grid point data,
[C] Three memories storing (2 n−1 +1) × (2 n−1 ) × (2 n−1 ) lattice point data,
[D] One memory for storing (2 n−1 ) × (2 n−1 ) × (2 n−1 ) grid point data,
It becomes the composition. The bit width of the address necessary for accessing the seven memories of the types [a] to [c] is 3 (n−1) +1 bits, and the bit of the address necessary for accessing the smallest memory of the type [d]. The width can be 3 (n-1) bits. In the case of an m-dimensional LUT, the bit width of the address is m × (n−1) +1 or m × (n−1).

アドレス生成部104は、このように分割されたメモリに対するアドレスとして、まず格子点に対応するデータをどのメモリから読み出すかを示すバンクアドレスを生成する。バンクアドレスは、m次元の各軸の座標値の最下位ビット(LSB)を連結してmビットのバンクデータを生成する。本実施形態では、(R[0],G[0],B[0])で表される3ビットの値の連結によりバンクアドレスが得られる。そして、得られたバンクアドレスに応じて下記の8つの計算式で各メモリに対するアドレスを算出する。なお、下式において、[]内は抽出ビット位置を示し、[4…1]は1ビット目から4ビット目の4ビットを抽出したビット列であることを示す。   The address generation unit 104 first generates a bank address indicating from which memory the data corresponding to the lattice point is read as an address for the memory thus divided. The bank address generates m-bit bank data by concatenating the least significant bit (LSB) of the coordinate value of each m-dimensional axis. In the present embodiment, a bank address is obtained by concatenating 3-bit values represented by (R [0], G [0], B [0]). Then, an address for each memory is calculated by the following eight calculation formulas according to the obtained bank address. In the following equation, [] indicates an extracted bit position, and [4... 1] indicates a bit string obtained by extracting 4 bits from the first bit to the fourth bit.

MEM0:
R[4…1]×9×9+G[4…1]×9+B[4…1] ・・・式(1−1)
MEM1:
R[4…1]×9×8+G[4…1]×8+B[3…1] ・・・式(1−2)
MEM2:
R[4…1]×8×9+G[3…1]×9+B[4…1] ・・・式(1−3)
MEM3:
R[4…1]×8×8+G[3…1]×8+B[3…1] ・・・式(1−4)
MEM4:
R[3…1]×9×9+G[4…1]×9+B[4…1] ・・・式(1−5)
MEM5:
R[3…1]×9×8+G[4…1]×8+B[3…1] ・・・式(1−6)
MEM6:
R[3…1]×8×9+G[3…1]×9+B[4…1] ・・・式(1−7)
MEM7:
R[3…1]×8×8+G[3…1]×8+B[3…1] ・・・式(1−8)。
MEM0:
R [4 ... 1] × 9 × 9 + G [4 ... 1] × 9 + B [4 ... 1] (1)
MEM1:
R [4... 1] × 9 × 8 + G [4... 1] × 8 + B [3... 1] (Equation 1-2)
MEM2:
R [4 ... 1] × 8 × 9 + G [3 ... 1] × 9 + B [4 ... 1] (1-3)
MEM3:
R [4 ... 1] × 8 × 8 + G [3 ... 1] × 8 + B [3 ... 1] (1-4)
MEM4:
R [3 ... 1] × 9 × 9 + G [4 ... 1] × 9 + B [4 ... 1] (1-5)
MEM5:
R [3 ... 1] × 9 × 8 + G [4 ... 1] × 8 + B [3 ... 1] (1-6)
MEM6:
R [3 ... 1] × 8 × 9 + G [3 ... 1] × 9 + B [4 ... 1] (1-7)
MEM7:
R [3 ... 1] * 8 * 8 + G [3 ... 1] * 8 + B [3 ... 1] (1-8).

上式で示されているように、入力データに4ビットのデータと3ビットのデータがある。格子点座標が偶数の場合取り得る値は0から16の偶数であり、そこからLSBを除いた値は0から8までの値となり、それらは4ビットで表現され得る。一方、奇数の場合は、取り得る値は1から15の奇数であり、LSBを除いた値は0から7までの値となるから3ビットあれば足りるためである。また、この計算式により、MEM7のアドレスだけはビット幅が9ビットとなり、他は10ビットとなることも分かる。   As shown in the above equation, the input data includes 4-bit data and 3-bit data. When the grid point coordinates are even, possible values are even numbers from 0 to 16, and the value excluding the LSB is a value from 0 to 8, which can be expressed by 4 bits. On the other hand, in the case of an odd number, possible values are odd numbers from 1 to 15, and a value excluding LSB is a value from 0 to 7, so that 3 bits are sufficient. It can also be seen from this formula that only the address of MEM7 has a bit width of 9 bits and the others are 10 bits.

これらのアドレス計算式(1−1)から(1−8)をブロック図にしたものを図5に示す。図5は、最上位ビットの方向(左方向)へビットをシフトするシフタと加算器とを含み、格子点の座標の各軸の座標値の最下位ビットを除いたnビットまたはn−1ビットの座標値で構成される座標を入力してメモリに対応したアドレスを出力する計算回路を示す。図5でシフタ501,502,503,504は、入力された値を左方向へシフトをさせる要素部品であり、シフタの右上に書かれた量のシフトを行う。加算器505,506,507,508,509,510,511は、入力された複数の値を足し合わせてその結果を出力する要素部品である。   FIG. 5 shows a block diagram of these address calculation formulas (1-1) to (1-8). FIG. 5 includes a shifter and an adder for shifting bits in the direction of the most significant bit (left direction), and n bits or n−1 bits excluding the least significant bit of the coordinate value of each axis of the grid point coordinates The calculation circuit which inputs the coordinate comprised by these coordinate values and outputs the address corresponding to a memory is shown. In FIG. 5, shifters 501, 502, 503, and 504 are element parts that shift an input value in the left direction, and shift the amount written in the upper right of the shifter. Adders 505, 506, 507, 508, 509, 510, and 511 are element parts that add a plurality of input values and output the result.

例えば、シフタ501−1は、1軸当たりの格子点数が2+1個の場合、2n−2ビットの左シフトを行う。シフト量の部分にnビットと表現されているが、17グリッドの場合17=2+1なのでn=4である。したがって、図5(a)の構成では、シフタ501−1がR[4…1]を6回左にシフトし、とシフタ502−1R[4…1]を4回左にシフトする。そして、加算器505−1がそれらのシフト結果とR[4…1]を加算するため、加算器505−1からはR[4…1]×9×9の結果が得られる。また、シフタ504−1は、G[4…1]をn−1=3回左にシフトし、加算器507−1がそのシフト結果とG[4…1]を加算するため、加算器505−1からはG[4…1]×9の結果が得られる。そして、加算器508−1が加算器505−1の出力、加算器507−1の出力、およびB[4…1]を加算することにより、式(1−1)の演算結果が得られる。同様に、図5(b)〜図5(h)のそれぞれの構成により、式(1−2)〜式(1−8)の演算結果が得られる。 For example, the shifter 501-1, the number of grid points per axis is the case of +1 2 n, performs left shift of 2n-2 bits. Although n bits are expressed in the shift amount portion, n = 4 since 17 = 2 4 +1 in the case of 17 grids. Accordingly, in the configuration of FIG. 5A, shifter 501-1 shifts R [4 ... 1] six times to the left and shifter 502-1R [4 ... 1] four times to the left. Then, since the adder 505-1 adds the shift results and R [4... 1], the result of R [4... 1] × 9 × 9 is obtained from the adder 505-1. Also, the shifter 504-1 shifts G [4... 1] to the left by n−1 = 3 times, and the adder 507-1 adds the shift result and G [4. The result of G [4... 1] × 9 is obtained from -1. Then, the adder 508-1 adds the output of the adder 505-1, the output of the adder 507-1, and B [4... 1], thereby obtaining the calculation result of Expression (1-1). Similarly, the calculation results of Expressions (1-2) to (1-8) are obtained by the configurations of FIGS. 5 (b) to 5 (h).

なお、格子点の座標の第1の軸(R軸)の座標値を除く第2、第3の軸(G,B軸)の座標値の奇数、偶数が一致する座標について共通の計算式を用いることができる。したがって、式(1−1)〜式(1−8)は以下の4つのアドレス計算式にまとめられる。すなわち、
MEM0またはMEM4:
R[4…1]×9×9+G[4…1]×9+B[4…1] ・・・式(2−1)
MEM1またはMEM5:
R[4…1]×9×8+G[4…1]×8+B[4…1] ・・・式(2−2)
MEM2またはMEM6:
R[4…1]×8×9+G[4…1]×9+B[4…1] ・・・式(2−3)
MEM3またはMEM7:
R[4…1]×8×8+G[4…1]×8+B[4…1] ・・・式(2−4)。
It should be noted that a common calculation formula is used for the coordinates where the odd and even coordinate values of the second and third axes (G and B axes) excluding the coordinate value of the first axis (R axis) of the coordinates of the grid points coincide. Can be used. Therefore, Expressions (1-1) to (1-8) are summarized into the following four address calculation expressions. That is,
MEM0 or MEM4:
R [4 ... 1] * 9 * 9 + G [4 ... 1] * 9 + B [4 ... 1] (Equation (2-1))
MEM1 or MEM5:
R [4 ... 1] × 9 × 8 + G [4 ... 1] × 8 + B [4 ... 1] (Equation (2-2))
MEM2 or MEM6:
R [4 ... 1] × 8 × 9 + G [4 ... 1] × 9 + B [4 ... 1] (Equation (2-3))
MEM3 or MEM7:
R [4 ... 1] × 8 × 8 + G [4 ... 1] × 8 + B [4 ... 1] (2-4).

図6(a)〜(d)に式(2−1)から(2−4)の演算結果を得るための4つのアドレス生成部のブロック図を示す。図6でシフタ601,602,603,604は、入力された値を左方向へシフトをさせる要素部品であり、シフタの右上に書かれた量のシフトを行う。加算器605,606,607,608は、入力された複数の値を足し合わせてその結果を出力する要素部品である。色変換回路のスループットを1/2以下で動作させる場合は、図6(a)〜(d)の構成を用いることで回路規模の削減が可能である。一方、スループットが1などの大きな値で動作させる場合は、例えば、MEM0とMEM4を同時に計算する可能性があるため、図6に示したそれぞれの計算回路を2つずつ、あるいは図5に示したような構成が必要となる。なお、図6(d)のビット抽出器609は、加算器608から出力される10ビットの加算結果のうちの下位9ビットを抽出して出力する。   FIGS. 6A to 6D are block diagrams of four address generation units for obtaining the calculation results of equations (2-1) to (2-4). In FIG. 6, shifters 601, 602, 603, and 604 are element parts that shift an input value in the left direction, and shift the amount written in the upper right of the shifter. Adders 605, 606, 607, and 608 are element parts that add a plurality of input values and output the result. When the color conversion circuit is operated with a throughput of ½ or less, the circuit scale can be reduced by using the configuration shown in FIGS. On the other hand, when the operation is performed with a large throughput such as 1, for example, there is a possibility that MEM0 and MEM4 may be calculated at the same time. Therefore, each of the calculation circuits shown in FIG. Such a configuration is required. Note that the bit extractor 609 in FIG. 6D extracts and outputs the lower 9 bits of the 10-bit addition result output from the adder 608.

以上のようなアドレス生成を、座標生成部103から入力される、基準点から対角点までの4点について行い、4つのバンクアドレスとアクセスアドレスを得る。ここで、4つのバンクアドレスとアクセスアドレスをBank[0]〜[3]、Address[0]〜[3]と表す。つまり、アドレス生成部104は、基準点に対応する格子点データを得るためにBank[0]で示されるメモリのAddress[0]へアクセスする。同様に、アドレス生成部104は、第1中間点のデータの更新点データを得るために、Bank[1]で示されるメモリのAddress[1]へアクセスする。また、アドレス生成部104は、第2中間点の格子点データを得るためにBank[2]で示されるメモリのAddress[2]へアクセスする。さらに、アドレス生成部104は、対角点の格子点データを得るために、Bank[3]で示されるメモリのAddress[3]へアクセスする。例えば、Bank[0]が3、Address[0]が1である場合、LUTにおける基準点の座標に対応する格子点データは、MEM3のアドレス1に格納されており、そこからデータの読み出しが行われる。なお、Bank[0]〜[3]に含まれなかった残りの4つのメモリはリードしても使用されないデータであるため、それらのメモリへはアドレスは何の値を出力しても良いし、0を出力することにしても良い。   The address generation as described above is performed for four points from the reference point to the diagonal point input from the coordinate generation unit 103, and four bank addresses and access addresses are obtained. Here, the four bank addresses and the access addresses are represented as Bank [0] to [3] and Address [0] to [3]. That is, the address generation unit 104 accesses Address [0] of the memory indicated by Bank [0] in order to obtain grid point data corresponding to the reference point. Similarly, the address generation unit 104 accesses Address [1] of the memory indicated by Bank [1] in order to obtain update point data of the first intermediate point data. Further, the address generation unit 104 accesses Address [2] of the memory indicated by Bank [2] in order to obtain grid point data of the second intermediate point. Further, the address generation unit 104 accesses Address [3] of the memory indicated by Bank [3] in order to obtain diagonal grid point data. For example, when Bank [0] is 3 and Address [0] is 1, the grid point data corresponding to the coordinates of the reference point in the LUT is stored at address 1 of MEM3, from which data is read out. Is called. The remaining four memories that are not included in Bank [0] to [3] are data that is not used even if they are read. Therefore, any value may be output to these memories. It is also possible to output 0.

LUT部105は、上述したMEM0からMEM7までの8個のメモリを内部に有し、アドレス生成部104で生成されたアドレスAddress[0]〜[3]を入力として対応するメモリを参照し、格子点データを取得し出力する。セレクタ部106は、入力された8個のデータの中から、アドレス生成部104より入力されるBank[0]〜[3]で示されるメモリから読み出されたデータを選択し、選択データとして出力する。ここで、LUT部105の各メモリから供給される格子点データはCMYK各色10ビットの計40ビットのデータである。セレクタ部106は、これらのデータのうちBank[0]〜[3]で示される4つのメモリからの格子点データを選択し、それぞれからCMYKの色成分ごとのデータ(10ビット)を抽出して、色成分に対応する補間部107へ出力する。以降で、Bank[0]で示されるバンクから読み出されたデータのうちのシアン成分をC[0]、マゼンタの成分をM[0]、イエローの成分をY[0]、ブラックの成分をB[0]と記す。   The LUT unit 105 includes eight memories MEM0 to MEM7 described above, and refers to the corresponding memory using the addresses Address [0] to [3] generated by the address generation unit 104 as input, Acquire and output point data. The selector unit 106 selects data read from the memory indicated by Bank [0] to [3] input from the address generation unit 104 from the eight input data, and outputs it as selection data. To do. Here, the grid point data supplied from each memory of the LUT unit 105 is 40-bit data in total of 10 bits for each color of CMYK. The selector unit 106 selects grid point data from the four memories indicated by Bank [0] to [3] among these data, and extracts data (10 bits) for each CMYK color component from each of the data. And output to the interpolation unit 107 corresponding to the color component. Thereafter, C [0] for the cyan component, M [0] for the magenta component, Y [0] for the yellow component, and Y [0] for the black component in the data read from the bank indicated by Bank [0]. Indicated as B [0].

補間部107は、領域判定部102より入力された係数データと、セレクタ部106より入力された選択データとを用いて下記のような積和演算を行い、結果を目的色データとして出力する。
出力データのC成分=係数0×C[0]+係数1×C[1]+係数2×C[2]+係数3×C[3]
出力データのM成分=係数0×M[0]+係数1×M[1]+係数2×M[2]+係数3×M[3]
出力データのY成分=係数0×Y[0]+係数1×Y[1]+係数2×Y[2]+係数3×Y[3]
出力データのK成分=係数0×K[0]+係数1×K[1]+係数2×K[2]+係数3×K[3]。
The interpolation unit 107 performs the following product-sum operation using the coefficient data input from the region determination unit 102 and the selection data input from the selector unit 106, and outputs the result as target color data.
C component of output data = coefficient 0 × C [0] + coefficient 1 × C [1] + coefficient 2 × C [2] + coefficient 3 × C [3]
M component of output data = coefficient 0 × M [0] + coefficient 1 × M [1] + coefficient 2 × M [2] + coefficient 3 × M [3]
Y component of output data = coefficient 0 × Y [0] + coefficient 1 × Y [1] + coefficient 2 × Y [2] + coefficient 3 × Y [3]
K component of output data = coefficient 0 × K [0] + coefficient 1 × K [1] + coefficient 2 × K [2] + coefficient 3 × K [3].

以上説明したように、第1実施形態によれば、各軸の格子点数が2+1個のm次元のLUTから得られたデータを補間処理して目的とするデータを得るデータ変換部100において、m+1種類のアドレス空間の2個のメモリが用いられる。ここで、m+1種類のメモリの容量は、座標を構成する座標値のうち奇数の座標値の数をp(pは0以上m以下の整数)とした場合に、(2n−1+1)×(2n−1m−pとなる。上述した実施形態では、m=3(3次元LUT)であるため、以下の4種類のアドレス空間の8個のメモリが用いられる。
(a) (2n−1+1)×(2n−1+1)×(2n−1+1) …1つ
(b) (2n−1+1)×(2n−1+1)×(2n−1) …3つ
(c) (2n−1+1)×(2n−1)×(2n−1) …3つ
(d) (2n−1)×(2n−1)×(2n−1) …1つ
As described above, according to the first embodiment, in the data conversion unit 100 that obtains target data by interpolating data obtained from an m-dimensional LUT having 2 n +1 grid points on each axis. , 2 m pieces of memory of m + 1 type of address space are used. Here, the capacity of m + 1 types of memories is (2 n−1 +1) p when the number of odd coordinate values among the coordinate values constituting the coordinates is p (p is an integer of 0 to m). X (2 n-1 ) m-p In the above-described embodiment, since m = 3 (three-dimensional LUT), eight memories in the following four types of address spaces are used.
(A) (2 n-1 +1) x (2 n-1 +1) x (2 n-1 +1) ... 1 (b) (2 n-1 +1) x (2 n-1 +1) x (2 n-1 ) ... 3 (c) ( 2n-1 +1) x ( 2n-1 ) x ( 2n-1 ) ... 3 (d) ( 2n-1 ) x ( 2n-1 ) × (2 n-1 ) ... one

そのため、(a)〜(c)のアドレス空間のメモリについてはアドレスのビット幅が3(n−1)+1となり、(d)のアドレス空間のメモリについてはアドレスのビット幅が3(n−1)となる。一般に、一軸あたり2+1個の格子点を有する3次元LUTでは、各格子点の座標値を表すために、各軸についてn+1ビットのデータが必要である。n+1ビットの座標値の最下位ビットをバンク切替に用いる場合でも、nビットのアドレス幅、すなわち、2×2×2個のアドレスの空間を持つメモリが8個必要になる。たとえば、上記実施形態のようにn=4とした場合、4096個のアドレスの空間となる。これに対して、本実施形態によれば、729個のアドレス空間のメモリが1つ、648個のアドレス空間のメモリが3つ、576個のアドレス空間のメモリが3つ、512個のアドレス空間のメモリが1つあれば済む。このように、上述した(a)〜(d)の4種類のアドレス空間のメモリを用いることができるので、メモリ容量を削減することができ、アドレスのビット幅の削減も可能となる。 Therefore, the address bit width is 3 (n−1) +1 for the memory in the address space of (a) to (c), and the bit width of the address is 3 (n−1) for the memory in the address space of (d). ) In general, in a three-dimensional LUT having 2 n +1 grid points per axis, n + 1 bits of data are required for each axis in order to represent the coordinate values of each grid point. Even when the least significant bit of the n + 1-bit coordinate value is used for bank switching, eight memories having an n-bit address width, that is, a space of 2 n × 2 n × 2 n addresses are required. For example, when n = 4 as in the above embodiment, a space of 4096 addresses is obtained. On the other hand, according to the present embodiment, there are one memory of 729 address spaces, three memories of 648 address spaces, three memories of 576 address spaces, and 512 address spaces. One memory is sufficient. Thus, since the memories of the four types of address spaces (a) to (d) described above can be used, the memory capacity can be reduced and the bit width of the address can also be reduced.

なお、上記のようなメモリ容量を実現するために、式(1−1)〜(1−8)では、座標生成部から入力した座標を、上述した(a)〜(d)で示されるアドレス数(格子点データの数)までの連続するアドレスのいずれかへ変換してアクセスアドレスとしている。たとえば、式(1−1)では、(a)のメモリ(n=4)へのアクセスに関して、729個のアドレスのいずれか、すなわち0〜728の連続するアドレスのいずれかに対応するように入力された座標を変換している。これを一般化すると、本実施形態のアドレス生成部104は、各軸の座標値がnビットで表される格子点の座標を、メモリに格納されている格子点データの数に対応した連続する値(アドレス)のいずれかに変換するものである。これにより、メモリには全ての格子点データを連続するアドレスに格納することができ、必要なメモリ容量を低減することができる。なお、2個のメモリの各々に格納されている格子点データの数は、奇数の座標値の数をp(pは0以上m以下の整数)とした場合に、(2n−1+1)×(2n−1m−pとなる。 In order to realize the above memory capacity, in the equations (1-1) to (1-8), the coordinates input from the coordinate generation unit are the addresses indicated by the above-described (a) to (d). The address is converted into any one of consecutive addresses up to the number (number of grid point data). For example, in the expression (1-1), the access to the memory (n = 4) in (a) is input so as to correspond to one of 729 addresses, that is, one of 0 to 728 consecutive addresses. The converted coordinates are converted. When this is generalized, the address generation unit 104 according to the present embodiment continuously displays the coordinates of grid points whose coordinate values of each axis are represented by n bits corresponding to the number of grid point data stored in the memory. It is converted into one of values (addresses). As a result, all the grid point data can be stored in continuous addresses in the memory, and the required memory capacity can be reduced. Note that the number of grid point data stored in each of the 2 m memories is (2 n−1 +1) when the number of odd coordinate values is p (p is an integer of 0 to m). ) P × (2 n−1 ) m−p .

なお、上記では、LUTの格子点データを格納する複数のメモリのそれぞれに格納される格子点データの個数の連続したアドレスの一つへ格子点座標を対応付けている。複数のメモリのそれぞれに格納される格子点データの個数は、座標値の偶数、奇数の組み合わせにより変化し、全て同じものとはならず、アドレスを生成するための計算式も異なってくる。これに対して、LUTの格子点データを格納する複数のメモリのうち格納される格子点データの個数の最大数(上述のように各軸に2+1個の格子点が配置される3次元LUTの場合は、(2n−1+1)となる)を全てのメモリに適用してもよい。このようにすれば、複数のメモリの全てにおいて、(2n−1+1)個のアドレスの一つへ格子点座標を変換する構成を用いることができ、アドレスの算出に同じ計算式を用いることができる。上述のように、3次元のLUTで各軸の格子点数が17個の場合、各メモリに確保される格子点データのアドレスは729個となり、各メモリについて、格子点座標は729個の連続するアドレスの一つへ変換されることになる。すなわち、本実施形態では、各軸の格子点数が2+1であるm次元のLUTの場合、(2n−1+1)個以下の連続するアドレスの一つへ格子点座標が変換されることで、メモリへのアクセスアドレスのビット幅、各メモリのデータ容量の低減を実現している。 In the above description, the grid point coordinates are associated with one of consecutive addresses corresponding to the number of grid point data stored in each of the plurality of memories storing the LUT grid point data. The number of grid point data stored in each of the plurality of memories varies depending on the combination of even and odd coordinate values, and they are not all the same, and the calculation formulas for generating addresses also differ. On the other hand, the maximum number of grid point data stored in a plurality of memories that store grid point data of the LUT (3D in which 2 n +1 grid points are arranged on each axis as described above) In the case of the LUT, (2 n−1 +1) 3 ) may be applied to all memories. In this way, it is possible to use a configuration in which the lattice point coordinates are converted into one of (2 n−1 +1) 3 addresses in all of the plurality of memories, and the same calculation formula is used for calculating the addresses. be able to. As described above, when the number of grid points on each axis is 17 in a three-dimensional LUT, the address of grid point data secured in each memory is 729, and for each memory, 729 grid point coordinates are continuous. It will be converted to one of the addresses. That is, in this embodiment, in the case of an m-dimensional LUT in which the number of grid points on each axis is 2 n +1, the grid point coordinates are converted into one of (2 n-1 +1) m or less consecutive addresses. As a result, the bit width of the access address to the memory and the data capacity of each memory are reduced.

また、上記ではLUTの各軸の格子点数が同一の場合を説明したが、これに限られるものでない。各軸の格子点数が異なっていても、複数のメモリのうちのアクセス先のメモリへ格納される格子点データの個数は一意に決まるので、その個数分の連続したアドレスのうちの一つへ格子点座標を変換すればよい。あるいは、複数のメモリのそれぞれへ格納される格子点データの個数のうち最大の個数の連続したアドレスのうちの一つへ格子点座標を変換するよう構成を採用できることも明らかである。   Moreover, although the case where the number of grid points of each axis of the LUT is the same has been described above, the present invention is not limited to this. Even if the number of grid points on each axis is different, the number of grid point data stored in the access destination memory of the plurality of memories is uniquely determined. What is necessary is just to convert point coordinates. Alternatively, it is obvious that the configuration can be adopted so that the grid point coordinates are converted into one of the maximum number of consecutive addresses among the number of grid point data stored in each of the plurality of memories.

<第2実施形態>
第1実施形態では、17グリッドでの処理時にメモリを4種類の大きさで8個に分割することで、アドレス生成式が4つにまとめられ、ビット幅の短いアドレスを生成できることを示した。第2実施形態では、同じメモリ構成を持ちながら、アドレス生成部104を変えることで16グリッドの処理と17グリッドの処理を両方行うことのできる例を示す。図7に第2実施形態に係るブロック図を示す。図1と異なる点は16グリッド処理か17グリッド処理かを指示する選択信号としての1ビットの信号“17GridMode”が入力として加えられる。アドレス生成部1004は、“17GridMode”が1に設定されていれば17グリッドで処理し、0であれば16グリッドで処理する。17GridModeは基準点決定部1001とアドレス生成部1004に入力され、それらの動作が第1実施形態と異なる。従って、第2実施形態では基準点決定部1001とアドレス生成部1004について詳細に説明する。
Second Embodiment
In the first embodiment, it has been shown that by dividing the memory into 8 pieces of 4 different sizes when processing with 17 grids, the address generation formulas are combined into 4 and an address with a short bit width can be generated. The second embodiment shows an example in which both the 16-grid processing and the 17-grid processing can be performed by changing the address generation unit 104 while having the same memory configuration. FIG. 7 shows a block diagram according to the second embodiment. A difference from FIG. 1 is that a 1-bit signal “17GridMode” is added as an input as a selection signal instructing whether to perform 16-grid processing or 17-grid processing. The address generation unit 1004 processes with 17 grids if “17GridMode” is set to 1, and processes with 16 grids if 0. 17GridMode is input to the reference point determination unit 1001 and the address generation unit 1004, and their operations are different from those of the first embodiment. Therefore, in the second embodiment, the reference point determination unit 1001 and the address generation unit 1004 will be described in detail.

基準点決定部1001は、17GridModeの設定値を受けてその設定値に従って、上位データと下位データを算出して出力する。17グリッド時の処理では第1実施形態と同様の処理が行われる。16グリッド時の処理には公知の方法を用いることができる。16グリッド時の処理の一例を挙げると、入力最大値を15で等分した値で入力データを除算して得られた商を上位データとして座標生成部103へ出力し、該除算による余りの値をRGB各成分で正規化した値を下位データとして領域判定部102へ出力する。より一般化して表現すると、2個のグリッドの場合、入力最大値を2−1で等分した値で入力データを除算して得られた商を上位データとし、余りの値をRGB各成分で正規化した値を下位データとする。 The reference point determination unit 1001 receives the set value of 17GridMode, calculates and outputs upper data and lower data according to the set value. In the 17-grid process, the same process as in the first embodiment is performed. A publicly known method can be used for processing at 16 grids. As an example of processing in the case of 16 grids, the quotient obtained by dividing the input data by the value obtained by equally dividing the maximum input value by 15 is output to the coordinate generation unit 103 as high-order data, and the remainder value obtained by the division Is normalized with each RGB component, and is output to the area determination unit 102 as lower data. In more general terms, in the case of 2 n grids, the quotient obtained by dividing the input data by the value obtained by equally dividing the maximum input value by 2 n −1 is used as the upper data, and the remainder is represented by the RGB values. The value normalized by the component is used as the lower data.

アドレス生成部1004は、座標生成部103に入力された4つの格子点座標を元に、LUT部105のメモリからデータを読み出すためのアドレスを生成する。バンクアドレスの算出方法は第1実施形態と同じで、格子点座標のLSBをつなげて生成する。アドレス計算式は、17グリッド処理の場合、第1実施形態と同じものとなる。16グリッド処理の場合、アドレス計算式はMEM0からMEM7までのメモリについて1種類の式で表すことができ、以下の式で算出できる。
R[3…1]×8×8+G[3…1]×8+B[3…1]・・・式(3)
The address generation unit 1004 generates an address for reading data from the memory of the LUT unit 105 based on the four grid point coordinates input to the coordinate generation unit 103. The bank address calculation method is the same as in the first embodiment, and is generated by connecting LSBs of grid point coordinates. The address calculation formula is the same as that of the first embodiment in the case of 17 grid processing. In the case of 16 grid processing, the address calculation formula can be expressed by one type of formula for the memories from MEM0 to MEM7, and can be calculated by the following formula.
R [3 ... 1] × 8 × 8 + G [3 ... 1] × 8 + B [3 ... 1] (3)

この式により生成されるアドレスは9ビットであり、最大値は511である。16グリッド処理時のメモリのデータの格納方法は17グリッド時の同じように、格子点座標の偶奇で分類して格納する。このようにすると0から15までの整数の中で偶数の個数と奇数の個数はいずれも8個で一致するため、17グリッドの時と異なり8個のメモリにはデータが512個ずつ均等に分割される。例えば、MEM0の格納可能なワード数は729であるが、そのうちアドレスの若い方から順に512個分だけ格納されて補間処理に使用される。MEM1からMEM6までの512を越える容量を持つメモリに関しても同様である。メモリのアドレスを表す信号線はMEM0からMEM6までは10ビットで構成されているが、16グリッドで使用する時は最上位ビットとして0を追加しておけば、アドレス線も共通に使用することが出来る。   The address generated by this equation is 9 bits, and the maximum value is 511. The storage method of the memory data at the time of 16 grid processing is classified and stored by the even / odd of the grid point coordinates as in the case of 17 grid. In this way, the even number and the odd number of integers from 0 to 15 match each other with 8 pieces. Therefore, unlike the case of 17 grids, 512 pieces of data are equally divided into 8 memories. Is done. For example, although the number of words that can be stored in MEM0 is 729, only 512 words are stored in order from the lowest of the addresses, and are used for the interpolation processing. The same applies to memories having a capacity exceeding 512 from MEM1 to MEM6. The signal line representing the memory address is composed of 10 bits from MEM0 to MEM6. However, when using in 16 grids, if 0 is added as the most significant bit, the address line can also be used in common. I can do it.

16グリッドでの処理時に用いる式(3)と17グリッドでの処理時に用いる式(2−1)から式(2−4)までの両方を実現する回路として図8のような構成が挙げられる。図6と同じ動作をする素子については同じ記号を与えた。図8において、マスク801−1から801−6までで表されているものは、設定されている17GridModeの値によって出力を変える機能を持つ。設定されている17GridModeが1の時は入力データをそのまま出力し、0の時は入力データに関わらず0を出力する。この信号17GridModeを切り替えることで、図8の回路の動作を切り替えることが可能となる。すなわち、17GridModeが1の場合には図6の回路と同様に動作し、17GridModeが0の場合には、(a)〜(d)の全ての計算回路が上記式(3)の計算を実現する回路となる。   A circuit as shown in FIG. 8 is a circuit that realizes both the expression (3) used in the 16 grid processing and the expressions (2-1) to (2-4) used in the 17 grid processing. Elements having the same operation as in FIG. 6 are given the same symbols. In FIG. 8, the masks 801-1 to 801-6 have a function of changing the output depending on the set 17GridMode value. When the set 17GridMode is 1, the input data is output as it is, and when it is 0, 0 is output regardless of the input data. By switching the signal 17GridMode, the operation of the circuit of FIG. 8 can be switched. That is, when 17GridMode is 1, the operation is the same as the circuit of FIG. 6, and when 17GridMode is 0, all the calculation circuits (a) to (d) realize the calculation of the above formula (3). It becomes a circuit.

以上、説明したように、16グリッドと17グリッドを切り替える信号17GridModeを加え、その信号に応じてアドレス生成方法を切り替える処理を加えることで、16グリッドと17グリッドの間で処理を容易に切り替えることが出来る。また、上記各実施形態によれば、奇数グリッド数の色変換処理においても無駄なアドレスを使用しないので、メモリの容量を最小化できる。また、アドレス生成時に所定ビットをマスクすることにより、偶数グリッド数の色変換処理にも対応可能となる。   As described above, by adding the signal 17GridMode for switching between the 16 grid and the 17 grid and adding the process for switching the address generation method according to the signal, the process can be easily switched between the 16 grid and the 17 grid. I can do it. Further, according to each of the above embodiments, a wasteful address is not used even in color conversion processing with an odd number of grids, so that the memory capacity can be minimized. Further, by masking predetermined bits at the time of address generation, it is possible to cope with color conversion processing with an even number of grids.

<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100:データ変換部、点決定部、102:領域判定部、103:座標生成部、104:アドレス生成部、105:LUT部、106:セレクタ部、107:補間部、201:ビット拡張部、202:ビット連結器、203:1軸加算器、203:2軸加算器、204:3軸加算器 100: Data conversion unit, point determination unit, 102: region determination unit, 103: coordinate generation unit, 104: address generation unit, 105: LUT unit, 106: selector unit, 107: interpolation unit, 201: bit extension unit, 202 : Bit coupler, 203: 1 axis adder, 203: 2 axis adder, 204: 3 axis adder

Claims (17)

各軸に2+1個の格子点を有するm次元のルックアップテーブルを参照して、m個の要素値を有する入力データを変換するデータ変換装置であって、
前記ルックアップテーブルは2個のメモリを有し、各座標の格子点データがその座標の各軸の座標値の奇数、偶数の組み合わせで特定されるメモリに格納されており、
前記入力データに基づいて、各軸の座標値がn+1ビットで表された、前記ルックアップテーブルの格子点座標を、補間処理に用いるためm+1個生成する生成手段と、
前記格子点座標の各軸の座標値の最下位ビットを連結して得られるmビットのデータに基づいて、前記2個のメモリからアクセス先のメモリを決定する決定手段と、
前記格子点座標を、(2n−1+1)個以下の連続するアドレスのいずれか一つに変換して得られたアドレスで、前記アクセス先のメモリにアクセスするアクセス手段と、を備えることを特徴とするデータ変換装置。
A data conversion device for converting input data having m element values by referring to an m-dimensional lookup table having 2 n +1 lattice points on each axis,
The look-up table has 2 m memories, and grid point data of each coordinate is stored in a memory specified by a combination of an odd number and an even number of coordinate values of each axis of the coordinates,
Generating means for generating m + 1 grid point coordinates of the lookup table in which the coordinate value of each axis is represented by n + 1 bits based on the input data for use in interpolation processing;
Determining means for determining an access destination memory from the 2 m memories based on m-bit data obtained by concatenating the least significant bits of the coordinate values of the respective axes of the grid point coordinates;
Access means for accessing the access destination memory at an address obtained by converting the lattice point coordinates into any one of (2 n-1 +1) m consecutive addresses or less. A data converter characterized by the above.
前記アクセス手段は、前記格子点座標の各軸のn+1ビットの座標値から前記最下位ビットを除いた各軸がnビットの座標値で構成される座標を、前記アクセス先のメモリに格納される格子点データの個数の連続するアドレスのいずれか一つに変換することを特徴とする請求項1に記載のデータ変換装置。   The access means stores, in the access destination memory, coordinates in which each axis is composed of n-bit coordinate values obtained by removing the least significant bit from the n + 1-bit coordinate value of each axis of the grid point coordinates. 2. The data conversion device according to claim 1, wherein the data conversion device converts the data into any one of consecutive addresses corresponding to the number of grid point data. 前記2個のメモリの各々に格納される前記格子点データの個数は、前記格子点座標を構成する座標値のうちの奇数の座標値の数をp(pは0以上m以下の整数)とした場合に、(2n−1+1)×(2n−1m−pであることを特徴とする請求項2に記載のデータ変換装置。 The number of grid point data stored in each of the 2 m memories is the number of odd coordinate values among the coordinate values constituting the grid point coordinates, where p is an integer of 0 to m. The data conversion apparatus according to claim 2, wherein (2 n−1 +1) p × (2 n−1 ) m−p . 前記生成手段は、前記入力データを構成する要素値の各々の上位nビットに基づいてm次元の座標から1つの格子点座標を生成し、前記入力データを構成する要素値の各々から上位nビットを除いたデータに基づいて、補間処理に用いるための複数の格子点座標を生成することを特徴とする請求項1乃至3のいずれか1項に記載のデータ変換装置。   The generation means generates one grid point coordinate from m-dimensional coordinates based on the upper n bits of each element value constituting the input data, and the upper n bits from each element value constituting the input data 4. The data conversion apparatus according to claim 1, wherein a plurality of grid point coordinates to be used for interpolation processing are generated based on data excluding. 前記ルックアップテーブルは3次元(m=3)であり、且つ、各軸に17点(n=4)の格子点を持ち、
前記生成手段は、前記入力データを構成する要素値の各々の上位nビットに基づいて3次元の空間の1つの格子点座標を生成し、前記入力データを構成する要素値の各々から上位nビットを除いたデータに基づいて、前記1つの格子点座標を含む四面体補間処理に用いるためにさらに3つの格子点座標を生成することを特徴とする請求項4に記載のデータ変換装置。
The lookup table is three-dimensional (m = 3) and has 17 points (n = 4) on each axis.
The generation means generates one grid point coordinate in a three-dimensional space based on the upper n bits of each element value constituting the input data, and the upper n bits from each of the element values constituting the input data 5. The data conversion apparatus according to claim 4, further generating three grid point coordinates for use in tetrahedral interpolation processing including the one grid point coordinate based on the data excluding.
前記アクセス手段により前記ルックアップテーブルをアクセスして読み出された、前記生成手段で生成された格子点座標の格子点データを用いて、前記補間処理を実行する補間手段をさらに備えることを特徴とする請求項4または5に記載のデータ変換装置。   And further comprising interpolation means for executing the interpolation processing using the grid point data of the grid point coordinates generated by the generation means, which is read out by accessing the lookup table by the access means. The data conversion device according to claim 4 or 5. 前記補間手段は、前記入力データの各要素値の各々から前記上位nビットを除いた残りのビットにより表される値を用いて前記補間処理を行うことを特徴とする請求項6に記載のデータ変換装置。   7. The data according to claim 6, wherein the interpolation means performs the interpolation process using a value represented by the remaining bits obtained by removing the upper n bits from each element value of the input data. Conversion device. 前記2個のメモリは、(2n−1+1)×(2n−1m−pのm+1種類の容量のいずれかの容量のメモリで構成されることを特徴とする請求項1乃至7のいずれか1項に記載のデータ変換装置。 2. The 2 m memories are configured by a memory having any one of (2 n−1 +1) p × (2 n−1 ) mp m + 1 types of capacities. 8. The data conversion device according to any one of items 1 to 7. 前記アクセス手段が生成するアドレスのビット幅は、m×(n−1)+1またはm×(n−1)であることを特徴とする請求項1乃至8のいずれか1項に記載のデータ変換装置。   9. The data conversion according to claim 1, wherein a bit width of an address generated by the access unit is m × (n−1) +1 or m × (n−1). apparatus. 前記アクセス手段は、最上位ビットの方向へビットをシフトするシフタと加算器を含み、前記格子点の座標の各軸の座標値の前記最下位ビットを除いたnビットの座標値で構成される座標を入力して前記アドレスを出力する計算回路を、前記2個のメモリの各々に対して有することを特徴とする請求項1乃至9のいずれか1項に記載のデータ変換装置。 The access means includes a shifter and an adder for shifting bits in the direction of the most significant bit, and is configured by an n-bit coordinate value excluding the least significant bit of the coordinate value of each axis of the coordinate of the grid point 10. The data conversion apparatus according to claim 1, further comprising: a calculation circuit that inputs coordinates and outputs the addresses for each of the 2 m memories. 10. 前記ルックアップテーブルは3次元であり(m=3)、
前記アクセス手段は、最上位ビットの方向へビットをシフトするシフタと加算器を含み、前記格子点座標の各軸の座標値の前記最下位ビットを除いたnビットの座標値で構成される座標を入力して前記アドレスを出力する複数の計算回路を有し、
前記座標の第1の軸の座標値を除く第2、第3の軸の座標値の奇数、偶数が一致する座標に対応したメモリについて共通の計算回路を用いることを特徴とする請求項1乃至9のいずれか1項に記載のデータ変換装置。
The lookup table is three-dimensional (m = 3),
The access means includes a shifter and an adder for shifting the bits in the direction of the most significant bit, and is composed of n-bit coordinate values excluding the least significant bit of the coordinate value of each axis of the grid point coordinate And a plurality of calculation circuits for outputting the address,
A common calculation circuit is used for a memory corresponding to a coordinate corresponding to an odd number and an even number of coordinate values of the second and third axes excluding the coordinate value of the first axis of the coordinates. 10. The data conversion device according to any one of 9 above.
前記アクセス手段は、各軸に2個の格子点を有するm次元のルックアップテーブルを参照して、m個の要素値を有する入力データを変換することを指示する選択信号に応じて、前記格子点座標の各軸の座標値の前記最下位ビットを除いたnビットで構成される座標を、(2n−1個の連続するアドレスのいずれかに変換して得られたアドレスで、前記アクセス先のメモリにアクセスすることを特徴とする請求項1に記載のデータ変換装置。 The access means refers to an m-dimensional lookup table having 2 n lattice points on each axis, and according to a selection signal instructing to convert input data having m element values, An address obtained by converting a coordinate composed of n bits excluding the least significant bit of the coordinate value of each axis of the grid point coordinate into one of (2 n-1 ) m consecutive addresses. The data conversion apparatus according to claim 1, wherein the access destination memory is accessed. 前記生成手段は、前記選択信号に応じて、前記入力データを構成する要素値が取り得る最大値を2−1で等分した値で、前記入力データのそれぞれの要素値を除算して得られた商に基づいてm次元の格子点座標を生成し、前記除算により得られた余りに基づいて補間処理に用いるためのm+1個の格子点座標を生成することを特徴とする請求項12に記載のデータ変換装置。 The generation means is obtained by dividing each element value of the input data by a value obtained by equally dividing the maximum value that can be taken by the element value constituting the input data by 2 n −1 according to the selection signal. 13. The m + 1 lattice point coordinates are generated based on the obtained quotient, and m + 1 lattice point coordinates for use in interpolation processing are generated based on the remainder obtained by the division. Data converter. m次元のルックアップテーブルを参照して、m個の要素値を有する入力データを変換するデータ変換装置であって、前記ルックアップテーブルでは、m次元の座標により特定される格子点データが、座標を形成する各軸の座標値の奇数、偶数の組み合わせによって特定される、複数のメモリのうちの一つに格納されており、
前記入力データに基づいて、前記ルックアップテーブルの各軸の座標値を含む格子点座標を生成する生成手段と、
前記格子点座標の各軸の座標値に基づいて前記複数のメモリのうちのアクセス先のメモリを決定する決定手段と、
前記複数のメモリのそれぞれへ格納される格子点データの個数のうち最大の個数の連続したアドレスのうちの一つへ前記格子点座標を変換して得られたアドレスで、前記アクセス先のメモリをアクセスするアクセス手段と、を備えることを特徴とするデータ変換装置。
A data conversion device for converting input data having m element values with reference to an m-dimensional lookup table, wherein the grid point data specified by the m-dimensional coordinates are coordinates Stored in one of a plurality of memories, identified by a combination of odd and even coordinate values of each axis forming
Generating means for generating a grid point coordinate including a coordinate value of each axis of the lookup table based on the input data;
Determining means for determining an access destination memory among the plurality of memories based on a coordinate value of each axis of the lattice point coordinates;
An address obtained by converting the grid point coordinates to one of the maximum number of consecutive addresses among the number of grid point data stored in each of the plurality of memories, and the access destination memory An access means for accessing the data conversion device.
各軸に2+1個の格子点を有するm次元のルックアップテーブルを参照して、m個の要素値を有する入力データを変換するデータ変換装置の制御方法であって、
前記ルックアップテーブルは2個のメモリを有し、各座標の格子点データがその座標の各軸の座標値の奇数、偶数の組み合わせで特定されるメモリに格納されており、
前記入力データに基づいて、各軸の座標値がn+1ビットで表された、前記ルックアップテーブルの格子点座標を、補間処理に用いるためm+1個生成する生成工程と、
前記格子点座標の各軸の座標値の最下位ビットを連結して得られるmビットのデータに基づいて、前記2個のメモリからアクセス先のメモリを決定する決定工程と、
前記格子点座標を、(2n−1+1)個以下の連続するアドレスのいずれか一つに変換して得られたアドレスで、前記アクセス先のメモリにアクセスするアクセス工程と、を有することを特徴とするデータ変換装置の制御方法。
A method for controlling a data conversion apparatus for converting input data having m element values by referring to an m-dimensional lookup table having 2 n +1 lattice points on each axis,
The look-up table has 2 m memories, and grid point data of each coordinate is stored in a memory specified by a combination of an odd number and an even number of coordinate values of each axis of the coordinates,
Based on the input data, a generation step of generating m + 1 grid point coordinates of the lookup table in which coordinate values of each axis are represented by n + 1 bits for use in interpolation processing;
A determination step of determining an access destination memory from the 2 m memories based on m-bit data obtained by concatenating the least significant bits of the coordinate values of the respective axes of the grid point coordinates;
An access step of accessing the access destination memory with an address obtained by converting the grid point coordinates into any one of (2 n-1 +1) m or less consecutive addresses. A method for controlling a data converter characterized by the above.
m次元のルックアップテーブルを参照して、m個の要素値を有する入力データを変換するデータ変換装置であって、前記ルックアップテーブルでは、m次元の座標により特定される格子点データが、座標を形成する各軸の座標値の奇数、偶数の組み合わせによって特定される、複数のメモリのうちの一つに格納されており、
前記入力データに基づいて、前記ルックアップテーブルの各軸の座標値を含む格子点座標を生成する生成工程と、
前記格子点座標の各軸の座標値に基づいて前記複数のメモリのうちのアクセス先のメモリを決定する決定工程と、
前記複数のメモリのそれぞれへ格納される格子点データの個数のうち最大の個数の連続したアドレスのうちの一つへ前記格子点座標を変換して得られたアドレスで、前記アクセス先のメモリをアクセスするアクセス工程と、を有することを特徴とするデータ変換装置の制御方法。
A data conversion device for converting input data having m element values with reference to an m-dimensional lookup table, wherein the grid point data specified by the m-dimensional coordinates are coordinates Stored in one of a plurality of memories, identified by a combination of odd and even coordinate values of each axis forming
Generating a grid point coordinate including a coordinate value of each axis of the lookup table based on the input data;
A determination step of determining an access destination memory among the plurality of memories based on a coordinate value of each axis of the lattice point coordinates;
An address obtained by converting the grid point coordinates to one of the maximum number of consecutive addresses among the number of grid point data stored in each of the plurality of memories, and the access destination memory An access step for accessing the data conversion device.
請求項15または16に記載されたデータ変換装置の制御方法の各工程をコンピュータに実行させるためのプログラム。 The program for making a computer perform each process of the control method of the data converter described in Claim 15 or 16 .
JP2015037292A 2015-02-26 2015-02-26 Data conversion apparatus, control method therefor, and program Active JP6448410B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015037292A JP6448410B2 (en) 2015-02-26 2015-02-26 Data conversion apparatus, control method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015037292A JP6448410B2 (en) 2015-02-26 2015-02-26 Data conversion apparatus, control method therefor, and program

Publications (3)

Publication Number Publication Date
JP2016163070A JP2016163070A (en) 2016-09-05
JP2016163070A5 JP2016163070A5 (en) 2018-03-22
JP6448410B2 true JP6448410B2 (en) 2019-01-09

Family

ID=56845353

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015037292A Active JP6448410B2 (en) 2015-02-26 2015-02-26 Data conversion apparatus, control method therefor, and program

Country Status (1)

Country Link
JP (1) JP6448410B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615580B (en) * 2018-11-28 2022-12-30 北京集创北方科技股份有限公司 Digital processing circuit

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3755345B2 (en) * 1999-07-15 2006-03-15 セイコーエプソン株式会社 Color conversion circuit
JP5164215B2 (en) * 2008-11-05 2013-03-21 川崎マイクロエレクトロニクス株式会社 Data converter
JP4810615B2 (en) * 2010-03-18 2011-11-09 キヤノン株式会社 Multidimensional interpolation apparatus, multidimensional interpolation method, and computer program

Also Published As

Publication number Publication date
JP2016163070A (en) 2016-09-05

Similar Documents

Publication Publication Date Title
JP3976849B2 (en) Device for generating interpolator input data
US5475510A (en) Method for transforming color signals and apparatus for the method
JP2000505268A (en) Interpolation method in n-dimensional color space
JP2903808B2 (en) Color signal conversion method and apparatus
JP6251029B2 (en) Control device, image processing device, control method, and program
JP6448410B2 (en) Data conversion apparatus, control method therefor, and program
CN106296614B (en) Image processing apparatus and image processing method
JPH10117291A (en) Decision device for input data path of interpolator
JP2007067956A (en) Multi-dimensional interpolation apparatus and multi-dimensional interpolation method
JPH11238126A (en) Common interpolating circuit for radial interpolation with asymmetrical pruning and tetrahedral interpolation with asymmetrical pruning
JP4810615B2 (en) Multidimensional interpolation apparatus, multidimensional interpolation method, and computer program
JP5164215B2 (en) Data converter
JP3927715B2 (en) Color conversion method and color conversion apparatus
JP3911898B2 (en) Color conversion apparatus and method
JP4726228B2 (en) Color data conversion apparatus and method
JP4288865B2 (en) Color interpolation method and color interpolation apparatus
JPH11238127A (en) Common interpolating circuit for pruning radial interpolation and pruning tetrahedral interpolation
JP2007174392A (en) Data converting apparatus, control method and program for the data converting apparatus
JP2627824B2 (en) Image processing device
JP3871027B2 (en) Color data converter
JP6740729B2 (en) Data conversion device, data conversion method, and data conversion program
JP4096672B2 (en) Data conversion method and data conversion apparatus
JP2006165649A (en) Multi-dimensional data converter and method thereof
JP2016165076A (en) Data processing device, control method of the same, and program
JP2009010532A (en) Color conversion processor and color conversion method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180207

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180831

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181023

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: 20181106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181204

R151 Written notification of patent or utility model registration

Ref document number: 6448410

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151