CN114168505B - Image DMA controller and implementation method thereof - Google Patents
Image DMA controller and implementation method thereof Download PDFInfo
- Publication number
- CN114168505B CN114168505B CN202111439046.XA CN202111439046A CN114168505B CN 114168505 B CN114168505 B CN 114168505B CN 202111439046 A CN202111439046 A CN 202111439046A CN 114168505 B CN114168505 B CN 114168505B
- Authority
- CN
- China
- Prior art keywords
- data
- color
- format
- controller
- transparency
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title description 6
- 238000006243 chemical reaction Methods 0.000 claims abstract description 72
- 230000003139 buffering effect Effects 0.000 claims description 5
- 230000006870 function Effects 0.000 description 6
- 238000003672 processing method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/22—Microcontrol or microprogram arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention relates to a picture processing DMA controller, comprising: the foreground layer conversion module is used for reading source data of the foreground layer and converting the source data into data in a fixed format; the background layer conversion module is used for reading the source data of the background layer and converting the source data into data in a fixed format; the hybrid controller is used for fusing the data with the fixed formats respectively output by the foreground layer conversion module and the background layer conversion module to obtain new data with the fixed formats and outputting the new data to the output format conversion controller; and an output format conversion controller for converting the fixed format data into an image of a direct color mode for display. The professional DMA image controller designed by the invention supports the processing of all the current mainstream color formats, greatly reduces the load of a CPU and improves the performance of the system.
Description
Technical Field
The invention provides a DMA controller design for accelerating graphic processing in the field of embedded microcontrollers.
Background
In the embedded system, the CPU bears heavy processing tasks, particularly a large number of image processing tasks, and the professional image processing DMA can process images at high speed without participation of the CPU, thereby greatly reducing the load of the CPU and improving the performance of the MCU.
With the advent of the intelligent age, microcontrollers are increasingly widely used in the fields of consumer electronics and the like. How to improve the performance of the MCU and to increase the processing speed of the CPU as much as possible becomes a problem to be solved.
Disclosure of Invention
The invention aims to provide a DMA controller for processing images at high speed, which reduces the burden of a CPU when processing the images through the use of image DMA, thereby enabling the CPU to vacate more performance for other functions. Under the condition that the system clock frequency is unchanged, more tasks are completed, and therefore the purpose of high speed and low power consumption is achieved.
The technical scheme adopted by the invention for achieving the purpose is as follows: a picture processing DMA controller comprising:
the foreground layer conversion module is used for reading source data of the foreground layer and converting the source data into data in a fixed format;
the background layer conversion module is used for reading the source data of the background layer and converting the source data into data in a fixed format;
the hybrid controller is used for fusing the data with the fixed formats respectively output by the foreground layer conversion module and the background layer conversion module to obtain new data with the fixed formats and outputting the new data to the output format conversion controller;
and an output format conversion controller for converting the fixed format data into an image of a direct color mode for display.
The foreground layer conversion module includes:
the foreground layer cache is used for reading and caching foreground layer source data;
the foreground layer format conversion controller is used for processing the color and the transparency output by the foreground layer cache, obtaining data in an ARGB8888 format according to the color and the transparency, and outputting the data to the hybrid controller; the color adopts any one of the color of the source data, the color appointed in the foreground layer format conversion controller and the color searched by the foreground layer lookup table; the transparency adopts any one of transparency in the source data, transparency built in the foreground layer and product of the transparency of the source data and the transparency built in the foreground layer.
The foreground layer conversion module further comprises a foreground layer lookup table for pre-storing a set number of color values; when the indirect color mode is used, the corresponding color in the foreground layer lookup table is searched out according to the index value of the source data in the foreground layer format conversion controller and is output to the foreground layer format conversion controller.
The background layer conversion module includes:
the background layer cache is used for reading background layer source data and caching;
the background layer format conversion controller is used for processing the color and the transparency output by the background layer cache, obtaining ARGB8888 format data according to the color and the transparency, and outputting the data to the hybrid controller; the color adopts any one of the color of the source data, the color appointed in the background layer format conversion controller and the color searched out by the background layer lookup table; the transparency adopts any one of transparency in the source data, transparency built in the background layer, and product of the transparency of the source data and the transparency built in the background layer.
The background layer conversion module further comprises a background layer lookup table used for pre-storing a set number of color values; when the indirect color mode is used, the corresponding color in the background layer lookup table is retrieved according to the index value of the source data in the background layer format conversion controller and is output to the background layer format conversion controller.
The mixed controller is used for obtaining mixed data with a new fixed format according to the transparency of the data with the fixed format output by the foreground layer conversion module and the background layer conversion module and weighting operation of the data with the fixed format, and outputting the mixed data with the new fixed format to the output format conversion controller.
The fixed format is the ARGB8888 format.
The direct color mode is any one of ARGB8888, RGB888, RGB565, ARGB1555 and ARGB 4444.
The image processing DMA controller further comprises an output buffer for buffering the image of the direct color mode for output to the target area.
The invention has the following beneficial effects and advantages:
1. the invention adopts four different working modes, and is convenient and flexible to use.
2. The DMA image controller designed by the invention supports the processing of all the current mainstream color formats, greatly reduces the load of a CPU and improves the performance of the system.
Drawings
FIG. 1 is a block diagram of a graphics processing DMA controller of the present invention.
Detailed Description
The invention is explained in detail below with reference to the drawings.
The design idea of the image DMA function is as shown in fig. 1: the method has the advantages that the single color is filled quickly, the pictures are copied, the picture is copied after the pixel format is converted, and the two pictures are mixed and then converted, and the process does not need CPU participation, so that the efficiency is improved. And rapidly copying the source picture to the target picture through a specified format by DMA. The implementation mode is as follows:
directly filling a target rectangular area by using a preset certain color, and directly writing the target rectangular area without buffering a foreground layer, a background layer and an output port;
rapidly filling a source picture into a target picture by utilizing a foreground layer cache;
the source picture is filled into the target picture by utilizing a foreground layer cache and converting, controlling and outputting the cache through a foreground layer format;
and meanwhile, the buffer memory of the foreground layer and the buffer memory of the background layer and format conversion control are used, and after mixed control and output buffer memory, the target picture is filled.
When the screen cleaning function is realized, the data is directly written into the designated area by using the designated color inside the image DMA.
When the quick copying function is realized, the image DMA reads the image data of the source region to the foreground layer buffer area and then directly writes the image data to the target region, and the color format of the image data is not changed.
And after the source picture is converted into a uniform color format by the foreground layer format conversion controller, the source picture is converted into a designated color format by the output conversion controller and stored in the output buffer, and finally the target area is copied.
When the realization only has the format conversion function, according to the specific color mode: if the color is in the two color modes A4 and A8, the color designated by the foreground layer is directly combined, the color is converted into an ARGB8888 mode through a foreground layer format conversion controller, then the color is converted into a required color format through an output format conversion controller, the required color format is stored in an output buffer, and finally the color is output to a designated area; if the color is in the direct color mode (ARGB 8888, RGB888, RGB565, ARGB1555 and ARGB 4444), converting the color into the ARGB8888 mode by a foreground layer format conversion controller, converting the color into a required color format by an output format conversion controller, storing the color format into an output buffer, and finally outputting the color format to a designated area; if the color is in the indirect color mode (L4, L8, AL44 and AL 88), the color is converted into the ARGB8888 mode through the foreground layer format conversion controller according to the read source data and the foreground layer lookup table, then is converted into the required color format through the output format conversion controller, is stored in the output buffer, and finally is output to the appointed area.
The DMA with the mixing function converts the foreground layer source picture and the background layer source picture into uniform color formats through a foreground layer format conversion controller and a background layer format conversion controller respectively, the mixer obtains a new picture according to the weighted calculation of the transparency of each of the two pictures, the new picture is converted into a designated color format through an output conversion controller and stored in an output buffer memory, and finally the new picture is copied to a target area.
When the mixed mode function is realized, the method is similar to the format conversion mode, only the source images are respectively from two layers, the two layers are respectively passed through a foreground layer format conversion controller and a background layer format conversion controller, then are output to an output format conversion controller through the mixed controller according to the respective transparency weighting operation of the two pictures, are then stored in an output buffer, and are finally output to a designated area.
The front/background layer buffer in fig. 1 is a 32bit x 64 FIFO for buffering when source data is read at high speed.
The front/background layer format conversion controller in fig. 1 is responsible for processing the color and transparency of the front/background layer buffer output, and the transparency can be made by using the transparency of the source data, the transparency built in the front/background layer, or the product of the transparency of the source data and the transparency built in the front/background layer. The color can be self-contained in the source data, can be internally specified by the front/background layer format conversion controller, or can be the color retrieved from a lookup table; and calculating and outputting the data in the ARGB8888 format according to the transparency and the color by the existing processing method, and outputting the data to a subsequent module for processing.
The front/background layer lookup table in fig. 1 is a 32bit RAM for pre-storing a specified number of color values, and when the indirect color mode (L4, L8, AL44 and AL 88) is used, the corresponding color (ARGB 888 or RGB88 color format) in the lookup table is retrieved according to the index value (L part value) of the source data and outputted to the front/background layer format conversion controller, which converts the color value into data in the unified ARGB8888 format.
The mixing controller in fig. 1 is configured to obtain, according to the transparency of the data in the ARGB8888 format output by the foreground layer format conversion controller and the background layer format conversion controller, the mixed data in the new ARGB8888 format by weighting operation, and output the data to the output format conversion controller.
The output format conversion controller in fig. 1 is used to convert the data in the format of ARGB8888 into the direct color modes (ARGB 8888, RGB888, RGB565, ARGB1555, and ARGB 4444) that are actually used for display according to the existing processing method.
The output buffer in fig. 1 is a 32bit x 64 FIFO for buffering pixel data to be output to the target area.
Claims (6)
1. A picture processing DMA controller, comprising:
the foreground layer conversion module is used for reading source data of the foreground layer and converting the source data into data in a fixed format;
the background layer conversion module is used for reading the source data of the background layer and converting the source data into data in a fixed format;
the hybrid controller is used for fusing the data with the fixed formats respectively output by the foreground layer conversion module and the background layer conversion module to obtain new data with the fixed formats and outputting the new data to the output format conversion controller;
an output format conversion controller for converting the data in a fixed format into an image in a direct color mode for display;
the foreground layer conversion module includes:
the foreground layer cache is used for reading and caching foreground layer source data;
the foreground layer format conversion controller is used for processing the color and the transparency output by the foreground layer cache, obtaining data in an ARGB8888 format according to the color and the transparency, and outputting the data to the hybrid controller; the color adopts any one of the color of the source data, the color appointed in the foreground layer format conversion controller and the color searched by the foreground layer lookup table; the transparency adopts any one of transparency in the source data, transparency built in the foreground layer and product of the transparency of the source data and the transparency built in the foreground layer; the background layer conversion module includes:
the background layer cache is used for reading background layer source data and caching;
the background layer format conversion controller is used for processing the color and the transparency output by the background layer cache, obtaining ARGB8888 format data according to the color and the transparency, and outputting the data to the hybrid controller; the color adopts any one of the color of the source data, the color appointed in the background layer format conversion controller and the color searched out by the background layer lookup table; the transparency adopts any one of transparency in the source data, transparency built in the background layer and product of the transparency of the source data and the transparency built in the background layer;
the mixed controller is used for obtaining mixed data with a new fixed format according to the transparency of the data with the fixed format output by the foreground layer conversion module and the background layer conversion module and weighting operation of the data with the fixed format, and outputting the mixed data with the new fixed format to the output format conversion controller.
2. The picture processing DMA controller according to claim 1, wherein the foreground layer conversion module further comprises a foreground layer look-up table for pre-storing a set number of color values; when the indirect color mode is used, the corresponding color in the foreground layer lookup table is searched out according to the index value of the source data in the foreground layer format conversion controller and is output to the foreground layer format conversion controller.
3. The picture processing DMA controller according to claim 1, wherein the background layer conversion module further comprises a background layer look-up table for pre-storing a set number of color values; when the indirect color mode is used, the corresponding color in the background layer lookup table is retrieved according to the index value of the source data in the background layer format conversion controller and is output to the background layer format conversion controller.
4. The picture processing DMA controller according to claim 1, characterized in that the fixed format is an ARGB8888 format.
5. The picture processing DMA controller according to claim 1, characterized in that the direct color mode is any one of ARGB8888, RGB888, RGB565, ARGB1555 and ARGB 4444.
6. The picture processing DMA controller according to claim 1, further comprising an output buffer for buffering the image of the direct color mode for output to the target area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111439046.XA CN114168505B (en) | 2021-11-30 | 2021-11-30 | Image DMA controller and implementation method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111439046.XA CN114168505B (en) | 2021-11-30 | 2021-11-30 | Image DMA controller and implementation method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114168505A CN114168505A (en) | 2022-03-11 |
CN114168505B true CN114168505B (en) | 2023-12-01 |
Family
ID=80481611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111439046.XA Active CN114168505B (en) | 2021-11-30 | 2021-11-30 | Image DMA controller and implementation method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114168505B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116245706B (en) * | 2023-05-09 | 2023-07-14 | 深圳市乐升半导体有限公司 | Pixel mixing method and device for base map and png map |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1111461A (en) * | 1993-06-30 | 1995-11-08 | 世嘉企业股份有限公司 | Image processing method and device therefor |
CN101093644A (en) * | 2006-06-19 | 2007-12-26 | 深圳安凯微电子技术有限公司 | LCD control circuit and method for picture in picture function supported under multiple output formats |
CN109657658A (en) * | 2019-02-19 | 2019-04-19 | 江苏邦融微电子有限公司 | A kind of hardware-accelerated system and method handling image |
CN113658281A (en) * | 2020-05-12 | 2021-11-16 | 湖南迪文科技有限公司 | Device and method for efficiently processing PNG (portable network graphics) picture |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2374745A (en) * | 2001-04-18 | 2002-10-23 | Quantel Ltd | Chroma keying system using a programmable look-up table |
US9990690B2 (en) * | 2015-09-21 | 2018-06-05 | Qualcomm Incorporated | Efficient display processing with pre-fetching |
-
2021
- 2021-11-30 CN CN202111439046.XA patent/CN114168505B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1111461A (en) * | 1993-06-30 | 1995-11-08 | 世嘉企业股份有限公司 | Image processing method and device therefor |
CN101093644A (en) * | 2006-06-19 | 2007-12-26 | 深圳安凯微电子技术有限公司 | LCD control circuit and method for picture in picture function supported under multiple output formats |
CN109657658A (en) * | 2019-02-19 | 2019-04-19 | 江苏邦融微电子有限公司 | A kind of hardware-accelerated system and method handling image |
CN113658281A (en) * | 2020-05-12 | 2021-11-16 | 湖南迪文科技有限公司 | Device and method for efficiently processing PNG (portable network graphics) picture |
Also Published As
Publication number | Publication date |
---|---|
CN114168505A (en) | 2022-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100576893C (en) | A kind of graphic OSD controller that is integrated in video frequency processing chip | |
US8619085B2 (en) | Method and system for compressing tile lists used for 3D rendering | |
US8854384B2 (en) | Method and system for processing pixels utilizing scoreboarding | |
CN106415479B (en) | Multiple display pipelines drive divided display | |
US9495926B2 (en) | Variable frame refresh rate | |
US11127369B2 (en) | Method of synthesizing RGBA layers for mobile field sequential display, display device, electronic device and computer readable storage medium using the same | |
CN101425277B (en) | Liquid crystal display, LCD driver, and operating method of lcd driver | |
US5861864A (en) | Video interface system and method | |
KR20040000151A (en) | Apparatus and Method For Converting Of Pixels From YUV TO RGB Format Using Color Look-Up Tables | |
CN114168505B (en) | Image DMA controller and implementation method thereof | |
JPH1153580A (en) | Three-dimensional image processor and video synthesis method | |
CN201788657U (en) | Liquid crystal display (LCD) controller based on Nios II soft-core central processing unit (CPU) | |
CN105516669A (en) | Onboard display device and method | |
CN105895030B (en) | Controller for persistence display panel | |
US9652816B1 (en) | Reduced frame refresh rate | |
CN101789228A (en) | video scaler | |
CN115101025B (en) | LCD control circuit supporting virtual frame buffering and control method thereof | |
CN115002304B (en) | Video image resolution self-adaptive conversion device | |
CN115955589A (en) | Optimized video splicing method, system and storage medium based on MIPI | |
CN101520989A (en) | Hardware integrated design of the video liquid crystal display control of YUV format and RGB format | |
CN103745681B (en) | A kind of graphicalphanumeric generator based on complex programmable device | |
Ni et al. | The realization of LED display system based on the embedded | |
CN201716967U (en) | Color TFT-LCD liquid crystal display control device supporting images in JPEG format | |
CN101166244B (en) | Screen display device and its display method | |
WO2023087827A1 (en) | Rendering method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |