Subdivision curve data processing implementation method, system, medium and vector graphics processing device

By storing intersection coordinates through multi-level lookup tables, the problem of the Tessellation data structure's large demand for memory resources is solved, and the parallel processing of multiple segmentation curves and the improvement of vector graphics rendering performance is achieved.

CN113947515BActive Publication Date: 2024-12-03VERISILICON MICROELECTRONICS (SHANGHAI) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010692835.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2024-12-03
Estimated Expiration
2040-07-17

AI Technical Summary

Technical Problem

The existing Tessellation data structures require a large demand for memory resources when storing and rendering vector graphics, making it difficult for hardware to realize parallel operation of multiple segmentation curves, affecting rendering performance, and low cache hit rate, increasing system bandwidth and power consumption.

Method used

Multi-level lookup tables are used to store data based on the coordinates of intersections, reducing memory resource requirements, supporting multi-channel segmentation curve processing, and avoiding intersection search through cache optimization, improving rendering performance.

Benefits of technology

It effectively reduces memory resource requirements, improves cache hit rate, reduces memory reading, and significantly improves the performance of vector graphics rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947515B_ABST
    Figure CN113947515B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, medium and vector graphics processing device for implementing subdivision curve data processing, including the following steps: setting one to multiple levels of cache tables for the designated coordinates of the intersection points obtained by the intersection of the vector line of the subdivision curve and the X / Y line; storing the address of the information table in the memory in the content table, storing the address of the content table in the memory in the first-level cache table, and storing the address of the first-level cache table in the memory in the upper-level cache table; storing the node information corresponding to the designated coordinates in the information table. The method, system, medium and vector graphics processing device for processing subdivision curve data of the present invention store effective data based on the X / Y coordinate sorting of the intersection points by means of a multi-level lookup table, thereby effectively reducing the demand for memory resources, supporting multi-channel subdivision curve processing, and improving the performance of vector graphics rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for processing a data structure, and in particular to a method, system, medium and vector graphics processing device for processing a tessellation curve data structure. Background Art

[0002] Tessellation technology is also known as subdivision curve technology. In the application of vector graphics, the lines generated by tessellation generate intersection points with a certain Y line, and these intersection points need to be stored in the memory. After Tessellation completes the current vector graphics, the intersection data stored in the memory is read back; and the coverage value of each pixel in the vector graphics is calculated based on the filling and position information of the intersection, and the entire vector graphics is drawn according to the filling rules.

[0003] In the prior art, the information stored in the memory in the Tessellation data structure is the filling and statistical information of all pixels of the entire vector graphics. This implementation method causes Tessellation to have a large demand for memory resources. In addition, the large memory requirement makes it difficult for the hardware to implement the parallel operation of multiple subdivision curves, limiting the performance of the system hardware.

[0004] After Tessellation processes the entire vector graphic, the data structure in the prior art needs to read back all the data in the memory according to the position of the vector graphic from top to bottom and from left to right, find the intersection point, and render it. The above memory data reading back method has the following defects:

[0005] (1) The bandwidth of the system is very large;

[0006] (2) It takes a long time to find the intersection point, which is equivalent to adding a lot of bubble time to the vector graphics filling, seriously affecting the rendering performance.

[0007] In addition, in order to reduce the interaction with the memory, a cache memory (cache) is usually added to the hardware to cache part of the data. However, the cache hit rate in the prior art is low, which leads to a larger bandwidth of the system, lower performance and increased power consumption. Summary of the invention

[0008] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide a method, system, medium and vector graphics processing device for implementing subdivision curve data processing, which stores valid data based on the coordinates of intersection points through a multi-level lookup table, thereby effectively reducing the demand for memory resources, supporting multi-channel subdivision curve processing, and improving the performance of vector graphics rendering.

[0009] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for implementing subdivision curve data processing in a vector graphics processing device, comprising the following steps: setting one or more levels of cache tables for the designated coordinates of the intersection point obtained by the intersection of the vector line of the subdivision curve and the X / Y line; the designated coordinates are X coordinates or Y coordinates; storing the address of the information table in the memory in the content table, storing the address of the content table in the memory in the first-level cache table, and storing the address of the first-level cache table in the memory in the upper-level cache table; storing the node information corresponding to the designated coordinates in the information table; when the designated coordinates are X coordinates, the corresponding node information is Y node information; when the designated coordinates are Y coordinates, the corresponding node information is X node information.

[0010] In one embodiment of the present invention, all node information corresponding to multiple specified coordinates are stored in multiple information tables, and a single information table stores partial node information of multiple specified coordinates.

[0011] In one embodiment of the present invention, the number of designated coordinates stored in the information table is set to one or more according to demand; the number of the partial nodes is determined by the number of designated coordinates and the width of the information table.

[0012] In one embodiment of the present invention, the X node information includes an X coordinate of an intersection, fill information, a sub-position, and the number of sub-positions; the Y node information includes a Y coordinate of an intersection, fill information, a sub-position, and the number of sub-positions; and the sub-position includes an X sub-position and a Y sub-position.

[0013] In one embodiment of the present invention, the maximum number of nodes processed at a time for a subdivision curve can be customized. If the number of nodes to be processed is greater than the maximum number, vector graphics are first rendered for the first maximum number of nodes, and then vector graphics are rendered for the remaining nodes. When the maximum number is not set, vector graphics are rendered for all nodes at a time.

[0014] In one embodiment of the present invention, the nodes in the information table are sorted in ascending order according to the corresponding coordinates; the maximum coordinate value or the minimum coordinate value of the node is set in the content table; when the number of nodes stored is the maximum number, if the coordinate of the newly generated intersection is greater than the maximum coordinate value, the intersection is directly discarded, and in the next round, the minimum coordinate value is set to the maximum coordinate value of the previous round, and only the newly generated intersection points with coordinates greater than the minimum coordinate value are processed.

[0015] In one embodiment of the present invention, the nodes in the information table are sorted in descending order according to the corresponding coordinates; the maximum coordinate value or the minimum coordinate value of the node is set in the content table; when the number of nodes stored is the maximum number, if the coordinate of the newly generated intersection is less than the minimum coordinate value, the intersection is directly discarded, and in the next round, the maximum coordinate value is set to the minimum coordinate value of the previous round, and only the newly generated intersections with coordinates less than the maximum coordinate value are processed.

[0016] In one embodiment of the present invention, the address of the corresponding next-level cache table is searched in the highest-level cache table according to the specified coordinates of the new intersection, until the address of the first-level cache table is obtained;

[0017] If the cache table of a certain level is not in the cache memory, read the cache table of this level from the memory, and then obtain the corresponding next-level cache table address from the cache table of this level; otherwise, directly obtain the corresponding next-level address from the cache table of this level;

[0018] If the first-level cache table is not in the cache memory, read the first-level cache table from the memory, and then obtain the corresponding content table address in the first-level cache table; otherwise, directly obtain the corresponding content table address in the first-level cache table;

[0019] If the content table is not in the cache memory, read the content table from the memory, and then determine whether to discard the new intersection according to the content table; otherwise, directly determine whether to discard the new intersection according to the content table;

[0020] If the new intersection is lost, update the content table; if the new intersection is not lost, obtain the corresponding information table address; if the information table is not in the cache memory, read the information table from the memory, update or add the information of the new intersection to the node information in the information table, and update the content table; otherwise directly update or add the information of the new intersection to the node information in the information table, and update the content table.

[0021] Correspondingly, the present invention provides a subdivision curve data processing implementation system in a vector graphics processing device, comprising a setting module and a storage module;

[0022] The setting module is used to set one or more levels of cache tables for the specified coordinates of the intersection points generated by the subdivided curve; the specified coordinates are X coordinates or Y coordinates;

[0023] The storage module is used to store the address of the information table in the memory in the content table, store the address of the content table in the memory in the first-level cache table, and store the address of the first-level cache table in the memory in the upper-level cache table; the information table stores the node information corresponding to the specified coordinates; when the specified coordinates are X coordinates, the corresponding node information is Y node information; when the specified coordinates are Y coordinates, the corresponding node information is X node information.

[0024] The present invention provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the subdivision curve data processing method in the above-mentioned vector graphics processing device is implemented.

[0025] Finally, the present invention provides a vector graphics processing device, comprising: a processor and a memory;

[0026] The memory is used to store computer programs;

[0027] The processor is used to execute the computer program stored in the memory, so that the vector graphics processing device executes the above-mentioned method for implementing subdivision curve data processing in the vector graphics processing device.

[0028] As described above, the method, system, medium and vector graphics processing device for implementing subdivision curve data processing of the present invention have the following beneficial effects:

[0029] (1) Effectively reduce the demand for memory resources, support parallel processing of multiple subdivision curves, and improve the efficiency of subdivision curves;

[0030] (2) Increases the cache memory hit rate, reduces memory reads, and reduces bandwidth;

[0031] (3) It avoids the searching time of intersections and improves the performance of vector graphics rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flow chart showing a method for implementing subdivision curve data processing in a vector graphics processing device of the present invention in one embodiment;

[0033] Figure 2 It is a schematic diagram showing a data structure of a subdivided curve in a vector graphics processing device of the present invention in one embodiment;

[0034] Figure 3 Shown is a schematic diagram of the structure of an X node in an embodiment of the present invention;

[0035] Figure 4 Shown is a schematic diagram of the structure of an X-node cache line in an embodiment of the present invention;

[0036] Figure 5 Shown is a schematic diagram of the structure of a table of contents of the present invention in one embodiment;

[0037] Figure 6 It is a flow chart showing a method for implementing subdivision curve data processing in a vector graphics processing device of the present invention in another embodiment;

[0038] Figure 7 It is a schematic structural diagram of a subdivision curve data processing implementation system in a vector graphics processing device of the present invention in one embodiment;

[0039] Figure 8 FIG. 4 is a schematic diagram showing the structure of a vector graphics processing device in one embodiment of the present invention.

[0040] Component number description

[0041] 71 Setting Module

[0042] 72 Storage Module

[0043] 81 Processor

[0044] 82 Memory DETAILED DESCRIPTION

[0045] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0046] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0047] The method, system, medium and vector graphics processing device for implementing subdivision curve data processing in the vector graphics processing device of the present invention store effective data based on the coordinates of intersections by means of a multi-level lookup table, thereby reducing the demand for memory resources, so that the system can provide sufficient memory for the hardware to perform multiple subdivision curves in parallel, thereby effectively improving the performance of the hardware; at the same time, since the nodes are stored based on the coordinates, the search process of intersections during rendering is avoided, thereby effectively improving the performance of vector graphics rendering.

[0048] like Figure 1 As shown, in one embodiment, the method for implementing subdivision curve data processing in the vector graphics processing device of the present invention includes the following steps:

[0049] Step S1, setting one or more levels of cache tables for designated coordinates of intersection points obtained by the intersection of a vector line of a subdivided curve and an X / Y line; the designated coordinates are X coordinates or Y coordinates.

[0050] When the cache table is set, only the specified coordinate values ​​of the generated intersections are saved in the content table; if the cache table is not set, all the specified coordinate values ​​are saved in the content table.

[0051] Specifically, the intersection points obtained by the intersection of the vector line of the subdivided curve and the X / Y line are stored in a one-level or multi-level lookup table. Figure 2 As shown, when the specified coordinate is the Y coordinate and the second-level cache table is set, the second-level cache table is used to store the address of the first-level cache table in the memory, the first-level cache table is used to store the address of the content table in the memory, and the content table is used to store the address of the information table in the memory. Among them, the Y coordinate of the intersection contains the first-level cache table index and the content table index. Therefore, for an intersection, according to its Y coordinate, the corresponding first-level cache table and content table can be located in sequence from the second-level cache table to obtain the address of the information table. When the specified coordinate is the X coordinate, the storage method is the same as when the specified coordinate is the Y coordinate, so it will not be repeated here.

[0052] The information table is a certain number of X nodes (Xnode) corresponding to the horizontal row corresponding to the Y coordinate of the intersection or a certain number of Y nodes (Ynode) corresponding to the vertical row corresponding to the X coordinate of the intersection. Figure 3As shown, in one embodiment, the X node information includes the X coordinate (Xcoord) of the intersection, the filling information (Info), the sub-position (subY(0), subX(0), subY(1), subX(1), subY(2), subX(2) ...) and the number of sub-positions (Cnt), and the sub-position includes the X sub-position and the Y sub-position. Correspondingly, the Y node information includes the Y coordinate, the filling information, the sub-position and the number of sub-positions of the intersection. Preferably, each node in the information table is sorted in sequence according to the corresponding coordinates. When the subdivision curve is completed, when reading the information table for vector graphics filling, valid data can be directly obtained, avoiding the search time of the intersection, thereby improving the performance of vector graphics rendering.

[0053] Step S2: storing the address of the information table in the memory in the content table, storing the address of the content table in the memory in the first-level cache table, and storing the address of the first-level cache table in the memory in the upper-level cache table; storing the node information corresponding to the specified coordinate in the information table; when the specified coordinate is an X coordinate, the corresponding node information is Y node information; when the specified coordinate is a Y coordinate, the corresponding node information is X node information.

[0054] Specifically, after the data structure of the intersection generated by the subdivided curve is set, when a new intersection is generated, the system automatically assigns an address to the intersection, and stores it in the corresponding information table according to the coordinates of the intersection, stores the address of the information table in the memory in the content table, stores the address of the content table in the memory in the first-level cache table, stores the address of the first-level cache table in the memory in a higher-level cache table, and so on until the highest-level cache table, thereby completing the storage of the intersection. Among them, the initial value of all memory addresses is 0, that is, the memory is empty. Only when a new intersection is generated, if the address of a certain level of data corresponding to it is 0, a new address will be automatically assigned to save the newly generated data to the corresponding position, and the address will be stored through a multi-level lookup table, thereby reducing the demand for memory by only saving valid data, making multi-channel parallel processing of subdivided curve processing possible.

[0055] In one embodiment of the present invention, all node information corresponding to multiple specified coordinates are stored together in multiple information tables, and a single information table stores partial node information of multiple specified coordinates. The number of specified coordinates stored in the information table is set to one or more as required; the number of partial nodes is determined by the number of specified coordinates and the width of the information table. In other words, compared to simultaneously storing the addresses of multiple nodes corresponding to a specified coordinate, the present invention implements block storage and simultaneously stores the addresses of partial nodes corresponding to multiple specified coordinates. Specifically, the operation of drawing vector graphics is continuous, so the X or Y coordinates of the continuously generated intersections are also adjacent upward or downward. Taking a cache line size of 64Byte and a resolution of 8k as an example, in order to improve the hit rate of the cache memory, such as Figure 4 As shown, the method of storing 16 X nodes in a horizontal row in a 64B information table is changed to storing two X nodes in each of 8 adjacent horizontal rows. Therefore, when processing new intersections, when the intersections of these 8 horizontal rows are generated continuously, the data that needs 8 64B X blocks is changed from being missed continuously to being hit on a cache line of the information table after a single miss, thereby effectively improving the hit rate of the cache line.

[0056] In one embodiment of the present invention, the maximum number of nodes processed at a time by a subdivided curve can be customized. In practical applications, the intersections of general vector graphics are not many in most cases. In order to reduce the demand for memory resources, according to the analysis of actual application scenarios, the maximum number of nodes processed by a single subdivided curve can be set, such as 16, 32, etc. In this way, the bit width of the data can be reduced without affecting the performance or with little impact on the performance, further reducing the demand for memory for a single subdivided curve. If the number of nodes to be processed is greater than the maximum number, firstly, the vector graphics are rendered for the first maximum number of nodes, and then the subdivided curve is re-performed and the vector graphics are rendered for the remaining nodes in the next round; when the maximum number is not set, the vector graphics are rendered for all nodes at a time.

[0057] In one embodiment of the present invention, the nodes in the information table are sorted in ascending order according to the corresponding coordinates; the maximum coordinate value or minimum coordinate value of the node is set in the content table; when the number of nodes stored is the maximum number, if the coordinate of the newly generated intersection is greater than the maximum coordinate value, the intersection is directly discarded, and in the next round, the minimum coordinate value is set to the maximum coordinate value of the previous round, and only the newly generated intersection whose coordinate is greater than the minimum coordinate value is processed. In order to achieve the above functions, in one embodiment, if Figure 5 As shown, in the content table, the maximum value of the X coordinate xcoord of the X node corresponding to the horizontal row is set max 、X coordinate minimum value xcoordmin , flag F and number of X nodes cnt. xcoord max Indicates the maximum value of the X coordinate of the X node stored in the corresponding horizontal row of information table; xcoord min Indicates the left boundary of the area that currently needs to be rendered. The number of X nodes cnt indicates the number of X nodes currently stored in the horizontal row; F indicates whether the number of X nodes stored in the horizontal row reaches the preset maximum value. When the number of X nodes corresponding to the horizontal row is the maximum value of the X coordinate, if the X coordinate of the newly generated intersection is greater than the maximum value of the X coordinate, the information table does not need to be read but the intersection is directly discarded and left for the next round of processing, thereby reducing the reading of the memory. In the next round, the minimum value of the X coordinate is set to the maximum value of the X coordinate of the previous round, and only the newly generated intersections with X coordinates greater than the minimum value of the X coordinate are processed.

[0058] In another embodiment of the present invention, the nodes in the information table are sorted in descending order according to the corresponding coordinates; the maximum coordinate value or the minimum coordinate value of the node is set in the content table; when the number of nodes stored is the maximum number, if the coordinate of the newly generated intersection is less than the minimum coordinate value, the intersection is directly discarded, and in the next round, the maximum coordinate value is set to the minimum coordinate value of the previous round, and only the newly generated intersections with coordinates less than the maximum coordinate value are processed.

[0059] Based on the above settings, Figure 6 As shown, in one embodiment of the present invention, the method for implementing subdivision curve data processing in the vector graphics processing device of the present invention includes the following steps:

[0060] According to the specified coordinates of the new intersection, the address of the corresponding next-level cache table is searched in the highest-level cache table until the address of the first-level cache table is obtained.

[0061] If the cache table of a certain level is not in the cache memory, read the cache table of this level from the memory, and then obtain the corresponding next-level cache table address from the cache table of this level; otherwise, directly obtain the corresponding next-level address from the cache table of this level.

[0062] According to the first-level cache table address, if the first-level cache table is not in the cache memory, the first-level cache table is read from the memory, and then the corresponding content table address is obtained from the first-level cache table; otherwise, the corresponding content table address is directly obtained from the first-level cache table.

[0063] According to the content table address, if the content table is not in the cache memory, read the content table from the memory, and then determine whether to discard the new intersection according to the content table; otherwise, directly determine whether to discard the new intersection according to the content table. Specifically, according to the coordinates of the new intersection and the maximum value of the coordinates xcoord of the nodes in the content table max Determine whether to process the new intersection. That is, the X coordinate of the new intersection is greater than xcoord max , then discard the new intersection point, otherwise store the intersection point.

[0064] If the new intersection is lost, the content table is updated; if the new intersection is not lost, the corresponding information table address is obtained; if the information table is not in the cache memory, the information table is read from the memory, the information of the new intersection is updated or added to the node information in the information table, and the content table is updated; otherwise, the information of the new intersection is directly updated or added to the node information in the information table, and the content table is updated. Specifically, if the new intersection is not lost, the corresponding information table address is obtained according to the address in the content table, and then the information table is read from the memory or cache memory according to the information table address. When the coordinates of the intersection information and the coordinates in the node information in the information table are not equal, it indicates that the current intersection is a newly generated intersection, then according to the coordinates of the intersection and the coordinates of the existing nodes are sorted, a node is added to the corresponding position of the information table, the corresponding node information is stored according to the new intersection information, and the number of nodes in the content table is updated at the same time, that is, the number of nodes is increased by 1. When the coordinates of the intersection information are the same as a coordinate in the node information in the information table, it indicates that the current intersection has been crossed by a vector line before, and the node information corresponding to the coordinates is updated according to the intersection information, and the number of nodes in the content table is updated.

[0065] like Figure 7 As shown, in one embodiment, the subdivision curve data processing implementation system in the vector graphics processing device of the present invention includes a setting module 71 and a storage module 72.

[0066] The setting module 71 is used to set one or more levels of cache tables according to the designated coordinates of the intersection points generated by the subdivided curves; the designated coordinates are X coordinates or Y coordinates.

[0067] The storage module 72 is connected to the setting module 71, and is used to store the address of the information table in the memory in the content table, store the address of the content table in the memory in the first-level cache table, and store the address of the first-level cache table in the memory in the upper-level cache table; the information table stores the node information corresponding to the specified coordinates; when the specified coordinates are X coordinates, the corresponding node information is Y node information; when the specified coordinates are Y coordinates, the corresponding node information is X node information.

[0068] The structures and principles of the setting module 71 and the storage module 72 correspond one to one with the steps in the method for implementing subdivision curve data processing in the above-mentioned vector graphics processing device, and therefore will not be described in detail here.

[0069] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the x module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0070] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0071] The storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the subdivision curve data processing method in the above-mentioned vector graphics processing device is implemented. Preferably, the storage medium includes: ROM, RAM, disk, U disk, memory card or CD and other media that can store program codes.

[0072] like Figure 8 As shown, in one embodiment, the vector graphics processing device of the present invention includes: a processor 81 and a memory 82 .

[0073] The memory 82 is used to store computer programs.

[0074] The memory 82 includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.

[0075] The processor 81 is connected to the memory 82 and is used to execute the computer program stored in the memory 82 so that the vector graphics processing device executes the above-mentioned method for implementing subdivision curve data processing in the vector graphics processing device.

[0076] Preferably, the processor 81 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0077] In summary, the subdivision curve data processing implementation method, system, medium and vector graphics processing device of the present invention effectively reduce the resource demand for memory, support parallel multi-channel subdivision curve processing, and improve the efficiency of subdivision curves; increase the hit rate of cache memory, reduce the reading of memory, and reduce bandwidth; avoid the search time of intersections, and improve the performance of vector graphics rendering. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.

[0078] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for implementing subdivision curve data processing in a vector graphics processing device, characterized in that: The following steps are involved: Setting one or more levels of cache tables for the specified coordinates of the intersection points obtained by the intersection of the vector line of the subdivided curve and the X / Y line; the specified coordinates are X coordinates or Y coordinates; The address of the information table in the memory is stored in the content table, the address of the content table in the memory is stored in the first-level cache table, and the address of the first-level cache table in the memory is stored in the upper-level cache table; the node information corresponding to the specified coordinate is stored in the information table; when the specified coordinate is an X coordinate, the corresponding node information is Y node information; when the specified coordinate is a Y coordinate, the corresponding node information is X node information.

2. The method for implementing subdivision curve data processing in a vector graphics processing device according to claim 1, characterized in that: All node information corresponding to multiple specified coordinates is stored in multiple information tables, and a single information table stores partial node information of multiple specified coordinates.

3. The method for implementing subdivision curve data processing in a vector graphics processing device according to claim 2, characterized in that: The number of the specified coordinates stored in the information table is set to one or more according to the requirements; the number of the partial nodes is determined by the number of the specified coordinates and the width of the information table.

4. The method for implementing subdivision curve data processing in a vector graphics processing device according to claim 1, characterized in that: The X node information includes the X coordinate of the intersection, filling information, sub-position and the number of sub-positions; the Y node information includes the Y coordinate of the intersection, filling information, sub-position and the number of sub-positions; the sub-position includes the X sub-position and the Y sub-position.

5. The method for implementing subdivision curve data processing in a vector graphics processing device according to claim 1, characterized in that: The maximum number of nodes that can be processed at a time for a subdivision curve can be customized. If the number of nodes to be processed is greater than the maximum number, vector graphics are first rendered for the first maximum number of nodes, and then for the remaining nodes. When the maximum number is not set, vector graphics are rendered for all nodes at once.

6. The method for implementing subdivision curve data processing in a vector graphics processing device according to claim 5, characterized in that: The nodes in the information table are sorted in ascending order according to the corresponding coordinates; the maximum coordinate value or the minimum coordinate value of the node is set in the content table; when the number of nodes stored is the maximum number, if the coordinate of the newly generated intersection is greater than the maximum coordinate value, the intersection is directly discarded, and in the next round, the minimum coordinate value is set to the maximum coordinate value of the previous round, and only the newly generated intersection points with coordinates greater than the minimum coordinate value are processed.

7. The method for implementing subdivision curve data processing in a vector graphics processing device according to claim 5, characterized in that: The nodes in the information table are sorted in descending order according to the corresponding coordinates; the maximum coordinate value or the minimum coordinate value of the node is set in the content table; when the number of nodes stored is the maximum number, if the coordinate of the newly generated intersection is less than the minimum coordinate value, the intersection is directly discarded, and in the next round, the maximum coordinate value is set to the minimum coordinate value of the previous round, and only the newly generated intersections with coordinates less than the maximum coordinate value are processed.

8. The method for implementing subdivision curve data processing in a vector graphics processing device according to claim 1, characterized in that: According to the specified coordinates of the new intersection, the address of the corresponding next-level cache table is searched in the highest-level cache table until the address of the first-level cache table is obtained; If a certain level of cache table is not in the cache memory, read the cache table of this level from the memory, and then obtain the corresponding next level cache table address from the cache table of this level; otherwise, directly obtain the corresponding next level address from the cache table of this level; If the first-level cache table is not in the cache memory, read the first-level cache table from the memory, and then obtain the corresponding content table address in the first-level cache table; Otherwise, directly obtain the corresponding content table address in the first-level cache table; If the content table is not in the cache memory, reading the content table from the memory, and then determining whether to discard the new intersection according to the content table; Otherwise, directly determine whether to discard the new intersection according to the content table; If the new intersection is lost, updating the content table; If the new intersection is not discarded, obtaining the corresponding information table address; If the information table is not in the cache memory, read the information table from the memory, update or add the information of the new intersection to the node information in the information table, and update the content table; Otherwise, the information of the new intersection is directly updated or added to the node information in the information table, and the content table is updated.

9. A system for implementing subdivision curve data processing in a vector graphics processing device, characterized in that: Includes a setting module and a storage module; The setting module is used to set one or more levels of cache tables according to the specified coordinates of the intersection points obtained by the intersection of the vector line of the subdivided curve and the X / Y line; the specified coordinates are X coordinates or Y coordinates; The storage module is used to store the address of the information table in the memory in the content table, store the address of the content table in the memory in the first-level cache table, and store the address of the first-level cache table in the memory in the upper-level cache table; the information table stores the node information corresponding to the specified coordinates; when the specified coordinates are X coordinates, the corresponding node information is Y node information; when the specified coordinates are Y coordinates, the corresponding node information is X node information.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for processing subdivision curve data in a vector graphics processing device according to any one of claims 1 to 8 is implemented.

11. A vector graphics processing device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory, so that the vector graphics processing device executes the method for implementing subdivision curve data processing in the vector graphics processing device according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image processing apparatus and program

    JP2011090663A

  • Memory Consistency in Graphics Memory Hierarchy with Relaxed Ordering

    US20180181489A1