JPWO2010041743A1 - MEMORY CONTROL DEVICE, MEMORY MAPPING METHOD, AND PROGRAM - Google Patents
MEMORY CONTROL DEVICE, MEMORY MAPPING METHOD, AND PROGRAM Download PDFInfo
- Publication number
- JPWO2010041743A1 JPWO2010041743A1 JP2010532972A JP2010532972A JPWO2010041743A1 JP WO2010041743 A1 JPWO2010041743 A1 JP WO2010041743A1 JP 2010532972 A JP2010532972 A JP 2010532972A JP 2010532972 A JP2010532972 A JP 2010532972A JP WO2010041743 A1 JPWO2010041743 A1 JP WO2010041743A1
- Authority
- JP
- Japan
- Prior art keywords
- data
- address
- memory
- rows
- array
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0207—Addressing or allocation; Relocation with multidimensional access, e.g. row/column, matrix
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/16—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter for a given display mode, e.g. for interlaced or progressive display mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
- H04N19/423—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
Abstract
メモリ制御装置は、メモリアレイにデータを書き込む際に、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行のデータを1つのアドレスに書き込み、奇数番号の行のデータを他の1つのアドレスに書き込むデータ書き込み部に配列された。When writing data to the memory array, the memory control device includes two-dimensional array data of Y rows and X columns (each of X and Y being an integer of 4 or more) including a plurality of rows of continuous data. The blocks are arranged in a data writing section for writing even-numbered row data of each block to one address and writing odd-numbered row data to another address.
Description
本発明は、メモリ制御装置、メモリマッピング方法、及び、プログラムに関し、更に詳しくは、1つのアドレスに複数のデータが記憶可能なメモリアレイに2次元配列データを格納するメモリ制御装置、メモリマッピング方法、及び、プログラムに関する。 The present invention relates to a memory control device, a memory mapping method, and a program, and more specifically, a memory control device that stores two-dimensional array data in a memory array capable of storing a plurality of data at one address, a memory mapping method, And related to the program.
メモリアクセスに際し、単位時間当たりの最大データアクセス量であるアクセス帯域を増やすための方策として、2つの方策が考えられる。1つは、メモリを駆動するクロック周波数を上げるというものである。もう1つは、データを使用する装置とメモリとの間のデータ接続の配線数、すなわち、データバス幅を広げて一度にアクセスするデータ量を増やすというものである。クロック周波数は、メモリが対応している周波数よりも上げることはできないため、周波数を限界まで上げた後は、メモリに一度にアクセスするデータ幅を広げるしかない。一方で、データバス幅を広げると、1つのアドレスに割り当てられるデータ量が多くなるため、所望のデータにアクセスする際に、それ以外の不必要なデータにも同時にアクセスすることになって、アクセス効率が低下するという弊害が生じる。 In memory access, there are two possible measures for increasing the access bandwidth, which is the maximum data access amount per unit time. One is to increase the clock frequency for driving the memory. The other is to increase the number of data connections between a device that uses data and the memory, that is, the amount of data to be accessed at a time by widening the data bus width. Since the clock frequency cannot be increased beyond the frequency supported by the memory, after the frequency is increased to the limit, the data width for accessing the memory at a time must be increased. On the other hand, if the data bus width is widened, the amount of data allocated to one address increases, so when accessing desired data, other unnecessary data is also accessed simultaneously. There is a negative effect that the efficiency decreases.
図5に、横方向に連続した2画素分のデータを1つのアドレスに格納する場合のマッピングの例を示す。この例では、画像サイズを、横1024×縦1024としている。アドレス0には、座標(0,0)、(1,0)の2つの画素のデータを格納し、アドレス1には、座標(2,0)、(3,0)の2つの画素の画像データを格納する。0ライン目の画素のデータ((0,0)〜(1023,0))は、アドレス0からアドレス511に格納され、1ライン目の画素のデータ((0,1)〜(1023,1))は、アドレス512からアドレス1023に格納される。 FIG. 5 shows an example of mapping when data for two pixels continuous in the horizontal direction is stored in one address. In this example, the image size is set to horizontal 1024 × vertical 1024. Address 0 stores data of two pixels at coordinates (0,0) and (1,0), and address 1 stores images of two pixels at coordinates (2,0) and (3,0). Store the data. The pixel data ((0, 0) to (1023, 0)) of the 0th line is stored from address 0 to address 511, and the pixel data ((0, 1) to (1023, 1) of the 1st line is stored. ) Are stored from address 512 to address 1023.
図5に示すマッピングで、横方向に連続した画素にアクセスする場合を考える。横方向に連続する画素にアクセスするとは、座標を(x,y)で表したときに、xが隣接する座標の画素に連続してアクセスすることである。具体的には、例えば、座標(0,0)から、座標(1,0)、(2,0)、(3,0)の順にアクセスすることである。画像データ処理部などの読み出し側の装置は、アドレス0、アドレス1、アドレス2、・・・の順にメモリにアクセスする。この場合、読み出し側の装置は、アドレス0にアクセスすることで座標(0,0)、(1,0)のデータを取得でき、アドレス1にアクセスすることで座標(2,0)、(3,0)のデータを取得できる。従って、横方向連続アクセスでは、不必要なデータへのアクセスは発生せず、アクセス効率は100%となる。
Consider the case of accessing pixels that are continuous in the horizontal direction in the mapping shown in FIG. Accessing pixels that are continuous in the horizontal direction means that, when coordinates are represented by (x, y), x continuously accesses pixels having adjacent coordinates. Specifically, for example, the coordinate (0, 0) is accessed in the order of coordinates (1, 0), (2, 0), (3, 0). A reading-side device such as an image data processing unit accesses the memory in the order of address 0,
図5に示すマッピングにて、縦方向に連続した画素にアクセスする場合を考える。縦方向に連続する画素にアクセスするとは、座標を(x,y)で表したときに、yが隣接する座標の画素に連続してアクセスすることである。具体的には、例えば、座標(0,0)から、座標(0,1)、(0,2)、(0,3)の順にアクセスすることである。縦方向に連続する画素にアクセスする場合には、読み出し側の装置は、アドレス0、アドレス512、・・・の順に、メモリにアクセスする。このとき、読み出し側の装置は、例えばアドレス0にて、座標(0,0)にアクセスする際に、不必要な座標(1,0)にもアクセスすることになる。1つのアドレスには、横方向に連続する2つの画素のデータが格納されているため、アクセスしたデータのうちの半分は不必要なデータとなり、アクセス効率は50%となる。 Consider the case of accessing pixels that are continuous in the vertical direction in the mapping shown in FIG. Accessing pixels that are continuous in the vertical direction means that, when coordinates are represented by (x, y), y continuously accesses pixels having adjacent coordinates. Specifically, for example, the coordinates (0, 0) are accessed in the order of coordinates (0, 1), (0, 2), (0, 3). When accessing pixels that are continuous in the vertical direction, the readout device accesses the memory in the order of address 0, address 512,. At this time, when the device on the reading side accesses the coordinate (0, 0) at the address 0, for example, the reading side device also accesses the unnecessary coordinate (1, 0). Since one pixel stores data of two pixels continuous in the horizontal direction, half of the accessed data is unnecessary data, and the access efficiency is 50%.
図6に、縦方向に連続した2画素分のデータを1つのアドレスに格納する場合のマッピングを示す。ここでも、画像サイズは、横1024×縦1024である。図6に示すマッピングにて、縦方向に連続した画素にアクセスすると、図5にて横方向に連続した画素にアクセスする場合と同様に、アクセス効率は100%になる。また、図6に示すマッピングにて、横方向に連続した画素にアクセスすると、図5にて縦方向に連続した画素にアクセスする場合と同様に、アクセス効率は50%となる。従って、横方向に連続したアクセスが多い場合は、図5に示すマッピングとし、縦方向に連続したアクセスが多い場合は、図6に示すマッピングとすることで、効率的なアクセスが可能となる。 FIG. 6 shows mapping when data for two pixels continuous in the vertical direction is stored in one address. Again, the image size is horizontal 1024 × vertical 1024. In the mapping shown in FIG. 6, when the pixels that are continuous in the vertical direction are accessed, the access efficiency is 100% as in the case of accessing the pixels that are continuous in the horizontal direction in FIG. Further, in the mapping shown in FIG. 6, when the pixels that are continuous in the horizontal direction are accessed, the access efficiency is 50% as in the case of accessing the pixels that are continuous in the vertical direction in FIG. Therefore, when there are many continuous accesses in the horizontal direction, the mapping shown in FIG. 5 is used. When there are many continuous accesses in the vertical direction, the mapping shown in FIG.
ここで、画像の描画ソフトウェアの変更なしに、上下反転や90°回転した画像を得ることができる画像メモリ制御装置が特許文献1に記載されている。特許文献1の画像メモリ制御装置は、アドレスバスと画像メモリとの間にアドレス変換装置に配列された。アドレス変換装置は、行アドレス、列アドレスについての演算を行う。アドレス変換装置が、行アドレスと列アドレスの演算を適宜行い、行アドレスと列アドレスとの交換を組み合わせることで、アドレスバスから入力するアドレスを変更することなく、上下の反転や、90°回転した画像を得ることができる。
2次元配列に対するアクセスでは、横方向連続及び縦方向連続だけでなく、縦方向に1行おきにアクセスする場合もある。縦方向に1行おきにアクセスするデータ処理の典型例は、動画像のデコード処理である。画素のデータへのアクセスに際して、縦方向に1行おきにアクセスする場合は、図6のメモリマッピングでも、1アドレスに格納された2画素分のデータのうちの1画素分しか有効なデータにアクセスできないため、アクセス効率が50%になる。特許文献1に記載のアドレス変換部は、反転画像を得るためのアドレス変換をするのみであるため、特許文献1では、縦方向に1行おきのアクセスの際のアクセス効率を向上させることは不可能である。
In the access to the two-dimensional array, there are cases where every other row is accessed in the vertical direction as well as continuous in the horizontal direction and continuous in the vertical direction. A typical example of data processing for accessing every other row in the vertical direction is moving image decoding processing. When accessing every other row in the vertical direction when accessing pixel data, the memory mapping of FIG. 6 also accesses data that is valid for only one pixel of the data for two pixels stored in one address. Since this is not possible, the access efficiency is 50%. Since the address conversion unit described in
本発明は、1つのアドレスに複数のデータが格納可能なメモリに対して、縦方向に1行おきに連続したアクセスの際にも、効率のよいメモリアクセスが実現可能なメモリ制御装置、メモリマッピング方法(データ格納方法)、及び、プログラムを提供することを目的とする。 The present invention relates to a memory control device and a memory mapping capable of realizing efficient memory access even when a memory capable of storing a plurality of data at one address is accessed every other row in the vertical direction. It is an object to provide a method (data storage method) and a program.
本発明は、メモリアレイにデータを格納するメモリ制御装置であって、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行のデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込むデータ書き込み部を備えるメモリ制御装置を提供する。 The present invention is a memory control device for storing data in a memory array, wherein two-dimensional array data of Y rows and X columns (each of X and Y being an integer of 4 or more) is converted into a plurality of consecutive rows. A memory control device comprising a data writing unit that divides data into a plurality of blocks including data, writes data of even-numbered rows of each block to one address, and writes data of odd-numbered rows of each block to another address I will provide a.
本発明は、また、メモリアレイにデータを格納する方法であって、コンピュータが、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行に配列されたデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込む、メモリマッピング方法を提供する。 The present invention is also a method for storing data in a memory array, in which a computer continues two-dimensional array data of Y rows and X columns (each of X and Y being an integer of 4 or more). A memory that divides a plurality of blocks including data of a plurality of rows, writes data arranged in even-numbered rows of each block to one address, and writes data of odd-numbered rows of each block to another one address Provide a mapping method.
本発明は、更に、コンピュータ読み込み可能な記録媒体に格納されたプログラムであって、メモリアレイにデータを格納するコンピュータに、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行のデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込む処理を実行させるプログラムを提供する。 The present invention further relates to a program stored in a computer-readable recording medium, wherein a computer storing data in a memory array has Y rows and X columns (each of X and Y being an integer of 4 or more). The two-dimensional array data is divided into a plurality of blocks each including a plurality of consecutive rows of data, the even-numbered row data of each block is written to one address, and the odd-numbered row data of each block is written to the other A program for executing a process of writing to one address is provided.
本発明のメモリ制御装置、データ格納方法(メモリマッピング方法)、及び、プログラムは、縦方向に1行おきに連続したアクセスの際にも、効率のよいアクセスを実現できる。 The memory control device, data storage method (memory mapping method), and program of the present invention can achieve efficient access even when accessing every other row in the vertical direction.
本発明の上記、及び、他の目的、特徴及び利益は、図面を参照する以下の説明により明らかになる。 The above and other objects, features, and advantages of the present invention will become apparent from the following description with reference to the drawings.
本発明のメモリ制御装置は、メモリアレイにデータを格納するメモリ制御装置であって、その最小構成として、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行のデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込むデータ書き込み部を備える。 The memory control device of the present invention is a memory control device that stores data in a memory array, and has a minimum configuration of two-dimensional array data of Y rows and X columns (where X and Y are integers of 4 or more). Are divided into a plurality of blocks each including a plurality of consecutive rows of data, the even-numbered row data of each block is written to one address, and the odd-numbered row data of each block is written to another one address. A data writing unit for writing is provided.
本発明のデータ格納方法は、メモリアレイにデータを格納する方法であって、その最小構成として、コンピュータが、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行に配列されたデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込むステップに配列された。 The data storage method of the present invention is a method for storing data in a memory array, and as a minimum configuration, the computer has a two-dimensional array of Y rows and X columns (each of X and Y being an integer of 4 or more). The data is divided into a plurality of blocks each including continuous rows of data, the data arranged in the even-numbered rows of each block is written to one address, and the odd-numbered rows of each block are written to the other Arranged in steps to write to one address.
本発明のプログラムは、コンピュータ読み込み可能な記録媒体に格納されたプログラムであって、その最小構成として、メモリアレイにデータを格納するコンピュータに、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行のデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込む処理を実行させる。 The program of the present invention is a program stored in a computer-readable recording medium. As a minimum configuration thereof, a computer storing data in a memory array has Y rows and X columns (each of X and Y is 4 The above integer) two-dimensional array data is divided into a plurality of blocks each including a plurality of consecutive rows of data, and the even-numbered row data of each block is written to one address, and the odd-numbered rows of each block The process of writing the data at another address is executed.
上記本発明の最小構成のメモリ制御装置、データ格納方法(メモリマッピング方法)、及び、プログラムは、メモリアドレスへの複数のアクセス方法に対応可能であり、例えば縦方向に1行おきに連続したメモリアドレスへのアクセスの際にも、効率のよいアクセスを実現できる。 The above-described memory controller, data storage method (memory mapping method), and program according to the present invention are compatible with a plurality of access methods to memory addresses, for example, memory that is continuous every other row in the vertical direction. Efficient access can also be realized when accessing addresses.
以下、図面を参照し、本発明の例示的な実施形態を詳細に説明する。図1は、本発明の一実施形態のデータ記憶装置100を、画像データに対して演算処理を実行する画像データ処理部104と共に示している。データ記憶装置100は、データ書き込み部101及びデータ読み出し部102を含むメモリ制御装置107と、メモリアレイ(以下、単にメモリと呼ぶ)103とに配列された。データ記憶装置100のメモリ制御装置107は、画像データ処理部104の指示を受けてメモリ103へのデータ格納、及び、メモリ103からの読出し処理を行う。メモリ103は、1つのアドレスに、複数の画素のデータを格納できる。ここでは、メモリ103は、nを2以上の正の整数として、2n−1個の画素のデータを格納できるとする。データ書き込み部101、データ読み出し部102、及び、画像データ処理部104は、コンピュータ上で所定のプログラムを実行することで実現可能である。或いは、これらは、ハードウェアで構成されていてもよい。Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a
画像データ処理部104は、データ記憶装置100に画像データを格納し、或いは、データ記憶装置100から画像データを読み出す。画像データ処理部104は、データ格納に際しては、データ書き込み部101に、各画素の画像データを出力する。画像データ処理部104は、データ読み出しに際しては、データ読み出し部102に、読み出したい画像データの座標を渡し、データ読み出し部102から、指定した座標の画像データを受け取る。画像データ処理部104が行うデータ読み出しは、画像の横方向の連続読み出しと、縦方向の連続読み出しと、縦方向1行おきの連続読み出しとを含む。
The image
データ書き込み部101は、画像データ処理部104から画像データを入力し、メモリ103へ画像データを格納する。画像データのサイズは、X画素×Yライン(X及びYのそれぞれは、4以上の整数)とする。つまり、画像データは、Y行X列の2次元配列データである。画像データの各要素(配列要素)は、(i,j)(0≦i≦X−1、0≦j≦Y−1)で表す。データ書き込み部101は、画像データの縦方向を、連続する複数の行ごとに、複数のブロックに分割する。1ブロックの行数は、メモリ103が1つのアドレスに格納できるデータの個数の2倍とする。メモリ103が1つのアドレスに2n−1個のデータを格納可能なときは、画像データを、連続する2nラインごとのブロックに分割する。The
データ書き込み部101は、上記のように分割した各ブロックの画像データについて書き込みを行う際に、各ブロックの行番号(j)が偶数の画像データを1つのアドレスに書き込み、各ブロックの行番号(j)が奇数のデータを他の1つのアドレスに書き込む。つまり、データ書き込み部101は、kをjの下位nビットで構成される整数(0〜2n−1)として、各ブロックのkが偶数の配列要素のデータを1つのメモリアドレスに格納し、各ブロックのkが奇数の配列要素のデータを他の1つのメモリアドレスに格納する。When writing the image data of each block divided as described above, the
図2に、メモリ103における各画素のデータのマッピングを示す。図2では、説明簡略化のため、n=2とする。つまり、メモリ103は、1つのアドレスに、2つの画素データを格納できるものとする。データ書き込み部101は、画像データを、0行目から順に、22=4ラインごとのブロックに分割する。データ書き込み部101は、各グループについて、画素データの縦方向の座標jの下位2ビットをk(0〜3)とし、kが偶数(0又は2)の画像データをメモリ103の同じアドレスに格納し、kが奇数(1又は3)のデータをメモリ103の同じアドレスに格納する。FIG. 2 shows mapping of data of each pixel in the
配列要素(0,0)のデータを格納する先頭のメモリアドレスAdr0をアドレス0とする。データ書き込み部101は、アドレス0に、kが偶数のラインの画素データである座標(0,0)と座標(0,2)の画素データを格納する。データ書き込み部101は、アドレス1024に、kが奇数のラインの画素データである座標(0,1)と座標(0,3)の画素データを格納する。各列でのデータ格納の仕方は、0列目と同様である。すなわち、データ書き込み部101は、アドレス1には座標(1,0)と座標(1,2)の画素データを格納し、アドレス1025には座標(1,1)と座標(1,3)の画素データを格納する。
The leading memory address Adr0 for storing the data of the array element (0, 0) is assumed to be address 0. The
配列要素(i,j)と、その配列要素を格納するアドレスAdrとの関係を一般化すると、以下のようになる。
Adr=Adr0+int(j/2n)×2X+i (kが偶数のとき)
Adr=Adr0+int(j/2n)×2X+X+i (kが奇数のとき)
ここで、int()は、括弧内の数値を整数化する関数である。なお、kはjの下位nビットで構成される整数であるので、kが偶数であることは、jが偶数であることと等価である。データ書き込み部101は、上記式で求まるアドレスAdrに、配列要素(i,j)のデータを格納する。同一アドレス内に格納する2n−1個の画素データの並び順は、jの値が小さい順であるとする。データ書き込み部101は、上記演算を行うことにより、2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの配列要素を、行番号が偶数の配列要素を1つのアドレスに書き込み、行番号が奇数の配列要素を他の1つのアドレスに書き込むことが出来る。Generalizing the relationship between the array element (i, j) and the address Adr for storing the array element is as follows.
Adr = Adr0 + int (j / 2 n ) × 2X + i (when k is an even number)
Adr = Adr0 + int (j / 2 n ) × 2X + X + i (when k is an odd number)
Here, int () is a function that converts the numerical value in parentheses into an integer. Since k is an integer composed of lower n bits of j, an even number of k is equivalent to an even number of j. The
データ読み出し部102は、画像データ処理部104から、読み出したい画像データの座標を受け取る。画像データ処理部104は、例えば、座標(0,0)から横方向に連続して8画素分の画像データを読み出す際には、座標(0,0)、(1,0)、・・・、(7,0)を順次にデータ読み出し部102に出力する。或いは、画像データ処理部104は、開始点の座標が(0,0)で、読み出しのモードが横方向連続、読み出しのサイズが8画素分のデータであるという指定をデータ読み出し部102に対して与えてもよい。データ読み出し部102は、指定された座標のデータをメモリ103から読み出し、画像データ処理部104に出力する。
The
データ読み出し部102は、アドレス変換部105とデータ取得部106とに配列された。アドレス変換部105は、読み出すべき画像データの座標を、メモリ103のアドレスに変換する。データ取得部106は、メモリ103から、アドレス変換部105が生成したアドレスのデータを取得する。アドレス変換部105におけるアドレス変換は、データ書き込み部101におけるアドレス生成と同様である。すなわち、アドレス変換部105は、読み出すべき画像データの座標(i,j)から、下記式により、座標(i,j)の画像データを格納するメモリ103のアドレスAdrを計算する。
Adr=Adr0+int(j/2n)×2X+i (jが偶数のとき)
Adr=Adr0+int(j/2n)×2X+X+i (jが奇数のとき)The
Adr = Adr0 + int (j / 2 n ) × 2X + i (when j is an even number)
Adr = Adr0 + int (j / 2 n ) × 2X + X + i (when j is an odd number)
図3に、データ格納時の動作手順を示す。データ書き込み部101は、画像データ処理部104から、例えば1024×1024ラインの画像データを受け取る(ステップS1)。データ書き込み部101は、1024ラインの画像データを、連続する2nラインずつのブロックに分割する(ステップS2)。データ書き込み部101は、例えば、n=2のときは、1024ラインを、256のブロックに分割する。データ書き込み部101は、各ブロックを偶数行と奇数行とに分け、偶数行を同じアドレスに、奇数行を同じアドレスに格納する(ステップS3)。FIG. 3 shows an operation procedure when storing data. The
図4に、データ読み出し時の動作手順を示す。画像データ処理部104は、読み出すべき画素の座標を、データ読み出し部102に出力する(ステップS11)。アドレス変換部105は、座標を、アドレスに変換する(ステップS12)。データ取得部106は、アドレス変換部105にて生成されたアドレスにアクセスし、データを取得する(ステップS13)。データ取得部106は、取得したデータを、画像データ処理部104に渡す(ステップS14)。
FIG. 4 shows an operation procedure at the time of data reading. The image
画像データ処理部104が横方向に連続した画素に一度にアクセスする際の動作について説明する。画像データ処理部104は、座標(0,0)から横方向に連続した8画素にアクセスするものとする。画像データ処理部104は、データ読み出し部102に、座標(0,0)、(1,0)、・・・、(7,0)を順次に出力する。或いは、画像データ処理部104は、読み出しの開始座標(0,0)と、横方向連続である旨と、8画素分のデータとを、データ読み出し部102に渡してもよい。
The operation when the image
メモリ103は、座標(0,0)、(1,0)、・・・、(7,0)のデータを、アドレス0、1、・・・、7に格納している。アドレス変換部105は、座標(0,0)、(1,0)、・・・、(7,0)に対応するアドレス0、1、・・・、7を、順次にデータ取得部106に渡す。データ取得部106は、メモリ103にアクセスして、アドレス変換部105から受け取ったアドレスのデータを取得し、取得したデータを画像データ処理部104に出力する。
The
アドレス0、1、・・・、7には、0行目のデータに加えて、2行目のデータも格納されている。つまり、画像データ処理部104は、8画素分のデータを取得する際に、16画素分のデータにアクセスする。従って、画像データ処理部104が横方向に連続してメモリ103にアクセスする際のアクセス効率は、50%となる。
次に、画像データ処理部104が縦方向に連続した画素に一度にアクセスする際の動作について説明する。画像データ処理部104は、座標(0,0)から縦方向に連続した8画素にアクセスするものとする。画像データ処理部104は、データ読み出し部102に座標(0,0)、(0,1)、・・・、(0,7)を順次に出力する。アドレス変換部105は、座標(0,0)、(0,1)、・・・、(0,7)の画素のデータを格納するアドレス0、1024、2048、3072を、データ取得部106に順次に出力する。データ取得部106は、メモリ103にアクセスして、アドレス変換部105から受け取ったアドレスのデータを取得し、取得したデータを画像データ処理部104に出力する。
Next, an operation when the image
上記の例では、データ読み出し部102は、要求されたデータ数が8画素分で、メモリ103の8画素分のデータにアクセスするので、メモリアクセス効率は100%になる。このケースは、無駄なデータにはアクセスしない例であるが、最大では、4画素分の無駄なアクセスが生じる。例えば、座標(0,2)から縦方向連続に4画素分のデータを読み出すことを考える。この場合、アドレス0へのアクセスで座標(0,2)と共に取得した座標(0,0)のデータ、アドレス1024へのアクセスで座標(0,3)のデータと共に取得した座標(0,1)のデータ、アドレス2048へのアクセスで座標(0,4)のデータと共に取得した座標(0,6)のデータ、及び、アドレス3072へのアクセスで座標(0,5)のデータと共に取得した座標(0,7)のデータが無駄になる。
In the above example, the
上記のケースは、最悪の例であり、メモリアクセス効率は50%になる。しかし、無駄にアクセスする量は、全部で何行分アクセスする場合でも最大4つであるため、縦方向に多くの行にアクセスするほど、メモリアクセス効率は50%から高くなっていく。 The above case is the worst example, and the memory access efficiency is 50%. However, since the number of wasted accesses is a maximum of four regardless of how many rows are accessed in total, the memory access efficiency increases from 50% as the number of rows is accessed in the vertical direction.
続いて、縦方向に1行おきに連続した画素に一度にアクセスする際の動作について説明する。縦方向に1行おきに連続した画素にアクセスするとは、Y方向の座標を+2ずつ増加しながらアクセスすることである。画像データ処理部104は、座標(0,0)から、縦方向の1行おきに連続した8画素にアクセスするものとする。すなわち、画像データ処理部104は、座標(0,0)、(0,2)、(0,4)、(0,6)、(0,8)、(0,10)、(0,12)、(0,14)の画素に一度にアクセスする。アドレス変換部105は、座標(0,0)、(0,2)、・・・、(0,14)のデータを格納するアドレス0、2048、4096、6144を、データ取得部106に順次に出力する。データ取得部106は、メモリ103にアクセスして、アドレス変換部105から受け取ったアドレスのデータを取得し、取得したデータを画像データ処理部104に出力する。
Next, an operation when accessing pixels consecutive in every other row in the vertical direction at once will be described. Accessing pixels that are continuous every other line in the vertical direction means accessing while increasing the coordinates in the Y direction by +2. It is assumed that the image
上記の例は、無駄なデータにはアクセスしない、つまり、メモリアクセス効率は100%の例であるが、最悪のケースでは、最大2行分の無駄なアクセスが生じる。例えば、座標(0,2)から縦方向に1行おきに連続した4画素にアクセスする場合には、アドレス0、2048、4096にアクセスする必要があり、(0,0)、(0,10)の2行分のデータが無駄になる。無駄にアクセスする量は、全部で何行分アクセスする場合でも最大で2行であるため、縦方向に多くの行をアクセスするほど、メモリアクセス効率は高くなる。 In the above example, useless data is not accessed, that is, the memory access efficiency is 100%, but in the worst case, useless access for up to two rows occurs. For example, when accessing four consecutive pixels in the vertical direction from the coordinate (0, 2), it is necessary to access addresses 0, 2048, and 4096, and (0, 0), (0, 10 ) Of two rows of data is wasted. Since the number of wasted accesses is a maximum of two lines regardless of how many lines are accessed in total, the more the lines are accessed in the vertical direction, the higher the memory access efficiency.
本実施形態では、メモリ103は、1つのアドレスに複数のデータを格納可能であり、データ書き込み部101は、メモリ103に対し、Y行X列の2次元配列データを格納する際に、2次元配列データを連続する複数行ごとにブロックに分け、各ブロックについて、行番号が偶数の配列要素のデータを同じメモリアドレスに格納し、行番号が奇数の配列要素のデータを同じメモリアドレスに格納する。このようなメモリ格納(メモリマッピング)を行うことで、Y方向に1行おきに2次元配列データにアクセスする際のメモリアクセス効率を向上させることができる。
In the present embodiment, the
横方向に連続する複数のデータを同じアドレスに格納する場合、横方向に連続するデータにアクセスする際のメモリアクセス効率は最大100%にできるものの、縦方向に連続するデータにアクセスする際のメモリアクセス効率は50%に落ちる。これに対し、縦方向に連続する複数のデータを同じアドレスに格納すると、縦方向に連続するデータにアクセスする際のメモリアクセス効率を100%にできる。しかし、縦方向に連続するデータを同じアドレスに格納する場合でも、縦方向に1行おきに連続してアクセスするときのメモリアクセス効率は、50%に落ちる。 When storing a plurality of continuous data in the horizontal direction at the same address, the memory access efficiency when accessing the continuous data in the horizontal direction can be up to 100%, but the memory for accessing the continuous data in the vertical direction Access efficiency drops to 50%. On the other hand, if a plurality of pieces of data that are continuous in the vertical direction are stored at the same address, the memory access efficiency when accessing the data that is continuous in the vertical direction can be made 100%. However, even when data that is continuous in the vertical direction is stored at the same address, the memory access efficiency when continuously accessing every other row in the vertical direction drops to 50%.
画像処理では、動画像のデコード処理など、縦方向に1行おきに連続するデータにアクセスする状況が存在する。本実施形態では、縦方向に1行おきに連続するデータを同じアドレスに格納するので、縦方向に1行おきに連続するアクセスの際のメモリアクセス効率を、最大100%に向上できる。また、縦方向に連続するデータにアクセスする際のメモリアクセス効率についても、最大で100%にすることができる。つまり、本実施形態では、縦方向に連続してアクセスする際のメモリアクセス効率、及び、縦方向に1行おきに連続してアクセスする際の双方のメモリアクセス効率を向上することができる。特に、画像データは、縦方向への連続アクセスが多いので、本実施形態におけるメモリマッピングを採用することが有利である。上記2次元配列データは、例えば、横方向の画素数がXで、縦方向のライン数がYの画像データである。 In the image processing, there is a situation in which continuous data every other row in the vertical direction is accessed, such as a moving image decoding process. In the present embodiment, data that is continuous every other row in the vertical direction is stored at the same address, so that the memory access efficiency at the time of continuous access every other row in the vertical direction can be improved up to 100%. Also, the memory access efficiency when accessing data that is continuous in the vertical direction can be made 100% at the maximum. That is, in this embodiment, it is possible to improve the memory access efficiency when continuously accessing in the vertical direction and the memory access efficiency when continuously accessing every other row in the vertical direction. In particular, since the image data has many continuous accesses in the vertical direction, it is advantageous to employ the memory mapping in this embodiment. The two-dimensional array data is, for example, image data in which the number of pixels in the horizontal direction is X and the number of lines in the vertical direction is Y.
なお、上記実施形態では、2次元配列データを画像データとする例について説明したが、格納すべき2次元配列データは、画像データには限定されない。縦方向に連続、及び、縦方向1行おきに連続する配列要素へのアクセスの際のメモリアクセス効率を向上できるという効果は、画像データ以外のデータであっても、同様に得ることができる。 In the above embodiment, the example in which the two-dimensional array data is image data has been described. However, the two-dimensional array data to be stored is not limited to image data. The effect of improving the memory access efficiency when accessing array elements that are continuous in the vertical direction and every other row in the vertical direction can be similarly obtained even for data other than image data.
本発明を特別に示し且つ例示的な実施形態を参照して説明したが、本発明は、その実施形態及びその変形に限定されるものではない。当業者に明らかなように、本発明は、添付の請求の範囲に規定される本発明の精神及び範囲を逸脱することなく、種々の変更が可能である。 Although the invention has been particularly shown and described with reference to illustrative embodiments, the invention is not limited to these embodiments and variations thereof. It will be apparent to those skilled in the art that various modifications can be made to the present invention without departing from the spirit and scope of the invention as defined in the appended claims.
本出願は、2008年10月10日出願に係る日本特許出願2008−263765号を基礎とし且つその優先権を主張するものであり、引用によってその開示の内容の全てを本出願の明細書中に加入する。 This application is based on and claims the priority of Japanese Patent Application No. 2008-263765 filed on Oct. 10, 2008, the entire contents of which are incorporated herein by reference. join.
Claims (8)
Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行のデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込むデータ書き込み部を備えるメモリ制御装置。A memory control device for storing data in a memory array,
The two-dimensional array data of Y rows and X columns (each of X and Y are integers of 4 or more) is divided into a plurality of blocks each including a plurality of consecutive rows of data, and data of even-numbered rows of each block A memory control device including a data writing unit that writes data to one address and writes data in odd-numbered rows of each block to another address.
前記データ書き込み部は、前記2次元配列データを、連続する2n行ごとのブロックに分け、各データを配列要素(i,j)(0≦i≦X−1、0≦j≦Y−1)で表し、且つ、kをjの下位nビットで構成される整数として、各ブロックのkが偶数の配列要素を前記1つのアドレスに書き込み、各ブロックのkが奇数の配列要素を前記他の1つのアドレスに書き込む、請求項1に記載のメモリ制御装置。The memory array can store 2 n-1 data (n is an integer of 2 or more) at one address,
The data writing unit divides the two-dimensional array data into blocks of every 2 n rows, and each data is array element (i, j) (0 ≦ i ≦ X−1, 0 ≦ j ≦ Y−1). ) And k is an integer composed of the lower n bits of j, and an array element with an even k in each block is written to the one address, and an array element with an odd k in each block is written to the other The memory control device according to claim 1, wherein data is written to one address.
Adr=Adr0+int(j/2n)×2X+i (kが偶数のとき)
Adr=Adr0+int(j/2n)×2X+X+i (kが奇数のとき)
で求まるアドレスAdrに格納する、請求項2に記載のメモリ制御装置。The data writing unit uses each of the array elements (i, j) as a function for converting the numerical value in parentheses into an integer by using Adr0 as the head memory address for storing the array element (0, 0).
Adr = Adr0 + int (j / 2 n ) × 2X + i (when k is an even number)
Adr = Adr0 + int (j / 2 n ) × 2X + X + i (when k is an odd number)
The memory control device according to claim 2, wherein the memory control device is stored at an address Adr determined by:
コンピュータが、Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行に配列されたデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込む、メモリマッピング方法。A method of storing data in a memory array,
The computer divides the two-dimensional array data of Y rows and X columns (each of X and Y being an integer of 4 or more) into a plurality of blocks each including a plurality of consecutive rows of data, and the even number of each block A memory mapping method in which data arranged in a row is written to one address, and data in an odd-numbered row of each block is written to another address.
Adr=Adr0+int(j/2n)×2X+i (kが偶数のとき)
Adr=Adr0+int(j/2n)×2X+X+i (kが奇数のとき)
で求まるアドレスAdrに格納する、請求項6に記載のメモリマッピング方法。Assuming that the first memory address for storing the array element (0, 0) is Adr0 and int is a function that converts the numerical value in parentheses into an integer, the computer converts each array element (i, j) to
Adr = Adr0 + int (j / 2 n ) × 2X + i (when k is an even number)
Adr = Adr0 + int (j / 2 n ) × 2X + X + i (when k is an odd number)
The memory mapping method according to claim 6, wherein the memory mapping method is stored at an address Adr determined by:
Y行及びX列(X及びYのそれぞれは、4以上の整数)の2次元配列データを、それぞれが連続する複数行のデータを含む複数のブロックに分け、各ブロックの偶数番号の行のデータを1つのアドレスに書き込み、各ブロックの奇数番号の行のデータを他の1つのアドレスに書き込む処理を実行させるプログラム。A program stored in a computer-readable recording medium, which stores data in a memory array,
The two-dimensional array data of Y rows and X columns (each of X and Y are integers of 4 or more) is divided into a plurality of blocks each including a plurality of consecutive rows of data, and data of even-numbered rows of each block Is written to one address, and a program is executed to write data of odd-numbered rows of each block to another address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010532972A JP5605225B2 (en) | 2008-10-10 | 2009-10-09 | MEMORY CONTROL DEVICE, MEMORY MAPPING METHOD, AND PROGRAM |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008263765 | 2008-10-10 | ||
JP2008263765 | 2008-10-10 | ||
JP2010532972A JP5605225B2 (en) | 2008-10-10 | 2009-10-09 | MEMORY CONTROL DEVICE, MEMORY MAPPING METHOD, AND PROGRAM |
PCT/JP2009/067649 WO2010041743A1 (en) | 2008-10-10 | 2009-10-09 | Memory control device, memory mapping method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2010041743A1 true JPWO2010041743A1 (en) | 2012-03-08 |
JP5605225B2 JP5605225B2 (en) | 2014-10-15 |
Family
ID=42100689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010532972A Expired - Fee Related JP5605225B2 (en) | 2008-10-10 | 2009-10-09 | MEMORY CONTROL DEVICE, MEMORY MAPPING METHOD, AND PROGRAM |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5605225B2 (en) |
WO (1) | WO2010041743A1 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3686155B2 (en) * | 1996-03-21 | 2005-08-24 | 株式会社ルネサステクノロジ | Image decoding device |
KR20060123632A (en) * | 2004-04-15 | 2006-12-01 | 마쯔시다덴기산교 가부시키가이샤 | Burst memory access method to rectangular area |
CN101416167B (en) * | 2006-07-20 | 2012-07-25 | 日本电气株式会社 | Memory access control device, memory access control method, data storage method, and memory access control program |
JP4712642B2 (en) * | 2006-08-17 | 2011-06-29 | 富士通セミコンダクター株式会社 | Deblocking filter, image encoding device, and image decoding device |
-
2009
- 2009-10-09 JP JP2010532972A patent/JP5605225B2/en not_active Expired - Fee Related
- 2009-10-09 WO PCT/JP2009/067649 patent/WO2010041743A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2010041743A1 (en) | 2010-04-15 |
JP5605225B2 (en) | 2014-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2446413B1 (en) | Apparatus and method for displaying a warped version of a source image | |
JP5126360B2 (en) | Memory device and memory controller for controlling the same | |
CN107748723B (en) | Storage method and access device supporting conflict-free stepping block-by-block access | |
US7554874B2 (en) | Method and apparatus for mapping memory | |
KR20080020066A (en) | Mapping method and video system for mapping pixel data included same pixel data group to same bank address of memory | |
JP2011053671A (en) | Semiconductor integrated circuit | |
JP2014238769A (en) | Data processing apparatus and data transfer controller | |
JP2010081024A (en) | Device for interpolating image | |
US20080044107A1 (en) | Storage device for storing image data and method of storing image data | |
US20130057770A1 (en) | Data processing apparatus, data processing method and data sharing system | |
US20050088539A1 (en) | Image processing apparatus and image processing method | |
EP2453360B1 (en) | Method and apparatus for translating memory access address | |
JP5605225B2 (en) | MEMORY CONTROL DEVICE, MEMORY MAPPING METHOD, AND PROGRAM | |
JP5865696B2 (en) | Image processing device | |
JP2013132002A (en) | Image processing apparatus | |
JP5327482B2 (en) | Image processing apparatus and image processing method | |
US8416252B2 (en) | Image processing apparatus and memory access method thereof | |
KR20160067577A (en) | An image processor, a method of operating the image processor, and an application processor including the image processor | |
US9013948B2 (en) | Memory architecture for display device and control method thereof | |
JP7242273B2 (en) | Image processing device and image processing method | |
KR101586844B1 (en) | Image processing apparatus and method | |
JP2008027077A (en) | Memory management device, image processor, and image forming device | |
TWI616867B (en) | Apparatus and method for video frame rotation | |
CN117710188A (en) | Method, equipment and integrated circuit for realizing hardware circuit for image processing | |
TW201610910A (en) | System for accessing image data and accessing method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120907 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130716 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130917 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140311 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140611 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20140619 |
|
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: 20140729 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140811 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5605225 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |