Pixel processing method and apparatus, electronic device, storage medium, program product

By determining the number of predicted compression transmissions and strategies for pixel data groups based on the region information of pixel blocks, the problem of redundant data transmission in graphics processing systems is solved, achieving more efficient data transmission.

CN122160516APending Publication Date: 2026-06-05MOORE THREADS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MOORE THREADS TECH CO LTD
Filing Date
2026-05-09
Publication Date
2026-06-05

Smart Images

  • Figure CN122160516A_ABST
    Figure CN122160516A_ABST
Patent Text Reader

Abstract

The present disclosure provides a pixel processing method and device, electronic equipment, storage medium and program product. The method comprises: obtaining pixel data groups corresponding to a plurality of pixel blocks and region information of each pixel block; determining a predicted compression transmission number of the pixel data groups according to the region information of each pixel block; and determining a compression processing strategy for the pixel data groups according to the predicted compression transmission number, wherein the compression processing strategy indicates whether the pixel data groups are compressed. According to the embodiments of the present disclosure, it can be flexibly determined whether the pixel data groups are compressed, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a pixel processing method and apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] In the process of rendering graphics, existing graphics processing systems usually perform image sampling on graphics pixels. For example, when multi-sample anti-aliasing (MSAA) is enabled, the graphics processing system will collect multiple sampling points for each pixel block according to a preset granularity, thereby obtaining the sampled values ​​of multiple sampling points within the pixel block, such as color values, as the pixel data of the pixel block.

[0003] In related technologies, graphics processing systems typically assemble pixel data from each pixel block obtained from image sampling directly into packets and send them to downstream modules via a data transmission bus. These downstream modules can be, for example, a frame pixel compression module (FPC) or a sampling buffer unit. After receiving the data packet, the downstream module writes the pixel data of each pixel block in the data packet into a storage unit for subsequent parsing, display, or encoding processing.

[0004] However, in a set of pixel data obtained from image sampling, the pixel data of each pixel block usually includes the sampled values ​​of multiple sampling points. Directly assembling and transmitting this set of pixel data may result in a large amount of redundant data being written into the data transmission bus and storage unit, leading to low transmission efficiency. Summary of the Invention

[0005] This disclosure provides a pixel processing method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.

[0006] In a first aspect, this disclosure provides a pixel processing method, which includes: acquiring pixel data groups corresponding to multiple pixel blocks and region information for each pixel block, wherein the region information is used to indicate the type of graphic region in which the pixel block is located, and the pixel consistency of pixel blocks in different types of graphic regions is different; determining a predicted number of compressed transmissions corresponding to the pixel data group based on the region information of each pixel block, wherein the predicted number of compressed transmissions represents the number of transmissions corresponding to the compressed data of the pixel data group transmitted based on a burst transmission protocol; and determining a compression processing strategy for the pixel data group based on the predicted number of compressed transmissions, wherein the compression processing strategy indicates whether to compress the pixel data group.

[0007] Secondly, this disclosure provides a pixel processing apparatus, comprising: an acquisition module, configured to acquire pixel data groups corresponding to multiple pixel blocks and region information of each pixel block, wherein the region information is used to indicate the type of graphic region in which the pixel block is located, and the pixel consistency of pixel blocks in different types of graphic regions is different; a count determination module, configured to determine the predicted number of compressed transmissions corresponding to the pixel data group based on the region information of each pixel block, wherein the predicted number of compressed transmissions represents the number of transmissions corresponding to the compressed data of the pixel data group transmitted based on a burst transmission protocol; and a strategy determination module, configured to determine a compression processing strategy for the pixel data group based on the predicted number of compressed transmissions, wherein the compression processing strategy indicates whether to perform compression processing on the pixel data group.

[0008] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the pixel processing method described above.

[0009] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the pixel processing method described above.

[0010] Fifthly, this disclosure provides a computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the pixel processing method described above.

[0011] The embodiments provided in this disclosure, in order to improve the transmission efficiency of pixel data groups, do not directly compress the pixel data groups. Instead, they determine the predicted number of compression transmissions required to transmit the compressed data corresponding to the pixel data group based on the region information of the pixel block using the Burst Transmission Protocol. The benefit of compression processing is evaluated by using the predicted number of compression transmissions, thereby determining the corresponding compression processing strategy. This can improve the flexibility of pixel processing, that is, it can flexibly determine whether to compress the pixel data group, avoiding the problem of increased transmission latency caused by ineffective compression processing. At the same time, compressing the pixel data group when it is determined that there is a benefit to compression processing based on the predicted number of compression transmissions can reduce redundant data transmission and improve data transmission efficiency.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0013] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0014] Figure 1 This is a flowchart of a pixel processing method provided in an embodiment of the present disclosure.

[0015] Figure 2 A flowchart for determining the predicted number of compressed transmissions provided in an embodiment of this disclosure.

[0016] Figure 3 This is a schematic diagram illustrating the application of the pixel processing method provided in the embodiments of this disclosure.

[0017] Figure 4 This is a block diagram of a pixel processing apparatus provided in an embodiment of the present disclosure.

[0018] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0020] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0021] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0022] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0023] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0024] As described in the background section, during the rendering process, in the graphics sampling stage of the rendering pipeline, the graphics processing system typically packages the pixel data of each pixel block obtained from image sampling directly and sends it to downstream modules via a data transmission bus. For example, a set of pixel data is usually 2Kbits. When performing image sampling, such as MSAA sampling, if the MSAA parameter is 4x, then for a pixel block (also called a pixel region), the sample values ​​of 4 sampling points will be collected as its pixel data. These sample values ​​can be color values, such as RGB values ​​or YUV values. That is, the pixel data of a pixel block can be represented in the form of (sample value of sampling point 1, ..., sample value of sampling point n), where n is determined according to the MSAA parameter. When the MSAA parameter is 1x, it means that 1 sampling point is collected for a pixel block; when the MSAA parameter is 2x, it means that 2 sampling points are collected for a pixel block; when the MSAA parameter is 4x, it means that 4 sampling points are collected for a pixel block; and when the MSAA parameter is 8x, it means that 8 sampling points are collected for a pixel block.

[0025] In the process of developing this disclosure, the applicant discovered that when a graphics processing system samples an image, the pixel consistency of a pixel block often varies depending on whether the pixel block is located in a different graphics region. For example, when a pixel block is located in a first graphics region (also known as a non-edge region, i.e., an edge empty region), this first graphics region is typically a flat surface in the middle of a rendered object, a solid color block, or a region with a slow color transition. Since the pixel color change in this type of graphics region is not significant, the sampled values ​​of multiple sampling points within the pixel data of each pixel in the same pixel block are often the same or similar. However, when a pixel block is located in a second graphics region (also known as a graphics consistent region, i.e., a clear region), since this second graphics region is typically a solid color filled region of a rendered object or a smooth surface region with a gradual color change, not only are the sampled values ​​of multiple sampling points within the pixel data of each pixel in the same pixel block the same or similar, but even the sampled values ​​of sampling points in different pixel blocks are the same or similar. When a pixel block is located in the third graphic region (also known as the graphic edge region, i.e., the edge non-empty region), this third graphic region can usually be the outline edge, boundary line, and light and dark boundary of the rendered object. Since the pixel color in this type of graphic region changes drastically, the sampling values ​​of different sampling points within the same pixel block are usually different. That is, the pixel consistency of pixel blocks in this type of graphic region is different.

[0026] It should be noted that, in the embodiments of this disclosure, the first, second, and third graphic regions are graphic regions divided according to the pixel consistency of the contained pixel blocks. As mentioned above, the first graphic region, i.e., the edge empty region, can be a region in the graphic region where the color represented by the pixels is smooth. The second graphic region, i.e., the clear region, can be a region in the graphic region where the pixel data between multiple pixel blocks meets a preset similarity condition. This preset similarity condition can be that the similarity of the pixel data between multiple pixel blocks meets a preset threshold. For example, during image sampling processing, if the pixel data between multiple pixel blocks in a certain region of the image is the same or the difference is less than 1 (this preset value can be set as needed, for example, it can also be 0.1, 0.001, 2, etc., and this disclosure does not make any special limitation on this), then the graphic region corresponding to these multiple pixel blocks can be identified as the second graphic region. The third graphic region, i.e., the edge empty region, can be a region in the graphic region where the color represented by the pixels changes drastically.

[0027] In related technologies, a set of pixel data obtained from image sampling is often directly packetized and sent to downstream modules via a data transmission bus. During this process, with frame compression disabled, the basic transmission granularity is typically 256 bits, and the packetized data is sent to the downstream module for parsing in a maximum of four burst transmissions per session. The parsed pixel data is then written to a storage unit. Even with frame compression enabled, the basic transmission granularity remains 256 bits, and the packet is transmitted to the downstream module's frame compression module in a maximum of eight burst transmissions per session. The downstream module then parses the pixel data, performs frame compression, and writes it to a storage unit. This process ignores the consistency between pixel data within the packet, resulting in a significantly smaller effective data volume than the transmission granularity. A large amount of redundant data and invalid padding data consumes data transmission bus bandwidth, leading to wasted bus bandwidth and reduced data transmission efficiency.

[0028] In view of this, the applicant further discovered that for pixel data groups corresponding to multiple pixel blocks after image sampling, it is possible to consider compressing the pixel data groups to reduce redundant data in the data packets obtained by directly assembling the pixel data groups, thereby improving data transmission efficiency.

[0029] However, as can be seen from the above description, for multiple pixel blocks corresponding to a pixel data group, generally when the pixel block is in the first graphic area (i.e., the edge empty area) or the second graphic area (i.e., the clear area), the pixel blocks corresponding to the pixel data group have the characteristic of consistent or partially consistent pixel height. It is advisable to compress the pixel data of such pixel blocks to reduce redundant data transmission. However, when the pixel block is in the third graphic area (i.e., the edge non-empty area), in order to avoid image distortion, the pixel data of the pixel block is usually not compressed.

[0030] That is, when most of the pixel blocks corresponding to a pixel data group are located in the third graphics region, for example, in a high-resolution, high-frame-rate system, directly compressing the pixel data group usually does not reduce the amount of data transmitted corresponding to the pixel data group, nor does it reduce the number of transmissions. At the same time, since compression processing also requires a certain processing time, in this case, not only does compression processing not provide any compression benefits, but it may also increase power consumption and transmission latency, reducing data transmission efficiency.

[0031] In view of this, embodiments of this disclosure provide a pixel processing method, including: acquiring pixel data groups corresponding to multiple pixel blocks and region information of each pixel block, wherein the region information is used to represent the type of graphic region in which the pixel block is located, and the pixel consistency of pixel blocks in different types of graphic regions is different; determining the predicted number of compressed transmissions corresponding to the pixel data group based on the region information of each pixel block, wherein the predicted number of compressed transmissions represents the number of transmissions corresponding to the compressed data of the pixel data group transmitted based on a burst transmission protocol; and determining a compression processing strategy for the pixel data group based on the predicted number of compressed transmissions, wherein the compression processing strategy indicates whether to compress the pixel data group.

[0032] In other words, to improve the transmission efficiency of pixel data groups, this embodiment does not directly compress the pixel data groups. Instead, it determines the predicted number of compression transmissions required to transmit the compressed data corresponding to the pixel data group using the burst transmission protocol based on the region information of the pixel block. The benefit of compression processing is evaluated by using the predicted number of compression transmissions, thereby determining the corresponding compression processing strategy. This can improve the flexibility of pixel processing, that is, it can flexibly determine whether to compress the pixel data group, avoiding the problem of increased transmission latency caused by ineffective compression processing. At the same time, compressing the pixel data group when it is determined that there is a benefit to compression processing based on the predicted number of compression transmissions can reduce redundant data transmission and improve data transmission efficiency.

[0033] The pixel processing method according to embodiments of this disclosure can be applied to a graphics processing device. For example, the pixel processing method can be executed by a terminal device, a server, or other processing device. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, camera, etc. In some possible implementations, the pixel processing method can be implemented by a processor calling computer-readable program instructions stored in memory.

[0034] Figure 1 A flowchart illustrating a pixel processing method provided in an embodiment of this disclosure. (Refer to...) Figure 1 The method may include the following steps S11-S13.

[0035] Step S11: Obtain pixel data groups corresponding to multiple pixel blocks and region information of each pixel block.

[0036] Among them, the region information is used to indicate the type of graphic region in which the pixel block is located. The degree of pixel consistency of pixel blocks in different types of graphic regions is different.

[0037] In this embodiment of the disclosure, a pixel block may correspond to a preset number of sampling points, which is determined according to the MSAA parameters used by the graphics processor in the graphics processing device applying the method. Each pixel block corresponds to one pixel data point, and the pixel data may include sampled values ​​from multiple sampling points within the pixel block. These sampled values ​​may be color values ​​at those sampling points, such as RGB or YUV values.

[0038] This pixel data group consists of pixel data from multiple pixel blocks, for example, it can be in the form of [pixel data 1, pixel data 2, ...]. A pixel data group can be 2kbits, or it can be set as needed; the sample value of one sampling point in one pixel block can be 8 bits, or it can be set as needed. It is understandable that the size of a pixel data group varies depending on the number of sampling points in the pixel block, and the number of pixel blocks corresponding to a pixel data group also varies.

[0039] The region information of the pixel block can be obtained by the image sampling module during the image sampling process.

[0040] As described above, in the embodiments of this disclosure, the graphic region where the pixel block is located may include a first graphic region, a second graphic region, and a third graphic region.

[0041] As can be seen from the above description, in the first graphic area, i.e. the empty edge area, the pixel data in the same pixel block is usually consistent, but the pixel data of different pixel blocks in this area may be inconsistent; in the second graphic area, i.e. the clear area, the pixel data of multiple pixel blocks often show a high degree of consistency; while in the third graphic area, i.e. the non-empty edge area, the sampled values ​​of different sampling points in the same pixel block are usually different, that is, the pixel data of the same pixel block shows a high degree of inconsistency.

[0042] Step S12: Determine the number of predicted compression transmissions corresponding to the pixel data group based on the region information of each pixel block.

[0043] Here, the predicted number of compressed transmissions (burst_count) represents the predicted number of transmissions corresponding to the compressed data of the pixel data group transmitted based on the burst transmission protocol. That is, after compressing the pixel data group to obtain its compressed data and then assembling the compressed data into packets, the predicted number of transmissions required to transmit the data packet based on the burst transmission protocol.

[0044] Specifically, in this embodiment of the present disclosure, based on the region information of each pixel block, the number of pixel blocks in different graphic regions in the pixel data group can be counted, and the effective data volume of the pixel blocks in the graphic region after compression processing can be determined based on the pixel consistency degree of the pixel blocks in different graphic regions. Then, the corresponding predicted compression transmission number can be determined based on the effective data volume.

[0045] For example, if most of the pixel blocks in a pixel data group belong to the clear region or the empty edge region, it means that the effective data volume in the pixel data group is small. Compressing the pixel data group can significantly reduce the amount of data transmitted, thereby significantly reducing the number of data transmissions and improving transmission efficiency. If most of the pixel blocks in a pixel data group belong to the non-empty edge region, it means that the effective data volume in the pixel data group is large, the compressible space is small, the reduction in data volume after compression is not obvious, and it usually cannot effectively reduce the number of data transmissions.

[0046] Step S13: Determine the compression processing strategy for pixel data groups based on the predicted number of compression transmissions.

[0047] The compression policy (compress_enable) indicates whether to compress the pixel data group. For example, the value of the compression policy can be set to "1" to indicate that the pixel data group is compressed, and set to "0" to indicate that the pixel data group is not compressed.

[0048] It is understood that, in some embodiments, after determining the compression processing strategy for the pixel data group, the method may further include: determining the data packet corresponding to the pixel data group based on the compression processing strategy.

[0049] That is, after determining the compression processing strategy, it is possible to determine whether to compress the pixel data group based on the compression processing strategy, so as to determine the data packet corresponding to the pixel data group. After determining the data packet, the data packet can also be transmitted to the downstream module based on the burst transmission protocol.

[0050] As can be seen, based on the method provided in this disclosure, the predicted number of compression transmissions required to transmit the compressed data corresponding to the pixel data group based on the region information of the pixel block is determined. The benefit of compression processing is evaluated by the predicted number of compression transmissions, thereby determining the corresponding compression processing strategy. This can improve the flexibility of pixel processing, that is, it can flexibly determine whether to compress the pixel data group, avoiding the problem of increased transmission delay caused by invalid compression processing. At the same time, if the benefit of compression processing is determined based on the predicted number of compression transmissions, the pixel data group can be compressed, which can reduce redundant data transmission and improve data transmission efficiency.

[0051] In some embodiments, the region information includes a first region identifier and a second region identifier, wherein the first region identifier indicates that the pixel block is located in a first graphic region, and the second region identifier indicates that the pixel block is located in a second graphic region.

[0052] For details regarding the first graphic area (i.e., the edge empty area) and the second graphic area (i.e., the clear empty area), please refer to the relevant explanations above; they will not be repeated here.

[0053] The first area identifier can be represented by, for example, "00", and the second area identifier can be represented by, for example, "01". Of course, this is only for illustrative purposes, and the values ​​of the first and second area identifiers can be set as needed.

[0054] Please refer to Figure 2 This is a flowchart for determining the predicted number of compressed transmissions provided in an embodiment of this disclosure. For example... Figure 2 As shown, in this embodiment, the step S12, which involves determining the number of predicted compressed transmissions corresponding to a pixel data group based on the region information of each pixel block, may include the following steps S21-S23.

[0055] Step S21: Generate the edge mask and clear mask corresponding to the pixel data group based on the region information of each pixel block.

[0056] Among them, the edge mask (edge_mask) represents the position and number of pixel blocks in the pixel data group whose corresponding region information is the first region identifier.

[0057] Each bit of the edge mask can correspond to a pixel block in the pixel data group. If a bit is 1, it means that the pixel block corresponding to that bit is in the first graphic area; if it is 0, it means that the pixel block is not in the first graphic area.

[0058] The clear_mask indicates the position and number of pixel blocks in the pixel data group whose corresponding region information is identified by the second region.

[0059] Each bit of the clear mask corresponds to a pixel block in the pixel data group. If a bit is 1, it means that the pixel block corresponding to that bit is in the second graphic area, that is, in the clear area; if it is 0, it means that the pixel block is not in the clear area.

[0060] That is, based on the edge mask and / or the clearing mask, the number and position of pixel blocks in the corresponding graphic area in the pixel data group can be indicated respectively. After the pixel data of the pixel blocks in different graphic areas is compressed to obtain their compressed data, and a data packet is generated and sent based on the compressed data, the downstream module can perform parsing and restoration processing on the compressed data in the sent data packet based on the edge mask and / or the clearing mask to recover the pixel data group.

[0061] Step S22: Determine the data size of the first data packet generated after compressing the pixel data group based on the edge mask and / or clear mask.

[0062] In this embodiment of the disclosure, after obtaining the edge mask and clear mask corresponding to the pixel data group based on step S22, the data volume of the first data packet generated by compressing the pixel data group can be determined based on the edge mask and / or clear mask.

[0063] Specifically, in this embodiment of the disclosure, the compression processing of the pixel data group may include: obtaining the compressed data corresponding to the pixel data group based on the edge mask and / or the clear mask.

[0064] That is, after obtaining the edge mask and clear mask corresponding to the pixel data group based on the above step S21, the pixel data group can be differentially compressed according to the different pixel consistency levels of different graphic region types, thereby obtaining the compressed data corresponding to the pixel data group. For example, since the pixel data of the pixel blocks in the clear region exhibits high consistency, a unified pixel value, such as the target pixel value clear_value, can be used to represent the unified value of these pixel blocks, without needing to encapsulate the pixel data of each pixel block into a data packet for transmission. As another example, since the sampled values ​​of multiple sampling points of the same pixel block in the first graphic region, i.e., the edge empty region, exhibit high consistency, for each pixel block in this region, only the sampled value of one sampling point can be taken and encapsulated into a data packet for transmission, thereby achieving the compression processing of the pixel data group. When a pixel block is located in the third graphics region, i.e., the edge non-empty region, the color changes drastically in this region. Therefore, the sampling values ​​of multiple sampling points in the same pixel block are not consistent. It is necessary to retain the pixel data of the pixel block in the pixel data group, that is, not to compress the pixel data of the pixel block, so as to ensure that the downstream module can accurately restore the pixel data of the pixel block during parsing and avoid image edge distortion caused by excessive compression.

[0065] That is, in some embodiments, the region information may include a target pixel value, i.e., clear_value, which can be a uniform value of pixel blocks in the second graphics region in the pixel data group sampled by the upstream module (also known as the front-end module). Obtaining compressed data corresponding to the pixel data group based on the edge mask and / or clear mask may include: determining the first position information of the pixel blocks in the second graphics region in the pixel data group based on the clear mask; and determining the compressed data by removing pixel data of the pixel blocks in the second graphics region from the pixel data group based on the first position information and setting the target pixel value in the data header of the data packet.

[0066] That is, when a pixel block is located within the second graphic region, the pixel data of all pixel blocks within that region exhibits high consistency, eliminating the need to retain the original pixel data of each pixel block. Therefore, for a pixel block whose region information is the second region identifier, the first position information of the pixel block located within the second graphic region represented by the second region identifier in the pixel data group can be determined based on the clear mask obtained above, i.e., clear_mask. Then, the pixel data of the pixel block at the first position information can be directly removed from the pixel data group. Simultaneously, to ensure that the downstream module can accurately parse and restore the pixel data of the pixel block located within the second graphic region, while removing the pixel data of each pixel block within the second graphic region from the pixel data group to achieve the effect of data compression and removal of redundant data in the pixel data group, the target pixel value can also be set in the data header to determine the compressed data corresponding to the pixel data group. Correspondingly, the downstream module can identify the position of the pixel block within the second graphic region based on the clear mask and restore the pixel data of that pixel block at the corresponding position in the compressed data based on the target pixel value.

[0067] In some embodiments, when the method is applied to a graphics processor of a graphics processing device, the pixel data of each pixel block in the pixel data group includes sampled values ​​of a preset number of sampling points, the preset number being determined based on the multisampling anti-aliasing parameters used by the graphics processor.

[0068] Regarding the multisampling anti-aliasing parameter, i.e., the MSAA parameter, please refer to the relevant explanations above, and it will not be repeated here. Depending on the MSAA parameter, the preset number can be any one of 1, 2, 4 or 8.

[0069] In this embodiment, obtaining compressed data corresponding to a pixel data group based on an edge mask and / or a clear mask may include: determining second position information of a pixel block in the first graphic region within the pixel data group based on the edge mask; and determining compressed data by retaining the sampled value of any sampling point in the pixel data of the pixel block in the first graphic region within the pixel data group and removing the sampled values ​​of other sampling points based on the second position information.

[0070] Specifically, the second position information of the pixel block in the first graphic region in the pixel data group can be determined according to the edge mask. Since the sampled values ​​of multiple sampling points in the pixel block in the first graphic region are highly consistent, the second position information can be used to retain only the sampled value of any sampling point in the pixel data of the pixel block of this type in the pixel data group, such as retaining the first sampling point, i.e., the sampled value of sample0, and removing the sampled values ​​of other sampling points of the pixel block of this type, so as to achieve the compression processing of the pixel data group and achieve the effect of removing redundant data.

[0071] In some embodiments, the region information may further include a third region identifier, which indicates that the pixel block is located in a third graphic region. In this embodiment, obtaining the compressed data corresponding to the pixel data group based on the edge mask and / or clear mask in step S22 may include: determining the third position information of the pixel data of the pixel block in the pixel data group located in the third graphic region based on the edge mask and clear mask; and determining the compressed data by retaining the pixel data of the pixel block in the pixel data group located in the third graphic region based on the third position information.

[0072] The third area identifier can be represented by, for example, "10", or it can be set as needed; no special restrictions are made here.

[0073] Specifically, when a pixel block is located in the third graphic region, i.e., the edge non-empty region, the color changes drastically in this region. Therefore, the sampling values ​​of multiple sampling points in the same pixel block are not consistent. It is necessary to retain the pixel data of the pixel block in the pixel data group, that is, not to compress the pixel data of the pixel block, so as to ensure that the downstream module can accurately restore the pixel data of the pixel block during parsing and avoid image edge distortion caused by excessive compression.

[0074] After determining the compressed data corresponding to the pixel data group, a first data packet corresponding to the pixel data group can be generated based on the edge mask, the clear mask, and the compressed data. Specifically, this can include: determining the data header of the first data packet based on the edge mask and / or the clear mask, and determining the data portion of the first data packet based on the compressed data.

[0075] That is, when pixel data groups are compressed simultaneously based on edge masks and clear masks, the header of the first data packet is determined based on the edge mask, clear mask, and target pixel group. Simultaneously, the data portion of the first data packet is determined based on the compressed data. Then, by concatenating the header and data portion, the first data packet corresponding to the pixel data group is obtained. It is understood that if there are no pixel blocks in the first graphic region within the pixel data group, the header may not encapsulate the edge mask; and / or, if there are no pixel blocks in the second graphic region within the pixel data group, the header may not encapsulate the target pixel value. This allows for a variable-length header design, avoiding the transmission of redundant data.

[0076] It should be noted that, in the embodiments of this disclosure, during the process of obtaining the first data packet corresponding to the pixel data group based on the region information, the region information includes types such as the first graphic region, the second graphic region, and the third graphic region, and the pixel data group is compressed according to the pixel consistency characteristics of different graphic regions to reduce redundant data and improve data transmission speed.

[0077] It is understood that, in some embodiments, without violating the principles and logic of this disclosure, multi-level consistency level identifiers can be set based on the consistency characteristics of pixel data in different regions, and pixel data groups can be compressed to obtain the first data packet by having different consistency levels correspond to different graphic regions. For example, a first preset level, a second preset level, and a third preset level can be set, wherein the first preset level corresponds to the third graphic region and can be used to represent pixels with inconsistent heights in the pixel data group; the second preset level corresponds to the first graphic region and can be used to represent pixels with partially consistent pixel data in the pixel data group, that is, pixel blocks containing multiple sampling points with consistent heights but inconsistent pixel data between pixel blocks; the third preset level corresponds to the second graphic region and can be used to represent pixel blocks with consistent pixel heights in the pixel data group, that is, pixel blocks whose pixel data satisfy preset similarity conditions.

[0078] As explained above, in this embodiment of the disclosure, if the pixel data group is compressed, then when the pixel block is located in the second graphic area, i.e., the clear area, the pixel data of that type of pixel block in the pixel data group can be removed, and a uniform target pixel value can be set for that type of pixel block in the header of the first data packet. That is, all the pixel data of that type of pixel block can be discarded from the pixel data group, and only a uniform target pixel value needs to be set for that type of pixel block in the header. This target value can typically be an 8-bit value.

[0079] When a pixel block is located within the first graphic region, only one sampling point can be retained in the pixel data group, such as the sample value of sample0. In this case, the amount of data compression for this type of pixel block can be determined based on the MSAA parameter. For example, if the MSAA parameter is 4x, the original pixel data of a pixel block includes the sample values ​​of 4 sampling points, and after compression, the corresponding data volume can be reduced by 75%.

[0080] With a pixel data group size of 2kbits, let R_clear represent the pixel block in the second graphics region, R_edge0 represent the pixel block in the first graphics region, and R_raw represent the pixel block in the third graphics region. Assume that R_clear accounts for 50%, R_edge0 accounts for 25%, and R_raw accounts for 25%.

[0081] For R_clear, after compressing the pixel data of this type of pixel block, it is only necessary to transmit its corresponding clear mask and target pixel value in the corresponding data packet. The target pixel value is generally 8 bits (i.e. 1 byte). Therefore, after compressing the pixel data of R_clear, its corresponding effective data volume is 1 byte.

[0082] For R_edge0, taking MSAA parameter=4 as an example, after compressing the pixel data of this type of pixel block, since only the sample value of one sampling point in each pixel block needs to be retained, the compressed data is: 2kb×25%×1 / 4=128bits, and the effective data size is 16 bytes. At the same time, its corresponding edge mask can be represented by 2 bytes.

[0083] For R_raw, there is no need to compress the pixel data of this type of pixel block, so its effective data size is: 2kb×25%=512bits, which is approximately 64 bytes after conversion.

[0084] Therefore, after the above compression process, the effective data volume of the data part in the first data packet of the pixel data group is: 1 byte + 16 bytes + 64 bytes = 81 bytes.

[0085] The header of the first data packet can generally be generated based on the target pixel value, edge mask and clear mask mentioned above. The target pixel value can be 1 byte, the clear mask can be 8 bytes, and the edge mask can be 2 bytes. Therefore, the data size of the header in the first data packet can be: 1 byte + 8 bytes + 2 bytes = 11 bytes.

[0086] Therefore, after performing the above compression process on the pixel data group, the effective data size of the first data packet is: 81 bytes + 11 bytes = 92 bytes.

[0087] Step S23: Determine the predicted number of compressed transmissions based on the data volume.

[0088] After determining the data volume of the first data packet generated after compressing the pixel data group based on step S22 above, the predicted number of compressed transmissions can be determined based on a burst transmission, i.e., the amount of data that can be transmitted in one burst.

[0089] For example, if the first data packet is 92 bytes, since a burst is usually transmitted in 256 bits, or 32 bytes, the predicted number of compressed transmissions for transmitting the first data packet is: 92 / 32 = 2 bursts + 28 bytes, which means 3 bursts are required.

[0090] In some embodiments, determining the compression processing strategy for the pixel data group based on the predicted number of compression transmissions may include: determining a first preset strategy as the compression processing strategy when the predicted number of compression transmissions is less than or equal to a target transmission number threshold; the first preset strategy indicates that the pixel data group is compressed; and determining a second preset strategy as the compression processing strategy when the predicted number of compression transmissions is greater than the target transmission number threshold; the second preset strategy indicates that the pixel data group is not compressed.

[0091] Taking a target transmission number threshold of 4 as an example, if the predicted compressed transmission number corresponding to the first data packet is 3, it can be determined that there is a compression benefit in compressing the pixel data group, and the compression processing strategy can be configured as the first preset strategy, for example, configured as "1"; otherwise, it means that there is no compression benefit in compressing the pixel data group, and it may increase power consumption and transmission delay. Therefore, the compression processing strategy can be configured as the second preset strategy, for example, configured as "0".

[0092] It is understood that, in this embodiment, determining the data packet corresponding to the pixel data group based on the compression processing strategy may include: when the compression processing strategy is a first preset strategy, compressing the pixel data group according to the region information of each pixel block in the pixel data group to obtain the corresponding first data packet.

[0093] In addition, determining the data packet corresponding to the pixel data group based on the compression processing strategy may include: generating a second data packet corresponding to the pixel data group when the compression processing strategy is a second preset strategy.

[0094] That is, if the compression processing strategy indicates that the pixel data group is compressed, the pixel data group can be compressed according to the compression processing described above to obtain its corresponding first data packet, and the first data packet is sent down to reduce transmission redundant data and improve transmission efficiency; otherwise, ineffective compression can be avoided to prevent power consumption and transmission delay, and the compression processing can be skipped directly to assemble the original pixel data group into packets to obtain the corresponding second data packet and send down the second data packet.

[0095] As can be seen, in this embodiment of the disclosure, by comparing the predicted number of compressed transmissions with the target number of transmissions threshold to determine the compression processing strategy, it is possible to dynamically determine whether to compress pixel data groups, so as to avoid the problem that invalid compression will further increase transmission delay and reduce data transmission efficiency.

[0096] In some embodiments, the method may further include: obtaining configuration information and determining a target transmission count threshold based on the configuration information.

[0097] The configuration information is used to configure the target transmission number threshold. This configuration information can be configured by the user in the form of instructions. For example, the user can write the configuration information into the threshold register based on a preset threshold configuration instruction. During the pixel processing, the graphics processor can read the configuration information from the threshold register to determine the target transmission number threshold. Alternatively, the graphics processor can dynamically adjust it based on historical data of pixel processing. This disclosure does not impose any special limitations on this.

[0098] That is, in actual implementation, after obtaining the predicted number of compressed transmissions, the target number of transmissions threshold used to determine the above compression processing strategy can be obtained from the configuration information.

[0099] As can be seen from the above description, in some embodiments, obtaining configuration information may include: reading configuration information from a preset threshold register; or, obtaining the configuration information output by a threshold statistical model, wherein the threshold statistical model is used to determine the current transmission count threshold based on the actual transmission count of historical pixel data groups; the historical pixel data groups include pixel data groups within a preset time range preceding the pixel data groups.

[0100] That is, in this embodiment of the disclosure, the target transmission number threshold can be pre-configured in the threshold register; or, the threshold can be dynamically determined based on the actual transmission number of historical pixel data groups through a threshold statistical model, so as to further improve the flexibility of pixel processing.

[0101] In some embodiments, after determining the data packet corresponding to the pixel data group, the method may further include: transmitting the data packet based on a preset burst transmission protocol.

[0102] Burst transmission is a high-efficiency bus transmission protocol. Its core logic is: a single address transmission is accompanied by continuous data transmission. That is, the target address is sent only once at the beginning of the transmission, and there is no need to repeat the address transmission afterwards; only multiple data units need to be transmitted continuously. Compared with the traditional single-cycle transmission mode of "one address corresponds to one data", burst transmission can significantly reduce bus address transmission overhead and improve bus bandwidth utilization.

[0103] Specifically, after obtaining the data packet of the pixel data group, the data packet can be transmitted to the downstream module based on the burst transmission protocol to improve data transmission efficiency.

[0104] In some embodiments, the downstream module may include a receiving-side parsing unit and a storage unit; after the data packet is sent to the downstream module, the method may further include: parsing and restoring the data packet based on the receiving-side parsing unit to obtain a pixel data group; and storing the pixel data group in the storage unit.

[0105] The receiving-side parsing unit can be a functional unit in the downstream module used to parse and restore data packets.

[0106] After the pixel data group is parsed and restored by the receiving side parsing unit, the pixel data group can be cached in the storage unit.

[0107] It is understood that, in some embodiments, the downstream module may include a receiving-side parsing unit, a storage unit, and a frame compression processing unit; after the data packet is sent to the downstream module, the method may further include: parsing and restoring the data packet based on the receiving-side parsing unit to obtain a pixel data group; performing frame-level compression encoding processing on the pixel data group based on the frame compression processing unit to obtain frame-level compressed encoded data corresponding to the pixel data group; and storing the frame-level compressed encoded data in the storage unit.

[0108] Please refer to Figure 3 This is a schematic diagram illustrating the application of the pixel processing method provided in the embodiments of this disclosure. For ease of understanding, the following is combined with... Figure 3 The method provided in the embodiments of this disclosure will be illustrated, wherein, in Figure 3 In this context, the method is applied to a graphics processor, which may include, for example... Figure 3The aforementioned front-end module 31, compression module 32, and downstream module 33 include a consistency value extraction unit 320, a status judgment unit 321, a data caching unit 322, an effective data volume estimation unit 323, a threshold judgment unit 324, a data packet header generation unit 325, a data compression and encapsulation unit 326, a bypass unit 327, an output synthesis unit 328, and a transmission scheduling unit 329. The downstream module 33 includes a receiving-side parsing unit 331, a frame compression processing unit 332, and a storage unit 333.

[0109] Specifically, the front-end module 31 (also known as the upper-end module) can, for example, perform image sampling processing. After performing image sampling processing, it obtains pixel data groups (data) corresponding to multiple pixel blocks and region information of each pixel block in the pixel data group. This region information specifically indicates the type of image region in which each pixel block is located, namely, empty edge (first region identifier), non-empty edge (third region identifier), and clear information (second region identifier). Figure 3 As shown, the front-end module 31 sends the target pixel value clear_value of the pixel block whose region information is the second region identifier to the consistency value extraction unit 320, sends the region identifier of each pixel block to the status judgment unit 321, and sends the pixel data group to the data cache unit 322 for caching.

[0110] The consistency value extraction unit 320 can extract the uniform pixel value clear_value of the pixel block in the second graphic region in the pixel data group, and send the target pixel value to the data packet header generation unit 325.

[0111] The state determination unit 321 can generate a corresponding byte-granular edge mask (edge_mask) and a clear mask (clear_mask) based on the edge empty, edge not empty, and clear information corresponding to each pixel block. Then, the edge mask and the clear mask are sent to the effective data volume estimation unit 323 and the data packet header generation unit 325.

[0112] The effective data volume estimation unit 323 determines the data volume of the first data packet generated after compressing the pixel data group based on the received edge mask and / or clear mask. That is, it counts the amount of data to be transmitted within a burst to determine the predicted number of compressed transmissions (burst_count) and outputs the predicted number of compressed transmissions to the threshold judgment unit 324. The predicted number of compressed transmissions can be any value such as 1, 3, or 8.

[0113] The threshold judgment unit 324 can compare the predicted number of compressed transmissions with the target number of transmissions threshold (threshold, which defaults to 4 and its value can be determined according to the configuration information) and output the compression processing strategy (compress_enable) signal to the data packet header generation unit 325, the data compression and encapsulation unit 326 and the bypass unit 327. When compress_enable is "1", it means that the pixel data group needs to be compressed to obtain the first compressed data packet. Otherwise, it can be left uncompressed.

[0114] When the received `compress_enable` is "1", the data packet header generation unit 325 encapsulates the target pixel value `clear_value`, the edge mask `edge_mask`, and the clear mask `clear_mask` to generate the data packet header. It should be noted that in actual implementation, if the pixel block in the second graphics area is zero, the data packet header generation unit 325 may omit the target pixel value and the clear mask `clear_mask` from the generated header to avoid transmitting redundant data. Similarly, if the pixel block in the first graphics area is zero, the edge mask `edge_mask` may also be omitted from the data header to avoid transmitting redundant data.

[0115] The data packet header generation unit 325 can transmit the generated data header to the data compression and encapsulation unit 326. When the received compress_enable is "1", the data compression and encapsulation unit 326 can selectively extract pixel data groups from the data buffer unit 322 based on the edge mask and / or clear mask and target pixel value in the data header to obtain compressed data of the pixel data group. The compressed data is then concatenated with the data header as the data part to generate the first data packet corresponding to the pixel data group, and the first data packet is sent to the output synthesis unit 328.

[0116] It should be noted that when the data compression and encapsulation unit 326 compresses the pixel data group, it can determine the position of the pixel data of the pixel block in the second graphic region of the pixel data group according to the clearing mask, and remove its pixel data to determine that the pixel value of this type of pixel block is the target pixel value in the data header; at the same time, it can determine the position of the pixel data of the pixel block in the first graphic region of the pixel data group according to the edge mask, and retain the data of the first sampling point in the pixel data group of this type of pixel block, and remove the data of other sampling points; and it can also determine the position of the pixel data of the pixel block in the third image region of the pixel data group according to the edge mask and the clearing mask, and does not process the pixel data of this type of pixel block, that is, maintains the original data structure, thereby obtaining the compressed data of the pixel data group.

[0117] The bypass unit 327 can obtain pixel data groups from the data buffer unit 322 and directly transmit them to the output synthesis unit 328 when the received compress_enable is "0", without triggering compression processing for the pixel data groups at all.

[0118] The output synthesis unit 328 can transmit the received first data packet to the receiving-side parsing unit 331 of the downstream module 33, or directly assemble the received original pixel data group into a packet and transmit the resulting second data packet to the receiving-side parsing unit 331.

[0119] The receiving side parsing unit 331 can decode and restore the data packet, and send the restored pixel data group to the frame-level compression processing unit 332. After the frame-level compression processing unit 332 performs frame-level compression encoding processing on the pixel data group, the obtained frame-level compressed encoded data is written into the storage unit 333 for storage.

[0120] As can be seen, based on the method provided in this disclosure, compression processing for pixel data groups can be initiated only when the predicted number of compression transmissions is less than or equal to the target number of transmissions threshold. Otherwise, the compression module can be bypassed, and compression processing is not required at all. Compression processing will not be triggered in most cases where there is no benefit, thereby reducing hardware area and improving data transmission efficiency. In addition, by setting a bypass unit to directly transmit the original pixel data group according to the received compression processing strategy, the data processing pipeline can be simplified, power and latency can be reduced, and it can also perfectly adapt to the decompression processing of downstream modules without requiring additional adaptation processing from downstream modules.

[0121] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0122] In addition, this disclosure also provides a pixel processing apparatus, an electronic device, and a computer-readable storage medium, all of which can be used to implement any pixel processing method provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method and will not be repeated here.

[0123] Figure 4 This is a block diagram of a pixel processing apparatus provided in an embodiment of the present disclosure.

[0124] Reference Figure 4 This disclosure provides a pixel processing device, which may include: an acquisition module 101, a number of times determination module 102, and a strategy determination module 103.

[0125] The acquisition module 101 is used to acquire pixel data groups corresponding to multiple pixel blocks and region information of each pixel block, wherein the region information is used to indicate the type of graphic region in which the pixel block is located, and the degree of pixel consistency of pixel blocks in different types of graphic regions is different.

[0126] The number of transmissions determination module 102 is used to determine the predicted number of compressed transmissions corresponding to the pixel data group based on the region information of each pixel block, wherein the predicted number of compressed transmissions represents the number of transmissions corresponding to the compressed data of the pixel data group transmitted based on the burst transmission protocol.

[0127] The strategy determination module 103 is used to determine a compression processing strategy for the pixel data group based on the predicted number of compression transmissions, wherein the compression processing strategy indicates whether to compress the pixel data group.

[0128] In some embodiments, the region information includes a first region identifier and a second region identifier, wherein the first region identifier indicates that the pixel block is located in a first graphic region, and the second region identifier indicates that the pixel block is located in a second graphic region; when determining the predicted compression transmission count corresponding to the pixel data group based on the region information of each pixel block, the count determination module 102 may be used to: generate an edge mask and a clearing mask corresponding to the pixel data group based on the region information of each pixel block; wherein the edge mask indicates the position and number of pixel blocks in the pixel data group whose corresponding region information is the first region identifier; the clearing mask indicates the position and number of pixel blocks in the pixel data group whose corresponding region information is the second region identifier; determine the data volume of the first data packet generated after compressing the pixel data group based on the edge mask and / or the clearing mask; and determine the predicted compression transmission count based on the data volume.

[0129] In some embodiments, when the strategy determination module 103 determines a compression processing strategy for the pixel data group based on the predicted number of compression transmissions, it may be configured to: determine the compression processing strategy as a first preset strategy when the predicted number of compression transmissions is less than or equal to a target transmission number threshold; the first preset strategy indicates that the pixel data group is compressed; and determine the compression processing strategy as a second preset strategy when the predicted number of compression transmissions is greater than the target transmission number threshold; the second preset strategy indicates that the pixel data group is not compressed.

[0130] In some embodiments, the apparatus further includes a generation module, which can be used to: determine the data packet corresponding to the pixel data group based on the compression processing strategy.

[0131] In some embodiments, when the generation module determines the data packet corresponding to the pixel data group based on the compression processing strategy, it can be used to: compress the pixel data group according to the region information of each pixel block in the pixel data group to obtain the corresponding first data packet when the compression processing strategy is the first preset strategy.

[0132] In some embodiments, when the generation module determines the data packet corresponding to the pixel data group based on the compression processing strategy, it can be used to: generate a second data packet corresponding to the pixel data group when the compression processing strategy is the second preset strategy.

[0133] In some embodiments, the apparatus further includes a threshold determination module, which can be used to: obtain configuration information and determine the target transmission count threshold based on the configuration information.

[0134] In some embodiments, when obtaining configuration information, the threshold determination module may be used to: read the configuration information from a preset threshold register; or, obtain the configuration information output by a threshold statistical model, wherein the threshold statistical model is used to determine the current transmission count threshold based on the actual transmission count of historical pixel data groups; the historical pixel data groups include pixel data groups within a preset time range preceding the pixel data groups.

[0135] In some embodiments, the apparatus further includes a transmission module, which can be used to transmit the data packets based on the burst transmission protocol.

[0136] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0137] Reference Figure 5 This disclosure provides an electronic device, which includes: at least one processor 701; at least one memory 702; and one or more I / O interfaces 703 connected between the processor 701 and the memory 702; wherein the memory 702 stores one or more computer programs that can be executed by the at least one processor 701, and the one or more computer programs are executed by the at least one processor 701 to enable the at least one processor 701 to perform the pixel processing method described above.

[0138] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the pixel processing method described above. The computer-readable storage medium may be volatile or non-volatile.

[0139] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the pixel processing method described above.

[0140] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0141] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0142] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0143] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0144] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0145] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0146] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0147] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0149] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A pixel processing method, characterized in that, The method includes: Obtain pixel data groups corresponding to multiple pixel blocks and region information of each pixel block, wherein the region information is used to indicate the type of graphic region in which the pixel block is located, and the degree of pixel consistency of pixel blocks in different types of graphic regions is different; Based on the region information of each pixel block, the predicted number of compressed transmissions corresponding to the pixel data group is determined, wherein the predicted number of compressed transmissions represents the number of transmissions corresponding to the compressed data of the pixel data group transmitted based on the burst transmission protocol; Based on the predicted number of compressed transmissions, a compression processing strategy is determined for the pixel data group, wherein the compression processing strategy indicates whether to compress the pixel data group.

2. The method according to claim 1, characterized in that, The region information includes a first region identifier and a second region identifier, wherein the first region identifier indicates that the pixel block is located in a first graphic region, and the second region identifier indicates that the pixel block is located in a second graphic region; The step of determining the predicted compression transmission count corresponding to the pixel data group based on the region information of each pixel block includes: Based on the region information of each pixel block, an edge mask and a clearing mask are generated corresponding to the pixel data group; wherein, the edge mask represents the position and number of pixel blocks in the pixel data group whose corresponding region information is identified by the first region; the clearing mask represents the position and number of pixel blocks in the pixel data group whose corresponding region information is identified by the second region; The amount of data in the first data packet generated after compressing the pixel data group is determined based on the edge mask and / or the clear mask. The predicted number of compressed transmissions is determined based on the amount of data.

3. The method according to claim 1, characterized in that, The step of determining the compression processing strategy for the pixel data group based on the predicted number of compression transmissions includes: If the predicted number of compressed transmissions is less than or equal to the target number of transmissions threshold, the compression processing strategy is determined to be a first preset strategy; the first preset strategy indicates that the pixel data group is compressed. If the predicted number of compressed transmissions is greater than the target number of transmissions threshold, the compression processing strategy is determined to be a second preset strategy; the second preset strategy means that the pixel data group is not compressed.

4. The method according to claim 3, characterized in that, The method further includes: Based on the compression processing strategy, the data packet corresponding to the pixel data group is determined.

5. The method according to claim 4, characterized in that, The step of determining the data packet corresponding to the pixel data group based on the compression processing strategy includes: When the compression processing strategy is the first preset strategy, the pixel data group is compressed according to the region information of each pixel block in the pixel data group to obtain the corresponding first data packet.

6. The method according to claim 4, characterized in that, The step of determining the data packet corresponding to the pixel data group based on the compression processing strategy includes: When the compression processing strategy is the second preset strategy, a second data packet corresponding to the pixel data group is generated.

7. The method according to claim 6, characterized in that, The method further includes: Obtain configuration information and determine the target transmission count threshold based on the configuration information.

8. The method according to claim 7, characterized in that, The acquisition of configuration information includes: Read the configuration information from the preset threshold register; Alternatively, the configuration information output by the threshold statistical model can be obtained, wherein the threshold statistical model is used to determine the current transmission count threshold based on the actual transmission count of historical pixel data groups; the historical pixel data groups include pixel data groups within a preset time range preceding the pixel data groups.

9. The method according to claim 4, characterized in that, The method further includes: The data packets are transmitted based on the burst transmission protocol.

10. A pixel processing apparatus, characterized in that, include: The acquisition module is used to acquire pixel data groups corresponding to multiple pixel blocks and region information of each pixel block, wherein the region information is used to indicate the type of graphic region in which the pixel block is located, and the degree of pixel consistency of pixel blocks in different types of graphic regions is different; The number of transmissions determination module is used to determine the predicted number of compressed transmissions corresponding to the pixel data group based on the region information of each pixel block, wherein the predicted number of compressed transmissions represents the number of transmissions corresponding to the compressed data of the pixel data group transmitted based on the burst transmission protocol; The strategy determination module is used to determine a compression processing strategy for the pixel data group based on the predicted number of compression transmissions, wherein the compression processing strategy indicates whether to compress the pixel data group.

11. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the pixel processing method as described in any one of claims 1-9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the pixel processing method as described in any one of claims 1-9.

13. A computer program product, characterized in that, Includes computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the pixel processing method as described in any one of claims 1-9.