Image processing method capable of ranking multiple primitives in real time, system capable of ranking multiple primitives in real time, and electronic device

By dividing the display area into blocks and generating a sorted list, the problem of large calculations in multi-pixel processing is solved, efficient pixel sorting and real-time pixel synthesis are achieved, and hardware costs are reduced.

WO2024187347A1PCT designated stage expired Publication Date: 2024-09-19ZHUO YONGHONG
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/081124
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-13
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

The existing technology requires a large amount of calculation when processing multiple graphics elements, and cannot meet the needs of real-time calculation and high-speed reading of image data, especially when the number of graphics elements is large.

Method used

By dividing the effective display area into multiple blocks of the same size, a global pixel sorting list and index list sorted by row number, column number and level are generated, and the corresponding pixel information is read and cached to achieve quick sorting and deal with.

Benefits of technology

It reduces the storage space occupied, significantly improves the calculation speed of primitive sorting, meets the real-time requirements of real-time pixel synthesis, and reduces the system hardware cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023081124_19092024_PF_FP_ABST
    Figure CN2023081124_19092024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are an image processing method capable of ranking multiple primitives in real time, a system capable of ranking multiple primitives in real time, and an electronic device. According to a preset number of rows and a preset number of columns for dividing an active display area into a plurality of blocks of the same size, and basic information of all primitives included in the current graphic to be displayed, a full-area primitive ranking list and a full-area primitive index list are generated; then according to the full-area primitive ranking list and the full-area primitive index list, a row primitive ranking list and a row primitive index list that match a row number of the current group to be drawn are generated; and finally according to the row primitive ranking list and the row primitive index list, pixel primitive lists in which ranking is performed according to levels and basic information of primitives is recorded are generated in parallel for pixels in the current group to be drawn. The image processing method and the system in the present invention achieve the effect of significantly increasing the speed of computation for primitive ranking while not occupying a relatively large storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing method and system capable of sorting multiple image elements in real time, and electronic device Technical Field

[0001] The present invention relates to the field of graphics processing technology, and in particular to an image processing method and system and electronic equipment capable of sorting multiple graphics elements in real time. Background Art

[0002] "Pixel-by-pixel real-time synthesis technology" refers to a graphics processing system (GPU) that, based on the application's graphics drawing instructions, sequentially processes the pixels of the current image to be drawn, reads the source data of each primitive at the current pixel, performs real-time pixel synthesis, generates image data, and sends it to the display device in real time for display, rather than temporarily storing it in a frame buffer and sending it to the display device after a frame is rendered. The primitive source data refers to the source data of the primitive at the current pixel to be drawn, including color and transparency values. For details, please refer to another PCT international patent application, "Bitmap Primitive-Based Graphics Processing System, Method, and GPU" (International Application No. PCT / CN2022 / 10458). Frame buffer memory (also known as frame buffer or video memory) is a direct image of the screen display, also known as a bit map or raster. Each storage unit in the frame buffer corresponds to a pixel on the screen, and the entire frame buffer corresponds to a frame of image.

[0003] Using "real-time pixel-by-pixel synthesis technology" to implement computer graphics processing can reduce hardware costs and eliminate the need for frame buffer memory. However, when the number of primitives in the graphics to be displayed is large, calculating the number of primitives contained in each pixel on the graphic and the overlay display hierarchy, and then sorting them by hierarchy, is a computationally intensive task that cannot meet the requirements of real-time computing and the high-speed reading of image data required to execute real-time pixel synthesis programs. Technical issues

[0004] The technical problem to be solved by the present invention is to provide an image processing method and system and an electronic device that can sort multiple graphic elements in real time, which does not occupy much storage space and can greatly improve the speed of graphic element sorting calculation. Solution

[0005] According to one embodiment, an image processing method capable of sorting multiple graphic elements in real time includes: generating a global graphic element sorting list sorted by row number, column number and level and recording the basic information of all graphic elements contained in each block, and a global graphic element index list sorted by row number and column number according to the preset number of rows and columns for dividing the effective display area into multiple blocks of the same size and the basic information of all graphic elements contained in the current graphic to be displayed; wherein each record of the global graphic element sorting list includes at least the basic information of the graphic element; the graphic element basic information includes at least the unique identifier and cropping area of ​​the graphic element; the level refers to the level at which the graphic element is superimposed and displayed; each record of the global graphic element index list includes the number of records of the graphic element basic information contained in a block and the starting index number indicating the serial number of the first graphic element basic information corresponding to the block in the global graphic element sorting list; reading the global graphic element; All records in the element index list that match the row number of the current group to be drawn are cached as a row element index list; and all records in the global element sorting list that match the row element index list and the row number of the current group to be drawn are read and cached as a row element sorting list; wherein, the current group to be drawn includes multiple consecutive pixels belonging to the same pixel row; the starting index number and the number of records corresponding to the block matching the column number of the current group to be drawn are read from the row element index list, and according to the starting index number and the number of records, all element basic information corresponding to the block matching the column number of the current group to be drawn in the row element sorting list is read and cached as a block element sorting list; in parallel, records matching each pixel position of the current group to be drawn are read in the block element sorting list, and a pixel element list sorted by the level and including at least the unique identifier of the element is generated and cached for each pixel of the current group to be drawn.

[0006] According to one embodiment, a graphics processing system capable of sorting multiple primitives in real time includes a processor and a graphics processing device; a GPU driver on the processor generates a global primitive sorting list sorted in sequence by row number, column number and level and recording the basic information of all primitives contained in each block, and a global primitive index list sorted in sequence by the row number and column number, based on the preset number of rows and columns for dividing the effective display area into multiple blocks of equal size and the basic information of all primitives contained in the current graphics to be displayed; wherein each record of the global primitive sorting list includes at least the basic information of the primitive; the primitive basic information includes at least the unique identifier and cropping area of ​​the primitive; the level refers to the level at which the primitive is displayed in superposition; each record of the global primitive index list includes the number of records of primitive basic information contained in a block and a starting index number indicating the serial number of the first primitive basic information corresponding to the block in the global primitive sorting list; the primitive list on the graphics processing device A cache unit is configured to read all records in the global primitive index list that are identical to the row number of the current group to be drawn and cache them as a row primitive index list; and read all records in the global primitive sorting list that match the row primitive index list and the row number of the current group to be drawn and cache them as a row primitive sorting list; wherein the current group to be drawn includes multiple consecutive pixels belonging to the same pixel row; a primitive depth processing unit on the graphics processing device is configured to read the starting index number and the number of records corresponding to the block that matches the column number of the current group to be drawn from the row primitive index list, and read all primitive basic information corresponding to the block that matches the column number of the current group to be drawn from the row primitive sorting list based on the starting index number and the number of records, and cache them as a block primitive sorting list; and in parallel read records in the block primitive sorting list that match each pixel position of the current group to be drawn, and generate and cache a pixel primitive list sorted by the level for each pixel of the current group to be drawn that includes at least the unique identifier of the primitive.

[0007] According to one embodiment, an electronic device includes the above-mentioned graphics processing system capable of sorting multiple graphic elements in real time, and a display device connected to the graphics processing system capable of sorting multiple graphic elements in real time. Beneficial effects

[0008] The image processing method and system and electronic device of the present invention capable of sorting multiple graphic elements in real time do not occupy much storage space and can greatly improve the speed of graphic element sorting calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] FIG. 1 is a block diagram of a graphics processing system capable of sorting multiple primitives in real time according to some embodiments.

[0010] FIG2 is a block diagram of a primitive depth processing unit according to some embodiments.

[0011] FIG. 3 is a schematic diagram showing the division of the effective display area into blocks according to an embodiment.

[0012] FIG4 is a basic information table of all the graphic elements in FIG3 .

[0013] FIG. 5 is a global primitive information list generated according to the basic information table of FIG. 4 .

[0014] FIG6 shows a global primitive sorting list and a row primitive sorting list generated by sequentially sorting the global primitive information list in FIG5 by row number, column number and level.

[0015] FIG. 7 is a block primitive index table generated according to the global primitive sorting list of FIG. 6 .

[0016] FIG. 8 is a pixel primitive sorting list generated based on the group of pixels to be drawn in FIG. 3 and the row primitive sorting list in FIG. 7 .

[0017] FIG9 is a block diagram of steps of an image processing method capable of sorting multiple primitives in real time according to some embodiments.

[0018] FIG. 10 is a block diagram illustrating steps of an image processing method capable of sorting multiple primitives in real time according to some embodiments. Best Mode for Carrying Out the Invention

[0019] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments recorded herein are only used to illustrate and explain the present invention and are not intended to limit the present invention.

[0020] It should be noted that "graphics" as used in this application refers to any information that can be presented on an electronic device, including the display interface of an application. "Graphics primitives" refer to different types of graphical elements on a graphic, such as text in various glyphs, symbols and icons of various shapes, and colorful or monochromatic background images. A "graphic" consists of one or more "graphic primitives."

[0021] "Primitives" can be categorized and layered according to agreed-upon rules. For example, images and text can be categorized as solid color primitives, ARGB primitives, linear gradient primitives, glyph primitives, and so on. Layers at different overlay levels can be categorized as window-layer primitives at the bottom layer, control-layer primitives at the middle layer, and bitmap-layer primitives at the top layer. For more details, please refer to another PCT international patent application, "Graphics Processing System, Method, and GPU Based on Bitmap Primitives" (International Application No. PCT / CN2022 / 10458).

[0022] The primitive at the current pixel to be drawn may include multiple primitives of different types (for example, one image primitive superimposed on one text primitive), and they are superimposed and displayed through predefined layers to form a semi-transparent mixed effect.

[0023] In this application, the graphics processing system is a graphics processing system that can sort multiple graphics primitives in real time. It adopts point-by-point pixel real-time synthesis technology and real-time generation of pixel graphics primitive list technology. It does not take up much storage space and can greatly improve the speed of graphics primitive sorting calculation. It meets the real-time requirements for reading graphics primitive source data when performing real-time pixel synthesis, reduces the capacity of the cache, and reduces the system hardware cost.

[0024] Electronic devices process graphics using a graphics processing system, generating image data that is then presented on a display device. These electronic devices may include personal computers, computer workstations, mobile phones, portable gaming devices, music and video players, portable smart wearable devices (e.g., smart bracelets, smart watches, smart glasses), portable smart translation devices, automotive electronic instrument panel displays, automotive electronic control system displays, or other types of devices that process and display graphical data.

[0025] Display devices may include liquid crystal displays (LCDs), plasma display panels, light-emitting diode (LED) array displays, cathode ray tube (CRT) displays, nanocrystal displays, electronic paper, and projection equipment. Display devices may be integrated into electronic devices or be standalone devices connected to electronic devices via cables or wireless communication interfaces.

[0026] As shown in FIG1 , the electronic device includes a graphics processing system and a display device 90 . The graphics processing system includes a graphics processing device 300 , a processor 100 and an external memory 200 .

[0027] The processor 100 can be a general-purpose or special-purpose processor for controlling electronic devices, and can execute multiple software programs, such as an operating system program 30 (e.g., a computer operating system or an embedded operating system), various application programs 20 (e.g., a browser, email, a media player, a GUI application (Graphical User Interface). The CPU can also obtain data to be refreshed and displayed through human-computer interaction input devices (e.g., a keyboard, a key, a touch screen, a microphone), or various sensors (e.g., a vehicle speed sensor, an oil level sensor, a wiper sensor), or a communication module (e.g., a Bluetooth communication module, a WIFI communication module, a GPRS communication module), or other input devices coupled to the image display device via a data interface. Various software applications running on the CPU can call a graphics API (Application Program Interface), execute the GPU driver 10, issue pixel synthesis commands to the GPU, and start the GPU to generate image data for the display device 90 to form an image.

[0028] The external memory 200 can be used to store application program data, source data of graphics elements to be displayed, etc. The external memory 200 can be a non-volatile memory, such as a flash memory (SpiFlash or NandFlash), an erasable programmable RAM (EPROM), an electrically erasable programmable ROM (EEPROM), etc.

[0029] The graphics processing device 300 can receive a frame start signal from a display controller or other external display control module. After completing initialization, it reads the source data of the graphics primitives to be displayed, performs real-time pixel synthesis point by point, generates image data, and drives the display device 90 for display. The graphics processing device 300 can be a processor dedicated to processing graphics data, such as a GPU.

[0030] The GPU driver 10 on the processor 100 generates a global primitive sorted list sorted by row number, column number, and level, recording the basic information of all primitives contained in each block, and a global primitive index list sorted by row number and column number, based on the preset number of rows and columns used to divide the active display area into multiple equal-sized blocks and the basic information of all primitives contained in the current graphics to be displayed. The level refers to the level at which primitives are displayed in overlapping form.

[0031] Each record in the global primitive sorting list includes at least basic primitive information. This information includes at least a unique identifier and a clipping region, where the clipping region is the minimum rectangular area occupied by the primitive within the effective display area. The primitive's hierarchy, unique identifier, and clipping region are pre-set by the application 20.

[0032] Each record of the global primitive index list includes the number of records of primitive basic information contained in a block and a starting index number indicating the sequence number of the first primitive basic information corresponding to the block in the global primitive sorting list.

[0033] In one embodiment, the GPU driver 10 generates a global primitive information list that records the row number and column number of the block contained in each primitive, as well as the basic information and hierarchy of all primitives contained in the block based on the position coordinates and size of the clipping area of ​​each primitive in the current graphics to be displayed, and the position coordinates and size of each block; sorts the global primitive information list in sequence by row number, column number and hierarchy to generate a global primitive sorting list; and counts the number of primitive basic information contained in each block in the global primitive information list and the index number of the first primitive basic information to generate a global primitive index list sorted in sequence by row number and column number.

[0034] As shown in Figures 3 and 4 , in this example, the active display area 400 has preset row numbers 450 of 1-6, with a total of 6 rows, and preset column numbers 460 of 1-4, with a total of 4 columns. The active display area 400 is divided into 24 equally sized blocks 440. The starting position coordinates of the active display area 400 are (0, 0), with a total width of 640 and a total height of 720. Based on the row number of 6 and the column number of 4, the position coordinates of each block 440 can be calculated, with a width of 160 and a height of 120.

[0035] In this example, the graphics to be displayed include graphics element A, graphics element B, graphics element C, graphics element D, and graphics element E. Figure 4 shows the basic information table for graphics element AE, which records the location coordinates X, Y, width W, and height H of the clipping region of graphics element AE, as well as the level Z and unique identifier Idx. The location coordinates X, Y, width W, and height H can be used to determine the location and size of the clipping region of the graphics element.

[0036] Based on the basic information table for the primitive AE, the GPU driver 10 matches the clipping area of ​​each primitive with the location of the 24 blocks. If the clipping area of ​​the primitive overlaps with the area of ​​the block, a new record is generated, which contains the row number and column number of the block and the basic information and level of the primitive. As shown in Figure 5, the global primitive information list 500 for primitive AE includes the global information list 510 for primitive A, the global information list 520 for primitive B, the global information list 530 for primitive C, the global information list 540 for primitive D, and the global information list 550 for primitive E.

[0037] As shown in the example of FIG6 , after generating global primitive information list 500, GPU driver 10 sorts global primitive information list 500 by row number, column number, and level Z to generate sorted global primitive list 600. Sorted global primitive list 600 may not include row number, column number, and level Z, but may only include the unique identifier of the primitive and the clipping region.

[0038] As shown in the example of Figure 7, the GPU driver 10 sorts the row number Row, column number Col, level Z and primitive basic information of each block recorded in the global primitive information list 500 by row number Row and column number Col, counts the number of primitive basic information contained in each block and the index number of the first primitive basic information, and forms a global primitive index list 700 sorted by row number and column number.

[0039] The global primitive sorting list and the global primitive index list may be generated simultaneously or sequentially and stored in the main memory 40 .

[0040] As shown in the example of Figure 1 , the primitive list cache unit 50 on the graphics processing device 300 reads all records from the global primitive index list that match the row number of the current group to be drawn and caches them as a row primitive index list. It also reads all records from the global primitive sort list that match the row primitive index list and the row number of the current group to be drawn and caches them as a row primitive sort list. The current group to be drawn includes multiple consecutive pixels belonging to the same pixel row. Blocks with the same row number may include multiple pixel rows.

[0041] In one embodiment, the primitive list cache unit 50 reads, based on the row number and column number, a number of records, starting from the first record corresponding to the row number in the global primitive index list and equal to the number of columns, and caches the records as a row primitive index list. The primitive list cache unit 50 can obtain the row number, column number, row number, and column number from the primitive depth processing unit 60.

[0042] As shown in the example of Figure 6 , before executing the graphics rendering program, the graphics processing device 300 reads the global primitive sort list 600 from the main memory 40 through the primitive list cache unit 50 and caches all records matching the row number of the current group to be drawn in the primitive list cache unit 50, forming row primitive sort lists 610-660. Assuming that the row number of the current group to be drawn is 1, the primitive list cache unit 50 reads the matching records and forms a row primitive sort list 610 for caching. After the block with row number 1 is completely drawn and the drawing of the block with row number 2 begins, the primitive list cache unit 50 reads the matching records again, forms a row primitive sort list 620, and caches it. When drawing the current graphics to be displayed, the primitive list cache unit 50 generates and caches the row primitive sort lists 610-660 one by one from row numbers 1 to row number 6.

[0043] Before the graphics processing device 300 executes the graphics rendering program, the primitive list cache unit 50 reads the global primitive index list 700 from the main memory 40. Based on the row number and column number of the current group to be drawn, the unit starts reading the same number of records in the global primitive index list 700 as the number of columns, and then caches the result as a row primitive index list. Assuming that the row number of the current group to be drawn is 1 and the column number is 4, the unit reads four records starting from the first record in the global primitive index list 700 and caches the result as a row primitive index list 710. Then, based on the number of records Count and the starting index number Index for each block recorded in the row primitive index list 710, the unit reads records 1-8 from the global primitive sorted list 600 to form the row primitive sorted list 610. After the block with row number 1 is completely drawn and the block with row number 2 begins to be drawn, the primitive list cache unit 50 reads four records starting from the fifth record in the global primitive index list 700 to form a row primitive index list 720, and then reads records 9-18 in the global primitive sort list 600 to form a row primitive sort list 620. When drawing the current graphic to be displayed, the primitive list cache unit 50 generates and caches row primitive index lists 710-760 and row primitive sort lists 610-660 one by one from row numbers 1 to 6.

[0044] The row primitive index list and the row primitive sort list may be generated simultaneously or sequentially, and stored in the primitive list cache unit 50 .

[0045] As shown in the example of Figure 2, the primitive depth processing unit 60 on the graphics processing device 300 reads the starting index number and the number of records corresponding to the block that matches the column number of the current group to be drawn from the row primitive index list, and reads all the primitive basic information corresponding to the block that matches the column number of the current group to be drawn in the row primitive sorting list based on the starting index number and the number of records, and caches it as a block primitive sorting list.

[0046] In one embodiment, after executing the graphics rendering program, the primitive depth processing unit 60 reads the record in the row primitive index list that matches the column number of the current group to be drawn, obtains the starting index number and the number of records corresponding to the block that matches the column number of the current group to be drawn; and reads the primitive basic information of the same number as the number of records starting from the record corresponding to the starting index number in the row primitive sorting list and caches it as a block primitive sorting list.

[0047] As shown in the examples of Figures 6 and 7 , assuming the current group to be drawn is the first group to be drawn in the first pixel row of a block with row number 2 and column number 1, the primitive depth processing unit 60 reads the first record from the row index list 720, obtains the starting index number 8 and the number of records 3, then reads the first to third records from the row primitive sorted list 620 that match the starting index number 8 and the number of records 3, caches them as the block primitive sorted list 621, and then begins processing each pixel in the group to be drawn to generate a pixel primitive list. After processing all the groups to be drawn in the first pixel row of the block with row number 2 and column number 1, when processing the first group to be drawn in the first pixel row of the next block (row number 2 and column number 2), the primitive depth processing unit 60 reads the second record from the row index list 720, obtains the starting index number 11 and the number of records 3, then reads the fourth to sixth records from the row primitive sorted list 620 that match the starting index number 11 and the number of records 3, caches them as the block primitive sorted list 622. The process continues until all the to-be-drawn groups of the first pixel row with row number 2 and column number 2 are processed. Next, all the to-be-drawn groups of the first pixel row with row number 2 and column number 3 are processed, followed by all the to-be-drawn groups of the first pixel row with row number 2 and column number 4. At this point, all the pixels of the first pixel row of all blocks with row number 2 are processed. The process continues with all the pixels of the second pixel row, all the pixels of the third pixel row, and so on, until the pixels of the 120th row (each block is 120 pixels high, for a total of 120 rows of pixels) of all blocks with row number 2 are processed. Then, drawing of the first to-be-drawn group of the first pixel row of the block with row number 3 and column number 1 begins. When drawing all the blocks with row number 2, the primitive depth processing unit 60 can sequentially generate block primitive sorted lists 621-624 from the row primitive sorted list 620.

[0048] After caching the block primitive sorted list, the primitive depth processing unit 60 reads the records in the block primitive sorted list that match each pixel position of the current group to be drawn in parallel, and generates and caches a hierarchically sorted pixel primitive list that includes at least the unique identifier of the primitive for each pixel of the current group to be drawn.

[0049] In one embodiment, the primitive depth processing unit 60 compares the position coordinates of each pixel in the current group to be drawn with the clipping area of ​​each primitive in the block primitive sorting list in parallel. If the pixel is within the clipping area of ​​the primitive, the unique identifier of the primitive sorting information is read and the unique identifier is added to the pixel primitive list corresponding to the pixel.

[0050] In one embodiment, the position coordinates of each pixel of the current group to be drawn can be calculated based on the position coordinates of the starting pixel of the current group to be drawn and a preset total number of pixels, or based on the position coordinates of the starting pixel of the previous group to be drawn and a preset total number of pixels; wherein the preset total number of pixels refers to the total number of pixels of the current group to be drawn.

[0051] In one embodiment, the primitive depth processing unit 60 calculates the row and column number of the current group to be drawn based on the position coordinates of the starting pixel of the current group to be drawn and the position coordinates of each block before reading the global primitive index list and the global primitive sort list.

[0052] When initially drawing a graphic, the initial value of the starting pixel position coordinate of the current group to be drawn is (0, 0), and the initial values ​​of the row number and column number are also 0. Based on the preset total number of pixels in each group to be drawn and the position coordinates of each block, the primitive depth processing unit 60 can accurately calculate the position coordinates, row number, and column number of the starting pixel of the next group to be drawn.

[0053] In one embodiment, the primitive depth processing unit 60 clears the cached pixel primitive list of the previous drawing group before reading the starting index number and record number corresponding to the block matching the column number of the current drawing group from the row primitive index list. The primitive depth processing unit 60 may clear the cached pixel primitive list of the previous drawing group before processing the current drawing group.

[0054] As shown in FIG4 , in this example, a group of continuous pixels in the block at row number 3 and column number 3 is the current group to be drawn 421, and the preset total number of pixels is 40. Based on the starting position coordinates (0, 0) of the active display area 400, the total width of 640 and the total height of 720, the position coordinates of the block at row number 3 and column number 3, and the total number of pixels 40, the primitive depth processing unit 60 calculates the position coordinates of the starting pixel of the current group to be drawn 421, and then sequentially calculates the position coordinates of each pixel in the current group to be drawn 421.

[0055] The primitive depth processing unit 60 compares the position coordinates of each pixel in the current to-be-drawn group 421 with the clipping area of ​​each primitive in the block primitive sorting list 633 in parallel. If the pixel is within the clipping area of ​​the primitive, the unique identifier of the primitive is read and the unique identifier is added to the pixel primitive list of the pixel, thereby generating 40 pixel primitive lists 801-840 in parallel.

[0056] In one embodiment, before reading the block primitive sorting list in parallel, the primitive depth processing unit 60 determines whether the block primitive sorting list that matches the row number and column number of the current group to be drawn has been cached. If so, the block primitive sorting list is read; and determines whether the row primitive index list and the row primitive sorting list that match the row number of the current group to be drawn have been cached. If so, the row primitive index list and the row primitive sorting list are read. Otherwise, the primitive list cache unit 50 is controlled to read the global primitive index list.

[0057] After calculating the row number and column number of the current group to be drawn, the primitive depth processing unit 60 determines whether the row number and column number are the same as the row number and column number of the previous group to be drawn. If the row number and column number are the same, it means that the block primitive sorting list has been cached, and the primitive depth processing unit 60 reads the block primitive sorting list. If the row numbers are the same but the column numbers are different, it means that the block primitive sorting list is not cached, and the row primitive sorting list and row primitive index list have been cached, then the primitive depth processing unit 60 reads the matching records in the row primitive index list and the row primitive sorting list, and caches them as the block primitive sorting list. If the row numbers are different, it means that the row primitive sorting list and the row primitive index list are not cached, then the primitive depth processing unit 60 sends the row number and column number to the primitive list cache unit 50.

[0058] The primitive list cache unit 50 reads the global primitive index list based on the row number and column number to generate a row primitive index list that matches the row number, and also reads the global primitive sort list to generate a row primitive sort list that matches the row number. The primitive depth processing unit 60 reads the starting index number and number of records of the block that matches the row number and column number from the row primitive index list, and then, based on the starting index number and number of records, reads all matching primitive basic information from the row primitive sort list and caches it as a block primitive sort list.

[0059] As shown in Figure 2 , in this embodiment, the primitive depth processing unit 60 includes a block primitive list unit 61, n comparators X1, X2, X3…Xn, and n pixel primitive list units T1, T2, T3…Tn. Each comparator is connected to a pixel primitive list unit. Each comparator is connected to a block primitive list unit 61. The block primitive list unit 61 is connected to the primitive list cache unit 50.

[0060] The block primitive list unit 61 reads the starting index number and the number of records corresponding to the block that matches the column number of the current group to be drawn from the row primitive index list, and reads all the primitive basic information corresponding to the block that matches the column number of the current group to be drawn in the row primitive sorting list according to the starting index number and the number of records, and caches it as a block primitive sorting list.

[0061] n comparators X1-Xn are used to obtain in parallel the records in the block primitive sorting list that match each pixel position of the current group to be drawn.

[0062] The n pixel primitive list units T1-Tn generate and cache, in parallel, a hierarchically sorted pixel primitive list including at least a unique identifier of the primitive for each pixel in the current to-be-drawn group.

[0063] As shown in the example of Figure 3, in this example, the block primitive list unit 61 reads and caches the matching block primitive sorting list 633 from the row primitive sorting list 630 cached by the primitive list cache unit 50 (as shown in the example of Figure 6) based on the row number 3 and column number 3 of the current group 421 to be drawn.

[0064] Then, 40 comparators read the clipping area of ​​each primitive in parallel from the block primitive sorted list 633 cached in the block primitive list unit 61. Each comparator calculates a pixel and compares the position coordinates of the pixel with the clipping area of ​​each primitive in the block primitive sorted list 633 one by one. If the pixel is within the clipping area of ​​the primitive, the basic information or unique identifier of the primitive is sent to the pixel primitive list unit connected to the comparator.

[0065] After receiving the basic information or unique identifiers of the primitives, the 40 pixel primitive list units finally form a 40-pixel primitive list 800 (as shown in the example of FIG8 ). The pixel primitive list may only include the unique identifiers of the primitives.

[0066] In one embodiment, as shown in the example of Figure 1, the pixel synthesis processing unit 70 on the graphics processing device 300 obtains the source data of each primitive in the pixel primitive list of each pixel of the current group to be drawn in parallel, calculates the pixel color value of the primitive at the pixel position based on the source data of the primitive, and performs real-time pixel synthesis processing on the pixel color value of each primitive in the pixel primitive list to generate image data and output it.

[0067] As shown in the example of Figure 8, the pixel synthesis processing unit 70 reads the source data of all the primitives contained in the 40 pixels from the memory 200 and calculates the pixel color value according to the primitive unique identifier Idx recorded in the pixel primitive list 801-840 of the 40 pixels, and then performs pixel synthesis according to the preset pixel synthesis scheme to generate 40-pixel image data, sends it to the line cache 80, and finally outputs it to the display device 90.

[0068] As shown in the example of FIG9 , the graphics processing method of this embodiment capable of sorting multiple graphics primitives in real time includes steps S1 to S4 .

[0069] Step S1: Based on the preset number of rows and columns that divide the effective display area into multiple blocks of the same size and the basic information of all the graphics elements contained in the current graphic to be displayed, a global graphic element sorting list is generated, which is sorted by row number, column number and level and records the basic information of all the graphics elements contained in each block, as well as a global graphic element index list sorted by row number and column number.

[0070] Each record in the global element information list includes at least the element's basic information. This basic information includes at least the element's unique identifier and cropping region. A hierarchy refers to the level at which elements are displayed as overlays. Each record in the global element index list includes the number of element basic information records contained in a block and a starting index number indicating the sequence number of the first element basic information record corresponding to the block in the global element sort list.

[0071] In one embodiment, generating a global primitive sort list and a global primitive index list, step S1 further includes:

[0072] Step S11: Based on the position coordinates and size of the clipping area of ​​each primitive in the current to-be-displayed graphics, and the position coordinates and size of each block, a global primitive information list is generated, which records the row and column numbers of the blocks intersecting with each primitive clipping area, as well as the basic information and hierarchy of all primitives contained in the block;

[0073] The global element information list is sorted by row number, column number and level to generate a global element sorted list; the number of element basic information contained in each block in the global element information list and the index number of the first element basic information are counted to generate a global element index list.

[0074] Step S2: Read all records in the global primitive index list that match the row number of the current group to be drawn and cache them as a row primitive index list; and read all records in the global primitive sorting list that match the row primitive index list and the row number of the current group to be drawn and cache them as a row primitive sorting list.

[0075] The current to-be-drawn group includes a plurality of consecutive pixels belonging to the same pixel row.

[0076] In one embodiment, before reading the global primitive index list and the global primitive sort list, step S2 further includes:

[0077] Step S21: Calculate the row and column number of the current group to be drawn according to the position coordinates of the starting pixel of the current group to be drawn and the position coordinates of each block.

[0078] In one embodiment, reading all records in the global primitive index list that match the row number of the current group to be drawn and caching them as a row primitive index list further includes:

[0079] According to the row number and column number of the current group to be drawn, the first primitive basic information corresponding to the row number in the global primitive index list is read, and the same number of records as the number of columns are cached as a row primitive index list.

[0080] Step S3: Read the starting index number and number of records corresponding to the block that matches the column number of the current group to be drawn from the row primitive index list, and read all the primitive basic information corresponding to the block that matches the column number of the current group to be drawn in the row primitive sorting list based on the starting index number and the number of records, and cache it as a block primitive sorting list.

[0081] In one embodiment, reading all primitive basic information corresponding to the block matching the column number of the current to-be-drawn group in the row primitive sorting list and caching it as a block primitive sorting list further includes:

[0082] Read the record in the row primitive index list that matches the column number of the current group to be drawn, and obtain the starting index number and number of records corresponding to the block that matches the column number of the current group to be drawn;

[0083] Starting from the record corresponding to the start index number in the row element sorting list, the element basic information of the same number as the number of records is read and cached as the block element sorting list.

[0084] In one embodiment, before reading the starting index number and the number of records corresponding to the block matching the column number of the current group to be drawn from the row primitive index list, step S3 further includes:

[0085] Step S31: Clear the pixel primitive list of the previous drawing group in the current cache.

[0086] Step S4: Read in parallel the records in the block primitive sorting list that match each pixel position of the current to-be-drawn group, and generate and cache a hierarchically sorted pixel primitive list including at least the primitive's unique identifier for each pixel in the current to-be-drawn group.

[0087] In one embodiment, before reading the sorted list of block primitives in parallel, step S4 further includes:

[0088] Step S41: Determine whether the block primitive sorting list that matches the row number and column number of the current group to be drawn has been cached. If so, read the block primitive sorting list; and determine whether the row primitive index list and row primitive sorting list that match the row number of the current group to be drawn have been cached. If so, read the row primitive index list and row primitive sorting list; otherwise, read the global primitive index list.

[0089] Determine whether the row number and column number of the current group to be drawn are the same as the row number and column number of the previous group to be drawn. If the row number and column number are the same, it means that the block primitive sorting list has been cached, so read the block primitive sorting list.

[0090] If the row numbers are the same but the column numbers are different, it means that the block primitive sorting list is not cached, and the row primitive sorting list and the row primitive index list are cached. Then execute step S3, read the matching records in the row primitive index list and the row primitive sorting list, and cache them as the block primitive sorting list.

[0091] If the row numbers are different, it means that the row primitive sort list and row primitive index list are not cached. In this case, step S2 is executed to read the global primitive index list and generate a row primitive index list that matches the row number. The global primitive sort list is also read to generate a row primitive sort list that matches the row number. Then, step S3 is executed to read the starting index number and number of records of the block that matches the row number and column number from the row primitive index list. Based on the starting index number and number of records, all matching primitive basic information in the row primitive sort list is read and cached as a block primitive sort list.

[0092] In one embodiment, generating a pixel primitive list for each pixel in the current to-be-drawn group in parallel further includes:

[0093] The position coordinates of each pixel in the current to-be-drawn group are compared with the clipping area of ​​each primitive in the sorted list of block primitives one by one in parallel. If the pixel is within the clipping area of ​​the primitive, the unique identifier of the primitive is read and added to the pixel primitive list corresponding to the pixel.

[0094] In one embodiment, obtaining in parallel records in the sorted list of block primitives that match each pixel position of the current to-be-drawn group further includes:

[0095] The position coordinates of each pixel in the current group to be drawn are calculated based on the position coordinates of the starting pixel of the current group to be drawn or the previous group to be drawn and the preset total number of pixels; wherein the preset total number of pixels refers to the total number of pixels in the current group to be drawn.

[0096] In one embodiment, after generating and caching the hierarchically sorted pixel primitive list including at least the unique identifier of the primitive, step S4 further includes:

[0097] Step S42: Parallel acquisition of the source data of each primitive in the pixel primitive list of each pixel of the current group to be drawn, calculation of the pixel color value of the primitive at the pixel position based on the source data of the primitive, and real-time pixel synthesis processing of each pixel color value to generate image data and output it.

[0098] The above steps S2 to S4 may be performed in other orders, and step S4 may be performed first, then step S3, and then step S2.

[0099] As shown in the example of Figure 10, in another embodiment, step S5 is also included after step S4: the source data of each primitive in the pixel primitive list of each pixel of the current group to be drawn is obtained in parallel, the pixel color value of the primitive at the pixel position is obtained according to the source data of the primitive, and real-time pixel synthesis processing is performed on each pixel color value to generate image data and output it.

[0100] The above preferred embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only disclosed to enable those skilled in the art to make or implement them, and are not intended to limit the scope of protection of the present invention. Any obvious modifications, equivalent replacements and improvements made on the basis of the principles defined in the present invention should be included in the scope of protection of the present invention. The scope of rights claimed by the present invention should not be limited to the above embodiments, but should be the widest possible scope consistent with the principles and technical features defined in the claims of the present invention.

Claims

1. An image processing method capable of sorting multiple image elements in real time, characterized in that: include: According to the preset number of rows and columns for dividing the effective display area into a plurality of blocks of the same size and the basic information of all the primitives contained in the current graphics to be displayed, a global primitive sorting list is generated, which is sorted by row number, column number and level in sequence and records the basic information of all the primitives contained in each block, and a global primitive index list is sorted by the row number and column number in sequence; wherein each record of the global primitive sorting list includes at least the basic information of the primitive; the primitive basic information includes at least the unique identifier and the cropping area of ​​the primitive; the level refers to the level at which the primitive is displayed in superposition; each record of the global primitive index list includes the number of records of the primitive basic information contained in a block and a starting index number indicating the serial number of the first primitive basic information corresponding to the block in the global primitive sorting list; Read all records in the global primitive index list that match the row number of the current group to be drawn and cache them as a row primitive index list; and read all records in the global primitive sorting list that match the row primitive index list and the row number of the current group to be drawn and cache them as a row primitive sorting list; wherein the current group to be drawn includes multiple consecutive pixels belonging to the same pixel row; Reading the starting index number and the number of records corresponding to the block matching the column number of the current group to be drawn from the row primitive index list, and reading all primitive basic information corresponding to the block matching the column number of the current group to be drawn in the row primitive sorting list according to the starting index number and the number of records, and caching them as a block primitive sorting list; The records matching the position of each pixel in the current to-be-drawn group are read in parallel, and a pixel primitive list sorted by the level and including at least the unique identifier of the primitive is generated and cached for each pixel in the current to-be-drawn group.

2. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: The generating of the global primitive sorting list and the global primitive index list further comprises: Generate a global graphic element information list recording the row number and column number of the block intersecting with each graphic element clipping area, and basic information and levels of all graphic elements contained in the block, according to the position coordinates and size of the clipping area of ​​each graphic element in the current to-be-displayed graphics, and the position coordinates and size of each block; The global primitive information list is sorted in sequence according to the row number, column number and level to generate the global primitive sorted list; the number of primitive basic information contained in each block in the global primitive information list and the index number of the first primitive basic information are counted to generate the global primitive index list.

3. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: Before the parallel reading of the block primitive sorting list, the method further comprises: Determine whether the block primitive sorting list that matches the row number and column number of the current group to be drawn has been cached, and if so, read the block primitive sorting list; and determine whether the row primitive index list and the row primitive sorting list that match the row number of the current group to be drawn have been cached, and if so, read the row primitive index list and the row primitive sorting list, otherwise read the global primitive index list.

4. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: Before reading the global primitive index list and the global primitive sort list, the method further includes: According to the position coordinates of the starting pixel of the current group to be drawn and the position coordinates of each block, the row number and column number of the current group to be drawn are calculated.

5. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 4, characterized in that: The step of reading all records in the global primitive index list that match the row number of the current group to be drawn and caching them as a row primitive index list further includes: According to the row number and column number of the current group to be drawn, the same number of records as the number of columns are read from the first primitive basic information corresponding to the row number in the global primitive index list and cached as a row primitive index list.

6. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: The step of reading all primitive basic information corresponding to the block matching the column number of the current group to be drawn in the row primitive sorting list and caching the information as a block primitive sorting list further includes: Read the record in the row primitive index list that matches the column number of the current group to be drawn, and obtain the starting index number and the number of records corresponding to the block that matches the column number of the current group to be drawn; Starting from the record corresponding to the start index number in the row primitive sorting list, primitive basic information of the same quantity as the record quantity is read and cached as the block primitive sorting list.

7. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: The step of generating a pixel primitive list for each pixel of the current to-be-drawn group in parallel further comprises: The position coordinates of each pixel of the current to-be-drawn group are compared with the clipping area of ​​each primitive in the block primitive sorting list one by one in parallel; if the pixel is located within the clipping area of ​​the primitive, the unique identifier of the primitive is read, and the unique identifier is added to the pixel primitive list corresponding to the pixel.

8. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: The step of obtaining in parallel the records in the block primitive sorting list that match each pixel position of the current to-be-drawn group further includes: The position coordinates of each pixel of the current group to be drawn are calculated according to the position coordinates of the starting pixel of the current group to be drawn or the previous group to be drawn and the preset total number of pixels; wherein the preset total number of pixels refers to the total number of pixels of the current group to be drawn.

9. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: Before reading the starting index number and the number of records corresponding to the block matching the column number of the current group to be drawn from the row primitive index list, the method further includes: Clears the current cached list of pixel primitives from the previous draw group.

10. The image processing method capable of real-time sorting of a plurality of image elements as claimed in claim 1, characterized in that: After generating and caching the pixel primitive list sorted by the hierarchy and including at least the unique identifier of the primitive, further comprising: The source data of each primitive in the pixel primitive list of each pixel of the current to-be-drawn group is obtained in parallel, the pixel color value of the primitive at the pixel position is calculated according to the source data of the primitive, and each pixel color value is subjected to real-time pixel synthesis processing to generate image data and output it.

11. A graphics processing system capable of sorting multiple graphics primitives in real time, characterized in that: including a processor and a graphics processing unit; The GPU driver on the processor generates a global primitive sorting list which is sequentially sorted by row number, column number and level and records the basic information of all primitives contained in each block, and a global primitive index list which is sequentially sorted by row number and column number, according to the preset number of rows and columns for dividing the effective display area into a plurality of blocks of the same size and the basic information of all primitives contained in the current graphics to be displayed; wherein each record of the global primitive sorting list includes at least the basic information of the primitive; the primitive basic information includes at least the unique identifier and the cropping area of ​​the primitive; the level refers to the level at which the primitive is displayed in superposition; each record of the global primitive index list includes the number of records of primitive basic information contained in a block and a starting index number indicating the serial number of the first primitive basic information corresponding to the block in the global primitive sorting list; The primitive list cache unit on the graphics processing device reads all records in the global primitive index list that have the same row number as the row number of the current group to be drawn and caches them as a row primitive index list; and reads all records in the global primitive sorting list that match the row primitive index list and the row number of the current group to be drawn and caches them as a row primitive sorting list; wherein the current group to be drawn includes a plurality of consecutive pixels belonging to the same pixel row; The primitive depth processing unit on the graphics processing device reads the starting index number and the number of records corresponding to the block matching the column number of the current group to be drawn from the row primitive index list, reads all primitive basic information corresponding to the block matching the column number of the current group to be drawn in the row primitive sorting list according to the starting index number and the number of records, and caches the information as a block primitive sorting list; and The records matching the position of each pixel in the current to-be-drawn group are read in parallel, and a pixel primitive list sorted by the level and including at least the unique identifier of the primitive is generated and cached for each pixel in the current to-be-drawn group.

12. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The GPU driver further comprises: Generate a global graphic element information list recording the row number and column number of the block included in each graphic element, and basic information and levels of all graphic elements included in the block, according to the position coordinates and size of the clipping area of ​​each graphic element in the current to-be-displayed graphics, and the position coordinates and size of each block; Sort the global primitive information list in sequence according to the row number, column number and level to generate the global primitive sorting list; count the number of primitive basic information contained in each block in the global primitive information list and the index number of the first primitive basic information to generate the global primitive index list.

13. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The primitive depth processing unit further comprises: Before reading the block primitive sorting list in parallel, determine whether the block primitive sorting list that matches the row number and column number of the current group to be drawn has been cached, and if so, read the block primitive sorting list; and determine whether the row primitive index list and the row primitive sorting list that match the row number of the current group to be drawn have been cached, and if so, read the row primitive index list and the row primitive sorting list, otherwise control the primitive list cache unit to read the global primitive index list.

14. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The primitive depth processing unit further comprises: Before reading the global primitive index list and the global primitive sort list, the row number and column number of the current group to be drawn are calculated according to the position coordinates of the starting pixel of the current group to be drawn and the position coordinates of each block.

15. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 14, characterized in that: The primitive list cache unit further comprises: According to the row number and the number of columns, starting from the first record corresponding to the row number in the global primitive index list, read the same number of records as the number of columns and cache them as a row primitive index list.

16. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The primitive depth processing unit further comprises: Read the record in the row primitive index list that matches the column number of the current group to be drawn, and obtain the starting index number and the number of records corresponding to the block that matches the column number of the current group to be drawn; Starting from the record corresponding to the start index number in the row primitive sorting list, primitive basic information of the same quantity as the record quantity is read and cached as the block primitive sorting list.

17. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The primitive depth processing unit further comprises: The position coordinates of each pixel of the current group to be drawn are compared with the clipping area of ​​each primitive in the block primitive sorting list one by one in parallel. If the pixel is located in the clipping area of ​​the primitive, the unique identifier of the primitive sorting information is read, and the unique identifier is added to the pixel primitive list corresponding to the pixel.

18. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The primitive depth processing unit further comprises: The position coordinates of each pixel of the current group to be drawn are calculated according to the position coordinates of the starting pixel of the current group to be drawn or the previous group to be drawn and the preset total number of pixels; wherein the preset total number of pixels refers to the total number of pixels of the current group to be drawn.

19. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The primitive depth processing unit further comprises: Before reading the starting index number and the number of records corresponding to the block matching the column number of the current group to be drawn from the row primitive index list, clear the pixel primitive list of the previous drawing group in the current cache.

20. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: Further including: The pixel synthesis processing unit on the graphics processing device obtains the source data of each primitive in the pixel primitive list of each pixel of the current group to be drawn in parallel, calculates the pixel color value of the primitive at the pixel position according to the source data of the primitive, and performs real-time pixel synthesis processing on each pixel color value to generate image data and output it.

21. The graphics processing system capable of real-time sorting of a plurality of graphics primitives as claimed in claim 11, characterized in that: The primitive depth processing unit further comprises: The block primitive list unit reads the starting index number and the number of records corresponding to the block matching the column number of the current group to be drawn from the row primitive index list, and reads all primitive basic information corresponding to the block matching the column number of the current group to be drawn in the row primitive sorting list according to the starting index number and the number of records, and caches the information as the block primitive sorting list; A plurality of comparators connected to the block primitive list unit, and acquiring in parallel the records in the block primitive sorting list that match each pixel position of the current to-be-drawn group; A plurality of pixel primitive list units connected to the comparator generate and cache, for each pixel of the current to-be-drawn group, a hierarchically sorted pixel primitive list including at least a unique identifier of the primitive.

22. An electronic device, characterized in that: It comprises a graphics processing system capable of sorting a plurality of graphics primitives in real time as described in any one of claims 11 to 21, and a display device connected to the graphics processing system capable of sorting a plurality of graphics primitives in real time.

Citation Information

Patent Citations

  • OSD architecture for realizing real-time block truncation coding through utilization of line cache area

    CN107786872A

  • Image processing device and system using the same

    CN1115454A

  • Graphics processing system and method based on bitmap primitives and GPU (Graphics Processing Unit)

    CN115349136A

  • Image drawing device

    JP2013025376A

  • Graphics processing unit, graphics processing system including the same, and method of operating the same

    US20150049107A1