WO2012120690A1 - Data transferring method, dma controller and image processing device - Google Patents

Data transferring method, dma controller and image processing device Download PDF

Info

Publication number
WO2012120690A1
WO2012120690A1 PCT/JP2011/055873 JP2011055873W WO2012120690A1 WO 2012120690 A1 WO2012120690 A1 WO 2012120690A1 JP 2011055873 W JP2011055873 W JP 2011055873W WO 2012120690 A1 WO2012120690 A1 WO 2012120690A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
roi
offset
value
width
Prior art date
Application number
PCT/JP2011/055873
Other languages
French (fr)
Inventor
Hanno Lieske
Original Assignee
Renesas Electronics Corporation
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 Renesas Electronics Corporation filed Critical Renesas Electronics Corporation
Priority to PCT/JP2011/055873 priority Critical patent/WO2012120690A1/en
Publication of WO2012120690A1 publication Critical patent/WO2012120690A1/en

Links

Classifications

    • 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
    • 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/363Graphics controllers
    • 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
    • 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/395Arrangements specially adapted for transferring the contents of the bit-mapped memory to the screen
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2360/00Aspects of the architecture of display systems
    • G09G2360/12Frame memory handling
    • G09G2360/123Frame memory handling using interleaving
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2360/00Aspects of the architecture of display systems
    • G09G2360/12Frame memory handling
    • G09G2360/127Updating a frame memory using a transfer of data from a source area to a destination area

Definitions

  • the present invention relates to a method and an apparatus for transferring data using direct memory access. More specifically, the present invention relates to a data transferring method and a DMA controller which read out interlaced data from an non-continuous area in an external memory and write them as non-interlaced data into a continuous area in an internal memory, or read out non-interlaced data from a continuous area in an internal memory and write them as interlaced data into a non-continuous area in an external memory.
  • ROI Region Of Interest
  • I 0 of Fig. 31 is an example of two-dimensional image data taken by CCD camera 10.
  • the ROI data is extracted to an internal memory 13 as shown in Fig. 32 before starting processing.
  • Fig. 32 only the ROI is extracted and stored in the internal memory 13 sequentially.
  • an image processor 14 can process data stored in the internal memory 13 from head to end sequentially. As a result, complicated memory access calculation and control are eliminated.
  • DMA control direct memory access control
  • a start address of the ROI the width of the ROI, a ROI offset and the number of rows of the ROI are set.
  • the ROI offset stands for the distance between the head of a row and the head of the next row of the ROI, and the ROI offset is equal to the width of the image data.
  • a DMAC (Direct Memory access controller) 12 reads out one ROI width of data from the start address and transfers the data of the one ROI width to the internal memory 13. Next, the DMAC searches the head of the next row of the ROI using the ROI offset, and reads out ROI width of data of the next row. In this way, the DMAC reads data of the ROI sequentially. As a result, only the data of the ROI are obtained as shown in Fig. 32. Techniques described above are also disclosed in Patent Application Publication No. US2007/0162643 and Japanese
  • each row of the ROI is processed by a different processing unit PU, each of which processing unit PU has its own internal memory IMEM.
  • MIMD multi instruction multiple data
  • SIMD single instruction multiple data
  • Fig. 34 in the SIMD mode, the picture is required to be stored in the common internal memory IMEM so that each PE can work on one column of the picture.
  • the current transfer mechanism for transferring data between the external memory and the common internal memory IMEM in SIMD mode is that the data is transferred in sets of 4 rows in vertical direction. This data transferring mechanism requires for the external memory to storage data as an interlaced form as shown in Fig. 34.
  • NPL 1 S. Nomoto, "Performance Evaluation of a Dynamically Switchable SIMD/MIMD Processor by Using an Image Recognition Application", IPSJ Transactions on System LSI Design Methodology, Vol. 3 47-56, Feb. 2010
  • a method for transferring interlaced ROI data stored in an external memory to an internal memory as noninterlaced data using direct memory access control is provided.
  • This method includes:
  • Position for input buffer [(RCNT) + ⁇ x (element_offset)],
  • SCNT is a count value of stripe counter
  • RCNT is a count value of row counter
  • variable x is an integer number from 0 to ROI_width-l
  • a method for transferring continuous data stored in an internal memory to an external memory as interlaced ROI data using direct memory access control is provided.
  • This method includes:
  • SCNT is a count value of stripe counter
  • RCNT is a count value of row counter
  • variable x is an integer number from 0 to ROI_widfh-l .
  • Fig. 1 shows one example of interlaced data stored in an external memory.
  • Fig.2 shows an example where two-dimensional image data is written to the external memory in interlaced form.
  • Fig.3 shows a configuration of an image processing device.
  • Fig.4 shows a configuration of an image processor.
  • Fig.5 shows a case where selection terminals of both a first selector and a second selector are connected to the terminal "0".
  • Fig.6 shows a case where selection terminals of both a first selector and a second selector are connected to the terminal "1".
  • Fig.7 is a flowchart showing operations for data transferring in a first embodiment.
  • Fig.8 is a flowchart showing operations for data transferring in the first embodiment.
  • Fig.9 shows a case where 16 data (16-byte data) from the start address of the external memory are read in to an input buffer.
  • Fig.10 shows a case where data 00, 01, 02, 03 are extracted.
  • Fig.11 shows a case where further 16-byte data are read out to an input buffer.
  • Fig.12 shows a case where data "10”, “11”, “12”, “13” and “14" are extracted, and stored in the output buffer.
  • Fig.13 shows a case where data "30" corresponding to position "3" is stored in the output buffer.
  • Fig.14 shows a case where data corresponding to position "7", “11”, “15”, “19” are stored in the output buffer.
  • Fig.15 shows a case where data "40”, “41”, “42”, “43”, “44” are extracted.
  • Fig. 16 shows a case where non-interlaced data in an internal memory are written back to an external memory as interlaced data in a second embodiment.
  • Fig.17 is a flowchart showing operations for data transferring in the second embodiment. [Fig.18]
  • Fig.18 is a flowchart showing operations for data transferring in the second embodiment.
  • Fig.19 shows a case where 16-byte data are read in to the input buffer in the second embodiment.
  • Fig.20 shows a case where data "00”, “01”, “02”, “03” are stored in an output buffer at each calculated position in the second embodiment.
  • Fig. 22 shows a case where data "04" is stored in the output buffer at position "16" in the second embodiment.
  • Fig. 23 show a case where each data is stored in the output buffer in the second embodiment.
  • Fig .24 shows a case where row "2" and row "3" are processed in the second embodiment.
  • Fig. 25 shows a case where data "40”, “41”, “42”, “43”, “44”, are stored in the output buffer at their calculated positions respectively in the second embodiment.
  • Fig.26 shows a case where non interlaced data in the external memory are transferred to and stored in the internal memory in an applied example 1.
  • Fig.27 shows a case where data are extracted according to calculated positions in the applied example 1.
  • Fig. 28 shows a case where ROI is transferred to an internal memory in an applied example 2.
  • Fig. 29 shows a case where ROI in an internal memory is written back to an external memory in an applied example 3.
  • Fig. 30 shows a case where ROI in an internal memory is written back to an external memory in an applied example 4.
  • Fig. 31 shows a case where ROI of two-dimensional image data is transferred to the internal memory.
  • Fig. 32 shows a case where ROI is extracted and stored in the internal memory sequentially.
  • Fig. 33 shows a case where each row of the ROI is processed by a different processing unit.
  • Fig. 34 shows a case where each unit of image data I 0 is stored in the external memory 1 1 in the sequence that is suitable for processing.
  • Fig. 1 shows one example of interlaced data stored in an external memory EMEM.
  • 40 data which are highlighted in bold type are data of ROI.
  • This interlaced data are written from the two-dimensional image data I 0 shown in Fig. 2(A) to the external memory in a manner of interlacing as shown in Fig. 2(B).
  • the two-dimensional image data I 0 shown in Fig. 2(A) has 16 data per row and has 16 rows in height.
  • This two-dimensional image data I 0 is stored in the external memory in a manner of interlacing.
  • interlacing is executed as following.
  • the external memory EMEM has 64 bytes per row and two-dimensional image data I 0 shown in Fig. 2(A) is stored in the external memory EMEM in a manner of interlacing as shown in Fig. 2(B).
  • the interlaced ROI is read out from the external memory EMEM and they are stored in an internal memory IMEM as continuous data.
  • Fig.3 shows a configuration of an image processing device 100.
  • the image processing device 100 has an external memory EMEM, CPU 110, an image processor 200 and a bus 130.
  • the image processor 200 has a parameter register 140.
  • the image processing device 100 has a LCD as display and other units, but because common equipments are available for them, detail explanations for them are spared.
  • Image data taken by an image-taking device 10 is stored in the external memory EMEM. Moreover, image data is subjected to processing by the image processor 200.
  • Fig.4 shows internal configuration of the image processor 200.
  • the image processor 200 has an image processing operation unit 210, an internal memory IMEM, a buffer unit 220, a switching unit 230, and a DMA controller (direct memory access controller) 240.
  • the image processing operation unit 210 includes plural processing elements, which processing elements are as shown in Fig.34.
  • the internal memory IMEM stores data that are read out and transferred to the external memory EMEM.
  • the image processing operation unit 210 processes the data stored in the internal memory IMEM.
  • the external memory EMEM and the internal memory IMEM are connected via the buffer unit 220, the DMA controller 240 and the switching unit 230.
  • the buffer unit 220 has an input buffer 221 and an output buffer 222. Data are buffered once in the input buffer 221 before the DMA controller 240, and data output from the DMA controller 240 are buffered once in the output buffer 222.
  • the DMA controller 240 has a ROI read control unit 241 and a ROI write control unit 242.
  • the ROI read control unit 241 and the ROI write control unit 242 control data transfer between the internal memory IMEM and the external memory EMEM. Operations of the ROI read control unit 241 and the ROI write control unit 242 are described later with reference to flowcharts.
  • the switching unit 230 has a first selector 231 and a second selector 232.
  • the first selector 231 has two inputs and one output, its selection terminal'O" is coupled to the output terminal of the external memory EMEM, and its selection terminal"l" is coupled to the output terminal of the internal memory IMEM. Furthermore, the output terminal of the first selector
  • the second selector 232 has one input and two outputs, its selection terminal “0" is coupled to the input terminal of the internal memory IMEM, and its terminal" 1" is coupled to the input terminal of the external memory EMEM.
  • data line is as shown in Fig. 5. That is, data of the external memory EMEM are read out and stored in the internal memory IMEM via the input buffer 221 and the output buffer 222. Furthermore, when selection terminals of both of the first selector 231 and the second selector 232 connect to the terminal"!, data line is as shown in Fig. 6. That is, data of the internal memory IMEM are read out and written in the external memory EMEM via the input buffer 221 and the output buffer 222.
  • the selection terminals of both of the first selector 231 and the second selector 232 are connected to the terminal'O".
  • the ROI read control unit 241 reads out the data from the external memory EMEM and stores them in the internal memory IMEM.
  • Fig. 7 and Fig. 8 are flowcharts showing operation of data transferring.
  • Step ST101 values of parameters are set.
  • ROI offset are set.
  • EMEM_start_address is an address value from which ROI starts in the external memory EMEM. For example, in Fig. 1 , the value of the EMEM_start_address is "0".
  • element width is, in this embodiment, one byte.
  • element means one unit when writing or reading data and, for example, accords to color data or brightness data of one pixel.
  • the ROI width is the width of ROI in the two-dimensional image data.
  • a row of ROI has five elements, that is, ROI_width is 5 bytes.
  • the element_offset means the distance between continuous data in the external memory EMEM.
  • the value of the element offset is four.
  • four elements in height are bundled as one stripe. Accordingly, there are inserted four elements between two continuous data in the external memory EMEM.
  • Fig. 1 for example, there are four elements of bytes between "00" and "01".
  • element offset is the distance of continuous data in the external memory EMEM, and accords to the size of "stripe".
  • ROI height is calculated from dividing the number of bytes of ROI in height of the two- dimensional image data I 0 by the result of [element_offset ⁇ element width].
  • the ROI of this example has eight rows in height in the two-dimensional image data I 0 . Moreover, one stripe has four elements in height. Accordingly, the ROI has two stripes in height. That is, the ROI_height is also the height of the ROI in the external memory measured in stripes, and is also calculated by dividing the number of rows in height by the number of elements of stripe. Furthermore, because the size of stripe is [element offset x element width], ROI_height is also calculated by dividing the number of bytes of ROI in height by [element_offset ⁇
  • ROI_height the height of ROI(byte) ⁇ [element offset (byte) ⁇ element_width (byte)]
  • ROI offset is the distance from a head of row to a head of next row of ROI in two- dimensional image data, and is equal to the width of the image data.
  • ROI_offset is 16 bytes.
  • a count value of a stripe counter (SCNT) is initialized (ST102), and a count value of a row counter (RCNT) is initialized (ST103).
  • Position for input buffer [(RCNT) +x ⁇ (element_offset)]
  • data is read in to the input buffer 221 from the external memory EMEM.
  • the capacity of the bus 130 of data are read-in in block.
  • the capacity of the bus 130 is set to 16 bytes.
  • Position for EMEM [EMEM_start_address] + [(SCNT) ⁇ (ROI_offset) ⁇
  • 16 data (16-byte data) from the start address of the external memory EMEM are read in to the input buffer 221 (ST 106).
  • the output buffer 222 stores data enough to send them to the internal memory IMEM.
  • the capacity of the bus is 16 bytes
  • the new position is calculated and it is determined whether data corresponding to the calculated position and given stripe counter (SCNT) exists in the input buffer 221 (ST105). If it does not exist (ST105: NO), further data from the external memory EMEM are read in to the input buffer 221 (ST106). Next 16-byte data are read out as shown in Fig. 11.
  • SCNT stripe counter
  • operation advances to the next row in the same stripe. That is, at STl 13, the row counter is counted up and the RCNT becomes "1".
  • the output buffer 222 has stored 10 pieces of data (10 bytes), but it does not reach 16 bytes (ST109: NO). Hence while counting up the row counter (STl 13), ST104, ST105, ST106, ST107, ST108, ST109, ST112 and ST113 are repeated.
  • position calculation (ST 104) is executed as following.
  • position calculation (ST104) is executed as following.
  • the operation advances to the next stripe.
  • determined is whether all stripes have been processed. Because there are stripe'O" and stripe "1" and only stripe "0" has been processed, not all stripes have been processed yet (STl 14: NO). In this case, the stripe counter is counted up (STl 15). Then the process goes back to ST103, and the row counter is reset to "0".
  • the position of data which should be extracted is calculated as following.
  • Position for EMEM [EMEM_start_address] + [(SCNT) ⁇ (ROI_offset) ⁇
  • the second term indicates the position of the head of stripe "1".
  • the interlaced data in the external memory EMEM can be read out as nori interlaced data efficiently by direct memory access.
  • position calculation can be executed with facility, even though data are interlaced.
  • efficient data transferring using direct memory access can be realized.
  • the output buffer stores data up to the limit of the bus bandwidth and then the data are sent to the internal memory in block. Accordingly, by making the most of the bus bandwidth, it is possible to reduce the number of clock cycles for data transferring.
  • the second embodiment performs reverse operation of the first embodiment. That is, as shown in Fig. 16, non interlaced data in an internal memory IMEM are written back to an external memory EMEM as interlaced data.
  • the configuration of the image processing device is the same as that of the first embodiment (Fig. 3, Fig. 4). However, in this second embodiment, because non interlaced data in the internal memory IMEM are written back to the external memory EMEM as interlaced data, selection terminals of both of the first selector 231 and the second selector 232 are connected to the terminal "1" (refer to Fig. 6). That is, data of the internal memory IMEM are read out and written into the external memory EMEM via the input buffer 221 and output buffer 222.
  • ROI offset are set.
  • a count value of a stripe counter is initialized (ST202), and a count value of a row counter is initialized (ST203).
  • Step204 determined is whether there is data in the input buffer 221. If at least one data exists in the input buffer 221, the determination is YES. However, because data has not been read out from the internal memory IMEM to the input buffer 221 yet, there is no data in the input buffer 221 (ST204: NO).
  • ST205 data are read out from the internal memory IMEM. At this point, to make the most of the capability of the bus 130, the capacity of the bus 130 of data are read in block. As shown in Fig. 19, 16-byte data are read in to the input buffer 221 (ST205).
  • the ROI write control unit 242 picks up data in the input buffer 221 from the head sequentially (ST206).
  • ROI width is 5
  • the ROI write control unit 242 picks up five data from the head. That is, from the head, data "00", “01”, “02", “03”, “04", ⁇ - are picked up.
  • positions in which the data should be stored in the output buffer 222 are calculated (ST207).
  • the positions can be calculated by the same equation as the first embodiment.
  • the element offset is "4".
  • the first position is calculated as following.
  • the position for data "04" is calculated to be "16". But because the output buffer 222 can only store 16 bytes, data "04" cannot be stored.
  • starting address position is defined by the following equation:
  • Position [EMEM_start_address]+[(SCNT) ⁇ (ROI_offset) ⁇ (element_offset) ⁇ (element width)]
  • each data is stored in the external memory EMEM at the position reflecting its stored position in the output buffer 222.
  • the data "04" is stored at the position "16" in the output buffer 222.
  • the head of the output buffer 222 is numbered as “16” this time.
  • the data "04" is stored at position "16" of the external memory EMEM, as shown in Fig. 22.
  • the RCNT is set to be “1 " and the process goes back to ST204.
  • position calculation is executed (ST207).
  • data "10”, “11”, “12”, “13”, “14” are picked up from the input buffer 221. Because current RCNT is "1", position calculation is executed as following. [0097]
  • the output buffer 222 is cleared. As shown in the Fig. 23, data are stored in the external memory EMEM at the position reflecting their stored position in the output buffer 222. In this way, as shown in Fig. 23, data are stored in the external memory EMEM.
  • position calculation is executed as following (ST207).
  • Position for input buffer [(RCNT) +x ⁇ (element offset)]
  • position for data "40" is calculated as "0".
  • starting address position is defined by the following equation:
  • Position [EMEM_start_address]+[(SCNT) ⁇ (ROI_offset) x (element offset) ⁇
  • non interlaced data in the internal memory IMEM can be written to the external memory EMEM as interlaced data.
  • position calculation can be executed with facility.
  • the bus bandwidth of data are read out in block to the input buffer, it is possible to reduce the number of clock cycles for data transferring by making the most of the bus bandwidth.
  • an applied example 1 is explained below.
  • As the applied example 1, described is an applied example of the first embodiment.
  • a flowchart used for explanation of the applied example 1 is the same as that of the first embodiment.
  • continuous data are stored in the external memory EMEM.
  • One column in the continuous data is the ROI.
  • ROI offset are set.
  • ROI has 16 rows, each row having one byte.
  • the element offset is "1". This means that one stripe is assumed to be made up of one row. That is, ROI has stripe'O" to stripe "15", and each stripe is made up of row'O".
  • data "02" can be extracted as first data.
  • ROI_width is "1"
  • ROI_width of data has been extracted in the current row (STl 1 1 : YES). Further, since each stripe is made up of one row, all rows has been processed (STl 12: YES). Hence, operation advances to the next stripe (STl 15).
  • Position for input buffer [(RCNT) +x ⁇ (element offset)]
  • data "12" which is the eighteenth data, can be extracted.
  • An applied example 2 is described below as another applied example of the first embodiment.
  • a flowchart used for explanation of the applied example 2 is the same as that of the first embodiment.
  • continuous data are stored in the external memory EMEM.
  • Data in this external memory EMEM are ROI, and data are extracted at four data intervals.
  • data stored in the external memory EMEM are RGB A (Red-Green-Blue-Alpha) data and that the image processing unit 210 processes Red data, Green data, Blue data and transparence (alpha) data independently.
  • RGB A Red-Green-Blue-Alpha
  • ROI_offset are set.
  • ROI_offset 64.
  • ROI height is 1.
  • ROI height is calculated from dividing the number of bytes of ROI in height by the result of [element_offsetxelement_width]. Because the number of bytes of ROI in height is "4" and [element_offsetxelement_width] is 4, ROI_height is 1. This means that one stripe is considered to be made up of four rows.
  • ROI offset may be set as "0".
  • stripe "0" is made up of four rows (row'O” to row"3"), even though row'O" has been processed, not all rows of current stripe'O” have been processed (STl 12: NO). So by counting up the row counter (STl 13), RCNT becomes row"l", and operation goes back to position calculation (ST 104).
  • red data, green data,— can be independently read out and stored in the internal memory IMEM.
  • An applied example 3 is described below as an applied example of the second embodiment.
  • a flowchart used for the applied example 3 is the same as that of the second embodiment.
  • the applied example 3 is reverse version of the applied example 1 , that is, as shown in Fig. 29, ROI data stored in the internal memory IMEM are written back to the external memory EMEM.
  • ROI in the external memory EMEM has 16 rows, each row having one byte.
  • the values of parameters are set.
  • the values of the parameters are set as following.
  • starting address position is defined by the following equation:
  • Position [EMEM_start_address]+[(SCNT) ⁇ (ROI_offset) x (element_offset) ⁇
  • starting address position is defined by the following equation:
  • Position [EMEM_start_address]+[(SCNT) ⁇ (ROI_offset) ⁇ (element offset) ⁇
  • An applied example 4 is described below as another applied example of the second embodiment.
  • a flowchart used for the applied example 4 is the same as that of the second embodiment.
  • the applied example 4 is reverse version of the applied example 2, that is, as shown in Fig. 30, ROI data stored in the internal memory IMEM are written back to the external memory EMEM.
  • the values of parameters are set.
  • the values of the parameters are set as following.
  • positions for data in the internal memory IMEM "00”, “04”, “08” ⁇ ⁇ can be calculated, these data are written at each position in the external memory EMEM via the output buffer 222.
  • position calculations for 64 data, that is ROI width of data have been finished, and data is written back so that data "fc" in the internal memory IMEM is written back to position "252".
  • positions for data "01”, “05”, “09” ⁇ ⁇ are calculated, and data is written back so that data "fd” in the internal memory IMEM is written back to position "253".
  • the present invention can be applied to a method and an apparatus for an image processing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Graphics (AREA)
  • General Engineering & Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Processing (AREA)

Abstract

Provided is a data transferring method for transferring interlaced Region of interest (ROI)data stored in a first memory (EMEM) to a second memory (IMEM) as non-interlaced data using direct memory access control (240). This method comprises setting values of EMEM_start_address, element_width, ROI_width, element_offset, ROI_height, and ROI_offset. Further, this method includes reading out data from the first memory to an input buffer, calculating positions of data to be extracted, extracting data corresponding to calculated position from the input buffer (221) and storing them in an output buffer (222), and sending data stored in the output buffer to the second memory.

Description

DESCRIPTION
DATA TRANSFERRING METHOD, DMA CONTROLLER AND
IMAGE PROCESSING DEVICE
Technical field
[0001]
The present invention relates to a method and an apparatus for transferring data using direct memory access. More specifically, the present invention relates to a data transferring method and a DMA controller which read out interlaced data from an non-continuous area in an external memory and write them as non-interlaced data into a continuous area in an internal memory, or read out non-interlaced data from a continuous area in an internal memory and write them as interlaced data into a non-continuous area in an external memory.
Background art
[0002]
When processing image data, firstly, ROI (Region Of Interest) which is object region for processing is extracted from the entire image data. For example, I0 of Fig. 31 is an example of two-dimensional image data taken by CCD camera 10.
When processing ROI in the two-dimensional image data I0, the ROI data is extracted to an internal memory 13 as shown in Fig. 32 before starting processing.
In Fig. 32, only the ROI is extracted and stored in the internal memory 13 sequentially.
Because only the ROI is extracted sequentially, an image processor 14 can process data stored in the internal memory 13 from head to end sequentially. As a result, complicated memory access calculation and control are eliminated.
[0003]
When extracting the ROI, DMA control (direct memory access control) using some parameters is used for skipping complex memory access control. When starting the DMA control, a start address of the ROI, the width of the ROI, a ROI offset and the number of rows of the ROI are set.
Here, the ROI offset stands for the distance between the head of a row and the head of the next row of the ROI, and the ROI offset is equal to the width of the image data.
[0004] A DMAC (Direct Memory access controller) 12 reads out one ROI width of data from the start address and transfers the data of the one ROI width to the internal memory 13. Next, the DMAC searches the head of the next row of the ROI using the ROI offset, and reads out ROI width of data of the next row. In this way, the DMAC reads data of the ROI sequentially. As a result, only the data of the ROI are obtained as shown in Fig. 32. Techniques described above are also disclosed in Patent Application Publication No. US2007/0162643 and Japanese
Unexamined Patent Application Publication No. 2007-34488.
[0005]
Lately, highly advanced and complicated techniques for processing image data have been developed one after another, and greater efficiency has been required. In this trend, not only one processor, but plural processors are typically used in parallel at the same time to process the image data at high speed. For example, as shown in Fig. 33, each row of the ROI is processed by a different processing unit PU, each of which processing unit PU has its own internal memory IMEM. In this specification, this type of image processing is called MIMD (multi instruction multiple data) mode.
[0006]
Furthermore, SIMD (single instruction multiple data) mode has begun to be used to speed up more, in which mode PEs use one common memory IMEM in contrast to the MIMD mode. As shown in Fig. 34, in the SIMD mode, the picture is required to be stored in the common internal memory IMEM so that each PE can work on one column of the picture. Here, the data for one column is stored inside the internal memory IMEM, the common internal memory being composed of the internal memories of all the PEs. That is, the width of the common internal memory IMEM == number of PEs, and the height of the common internal memory == size of the internal memory of each PE. The current transfer mechanism for transferring data between the external memory and the common internal memory IMEM in SIMD mode is that the data is transferred in sets of 4 rows in vertical direction. This data transferring mechanism requires for the external memory to storage data as an interlaced form as shown in Fig. 34. Citation List
Patent Literature
[0007]
PTL 1 : US patent application publication US2007/0162643
PTL 2: Japanese unexamined patent application publication 2007-34488 Non Patent Literature
[0008]
NPL 1 : S. Nomoto, "Performance Evaluation of a Dynamically Switchable SIMD/MIMD Processor by Using an Image Recognition Application", IPSJ Transactions on System LSI Design Methodology, Vol. 3 47-56, Feb. 2010
Summary of Invention
Technical Problem
[0009]
In image processing, because SIMD mode is suitable for certain parts and MIMD mode is suitable for other parts, switching between SIMD and MIMD is needed. Thus, rearranging interlaced data in a non-continuous area to non-interlaced data in a continuous area or, reversely, rearranging non-interlaced data in a continuous area to interlaced data in a non-continuous area is necessary. Data rearrangement could be executed by a CPU which can execute complex address calculation, but it is not preferable because of time-consuming process for the calculation and memory access control. Hence, direct memory access is needed to do such a data rearrangement efficiently.
Solution to Problem
[0010]
According to an aspect of the present invention, there is provided a method for transferring interlaced ROI data stored in an external memory to an internal memory as noninterlaced data using direct memory access control.
This method includes:
setting a value of EMEM_start_address as an address value from which ROI starts in the external memory;
setting a value of element_width as bytes of width per one unit of data;
setting a value of ROI width as the width of ROI in two-dimensional image data;
setting a value of element_offset as the distance between non-interlaced data elements in the interlaced data field;
setting a size of stripe same as the value of the element_offset;
setting a value of ROI height as height of ROI measured in unit of the stripe;
setting a value of ROI offset as the distance from a head of row to a head of next row of ROI in two-dimensional image data in units of element offset; reading out to an input buffer data from the external memory defined by the equation:
Position for EMEM = [EMEM_start_address] + [(SCNT) (ROI_offset) χ
(element offset) χ (element width)],
calculating the element positions in the input buffer according to the following equation: Position for input buffer = [(RCNT) + χ x (element_offset)],
where SCNT is a count value of stripe counter, RCNT is a count value of row counter and variable x is an integer number from 0 to ROI_width-l ,
extracting data corresponding to the calculated position for input buffer from the input buffer and storing them in an output buffer; and
sending data stored in the output buffer to the internal memory.
[0011]
According to another aspect of the present invention, there is provided a method for transferring continuous data stored in an internal memory to an external memory as interlaced ROI data using direct memory access control.
This method includes:
setting a value of EMEM start address as an address value from which ROI starts in the external memory;
setting a value of element_width as bytes of width per one unit of data;
setting a value of ROI width as the width of ROI in two-dimensional image data;
setting a value of element_offset as the distance between non-interlaced data elements in the interlaced data field;
setting a size of stripe as same as the value of the element_offset;
setting a value of ROI height as height of ROI measured in unit of the stripe;
setting a value of ROI offset as the distance from a head of row to a head of next row of ROI in two-dimensional image data in units of element offset;
reading out data from the internal memory to a input buffer;
taking out sequentially elements from the input buffer and storing them into an output buffer at calculated positions according to the following equation:
Position for input buffer = [(RCNT) + x χ (element offset)], sending the data stored in the output buffer to the external memory at the address defined by the equation:
Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI offset)
(element offset) χ (element width)],
where SCNT is a count value of stripe counter, RCNT is a count value of row counter and variable x is an integer number from 0 to ROI_widfh-l .
Advantageous Effect of Invention
[0012]
In this invention, by setting the parameters described above, position calculation can be executed with facility, even though data are interlaced. As a result, it is possible to transfer data efficiently between interlaced data form and non-interlaced data form using direct memory access. Brief Description of Drawings
[0013]
[Fig- 1]
Fig. 1 shows one example of interlaced data stored in an external memory.
[Fig.2]
Fig.2 shows an example where two-dimensional image data is written to the external memory in interlaced form.
[Fig.3]
Fig.3 shows a configuration of an image processing device.
[Fig.4]
Fig.4 shows a configuration of an image processor.
[Fig.5]
Fig.5 shows a case where selection terminals of both a first selector and a second selector are connected to the terminal "0".
[Fig.6]
Fig.6 shows a case where selection terminals of both a first selector and a second selector are connected to the terminal "1".
[Fig.7]
Fig.7 is a flowchart showing operations for data transferring in a first embodiment.
[Fig.8]
Fig.8 is a flowchart showing operations for data transferring in the first embodiment.
[Fig.9]
Fig.9 shows a case where 16 data (16-byte data) from the start address of the external memory are read in to an input buffer.
[Fig.10] Fig.10 shows a case where data 00, 01, 02, 03 are extracted.
[Fig.11]
Fig.11 shows a case where further 16-byte data are read out to an input buffer.
[Fig-12]
Fig.12 shows a case where data "10", "11", "12", "13" and "14" are extracted, and stored in the output buffer.
[Fig-13]
Fig.13 shows a case where data "30" corresponding to position "3" is stored in the output buffer.
[Fig.14]
Fig.14 shows a case where data corresponding to position "7", "11", "15", "19" are stored in the output buffer.
[Fig.15]
Fig.15 shows a case where data "40", "41", "42", "43", "44" are extracted.
[Fig.16]
Fig. 16 shows a case where non-interlaced data in an internal memory are written back to an external memory as interlaced data in a second embodiment.
[Fig.17]
Fig.17 is a flowchart showing operations for data transferring in the second embodiment. [Fig.18]
Fig.18 is a flowchart showing operations for data transferring in the second embodiment.
[Fig.19]
Fig.19 shows a case where 16-byte data are read in to the input buffer in the second embodiment.
[Fig.20]
Fig.20 shows a case where data "00", "01", "02", "03" are stored in an output buffer at each calculated position in the second embodiment.
[Fig. 21]
Fig. 21 shows a case where each data is stored in the external memory at the position reflecting its stored position in the output buffer in the second embodiment.
[Fig. 22]
Fig. 22 shows a case where data "04" is stored in the output buffer at position "16" in the second embodiment.
[Fig. 23] Fig. 23 show a case where each data is stored in the output buffer in the second embodiment.
[Fig .24]
Fig .24 shows a case where row "2" and row "3" are processed in the second embodiment.
[Fig. 25]
Fig. 25 shows a case where data "40", "41", "42", "43", "44", are stored in the output buffer at their calculated positions respectively in the second embodiment.
[Fig. 26]
Fig.26 shows a case where non interlaced data in the external memory are transferred to and stored in the internal memory in an applied example 1.
[Fig. 27]
Fig.27 shows a case where data are extracted according to calculated positions in the applied example 1.
[Fig.28]
Fig. 28 shows a case where ROI is transferred to an internal memory in an applied example 2.
[Fig.29]
Fig. 29 shows a case where ROI in an internal memory is written back to an external memory in an applied example 3.
[Fig. 30]
Fig. 30 shows a case where ROI in an internal memory is written back to an external memory in an applied example 4.
[Fig. 31]
Fig. 31 shows a case where ROI of two-dimensional image data is transferred to the internal memory.
[Fig- 32]
Fig. 32 shows a case where ROI is extracted and stored in the internal memory sequentially.
[Fig. 33]
Fig. 33 shows a case where each row of the ROI is processed by a different processing unit.
[Fig. 34]
Fig. 34 shows a case where each unit of image data I0 is stored in the external memory 1 1 in the sequence that is suitable for processing.
Description of Embodiment
[0014]
With reference to the accompanying drawings, exemplary embodiments of the present invention will be described.
[First embodiment]
Here is described an exemplary first embodiment of the present invention.
Fig. 1 shows one example of interlaced data stored in an external memory EMEM. In Fig. 1, 40 data which are highlighted in bold type are data of ROI. This interlaced data are written from the two-dimensional image data I0 shown in Fig. 2(A) to the external memory in a manner of interlacing as shown in Fig. 2(B).
[0015]
The two-dimensional image data I0 shown in Fig. 2(A) has 16 data per row and has 16 rows in height. This two-dimensional image data I0 is stored in the external memory in a manner of interlacing. Here, interlacing is executed as following.
That is, four elements in height are bundled as one stripe, and data are read out by the unit of the stripe and stored in the external memory EMEM. The external memory EMEM has 64 bytes per row and two-dimensional image data I0 shown in Fig. 2(A) is stored in the external memory EMEM in a manner of interlacing as shown in Fig. 2(B).
[0016]
In the two-dimensional image data I0, the ROI has five elements per row and has eight rows in height.
[0017]
Hereinafter, in the first embodiment, described is the case where the interlaced ROI is read out from the external memory EMEM and they are stored in an internal memory IMEM as continuous data.
[0018]
Fig.3 shows a configuration of an image processing device 100. The image processing device 100 has an external memory EMEM, CPU 110, an image processor 200 and a bus 130. Moreover, the image processor 200 has a parameter register 140. In addition, the image processing device 100 has a LCD as display and other units, but because common equipments are available for them, detail explanations for them are spared.
[0019] Image data taken by an image-taking device 10 is stored in the external memory EMEM. Moreover, image data is subjected to processing by the image processor 200.
[0020]
Fig.4 shows internal configuration of the image processor 200.
As shown in Fig. 4, the image processor 200 has an image processing operation unit 210, an internal memory IMEM, a buffer unit 220, a switching unit 230, and a DMA controller (direct memory access controller) 240. The image processing operation unit 210 includes plural processing elements, which processing elements are as shown in Fig.34. The internal memory IMEM stores data that are read out and transferred to the external memory EMEM. The image processing operation unit 210 processes the data stored in the internal memory IMEM.
[0021]
The external memory EMEM and the internal memory IMEM are connected via the buffer unit 220, the DMA controller 240 and the switching unit 230. Here, the buffer unit 220 has an input buffer 221 and an output buffer 222. Data are buffered once in the input buffer 221 before the DMA controller 240, and data output from the DMA controller 240 are buffered once in the output buffer 222.
[0022]
The DMA controller 240 has a ROI read control unit 241 and a ROI write control unit 242. The ROI read control unit 241 and the ROI write control unit 242 control data transfer between the internal memory IMEM and the external memory EMEM. Operations of the ROI read control unit 241 and the ROI write control unit 242 are described later with reference to flowcharts.
[0023]
The switching unit 230 has a first selector 231 and a second selector 232. The first selector 231 has two inputs and one output, its selection terminal'O" is coupled to the output terminal of the external memory EMEM, and its selection terminal"l" is coupled to the output terminal of the internal memory IMEM. Furthermore, the output terminal of the first selector
231 is coupled to the input buffer 221. Furthermore, the second selector 232 has one input and two outputs, its selection terminal "0" is coupled to the input terminal of the internal memory IMEM, and its terminal" 1" is coupled to the input terminal of the external memory EMEM.
[0024]
Here, when selection terminals of both of the first selector 231 and the second selector
232 connect to the terminal"0", data line is as shown in Fig. 5. That is, data of the external memory EMEM are read out and stored in the internal memory IMEM via the input buffer 221 and the output buffer 222. Furthermore, when selection terminals of both of the first selector 231 and the second selector 232 connect to the terminal"!", data line is as shown in Fig. 6. That is, data of the internal memory IMEM are read out and written in the external memory EMEM via the input buffer 221 and the output buffer 222.
[0025]
In this first embodiment, the case of Fig. 5 is described. That is, in this first
embodiment, the selection terminals of both of the first selector 231 and the second selector 232 are connected to the terminal'O". In this configuration, the ROI read control unit 241 reads out the data from the external memory EMEM and stores them in the internal memory IMEM.
[0026]
Fig. 7 and Fig. 8 are flowcharts showing operation of data transferring.
[0027]
At Step ST101, values of parameters are set.
Specifically, values of
EMEM_start_address,
element_width,
ROI_width,
element_offset,
ROI height and
ROI offset are set.
[0028]
EMEM_start_address is an address value from which ROI starts in the external memory EMEM. For example, in Fig. 1 , the value of the EMEM_start_address is "0".
[0029]
The value of element width is, in this embodiment, one byte. Here, "element" means one unit when writing or reading data and, for example, accords to color data or brightness data of one pixel.
[0030]
The ROI width is the width of ROI in the two-dimensional image data. Here, as shown in Fig. 2, a row of ROI has five elements, that is, ROI_width is 5 bytes.
[0031]
The element_offset means the distance between continuous data in the external memory EMEM. In this example, the value of the element offset is four. In this example, four elements in height are bundled as one stripe. Accordingly, there are inserted four elements between two continuous data in the external memory EMEM. In Fig. 1 , for example, there are four elements of bytes between "00" and "01". Thus, element offset is the distance of continuous data in the external memory EMEM, and accords to the size of "stripe".
[0032]
ROI height is calculated from dividing the number of bytes of ROI in height of the two- dimensional image data I0 by the result of [element_offset χ element width].
In this example, ROI_height is "2".
The ROI of this example has eight rows in height in the two-dimensional image data I0. Moreover, one stripe has four elements in height. Accordingly, the ROI has two stripes in height. That is, the ROI_height is also the height of the ROI in the external memory measured in stripes, and is also calculated by dividing the number of rows in height by the number of elements of stripe. Furthermore, because the size of stripe is [element offset x element width], ROI_height is also calculated by dividing the number of bytes of ROI in height by [element_offset χ
element_width].
[0033]
That is,
ROI_height = the height of ROI(byte) ÷ [element offset (byte) χ element_width (byte)]
2 = 8 ÷ (4x l)
[0034]
ROI offset is the distance from a head of row to a head of next row of ROI in two- dimensional image data, and is equal to the width of the image data. In this embodiment, ROI_offset is 16 bytes.
[0035]
After setting those parameters above, a count value of a stripe counter (SCNT) is initialized (ST102), and a count value of a row counter (RCNT) is initialized (ST103).
[0036]
Next, data position which should be extracted is calculated (ST104).
To rearrange interlaced data in the external memory EMEM to non interlaced data, it is necessary to read out data from the external memory EMEM in order of non interlaced data. That is, though "10", "20" and "30" are inserted between "00" and "01" in the external memory EMEM, "01" should be extracted after "00" skipping"10", "20" and "30". Thus, it is necessary to calculate positions of data to be extracted in order. For position calculation, a variable x is used. The variable x is an integer number equal to or more than 0; in this embodiment the variable x is one of 0, 1, 2, 3 and 4 because five data should be extracted per row. Position calculation is executed as following.
[0037]
Position for input buffer = [(RCNT) +x χ (element_offset)]
[0038]
In this embodiment, because the element_offset is "4",
[0039]
Position = RCNT+x*4,
where x = 0, 1, 2, 3, 4.
[0040]
Because RCNT =0
[0041]
P000 = 0+0x4 = 0
P001 = 0+1 x4 = 4
P002 = 0+2x4 = 8
P003 = 0+3 4 = 12
P004 = 0+4x4 = 16
[0042]
"0", "4", "8", "12" and "16" are calculated as data positions.
[0043]
At ST105, determined is whether data corresponding to the calculated positions and the given stripe counter (SCNT) exist in the input buffer 221. Since data have not been read out from the external memory EMEM to the input buffer 221 yet so far, there is no data in the input buffer 221 (ST 105: NO).
[0044]
At ST106, data is read in to the input buffer 221 from the external memory EMEM. At this point, to make the most of the capability of the bus 130, the capacity of the bus 130 of data are read-in in block. In this embodiment, the capacity of the bus 130 is set to 16 bytes.
Furthermore, positions of data in the external memory, which data should be transferred to the input buffer, are calculated by the equation:
[0045]
Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI_offset) χ
(element_offset) (element_width)]
[0046]
That is, as shown in Fig. 9, 16 data (16-byte data) from the start address of the external memory EMEM are read in to the input buffer 221 (ST 106).
[0047]
After data are read in to the input buffer 221 , data corresponding to positions "0", "4", "8", "12" and "16" are extracted (ST107). As shown in Fig. 10 (C), data "00", "01", "02", "03" as data corresponding to positions "0", "4", "8", "12" are extracted.
However, because data corresponding to position "16" does not exist in the input buffer 221 yet, this data cannot be extracted at this timing. The extracted data are stored in the output buffer 222.
[0048]
Next, at ST 109, it is determined whether the output buffer 222 stores data enough to send them to the internal memory IMEM. To make the most of the capability of the bus 130, it is preferable to send the capacity of the bus of data in block when sending data from the output buffer 222. Here, because the capacity of the bus is 16 bytes, it is determined whether the output buffer 222 stores 16-byte data. As shown in Fig. 10(C), because only four (4 bytes) are stored so far, the determination at ST109 is "NO".
[0049]
In the case where the determination at ST109 is "NO", next, at ST111, determined is whether ROI width of data has been extracted from current row. Now, four data from row'O" are extracted, but ROI width of data are five. It means that not all data of current row'O" are extracted yet (ST111 : NO).
[0050]
In this case, back to ST 104, the new position is calculated and it is determined whether data corresponding to the calculated position and given stripe counter (SCNT) exists in the input buffer 221 (ST105). If it does not exist (ST105: NO), further data from the external memory EMEM are read in to the input buffer 221 (ST106). Next 16-byte data are read out as shown in Fig. 11.
[0051]
Data corresponding to position "16" exists in the input buffer 221, so this data is extracted (ST107) and stored in the output buffer 222 (ST108).
[0052]
Next, because the output buffer 222 does not store enough data to send (ST109: NO), at ST111 , determined is whether ROI width of data have been extracted from the current row. This time, because five data of row'O" have already been extracted, all data of the current row are extracted (ST111 : YES). [0053]
After all data of row'O" are extracted, determined is whether operation should advance to the next row. That is, determined is whether any row in the current stripe has not been processed (STl 12). At present, because RCNT=0 and only row'O" has been processed, there are three unprocessed rows in the current stripe "0".
Because not all rows of the current stripe are processed (STl 12: NO), operation advances to the next row in the same stripe. That is, at STl 13, the row counter is counted up and the RCNT becomes "1".
[0054]
After making RCNT to be "1", the operation goes back to ST 104 and position calculation is executed. Because current RCNT is 1 , position calculation is executed as following.
[0055]
P010 = 1+0x4 = 1
P011 = 1+1 x4 = 5
P012 = 1+2x4 = 9
P013 = 1+3x4 = 13
P014 = 1+4x4 = 17
[0056]
Now, in the input buffer, data from position 16 (value 04) are stored so that data position 1, 5, 9 and 13 do not exist in the input buffer (ST105: NO).
Hence, as shown in Fig. 12, 16 byte- data are read out from the external memory to the input buffer once again (STl 06), following which data corresponding to positions 1 , 5, 9 and 13 are extracted (ST107). That is, as shown in Fig. 12, "10", "11", "12", and "13" are extracted (ST107), and stored in the output buffer 222 (STl 08). As for data "14" corresponding to position "17", the operations (ST111 ,ST104,ST105,ST106,ST107) which are used for data "04" mentioned above, is used in same manner.
[0057]
In steps so far, the output buffer 222 has stored 10 pieces of data (10 bytes), but it does not reach 16 bytes (ST109: NO). Hence while counting up the row counter (STl 13), ST104, ST105, ST106, ST107, ST108, ST109, ST112 and ST113 are repeated.
[0058]
When the RCNT=2, position calculation (ST 104) is executed as following.
[0059] P020 = 2+0x4 = 2
P021 = 2+1 x4 = 6
P022 = 2+2x4 = 10
P023 = 2+3x4 = 14
P024 = 2+4x4 = 18
[0060]
Further, when RCNT=3, position calculation (ST104) is executed as following.
[0061]
P030=3+0x4=3
P031=3+l x4=7
P032=3+2x4=l l
P033=3+3x4=15
P034=3+4x4=19
[0062]
Here, data corresponding to the calculated positions {2, 6, 10, 14, 18, 3, 7, 11 , 15, 19} are extracted (ST 107), and stored in the output buffer 222 (ST 108). However, as shown in Fig. 13, the amount of stored data reaches 16 bytes when data "30" corresponding to position "3" is stored in the output buffer 222, and the next data corresponding to position "7" cannot be stored. When data "30" corresponding to position "3" is stored in the output buffer 222, the output buffer 222 stores enough data to send (ST109: YES), and the output buffer 222 sends the stored data to the internal memory IMEM (ST 110).
[0063]
After data is sent to the internal memory IMEM (ST110), as shown in Fig. 14, data corresponding to "7", "11", "15", "19" are extracted (ST107), these data are stored in the output buffer 222 (ST 108).
[0064]
At this point, five data of row"3" have been extracted (ST111 : YES). Next, at ST112, determined is whether all rows of the current stripe have been processed. While stripe'O" is currently processed, rows "0", "1", "2" and "3" of stripe'O" have been processed. Here, one stripe has four rows. (Note that it corresponds to the value of the element_offset.) That is, all rows of stripe'O" have been processed (ST112: YES).
[0065]
The operation advances to the next stripe. At ST114, determined is whether all stripes have been processed. Because there are stripe'O" and stripe "1" and only stripe "0" has been processed, not all stripes have been processed yet (STl 14: NO). In this case, the stripe counter is counted up (STl 15). Then the process goes back to ST103, and the row counter is reset to "0".
[0066]
At ST 104, position calculation is executed.
The position of data which should be extracted is calculated as following.
[0067]
Position for input buffer = [(RCNT) +x χ (element_offset)]
[0068]
Thus, position calculation when SCNT=1 and RCNT= 0 is executed as following.
However, note that SCNT does not appear in the equation for position calculation for input buffer.
[0069]
PI 00=0+0x4=0
P 101=0+1 4=4
PI 02=0+2x4=8
P103=0+3 x4=12
PI 04=0+4x4=16
[0070]
Determined is whether data corresponding to the calculated positions and given stripe counter exist in the input buffer 221 (STl 05).
Currently, data stored in the input buffer are corresponding to SCNT =0 and hence data corresponding to position "0", "4", "8", "12", "16" under SCNT =1 , which data should be next extracted, do not exist in the input buffer 221 (ST 105: NO).
Hence, data are read in from the external memory EMEM (STl 06).
Here, positions of data in the external memory, which data should be transferred to the input buffer, are calculated by the equation:
[0071]
Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI_offset) χ
(element offset) χ (element_width)]
[0072]
Here, the second term indicates the position of the head of stripe "1".
Now that stripe counter is "1",
[0073]
(the second term) = 1 x 16x4 = 64 [0074]
Hence, data from position "64" that corresponds to the head of stripe "1", are
transferred to the input buffer from the external memory EMEM.
[0075]
Data "40", "41", "42", "43" corresponding to positions 0, 4, 8 and 12 are extracted
(ST107). Extracted data are stored in the output buffer 222 (ST108).
[0076]
In the following operation, loops are repeated as described above, and rows of stripe" 1" are processed sequentially. When all rows of stripe "1" have been processed (ST112: YES), determined is whether all stripes have been processed (ST114). In this embodiment, because there are stripe'O" and stripe" 1", all stripes have been processed by processing stripe" 1" (ST 114: YES).
Hence, after sending data in the output buffer to the internal memory IMEM, the operation is terminated here.
[0077]
In this way, it is shown that the interlaced data in the external memory EMEM can be read out as nori interlaced data efficiently by direct memory access. In this embodiment, by setting the parameters, position calculation can be executed with facility, even though data are interlaced. As a result, when reading out interlaced data and storing them as non interlaced data, efficient data transferring using direct memory access can be realized. Furthermore, the output buffer stores data up to the limit of the bus bandwidth and then the data are sent to the internal memory in block. Accordingly, by making the most of the bus bandwidth, it is possible to reduce the number of clock cycles for data transferring.
[0078]
[Second embodiment]
Next, described is exemplary second embodiment of the present invention. The second embodiment performs reverse operation of the first embodiment. That is, as shown in Fig. 16, non interlaced data in an internal memory IMEM are written back to an external memory EMEM as interlaced data.
[0079]
The configuration of the image processing device is the same as that of the first embodiment (Fig. 3, Fig. 4). However, in this second embodiment, because non interlaced data in the internal memory IMEM are written back to the external memory EMEM as interlaced data, selection terminals of both of the first selector 231 and the second selector 232 are connected to the terminal "1" (refer to Fig. 6). That is, data of the internal memory IMEM are read out and written into the external memory EMEM via the input buffer 221 and output buffer 222.
[0080]
Fig. 17 and Fig. 18 are a flowcharts showing operation of data transferring in the second embodiment.
Firstly, at ST201, the values of parameters are set.
Specifically, values of
EMEM_start_address,
element width,
ROI width,
element offset,
ROI height and
ROI offset are set.
Meanings and values of each parameter are the same as those of the first embodiment.
[0081]
After setting those parameters above, a count value of a stripe counter is initialized (ST202), and a count value of a row counter is initialized (ST203).
[0082]
At ST204, determined is whether there is data in the input buffer 221. If at least one data exists in the input buffer 221, the determination is YES. However, because data has not been read out from the internal memory IMEM to the input buffer 221 yet, there is no data in the input buffer 221 (ST204: NO). At ST205, data are read out from the internal memory IMEM. At this point, to make the most of the capability of the bus 130, the capacity of the bus 130 of data are read in block. As shown in Fig. 19, 16-byte data are read in to the input buffer 221 (ST205).
[0083]
Now, for sending data in the input buffer 221 to the output buffer 222, the ROI write control unit 242 picks up data in the input buffer 221 from the head sequentially (ST206).
Alternatively, it is possible to pick up ROI width of data in block. Here, because ROI width is 5, the ROI write control unit 242 picks up five data from the head. That is, from the head, data "00", "01", "02", "03", "04",■■■ - are picked up. For storing the picked data to the output buffer 222, positions in which the data should be stored in the output buffer 222 are calculated (ST207).
[0084]
The positions can be calculated by the same equation as the first embodiment.
Position for input buffer = [(RCNT) +x χ (element_offset)] [0085]
Currently, [EMEM_start_address] is "0" and SCNT is also "0".
The element offset is "4".
Accordingly, the first position is calculated as following.
Position=RCNT+x*4
Where x = 0
P000=0+0x4 = 0
Thus, for data'OO", its position is"0".
[0086]
In the same way,
Position for data "01 " is
P001=0+l x4=4.
Position for data "02" is
P002=0+2x4=8.
Position for data "03" is
P003=0+3 x4=12.
Position for data "04" is
P004=0+4x4=16.
(ST207)
[0087]
Picked data "00", "01", "02", "03", "04", -— are stored at calculated positions (ST208). That is, as shown in Fig. 20, data'OO" is stored to position "0" in the output buffer 222.
[0088]
In the same way, data "01" is stored at position 4, data"02" is stored at position 8, and data "03" is stored at position 12.
[0089]
Here, the position for data "04" is calculated to be "16". But because the output buffer 222 can only store 16 bytes, data "04" cannot be stored.
[0090]
Hence, at ST209, after data stored in the output buffer 222 are sent to the external memory EMEM, the output buffer 222 is cleared.
Here, when storing the data in the external memory EMEM, starting address position is defined by the following equation:
Position = [EMEM_start_address]+[(SCNT) χ (ROI_offset) χ (element_offset) χ (element width)]
Note that [EMEM_start_address] =00 and (SCNT) =0.
As shown in Fig. 21, each data is stored in the external memory EMEM at the position reflecting its stored position in the output buffer 222.
[0091]
Next, determined is whether ROI width of data in the current row have been processed (ST210). Currently, four data in row'O" have been processed, but, ROI width of data are five. Hence, not all data of current row'O" have been processed yet (ST210: NO). In this case, operation goes back to ST204.
[0092]
At ST206, data "04" is newly picked up, and position calculation is executed (ST207). Position for data"04" is calculated as following.
P004=0+4*4=16
[0093]
At ST208, as shown in Fig. 22, the data "04" is stored at the position "16" in the output buffer 222. Here, because positions "0" to "15" for row'O" have been sent first and the output buffer 222 is cleared once, the head of the output buffer 222 is numbered as "16" this time. And at ST209, when data of the output buffer 222 is sent to the external memory EMEM, the data "04" is stored at position "16" of the external memory EMEM, as shown in Fig. 22.
[0094]
At ST210, determined is whether ROI width of data in the current row have been all processed. Because five data of row'O" have been processed this time, all data of current row'O" have been processed (ST210: YES).
[0095]
Next, determined is whether there is an unprocessed row in the current stripe (ST211).
Because current RCNT is "0" and only row'O" has been processed, there remain three
unprocessed rows in the current stripe "0". Because not all rows of the current stripe are processed (ST211 : NO), operation advances to the next row in the same stripe. That is, at ST212, the row counter is counted up and the RCNT becomes "1".
[0096]
The RCNT is set to be "1 " and the process goes back to ST204. After data is picked up from the input buffer 221 (ST206), position calculation is executed (ST207). Here, data "10", "11", "12", "13", "14" are picked up from the input buffer 221. Because current RCNT is "1", position calculation is executed as following. [0097]
Position for data "10" is
P010=l+0x4=l .
Position for data "11" is
P011=l+l x4=5.
Position for data "12" is
P012=l+2x4=9.
Position for data "13" is
P013=l+3x4=13.
Position for data "14" is
P014=l+4x4=17.
[0098]
In this way, because positions for data are calculated, these data are stored in the output buffer 222 at each calculated position. Consequently, each data is stored in the output buffer 222 as shown in Fig. 23. (Here, position for data "14" is calculated as "17". But because the output buffer 222 can only contain 16 bytes, data" 14" whose position is "17" cannot be stored at this time. It is easily understood that data "14" can be stored in the external memory EMEM at next loop (ST204, ST206, ST207,ST208) by the same manner for ROW'0".
[0099]
At ST209, after data stored in the output buffer 222 is sent to the external memory EMEM, the output buffer 222 is cleared. As shown in the Fig. 23, data are stored in the external memory EMEM at the position reflecting their stored position in the output buffer 222. In this way, as shown in Fig. 23, data are stored in the external memory EMEM.
[0100]
By executing each step according to the flowchart (ST204-ST210), row"2" and row"3" are processed (Fig. 24). That is, when RCNT is "2", position calculation is executed as following (ST207).
[0101]
Position for data "20" is
P020=2+0x4 = 2.
Position for data "21" is
P021=2+1 4=6.
Position for data "22" is
P022=2+2x4=10. Position for data "23" is
P023=2+3 x4=14.
Position for data "24" is
P024=2+4x4=18.
[0102]
Furthermore, when RCNT is "3", position calculation is executed as following (ST207).
[0103]
Position for data "30" is
P030=3+0x4=3.
Position for data "31 " is
P031=3+1 4=7.
Position for data "32" is
P032=3+2x4=l l .
Position for data "33" is
P033=3+3 x4=15.
Position for data "34" is
Ρ034=3+4χ4=19.
[0104]
After sending data of row"3" to the external memory EMEM (ST209, ST210, as shown in Fig. 24), determined is whether all rows of the current stripe have been processed (ST211). By now, all rows of the stripe'O" are processed (ST211 : YES). In this case, determined is whether all stripes have been processed (ST213). Here, ROI height is "2", and there are stripe'O" and stripe "1". Since not all stripes have been processed (ST213: NO), the stripe counter is counted up (ST214). Then the process goes back to ST203, and the row counter is reset to "0".
[0105]
Thus, when SCNT is "1" and RCNT is "0", position calculation for data "40" is executed as following (ST207).
Position for input buffer = [(RCNT) +x χ (element offset)]
PI 00= [0+0x4]
= 0
(where x=0)
That is, position for data "40" is calculated as "0".
[0106] Further, position calculations are preformed for data "41", "42", "43", "44".
[0107]
Position for data "41 " is
PI 01 =0+1 4=4.
Position for data "42" is
P102=0+2x4=8.
Position for data "43" is
Ρ103=0+3 χ4=12.
Position for data "44" is
PI 04=0+4x4= 16.
[0108]
As shown in Fig. 25(B), data "40", "41", "42", "43", "44", are stored in the output buffer 222 at their calculated positions respectively (ST208). As shown in Fig. 25(C), data are stored in the external memory EMEM at the position reflecting their stored position in the output buffer 222.
Note that when storing the data in the external memory EMEM, starting address position is defined by the following equation:
Position = [EMEM_start_address]+[(SCNT) χ (ROI_offset) x (element offset) χ
(element_width)]
Here, [EMEM start address] =00 and (SCNT) =1 , hence, starting address position is
"64".
(the second term) = 1 χ 16x4 = 64
[0109]
Thus, by processing rows "0", "1", "2", "3" and "4", non interlaced data in the internal memory IMEM are written to the external memory EMEM as interlaced data. When the row "4" of the stripe "1" has been processed, all rows of the stripe "1" have been processed (ST211 : YES) and, further, all stripes have been processed (ST213: YES). Therefore, operation is terminated.
[0110]
In this way, it is shown that non interlaced data in the internal memory IMEM can be written to the external memory EMEM as interlaced data. In this embodiment, by setting the parameters, position calculation can be executed with facility. As a result, when reading out non interlaced data and storing them as interlaced data, it is possible to transfer data efficiently using direct memory access. Furthermore, because the bus bandwidth of data are read out in block to the input buffer, it is possible to reduce the number of clock cycles for data transferring by making the most of the bus bandwidth.
[0111]
(Applied example 1)
Next, an applied example 1 is explained below. As the applied example 1, described is an applied example of the first embodiment. A flowchart used for explanation of the applied example 1 is the same as that of the first embodiment. In the applied example 1 , as shown in Fig. 26, continuous data are stored in the external memory EMEM. One column in the continuous data is the ROI.
Here considered is the case where only this thin ROI is read out and stored in the internal memory IMEM. Such data transferring is implemented by the same way as the first embodiment.
[0112]
Firstly, at ST101 , the values of parameters are set.
That is, values of
EMEM_start_address,
element_width,
ROI width,
element_offset,
ROIJieight and
ROI offset are set.
[0113]
In the applied example 1 (Fig. 26), ROI has 16 rows, each row having one byte.
The values of the parameters are set as following.
[0114]
EMEM_start_address = 02,
element width = 1 ,
ROI_width = 1 ,
element_offset = 1 ,
ROIJieight = 16,
ROI_offset = 16.
[0115]
Here, in the applied example 1, the element offset is "1". This means that one stripe is assumed to be made up of one row. That is, ROI has stripe'O" to stripe "15", and each stripe is made up of row'O".
[0116]
Each step is executed according to a flowchart (refer to Fig. 27). When SCNT=0 and RCNT=0, position calculation (STl 04) is executed as following.
[0117]
Position for input buffer = [(RCNT) +x (element_offset)]
P000 = [0+0x 1 ] = 0
Here, note that at 106, positions of data in the external memory, which data should be transferred to the input buffer, are calculated by the equation:
Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI offset) χ
(element offset) x (element_width)]
Position for EMEM = 02+ 0 16 1 1=02
[0118]
Accordingly, data "02" can be extracted as first data.
[0119]
Since ROI_width is "1", ROI_width of data has been extracted in the current row (STl 1 1 : YES). Further, since each stripe is made up of one row, all rows has been processed (STl 12: YES). Hence, operation advances to the next stripe (STl 15).
[0120]
At the next stripe, since SCNT=1 and RCNT=0, position calculation is executed as following.
Position for input buffer = [(RCNT) +x χ (element offset)]
P100 = [0+0x 1 ] = 0
Here, note that at 106, positions of data in the external memory, which data should be transferred to the input buffer, are calculated by the equation:
Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI offset) χ
(element offset) χ (element width)]
Position for EMEM = 02+ 1 x 16x 1 1=18
[0121]
Accordingly, data "12", which is the eighteenth data, can be extracted.
[0122]
The following operation is advanced in the way above, and thin ROI can be extracted.
[0123]
(Applied example 2) An applied example 2 is described below as another applied example of the first embodiment. A flowchart used for explanation of the applied example 2 is the same as that of the first embodiment. In the applied example 2, as shown in Fig. 28, continuous data are stored in the external memory EMEM. Data in this external memory EMEM are ROI, and data are extracted at four data intervals. For example, it is assumed that data stored in the external memory EMEM are RGB A (Red-Green-Blue-Alpha) data and that the image processing unit 210 processes Red data, Green data, Blue data and transparence (alpha) data independently. In this case, it is necessary that Red data, Green data, Blue data and transparence (alpha) data should be read out independently and be stored independently in the internal memory IMEM.
[0124]
Also in the applied example 2, firstly, at ST101, the values of parameters should be set.
That is, values of
EMEM_start_address,
element width,
ROI_width,
element_offset,
ROI height and
ROI_offset are set.
[0125]
In the applied example 2 (Fig. 28), according to the definitions of parameters mentioned in the first embodiment, the values of the parameters are set as following.
[0126]
EMEM_start_address = 0,
element width = 1 ,
ROI width = 64,
element offset = 4,
ROI_height = l, and
ROI_offset = 64.
[0127]
Here, element offset is 4.
[0128]
Furthermore, ROI height is 1. ROI height is calculated from dividing the number of bytes of ROI in height by the result of [element_offsetxelement_width]. Because the number of bytes of ROI in height is "4" and [element_offsetxelement_width] is 4, ROI_height is 1. This means that one stripe is considered to be made up of four rows.
[0129]
However, in the applied example 2, since it is not necessary to set the value of
ROI offset, ROI offset may be set as "0".
[0130]
Each step is executed according to the flowchart when SCNT=0 and RCNT=0, position calculation (STl 04) is executed as following.
Position = [(RCNT) + x χ (element_offset)]
P000= [0+0x4] = 0
P001= [0+lx4] = 4
P002= [0+2x4] = 8
P003= [0+3x4] = 12
P004= [0+4x4] = 16
P0062 = [0+62x4] = 248
P0063 = [0+63x4] = 252
[0131]
Thus, data from "00" to "252 (= fc)" can be extracted at four data intervals.
[0132]
In the current row "0", ROI_width of data (=64) have been extracted (STl 11 : YES). Here, because stripe "0" is made up of four rows (row'O" to row"3"), even though row'O" has been processed, not all rows of current stripe'O" have been processed (STl 12: NO). So by counting up the row counter (STl 13), RCNT becomes row"l", and operation goes back to position calculation (ST 104).
[0133]
Thus,
Position = [(RCNT) + x χ (element_offset)]
P010 = [1+0x4] = 1
P011 = [1+1 x4] = 5
P012 = [l+2x4] = 9
P013 = [1+3x4] = 13
P014 = [1+4x4] = 17 P0162 = [1+62x4] = 249
P0163= [1+63 x4] = 253
[0134]
Thus, data from "01" to "253 (= fd)" can be extracted at four data intervals.
[0135]
In this way, further, by executing position calculation for row"2" and row "3" and extracting data from the external memory EMEM, as shown in Fig. 28, it is shown that red data, green data,— , can be independently read out and stored in the internal memory IMEM.
[0136]
(Applied example 3)
An applied example 3 is described below as an applied example of the second embodiment. A flowchart used for the applied example 3 is the same as that of the second embodiment. The applied example 3 is reverse version of the applied example 1 , that is, as shown in Fig. 29, ROI data stored in the internal memory IMEM are written back to the external memory EMEM. Here, ROI in the external memory EMEM has 16 rows, each row having one byte.
[0137]
Firstly, at ST201, the values of parameters are set. The values of the parameters are set as following.
[0138]
EMEM_start_address=02,
element width = 1 ,
ROI_width = 1,
element_offset = 1 ,
ROI_height = 16, and
ROI_offset = 16.
[0139]
These values of the parameters are the same as the applied example 1.
[0140]
Each step is executed according to the flowchart. When SCNT=0 and RCNT=0, position calculation (ST207) is executed as following.
Position = [(RCNT) + x (element_offset)]
P000= [0+0x 1] = 0 [0141]
Thus, since position for first data "02" is "0", this data is written to the external memory EMEM at the position "02" via the output buffer 222 (ST208, ST209).
Here, note that when storing the data in the external memory EMEM, starting address position is defined by the following equation:
Position = [EMEM_start_address]+[(SCNT) χ (ROI_offset) x (element_offset) χ
(element_width)]
Because [EMEM_start_address] =02 and (SCNT) =0, position is "02".
[0142]
Because ROI width is " 1 ", all data of the current row have been extracted (ST210:
YES). Furthermore, because each stripe is made up of one row, all row of the current stripe have been processed (ST213: YES). Then operation advances to the next stripe (ST214).
[0143]
Because SCNT = "1" and RCNT=0 for the next stripe, position calculation for the next stripe is executed as following.
Position = [(RCNT) + x χ (element offset)]
P100 =[0+0x 1] = 0
When storing the data in the external memory EMEM (ST 209), starting address position is defined by the following equation:
Position = [EMEM_start_address]+[(SCNT) χ (ROI_offset) χ (element offset) χ
(element_width)]
Because [EMEM start address] =02 and (SCNT) =1, position is "18".
[0144]
Accordingly, second data "12" is written at position "18".
[0145]
By advancing the following operation in the way above, thin ROI can be written back.
[0146]
(Applied example 4)
An applied example 4 is described below as another applied example of the second embodiment. A flowchart used for the applied example 4 is the same as that of the second embodiment. The applied example 4 is reverse version of the applied example 2, that is, as shown in Fig. 30, ROI data stored in the internal memory IMEM are written back to the external memory EMEM.
[0147] Firstly, at ST201, the values of parameters are set. The values of the parameters are set as following.
[0148]
EMEM_start_address = 0
element_width = 1 ,
ROI_width = 64,
element_offset = 4
ROIJieight = 1
ROI_offset = 64
[0149]
These values of the parameters are the same as those in the applied example 2.
[0150]
Operations are executed according to the flowchart. When SCNT=0 and RCNT=0, position calculation (ST207) is executed as following.
Position = [(RCNT) + x χ (element_offset)]
P000= [0+0x4] = 0
P001= [0+1 4] = 4
P002= [0+2x4] = 8
P003= [0+3x4] = 12
P004= [0+4x4] =16
P0062= [0+62x4] = 248
P0063= [0+63x4] = 252
[0151]
Thus, because positions for data in the internal memory IMEM "00", "04", "08" · can be calculated, these data are written at each position in the external memory EMEM via the output buffer 222. Now, position calculations for 64 data, that is ROI width of data, have been finished, and data is written back so that data "fc" in the internal memory IMEM is written back to position "252".
[0152]
Since 64 data of the current row, that is ROI width of data, have been processed (ST210: YES), the row counter is counted up to "1" (ST212), operation is back to position calculation (ST207). [0153]
Thus,
Position = [(RCNT) + x χ (element_offset)]
P010= [l+0x4]=l
P011= [l+l x4]=5
P012= [l+2 4]=9
P013= [l+3x4]=13
P014= [l+4x4]=17
P0162= [l+62x4]=249
P0163= [l+63x4]=253
[0154]
Thus, positions for data "01", "05", "09"·■■ are calculated, and data is written back so that data "fd" in the internal memory IMEM is written back to position "253".
[0155]
Further position calculation for row"2" and row"3" are executed and data in the internal memory IMEM can be written back to the external memory EMEM.
[0156]
While the invention has been particularly shown and described with reference to exemplary embodiments thereof, the invention is not limited to these embodiments. It will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the claims.
Industrial applicability
[0157]
The present invention can be applied to a method and an apparatus for an image processing.
Reference Signs List
[0158]
EMEM EXTERNAL MEMORY IMEM INTERNAL MEMORY 100 IMAGE PROCESSING DEVICE
110 CPU
130 BUS
140 PARAMETER REGISTER
200 IMAGE PROCESSOR
210 IMAGE PROCESSING OPERATION UNIT
220 BUFFER UNIT
221 INPUT BUFFER
222 OUTPUT BUFFER
230 SWITCHING UNIT
231 FIRST SELECTOR
232 SECOND SELECTOR
240 DMA CONTROLLER
241 ROI READ CONTROL UNIT
242 ROI WRITE CONTROL UNIT

Claims

[Claim 1]
A data transferring method for transferring interlaced ROI data stored in an external memory to an internal memory as non-interlaced data using direct memory access control, comprising:
setting a value of EMEM_start_address as an address value from which ROI starts in the external memory;
setting a value of element_width as bytes of width per one unit of data;
setting a value of ROI width as the width of ROI in two-dimensional image data;
setting a value of element_offset as the distance between non-interlaced data elements in the interlaced data field;
setting a size of stripe same as the value of the element offset;
setting a value of ROI height as height of ROI measured in unit of the stripe;
setting a value of ROI offset as the distance from a head of row to a head of next row of
ROI in two-dimensional image data in units of element offset;
reading out to an input buffer data from the external memory defined by the equation: Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI_offset) χ (element_offset) (element_width)]
calculating the element positions in input buffer according to the following equation
Position for input buffer = [(RCNT) + x χ (element_offset)j
Where SCNT is a count value of stripe counter, RCNT is a count value of row counter and variable x is an integer number from 0 to ROI_width-l,
extracting data corresponding to the calculated position for input buffer from the input buffer and storing them in an output buffer;
Sending data stored in the output buffer to the internal memory.
[Claim 2]
The data transferring method according to claim 1 , further comprising,
storing data in the output buffer up to the limit of bus bandwidth,
sending the bus bandwidth of data in block from the output buffer to the internal memory.
[Claim 3] A DMA controller for transferring interlaced ROI data stored in an external memory to an internal memory as non-interlaced data using direct memory access control, setting a value of EMEM_start_address as an address value from which ROI starts in the external memory;
setting a value of element_width as bytes of width per one unit of data;
setting a value of ROI_width as the width of ROI in two-dimensional image data;
setting a value of element_offset as the distance between non-interlaced data elements in the interlaced data field;
setting a size of stripe same as the value of the element_offset;
setting a value of ROI height as height of ROI measured in unit of the stripe;
setting a value of ROI offset as the distance from a head of row to a head of next row of ROI in two-dimensional image data in units of element offset;
reading out to an input buffer data from the external memory defined by the equation: Position for EMEM = [EMEM_start_address] + [(SCNT) (ROI_offset) x (element_offset) χ (element width)]
calculating the element positions in input buffer according to the following equation Position for input buffer = [(RCNT) + x (element offset)]
Where SCNT is a count value of stripe counter, RCNT is a count value of row counter and variable x is an integer number from 0 to ROI_width-l,
extracting data corresponding to the calculated position for input buffer from the input buffer and storing them in an output buffer;
Sending data stored in the output buffer to the internal memory.
[Claim 4]
An image processing device comprising:
the DMA controller according to claim 3, and
an image processor having array of image process elements.
[Claim 5]
A data transferring method for transferring non interlaced data stored in an internal memory to an external memory as interlaced ROI data using direct memory access control, comprising:
setting a value of EMEM_start_address as an address value from which ROI starts i the external memory;
setting a value of element width as bytes of width per one unit of data; setting a value of ROI width as the width of ROI in two-dimensional image data;
setting a value of element offset as the distance between non-interlaced data elements in the external memory;
setting a size of stripe as same as the value of the element_offset;
setting a value of ROI_height as height of ROI measured in unit of the stripe;
setting a value of ROI offset as the distance from a head of row to a head of next row of ROI in two-dimensional image data in units of element offset;
reading out data from the internal memory to a input buffer;
taking out sequentially elements from the input buffer and storing them into an output buffer at calculated positions according to the following equation:
Position for input buffer = [(RCNT) + x χ (element_offset)]
sending the data stored in the output buffer to the external memory at the address defined by the equation:
Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI_offset) χ (element offset) χ (element_width)] ,
where SCNT is a count value of stripe counter, RCNT is a count value of row counter and variable x is an integer number from 0 to ROI_width-l .
[Claim 6]
The data transferring method according to claim 5, further comprising:
reading out the bus bandwidth of data in block from the internal memory and storing them in the input buffer.
[Claim 7]
A DMA controller for transferring non interlaced data stored in an internal memory to an external memory as interlaced ROI data using direct memory access control, comprising: setting a value of EMEM_start_address as an address value from which ROI starts in the external memory;
setting a value of element width as bytes of width per one unit of data;
setting a value of ROI width as the width of ROI in two-dimensional image data;
setting a value of element_offset as the distance between non-interlaced data elements in the interlaced data field;
setting a size of stripe as same as the value of the element_offset;
setting a value of ROI height as height of ROI measured in unit of the stripe; setting a value of ROI offset as the distance from a head of row to a head of next row of ROI in two-dimensional image data in units of element_offset;
reading out data from the internal memory to an input buffer;
taking out sequentially elements from the input buffer and storing them into an output buffer at calculated positions according to the following equation:
Position for input buffer = [(RCNT) + x x (element offset)],
sending the data stored in the output buffer to the external memory at the address defined by the equation:
Position for EMEM = [EMEM_start_address] + [(SCNT) χ (ROI_offset) * (element offset) χ (element_width)],
where SCNT is a count value of stripe counter, RCNT is a count value of row counter and variable x is an integer number from 0 to ROI_width-l .
[Claim 8]
An image processing device comprising:
the DMA controller according to claim 7, and
an image processor having array of image process elements.
PCT/JP2011/055873 2011-03-08 2011-03-08 Data transferring method, dma controller and image processing device WO2012120690A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/055873 WO2012120690A1 (en) 2011-03-08 2011-03-08 Data transferring method, dma controller and image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/055873 WO2012120690A1 (en) 2011-03-08 2011-03-08 Data transferring method, dma controller and image processing device

Publications (1)

Publication Number Publication Date
WO2012120690A1 true WO2012120690A1 (en) 2012-09-13

Family

ID=44513365

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/055873 WO2012120690A1 (en) 2011-03-08 2011-03-08 Data transferring method, dma controller and image processing device

Country Status (1)

Country Link
WO (1) WO2012120690A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014092551A1 (en) * 2012-12-13 2014-06-19 Mimos Berhad System and method for optimal memory management between cpu and fpga unit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5585864A (en) * 1992-06-24 1996-12-17 Seiko Epson Corporation Apparatus for effecting high speed transfer of video data into a video memory using direct memory access
US20050212784A1 (en) * 2004-03-24 2005-09-29 Sunplus Technology Co., Ltd. Liquid crystal display system with a storage capability
JP2007034488A (en) 2005-07-25 2007-02-08 Canon Inc Dma controller and method
US20070162643A1 (en) 2005-12-19 2007-07-12 Ivo Tousek Fixed offset scatter/gather dma controller and method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5585864A (en) * 1992-06-24 1996-12-17 Seiko Epson Corporation Apparatus for effecting high speed transfer of video data into a video memory using direct memory access
US20050212784A1 (en) * 2004-03-24 2005-09-29 Sunplus Technology Co., Ltd. Liquid crystal display system with a storage capability
JP2007034488A (en) 2005-07-25 2007-02-08 Canon Inc Dma controller and method
US20070162643A1 (en) 2005-12-19 2007-07-12 Ivo Tousek Fixed offset scatter/gather dma controller and method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
S, NOMOTO: "Performance Evaluation of a Dynamically Switchable SIMD/MIMD Processor by Using an Image Recognition Application", IPSJ TRANSACTIONS ON SYSTEM LSI DESIGN METHODOLOGY, vol. 3, February 2010 (2010-02-01), pages 47 - 56, XP002663311 *
S, NOMOTO: "Performance Evaluation of a Dynamically Switchable SIMD/MIMD Processor by Using an Image Recognition Application", IPSJ TRANSACTIONS ON SYSTEM LSI DESIGN METHODOLOGY, vol. 3, February 2010 (2010-02-01), pages 47 - 56, XP002663311, DOI: doi:10.2197/ipsjtsldm.3.47

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014092551A1 (en) * 2012-12-13 2014-06-19 Mimos Berhad System and method for optimal memory management between cpu and fpga unit

Similar Documents

Publication Publication Date Title
US20070162643A1 (en) Fixed offset scatter/gather dma controller and method thereof
US6961084B1 (en) Programmable image transform processor
US5657485A (en) Program control operation to execute a loop processing not immediately following a loop instruction
US20070091378A1 (en) Universal fixed-pixel-size ISP scheme
US8305495B2 (en) Video processing device, video display device, and video processing method
US9703731B2 (en) Data transfer apparatus and data transfer method
EP2395473A1 (en) System, data structure, and method for simultaneously retrieving multi-dimensional data with zero contention
US20110173416A1 (en) Data processing device and parallel processing unit
US8078830B2 (en) Processor array accessing data in memory array coupled to output processor with feedback path to input sequencer for storing data in different pattern
US6785800B1 (en) Single instruction stream multiple data stream processor
WO2012120690A1 (en) Data transferring method, dma controller and image processing device
WO2010064374A1 (en) Image processing device
JP5829331B2 (en) Apparatus for simultaneously transferring data in a plurality of target areas (ROI) in a SIMD processor system in parallel
CN101399978B (en) Reference frame data reading method in hardware decoder and apparatus thereof
JP2008172410A (en) Imaging apparatus, image processing apparatus, image processing method, program for image processing method, and recording medium recorded with program for image processing method
US20050080784A1 (en) Data processing system
US8473679B2 (en) System, data structure, and method for collapsing multi-dimensional data
US20180095929A1 (en) Scratchpad memory with bank tiling for localized and random data access
JP2000069478A (en) Picture processor, picture processing method and storage medium
US7460718B2 (en) Conversion device for performing a raster scan conversion between a JPEG decoder and an image memory
US20070040842A1 (en) Buffer memory system and method
JP4929474B2 (en) Image processing device
US7362362B2 (en) Reformatter and method
JP4677581B2 (en) Data transfer control device and data transfer method
US7609272B1 (en) Partial texture loads

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11713378

Country of ref document: EP

Kind code of ref document: A1