WO2012120674A1 - メモリアクセス装置 - Google Patents

メモリアクセス装置 Download PDF

Info

Publication number
WO2012120674A1
WO2012120674A1 PCT/JP2011/055605 JP2011055605W WO2012120674A1 WO 2012120674 A1 WO2012120674 A1 WO 2012120674A1 JP 2011055605 W JP2011055605 W JP 2011055605W WO 2012120674 A1 WO2012120674 A1 WO 2012120674A1
Authority
WO
WIPO (PCT)
Prior art keywords
cell
pixel
address
pixels
memory
Prior art date
Application number
PCT/JP2011/055605
Other languages
English (en)
French (fr)
Inventor
山田 恭裕
律彦 永井
Original Assignee
Nttエレクトロニクス株式会社
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 Nttエレクトロニクス株式会社 filed Critical Nttエレクトロニクス株式会社
Priority to CA2819354A priority Critical patent/CA2819354C/en
Priority to JP2013503298A priority patent/JP5614490B2/ja
Priority to PCT/JP2011/055605 priority patent/WO2012120674A1/ja
Priority to EP11860333.1A priority patent/EP2685422B1/en
Priority to CN201180068837.4A priority patent/CN103403757B/zh
Priority to US13/992,996 priority patent/US9430992B2/en
Publication of WO2012120674A1 publication Critical patent/WO2012120674A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/39Control of the bit-mapped memory
    • G09G5/393Arrangements for updating the contents of the bit-mapped memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods 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/423Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/523Motion estimation or motion compensation with sub-pixel accuracy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus

Definitions

  • the present invention relates to a memory access device that can increase the memory use efficiency and the access efficiency even when the number of bits per pixel is not a power of two.
  • a memory access device is provided in the image processing device.
  • the memory access apparatus reads data from an SDRAM (Synchronous Dynamic Random Access Memory) in which an image frame is stored.
  • SDRAM Serial Dynamic Random Access Memory
  • a rectangular area is generally accessed. The rectangular area is set by the start point coordinates and the end point coordinates, or by the start point coordinates and the size (number of pixels) in the horizontal and vertical directions of the rectangular area.
  • a conventional method of accessing the SDRAM by the memory access device will be described below.
  • image processing of 8 bits / pixel has been mainstream.
  • the number of pixels per burst access is 32 pixels according to the following calculation.
  • a rectangular area accessed in one burst is defined as a cell.
  • the cell is a rectangular area having 32 pixels.
  • 240 cells horizontally and 270 cells vertically are arranged in a 1920 ⁇ 1080 pixel image frame of a general HD (High Definition) image.
  • FIG. 23 is a diagram showing a pixel address and a cell address in an HD image in the background art in the case of 8 bits / pixel.
  • FIG. 24 is a diagram showing pixel addresses in each cell in the background art in the case of 8 bits / pixel.
  • x and y of Pix (x, y) are expressed in binary notation and expressed in the order of LSB (Least Significant Bit) to MSB (Most Significant Bit), it is as follows.
  • x (X0, X1,..., X10)
  • y (Y0, Y1,..., Y10)
  • x and y of Cell (x, y) are expressed as follows.
  • x (XC0, XC1,..., XC7)
  • y (YC0, YC1,..., YC8)
  • x and y of PixC (x, y) are expressed as follows.
  • x (XP0, XP1, XP2)
  • y (YP0, YP1)
  • x and y of Pix (x, y) are expressed using Cell (x, y) and PixC (x, y), they are as follows.
  • x and y of Pix (15, 9) are expressed in binary notation and expressed in the order of LSB to MSB as follows.
  • x (1,1,1,1,0,0,0,0,0,0)
  • y (1,0,0,1,0,0,0,0,0,0)
  • (XP0, XP1, XP2) (1,1,1)
  • (XCO, XC1,..., XC7) (1, 0, 0, 0, 0, 0, 0)
  • YP0, YP1) (1, 0)
  • YC0, YC1,..., YC8) (0, 1, 0, 0, 0, 0, 0, 0) Therefore
  • Cell (x, y) and PixC (x, y) are as follows.
  • Cell (x, y) Cell (1, 2)
  • PixC (x, y) PixC (7,1)
  • the number of horizontal pixels and the number of vertical pixels in one cell is a power of 2
  • the upper bits (from MSB in order) of the pixel address Pix (x, y) are extracted.
  • the SDRAM cell address Cell (x, y) can be obtained with only some bits. Therefore, SDRAM access control can be easily performed.
  • CA (CA0, CA1,..., CA9)
  • RA (RA0, RA1,..., RA12)
  • BA (BA0, BA1, BA2)
  • FIG. 25 is a diagram showing allocation of SDRAM addresses to cell addresses in the background art in the case of 8 bits / pixel.
  • a 2-bit bank address is assigned to the lower 2 bits of the XC address of the cell, and a 1-bit bank address is assigned to the lower 1 bit of the YC address of the cell.
  • the cell in the continuous burst access of the rectangular area, the cell is first continuously burst-accessed in the horizontal direction, and then the cell position is changed in the vertical direction to continuously access the cells. If continuous burst access of cells is first performed in the vertical direction, a 1-bit bank address is assigned to the LSB of XC, and a 2-bit bank address is assigned to the lower 2 bits of YC.
  • x and y of Pix (x, y) are expressed using an in-cell pixel address, a Bank address, a Column address, and a Row address, the following is obtained.
  • burst access is 8 words / burst and two 16-bit / word SDRAMs are used
  • the number of horizontal pixels and the number of vertical pixels in one cell can be raised to a power of 2 (horizontal 4 pixels ⁇ vertical 4 pixels).
  • an image frame of a general HD image is composed of 4 ⁇ 4 pixel cells, 480 cells are arranged horizontally and 270 cells are arranged vertically.
  • FIG. 26 is a diagram showing a pixel address and a cell address in an HD image in the background art in the case of 10 bits / pixel.
  • FIG. 27 is a diagram showing pixel addresses in each cell in the background art in the case of 10 bits / pixel.
  • x and y of Pix (x, y) are expressed using a cell address Cell (x, y) and an in-cell pixel address PixC (x, y), the following is obtained.
  • x and y of Pix (15, 9) are expressed in binary notation and expressed in the order of LSB to MSB as follows.
  • x (1,1,1,1,0,0,0,0,0,0)
  • y (1,0,0,1,0,0,0,0,0,0)
  • (XP0, XP1) (1,1)
  • (XCO, XC1,..., XC8) (1,1,0,0,0,0,0,0,0)
  • YP0, YP1) (1, 0)
  • YC0, YC1,..., YC8) (0, 1, 0, 0, 0, 0, 0, 0) Therefore
  • Cell (x, y) and PixC (x, y) are as follows.
  • Cell (x, y) Cell (3, 2)
  • PixC (x, y) PixC (3,1)
  • FIG. 28 is a diagram showing allocation of SDRAM addresses to cell addresses in the background art in the case of 10 bits / pixel.
  • continuous burst access can be performed by assigning a cell address to a Bank address, a Column address, and a Row address. That is, x and y of Pix (x, y) are expressed as follows using an in-cell pixel address, a Bank address, a Column address, and a Row address.
  • the present invention has been made to solve the above-described problems, and its purpose is to provide memory access that can increase the memory use efficiency and the access efficiency even when the number of bits per pixel is not a power of two. Get the device.
  • the memory access device obtains the number of pixels per one burst access by rounding down and dividing the number of bits obtained by one burst access to the memory storing the image frame by the number of bits per pixel.
  • a memory access device that arranges a rectangular area having a number of pixels equal to or less than a number as a cell in the image frame, accesses the memory using the cell, and reads data of a part of the block of the image frame.
  • a first lookup table that outputs a result of dividing the horizontal component of the pixel address of the block by the number of pixels of the horizontal component of the cell; and the vertical component of the pixel address of the block is the number of pixels of the vertical component of the cell
  • a second look-up table for outputting the result of division by the horizontal component of the pixel address of the block
  • a third look-up table that outputs a remainder when dividing by the number of pixels of the horizontal component of the cell, and a remainder when the vertical component of the pixel address of the block is divided by the number of pixels of the vertical component of the cell
  • a fourth look-up table wherein the output value of the first look-up table and the output value of the second look-up table are addresses of the cells for burst access to the memory,
  • the output value of the third look-up table and the output value of the fourth look-up table are used as pixel addresses in the cell.
  • the memory use efficiency and the access efficiency can be increased.
  • FIG. 1 is a diagram illustrating a memory access device according to an embodiment of the present invention. It is a figure for demonstrating the read operation
  • Lookup table (first lookup table) 12 Lookup table (second lookup table) 14 Look-up table (third look-up table) 16 Lookup table (fourth lookup table)
  • the maximum access is performed to image data accessed in one burst regardless of the number of pixels in a power of 2 cells.
  • the number of pixels per burst access is 25 pixels.
  • This rectangular area having 25 pixels is defined as a cell.
  • An example of a 25 pixel cell is a 5 ⁇ 5 pixel (horizontal 5 ⁇ vertical 5 pixel) cell.
  • 384 cells are arranged horizontally and 216 cells are arranged vertically. The memory access device uses this cell to access the SDRAM and read data.
  • FIG. 1 is a diagram showing pixel addresses and cell addresses in an HD image according to an embodiment of the present invention.
  • FIG. 2 is a diagram showing pixel addresses in each cell in the embodiment of the present invention.
  • x and y of Cell (x, y) are calculated by the following equations.
  • “/” means division and rounding down.
  • the result obtained by dividing by 5 is a numerical value obtained by rounding down.
  • x 9 bits
  • y 8 bits.
  • X and y of the Cell are expressed in binary notation as follows.
  • x and y of PixC (x, y) are expressed as follows.
  • Modulo means the remainder of the division result. In this embodiment, the remainder is obtained by dividing by 5. Since the remainder divided by 5 is 0 to 4, it is represented by 3 bits.
  • x and y of the pixel address Pix (x, y) are expressed as follows using the cell address and the pixel address in the cell.
  • FIG. 3 is a diagram showing allocation of SDRAM addresses to cell addresses in the embodiment of the present invention. As shown in FIG. 3, continuous burst access can be performed by assigning (XD0, XD1,..., XD8) and (YD0, YD1,..., YD7) to the Bank address, Column address, and Row address.
  • FIG. 4 is a diagram illustrating a memory access device according to an embodiment of the present invention.
  • This memory access device has lookup tables 10, 12, 14, 16 and an address arrangement conversion circuit 18.
  • the memory access device is provided in the image processing device.
  • the image processing apparatus performs image processing on a part of the blocks of the image frame
  • the memory access apparatus reads the block data from the SDRAM using the above access method.
  • a cell address for one burst access is obtained from the look-up tables 10 and 12, and the SDRAM is burst accessed.
  • the SDRAM burst access memory temporarily stores one burst access corresponding to one SDRAM cell and transfers it to an adjacent cell memory.
  • the pixel address in the cell subjected to burst access is obtained by the look-up tables 14 and 16, the pixel address for image processing is specified by the cell address and the pixel address in the cell, and the pixel data of the target block area is read from the cell memory by the image processing apparatus. Forward to.
  • the look-up table 10 outputs a result (XD0 to XD8) obtained by dividing the horizontal component (X0 to X10) of the pixel address of the block by the number of pixels (5) of the horizontal component of the cell.
  • the look-up table 12 outputs a result (YD0 to YD7) obtained by dividing the vertical component (Y0 to Y10) of the pixel address of the block by the number of pixels (5) of the vertical component of the cell.
  • the address arrangement conversion circuit 18 assigns the output values of the lookup tables 10 and 12 to the Bank address, the Column address, and the Row address.
  • the lookup table 14 outputs a remainder (XM0 to XM2) obtained by dividing the horizontal component (X0 to X10) of the pixel address of the block by the number of pixels (5) of the horizontal component of the cell.
  • the lookup table 16 outputs a remainder (YM0 to YM2) obtained by dividing the vertical component (Y0 to Y10) of the pixel address of the block by the number of pixels (5) of the vertical component of the cell.
  • the output values of the lookup tables 14 and 16 are set as pixel addresses in the cell.
  • the memory access device accesses the SDRAM by using the output values of the lookup tables 10 and 12 as cell addresses and assigning the cell addresses to the SDRAM burst access addresses by the address arrangement conversion circuit 18. Further, by using the output values of the lookup tables 14 and 16 as the pixel address in the cell that has been burst-accessed, the pixel in the cell is accessed.
  • FIG. 5 is a diagram for explaining a read operation from the SDRAM by the memory access device according to the embodiment of the present invention.
  • a rectangular area of an 8 ⁇ 8 pixel block is accessed. If the upper left pixel coordinate of the rectangular area is Pix (x, y), the lower right pixel coordinate is Pix (x + 7, y + 7). Accordingly, pixels in a region having Pix (x, y) as the upper left start point coordinate and Pix (x + 7, y + 7) as the lower right end point coordinate are read from the SDRAM.
  • the cell address of the start point coordinates Pix (x, y) is Cell (x / 5, y / 5), and the in-cell pixel address is PixC (Modulo (x, 5), Modulo (y, 5)).
  • the cell address of the end point coordinate Pix (x + 7, y + 7) is Cell ((x + 7) / 5, (y + 7) / 5), and the pixel address in the cell is PixC (Modulo (x + 7, 5), Modulo (y + 7), 5)).
  • the block to be accessed (8 ⁇ 8 pixel rectangular area) has an in-cell pixel address PixC (Modulo (x, 5), where the start point coordinate Pix (x, y) is the cell address Cell (x / 5, y / 5). Modulo (y, 5)) and the end point coordinates of the cell address Cell ((x + 7) / 5, (y + 7) / 5) are the in-cell pixel addresses PixC (Modulo (x + 7, 5), Modulo (y + 7, 5)). It becomes an area. SDRAM burst access is performed in the range from Cell (x / 5, y / 5) to Cell ((x + 7) / 5, (y + 7) / 5).
  • the pixel area to be actually accessed is from PixC (Modulo (x, 5), Modulo (y, 5)) to Cell ((x + 7) / 5, (y + 7) / 5 of Cell (x / 5, y / 5). ) PixC (Modulo (x + 7, 5), Modulo (y + 7, 5)).
  • the cell address is obtained from the look-up tables 10 and 12
  • the in-cell pixel address is obtained from the look-up tables 14 and 16. That is, the memory access device obtains a cell address corresponding to the start point coordinate and a cell address corresponding to the end point coordinate in the division lookup tables 10 and 12, and sequentially accesses each cell from the start point cell to the end point cell.
  • FIG. 6 is a diagram illustrating an example of a block to be accessed.
  • the start point cell address is (5, 10) and the end point cell address is (7, 11).
  • the cells are accessed in the order of (5, 10), (6, 10), (7, 10), (5, 11), (6, 11), (7, 11).
  • each cell is accessed in the order of (5, 10), (5, 11), (6, 10), (6, 11), (7, 10), (7, 11).
  • In-cell pixel data (pixel data corresponding to 25 pixels subjected to burst access) of the cell address Cell (x, y) subjected to burst access passes through the SDRAM burst access memory storing image data for one burst access. Transferred to memory. Thereafter, by combining with the in-cell pixel address PixC (x, y) in the cell memory, the pixel of the pixel address Pix (x, y) for performing image processing is specified. The pixel data at the pixel address Pix (x, y) is transferred to the block memory of the data processing unit.
  • FIG. 7 is a diagram showing an example of a rectangular area composed of a plurality of cells read-accessed from the SDRAM.
  • the rectangular area is 4 ⁇ 3 cells.
  • An area necessary for processing by the image processing apparatus is cut out from the image data of the rectangular area and used.
  • the image data of the rectangular area is temporarily stored in cell units once in a cell memory provided in the memory access device.
  • the number of cells in the x direction and the number of cells in the y direction which are known by calculating the cell addresses of the start point and the end point, are stored in the order of the accessed cells.
  • cell numbers arranged in the order of access and pixel addresses in each cell are used for accessing the cell memory.
  • Cell numbers (0, 0) to (2, 3) in FIG. 7 are not cell addresses calculated from pixel addresses, but are addresses given for convenience in the cell memory.
  • This cell memory is generally a larger area than the required rectangular area (the area indicated by the broken line in FIG. 7) from the start point coordinates to the end point coordinates.
  • the storage in the cell memory can be sequentially performed in units of cells, and the reading can be performed with a normal binary address.
  • Such a cell memory can be realized by a known technique such as generating a memory address by a counter or an adder at the time of storage if the shape of the cell is determined.
  • the cell (0, 0) in FIG. 7 includes the coordinates of the start point that was first read-accessed from the SDRAM. This is because the in-cell pixel address (0, 0) is stored at the address (0, 0) of the cell memory.
  • an area of a predetermined size (XS, YS) is read from the image data (4 ⁇ 3 cells) stored in the cell memory.
  • XS and YS can be calculated from the start point coordinates and end point coordinates of the image.
  • Such reading of the predetermined rectangular area can be realized by a known technique such as setting the calculated XS and YS values in a register.
  • the block memory in the image processing apparatus is a memory for performing image processing on pixel data of a predetermined block transferred from the memory access apparatus.
  • 8 ⁇ 8 pixel data is stored.
  • the cell address Cell (x, y) and the in-cell pixel address PixC (x, y) can be obtained from the pixel address Pix (x, y). Therefore, it is possible to easily determine which cell should be accessed when reading the block data from the memory. Note that the Write operation is a different operation and will be described later.
  • the cell has 5 ⁇ 5 pixels
  • a division table of 5 and a modulo calculation table of 5 are used, but the numerical value may be changed depending on the scale of the memory.
  • 12 pixels may be 3 ⁇ 4 pixels
  • 3 division tables, 3 modulo operation tables, 4 division tables, and 4 modulo operation tables may be used.
  • bit arrangement conversion may be performed as in the background art. Specifically, y / 4 is obtained by shifting y by 2 bits, and Modulo (y, 4) may be obtained by extracting the lower 2 bits of y.
  • the area may be 5 ⁇ 4 (efficiency is 78%) or 6 ⁇ 4 (efficiency is 94%) instead of 5 ⁇ 5.
  • how to set 256 bits of cell access to pixel data, and by setting the cell shape according to the convenience of the image processing device, it is possible to make optimal settings including other conditions for application purposes. is there.
  • 8 and 9 are diagrams for explaining an access method when image processing is performed on a block.
  • solid lines represent cells and broken lines represent blocks.
  • the start point (upper left pixel address Pix (xa, ya)), end point (lower right pixel address Pix (xb, yb)), horizontal pixel number m and vertical pixel number n are used.
  • the cell address of the start point is Cell (xa / m, ya / n)
  • the cell address of the end point is Cell (xb / m, yb / n)
  • cells corresponding to this range (cells represented by bold frames in the figure) Burst access to the SDRAM address.
  • the block start point Pix (xa, ya), the block horizontal pixel count XS, the vertical pixel count YS, the cell horizontal pixel count m, and the vertical pixel count n uses the block start point Pix (xa, ya), the block horizontal pixel count XS, the vertical pixel count YS, the cell horizontal pixel count m, and the vertical pixel count n.
  • the cell address of the start point is Cell (xa / m, ya / n)
  • the cell address of the end point is Cell (xa + XS-1) / m, (ya + YS-1) / n)
  • Burst access is made to the SDRAM address of the cell indicated by the thick frame.
  • FIG. 10 is a diagram showing a modification of the memory access device according to the embodiment of the present invention.
  • This device is provided with switching control between integer coordinates and non-integer coordinates. If the pixels in the horizontal direction or the vertical direction have non-integer pixel accuracy, interpolation processing corresponding to the predetermined number of pixels in the direction of non-integer pixel accuracy is performed on the rectangular area represented by the start point coordinates and end point coordinates of the block. Do. For example, in the case of 1/2 pixel accuracy or 1/4 pixel accuracy used for MPEG image encoding, the decimal point portions of the start point coordinates (xas, yas) and end point coordinates (xbs, ybs) of a block including a decimal part are rounded down.
  • start point coordinates (xa, ya) and end point coordinates (xb, yb) of the block area access including the periphery of the non-integer coordinates is performed by interpolation processing using 3 pixels in each of the peripheral directions. Therefore, it is sufficient to perform burst access to the SDRAM address of the cell corresponding to the range of the start point coordinates (xa-2, ya-2) and the end point coordinates (xb + 3, yb + 3).
  • FIG. 11 is a diagram showing an image processing apparatus with integer pixel accuracy.
  • FIG. 12 is a diagram illustrating an image processing apparatus including an interpolation processing apparatus with non-integer pixel accuracy.
  • the image data is transferred as it is from the memory access device to the block memory of the image processing device.
  • the image data is interpolated by the interpolation processing device and then transferred to the block memory of the image processing device.
  • FIG. 13 is a diagram for explaining image access with non-integer pixel accuracy.
  • a 13 ⁇ 13 rectangular area including 3 pixels each in the horizontal and horizontal directions around the non-integer position and the vertical direction is accessed.
  • the rectangular area is interpolated to generate an 8 ⁇ 8 block image accessed with non-integer pixel precision.
  • this block image is subjected to block image processing.
  • interpolation processing is generally performed using the principle of a FIR (Finite Impulse Response) filter.
  • Interpolation processing is also defined in the MPEG image coding international standard. In the MPEG-2 video coding standard, non-integer pixel accuracy is 1 ⁇ 2 pixel accuracy, and interpolation processing is linear interpolation processing (a simple FIR filter called Bilinear interpolation) using one pixel on the left, right, and upper and lower sides. It has been established.
  • the luminance is a combination of a 6-TAP (referred to as a sixth-order filter in FIR processing) FIR filter using 2-pixels on the left and right and top and bottom and 2-TAP linear interpolation processing.
  • a 6-TAP referred to as a sixth-order filter in FIR processing
  • the apparatus of FIG. 14 performs interpolation processing of a 1/2 pixel position by a common 6-TAP FIR filter in the horizontal direction and the vertical direction.
  • the apparatus in FIG. 15 performs an interpolation process for a 1 ⁇ 4 pixel position by 2-TAP linear interpolation.
  • FIG. 11 In FIG. 11, FIG. 12, FIG. 14 and FIG. 15, only one-dimensional horizontal direction or only vertical direction is described in order to avoid complicated description. Actually, two-dimensional processing is necessary. When both the horizontal direction and the vertical direction are non-integer pixel address values, interpolation processing is performed in both the horizontal direction and the vertical direction.
  • FIG. 16 is a diagram for explaining the interpolation processing of the apparatus of FIG. When calculating the upper left pixel (black circle in FIG. 16) of 8 ⁇ 8 pixels, a total of 36 pixels (black squares in FIG. 16) of 13 ⁇ 13 pixels in the horizontal direction and 6 pixels in the vertical direction are used. .
  • a pixel Pix (n + 0.25) at a 0.25 pixel fractional position is calculated. Pixels necessary at this time are Pix (n) and Pix (n + 1).
  • pixel coordinates xa, ya, xb, and yb are integers or non-integers determines the necessity of three pixels in each peripheral direction, and determines the area of pixel data to be accessed. For example, if the target pixel block is an 8 ⁇ 8 integer pixel block, xb is an integer if xa is an integer, and xb is a non-integer having the same decimal part as xa if xa is a non-integer.
  • ya is an integer
  • yb is an integer
  • ya is a non-integer
  • yb is a non-integer having the same decimal part as ya.
  • xa, xb, ya, yb are values of 0 or more and are not negative numbers.
  • the peripheral three pixels are not accessed.
  • the peripheral three pixels are not accessed.
  • the start point Pix (xa, ya) to the end point Pix (xb, yb) when the pixel value of the non-integer coordinate is obtained by 6-TAPFIR interpolation processing, it is necessary when both the x coordinate and the y coordinate are non-integer.
  • the region is from the start point Pix (xa-2, ya-2) to the end point Pix (xb + 3, yb + 3).
  • xa is a non-integer and ya is an integer
  • x is accessed for three pixels on the left and right and 13 pixels are accessed.
  • the upper and lower peripheral three pixels are not accessed, but the eight pixels are accessed. That is, when the non-integer pixel is only the x coordinate, the starting point coordinate of the area to be accessed is (xa-2, ya) and the end point coordinate is (xb + 3, yb), thereby minimizing the number of cells to be accessed. be able to.
  • the number of cells to be accessed can be minimized by setting the start point coordinate of the area to be accessed as (xa, ya-2) and the end point coordinate as (xb, yb + 3). can do.
  • switching control between the integer coordinate and the non-integer coordinate may be provided in each lookup table in the x direction and the y direction.
  • the apparatus shown in FIG. 10 has such switching control.
  • the memory access device obtains a cell address corresponding to the start point coordinate and a cell address corresponding to the end point coordinate in the division lookup table, and sequentially accesses each cell from the start point cell to the end point cell.
  • FIG. 17 is a diagram illustrating an example where x and y are non-integer coordinates.
  • the cell size is 5 ⁇ 5 pixels
  • the block size is 8 ⁇ 8
  • the start point coordinates are (27.5, 52.5)
  • the end point coordinates are (34.5, 59.5).
  • the start cell address is (5, 10) and the end cell address is (7, 12), (5, 10), (6, 10), (7, 10), (5, 11), ( (6,11), (7,11), (5,12), (6,12), (7,12), a total of nine cells are accessed. Access at this time is (5, 10), (6, 10), (7, 10), (5, 11), (6, 11), (7, 11), (5, 12), (6 , 12), (7, 12), or (5, 10), (5, 11), (5, 12), (6, 10), (6, 11), (6, 12). , (7, 10), (7, 11), (7, 12).
  • the modulo calculation lookup tables 14 and 16 correspond to the cell addresses corrected in accordance with the non-integer coordinates corresponding to these values, and the modulo calculation is performed on the cells including the correction start point pixel and the correction end point pixel. I do.
  • (0, 0) is output as the result of the modulo operation for the integer part (25, 50) of the correction start point coordinate, and (2, 2) as the result of the modulo operation for the correction end point coordinate integer part (37, 62). ) Is output.
  • 00 is used when the fractional part of the non-integer coordinate is 0
  • 01 is applied when the value is 0.25
  • 10 is applied when the value is 0.5
  • 11 is applied when the value is 0.75.
  • the correction device performs pixel access from the cell and interpolation processing according to these values.
  • FIG. 18 is a diagram illustrating an example where x is a non-integer coordinate and y is an integer coordinate.
  • the cell size is 5 ⁇ 5 pixels, the start point coordinates are (27.5, 52), and the end point coordinates are (34.5, 59).
  • the division look-up tables 10 and 12 of 5 have the start points set to (25, 50) by the non-integer control signal in response to the input of the start point coordinate integer part (27, 52) and the end point coordinate integer part (34, 59).
  • (5, 10) of the division result for () is output
  • (7, 11) of the division result for (37, 59) is output as the end point. Since the start cell address is (5, 10) and the end cell address is (7, 11), (5, 10), (6, 10), (7, 10), (5, 11), (6, 11) Access a total of six cells (7, 11).
  • the number of cell accesses is reduced from nine cell accesses to six cell accesses.
  • FIG. 19 is a diagram illustrating an example in which x and y are integer coordinates.
  • the start point is (27, 52) and the end point is (34, 59).
  • the start point cell address is (5, 10)
  • the end point cell address is (6, 11)
  • (5, 10) Only one cell access is required.
  • interpolation processing is performed on the surrounding three pixels. This is an interpolation process when the H.264 luminance component is a non-integer pixel. Necessary when the pixel value of non-integer coordinates is obtained by 2-TAP FIR interpolation processing in the image access from the start point Pix (xa, ya) to the end point Pix (xb, yb), when both x and y coordinates are non-integer The region is from the start point Pix (xa, ya) to the end point Pix (xb + 1, yb + 1).
  • interpolation processing may be performed with one peripheral pixel.
  • interpolation processing may be performed with one peripheral pixel.
  • the periphery of the non-integer coordinates is included by interpolation processing using one pixel in each of the surrounding directions for the rectangular area represented by the start point coordinates (xa, ya) and end point coordinates (xb, yb) of the block. Perform area access. Accordingly, it is sufficient to perform burst access to the SDRAM address of the cell corresponding to the range of the start point coordinates (xa, ya) and the end point coordinates (xb + 1, yb + 1).
  • the cell size is 5 ⁇ 5 pixels
  • the block size is 8 ⁇ 8
  • the pixel start point coordinates are (27.5, 52.5)
  • the end point coordinates are (34. 5, 59.5)
  • the modulo calculation lookup tables 14 and 16 correspond to the cell addresses corrected in accordance with the non-integer coordinates corresponding to these values, and the modulo calculation is performed on the cells including the correction start point pixel and the correction end point pixel. I do.
  • (2, 2) is output as the result of the modulo operation on the corrected start point coordinate integer part (27, 52), and (0, 0) is output as the result of the modulo operation on the corrected end point coordinate integer part (35, 60). Is output.
  • the number of non-integer pixels When the number of non-integer pixels is only xa, the number of cells to be accessed can be minimized if the start point coordinates of the area to be accessed are (xa, ya) and the end point coordinates are (xb + 1, yb). If the only non-integer pixel is ya, the starting point coordinates of the area to be accessed are (xa, ya) and the end point coordinates are (xb, yb + 1). The number of cells to be accessed can be minimized. Also. For correction of the start point coordinate and end point coordinate and modulo calculation in the case of non-integer pixel coordinates, switching control between integer coordinates and non-integer coordinates may be provided in each lookup table in the x direction and y direction. As described above, the interpolation processing to the peripheral pixels may be performed on the predetermined pixels.
  • the SDRAM Read (transfer of SDRAM image data to the image processing apparatus) operation in the image processing has been described.
  • a write operation transfer of image data processed by the image processing apparatus to the SDRAM
  • the image memory sets the upper left pixel coordinates as (0, 0), and the lower right pixel coordinates become the maximum pixel coordinates.
  • a frame means one image, and its size is 1920 ⁇ 1080.
  • FIG. 20 is a diagram showing an HD image. This image is handled as 240 ⁇ 135 8 ⁇ 8 blocks.
  • the size is assumed to be 1920 ⁇ 1088 for convenience, and 120 ⁇ 68 blocks of 16 ⁇ 16 blocks are arranged, and image display is performed by cutting out 1920 ⁇ 1080.
  • the pixel coordinates are expressed by integer values.
  • FIG. 21 is a diagram for explaining a case where the write operation to the SDRAM is performed as the reverse operation of the read operation.
  • the image processing is performed from the upper left block to the lower right block. Therefore, when the processed image block is written to the SDRAM, if it is performed as the reverse operation of the Read operation, the write operation is performed even for pixels (outside pixels of the block) that do not belong to the processing target block, as shown in FIG.
  • the pixel of the 5 ⁇ 5 cell (2) in FIG. 21 is written to the SDRAM, the shaded pixel in the cell does not belong to the 8 ⁇ 8 block on which image processing is performed.
  • the operation of rewriting pixels that do not belong to a block is image data different from the processing content if the image data has already been processed. Further, if the image data is to be processed from now on, it will be rewritten to unintended image data.
  • Method (1) is a write operation in an area larger than the block size in the write operation, and the write access efficiency decreases.
  • the method (2) a large internal memory of 40 ⁇ 40 is required, but the efficiency of the write operation is high.
  • the block to be written is an 8 ⁇ 8 rectangular area, but the write operation is 5 ⁇ .
  • the rectangular area of the five cells is a rectangular area consisting of a plurality. For this reason, generally, an area larger than the area to be written is written, and unintended data is written up to an area that should not be written.
  • a write operation to an unintended area reduces the efficiency of the write operation.
  • a condition is set that the blocks to be written are aligned. For example, it is set that the blocks to be written are arranged in order from the upper left side.
  • the cell size is 5 ⁇ 5 pixels and the block size is 8 ⁇ 8
  • the 40 ⁇ 40 pixel area is collectively written using the least common multiple 40 of 5 and 8. Thereby, 5 ⁇ 5 blocks coincide with 8 ⁇ 8 cells, and unintended writing of pixel data can be avoided.
  • FIG. 22 is a diagram showing an apparatus according to the method (2).
  • the pixel address from the image processing apparatus is the start point coordinate Pix (xa, ya) and the end point coordinate Pix (xb, yb) in the above-described Read operation, but in this method, the start point coordinate is always an integer value that is a multiple of 8. Yes, the end point coordinate is always a value obtained by adding 39 to the start point coordinate. For example, if the start point coordinate is Pix (40, 80), the end point coordinate is Pix (79, 119).
  • the 40 ⁇ 40 image memory of FIG. 22 can be realized by using the cell memory of FIG. That is, the write operation can be performed by setting the size of the cell memory to a 40 ⁇ 40 image (8 ⁇ 8 cell) memory and changing the data transfer direction from the read operation.
  • the memory to which the memory access device performs burst access is SDRAM, but it is not limited to SDRAM and may be other memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Input (AREA)
  • Transforming Electric Information Into Light Information (AREA)

Abstract

 ルックアップテーブル10は、ブロックの画素アドレスの水平成分をセルの水平成分の画素数で除算した結果を出力する。ルックアップテーブル12は、ブロックの画素アドレスの垂直成分をセルの垂直成分の画素数で除算した結果を出力する。ルックアップテーブル14は、ブロックの画素アドレスの水平成分をセルの水平成分の画素数で除算した際の剰余を出力する。ルックアップテーブル16は、ブロックの画素アドレスの垂直成分をセルの垂直成分の画素数で除算した際の剰余を出力する。ルックアップテーブル10,12の出力値を、メモリにバーストアクセスするためのセルのアドレスとして用いる。ルックアップテーブル14,16の出力値を、セル内の画素アドレスとして用いる。

Description

メモリアクセス装置
 本発明は、1画素あたりのbit数が2のべき乗でない場合でもメモリの使用効率とアクセス効率を上げることができるメモリアクセス装置に関する。
 画像処理装置内にメモリアクセス装置が設けられている。画像処理装置が画像処理する際に、メモリアクセス装置は、画像フレームが格納されたSDRAM(Synchronous Dynamic Random Access Memory)からデータを読み出す。画像処理装置においてSDRAMの画像データにアクセスする場合、一般的には矩形領域にアクセスする。矩形領域は、始点座標と終点座標によって設定されるか、又は、始点座標と矩形領域の水平方向と垂直方向のサイズ(画素数)によって設定される。
 メモリアクセス装置によるSDRAMへの従来のアクセス方法について以下に説明する。従来は8bit/画素の画像処理が主流であった。この画像処理時に、SDRAMへのバーストアクセスが8word/バーストであって、16bit/wordのSDRAMを2個用いる場合、1バーストアクセスあたりの画素数は、下記の計算により32画素である。
16bit/word×8word/バースト×2個=256bit/バースト
256bit/バースト÷8bit/画素=32画素/バースト
この1バーストでアクセスする矩形領域をセルとする。ここではセルは32画素を持つ矩形領域である。32画素のセルの一例として、8×4画素(水平8画素×垂直4画素)のセルがある。
 8×4画素のセルを用いた場合、一般的なHD(High Definition)画像の1920×l080画素の画像フレーム内に、水平に240個、垂直に270個のセルが配置される。
 HD画像の画素アドレスをPix(x,y)とした場合、xは0~1919、yは0~1079の範囲となり、それぞれ11bitで表わすことができる。また、HD画像に配置されたセルのアドレスをCell(x,y)とした場合、xは0~239、yは0~269の範囲となり、xは8bit、yは9bitで表わすことができる。図23は、8bit/画素の場合の背景技術におけるHD画像内の画素アドレスとセルアドレスを示す図である。
 各セル内の画素のアドレスPixC(x,y)は、x=0~7、y=0~3となり、xは3bit、yは2bitで表わすことができる。図24は、8bit/画素の場合の背景技術における各セル内の画素アドレスを示す図である。
 Pix(x,y)のx,yを2進法表記し、LSB(Least Significant Bit)からMSB(Most Significant Bit)の順に表わすと以下のようになる。
x=(X0,X1,…,X10)
y=(Y0,Y1,…,Y10)
Cell(x,y)のx,yを同様に表わすと以下のようになる。
x=(XC0,XC1,…,XC7)
y=(YC0,YC1,…,YC8)
PixC(x,y)のx,yを同様に表わすと以下のようになる。
x=(XP0,XP1,XP2)
y=(YP0,YP1)
 Pix(x,y)のx,yをCell(x,y)とPixC(x,y)を用いて表わすと以下のようになる。
x=(X0,X1,…,X10)
 =(XP0,XP1,XP2,XC0,XC1,…,XC7)
y=(Y0,Y1,…,Y10)
 =(YP0,YP1,YC0,YC1,…,YC8)
 例えば、Pix(15,9)のx,yを2進法表記し、LSBからMSBの順に表わすと以下のようになる。
x=(1,1,1,1,0,0,0,0,0,0,0)
y=(1,0,0,1,0,0,0,0,0,0,0)
これを上記の数式に当てはめると以下のようになる。
(XP0,XP1,XP2)=(1,1,1)
(XCO,XC1,…,XC7)=(1,0,0,0,0,0,0,0)
(YP0,YP1)=(1,0)
(YC0,YC1,…,YC8)=(0,1,0,0,0,0,0,0,0)
よって、Cell(x,y)とPixC(x,y)は以下のようになる。
Cell(x,y)=Cell(1,2)
PixC(x,y)=PixC(7,1)
 このように1セル内の水平画素数と垂直画素数が2のべき乗個であるため、8bit/画素の画像処理の場合は、画素アドレスPix(x,y)の上位bit(MSBから順に取り出した一部のbit)のみでSDRAMのセルアドレスCell(x,y)を得ることができる。従って、SDRAMのアクセス制御を簡単に行うことができる。
 ところで、隣り合うセルのBankアドレスが同じ場合、連続バーストアクセス中にRowアドレスの変化があると、一旦アクセスを停止してRowアドレスを切替えなければならない。このため、連続バーストアクセスができず、Rowアドレス切替に追加の時間が必要となる。一方、隣り合うセルのBankアドレスが異なる場合、1つのBankのセルにアクセスするのと並行して次のBankのRowアドレスのセットアップを行うことができるため、連続バーストアクセスが可能である。従って、SDRAMで矩形領域を連続バーストアクセスするには、水平方向と垂直方向の両方向とも隣り合うセルを異なるBankにすることが必要である。
 16bit幅、1GbitのDDR3(Double-Data-Rate3)タイプのSDRAMの場合、ColumnアドレスCA、RowアドレスRA、及びBankアドレスBAは以下のようになる。
CA=(CA0,CA1,…,CA9)
RA=(RA0,RA1,…,RA12)
BA=(BA0,BA1,BA2)
 このうち、Columnアドレスの下位3bitのCA0~CA2はバーストアクセスの8wordの識別アドレスであるため、バーストアクセスにおいては無意味(000に設定する)であり、アドレス割り当てしない。そこで、CA0~CA2を除く23bitを図25に示すようにセルアドレスに割り当てることで、連続バーストアクセスを行うことができる。図25は、8bit/画素の場合の背景技術におけるセルアドレスに対するSDRAMのアドレスの割り当てを示す図である。
 図25において、セルのXCアドレス下位2bitにBankアドレスを2bit割り当て、セルのYCアドレスの下位1bitにBankアドレスを1bit割り当てている。この割り当てでは、矩形領域の連続バーストアクセスにおいて、最初に水平方向にセルを連続バーストアクセスし、続いて垂直方向にセルの位置を変えてセルを連続アクセスする。もし最初に垂直方向にセルの連続バーストアクセスをする場合、XCのLSBにBankアドレスを1bit割り当て、YCの下位2bitにBankアドレスを2bit割り当てる。
 Pix(x,y)のx,yをセル内画素アドレス、Bankアドレス、Columnアドレス、Rowアドレスを用いて表わすと、以下のようになる。
x=(X0,X1,…,X10)
 =(XP0,XP1,XP2,XC0,XC1,…,XC7)
 =(XP0,XP1,XP2,BA0,BA1,CA3,CA4,…,CA8)
y=(Y0,Y1,…,Y10)
 =(YP0,YP1,YC0,YC1,…,YC8)
 =(YP0,YP1,BA2,RA0,RA1,…,RA7)
 上記アクセス方法を用いることで、画像フレームの一部の16×16画素又は8×8画素の矩形領域(ブロック)を画像処理するためにそのデータをメモリから読み出す際に、どのセルにアクセスすれば良いかを画素アドレスの上位bitから簡単に求めることができる。また、セルアドレスを用いて、Bankアドレス、Columnアドレス、Rowアドレスのアドレス割り当てを行うことで、連続バーストアクセスが可能になる。
 近年、従来の8bit/画素の画像処理よりも高品質な10bit/画素の画像処理のニーズが高まっている。さらには、12bit/画素の画像処理も検討されている。例えば10bit/画素のデータを8bit/画素に圧縮してメモリに保存し、画像処理時に10bit/画素に伸張する技術が提案されている(例えば、特許文献1参照)。この技術を用いることで、10bit/画素など、1画素あたりのbit数が2のべき乗でない画素データに対しても、8bit/画素の画像処理と同じ装置を用いることができる。
日本特開2010-183401号公報
 しかし、特許文献1のように10bit/画素のデータを8bit/画素に圧縮して画像処理を行うと、画像が劣化する。画像劣化を防ぐためには、10bit/画素のままでメモリアクセスを行う必要がある。このとき、セル内の水平画素数と垂直画素数を2のべき乗個にすることで、8bit/画素と同様に、簡単にアクセス制御を行うことができる。
 しかし、10bit/画素の画像処理の場合に、1セル内の水平画素数と垂直画素数を2のべき乗個にすると、SDRAMの使用効率とアクセス効率が悪くなる。以下でその理由を説明する。
 バーストアクセスが8word/バーストであって、16bit/wordのSDRAMを2個用いる場合、1バーストでアクセスするデータは、下記の計算により256bitである。
16bit/word×8word/バースト×2個=256bit/バースト
 この1回のバーストでアクセスした256bitのうち、160bitのみを使用すると、10bit/画素が16個含まれることになり、16画素のセルになる。従って、1セル内の水平画素数と垂直画素数を2のべき乗個にすることができる(水平4画素×垂直4画素)。一般的なHD画像の画像フレームを4×4画素のセルで構成した場合、水平に480個、垂直に270個のセルが配置される。
 HD画像の画素アドレスをPix(x,y)とした場合、xは0~1919、yは0~1079の範囲となり、それぞれ11bitで表わすことができる。また、HD画像に配置されたセルのアドレスをCell(x,y)とした場合、xは0~479、yは0~269の範囲となり、それぞれ9bitで表わすことができる。図26は、10bit/画素の場合の背景技術におけるにおけるHD画像内の画素アドレスとセルアドレスを示す図である。
 各セル内の画素のアドレスPixC(x,y)は、x=0~3、y=0~3となり、それぞれ2bitで表わすことができる。図27は、10bit/画素の場合の背景技術におけるにおける各セル内の画素アドレスを示す図である。
 Pix(x,y)のx,yを2進法表記し、LSBからMSBの順に表わすと以下のようになる。
x=(X0,X1,…,X10)
y=(Y0,Y1,…,Y10)
Cell(x,y)のx,yを同様に表わすと以下のようになる。
x=(XC0,XC1,…,XC8)
y=(YC0,YC1,…,YC8)
PixC(x,y)のx,yを同様に表わすと以下のようになる。
x=(XP0,XP1)
y=(YP0,YP1)
 Pix(x,y)のx,yをセルアドレスCell(x,y)とセル内画素アドレスPixC(x,y)を用いて表わすと以下のようになる。
x=(X0,X1,…,X10)
 =(XP0,XP1,XC0,XC1,…,XC8)
y=(Y0,Y1,…,Y10)
 =(YP0,YP1,YC0,YC1,…,YC8)
 例えば、Pix(15,9)のx,yを2進法表記し、LSBからMSBの順に表わすと以下のようになる。
x=(1,1,1,1,0,0,0,0,0,0,0)
y=(1,0,0,1,0,0,0,0,0,0,0)
これを上記の数式に当てはめると以下のようになる。
(XP0,XP1)=(1,1)
(XCO,XC1,…,XC8)=(1,1,0,0,0,0,0,0,0)
(YP0,YP1)=(1,0)
(YC0,YC1,…,YC8)=(0,1,0,0,0,0,0,0,0)
よって、Cell(x,y)とPixC(x,y)は以下のようになる。
Cell(x,y)=Cell(3,2)
PixC(x,y)=PixC(3,1)
 このように、10bit/画素の場合でも、1セル内の水平画素数と垂直画素数を2のべき乗個にすることで、画素アドレスの上位bitのみでSDRAMのセルアドレスを得ることができる。従って、SDRAMのアクセス制御を簡単に行うことができる。
 また、図28は、10bit/画素の場合の背景技術におけるにおけるセルアドレスに対するSDRAMのアドレスの割り当てを示す図である。セルアドレスを図28に示すようにBankアドレス、Columnアドレス、Rowアドレスに割り当てることで、連続バーストアクセスを行うことができる。即ち、Pix(x,y)のx,yをセル内画素アドレス、Bankアドレス、Columnアドレス、Rowアドレスを用いて表わすと、以下のようになる。
x=(X0,X1,…,X10)
 =(XP0,XP1,XC0,XC1,…,XC8)
 =(XP0,XP1,BA0,BA1,CA3,CA4,…,CA9)
y=(Y0,Y1,…,Y10)
 =(YP0,YP1,YC0,YC1,…,YC8)
 =(YP0,YP1,BA2,RA0,RA1,…,RA7)
 以上より、8bit/画素と同様に、画像フレームの一部の16×16画素又は8×8画素の矩形領域(ブロック)を画像処理するためにそのデータをメモリから読み出す際に、どのセルにアクセスすれば良いかを簡単に求めることができる。また、セルアドレスを用いて、Bankアドレス、Columnアドレス、Rowアドレスのアドレス割り当てを行うことで、連続バーストアクセスが可能になる。
 ここで、8bit/画素の場合、1回のバーストでアクセスした256bit全てを使用している。これに対し、10bit/画素の場合、1回のバーストでアクセスした256bitのうち、160bitのみを使用し、使用しない96bitについては廃棄することとなる。このときのSDRAM使用効率は、8bit/画素の場合は256/256=100%であるのに対して、10bit/画素の場合は160/256=62.5%となる。
 同様にアクセス効率も悪化する。1wordが16bitなので、8bit/画素の場合、256bitに対して256÷16=16wordとなる。通常、高速にデータをやり取りするためには8wordの倍数単位である必要があるため、8bit/画素の場合は高速アクセスを実現できる。これに対し、10bit/画素の場合、使用する160bitに必要なword数は160÷16=10wordとなる。従って、10wordのアクセスのために、8の倍数単位である16wordのアクセスが必要となる。このときのアクセス効率は、8bit/画素の場合は16word/16word=100%であるのに対して、10bit/画素の場合は10word/16word=62.5%となる。
 また、HD画像1画像フレーム分のセル個数は、8bit/画素の場合は240×270=64,800個であるのに対して、10bit/画素の場合では480×270=129,600個となる。従って、10bit/画素の場合はSDRAMへのアクセス回数が2倍に増加する。
 以上説明したように、10bit/画素の場合など、1画素あたりのbit数が2のべき乗でない場合に、背景技術ではメモリの使用効率とアクセス効率が低いという問題があった。
 本発明は、上述のような課題を解決するためになされたもので、その目的は、1画素あたりのbit数が2のべき乗でない場合でもメモリの使用効率とアクセス効率を上げることができるメモリアクセス装置を得るものである。
 本発明に係るメモリアクセス装置は、画像フレームが格納されたメモリに対する1バーストアクセスで得られるbit数を1画素あたりのbit数で切り捨て除算することで1バーストアクセスあたりの画素数を求め、この画素数以下の画素数を持つ矩形領域をセルとして前記画像フレーム内に配置し、前記セルを用いて前記メモリにアクセスして、前記画像フレームの一部のブロックのデータを読み出すメモリアクセス装置であって、前記ブロックの画素アドレスの水平成分を前記セルの水平成分の画素数で除算した結果を出力する第1のルックアップテーブルと、前記ブロックの画素アドレスの垂直成分を前記セルの垂直成分の画素数で除算した結果を出力する第2のルックアップテーブルと、前記ブロックの画素アドレスの水平成分を前記セルの水平成分の画素数で除算した際の剰余を出力する第3のルックアップテーブルと、前記ブロックの画素アドレスの垂直成分を前記セルの垂直成分の画素数で除算した際の剰余を出力する第4のルックアップテーブルとを備え、前記第1のルックアップテーブルの出力値と前記第2のルックアップテーブルの出力値を、前記メモリにバーストアクセスするための前記セルのアドレスとし、前記第3のルックアップテーブルの出力値と前記第4のルックアップテーブルの出力値を、前記セル内の画素アドレスとして用いることを特徴とする。
 本発明により、1画素あたりのbit数が2のべき乗でない場合でもメモリの使用効率とアクセス効率を上げることができる。
本発明の実施例におけるHD画像内の画素アドレスとセルアドレスを示す図である。 本発明の実施例における各セル内の画素アドレスを示す図である。 本発明の実施例におけるセルアドレスに対するSDRAMのアドレスの割り当てを示す図である。 本発明の実施例に係るメモリアクセス装置を示す図である。 本発明の実施例に係るメモリアクセス装置によるSDRAMからのRead動作を説明するための図である。 アクセスするブロックの一例を示す図である。 SDRAMからReadアクセスした複数個のセルからなる矩形領域の一例を示す図である。 ブロックを画像処理する際のアクセス方法を説明するための図である。 ブロックを画像処理する際のアクセス方法を説明するための図である。 本発明の実施例に係るメモリアクセス装置の変形例を示す図である。 整数画素精度の画像処理装置を示す図である。 非整数画素精度の補間処理装置を含む画像処理装置を示す図である。 非整数画素精度の画像アクセスを説明するための図である。 補間処理装置を示す図である。 補間処理装置を示す図である。 図14の装置の補間処理を説明するための図である。 xとyが非整数座標の例を示す図である。 xが非整数座標でyが整数座標の例を示す図である。 xとyが整数座標の例を示す図である。 HD画像を示す図である。 SDRAMへのWrite動作をRead動作の逆動作として行う場合を説明するための図である。 方法(2)による装置を示す図である。 8bit/画素の場合の背景技術におけるHD画像内の画素アドレスとセルアドレスを示す図である。 8bit/画素の場合の背景技術における各セル内の画素アドレスを示す図である。 8bit/画素の場合の背景技術におけるセルアドレスに対するSDRAMのアドレスの割り当てを示す図である。 10bit/画素の場合の背景技術におけるにおけるHD画像内の画素アドレスとセルアドレスを示す図である。 10bit/画素の場合の背景技術におけるにおける各セル内の画素アドレスを示す図である。 10bit/画素の場合の背景技術におけるにおけるセルアドレスに対するSDRAMのアドレスの割り当てを示す図である。
10 ルックアップテーブル(第1のルックアップテーブル)
12 ルックアップテーブル(第2のルックアップテーブル)
14 ルックアップテーブル(第3のルックアップテーブル)
16 ルックアップテーブル(第4のルックアップテーブル)
 本発明の実施例に係るメモリアクセス装置では、1回のバーストでアクセスする画像データに対し、2のべき乗個のセル内画素数にこだわらずに、最大のアクセスを行う。一例として、10bit/画素の場合、256bit/バースト÷10bit/画素=25画素/バーストである。従って、1バーストアクセスあたりの画素数は25画素である。この25画素を持つ矩形領域をセルとする。25画素のセルの一例として、5×5画素(水平5画素×垂直5画素)のセルがある。一般的なHD画像の画像フレーム内に、水平に384個、垂直に216個のセルが配置される。メモリアクセス装置は、このセルを用いてSDRAMにアクセスしてデータを読み出す。
 HD画像の画素アドレスPix(x,y)のx,yは、x=0~1919、y=0~1079の範囲となり、それぞれ11bitで表わすことができる。また、HD画像に配置されたセルのアドレスCell(x,y)のx,yは、x=0~383、y=0~215の範囲となり、xは9bit、yは8bitで表わすことができる。図1は、本発明の実施例におけるHD画像内の画素アドレスとセルアドレスを示す図である。
 各セル内の画素のアドレスPixC(x,y)のx,yは、x=0~4、y=0~4となり、それぞれ3bitで表わすことができる。図2は、本発明の実施例における各セル内の画素アドレスを示す図である。
 Pix(x,y)のx,yを2進法表記し、LSBからMSBの順に表わすと以下のようになる。
x=(X0,X1,…,X10)
y=(Y0,Y1,…,Y10)
Cell(x,y)のx,yを同様に表わすと以下のようになる。
x=(XC0,XC1,…,XC8)
y=(YC0,YC1,…,YC7)
PixC(x,y)のx,yを同様に表わすと以下のようになる。
x=(XP0,XP1,XP2)
y=(YP0,YP1,YP2)
 SDRAMのアクセスのためには、画素アドレスPix(x,y)のx,yを、2進法表記したセルアドレスとセル内画素アドレスに変換する必要がある。しかし、1セル内の水平画素数と垂直画素数が2のべき乗個ではないため、画素アドレスの上位ビットから簡単に求めることができない。そのため、Cell(x,y)のx,yを以下の式で算出する。
x=(XC0,XC1,…,XC8)
 =(X0,X1,…,X10)/5
y=(YC0,YC1,…,YC7)
 =(Y0,Y1,…,Y10)/5
ここで、「/」は除算して端数切捨てを意味する。本実施例では5で除算した結果を端数切捨てした数値である。HD画像ではPix(x,y)はx=0~1919、y=0~1079なので、Cell(x,y)はx=0~383、y=0~215となり、xは9ビット、yは8ビットとなる。
 このCell(x,y)のx,yを以下のように2進法表記する。
x=(X0,X1,…,X10)/5
 =(XD0,XD1,…,XD8)
y=(Y0,Y1,…,Y10)/5
 =(YD0,YD1,…,YD7)
 PixC(x,y)のx,yを同様に表わすと以下のようになる。
x=(XP0,XP1,XP2)
 =Modulo{(X0,X1,…,X10),5}
y=(YP0,YP1,YP2)
 =Modulo{(Y0,Y1,…,Y10),5}
ここで、「Modulo」は除算結果の剰余を意味する。本実施例では、5で除算した際の剰余である。5で除算した剰余は0~4となるため、3ビット表現となる。
 このPixC(x,y)のx,yを以下のように2進法表記する。これが画素単位アクセスに用いられる。
x=Modulo{(X0,X1,…,X10),5}
 =(XM0,XM1,XM2)
y=Modulo{(Y0,Y1,…,Y10),5}
 =(YM0,YM1,YM2)
 以上より、画素アドレスPix(x,y)のx,yをセルアドレス、セル内画素アドレスを用いて表すと以下のようになる。
x=(X0,X1,…,X10)
 =[Modulo{(X0,X1,…,X10),5},(X0,X1,…,X10)/5]
 =(XM0,XM1,XM2, XD0,XD1,…,XD8)
y=(Y0,Y1,…,Y10)
 =[Modulo{(Y0,Y1,…,Y10),5},(Y0,Y1,…,Y10)/5]
 =(YM0,YM1,YM2,YD0,YD1,…,YD7)
 図3は、本発明の実施例におけるセルアドレスに対するSDRAMのアドレスの割り当てを示す図である。図3に示すように(XD0,XD1,…,XD8)と(YD0,YD1,…,YD7)をBankアドレス、Columnアドレス、Rowアドレスに割り当てることで連続バーストアクセスを行うことができる。
 図4は、本発明の実施例に係るメモリアクセス装置を示す図である。このメモリアクセス装置は、ルックアップテーブル10,12,14,16、アドレス配置変換回路18を有する。メモリアクセス装置は、画像処理装置内に設けられている。画像処理装置が画像フレームの一部のブロックを画像処理する際に、メモリアクセス装置は上記アクセス方法を用いてブロックのデータをSDRAMから読み出す。
 具体的には、1バーストアクセスするセルアドレスをルックアップテーブル10,12で求め、SDRAMにバーストアクセスする。SDRAMバーストアクセスメモリはSDRAMのセル1個に対応したバーストアクセス1回分を一時保存し、隣接するセルメモリに転送する。バーストアクセスしたセル内の画素アドレスはルックアップテーブル14,16で求め、セルアドレスとセル内画素アドレスによって画像処理を行う画素アドレスを特定し、セルメモリから目的のブロック領域の画素データを画像処理装置に転送する。
 ルックアップテーブル10は、ブロックの画素アドレスの水平成分(X0~X10)をセルの水平成分の画素数(5)で除算した結果(XD0~XD8)を出力する。ルックアップテーブル12は、ブロックの画素アドレスの垂直成分(Y0~Y10)をセルの垂直成分の画素数(5)で除算した結果(YD0~YD7)を出力する。アドレス配置変換回路18は、ルックアップテーブル10,12の出力値をBankアドレス、Columnアドレス、Rowアドレスに割り当てる。
 ルックアップテーブル14は、ブロックの画素アドレスの水平成分(X0~X10)をセルの水平成分の画素数(5)で除算した際の剰余(XM0~XM2)を出力する。ルックアップテーブル16は、ブロックの画素アドレスの垂直成分(Y0~Y10)をセルの垂直成分の画素数(5)で除算した際の剰余(YM0~YM2)を出力する。ルックアップテーブル14,16の出力値をセル内の画素アドレスとする。
 メモリアクセス装置は、ルックアップテーブル10,12の出力値をセルのアドレスとし、このセルのアドレスをアドレス配置変換回路18によってSDRAMのバーストアクセスのアドレスに割り当てることで、SDRAMにアクセスする。さらに、ルックアップテーブル14,16の出力値をバーストアクセスしたセル内の画素アドレスとして用いることで、セル内の画素アクセスを行う。
 図5は、本発明の実施例に係るメモリアクセス装置によるSDRAMからのRead動作を説明するための図である。ここでは一例として8×8画素のブロックの矩形領域にアクセスする。矩形領域の左上画素座標をPix(x,y)とすると、右下画素座標はPix(x+7,y+7)となる。従って、Pix(x,y)を左上始点座標とし、Pix(x+7,y+7)を右下終点座標とする領域の画素をSDRAMからReadする。
 ここで始点座標Pix(x,y)のセルアドレスはCell(x/5,y/5)、セル内画素アドレスはPixC(Modulo(x,5),Modulo(y,5))となる。終点座標Pix(x+7,y+7)のセルアドレスはCell((x+7)/5,(y+7)/5)、セル内画素アドレスはPixC(Modulo(x+7,5),Modulo(y+7),5))となる。
 従って、アクセスするブロック(8×8画素矩形領域)は、始点座標Pix(x,y)がセルアドレスCell(x/5,y/5)のセル内画素アドレスPixC(Modulo(x,5),Modulo(y,5))で、終点座標がセルアドレスCell((x+7)/5,(y+7)/5)のセル内画素アドレスPixC(Modulo(x+7,5),Modulo(y+7,5))の領域となる。SDRAMのバーストアクセスをCell(x/5,y/5)からCell((x+7)/5,(y+7)/5)の範囲で行う。そして、実際にアクセスする画素領域はCell(x/5,y/5)のPixC(Modulo(x,5),Modulo(y,5))からCell((x+7)/5,(y+7)/5)のPixC(Modulo(x+7,5),Modulo(y+7,5))の画素領域となる。
 これらのアクセスにおいて、セルアドレスはルックアップテーブル10,12により得られ、セル内画素アドレスはルックアップテーブル14,16により得られる。即ち、メモリアクセス装置は、除算ルックアップテーブル10,12で始点座標に対応したセルアドレスと終点座標に対応したセルアドレスを求め、始点セルから終点セルまでの各セルを順にアクセスする。
 図6は、アクセスするブロックの一例を示す図である。始点座標が(28,52)で終点座標が(35,59)の場合、始点セルアドレスが、(5,10)で終点セルアドレスが(7,11)となる。そして、(5,10)、(6,10)、(7,10)、(5,11)、(6,11)、(7,11)、と順に各セルにアクセスして行く。または、(5,10)、(5,11)、(6,10)、(6,11)、(7,10)、(7,11)と順に各セルにアクセスして行く。
 バーストアクセスされたセルアドレスCell(x,y)のセル内画素データ(バーストアクセスされた25画素分の画素データ)は、バーストアクセス1回分の画像データを格納するSDRAMバーストアクセスメモリを経由してセルメモリに転送される。その後、セルメモリ内のセル内画素アドレスPixC(x,y)と組み合わすことで、画像処理を行う画素アドレスPix(x,y)の画素が特定される。この画素アドレスPix(x,y)の画素データがデータ処埋部のブロックメモリに転送される。
 図7は、SDRAMからReadアクセスした複数個のセルからなる矩形領域の一例を示す図である。ここでは矩形領域は4×3セルである。この矩形領域の画像データから、画像処理装置で処理するのに必要な領域を切り出して利用する。矩形領域の画像データは、一旦メモリアクセス装置内に備えられたセルメモリにセル単位で順次保存される。例えば、図7に示すように、アクセスしたセルの順に、始点と終点のセルアドレスの算出で判明しているx方向のセル個数とy方向のセル個数が矩形に並んで保存される。このセルメモリのアクセスには、アクセス順に並んだセル番号と、各セル内の画素アドレスを用いる。図7のセル番号(0,0)から(2,3)は、画素アドレスから算出したセルアドレスではなく、セルメモリ内で便宜的に付与されたアドレスである。
 このセルメモリは、始点座標から終点座標までの必要な矩形領域(図7で破線で示す領域)より一般的には大きい領域となっている。このセルメモリへの保存はセル単位で順次行え、読み出しは通常の2進アドレスで行える。このようなセルメモリは、セルの形状が定められていれば、保存時にカウンタや加算器でメモリアドレス発生するなどの公知技術で実現可能である。
 前述したModulo演算用ルックアップテーブル14,16で求めた始点アドレス(セル内画素アドレス)が、図7のセルメモリの画素アドレスになる。図7のセル(0,0)は最初にSDRAMからReadアクセスした始点座標を含む。これは、セルメモリのアドレス(0,0)にセル内画素アドレス(0,0)が保存されるからである。このようにセルメモリに保存された画像データ(4×3セル)から所定のサイズ(XS,YS)の領域を読み出す。XSとYSは、画像の始点座標と終点座標から算出できる。このような所定の矩形領域の読み出しは、算出したXSとYSの値をレジスタにセットするなどの公知技術で実現可能である。
 画像処理装置内のブロックメモリは、メモリアクセス装置から転送されてきた所定ブロックの画素データを画像処理するためのメモリである。本実施形態では、8×8画素データを格納する。
 本実施例により、画素アドレスPix(x,y)からセルアドレスCell(x,y)とセル内画素アドレスPixC(x,y)を求めることができる。このため、ブロックのデータをメモリから読み出す際に、どのセルにアクセスすればよいかを簡単に求めることができる。なお、Write動作は異なる動作となるため、後述する。
 さらに、SDRAMにアクセスした256bitのうち、250bitを使用しているため、SDRAM使用効率は250/256=97.7%となる。同様にアクセス効率の面でも、使用する250bitに必要なword数は15.625wordとなり、アクセス効率は15.625word/16word=97.7%となる。よって、本実施例により、1画素あたりのbit数が2のべき乗でない場合でも、セル内の水平画素数と垂直画素数を2のべき乗個にする背景技術に比べて、メモリの使用効率とアクセス効率を上げることができる。
 なお、本実施例ではセルを5×5画素としていたため、5の除算テーブル、5のModulo演算テーブルを用いているが、メモリの規模によって数値は変化させればよい。例えばDDR3-SDRAMを1個のみ使用した場合は、1バーストでアクセスする画素が128bitとなるため、1セルは128÷10=12画素となる。この場合、12画素を3×4画素とし、3の除算テーブル、3のModulo演算テーブル、4の除算テーブル、4のModulo演算テーブルを用いればよい。このとき、垂直方向の4は2のべき乗であるため、背景技術のようにbit配置変換を行ってもよい。具体的には、y/4はyを2bitシフトして得られ、Modulo(y,4)はyの下位2bitを取り出せばよい。
 また、セル内画素数を最大限利用する必要はなく、本実施例において5×5ではなく、5×4(効率は78%)や6×4(効率は94%)といった領域としてもよい。即ち、セルアクセスの256ビットをどのように画素データに設定するか、画像処理装置の都合に合わせたセル形状を設定することで、応用目的の他の条件なども含めた最適な設定が可能である。
 本実施例により、ブロックを画像処理する際に、どの範囲のセルにアクセスすればよいかを求めることもできる。図8及び図9は、ブロックを画像処理する際のアクセス方法を説明するための図である。図中で、実線はセル、破線はブロックを表わしている。
 図8の方法では、ブロックの始点(左上の画素アドレスPix(xa,ya))、終点(右下の画素アドレスPix(xb,yb))、セルの水平画素数m、垂直画素数nを用いる。始点のセルアドレスはCell(xa/m,ya/n)、終点のセルアドレスはCell(xb/m,yb/n)となり、この範囲に該当するセル(図中の太枠で表わしたセル)のSDRAMのアドレスにバーストアクセスする。
 図9の方法では、ブロックの始点Pix(xa,ya)、ブロックの水平画素数XS、垂直画素数YS、セルの水平画素数m、垂直画素数nを用いる。始点のセルアドレスはCell(xa/m,ya/n)、終点のセルアドレスはCell(xa+XS-1)/m,(ya+YS-1)/n)となり、この範囲に該当するセル(図中の太枠で表示したセル)のSDRAMのアドレスにバーストアクセスする。
 図10は、本発明の実施例に係るメモリアクセス装置の変形例を示す図である。この装置は、整数座標と非整数座標の切替制御を設けている。そして、水平方向又は垂直方向の画素が非整数画素精度である場合は、ブロックの始点座標及び終点座標で表わされる矩形領域に対し、非整数画素精度の方向の所定画素数に見合った補間処理を行う。例えばMPEG画像符号化などに用いられる1/2画素精度や1/4画素精度の場合、小数部分を含むブロックの始点座標(xas,yas)及び終点座標(xbs,ybs)の各少数部分を切り捨てたブロックの始点座標(xa,ya)及び終点座標(xb,yb)に対して、周辺各方向3画素ずつ用いた補間処理により、非整数座標の周辺を含めた領域アクセスを行う。従って、始点座標(xa-2,ya-2)、終点座標(xb+3,yb+3)の範囲に該当するセルのSDRAMのアドレスにバーストアクセスすればよい。
 図11は、整数画素精度の画像処理装置を示す図である。図12は、非整数画素精度の補間処理装置を含む画像処理装置を示す図である。整数画素精度の場合、メモリアクセス装置から画像データがそのまま画像処理装置のブロックメモリに転送される。これに対して、非整数画素精度の場合、画像データが補間処理装置で補間処理されてから画像処埋装置のブロックメモリに転送される。
 図13は、非整数画素精度の画像アクセスを説明するための図である。例えば8×8のブロック画像アクセスにおいて、非整数位置の周辺水平方向左右と垂直方向上下の各3画素を含めて、13×13の矩形領域にアクセスする。次に、この矩形領域を補間処理して非整数画素精度アクセスした8×8ブロック画像を生成する。次に、このブロック画像をブロック画像処理する。
 図14及び図15は補間処理装置を示す図である。補間処理は、一般的にはFIR(Finite Impulse Response)フィルタの原理を用いて行われる。MPEG画像符号化国際標準規格において補間処理も定められている。MPEG-2ビデオ符号化規格では、非整数画素精度は1/2画素精度で、補間処理は左右や上下の周辺1画素を用いた線形補間処理(Bilinear補間と呼ばれる簡易なFIRフィルタである)が定められている。MPEG-4 AVC(H.264)符号化規格では、輝度は左右や上下の周辺3画素を用いた6-TAP(FIR処理では6次フィルタと呼ぶ)FIRフィルタと2-TAP線形補間処理の組合せ処理が定められている。図14の装置は、水平方向と垂直方向で共通の6-TAP FIRフィルタによる1/2画素位置の補間処理を行う。図15の装置は、2-TAP線形補間による1/4画素位置の補間処理を行う。
 なお、図11、図12、図14及び図15では、説明の煩雑さを避けるために、1次元の水平方向のみ又は垂直方向のみを説明している。実際には2次元の処理が必要で、水平方向と垂直方向の双方が非整数画素アドレス値の場合は水平方向と垂直方向の両方向に補間処理を行う。
 図14の装置では、6-TAP FIR処理で0.5画素端数位置の画素Pix(n+0.5)を算出する。このときに必要な画素は、Pix(n-2)からPix(n+3)である。図16は、図14の装置の補間処理を説明するための図である。8×8画素の左上の画素(図16中の黒丸)を算出する場合、13×13画素の水平方向6画素及び垂直方向6画素の計36画素(図16中の黒塗りの四角)を用いる。
 図15の装置では、0.25画素端数位置の画素Pix(n+0.25)を算出する。このときに必要な画素は、Pix(n)とPix(n+1)である。
 2次元矩形領域の始点Pix(xa,ya)から終点Pix(xb,yb)について6-TAPFIR補間処理に必要な画素を説明する。画素座標xa、ya、xb、ybが整数か非整数かによって周辺各方向3画素の必要性が定まり、アクセスすべき画素データの領域が定まる。例えば目的とする画素ブロックが8×8の整数画素数ブロックとすると、xaが整数ならxbも整数であり、xaが非整数ならxbもxaと同じ小数部を持つ非整数である。同様に、yaが整数ならybも整数であり、yaが非整数ならybもyaと同じ小数部を持つ非整数である。ただし、xa、xb、ya、ybは0以上の値で、負数ではない。
 アクセスする画像デ-タの座標が整数画素座標なら、周辺画素のアクセスは不要であり、アクセス量を少なくすることができる。必要最小限の画像データにアクセスして効率を良くするには、整数画素座標の場合は周辺3画素にアクセスしないようにする。例えば始点Pix(xa,ya)から終点Pix(xb,yb)の画像アクセスにおいて、非整数座標の画素値を6-TAPFIR補間処理で求める場合、x座標とy座標とも非整数の場合に必要な領域は、始点Pix(xa-2,ya-2)から終点Pix(xb+3,yb+3)となる。xaが非整数でyaが整数の場合には、xに対しては左右周辺3画素のアクセスを行ない、13画素のアクセスを行う。ただし、yに対しては上下周辺3画素のアクセスを行なわず、8画素のアクセスを行う。即ち、非整数画素がx座標だけの場合は、アクセスする領域の始点座標を(xa-2,ya)、終点座標を(xb+3,yb)とすることで、アクセスするセル個数を最小限にすることができる。同様に、非整数画素がy座標だけの場合は、アクセスする領域の始点座標を(xa,ya-2)、終点座標を(xb,yb+3)とすることで、アクセスするセル個数を最小限にすることができる。
 また、非整数画素座標の場合の始点座標と終点座標の修正とModulo演算に対して、x方向とy方向の各ルックアップテーブルにおいて、整数座標と非整数座標の切替制御を設けてもよい。図10の装置はこのような切替制御を備えている。メモリアクセス装置は、除算ルックアップテーブルで始点座標に対応したセルアドレスと終点座標に対応したセルアドレスを求め、始点セルから終点セルまでの各セルを順にアクセスする。
 図17は、xとyが非整数座標の例を示す図である。セルサイズが5×5画素、ブロックサイズが8×8、始点座標が(27.5,52.5)、終点座標が(34.5,59.5)である。この場合、始点のアクセスすべきセルアドレスは((27.5-2)/5,(52.5-2)/5)=(25.5/5,50.5/5)=(5,10)である。終点のアクセスすべきセルアドレスは((34.5+3)/5,(59.5+3)/5)=(37.515,62.5/5)=(7,12)である。即ち、始点セルアドレスが(5,10)、終点セルアドレスが(7,12)であるため、(5,10)、(6,10)、(7,10)、(5,11)、(6,11)、(7,11)、(5,12)、(6,12)、(7,12)の計9個のセルにアクセスする。この時のアクセスは、(5,10)、(6,10)、(7,10)、(5,11)、(6,11)、(7,11)、(5,12)、(6,12)、(7,12)の順でも良いし、(5,10)、(5,11)、(5,12)、(6,10)、(6,11)、(6,12)、(7,10)、(7,11)、(7,12)の順でも良い。
 また、Modulo演算のルックアップテーブル14,16は、これらの値に応じた非整数座標に対応して修正したセルアドレスに対応して、修正始点画素と修正終点画素を含むセルに対してModulo演算を行う。この例では、修正始点座標の整数部(25,50)に対するModulo演算の結果として(0,0)を出力し、修正終点座標整数部(37,62)に対するModulo演算の結果として(2,2)を出力する。
 そして、x座標とy座標それぞれに関して、非整数座標の小数部が0の場合は00を、0.25の場合は01を、0.5の場合は10を、0.75の場合は11を補間装置に制御信号として入力する。補正装置は、これらの値に応じたセルからの画素アクセスと補間処理を行う。
 図18は、xが非整数座標でyが整数座標の例を示す図である。セルサイズが5×5画素、始点座標が(27.5,52)、終点座標が(34.5,59)である。この場合、始点のアクセスすべきセルアドレスは((27.5-2)/5,52/5)=(25.5/5,52/5)=(5,10)である。終点のアクセスすべきセルアドレスは((34.5+3)/5,59/5)=(37.5/5,59/5)=(7,11)である。即ち、(5,10)から(7,11)の計6個のセルにアクセスする。この時、5の除算ルックアップテーブル10,12は、始点座標整数部(27,52)と終点座標整数部(34,59)の入力に対し、非整数制御信号により、始点は(25,50)に対する除算結果の(5,10)を出力し、終点は(37,59)に対する除算結果の(7,11)を出力する。始点セルアドレスが(5,10)、終点セルアドレスが(7,11)であるため、(5,10)、(6,10)、(7,10)、(5,11)、(6,11)、(7、11)の計6個のセルにアクセスする。xとyが非整数座標の場合に比べて、xが整数座標でyが非整数座標の場合では、9個のセルアクセスから6個のセルアクセスに減少する。
 xとyが整数座標の場合は更にセルアクセスが減少する。図19は、xとyが整数座標の例を示す図である。始点が(27,52)、終点が(34,59)である。この場合、始点セルアドレスは(5,10)、終点のセルアドレスは(6,11)となり、(5,10)、(5,11)、(6,10)、(6,11)の4個のセルのアクセスで済む。
 本実施例では、周辺3画素に対して補間処理を行なっているが、これは国際標準H.264の輝度成分が非整数画素の場合の補間処理である。始点Pix(xa,ya)から終点Pix(xb,yb)の画像アクセスにおいて、非整数座標の画素値を2-TAP FIR補間処理で求める場合、x座標とy座標とも非整数の場合に必要な領域は、始点Pix(xa,ya)から終点Pix(xb+1,yb+1)となる。
 色差成分が非整数画素である場合は、周辺1画素によって補間処理を行なえばよい。同様に、MPEG-2の場合も、周辺1画素によって補間処理を行なえばよい。この場合は、ブロックの始点座標(xa,ya)及び終点座標(xb,yb)で表わされる矩形領域に対して、周辺各方向1画素ずつ用いた補間処理により、非整数座標の周辺を含めた領域アクセスを行う。従って、始点座標(xa,ya)、終点座標(xb+1,yb+1)の範囲に該当するセルのSDRAMのアドレスにバーストアクセスすればよい。
 周辺各方向1画素を用いて補間処理を行う場合は、セルサイズが5×5画素でブロックサイズが8×8、画素始点座標が(27.5,52.5)、終点座標が(34.5,59.5)とすると、始点のアクセスすべきセルアドレスは(27.5/5,52.5/5)=(25/5,50/5)=(5,10)である。終点のアクセスすべきセルアドレスは((34.5+1)/5,(59.5+1)/5)=(35.5/5,60.5/5)=(7,12)である。即ち、セルアドレスが(5,10)から(7,12)の計9個のセルにアクセスする。
 また、Modulo演算のルックアップテーブル14,16は、これらの値に応じた非整数座標に対応して修正したセルアドレスに対応して、修正始点画素と修正終点画素を含むセルに対してModulo演算を行う。この例では、修正始点座標整数部(27,52)に対するModulo演算の結果として(2,2)を出力し、修正終点座標整数部(35,60)に対するModulo演算の結果として(0,0)を出力する。
 なお、非整数画素がxaだけの場合は、アクセスする領域の始点座標を(xa,ya)、終点座標を(xb+1,yb)とすれば、アクセスするセル個数を最小限にすることができる。また、非整数画素がyaだけの場合は、アクセスする領域の始点座標を(xa,ya)、終点座標を(xb,yb+1)とすれば.アクセスするセル個数を最小限にすることができる。また.非整数画素座標の場合の始点座標と終点座標の修正とModulo演算に対して、x方向とy方向の各ルックアップテーブルに整数座標と非整数座標の切替制御を設けてもよい。このように、周辺画素への補間処理は、所定の画素に対して行なえばよい。
 以上、画像処理におけるSDRAMのRead(SDRAMの画像データを画像処理装置へ転送)動作について説明した。一方、画像処理をした後にSDRAMにWrite(画像処理装置で処理した画像データをSDRAMへ転送)動作する場合は、異なる動作となる。前述のMPEG画像符号化や他の一般的な画像処理において、画像メモリは左上端画素座標を(0,0)として、右下端画素座標が最大画素座標となる。例えばHD(High Definition)画像において、フレームは画像1枚を意味し、そのサイズは1920×1080である。図20は、HD画像を示す図である。この画像は、8×8ブロックが240×135個配置されたものとして扱う。または、サイズを便宜上1920×1088として、16×16ブロックが120×68個配置されたものとし、画像表示は1920×1080を切り出して行う。そして、当然のことであるが、画素座標は整数値で表現される。
 図21は、SDRAMへのWrite動作をRead動作の逆動作として行う場合を説明するための図である。一般的に、画像処理は、左上瑞ブロックから右下端ブロックに向かって行われる。従って、処理した画像ブロックをSDRAMにWriteするとき、Read動作の逆動作として行うと、図21に示すように、処理対象ブロックに属さない画素(ブロックの外側画素)までWrite動作してしまう。図21の5×5セル(2)の画素をSDRAMにWriteする際、網掛けしたセル内画素は、画像処理を行う8×8ブロックに属さないことになる。ブロックに属さない画素を書き換える動作は、既に処理された画像データなら、処理内容と異なる画像データになってしまう。また、これから処理しようとする画像データなら、意図しない画像データに書換えられてしまう。
 このようなWrite動作における不都合を解決する方法として次の2つがある。
(1)SDRAMアクセスのためのブロックメモリより大きいサイズの内部メモリを設ける。そして、処理前のアクセス時に、SDRAMにReadアクセスした画像データにおいて、処理対象外の画素データをメモリに保持しておき、Write動作において、処理対象の画素データだけ書き換えて、Readアクセスとは逆動作で同じサイズのWrite動作を行う。
(2)上記のようにブロックはSDRAMで左上瑞から整列されているので、整数個のセルと整数個のブロックが一致する矩形領域を定め、この矩形領域を一括してSDRAMにWriteする。例えば、前述の例ではセルサイズは5×5であり、ブロックサイズは8×8であるから、40×40の領域にはセルが8×8個で一致し、ブロックは5×5個で一致する。
 方法(1)はWrite動作において、ブロックサイズより多い領域のWrite動作となり、Writeアクセス効率が低下する。一方、方法(2)では、40×40という大きな内部メモリが必要となるが、Write動作の効率が高い。
 SDRAMにWriteする任意のブロックの始点座標を含むセルから終点座標を含むセルの領域にWriteすると、1つのブロックだけの場合、Writeすべきブロックは8×8の矩形領域だが、Write動作は5×5のセルの矩形領域が複数からなる矩形領域となる。このため、一般にはWriteすべき領域より大きい領域をWriteすることになり、Writeすべきでない領域まで意図しないデータをWriteしてしまうことになる。
 同時に、意図しない領域へのWrite動作はWrite動作の効率を低下させる。この問題を避けるため、Writeすべきブロックが整列しているとの条件を設定する。例えばWriteすべきブロックが左上瑞から順に整列していると設定する。セルサイズが5×5画素、ブロックサイズが8×8の場合、5と8の最小公倍数40を用いて、40×40画素領域を一括Writeする。これにより、5×5個のブロックが8×8個のセルと一致し、意図しない画素データのWriteを避けることができる。
 図22は、方法(2)による装置を示す図である。画像処理装置からの画素アドレスは、前述のRead動作では始点座標Pix(xa,ya)と終点座標Pix(xb,yb)であったが、この方法では始点座標は常に8の倍数の整数値であり、終点座標は常に始点座標に39を加算した値である。例えば、始点座標がPix(40,80)なら終点座標はPix(79,119)となる。図22の40×40画像メモリは、図4のセルメモリを用いることで実現できる。即ち、セルメモリのサイズを40×40画像(8×8セル)のメモリとし、デ-タ転送方向をRead動作から変えることで、Write動作を行うことができる。
 なお、本実施例では、メモリアクセス装置がバーストアクセスを行うメモリはSDRAMであるが、SDRAMに限らず他のメモリでもよい。

Claims (3)

  1.  画像フレームが格納されたメモリに対する1バーストアクセスで得られるbit数を1画素あたりのbit数で切り捨て除算することで1バーストアクセスあたりの画素数を求め、この画素数以下の画素数を持つ矩形領域をセルとして前記画像フレーム内に配置し、前記セルを用いて前記メモリにアクセスして、前記画像フレームの一部のブロックのデータを読み出すメモリアクセス装置であって、
     前記ブロックの画素アドレスの水平成分を前記セルの水平成分の画素数で除算した結果を出力する第1のルックアップテーブルと、
     前記ブロックの画素アドレスの垂直成分を前記セルの垂直成分の画素数で除算した結果を出力する第2のルックアップテーブルと、
     前記ブロックの画素アドレスの水平成分を前記セルの水平成分の画素数で除算した際の剰余を出力する第3のルックアップテーブルと、
     前記ブロックの画素アドレスの垂直成分を前記セルの垂直成分の画素数で除算した際の剰余を出力する第4のルックアップテーブルとを備え、
     前記第1のルックアップテーブルの出力値と前記第2のルックアップテーブルの出力値を、前記メモリにバーストアクセスするための前記セルのアドレスとし、
     前記第3のルックアップテーブルの出力値と前記第4のルックアップテーブルの出力値を、前記セル内の画素アドレスとして用いることを特徴とするメモリアクセス装置。
  2.  アクセスする水平方向又は垂直方向の画素座標が非整数画素精度である場合は、前記ブロックの始点座標及び終点座標で表される矩形領域に対し、前記非整数画素精度の方向の所定画素数に見合ったアクセスと補間処理を行うことを特徴とする請求項1記載のメモリアクセス装置。
  3.  画像処理された画像フレームを前記メモリにバーストアクセスで保存するWrite動作において、画像処理された前記画像フレームの整数個のセルと整数個のブロックが一致する矩形領域を定め、この矩形領域を一括して前記メモリにWriteすることを特徴とする請求項1又は2に記載のメモリアクセス装置。
PCT/JP2011/055605 2011-03-10 2011-03-10 メモリアクセス装置 WO2012120674A1 (ja)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CA2819354A CA2819354C (en) 2011-03-10 2011-03-10 Memory access device
JP2013503298A JP5614490B2 (ja) 2011-03-10 2011-03-10 メモリアクセス装置
PCT/JP2011/055605 WO2012120674A1 (ja) 2011-03-10 2011-03-10 メモリアクセス装置
EP11860333.1A EP2685422B1 (en) 2011-03-10 2011-03-10 Memory access device
CN201180068837.4A CN103403757B (zh) 2011-03-10 2011-03-10 存储器访问装置
US13/992,996 US9430992B2 (en) 2011-03-10 2011-03-10 Memory access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/055605 WO2012120674A1 (ja) 2011-03-10 2011-03-10 メモリアクセス装置

Publications (1)

Publication Number Publication Date
WO2012120674A1 true WO2012120674A1 (ja) 2012-09-13

Family

ID=46797672

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/055605 WO2012120674A1 (ja) 2011-03-10 2011-03-10 メモリアクセス装置

Country Status (6)

Country Link
US (1) US9430992B2 (ja)
EP (1) EP2685422B1 (ja)
JP (1) JP5614490B2 (ja)
CN (1) CN103403757B (ja)
CA (1) CA2819354C (ja)
WO (1) WO2012120674A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110136045A (zh) * 2019-04-18 2019-08-16 电子科技大学 一种基于两图像互置乱隐藏及恢复的方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016134005A (ja) * 2015-01-20 2016-07-25 オリンパス株式会社 画像処理装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008176765A (ja) * 2007-10-05 2008-07-31 Fujitsu Ltd メモリ装置,メモリコントローラ及びメモリシステム
JP2009223758A (ja) * 2008-03-18 2009-10-01 Ricoh Co Ltd 画像処理装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5404448A (en) * 1992-08-12 1995-04-04 International Business Machines Corporation Multi-pixel access memory system
US7330209B2 (en) * 1999-12-20 2008-02-12 Texas Instruments Incorporated Digital still camera system and complementary-color-filtered array interpolation method
EP1111904A3 (en) * 1999-12-20 2005-03-16 Texas Instruments Incorporated Digital camera system and method
US7970859B2 (en) * 2006-11-09 2011-06-28 Raritan Americas, Inc. Architecture and method for remote platform control management
JP5018074B2 (ja) * 2006-12-22 2012-09-05 富士通セミコンダクター株式会社 メモリ装置,メモリコントローラ及びメモリシステム
JP2010183401A (ja) 2009-02-06 2010-08-19 Panasonic Corp 画像符号化装置および、その方法
US8494288B2 (en) * 2009-09-30 2013-07-23 F. Scott Deaver Methods for digital image compression
CA2802666C (en) * 2010-06-17 2015-08-11 Ntt Electronics Corporation Image processing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008176765A (ja) * 2007-10-05 2008-07-31 Fujitsu Ltd メモリ装置,メモリコントローラ及びメモリシステム
JP2009223758A (ja) * 2008-03-18 2009-10-01 Ricoh Co Ltd 画像処理装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2685422A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110136045A (zh) * 2019-04-18 2019-08-16 电子科技大学 一种基于两图像互置乱隐藏及恢复的方法
CN110136045B (zh) * 2019-04-18 2022-12-20 电子科技大学 一种基于两图像互置乱隐藏及恢复的方法

Also Published As

Publication number Publication date
JP5614490B2 (ja) 2014-10-29
US20140139536A1 (en) 2014-05-22
CN103403757A (zh) 2013-11-20
EP2685422B1 (en) 2020-07-22
CA2819354A1 (en) 2012-09-13
EP2685422A4 (en) 2018-07-11
CN103403757B (zh) 2016-01-27
JPWO2012120674A1 (ja) 2014-07-07
US9430992B2 (en) 2016-08-30
CA2819354C (en) 2016-04-26
EP2685422A1 (en) 2014-01-15

Similar Documents

Publication Publication Date Title
JP5126360B2 (ja) メモリ装置及びそれを制御するメモリコントローラ
KR101127962B1 (ko) 영상 처리 장치 및 영상 처리를 위한 프레임 메모리 관리 방법
US8194752B2 (en) Method for mapping memory addresses, memory accessing apparatus and method thereof
JP5614490B2 (ja) メモリアクセス装置
US6791625B1 (en) Video processing apparatus for performing address generation and control, and method therefor
US9443319B2 (en) Image processor for motion searches
US9454826B2 (en) Image processor for motion searches
Motten et al. Adaptive memory architecture for real-time image warping
JP2008052522A (ja) 画像データアクセス装置及び画像データアクセス方法
US20110142128A1 (en) Method and apparatus interleaving pixel of reference image within single bank of frame memory, and video codec system having the same
KR20040082601A (ko) 메모리 억세스 제어 장치
JP5151786B2 (ja) 記憶素子及び記憶方法
JPH05300497A (ja) 画像処理装置及びディジタル信号処理プロセッサ
JPWO2011158699A1 (ja) 画像処理装置
JP2010004308A (ja) 撮像装置
JP3937418B2 (ja) 記憶装置および記憶読み出し制御方法
JP4696515B2 (ja) メモリマッピング方法及びメモリインターフェイス回路
CN114449170A (zh) 一种基于可编程芯片的实时图像处理系统
CN116342415A (zh) 一种图像校正方法及装置、设备、芯片、存储介质
CN114219703A (zh) 图像转换方法及装置、计算机可读存储介质
CN115017070A (zh) 图像矫正方法、图像矫正模块、激光投影设备及存储介质
JP2005286954A (ja) 画像処理装置
JP4978809B2 (ja) 画像処理装置
JP2019125925A (ja) 画像処理装置及び画像形成装置
WO2010041743A1 (ja) メモリ制御装置、メモリマッピング方法、及び、プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11860333

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013503298

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2819354

Country of ref document: CA

WWE Wipo information: entry into national phase

Ref document number: 13992996

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE