Image data compression
Patent Information
- Application Number
- CN202110316254.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-26
- Filing Date
- 2021-03-24
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-03-24
AI Technical Summary
在这些情况下,可以使用有损压缩技术,这可以实现保证压缩比,但是在压缩过程中可能丢失一些数据
Smart Images

Figure CN113452994B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to data compression and data decompression. Background Technology
[0002] Data compression, whether lossless or lossy, is desirable in many applications that store and / or retrieve data from memory. By compressing data before storing it in memory, the amount of data transferred to memory can be reduced. An example of data for which data compression is particularly useful is image data. The term "image data" is used herein to refer to two-dimensional data having values corresponding to specific pixels or sampling locations in an image. For example, an image may be generated as part of a rendering process on a graphics processing unit (GPU). Image data includes, but is not limited to: depth data stored in a depth buffer, pixel data (e.g., color data) stored in a frame buffer, texture data stored in a texture buffer, and surface normal data stored in a surface normal buffer. These buffers can be any suitable type of memory, such as cache memory, a separate memory subsystem, a storage region in a shared memory system, or some combination thereof.
[0003] GPUs can be used to process data to generate image data. For example, a GPU can determine the pixel values (e.g., color values) of an image stored in a frame buffer, which can then be output to a display. GPUs typically have a highly parallelized architecture for processing large blocks of data in parallel. There is significant commercial pressure to make GPUs (especially those designed for implementation in mobile / embedded devices) operate with reduced latency, lower power consumption, and smaller physical size (e.g., reduced silicon area). Competition for these goals expects the use of higher-quality rendering algorithms to produce higher-quality images. Reducing memory bandwidth (i.e., reducing the amount of data transferred between the GPU and memory) can significantly reduce system latency and power consumption, which is why compressing data before transferring it can be particularly useful. This also applies to a lesser extent when considering data moving around within the GPU itself. Moreover, the same issues can be associated with other processing units, such as the central processing unit (CPU), as well as the GPU.
[0004] Figure 1An exemplary computing system 100 is shown that can be implemented in an electronic device such as a mobile / embedded device. The computing system 100 includes a host CPU 102, a GPU 104, memory 106 (e.g., graphics memory), and a display 108. The CPU 102 is configured 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. Images rendered by the GPU 104 (e.g., represented using pixel values) can be stored in the memory 106 and displayed on the display 108 via a display interface 116.
[0005] GPU 104 includes rendering logic 110, a compression / decompression unit 112, and a memory interface 114. The graphics rendering system 100 is arranged such that data can be transferred in any direction between (i) CPU 102 and rendering logic 110; (ii) CPU 102 and memory interface 114; (iii) memory interface 114 and memory 106; (iv) rendering logic 110 and compression / decompression unit 112; (v) compression / decompression unit 112 and memory interface 114; and (vi) memory 106 and display interface 116. In some examples, the graphics rendering system 100 may be further arranged such that data can be transferred in any direction between compression / decompression unit 112 and display interface 116, and that data can be transferred from display interface 116 to display 108.
[0006] In operation, GPU 104 can process regions of image data individually. These regions may, for example, represent rectangular (including square) portions (or “tiles”) of the rendering space (i.e., a two-dimensional space representing, for example, a region of the image to be rendered). Rendering logic 110 can perform scan transformations and rasterization of graphics primitives (e.g., but not limited to, triangles and lines) using known techniques such as depth testing and texture mapping. Rendering logic 110 may include cache units to reduce memory traffic. Some data is read from or written to memory from memory 106 by rendering logic 110 via memory interface 114 (which may include a cache), but for other data, such as data to be stored in a buffer (e.g., a frame buffer), data is preferably transferred from rendering logic 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 via an external memory bus by compressing the data.
[0007] Display interface 116 sends data defining the complete image to display 108. The uncompressed image can be accessed directly from memory 106. Compressed data can be decompressed via compression / decompression unit 112 and sent to display 108 as uncompressed data. In an alternative example, compressed data can be read directly by display interface 116, and display interface 116 may include logic for decompressing compressed data in a manner equivalent to decompression by compression / decompression unit 112. Although shown as a single entity, compression / decompression unit 112 may comprise multiple parallel compression and / or decompression units for performance enhancement.
[0008] As known to those skilled in the art, rendering logic 110 can generate a set of one or more color values (e.g., RGB or RGBA) for each pixel in the rendering space and store the color values in a frame buffer. The set of color values for a frame may be referred to herein as color data, image data, frame buffer data, or simply frame data. Rendering logic 110 may also generate other image data, such as depth data, surface normal data, lighting data, etc., and may store those image data values in one or more buffers in memory. In some cases, these buffers may be referred to as frame buffers, while in other cases, the term "frame buffer" may be reserved for a buffer that stores color values or data to be sent to the display. In some graphics rendering systems, rendering logic 110 may use image data values stored in buffers for a particular rendering during one or more subsequent renderings. For example, color values generated by a single rendering may represent a texture that can be (e.g., in compressed form) stored in memory 106, and the texture can be read from memory 106 (e.g., and decompressed) to be applied as a texture to a surface in one or more subsequent renderings. Similarly, surface normal values generated for a geometry model in a single render can be used to apply lighting effects to the same model during one or more subsequent renders. Furthermore, surface depth values generated and stored in a single render can be read back for use in one or more subsequent renders of the same model.
[0009] Since image data (e.g., color data) can be quite large, the memory bandwidth associated with writing image data to and reading image data from the buffer in memory can be a significant portion of the total memory bandwidth of the graphics processing system and / or the GPU. Therefore, image data is typically compressed by compression / decompression unit 112 before being stored in the buffer and decompressed by compression / decompression unit 112 after being read from the buffer.
[0010] When data is compressed using lossless compression techniques and then decompressed using complementary lossless decompression techniques, the original data can be recovered without data loss (assuming no errors occurred during compression or decompression). The degree to which data is compressed can be expressed as the compression ratio, which is obtained by dividing the size of the uncompressed data by the size of the compressed data. The compression ratio achieved by lossless compression techniques typically depends on the data being compressed. For example, lossless compression techniques tend to achieve relatively high compression ratios when compressing highly correlated data; while they tend to achieve relatively low compression ratios when compressing uncorrelated (e.g., random) data. Therefore, it is difficult to guarantee that lossless compression techniques will achieve a specific compression ratio (e.g., a 2:1 compression ratio). Therefore, if only lossless compression techniques are used, the system must typically be able to handle situations where the desired compression ratio (e.g., 2:1) cannot be achieved, and situations where, for example, lossless compression techniques sometimes fail to produce compression at all.
[0011] In some cases, maintaining a high compression ratio can be considered more important than ensuring no data loss during compression. In these cases, lossy compression techniques can be used, which can maintain the compression ratio but may result in some data loss during compression. Summary of the Invention
[0012] This summary is provided to introduce some concepts that are further described in the following detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter.
[0013] A computer-implemented method is provided for performing lossy compression on an image data block according to a multi-level interpolation table, wherein the image data block comprises a plurality of image element values, and each level of the multi-level interpolation table comprises a plurality of entries. The method includes: determining a starting value for the image data block; determining a level for the image data block within the multi-level interpolation table; for each image element value in the image data block, selecting one of the entries in the determined level within the multi-level interpolation table; and forming a compressed data block of the image data block, the compressed data block comprising: (i) data representing the determined starting value, (ii) an indication of the determined level, and (iii) an indication of the selected entry for each image element value in the image data block.
[0014] For different levels of a multi-level difference table, the size of the value range represented by the entries in the level can be different.
[0015] Each entry in the multi-level difference table can represent a value that can be used to represent the difference between the value of an image element and the starting value of that image data block.
[0016] The multi-level interpolation table can be predetermined, that is, the values of the entries in the multi-level interpolation table can be determined before the lossy compression method is performed on the image data blocks.
[0017] A starting value can be determined based on image element values in an image data block. Determining the starting value of the image data block may include identifying the smallest image element value in the image data block. Determining the starting value of the image data block may also include reducing the number of bits used to represent the smallest image element value. The data representing the determined starting value may have fewer bits than any of the image element values in the image data block.
[0018] The level within a multi-level difference table can be determined based on a determined starting value and one or more image element values in an image data block. Determining the level within the multi-level difference table for an image data block may include: determining the maximum difference between the determined starting value and any image element value in the image data block; and selecting the level from the multi-level difference table whose largest entry most closely represents the determined maximum difference.
[0019] For each image element value, one of the entries in the determined level can be selected based on the image element value and the determined starting value. The selection of one of the entries for each image element value in the determined level within the multi-level difference table may include: determining the difference between the image element values by determining the difference between the determined starting value and the image element value; and selecting the entry from the determined level of the multi-level difference table that best represents the determined difference.
[0020] The first entry in each level of a multi-level difference table can represent a zero value.
[0021] In some examples, the number of bits used to represent a compressed data block does not depend on the value of the image element in the image data block, thus guaranteeing a compression ratio for lossy compression.
[0022] Each image element value may have 8 bits, wherein an image data block may include four image element values, such that an image data block may have 32 bits, and wherein a compressed data block may have 16 bits, including (i) 5 bits representing the determined starting point value, (ii) 3 bits for indicating the determined level, and (iii) 2 bits for each of the four image element values for indicating the selected entry of the image element value.
[0023] Image element values can be in integer format. Image data blocks can be compressed by performing one or more operations, including addition, subtraction, and comparison, on image element values in integer format, but the method of compressing image data blocks may not involve performing any multiplication or division operations.
[0024] An image data block can involve one channel of a multi-channel image data block, where different channels of the multi-channel image data can be compressed independently.
[0025] A multi-channel image data block may be color data of a color value block, including: (i) a first image data block associated with the red channel of the color value block, (ii) a second image data block associated with the green channel of the color value block, and (iii) a third image data block associated with the blue channel of the color value block, wherein color decorrelation may be performed on the color values before independently compressing the three image data blocks. The multi-channel image data may be color data in RGB format, such that each color value includes a red value (R), a green value (G), and a blue value (B), wherein the color decorrelation may include calculating the image element value (R') of the first image data block according to the equation R' = RG, wherein the color decorrelation may include determining the image element value (G') of the second image data block according to the equation G' = G, and wherein the color decorrelation may include calculating the image element value (B') of the third image data block according to the equation B' = BG.
[0026] Multichannel image data can be color data in RGB format, such that each color value includes a red value (R), a green value (G), and a blue value (B). The method may include converting the color data into a luminance-chrominance format, the luminance-chrominance format including: (i) a first image data block associated with the luminance channel (Y) of the color value block, (ii) a second image data block associated with the first chrominance channel (Cb) of the color value block, and (iii) a third image data block associated with the second chrominance channel (Cr) of the color value block, wherein the three image data blocks can be compressed independently after the color data has been converted into the luminance-chrominance format.
[0027] A method for compressing image data blocks can be provided, comprising: determining whether lossless compression of the image data block will satisfy a target compression ratio for the image data block; and if it is determined that lossless compression of the image data block will not satisfy the target compression ratio, performing any of the lossy compression methods described herein on the image data block, wherein the compression ratio of the lossy compression is guaranteed to satisfy the target compression ratio for the image data block. If it is determined that lossless compression of the image data block will satisfy the target compression ratio, lossless compression can be performed on the image data block to form a compressed data block. Determining whether lossless compression of the image data block will satisfy the target compression ratio may include: predicting the amount of compressed data that will be obtained by performing the lossless compression on the image data block; and determining whether the predicted amount of compressed data satisfies the target compression ratio. The step of determining whether lossless compression of the image data block will satisfy the target compression ratio may include: performing lossless compression on the image data block, and determining whether the amount of compressed data obtained by performing the lossless compression on the image data block satisfies the target compression ratio.
[0028] The method may further include storing an indication in a header associated with the compressed data block to indicate whether the block is compressed using lossless compression or lossy compression.
[0029] An image data block may be one of a plurality of image data blocks representing an image, wherein there is a total image target compression ratio associated with the entire image, and wherein the method may include modifying the target compression ratio of the image data block based on the amount of compressed data already formed for other image data blocks associated with the same image, such that the total image target compression ratio is satisfied.
[0030] The method may also include storing compressed data blocks in a memory.
[0031] The method can be performed using dedicated hardware.
[0032] A compression unit is provided, configured to perform lossy compression on an image data block according to a multi-level difference table, wherein the image data block includes a plurality of image element values, and each level of the multi-level difference table includes a plurality of entries. The compression unit includes: start-point value determination logic configured to determine a start-point value of the image data block; level determination logic configured to determine a level of the image data block within the multi-level difference table; entry selection logic configured to select one of the entries in the determined level within the multi-level difference table for each image element value in the image data block; and compression block formation logic configured to form a compressed data block of the image data block, the compressed data block including: (i) data representing the determined start-point value, (ii) an indication of the determined level, and (iii) an indication of the selected entry of the image element value for each image element value in the image data block.
[0033] A compression unit configured to compress image data blocks may be provided, the compression unit comprising: a first compression unit configured to perform lossless compression on the image data blocks; a second compression unit as described in any example herein, the second compression unit configured to perform lossy compression on the image data blocks; and compression technique determination logic configured to determine whether lossless compression of the image data blocks performed by the first compression unit will satisfy a target compression ratio for the image data blocks, wherein the compression technique determination logic is configured to, if it is determined that lossless compression of the image data blocks will not satisfy the target compression ratio, cause the second compression unit to perform lossy compression on the image data blocks, wherein the compression ratio of the lossy compression is guaranteed to satisfy the target compression ratio for the image data blocks.
[0034] A compression unit can be provided that is configured to perform any of the compression methods described herein.
[0035] A method for manufacturing a compression cell as described herein using an integrated circuit manufacturing system may be provided, the method comprising: processing a computer-readable description of the compression cell using a layout processing system to generate a circuit layout description of an integrated circuit including the compression cell; and manufacturing the compression cell according to the circuit layout description using an integrated circuit generation system.
[0036] A computer-implemented method for decompressing a compressed data block according to a multi-level difference table can be provided, wherein the compressed data block represents an image data block comprising multiple image element values, wherein each level of the multi-level difference table comprises multiple entries, the method comprising: determining a starting value of the image data block using data representing a starting value from the compressed data block; identifying a level within the multi-level difference table for the image data block using an indication of a level from the compressed data block; for each image element value in the image data block: identifying one of the entries of the identified level within the multi-level difference table using a corresponding entry indication from the compressed data block; and determining the image element value using: (i) the determined starting value of the image data block, and (ii) the identified entries of the identified level within the multi-level difference table for the image element value.
[0037] A decompression unit configured to decompress compressed data blocks according to a multi-level difference table can be provided, wherein the compressed data block represents an image data block comprising multiple image element values, wherein each level of the multi-level difference table comprises multiple entries, the decompression unit comprising: start-point value determination logic configured to determine a start-point value of the image data block using data representing a start-point value from the compressed data block; level identification logic configured to identify a level within the multi-level difference table for the image data block using an indication from the level of the compressed data block; and image element value determination logic configured, for each image element value in the image data block: to identify one of the entries of the identified level within the multi-level difference table using a corresponding entry indication from the compressed data block; and to determine the image element value using: (i) the determined start-point value of the image data block, and (ii) the identified entries of the identified level within the multi-level difference table for the image element value.
[0038] Compression and / or decompression units may be included in hardware on the integrated circuit. A method for manufacturing compression and / or decompression units in an integrated circuit manufacturing system can be provided. An integrated circuit definition dataset may be provided, which, when processed in the integrated circuit manufacturing system, configures the system to manufacture compression and / or decompression units. A non-transitory computer-readable storage medium may be provided, on which a computer-readable description of an integrated circuit is stored, which, when processed in the integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture an integrated circuit including compression and / or decompression units.
[0039] An integrated circuit manufacturing system may be provided, comprising: a non-transitory computer-readable storage medium storing a computer-readable integrated circuit description thereon describing compression and / or decompression units; a layout processing system configured to process the integrated circuit description to generate a circuit layout description of the integrated circuit including compression and / or decompression units; and an integrated circuit generation system configured to manufacture compression and / or decompression units according to the circuit layout description.
[0040] Computer program code for performing the methods described herein may be provided. In other words, computer-readable code configured to cause any of the methods described herein to be performed when the code is executed 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, cause the computer system to perform the methods described herein.
[0041] As will be apparent to those skilled in the art, the above features can be appropriately combined, and can be combined with any aspect of the examples described herein. Attached Figure Description
[0042] The invention is described by way of example with reference to the accompanying drawings. In the drawings:
[0043] Figure 1 A computer system is shown that implements a compression / decompression unit on a graphics processing unit;
[0044] Figure 2 An image data array including image data blocks is shown;
[0045] Figure 3a A lossy compression unit is shown;
[0046] Figure 3b This is a flowchart of a method for performing lossy compression on image data blocks;
[0047] Figure 4 This is a flowchart of a method for determining the levels within a multi-level difference table used to compress image data blocks;
[0048] Figure 5 This is a flowchart of a method for selecting entries based on the level determined for each image element value within an image data block;
[0049] Figure 6 An exemplary format for compressed data blocks is shown;
[0050] Figure 7 The lossy decompression unit is shown;
[0051] Figure 8 This is a flowchart of the method for decompressing compressed data blocks;
[0052] Figure 9 A compression unit is shown, which includes a lossless compression unit and a lossy compression unit;
[0053] Figure 10 Is using Figure 9 A flowchart of a method for compressing image data blocks using a compression unit;
[0054] Figure 11 A decompression unit is shown, which includes a lossless decompression unit and a lossy decompression unit;
[0055] Figure 12 Is using Figure 11 A flowchart illustrating the method by which the decompression unit decompresses compressed data blocks; and
[0056] Figure 13An integrated circuit manufacturing system for producing integrated circuits containing compression or decompression units as described herein is shown.
[0057] The accompanying drawings illustrate various examples. Those skilled in the art will understand that the element boundaries (e.g., boxes, groups of boxes, or other shapes) shown in the drawings represent one example of a boundary. In some examples, it may be that one element can be designed as multiple elements, or multiple elements can be designed as one element. Where appropriate, common reference numerals are used throughout the drawings to indicate similar features. Detailed Implementation
[0058] The following description is given by way of example to enable those skilled in the art to make and use the invention. The invention is not limited to the embodiments described herein, and various modifications to the disclosed embodiments will be readily apparent to those skilled in the art. Embodiments are described by way of example only.
[0059] As mentioned above, a lossy compression technique (along with complementary decompression techniques) that guarantees a fixed compression ratio (e.g., 2:1) may be useful without excessive loss of data quality, such as the introduction of visually perceptible artifacts into the image due to lossy compression. Some prior high-end lossy compression algorithms can achieve a fixed compression ratio without significant loss of data quality, but these algorithms involve performing complex operations on floating-point or fixed-point values (e.g., filtering, multiplication, and division) and may require internal buffering of values during the compression process. Therefore, these prior high-end lossy compression algorithms are generally considered unsuitable for small, low-cost, and / or low-power computing systems, such as those implemented in mobile devices (e.g., smartphones and tablets, or other devices with size, cost, and / or power constraints).
[0060] A previous low-end lossy compression technique involved compressing data values by truncating them, that is, simply removing some of the least significant bits (LSBs) from the data value. To achieve a 2:1 compression ratio, half of the bits in the data value would need to be removed. While this low-end lossy compression technique can be implemented in small, low-cost, and low-power systems, it often results in unacceptable degradation of data quality. For example, if the data values are pixel values of an image, this low-end lossy compression technique often introduces visible banding artifacts into the image, which is generally undesirable.
[0061] This paper describes examples of lossy compression and decompression techniques that guarantee a fixed compression ratio (e.g., 2:1) without excessive loss of data quality (e.g., no significant visually perceptible artifacts introduced into the image due to lossy compression) and can be implemented in small, low-cost, and low-power computing systems. The examples described herein are easy to implement. For example, these examples can operate on image element values in integer format rather than floating-point format, and can be performed by performing simple operations (e.g., addition, subtraction, and comparison operations) without performing more complex operations (which may be enormous in terms of the amount of data required to represent the values), such as multiplication or division, and without requiring internal buffering of the values during the compression or decompression process. In these examples, these simple operations (e.g., addition, subtraction, and comparison operations) are "integer operations," meaning they operate on integers, such as operating on image element values in integer format.
[0062] The lossy compression techniques described herein can be implemented in compression units implemented in dedicated hardware (e.g., using fixed-function circuitry). Similarly, the lossy decompression techniques described herein can be implemented in decompression units implemented in dedicated hardware (e.g., using fixed-function circuitry). In these examples, the compression and decompression units can be smaller in physical size (e.g., silicon area) compared to previous high-end compression and decompression units implemented in hardware. The lossy compression and decompression units described herein are suitable for implementation in small, low-cost processing units (e.g., GPUs or CPUs) with small silicon area, low power consumption, and low latency. This is achieved without significantly degrading data quality (e.g., image quality).
[0063] The image data to be compressed can be represented as a 2D array of image element values (e.g., pixel values). If the image data includes multiple channels, the different channels are compressed independently (although preprocessing steps for compression can be performed for color decorrelation or to convert RGB values to YCbCr values, and corresponding postprocessing steps can be performed after decompression). In the example described herein, at least one block of image elements (e.g., a 2x2 block) within the array is compressed in a lossy manner.
[0064] Figure 2An image data array comprising image data blocks is shown. In this example, image data array 200 represents an image represented by pixel values, where the image data blocks are 2x2 blocks of pixel values. The upper-left block of pixel values is indicated by reference numeral 202, which consists of up to four pixel values 2040, 2041, 2042, and 2043. In other examples, the image data blocks may have different sizes and / or shapes. For example, in other examples, given only two instances, the image data blocks may be 4x1 blocks of image element values or 4x4 blocks of image element values.
[0065] The examples described in this document involve compressed pixel value blocks, where pixel values represent images. However, it should be understood that pixel values are merely one example of image element values that can be compressed using the techniques described herein. More generally, image data blocks can be compressed to form compressed data blocks, and compressed data blocks can be decompressed to form image data blocks, where image data comprises multiple image element values. To give some examples, image element values can be: (i) texel values representing textures; (ii) pixel values representing images; (iii) depth values representing surface depths at different sampling locations within a scene; (iv) surface normal values representing the direction of the surface normal vector at different sampling locations within a scene; or (v) illumination values representing illumination on a surface at different sampling locations within a scene. Illumination values represent a “light map.” A light map can be considered a texture, allowing it to be used and processed in the same way as a texture. Pixel values and texel values are examples of color values (where pixel values represent images and texel values represent textures). These color values can be monochromatic, i.e., they have monochromatic channels. However, in some examples, color values can be multi-channel values. For example, color values can be in RGB format, where they have a red channel (R), a green channel (G), and a blue channel (B). In other examples, color values can be in RGBA format, where they have a red channel (R), a green channel (G), a blue channel (B), and an alpha channel (A). In other examples, color values can be in YCbCr format, where the color value has a luma channel (Y), a first chroma channel (Cb), and a second chroma channel (Cr). As is known in the art, multichannel color values can have many other formats. Each channel of a multichannel color value includes a value associated with that particular channel. The values of the different channels of a multichannel color value can be compressed and decompressed independently. In the examples described herein, when we refer to “pixel values,” we may be referring to the value of one channel of a multichannel color value.
[0066] As a brief overview of the lossy compression technique described herein, pixel value block 202 can be compressed by: determining a starting value (e.g., a base value) for block 202; selecting (or "determining" or "identifying") a level within a multi-level interpolation table (which may be referred to as a multi-level quantization increment table); and for each pixel value 204 in block 202, using some bits (e.g., 2 bits per pixel value) to select one of the entries for the selected level in the multi-level interpolation table. The entries in the multi-level interpolation table represent the difference (i.e., adjustment value) from the starting value. The size of the value range represented by the entries in the level differs for different levels of the multi-level interpolation table. This allows the level to be selected based on the size of the range of pixel values within the pixel value block.
[0067] Now for reference Figure 3a and Figure 3b Describe an example of lossy compression techniques. Figure 3a A compression unit 302 configured to perform lossy compression on blocks of image data according to a multi-level difference table is shown. Compression unit 302 may be implemented as part of compression / decompression unit 112 within GPU 104. Compression unit 302 is configured to receive blocks of image data, perform lossy compression on the blocks to form compressed data blocks, and output the compressed data blocks, for example, for storage in memory. Compression unit 302 includes start-point value determination logic 304, level determination logic 306, entry selection logic 308, and compressed block formation logic 310. The start-point value determination logic 304, level determination logic 306, entry selection logic 308, and compressed block formation logic 310 may be implemented in dedicated hardware, such as in fixed-function circuitry.
[0068] Figure 3b This is a flowchart of a method for performing lossy compression on image data block 202. As described in more detail below, in step S312, preprocessing can be performed on the image data block. This step... Figure 3b The image is shown in dashed lines because this step is optional. In step S314, image data block 202 is received at compression unit 302. Image data block 202 is provided to start-point value determination logic 304, level determination logic 306, and entry selection logic 308. Figure 2 As shown in the example, image data block 202 is a 2x2 block of pixel values 2040 to 2043.
[0069] In step S316, the starting point value determination logic 304 determines the starting point value of the pixel data block 202. The starting point value is determined based on the pixel values 204 in the pixel data block 202. For example, the starting point value can be a base value, which is determined by identifying the minimum pixel value in the pixel value block 202. Identifying the minimum value from a set of values is a simple process to be performed in the processing logic, and the method for identifying the minimum value from a set of values is known in the art.
[0070] Determining the base value may also involve reducing the number of bits used to represent the smallest pixel value in pixel value block 202. Some bits of the base value may be implicit; for example, one or more least significant bits may be implicitly zero, so that they do not need to be stored when storing the base value. For example, each of the pixel values 204 may be represented using 8 bits, and the base value may be represented using less than 8 bits, such as 5 bits. In this way, the data representing the base value may include fewer bits (e.g., 5 bits) than any of the pixel values 204 in pixel data block 202 (e.g., 8 bits). Reducing the number of bits used to represent the base value may involve identifying the smallest pixel value 204 in pixel value block 202 and rounding the smallest pixel value according to a rounding mode. For example, the rounding mode may be a rounding mode towards zero, and the rounding may involve truncating (or “pinching”) the smallest pixel value, i.e., replacing one or more (e.g., three) least significant bits (LSBs) of the smallest pixel value with zero so that these bits do not need to be stored. This is very simple to implement. In other examples, the rounding mode could be a rounding mode that rounds from far zero or a rounding mode that rounds to the nearest value, but these rounding modes may be slightly more complex to implement than simply pinching off the smallest pixel value.
[0071] Level determination logic 306 receives: (i) pixel data block 202, and (ii) an indication of the determined start-point value from start-point value determination logic 304. In step S318, level determination logic 306 determines, for example, a level within a multi-level difference table of pixel data block 202 based on the determined start-point value and one or more pixel values 204 in pixel value block 202. This step is described herein as “determining” a level within a multi-level difference table, and it should be understood that this can also be described as “selecting” or “identifying” a level within a multi-level difference table. Each level of the multi-level difference table includes multiple entries. Each entry in the multi-level difference table represents a value that can be used to represent the difference (or “increment”) between a pixel value and a start-point value. In the example, each level described herein includes the same number of entries. As mentioned above, the size of the value range represented by the entries in the level differs for different levels of the multi-level difference table. In this way, different levels are suitable for representing pixel data blocks having different distributions of pixel values within them. For example, some levels of a multi-level interpolation table have entries representing small value ranges, and these levels can be used to compress pixel data blocks where pixel values do not vary much; while other levels of the multi-level interpolation table have entries representing large value ranges, and these levels can be used to compress pixel data blocks where pixel values do vary greatly. Often, there is some correlation between pixel values within a small block, so pixel values within a pixel data block are often very similar to each other (e.g., if all pixel values represent the same object in the image). Smaller levels of the multi-level interpolation table will be useful in these cases and will not introduce large errors into the pixel values. However, larger levels of the multi-level interpolation table can still compress blocks where pixels are not very similar. An exemplary multi-level interpolation table is shown in Table 1. This example is for 8-bit pixel values, such that each pixel value is in the range of 0 to 255. In different examples, the multi-level interpolation table may differ from that shown in Table 1.
[0072] 0 0 2 4 8 1 0 4 8 16 2 0 8 16 32 3 0 16 32 64 4 0 32 64 96 5 0 48 96 128 6 0 64 128 176 7 0 96 192 248
[0073] Table 1: Multilevel Difference Table
[0074] In this example, the first entry in each level of the multi-level interpolation table represents a zero value. This is not required, but it can be useful in some cases because it allows zero pixel values to be compressed without changing their values (e.g., it can be used to represent pure black). Therefore, in these examples, using a multi-level interpolation table to compress the pixel values of an image does not introduce artifacts into areas of pure black in the image. Furthermore, since each level has zero as its first entry, it may not be necessary to store the value of the first entry for each level in the multi-level interpolation table, thus reducing the amount of memory required to store the multi-level interpolation table.
[0075] The multi-level interpolation table is predetermined. In other words, the values of the entries in the multi-level interpolation table are determined before a method for performing lossy compression (or lossy decompression) on the image data blocks begins. In some examples, the multi-level interpolation table is stored in a small dedicated memory, such as on compression unit 302, and level determination logic 306 and entry selection logic 308 can perform a lookup of this memory to access data from the stored multi-level interpolation table. In other examples, the values of the multi-level interpolation table can be hardcoded into the circuitry of level determination logic 306 and entry selection logic 308. Storing the multi-level interpolation table in memory allows the values of the entries in the multi-level interpolation table to be changed after compression unit 302 has been manufactured, thus allowing for greater flexibility in how compression unit 302 performs lossy compression. However, hardcoding the values of the multi-level difference table into the circuitry of level determination logic 306 and entry selection logic 308 would provide faster execution (thus reducing the latency of the compression process) and would avoid using memory to store the multi-level difference table (thus reducing the silicon area of the compression unit 302). However, it would be difficult to change the values of the multi-level difference table after the compression unit 302 is manufactured. Therefore, hardcoding the values of the multi-level difference table into the circuitry of the compression unit 302 is a relatively inflexible method.
[0076] In the examples shown in Table 1, the values of the entries have low Hamming weights, meaning that when represented as binary numbers, they have a relatively low number of 1s and a relatively large number of zeros in their binary representation. This makes it simpler to implement comparisons of these values with these numbers in hardware that performs operations on binary numbers.
[0077] Figure 4 This is a flowchart illustrating an example of how step S318 is performed in level determination logic 306 to determine (i.e., identify) the level within a multi-level difference table of pixel data block 202. According to Figure 4 The method shown determines the maximum difference between the determined starting point value and any one of the pixel values 204 in pixel data block 202, and then selects the largest entry from the multi-level difference table to represent the level of the determined maximum difference.
[0078] Specifically, in step S402, an image data block (e.g., pixel data block 202) and a starting value (e.g., a base value) determined by the starting value determination logic 304 are received at level determination logic 306. In step S404, level determination logic 306 identifies the maximum pixel value (pixel value) in pixel data block 202. max In step S406, the maximum difference (Diff) is determined by subtracting the starting value (in this example, the base value) from the maximum pixel value. max In other words, Diff max =pix max-baseValue.
[0079] By comparing the last entry in one or more levels of a multi-level difference table with the maximum difference Diff max A comparison is made to determine the level in the multi-level difference table. Specifically, in step S408, the largest difference Diff is selected. max Compare with the largest entry in the highest level of the multi-level difference table. In the example shown in Table 1 above, the highest level is level 7, and the largest entry in level 7 represents the value 248. If the maximum difference Diff max If the value is greater than or equal to the largest entry in the maximum level of the multi-level difference table, the method proceeds to step S410, where the level is set to the maximum level (e.g., level 7). This level allows for representing very large differences between pixel values 204 within pixel block 202. An example of a situation where such large differences may occur within a pixel block is when one or more pixels within the block represent completely bright white areas (e.g., a value of 255 in each 8-bit color channel) and one or more pixels within the block represent completely black areas (e.g., a value of 0 in each color channel), such as when the pixels represent text, for example, black text on a white background.
[0080] If the maximum difference Diff max If the value is less than the largest entry in the maximum level of the multi-level difference table, the method proceeds from step S408 to step S412, where parameter i is set to zero. Then, in step S414, level determination logic 306 determines the maximum difference Diff. max Is it less than or equal to the largest entry in level i of the multi-level difference table? In the example shown in Table 1 above, the largest entry in level 0 represents the value 8. If Diff max If the largest entry in level i of the multi-level difference table is not less than or equal to the largest entry, the method proceeds from step S414 to step S416, where parameter i is incremented, and then the method returns to step S414 to consider the next level (e.g., level 1 in this iteration). In the example shown in Table 1 above, the largest entry in level 1 represents the value 16. This loop between steps S414 and S416 continues until the Diff is determined in step S414. max If the maximum entry in level i of the multi-level difference table is less than or equal to the maximum entry, the method proceeds to step S418.
[0081] In step S418, the maximum entry and the maximum difference Diff in level i are determined. max The difference between (D) i And determine the maximum difference Diff. max The difference (D) between the largest entry in level (i-1) and the largest entry in level (i-1)i-1 In step S420, the level determination logic 306 determines whether D. i-1 <D i If D i-1 Less than D i If so, the method proceeds to step S422, where the level is set to level (i-1). However, if D i-1 Not less than D i (For example, if D) i-1 Greater than D i If the condition is met, the method proceeds to step S424, where the level is set to level i. Therefore, steps S408 to S424 involve selecting the entry from the multi-level difference table that most closely represents the maximum difference Diff. max Examples of the process methods at the level of [level].
[0082] For example, if the four pixel values 204 within pixel data block 202 are 8-bit values representing 52 (i.e., binary 00110100), 46 (i.e., binary 00101110), 60 (i.e., binary 00111100), and 66 (i.e., binary 01000010), then in this example, the starting value, i.e., the base value, can be determined as follows: by replacing the three least significant bits of the smallest of these four values (i.e., value 46) with zeros, making the base value 40 (i.e., binary value 00101000). This base value can be stored by storing only the first five bits (00101). In this example, the maximum difference Diff... max The value will be 26 because 66 - 40 = 26. Therefore, in this example, the loop in steps S414 and S416 will choose i as 2 because 26 is greater than 16 (which is the largest entry in level 1) but less than 32 (which is the largest entry in level 2). Therefore, in this example, D i =6 and D i-1 =10, therefore the level will be set to level 2.
[0083] return Figure 3b After step S318, in step S320, for each pixel value 204 in pixel data block 202, for example, based on pixel value 204 and starting value, one of the entries of the level determined in the multi-level difference table is selected.
[0084] Figure 5 This is a flowchart illustrating an example of how step S320 is performed in entry selection logic 308 to select an entry at a level determined for each pixel value 204 in pixel data block 202. According to... Figure 5In the method shown, in step S502, entry selection logic 308 receives: (i) pixel data block 202, (ii) a starting value determined by starting value determination logic 304, and (iii) a level determined by level determination logic 306 (referred to herein as "level"). set The instructions of ").
[0085] In step S504, the entry selection logic 308 sets parameter j to zero. In step S506, the entry selection logic 508 determines the difference Diff of pixel j. j This can be achieved by using the j-th pixel value ("pixelValue"). j The difference is achieved by subtracting the starting value (i.e., the base value) from the original value. In other words, the Diff is... j =pixelValue j -baseValue.
[0086] In step S508, the difference Diff of pixel j is... j The level determined by the multi-level difference table (i.e., level) set The largest entry in ) is compared. In the example shown in Table 1, and in level set In the example of level 2, the largest entry represents a value of 32. If Diff j Greater than or equal to the level of the multi-level difference table set If the largest entry in the list is found, the method proceeds to step S510, where the entry for pixel j is set to level. set The largest entry in the list.
[0087] If Diff j Less than the level of the multi-level difference table set If the largest entry is found, the method proceeds to step S512, where parameter k is set to zero. Then, in step S514, entry selection logic 308 determines the difference Diff of pixel j. j Is it less than or equal to the level determined by the multi-level difference table (i.e., level)? set The k-th entry in ). For example, in Table 1 shown above, entry 0 in level 2 represents the value 0. If Diff j The level is not less than or equal to the level of the multi-level difference table. set If the k-th entry is found, the method proceeds from step S514 to step S516, where the parameter k is incremented, and then the method returns to step S514 to consider the level. setThe next entry (e.g., entry 1 in this iteration). In the example shown in Table 1 above, entry 1 in level 2 represents the value 8. This loop of steps S514 and S516 continues until the Diff is determined in step S514. j Less than or equal to the level of the multi-level difference table set The method proceeds to step S518 after finding the kth entry in the sequence.
[0088] In step S518, the level is determined. set The difference between the k-th entry and pixel j (Diff) j The difference between them (Diff) k And determine the difference Diff of pixel j. j with level set The difference (Diff) between the (k-1)th entries in the data. k-1 In step S520, the entry selection logic 308 determines whether to diff. k-1 <Diff k If Diff k-1 Less than Diff k Then the method proceeds to step S522, where the entry for pixel j is set to level. set The entries (k-1). However, if Diff k-1 Not less than Diff k Then the method proceeds to step S524, where the entry for pixel j is set to level. set Entry k.
[0089] Therefore, steps S508 to S524 involve selecting the determined difference Diff from the determined levels of the multi-level difference table that best represents the j-th pixel. j An example of the process of creating an entry.
[0090] In step S526, the entry selection logic 308 determines whether (j+1) is equal to the number of pixels 204 in pixel block 202. If (j+1) is not equal to the number of pixels 204 in pixel data block 202, it means that there are more pixel values in pixel data block 202 for which an entry should be selected. Therefore, the method proceeds to step S528, where parameter j is incremented, and the method returns to step S506, such that the next pixel value in the pixel block can have an entry selected for it by the entry selection logic 308.
[0091] If it is determined in step S526 that (j+1) is indeed equal to the number of pixels 204 in pixel block 202, this means that an entry has been selected for each pixel value in pixel data block 202. Therefore, step S320 is completed, and the method proceeds to step S322.
[0092] Continuing with the example given above, the four pixel values 204 within pixel data block 202 are 8-bit values representing values 52 (i.e., binary 00110100), 46 (i.e., binary 00101110), 60 (i.e., binary 00111100), and 66 (i.e., binary 01000010), with a base value of 40 (i.e., binary value 00101000), and the level determination logic 306 selects level 2 from a multi-level difference table for this pixel data block. This base value can be stored by storing only the five most significant bits (00101), while the three least significant bits are implicitly zero and do not need to be stored. In this example, the differences between the four pixel values are 12, 6, 20, and 26. Therefore, as can be seen from Table 1 above, the selected entries for these four pixel values will be entry 2 (representing value 16), entry 1 (representing value 8), entry 2 (representing value 16), and entry 3 (representing value 32), respectively.
[0093] return Figure 3b Following step S320, the method proceeds to step S322, where compression block forming logic 310 forms a compressed data block of pixel data blocks. Compression block forming logic 310 receives: (i) data representing a determined start value from start value determination logic 304, (ii) an indication of a determined level from level determination logic 306, and (iii) an indication of a selected entry for each image element value (e.g., for each pixel value 204 in pixel data block 202) from entry selection logic 308. The compressed data block formed by compression block forming logic 310 includes: (i) data representing a determined start value of pixel data block 202, (ii) an indication of a determined level of pixel data block 202, and (iii) an indication of a selected entry for each pixel value 204 in pixel data block 202.
[0094] In step S324, compressed data blocks are output from compression unit 302. These compressed data blocks can be stored, for example, in memory, such as memory 106.
[0095] Figure 6 An example of the format of compressed data block 600 is shown. Figure 6 The example shown involves compressing a pixel data block 202 comprising four pixel values 204, with each pixel value 204 having 8 bits. In this example, 32 bits are used to represent the uncompressed pixel data block 202. Figure 6 In the example shown, the compressed data block has 16 bits, enabling a 2:1 compression ratio. In other words, the number of bits used to represent the compressed data block 600 is half the number of bits used to represent the (uncompressed) image data block, resulting in a 2:1 compression ratio for lossy compression. This compression ratio is guaranteed. In other words, the number of bits used to represent the compressed data block 600 does not depend on the value of the pixel value 204 in the pixel data block 202. The compressed data block 600 includes: (i) 5 bits representing the determined starting value 602, (ii) 3 bits representing an indication of the determined level 604, and (iii) 2 bits for each of the four pixel values, indicating the selected entry for that pixel value 6060, 6061, 6062, and 6063. It should be noted that using 3 bits to indicate the level allows up to eight different levels to be indicated in a multi-level difference table, and using 2 bits for each indication of the selected entry allows up to four entries per level. Therefore, Figure 6 The format of the compressed data block 600 shown is suitable (i.e., compatible) for use with the multi-level difference table shown in Table 1 above.
[0096] In other examples, different multilevel difference tables can be used, and the compressed data blocks can have different formats. The format of the compressed data blocks, the number of levels in the multilevel difference table, and the number of entries in each level of the multilevel difference table can be chosen together, for example, such that the number of levels (L) and the number of bits used to indicate the levels (N) in the multilevel difference table are... L Related to ) And make the number of entries (E) in each level of the multi-level difference table and the number of bits (N) used to indicate the selected entry for each pixel value. E Related to )
[0097] For example, in different systems, if a 4x4 block of 8-bit pixel values is compressed (making the uncompressed pixel data block 128 bits), the compressed data block can have 8 bits for the start value, 8 bits for indicating the level, and 3 bits for each of the 16 pixel values to indicate the selected entry. Therefore, the compressed data block will have 64 bits, and the compression ratio will be 2:1. In this example, the multi-level difference table can have up to 256 levels (because 2... 8 =256), and each level can have 8 entries (because 2 3 =8).
[0098] In another different example, the target compression ratio could be 4:3, and 2x2 blocks of 8-bit pixel values could be compressed, resulting in an uncompressed pixel data block of 32 bits and a compressed data block of 24 bits. In this example, the compressed data block could have 8 bits for the starting value, 4 bits for indicating the level, and 3 bits for each of the four pixel values to indicate the selected entry. In this example, the multi-level difference table could have up to 16 levels (because 2...). 4 =16), and each level can have 8 entries (because 2 3 =8).
[0099] It should be noted that in the two alternative examples given above, the starting value is represented with the same number of bits as one of the original pixel values, so it does not need to be rounded or "pinched" or "truncated" in these examples.
[0100] The example described above relates to a compression unit 302 (e.g., configured in dedicated hardware (e.g., fixed-function circuitry)) that performs lossy compression to compress image data blocks to form compressed data blocks. Now, a decompression unit (e.g., configured in dedicated hardware (e.g., fixed-function circuitry)) is described that performs lossy decompression to decompress the compressed data blocks to form image data blocks. The decompression unit performs a decompression technique complementary to the compression technique used to compress the data, such that the decompressed image data block is similar to the original image data block before compression (although the decompressed image data block is not necessarily exactly the same as the original image data block before compression, as some data may be lost during lossy compression and decompression). As a brief overview of the decompression process, the compressed data block (e.g., for a 2x2 pixel block) is read, thereby reading data representing a starting value (e.g., a base value), an indication of the level in a multi-level difference table, and an indication of the selected entry for each image element value (e.g., a pixel value). The decompressed pixel values can then be determined by adding the base value to the value represented by the corresponding entry from the multi-level difference table.
[0101] Now refer to Figure 7 and Figure 8 An example describing a decompression technique. Figure 7A decompression unit 702 is shown, configured to perform lossy decompression on compressed data blocks according to a multi-level difference table. The decompression unit 702 may be implemented as part of a compression / decompression unit 112 within a GPU 104. The decompression unit 702 is configured to receive compressed data blocks, perform decompression on the compressed data blocks to form (decompressed) image data blocks, and output the image data blocks, for example, for further processing in the GPU 104. The decompression unit 702 includes start-point value determination logic 704, level recognition logic 706, and image element value determination logic 708. The start-point value determination logic 704, level recognition logic 706, and image element value determination logic 708 may be implemented in dedicated hardware, such as in fixed-function circuitry.
[0102] Figure 8 This is a flowchart of a method for decompressing a compressed data block using decompression unit 702. In step S802, a compressed data block is received at decompression unit 702. The compressed data block is provided to start-point value determination logic 704, level recognition logic 706, and image element value determination logic 708. The compressed data block may have been compressed using one of the exemplary compression techniques described above. Specifically, in the example described herein, compressed data block 600 has... Figure 6 The format shown.
[0103] In step S804, the start-point value determination logic 704 uses data representing the start-point value from the compressed data block to determine the start-point value of the image data block. For example, this might involve appending one or more bits (e.g., zeros) to the data representing the start-point value 602 in the compressed data block. For instance, if the (uncompressed) pixel value has 8 bits, and if there is a 5-bit 602 representing the start-point value in the compressed data block 600, step S804 might include appending three zeros to the least significant end of the 5-bit 602 representing the start-point value in the compressed data block 600. As mentioned above, in some other examples, the data representing the start-point value in the compressed data block might have the same number of bits as one of the image element values; in this case, step S804 would only involve reading those bits from the compressed data block (i.e., in these other examples, it is not necessary to append additional bits to the data representing the start-point value).
[0104] In step S806, the level identification logic 706 uses the level indication 604 from the compressed data block 600 to identify the level within the multi-level difference table of the image data block. For example, the level indication 604 includes three bits, which can act as an index indicating one of the eight levels within the multi-level difference table, as shown in Table 1 above, for example. As mentioned above, the size of the value range represented by the entries in the level differs for different levels of the multi-level difference table.
[0105] Image element value determination logic 708 receives an indication of a level identified by level recognition logic 706 and a starting value determined by starting value determination logic 704. In step S808, image element value determination logic 708 uses a corresponding entry indication 606 from compressed data block 600 to identify one of the entries in the multi-level difference table at the identified level for each pixel value in the pixel data block.
[0106] In step S810, the image element value determination logic 710 uses the starting point value determined for the pixel data block and the identified entries at the levels identified for the pixel values in the multi-level difference table to determine each pixel value. For example, step S810 may include summing the values represented by the starting point value determined for the pixel data block and the identified entries at the levels identified for the pixel values in the multi-level difference table. If the sum is greater than the maximum possible pixel value, the pixel value is set to that maximum possible pixel value. For example, if the pixel value has 8 bits, then 255 (represented in binary as 11111111) is the maximum possible pixel value, so if the sum used to determine the pixel value is greater than 255, the pixel value is set to 255. If the pixel values have different numbers of bits, the maximum possible pixel values will be different.
[0107] Similar to the compression unit 302 mentioned above, the multi-level difference table can be stored in the memory within the decompression unit 702, wherein the level recognition logic 706 and the image element value determination logic 708 can perform a lookup in the memory to access the multi-level difference table; or the multi-level difference table can be hardcoded into the circuitry of the level recognition logic 706 and the image element value determination logic 708.
[0108] In step S812, pixel data blocks are output (decompressed) from decompression unit 702, for example, for further processing in GPU 104. As described in more detail below, post-processing can be performed on the image data blocks in step S814. This step... Figure 8 The dashed line indicates this step because it is optional.
[0109] The decompression process is very simple to implement and may include, for example, performing addition (or subtraction in some examples), but may not involve performing complex operations such as multiplication or division or any buffering of internal values during decompression. As mentioned above, pixel values can be in integer format (instead of more complex formats such as floating-point format).
[0110] In the example above, the starting value is the base value (representing the minimum pixel value within the pixel data block), and the differences represented by entries in the multi-level difference table represent the addition to the base value, thus representing the pixel values within the pixel data block. However, in other examples, the starting value can be the highest value (representing the maximum pixel value within the pixel data block), and the differences represented by entries in the multi-level difference table can represent the subtraction from the highest value, thus representing the pixel values within the pixel data block. In other examples, the starting value can be an intermediate value (representing the midpoint between the maximum and minimum pixel values within the pixel data block), and the differences represented by entries in the multi-level difference table can be in signed format, allowing them to represent additions or subtractions relative to the intermediate value, thus representing the pixel values within the pixel data block.
[0111] As described above, some examples are described in detail in this document with reference to pixel data blocks including pixel values, but more generally, a decompression process can be performed on image data blocks including image element values, where, to name a few, the image element values can be pixel values, texel values, depth values, surface normal values, or illumination values.
[0112] As described above, in some examples, there may be some preprocessing (in step S312) and some postprocessing (in step S814) performed on the image data block. For example, the image data block may involve one channel of a multi-channel image data block, wherein different channels of the multi-channel image data can be compressed and decompressed independently. For example, the multi-channel image data block may be color data of a color value block, including: (i) a first image data block associated with the red channel of the color value block, (ii) a second image data block associated with the green channel of the color value block, and (iii) a third image data block associated with the blue channel of the color value block. Before independently compressing the three image data blocks, color decorrelation may be performed on the color values in step S312.
[0113] Color value errors can occur in images that have been compressed and then decompressed using lossy compression techniques. Errors introduced by lossy compression can further stretch color channel values. Furthermore, in situations where the red, green, and blue channels are highly correlated (e.g., to represent gray), errors in variation between different color channels may be more easily perceived by the viewer. For example, lossy compression may introduce noticeable colors into areas of the image that should be gray. Applying color decorrelation to channels before (independent) lossy compression of each channel can help reduce color distortion introduced into the image (e.g., into gray areas of the image).
[0114] When multi-channel image data is in RGB format, a simple color decorrelation technique can be used so that each color value includes a red (R), a green (G), and a blue (B) value. The color decorrelation process (e.g., step S312) may include:
[0115] The image element value (R') of the first image data block is calculated according to the equation R' = RG;
[0116] The image element values (G') of the second image data block are determined according to the equation G' = G; and
[0117] The image element value (B') of the third image data block is calculated according to the equation B' = BG.
[0118] Then, the first, second, and third image data blocks (with values R', G', and B') can be compressed independently as described above.
[0119] When the data is decompressed, as described above, after the compressed data blocks associated with the three image data blocks have been decompressed independently, post-processing step S814 can perform color re-correlation on the color values. For example, the color re-correlation process (e.g., step S814) may include:
[0120] According to the equation R = R' + G', the red value (R) is calculated using the image element value (R') that has been decompressed from the first compressed data block and the image element value (G') that has been decompressed from the second compressed data block;
[0121] The green value (G) is determined using the image element values (G') that have been decompressed from the second compressed data block, according to the equation G = G'; and
[0122] According to the equation B = B' + G', the blue value (B) is calculated using the image element value (B') that has been decompressed from the third compressed data block and the image element value (G') that has been decompressed from the second compressed data block.
[0123] In other examples, these preprocessing and postprocessing steps may involve converting multichannel values to different color spaces, rather than performing color decorrelation and color re-correlation in the preprocessing and postprocessing steps (steps S312 and S814). For example, if the multichannel image data is color data in RGB format, such that each color value includes a red value (R), a green value (G), and a blue value (B), then step S312 may include converting the color data to a luma-chroma format, for example, including: (i) a first image data block associated with the luma channel (Y) of the color value block, (ii) a second image data block associated with the first chroma channel (Cb) of the color value block, and (iii) a third image data block associated with the second chroma channel (Cr) of the color value block. After the color data has been converted to the luma-chroma format, the three image data blocks can be compressed independently as described above. Converting the color data to the YCbCr color space before lossy compression can help reduce color distortion in the image (e.g., in the gray areas of the image).
[0124] The method for converting from RGB format to YCbCr format is known in the art and can be implemented according to the following equation:
[0125] Y = 0 + 0.299R + 0.587G + 0.114B
[0126] Cb=128–0.168736R–0.331264G+0.5B
[0127] Cr=128+0.5R–0.418688G–0.081312B
[0128] When the data is decompressed, as described above, after the compressed data blocks associated with the three image data blocks have been decompressed independently, post-processing step S814 can convert the color data from YCbCr format back to RGB format. For example, the three compressed data blocks are decompressed independently to determine multi-channel color data in a luminance-chrominance format, which includes: (i) a first image data block associated with the luminance channel (Y), (ii) a second image data block associated with the first chrominance channel (Cb), and (iii) a third image data block associated with the second chrominance channel (Cr), and step S814 may include converting the color data into RGB format such that each color value includes a red value (R), a green value (G), and a blue value (B).
[0129] The method for converting from YCbCr format to RGB format is known in the art and can be implemented according to the following equations:
[0130] R = Y + 1.402 * (Cr – 128)
[0131] G=Y–0.344136*(Cb–128)–0.714136*(Cr–128)
[0132] B = Y + 1.772 * (Cb – 128)
[0133] In the example above, a lossy compression technique is implemented alone to perform lossy compression on the image data block, thereby guaranteeing a specific target compression ratio (e.g., 2:1). However, in some cases, a lossless compression technique may already meet the target compression ratio for at least some of the image data block, and the lossless compression technique does not introduce errors into the image data. Therefore, in some cases, performing lossless compression on the image data block may be useful if lossless compression would meet the target compression ratio, but if lossless compression of the image data would not meet the target compression ratio, then a lossy compression technique (e.g., one of the lossy compression techniques described herein) can be used to compress the image data block. This can be described as using lossy compression as a “strain plan” for lossless compression. This achieves a guaranteed compression ratio and reduces the errors introduced by compression compared to using lossy compression alone. However, to implement such a “strain plan” compression technique, the compression unit needs to be able to perform both lossless and lossy compression, so the physical size of the compression unit (e.g., silicon area) may be larger than in the example where only lossy compression is implemented. However, this increase in physical size may be small, and in some cases, it may be considered acceptable so that an error reduction can be achieved by using this strain-planned compression technique compared to using lossy compression alone.
[0134] Figure 9 A compression unit 902 is shown, which includes a first compression unit 904 configured to perform lossless compression on image data blocks, a second compression unit (in this example, the lossy compression unit 302 described above) configured to perform lossy compression on image data blocks, and compression technique determination logic 906. Compression units 904 and 302, and compression technique determination logic 906, can be implemented in dedicated hardware, such as fixed-function circuitry.
[0135] Figure 10 This is a flowchart of a method for compressing image data blocks using compression unit 902. In step S 1002, compression unit 902 receives the image data block to be compressed.
[0136] In step S1004, the compression technique determination logic 906 determines whether lossless compression of the image data block will meet the target compression ratio of the image data block. For example, the compression technique determination logic 906 can determine whether lossless compression of the image data block will meet the target compression ratio by predicting the amount of compressed data that will be obtained by performing lossless compression on the image data block, and then determining whether the predicted amount of compressed data meets the target compression ratio. In this example, the prediction of the amount of compressed data that will be obtained by performing lossless compression on the image data block can be performed without performing lossless compression on the image data block. For example, some operations involved in performing lossless compression can be performed or no operations can be performed in order to predict the amount of compressed data that will be obtained by performing lossless compression on the image data block.
[0137] If it is determined in step S1004 that lossless compression of the image data block will not meet the target compression ratio, the method proceeds to step S1006, where the lossy compression unit 302 performs lossy compression on the image data block to form a compressed data block. For example, the lossy compression performed by the lossy compression unit 302 can be as described in the example given above. The compression ratio of the lossy compression performed by the lossy compression unit 302 is guaranteed to meet the target compression ratio of the image data block.
[0138] In step S1008, the lossy compression unit 302 stores an indication in the header associated with the compressed data block to indicate that the block has been compressed using a lossy compression technique. In step S1010, the lossy compressed data block is output from the compression unit 902, for example, to be stored in memory.
[0139] If it is determined in step S1004 that lossless compression of the image data block will meet the target compression ratio, the method proceeds to step S1012, where the lossless compression unit 904 performs lossless compression on the image data block to form a compressed data block. Methods for performing lossless compression on image data blocks are known in the art.
[0140] In step S1014, the lossless compression unit 904 stores an indication in the header associated with the compressed data block to indicate that the block has been compressed using lossless compression technology. In step S1016, the lossless compressed data block is output from the compression unit 902, for example, to be stored in memory.
[0141] In other examples, the steps to determine whether lossless compression of an image data block will satisfy a target compression ratio for the image data block may include: performing lossless compression on the image data block, and determining whether the amount of compressed data obtained by performing lossless compression on the image data block satisfies the target compression ratio. This may be simpler than trying to predict the amount of data that will be produced by lossless compression without actually performing lossless compression, but it may involve performing more operations than necessary, potentially increasing power consumption and latency.
[0142] In some examples, an image data block is one of multiple image data blocks representing an image, and there is a target overall image compression ratio associated with the entire image. Since the compression ratio achieved by lossless compression will depend on the image data being compressed, some of the image data blocks can be losslessly compressed with a compression ratio exceeding the target compression ratio for that particular image data block. This may result in excess data, which can be used to represent other compressed data blocks related to the same image. Therefore, the target compression ratio of an image data block can be modified (e.g., reduced) based on the amount of compressed data already formed for other image data blocks related to the same image, thereby satisfying the overall target image compression ratio. For example, if a previous image data block related to the image has already been losslessly compressed, achieving a compression ratio greater than the block's target compression ratio, the target compression ratio of subsequent image data blocks related to the same image to be compressed can be reduced while still satisfying the overall target image compression ratio. This allows for lossless compression of a larger number of image data blocks for the image (and therefore lossy compression of a smaller number of image data blocks for the image), thus reducing the amount of error introduced into the image due to the lossy compression process. In other words, when an image data block associated with an image is losslessly compressed at a compression ratio greater than the target compression ratio of the image data block, the reduction in image quality due to lossy compression can be mitigated by allowing modification (e.g., reduction) of the target compression ratio of another image data block associated with the same image.
[0143] Figure 11 A decompression unit 1102 is shown, which includes a first decompression unit 1104 configured to perform lossless decompression on compressed data blocks, a second decompression unit (in this example, the lossy decompression unit 702 described above) configured to perform lossy decompression on compressed data blocks, and decompression technique determination logic 1106. Decompression units 1104 and 702, and decompression technique determination logic 1106, may be implemented in dedicated hardware, such as fixed-function circuitry.
[0144] Figure 12 This is a flowchart of a method for decompressing a compressed data block using decompression unit 1102. In step S1202, decompression unit 1102 receives the compressed data block to be decompressed. The compressed data block has already been compressed using the aforementioned compression unit 902.
[0145] In step S1204, the decompression technology determination logic 1106 reads an indication from the header associated with the compressed data block, indicating whether the compressed data block is compressed using lossless or lossy compression techniques. In step S1206, the decompression technology determination logic 1106 uses the indication read from the header associated with the compressed data block to determine whether the compressed data block is compressed using lossless or lossy compression techniques.
[0146] If, in step S1206, it is determined that the compressed data block is compressed using lossless compression technology, the method proceeds to step S1208, where the lossless decompression unit 1104 performs lossless decompression on the compressed data block, thereby decompressing the compressed data block. The decompression technology used by the lossless decompression unit 1104 is complementary to the lossless compression technology used by the lossless compression unit 904, enabling the lossless decompression unit 1104 to correctly decompress the data compressed by the compression unit 904. The method used to perform lossless decompression is known in the art. After step S1208, the method proceeds to step S1212.
[0147] If, in step S1206, it is determined that the compressed data block is compressed using lossy compression technology, the method proceeds to step S1210, where the lossy decompression unit 702 performs lossy decompression on the compressed data block to decompress it. Lossy decompression can be performed as described in the example given above.
[0148] After step S1210, the method proceeds to step S1212. In step S1212, decompressed image data blocks are output from decompression unit 1102, for example, for further processing in GPU 104.
[0149] In this "responder plan" system, lossless compression is used to compress image data blocks when the target compression ratio is met, and lossy compression is used to compress image data blocks if the target compression ratio is not met (thus ensuring the compression ratio is achieved). When an image comprises multiple image data blocks, some of the image data blocks in the image can be losslessly compressed, while some other image data blocks in the image data can be lossily compressed. The size of the image data blocks can be any suitable size, such as a 2x2 image data block as described above, or an image data block of some other size and / or shape.
[0150] The compression and decompression units described herein are described as comprising multiple functional blocks. This is merely illustrative and 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 the compression or decompression unit do not need to be physically generated by the compression or decompression unit at any point in time, and may merely represent logical values that conveniently describe the processing performed by the compression or decompression unit between its inputs and outputs.
[0151] The compression and decompression units described herein can be contained in hardware on an integrated circuit. The compression and decompression units described herein can be configured to perform any of the methods described herein. Generally, any of the functions, methods, techniques, or components described above can be implemented in software, firmware, hardware (e.g., a fixed logic circuit system), or any combination thereof. The terms “module,” “function,” “component,” “element,” “unit,” “block,” and “logic” are used herein to generally denote software, firmware, hardware, or any combination thereof. In the case of a software implementation, a module, function, component, element, unit, block, or logic represents program code that, when executed on a processor, performs a specified task. The algorithms and methods described herein can be executed by one or more processors that execute code that causes the processor to perform the algorithm / method. Examples of computer-readable storage media include random access memory (RAM), read-only memory (ROM), optical disk, flash memory, hard disk storage, and other memory devices that can use magnetic, optical, and other techniques to store instructions or other data and can be accessed by a machine.
[0152] As used herein, the terms computer program code and computer-readable instructions refer to any kind of executable code for a processor, comprising code expressed in machine language, interpreted language, or scripting language. Executable code includes binary code, machine code, bytecode, code defining integrated circuits (e.g., hardware description languages or netlists), and code expressed in programming languages such as C, Java, or OpenCL. Executable code can be, for example, any kind of software, firmware, script, module, or library that, when properly executed, processed, interpreted, compiled, or run in a virtual machine or other software environment, causes the processor of a computer system that supports the executable code to perform tasks specified by said code.
[0153] A processor, computer, or computer system can be any kind of device, machine, or special-purpose circuit, or a collection or part thereof, that has the processing power to execute instructions. A processor can be any kind of general-purpose 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.
[0154] This invention also intends to encompass software, such as hardware description language (HDL) software, that defines the configuration of hardware as described herein for designing integrated circuits or for configuring programmable chips to perform desired functions. That is, a computer-readable storage medium may be provided on which computer-readable program code in the form of an integrated circuit definition dataset is encoded, which, when processed (i.e., executed) in an integrated circuit manufacturing system, configures the system to manufacture compression and / or decompression units configured to perform any of the methods described herein, or to manufacture compression and / or decompression units comprising any of the means described herein. The integrated circuit definition dataset may, for example, be an integrated circuit description.
[0155] Therefore, a method for manufacturing compression and / or decompression units as described herein in an integrated circuit manufacturing system can be provided. Furthermore, an integrated circuit definition dataset can be provided, which, when processed in the integrated circuit manufacturing system, enables the method for manufacturing compression and / or decompression units to be executed.
[0156] Integrated circuit definition datasets can be in the form of computer code, such as netlists, code for configuring programmable chips, or hardware description languages suitable for manufacturing at any level in integrated circuits, including register-transfer level (RTL) code, high-level circuit representations (such as Verilog or VHDL), and low-level circuit representations (such as OASIS(RTM) and GDSII). Higher-level representations (such as RTL) that logically define hardware suitable for manufacturing in integrated circuits can be processed on a computer system configured to generate manufacturing definitions of integrated circuits within the context of a software environment that includes definitions of circuit elements and rules for combining these elements to generate the manufacturing definition of the integrated circuit defined by that representation. As is typically the case where software executes at a computer system to define a machine, one or more intermediate user steps (e.g., providing commands, variables, etc.) may be required to configure the computer system to generate the manufacturing definition of the integrated circuit, executing code that defines the integrated circuit to generate the manufacturing definition of the integrated circuit.
[0157] Now refer to Figure 13 This describes an example of processing integrated circuit definition datasets at an integrated circuit manufacturing system in order to configure the system to manufacture compression and / or decompression units.
[0158] Figure 13 An example of an integrated circuit (IC) manufacturing system 1302 is shown, configured to manufacture compression and / or decompression units as described in any of the examples herein. Specifically, the IC manufacturing system 1302 includes a layout processing system 1304 and an integrated circuit generation system 1306. The IC manufacturing system 1302 is configured to receive an IC definition dataset (e.g., defining compression and / or decompression units as described in any of the examples herein), process the IC definition dataset, and generate an IC (e.g., containing compression and / or decompression units as described in any of the examples herein) based on the IC definition dataset. The processing of the IC definition dataset configures the IC manufacturing system 1302 to manufacture an integrated circuit containing compression and / or decompression units as described in any of the examples herein.
[0159] The layout processing system 1304 is configured to receive and process an IC definition dataset to determine a circuit layout. Methods for determining a circuit layout based on an IC definition dataset are known in the art and may involve, for example, synthesizing RTL code to determine the gate-level representation of the circuit to be generated, for example, in relation to 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 based on the gate-level representation of the circuit. This can be done automatically or with user intervention to optimize the circuit layout. Once the layout processing system 1304 has determined the circuit layout, it can output the circuit layout definition to the IC generation system 1306. The circuit layout definition may be, for example, a circuit layout description.
[0160] As is known in the art, IC generation system 1306 generates ICs according to a circuit layout definition. For example, IC generation system 1306 can implement a semiconductor device manufacturing process for generating ICs, which may 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 may be in the form of a mask, which can be used in the photolithography process to generate ICs according to the circuit definition. Alternatively, the circuit layout definition provided to IC generation system 1306 may be in the form of computer-readable code, which IC generation system 1306 can use to form a suitable mask for generating ICs.
[0161] The various processes performed by the IC manufacturing system 1302 may all be implemented in one location, for example, by one party. Alternatively, the IC manufacturing system 1302 may be a distributed system, allowing some processes to be performed in different locations and by different parties. For example, some of the following stages may be performed in different locations and / or by different parties: (i) synthesizing RTL code representing an IC definition dataset to form a gate-level representation of the 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) using the mask to manufacture the integrated circuit.
[0162] In other examples, processing the IC definition dataset at the IC manufacturing system can configure the system to manufacture compression and / or decompression units without processing the IC definition dataset to determine circuit layout. For example, the IC definition dataset can define the configuration of a reconfigurable processor, such as an FPGA, and processing the dataset can configure the IC manufacturing system (e.g., by loading the configuration data into the FPGA) to generate a reconfigurable processor with the defined configuration.
[0163] In some implementations, when processed in an integrated circuit manufacturing system, the integrated circuit manufacturing definition dataset can enable the integrated circuit manufacturing system to generate devices as described herein. For example, the integrated circuit manufacturing definition dataset, as described above, relates to... Figure 13 The configuration of the integrated circuit manufacturing system described herein can produce devices as described in this document.
[0164] In some examples, an integrated circuit definition dataset may include software running on hardware defined at the dataset, or software running in combination with hardware defined at the dataset. Figure 13 In the example shown, the IC generation system can be further configured by the integrated circuit definition dataset to load firmware onto the integrated circuit according to the program code defined at the integrated circuit definition dataset during the manufacturing of the integrated circuit, or otherwise provide the integrated circuit with program code for use with the integrated circuit.
[0165] Compared to known implementations, the implementation of the concepts set forth in this application in devices, apparatuses, modules, and / or systems (and in the methods implemented herein) can lead to performance improvements. Performance improvements may include one or more of increased computational performance, reduced latency, increased throughput, and / or reduced power consumption. During the manufacture of such devices, apparatuses, modules, and systems (e.g., in integrated circuits), trade-offs can be made between performance improvements and physical implementations, thereby improving manufacturing methods. For example, a trade-off can be made between performance improvements and layout area to match the performance of known implementations but using less silicon. This can be accomplished, for example, by reusing functional blocks serially or sharing functional blocks among elements of a device, apparatus, module, and / or system. Conversely, the concepts set forth in this application that lead to improvements in the physical implementation of devices, apparatuses, modules, and systems (such as reduced silicon area) can be traded off for performance improvements. This can be accomplished, for example, by manufacturing multiple instances of a module within a predefined area budget.
[0166] The applicant has independently disclosed each individual feature described herein, as well as any combination of two or more such features, to the extent that such features or combinations can be implemented based on the specification as a whole, in accordance with the common knowledge of those skilled in the art, regardless of whether such features or combinations of features solve any problem disclosed herein. In view of the foregoing description, those skilled in the art will understand that various modifications can be made within the scope of this invention.
Claims
1. A computer-implemented method for performing lossy compression on multiple image data blocks based on a multi-level difference table, wherein, The plurality of image data blocks relate to corresponding channels of multi-channel image data, wherein each image data block includes a plurality of image element values, and wherein each level of the multi-level difference table includes a plurality of entries, the method comprising independently compressing image data blocks of each channel of the multi-channel image data by means of: Determine the starting point value of the image data block; Determine the level for the image data block within the multi-level difference table; For each image element value in the image data block, one of the entries is selected at the level determined within the multi-level difference table; and The compressed data block forming the image data block includes: (i) data representing a determined starting point value, (ii) an indication of a determined level, and (iii) an indication of an entry selected for each image element value in the image data block. The step of determining the level for the image data block within the multi-level difference table includes: Determine the maximum difference between the determined starting point value and any one of the image element values in the image data block; and Select the largest entry from the multi-level difference table to represent the level of the determined largest difference.
2. The method according to claim 1, wherein, For different levels of the multi-level difference table, the size of the value range represented by the entries in the level is different.
3. The method according to claim 1 or 2, wherein, Determining the starting point value of the image data block includes identifying the smallest image element value in the image data block.
4. The method according to claim 1 or 2, wherein, The data representing the determined starting point value has fewer bits than any of the image element values in the image data block.
5. The method according to claim 1 or 2, wherein, For each of the image element values in the image data block, selecting one of the entries at the determined level within the multi-level difference table includes: The difference in the image element values is determined by determining the difference between the determined starting point value and the image element value; and Select the entry that best represents the determined difference from the determined levels of the multi-level difference table.
6. The method according to claim 1 or 2, wherein, The first entry in each level of the multi-level difference table represents the zero value.
7. The method according to claim 1 or 2, wherein, The number of bits used to indicate that the compressed data block does not depend on the value of the image element in the image data block, thereby ensuring the compression ratio of the lossy compression.
8. The method according to claim 1 or 2, wherein, The image element values are in integer format, and the image data block is compressed by performing one or more operations, including addition, subtraction and comparison, on the image element values in the integer format, but the method of compressing the image data block does not involve performing any multiplication or division operations.
9. The method according to claim 1 or 2, wherein, The multi-channel image data is color data of color value blocks, including: (i) a first image data block associated with the red channel of the color value block, (ii) a second image data block associated with the green channel of the color value block, and (iii) a third image data block associated with the blue channel of the color value block, wherein color decorrelation is performed on the color values in the color value block before the three image data blocks are independently compressed.
10. The method according to claim 1 or 2, wherein, The multi-channel image data is color data in RGB format, such that each color value includes a red value (R), a green value (G), and a blue value (B), and the method includes converting the color data into a luminance-chrominance format, the luminance-chrominance format including: (i) a first image data block relating to the luminance channel (Y) of the color value block, (ii) a second image data block relating to the first chrominance channel (Cb) of the color value block, and (iii) a third image data block relating to the second chrominance channel (Cr) of the color value block. After the color data has been converted into the luminance-chrominance format, the three image data blocks are compressed independently.
11. A method for compressing image data blocks, comprising: Determine whether the lossless compression of the image data block will meet the target compression ratio of the image data block; as well as In response to determining that the lossless compression of the image data block will not meet the target compression ratio, the lossy compression method according to claim 1 or 2 is performed on the image data block, wherein the compression ratio of the lossy compression is guaranteed to meet the target compression ratio of the image data block.
12. The method according to claim 11, wherein, Determining whether lossless compression of the image data block will meet the target compression ratio of the image data block includes: Predict the amount of compressed data obtained by performing the lossless compression on the image data block; and Determine whether the predicted amount of the compressed data meets the target compression ratio.
13. The method according to claim 11, wherein, Determining whether lossless compression of the image data block will meet the target compression ratio of the image data block includes: Perform the lossless compression on the image data block; and Determine whether the amount of compressed data obtained by performing the lossless compression on the image data block meets the target compression ratio.
14. The method according to claim 11, wherein, The image data block is one of a plurality of image data blocks representing an image, wherein there is a total image target compression ratio associated with the entire image, and wherein the method includes modifying the target compression ratio of the image data block based on the amount of compressed data already formed for other image data blocks associated with the same image, such that the total image target compression ratio is satisfied.
15. A lossy compression unit, the lossy compression unit being configured to perform lossy compression on a plurality of image data blocks according to a multi-level difference table, wherein, The plurality of image data blocks relate to corresponding channels of multi-channel image data, wherein each image data block includes multiple image element values, and wherein each level of the multi-level difference table includes multiple entries, and the lossy compression unit is configured to independently compress image data blocks of each channel of the multi-channel image data by means of the following operations: The starting point value of the image data block is determined at the starting point value determination unit; The level for the image data block within the multi-level difference table is determined at the level determination unit; At the entry selection unit, for each image element value in the image data block, one of the entries is selected at the level determined within the multi-level difference table; and A compressed data block is formed at the compressed block forming unit for the image data block, the compressed data block comprising: (i) data representing a determined starting point value, (ii) an indication of a determined level, and (iii) an indication of an entry selected for each image element value in the image data block. The step of determining the level for the image data block within the multi-level difference table includes: Determine the maximum difference between the determined starting point value and any one of the image element values in the image data block; and Select the largest entry from the multi-level difference table to represent the level of the determined largest difference.
16. A compression unit configured to compress image data blocks, the compression unit comprising: A lossless compression unit configured to perform lossless compression on blocks of image data; The lossy compression unit according to claim 15, configured to perform lossy compression on blocks of image data; as well as A compression technique determination unit is configured to determine whether lossless compression of the image data block performed by the lossless compression unit will meet the target compression ratio of the image data block. The compression technology determining unit is configured to, if it is determined that the lossless compression of the image data block will not meet the target compression ratio, cause the lossy compression unit to perform lossy compression on the image data block, wherein the compression ratio of the lossy compression is guaranteed to meet the target compression ratio of the image data block.
17. A method for manufacturing a lossy compression unit according to claim 15 or a compression unit according to claim 16 using an integrated circuit manufacturing system, the method comprising: The lossy compression unit or its computer-readable description is processed using a layout processing system to generate a circuit layout description of an integrated circuit including the lossy compression unit or its compression unit; and The lossy compression unit or the compression unit is manufactured using an integrated circuit manufacturing system according to the circuit layout description.
18. A computer-readable storage medium storing computer-readable code configured to cause the method according to any one of claims 1 to 14 to be performed when a processor executes the code.
19. A computer-readable storage medium storing an integrated circuit definition dataset, wherein when the integrated circuit definition dataset is processed in an integrated circuit manufacturing system, the integrated circuit manufacturing system is configured to manufacture a lossy compression unit according to claim 15 or a compression unit according to claim 16.
Citation Information
Patent Citations
Method and apparatus for implementing reduced memory mode for high-definition television
US20030112869A1
Guaranteed Data Compression
US20200007149A1
Error correcting apparatus
US5528606A