Data Compression

By performing entropy encoding on the data value set in the graphics processing unit (GPU) and combining color and spatial decorrelation, the data compression and decompression process is optimized, solving the problem of long processing time in the prior art and achieving faster data processing and memory bandwidth optimization.

CN109636865BActive Publication Date: 2024-10-11IMAGINATION TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201811169192.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-10-06
Filing Date
2018-10-08
Publication Date
2024-10-11
Estimated Expiration
2039-10-25

AI Technical Summary

Technical Problem

In existing technologies, data compression and decompression processes in graphics processing units (GPUs) are time-consuming, affecting operation speed. Furthermore, existing encoding schemes are difficult to decode quickly, leading to increased memory bandwidth pressure.

Method used

Entropy encoding is performed on a set of data values. The decoding process is simplified by including the number of indicator bits in the encoded output. Furthermore, the data compression and decompression processes are optimized by combining color decorrelation, spatial decorrelation, and variable-length encoding.

Benefits of technology

It improves the speed of data compression and decompression, reduces memory bandwidth requirements, simplifies the decoding process, and ensures fast parsing of data values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109636865B_ABST
    Figure CN109636865B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to data compression. Data compression (and corresponding decompression) is used to compress blocks of data values, which involves multiple processes, including one or more of color decorrelation, spatial decorrelation, entropy coding, and packing. Entropy coding generates encoded data values ​​with variable size (in terms of number of bits). Entropy coding uses a size indication of a corresponding set of data values ​​to indicate the number of bits used for the encoded data values ​​in the set. The size indication allows fast parsing of the encoded data values ​​(e.g., in parallel).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data compression. Background Art

[0002] In many applications where data is to be stored in and / or read from memory, both lossless and lossy data compression are desired. By compressing the data before storing it in memory, the amount of data transferred to the memory can be reduced. An example of data for which data compression is particularly useful is image data, such as depth data to be stored in a depth buffer, pixel data to be stored in a frame buffer, and texture data to be stored in a texture buffer. These buffers can be any suitable type of memory, such as a cache memory, a separate memory subsystem, a memory area in a shared memory system, or some combination thereof.

[0003] A graphics processing unit (GPU) can be used to process image data in order to determine the pixel values ​​of an image to be stored in a frame buffer for output to a display. A GPU typically has a highly parallelized structure for processing large blocks of data in parallel. There is tremendous commercial pressure to run GPUs (especially those intended to be implemented on mobile devices) at lower power levels. Competing with this is the desire to use higher quality rendering algorithms on faster GPUs, thereby putting pressure on relatively limited resources (memory bandwidth). However, increasing the bandwidth of the memory subsystem may not be an attractive solution because moving data in and out of the GPU and even moving data within the GPU consumes most of the GPU's power budget. The central processing unit (CPU) may also have the same problem as the GPU.

[0004] As mentioned above, one way to reduce the amount of data transferred to the memory is to compress the data to be transferred to and from the memory. The time spent on compressing and decompressing data increases the waiting time of memory read and write operations, and therefore may affect the speed of GPU operation. In addition, the rate at which compressed data is allowed to be different from the rate at which compressed data is decompressed. As an example, it is generally allowed that the compression process for compressing texture data (which is usually a lossy compression process) is significantly slower than the decompression process for decompressing compressed texture data. On the contrary, the compression process (which is usually a lossless compression process) for compressing depth data for storage in a depth buffer or for compressing pixel data for storage in a frame buffer should ideally be performed at a rate substantially the same as the corresponding decompression process. British Patent No. 2451911 discloses a graphics rendering system that can compress a two-dimensional data set.

[0005] Variable length coding schemes allow data to be compressed in such a way that some data portions can be represented by fewer coded bits than other data portions, with the goal of providing a high level of compression across different data portions (which can be different). However, allowing the number of bits used to represent different encoded data values ​​to vary can increase the complexity of quickly decoding the encoded data. For example, it may be difficult to determine where boundaries between different encoded data values ​​are located without analyzing the encoded data (e.g., decoding each encoded data value in sequence).

[0006] British Patent No. 2530312 describes a data compression system in which 8×8 blocks of image data are compressed by performing color decorrelation, spatial decorrelation and entropy coding, and then packing the resulting encoded data values ​​into data packets for storage. In the system described in the patent, one row of data values ​​from a block is processed at each iteration. A modified version of Exponential Golomb coding is used for entropy coding, in which each coefficient stores a prefix to indicate the range of values ​​that is subsequently indicated by a suffix. Having a prefix and suffix for each encoded coefficient makes it difficult to decode multiple values ​​simultaneously, as it is not simple to quickly determine the location of the boundaries between encoded bits. Summary of the invention

[0007] This Summary is provided to introduce some concepts in a simplified form, which are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0008] In the examples described herein, entropy encoding is performed on a set of data values ​​(e.g., a 2×2 set of data values). For each set of data values, an indication is included in the encoded output (e.g., in its header segment) indicating how many bits are used for each of the encoded data values ​​representing the set of data values. The encoded data values ​​are then included in the encoded output according to the indicated number of bits. The system means that decoding of the encoded data values ​​is simplified (compared to the system of UK Patent No. 2530312) because simply reading the indication (e.g., in the header) allows the bit boundaries between different encoded data values ​​to be determined. In other words, the indication allows the size of the corresponding encoded data segment to be quickly determined (e.g., in only a single clock cycle).

[0009] A method of performing entropy encoding on a plurality of data values ​​to form an encoded data output is provided, the encoded data output being a plurality of encoded data values, the plurality of encoded data values ​​representing a corresponding plurality of data values, the method comprising:

[0010] receiving a data value; and

[0011] For each of the multiple sets of received data values:

[0012] determining a number of bits that can be used to represent a maximum value among the received data values ​​in the set;

[0013] including in the encoded data output an indication of the determined number of bits; and including in the encoded data output encoded data values ​​representing the received data values ​​in the set, wherein each of the encoded data values ​​has the determined number of bits.

[0014] The determined number of bits may be the minimum number of significant bits that can be used to represent the maximum value of the received data values ​​in the set. As an example, each of the received data values ​​may have n bits, and the determined minimum number of significant bits for a particular set of received data values ​​may be m, where m≤n. In this example, each of the received data values ​​in the particular set has at least (nm) leading zeros, and each of the encoded data values ​​for the particular set includes the m least significant bits of the corresponding n-bit received data value in the particular set.

[0015] An entropy coding module is provided, configured to perform entropy coding on a plurality of data values ​​to form an encoded data output, the encoded data output comprising a plurality of encoded data values, the plurality of encoded data values ​​representing a corresponding plurality of data values, the entropy coding module being configured to:

[0016] receiving a data value; and

[0017] For each of the multiple sets of received data values:

[0018] determining a number of bits that can be used to represent a maximum value among the received data values ​​in the set;

[0019] including in the encoded data output an indication of the determined number of bits; and including in the encoded data output encoded data values ​​representing the received data values ​​in the set, wherein each of the encoded data values ​​has the determined number of bits.

[0020] In some examples, a data compression unit is provided that includes an entropy encoding module as described herein.

[0021] A method of performing entropy decoding on an encoded data input comprising: (i) a plurality of encoded data values, and (ii) for each of a plurality of sets of encoded data values, forming an indication of the number of bits of the encoded data values ​​in the set, wherein the method comprises:

[0022] receiving encoded data input;

[0023] reading an indication in the encoded data input to identify the number of bits forming each of the encoded data values; and

[0024] The encoded data value in the encoded data input is parsed based on the identified number of bits to interpret the encoded data value.

[0025] The method may also include determining decoded data values ​​by selectively prepending leading zeros to the interpreted encoded data values ​​such that each of the decoded data values ​​has a number n of bits.

[0026] An entropy decoding module is provided, configured to perform entropy decoding on an encoded data input, the encoded data input comprising: (i) a plurality of encoded data values, and (ii) for each of a plurality of sets of encoded data values, an indication of a number of bits of the encoded data values ​​in the set, the entropy decoding module being configured to:

[0027] receiving encoded data input;

[0028] reading an indication in the encoded data input to identify the number of bits forming each of the encoded data values; and

[0029] The encoded data value in the encoded data input is parsed based on the identified number of bits to interpret the encoded data value.

[0030] In some examples, a data decompression unit is provided that includes an entropy decoding module as described herein.

[0031] There are a number of different components described herein, including an entropy encoding module, a data compression unit, an entropy decoding module, and a data decompression unit. Any of these components may be implemented in hardware on an integrated circuit. A method for manufacturing any of these components at an integrated circuit manufacturing system may be provided. An integrated circuit definition data set may be provided, which, when processed in an integrated circuit manufacturing system, configures the system to manufacture any of these components. A non-transitory computer-readable storage medium may be provided, having stored thereon a computer-readable description of any of these components, which, when processed in an integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture an integrated circuit implementing the component.

[0032] An integrated circuit manufacturing system may be provided, comprising: a non-transitory computer-readable storage medium having stored thereon a computer-readable description of any one of these components; a layout processing system configured to process the computer-readable description to generate a circuit layout description of an integrated circuit implementing the component; and an integrated circuit generation system configured to manufacture the component based on the circuit layout description.

[0033] A computer program code for performing any of the methods described herein may be provided. A non-transitory computer readable storage medium having computer readable instructions stored thereon may be provided, which when executed at a computer system causes the computer system to perform any of the methods described herein.

[0034] As will be apparent to the skilled person, the above-described features may be combined as appropriate and may be combined with any aspects of the examples described herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Examples will now be described in detail with reference to the accompanying drawings, in which:

[0036] Figure 1 A graphics rendering system is shown;

[0037] Figure 2 A data compression unit is shown;

[0038] Figure 3 A flow chart showing a method of compressing data;

[0039] Figure 4 A data decompression unit is shown;

[0040] Figure 5 A flow chart illustrating a method of decompressing data;

[0041] Figure 6 The spatial decorrelation module is shown;

[0042] Figure 7A graphical representation of a linear prediction method is shown;

[0043] Figure 8 The operation of the processing pipeline of the spatial decorrelation module is shown;

[0044] Fig. 9 A flow chart showing a method of performing spatial decorrelation on a block of data values;

[0045] Fig.10 shows the dependency tree for the order in which rows are processed during spatial decorrelation;

[0046] Fig.11 A block of data values ​​to be entropy encoded is shown;

[0047] Fig.12 is a flow chart of a method for performing entropy encoding on a plurality of data values;

[0048] Fig.13 An example format of entropy encoded data output is shown;

[0049] Fig.14 An example format of encoded data for an image is shown;

[0050] Fig.15a An example format of a data packet for entropy coded pixel blocks is shown;

[0051] Fig.15b shows an example format of channel mode bits included in a data packet;

[0052] Fig.15c Three different example formats of channel data included in a data packet are shown;

[0053] Fig.16 An example format of a data packet for a pixel block using raw data values ​​is shown;

[0054] Fig.17 Components of an unpacking unit for determining lane lengths within an encoded data input are shown;

[0055] Fig.18 is a flow chart of a method of performing entropy decoding on an encoded data input;

[0056] Fig.19 The spatial re-correlation module is shown;

[0057] Fig. 20 The operation of one stage of the processing pipeline of the spatial re-correlation module is shown.

[0058] Fig.21 shows a block of MSAA difference data values ​​to be entropy encoded;

[0059] Fig. 22 shows how to reformat three 10-bit channels into four channels;

[0060] Fig.23a shows the distribution of data values ​​when two zeros are appended to the least significant end of a 6-bit data value;

[0061] Figure 23b shows the distribution of data values ​​when two zeros are prepended to the most significant end of a 6-bit data value;

[0062] Fig.23c shows that applying a signed right shift of 2 bits to Fig.23a the distribution of data values ​​after the data value shown;

[0063] Fig.24 shows how to reorganize 16×4 blocks of data values ​​into 8×8 blocks;

[0064] Fig.25 shows that one of the data values ​​in the right half of a row can be used to predict some of the data values ​​in the left half of the row;

[0065] Fig.26 shows the dependency tree for the order of processing rows during spatial decorrelation for a 16×4 block;

[0066] Fig. 27 is a table showing the order in which rows may be processed for a 16×4 block;

[0067] Fig.28 shows how to reorganize 32×2 blocks of data values ​​into 8×8 blocks;

[0068] Fig.29 shows that data values ​​in some segments of a row can be used to predict some data values ​​in other segments of the row;

[0069] Fig.30 shows the dependency tree for the order of processing rows during spatial decorrelation for a 32×2 block;

[0070] Fig.31 is a table showing the order in which rows may be processed for a 32x2 block; and

[0071] Fig.32 An integrated circuit manufacturing system for producing an integrated circuit implementing a graphics processing system is shown.

[0072] The accompanying drawings show various examples. It will be appreciated by the skilled person that the element boundaries (e.g., boxes, box groups, or other shapes) shown in the accompanying drawings represent one example of boundaries. In some examples, one element may be designed as multiple elements, or multiple elements may be designed as one element. Throughout the accompanying drawings, common reference numerals are used where appropriate to indicate similar features. DETAILED DESCRIPTION

[0073] The following description is presented by way of example to enable those skilled in the art to make and use the invention.The present invention is not limited to the embodiments described herein, and various modifications to the disclosed embodiments will be apparent to those skilled in the art.

[0074] Embodiments are now described by way of example only.

[0075] Data compression is useful in a variety of different scenarios. Most of the examples described herein involve compressing (and decompressing) image data for use by a GPU, but similar principles can be applied to compressing (and decompressing) other types of data (such as audio or digital data) and / or for use by processing units other than GPUs (such as CPUs).

[0076] Figure 1 A graphics rendering system 100 is shown that can be implemented in an electronic device such as a mobile device. The graphics rendering system 100 includes a main CPU 102, a GPU 104, and a memory 106 (e.g., graphics memory). The CPU 102 is arranged to communicate with the GPU 104. Data, which may be compressed data, can be transferred between the GPU 104 and the memory 106 in either direction.

[0077] The GPU 104 includes a rendering unit 110, a compression / decompression unit 112, a memory interface 114, and a display interface 116. The system 100 is arranged so that data can be transferred in either direction between: (i) the CPU 102 and the rendering unit 110; (ii) the CPU 102 and the memory interface 114; (iii) the rendering unit 110 and the memory interface 114; (iv) the memory interface 114 and the memory 106; (v) the rendering unit 110 and the compression / decompression unit 112; (vi) the compression / decompression unit 112 and the memory interface 114; and (vii) the memory interface 114 and the display interface. The system 100 is also arranged so that data can be transferred from the compression / decompression unit 112 to the display interface 116. Images rendered by the GPU 104 can be sent from the display interface 116 to the display for display thereon.

[0078] In operation, GPU 104 processes image data. For example, rendering unit 110 may perform scan conversion of graphics primitives such as triangles and lines using known techniques such as depth testing (e.g., for hidden surface removal) and texturing and / or shading. Rendering unit 110 may include a cache unit to reduce memory traffic. Some data is read or written to memory 106 by rendering unit 110 via memory interface unit 114 (which may include a cache), but for other data, such as data to be stored in a frame buffer, the data preferably goes from rendering unit 110 to memory interface 114 via compression / decompression unit 112. Compression / decompression unit 112 reduces the amount of data to be transferred to memory 106 across an external memory bus by compressing the data as described in more detail below.

[0079] The display interface 116 sends the completed image data to the display. The uncompressed image can be accessed directly from the memory interface unit 114. The compressed data can be accessed via the compression / decompression unit 112 and sent to the display 108 as uncompressed data. In an alternative example, the compressed data can be sent directly to the display 108, and the display 108 can include logic for decompressing the compressed data in a manner equivalent to the decompression of the compression / decompression unit 112. Although shown as a single entity, the compression / decompression unit 112 can contain multiple parallel compression and / or decompression units for performance enhancement reasons.

[0080] As a general overview, a compression system may follow a basic algorithmic outline that enables the following steps to be performed (not necessarily in the order given below):

[0081] 1. Divide into blocks

[0082] The image data is logically divided into independent, non-overlapping rectangular blocks to allow random access to the compressed data. The size and shape of the blocks depends on the implementation, and the blocks can be, for example, 8×8, 16×4, 32×2, 4×4, or 32×16 blocks of data values. Increasing the block size tends to improve the compression ratio achieved. However, increasing the block size also incurs greater hardware costs and may reduce efficiency when access patterns become less coherent. Therefore, a balance needs to be struck when choosing the block size, which depends on the implementation and can, for example, depend on the characteristics of the type of data to be compressed.

[0083] 2. Format Conversion

[0084] Some buffers (e.g., depth buffers) may store data in floating point format, but performing lossless arithmetic on floating point numbers may be problematic. Therefore, floating point values ​​may be interpreted as signed integer values ​​to allow lossless computation. Format conversion may also be used when a data value includes multiple channels of data representing different color components, where the values ​​in the channels are not multiples of 8 bits, such as RGB 5:6:5 or ARGB 2:10:10:10 formats. The format of the data value may be converted so that the value of each channel is a multiple of 8 bits (e.g., ARGB 8:8:8:8 format). The format conversion step is not always included in the compression process, for example, when the data is already in integer format, or some other format where lossless computation can be performed.

[0085] 3. Color channel decorrelation

[0086] The data value may include multiple channels of data representing different color components. For example, the data may be in ARGB 8:8:8:8 format, where there are 8 bits to represent each of the alpha channel, red channel, green channel, and blue channel of each data value in the data value. There is often considerable correlation between the values ​​of some or all color channels (e.g., R, G, and B channels), and the compression algorithm can exploit this correlation by reducing the range of some of these channels on average to compress the data. Suitable color space transforms for exploiting the correlation between different color channels are known in the art, such as described in GB2451911, and are not described in detail herein. Suitable color space transforms are lossless and "non-expanded", meaning that the number of bits used to represent the color value will not increase due to the color space transform.

[0087] 4. Spatial Decorrelation

[0088] Spatial decorrelation (also called "prediction") removes some of the correlation between neighboring pixels, thereby reducing the dynamic range of values ​​on average. Figures 6 to 10 Methods for performing spatial decorrelation are described in detail.

[0089] 5. Entropy Coding

[0090] Entropy coding uses the statistical properties of decorrelated data to reduce the number of bits used to represent data. Arithmetic coding schemes are relatively computationally intensive and slow. Therefore, relatively simple variable length coding (VLC) (e.g., Huffman or Columbine) or run-length-based entropy coding schemes have been used. However, even with a simple VLC coding scheme, it is difficult to perform entropy decoding at high speed. A new method for performing entropy coding and decoding at high speed and low computational complexity is described in detail below.

[0091] 6. Storage

[0092] Finally, the compressed data may be stored in the memory 106. The details of the mechanism for storing data in the memory 106 are known to those skilled in the art and are therefore not described in detail herein.

[0093] The decompression system may follow a reversal of the basic algorithm outline given above for compression (not necessarily in the order given above).

[0094] The general compression algorithm given above may be applied to the compression / decompression unit 112 . Figure 2 Modules of the compression / decompression unit 112 are shown, and when the compression / decompression unit 112 operates as a compression unit, these modules are used to compress ARGB data value blocks including four 8-bit channels. In other examples, the compression / decompression unit 112 can be used to compress data value blocks having other formats. The compression unit 112 includes a color decorrelation module 202, four spatial decorrelation modules 2041 to 2044, four entropy coding modules 2061 to 2064, and a packing module 208.

[0095] Figure 3 A flow chart of a method of compressing a block of data is shown, which block of data may be, for example, an 8×8 pixel block of data in the ARGB 8:8:8:8 format, where there are 32 bits per pixel. That is, in this example, each data value in the 8×8 block includes 32 bits: 8 bits for the Alpha channel, 8 bits for the Red channel, 8 bits for the Green channel, and 8 bits for the Blue channel. In step S302, an uncompressed block of data is received at the compression unit 112. The first step of the general compression algorithm given above, i.e., the division into blocks, may be performed on the data before the data is received at the compression unit 112. Alternatively, this step may be performed at the compression unit 112. The uncompressed block of data is received at the color decorrelation module 202. In step S304, the color decorrelation module 202 may apply a format conversion to the data value as described above. Note that the format conversion step may not be implemented (e.g., when the data is already in a suitable format (e.g., an integer format)), so no format conversion is required.

[0096] In step S304, the color decorrelation module 202 applies color decorrelation to the data values. Suitable color decorrelation methods are known in the art. Preferably, a color decorrelation method is used that does not expand any output channels, i.e., the number of bits output from the color correlation module 202 is not greater than the number of bits input to the color decorrelation module 202.

[0097] In other examples, data values ​​of the Alpha channel are sent to the spatial decorrelation module 2044, and data values ​​of the R, G, and B channels are sent to the color decorrelation module 202, so that the color decorrelation module 202 applies color decorrelation only to the R, G, and B values.

[0098] It has been found (for example as shown in GB2451911) that the following very simple color transform performs well for 8-bit color values:

[0099] R′=RG mod 2 8

[0100] G′=G

[0101] B′=BG mod 2 8

[0102] A′=A

[0103] Where R, G, B, and A are data values ​​of channels received at the color decorrelation module 202 , and R′, G′, B′, and A′ are data values ​​of decorrelated color channels output from the color decorrelation module 202 .

[0104] The distributions of the transformed channels R' and B' do not resemble a (bounded) Laplace distribution function centered at zero. Performing a modulo operation in the transformation shown above reduces the dynamic range of the distribution so that fewer bits can be used than if the values ​​of RG and BG were used without performing the modulo operation. Note that the modulo operation given above is mod2 8 , because in the example given above, each data value in the channel comprises 8 bits. In other examples, each data value may have a different number of bits, for example, n bits, in which case the modulo operation will change accordingly, for example, to become mod 2 n .

[0105] The color decorrelation values ​​of the red, green, blue and alpha channels are output from the color decorrelation module 202 and separated from each other so as to be passed to the corresponding spatial decorrelation modules 2041, 2042, 2043 and 2044. In step S306, the spatial decorrelation modules 204 each apply spatial decorrelation to the data value blocks of the corresponding color channel, thereby removing a significant portion of the correlation between the pixels in the block. The selection of the spatial decorrelation method should take into account the trade-offs between relevant factors, such as the reduction in spatial correlation that can be achieved, the complexity and / or latency of the operations involved in spatial decorrelation, and the complexity and / or latency of the operations involved in re-correlating the spatial decorrelation values. Reference is made below to Figures 6 to 9 Examples of spatial decorrelation applied by each spatial decorrelation module 204 are described in more detail.

[0106] The spatially decorrelated data values ​​are output from each of the spatial decorrelation modules 2041 to 2044 and are provided to the corresponding entropy coding modules 2061 to 2064. In step S308, the entropy coding module 206 applies entropy coding to the data values. Entropy coding is performed according to a variable length coding (VLC) scheme so that the entropy coded values ​​are likely not all to have the same number of bits. Typically, more likely values ​​are encoded with fewer bits. In this way, the total number of bits for all data values ​​in the encoded data block may be reduced by entropy coding. There are some cases where spatial decorrelation can expand the data, and these cases can be regarded as special cases (i.e., the data is treated differently from other cases) to limit the expansion.

[0107] VLC encoding can be performed fairly straightforwardly at high rates, but VLC decoding at a matching rate can be significantly more difficult because the bit boundaries between consecutively stored encoded data values ​​are not known until the encoded data is analyzed, i.e., the length of the encoded data values ​​is not known until the encoded data is analyzed. In particular, when encoding, multiple symbols can be independently mapped to their corresponding codes and code lengths, and then merged into a continuous output bit stream. However, when decoding, each code in the encoded bit stream is typically checked sequentially to determine its length, and thus the start position of the next code. In other words, the bit boundaries between different encoded data values ​​need to be found. Reference is made below to Figures 11 to 13 Examples of entropy encoding applied by each entropy encoding module 206 are described in more detail.

[0108] The entropy encoded data values ​​are output from each entropy encoding module 206 and provided to the packing module 208. In step S310, the packing module packs the encoded data values ​​from different channels together into a compressed data block according to the packing scheme. In step S312, the packed data values ​​are output from the packing module 208 as compressed data. The compressed data may be sent to the memory 106 (e.g., via the memory interface 114) for storage therein.

[0109] Iterate over different blocks of data values Figure 3The steps shown. For example, entropy encoding can be performed in parallel for each data value in a block of data values ​​(e.g., an 8×8 block); and spatial decorrelation can be performed in a manner that enables each iteration to process a row of data values. It simplifies the system if entropy encoding and spatial decorrelation operate at the same rate, so in the example described in this article, both operate at an (average) rate of processing a row of data values ​​per iteration. Encoding can be performed in parallel on all four channels, with each channel encoding a row of data values ​​per iteration. Iterations can be performed on corresponding consecutive clock cycles. Thus, as an example, where there are eight data values ​​in a row of a block, eight data values ​​can be compressed per clock cycle.

[0110] Figure 4 The modules of the compression / decompression unit 112 are shown, which are used to decompress the block of ARGB data values ​​when the compression / decompression unit 112 operates as a decompression unit. The decompression unit 112 includes a color re-correlation module 402, four spatial re-correlation modules 4041 to 4044, four entropy decoding modules 4061 to 4064 and an unpacking module 408.

[0111] Figure 5 Flowchart showing a method of decompressing a data block. In step S502, the compressed data of the block is received in a data packet from the memory 108 (eg, via the memory interface 114) at the depacketization module 408 of the decompression unit 112. The compressed data has been compressed using the above description of Figure 2 and Figure 3The method described is compressed. In step S504, the compressed data values ​​in the data packet are unpacked into different channels. In this example, different channels are used for different color components (e.g., red, green, blue, and alpha channels), while in other examples, different channels can represent other things, for example, different channels can represent components of normal vectors or separate parts of larger data values ​​(e.g., 32-bit data values ​​representing depth and / or template data). The compressed data is unpacked according to an unpacking scheme, which corresponds to the packing scheme used to pack the data values ​​into compressed data blocks in step S310. As described below, the encoded data includes an indication of the number of bits used for the encoded data value in a specified area within the data packet (e.g., in the header area). Therefore, these indications can be read to determine how many bits are included in the encoded data for each channel within the data packet. In order to unpack the incoming data into the appropriate channel, the unpacking module 408 separates the encoded data input within the data packet into corresponding color channels based on the number of bits forming the encoded data value, as indicated by the indication in the encoded data input. For example, by reading the indication and adding the number of bits indicated, the unpacking module can determine the length of each encoded data input corresponding to each color channel in the data packet in a single clock cycle. The encoded data values ​​(i.e., compressed data) of the different channels are provided to the corresponding entropy decoding modules in the entropy decoding module 406.

[0112] In step S506, each entropy decoding module 406 applies entropy decoding to the encoded data value. The entropy decoding is performed according to the variable length coding (VLC) scheme used to encode the data value in step S308. Fig.17 and Fig.18 Examples of entropy decoding applied by each entropy decoding module 406 are described in more detail.

[0113] The entropy decoded data values ​​are output from the entropy decoding modules 4061 to 4064 and provided to corresponding spatial re-correlation modules 4041 to 4044. In step S508, the spatial re-correlation modules 404 each apply spatial re-correlation to the entropy decoded data values ​​of the corresponding color channel. In this way, the spatial decorrelation applied to the data values ​​in step S306 is reversed.

[0114] The data values ​​of the R, G, B, and A channels are sent to the color re-correlation module 402. In step S510, the color re-correlation module 402 applies color re-correlation to the data values ​​of the R, G, B, and A channels. The color re-correlation method is selected to be the inverse of the color decorrelation method used in step S304 described above. In some other examples, the alpha channel may bypass the color re-correlation module 402, for example, where color re-correlation is not required.

[0115] After step S510, the data values ​​of each channel (e.g., R, G, B, and A channels) have been decompressed, and in step S512, these data values ​​are output as decompressed data. The decompressed data can be output to any other element in the device. The decompressed data can be used in any suitable manner, for example, in the case where the data is image data, the decompressed data can be output to the display interface 116 for output to the display 108. In other examples, the data can be used as a source for a video synthesizer or a texture in a 3D renderer.

[0116] Iterate over different blocks of data values Figure 5 The steps shown. For example, entropy decoding can be performed in parallel for each data value in a block of data values ​​(e.g., an 8×8 block); and spatial re-correlation can be performed in a manner that enables each iteration to process a row of data values. If entropy decoding and spatial re-correlation operate at the same rate, it simplifies the system, so in the example described in this article, both operate at an (average) rate of processing a row of data values ​​per iteration. Iterations can be performed on corresponding consecutive clock cycles. Thus, as an example, where there are eight data values ​​in a row of a block, eight data values ​​can be decompressed per clock cycle. When there are multiple data channels, these channels can be decompressed independently (in parallel), with each channel decoding a row of data values ​​per iteration. For example, an ARGB system can decompress 32 (i.e., 4×8) data values ​​per clock cycle.

[0117] It may be useful to allow a predictable number of data values ​​to be compressed and / or decompressed in each clock cycle. This is not necessarily insignificant when variable length entropy coding is used and / or when 2D spatial decorrelation is to be performed. In addition, the ability to compress and decompress multiple data values ​​(e.g., eight data values) on each clock cycle allows compression and decompression of data blocks to be performed quickly, i.e., with reduced latency compared to other compression or decompression methods that cannot compress and / or decompress as many data values ​​in each clock cycle.

[0118] The following describes an example showing how the spatial decorrelation and entropy encoding / decoding modules achieve the above-mentioned compression / decompression rates.

[0119] Figure 6 One of the spatial decorrelation modules 204 is shown which may be implemented in any one of the data channels. Note that in the examples described herein, the data channels are color channels, but in other examples, the data channels may not be color channels but may be other types of data channels. Figure 6In the example shown, an 8×8 data block 602 of channels is received at the spatial decorrelation module 204. The data values ​​in the data block 602 are arranged into 8 rows (in Figure 6 0 to 7) and 8 columns (in Figure 6 A two-dimensional array of pixels (labeled A to H in FIG). A block of data values ​​is associated with a corresponding block of adjacent pixel values. Figure 6 In the example shown, each data value comprises 8 bits, so that each row of the data block comprises 64 bits. The spatial decorrelation module 204 is configured to process the rows of the data block on corresponding consecutive clock cycles, thereby performing spatial decorrelation on the data values ​​from the block in two dimensions.

[0120] The spatial decorrelation module 204 includes a plurality of parallel processing pipelines (6041 to 6048), each pipeline including a first stage 606, a second stage 608, and a remapping stage 609. The first stage 606 of the processing pipelines 604 is configured to implement spatial decorrelation along rows of data values. The first stage 606 of all processing pipelines 604 except the last processing pipeline 6048 includes a processing unit 610, which is configured to determine a first coefficient to represent a corresponding one of the data values ​​from the row being processed. The second stage 608 of the processing pipelines 604 is configured to implement spatial decorrelation along columns of data values. The second stage 608 of each processing pipeline 604 includes a storage unit (e.g., a register 612) and a processing unit 614. In Figure 6 In the example shown, register 612 has sufficient capacity to store at least three data values, for example, each data value has 8 bits. The remapping stage 609 of the processing pipeline 604 includes a remapping unit 618, which is configured to remap the data values ​​to values ​​more suitable for entropy encoding. In the example described herein, the upper left value (A0") is remapped, but the upper left value (A0") may not be remapped because it is not entropy encoded in the system described herein. Note that in Figure 6 , the processing unit 6101, the register 6121, the processing unit 6141, and the remapping unit 6181 are labeled for the first processing pipeline 6041, but for the sake of clarity, Figure 6 No other processing pipeline 604 is specified in n Mark the corresponding processing unit 610 n , Register 612 n , processing unit 614 n and remapping unit 618 n (where 2≤n≤8).

[0121] Fig. 9A flow chart of a process for performing two-dimensional (2D) spatial decorrelation on a block of data values ​​602 at the spatial decorrelation module 204 is shown. In operation, in step S902, data values ​​from a row (e.g., row 0) of the data block 602 are received. In particular, each processing pipeline 604 is configured to receive one or more data values ​​from a particular row of the data block. Figure 6 In the example shown, the processing units 610 of the first stages of the processing pipelines 6041 to 6047 receive more than one data value from a particular row of the data block 602, but the first stage of the processing pipeline 6048 receives only one data value from a particular row of the data block 602. In step S904, each first stage 606 determines a first coefficient representing a corresponding one of the data values ​​of the particular row. The first coefficient is determined by the processing units 610 of the processing pipelines 6041 to 6047 based on receiving the data value at the processing unit 610 in step S902 and according to any suitable prediction scheme, such as a linear prediction-based or Haar prediction-based scheme. The first stage 606 of the final processing pipeline 6048 simply determines the first coefficient to be the same as the data value received there.

[0122] In each first stage of the processing pipeline 6041 to 6047, to determine a first coefficient representing a data value, a prediction of the data value is determined using other data values, and thus the first coefficient is based on the difference between the received data value and the prediction of the data value. If the prediction is sufficiently accurate, the distribution of the first coefficient values ​​(e.g., the difference between each actual data value and the predicted value) is typically more biased (toward zero) than the distribution of the actual data values ​​themselves, and can be represented using fewer bits on average. When considered as a signed value, the first coefficient can typically be equal to or nearly equal to zero.

[0123] Linear or Haar prediction schemes may include a two-stage process: prediction and then updating, i.e., prediction and error compensation. Linear and Haar prediction schemes are based on second generation wavelets. That is, for each data value at an odd numbered position in a row or column (which may be referred to as an "odd data value"), a predicted value is determined based on a certain set of one or more data values ​​at an even position (which may be referred to as an "even data value"). In the Haar prediction scheme, the determination is based on one even data value, and in the linear prediction scheme, the determination is based on two even data values. The odd data value is replaced by the difference between the actual data value and the predicted value. When the second generation wavelet is determined, the even value is then updated using a small number of adjacent modified odd values. Then, the prediction is repeated at different scales to predict other data values, for example, the updated even values ​​are grouped into a set of values, assigned as a new set of alternating "even" and "odd", and the process is repeated. The main purpose of the update step is to preserve the image moment. Maintaining such statistical properties is useful when coefficients are quantized as part of a lossy compression process, but for lossless data compression, as in the examples described herein, there is no need to include update steps (although they may be included in some examples). Avoiding update steps: a) has no significant adverse effect on the average compression ratio, b) cuts the number of hardware operations in the prediction process in half, and c) greatly shortens the computational dependency chain for both encoding and decoding.

[0124] Linear and / or Haar prediction schemes may be applied at different spatial frequencies to thereby predict different ones of the data values. At each frequency, a set of data values ​​is used to replace the odd data values ​​with the difference between the actual data value and the predicted data value. When the highest frequency is used, all data values ​​from the data block are in the set of data values ​​used. The odd data values ​​P in the set 2i+1 (where i is an integer) from the source with an even index (such as P 2i and / or P 2i+2 ) to be predicted, and P 2i+1 By targeting P 2i+1 The difference between the actual value and the predicted value is replaced by the difference between the actual value and the predicted value. At lower frequencies, the set includes fewer (e.g., half) data values ​​from the data block. This process can be repeated at lower frequencies until all but one of the data values ​​in a row are predicted from one or other data value in the row. For example, referring to Figure 6 , predict the data value in column B from the data values ​​in columns A and C; predict the data value in column C from the data values ​​in columns A and E; and predict the data value in column E from the data value in column A. is used to determine the value for odd data values ​​P using linear and Haar prediction schemes. 2i+1 The first coefficient P′2i+1 The prediction and replacement operation are given as:

[0125] P′ 2i+1 =P 2i+1 -LPredict(P 2i ,P 2i+2 )mod 2 8 (Linear) (1)

[0126] P′ 2i+1 =P 2i+1 -P 2i mod 2 8 (Hal) (2)

[0127] where the function LPredict is given as:

[0128]

[0129] The purpose of the LPredict function is to generate a 8 The most likely average of the two input values. Figure 7 , if we consider the number of 8 ) on a clock face with the number "minutes", there are two paths that can be taken to traverse from any two positions on the clock. Figure 7 In the example shown in , the calculation mod 2 is performed 8 , any 8-bit value represents all values ​​in a larger but finite congruent set, but assuming the expected probability distribution function is heavily biased toward zero, values ​​with smaller magnitudes are more likely to be actual values. As an example, Figure 7 Shown in |P 2i -P 2i+2 |≥2 7 How can the LPredict function predict the data value P when 2i+1 The value of Figure 7 In the example shown in 2i =220 and P 2i+2 =20. If determined by Taking a simple average of these two values, the result would be 120. However, according to the equation given above, since |P 2i -P 2i+2 |≥2 7 , then Figure 7 As shown in , the result of the LPredict function is given by Given. Due to the modulo operation, 248 is congruent to the value -8. The value -8 is much more likely than the value 120, and so -8 (which is congruent to 248) is determined as the result of the LPredict function.

[0130] Because "comparison" is two data values ​​P 2i and P 2i+2 The XOR of the two most significant bits (MSBs) of the LPredict function is therefore irrelevant in hardware. In addition, the applied offset (2 7 ) is again implemented as a one-bit XOR operation.

[0131] The spatial decorrelation is applied independently to different color channels by corresponding spatial decorrelation modules 204. In one example, each spatial decorrelation module 204 is as follows: Figure 6 The operation is shown, where the throughput is one 8×8 block of data values ​​in 8 clock cycles, stepping into a different row of the block each clock cycle. Figure 6 Each processing unit (610 and 614) shown can perform linear prediction or Haar prediction by repeating inputs per clock cycle. In other examples, processing units that only perform Haar prediction (e.g., processing units 6104, 6106, and 6107) may receive only two inputs to avoid repeating inputs. If two adjacent neighboring data values ​​at a particular frequency are available, linear prediction is applied, and if only one adjacent neighboring data value is available at a particular frequency, Haar prediction is applied. At each clock cycle, the rows are decorrelated at three frequencies using linear prediction for columns B, D, F, and C and Haar prediction for columns H, G, and E. For an 8×8 block, column A is not modified by the horizontal prediction performed by processing unit 610.

[0132] The equations given above for the linear and Haar prediction schemes relate to the case where the data value comprises 8 bits. It will be clear to those skilled in the art how to modify these equations for data values ​​having different numbers of bits. For example, for n-bit data values, 2 in the above equations 8 Occurrences of will be replaced by 2 n , and 2 7 Occurrences of will be replaced by 2 n-1 .

[0133] The first coefficients determined by the first stage 606 of the processing pipeline 604 are output from the first stage 606 of the processing pipeline 604 to the corresponding second stage 608. It should be noted that in the processing of the 8×8 data block Figure 6 In the example shown, the final processing pipeline 6048 requires no processing units because, in this case, the data values ​​of column A are passed through the first stage 606 of the pipeline 6048 unchanged.

[0134] In step S906, the first coefficient output from the first stage 606 is received at the corresponding second stage 608 of the processing pipeline 604. Specifically, the first coefficient is received at the register 612 of the second stage 608 of the processing pipeline 604.

[0135] The first coefficients are then spatially decorrelated in the vertical direction. The rows of the data block are input to the parallel processing pipeline 604 in sequence such that after the first row has been received by the second stage 608 and stored in the register 612, the second coefficients for each subsequent row of the block received at the second stage 608 can be determined based on the data values ​​stored in the register 612. For example, as described in more detail below, the rows may be provided to the processing pipeline 604 in the following order: row 0, row 4, row 2, row 1, row 3, row 6, row 5, and then row 7 (although other orders are also valid, such as row 0, row 4, row 6, row 7, row 5, row 2, row 3, and then row 1). The above-described transpose of horizontal decorrelation is then applied in the y-direction (i.e., the vertical direction along the columns) at the target rate with only minimal additional storage. In particular, as in Figure 6 and Figure 8 In the example shown (described below), register 612 may not need to store more than three data values ​​at any one time.

[0136] In step S910, the first coefficients received from the corresponding first stage 606 are selectively stored in the register 612 of each second stage 608 of the processing pipeline 604. That is, for some rows, the first coefficients are stored in the register 612, while for other rows, the first coefficients are not stored in the register 612. Specifically, the first coefficients are stored in the register 612 if these first coefficients are to be used to determine the second coefficients of subsequent rows.

[0137] In terms of terminology, with reference to the spatial decorrelation process, the "first coefficients" are the outputs from the first stage 606 (i.e., the values ​​after horizontal decorrelation, e.g. Figure 6 ), and the "second coefficients" are the outputs from the second stage 608 (ie, the values ​​after horizontal and vertical decorrelation, as shown in FIG. Figure 6 ) as indicated by the double dashed labels (A” to H”).

[0138] For each processing pipeline 604, the register 612 is configured to output up to two values ​​to the corresponding processing unit 614 at a time (e.g., per clock cycle). At each iteration, the first coefficient received from the first stage 606 of the corresponding processing pipeline 604 is passed to the corresponding processing unit 614, and the register 612 is configured to output zero, one or two first coefficients stored in the register 612 to the corresponding processing unit 614. In step S912, each processing unit 614 determines a second coefficient to represent a corresponding one of the data values ​​from the row being processed. The second coefficient is a spatially decorrelated value representing the data value of the block and is output from the spatial decorrelation module 204. For the data value of the first row of the block, the second coefficient is determined based only on the first coefficient received for the data value of the row. The first coefficient for the data value of the first row is stored in the register 612, so that for the data value of the subsequent row from the block, the second coefficient is determined based on the stored first coefficient and the first coefficient for the next row. For example, for all rows of data values ​​except the first row of the block, a second coefficient for a row of data values ​​is determined based on: (i) the corresponding first coefficient for the row received at the second stage 608, and (ii) at least one first coefficient for the corresponding at least one other row stored in the corresponding register 612.

[0139] Figure 8 6 shows an example of the order in which data values ​​from different rows of an 8×8 block are input into the processing pipeline 604. The operation of the second stage 608 of the processing pipeline 604 is summarized in Figure 8 As can be seen from the table shown in FIG. , the processing unit 614 has Figure 8 6, whereby the middle input is coupled to the output of the processing unit 610, and the left input and the right input are coupled to the output of the register 612. At a first clock cycle (clock cycle C0), the second stage 608 of the pipeline 604 receives a first coefficient for row 0 (the value input to the second stage 608 is indicated by a single prime: 0') and outputs a second coefficient for row 0 (the value output from the second stage 608 is indicated by a double prime: 0"), where the storage unit stores the first coefficient for row 0 (i.e., after clock cycle C0, the register 612 stores the first coefficient for row 0, indicated by 0').

[0140] At the second clock cycle (clock cycle C1), the second stage 608 of the pipeline 604 receives the first coefficient for row 4 (the value input to the second stage 608 is 4') and outputs the second coefficient for row 4 (the value output from the second stage 608 is 4"). That is, the processing unit 614 receives 4' on the middle input and receives 0' on the left and right inputs, so that the second coefficient for row 4 (labeled as 4") is determined by the processing unit 614 based on the received first coefficient for row 4 (labeled as 4') and the stored first coefficient for row 0 (labeled as 0', obtained from the register 612). After clock cycle C1, the storage unit stores the first coefficients for rows 0 and 4 (that is, the register 612 stores the first coefficients for rows 0 and 4, labeled as 0' and 4').

[0141] In the third clock cycle (clock cycle C2), the second stage 608 of the pipeline 604 receives the first coefficient for row 2 (the value input to the second stage 608 is 2') and outputs the second coefficient for row 2 (the value output from the second stage 608 is 2"). That is, the processing unit 614 receives 2' on the middle input, 0' on the left input and 4' on the right input, so that the second coefficient for row 2 (labeled as 2") is determined by the processing unit 614 based on the received first coefficient for row 2 (labeled as 2') and the stored first coefficients for rows 0 and 4 (labeled as 0' and 4', obtained from register 612). After clock cycle C2, the storage unit stores the first coefficients for rows 0, 4 and 2 (i.e., register 612 stores the first coefficients for rows 0, 4 and 2, labeled as 0', 4' and 2').

[0142] In the fourth clock cycle (clock cycle C3), the second stage 608 of the pipeline 604 receives the first coefficient for row 1 (the value input to the second stage 608 is 1') and outputs the second coefficient for row 1 (the value output from the second stage 608 is 1"). That is, the processing unit 614 receives 1' on the middle input, 0' on the left input and 2' on the right input, so that the second coefficient for row 1 (labeled 1") is determined by the processing unit 614 based on the received first coefficient for row 1 (labeled 1') and the stored first coefficients for rows 0 and 2 (labeled 0' and 2', obtained from register 612). After clock cycle C3, the storage unit stores the first coefficients for rows 4 and 2 (i.e., register 612 stores the first coefficients for rows 4 and 2, labeled 4' and 2'). The first coefficient for row 0 (labeled 0') can be discarded because it is not needed for subsequent rows, but it may be simpler to retain 0' in register 612 until it is overwritten.

[0143] In the fifth clock cycle (clock cycle C4), the second stage 608 of the pipeline 604 receives the first coefficient for row 3 (the value input to the second stage 608 is 3') and outputs the second coefficient for row 3 (the value output from the second stage 608 is 3"). That is, the processing unit 614 receives 3' on the middle input, 2' on the left input and 4' on the right input, so that the second coefficient for row 3 (labeled 3") is determined by the processing unit 614 based on the received first coefficient for row 3 (labeled 3') and the stored first coefficients for rows 2 and 4 (labeled 2' and 4', obtained from register 612). After clock cycle C4, the storage unit stores the first coefficient for row 4 (i.e., register 612 stores the first coefficient for row 4, labeled 4'). The first coefficient for row 2 (labeled 2') can be discarded because it is not needed for subsequent rows, but it may be simpler to retain 2' in register 612 until it is overwritten.

[0144] In the sixth clock cycle (clock cycle C5), the second stage 608 of the pipeline 604 receives the first coefficient for row 6 (the value input to the second stage 608 is 6') and outputs the second coefficient for row 6 (the value output from the second stage 608 is 6"). That is, the processing unit 614 receives 6' on the middle input and 4' on the left and right inputs, so that the second coefficient for row 6 (labeled as 6") is determined by the processing unit 614 based on the received first coefficient for row 6 (labeled as 6') and the stored first coefficient for row 4 (labeled as 4', obtained from the register 612). After clock cycle C5, the storage unit stores the first coefficients for rows 4 and 6 (i.e., the register 612 stores the first coefficients for rows 4 and 6, labeled as 4' and 6').

[0145] At the seventh clock cycle (clock cycle C6), the second stage 608 of the pipeline 604 receives the first coefficient for row 5 (the value input to the second stage 608 is 5') and outputs the second coefficient for row 5 (the value output from the second stage 608 is 5"). That is, the processing unit 614 receives 5' on the middle input, 4' on the left input and 6' on the right input, so that the second coefficient for row 5 (labeled 5") is determined by the processing unit 614 based on the received first coefficient for row 5 (labeled 5') and the stored first coefficients for rows 4 and 6 (labeled 4' and 6', obtained from register 612). After clock cycle C6, the storage unit stores the first coefficient for row 6 (i.e., register 612 stores the first coefficient for row 6, labeled 6'). The first coefficient for row 4 (labeled 4') can be discarded because it is not needed for subsequent rows, but it may be simpler to retain 4' in register 612 until it is overwritten.

[0146] In the eighth clock cycle (clock cycle C7), the second stage 608 of the pipeline 604 receives the first coefficient for row 7 (the value input to the second stage 608 is 7') and outputs the second coefficient for row 7 (the value output from the second stage 608 is 7"). That is, the processing unit 614 receives 7' on the middle input and 6' on the left and right inputs, so that the second coefficient for row 7 (labeled as 7") is determined by the processing unit 614 based on the received first coefficient for row 7 (labeled as 7') and the stored first coefficient for row 6 (labeled as 6', obtained from register 612). After clock cycle C7, the contents stored in register 612 are not important because in subsequent clock cycles, the process is repeated using a new block, so the data in register 612 for the current block will not be used. When such data is to be stored in register 612, the data can be overwritten by data for the new block.

[0147] exist Figure 8 In the example shown in , registers 612 each store up to three first coefficients at any given time to facilitate processing of data values ​​from a block comprising eight rows of data values. In general, each register 612 will have the capacity to store up to log2(r) first coefficients at any given time, where r is the number of rows in the block of data values.

[0148] The processing performed by the processing unit 614 may be a linear processing or a Haar processing, for example, depending on the number of different inputs provided for determining the second coefficients.

[0149] Fig.10 A dependency graph for rows (or columns) used in the spatial decorrelation process is shown. Solid lines represent dependencies. For example, row 0 (column A) does not depend on other rows (columns); row 4 (column E) depends on row 0 (column A); row 2 (column C) depends on rows 0 and 4 (columns A and E); row 6 (column G) depends on row 4 (column E); row 1 (column B) depends on rows 0 and 2 (columns A and C); row 3 (column D) depends on rows 2 and 4 (columns C and E); row 5 (column F) depends on rows 4 and 6 (columns E and G); and row 7 (column H) depends on row 6 (column G). The rows (columns) are processed sequentially so that after the first row (column) of a block has been processed, when subsequent rows (columns) are processed, the rows (columns) on which they depend have already been processed. Fig.10 The dashed line in the figure depicts the Figure 8 The example shown processes the order of rows (columns). It is beneficial to minimize the amount of computation and storage of previous rows of data required, and it is also beneficial to output the rows in as close to linear order as possible to increase the likelihood of preserving area when outputting the results. Fig.10The order shown by the dashed line in the figure (i.e., row order 0, 4, 2, 1, 3, 6, 5, 7) is a good choice because if the pixel data is transferred from somewhere else (e.g., memory or another unit) in scan order (i.e., in row order 0, 1, 2, 3, 4, 5, 6, 7), then Fig.10 The sequence shown requires only three lines of transmission data to be buffered. The limiting factor of this sequence is that line 4 is output in the second cycle, where, if the input lines arrive in scan order, line 4 is received after lines 0, 1, 2, and 3, and this means that three lines of data are buffered. However, there are many different sequences that can satisfy the dependencies, which is helpful for those who have already looked at the Fig.10 It will be clear to those skilled in the art. For example, the rows may be processed in the following order: 0, 4, 2, 3, 1, 6, 7, 5; or: 0, 4, 6, 5, 7, 2, 1, 3, to give just two examples. In the last example, the limiting factor is that row 6 is output in the third cycle, where row 6 is received after rows 0, 1, 2, 3, 4 and 5, if the input rows arrive in scan order, so this means that four rows of data are buffered.

[0150] For blocks having a different number of rows (i.e., not eight rows as in the example given above), the skilled person will know how to modify the order of the input rows accordingly so that at each clock cycle (except the clock cycle for processing the first row of the block), a data value can be output for a row based on a previously stored row of data values ​​of the block already stored in register 612.

[0151] The spatial decorrelation values ​​from each pipeline 604 (i.e., the second coefficients output from the processing unit 614) are passed to the corresponding remapping unit 618. The remapping unit 618 remaps the data values ​​so that they can be more efficiently encoded by the subsequent entropy encoding process. The remapped data values ​​can be in an unsigned integer format. The remapping process is configured according to the spatial decorrelation technique used by the spatial decorrelation module so that the probability of the remapped data value having a certain amplitude decreases for larger amplitudes.

[0152] An example of a remapping process is now described. The remapping process operates on an 8-bit value from processing unit 614. If the most significant bit of the data value is zero, the remapping process involves removing the most significant bit (which is zero) and appending 0s to the remaining bits of the data value. For example, 00010101 will be remapped to become 00101010, and 01000100 will be remapped to become 10001000. If the most significant bit of the data value is 1 (so that the data value represents a negative number), the remapping process involves removing the most significant bit (which is 1), complementing each remaining bit (e.g., using an XOR operation), and then appending 1s to those bits. For example, 10010101 will be remapped to become 11010101, and 11000100 will be remapped to become 01110111. The remapping process described here is very easy to implement, for example, in hardware simply by reordering some bits (e.g., to move the MSB to the LSB position) and optionally supplementing other bits if the MSB is 1. Table 1 shows how the bits of some data values ​​can be remapped.

[0153] Data Value Unmapped bits Remapped bits 0 00000000 00000000 -1 11111111 00000001 1 00000001 00000010 -2 11111110 00000011 2 00000010 00000100 -3 11111101 00000101 3 00000011 00000110 -4 11111100 00000111 4 00000100 00001000

[0154] Table 1: Bit remapping

[0155] In the above example, the linear prediction equation is given by Equation 1, where the function is defined by Equation 3 and involves rounding up the average of two adjacent data values. The difference between a pixel value and the average of its immediate neighbors (P′) 2i+1 ) is most likely to be zero, and so the probability of a particular difference decreases as the difference moves further away from zero. The quantization of the differences in function LPredict (due to the limited number of bits used to represent the differences (e.g., 8 bits) and the rounding up of the average (i.e., using a ceiling function in the division operation rather than rounding the average down)) means that the distribution of the differences is slightly "shifted" in the negative direction. Note that with the above remapping example, since the number of (significant) bits required to store a positive value 'X' after remapping is occasionally greater (but never less than) the number of bits required to store the remapped value '-X', it can be appreciated that biasing the distribution towards the negative direction rather than towards the positive direction (which would round the average down) results in better compression. This means that the remapped data values ​​are unsigned, with a distribution that is biased towards zero.

[0156] As a specific example, using this remapping process in conjunction with the above-mentioned function LPredict (which involves rounding up the average of two adjacent data values) means that we are more likely to obtain more "-1" coefficients than "+1" coefficients output from the second stage of the spatial decorrelation module. According to the remapping process shown in Table 1, the value -1 is remapped to 00000001, and the value +1 is remapped to 00000010. It can be clearly seen from the description of the entropy encoding process below that 00000001 (which has one significant bit, i.e., seven leading zeros) can be encoded using fewer bits than 00000010 (which has two significant bits, i.e., six leading zeros).

[0157] In a different example, spatial decorrelation may define the difference as the negative of the difference defined in Equations 1 and 2, where the function LPredict uses a floor operation rather than a ceiling operation, so that the average is rounded down rather than up. This will also lead to a situation where the simple remapping process described above will result in the probability of the remapped data value having a particular magnitude decreasing for larger magnitudes.

[0158] The spatial decorrelation module 204 is configured to implement spatial decorrelation along the rows of data values ​​in the first stage 606 and to implement spatial decorrelation along the columns of data values ​​in the second stage 608, so that a row of spatial decorrelation values ​​can be output on each clock cycle in a plurality of consecutive clock cycles. In other examples, the processing of rows and columns can be swapped, so that the spatial decorrelation module 204 implements spatial decorrelation along the columns of data values ​​in the first stage and along the rows of data values ​​in the second stage, so that a column of spatial decorrelation values ​​can be output on each clock cycle in a plurality of consecutive clock cycles.

[0159] The spatially decorrelated and remapped data values ​​are output from the spatial decorrelation module 204 and provided to a corresponding entropy coding module 206. As described above, the entropy coding module 206 applies entropy coding to the spatially decorrelated values ​​using a variable length coding scheme. The coding scheme is selected to allow fast encoding at a predictable rate, and in particular fast decoding of the data values.

[0160] It has been achieved that the data values ​​output from the spatial decorrelation module 204 are not completely decorrelated in space, so that the data values ​​are not completely independent. Therefore, when there are details in the local part of the input block (for example, image components with high spatial frequency, such as striped areas in the image), it is possible that the amplitudes of several adjacent data values ​​output from the spatial decorrelation module 204 for the local part of the input block are similar. This similarity can be used to improve the entropy coding process compared to the process of processing each data value independently. In particular, compared with the entropy coding / decoding scheme described in British Patent No. 2530312, the scheme described in this article: (i) provides easier parallel decoding of multiple encoded data values, (ii) on average provides slightly better compression (in terms of the reduced number of bits of the encoded data values), and (iii) avoids the need to explicitly store the length of the compressed data channel. In particular, the entropy coding / decoding scheme described in British Patent No. 2530312 involves the redundancy of storing length information twice, that is, in the form of per-coefficient prefix data and total length. The entropy coding / decoding scheme described in this article eliminates this redundant storage.

[0161] Fig.11 An 8×8 block of data values ​​1100 is shown that has been spatially decorrelated and remapped by one of the spatial decorrelation modules 204. The data values ​​are associated with corresponding pixel values. Fig.12 The flowchart shown describes a method for performing entropy encoding on a block of data values ​​at the entropy encoding module 206. The entropy encoding module 206 outputs the encoded data output 1300 (eg Fig.13), the encoded data output 1300 includes encoded data values ​​for representing the data values ​​in the 8×8 block 1100. The encoded data output 1300 has a variable length, depending on the compression that can be achieved by the entropy encoding process. In particular, in an example where each received data value in the block 1100 includes 8 bits (i.e., 1 byte), the encoded data output 1300 includes an 8-bit (1 byte) wide reference value field 1302, a 48-bit (6-byte) wide size indication field 1304, and a variable size field, which in this example has been configured to maintain the 8-bit alignment of the field. The width of the variable size field is between 8 bits (1 byte) wide and 448 bits (56 bytes) wide. If the entropy encoding process cannot losslessly represent the data values ​​in the data block 1100 without exceeding the number of available bits in the encoded data output 1300 (i.e., 504 bits or 63 bytes), the data values ​​in the data block 1100 are stored in the encoded data output in their original form, with each data value being 8 bits. The header segment of the data packet in which the encoded data output is placed has an indication for indicating the format of the encoded data within the data packet. For example, the indication may include two bits so that up to four different encoding modes can be set, which may include an original data format, an entropy coded format, and a constant format (in which all data values ​​within a block have the same value, so that the value can be stored once (using 8 bits) to represent the value of each data value within the block).

[0162] In step S1202, a block of data values ​​is received at the entropy coding module 206. The rows and columns of the block are as follows: Fig.11Arrangement shown. The data value block 1100 includes multiple sets of data values ​​(in this example, most are 2×2 sets of data values ​​(related to 2×2 sets of pixel values), but in other examples, these sets can be different shapes and / or sizes). For example, the sets of data values ​​can be two-dimensional sets of data values ​​of any suitable size and shape, for example, these sets can be p×q sets of data values, where p>1 and q>1. In the main example described in this article, p=q=2. In some examples, p can be an integer in the range 2≤n≤4, and q can be an integer in the range 2≤m≤4. To give some specific examples, these sets can be 3×2 sets of data values, 2×3 sets of data values, 3×3 sets of data values, or 4×4 sets of data values, for example, where the data values ​​are related to corresponding pixel values. Block 1100 includes 15 2×2 sets of data values, and one specific set (in the upper left of the block) that includes only three data values. The upper left data value (A0) is not entropy encoded, but in step S1204, the data value at position A0 is included in the reference value field 1302 of the encoded data output 1300. Since the upper left set represents a similarly sized set compared to the other sets in the block, but minus the data value to be used as a reference value, the upper left set includes fewer data values ​​than each of the other sets (e.g., 3 instead of 4).

[0163] exist Fig.11 In the example shown, for entropy coding purposes, the rows in the block have the order A", E", C", G", B", D", F", H", and the columns in the block have the order 0, 4, 2, 6, 1, 3, 5, 7. Other examples may be similar to the order of rows and columns. Fig.11 Different sortings are shown. Fig.11 The example order shown does not exactly match the order in which the rows are processed by the spatial decorrelation module described above (e.g., row 6 is shown above rows 1 and 3). Each aligned 2×2 set of values ​​will be encoded together, except for the 2×2 set on the upper left, which only groups three values ​​and is encoded slightly differently. This example grouping is chosen so that: (a) the values ​​within the set belong to the same spatial frequency (if possible), and (b) the values ​​within the set are from pixels that are spatially nearby (if possible). This is done because they are more likely to be "similar" in size, and therefore the sets can be compressed more efficiently.

[0164] As mentioned above, the data values ​​are unsigned, with a distribution biased towards zero (due to color correlation and spatial decorrelation processes). Therefore, the data values ​​may have leading zeros. Therefore, the data values ​​can be compressed simply by removing one or more leading zeros from the data values ​​(if possible). The indication is used to indicate how many leading zeros have been removed.

[0165] The upper left set of four data values ​​is treated differently in the following respects: (a) the upper left pixel is used as a reference and stored separately, and (b) the remaining three values ​​have a different encoding scheme that has been "trained" for a large set of image data so that: (i) the total number of bits used to represent the three values ​​is a multiple of 4 for alignment purposes (which matches the 2×2 block), and (ii) the total storage cost (for the training image set) has been minimized. A particular set of data values ​​in the upper left of the block is processed at S1206. Specifically, at step S1208, an indication of the particular set is included in the size indication field 1304. For the corresponding set of data values ​​in block 1100, each indication in the size indication field has three bits. The 3-bit indication can be used as an index to a lookup table to obtain the number of bits for each data value in the particular set so that the number of bits for each value is sufficient to store the value. There are 16 sets of data values ​​in block 1100, so that the size indication field includes 48 bits (i.e., 3×16 bits) or 6 bytes. Fifteen sets of four data values ​​in a block will be encoded using a multiple of four bits (because, as described below, each encoded data value in the set of four data values ​​has the same number of bits), and on any given row, each of the fifteen sets contributes a multiple of two bits. In order to maintain convenient alignment of compressed data (because limiting the alignment of data can reduce hardware complexity), restrictions are applied to the available selections for the upper left set with only 3 elements. The upper left set has three data values, one of which (E0) is in row 0. In order to improve hardware efficiency, it is expected that the total data of a row is an even number of bits, so the possible length of the encoded data value that can be used to represent the data value is limited to an even number. Similarly, the combined lengths of the two encoded data values ​​for representing the other two data values ​​(A4 and E4) of the set are added to obtain an even value. In addition, in this example, the combined lengths of all encoded data values ​​in the encoded data output will be rounded up to the nearest byte (so that the encoded data output is aligned on the byte boundary), as well as all other sets of data values ​​in the block. Therefore, the total number of bits for the upper left set of encoded data values ​​is also a multiple of four.

[0166] Using a size indicator comprising three bits, eight sets of lengths can be set for the encoded data values. For example, Table 2 shows some possible lengths of the encoded data values, which can be represented by eight different size indicators for the top left block. The lengths shown in Table 2 are achieved by evaluating a very large set of images and selecting (from the very large set of possible combinations) the combination that results in the lowest total storage cost.

[0167]

[0168]

[0169] Table 2: Length of encoded data values ​​for the upper left set

[0170] The entropy coding module 206 selects the code with the smallest total length that can represent the {E0, A4, E4} triplet (losslessly) by removing leading zeros from the data value from the possible options (e.g., as shown in Table 2). In the case of a tie (e.g., if deciding between the size indications 011 and 100 in the example shown in Table 2), either code of the tie may be selected, but as an example, the code with the smallest numeric code (e.g., 011) may be selected.

[0171] In step S1210 , the encoded data value for the upper left set is included in the variable size field 1306 of the encoded data output 1300 (eg, at the beginning of the variable size field 1306 ).

[0172] The remaining (e.g., fifteen) sets of data values ​​in block 1100 are then processed. Block S1212 represents the Fig.11 The steps performed for each of the remaining 2×2 sets shown in FIG. 12 are as follows. Specifically, in step S1214, the number of bits (e.g., the minimum number of bits) used to represent the maximum value in the set of data values ​​is determined, and in step S1216, an indication of the determined number of bits is included in the size indication field 1304 of the encoded data output 1300 of the set. Step S1214 can be performed by finding which data value in the set has the minimum number of leading zeros and then identifying the minimum available encoding sufficient. Note that not all possible data lengths can be used for encoding. For example, as described in the example below, a data length of 7 bits is not available for encoding. Therefore, the determined number of bits can be the minimum "valid" number of bits that can be used to represent the maximum value of the received data values ​​in the set, where the number of bits is valid if it can be indicated by an indication to be included in the size indication field 1304. For example, there may be a predetermined set of valid numbers of bits that can be indicated by the indication (e.g., as listed in Table 3 below), and the minimum number of valid bits may be the minimum value of the valid numbers of bits sufficient to represent the maximum value of the received data values ​​in the set in the predetermined set. As described above, the predetermined set of effective digits may not include all possible minimum digits that can be used to represent the maximum value in the received data value in the set. The range of possible minimum digits is from 0 to n, where n is the number of digits in the data value received at the entropy coding module (e.g., n=8 in the example described herein). In other words, one or more possible minimum digits can be omitted from the predetermined set of effective digits. In the example described below, where n=8, the number 7 is omitted from the predetermined set of effective digits, so that the predetermined set of effective digits only includes the numbers 0, 1, 2, 3, 4, 5, 6, and 8.

[0173] When the number of bits to be used to represent each encoded data value in a set has been determined, some leading zeros can be removed from each of the data values ​​in the set (if appropriate) to determine the encoded data values ​​so that each of the encoded data values ​​in the set has the determined number of bits for the set.

[0174] In step S1218, the encoded data values ​​representing the data values ​​in the set are included in the variable size field (1306) of the encoded data output 1300. The order in which the encoded data values ​​are included in the variable size field 1306 is predetermined and corresponds to the order in which the indications were included in the size indication field 1304, so that when the encoded data values ​​are decoded, the position of the decoded data values ​​within the block is known.

[0175] For example, if the four data values ​​in the set are 00000011, 00000100, 00000001 and 00000000, then 00000100 is the maximum value in the set, and three is the minimum number of digits that can be used to represent the maximum value. In the example shown in Table 3, three is the number of significant digits, because each encoded data value for indicating the set has three bits of indication. Therefore, five leading zeros can be removed from each data value in the data value in the set. Therefore, the encoded data values ​​of the set are 011, 100, 001 and 000, and these encoded data values ​​are included in the variable size field 1306. An indication (e.g., 011) for indicating that three bits are used to represent each encoded data value in the set is included in the size indication field 1304. Different sets (e.g., 2×2 sets) may use different numbers of bits for their encoded data values, and each set has its own indication in the size indication field 1304 to indicate how many bits are used for the encoded data values ​​of that set in the variable size field 1306.

[0176] As an example, Table 3 shows how, for a 2×2 set, the indications may correspond to the number of bits.

[0177] Size Indicator The number of bits per encoded data value 000 0 001 1 010 2 011 3 100 4 101 5 110 6 111 8

[0178] Table 3: Indications representing different numbers of bits for a 2×2 set

[0179] Note that there is no indication that seven bits are used for each encoded data value. Therefore, in this example, if the maximum 8-bit value in the set has only one leading zero, the minimum number of significant bits that can be used to represent each encoded data value in the set is eight (rather than seven). This omission of seven in the predetermined set of effective lengths for encoded data values ​​is selected as a set of 8 choices by checking all possible choices for 3-digit numbers. Since there are 9 options (bit length 0 to 8), one option is omitted. After evaluating all possibilities for a large image test set (e.g., trial omitting 0, or 1, or 2...), it was confirmed that omitting "7" gave the best compression level. Note that the possibility of a data value having only one leading zero is small because the color decorrelation and spatial decorrelation processes cause the data values ​​to be biased towards zero.

[0180] It should be clear that the examples described herein involve 8-bit data values, but in other examples, the data values ​​may include a different number of bits (e.g., 6-bit data values), and those skilled in the art will be able to modify the disclosure provided herein to operate using these different number of bits.

[0181] For example, if each data value received from the spatial decorrelation module has n bits, and the minimum number of significant bits determined for a particular set of received data values ​​is m, where m≤n, then each data value of the received data values ​​in this particular set has at least (nm) leading zeros. In this case, each of the encoded data values ​​for this particular set contains the m least significant bits of the corresponding n-bit received data values ​​of this particular set. Referring to the same example as above, if the four n-bit data values ​​in the set (where n=8) are 00000011, 00000100, 00000001, and 00000000, then the minimum number of significant bits determined to represent the maximum value of the set is m=3. The data length of 3 bits for each encoded data value is a valid encoding in Table 3. Each data value has at least five leading zeros. Therefore, the m-bit encoded data values ​​of the set are 011, 100, 001, and 000.

[0182] Different sets within the block 1100 may be processed in parallel by the entropy coding module 206. For example, through parallel operations within the entropy coding module 206, indications for the different sets within the block 1100 may be determined and included in the size indication field 1304. However, because the encoded data values ​​may have variable lengths, they are included in the variable size field 1306 in a predetermined order.

[0183] When all the encoded data values ​​of the block have been included in the encoded data output 1300, then in step S1220, the encoded data output is output from the entropy coding module 206. The encoded data output representing the block of pixel values ​​is provided to the packing module 208 for each color channel, where they are packed together. For example, the packing module 208 puts the encoded data outputs of the blocks of data values ​​from different color channels into a data packet. In other words, multiple encoded data outputs are formed for corresponding multiple color channels associated with the same pixel, and multiple encoded data outputs for a group of pixels (e.g., 8×8 blocks) are packed together into a data packet for storage. The encoded data block can then be sent for storage in the memory 106, for example via the memory interface 114.

[0184] The header is stored with a set of encoded data blocks (e.g., data blocks representing an image or frame). For each encoded data block (e.g., each 8×8 block of encoded data values), a header indication is included in the header to indicate the size of the compressed data for the corresponding encoded data block. The header is stored separately from the encoded data values ​​(e.g., stored in a dedicated portion of the encoded data output), and due to its small size, most of the header data can remain resident in a cache within the GPU. The header allows the size of the encoded data block to be known before the encoded data block is retrieved from memory, so the encoded data block can be retrieved without retrieving irrelevant data. This is very useful for allowing random access to different parts of the encoded data. In general, any number of bits can be used in the header as a header indication for the corresponding encoded data block, but in the specific example described below, four bits are used for each header indication in the header indication.

[0185] Fig.14 A portion of coded data 1400 representing an image (or frame) in compressed form is shown. The coded data 1400 includes a header 1402 and n coded data blocks (14040 to 1404 n-1 ). The encoded data blocks are encoded according to the above techniques, so they have variable sizes. Each encoded block always starts at an address that is a multiple of the maximum allowed block size from the FB address. If the encoded data for a block is less than the maximum allowed block size, there are gaps in the address space between that encoded block and the next encoded block. These gaps are in Fig.14, which is shown with dashed lines in . This way, the encoded block starts at a predictable address (even if the size of the encoded data is variable), so there is no need to store a record of where the block is located in memory. The location of the block can be determined in the same way as for uncompressed data, and then a jump can be made to that address. Note that while this may not be the best use of memory space, this does allow for a reduction in memory bandwidth (i.e., the amount of data transferred to / from memory).

[0186] A 4-bit header indication for each coded data block 1404 is included in the header 1402. Using four bits for the header indication allows each header indication to indicate one of sixteen different options. According to the compression techniques described above, the maximum possible size for a coded data block representing 64 pixels (e.g., 8×8 blocks) is 256 bytes (i.e., 2048 bits), i.e., up to 32 bits per data value. The memory system that will store the coded data will have a minimum memory transfer granularity (e.g., 32 or 64 bytes), so there is little point in specifying the size of the compressed data too finely.

[0187]

[0188]

[0189] Table 4: Header Indication Explanation

[0190] Table 4 shows example interpretations of sixteen different header indications. In different examples, the header indications may be interpreted differently. Eight of the header indications (those header indications whose MSB is 1 in the example shown in Table 4) indicate that the corresponding data block is compressed data with eight corresponding different size ranges. One of the header indications (0111 in the example shown in Table 4) indicates that the corresponding data block is in original form, i.e., it is not entropy encoded, so that 256 bytes are used to represent 64 data values ​​in the block. In different examples, the "1111:225..256 bytes" indication is not included, but the data is stored in the original mode "0111". In the example shown in Table 4, four of the header indications (0000 to 0011) indicate that the entire corresponding block has a predetermined value for some common cases. In these cases, no additional data is stored for the block because all data values ​​in the block have predetermined values. The common colors selected in the example shown in Table 4 are transparent black, opaque black, opaque white, and clear colors. The clear color is a color that can be set (e.g., by an application submitting geometry to be rendered) to be used when clearing the rendering space. For rendering complex scenes in 3D games, it is relatively unlikely that the entire block has one of the predetermined colors, but in some cases (e.g., for rendering user interfaces), it is relatively likely that the entire block (e.g., an 8×8 pixel block) has one of the predetermined colors. When the present invention is used to compress other data (i.e., in addition to color data) (e.g., depth data, normal maps, or YUV data), different values ​​for the "predetermined constant" value can be used. There are three "other modes" in the example shown in Table 4, which allows other common situations to be efficiently encoded in an implementation-dependent manner. For example, these other modes can be used to define additional predetermined colors (e.g., which can be driver-defined or hardwired), or to define a multi-sampling anti-aliasing (MSAA) mode, for example, as 2×MSAA, 4×MSAA, or 8×MSAA.

[0191] The data for an image is stored in memory (e.g., a frame buffer) with pointers to addresses in memory (in Fig.14 The encoded data moves forward through the address space of the frame buffer starting from this starting address. Fig.14In the example shown, the header is stored to run backwards from the same address (as indicated by the FB address pointer). In other words, the header is stored in reverse bit order starting from the FB address. This means that a single address pointer can be used to access the header and access the encoded data. Using a single pointer instead of two pointers (one for the encoded data and one for the header), or a pointer and an offset value, reduces the amount of data that needs to be maintained or transmitted throughout the GPU. In order to read a specific encoded data block from the encoded data 1400 (for example, to read block '2' of the encoded data 14042), the header indication for block 2 is read by calculating the address of the memory location containing the corresponding header indication, noting that this requires subtraction relative to the FB address. The starting address of the encoded data is determined by multiplying the block number by the size of the uncompressed block and adding it to the FB address, and the amount of data to be read is determined by interpreting the header indication.

[0192] In an alternative example that can further reduce bandwidth usage but still maintain a level of random access, the coded data is grouped and packed into multiple sets of N, for example N=4. In order to access a block in the range [N*k, N*k+N-1], such as N*k+j, the address of block N*k will be calculated as described above. In order to determine where the data of block N*k+j is located, the header indicators of N*k to N*k+j-1 will be interpreted to find the length of the previous block in the group and therefore the offset to the location of block N*k+j. As previously described, the data length for the coded block N*k+j is encoded in the header for N*k+j.

[0193] Fig.15a A data packet is shown including encoded data values ​​for a data block, where the data packet is entropy encoded (i.e., a header indication in a header 1402 for the block indicates that the data is in compressed form). The data packet includes encoded data values ​​(15020 to 15023) for four channels (C0 to C3) of the data block. In some examples, the data block corresponds to 64 pixels, for example, arranged in an 8×8 block, and the four channels are R, G, B, and A. Each portion of the encoded data for a corresponding channel 1502 includes 8 to 512 bits, depending on the result of the entropy encoding as described above. The data packet includes a channel packing mode portion 1504. Fig.15bThe mode portion 1504 is shown to include 8 bits: 2 bits for each of the four channels (15060 to 15063) to indicate the mode used to represent the data of the corresponding channel in the corresponding data portion 1502. Using two bits for each channel allows four different modes to be used for the channel data, and different channels can use different modes, i.e., they are compressed independently, in order to achieve greater compression. For example, the four modes can be: (i) constant, (ii) reserved, (iii) entropy coded, and (iv) original data. If the mode indication 1506 of the channel x Indicates constant mode, then the corresponding data is 1502 x There is a single data value (eg, an 8-bit data value) that represents the value of all data values ​​in a block of channels, ie, the channel data value is constant for the block. Fig.15c It is shown that data 1502 may include an 8-bit constant value ( Fig.15c ). The reserved mode may be used for implementation-dependent purposes. Two example uses of the reserved mode are given: (i) different entropy coding modes may be used, where different numbers of bits (e.g., 2 bits) are used for each size indication so that different numbers of coded bits can be efficiently encoded, and (ii) palette coding modes, where the encoded data values ​​are selected from a set of known (e.g., predetermined) values ​​(or "palette"). If the mode indication 1506 of the channel x Indicates the entropy coding mode, then the corresponding data 1502 is coded according to the above entropy coding process x to encode. Fig.15c It is shown that data 1502 may include variable length data ( Fig.15c ). Fig.15c The middle line of Figure 1 The upper limit (448 bits) is selected so that: (a) the total maximum length of the entropy coding channel (504 bits) is strictly less than the "original mode" (512 bits), and (b) the total length is aligned at a convenient 8-bit boundary. If different alignments are to be considered, alternative maximum lengths may be selected in different embodiments.

[0194] Fig.16 A data packet including data values ​​of a data block is shown, wherein the data packet includes raw data (i.e., a header indication in the header 1402 for the block indicates that the data is raw data). In the above example, the raw data is spatially decorrelated data. The data packet includes raw data values ​​(16020 to 16023) for four channels (C0 to C3) of the data block. Note that in Fig.16In the example shown, the top byte of the fourth channel is stored in the least significant 8 bits of the data packet (1604), that is, where the mode indication 1504 is stored in the entropy encoded data packet shown in Figure 15. This means that the other channel data in the data packet is in the same position as it is in the entropy encoded data packet. This can allow a lower cost encoder to operate sequentially on each channel before determining whether the block being compressed needs to be written in compressed or original mode, which can avoid having to retain all compressed data and original versions. Note that in some other examples, the top byte of the C3 original data can be stored at the most significant end of the data packet.

[0195] When encoding data blocks of different sizes / shapes (e.g., not 8×8 blocks) and / or when using different numbers of bits (e.g., not 8 bits) to represent each data value, the same Figures 14 to 16 The data structure shown is similar to the data structure.

[0196] The compression process is described above. The decompression process for decompressing data that has been compressed using the above techniques will now be described. Figure 4 and Figure 5 A high level description is given of how compressed data is decompressed.More details are now provided on how the unpacking module 408, entropy decoding module 406 and spatial re-correlation module 404 operate.

[0197] The header 1402 of the compressed data is read to determine the format of the data. If the data is in constant or raw format, decoding is simple because the data has a known length and a predetermined interpretation. However, if the data packet is in an entropy compressed format (as indicated by the header indication in the header 1402), the data in the data packet has a variable length. In order to unpack the compressed data packet into the appropriate channels (e.g., RGBA), the unpacking module 408 determines the length of each channel based on the indication 1506 in the channel packing mode field 1504, and if the channel data is in entropy encoded form, the unpacking module 408 determines the length of each channel based on the size indication 1304. The sizes of the constant and raw modes in the channel data portion 1502 are a negligible 1 byte and 64 bytes, respectively.

[0198] To determine the size of the entropy encoded channel data portion 1502, the channel size indication 1304 is decoded. The size indication may be decoded in parallel. The number of bits in a channel may be determined in a single clock cycle. Fig.17 The unpacking module 408 includes a length decoding unit (17020 to 1702 15), each length decoding unit is arranged to receive a corresponding size indication from a size indication field 1304 for channel data. In the above example, each size indication is 3 bits and indicates the number of bits forming the encoded data value for a set (e.g., a 2×2 set of encoded data values), for example, according to Table 3 given above. The sizes of the data values ​​for different sets are passed to an adder 1704, which sums the sizes to determine the total size of the encoded data for the channel. The size is output from the adder 1704. In addition, in some examples, each possible length has been restricted to a multiple of 4 bits, which achieves additional savings in the adder logic. Since the length decoding units 1702 can operate in parallel, the size of the encoded data for the channel can be quickly determined. When the size of the encoded data for the channel in the data packet has been determined, the different channel data portions from the data packet are provided to the corresponding entropy decoding module 406.

[0199] refer to Fig.18 The operation of each entropy decoding module 406 is described by the flowchart shown in FIG. 18. In step S1802, a data block for a particular channel is received at the entropy decoding module 406. If the data value is in an original format, the data value bypasses the entropy decoding process, and the original data value is output from the entropy decoding module 406 to the corresponding reversed spatial decorrelation module 404. If the data value is in a constant format, a constant value for the data value block is passed from the entropy decoding module 406 to the corresponding spatial re-correlation module 404 to define the A0" coefficient, and a zero data value is sent for all other cases. Alternatively, the constant is copied to all values, and the spatial decorrelation step is bypassed. However, if the received data value is entropy encoded (such as Fig.15b The entropy decoding module 406 performs entropy decoding on the received data value, as shown below with reference to Fig.18 The steps are described as shown in the flowchart.

[0200] In step S1804, the entropy decoding module 406 reads the indication 1304 in the encoded data input to identify the number of bits that form each of the encoded data values. In the above example, each size indication is 3 bits and indicates the number of bits that form the encoded data values ​​for the set (e.g., a 2×2 set of encoded data values), for example, according to Table 3 given above. Then, in step S1806, the entropy decoding module 406 parses the encoded data values ​​in the variable length field 1306 of the encoded data input based on the identified number of bits, thereby interpreting the encoded data values. In step S1808, the entropy decoding module 406 determines the decoded data values ​​by selectively prepending leading zeros to the interpreted encoded data values, for example, so that each decoded data value has n bits (where n can be, for example, 8). For example, if the encoded data value has m bits, (nm) zeros are prepended to the encoded data value.

[0201] For example, if the size indication for the first 2×2 set of encoded data values ​​indicates that each encoded data value of the set has three bits (i.e., m=3), and the encoded data in the variable length field 1306 starts with bits 011100001000, the encoded data values ​​are parsed (step S1806) to determine the four encoded data values ​​of the set as 011, 100, 001, and 000. In this example, the decoded data values ​​have eight bits (i.e., n=8), so five zeros (nm=5) are prepended to each encoded data value, so that the decoded data values ​​are 00000011, 00000100, 00000001, and 00000000.

[0202] Note that the reference value is output from the entropy decoding module without changing the reference value, for example, to represent the value at the upper left of the block.

[0203] In step S1810, the decoded data values ​​are output from the entropy decoding module 406. For each channel, the output decoded data values ​​are provided to the corresponding spatial re-correlation module 404. The spatial re-correlation module 404 performs the above Figures 6 to 10 Describes the reversal of spatial decorrelation. Fig.19 and Fig. 20 Details of an example of the operation of the spatial re-correlation module 404 are described.

[0204] Fig.19A spatial re-correlation module 404 is shown that includes eight processing pipelines 19021-19028. Each processing pipeline 1902 includes an unmapping stage 1903, a first re-correlation stage 1904, and a second re-correlation stage 1906. At each iteration (e.g., each clock cycle) each processing pipeline 1902 receives one of the entropy decoded data values ​​from a row of data values ​​of a block (e.g., an 8×8 block of data to be spatially re-correlated). For the purposes of the spatial re-correlation module, the entropy decoded data values ​​are considered to be spatially decorrelated data values, on which spatial re-correlation will be applied to determine spatially re-correlated data values.

[0205] The unmapping stage 1903 of each pipeline 1902 includes an unmapping unit 1907 that applies the inverse of the remapping process applied during data compression by the remapping unit 618 of the spatial decorrelation module 204. For example, if the above-described remapping process (as summarized in Table 1) is used, the unmapping process may involve the following process:

[0206] - If the least significant bit of the remapped data value is zero, the mapping process is canceled

[0207] Involves removing the least significant bit (which is zero) and prepending zeros to the remaining bits of the data value.

[0208] For example, 00101010 will be unmapped to become 00010101, and 10001000

[0209] will be unmapped to become 01000100.

[0210] - If the least significant bit of the data value is 1 (thus the unmapped data value represents a negative

[0211] ), the unmapping process involves removing the least significant bit (which is 1), inverting the remaining

[0212] The bits are then prepended with 1. For example, 11010101 will be unmapped to become

[0213] is 10010101, and 01110111 will be remapped to become 11000100.

[0214] The unmapping process described herein is very easy to implement, for example, using hardware simply by reordering some bits (e.g., moving the LSB to the MSB position), and optionally, by inverting (e.g., using an XOR operation) other bits if the LSB is 1. The unmapped values ​​(A" to H") for a row of data values ​​are passed to the first re-correlation stage 1904.

[0215] Each first re-correlation stage 1904 includes a processing unit 1908 and a storage 1910 to perform spatial re-correlation in a vertical dimension (e.g., in columns). Each second stage 1906 includes a processing unit 1912 to perform spatial re-correlation in a horizontal dimension (e.g., in rows). Figure 6 In contrast to the illustrated encoding pipeline 604, there is a dependency chain in the second stages 1906 of the decoding pipeline 1902, whereby the second stages 1906 of some pipelines 1902 use the results of the second stages 1906 of other pipelines 1902, as described in more detail below.

[0216] Fig. 20 The operation of the first re-correlation stage 1904 of one of the processing pipelines 1902 is shown over eight iterations to output first coefficients for an incoming spatially decorrelated, unmapped 8×8 block of data values ​​to a corresponding second re-correlation stage 1906. The first re-correlation stage 1904 of the spatial decorrelation module 404 performs the inverse of the operation performed by the second stage 608 of the corresponding spatial decorrelation module 204. The rows of the spatially decorrelated, unmapped block of data values ​​are input to the parallel processing pipeline 1902 in an order such that after the first of the rows is received by the first re-correlation stage 1904 and stored in the register 1910, the first coefficient of each subsequent row of the block received at the first re-correlation stage 1904 can be determined based on the stored first coefficient in the register 1910. For example, as described in more detail below, the rows of the spatially decorrelated, unmapped 8×8 block of data values ​​may be provided to the processing pipeline 1902 in the following order: row 0, row 4, row 2, row 1, row 3, row 6, row 5, and then row 7. Similar to what is described above with reference to spatial decorrelation, the order in which the rows are processed for spatial re-correlation may vary in different examples, but preferably satisfies Fig.10 Dependency tree shown. To give some other examples, the order in which rows are processed for spatial re-correlation may be 0, 4, 2, 3, 1, 6, 7, 5; or 0, 4, 6, 5, 7, 2, 1, 3; or 0, 4, 6, 7, 5, 2, 3, 1.

[0217] It can be seen that the processing unit 1908 Fig. 20 1902 has three inputs labeled "input," "left," and "right," whereby spatially decorrelated, demapped data values ​​are received on input lines, and the left and right inputs are coupled to the output of register 1910. In a first clock cycle (clock cycle C0), the first stage 1904 of pipeline 1902 receives the spatially decorrelated, demapped data values ​​of row 0 (the spatially decorrelated, demapped data values ​​input to the first re-correlation stage 1904 are received at Fig. 200” in the figure), and outputs the first coefficient of row 0 (the value output from the first re-correlation stage 1904 is in Fig. 20 0'), where storage unit 1910 stores the first coefficient of row 0 (ie, after clock cycle C0, register 1910 stores the first coefficient of row 0, denoted as 0').

[0218] In the second clock cycle (clock cycle C1), the first stage 1904 of the pipeline 1902 receives the spatially decorrelated, demapped data value of row 4 (the spatially decorrelated, demapped data value input to the first stage 1904 is 4") and outputs the first coefficient of row 4 (the value output from the first re-correlation stage 1904 is 4'). That is, the processing unit 1908 receives 4" on the input line and receives 0' on the left input and the right input, so that the first coefficient of row 4 (labeled as 4') is determined by the processing unit 1908 based on the received spatially decorrelated, demapped data value of row 4 (labeled as 4") and the stored first coefficient of row 0 (labeled as 0', obtained from the register 1910). As described above, in the spatial decorrelation, the spatially decorrelated value of row 4 is determined as

[0219] 4″=4′-0′mod 2 8 ,

[0220] So rearranging the equation gives:

[0221] 4′=4″+0′mod 2 8 .

[0222] Processing unit 1908 uses the equation to determine a value labeled 4' based on the input value of 4" and the stored first coefficient 0'. After clock cycle C1, the storage unit stores the first coefficients of row 0 and row 4 (labeled 0' and 4').

[0223] In the third clock cycle (clock cycle C2), the first stage 1904 of the pipeline 1902 receives the spatially decorrelated, demapped data value for row 2 (the value input to the first stage 1904 is 2") and outputs the first coefficient for row 2 (the value output from the first stage 1904 is 2'). That is, the processing unit 1908 receives 2" on the input line, and receives 0' on the left input, and receives 4' on the right input, so that the first coefficient for row 2 (labeled 2') is determined by the processing unit 1908 based on the received spatially decorrelated, demapped data value for row 2 (labeled 2") and the stored first coefficients for rows 0 and 4 (labeled 0' and 4', obtained from register 1910). It will be clear that the value 2' is determined according to equation 2 ′ =2″+LPredict(0′ ,4′)mod 2 8 to determine. After clock cycle C2, register 1910 stores the first coefficients of rows 0, 4, and 2, labeled 0', 4', and 2'). Note that the "left" and "right" assignments can be swapped, as the result of the "processing unit" operation will not be affected. However, from a "power" perspective in semiconductor implementation, it is preferred that the values ​​change as little as possible from one clock cycle to another. For example, in clock cycles C2 and C3, the LR assignments are (0', 4') and (0', 2'), respectively, and although modifying the assignment for clock cycle C3 to (2', 0') will produce exactly the same result, more energy may be consumed due to the greater number of voltage swings in the logic when the 0' input switches from the left input to the right input.

[0224] It will be clear that in the fourth clock cycle (clock cycle C3), the first stage 1904 of the pipeline 1902 receives the spatially decorrelated, unmapped data values ​​for row 1 (designated 1") and outputs the first coefficient for row 1 (designated 1'). That is, the processing unit 1908 receives 1" on the input line, and receives 0' on the left input, and receives 2' on the right input. The value 1' is calculated according to the equation 1'=1"+LPredict(0',2') mod 2 8 After clock cycle C3, register 1910 stores the first coefficients of row 4 and row 2 (labeled 4' and 2'). The first coefficient of row 0 (labeled 0') can be discarded because it is not needed for subsequent rows, but it may be simpler to keep 0' in register 1910 until it is overwritten.

[0225] It will be clear that in the fifth clock cycle (clock cycle C4), the first stage 1904 of the pipeline 1902 receives the spatially decorrelated, unmapped data values ​​for row 3 (designated 3") and outputs the first coefficient for row 3 (designated 3'). That is, the processing unit 1908 receives 3" on the input line, 4' on the left input, and 2' on the right input. The value 3' is calculated according to the equation 3'=3"+LPredict(4',2') mod 2 8 After clock cycle C4, register 1910 stores the first coefficient of row 4 (labeled 4'). The first coefficient of row 2 (labeled 2') can be discarded because it is not needed for subsequent rows, but it may be simpler to keep 2' in register 1910 until it is overwritten.

[0226] The operation of the first stage 1904 during the sixth, seventh and eighth clock cycles is Fig.19It will be apparent from the above that the same principles as described above for the first five clock cycles will be followed, and so for the sake of brevity we will not explain the operations in these clock cycles in detail here. Note that the storage unit 1910 of each of the first stages 1904 of the processing pipeline 1902 is configured to store up to three first coefficients, and this is sufficient for processing all rows in the first stage 1904 due to the order in which the rows are input to the spatial re-correlation module 404. As noted above, in general, each of the registers 1910 will have the capacity to store up to log2(r) first coefficients at any given time, where r is the number of rows in the block of spatially decorrelated data values.

[0227] Therefore, in each iteration, the first coefficient of a row (in Fig.19 The spatial decorrelation modules 404 (labeled A′ to H′) are provided to the corresponding second re-correlation stage 1906 of the processing pipeline 1902. The second stage 1906 of the spatial re-correlation module 404 performs the inverse of the operations performed by the corresponding first stage 606 of the spatial decorrelation module 204.

[0228] As described above, in the spatial decorrelation, the data values ​​of column A are the same as the first coefficient for column A, i.e., A' = A. Therefore, in the corresponding spatial recorrelation, the first coefficient for column A received at the second stage 1906 of the processing pipeline 19028 is not changed at the output of the second stage 1906, i.e., A = A'.

[0229] However, as described above, in spatial decorrelation, for column E, by the equation E′=EA mod 2 8 To give the first coefficient E', the equation can be written as to more clearly show the operation of the mod function. Since A = A', we can arrange this equation to give Therefore, processing unit 1912 in processing pipeline 19027 uses inputs A' and E' to output spatially decorrelated data values ​​for column E according to this equation.

[0230] Furthermore, as described above, in the spatial decorrelation, for column G, by the equation: to give the first coefficient G'. This equation can be rearranged to give Thus, processing unit 1912 in processing pipeline 19026 outputs spatially decorrelated data values ​​for column G according to this equation using inputs E and G', where the value of E is provided from the output of processing unit 1912 of processing pipeline 19027. In other embodiments, the calculation of E may be repeated in processing unit 1912 of processing pipeline 19026 (as well as in processing pipeline 19027) (or aggregated into a single evaluation, such as Thus, processing pipeline 19026 is not dependent on the output of processing pipeline 19027. In these other embodiments, processing unit 1912 of processing pipeline 19026 may receive the A and E' values ​​as inputs as well as the G' value.

[0231] Furthermore, as described above, in the spatial decorrelation, for column C, by the equation: to give the first coefficient C'. Using the definition of LPredict given above, this equation can be rearranged to give:

[0232]

[0233] Thus, processing unit 1912 in processing pipeline 19025 outputs spatially decorrelated data values ​​for column C according to this equation using inputs A, C', and E, where the value of A is provided from the output of first stage 1904 of processing pipeline 19028, and the value of E is provided from the output of processing unit 1912 in processing pipeline 19027. In other embodiments, the computation of E may be repeated (or aggregated into a single evaluation for computing C) in processing unit 1912 of processing pipeline 19025 (as well as in processing pipeline 19027) so that processing pipeline 19025 is not dependent on the output of processing pipeline 19027, in which case processing unit 1912 of processing pipeline 19025 may receive the value of E' as input along with the A and C' values.

[0234] Furthermore, as described above, in the spatial decorrelation, for column B, by the equation: to give the first coefficient B'. This equation can be rearranged to give:

[0235]

[0236] Thus, processing unit 1912 in processing pipeline 19021 outputs spatially decorrelated data values ​​for column B according to this equation using inputs A, B', and C. The value of A is provided from the output of first stage 1904 of processing pipeline 19028, and the value of C is provided from the output of processing unit 1912 in processing pipeline 19025. In other embodiments, the computation of C may be repeated (or aggregated into a single evaluation for computing B) in processing unit 1912 of processing pipeline 19021 (as well as in processing pipeline 19025) so that processing pipeline 19021 is not dependent on the output of processing pipeline 19025, in which case processing unit 1912 of processing pipeline 19021 may receive C' and E' values ​​as inputs along with the A and B' values.

[0237] Furthermore, as described above, in the spatial decorrelation, for column D, by the equation: to give the first coefficient D'. This equation can be rearranged to give:

[0238]

[0239] Thus, processing unit 1912 in processing pipeline 19022 outputs spatially decorrelated data values ​​for column D according to this equation using inputs C, D', and E. The value of C is provided from the output of processing unit 1912 in processing pipeline 19025, and the value of E is provided from the output of processing unit 1912 of processing pipeline 19027. In other embodiments, the computation of C may be repeated (or aggregated into a single evaluation for computing D) in processing unit 1912 of processing pipeline 19022 (as well as in processing pipeline 19025) so that processing pipeline 19022 is not dependent on the output of processing pipeline 19025. Furthermore, in these other embodiments, the computation of E may be repeated in processing unit 1912 of processing pipeline 19022 (as well as in processing pipeline 19027) so that processing pipeline 19022 is not dependent on the output of processing pipeline 19027. In these other embodiments, processing unit 1912 of processing pipeline 19022 may receive A', C', and E' values ​​as inputs along with the D' value.

[0240] Furthermore, as described above, in the spatial decorrelation, for column F, by the equation: to give the first coefficient F'. This equation can be rearranged to give:

[0241]

[0242] Thus, processing unit 1912 in processing pipeline 19023 outputs spatially decorrelated data values ​​for column F according to this equation using inputs E, F', and G. The value of E is provided from the output of processing unit 1912 in processing pipeline 19027, and the value of G is provided from the output of processing unit 1912 in processing pipeline 19026. In other embodiments, the computation of E may be repeated (or aggregated into a single evaluation for computing F) in processing unit 1912 of processing pipeline 19023 (as well as in processing pipeline 19027), such that processing pipeline 19023 is not dependent on the output of processing pipeline 19027. Furthermore, in these other embodiments, the computation of G may be repeated in processing unit 1912 of processing pipeline 19023 (as well as in processing pipeline 19026), such that processing pipeline 19023 is not dependent on the output of processing pipeline 19026. In these other embodiments, processing unit 1912 of processing pipeline 19023 may receive the A, E', and G' values ​​as inputs as well as the F' value.

[0243] Furthermore, as described above, in the spatial decorrelation, for column H, by the equation: to give the first coefficient H'. This equation can be rearranged to give: Thus, processing unit 1912 in processing pipeline 19024 outputs spatially decorrelated data values ​​for column H according to this equation using inputs G and H', where the value of G is provided from the output of processing unit 1912 in processing pipeline 19026. In other embodiments, the computation of G may be repeated (or aggregated into a single evaluation for computing H) in processing unit 1912 of processing pipeline 19024 (as well as in processing pipeline 19026) so that processing pipeline 19024 is not dependent on the output of processing pipeline 19026. In these other embodiments, processing unit 1912 of processing pipeline 19024 may receive A and E' values ​​as inputs as well as the H' value.

[0244] In this manner, the spatial re-correlation module 404 can determine a row of spatially re-correlated data values ​​at each iteration of a plurality of iterations (eg, clock cycles). For example, data values ​​for an 8×8 block can be determined in eight iterations.

[0245] As described above, in some examples, color re-correlation is then performed by the color re-correlation module 402 on the data values ​​of the R, G and B channels output from the spatial re-correlation module 404 to obtain decompressed data values. Note that some other examples do not have a color re-correlation stage or bypass it.

[0246] The above description is primarily directed to encoding and decoding 8×8 blocks of pixel values, where the pixel values ​​each have 32 bits and are in ARGB 8:8:8:8 format, such that they include 8-bit data values ​​for each of the four channels (Alpha, Red, Green, and Blue). As described in more detail below, in other embodiments, the data values ​​may have different formats.

[0247] Multi-sampling anti-aliasing

[0248] Multi-sampling anti-aliasing (MSAA) is a technique that can be used, for example, to improve image quality by reducing aliasing artifacts. The scene is supersampled so that for each pixel, more than one sample is rendered, and the resulting rendered samples can be downsampled to generate pixels to be displayed on the display. There are different MSAA modes, and MSAA modes can involve sampling different numbers of samples per pixel, for example, 2 or 4 samples per pixel are common MSAA modes. For example, the first sample position of each pixel can be encoded and decoded as a reference image as described above, but the other sample positions of each pixel can be processed as a "MSAA delta image", where the data values ​​of the MSAAdelta image are given as delta values ​​(i.e., difference values) compared to the corresponding values ​​of the reference image. In other words, the data values ​​represent MSAA differential data values. Typically, the differences between different MSAA samples within the same pixel will be small in magnitude. Therefore, no spatial decorrelation (and corresponding spatial re-correlation) processing is performed on the data values ​​of the MSAA delta image. However, the remapping and unmapping process is still performed so that the data values ​​are in an unsigned format with a distribution biased towards zero (because this improves the efficiency of the entropy coding stage).

[0249] Entropy encoding of the reference image is performed as described above. However, for MSAA delta images, the entropy encoding is slightly different because the magnitude of all data values ​​(including the top left data value of the block) is small. Fig.21 An 8×8 block of data from an MSAA delta image is shown. Since spatial decorrelation has not yet been performed on the data values, the rows are ordered A, B, C, D, E, F, G, H, and the columns are ordered 0, 1, 2, 3, 4, 5, 6, 7. The top left 2×2 set of the block can be encoded in the same manner as the other sets in the block. Since no reference values ​​are stored for the data block from an MSAA delta image, extra data bytes can be used for the encoded data values ​​in the data for the channel. For example, the reference Fig.13, the reference value field 1302 is not used for blocks of MSAA delta images, and the variable length field 1306 can have data between 1 and 57 bytes. MSAA delta images still use 48 bits for size indication (1304), i.e., 3 bits for each 2×2 set of data values ​​to indicate the size of the encoded data values ​​in the set.

[0250] In some systems, if all differential data values ​​in a block of the MSAA delta image are zero (i.e., if the set of sample positions is the same as the reference set of sample positions for the pixel block), an indicator may be set to indicate this (e.g., a transparent black flag is set). This will reduce the amount of data used to represent this situation, which is not uncommon.

[0251] From the above description, the decoding of the data values ​​of the MSAA delta image should be clear. Taking into account the fact that the coded data value block does not include the reference value, so that the upper left set includes 4 coded data values, the entropy decoding occurs in the same way. The data values ​​of the reference image are spatially re-correlated, but the data values ​​of the MSAA delta image are not spatially re-correlated (because they were not spatially decorrelated during compression).

[0252] 10-bit data value

[0253] In some embodiments, each data value has 10 bits (rather than 8 bits as in the above example). However, the above system can be used to compress / decompress 10-bit data values ​​without substantially modifying the entropy encoding / decoding or spatial decorrelation / recorrelation processes. The unpacking process can be modified to correctly process 10-bit values ​​using hardware designed to process 8-bit values.

[0254] For example, a YUV video format may use 10-bit data values ​​for each of the three channels (Y, U, and V channels). Thus, in this example, a pixel is represented by 30 bits in the YUV 10:10:10 format. YUV is given only as an example format, but there are other formats that use 10-bit data values. The above system is arranged to process 8-bit data values ​​for four channels of each pixel. The three 10-bit data values ​​may be reformatted into four 8-bit channels. When processing YUV data, the color decorrelation and color recorrelation blocks may be omitted or bypassed and may be replaced / supplemented by a processing block that performs reformatting of data values ​​from three input channels to four output channels, and vice versa. Fig. 22An example is shown in which three 10-bit data values ​​for YUV channels are reformatted into four channels that can be considered as RGBA channels using the above system. The eight most significant bits of the data value of the first input channel (e.g., labeled Y9 to Y2) are placed in the first output channel (e.g., R), the eight most significant bits of the data value of the second input channel (e.g., labeled U9 to U2) are placed in the second output channel (e.g., G), the eight most significant bits of the data value of the third input channel (e.g., labeled V9 to V2) are placed in the third output channel (e.g., R), and at least two least significant bits of the data value from each input channel are placed in the fourth output channel (e.g., A). Therefore, the fourth output channel includes six of the input bits. The six-bit data value of the fourth channel can be constructed by interleaving the two least significant bits from each of the three input channels (e.g., labeled Y1, U1, V1, Y0, U0, V0). There is usually a higher degree of spatial correlation between the most significant bits of adjacent pixel values ​​than between the least significant bits of adjacent pixel values. Thus, by keeping the most significant bits within the same channel data (e.g., the eight most significant bits of three input channels form three corresponding channel data values), there may be a high degree of spatial correlation in these data values. This results in greater compression than if the least significant bits were kept within the same channel data. A fourth output channel comprising the least significant bits of the input channels (Y1, U1, V1, Y0, U0, V0) may show less spatial correlation than the other output channels.

[0255] The first three 8-bit channels can be processed as described above. However, since the fourth channel only includes 6 bits of data, the processing is slightly different. The processing block that reformats the data can add (i.e., append) two zero bits to the least significant end of the data in another output channel to pad the data to up to eight bits so that it can be processed using the above-mentioned system designed to operate on 8-bit data values. Adding padding bits to the least significant portion of the data means that each (now 8-bit) value is a multiple of 4. Each data value is formed by the bits Y1U1V1Y0U0V000. In addition, adding padding bits means that the data values ​​are distributed in the range of 0 to 255, for example, as Fig.23a Since each representable data value is a multiple of 4, the representable data values ​​are distributed over the range 0 to 255. This is useful because the spatial decorrelation and spatial recorrelation functions described above involve the function mod 2 8 , which takes values ​​modulo 256. By padding up the 6-bit data values ​​so that they are distributed in the range of 0 to 255, the modulus function designed to operate on 8-bit values ​​(which can be set in the hardware functions of the spatial decorrelation and spatial recorrelation functions) does not need to be modified.

[0256] Note that if padding bits are added to the most significant part of a 6-bit data value, the 8-bit data value will be restricted to the range of 0 to 63 (i.e., from 0 to 2 6 ), as shown in Figure 23b . Taking the modulo 256 of these values will not provide good compression.

[0257] When performing spatial decorrelation on a 6-bit data value, modify LPredict (as defined in Equation 3 above) such that the two least significant bits of the resulting value remain zero. Note that since all 6-bit data values are multiples of 4, the result of the LPredict function is even, making the least significant bit (i.e., "bit 0") of the resulting value zero. In other words, twice the average of four is even. However, the second least significant bit ("bit 1") can be 1 or 0 in the result of the LPredict function defined above, so the modification is made such that bit 1 is zero. This can be achieved simply by forcing the "first bit" of the output to be zero. Alternatively, this can be achieved by shifting the input and output of the "ceiling" operator in the LPredict function. Then, this modification ensures that the resulting coefficient values from LPredict and the Haar function also have their two least significant bits zero. After the decorrelation process, the spatial decorrelation module can perform a 2-bit signed right shift before the "remapping" stage 609 to reduce the range of the values to further improve compression in the entropy encoding stage. For example, if the spatially decorrelated data value has bits X5X4X3X2X1X000, performing a 2-bit signed right shift produces X5X5X5X4X3X2X1X0. This shift converts data values that are multiples of 4 in the range from 0 to 255, as shown in Fig.23a , to integer values in the range from -32 (which is equivalent to the unsigned value 224 using the modulo 256 arithmetic described herein) to +31, as shown in Fig.23c . Data values in this format are very suitable for the above-mentioned remapping stage 609 to produce values that will be effectively compressed by the above entropy encoding process.

[0258] In the above example, a spatial decorrelation module and an entropy encoding module arranged to handle 8-bit data values are used to compress 6-bit data values. More generally, a method (and data compression unit) can be provided for compressing m-bit data values using a spatial decorrelation module arranged to handle n-bit data values and an entropy encoding module arranged to handle n-bit data values, where m < n. This general method includes:

[0259] a. Appending (n - m) bits to the least significant end of the m-bit data value to form an n-bit data value;

[0260] b. Performing a spatial decorrelation process on the n-bit data value using the spatial decorrelation module, which involves using modulo 2n a function; and

[0261] c. After said spatial decorrelation, perform entropy encoding on the data value using an entropy encoding module. A processing block may be provided that is configured to append (n - m) bits to the least significant end of an m-bit data value.

[0262] According to this method, modulo-2 n the function operates correctly to provide good spatial decorrelation even if the input data value has only m bits, where m < n.

[0263] For example, the (n - m) bits appended to the least significant end of the m-bit data value may be (n - m) zeros.

[0264] The general method may also include remapping the data value after said spatial decorrelation but before said entropy encoding, where entropy encoding is performed on the remapped data value. The general method may also include performing a signed right shift of (n - m) bits on the spatially decorrelated data value before the above-mentioned remapping. The signed right shift provides the data value to the remapping stage, which may be remapped in the same way as an n-bit data value (note that the compression unit is arranged to compress an n-bit data value) to provide a value that can be effectively encoded by the entropy encoding module. Specifically, as described above, the remapping may be configured according to the spatial decorrelation process performed by the spatial decorrelation module such that the probability of the remapped data value having a particular magnitude is reduced for larger magnitudes. In the example described herein, the remapped data value is in unsigned integer format and is unsigned, having a zero-biased distribution.

[0265] In addition, the spatial decorrelation module may be configured such that the (n - m) least significant bits of the spatially decorrelated data value are zero. Thus, a signed right shift of (n - m) bits will lose zeros rather than ones.

[0266] A corresponding decompression process may be applied to decompress the compressed data value to determine an m-bit decompressed data value using hardware designed to operate on an n-bit data value (e.g., where m = 6 and / or n = 8). Specifically, a method (and data decompression unit) for decompressing a compressed data value to determine an m-bit decompressed data value is provided, where the method includes:

[0267] a. Performing entropy decoding on the entropy-encoded data value at an entropy decoding module, the entropy decoding module being arranged to generate an n-bit entropy-decoded data value, where m < n; and

[0268] b. At a spatial re-correlation module, performing spatial re-correlation on the n-bit data value after said entropy decoding, which involves using modulo-2 n the function;

[0269] c. Wherein the m-bit decompressed data value is represented by the m most significant bits of the n-bit spatially recorrelated data value.

[0270] The method may further comprise removing (nm) bits from the least significant end of the n-bit spatially recorrelated data value, thereby forming an m-bit decompressed data value. This may be accomplished by replacing the processing block described above with the colour recorrelation block.

[0271] The spatial re-correlation module may be configured to apply an unmapping process to the n-bit data values ​​prior to performing the spatial re-correlation. In addition, the spatial re-correlation module may be configured to apply a (nm)-bit left shift to the unmapped data values ​​prior to the spatial re-correlation. The (nm) least significant bits of the shifted data values ​​may be set to be the same for each data value (e.g., all set to zero) so that the shifted data values ​​are between 0 and 2. n -1. For example, m can be 6 and n can be 8, so that (nm) is 2, and so that 2 n -1 is 255.

[0272] Referring to the above YUV example, a 6-bit decompressed data value is included in one channel, and there are three other channels with 8-bit decompressed data values. The data values ​​in the channel are reformatted (e.g., by replacing the processing block of the color re-correlation block) to represent a YUV data value in a 10:10:10 format with three output data channels. The 8-bit decompressed data value is placed in the 8 most significant bit positions of the 10-bit data values ​​of the three output data channels; and each 6-bit data value is divided into three 2-bit parts, where the 2-bit parts are placed in the two least significant bit positions of the 10-bit data values ​​of the corresponding three output data channels. As described above, the bits in the 6-bit data value can be interleaved from three different YUV channels, so the correct decompressed bits can be assigned to the correct YUV channels from the 6-bit data value using a deinterleaving process. The decompressed data value can be output.

[0273] Different block sizes / shapes

[0274] In the above example, the blocks are 8×8 blocks. However, in different examples, blocks of different sizes / shapes may be used, such as 8×4, 16×4, 32×2, and 16×16 blocks. Here, we describe how to slightly modify the system described above for 8×8 blocks to allow the system to process 16×4 and 32×2 blocks.

[0275] In general, there is provided a method (and a data compression unit) for performing spatial decorrelation on a j×k block of input data values ​​using a spatial decorrelation module, the spatial decorrelation module being arranged to process a g×h block of data values ​​(wherein the block has g columns and h rows, e.g., an 8×8 block of data, where g=h=8), where the number of columns j in the block of input data values ​​is a multiple of g, and where j×k=g×h. The method comprises:

[0276] a. reassembling the input data value block into a g×h data value block (e.g., 8×8 block) by: (i) dividing each row of the input block into a plurality of segments, where each segment includes g data values, and (ii) arranging the segments into h rows to form a g×h data value block; and

[0277] b. performing spatial decorrelation on a g×h block of data values, wherein rows of the g×h block of data values ​​are processed sequentially (e.g., iteratively) such that, for each row of the input data value block, a first segment of the row is processed in an iteration earlier than an iteration in which a second segment of the row is processed, wherein the first segment is located to the right of the second segment in the row, and wherein at least one value in the first segment is saved for use in spatial decorrelation of the second segment.

[0278] In the examples described herein, g=h=8, so that the system is arranged to process 8×8 blocks, but in other examples, blocks of different sizes / shapes may be processed. For example, in some other examples, g=h=4, so that the system is arranged to process 4×4 blocks. In other examples, the blocks may be rectangular, i.e., g≠h, e.g., g=8, h=4.

[0279] For example, the input data block may be a 16×4 data block (i.e., j=16 columns and k=4 rows), such that (where g=h=8) each row of the input block is divided into two segments. As another example, the input data block may be a 32×2 data block (i.e., j=32 and k=2), such that each row of the input block is divided into four segments.

[0280] As described in more detail below with reference to the 16×4 and 32×2 examples, data values ​​from column A of the first segment may be saved and used to compute spatially decorrelated data values ​​in columns E, G, and H of the second segment using a linear prediction method using two reference values. Additionally, data values ​​from column A of the first segment may be used to compute spatially decorrelated data values ​​in column A of the second segment using a Haar prediction method using one reference value.

[0281] Spatially decorrelated data values can be output from a spatial decorrelation module and provided, for example, to an entropy encoding module for entropy encoding. The spatial decorrelation module can be configured to remap the data values after the spatial decorrelation but before providing the spatially decorrelated data values to the entropy encoding module such that entropy encoding is performed on the remapped data values. As described above, the remapped data values can be unsigned and have a zero-biased distribution.

[0282] Note that in these compression examples, j > g, (i.e., the source block is wider than the target block). However, if a preprocessing stage is introduced to transpose / rotate the input block such that the rows of the input block become columns and vice versa, then an input block (where j < g) can be processed by the same system. The transposed block (which has j > g) can be processed as described in the examples herein.

[0283] Furthermore, a method (and data decompression unit) is provided for performing spatial re-correlation on a g×h block of input data values (e.g., an 8×8 block of input data values where g = h = 8) and outputting a j×k block of spatially re-correlated output data values, where the number of columns j in the output data value block is a multiple of g, where j×k = g×h, and where j ≠ g. The method includes:

[0284] a. Performing spatial re-correlation on the g×h block of input data values, where the rows of the g×h block of input data values correspond to segments of the rows of the j×k block of output data values, and where the rows of the input data value block are processed iteratively in order such that the first row of the input data value block corresponding to the first segment of a particular row of the output block is processed in an earlier iteration than the second row of the input data value block corresponding to the second segment of the particular row of the output block, where the first segment is to the right of the second segment in the particular row of the output block, and where at least one value from the first row of the input data value block is saved for use in the spatial re-correlation of the second row of the input data value block;

[0285] b. Reorganizing the spatially re-correlated data values into a j×k block of spatially re-correlated output data values by arranging the rows of the spatially re-correlated data values into their corresponding segments in the k rows of the output block; and

[0286] c. Outputting the j×k block of spatially re-correlated output data values.

[0287] As described above, in the examples described herein, g = h = 8, but in other examples, g and h can take on different values.

[0288] In the 16×4 block example, j = 16 and k = 4, such that (where g = h = 8) each row of the output block includes two segments. In the 32×2 block example, j = 32 and k = 2, such that each row of the output block includes four segments.

[0289] The data values of column A of the first row of the input block can be saved and used to calculate the spatially re-correlated data values in columns E, G, and H of the second row of the input block based on a linear prediction method using two reference values. Additionally, the data values of column A of the first row of the input block can be used to calculate the spatially re-correlated data values in column A of the second row of the input block based on a Haar prediction method using one reference value.

[0290] As in the above examples, the data values of the input data block can be received at the spatial re-correlation module from an entropy decoding module that has applied entropy decoding to the data values of the input data block.

[0291] Note that in these decompression examples, j > g, (i.e., the output block is wider than the input block). However, if a post-processing stage is introduced to transpose / rotate the output block such that the rows of the output block become columns and vice versa, then the output block (where j < g) can be processed by the same system. The output block (which has j > g) can be generated as described in the examples herein and then transposed into an output block with j < g.

[0292] Fig.24 An example of a 16×4 block is shown, where the input data is reorganized into an 8×8 arrangement. It should be noted that in other embodiments, different reorganizations can be implemented. The reorganization is performed before spatial decorrelation. The reorganization is performed by processing logic, which can be included in the spatial decorrelation module or in a separate unit that operates before the spatial decorrelation module in the pipeline operation of the data compression unit. In Fig.24 In the example shown, the right half of the 16×4 block is logically addressed as the first four rows, while the left half is addressed as the later rows. This reorganized 8×8 block can be processed in a very similar manner to the above 8×8 block, except that some modifications to the spatial decorrelation / spatial re-correlation can be made based on the fact that we know the left row is adjacent to the corresponding right row to improve the compression result. In this way, the system aims to utilize the possible spatial coherence between the pixels in the block.

[0293] Spatial decorrelation of the right row is performed before spatial decorrelation of the left row. Spatial decorrelation of the right row is performed in the same manner as described above for the first four rows of a standard 8×8 block. However, the values ​​of column A of the right row are saved (e.g., in a register) for use in the spatial decorrelation of the left row. For the left row, the data values ​​in columns B, C, D and F are spatially decorrelated as described above for a standard 8×8 block. However, the data values ​​in columns E, G and H of the left row are no longer calculated using only a Haar wavelet (i.e., a wavelet in which there is only one (repeated) reference value), but are instead calculated using the linear prediction method as described above using two reference values. One of the reference values ​​is the original reference value as described above for the Haar prediction, but now, as Fig.25 As shown, the other one of the references is the data value from the corresponding right row column A. In addition, Haar prediction is also used to make the left row column A dependent on the corresponding right row column A.

[0294] Multiplexers can be added to Figure 6 Spatial decorrelation hardware is shown to allow different inputs to the A, E, G, and H pipelines based on whether the left or right row is currently being processed.

[0295] The vertical processing order is determined by Fig.26 The row dependencies shown are determined. Fig.26 The solid line in the figure shows the standard dependency (similar to Fig.10 those shown). Fig.26 The dashed line in shows the dependency of a left row on its corresponding right row. The dependency on the corresponding right row is more important in the decoder than in the encoder, but for clarity it is assumed that the encoder and decoder will use the same row processing order. Fig.26 The dashed lines in show the order in which the rows are processed. The row order for the 16×4 block is the same as the row order for the spatial decorrelation of the 8×8 block described above. However, some operations are performed slightly differently than for the 8×8 block described above. Specifically, rows 2 and 3 are now predicted using Haar prediction instead of linear prediction; and row 4 is no longer predicted using Haar or linear prediction.

[0296] The spatial re-correlation is modified according to the modification made to the spatial decorrelation. Entropy encoding and decoding of 16x4 blocks operates in the same manner as described above for 8x8 blocks.

[0297] Fig.28 An example of a 32×2 block is shown in FIG, where the input data is reorganized into an 8×8 arrangement. It should be noted that in other embodiments, different reorganizations may be implemented. In this example, each row of 32 data values ​​is divided into four segments, Fig.28Labeled as S, T, U and V in the 32×2 block, each segment has 8 data values. The four segments (S0, T0, U0 and V0) of the first row of the 32×2 block are logically addressed as the first four rows of the 8×8 block. The four segments (S1, T1, U1 and V1) of the second row of the 32×2 block are logically addressed as the last four rows of the 8×8 block. This reorganized 8×8 block can be processed in a very similar way to the above-mentioned 8×8 block, except that some modifications to the spatial decorrelation / spatial recorrelation can be made based on the fact that we know the positioning of the different segments in the original 32×2 block to improve the compression result. In this way, the system aims to exploit possible spatial coherence between pixels in the block.

[0298] Spatial decorrelation of rows is performed in segments from right to left, for example, in the order of V, U, T and then S. Spatial decorrelation of the V segment is performed in the same manner as for the rows of the standard 8×8 block described above. However, the values ​​of column A of the V segment are saved (for example, in a register) for use in the spatial decorrelation of the U segment in the same row. Spatial decorrelation of the U, T and S segments is performed in the same manner as for the left row of the 16×4 block described above. For the U segment, the data values ​​in columns B, C, D and F are spatially decorrelated as described above for the standard 8×8 block. However, the data values ​​in columns E, G and H of the U segment are no longer calculated using Haar prediction, but instead are calculated using linear prediction using two reference values. One of the reference values ​​is the original reference value as described above for Haar prediction, but now, as Fig.29 As shown, the other reference is the data value of column A of the V segment of the corresponding row. In addition, using Haar prediction, column A of the U segment is made dependent on column A of the V segment of the corresponding row. The value of column A of the U segment is saved (for example, in a register) for use in the spatial decorrelation of the T segment of the same row. For the T segment, the data values ​​in columns B, C, D and F are spatially decorrelated as described above for the standard 8×8 block. However, the data values ​​in columns E, G and H of the T segment are no longer calculated using Haar prediction, but are instead calculated using linear prediction using two reference values. One of the reference values ​​is the original reference value as described above for Haar prediction, but now, as Fig.29 As shown, the other reference is the data value of column A of the U segment of the corresponding row. In addition, using Haar prediction, column A of the T segment is made dependent on column A of the U segment of the corresponding row. The value of column A of the T segment is saved (for example, in a register) for use in the spatial decorrelation of the S segment of the same row. For the S segment, the data values ​​in columns B, C, D and F are spatially decorrelated as described above for the standard 8×8 block. However, the data values ​​in columns E, G and H of the U segment are no longer calculated using Haar prediction, but are instead calculated using linear prediction using two reference values. One of the reference values ​​is the original reference value as described above for Haar prediction, but now, as Fig.29 As shown, another reference is the data value of column A of the T segment from the corresponding row. In addition, using Haar prediction, column A of the S segment is made dependent on column A of the T segment of the corresponding row.

[0299] Multiplexers can be added to Figure 6 Spatial decorrelation hardware is shown to allow different inputs to the A, E, G, and H pipelines based on whether the V segment or one of the S, T, or U segments is currently being processed.

[0300] The vertical processing order is determined by Fig.30 The row dependencies shown are determined. Fig.30 The solid line in the figure shows the standard dependency (similar to Fig.10 those shown). Fig.30 The dashed lines in show the dependencies of each segment on other segments of the corresponding row. The dependencies between segments of a row are more important in the decoder than in the encoder, but for clarity, it is assumed that the encoder and decoder will use the same row processing order. Fig.30 The dashed lines in show the order in which the rows of the reorganized block are processed. Fig.30 The row order shown for processing rows of a 32×2 block is different from the order described above for 16×4 and 8×8 blocks. However, since 32×2 blocks have fewer dependencies (compared to the 8×8 or 16×4 blocks described above), there is more freedom in choosing the order in which rows are processed.

[0301] Fig.31 The contents of the registers and the values ​​of the left, center, and right inputs of the processing units in the second stage of the spatial decorrelation module are shown. In this case, rows 0, 1, 2, and 3 are not predicted using Haar or linear prediction; and rows 4, 5, 6, and 7 are predicted using Haar prediction. None of these rows are predicted using linear prediction.

[0302] The spatial re-correlation is modified according to the modification made to the spatial decorrelation. Entropy encoding and decoding of 32x2 blocks operates in the same manner as described above for 8x8 blocks.

[0303] It should be noted that the above description of "rows" and "columns" of data blocks is not restrictive, and in other examples, columns of data blocks may be processed as rows are processed in the above examples, and rows of data blocks may be processed as columns are processed in the above examples.

[0304] Components (e.g., data compression units, data decompression units, spatial decorrelation modules, entropy encoding modules, spatial re-correlation modules, and entropy decoding modules) are shown in the accompanying drawings and described herein as comprising multiple functional blocks. This is merely illustrative and is not intended to define a strict division between different logical elements of such entities. Each functional block may be provided in any suitable manner. It should be understood that intermediate values ​​described herein as being formed by a component need not be physically generated by the component at any point, and may simply represent logical values ​​that conveniently describe the processing performed by the component between its input and output.

[0305] The components described herein (e.g., data compression unit, data decompression unit, spatial decorrelation module, entropy encoding module, spatial re-correlation module, and entropy decoding module) can be implemented in hardware on an integrated circuit. The components described herein can be configured to perform any of the methods described herein. In general, any of the functions, methods, techniques, or components described above can be implemented in software, firmware, hardware (e.g., fixed logic circuits), or any combination thereof. The terms "module," "function," "component," "element," "unit," "block," and "logic" may be used herein to generally represent software, firmware, hardware, or any combination thereof. In the case of software implementation, a module, function, component, element, unit, block, or logic represents a program code that performs a specified task when executed on a processor. The algorithms and methods described herein can be performed by one or more processors executing code that causes the processor to execute the algorithm / method. Examples of computer-readable storage media include random access memory (RAM), read-only memory (ROM), optical disks, flash memory, hard disk storage, and other memory devices that can use magnetic, optical, and other technologies for storing instructions or other data and can be accessed by a machine.

[0306] The terms computer program code and computer readable instructions as used herein refer to any kind of executable code for a processor, including code expressed in a machine language, an interpreted language, or a scripting language. Executable code includes binary code, machine code, byte code, code that defines an integrated circuit (such as a hardware description language or a netlist), and code expressed in a programming language code such as C, Java, or OpenCL. Executable code can be, for example, any type of software, firmware, script, module, or library that, when properly executed, processed, interpreted, compiled, executed at a virtual machine or other software environment, causes a processor of a computer system supporting the executable code to perform the tasks specified by the code.

[0307] A processor, computer or computer system may be any kind of device, machine or special purpose circuit, or a collection or part thereof, that has processing capabilities so that it can execute instructions. A processor may be any kind of general or special purpose processor, such as a CPU, GPU, system on a chip, state machine, media processor, application specific integrated circuit (ASIC), programmable logic array, field programmable gate array (FPGA), etc. A computer or computer system may include one or more processors.

[0308] It is also intended to include software that defines hardware configurations as described herein, such as HDL (Hardware Description Language) software, which is used to design integrated circuits or to configure programmable chips to perform desired functions. That is, a computer-readable storage medium may be provided having encoded thereon computer-readable program code in the form of an integrated circuit definition data set, which, when processed (i.e., run) in an integrated circuit manufacturing system, configures the system to manufacture components configured to perform any of the methods described herein, or to manufacture components including any of the apparatus described herein. The integrated circuit definition data set may be, for example, an integrated circuit description.

[0309] Thus, a method of manufacturing an assembly as described herein in an integrated circuit manufacturing system may be provided. Furthermore, an integrated circuit definition data set may be provided which, when processed in an integrated circuit manufacturing system, causes the method of manufacturing an assembly to be performed.

[0310] The integrated circuit definition data set may be in the form of computer code, for example as a netlist, code for configuring a programmable chip, as a hardware description language that defines hardware suitable for manufacture in an integrated circuit at any level, including as register transfer level (RTL) code, as a high-level circuit representation, such as Verilog or VHDL, and low-level circuit representations, such as OASIS (RTM) and GDSII. Higher-level representations that logically define hardware suitable for manufacture in an integrated circuit (such as RTL) may be processed in a computer system configured to generate a manufacturing definition of an integrated circuit in the context of a software environment that includes definitions of circuit elements and rules for combining those elements to generate a manufacturing definition of the integrated circuit defined by the representation. Software is executed in a computer system to define a machine, typically as one or more intermediate user steps (e.g., providing commands, variables, etc.) may be required in order for a computer system configured to generate a manufacturing definition of an integrated circuit to execute the code that defines the integrated circuit in order to generate a manufacturing definition of the integrated circuit.

[0311] Now refer to Fig.32An example of processing an integrated circuit definition data set in an integrated circuit manufacturing system to configure the system to manufacture a component (e.g., a data compression unit, a data decompression unit, a spatial decorrelation module, an entropy encoding module, a spatial re-correlation module, or an entropy decoding module) is described.

[0312] Fig.32 An example of an integrated circuit (IC) manufacturing system 3202 configured to manufacture components as described in any of the examples herein is shown. In particular, the IC manufacturing system 3202 includes a layout processing system 3204 and an integrated circuit generation system 3206. The IC manufacturing system 3202 is configured to receive an IC definition data set (e.g., defining a component as described in any of the examples herein), process the IC definition data set, and generate an IC (e.g., which implements a component as described in any of the examples herein) based on the IC definition data set. The processing of the IC definition data set configures the IC manufacturing system 3202 to manufacture an integrated circuit that implements a component as described in any of the examples herein.

[0313] The layout processing system 3204 is configured to receive and process an IC definition data set to determine a circuit layout. Methods for determining a circuit layout from an IC definition data set are known in the art and may, for example, involve synthesizing RTL code to determine a gate-level representation of a circuit to be generated, for example, in terms of logic components (e.g., NAND, NOR, AND, OR, MUX, and FLIP-FLOP components). By determining the location information of the logic components, the circuit layout can be determined from the gate-level representation of the circuit. This can be done automatically or with user participation to optimize the circuit layout. When the layout processing system 3204 determines the circuit layout, it can output the circuit layout definition to the IC generation system 3206. The circuit layout definition can be, for example, a circuit layout description.

[0314] As is known in the art, IC generation system 3206 generates an IC according to a circuit layout definition. For example, IC generation system 3206 can implement a semiconductor device manufacturing process to generate an IC, which can involve a multi-step sequence of photolithography and chemical processing steps during which electronic circuits are gradually formed on a wafer made of semiconductor material. The circuit layout definition can be in the form of a mask that can be used in a photolithography process to generate an IC according to the circuit definition. Alternatively, the circuit layout definition provided to IC generation system 3206 can be in the form of a computer readable code that IC generation system 3206 can use to form a suitable mask for generating the IC.

[0315] The different processes performed by IC manufacturing system 3202 can all be implemented in one location, for example, by one party. Alternatively, IC manufacturing system 3202 can be a distributed system such that some processes can be performed at different locations and by different parties. For example, some of the following stages can be performed at different locations and / or by different parties: (i) synthesizing RTL code representing an IC definition data set to form a gate-level representation of a circuit to be generated, (ii) generating a circuit layout based on the gate-level representation, (iii) forming a mask based on the circuit layout, and (iv) manufacturing the integrated circuit using the mask.

[0316] In other examples, processing of an integrated circuit definition data set at an integrated circuit manufacturing system may configure the system to manufacture a component without processing the IC definition data set to determine a circuit layout. For example, an integrated circuit definition data set may define a configuration of a reconfigurable processor (such as an FPGA), and processing of the data set may configure the IC manufacturing system to generate a reconfigurable processor having the defined configuration (e.g., by loading the configuration data into the FPGA).

[0317] In some embodiments, when processed in an integrated circuit manufacturing system, the integrated circuit manufacturing definition data set may cause the integrated circuit manufacturing system to generate a device as described herein. Fig.32 Configuring an integrated circuit manufacturing system in the manner described may enable the manufacture of devices as described herein.

[0318] In some examples, the integrated circuit definition data set may include software that runs on, or in combination with, hardware defined at the data set. Fig.32 In the example shown, the IC generation system may also be configured by the integrated circuit definition dataset to load firmware onto the integrated circuit or otherwise provide program code with the integrated circuit for use with the integrated circuit when manufacturing the integrated circuit according to the program code defined at the integrated circuit definition dataset.

[0319] Compared with known implementations, the implementation of the concepts described in the equipment, devices, modules and / or systems described in this application (and in the methods implemented herein) can improve performance. Performance improvements can include one or more of increased computing performance, reduced latency, increased throughput and / or reduced power consumption. During the manufacture of such equipment, devices, modules and systems (e.g., integrated circuits), performance improvements can be offset by physical implementations, thereby improving manufacturing methods. For example, performance improvements can be exchanged for layout areas, thereby matching the performance of known implementations but using less silicon. For example, this can be done by reusing functional blocks in a serial manner or sharing functional blocks between elements of equipment, devices, modules and / or systems. On the contrary, performance improvements can be exchanged for concepts that make improvements (e.g., reduced silicon area) in the physical implementations of equipment, devices, modules and systems proposed in this application. For example, this can be done by manufacturing multiple instances of modules within a predefined area budget.

[0320] The applicant hereby independently discloses each individual feature described herein and any combination of two or more such features, as long as these features or combinations can be implemented based on this specification as a whole in view of the common general knowledge of a person skilled in the art, regardless of whether such features or feature combinations solve any problems disclosed herein. In view of the foregoing description, it is clear to a person skilled in the art that various modifications can be made within the scope of the invention.

Claims

1. A method for performing data compression for compressing image data, the method include: performing spatial decorrelation at a spatial decorrelation module; performing entropy encoding on the plurality of data values ​​to form an encoded data output, the encoded data output comprising the plurality of encoded data values, the plurality of encoded data values ​​representing the respective plurality of data values, wherein performing entropy encoding comprises: receiving the data values, wherein the received data values ​​have been processed by the spatial decorrelation module, and wherein the received data values ​​are related to corresponding pixel values; as well as For each of the multiple sets of received data values: determining a number of bits that can be used to represent a maximum value among the received data values ​​in the set; including in said encoded data output an indication of said determined number of bits; and including in the encoded data output the encoded data values ​​representing the received data values ​​in the set, wherein each of the encoded data values ​​has the determined number of bits; Each of the sets of received data values ​​is associated with a two-dimensional set of pixel values. 2 . The method of claim 1 , wherein the determined number of bits is a minimum number of significant bits that can be used to represent the maximum value among the received data values ​​in the set.

3. A method according to claim 2, wherein there is a predetermined set of significant digits that can be indicated by the indication, and wherein the minimum significant digit is the minimum value of the significant digits in the predetermined set that is sufficient to represent the maximum value among the received data values ​​in the set.

4. The method of claim 3, wherein the predetermined set of the significant numbers of bits does not include all possible minimum numbers of bits that can be used to represent a maximum value among the received data values ​​in the set.

5. A method according to any one of claims 2 to 4, wherein each of the received data values ​​has n bits, and the determined minimum number of significant bits for a specific set of received data values ​​is m, where m≤n, so that each of the received data values ​​in the specific set has at least (nm) leading zeros, and wherein each of the encoded data values ​​for the specific set includes the m least significant bits of the corresponding n-bit received data values ​​in the specific set.

6. A method according to any one of claims 1 to 4, wherein each of the sets of received data values ​​relates to a 2x2 set of pixel values.

7. A method according to any one of claims 1 to 4, wherein the received data values ​​are organized into blocks, wherein each block includes multiple sets of received data values, and wherein the encoded data output for each block of received data values ​​is placed in a corresponding data packet.

8. The method of claim 7, wherein the encoded data for each block of received data values ​​is include: a size indication field comprising an indication of the determined number of bits for the plurality of sets of received data values ​​for the block; as well as A variable size field comprising the encoded data value representing the received data value in the set.

9. A method according to any one of claims 1 to 4, wherein the received data values ​​have been remapped, whereby the remapping is configured according to a spatial decorrelation technique used by the spatial decorrelation module so that the probability of the remapped data values ​​having a specific amplitude is reduced for larger amplitudes.

10. The method of claim 9, wherein the remapping of data values include: If the most significant bit of the data value is 1, then complement the other bits of the data value; as well as The most significant bit of the data value is moved into a least significant bit position.

11. A method according to any one of claims 1 to 4, wherein the received data values ​​are unsigned, having a distribution biased towards zero.

12. A method according to any one of claims 1 to 4, wherein the received data values ​​represent MSAA differential data values.

13. A method according to any one of claims 1 to 4, wherein the spatial decorrelation is performed at a plurality of different spatial frequencies, and wherein the data values ​​within a set belong to the same spatial frequency.

14. A data compression unit for compressing image data, the data compression unit include: a spatial decorrelation module configured to perform spatial decorrelation on the data values; as well as an entropy coding module configured to perform entropy coding on a plurality of data values ​​to form an encoded data output, the encoded data output comprising a plurality of encoded data values, the plurality of encoded data values ​​representing the respective plurality of data values, the entropy coding module being configured to: receiving the data value, wherein the received data value has been processed by the spatial decorrelation module, and wherein the received data value is related to a corresponding pixel value; and For each of the multiple sets of received data values: determining a number of bits that can be used to represent a maximum value among the received data values ​​in the set; including in said encoded data output an indication of said determined number of bits; and including in the encoded data output the encoded data values ​​representing the received data values ​​in the set, wherein each of the encoded data values ​​has the determined number of bits; Each of the sets of received data values ​​is associated with a two-dimensional set of pixel values.

15. The data compression unit of claim 14, wherein the data values ​​are pixel values.

16. The data compression unit according to claim 14 or 15, wherein the entropy coding module is further configured to: for another set of received data values, including in the encoded data output a further indication of the number of bits per data value in the further set; and including in the encoded data output further encoded data values ​​representing the data values ​​received in the further set, wherein each of the further encoded data values ​​has a number of bits according to the further indication, wherein the another set of received data values ​​comprises fewer data values ​​than each of the plurality of sets of received data values.

17. A data compression unit according to claim 14 or 15, wherein the spatial decorrelation module includes one or more remapping units, and the one or more remapping units are configured to remap the data values ​​generated by the spatial decorrelation according to the spatial decorrelation technique used in the spatial decorrelation so that the probability that the remapped data values ​​have a specific amplitude is reduced for larger amplitudes.

18. A data compression unit according to claim 14 or 15, comprising a plurality of entropy coding modules, wherein the plurality of entropy coding modules are configured to operate on corresponding channels associated with the same group of pixels to form a corresponding plurality of encoded data outputs, wherein the data compression unit further comprises a packing unit, wherein the packing unit is configured to pack the plurality of encoded data outputs for the group of pixels together into a data packet for storage.

19. A method of performing data decompression for decompressing compressed image data, the method include: performing entropy decoding on an encoded data input, the encoded data input comprising: (i) a plurality of encoded data values, the plurality of encoded data values ​​being associated with corresponding pixel values, and (ii) forming, for each of a plurality of sets of encoded data values, an indication of a number of bits of the encoded data value in the set, wherein each of the sets of encoded data values ​​is associated with a two-dimensional set of pixel values, and wherein performing entropy decoding comprises: receiving the encoded data input; reading the indication in the encoded data input to identify the number of bits forming each of the encoded data values; and parsing the encoded data value in the encoded data input based on the identified number of bits to interpret the encoded data value; receiving the decoded data values ​​at a spatial re-correlation module; and Spatial re-correlation is performed at the spatial re-correlation module based on the decoded data values.

20. The method of claim 19, further comprising determining decoded data values ​​by selectively prepending leading zeros to the interpreted encoded data values ​​such that each of the decoded data values ​​has a number n of bits.

21. The method of claim 19 or 20, wherein the spatial re-correlation module is configured to apply an unmapping process to the decoded data values ​​prior to performing the spatial re-correlation.

22. The method of claim 21, wherein the unmapping process include: If the least significant bit of the decoded data value is zero, removing the least significant bit and leading the remaining bits of the data value with zeros; as well as If the least significant bit of the decoded data value is one, then the least significant bit is removed, the remaining bits are inverted, and then the bits are prepended with one.

23. A method according to claim 19 or 20, wherein the indication for a specific set of encoded data values ​​indicates a minimum number of significant digits, which can be used to represent the maximum value of the decoded data values ​​in the specific set, and wherein each of the encoded data values ​​within the specific set of encoded data values ​​has the indicated minimum number of significant digits.

24. A method according to claim 23, wherein there is a predetermined set of significant numbers of bits that can be indicated by the indication, and wherein the minimum number of significant bits is the minimum value of the significant numbers of bits in the predetermined set that is sufficient to represent the maximum value among the received data values ​​in the set, wherein the predetermined set of significant numbers of bits does not include all possible minimum numbers of bits that can be used to represent the maximum value among the received data values ​​in the set.

25. A method according to claim 19 or 20, wherein the indication for a particular set of encoded data values ​​is an index to a lookup table, and wherein the method includes using the indication for the particular set of encoded data values ​​as an index to the lookup table to obtain the number of bits for each data value in the particular set.

26. A method according to claim 19 or 20, wherein, for a block of encoded data values, the indication of the number of bits forming the encoded data values ​​in the set is included in a size indication field, and wherein the indications for the blocks of encoded data values ​​included in the size indication field are read in parallel using corresponding length decoding units.

27. A data decompression unit for decompressing compressed image data, the data decompression unit include: An entropy decoding module configured to perform entropy decoding on an encoded data input, the encoded data input comprising: (i) a plurality of encoded data values, the plurality of encoded data values ​​being associated with corresponding pixel values, and (ii) forming, for each of a plurality of sets of encoded data values, an indication of a number of bits of the encoded data values ​​in the set, wherein each of the sets of encoded data values ​​is associated with a two-dimensional set of pixel values, and wherein the entropy decoding module is configured to: receiving the encoded data input; reading the indication in the encoded data input to identify the number of bits forming each of the encoded data values; and parsing the encoded data value in the encoded data input based on the identified number of bits to interpret the encoded data value; and a spatial re-correlation module configured to perform spatial re-correlation based on the decoded data value.

28. A method for manufacturing the data compression unit according to claim 14 or 15 or the data decompression unit according to claim 27 using an integrated circuit manufacturing system, the method include: processing the computer-readable description of the data compression unit or the data decompression unit using a layout processing system to generate a circuit layout description of an integrated circuit implementing the data compression unit or the data decompression unit; and The data compression unit or the data decompression unit is manufactured using an integrated circuit production system according to the circuit layout description.

29. A computer readable storage medium having computer readable code encoded thereon, the computer readable code being configured to cause the method of any one of claims 1 to 4, claims 19, 20 or 28, or claim 22 to be performed when the code is executed.

30. A non-transitory computer-readable storage medium having stored thereon a computer-readable description of a data compression unit according to claim 14 or 15 or a data decompression unit according to claim 27, wherein the computer-readable description, when processed in an integrated circuit manufacturing system, enables the integrated circuit manufacturing system to manufacture an integrated circuit implementing the data compression unit or the data decompression unit.