Search

US-12621465-B2 - Methods for lossless ARGB (alpha, red, green, blue) compression based on intra-block predictions

US12621465B2US 12621465 B2US12621465 B2US 12621465B2US-12621465-B2

Abstract

A method for lossless ARGB (Alpha, Red, Green, Blue) compression based on an intra-block prediction is provided. The method is executed by a processor, and the method comprises for an input image block under a processing channel, executing the following operations until all input image blocks are encoded: obtaining a predicted value of the input image block under a current processing channel based on the input image block under the current processing channel by the intra-block prediction; determining predicted residuals of the input image block under the current processing channel based on the predicted value and an original pixel value; inputting the predicted residuals into a residual encoder for encoding to obtain a residual stream of the input image block under the current processing channel; and storing residual streams of all input image blocks of all processing channels as a compressed file in a storage file.

Inventors

  • Kai Xu
  • Bo Wu
  • Chenggang Xu
  • Yanning CHEN
  • Fang Liu
  • Dawei Gao
  • Yongyu Wu

Assignees

  • ZHEJIANG UNIVERSITY
  • Beijing Smartchip Microelectronics Technology Co., Ltd.

Dates

Publication Date
20260505
Application Date
20241025
Priority Date
20231130

Claims (11)

  1. 1 . A method for lossless ARGB (Alpha, Red, Green, Blue) compression based on an intra-block prediction, wherein the method is executed by a processor, and the method comprises: for an input image block under a processing channel, executing the following operations until all input image blocks are encoded: obtaining a predicted value of the input image block under a current processing channel based on the input image block under the current processing channel by the intra-block prediction, wherein the intra-block prediction includes a prediction by dividing the input image block into three parts, and the prediction by dividing the input image block into the three parts includes: determining a similarity set, wherein the similarity set includes similarities of at least one row pixel group and at least one column pixel group of the input image block, and labels corresponding to the similarities; and dividing the input image block into the three parts based on the similarity set, including: selecting a row and column of the input image block that have the highest similarity in the similarity set, taking intersection pixels as a first part, taking the remaining pixels in the same row and column as a second part, and taking pixels in the input image block excluding the first part and the second part as a third part; determining predicted residuals of the input image block under the current processing channel based on the predicted value and an original pixel value; inputting the predicted residuals into a residual encoder for encoding to obtain a residual stream of the input image block under the current processing channel, wherein the residual encoder is a processor including a predetermined encoding program; and storing residual streams of all input image blocks of all processing channels as a compressed file in a storage file.
  2. 2 . The method of claim 1 , wherein the input image block is determined based on an input image, the input image is an ARGB image, and the input image block is obtained by dividing the ARGB image into 8*8 sized image blocks.
  3. 3 . The method of claim 1 , comprising: performing a differential pulse code modulation (DPCM) prediction on a first row and a first column of the input image block; and performing a median edge detector (MED) prediction on a region of the input image block after removing the first row and the first column.
  4. 4 . The method of claim 1 , comprising: obtaining at least one residual group by grouping the predicted residuals based on a predetermined condition.
  5. 5 . The method of claim 4 , wherein, for the same residual group, a header of the residual group is determined based on a maximum absolute value of the at least one residual group.
  6. 6 . The method of claim 5 , comprising: in response to determining that the predicted residuals of the at least one residual group are all first predetermined values, encoding the header; or in response to determining that a maximum value of the predicted residuals of the at least one residual group is greater than a second predetermined value, directly outputting an original pixel value corresponding to the encoding unit.
  7. 7 . The method of claim 1 , wherein determining at least one input image block based on the input image includes: determining, based on the input image, whether a first edge feature exists; in response to existence of the first edge feature, determining the at least one input image block based on the first edge feature; and in response to an absence of the first edge feature, determining a first image feature based on the input image, and determining the at least one input image block based on the first image feature.
  8. 8 . The method of claim 1 , wherein determining at least one input image block based on the input image includes: determining, for each processing channel, based on the input image and the processing channel, whether a second edge feature exists; in response to existence of the second edge feature, determining, based on the second edge feature, the at least one input image block; in response to an absence of the second edge feature, determining, based on the input image and the processing channel, a second image feature of the processing channel; and determining the at least one input image block based on second image features of all processing channels.
  9. 9 . The method of claim 1 , wherein obtaining the predicted value of the input image block under the current processing channel based on the input image block under the current processing channel by the intra-block prediction further includes: determining a second pixel value of the input image block based on a first pixel value sequence of the input image block, wherein the first pixel value sequence refers to a sequence consisting of actual pixel values that lie within a predetermined range of the second pixel value, the second pixel value refers to a predicted value of a pixel of the input image block currently predicted.
  10. 10 . The method of claim 9 , wherein the determining the second pixel value of the input image block based on the first pixel value sequence of the input image block includes: determining, based on a similarity between a row pixel group and a column pixel group in which the second pixel value is located and the first pixel value sequence, each second pixel value of the input image block by a prediction model.
  11. 11 . The method of claim 10 , wherein a training of the prediction model includes at least training based on a training set, validating based on a validation set, and testing based on a test set; the training set, the test set, and the validation set include a sample similarity of the row pixel group and the column pixel group in which a sample second pixel value is located, and a sample first pixel value sequence in a sample input image; an amount of data in the training set, the test set, and the validation set is a preset ratio; there is no data crossover in the training set, the test set, and the validation set; and different training samples of the prediction model have different learning rate, and a learning rate of a training sample correlates to an image complexity of a sample input image block corresponding to the training sample.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS The application claims priority to Chinese Application No. 202311625342.8, filed Nov. 30, 2023, the entire contents of which are hereby incorporated by reference. TECHNICAL FIELD The present disclosure relates to the field of data compression technology, and in particular, to methods for lossless ARGB (Alpha, Red, Green, Blue) compression based on intra-block predictions. BACKGROUND In a graphics processing unit (GPU), a display control unit, a depth unit, and a texture unit are required to process image data in real-time. Additionally, a reference frame storage unit in a video codec (VC) of a variety of video codec protocols (e.g., HEVC, H.264/AVC, and MPEG-2) is required to store the image data of the reference frame. Currently, mainstream display resolutions include full high definition (FHD) and quarter high definition (QHD), with high-end displays reaching 4K ultra high definition (UHD) and 8K UHD. A higher resolution means a higher size of storage data, and due to the size limitations of the on-chip cache in the GPU and the VC, the image data is stored off-chip in double data rate synchronous dynamic random access memory (DDR SDRAM). As a result, all of the above units require frequent reads of the storage unit DDR as well as writing large amounts of data. The DDR needs to respond on time to data access requests from these units. When reading and writing a large amount of data from the reference frame, the bandwidth of the DDR cannot satisfy the real-time reading demand, and the operation of reading and writing a large amount of data at the same time may significantly increase the power consumption of the system. Image block compression is currently the main solution for storage access bandwidth. By employing an image block compression and decompression module to compress the image block before it is to be deposited into the DDR, the amount of data that needs to be read and written is reduced, thus reducing the requirement for the access bandwidth of the DDR. Fast processing speed and high data throughput of the image block compression and decompression module are required for the GPU and the VC to reduce the impact on the image processing of the GPU and the VC. Thus, algorithm complexity needs to be considered when designing an image block compression and decompression algorithm. The higher algorithm complexity produces higher latency in the compression and decompression process. Therefore, a method for lossless ARGB compression based on an intra-block prediction is provided so that the amount of data stored in the image block can be greatly reduced. At the same time, the prediction manner and the residual grouping manner in the compression of image blocks are improved to improve the prediction performance and the grouping efficiency. SUMMARY One or more embodiments of the present disclosure provide a method for lossless ARGB (Alpha, Red, Green, Blue) compression based on an intra-block prediction. The method may be executed by a processor, and the method may comprise: for an input image block under a processing channel, executing the following operations until all input image blocks are encoded: obtaining a predicted value of the input image block under a current processing channel based on the input image block under the current processing channel by the intra-block prediction; determining predicted residuals of the input image block under the current processing channel based on the predicted value and an original pixel value; inputting the predicted residuals into a residual encoder for encoding to obtain a residual stream of the input image block under the current processing channel, the residual encoder being a processor including a predetermined encoding program; and storing residual streams of all input image blocks of all processing channels as a compressed file in a storage file. BRIEF DESCRIPTION OF THE DRAWINGS The present disclosure is further illustrated in terms of exemplary embodiments. These exemplary embodiments are described in detail with reference to the drawings. These embodiments are non-limiting exemplary embodiments, in which like reference numerals represent similar structures, and wherein: FIG. 1 is a schematic diagram illustrating an exemplary graphics processing unit (GPU) or video codec (VC) interacting with a double data rate (DDR) memory according to some embodiments of the present disclosure; FIG. 2 is a schematic diagram illustrating an exemplary method for compressing image blocks according to some embodiments of the present disclosure; FIG. 3 is a schematic diagram illustrating an exemplary method for lossless ARGB compression based on an intra-block prediction according to some embodiments of the present disclosure; FIG. 4 is a schematic diagram illustrating an intra-block prediction model according to some embodiments of the present disclosure; FIG. 5 is a schematic diagram illustrating a prediction model according to some e