JP2007128233A - Memory circuit for image - Google Patents
Memory circuit for image Download PDFInfo
- Publication number
- JP2007128233A JP2007128233A JP2005319576A JP2005319576A JP2007128233A JP 2007128233 A JP2007128233 A JP 2007128233A JP 2005319576 A JP2005319576 A JP 2005319576A JP 2005319576 A JP2005319576 A JP 2005319576A JP 2007128233 A JP2007128233 A JP 2007128233A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- pixel data
- pixel
- circuit
- address
- 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
Images
Landscapes
- Image Input (AREA)
- Storing Facsimile Image Data (AREA)
Abstract
Description
本発明は、画像用メモリ回路に係り、特に、画素データのモード別アクセスに関する。 The present invention relates to an image memory circuit, and more particularly to access of pixel data by mode.
例えば、特許文献1には、三次元画像の画素データに対する一次補間の一種である8点近傍補間(ボクセル補間)を高速に処理するインターリーブメモリが開示されている。このインターリーブメモリは、互いに独立してアクセス可能な8個のメモリバンクを有しており、個々のメモリバンクには、補間ボクセルを囲む8個の近傍ボクセルのボリュームデータのそれぞれが記憶されている。近傍補間時には、8個のメモリバンクから8個のボリュームデータが同時に読み出される。
For example,
ところで、画像処理では、画像平面上で横方向に一列に並んだ画素データを一纏めでメモリから読み出すのが一般的である。しかしながら、例えば補間演算のように、縦横方向に並んだ画素データが必要な場合、メモリのアクセス回数が増えてしまい、処理速度の低下を招くといった不都合が生じる。 By the way, in image processing, pixel data arranged in a line in a horizontal direction on an image plane are generally read from a memory collectively. However, for example, when pixel data arranged in the vertical and horizontal directions is required as in an interpolation operation, the number of memory accesses increases, resulting in a disadvantage that the processing speed is reduced.
本発明は、かかる事情に鑑みてなされたものであり、その目的は、画像データを構成する個々の画素データを記憶するメモリのアクセス速度の向上を図ることである。 The present invention has been made in view of such circumstances, and an object thereof is to improve the access speed of a memory that stores individual pixel data constituting image data.
また、本発明の別の目的は、メモリから画素データを読み出すアクセスモードの種別に関わりなく、メモリアクセスの高速化を図ることである。 Another object of the present invention is to increase the speed of memory access regardless of the type of access mode for reading pixel data from the memory.
かかる課題を解決するために、本発明は、画像用メモリ回路を提供する。この画像用メモリ回路は、互いに独立してアクセス可能な複数のメモリ領域と、画像平面上のある代表位置を起点に一次元状に並んだ画素データのそれぞれと、この代表位置を起点に二次元状に並んだ画素データのそれぞれとが、複数のメモリ領域のそれぞれに分散するように、画素データの集合である画素データをマッピングするアドレス変換部と、アドレス変換部によってマッピングされた画素データを複数のメモリ領域に分散させるように書き込む書込回路と、複数のメモリ領域へのアクセスモードとして、一次元モードと二次元モードとが用意されており、代表位置の指定を伴う一次元モードの選択時には、代表位置を起点に一次元状に並んだ画素データを複数のメモリ領域から並列に読み出し、代表位置を起点とする二次元モードの選択時には、代表位置を起点に二次元状に並んだ画素データを複数のメモリ領域から並列に読み出す読出回路とを有する。 In order to solve this problem, the present invention provides an image memory circuit. The image memory circuit includes a plurality of memory areas that can be accessed independently from each other, pixel data arranged one-dimensionally starting from a certain representative position on the image plane, and two-dimensionally starting from the representative position. An address conversion unit for mapping pixel data that is a set of pixel data, and a plurality of pixel data mapped by the address conversion unit, so that each of the pixel data arranged in a line is distributed to each of a plurality of memory areas. A writing circuit that writes data in a memory area and a mode for accessing a plurality of memory areas are provided in a one-dimensional mode and a two-dimensional mode. , Two-dimensional mode starting from the representative position by reading the pixel data arranged in a one-dimensional form starting from the representative position in parallel from multiple memory areas Upon selection has a pixel data arranged two-dimensionally as a starting point a representative position from the plurality of memory areas and reading circuit for reading in parallel.
ここで、本発明において、代表位置は、画像平面の原点を起点とするオブジェクト(上記の画像データに相当)の位置である絶対アドレスと、オブジェクトの原点を起点とする画素の位置である相対アドレスとによって特定され、アドレス変換部は、絶対アドレスと、相対アドレスと、オブジェクトのサイズである水平サイズとに基づいて、画素データをマッピングすることが好ましい。 Here, in the present invention, the representative position is an absolute address that is the position of an object (corresponding to the above image data) starting from the origin of the image plane, and a relative address that is the position of a pixel starting from the origin of the object. The address conversion unit preferably maps the pixel data based on the absolute address, the relative address, and the horizontal size that is the size of the object.
また、本発明において、オブジェクトの水平サイズは、メモリ領域の数に応じて規定されていることが好ましく、書込回路および読出回路は、同一回路であることが好ましい。 In the present invention, the horizontal size of the object is preferably defined according to the number of memory areas, and the writing circuit and the reading circuit are preferably the same circuit.
さらに、本発明において、画像用メモリ回路は、アドレス変換部が画素データをマッピングすることで特定した複数のメモリ領域に対して、書き込み、または読み出しの指示を行う制御回路をさらに有し、書込回路は、制御回路が指示した複数のメモリ領域に対して画素データを書き込み、読出回路は、制御回路が指示した複数のメモリ領域に対して画素データを読み出すことが好ましい。 Further, in the present invention, the image memory circuit further includes a control circuit for instructing writing or reading to a plurality of memory areas specified by mapping the pixel data by the address conversion unit. Preferably, the circuit writes pixel data to a plurality of memory areas designated by the control circuit, and the reading circuit reads pixel data to the plurality of memory areas designated by the control circuit.
なお、本発明において、書込回路は、アドレス変換部のマッピングに応じて、複数のメモリ領域へ書き込む画素データを並び替えることが好ましく、読出回路は、アドレス変換部のマッピングに応じて、複数のメモリ領域から読み込んだ画素データを並び替えることが好ましい。 In the present invention, the writing circuit preferably rearranges pixel data to be written to the plurality of memory areas in accordance with the mapping of the address conversion unit, and the reading circuit has a plurality of in accordance with the mapping of the address conversion unit. It is preferable to rearrange the pixel data read from the memory area.
なお、本発明において、上記一次元状に並んだ画素データは、画像平面上の画素を起点とした1×k(k=n2,n≧2)のサイズを有しており、上記二次元状に並んだ画素データは、画像平面上の画素を起点としたn×nのサイズを有することが好ましい。 In the present invention, the one-dimensionally arranged pixel data has a size of 1 × k (k = n 2 , n ≧ 2) starting from a pixel on the image plane, and the two-dimensional The pixel data arranged in a shape preferably has a size of n × n starting from a pixel on the image plane.
本発明において、代表位置を起点に一次元状に並んだデータは、複数のメモリ領域に分散するようにマッピングされ、これらのメモリ領域に書き込まれる。また、この代表位置を起点に二次元状に並んだデータも、複数のメモリ領域に分散するようにマッピングされ、これらのメモリ領域に書き込まれる。そして、一次元および二次元のどちらのアクセスモードであっても、処理に必要なデータが複数のメモリから並列に読み出される。したがって、アクセスモードの種別(一次元モード/二次元モード)に関わりなく、アクセス回数を低減できるので、メモリアクセスの高速化を図ることが可能になる。 In the present invention, data arranged in a one-dimensional manner starting from the representative position is mapped so as to be distributed in a plurality of memory areas, and is written in these memory areas. In addition, data arranged two-dimensionally starting from this representative position is also mapped so as to be distributed in a plurality of memory areas, and written into these memory areas. In both the one-dimensional and two-dimensional access modes, data necessary for processing is read in parallel from a plurality of memories. Therefore, since the number of accesses can be reduced regardless of the type of access mode (one-dimensional mode / two-dimensional mode), it is possible to increase the speed of memory access.
図1は、画像用メモリ回路の構成図である。この画像用メモリ回路は、メモリ1と、アドレス変換部2と、アクセス部3とから構成されており、これらが連係して、メモリ1に対する画素データの入出力(読み出し/書き込み)を行う。
FIG. 1 is a configuration diagram of an image memory circuit. The image memory circuit includes a
メモリ1は、一例として4個のメモリ領域1a〜1dに分割されており、それぞれのメモリ領域1a〜1dは、互いに独立してアクセス可能である。また、各メモリ領域1a〜1dは、複数のメモリブロックで構成されており、一つのメモリブロックには、一画素の画素データ(いわゆる、画素値)が記憶される。また、これらのメモリブロックには、便宜上、「1,2,3,4,・・・」といった連続的なアドレスが割り当てられている。
The
アドレス変換部2は、画像データを構成する個々の画素データのマッピング、すなわち、画像平面上(特にオブジェクト上)の位置情報と、メモリ領域1a〜1dのメモリブロックのアドレスとの対応付けを行う。画像平面上の位置を指定するアドレス(代表位置)指定位置情報BADは、これと並行して入力されるアクセスモードMODに基づいて、各メモリ領域1a〜1dにおけるメモリブロックのアドレスADR(1)〜(4)に変換される。
The
なお、指定位置情報BADおよびアクセスモードMODは、アドレス変換部2に直接または間接的に接続された装置(例えばCPU、バスマスタ(図示せず)等)から生成され、アドレス変換部2に入力される。アドレス変換部2より出力されるアドレスADR(1)は、第1のメモリ領域1a内のメモリブロックのアドレスに対応する。同様に、アドレスADR(2)は第2のメモリ領域1b、アドレスADR(3)は第3のメモリ領域1c、アドレスADR(4)は第4のメモリ領域1dのメモリブロックのアドレスにそれぞれ対応する。
The designated position information BAD and the access mode MOD are generated from a device (for example, CPU, bus master (not shown), etc.) directly or indirectly connected to the
図2は、指定位置情報BADの説明図である。同図(a)は、メモリ空間上における絶対アドレスGADの説明図である。絶対アドレスGADは、一次元のメモリ空間上におけるオブジェクトの起点(画素データの集合である画素データ)を示す位置情報である。また、水平サイズHは、このオブジェクトの水平方向の画素サイズを示している。例えば、あるオブジェクトが、画像平面上において垂直方向に複数のサイズを持つ場合、このオブジェクトの画素データは、メモリ空間上においてこのオブジェクトを起点を示すアドレスGADから、水平サイズHが垂直方向の複数のサイズ分だけ、連続して一次元状に記憶される。また、同図(b)は、画像平面上における相対アドレスOADの説明図である。相対アドレスOADは、二次元のオブジェクト(画像平面)上における画素を示す位置情報、つまりメモリ空間上における絶対アドレスGADからのオフセット値である。例えば、画像平面上におけるオブジェクトの起点となるアドレスをS(a,b)とし、指定される画素データの相対アドレスOADをアドレスS(i,j)とする。この場合、指定位置情報BADによって特定される画像平面上の画素(画素データ)の代表アドレス(代表位置)は、S(a+j,b+i)となる。 FIG. 2 is an explanatory diagram of the designated position information BAD. FIG. 4A is an explanatory diagram of the absolute address GAD in the memory space. The absolute address GAD is position information indicating the starting point of the object (pixel data that is a set of pixel data) in the one-dimensional memory space. The horizontal size H indicates the pixel size of the object in the horizontal direction. For example, when an object has a plurality of sizes in the vertical direction on the image plane, the pixel data of the object is obtained from the address GAD indicating the starting point of the object in the memory space, and the horizontal size H has a plurality of sizes in the vertical direction. The size is continuously stored in one dimension. FIG. 7B is an explanatory diagram of the relative address OAD on the image plane. The relative address OAD is position information indicating a pixel on a two-dimensional object (image plane), that is, an offset value from the absolute address GAD on the memory space. For example, the address that is the starting point of the object on the image plane is S (a, b), and the relative address OAD of the designated pixel data is the address S (i, j). In this case, the representative address (representative position) of the pixel (pixel data) on the image plane specified by the designated position information BAD is S (a + j, b + i).
メモリ領域1a〜1dへのアクセスモードMODには、一次元モードと二次元モードとが存在し、いずれかアドレス変換部2に入力されることで指定される。ここで呼ばれる「次元」は、画像平面上における次元であり、一次元モードとは、指定位置情報BADを起点に一次元状(水平方向)に並んだ画素データ(同図の網掛部)を選択するモードをいう。また、二次元モードとは、指定位置情報BADを起点に二次元状(水平および垂直方向)に並んだ画素データ(同図の太枠部)を選択するモードをいう。
The access modes MOD for the memory areas 1a to 1d include a one-dimensional mode and a two-dimensional mode, which are designated by being input to one of the
なお、オブジェクトの水平サイズHは任意であってもよいが、メモリマッピングの効率化を図る観点でいえば、これにメモリ領域数に応じた制約を設けてもよい。例えば、メモリ領域数がn2個の場合、オブジェクトの水平サイズHを下式のように定義してもよい。
H=n2×l+n×m (m,lは任意の自然数、n>m≧0,l≧1)
Note that the horizontal size H of the object may be arbitrary, but from the viewpoint of improving the efficiency of memory mapping, restrictions may be provided according to the number of memory areas. For example, when the number of memory areas is n 2 , the horizontal size H of the object may be defined as in the following equation.
H = n 2 × l + n × m (m and l are arbitrary natural numbers, n> m ≧ 0, l ≧ 1)
つまり、水平サイズHは、メモリ領域数(n2)によって決定される一次元モードの横サイズ(n2)に、nの倍数(×m)を加算した値の倍数(×l)である。メモリ領域数が4(n=2)個、および9(n=3)個である場合、水平サイズHは下表のようになる。
水平サイズH(n=2) 水平サイズH(n=3)
m=0,l=1 4 9
m=1,l=1 6 12
m=1,l=2 8 15
That is, the horizontal size H is a multiple (× l) of a value obtained by adding a multiple (× m) of n to the horizontal size (n 2 ) of the one-dimensional mode determined by the number of memory regions (n 2 ). When the number of memory areas is 4 (n = 2) and 9 (n = 3), the horizontal size H is as shown in the table below.
Horizontal size H (n = 2) Horizontal size H (n = 3)
m = 0, l = 1 4 9
m = 1, l = 1 6 12
m = 1, l = 2 8 15
アクセス部3は、アドレス変換部2から出力されたアドレスADR(1)〜(4)に基づいて、各メモリ領域1a〜1dにアクセスし、これらのアドレスに該当するメモリブロックに対して画素データDTの書き込み、または読み出しを行う。アクセス部3は、制御回路3aと、書込回路3bと、読出回路3cとから構成されている。
The
制御回路3aは、アドレスADR(1)〜(4)に対応するメモリブロックからデータを読み出し、または、それへの書き込みの指示を行う。メモリ1の物理的特性(例えば、バースト設定)等に依存した入出力のタイミングの調整も、メモリブロック単位で行われる。制御回路3aが行う制御信号は、メモリ領域毎に制御信号CTL(1)〜(4)とに分かれており、画素データDTの書き込み時では、制御信号CTL(1)〜(4)には読み出しを行う指示が、また、画素データDTの読み出し時では、制御信号CTL(1)〜(4)には書き込みの指示が、それぞれ含まれる。制御信号CTL(1)は第1のメモリ領域1aへの指示に対応する。同様に、制御信号CTL(2)は第2のメモリ領域1b、制御信号CTL(3)は第3のメモリ領域1c、制御信号CTL(4)は第4のメモリ領域1dへの指示にそれぞれ対応する。
The
書込回路3bは、各メモリ領域1a〜1dに書き込むべき複数の画素データDTを一時的に記憶するバッファを有する。これらの画素データDTは、制御回路3aが指示したアドレスADR(1)〜(4)のメモリブロックに、書込データWDT(1)〜(4)として書き込まれる。本実施形態における書込回路3bは、画素データDTを4画素分記憶するバッファを有しており、アドレス変換部2に入力される指定位置情報BADおよびアクセスモードMODとともに、4個の画素データDTがシリアルに書き込まれる。そして、制御回路3aが書込指示を各メモリ領域1a〜1dに出力するのと同期して、4個の画素データが書込データWDT(1)〜(4)として、メモリ領域1a〜1dに並列に書き込まれる。
The
なお、本実施形態の複数の画素データDTは、例えばCPU、バスマスタ(図示せず)等の装置から直接、書込回路3bへ入力されるが、アドレス変換部2を経由して間接的に入力されてもよい。
Note that the plurality of pixel data DT of the present embodiment are directly input to the
読出回路3cは、メモリ領域1a〜1dより並列に読み出された複数の画素データDTを一時的に記憶するバッファを有する。これらの画素データDTは、制御回路3aが選択したアドレスADR(1)〜(4)のメモリブロックに記憶された読出データRDT(1)〜(4)として読み出される。本実施形態における読出回路3cは、画素データDTを4画素分記憶するバッファを有しており、制御回路3aが読出指示を各メモリ領域1a〜1dに出力するのと同期して、これらに対応する画素データDTが読出データRDT(1)〜(4)として、メモリ領域1a〜1dから並列(パラレル)に読み出される。そして、複数の画素データDTとなって、シリアルに出力される。
The
なお、本実施形態の複数の画素データDTは、例えばCPU、バスマスタ(図示せず)等の装置へ直接、読出回路3cから出力されるが、アドレス変換部2を経由して間接的に出力されてもよい。
The plurality of pixel data DT of the present embodiment is directly output from the
<書き込み時>
つぎに、図1の画像用メモリ回路を用いて、メモリ領域1a〜1dへの画素データDTの書き込みについて説明する。まず、アドレス変換部2に、指定位置情報BADとアクセスモードMODとが入力され、書込回路3bに、この指定位置情報BADに対応する4個の画素データDTが入力される。
<When writing>
Next, writing of pixel data DT to the memory areas 1a to 1d will be described using the image memory circuit of FIG. First, the designated position information BAD and the access mode MOD are input to the
そして、アドレス変換部2は、指定位置情報BADおよびアクセスモードMODとに基づいて、それぞれの画素データをメモリ領域1a〜1dへ割り当てる。本実施形態において、アドレス変換部2は、以下の2つの条件を具備するように各メモリ領域1a〜1dへのマッピングを行う。つまり、アドレス変換部2は、指定位置情報BAD(代表位置)の画素S(a+i,b+j)を起点とする4個の画素データのそれぞれが、いずれも異なるメモリ領域1a〜1dに分散されるようにマッピングする。
(条件1) 画像平面上の代表位置の画素S(a+i,a+j)を起点に、一次元状(4×1)に並んだ4個の画素データ(図2の網掛部)を、4個のメモリ領域1a〜1dのそれぞれに分散させる。
(条件2) 画像平面上の代表位置の画素S(a+i,a+j)を起点に、二次元(2×2)に並んだ4個の画素データ(同図の太枠部)を、4個のメモリ領域1a〜1dのそれぞれに分散させる。
Then, the
(Condition 1) Four pixel data (shaded portion in FIG. 2) arranged one-dimensionally (4 × 1) starting from the pixel S (a + i, a + j) at the representative position on the image plane It is distributed to each of the four memory areas 1a to 1d.
(Condition 2) Four pixel data arranged in two dimensions (2 × 2) from the pixel S (a + i, a + j) at the representative position on the image plane (thick frame portion in the figure) It is distributed to each of the four memory areas 1a to 1d.
図3は、オブジェクト上におけるメモリ領域の対応図である。同図は、上述の条件の(ある代表位置における)マッピングを、S(a,b)を起点としたオブジェクトを構成する全ての画素に関して適用させた場合における、各画素のメモリ領域およびメモリブロックの分散を示している。同図(a)は、水平サイズH(オブジェクトサイズ)=6(m=1,l=1,一例として、6×4)の場合のマッピングの状態を示している。また、同図(b)は、水平サイズH=8(m=1,l=2,一例として、8×4)の場合のマッピングの状態を示している。なお、オブジェクトの原点(絶対アドレス)は、いずれの水平サイズHの場合もS(a,b)である。 FIG. 3 is a correspondence diagram of memory areas on the object. This figure shows the memory area and memory block of each pixel when mapping (at a certain representative position) of the above condition is applied to all the pixels constituting the object starting from S (a, b). Indicates dispersion. FIG. 6A shows a mapping state when the horizontal size H (object size) = 6 (m = 1, l = 1, 6 × 4 as an example). FIG. 7B shows a mapping state when the horizontal size H = 8 (m = 1, l = 2, as an example, 8 × 4). Note that the origin (absolute address) of the object is S (a, b) for any horizontal size H.
図3の各画素(オブジェクト内の各ブロック)に割り振られた数字は、この画素の記憶先となる各メモリ領域1a〜1dを示す。例えば、「1」が割り振られた画素(画素データ)は、第1のメモリ領域1aに記憶されている。同様に、「2」の画素は第2のメモリ領域1b、「3」の画素は第3のメモリ領域1c、「4」の画素は第4のメモリ領域1dにそれぞれ記憶されている。また、図3の各画素のカッコ内の数字は、この画素の記憶先となる各メモリ領域1a〜1d内の、メモリブロックのアドレスを示す。例えば、「(1)」が割り振られた画素の画素データは、メモリブロックのアドレス1に記憶されている。同様に、「(2)」の画素はメモリブロックのアドレス2、「(3)」の画素はメモリブロックのアドレス3にそれぞれ記憶されている。例えば、「1(1)」の画素は、第2のメモリ領域1bのメモリブロックのアドレス1に記憶され、「3(3)」の画素は、第3のメモリ領域1cのメモリブロックのアドレス3に記憶されていることを示す。
The numbers assigned to each pixel (each block in the object) in FIG. 3 indicate each memory area 1a to 1d that is a storage destination of this pixel. For example, a pixel (pixel data) to which “1” is allocated is stored in the first memory area 1a. Similarly, the pixel “2” is stored in the
メモリ領域1a〜1dへの対応付けを一般化すると、下式のように定義できる。なお、画素データのマッピングで上述した2つの条件を具備するような水平サイズHと、メモリ1のメモリ領域数をn2とする。このとき、指定位置情報BADとアクセスモードMODとが示す4個の画素(画素データ)のうち一つの画素S(x,y)(x≧0,y≧0)がマッピングされる場合(a=0,b=0)、その記憶先となる”B”番目のメモリ領域(第”B”のメモリ領域)は下式で求められる。
(1)y=0の場合
B=(y×H+x)mod n2
=x mod n2+1
(2)(y≠0の場合)
w=(n−m+l)mod n
B={(n×w)+(y×H+x)mod n2}mod n2+1
When the association with the memory areas 1a to 1d is generalized, it can be defined as the following expression. Note that the horizontal size H that satisfies the two conditions described above in the mapping of pixel data and the number of memory areas of the
(1) When y = 0 B = (y × H + x) mod n 2
= X mod n 2 +1
(2) (when y ≠ 0)
w = (n−m + 1) mod n
B = {(n × w) + (y × H + x) mod n 2 } mod n 2 +1
(1)の式は、y=0が画素(オブジェクトの最上部の画素データ)である場合、オブジェクトの原点(左上)から、順次、メモリ領域が対応付ける。例えば、図3(a)のケースにおいて、画素S(1,0)(図2におけるS(a+1,b+1))に対応するメモリ領域は、B=2となり、画素S(1,0)が第2のメモリ領域1bに対応する。
In the expression (1), when y = 0 is a pixel (the uppermost pixel data of the object), the memory areas are sequentially associated with the origin (upper left) of the object. For example, in the case of FIG. 3A, the memory area corresponding to the pixel S (1,0) (S (a + 1, b + 1) in FIG. 2) is B = 2, and the pixel S (1, 0) corresponds to the
(2)の式は、y≠0の画素(オブジェクトの最上部を除く画素データ)である場合、まず、メモリ領域数(n2)を二次元モードの画素サイズ(n)を小ブロックとしてn個に分ける。そして、画素が垂直方向に1画素分だけ下がる(yが1加算される)毎に、w個の小ブロック(メモリ領域)分だけ順序をシフトさせてから、画素にメモリ領域を対応付ける。 If the expression of (2) is a pixel of y ≠ 0 (pixel data excluding the uppermost part of the object), first, the number of memory areas (n 2 ) is set to n with the pixel size (n) of the two-dimensional mode as a small block. Divide into pieces. Then, every time the pixel is lowered by one pixel in the vertical direction (y is incremented by 1), the order is shifted by w small blocks (memory areas), and then the memory area is associated with the pixel.
例えば、図3(a)のケース(m=1,l=1)において、画素S(1,1)(a=0,b=0)に対応するメモリ領域を考える。このとき、w=0であり、画素の行が一画素分下げられても、メモリ領域を対応付けする順番が、変更されずに連続してメモリ領域が対応付けられる。つまり、画素S(1,0)の直前の画素であるS(0,5)が、第2のメモリ領域1bに対応付けられた場合、画素S(1,0)が、この第2のメモリ領域1bの次のメモリ領域である第3のメモリ領域1cが連続して対応付けられる。そして、B=4であるので、画素S(1,1)が第4のメモリ領域1dに対応する。
For example, in the case of FIG. 3A (m = 1, l = 1), consider a memory area corresponding to the pixel S (1,1) (a = 0, b = 0). At this time, even if w = 0 and the row of pixels is lowered by one pixel, the order of associating the memory areas is continuously associated without being changed. That is, when S (0,5), which is the pixel immediately before the pixel S (1,0), is associated with the
以上により、図3(a)のケースでは、画像平面上の画素データDTは、オブジェクトの原点S(a,b)から水平(右)方向に向かって、”第1のメモリ領域1a,第2のメモリ領域1b,第3のメモリ領域1c,第4のメモリ領域1d,(以下、繰り返し)”の順で連続して対応付けられる。具体的には、原点S(a,b)の画素データが第1のメモリ領域1aに対応付けられ、その右のS(a+1,b)が第2のメモリ領域1bに、さらにその右のS(a+2,b)が第3のメモリ領域1cに、それぞれ対応付けられる。そして、右端の画素に至った場合、一画素分下の左端画素から、前の行(一画素分上の画素の列)の順序を引き継いだまま、水平(右)方向へ、順次、各メモリ領域1a〜1dが対応付けられることなる。具体的には、左端の画素S(a,b+1)の画素データが第3のメモリ領域1cに対応付けられ、その右のS(a+1,b+1)が第4のメモリ領域1dに、さらにその右のS(a+2,b+1)が第1のメモリ領域1aに、それぞれ対応付けられる。
As described above, in the case of FIG. 3A, the pixel data DT on the image plane is “first memory area 1a, second data” from the object origin S (a, b) toward the horizontal (right) direction.
例えば、図3(b)のケース(m=1,l=2)において、画素S(1,1)(a=0,b=0)対応するメモリ領域を考える。このとき、w=1であり、画素の行が一画素分下げられたとき、メモリ領域を対応付けする順序は1小ブロック(2つのメモリ領域)分だけ順番をシフトさせてから、メモリ領域が対応付けられる。つまり、画素S(1,0)の直前の画素であるS(0,7)が、第4のメモリ領域1dに対応付けられた場合、画素S(1,0)が、本来のメモリ領域の対応付けである第1のメモリ領域1aを順番を2つだけシフトさせたメモリ領域、つまり、第3のメモリ領域1cが対応付けられる。そして、B=4であるので、画素S(1,1)が第4のメモリ領域1dに対応する。
For example, consider the memory area corresponding to the pixel S (1, 1) (a = 0, b = 0) in the case (m = 1, l = 2) of FIG. At this time, when w = 1 and the row of pixels is lowered by one pixel, the order of associating the memory areas is shifted by one small block (two memory areas), and then the memory area It is associated. That is, when S (0,7), which is the pixel immediately before pixel S (1,0), is associated with the
以上により、図3(b)のケースでは、画像平面上の画素データDTは、まず、オブジェクトの原点S(a,b)から水平(右)方向へ、順に、”第1のメモリ領域1a,第2のメモリ領域1b,第3のメモリ領域1c,第4のメモリ領域1d,(以下、繰り返し)”と、対応付けられることになる。具体的には、原点S(a,b)の画素データが第1のメモリ領域1aに対応付けられ、その右のS(a+1,b)が第2のメモリ領域1bに、さらにその右のS(a+2,b)が第3のメモリ領域1cに、それぞれ対応付けられる。その対応付けが右端の画素に至った場合、一画素分下の左端画素から、前の行(一画素分上の画素の列)の順序が、2メモリ領域分シフトされてから、水平(右)方向へ、順次、各メモリ領域1a〜1dが対応付けられることなる。具体的には、画素S(a,b+1)の画素データが第3のメモリ領域1cに対応付けられ、その右のS(a+1,b+1)が第4のメモリ領域1dに、さらにその右のS(a+2,b+1)が第1のメモリ領域1aに、それぞれ対応付けられる。
As described above, in the case of FIG. 3B, the pixel data DT on the image plane is first “first memory area 1 a, in order from the origin S (a, b) of the object in the horizontal (right) direction. The
また、このとき、アドレス変換部2は、画素データに対応するメモリ領域だけでなく、このメモリ領域内におけるメモリブロックのアドレスも算出する。B番目のメモリ領域(第”B”のメモリ領域)におけるメモリブロックのアドレスCは、下式で求められる。例えば、図3(a)のケースにおいて、画素S(1,1)に対応するメモリブロックのアドレスは、C=2.75となり、画素S(1,0)が第2のメモリ領域1bのアドレス”2”に対応する。
C=(y×H+x)/n2+1 (Cの整数部のみ利用)
At this time, the
C = (y × H + x) / n 2 +1 (only the integer part of C is used)
なお、上述の変換式は、画素データDTの記憶先となるメモリ領域およびメモリブロックのアドレスを算出するための一般式であり、必ずしもこの変換式を適用しなくとも、画素データのDTのマッピングは可能である。例えば、図3(a)の場合において、原点S(a,b)からメモリ領域を対応させる順序を入れ替えてもよい。具体的には、左端の画素から水平(右)方向の順に、”第1のメモリ領域1a,第3のメモリ領域1c,第2のメモリ領域1b,第4のメモリ領域1d,(以下、繰り返し)”と、対応付けてもよい。
Note that the above conversion formula is a general formula for calculating the address of the memory area and memory block that is the storage destination of the pixel data DT, and the mapping of the DT of the pixel data is not necessarily applied even if this conversion formula is not applied. Is possible. For example, in the case of FIG. 3A, the order of associating the memory areas from the origin S (a, b) may be changed. Specifically, “first memory area 1a, third memory area 1c,
つぎに、アドレス変換部2は、指定位置情報BADおよびアクセスモードMODに基づいて算出された(画素データDTとメモリブロックのアドレスとが対応付けられた)アドレスADR(1)〜(4)を、制御回路3aおよび書込回路3b入力する。
Next, the
そして、制御回路3aは、アドレス変換部2から入力されたアドレスADR(1)〜(4)のそれぞれが示すメモリブロックに、書込回路3bからの画素データDTを読み込ませる旨の制御信号CTL(1)〜(4)を入力する。一方、書込回路3bは、制御回路3aが指示したアドレスADR(1)〜(4)のそれぞれが示すメモリ領域の1a〜1dのメモリブロックに対して、当初、入力された4個の画素データを書込データWDT(1)〜(4)として書き込む。
The
このとき、書込回路3bは、アドレス変換部2のマッピングに応じて、複数のメモリ領域へ書き込む画素データを並び替える処理を行う。具体的には、4個の画素データDTを、アドレス変換部2から入力されたアドレスADR(1)〜(4)のそれぞれに対応させる。
At this time, the
図4は、図3(a)のケースの書き込み時において、画素S(a+1,b+1)を起点する一次元モード(網掛部)がアドレス変換部2に入力された場合の書込回路3bの説明図である。上段のブロックは、4個の画素データDTが記憶された場合における、各バッファに記憶された画素データDTの状態図であり、下段のブロックは、これらの4個の画素データDTがアドレス変換部2が指示する順番通りに並べ替えられた画素データの状態図である。書込回路3bのバッファは、左から順に、第1のメモリ領域1aへの書込データWDT(1)、第2のメモリ領域1bへの書込データWDT(2)、第3のメモリ領域1cへの書込データWDT(3)、第4のメモリ領域1dへの書込データWDT(4)に接続されている。
FIG. 4 shows a case where a one-dimensional mode (shaded part) starting from the pixel S (a + 1, b + 1) is input to the
まず、アドレス変換部2に指定位置情報BADおよびアクセスモードMODが入力された場合、画素S(a+1,b+1)、画素S(a+2,b+1)、画素S(a+3,b+1)、画素S(a+4,b+1)の4個のアドレスの画素データDTが書込回路3bのバッファの左から順に記憶される。つぎに、アドレス変換部2によるマッピングが完了すると、書込回路3bには、画素S(a+2,b+1)はアドレスADR(1)に対応し、同様に、画素S(a+3,b+1)はアドレスADR(2)に、画素S(a+4,b+1)はアドレスADR(3)に、画素S(a+1,b+1)はアドレスADR(4)にそれぞれ対応する旨の入力がされる。
First, when the designated position information BAD and the access mode MOD are input to the
そして、書込回路3bは、画素データDTに記憶されているアドレスのマッチングを行うことで画素データDTの並び替えを行う。図4における左端の(第1のメモリ領域1aに接続された)バッファは、画素S(a+1,b+2)の画素データを記憶することになるので、この画素S(a+1,b+2)のアドレスを持つ画素データDTを、書込回路3bのバッファ内から探索する。これに該当する(左から2番目のバッファに記憶された)画素データが発見すると、このバッファおよび左端のバッファとのそれぞれに記憶されている画素データDTとを入れ替える。このような画素データの入れ替えが、全てのバッファに行われることで、結果として、図4の下段のようなアドレス変換部2が指示したアドレスADR(1)〜(4)に対応する画素データDTがそれぞれのバッファに記憶される。
The
以上のように、画素データDTをメモリ領域1a〜1dにマッピングしていくことで、画素データDTは4画素分ずつメモリ領域1a〜1dへ並行に記憶されていくが、上述した一次元モードのみによるマッピングに限定されず、選択されるアクセスモードMODは任意でもよい。なぜなら、上述した変換式によるマッピングは、アクセスモードMODに依存しないからである。したがって、画像平面上の同一位置の画素のマッピングが行われないように、一次元モードと二次元モードとを組み合わせたマッピングであってもよい。例えば、4×3サイズのオブジェクトである画素データを全てメモリ領域に記憶する場合(メモリ領域数4)、二次元(2×2)モードのマッピングを2回と、一次元(4×1)モードのマッピングを1回とを行うケースや、一次元モードのマッピングを3回連続して行うケースであってもよい。 As described above, by mapping the pixel data DT to the memory areas 1a to 1d, the pixel data DT is stored in parallel in the memory areas 1a to 1d by four pixels. However, only the one-dimensional mode described above is used. The access mode MOD to be selected may be arbitrary. This is because the mapping based on the above conversion formula does not depend on the access mode MOD. Therefore, the mapping may be a combination of the one-dimensional mode and the two-dimensional mode so that the mapping of pixels at the same position on the image plane is not performed. For example, when all the pixel data which is a 4 × 3 size object is stored in the memory area (number of memory areas is 4), the two-dimensional (2 × 2) mode mapping is performed twice, and the one-dimensional (4 × 1) mode. There may be a case where the mapping is performed once or a case where the mapping in the one-dimensional mode is performed three times continuously.
<読み出し時>
つぎに、上述した書き込みに基づいてマッピングされたメモリ1(メモリ領域1a〜1d)からの画素データDTの読み出しについて説明する。アドレス変換部2は、画素データDTをメモリ領域1a〜1dから読み出す際に、指定位置情報BADに伴って入力されるアクセスモードMODに基づいて、指定位置情報BADからアドレスADR(1)〜(4)へのアドレス変換を行う。アクセスモードMODには、上述の書き込み時における条件1の4個の画素データ(図2の網掛部)を読み出す一次元モードと、条件2の4個の画素データ(同図の太枠部)を読み出す二次元モードとが用意されている。
<When reading>
Next, reading of the pixel data DT from the memory 1 (memory areas 1a to 1d) mapped based on the above-described writing will be described. When reading out the pixel data DT from the memory areas 1a to 1d, the
図5は、メモリ領域上における読み出し時の説明図である。具体的には、図3のマッピングを、各メモリ領域1a〜1d内の各メモリブロックに対応させた図である。1つのブロック(メモリブロック)には、1画素分の画素データが記憶されている。図5の(a)は、図3(a)の場合(オブジェクトが6×4)における、各メモリ領域1a〜1d内とのメモリブロックの対応関係を示し、同様に、図5の(b)は、図3(b)の場合(オブジェクトが8×4)における、メモリブロックとの対応関係を示している。いずれの場合も、画像平面上の画素(画素データ)のそれぞれは、オブジェクトの原点S(a,b)から水平(右)方向への順に、メモリブロックが対応付けられているため、オブジェクトの原点S(a,b)の画素データは、第1のメモリ領域におけるアドレス1のメモリブロックに記憶される。
FIG. 5 is an explanatory diagram at the time of reading on the memory area. Specifically, FIG. 3 is a diagram in which the mapping of FIG. 3 is associated with each memory block in each of the memory areas 1a to 1d. One block (memory block) stores pixel data for one pixel. FIG. 5A shows the correspondence relationship between the memory blocks 1a to 1d in the case of FIG. 3A (object is 6 × 4), and similarly, FIG. Shows the correspondence with the memory block in the case of FIG. 3B (object is 8 × 4). In any case, each pixel (pixel data) on the image plane is associated with a memory block in the order from the object origin S (a, b) to the horizontal (right) direction. The pixel data of S (a, b) is stored in the memory block at
例えば、図3(a)の画像平面上における画素S(a+1,b+1)を起点とし、アクセスモードMODとして、一次元モード(同図(a)の網掛部)がアドレス変換部2に入力されたケースを考える。この場合、アドレス変換部2は、指定位置情報BADに相当する起点の画素S(a+1,b+1)から一次元に並ぶ、画素S(a+2,b+1)、画素S(a+3,b+1)、画素S(a+4,b+1)に対応する各メモリ領域1a〜1dのアドレスADR(1)〜(4)を生成する。
For example, starting from the pixel S (a + 1, b + 1) on the image plane of FIG. 3A, the one-dimensional mode (shaded portion of FIG. 3A) is the
具体的には、図5(a)の網掛部に示すように、画素S(a+1,b+1)の画素データは、第4のメモリ領域1dのメモリブロックのアドレス2に記憶されているので、アドレスADR(4)が「2」となる。以下同様にして、画素S(a+2,b+1)に対応するアドレスADR(1)が「3」、画素S(a+3,b+1)に対応するアドレスADR(2)が「3」、画素S(a+4,b+1)に対応するアドレスADR(3)が「3」となる。そして、生成されたアドレスADR(1)〜(4)は、制御回路3aおよび読出回路3cに入力される。
Specifically, as shown in the shaded portion of FIG. 5A, the pixel data of the pixel S (a + 1, b + 1) is stored at the
制御回路3aは、アドレス変換部2から入力されたアドレスADR(1)〜(4)のそれぞれが示すメモリブロックから、読出回路3cへ画素データDTを読み込ませる旨の制御信号CTL(1)〜(4)を入力する。一方、読出回路3cは、制御回路3aが指示したアドレスADR(1)〜(4)のそれぞれが示すメモリ領域1a〜1dのメモリブロックから、4個の画素データを読出データRDT(1)〜(4)として並列に読み出す。
The
具体的には、制御信号CTL(1)は、第1のメモリ領域1aに対して、アドレスADR(1)で指定されたメモリブロックのアドレス(この場合、アドレス「3」)に記憶された画素データDTを読出データRDT(1)として出力する旨の指示である。メモリ領域1aはこの指示を受けて、読出データRDT(1)を出力する。同様にして、制御信号CTL(2)およびアドレスADR(2)によって第2のメモリ領域1bから読出データRDT(2)を、制御信号CTL(3)およびアドレスADR(3)によって第3のメモリ領域1cから読出データRDT(3)を、制御信号CTL(4)およびアドレスADR(4)によって第4のメモリ領域1dから読出データRDT(4)をそれぞれ出力する。このとき、各メモリ領域1a〜1dから出力された読出データRDT(1)〜(4)は、読出回路3cに入力される。このとき、4個の読出データRDT(1)〜(4)はそれぞれ異なるメモリ領域から出力されることに留意する。
Specifically, the control signal CTL (1) is a pixel stored in the address of the memory block designated by the address ADR (1) (in this case, the address “3”) with respect to the first memory area 1a. This is an instruction to output data DT as read data RDT (1). In response to this instruction, memory area 1a outputs read data RDT (1). Similarly, read data RDT (2) is read from the
また、例えば、図3(a)の画像平面上における画素S(a+1,b+1)を起点とする二次元モード(同図(a)の太枠部)が、アドレス変換部2に入力されたケースを考える。この場合、アドレス変換部2は、指定位置情報BADに相当する起点の画素S(a+1,b+1)から一次元に並ぶ、画素S(a+2,b+1)、画素S(a+1,b+2)および画素S(a+2,b+2)のそれぞれに対応するアドレスADR(1)〜(4)を生成する。
Further, for example, a two-dimensional mode (thick frame portion in FIG. 3A) starting from the pixel S (a + 1, b + 1) on the image plane in FIG. Consider the case entered. In this case, the
具体的には、図5(a)の太枠部に示すように、画素S(a+1,b+1)の画素データは第4のメモリ領域1dのメモリブロックのアドレス2に記憶されているので、アドレスADR(4)は「2」となる。同様にして、画素S(a+2,b+1)に対応するアドレスADR(1)は「3」、画素S(a+1,b+2)に対応するアドレスADR(2)は「4」、画素S(a+2,b+2)に対応するアドレスADR(3)は「4」となる。そして、生成されたアドレスADR(1)〜(4)は、制御回路3aおよび読出回路3cに入力される。制御回路3aは、一次元モードと同様に、アドレスADR(1)〜(4)および制御信号CTL(1)〜(4)を並行してメモリ領域1a〜1dへ入力する。
Specifically, as shown in the thick frame portion of FIG. 5A, the pixel data of the pixel S (a + 1, b + 1) is stored at the
一次元モードと同様に、制御信号(1)〜(4)のそれぞれは、各アドレスADR(1)〜(4)で指定されたメモリブロックのアドレス画素データDTを読出データRDT(1)〜(4)として出力する旨の指示である。メモリ領域1a〜1dは、アドレスADR(1)〜(4)に対応するメモリブロックに記憶された画素データDTを読出データRDT(1)〜(4)として出力され、読出回路3cに入力される。
As in the one-dimensional mode, each of the control signals (1) to (4) converts the address pixel data DT of the memory block designated by each address ADR (1) to (4) into read data RDT (1) to ( This is an instruction to output as 4). The memory areas 1a to 1d output the pixel data DT stored in the memory block corresponding to the addresses ADR (1) to (4) as read data RDT (1) to (4) and input to the
つぎに、例えば、図3(b)の画像平面上における画素S(a+2,b+1)を起点とし、アクセスモードMODとして、一次元モード(同図(b)の網掛部)がアドレス変換部2に入力されたケースを考える。この場合、アドレス変換部2は、指定位置情報BADに相当する起点の画素S(a+2,b+1)から一次元に並ぶ、画素S(a+3,b+1)、画素S(a+4,b+1)、画素S(a+5,b+1)に対応する各メモリ領域1a〜1dのアドレスADR(1)〜(4)を生成する。
Next, for example, the pixel S (a + 2, b + 1) on the image plane in FIG. 3B is the starting point, and the one-dimensional mode (shaded portion in FIG. 3B) is the address as the access mode MOD. Consider the case of input to the
具体的には、図5(b)の網掛部に示すように、画素S(a+2,b+1)の画素データは、第1のメモリ領域1aのメモリブロックのアドレス3に記憶されているので、アドレスADR(1)は「3」となる。以下同様にして、画素S(a+3,b+1)に対応するアドレスADR(2)は「3」、画素S(a+4,b+1)に対応するアドレスADR(4)は「4」、画素S(a+5,b+1)に対応するアドレスADR(3)は「4」となる。そして、生成されたアドレスADR(1)〜(4)は、制御回路3aおよび読出回路3cに入力される。制御回路3aは、水平サイズHが6の場合と同様に、アドレスADR(1)〜(4)および制御信号CTL(1)〜(4)を並行してメモリ領域1a〜1dへ入力する。
Specifically, as shown in the shaded portion of FIG. 5B, the pixel data of the pixel S (a + 2, b + 1) is stored at the
水平サイズHが6の場合と同様に、制御信号(1)〜(4)のそれぞれは、各アドレスADR(1)〜(4)で指定されたメモリブロックのアドレス画素データDTを読出データRDT(1)〜(4)として出力する旨の指示である。メモリ領域1a〜1dは、アドレスADR(1)〜(4)に対応するメモリブロックに記憶された画素データDTを読出データRDT(1)〜(4)として出力する。 As in the case where the horizontal size H is 6, each of the control signals (1) to (4) converts the address pixel data DT of the memory block designated by each address ADR (1) to (4) into the read data RDT ( It is an instruction to output as 1) to (4). Memory regions 1a to 1d output pixel data DT stored in memory blocks corresponding to addresses ADR (1) to (4) as read data RDT (1) to (4).
また、例えば、図3(b)の画像平面上における画素S(a+2,b+1)を起点とする二次元モード(同図(b)の太枠部)が、アドレス変換部2に入力されたケースを考える。この場合、アドレス変換部2は、指定位置情報BADに相当する起点の画素S(a+2,b+1)から一次元に並ぶ、画素S(a+3,b+1)、画素S(a+2,b+2)および画素S(a+3,b+2)のそれぞれに対応するアドレスADR(1)〜(4)を生成する。
Further, for example, a two-dimensional mode (thick frame portion in FIG. 3B) starting from the pixel S (a + 2, b + 1) on the image plane in FIG. Consider the case entered. In this case, the
具体的には、図5(b)の太枠部に示すように、画素S(a+2,b+1)の画素データは第1のメモリ領域1aのメモリブロックのアドレス3に記憶されているので、アドレスADR(1)は「3」となる。同様にして、画素S(a+3,b+1)に対応するアドレスADR(2)は「3」、画素S(a+2,b+2)に対応するアドレスADR(2)は「5」、画素S(a+3,b+2)に対応するアドレスADR(3)は「5」となる。そして、生成されたアドレスADR(1)〜(4)は、制御回路3aおよび読出回路3cに入力される。制御回路3aは、水平サイズが6の場合と同様に、アドレスADR(1)〜(4)および制御信号CTL(1)〜(4)を並行してメモリ領域1a〜1dへ入力する。
Specifically, as shown in the thick frame portion of FIG. 5B, the pixel data of the pixel S (a + 2, b + 1) is stored at the
また、水平サイズHが6の場合と同様に、制御信号(1)〜(4)のそれぞれは、各アドレスADR(1)〜(4)で指定されたメモリブロックのアドレス画素データDTを読出データRDT(1)〜(4)として出力する旨の指示である。メモリ領域1a〜1dは、アドレスADR(1)〜(4)に対応するメモリブロックに記憶された画素データDTを読出データRDT(1)〜(4)として出力する。 Similarly to the case where the horizontal size H is 6, each of the control signals (1) to (4) reads out the address pixel data DT of the memory block designated by each address ADR (1) to (4). This is an instruction to output as RDT (1) to (4). Memory regions 1a to 1d output pixel data DT stored in memory blocks corresponding to addresses ADR (1) to (4) as read data RDT (1) to (4).
なお、それぞれの読み出し時のケースにおいて、読出回路3cは、アドレス変換部2のマッピングに応じて、複数のメモリ領域1a〜1dから並列に読み出した画素データを並び替える処理を行う。具体的には、4個の画素データDTを、アドレス変換部2から入力されたアドレスADR(1)〜(4)のそれぞれに対応させる。
In each readout case, the
図6は、図3(a)のケースの読み出し時において、画素S(a+1,b+1)を起点する一次元モード(網掛部)がアドレス変換部2に入力された場合の読出回路3cの説明図である。下段のブロックは、4個の画素データDTが記憶された場合における、各バッファに記憶された画素データDTの状態図であり、上段のブロックは、これらの4個の画素データDTがアドレス変換部2が指示する順番通りに並べ替えられた画素データの状態図である。読出回路3cのバッファは、左から順に、第1のメモリ領域1aへの書込データRDT(1)、第2のメモリ領域1bへの書込データRDT(2)、第3のメモリ領域1cへの書込データRDT(3)、第4のメモリ領域1dへの書込データRDT(4)に接続されている。
FIG. 6 shows a readout circuit when a one-dimensional mode (shaded part) starting from the pixel S (a + 1, b + 1) is input to the
まず、アドレス変換部2によるマッピングが完了すると、読出回路3cには、画素S(a+1,b+1)はアドレスADR(1)に対応し、同様に、画素S(a+2,b+1)はアドレスADR(2)に、画素S(a+1,b+2)はアドレスADR(3)に、画素S(a+2,b+2)はアドレスADR(4)にそれぞれ対応する旨の入力がされる。つぎに、制御回路3aの制御信号(1)〜(4)によって、メモリ領域1aからS(a+2,b+1)が入力され、同様に、メモリ領域1aからS(a+1,b+2)が、メモリ領域1aからS(a+2,b+2)が、メモリ領域1aからS(a+1,b+1)がそれぞれ入力される。
First, when the mapping by the
そして、読出回路3cは、画素データDTに記憶されているアドレスのマッチングを行うことで画素データDTの並び替えを行う。図6における左端の(第1のメモリ領域1aに接続された)バッファは、画素S(a+1,b+1)の画素データを記憶することになるので、この画素S(a+1,b+1)のアドレスを持つ画素データDTを、読出回路3cのバッファ内から探索する。これに該当する(右端のバッファに記憶された)画素データを発見すると、このバッファおよび左端のバッファとのそれぞれに記憶されている画素データDTとを入れ替える。このような画素データの入れ替えが、全てのバッファに行われることで、結果として、図6の上段のようなアドレス変換部2が指示したアドレスADR(1)〜(4)に対応する画素データDTがそれぞれのバッファに記憶される。
Then, the
このように、本実施形態に係る画像用メモリ回路は、互いに独立してアクセス可能な複数のメモリ領域1a〜1dを有する。そして、画像平面上のあるアドレス(代表位置)を起点に一次元状および二次元状に並んだ画素データは、メモリ領域1a〜1dに分散するようにマッピングされ、それぞれのメモリ領域1a〜1dに書き込まれる。画素データの読出時には、一次元モードおよび二次元モードのどちらであっても、必要なデータがメモリ領域1a〜1dから一括で読み出される。したがって、アクセスモードの種別に関わりなく、アクセス回数を低減できるので、メモリアクセスの高速化を図ることが可能になる。 As described above, the image memory circuit according to the present embodiment includes the plurality of memory areas 1a to 1d that can be accessed independently from each other. Then, pixel data arranged in a one-dimensional and two-dimensional manner starting from a certain address (representative position) on the image plane is mapped so as to be distributed in the memory areas 1a to 1d, and is mapped to the respective memory areas 1a to 1d. Written. When reading out the pixel data, necessary data is read out from the memory areas 1a to 1d at a time in both the one-dimensional mode and the two-dimensional mode. Accordingly, since the number of accesses can be reduced regardless of the type of access mode, it is possible to increase the speed of memory access.
これは、例えば描画回路(図示せず)が、このメモリ1に記憶した画素データを将来加工する場合、具体的には、対象となる画素とその周囲に存在する画素とを用いた補間演算のように縦横方向に並んだデータが必要である場合、二次元モードを指定することによって、これらを一括で読み出せる。横方向に一列に並んだデータを一纏めでメモリから読み出すアクセス(一次元モードのアクセス)を繰り返すケースとの対比から明らかなように、このような一括読み出しによるメリットは大きい。
For example, when a drawing circuit (not shown) processes the pixel data stored in the
なお、本実施形態のメモリ領域の数は4個であったが、本発明はこれに限定されず、例えば下表のように、いずれのアクセスモードMODが選択する画素データ群の個数とを一致させることで、メモリ領域を可変に設定できる。具体的には、メモリ領域数が、k(k=n2,n≧2)に対して、一次元モードのサイズはk×1であり、二次元モードのサイズはn×nであることが好ましい。なぜなら、所望の画素における画素データの補間処理は、この画素の周辺の画素データに基づく場合が多いからである。また、二次元モードは、n×nのような方形状のサイズに限らず、矩形状(例えば2×4,2×6)のサイズであってもよい。ただし、この場合、それぞれ独立してメモリ1にアクセスできるようにするために、メモリ領域数を合わせる必要がある。
メモリ領域数 一次元モードのサイズ 二次元モードのサイズ
9 9×1 3×3
16 16×1 4×4
25 25×1 5×5
Although the number of memory areas in the present embodiment is four, the present invention is not limited to this. For example, as shown in the table below, the number of pixel data groups selected by any access mode MOD matches. By doing so, the memory area can be set variably. Specifically, the number of memory areas is k (k = n 2 , n ≧ 2), the size of the one-dimensional mode is k × 1, and the size of the two-dimensional mode is n × n. preferable. This is because pixel data interpolation processing at a desired pixel is often based on pixel data around this pixel. The two-dimensional mode is not limited to a square size such as n × n, but may be a rectangular shape (for example, 2 × 4, 2 × 6). However, in this case, it is necessary to match the number of memory areas in order to be able to access the
Number of memory areas One-dimensional mode size Two-dimensional mode size 9 9 × 1 3 × 3
16 16 × 1 4 × 4
25 25 × 1 5 × 5
なお、本実施形態の画素データDTに対するメモリ領域1a〜1dへのマッピングは、上述した変換式に基づいて対応付けられているが、本発明はこれに限定されるものではない。例えば、上述した変換式によるマッピングとは点対称に、オブジェクトの終点(右下)の画素から逆水平(左)方向(なお、左端の画素に至った場合、一画素分上の右端画素から水平(右)方向)に、順次対応付けてもよい。また、上述した変換式によるマッピングとは線対称に、オブジェクトの右上の画素から逆水平(左)方向(なお、左端の画素に至った場合、一画素分上の右端画素から、再度水平(右)方向)に、順次対応付けてもよい。 Note that the mapping of the pixel data DT of the present embodiment to the memory areas 1a to 1d is associated based on the conversion formula described above, but the present invention is not limited to this. For example, in contrast to the mapping based on the above-described conversion formula, the pixel from the end point (lower right) of the object is in the reverse horizontal (left) direction. (Right) direction) may be sequentially associated. Also, in line symmetry with the mapping by the above-described conversion formula, from the upper right pixel of the object to the reverse horizontal (left) direction (in the case of reaching the left end pixel, the right end pixel one pixel above is again horizontal (right ) Direction).
なお、本実施形態では、一次元モードによるマッピングによる書き込みが可能である。そのため、ROM(Read Only Memory)、または描画エンジンによって加工された画素データDTをメモリ領域1a〜1dに記憶する場合でも、二次元モードで読み出されることを前提とせずにメモリ領域に記憶できるので、画素データを高速にメモリ領域1a〜1dへの記憶ができる。 In the present embodiment, writing by mapping in the one-dimensional mode is possible. Therefore, even when the pixel data DT processed by the ROM (Read Only Memory) or the drawing engine is stored in the memory areas 1a to 1d, it can be stored in the memory area without assuming that it is read in the two-dimensional mode. Pixel data can be stored in the memory areas 1a to 1d at high speed.
さらに、本実施形態では、アクセス部3の内部に、書込回路3bと読出回路3cとが、別回路として設けられているが、これに限定されず、同一回路として設けられてもよい。なぜなら、書込回路3bおよび読出回路3cは、同数のバッファを有する点や、アドレス変換部による画素データの並び替えを行う点が、共通するからである。この場合、上述した効果に加えて、画像用メモリ回路の回路規模をより小さくすることができる。
Furthermore, in the present embodiment, the
1 メモリ
1a 第1のメモリ領域
1b 第2のメモリ領域
1c 第3のメモリ領域
1d 第4のメモリ領域
2 アドレス変換部
3 アクセス部
3a 制御回路
3b 書込回路
3c 読出回路
DESCRIPTION OF
Claims (8)
互いに独立してアクセス可能な複数のメモリ領域と、
画像平面上のある代表位置を起点に一次元状に並んだ画素データのそれぞれと、前記代表位置を起点に二次元状に並んだ画素データのそれぞれとが前記複数のメモリ領域のそれぞれに分散するように、画素データの集合である画像データをマッピングするアドレス変換部と、
前記アドレス変換部によってマッピングされた画素データを前記複数のメモリ領域に分散させるように書き込む書込回路と、
前記複数のメモリ領域へのアクセスモードとして、一次元モードと二次元モードとが用意されており、前記代表位置の指定を伴う一次元モードの選択時には、前記代表位置を起点に一次元状に並んだ画素データを前記複数のメモリ領域から並列に読み出し、前記代表位置を起点とする二次元モードの選択時には、前記代表位置を起点に二次元状に並んだ画素データを前記複数のメモリ領域から並列に読み出す読出回路と
を有することを特徴とする画像用メモリ回路。 In the image memory circuit,
A plurality of memory areas accessible independently of each other;
Each of the pixel data arranged one-dimensionally starting from a certain representative position on the image plane and each of the pixel data arranged two-dimensionally starting from the representative position are dispersed in each of the plurality of memory areas. As described above, an address conversion unit that maps image data that is a set of pixel data;
A writing circuit for writing pixel data mapped by the address conversion unit so as to be distributed in the plurality of memory areas;
As a mode for accessing the plurality of memory areas, a one-dimensional mode and a two-dimensional mode are prepared, and when selecting the one-dimensional mode accompanied by designation of the representative position, the representative positions are arranged in a one-dimensional manner Pixel data is read in parallel from the plurality of memory areas, and when selecting a two-dimensional mode starting from the representative position, the pixel data arranged two-dimensionally starting from the representative position is paralleled from the plurality of memory areas. An image memory circuit comprising:
前記アドレス変換部は、前記絶対アドレスと、前記相対アドレスと、前記オブジェクトのサイズである水平サイズとに基づいて、前記画素データをマッピングすることを特徴とする請求項1に記載された画像用メモリ回路。 The representative position is specified by an absolute address that is the position of the object as the image data starting from the origin of the image plane, and a relative address that is the position of a pixel starting from the origin of the object,
The image memory according to claim 1, wherein the address conversion unit maps the pixel data based on the absolute address, the relative address, and a horizontal size that is a size of the object. circuit.
前記アドレス変換部が前記画素データをマッピングすることで特定した前記複数のメモリ領域に対して、書き込み、または読み出しの指示を行う制御回路をさらに有し、
前記書込回路は、前記制御回路が指示した複数のメモリ領域に対して画素データを書き込み、
前記読出回路は、前記制御回路が指示した複数のメモリ領域に対して画素データを読み出すことを特徴とする請求項1から4のいずれかに記載された画像用メモリ回路。 The image memory circuit includes:
A control circuit for instructing writing or reading to the plurality of memory areas specified by mapping the pixel data by the address conversion unit;
The writing circuit writes pixel data to a plurality of memory areas instructed by the control circuit;
5. The image memory circuit according to claim 1, wherein the readout circuit reads out pixel data from a plurality of memory areas designated by the control circuit.
前記二次元状に並んだ画素データは、前記画像平面上の画素を起点としたn×nのサイズを有することを特徴とする請求項1から7のいずれかに記載された画像用メモリ回路。 The one-dimensionally arranged pixel data has a size of 1 × k (k = n 2 , n ≧ 2) starting from a pixel on the image plane,
8. The image memory circuit according to claim 1, wherein the two-dimensionally arranged pixel data has an n × n size starting from a pixel on the image plane. 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005319576A JP3906234B1 (en) | 2005-11-02 | 2005-11-02 | Image memory circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005319576A JP3906234B1 (en) | 2005-11-02 | 2005-11-02 | Image memory circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP3906234B1 JP3906234B1 (en) | 2007-04-18 |
JP2007128233A true JP2007128233A (en) | 2007-05-24 |
Family
ID=38036303
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005319576A Expired - Fee Related JP3906234B1 (en) | 2005-11-02 | 2005-11-02 | Image memory circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3906234B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8441884B2 (en) | 2008-03-27 | 2013-05-14 | Fujitsu Semiconductor Limited | Semiconductor memory device, image processing system, and image processing method |
WO2014105552A1 (en) * | 2012-12-27 | 2014-07-03 | Intel Corporation | Optimizing image memory access |
-
2005
- 2005-11-02 JP JP2005319576A patent/JP3906234B1/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8441884B2 (en) | 2008-03-27 | 2013-05-14 | Fujitsu Semiconductor Limited | Semiconductor memory device, image processing system, and image processing method |
WO2014105552A1 (en) * | 2012-12-27 | 2014-07-03 | Intel Corporation | Optimizing image memory access |
Also Published As
Publication number | Publication date |
---|---|
JP3906234B1 (en) | 2007-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101386767B1 (en) | Apparatus and method for displaying a warped version of a source image | |
KR100804898B1 (en) | Method and apparatus for efficient image rotation | |
JP3138173B2 (en) | Frame memory device for graphics | |
KR100817057B1 (en) | Mapping method and video system for mapping pixel data included same pixel data group to same bank address of memory | |
CN111630560B (en) | Method and system for correcting a distorted input image | |
US5585863A (en) | Memory organizing and addressing method for digital video images | |
JP3931577B2 (en) | Method of using memory and arithmetic processing device | |
US7096312B2 (en) | Data transfer device and method for multidimensional memory | |
KR100283413B1 (en) | Texture Mapping System | |
JP3906234B1 (en) | Image memory circuit | |
KR20170072646A (en) | Apparatus and Method for performing Fourier transform | |
JP5917907B2 (en) | Image processing device | |
JP5865696B2 (en) | Image processing device | |
KR100297716B1 (en) | Semiconductor memory device having high flexibility in column | |
US20120218279A1 (en) | Image processing apparatus and memory access method thereof | |
KR101154286B1 (en) | Memory controller for simultaneously multiple access | |
US20220377271A1 (en) | Image processing device, image processing method, and program | |
JP2647378B2 (en) | Image processing device | |
JPS6125192B2 (en) | ||
US9189987B2 (en) | Method for generating dither carry tables by conversion procedure | |
JP2005165678A (en) | Memory access method and memory access device | |
JP2008217515A (en) | Image data access method | |
JP2647379B2 (en) | Image processing device | |
JP2010198156A (en) | Image drawing device | |
JP5605225B2 (en) | MEMORY CONTROL DEVICE, MEMORY MAPPING METHOD, AND PROGRAM |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20061219 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070115 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3906234 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100119 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130119 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130119 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130119 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130119 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130119 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140119 Year of fee payment: 7 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |