Texture super-compression encoding method and texture super-compression decoding method

By using the texture super-compression coding and decoding method of texture compression technology, the texture code stream of each block is optimized and encoded, which solves the problems of low texture compression rate and poor subjective quality, and realizes efficient image compression and display.

WO2025200724A1PCT designated stage Publication Date: 2025-10-02HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/072734
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-29
Filing Date
2025-01-16
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

Existing texture compression technology has problems with low compression rate and poor subjective quality when displaying images. In particular, when displaying multiple images, the IO throughput is large, resulting in increased power consumption and end-to-end latency.

Method used

A texture super-compression encoding and decoding method is adopted. By re-compressing the weight, endpoint length and position of the texture code stream of each block in a non-fixed format, combined with a preset encoding mode and a super-compression encoder, the encoding method of each type of data is optimized to remove redundancy, improve compression rate and image quality.

Benefits of technology

It significantly improves the compression rate while maintaining image quality, reduces storage overhead and power consumption, reduces IO throughput, and improves image display efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025072734_02102025_PF_FP_ABST
    Figure CN2025072734_02102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are a texture super-compression encoding method and a texture super-compression decoding method. The texture super-compression encoding method comprises: acquiring an image; performing block division processing on the image to obtain multiple blocks; determining, from among multiple preset encoding modes, a target encoding mode corresponding to a first block; encoding the first block on the basis of the target encoding mode corresponding to the first block, so as to obtain a texture bitstream of the first block; extracting, from a texture bitstream of the image, encoded data of weights corresponding to the multiple blocks and encoded data of endpoints corresponding to the multiple blocks; and encoding the encoded data of the weights corresponding to the multiple blocks, and encoding the encoded data of the endpoints corresponding to the multiple blocks, so as to obtain a texture super-compression bitstream of the image. Thus, further compression can be performed in respect of a texture bitstream format in which the lengths and positions of weights and endpoints in a texture bitstream of each block are not fixed, thereby balancing reconstructed image quality and compression ratio.
Need to check novelty before this filing date? Find Prior Art

Description

Texture super compression coding and decoding method

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 29, 2024, with application number 202410385620.5 and application name “Texture Super-Compression Coding and Decoding Method”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of coding and decoding, and in particular to a texture super-compression coding and decoding method. Background Art

[0003] Traditionally, images are stored in the Joint Photographic Experts Group (JPEG) format. When previewing an image, the central processing unit (CPU) first decodes it to an RGBA image, which is then sent to the graphics processing unit (GPU). The GPU then renders the RGBA image and displays it. However, in multi-image applications like "gallery," multiple images need to be displayed simultaneously. Especially when users scroll quickly, the input / output (I / O) throughput between the main memory and the video memory increases dramatically, potentially causing "white blocks" to appear.

[0004] If the image is stored in texture compression format, the texture streams of multiple images can be quickly spliced ​​together based on certain image arrangement rules when the user previews them (because the texture encoding process first divides the image into multiple blocks of fixed size, and then encodes each block independently, and the bytes after each block encoding are fixed, so the texture streams of images of different resolutions with the same block size (consistent sub-block resolution) can be spliced ​​together) to generate a standard texture stream that can be directly decoded by the GPU. This splicing is a rearrangement of the bitstream data, which has a small data volume and low computational complexity. In addition, the GPU's texture decoder can be used to replace the decoding of multiple images, reducing power consumption and IO throughput (the data volume of the texture bitstreams of multiple images after splicing is much smaller than the data volume of the RGBA data of multiple images; taking Adaptive Scalable Texture Compression (ASTC) as an example, the size of the spliced ​​bitstream is only one-quarter of the RGBA data (it can be understood that, assuming the smallest block division is 4x4, the corresponding compressed size is 1 / 4, and for other larger blocks, the compressed ratio is even smaller)), reducing the GPU memory occupied and reducing power consumption. For general applications, the use of texture compression format can achieve "zero decoding" (the GPU takes very little time to decode the texture bitstream, which is basically negligible), reducing end-to-end latency.

[0005] However, texture compression is a block encoding of an image, where each block is independently encoded, and the global redundant information of the entire image is not fully removed. Therefore, the compression rate of texture compression is usually not high (for example, compared with the RGBA format, the JPEG compression rate is generally more than ten times, while the typical texture compression rate is only 4 to 9 times under subjectively acceptable conditions (for example, with ASTC, the block size is 4x4, the compression rate is 4 times; the block size is 6x6, the compression rate is 9 times, but the quality has already been subjectively visibly reduced; higher compression rates can be subjectively seen to have significantly decreased)). To address the problem of large bitstreams after texture compression, the texture compressed bitstream needs to be compressed again (i.e., texture super-compression coding) to reduce storage overhead.

[0006] In existing technologies, one texture super-compression scheme uses a texture bitstream format with fixed weights, endpoint lengths, and positions for each block. This approach results in poor subjective image quality and is unsuitable for scenes with rich colors. Another texture super-compression scheme uses a texture bitstream format with variable endpoint and weight codeword positions and lengths. This approach also offers a low compression rate, and increasing the compression rate results in a significant degradation in subjective quality. Summary of the Invention

[0007] In view of this, the present application provides a texture super-compression encoding and decoding method, which can re-compress the texture code stream format in which the weight, endpoint length and position of each block are not fixed, and can take into account the quality and compression rate of the reconstructed image.

[0008] It should be noted that texture super-compression may include texture super-compression encoding and texture super-compression decoding.

[0009] Exemplarily, texture super-compression coding may include texture coding and super-compression coding; wherein texture coding may be performed by a texture encoder, and super-compression coding may be performed by a super-compression encoder. Exemplarily, texture coding may generate a texture bitstream, which may include encoded data of various information; super-compression coding may generate a texture super-compressed bitstream, which may include super-compressed data of various information (i.e., encoded data of the encoded data of various information).

[0010] Exemplarily, texture super-compression decoding may include super-compression decoding and texture decoding; wherein texture decoding may be performed by a texture decoder, and super-compression decoding may be performed by a super-compression decoder. Exemplarily, super-compression decoding may obtain reconstructed data of encoded data of various information, and texture decoding may obtain reconstructed values ​​of various information.

[0011] Exemplarily, the texture encoder, ultra-compression encoder, and ultra-compression decoder may be implemented by a CPU or a specialized chip, and the texture decoder may be hardened in a GPU.

[0012] In a first aspect, an embodiment of the present application provides a texture super-compression coding method, the method comprising: first, acquiring an image; then, dividing the image into blocks to obtain multiple blocks; then, determining a target coding mode corresponding to a first block from multiple preset coding modes; wherein, in the texture code streams of multiple second blocks obtained by encoding the second block based on the multiple preset coding modes, the proportion of the encoded data of the second block corresponding to the weight is the same, and the proportion of the encoded data of the second block corresponding to the endpoint is the same, and the relative position of the encoded data of the second block corresponding to the weight and the encoded data of the endpoint is fixed; the first block and the second block are any one of the multiple blocks; then, encoding the first block based on the target coding mode corresponding to the first block to obtain a texture code stream of the first block; wherein the texture code stream of the first block includes the encoded data of the first block corresponding to the weight and the encoded data of the endpoint, and the texture code streams of the multiple blocks constitute the texture code stream of the image; then, extracting the encoded data of the weights and the encoded data of the endpoints corresponding to the multiple blocks from the texture code stream of the image; then, encoding the encoded data of the weights corresponding to the multiple blocks and encoding the encoded data of the endpoints corresponding to the multiple blocks to obtain the texture super-compression code stream of the image.

[0013] It should be noted that "obtaining an image; dividing the image into blocks to obtain multiple blocks; then, determining a target coding mode corresponding to a first block from multiple preset coding modes; encoding the first block based on the target coding mode corresponding to the first block to obtain a texture code stream of the first block" is a texture coding process that can be performed by a texture encoder. "Extracting the coding data of the weights corresponding to the multiple blocks and the coding data of the endpoints from the texture code stream of the image; encoding the coding data of the weights corresponding to the multiple blocks, and encoding the coding data of the endpoints corresponding to the multiple blocks to obtain a texture super-compressed code stream of the image" is a super-compression coding process that can be performed by a super-compression encoder.

[0014] Exemplarily, in an embodiment of the present application, the texture encoder may be a texture encoder that supports selecting an optimal coding mode from N (N is an integer greater than 2) coding modes in the texture compression standard to perform texture coding on each block. In the texture code stream of the block obtained by encoding the same block based on at least two of the N coding modes: the percentage of the coded data corresponding to the block weight (also referred to as the bit length) is different, or the percentage of the coded data corresponding to the block endpoint is different, or the relative position of the coded data corresponding to the block weight and the coded data of the endpoint is not fixed). And in the texture code stream of the block obtained by encoding the same block based on at least two of the N coding modes: the percentage of the coded data corresponding to the block weight is the same, and the percentage of the coded data corresponding to the block endpoint is the same, and the relative position of the coded data corresponding to the block weight and the coded data of the endpoint is fixed. For example, the texture encoder may be an Adaptive Scalable Texture Compression (ASTC) encoder. In other words, the endpoints and weights in the texture code streams of multiple blocks originally generated by the texture encoder in this application are not fixed (that is, the proportion of the encoded data of the weights is different, or the proportion of the encoded data of the endpoints is different, or the relative position of the encoded data of the weights and the encoded data of the endpoints is not fixed).

[0015] Exemplarily, the present application can pre-select M (M is an integer greater than 1 and less than N) coding modes from the above-mentioned N coding modes as preset coding modes; wherein, in the texture code streams of multiple second blocks obtained by encoding the second block based on the M preset coding modes: the proportion of the coding data corresponding to the weight of the second block is the same, and the proportion of the coding data corresponding to the endpoint of the second block is the same, and the relative position of the coding data corresponding to the weight of the second block and the coding data of the endpoint is fixed. Then, the texture encoder can be constrained based on these M preset coding modes, that is, the texture encoder is constrained so that each block can only select one preset coding mode from these M preset coding modes for texture encoding during the texture encoding process. At this time, the texture encoder of the present application is a texture encoder with a constrained coding mode. It should be noted that each block can select a different preset coding mode from the M preset coding modes as the corresponding target coding mode.

[0016] That is to say, the present application aims at a texture encoder whose endpoints and weights in the texture code stream of all blocks generated are not fixed, and by constraining its coding mode, it is possible to control the endpoints and weights in the texture code stream of all blocks generated by the texture encoder to be fixed; subsequently, in the super-compression coding process, the coding data of the corresponding weights and endpoints of multiple blocks can be accurately extracted from the texture code stream of the image, thereby enabling effective super-compression coding of the texture code stream of the image.

[0017] Secondly, because the data patterns / distributions of the three types of data (block-corresponding weight values, block-corresponding endpoint values, and block-corresponding other information values) are different, encoding the coded data of these three types of data independently allows the selection of the optimal encoding method for each type of data based on its pattern or distribution. This can better remove redundancy in each type of data and improve the compression rate of each type of data. Furthermore, the reconstruction quality of each type of data can be improved, thereby improving the quality of the reconstructed image.

[0018] For example, the images involved in the present application may include two-dimensional images and three-dimensional images, and the embodiments of the present application are described using two-dimensional images as an example.

[0019] For example, a two-dimensional image may include an RGBX image, where the RGBX image may include an RGB image and an RGBA image. It should be understood that this application does not limit the storage order of the R, G, B, and A (alpha, used to represent transparency) components, that is, RGBX may include ARGB, ABGR, and so on.

[0020] For example, the sizes of the multiple blocks of the image may be the same, for example, 4*4, 6*6, and 8*8. For example, the sizes of the multiple blocks of the image may be different, for example, the sizes of the multiple blocks may be 4*4, 5*4, 5*5, 6*5, 6*6, 8*5, 10*5, 10*6, 8*8, 10*8, 10*10, 12*10, and 12*12, respectively; this application does not impose any limitation on this.

[0021] Exemplarily, "encoding data for weights corresponding to multiple blocks, and encoding data for endpoints corresponding to multiple blocks" can be understood as independently encoding encoding data for weights corresponding to multiple blocks, and independently encoding encoding data for endpoints corresponding to multiple blocks.

[0022] Exemplarily, “the relative position of the second block of encoded data corresponding to the weight and the encoded data of the endpoint is fixed” may include the following multiple understandings:

[0023] (1) The coded data of the second block corresponding to the weight is adjacent to the coded data of the second block corresponding to the endpoint, and the coded data of the second block corresponding to the weight is before the coded data of the second block corresponding to the endpoint;

[0024] (2) The coded data of the second block corresponding to the weight is adjacent to the coded data of the second block corresponding to the endpoint, and the coded data of the second block corresponding to the weight is after the coded data of the second block corresponding to the endpoint;

[0025] (3) The coded data of the second block corresponding to the weight and the coded data of the second block corresponding to the endpoint are separated by F (F is a positive integer) bits, and the coded data of the second block corresponding to the weight is before the coded data of the second block corresponding to the endpoint;

[0026] (3) The coded data of the second block corresponding to the weight and the coded data of the second block corresponding to the endpoint are separated by F (F is a positive integer) bits, and the coded data of the second block corresponding to the weight follows the coded data of the second block corresponding to the endpoint.

[0027] Exemplarily, the starting positions of the encoded data of the second blocks corresponding to weights in the texture code streams of multiple second blocks are determined according to the corresponding preset coding mode; that is, the starting positions of the encoded data of the second blocks corresponding to weights in the texture code streams of different second blocks can be the same or different. Also, the starting positions of the encoded data of the second blocks corresponding to endpoints in the texture code streams of multiple second blocks are determined according to the corresponding preset coding mode; that is, the starting positions of the encoded data of the second blocks corresponding to endpoints in the texture code streams of different second blocks can be the same or different.

[0028] According to a first aspect, determining a target coding mode corresponding to a first block from a plurality of preset coding modes includes: determining a coding error and a bit rate corresponding to encoding the first block based on the plurality of preset coding modes; and determining the target coding mode corresponding to the first block from the plurality of preset coding modes based on at least one of the coding error or bit rate corresponding to the plurality of preset coding modes. The bit rate is associated with the compression ratio, and the coding error is associated with the quality of the reconstructed image. In this way, the target coding mode can be selected based on the compression ratio and reconstructed image quality requirements of the user or application scenario.

[0029] According to the first aspect, or any implementation of the first aspect above, determining a target coding mode corresponding to the first block from multiple preset coding modes based on at least one of coding errors and bit rates corresponding to multiple preset coding modes includes:

[0030] Determine the preset coding mode corresponding to the minimum coding error as the target coding mode corresponding to the first block; or

[0031] Determine the preset coding mode corresponding to the minimum bit rate as the target coding mode corresponding to the first block; or

[0032] A coding error and a bit rate corresponding to each preset coding mode in a plurality of preset coding modes are weightedly calculated, and the preset coding mode corresponding to the minimum value of the weighted calculation results is determined as the target coding mode corresponding to the first block.

[0033] Among them, when the preset coding mode corresponding to the minimum coding error is determined as the target coding mode corresponding to the first block, the quality of the reconstructed image is optimal; when the preset coding mode corresponding to the minimum bit rate is determined as the target coding mode corresponding to the first block, the compression rate is the highest; when the coding error and bit rate corresponding to each preset coding mode in multiple preset coding modes are weightedly calculated, and the preset coding mode corresponding to the minimum value of the weighted calculation result is determined as the target coding mode corresponding to the first block, the target coding mode can be selected based on the user or application scenario's emphasis on compression rate and quality of the reconstructed image; it can take into account both the quality and compression rate of the reconstructed image to a certain extent.

[0034] According to the first aspect, or any implementation of the first aspect above, determining a target coding mode corresponding to a first block from multiple preset coding modes includes: obtaining a preconfigured coding mode identifier; and determining a preset coding mode indicated by the coding mode identifier from the multiple preset coding modes as the target coding mode corresponding to the first block. In this way, the target coding mode can be selected according to user needs.

[0035] According to the first aspect, or any implementation manner of the first aspect above, the position of the encoded data of the second block corresponding to the weight in the texture code stream of multiple second blocks obtained by encoding the second block based on multiple preset coding modes is fixed, and / or the position of the encoded data of the second block corresponding to the endpoint in the texture code stream of multiple second blocks obtained by encoding the second block based on multiple preset coding modes is fixed.

[0036] According to the first aspect, or any implementation of the first aspect above, the target coding mode corresponding to the first block is used to indicate at least one of the coding mode, color endpoint mode or number of partitions of the first block.

[0037] Exemplarily, the coding mode (or preset coding mode) may be used to indicate the coding mode, color endpoint mode, and number of partitions of a block.

[0038] Exemplarily, the coding mode of a block can be used to indicate the plane information of the block (such as the number of planes) and the coding method of the block corresponding weights (such as the size of the block corresponding weight matrix (the same as the size of the block obtained by dividing the image into blocks), the quantization parameter of the block corresponding weights, the entropy coding method of the block corresponding weights, etc.).

[0039] Exemplarily, the color endpoint mode is used to indicate the encoding method of the block corresponding endpoint (for example, the quantization parameter of the block corresponding endpoint, the preprocessing method (such as difference, absolute value), the entropy encoding method of the block corresponding endpoint, etc.).

[0040] According to the first aspect, or any implementation manner of the first aspect above, the first block is encoded based on the target coding mode corresponding to the first block to obtain a texture code stream of the first block, including: determining the value of the weight and the value of the endpoint corresponding to the first block based on the coding mode and the number of partitions of the first block; entropy encoding the value of the weight corresponding to the first block based on the coding mode of the first block, and entropy encoding the value of the endpoint corresponding to the first block based on the color endpoint mode to obtain the texture code stream of the first block.

[0041] According to the first aspect, or any implementation of the first aspect above, the coding mode of the first block is used to indicate that the number of planes of the first block is 1 and the maximum number of partitions of the first block is 2.

[0042] Assuming that the texture encoder is an ASTC encoder, the target encoding mode corresponding to the first block is: the block encoding mode (block mode) is "66", the color endpoint mode (CEM) is "12", and the maximum number of partitions is 2.

[0043] Among them, when the block coding mode (block mode) of the first block is "66", the weight syntax (that is, the weight coding data) of each block can be fixed to 32 bits (so that better image quality can be retained); and the size of the block weight matrix is ​​fixed to 4*4, and the number of planes is fixed to 1 (when the number of planes is 1, the individual components of the pixel values ​​of the pixels in the first block are not split, but all components of the pixel values ​​of the pixels in the first block are fitted as a whole).

[0044] The color endpoint mode is fixed to "12". When CEM is "12", the endpoint syntax of each block (that is, the encoded data of the endpoint) can be fixed to 64 bits, and the entropy coding mode of the endpoint is an entropy coding method with a compression rate of 1, that is, the value of the endpoint is converted into binary representation.

[0045] According to the first aspect, or any implementation of the first aspect above, the coding mode of the first block is used to indicate that the number of planes of the first block is 1, and the maximum value of the number of partitions of the first block is 1.

[0046] Assuming that the texture encoder is an ASTC encoder, the target coding mode corresponding to the first block is: the block coding mode (block mode) is "67", the color endpoint mode is "12", and the maximum number of partitions is 1.

[0047] Among them, when the coding mode of the first block is "67", the weight syntax of each block (that is, the coding data of the weight) can be fixed to 42 bits (so that better image quality can be retained); and the size of the block weight matrix is ​​fixed to 4*4, and the number of planes is fixed to 1 (when the number of planes is 1, the individual components of the pixel values ​​of the pixels in the first block are not split, but all components of the pixel values ​​of the pixels in the first block are fitted as a whole).

[0048] According to the first aspect, or any implementation of the first aspect above, the texture codestream of the first block also includes encoded data corresponding to other information of the first block; the method further includes: extracting the encoded data corresponding to the other information of multiple blocks from the texture codestream of the image; when the other information of multiple blocks is the same, writing the encoded data of the other information of any one of the multiple blocks into the texture super-compressed codestream; wherein the other information of the first block includes at least one of a coding mode identifier or partition information of a target coding mode corresponding to the first block. In this way, bitrate overhead can be reduced.

[0049] It should be understood that other information may also include image size, block information, etc., and this application does not limit this.

[0050] Exemplarily, when other information of the multiple blocks is different, the encoded data of the other information of each of the multiple blocks is written into the texture super-compression code stream.

[0051] It should be understood that the encoder and decoder agree and configure other information in advance, so that the encoded data of other information does not need to be written into the texture super-compressed code stream, thereby further reducing the bit rate overhead; and also improving the encoding and decoding efficiency.

[0052] According to the first aspect, or any implementation method of the first aspect above, the texture super-compression code stream includes a weight code stream, encoding the coded data of the weights corresponding to multiple blocks, including: establishing a weight table and an index table: when searching for the coded data of the weights that matches the coded data of the weights corresponding to the first block from the weight table, the index of the coded data of the weights that matches the coded data of the weights corresponding to the first block is written into the index table; when the coded data of the weights that matches the coded data of the weights corresponding to the first block is not searched from the weight table, the coded data of the first block corresponding to the weight is written into the weight table, and the index of the coded data of the first block corresponding to the weight in the weight table is written into the index table; the coded data of the weights corresponding to the multiple blocks are encoded according to the coded data of the weights corresponding to the multiple blocks, the weight table and the index table to obtain the weight code stream.

[0053] In one possible approach, the weight table and index table can be entropy encoded. Since the data volume of the weight table is smaller than the data volume of the encoded data corresponding to the weights of all blocks, and the data volume of the index table is much smaller than the data volume of the encoded data of the weights, the code stream overhead of the encoded data of the encoding weights can be reduced.

[0054] According to the first aspect, or any implementation method of the first aspect above, the texture super-compression code stream includes an endpoint code stream, and the coding data of the endpoints corresponding to multiple blocks are encoded in the texture code stream of the first block, including: if the coding data of the endpoints corresponding to the multiple blocks include coding data of the transparency component and coding data of the color component, then separating the coding data of the transparency component and the color component coding data of the values ​​of the endpoints corresponding to the multiple blocks; encoding the coding data of the transparency component of the values ​​of the endpoints corresponding to the multiple blocks, and encoding the color component coding data of the values ​​of the endpoints corresponding to the multiple blocks, to obtain the endpoint code stream.

[0055] In a second aspect, an embodiment of the present application provides a texture super-compression decoding method, which includes: first, receiving a texture super-compression code stream of an image; then, decoding the texture super-compression code stream to obtain reconstruction data of coded data corresponding to weights of multiple blocks in the image and reconstruction data of coded data of endpoints; and encapsulating the reconstruction data of coded data corresponding to weights of multiple blocks and reconstruction data of coded data of endpoints to obtain a texture code stream of the image; wherein the texture code stream of the image includes texture code streams of multiple blocks of the image, the texture code stream of a first block includes reconstruction data of coded data corresponding to weights of the first block and reconstruction data of coded data of endpoints, and the first block is any one of the multiple blocks; then, determining a target decoding mode corresponding to the first block from a plurality of preset decoding modes; In the texture code stream of multiple second blocks decoded based on multiple preset decoding modes, the proportion of reconstructed data of the encoded data of the second block corresponding to the weight is the same, and the proportion of reconstructed data of the encoded data of the second block corresponding to the endpoint is the same, and the relative position of the reconstructed data of the encoded data of the second block corresponding to the weight and the reconstructed data of the encoded data of the endpoint is fixed; the second block is any one of the multiple blocks; thereafter, based on the target decoding mode corresponding to the first block, the texture code stream of the first block in the texture code stream of the image is decoded to obtain the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint; then, the first block is reconstructed based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of the multiple blocks constitute a reconstructed image of the image.

[0056] Exemplarily, "receiving a texture super-compressed code stream of an image; decoding the texture super-compressed code stream to obtain a texture code stream of the image" is a super-compression decoding process, which can be performed by a super-compression decoder; "determining a target decoding mode corresponding to a first block from a plurality of preset decoding modes; based on the target decoding mode corresponding to the first block, decoding the texture code stream of the first block in the texture code stream of the image to obtain a reconstruction value of a weight corresponding to the first block and a reconstruction value of an endpoint; then, reconstructing the first block based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block" is a texture decoding process, which can be performed by a texture decoder.

[0057] According to the second aspect, determining a target decoding mode corresponding to a first block from a plurality of preset decoding modes includes: determining a preset decoding mode indicated by a decoding mode identifier in the plurality of preset decoding modes as the target decoding mode corresponding to the first block; wherein the decoding mode identifier is obtained by parsing a texture super-compressed code stream, or the decoding mode identifier is obtained by parsing a texture code stream of the first block, or the decoding mode identifier is pre-configured.

[0058] According to the second aspect, or any implementation method of the above second aspect, the position of the reconstructed data of the encoded data of the second block corresponding to the weight in the texture code stream of multiple second blocks decoded based on multiple preset decoding modes is fixed, and / or the position of the reconstructed data of the encoded data of the second block corresponding to the endpoint in the texture code stream of multiple second blocks decoded based on multiple preset decoding modes is fixed.

[0059] According to the second aspect, or any implementation of the second aspect above, the target decoding mode corresponding to the first block is used to indicate at least one of the decoding mode, color endpoint mode or partition number of the first block.

[0060] According to the second aspect, or any implementation method of the second aspect above, based on the target decoding mode corresponding to the first block, the texture code stream of the first block in the texture code stream of the image is decoded to obtain the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint, including: decoding the reconstruction data of the encoded data of the weight in the texture code stream of the first block based on the encoding mode of the first block to obtain the reconstruction value of the weight corresponding to the first block; decoding the reconstruction data of the encoded data of the endpoint in the texture code stream of the first block based on the color endpoint mode to obtain the reconstruction value of the endpoint corresponding to the first block.

[0061] According to the second aspect, or any implementation method of the second aspect above, the first block is reconstructed based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block, including: according to the decoding mode and the number of partitions of the first block, the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint are weighted calculated to obtain the reconstructed image of the first block.

[0062] According to the second aspect, or any implementation of the second aspect above, the decoding mode of the first block is used to indicate that the number of planes of the first block is 1 and the maximum number of partitions of the first block is 2.

[0063] According to the second aspect, or any implementation of the second aspect above, the decoding mode of the first block is used to indicate that the number of planes of the first block is 1, and the maximum value of the number of partitions of the first block is 1.

[0064] According to the second aspect, or any implementation method of the second aspect above, the texture super-compressed code stream includes a weight code stream, and decoding the texture super-compressed code stream to obtain encoded data of weights corresponding to multiple blocks in the image includes: entropy decoding the super-compressed data of weights corresponding to multiple blocks to obtain reconstructed data of the weight table and reconstructed data of the index table; traversing the index table, and obtaining reconstructed data of the encoded data of the weight corresponding to each block from the weight table according to the reconstructed index.

[0065] Exemplarily, the reconstructed data of the weight table may be understood as the reconstructed data of the coded data in which the weight table includes a plurality of weights.

[0066] Exemplarily, the reconstructed data of the index table may be understood as the index table including a plurality of reconstructed indexes.

[0067] According to the second aspect, or any implementation method of the second aspect above, the texture compression code stream includes an endpoint code stream, and decoding the texture super-compressed code stream to obtain encoded data of endpoints corresponding to multiple blocks in the image includes: decoding the super-compressed data of the transparency component in the endpoint code stream to obtain reconstructed data of the encoded data of the transparency component of the multiple blocks corresponding to the endpoints; decoding the super-compressed data of the color component in the endpoint code stream to obtain reconstructed data of the encoded data of the color component of the multiple blocks corresponding to the endpoints.

[0068] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.

[0069] In a third aspect, an embodiment of the present application provides a texture super-compressed code stream, which can be generated with reference to the above-mentioned first aspect or any one of the implementation methods of the first aspect.

[0070] In a fourth aspect, an embodiment of the present application provides a texture super-compressed code stream, which includes: texture information (PicInfo), configuration information (SutIno), endpoint code stream (EpStream) and weight code stream (WeightStream).

[0071] It should be noted that the texture information, configuration information, endpoint code stream and weight code stream can be referred to as the syntax of the texture super-compression code stream.

[0072] For example, texture information can be used to describe the size of an image and the size of blocks in the image.

[0073] Exemplarily, the configuration information is used to describe the configuration of the hyper-compression encoding.

[0074] Exemplarily, the endpoint code stream may include data obtained by performing entropy coding on coded data corresponding to endpoints of multiple blocks included in the image.

[0075] Exemplarily, the weighted code stream may include data obtained by performing entropy coding on coded data corresponding to weights of multiple blocks included in the image.

[0076] It should be noted that entropy coding can include an entropy coding method with a compression rate of 1 and an entropy coding method with a compression rate greater than 1. Among them, the entropy coding method with a compression rate of 1 essentially does not compress the information and does not reduce the data volume of the information; an implementation of this entropy coding method can convert the information into binary bits. The entropy coding method with a compression rate greater than 1 essentially means compressing the information to reduce the data volume of the information; the entropy coding algorithms included in this entropy coding method may include Finite State Entropy (FSE) coding algorithm, Asymmetric Numeral Systems (ANS) coding algorithm, arithmetic coding algorithm, Huffman coding algorithm, etc., and this application does not impose any restrictions on this.

[0077] Exemplarily, compression ratio = original bitstream size ÷ final bitstream size.

[0078] According to a fourth aspect, the texture super-compression code stream further includes at least one of a code stream type identifier (Magic) or partition information (PartitionInfo).

[0079] Exemplarily, the bitstream type identifier may be used to indicate the type of the bitstream; and whether the received bitstream is a texture super-compression bitstream may be determined according to the bitstream type identifier.

[0080] Exemplarily, the code stream type identifier and partition information may also be referred to as the syntax of the texture super-compression code stream.

[0081] According to the fourth aspect, or any implementation of the fourth aspect, the texture information includes the height (height) and width (width) of the image, and the height (blockX) and width (blockY) of a block in the image.

[0082] Exemplarily, the height and width of an image, and the height and width of a block in an image, may be referred to as syntax of texture information, or may be referred to as syntax of a texture super-compression code stream.

[0083] According to the fourth aspect, or any implementation of the fourth aspect, the texture information further includes at least one of the third dimension size (3D-Z) of the image or the third dimension size (blockZ) of a block in the image.

[0084] Exemplarily, the third dimension size of an image and the third dimension size of a block in the image may be referred to as the syntax of texture information, or may be referred to as the syntax of a texture super-compression code stream.

[0085] According to the fourth aspect, or any implementation method of the above fourth aspect, the configuration information includes: transparency description information (IsAllAFull), the bit length of the block corresponding weight (WeightBits) and the super compression mode (SutMode); wherein the super compression mode is used to describe the relationship between the compression rate and compression ratio of the texture super compression code stream.

[0086] Exemplarily, when the transparency description information is 1, it indicates that a transparency component exists and the transparency of all blocks is not completely opaque; when the transparency description information is 0, it indicates that the transparency component does not exist or the transparency of all blocks is completely opaque.

[0087] For example, SUTMode is 0: extreme speed; suitable for scenarios requiring high speed and low compression rate, such as applications such as photo galleries.

[0088] SUTMode is 1: Balanced: The color components of the endpoints are not transformed; this is suitable for scenarios that are not time-sensitive and require high compression rates, such as large natural image presets.

[0089] SUTMode is 2: Extreme compression file: suitable for scenes that are not time-sensitive and require high compression ratios, such as large natural image presets.

[0090] SUTMode is 3: lossless compression file: suitable for compressing simple images such as icons.

[0091] Exemplarily, the transparency description information, the bit length of the block corresponding weight, and the super-compression mode can be called the syntax of the configuration information, and can also be called the syntax of the texture super-compression code stream.

[0092] According to the fourth aspect, or any implementation of the fourth aspect above, the configuration information further includes at least one of a weight mode (WeightMode) or an endpoint mode (EpMode).

[0093] in:

[0094] Weight mode is 0: directly write the encoded data (binary bits) of the weights contained in the weight table into the texture super-compressed code stream (corresponding to the entropy coding method with a compression rate of 1), and entropy code the index table (corresponding to the entropy coding method with a compression rate greater than 1).

[0095] Weight mode is 1: the encoded data of the corresponding weights of all blocks extracted from the texture code stream are written into the texture super-compressed code stream (i.e., the entropy coding method with a compression rate of 1).

[0096] Weight mode is 2: Entropy coding is performed on the coded data corresponding to the weights of all blocks extracted from the texture bitstream (corresponding to an entropy coding method with a compression ratio greater than 1).

[0097] Weight mode is 3: Entropy coding is performed on both the weight table and the index table (corresponding to an entropy coding method with a compression ratio greater than 1).

[0098] EpMode is 0: the encoded data (ie, the binary bits of the RGB values) of the corresponding endpoints of all blocks extracted from the texture stream are written into the texture super-compressed stream (corresponding to the entropy coding method with a compression rate of 1).

[0099] EpMode is 1: Entropy encoding is performed on the transformation data of the endpoint color components (Y, Co, and Cg) (corresponding to an entropy encoding method with a compression ratio greater than 1).

[0100] EpMode is 2: the transformed data of the Y component of the endpoint is converted into binary bits (corresponding to the entropy coding method with a compression rate of 1), and the transformed data of the Co and Cg components of the endpoint are entropy coded (corresponding to the entropy coding method with a compression rate greater than 1).

[0101] EpMode is 3: entropy coding is performed on the coded data corresponding to endpoints of all blocks extracted from the texture stream (corresponding to an entropy coding method with a compression ratio greater than 1).

[0102] Exemplarily, the weight mode and endpoint mode may be referred to as the syntax of configuration information, or as the syntax of texture super-compression code stream.

[0103] According to the fourth aspect, or any implementation of the fourth aspect above, the partition information includes: the byte length of the ultra-compressed data of the partition information (PartInfoLenth) and the ultra-compressed data of the partition information (PartInfoBuf).

[0104] Exemplarily, the byte length of the ultra-compressed data of the partition information and the ultra-compressed data of the partition information can be called the syntax of the partition information, and can also be called the syntax of the texture ultra-compressed code stream.

[0105] According to the fourth aspect, or any implementation of the fourth aspect above, the partition information further includes the byte length of the partition index (Part2IndexLenth) and the ultra-compressed data of the partition index (Part2IndexBuf).

[0106] Exemplarily, the byte length of the partition index and the super-compressed data of the partition index can be called the syntax of the partition information, and can also be called the syntax of the texture super-compressed code stream.

[0107] According to the fourth aspect, or any implementation of the fourth aspect above,

[0108] When the endpoint mode is the first preset value (e.g., EpMode is 0), the endpoint code stream includes encoded data of the RGB components of the endpoint value;

[0109] When the endpoint mode is the second preset value (e.g., EpMode is 1), the endpoint code stream includes the super-compressed data of the Y component of the endpoint value and the super-compressed data of the CoCg component, and the endpoint code stream also includes the byte length of the super-compressed data of the Y component of the endpoint value and the byte length of the super-compressed data of the CoCg component;

[0110] When the endpoint mode is the third preset value (e.g., EpMode is 2), the endpoint code stream includes the super-compressed data of the Y component and the super-compressed data of the CoCg component of the endpoint value, and the endpoint code stream also includes the byte length of the super-compressed data of the CoCg component of the endpoint value;

[0111] When the endpoint mode is the fourth preset value (such as EpMode is 3), the endpoint code stream includes super-compressed data of the RGB components of the endpoint value, and the endpoint code stream also includes the byte length of the super-compressed data of the RGB components of the endpoint value.

[0112] According to the fourth aspect, or any implementation of the fourth aspect above, the endpoint code stream further includes: super-compressed data of the transparency component of the endpoint value and the byte length of the super-compressed data of the transparency component of the endpoint value.

[0113] According to the fourth aspect, or any implementation of the fourth aspect above,

[0114] When the weight mode is the fifth preset value or the sixth preset value (e.g., weight mode is 0 or 3), the weight code stream includes the byte length of the super-compressed data of the index table, the super-compressed data of the weight table, and the super-compressed data of the index table;

[0115] When the super-compression coding mode of the weight is the seventh preset value (e.g., weight mode is 1), the weight code stream includes the coded data of the weight;

[0116] When the super-compression coding mode of the weight is the eighth preset value (such as weight mode is 2), the weight code stream includes the byte length of the super-compressed data of the weight and the super-compressed data of the weight.

[0117] According to the fourth aspect, or any implementation of the fourth aspect above, when the weight mode is the fifth preset value or the sixth preset value, the weight code stream also includes the byte length of the super-compressed data of the weight table.

[0118] It should be understood that the syntax in the texture super-compression code stream can also be expressed in other English (or English abbreviations), which will not be described here.

[0119] In a fifth aspect, the present application provides a texture encoder, wherein the texture encoder is configured to:

[0120] Acquire images;

[0121] The image is divided into blocks to obtain multiple blocks;

[0122] Determining a target coding mode corresponding to the first block from a plurality of preset coding modes; wherein, in a plurality of texture code streams of the second blocks obtained by encoding the second block based on the plurality of preset coding modes, the number of percentages of the coded data corresponding to the weight of the second block is the same, the number of percentages of the coded data corresponding to the endpoints of the second block is the same, and the relative positions of the coded data corresponding to the weight of the second block and the coded data of the endpoints are fixed; and the first block and the second block are each any one of the plurality of blocks;

[0123] The first block is encoded based on a target coding mode corresponding to the first block to obtain a texture code stream of the first block; wherein the texture code stream of the first block includes encoding data of a weight corresponding to the first block and encoding data of an endpoint, and the texture code streams of multiple blocks constitute a texture code stream of an image.

[0124] In a sixth aspect, the present application provides a texture decoder, wherein the texture decoder is configured to:

[0125] Determining a target decoding mode corresponding to the first block from a plurality of preset decoding modes; wherein, in texture code streams of a plurality of second blocks decoded based on the plurality of preset decoding modes, the reconstructed data of the coded data corresponding to the weight of the second block accounts for the same number of percentages, the reconstructed data of the coded data corresponding to the endpoints of the second block accounts for the same number of percentages, and the relative positions of the reconstructed data of the coded data corresponding to the weight of the second block and the reconstructed data of the coded data of the endpoints are fixed; and the first block and the second block are any one of a plurality of blocks included in the image;

[0126] Decoding the texture code stream of the first block in the texture code stream of the image based on the target decoding mode corresponding to the first block to obtain a reconstructed value of the weight corresponding to the first block and a reconstructed value of the endpoint;

[0127] The first block is reconstructed based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of multiple blocks constitute a reconstructed image of the image.

[0128] In the seventh aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, which, when executed by the processor, enables the electronic device to execute the method in the first aspect or any possible implementation of the first aspect.

[0129] The seventh aspect and any implementation of the seventh aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the seventh aspect and any implementation of the seventh aspect can be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.

[0130] In an eighth aspect, an embodiment of the present application provides an electronic device comprising: a memory and a processor, wherein the memory is coupled to the processor; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the method in the second aspect or any possible implementation of the second aspect.

[0131] The eighth aspect and any implementation of the eighth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the eighth aspect and any implementation of the eighth aspect can be referred to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, and will not be repeated here.

[0132] In the ninth aspect, an embodiment of the present application provides a chip comprising one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the method in the first aspect or any possible implementation of the first aspect is implemented.

[0133] The ninth aspect and any implementation of the ninth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the ninth aspect and any implementation of the ninth aspect can be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.

[0134] In the tenth aspect, an embodiment of the present application provides a chip comprising one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the method in the second aspect or any possible implementation of the second aspect is implemented.

[0135] The tenth aspect and any implementation of the tenth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the tenth aspect and any implementation of the tenth aspect can be referred to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, and will not be repeated here.

[0136] In the eleventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer or a processor, it enables the computer or the processor to execute the method in the first aspect or any possible implementation of the first aspect.

[0137] The eleventh aspect and any implementation of the eleventh aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the eleventh aspect and any implementation of the eleventh aspect can be referred to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, and will not be repeated here.

[0138] In the twelfth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer or a processor, it enables the computer or the processor to execute the method in the second aspect or any possible implementation of the second aspect.

[0139] The twelfth aspect and any implementation of the twelfth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the twelfth aspect and any implementation of the twelfth aspect can be referred to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, and will not be repeated here.

[0140] In a thirteenth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer or the processor executes the method in the first aspect or any possible implementation of the first aspect.

[0141] The thirteenth aspect and any implementation of the thirteenth aspect respectively correspond to the first aspect and any implementation of the first aspect. The technical effects corresponding to the thirteenth aspect and any implementation of the thirteenth aspect can be referred to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, and will not be repeated here.

[0142] In the fourteenth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer or the processor executes the method in the second aspect or any possible implementation of the second aspect.

[0143] The fourteenth aspect and any implementation of the fourteenth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the fourteenth aspect and any implementation of the fourteenth aspect can be referred to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, and will not be repeated here.

[0144] In a fifteenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a texture super-compressed code stream, wherein the texture super-compressed code stream includes texture information, configuration information, endpoint code stream and weight code stream.

[0145] In a sixteenth aspect, an embodiment of the present application provides a texture decoder, the texture decoder including a processing circuit, the processing circuit being configured to perform the following steps:

[0146] Determining a target decoding mode corresponding to the first block from a plurality of preset decoding modes; wherein, in texture code streams of a plurality of second blocks decoded based on the plurality of preset decoding modes, the reconstructed data of the coded data corresponding to the weight of the second block accounts for the same number of percentages, the reconstructed data of the coded data corresponding to the endpoints of the second block accounts for the same number of percentages, and the relative positions of the reconstructed data of the coded data corresponding to the weight of the second block and the reconstructed data of the coded data of the endpoints are fixed; and the first block and the second block are any one of a plurality of blocks included in the image;

[0147] Decoding the texture code stream of the first block in the texture code stream of the image based on the target decoding mode corresponding to the first block to obtain a reconstructed value of the weight corresponding to the first block and a reconstructed value of the endpoint;

[0148] The first block is reconstructed based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of multiple blocks constitute a reconstructed image of the image.

[0149] In a seventeenth aspect, an embodiment of the present application provides a device for storing a code stream, the device comprising: a receiver and at least one storage medium, the receiver being used to receive the code stream; the at least one storage medium being used to store the code stream; the code stream being generated according to the fourth aspect and any one of the implementation methods of the fourth aspect.

[0150] The seventeenth aspect and any implementation of the seventeenth aspect correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the seventeenth aspect and any implementation of the seventeenth aspect can be referred to the technical effects corresponding to the above-mentioned fourth aspect and any implementation of the fourth aspect, and will not be repeated here.

[0151] In the eighteenth aspect, an embodiment of the present application provides a device for transmitting a code stream, the device comprising: a transmitter and at least one storage medium, the at least one storage medium being used to store the code stream, the code stream being generated according to the fourth aspect and any one of the implementation methods of the fourth aspect; the transmitter being used to obtain the code stream from the storage medium and send the code stream to the end-side device through the transmission medium.

[0152] The eighteenth aspect and any implementation of the eighteenth aspect correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the eighteenth aspect and any implementation of the eighteenth aspect can be referred to the technical effects corresponding to the fourth aspect and any implementation of the fourth aspect, and will not be repeated here.

[0153] In a nineteenth aspect, an embodiment of the present application provides a system for distributing a code stream, the system comprising: at least one storage medium for storing at least one code stream, the at least one code stream being generated according to the fourth aspect and any one of the implementation methods of the fourth aspect, a streaming media device for obtaining a target code stream from the at least one storage medium and sending the target code stream to an end-side device, wherein the streaming media device comprises a content server or a content distribution server.

[0154] The nineteenth aspect and any implementation of the nineteenth aspect correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the nineteenth aspect and any implementation of the nineteenth aspect can be referred to the technical effects corresponding to the above-mentioned fourth aspect and any implementation of the fourth aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0155] FIG1A is a schematic diagram illustrating an exemplary application scenario;

[0156] FIG1B is a schematic diagram illustrating an exemplary application scenario;

[0157] FIG1C is a schematic diagram illustrating an exemplary application scenario;

[0158] FIG1D is a schematic diagram illustrating an exemplary application scenario;

[0159] FIG1E is a schematic diagram illustrating an exemplary application scenario;

[0160] FIG1F is a schematic diagram illustrating an exemplary application scenario;

[0161] FIG1G is a schematic diagram illustrating an exemplary application scenario;

[0162] FIG2A is a schematic diagram illustrating an exemplary texture super-compression framework 200;

[0163] FIG2B is a schematic structural diagram of an exemplary texture encoder 201;

[0164] FIG2C is a schematic diagram showing the structure of an exemplary super-compression encoder 202;

[0165] FIG2D is a schematic diagram showing the structure of an exemplary super-compression decoder 203;

[0166] FIG2E is a schematic diagram showing the structure of the texture decoder 204;

[0167] FIG3 is a schematic diagram illustrating an exemplary texture super-compression encoding process 300;

[0168] FIG4 is a schematic diagram illustrating an exemplary texture super-compression decoding process 400;

[0169] FIG5A is a schematic diagram illustrating an exemplary texture super-compression encoding process 500;

[0170] FIG5B is a schematic diagram illustrating an exemplary texture encoding process;

[0171] FIG5C is a schematic diagram showing an exemplary syntax structure of a texture code stream of a first block;

[0172] FIG5D is a schematic diagram illustrating an exemplary texture encoding process;

[0173] FIG5E is a schematic diagram showing an exemplary syntax structure of a texture code stream of a first block;

[0174] FIG5F is a schematic diagram illustrating an exemplary table creation process;

[0175] FIG5G is a schematic diagram illustrating an exemplary encoding process of the first block of encoded data corresponding to an endpoint;

[0176] FIG6 is a schematic diagram illustrating an exemplary texture super-compression decoding process 600;

[0177] FIG7 is a schematic diagram illustrating an exemplary texture super-compression encoding process 700;

[0178] FIG8 is a schematic diagram illustrating an exemplary texture super-compression decoding process 800;

[0179] FIG9 is a diagram showing an exemplary comparison of the effects of the prior art and the present application;

[0180] FIG10 is a schematic structural diagram of an exemplary device. DETAILED DESCRIPTION

[0181] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0182] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0183] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.

[0184] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0185] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.

[0186] 1A to 1G are schematic diagrams illustrating exemplary application scenarios.

[0187] 1A , illustratively, after a user clicks a photo button 102 on a mobile phone's photo interface 101 , the mobile phone may perform the following steps in response to the user's operation:

[0188] When a mobile phone saves an image captured by a camera in JPEG format (that is, a JPEG image is obtained by taking a photo), it can decode the JPEG image to obtain an RGB image. The mobile phone can then downsample the RGB image to obtain a downsampled RGB image. The mobile phone can then perform texture super-compression encoding on the downsampled RGB image to obtain and store the texture super-compressed bitstream.

[0189] When a mobile phone saves an image captured by a camera as an RGB image, it can directly downsample the RGB image to obtain a downsampled RGB image. Then, the mobile phone can perform texture super-compression encoding on the downsampled RGB image to obtain and store a texture super-compressed code stream.

[0190] It should be understood that in the application scenario of FIG. 1A , image decoding and downsampling are optional steps.

[0191] Subsequently, when the user needs to view the image obtained by taking a photo, he can click the application icon 104 of the gallery application in the main interface 103 of the mobile phone in Figure 1B (1). The mobile phone can respond to the user's operation and execute the steps in Figure 1B (2) (i.e., texture super-compression decoding of multiple texture super-compression code streams respectively to obtain multiple RGB images (i.e., reconstructed images of the down-sampled RGB images in Figure 1A)), and display the multiple RGB images obtained by texture super-compression decoding in the main interface 105 of the gallery.

[0192] Referring to Figure 1C, for example, after mobile phone 2 receives a JPEG image sent by mobile phone 1 via Bluetooth or Huawei Share, mobile phone 2 can perform the following operations: decode the JPEG image to obtain an RGB image. Afterwards, the mobile phone can downsample the RGB image to obtain a downsampled RGB image. Next, the mobile phone can perform texture super-compression encoding on the downsampled RGB image to obtain and store a texture super-compressed code stream. Afterwards, the user can view the image received from mobile phone 1 in the gallery of mobile phone 2. The specific process can be referred to the description of Figure 1B above and will not be repeated here.

[0193] Referring to FIG1D , for example, after mobile phone 2 downloads a JPEG image from a server via a network (wired or wireless), mobile phone 2 can perform the following operations: It can decode the JPEG image to obtain an RGB image. It can then downsample the RGB image to obtain a downsampled RGB image. It can then perform texture super-compression encoding on the downsampled RGB image to obtain a texture super-compressed bitstream.

[0194] In one possible approach, after receiving the super-compressed texture stream, mobile phone 2 can store the super-compressed texture stream. Subsequently, the user can view the image received from mobile phone 1 in the gallery of mobile phone 2. The specific process can be referred to the description of FIG. 1B above and will not be repeated here.

[0195] It should be understood that the downsampling in FIG. 1C and FIG. 1D is an optional step and is not limited to viewing from a gallery or from any application that reads images, such as a file manager.

[0196] In one possible method, as shown in Figure 1E, when the JPEG image downloaded by mobile phone 2 from the server is a JPEG image sent to the server by mobile phone 1 through instant messaging software, after obtaining the texture super-compressed code stream, mobile phone 2 can perform texture super-compression decoding on the texture super-compressed code stream to obtain an RGB image, and can display the RGB image in the chat interface of the instant messaging software.

[0197] For example, in applications that display grid images, such as picture galleries and file managers, the texture super-compression code streams of multiple images can be texture super-compressed and decoded to obtain a large RGB image. The large RGB image is composed of multiple reconstructed images, and these multiple reconstructed images are obtained by texture super-compression decoding the texture super-compression code streams of multiple images.

[0198] For example, in Figure 1F(1), the texture super-compressed code streams of images 1 to 5 are input; then, according to the arrangement of reconstructed images 1 to 5 in Figure 1F(1), the texture code streams of the blocks are reconstructed block by block (one block is represented by a small square in 1F(1)) (i.e., super-compressed decoding) and the texture code streams of multiple blocks are spliced ​​to obtain a texture code stream of a large image (conforming to the standard texture format); then, the texture code stream of the large image is texture decoded to obtain a large RGB image and display it. The large RGB image consists of reconstructed image 1, reconstructed image 2, reconstructed image 3, reconstructed image 4 and reconstructed image 5. Among them, the sizes of any two reconstructed images among reconstructed image 1, reconstructed image 2, reconstructed image 4 and reconstructed image 5 are different; the sizes of reconstructed image 3 and reconstructed image 2 are the same.

[0199] For example, in Figure 1F(2), the texture super-compressed code streams of images 6 to 9 are input. Then, according to the arrangement of reconstructed images 6 to 9 in Figure 1F(2), the texture code streams of the blocks are reconstructed block by block (one block is represented by a small square in 1F(2)). The texture code streams of multiple blocks are spliced ​​to obtain a texture code stream of a large image (conforming to the standard texture format); then, the texture code stream of the large image is texture decoded to obtain a large RGB image and display it. The large RGB image consists of reconstructed image 6, reconstructed image 7, reconstructed image 8 and reconstructed image 9. Among them, the sizes of any two reconstructed images among reconstructed image 6, reconstructed image 7, reconstructed image 8 and reconstructed image 9 are the same.

[0200] That is to say, the present application can use texture super-compression code streams of multiple images of different sizes (or the same size), and obtain a large RGB image through texture super-compression decoding.

[0201] Referring to FIG. 1G , as an example, during the process of developing an application (or application program (APP)) on an application development platform, the application development platform can, in response to the application developer's operation, decode the JPEG image required by the application to obtain an RGB image. The RGB image can then be texture-super-compressed encoded to obtain a texture super-compressed bitstream. The application development platform can then package the texture super-compressed bitstream and the application software package (including the application program code) into an application installation package.

[0202] Continuing with reference to Figure 1G, after the user downloads the application installation package through the mobile terminal and performs the installation operation, the mobile terminal can unpack the application installation package in response to the user's operation behavior to obtain the texture super-compression code stream and the application software package. On the one hand, the mobile terminal can perform texture super-compression decoding on the texture super-compression code stream to obtain an RGB image; on the other hand, the mobile terminal can install the application based on the application software package. After the application is installed, the user can execute the operation to start the application. At this time, the mobile terminal can start the application in response to the user's operation behavior. After the application is started (that is, during the operation of the application), the mobile terminal can display the application interface of the application, wherein the image in the application interface is the RGB image obtained by performing texture super-compression decoding on the texture super-compression code stream.

[0203] Optionally, after the user downloads the application installation package through the mobile terminal and performs the installation operation, the mobile terminal can respond to the user's operation behavior, decompress and read the texture super-compressed code stream from the application installation package in real time, and decode the texture super-compressed code stream into a texture code stream. The texture code stream is sent to the GPU for decoding into an RGB / RGBA image, and finally sent for display.

[0204] It should be noted that the mobile phones in Figures 1A to 1D can be other terminal devices, such as tablet computers, laptop computers, desktop computers, wearable devices, etc., and this application does not impose any restrictions on this.

[0205] It should be noted that the specific implementation form of the server in Figure 1D can be a cloud server, a physical (independent) server, a station cluster server, etc., and this application does not impose any restrictions on this.

[0206] FIG. 2A is a schematic diagram illustrating an exemplary texture super-compression framework 200 .

[0207] 2A , illustratively, a texture hyper-compression framework 200 may include a texture encoder 201, a hyper-compression encoder 202, a hyper-compression decoder 203, and a texture decoder 204. It should be understood that the texture hyper-compression framework 200 shown in FIG2A is merely an example of a texture hyper-compression framework, and the texture hyper-compression framework 200 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration.

[0208] Exemplarily, the texture encoder 201, the super-compression encoder 202 and the super-compression decoder 203 may be implemented by a CPU or a dedicated chip, and the texture decoder 204 may be hardened in a GPU.

[0209] Continuing with FIG2A , the texture super-compression encoding process may be exemplarily as follows: an image is input to the texture encoder 201, which performs texture encoding on the image to obtain a texture bitstream for the image and input the texture bitstream to the super-compression encoder 202. The super-compression encoder may then perform super-compression encoding (also referred to as secondary compression) on the encoded data carried in the texture bitstream of the image to obtain a super-compressed texture bitstream for the image.

[0210] It should be noted that the image input to the texture encoder 201 may include a two-dimensional image and a three-dimensional image. The embodiment of the present application takes a two-dimensional image as an example for description.

[0211] For example, a two-dimensional image may include an RGBX image, where the RGBX image may include an RGB image and an RGBA image. It should be understood that this application does not limit the storage order of the R (Red), G (Green), B (Blue), and A (alpha, used to represent transparency) components. That is, RGBX may include ARGB, ABGR, and so on.

[0212] Continuing with FIG2A , the texture super-compression decoding process may be as follows: a super-compressed texture bitstream is input to a super-compression decoder, which performs super-compression decoding on the super-compressed texture bitstream to obtain a texture bitstream for the image, which is then input to a texture decoder. The texture decoder may then perform texture decoding on the texture bitstream to obtain a reconstructed image for the image, which is then input to a renderer 301. The renderer 301 may then render the reconstructed image to obtain a rendered image, which is then input to a display module 302, which then displays the rendered image.

[0213] FIG2B is a schematic structural diagram of an exemplary texture encoder 201 .

[0214] 2B , illustratively, a texture encoder 201 may include a blocking module 11, a fitting processing module 12, a quantization module 13, and an entropy coding module 14. It should be understood that the texture encoder 201 shown in FIG2B is merely an example of a texture encoder, and the texture encoder 201 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration.

[0215] 2B , illustratively, the texture encoding process of the texture encoder 201 may be as follows: an image may be input to a block segmentation module 11, which segments the image to obtain a plurality of blocks (or images of a plurality of blocks). Subsequently, the following operations are performed for each block: the image of the current block is input to a fitting processing module 12, which performs fitting processing on the pixel values ​​of all pixels in the image of the current block to obtain weight values ​​and endpoint values ​​corresponding to the current block; wherein each pixel in the image of the current block corresponds to a weight (the weight values ​​corresponding to all pixels in the current block can form a weight matrix corresponding to the current block), and the endpoint values ​​corresponding to the current block are one or more pairs. Next, the weight values ​​and endpoint values ​​corresponding to the current block may be input to a quantization module 13, which performs quantization processing on the weight values ​​and endpoint values ​​corresponding to the current block, respectively, to obtain quantized values ​​of the weights and endpoints corresponding to the current block. The quantized weight values ​​and endpoint values ​​corresponding to the current block are then input to the entropy coding module 14, which performs entropy coding on the quantized weight values ​​and endpoint values ​​corresponding to the current block, respectively, to generate a texture stream for the current block. After the texture streams for multiple blocks are generated, these texture streams can form the texture stream for the image. Optionally, the entropy coding module 14 can encapsulate the texture streams for the multiple blocks into the texture stream for the image.

[0216] FIG2C is a schematic diagram showing the structure of an exemplary super-compression encoder 202 .

[0217] 2C , illustratively, the super-compression encoder 202 may include: a parsing module 21, a table building module 22, a transform module 23, and an entropy coding module 24. It should be understood that the super-compression encoder 202 shown in FIG2C is merely an example of a super-compression encoder, and the super-compression encoder 202 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration.

[0218] Continuing with FIG2C , illustratively, the super-compression encoding process of the super-compression encoder 202 may be as follows: the parsing module 21 may parse the texture code stream input by the texture encoder 201 to obtain the encoded data of the weight corresponding to each block, the encoded data of the endpoint, and other encoded data (such as partition information, image size, block information, encoding mode identifier, etc.). Subsequently, on the one hand, the encoded data of the weights corresponding to the multiple blocks may be input to the table building module 22, which builds a table based on the encoded data of the weights corresponding to the multiple blocks, obtains table data, and inputs it to the entropy coding module 24; then, the entropy coding module 24 may entropy encode the table data to obtain a weight code stream. On the other hand, the encoded data of the endpoints corresponding to the multiple blocks may be input to the transformation module 23, which transforms the encoded data of the endpoints corresponding to the multiple blocks to obtain transformed data, which is input to the entropy coding module 24; then, the entropy coding module 24 may entropy encode the transformed data to obtain an endpoint code stream. Alternatively, the encoded data of other information can be input into the entropy coding module 24; the entropy coding module 24 can then perform entropy coding on the encoded data of the other information to generate other bitstreams. The weighted bitstream, endpoint bitstream, and other bitstreams can form a super-compressed texture bitstream for the image. Alternatively, the entropy coding module 24 can encapsulate the weighted bitstream, endpoint bitstream, and other bitstreams into a super-compressed texture bitstream for the image.

[0219] FIG2D is a schematic diagram showing the structure of an exemplary super-compression decoder 203 .

[0220] 2D , illustratively, the super-compression decoder 203 may include: an encapsulation module 31, a table lookup module 32, an inverse transform module 33, and an entropy decoding module 34. It should be understood that the super-compression decoder 203 shown in FIG2D is merely an example of a super-compression decoder, and the super-compression decoder 203 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration.

[0221] Continuing with reference to FIG2D , illustratively, the super-compression decoding process of the super-compression decoder 203 may be as follows: the texture super-compressed code stream of the image is input into the entropy decoding module 34 to obtain the reconstruction data of the table data, the reconstruction data of the transformation data, and the reconstruction data of the coded data of other information. Afterwards, on the one hand, the table lookup module 32 may determine the reconstruction data of the coded data corresponding to the weights of the multiple blocks based on the reconstruction data of the table data; on the other hand, the inverse transformation module 33 may perform an inverse transformation on the reconstruction data of the transformation data to obtain the reconstruction data of the coded data corresponding to the endpoints of the multiple blocks. Subsequently, the encapsulation module 31 may encapsulate the reconstruction data of the coded data corresponding to the weights of the multiple blocks, the reconstruction data of the coded data corresponding to the endpoints of the multiple blocks, and the reconstruction data of the coded data of other information to obtain the texture code stream.

[0222] It should be noted that ultra-compression coding can be lossless coding. In this case, the reconstructed data of the coded data of the weight is the same as the coded data of the weight, the reconstructed data of the coded data of the endpoint is the same as the coded data of the endpoint, and the reconstructed data of the coded data of other information is the same as the coded data of other information.

[0223] FIG2E is a schematic diagram showing the structure of the texture decoder 204 .

[0224] 2E , illustratively, the texture decoder 204 may include a splicing module 41, a block reconstruction module 42, an inverse quantization module 43, and an entropy decoding module 44. It should be understood that the texture decoder 204 shown in FIG2E is merely an example of a texture decoder, and the texture decoder 204 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration.

[0225] 2E , illustratively, the texture decoding process of the texture decoder 204 may be as follows: the entropy decoding module 44 may perform entropy decoding on the texture code stream to obtain entropy decoded values ​​of weights and endpoints corresponding to multiple blocks, and input the values ​​into the inverse quantization module 43. Next, the following operation is performed for each block: the inverse quantization module 43 may perform inverse quantization on the entropy decoded values ​​of the weights and endpoints corresponding to the current block, respectively, to obtain reconstructed values ​​of the weights and endpoints corresponding to the current block, and input the values ​​into the block reconstruction module 42. Thereafter, the block reconstruction module 42 may reconstruct the current block based on the reconstructed values ​​of the weights and endpoints corresponding to the current block, to obtain a reconstructed image of the current block; and so on, to obtain reconstructed images of multiple blocks and input them into the splicing module 41. Subsequently, the splicing module 41 may splice the reconstructed images of the multiple blocks according to the arrangement order of the multiple blocks to obtain a complete reconstructed image.

[0226] That is to say, texture super-compression coding can include texture coding and super-compression coding; wherein, texture coding can obtain texture code stream, and texture code stream can include encoded data of various information; super-compression coding can obtain texture super-compression code stream, and texture super-compression code stream can include super-compressed data of various information (i.e., encoded data of encoded data of various information).

[0227] Texture super-compression decoding may include super-compression decoding and texture decoding; wherein, super-compression decoding may obtain reconstructed data of coded data of various information, and texture decoding may obtain reconstructed values ​​of various information.

[0228] It should be noted that entropy coding can include an entropy coding method with a compression rate of 1 and an entropy coding method with a compression rate greater than 1. Among them, the entropy coding method with a compression rate of 1 essentially does not compress the information and does not reduce the data volume of the information; an implementation of this entropy coding method can convert the information into binary bits. The entropy coding method with a compression rate greater than 1 essentially means compressing the information to reduce the data volume of the information; the entropy coding algorithms included in this entropy coding method may include Finite State Entropy (FSE) coding algorithm, Asymmetric Numeral Systems (ANS) coding algorithm, arithmetic coding algorithm, Huffman coding algorithm, etc., and this application does not impose any restrictions on this.

[0229] The texture super-compression encoding and decoding process of the present application is described below based on FIG. 2A to FIG. 2E .

[0230] 3 is a schematic diagram illustrating an exemplary texture super-compression encoding process 300. For example, in the texture super-compression encoding process 300, S301 to S304 may be executed by the texture encoder 201, and S305 to S306 may be executed by the super-compression 202.

[0231] S301, acquire an image.

[0232] For example, the image in S301 may refer to an image to be encoded, and then S302 to S306 may be executed to implement texture super-compression encoding of the image to be encoded.

[0233] Exemplarily, the image in S301 may be an RGBX image.

[0234] For example, the image in S301 may be an image obtained by downsampling the image captured by the terminal device. For another example, the image in S301 may be an image obtained by decoding and downsampling the image captured by the terminal device. For another example, the image in S301 may be an image obtained by decoding and downsampling the image sent by other terminal devices via Bluetooth or Huawei Share. For another example, the image in S301 may be an image obtained by decoding and downsampling the image obtained from the server. For another example, the image in S301 may be an image extracted from a video sequence and used as a video cover. It should be understood that this application does not limit the source of the image in S301.

[0235] S302: Divide the image into blocks to obtain multiple blocks.

[0236] Exemplarily, the blocking module 11 of the texture encoder 201 may perform blocking processing on the image to obtain multiple blocks (or images of multiple blocks).

[0237] For example, the block segmentation module 11 of the texture encoder 201 may divide the image into multiple blocks of the same size; for example, the size of each block may be 4*4, 8*8, etc., which is not limited in this application. It should be noted that the height and width of each block may be the same or different, which is not limited in this application.

[0238] Exemplarily, the blocking module 11 of the texture encoder 201 can block the image according to the pre-configured block size; it can also block the image according to the texture complexity or application scenario of the image; this application does not impose any restrictions on this.

[0239] S303, determining a target coding mode corresponding to the first block from a plurality of preset coding modes; wherein, in the texture code streams of the plurality of second blocks obtained by encoding the second blocks based on the plurality of preset coding modes, the proportion of the coding data of the second blocks corresponding to the weights is the same, and the proportion of the coding data of the second blocks corresponding to the endpoints is the same, and the relative positions of the coding data of the second blocks corresponding to the weights and the coding data of the endpoints are fixed; the first block and the second block are any one of the plurality of blocks.

[0240] It should be noted that, in the embodiment of the present application, the texture encoder 201 may be a texture encoder that supports selecting an optimal coding mode from N (N is an integer greater than 2) coding modes in the texture compression standard to perform texture coding on each block. In the texture code stream of the block obtained by encoding the same block based on at least two of the N coding modes: the percentage of the coded data corresponding to the block weight (also referred to as the byte length) is different, or the percentage of the coded data corresponding to the block endpoint is different, or the relative position of the coded data corresponding to the block weight and the coded data of the endpoint is not fixed). And in the texture code stream of the block obtained by encoding the same block based on at least two of the N coding modes: the percentage of the coded data corresponding to the block weight is the same, and the percentage of the coded data corresponding to the block endpoint is the same, and the relative position of the coded data corresponding to the block weight and the coded data of the endpoint is fixed. For example, the texture encoder 201 may be an adaptive scalable texture compression (ASTC) encoder. In other words, the endpoints and weights in the texture code streams of the multiple blocks originally generated by the texture encoder 201 in the present application are not fixed (that is, the proportion of the encoded data of the weights is different, or the proportion of the encoded data of the endpoints is different, or the relative position of the encoded data of the weights and the encoded data of the endpoints is not fixed).

[0241] For example, the present application may pre-select M (M is an integer greater than 1 and less than N) coding modes from the aforementioned N coding modes as preset coding modes. In the texture code streams of multiple second blocks obtained by encoding the second block based on the M preset coding modes, the percentage of the encoded data corresponding to the weight of the second block is the same, the percentage of the encoded data corresponding to the endpoint of the second block is the same, and the relative position of the encoded data corresponding to the weight of the second block and the encoded data of the endpoint is fixed. The second block may be any of the multiple blocks of the aforementioned image. Next, the texture encoder 201 may be constrained based on these M preset coding modes, i.e., the texture encoder 201 may be constrained so that during the texture encoding process, each block can only select one preset coding mode from these M preset coding modes for texture encoding. In this case, the texture encoder 201 of the present application is a texture encoder 201 with constrained coding modes. It should be noted that each block can select a different preset coding mode from the M preset coding modes as its corresponding target coding mode.

[0242] Exemplarily, the coding mode (or preset coding mode) may be used to indicate the coding mode, color endpoint mode, and number of partitions of a block.

[0243] Exemplarily, the coding mode of a block can be used to indicate the plane information of the block (such as the number of planes) and the coding method of the block corresponding weights (such as the size of the block corresponding weight matrix (the same as the size of the block obtained by the S302 blocking module for blocking the image), the quantization parameter of the block corresponding weights, the entropy coding method of the block corresponding weights, etc.).

[0244] Exemplarily, the color endpoint mode is used to indicate the encoding method of the block corresponding endpoint (for example, the quantization parameter of the block corresponding endpoint, the preprocessing method (such as difference, absolute value), the entropy encoding method of the block corresponding endpoint, etc.).

[0245] Exemplarily, the texture encoder 201 in the constrained coding mode performs independent texture coding on each block. For a first block (the first block is any one of multiple blocks in an image), a target coding mode corresponding to the first block can be determined from multiple preset coding modes. It should be noted that the target coding modes corresponding to different first blocks can be the same or different, and this application does not impose any limitation on this.

[0246] Exemplarily, S303 may be executed by a configuration module (not shown in FIG. 2B ) or a fitting processing module 22 of the texture encoder 201 , which is not limited in the present application.

[0247] S304, encoding the first block based on the target coding mode corresponding to the first block to obtain a texture code stream of the first block; wherein the texture code stream of the first block includes the encoded data of the weight corresponding to the first block and the encoded data of the endpoints, and the texture code streams of multiple blocks constitute the texture code stream of the image.

[0248] Exemplarily, the fitting processing module 12 of the texture encoder 201 may perform fitting processing on the first block based on the plane information and the number of partitions indicated by the target coding mode corresponding to the first block to obtain the weight value and endpoint value corresponding to the first block.

[0249] On the one hand, the quantization module 13 of the texture encoder 201 can quantize the value of the weight corresponding to the first block based on the quantization parameter of the block corresponding weight indicated by the target coding mode corresponding to the first block, thereby obtaining a quantized value of the weight corresponding to the first block. Thereafter, the entropy coding module 14 of the texture encoder 201 can entropy encode the quantized value of the weight corresponding to the first block based on the entropy coding method of the block corresponding weight indicated by the target coding mode corresponding to the first block, thereby obtaining encoded data of the weight corresponding to the first block.

[0250] On the other hand, the quantization module 13 of the texture encoder 201 can quantize the value of the endpoint corresponding to the first block based on the quantization parameter of the block corresponding endpoint indicated by the target coding mode corresponding to the first block, and obtain the quantization value of the endpoint corresponding to the first block. Afterwards, the entropy coding module 14 of the texture encoder 201 can entropy encode the quantization value of the endpoint corresponding to the first block based on the entropy coding method of the block corresponding endpoint indicated by the target coding mode corresponding to the first block, and obtain the encoded data of the endpoint corresponding to the first block. (It should be understood that when the target coding mode corresponding to the first block indicates a preprocessing method, the value of the endpoint corresponding to the first block can also be preprocessed before the quantization process).

[0251] For example, the entropy coding module 14 may further perform entropy coding on the values ​​of other information corresponding to the first block to obtain coded data of the other information. In this way, the coded data of the weight corresponding to the first block, the coded data of the endpoint corresponding to the first block, and the coded data of the other information may constitute the texture code stream of the first block.

[0252] After the texture code streams of all blocks in the image are obtained, the texture code streams of all blocks can constitute the texture code stream of the image.

[0253] Exemplarily, S305 to S306 may be performed by the super-compression encoder 202 .

[0254] S305 , extracting the coded data of the weights corresponding to the multiple blocks and the coded data of the endpoints from the texture code stream of the image.

[0255] Exemplarily, the parsing module 21 of the super-compression encoder 202 may parse the texture code stream of the image, and extract the encoding data of the weights corresponding to the multiple blocks and the encoding data of the endpoints from the texture code stream of the image.

[0256] S306 , encoding the coded data corresponding to the weights of the multiple blocks and encoding the coded data corresponding to the endpoints of the multiple blocks to obtain a texture super-compressed code stream of the image.

[0257] In one possible approach, the super-compression encoder 202 may independently encode three types of information: the encoded data of weights corresponding to all blocks, the encoded data of endpoints corresponding to all blocks, and the encoded data of other information corresponding to all blocks, to obtain a super-compressed texture code stream of the image.

[0258] In one possible approach, the super-compression encoder 202 can independently encode the encoded data for weights corresponding to all blocks and the encoded data for endpoints corresponding to all blocks to obtain a super-compressed texture bitstream for the image. In other words, the encoded data for other information corresponding to all blocks is not encoded, nor is it written into the super-compressed texture bitstream. In this case, the decoder can obtain the other information corresponding to all blocks through other means (pre-configured information).

[0259] Among them, S306 can be collaboratively executed by the table building module 22, the transformation module 23 and the entropy coding module 24 of the super compression encoder 202, and the specific process will be described later.

[0260] In summary, the present application aims at a texture encoder whose endpoints and weights in the texture code stream of all blocks generated are not fixed, and by constraining its coding mode, it is possible to control the endpoints and weights in the texture code stream of all blocks generated by the texture encoder to be fixed; subsequently, in the super-compression coding process, the coding data of the corresponding weights and endpoints of multiple blocks can be accurately extracted from the texture code stream of the image, thereby enabling effective super-compression coding of the texture code stream of the image.

[0261] Secondly, because the data patterns / distributions of the three types of data (block-corresponding weight values, block-corresponding endpoint values, and block-corresponding other information values) are different, encoding the coded data of these three types of data independently allows the selection of the optimal encoding method for each type of data based on its pattern or distribution. This can better remove redundancy in each type of data and improve the compression rate of each type of data. Furthermore, the reconstruction quality of each type of data can be improved, thereby improving the quality of the reconstructed image.

[0262] 4 is a schematic diagram illustrating an exemplary texture super-compression decoding process 400. The texture super-compression decoding process 400 corresponds to the texture super-compression encoding process 300. S401 to S403 may be executed by the super-compression decoder 203, and S404 to S406 may be executed by the texture decoder 204.

[0263] S401: Receive a texture super-compressed code stream.

[0264] In one possible manner, the texture super-compressed code stream may include super-compressed data corresponding to weights of multiple blocks and super-compressed data corresponding to endpoints of multiple blocks.

[0265] In one possible manner, the texture super-compressed code stream may include multiple blocks of super-compressed data corresponding to weights, multiple blocks of super-compressed data corresponding to endpoints, and multiple blocks of super-compressed data corresponding to other information.

[0266] Exemplarily, S402 to S404 may be executed by the super-compression decoder 203 .

[0267] S402, decoding the texture super-compressed code stream to obtain reconstructed data of the coded data corresponding to weights of a plurality of blocks in the image and reconstructed data of the coded data of endpoints;

[0268] In one possible manner, the super-compression decoder 203 may perform entropy decoding on the texture super-compression code stream to obtain reconstructed data of the coded data corresponding to weights of multiple blocks in the image and reconstructed data of the coded data of endpoints.

[0269] In one possible manner, the super-compression decoder 203 may perform entropy decoding on the texture super-compression code stream to obtain reconstructed data of the coded data corresponding to weights of multiple blocks in the image, reconstructed data of the coded data of endpoints, and reconstructed data of the coded data of other information.

[0270] S403, encapsulating the reconstructed data of the coded data corresponding to the weights of multiple blocks and the reconstructed data of the coded data of the endpoints to obtain a texture code stream of the image; wherein the texture code stream of the image includes the texture code streams of multiple blocks of the image, the texture code stream of the first block includes the reconstructed data of the coded data corresponding to the weights of the first block and the reconstructed data of the coded data of the endpoints, and the first block is any one of the multiple blocks.

[0271] Exemplarily, the reconstructed data of the coded data corresponding to the weights of a plurality of blocks and the reconstructed data of the coded data of the endpoints are encapsulated in units of blocks to obtain a texture code stream of the image.

[0272] In one possible manner, the texture code stream of the first block includes reconstructed data of the coded data corresponding to the weight of the first block and reconstructed data of the coded data of the endpoint.

[0273] In one possible manner, the texture code stream of the first block includes reconstructed data of the coded data corresponding to the weight of the first block, reconstructed data of the coded data of the endpoints, and reconstructed data of the coded data of other information.

[0274] S404, determining a target decoding mode corresponding to the first block from a plurality of preset decoding modes; wherein, in the texture code streams of the plurality of second blocks decoded based on the plurality of preset decoding modes, the proportion of reconstructed data of the coded data of the second block corresponding to the weight is the same, and the proportion of reconstructed data of the coded data of the second block corresponding to the endpoint is the same, and the relative positions of the reconstructed data of the coded data of the second block corresponding to the weight and the reconstructed data of the coded data of the endpoint are fixed; the first block and the second block are each any one of the plurality of blocks.

[0275] Exemplarily, S404 may be executed by a configuration module (not shown in FIG. 2E ) of the texture decoder 204 or the entropy decoding module 34 .

[0276] For example, the texture decoder 204 of the present application can be used to decode the texture bitstream of an image generated by the texture encoder 201 in a constrained coding mode. It should be noted that the present application does not constrain the decoding mode of the texture decoder 204. The texture decoder 204 can determine the target decoding mode corresponding to the first block from multiple preset decoding modes based on the texture super-compressed bitstream of the image, the texture bitstream of the image, or pre-configured information.

[0277] Exemplarily, the decoding mode (or preset decoding mode) corresponds to the encoding mode (or preset encoding mode), and the decoding mode can be used to indicate the decoding mode, color endpoint mode, and number of partitions of the block.

[0278] Exemplarily, the decoding mode of a block includes plane information indicating the block (such as the number of planes) and a decoding method for the block's corresponding weights (such as the size of the block's corresponding weight matrix, the quantization parameter of the block's corresponding weights, the entropy decoding method for the block's corresponding weights, etc.).

[0279] Exemplarily, the color endpoint mode is used to indicate the decoding method of the block corresponding endpoint (for example, the quantization parameter of the block corresponding endpoint, the preprocessing method (such as difference, absolute value), the entropy decoding method of the block corresponding endpoint, etc.).

[0280] S405 , decoding the texture code stream of the first block in the texture code stream of the image based on the target decoding mode corresponding to the first block, to obtain a reconstructed value of the weight corresponding to the first block and a reconstructed value of the endpoint.

[0281] For example, on one hand, the entropy decoding module 44 of the texture decoder 204 may entropy decode the texture code stream of the first block based on the entropy decoding mode of the weight corresponding to the first block indicated by the target decoding mode corresponding to the first block, to obtain an entropy-decoded value of the weight corresponding to the first block. Thereafter, the inverse quantization module 43 of the texture decoder 204 may inverse quantize the entropy-decoded value of the weight corresponding to the first block based on the quantization parameter of the weight corresponding to the block indicated by the target decoding mode corresponding to the first block, to obtain a reconstructed value of the weight corresponding to the first block.

[0282] For example, on the other hand, the entropy decoding module 44 of the texture decoder 204 can perform entropy decoding on the texture code stream of the first block based on the entropy decoding method of the first block corresponding endpoint indicated by the target decoding mode corresponding to the first block, to obtain the entropy decoded value of the first block corresponding endpoint. Thereafter, the dequantization module 43 of the texture decoder 204 can perform dequantization on the entropy decoded value of the first block corresponding endpoint based on the quantization parameter of the block corresponding endpoint indicated by the target decoding mode corresponding to the first block, to obtain the reconstructed value of the first block corresponding endpoint. (When the target decoding mode of the first block indicates a preprocessing method, the reconstructed value of the first block corresponding endpoint can also be subjected to corresponding post-processing).

[0283] S406 , reconstructing the first block based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of multiple blocks constitute a reconstructed image.

[0284] For example, the block reconstruction module 42 of the texture decoder 204 may process the reconstruction values ​​of the weights and endpoints corresponding to the first block based on the number of partitions indicated by the target decoding mode of the first block, the plane information, and the size of the weight matrix corresponding to the block, thereby reconstructing the first block and obtaining a reconstructed image of the first block. Subsequently, the splicing module 41 of the texture decoder 204 may splice the reconstructed images of multiple blocks to obtain a reconstructed image.

[0285] The texture super compression process is described in detail below.

[0286] 5A is a schematic diagram illustrating an exemplary texture super-compression encoding process 500 . In the texture super-compression encoding process 500 , steps S501 to S504 are executed by the texture encoder 201 , and steps S505 to S511 are executed by the super-compression encoder 202 .

[0287] S501, acquire an image.

[0288] S502: Divide the image into blocks to obtain multiple blocks.

[0289] For example, S501 to S502 may refer to the description of S301 to S302 above, which will not be repeated here.

[0290] S503: Determine a target coding mode corresponding to the first block from a plurality of preset coding modes.

[0291] Optionally, in the texture code streams of multiple second blocks obtained by encoding the second blocks based on multiple preset coding modes, in addition to the fact that the proportion of the encoded data of the second blocks corresponding to the weights is the same, and the proportion of the encoded data of the second blocks corresponding to the endpoints is the same, and the relative position of the encoded data of the second blocks corresponding to the weights and the encoded data of the endpoints is fixed, the position of the encoded data of the second blocks corresponding to the weights is fixed, and / or the position of the encoded data of the second blocks corresponding to the endpoints is fixed.

[0292] Exemplarily, in one possible method of S503, the coding error and bit rate corresponding to encoding the first block based on multiple preset coding modes can be determined; based on at least one of the coding errors or bit rates corresponding to the multiple preset coding modes, the target coding mode corresponding to the first block can be determined from the multiple preset coding modes.

[0293] Exemplarily, a method for determining a coding error corresponding to encoding a first block based on a preset coding mode may be: performing texture decoding on a texture code stream of the first block obtained by encoding the first block based on a preset coding mode to obtain a reconstructed image of the first block; then, determining an error between the image of the first block and the reconstructed image of the first block as a coding error.

[0294] Exemplarily, the bit rate corresponding to encoding the first block based on a preset coding mode may refer to the bit rate of the texture code stream of the first block obtained by encoding the first block based on the preset coding mode.

[0295] For example, the preset coding mode corresponding to the minimum coding error may be determined as the target coding mode corresponding to the first block.

[0296] For example, the preset coding mode corresponding to the minimum bit rate may be determined as the target coding mode corresponding to the first block.

[0297] For example, a weighted calculation is performed on the coding error and bit rate corresponding to each of multiple preset coding modes, and the preset coding mode corresponding to the minimum value of the weighted calculation result is determined as the target coding mode corresponding to the first block. The weight coefficient corresponding to the coding error and the weight coefficient corresponding to the bit rate can be set as required, and this application does not impose any restrictions on this.

[0298] For example, in one possible manner of S503, a pre-configured coding mode identifier may be obtained, and a preset coding mode indicated by the coding mode identifier among multiple preset coding modes is determined as the target coding mode corresponding to the first block. The coding mode identifier is used to uniquely identify a coding mode.

[0299] S504, encoding the first block based on the target coding mode corresponding to the first block to obtain a texture code stream of the first block; wherein the texture code stream of the first block includes the encoded data of the weight corresponding to the first block and the encoded data of the endpoints, and the texture code streams of multiple blocks constitute the texture code stream of the image.

[0300] The following describes S504 by taking the texture encoder 201 as an ASTC encoder as an example. It should be understood that the texture encoder 201 may also be other types of texture encoders, and this application does not impose any limitation on this.

[0301] Assume that the target coding mode corresponding to the first block is: the block coding mode (block mode) is "66", the color endpoint mode is "12", and the maximum number of partitions is 2.

[0302] FIG5B is a schematic diagram illustrating an exemplary texture encoding process. For example, S504 may include the following S5041 to S5048:

[0303] S5041: Fix the coding mode of the block corresponding to the first block to "66".

[0304] Exemplarily, when the coding mode of the block is "66", the weight syntax of each block (that is, the coding data of the weight) can be fixed to 32 bits (so that better image quality can be retained); and the size of the block weight matrix is ​​fixed to 4*4, and the number of planes is fixed to 1 (when the number of planes is 1, the individual components of the pixel values ​​of the pixels in the first block are not split, but all components of the pixel values ​​of the pixels in the first block are fitted as a whole).

[0305] S5042: Fix the CEM corresponding to the first block to "12".

[0306] Exemplarily, when CEM is "12", the endpoint syntax of each block (that is, the encoded data of the endpoint) can be fixed to 64 bits, and the entropy coding mode of the endpoint is an entropy coding method with a compression rate of 1, that is, the value of the endpoint is converted into binary representation.

[0307] S5043: Fix the number of partitions corresponding to the first block to 1.

[0308] S5044 , performing fitting processing on all components of the pixel values ​​of the pixels in the first block as a whole, and determining the corresponding weight values ​​and endpoint values ​​of the first block when the number of partitions is 1.

[0309] Assuming that the size of the first block is 4*4, the first block can include 16 pixels. A mathematical fitting method (such as principal component analysis (PCA)) can be used to fit the pixel values ​​of the 16 pixels (including all components) into a straight line, and the values ​​of the two endpoints of this line are determined. The components contained in the value of each endpoint are the same as the components contained in the pixel values ​​of the pixels of the first block; for example, the value of endpoint 1 is RGB1, and the value of endpoint 2 is RGB2. Afterwards, a set of weights can be determined so that the pixel value of each pixel in the first block can be obtained by weighted calculation using the values ​​of the two endpoints and the value of one weight in the set of weights; in this way, the values ​​of the weights corresponding to the 16 pixels can be obtained. The values ​​of the weights corresponding to some of the 16 pixels can be the same.

[0310] For example, a set of weights includes five weight values: 0.0, 0.25, 0.5, 0.75, and 1. The weight value corresponding to pixels 1, 2, 5, and 6 is 0.0; the weight value corresponding to pixels 3, 7, 9, and 10 is 0.25; the weight value corresponding to pixel 11 is 0.5; the weight value corresponding to pixels 4, 5, 13, and 14 is 0.75; and the weight value corresponding to pixels 12, 15, and 16 is 1.

[0311] S5045 , determining a coding error corresponding to entropy coding the weight value and the endpoint value corresponding to the first block when the number of partitions is 1.

[0312] For example, entropy encoding can be performed on the weight value corresponding to the first block based on the entropy encoding method indicated by the coding mode of the block corresponding to "66"; and entropy encoding can be performed on the endpoint value corresponding to the first block based on the entropy encoding method indicated by the CEM corresponding to "12" to obtain a texture code stream for the first block. Texture decoding is then performed on the texture code stream of the first block to obtain a reconstructed image of the first block. The error between the reconstructed image of the first block and the image of the first block is then determined as the coding error corresponding to entropy encoding the weight value and the endpoint value corresponding to the first block when the number of partitions is 1.

[0313] S5046: Determine whether the coding error is less than the error threshold.

[0314] Exemplarily, it can be determined whether the encoding error corresponding to entropy encoding the weight value and endpoint value corresponding to the first block when the number of partitions is 1 is less than an error threshold; if it is less than the error threshold, it indicates that the encoding error corresponding to entropy encoding the weight value and endpoint value corresponding to the first block when the number of partitions is 1 is small, and S5048 can be executed. If it is greater than or equal to the error threshold, it indicates that the encoding error corresponding to entropy encoding the weight value and endpoint value corresponding to the first block when the number of partitions is 1 is large, and S5047 can be executed.

[0315] S5047 , performing fitting processing on all components of the pixel values ​​of the pixels in the first block as a whole, and determining the corresponding weight values ​​and endpoint values ​​of the first block when the number of partitions is 2.

[0316] Assuming that the size of the first block is 4*4, the first block can include 16 pixels. The first block can be divided into 2 partitions (it should be noted that it can include W (W is a positive integer) 2-partition division methods, and W 2-partition division methods can be used to divide the first block into 2 partitions respectively, and then the optimal 2-partition division method is selected; wherein, one 2-partition division method corresponds to one partition index): partition 1 and partition 2. Then, a mathematical fitting method can be used to fit the pixel values ​​(including all components) of multiple pixel points in partition 1 into a straight line, and the values ​​of the two endpoints of this line are determined; for example, the value of endpoint 1 is RGB3, and the value of endpoint 2 is RGB4. And a mathematical fitting method can be used to fit the pixel values ​​(including all components) of multiple pixel points in partition 2 into a straight line, and the values ​​of the two endpoints of this line are determined; for example, the value of endpoint 3 is RGB5, and the value of endpoint 4 is RGB6. Then, a set of weights can be determined such that the pixel value of each of the multiple pixels in partition 1 can be obtained by weighted calculation using the values ​​of endpoint 1, endpoint 2, and a weight in the set of weights; and the pixel value of each of the multiple pixels in partition 2 can be obtained by weighted calculation using the values ​​of endpoint 3, endpoint 4, and a weight in the set of weights; in this way, the weight values ​​corresponding to these 16 pixels can be obtained. The weight values ​​corresponding to some of the 16 pixels can be the same.

[0317] For example, partition 1 includes pixels 2, 3, 4, 7, 8, and 12; partition 2 includes pixels 1, 5, 6, 9, 10, 11, 13, 14, 15, and 16. Assuming a set of weights includes five weight values: 0.0, 0.25, 0.5, 0.75, and 1, then the weight values ​​corresponding to pixels 1, 2, 5, and 6 are 0.0; the weight values ​​corresponding to pixels 3, 7, 9, and 10 are 0.25; the weight value corresponding to pixel 11 is 0.5; the weight values ​​corresponding to pixels 4, 5, 13, and 14 are 0.75; and the weight values ​​corresponding to pixels 12, 15, and 16 are 1.

[0318] Illustratively, after executing S5047, S5048 may be executed.

[0319] S5048, entropy encode the value of the weight corresponding to the first block based on the entropy coding method indicated by the coding mode of the block corresponding to "66"; and entropy encode the value of the endpoint corresponding to the first block based on the entropy coding method indicated by the CEM corresponding to "12" to obtain the texture code stream of the first block.

[0320] For example, when it is determined in S5046 that the coding error is less than the threshold, then S5048 performs entropy coding on the values ​​of the two endpoints corresponding to the first block. When it is determined in S5046 that the coding error is greater than or equal to the threshold, then S5048 performs entropy coding on the values ​​of the four endpoints corresponding to the first block.

[0321] In addition, other information corresponding to the first block may be entropy-coded and written into the texture code stream of the first block.

[0322] Figure 5C is a schematic diagram showing the syntax structure of the texture code stream of the first block. In Figure 5C, odd-numbered lines are bit numbers, and even-numbered lines are semantics.

[0323] 5C , exemplarily, the texture code stream of the first block occupies 16 bytes, i.e., 128 bits; bits 1 to 127 are marked from low to high. Among them, the weight (i.e., the encoded data of the weight corresponding to the first block) occupies bit positions numbered 96 to 127, a total of 32 bits. The color endpoint data (i.e., the encoded data of the endpoint corresponding to the first block) occupies bit positions numbered 17 to 80. The bit positions numbered 11 and 12 have a total of 2 bits, which can be used to jointly represent the partition information (part). The bit positions numbered 0 to 10 have a total of 11 bits, which can be used to jointly represent the coding mode (block mode) of the block (i.e., the target coding mode corresponding to the first block).

[0324] Assume that the target coding mode corresponding to the first block is: the block coding mode (block mode) is 67, the color endpoint mode (Color EpMode, CEM) is 12, and the maximum number of partitions is 1.

[0325] FIG5D is a schematic diagram illustrating an exemplary texture encoding process. For example, S504 may include the following S5049 to S50413:

[0326] S5049: Fix the coding mode of the block corresponding to the first block to "67".

[0327] For example, when the coding mode of the block is "67", the weight syntax of each block (that is, the coding data of the weight) can be fixed to 42 bits (so that better image quality can be retained); and the size of the block weight matrix can be fixed to 4*4, and the plane data can be fixed to 1.

[0328] S50410: Fix the CEM corresponding to the first block to "12".

[0329] S50411, fix the number of partitions of the first block to 1.

[0330] S50412, performing fitting processing on all components of the pixel values ​​of the pixels in the first block as a whole, and determining the values ​​of the corresponding weights and endpoints of the first block when the number of partitions is 1.

[0331] S50413, entropy encode the value of the weight corresponding to the first block based on the entropy coding method indicated by the coding mode of the block corresponding to "67"; and entropy encode the value of the endpoint corresponding to the first block based on the entropy coding method indicated by the CEM corresponding to "12" to obtain the texture code stream of the first block.

[0332] For example, S50410 to S50413 may refer to the description of S5042, S5043, S5044 and S5048 above, which will not be repeated here.

[0333] In addition, other information corresponding to the first block may be entropy-coded and written into the texture code stream of the first block.

[0334] Figure 5E is a schematic diagram of the syntax structure of the texture code stream of the first block, wherein the odd-numbered lines in Figure 5E are bit numbers, and the even-numbered lines are semantics.

[0335] 5E , exemplarily, the texture code stream of the first block occupies 16 bytes, i.e., 128 bits; from low to high, they are marked as bits 1 to 127. Among them, the weight (i.e., the encoded data of the weight corresponding to the first block) occupies bit positions numbered 86 to 127, a total of 42 bits. The color endpoint data (i.e., the encoded data of the endpoint corresponding to the first block) occupies bit positions numbered 17 to 80. The bit positions numbered 11 and 12 have a total of 2 bits, which can be used to jointly represent the partition information (part). The bit positions numbered 0 to 10 have a total of 11 bits, which can be used to jointly represent the coding mode (block mode) of the block (i.e., the target coding mode corresponding to the first block).

[0336] S505 , extracting, from the texture code stream of the image, the coded data of the weights corresponding to the multiple blocks, the coded data of the endpoints, and the coded data of other information.

[0337] For example, S505 may refer to the description of S305 above, which will not be repeated here.

[0338] Exemplarily, the above-mentioned S306 may include the following steps S506 to S511; wherein, the process of encoding the coded data corresponding to weights of multiple blocks can refer to S506 to S507; the process of encoding the coded data corresponding to endpoints of multiple blocks can refer to S508 to S509; and the process of encoding the coded data corresponding to other information of multiple blocks can refer to S510.

[0339] S506: Create a weight table and an index table.

[0340] FIG5F is a schematic diagram illustrating an exemplary table creation process.

[0341] Exemplarily, S506 may include S5061 to S50613:

[0342] S5061, traverse the encoded data of the weight corresponding to the i-th first block, where the initial value of i is 1.

[0343] For example, i is a positive integer. Assume that the total number of blocks included in the image is G (G is an integer greater than or equal to 2), and i is less than or equal to G.

[0344] Exemplarily, the encoded data of the weight corresponding to the i-th first block in the texture code stream of the image may be traversed according to the order of input of bits in the texture code stream of the i-th first block (input to the texture super compressor 202 ).

[0345] S5062, searching for encoded data of a weight from the weight table for the jth time, where the initial value of j is 1.

[0346] Exemplarily, the weight table may include H (H is 0 or a positive integer) weight encoding data. Exemplarily, the index table may include H indexes. Exemplarily, initially, both the weight table and the index table are empty, that is, H is equal to 0.

[0347] Exemplarily, when H is greater than 0, j is less than or equal to H.

[0348] Exemplarily, the encoded data of one weight may be searched from the back to the front in the weight table each time.

[0349] Exemplarily, when a weighted coded data is found from the weight table for the jth time, S5063 may be executed; when a weighted coded data is not found from the weight table for the jth time (ie, H is equal to 0), S50612 is executed.

[0350] S5063: Use the coded data of a weight found in the weight table for the jth time to replace the coded data of the corresponding weight of the i-th first block.

[0351] S5064: Determine the jth quality loss corresponding to the i-th first block.

[0352] Exemplarily, texture decoding may be performed on the replaced encoded data of the weight corresponding to the i-th first block and the encoded data of the endpoint corresponding to the i-th first block to obtain the j-th reconstructed image of the i-th first block. Subsequently, the j-th quality loss corresponding to the i-th first block may be determined based on an error between the image of the i-th first block and the reconstructed image of the i-th first block.

[0353] For example, the quality loss can be the sum of absolute differences (SAD). This involves calculating the absolute difference between the image of the i-th first block and the j-th reconstructed image of the i-th first block for each component of RGBX, and then summing all the absolute differences. The final result is the quality loss. In this case, the first loss threshold can be 0, and the second loss threshold can be 55.

[0354] S5065: Determine whether the j-th quality loss corresponding to the i-th first block is less than a first loss threshold.

[0355] Exemplarily, when the j-th quality loss corresponding to the i-th first block is less than the first loss threshold, it means that the encoded data of a weight searched from the weight table for the j-th time is relatively close to the encoded data of the weight corresponding to the i-th first block, and the traversal of the encoded data of other weights from the weight table can be stopped, that is, S5066 can be executed.

[0356] Exemplarily, when the j-th quality loss corresponding to the i-th first block is greater than or equal to the first loss threshold, the encoding data of other weights can continue to be traversed from the weight table, that is, S5069 is executed to determine whether there are other encoding data of weights in the weight table that are closer to the encoding data of the weight corresponding to the i-th first block.

[0357] S5066, write the index of the encoded data of a weight found from the weight table for the jth time into the index table.

[0358] For example, the index of the encoded data of a weight found in the weight table for the jth time can be used to represent the position of the encoded data of a weight found in the weight table for the jth time. After S5066 is executed, S5067 can be executed.

[0359] S5067, determine whether i is equal to G.

[0360] Exemplarily, it is determined whether i is equal to G, that is, whether there are any unprocessed blocks (i.e., blocks for which the index of the coded data corresponding to the weight has not been written into the index table). When i is less than G, it is determined that there are still unprocessed blocks, and S5068 can be executed. When i is equal to G, it can be determined that there are no unprocessed blocks, and table building is complete.

[0361] S5068, increment i by 1.

[0362] Exemplarily, after executing S5068, the process may return to executing S5061.

[0363] S5069, determine whether j is equal to H.

[0364] Exemplarily, determining whether j is equal to H, that is, determining whether the traversal of the coded data of all weights in the weight table is complete. When j is less than H, it is determined that the traversal of the coded data of all weights in the weight table is not complete, and S50610 can be executed. When j is equal to H, it can be determined that the traversal of the coded data of all weights in the weight table is complete, and S50611 can be executed.

[0365] S50610, increase j by 1.

[0366] Exemplarily, after executing S50610, the process may return to executing S5062.

[0367] S50611: Determine whether the minimum quality loss corresponding to the first block is less than a second loss threshold.

[0368] For example, a minimum quality loss can be determined from the H quality losses corresponding to the first block. Then, a determination is made as to whether the minimum quality loss corresponding to the first block is less than a second loss threshold. When the minimum quality loss corresponding to the first block is less than the second loss threshold, S50613 is executed; when the minimum quality loss corresponding to the first block is greater than or equal to the second loss threshold, S50612 is executed.

[0369] S50612, writing the first block of coded data corresponding to the weight into the weight table, and writing the index of the first block of coded data corresponding to the weight in the weight table into the index table.

[0370] After executing S50612, you can return to execute S5067.

[0371] S50613: Write the index of the encoded data of the weight found in the weight table for the kth time into the index table, wherein the kth quality loss corresponding to the first block is the minimum quality loss.

[0372] After executing S50613, you can return to execute S5067.

[0373] Wherein, k is a positive integer less than or equal to H.

[0374] It should be noted that S5065 is optional.

[0375] It should be noted that in S5069, in order to increase the speed, the number of traversals can be less than H.

[0376] It should be noted that in S50612, the index relative value can be written into the index table. The index relative value refers to the index value of the coded data corresponding to the weight of the current block in the weight table minus the index value of the previous block in the weight table. For the first block, the index relative value is the current block's index value 0 minus 0.

[0377] It should be noted that before S5063, texture decoding can be performed on the encoded data of the weight corresponding to the i-th first block and the encoded data of the endpoint corresponding to the i-th first block to obtain a reference reconstructed image of the i-th first block. Subsequently, S5064 can be replaced by: determining the difference between the reference reconstructed image of the i-th first block and the j-th reconstructed image of the i-th first block. For example, the absolute value of the difference between each component of RGBX of the reference reconstructed image of the i-th first block and the j-th reconstructed image of the i-th first block can be calculated as the difference value. Thereafter, S5065 can be replaced by: determining whether the difference value is greater than a difference threshold (the difference threshold can be set as required, such as 5; this application does not impose any restrictions on this). When the difference value is greater than the difference threshold, it can be considered that the encoded data of a weight found in the weight table for the jth time cannot replace the encoded data of the weight corresponding to the i-th first block; in this case, S5069 can be executed. When the difference value is less than or equal to the difference threshold, S5066 can be executed.

[0378] S507 , encoding the coded data corresponding to the weights of the multiple blocks based on the coded data corresponding to the weights of the multiple blocks, the weight table, and the index table to obtain a weighted code stream.

[0379] Exemplarily, multiple weight modes may be pre-set; for example:

[0380] Weight mode is 0: directly write the encoded data (binary bits) of the weights contained in the weight table into the texture super-compressed code stream (corresponding to the entropy coding method with a compression rate of 1), and entropy code the index table (corresponding to the entropy coding method with a compression rate greater than 1).

[0381] Weight mode is 1: the encoded data of the corresponding weights of all blocks extracted from the texture code stream are written into the texture super-compressed code stream (i.e., the entropy coding method with a compression rate of 1).

[0382] Weight mode is 2: Entropy coding is performed on the coded data corresponding to the weights of all blocks extracted from the texture bitstream (corresponding to an entropy coding method with a compression ratio greater than 1).

[0383] Weight mode is 3: Entropy coding is performed on both the weight table and the index table (corresponding to an entropy coding method with a compression ratio greater than 1).

[0384] In one possible approach, an optimal weighting pattern can be selected from multiple weighting patterns, and the coded data corresponding to the weights of multiple blocks can be encoded to obtain a weighted bitstream. The bitrate of the weighted bitstream obtained by encoding the coded data corresponding to the weights of multiple blocks based on the multiple weighting patterns can be determined, and the weighting pattern corresponding to the minimum bitrate is determined as the optimal weighting pattern.

[0385] In one possible approach, a fixed weight mode is selected to encode the weighted coded data of multiple blocks to obtain a weighted bitstream. For example, a fixed weight mode of 3 is used to encode the weighted coded data of multiple blocks to obtain a weighted bitstream.

[0386] FIG5G is a schematic diagram showing an exemplary encoding process of the first block of encoded data corresponding to an endpoint.

[0387] For example, before executing S507, S1 may be executed:

[0388] S1, determining whether the coded data corresponding to endpoints of all blocks include coded data of transparency components.

[0389] Exemplarily, if the coded data corresponding to endpoints of all blocks include coded data of the transparency (A) component, execute S507; if the coded data corresponding to endpoints of all blocks do not include coded data of the transparency component, execute S509.

[0390] S507 : If the coded data of the endpoints corresponding to the multiple blocks include coded data of the transparency component, separate the coded data of the transparency component and the coded data of the color component of the endpoints corresponding to the multiple blocks.

[0391] S508 , encoding the coded data of the transparency components of the endpoints corresponding to the multiple blocks to obtain a transparency component code stream.

[0392] Exemplarily, S508 may include:

[0393] S5081, determine whether the transparency components of the values ​​corresponding to the endpoints of all blocks are fixed values.

[0394] For example, in the texture code stream of an image, the encoded data corresponding to the endpoint of the first block is the binary bits of the value of the first block corresponding to the endpoint. Furthermore, the encoded data of the transparency component of the first block corresponding to the endpoint extracted from the texture image can be directly converted into a decimal representation to determine whether the transparency component of the value of the first block corresponding to the endpoint is a fixed value. The fixed value can be set as required, such as 255, and this application does not impose any limitation on this.

[0395] For example, when the transparency components of the values ​​corresponding to the endpoints of all blocks are fixed values, S5082 may be executed. When the transparency components of the values ​​corresponding to the endpoints of all blocks are not fixed values, S5083 may be executed.

[0396] S5082: Set the flag of the transparency component to a first preset value.

[0397] Among them, the first preset value can be "0".

[0398] S5083: Set the flag of the transparency component to a second preset value.

[0399] Among them, the second preset value can be "1".

[0400] It should be understood that the first preset value and the second preset value are different, and the present application does not limit the values ​​of the first preset value and the second preset value.

[0401] S5084: Perform entropy coding on the coded data of the transparency components corresponding to the endpoints of all blocks to obtain a transparency component code stream.

[0402] S509 , encoding the coded data of the color components of the endpoints corresponding to the multiple blocks to obtain a color component code stream.

[0403] Exemplarily, S509 may include the following steps: S5091 to S5095:

[0404] S5091, determine whether the super compression mode is the balanced gear.

[0405] Exemplarily, multiple super compression modes (Super Compression for Texture Mode, SUTMode) may be pre-set; for example:

[0406] SUTMode is 0: Extreme speed; suitable for scenarios that require high speed and low compression rate, such as applications such as gallery.

[0407] SUTMode is 1: Balanced mode; the color components of the endpoints are not transformed; suitable for scenes that are not sensitive to time consumption and require high compression rates, such as large natural image presets.

[0408] SUTMode is 2: Extreme compression file: suitable for scenes that are not time-sensitive and require high compression ratios, such as large natural image presets.

[0409] SUTMode is 3: lossless compression file: suitable for compressing simple images such as icons.

[0410] It should be understood that SUTMode is not only related to the entropy coding method of the coded data of the endpoint, but also to the entropy coding method of the coded data of the weight.

[0411] Exemplarily, a super compression mode may be pre-configured according to the current application scenario, network status, etc.

[0412] Exemplarily, when the ultra-compression mode is the balanced gear, S5092 may be executed; when the ultra-compression mode is not the balanced gear, S5093 may be executed.

[0413] S5092: Perform entropy coding on the coded data of the color components of the endpoints corresponding to all blocks to obtain a color component code stream.

[0414] S5093 , separating the coded data corresponding to the first endpoint and the coded data corresponding to the second endpoint of all blocks to obtain image 1 and image 2.

[0415] Exemplarily, for a block of 1 partition, containing endpoint 1 and endpoint 2, the endpoint 1 of all the blocks are put together to form the downsampled image 1, and the endpoint 2 of all the blocks are put together to form the downsampled image 2 (it should be noted that for the sub-blocks of 2 partitions, after the endpoints are extracted, the endpoint 1 and endpoint 2 separated according to the block endpoint separation method of 1 partition do not have image features, but the number of bits is consistent with the endpoint of the sub-block of 1 partition, which does not affect the separation of endpoint 1 and endpoint 2).

[0416] S5094 , performing transformation processing on image 1 and image 2 respectively to obtain transformation data of image 1 and transformation data of image 2.

[0417] The following takes Image 1 as an example to illustrate the process of transforming Image 1.

[0418] For example, image 1 can first be converted from the RGB color gamut space to a color difference space, optionally the YCoCg space. This removes color gamut redundant information, and the conversion is lossless. Next, the three components of the YCoCg space are processed using a wavelet transform (5 / 3 wavelet transform) x times horizontally and y times vertically. Optionally, x is 5 and y is 5. Optionally, the times in the horizontal and vertical directions can be determined by the width and height of image 1, respectively. Specifically, taking the horizontal direction as an example, assuming that the width of image 1 is width1, x can be taken as the base-2 logarithm of width1, rounded up. Using the wavelet transform, the high and low frequencies of the three components of the YCoCg space are separated, removing the correlation between the three components of the YCoCg space and facilitating compression. The wavelet transformed data can then be converted to unsigned data (optionally, 1024 is directly added, and correspondingly, 1024 is directly subtracted during decoding) to obtain the transformed data of image 1.

[0419] S5095 , performing entropy coding on the transformed data of image 1 and the transformed data of image 2 respectively to obtain color component code streams.

[0420] Exemplarily, multiple endpoint modes (EpMode) may be pre-set; for example:

[0421] EpMode is 0: the encoded data (ie, the binary bits of the RGB values) of the corresponding endpoints of all blocks extracted from the texture stream are written into the texture super-compressed stream (corresponding to the entropy coding method with a compression rate of 1).

[0422] EpMode is 1: Entropy encoding is performed on the transformation data of the endpoint color components (Y, Co, and Cg) (corresponding to an entropy encoding method with a compression ratio greater than 1).

[0423] EpMode is 2: the transformed data of the Y component of the endpoint is converted into binary bits (corresponding to the entropy coding method with a compression rate of 1), and the transformed data of the Co and Cg components of the endpoint are entropy coded (corresponding to the entropy coding method with a compression rate greater than 1).

[0424] EpMode is 3: entropy coding is performed on the coded data corresponding to endpoints of all blocks extracted from the texture stream (corresponding to an entropy coding method with a compression ratio greater than 1).

[0425] In one possible approach, an optimal endpoint mode can be selected from multiple endpoint modes to encode the coded data corresponding to the endpoints of multiple blocks to obtain a color component code stream. The bit rates obtained by encoding the coded data corresponding to the endpoints of multiple blocks based on the multiple endpoint modes can be determined, and the endpoint mode corresponding to the minimum bit rate is determined as the optimal endpoint mode.

[0426] It should be noted that when the SUTMode flag is 0 and the EpMode flag is also 0, S509 may include S5091 to S5092; wherein, the compression rate of the entropy coding method corresponding to S5092 is greater than 1. And the compression rate of the entropy coding method corresponding to S5084 is greater than 1.

[0427] S510 , performing entropy coding on the coded data of the multiple blocks corresponding to other information to obtain a code stream of other information.

[0428] The following description takes partition information as an example.

[0429] For example, the 2-bit partition information of the first block is read from the texture code stream of the image, and a single bit is used to mark the number of current partitions (e.g., 0 indicates 1 partition; 1 indicates 2 partitions). Alternatively, the partition information of each block can be simplified to a single bit, and the partition information of all blocks can be written to the partition information stream. If the final partition information stream is less than one byte, it can be padded with zeros; then, the partition information stream is entropy encoded to generate the partition information code stream.

[0430] For example, if the first block is partitioned into 2, 3, or 4 partitions, it is necessary to record the index of the current partitioned into 2, 3, or 4 partitions. Afterwards, entropy coding can be performed on the index set of the partitioned into 2, 3, or 4 partitions of all blocks to generate an index information stream of the partitioned into 2, 3, or 4 partitions.

[0431] S511: Generate a texture super-compressed code stream based on the weight code stream, the endpoint code stream, and other information code streams.

[0432] Exemplarily, the weight code stream, endpoint code stream and other information code streams, as well as configuration information, may be encapsulated to obtain a texture super-compressed code stream.

[0433] For example, reference may be made to Table 1, which shows an exemplary bitstream structure of a texture super-compression bitstream:

[0434] Table 1 Texture super-compression code stream structure

[0435] Table 1 shows the arrangement of each syntax from low to high. It should be understood that Table 1 is only an example of the code stream structure of the texture super-compression code stream of this application, and this application does not limit the arrangement position of each syntax in Table 1.

[0436] For example, the description information of each syntax in Table 1 can be referred to as shown in Table 2 below:

[0437] Table 2 Syntax of texture super-compression code stream

[0438] In Table 2, M (Mandatory) indicates mandatory (required), (O) Optional indicates optional, and v indicates variable length.

[0439] That is to say, the texture super-compression code stream must include: PicInfo, SutIno, EpStream and WeightStream; Magic and PartitionInfo are optional.

[0440] Exemplarily, Magic, PicInfo and SutIno may constitute a code stream header.

[0441] For example, Magic can be used to indicate whether the bitstream is a texture super-compression bitstream. In Table 2, Magic is fixed to a 32-bit fixed value. Optionally, Magic can be set to hexadecimal, for example, 0x5CA1AB14.

[0442] For example, the syntax and corresponding description included in PicInfo may refer to the description in Table 3 below:

[0443] Table 3 PicInfo syntax

[0444] For example, the syntax and corresponding description contained in SutInfo may refer to the description in the following Table 4:

[0445] Table 4 Syntax table of SutInfo

[0446] That is to say, the super-compressed data of the above-mentioned other information, such as the image size, block information, coding mode identifier, etc., can be written into the bitstream header of the texture super-compressed bitstream.

[0447] For example, the syntax and corresponding description included in PartitionInfo can refer to the description in the following Table 5:

[0448] Table 5 Syntax of PartitionInfo

[0449] That is, the ultra-compressed data of the partition information in the above other information can be written into PartitionInfo, and PartitionInfo can also be called a partition information code stream.

[0450] For example, the syntax and corresponding description contained in EpStream can refer to the description in the following Table 6:

[0451] Table 6 EpStream syntax

[0452] For example, when EpMode is equal to 0, the syntax and corresponding description contained in rgbInfo can refer to the description in the following Table 6.1:

[0453] Table 6.1 When EpMode is equal to 0, rgbInfo syntax table

[0454] For example, when EpMode is equal to 1, the syntax and corresponding description contained in rgbInfo can refer to the description in the following Table 6.2:

[0455] Table 6.2 Syntax of rgbInfo when EpMode is equal to 1

[0456] For example, when EpMode is equal to 2, the syntax and corresponding description contained in rgbInfo can refer to the description in the following Table 6.3:

[0457] Table 6.3 Syntax table of rgbInfo when EpMode is equal to 2

[0458] For example, when EpMode is equal to 3, the syntax and corresponding description contained in rgbInfo can refer to the description in the following Table 6.4:

[0459] Table 6.4 Syntax table of rgbInfo when EpMode is equal to 3

[0460] For example, when WeightMode is equal to 0 or 3, the syntax and corresponding description contained in WeightStream can refer to the description in the following Table 7.1:

[0461] Table 7.1 When WeightMode is equal to 0 or 3, the syntax of WeightStream

[0462] For example, when WeightMode is equal to 1, the syntax and corresponding description contained in WeightStream can refer to the description in the following Table 7.2:

[0463] Table 7.2 When WeightMode=1, the syntax of WeightStream

[0464] For example, when WeightMode is equal to 2, the syntax and corresponding description contained in WeightStream can refer to the description in the following Table 7.3:

[0465] Table 7.3 When WeightMode=2, the syntax of WeightStream

[0466] FIG6 is a schematic diagram illustrating an exemplary texture super-compression decoding process 600. The super-compression decoding process 600 in FIG6 corresponds to the texture super-compression encoding process 500 in FIG5. S601 to S608 are executed by the super-compression decoder 203, and S609 to S611 are executed by the texture decoder 204.

[0467] S601: Receive a texture super-compressed code stream.

[0468] Illustratively, the code stream structure of the received texture super-compression code stream is shown in Table 1.

[0469] S602: Decapsulate the texture super-compressed code stream to obtain a code stream header.

[0470] For example, the fixed-length syntax parts such as Magic, PicInfo, and SutInfo can be parsed according to the syntax table in Table 2. Among them, Magic, PicInfo, and SutInfo together constitute the codestream header.

[0471] S603: Parse the code stream header.

[0472] For example, Magic can be checked to confirm whether the received bitstream is a texture super-compressed bitstream; if it is determined that the received bitstream is not a texture super-compressed bitstream, the texture super-compressed decoding is exited, and the current texture super-compressed decoding is ended. If it is determined that the received bitstream is a texture super-compressed bitstream, PicInfo is parsed according to Table 3 to obtain information such as the block width, block height, image width, and image width; and SutInfo is parsed according to Table 4 to obtain information such as the weight mode, endpoint mode, super-compression mode, and the byte length of the weight in the texture bitstream.

[0473] S604 , extracting from the texture super-compressed code stream the super-compressed data of the partition information corresponding to the multiple blocks, the super-compressed data of the weights corresponding to the multiple blocks, and the super-compressed data of the endpoints corresponding to the multiple blocks.

[0474] For example, referring to the syntax table in Table 5, the 32 bits following the codestream header can be parsed to determine the bit length L1 of the super-compressed data of the partition information. Then, the L1 bits of data following these 32 bits can be extracted to obtain the super-compressed data of the partition information corresponding to the multiple blocks. Next, the 32 bits following the 32+L1 bits can be parsed to determine the bit length L2 of the super-compressed data of the partition index of the two partition blocks. Then, the L2 bits of data following the 32+L1+32 bits can be extracted to obtain the super-compressed data of the index of the two partition blocks.

[0475] Similarly, the super-compressed data corresponding to the endpoints of multiple blocks can be extracted from the super-compressed texture bitstream according to Table 6 and Table 6.1 to Table 6.4. The super-compressed data corresponding to the weights of multiple blocks can also be extracted from the super-compressed texture bitstream according to Table 7.1 to Table 7.3. These details will not be repeated here.

[0476] S605 , decoding the super-compressed data of the weights corresponding to the multiple blocks to obtain reconstructed data of the encoded data of the weights corresponding to the multiple blocks.

[0477] Exemplarily, S605 may be performed by the entropy decoding module 34 and the table lookup module 32 .

[0478] For example, the entropy decoding module 34 may perform entropy decoding on the super-compressed data corresponding to the weights of the multiple blocks to obtain reconstructed data of the weight table (which can be understood as the reconstructed data of the coded data including multiple weights in the weight table) and reconstructed data of the index table (which can be understood as the index table including multiple reconstructed indexes). Then, the table lookup module 32 may traverse the index table and obtain the reconstructed data of the coded data corresponding to the weight of each block from the weight table according to the reconstructed index.

[0479] S606: Decode the super-compressed data of the endpoints corresponding to the multiple blocks to obtain reconstructed data of the encoded data of the endpoints corresponding to the multiple blocks.

[0480] Exemplarily, S605 may be performed by the entropy decoding module 34 and the inverse transform module 33 .

[0481] Exemplarily, the super-compressed data corresponding to endpoints of the plurality of blocks may include super-compressed data of a transparency component and super-compressed data of a color component.

[0482] Exemplarily, the entropy decoding module 34 may perform entropy decoding on the super-compressed data of the transparency components of the endpoints corresponding to the multiple blocks to obtain reconstructed data of the encoded data of the transparency components of the endpoints corresponding to the multiple blocks.

[0483] For example, taking the endpoint mode as 1, the entropy decoding module 34 can perform entropy decoding on the super-compressed data of the color components of the endpoints corresponding to multiple blocks to obtain the reconstructed data of the transformed data; then, the inverse transformation module 33 performs inverse transformation on the reconstructed data of the transformed data to obtain the reconstructed data of the encoded data of the color components of the endpoints corresponding to multiple blocks.

[0484] S607 , decoding the super-compressed data of the partition information corresponding to the multiple blocks to obtain reconstructed data of the coded data of the partition information corresponding to the multiple blocks.

[0485] Exemplarily, S607 may be performed by the entropy decoding module 34 .

[0486] S608, performing block reconstruction based on the reconstructed data of the coded data corresponding to the weights of the multiple blocks, the reconstructed data of the coded data corresponding to the endpoints of the multiple blocks, and the reconstructed data of the coded data corresponding to the partition information of the multiple blocks to obtain a texture code stream for each block in the multiple blocks.

[0487] Exemplarily, according to the texture compression format (such as the texture compression format shown in Figure 5C or 5E) and the information parsed from the code stream header, block reconstruction can be performed using the reconstruction data of the encoded data corresponding to the weight of the first block, the reconstruction data of the encoded data corresponding to the endpoint of the first block, and the reconstruction data of the encoded data of other information of the first block (such as the partition information of the first block and the target encoding mode corresponding to the first block) to obtain the texture code stream of the first block.

[0488] S609: Encapsulate the texture code streams of the multiple blocks into a texture code stream of the image.

[0489] Exemplarily, the texture code streams of multiple blocks may be encapsulated into the texture code stream of an image according to a texture compression format.

[0490] S610: Determine a target decoding mode corresponding to a first block from a plurality of preset decoding modes.

[0491] S611 , decoding the texture code stream of the first block in the texture code stream of the image based on the target decoding mode corresponding to the first block, to obtain a reconstructed value of the weight corresponding to the first block and a reconstructed value of the endpoint.

[0492] S612 , reconstructing the first block based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of multiple blocks constitute a reconstructed image.

[0493] For example, S610 to S612 may refer to the description of S404 to S406 above, which will not be repeated here.

[0494] 7 is a schematic diagram illustrating an exemplary texture super-compression encoding process 700. In the texture super-compression encoding process 700, SutMode is 0, EpMode is 0, and weight mode is 1. S701 to S704 are executed by the texture encoder 201, and S705 to S706 are executed by the super-compression encoder 202.

[0495] S701, acquire an image.

[0496] S702: Divide the image into blocks to obtain multiple blocks.

[0497] S703: Determine a target coding mode corresponding to the first block from a plurality of preset coding modes.

[0498] For example, S701 to S703 may refer to the description of S301 to S303 above, which will not be repeated here.

[0499] S704: Encode the first block based on the target coding mode corresponding to the first block to obtain a texture code stream of the first block; wherein the texture code stream of the first block includes binary bits of a compressed value of a weight corresponding to the first block and an endpoint value, and the texture code streams of multiple blocks constitute a texture code stream of an image.

[0500] The implementation of S704 may refer to S5049 to S50413 and will not be described in detail here.

[0501] S705 , extracting binary bits of compressed values ​​of weights and endpoint values ​​corresponding to a plurality of blocks from the texture code stream of the image.

[0502] S706 , encapsulating the binary bits of the compressed values ​​of the weights corresponding to the multiple blocks and the values ​​of the endpoints to obtain a texture super-compressed code stream.

[0503] It should be noted that the compressed value of the weight is also a binary bit, which is the binary bit obtained after the weight value is compressed.

[0504] For example, when SutMode is 0, the bitstream structure of the texture super-compression bitstream (ie, the texture super-compression bitstream generated by the texture super-compression encoding process 700) may be as shown in Table 8 below:

[0505] Table 8 Texture super-compression code stream structure

[0506] Table 9 Syntax of texture super-compression code stream

[0507] Table 10 Texture super-compression code stream structure

[0508] Table 11 Texture super-compression code stream structure

[0509] That is, the texture super-compression code stream generated by the texture super-compression encoding process 700 does not carry other information such as partition information, which can reduce bit rate overhead and improve bit rate efficiency.

[0510] 8 is a schematic diagram illustrating an exemplary texture super-compression decoding process 800. The texture super-compression decoding process 800 corresponds to the texture super-compression encoding process 700. S801 to S806 are executed by the super-compression decoder 203, and S807 to S810 are executed by the texture decoder 204.

[0511] S801: Receive a texture super-compressed code stream.

[0512] S802: Decapsulate the texture super-compressed code stream to obtain a code stream header.

[0513] S803: Parse the code stream header.

[0514] For example, S801 to S803 may refer to the description of S601 to S603 above, which will not be repeated here.

[0515] S804 : Extracting, from the texture super-compressed code stream, the compressed values ​​of the weights corresponding to the multiple blocks and the binary bits of the values ​​of the endpoints corresponding to the multiple blocks.

[0516] Exemplarily, based on the code stream structure of Table 10 or Table 11, the compressed values ​​of the weights corresponding to the multiple blocks and the binary bits of the values ​​of the endpoints corresponding to the multiple blocks can be directly extracted from the texture code stream; that is, the compressed values ​​of the weights corresponding to the multiple blocks and the binary bits of the values ​​of the endpoints corresponding to the multiple blocks can be obtained without decompressing the data extracted from the texture code stream.

[0517] S805 , obtaining a texture code stream of each of the multiple blocks based on the compressed values ​​of the weights corresponding to the multiple blocks and the binary bits of the values ​​of the endpoints corresponding to the multiple blocks.

[0518] S806: Encapsulate the texture code streams of the multiple blocks into a texture code stream of the image.

[0519] Exemplarily, the texture code stream of the first block included in the texture code stream of the image in S806 may include: a compressed value of a weight corresponding to the first block and binary bits of a value of an endpoint corresponding to the first block.

[0520] S807 , determining a target decoding mode corresponding to the first block from a plurality of preset decoding modes.

[0521] S808 : Based on the target decoding mode corresponding to the first block, decode the compressed value of the weight of the texture code stream of the first block in the texture code stream of the image to obtain a reconstructed value of the weight corresponding to the first block.

[0522] S809 , extracting the reconstructed value of the endpoint corresponding to the first block from the texture code stream of the first block in the texture code stream of the image.

[0523] Exemplarily, the binary bits of the values ​​of the endpoints corresponding to the first block can be extracted from the texture code stream of the first block in the texture code stream of the image; then, the binary bits of the values ​​of the endpoints corresponding to the first block can be converted into decimal to obtain the reconstructed values ​​of the endpoints corresponding to the first block.

[0524] S810 , reconstructing the first block based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of multiple blocks constitute a reconstructed image.

[0525] In this case, the decoding end may default the number of blocks of the first block to 1.

[0526] For example, S807 to S810 may refer to the description of S609 to S611 above, which will not be repeated here.

[0527] In this way, in the texture super-compression decoding process 800, there is no need to perform entropy decoding on the texture super-compression code stream, and the binary bits of the endpoint values ​​and the compressed values ​​of the weights can be directly extracted, which can improve the super-compression decoding efficiency.

[0528] In addition, although the quality of the reconstructed image obtained by the texture super-compression decoding process 800 is slightly reduced compared with that obtained by the texture super-compression decoding process 600, it is still higher than the quality of the reconstructed image in the prior art.

[0529] Optionally, in order to further improve the encoding and decoding efficiency of each block, when the weight and endpoint bit length of each block are not an integer multiple of a byte, more bits are intercepted from the atomic block code stream during encoding to make up an integer multiple of bytes, and unnecessary bits are removed according to bit operations during decoding.

[0530] The following shows an example of the bitstream structure of a texture super-compression bitstream in actual application and the syntax and semantics included.

[0531] For example, Table 12 shows an exemplary code stream structure of a texture super-compression code stream:

[0532] Table 12 Texture super-compression code stream structure

[0533] Among them, the header (stream header) occupies 16 bytes.

[0534] Size is used to indicate the length of data in bytes, which can be 4 bytes.

[0535] The data includes multiple blocks of super-compressed data corresponding to weights and multiple blocks of super-compressed data corresponding to endpoints.

[0536] In one possible approach, size and data together constitute the body (backbone); in this case, the texture super-compressed code stream includes two parts: header and body.

[0537] In one possible approach, data constitutes the body; in this case, the texture super-compressed code stream includes three parts: header, size, and body.

[0538] In other words, this application does not limit whether size is located inside or outside the body.

[0539] Table 13 Header syntax

[0540] For example, when the value of sut_profile is different, the syntax of data in body is also different; specifically, it can be as follows:

[0541] For example, when sut_profile == FastSpeedProfile, the syntax and corresponding semantics contained in body(data) are shown in Table 14:

[0542] Table 14 Syntax of body

[0543] For example, when sut_profile == ExtremeSpeedProfile, the syntax and corresponding semantics contained in body(data) are shown in Table 15:

[0544] Table 15 Syntax of body

[0545] In Table 15, reserved and weight_bit_num can constitute the characteristic information of the block, occupying a total of 1 byte (8 bits).

[0546] For example, when sut_profile == UltimateCrProfile or BalancedProfile, the syntax and corresponding semantics contained in body(data) are as shown in Table 16:

[0547] Table 16 Syntax of body

[0548] In Table 16, pattern_info and weight_bit_num constitute the characteristic information of the block and occupy a total of 1 byte (8 bits).

[0549] In Table 16, PartInfoLenth, PartInfoBuf, PartMutiIndexLenth, and PartMutiIndexBuf constitute partition information.

[0550] In Table 16, AlphaLenth, AlphaBuf, and rgbBuf constitute the endpoint code stream; or YLenth, CoCgLenth, Ybuf, and CoCgBuf constitute the endpoint code stream; or YLenth, CoCgLenth, and CoCgBuf constitute the endpoint code stream; or rgbLenth and rgbBuf constitute the endpoint code stream.

[0551] In Table 16, Indicelenth, IndiceBuf, Weightlenth and weightBuf constitute a weight code stream; or weightBuf constitutes a weight code stream; or WeightEncLengh and WeightEncBuf constitute a weight code stream.

[0552] For example, when extern_flag=1, body(data) may also include syntax and corresponding semantics as shown in Table 17:

[0553] Table 17 Syntax of body

[0554] For example, the present application does not limit the order in which the various syntax elements are arranged in the texture super-compression code stream.

[0555] For example, Table 18 is a comparison table showing the compression rate and quality of the present application and the prior art (wherein the test data in Table 18 is the average value obtained by testing 5000 natural images with a resolution of 256*256).

[0556] Table 18

[0557] PSNR refers to Peak Signal-to-Noise Ratio (PSNR). The smaller the negative value of PSNR compared to the texture compression method in the prior art, the better the quality of the reconstructed image.

[0558] PSNR-MEAN refers to the average value of the peak signal-to-noise ratio. The larger the PSNR-MEAN, the better the quality of the reconstructed image.

[0559] PSNR-MIN refers to the minimum value of the peak signal-to-noise ratio. The larger the PSNR-MIN, the better the quality of the reconstructed image.

[0560] PSNR-MAX refers to the maximum value of the peak signal-to-noise ratio. The larger the PSNR-MAX, the better the quality of the reconstructed image.

[0561] As shown in Table 18, while the compression ratio of the present invention's texture super-compression method is lower than that of prior art texture super-compression method 1, the quality of the reconstructed image of the present invention is higher than that of prior art texture super-compression method 1. Compared to prior art texture super-compression method 2, not only is the compression ratio of the present invention's texture super-compression method higher than that of prior art texture super-compression method 2, but the quality of the reconstructed image of the present invention is also higher than that of prior art texture super-compression method 2. This shows that the present invention's texture super-compression method can not only compress the texture bitstream but also ensure relatively high reconstructed image quality. In other words, the present invention's texture super-compression method can strike a balance between compression ratio and reconstructed image quality.

[0562] FIG9 is a diagram showing an exemplary comparison of the effects of the prior art and the present application.

[0563] Figure 9 (1) is the original image, Figure 9 (2) is the reconstructed image generated based on the texture super-compression method 1 of the prior art, Figure 9 (3) is the reconstructed image generated based on the texture super-compression method 2 of the prior art, and Figure 9 (4) is the reconstructed image generated based on the texture super-compression method of the present application.

[0564] Referring to Figure 9, "burrs" appear around the petals in Figure 9 (2) and Figure 9 (3) (that is, the areas around the petals are blurry), while "burrs" do not appear around the petals in Figure 9 (4), and Figure 9 (4) and Figure 9 (1) are almost identical; it can be seen that the quality of the reconstructed image generated by the texture super-compression method of the present application is higher than the quality of the reconstructed image generated by the texture super-compression method based on the prior art.

[0565] In an example, FIG10 shows a schematic block diagram of a device 1000 according to an embodiment of the present application. The device 1000 may include: a processor 1001 and a transceiver / transceiver pin 1002 , and optionally, a memory 1003 .

[0566] The various components of the device 1000 are coupled together via a bus 1004. The bus 1004 includes a data bus, a power bus, a control bus, and a status signal bus. However, for clarity, all buses are referred to as bus 1004 in the figure.

[0567] Optionally, the memory 1003 may be used to store instructions in the aforementioned method embodiment. The processor 1001 may be used to execute the instructions in the memory 1003 and control the receiving pin to receive a signal and control the transmitting pin to send a signal.

[0568] The apparatus 1000 may be the electronic device or a chip of the electronic device in the above method embodiment.

[0569] Exemplarily, the electronic device may be a terminal device or a server, and this application does not impose any restrictions on this.

[0570] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0571] The present application also provides a chip comprising one or more interface circuits and one or more processors; the one or more processors receive or send data via the one or more interface circuits, and when the one or more processors execute computer instructions, the steps of the above-mentioned related methods are implemented. The interface circuit is a transceiver / transceiver pin 1002.

[0572] This embodiment further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.

[0573] This embodiment further provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer executes the above-mentioned related steps to implement the method in the above-mentioned embodiment.

[0574] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the chip to execute the methods in the above-mentioned method embodiments.

[0575] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0576] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0577] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0578] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0579] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0580] Any content of each embodiment of this application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application.

[0581] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0582] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disc (CD-ROM) or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0583] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0584] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A texture super-compression coding method, characterized in that: The method comprises: Acquire images; Performing block processing on the image to obtain multiple blocks; Determining a target coding mode corresponding to the first block from a plurality of preset coding modes; wherein, in a plurality of texture code streams of the second blocks obtained by encoding the second block based on the plurality of preset coding modes, the proportion of coded data corresponding to the weight of the second block is the same, the proportion of coded data corresponding to the endpoints of the second block is the same, and the relative positions of the coded data corresponding to the weight of the second block and the coded data of the endpoints are fixed; and the first block and the second block are any one of the plurality of blocks; encoding the first block based on a target coding mode corresponding to the first block to obtain a texture stream of the first block; wherein the texture stream of the first block includes encoded data of weights corresponding to the first block and encoded data of endpoints, and the texture streams of the multiple blocks constitute a texture stream of the image; Extracting, from the texture code stream of the image, the coded data of the weights corresponding to the plurality of blocks and the coded data of the endpoints; The coding data of the weights corresponding to the multiple blocks are encoded, and the coding data of the endpoints corresponding to the multiple blocks are encoded to obtain a texture super-compressed code stream of the image.

2. The method according to claim 1, characterized in that The determining, from a plurality of preset coding modes, a target coding mode corresponding to the first block includes: Determining a coding error and a bit rate corresponding to encoding the first block based on the multiple preset coding modes; Based on at least one of coding errors or coding rates corresponding to the multiple preset coding modes, a target coding mode corresponding to the first block is determined from the multiple preset coding modes.

3. The method according to claim 2, characterized in that The determining, based on at least one of coding errors and bit rates corresponding to the multiple preset coding modes, a target coding mode corresponding to the first block from the multiple preset coding modes includes: Determine the preset coding mode corresponding to the minimum coding error as the target coding mode corresponding to the first block; or Determine the preset coding mode corresponding to the minimum bit rate as the target coding mode corresponding to the first block; or Perform a weighted calculation on the coding error and bit rate corresponding to each preset coding mode in the multiple preset coding modes, and determine the preset coding mode corresponding to the minimum value of the weighted calculation results as the target coding mode corresponding to the first block.

4. The method according to claim 1, wherein The determining, from a plurality of preset coding modes, a target coding mode corresponding to the first block includes: Get the pre-configured encoding mode identifier; The preset coding mode indicated by the coding mode identifier among the multiple preset coding modes is determined as the target coding mode corresponding to the first block.

5. The method according to any one of claims 1 to 4, characterized in that The positions of the encoded data of the second blocks corresponding to the weights in the texture code streams of the multiple second blocks obtained by encoding the second blocks based on the multiple preset coding modes are fixed, and / or the positions of the encoded data of the second blocks corresponding to the endpoints in the texture code streams of the multiple second blocks obtained by encoding the second blocks based on the multiple preset coding modes are fixed.

6. The method according to any one of claims 1 to 5, characterized in that The target coding mode corresponding to the first block is used to indicate at least one of a coding mode, a color endpoint mode, or a number of partitions of the first block.

7. The method according to claim 6, characterized in that The encoding of the first block based on the target coding mode corresponding to the first block to obtain a texture code stream of the first block includes: Determining, based on the coding mode and the number of partitions of the first block, a value of a weight and a value of an endpoint corresponding to the first block; Entropy encoding is performed on the weight value corresponding to the first block based on the encoding mode of the first block, and entropy encoding is performed on the endpoint value corresponding to the first block based on the color endpoint mode to obtain a texture code stream of the first block.

8. The method according to claim 6 or 7, characterized in that The encoding mode of the first block is used to indicate that the number of planes of the first block is 1 and the maximum value of the number of partitions of the first block is 2.

9. The method according to claim 6 or 7, characterized in that The encoding mode of the first block is used to indicate that the number of planes of the first block is 1 and the maximum value of the number of partitions of the first block is 1.

10. The method according to any one of claims 1 to 9, characterized in that The texture code stream of the first block also includes coded data of the first block corresponding to other information; the method further includes: Extracting, from the texture code stream of the image, coded data corresponding to other information of the plurality of blocks; When other information of the multiple blocks is the same, writing the encoded data of the other information of any one of the multiple blocks into the texture super-compressed code stream; Among them, the other information of the first block includes at least one of the coding mode identifier or partition information of the target coding mode corresponding to the first block.

11. A texture super-compression decoding method, characterized in that: The method comprises: Receive the texture super-compressed code stream of the image; Decoding the texture super-compressed code stream to obtain reconstructed data of the coded data corresponding to weights of a plurality of blocks in the image and reconstructed data of the coded data of endpoints; Encapsulating the reconstructed data of the coded data corresponding to the weights of the multiple blocks and the reconstructed data of the coded data of the endpoints to obtain a texture stream of the image; wherein the texture stream of the image includes the texture streams of the multiple blocks of the image, the texture stream of a first block includes the reconstructed data of the coded data corresponding to the weights of the first block and the reconstructed data of the coded data of the endpoints, and the first block is any one of the multiple blocks; Determining a target decoding mode corresponding to the first block from a plurality of preset decoding modes; wherein, in texture code streams of a plurality of second blocks decoded based on the plurality of preset decoding modes, the proportion of reconstructed data of the coded data corresponding to the weights of the second blocks is the same, the proportion of reconstructed data of the coded data corresponding to the endpoints of the second blocks is the same, and the relative positions of the reconstructed data of the coded data corresponding to the weights of the second blocks and the reconstructed data of the coded data of the endpoints are fixed; and the second block is any one of the plurality of blocks; Decoding a texture code stream of a first block in the texture code stream of the image based on a target decoding mode corresponding to the first block to obtain a reconstructed value of a weight and a reconstructed value of an endpoint corresponding to the first block; The first block is reconstructed based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of the multiple blocks constitute a reconstructed image of the image.

12. The method according to claim 11, characterized in that The determining, from a plurality of preset decoding modes, a target decoding mode corresponding to the first block includes: Determining a preset decoding mode indicated by a decoding mode identifier among a plurality of preset decoding modes as a target decoding mode corresponding to the first block; The decoding mode identifier is obtained by parsing the texture super-compression code stream, or the decoding mode identifier is obtained by parsing the texture code stream of the first block, or the decoding mode identifier is pre-configured.

13. The method according to claim 11 or 12, characterized in that The position of the reconstructed data of the encoded data of the second block corresponding to the weight in the texture code stream of the multiple second blocks decoded based on the multiple preset decoding modes is fixed, and / or the position of the reconstructed data of the encoded data of the second block corresponding to the endpoint in the texture code stream of the multiple second blocks decoded based on the multiple preset decoding modes is fixed.

14. The method according to any one of claims 11 to 13, characterized in that The target decoding mode corresponding to the first block is used to indicate at least one of a decoding mode, a color endpoint mode, or a partition quantity of the first block.

15. The method according to claim 14, characterized in that The decoding of the texture code stream of the first block in the texture code stream of the image based on the target decoding mode corresponding to the first block to obtain a reconstruction value of a weight corresponding to the first block and a reconstruction value of an endpoint includes: Decoding reconstructed data of the coded data of the weights in the texture stream of the first block based on the coding mode of the first block to obtain a reconstructed value of the weight corresponding to the first block; The reconstructed data of the coded data of the endpoints in the texture code stream of the first block is decoded based on the color endpoint mode to obtain a reconstructed value of the corresponding endpoint of the first block.

16. The method according to claim 14 or 15, characterized in that The step of reconstructing the first block based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block includes: According to the decoding mode of the first block and the number of partitions, a weighted calculation is performed on the reconstruction value of the first block corresponding to the weight and the reconstruction value of the endpoint to obtain a reconstructed image of the first block.

17. The method according to any one of claims 11 to 16, characterized in that The decoding mode of the first block is used to indicate that the number of planes of the first block is 1 and the maximum number of partitions of the first block is 2.

18. The method according to any one of claims 11 to 16, characterized in that The decoding mode of the first block is used to indicate that the number of planes of the first block is 1 and the maximum value of the number of partitions of the first block is 1.

19. A texture super-compressed code stream, characterized in that: The texture super-compressed code stream is generated according to the method described in any one of claims 1 to 10.

20. A texture super-compressed code stream, characterized in that: The texture super-compression code stream includes: texture information, configuration information, endpoint code stream and weight code stream.

21. The texture super-compressed code stream according to claim 20, characterized in that: The texture super-compressed code stream further includes at least one of a code stream type identifier and partition information.

22. The texture super-compressed code stream according to claim 20 or 21, characterized in that: The texture information includes the height and width of an image, and the height and width of blocks in the image.

23. The texture super-compressed code stream according to claim 22, characterized in that: The texture information further includes at least one of a third dimension of an image or a third dimension of a block in the image.

24. The texture super-compressed code stream according to any one of claims 20 to 23, characterized in that: The configuration information includes: transparency description information, bit length of block corresponding weight and super compression mode; The super-compression mode is used to describe the relationship between the compression rate and compression ratio of the texture super-compression code stream.

25. The texture super-compressed code stream according to claim 24, characterized in that: The configuration information also includes at least one of a weight mode or an endpoint mode.

26. The texture super-compressed code stream according to any one of claims 21 to 25, characterized in that: The partition information includes: the byte length of the ultra-compressed data of the partition information and the ultra-compressed data of the partition information.

27. The texture super-compressed code stream according to claim 26, characterized in that: The partition information also includes the byte length of the partition index and the super-compressed data of the partition index.

28. The texture super-compressed code stream according to any one of claims 20 to 27, characterized in that: When the endpoint mode is the first preset value, the endpoint code stream includes encoded data of RGB components of the endpoint value; When the endpoint mode is the second preset value, the endpoint code stream includes the super-compressed data of the Y component of the endpoint value and the super-compressed data of the CoCg component, and the endpoint code stream also includes the byte length of the super-compressed data of the Y component of the endpoint value and the byte length of the super-compressed data of the CoCg component; When the endpoint mode is a third preset value, the endpoint code stream includes super-compressed data of the Y component and super-compressed data of the CoCg component of the endpoint value, and the endpoint code stream also includes a byte length of the super-compressed data of the CoCg component of the endpoint value; When the endpoint mode is the fourth preset value, the endpoint code stream includes super-compressed data of the RGB components of the endpoint value, and the endpoint code stream also includes the byte length of the super-compressed data of the RGB components of the endpoint value.

29. The texture super-compressed code stream according to claim 28, characterized in that: The endpoint code stream also includes: super-compressed data of the transparency component of the endpoint value and the byte length of the super-compressed data of the transparency component of the endpoint value.

30. The texture super-compressed code stream according to any one of claims 21 to 29, characterized in that: When the weight mode is the fifth preset value or the sixth preset value, the weight code stream includes the byte length of the super-compressed data of the index table, the super-compressed data of the weight table, and the super-compressed data of the index table; When the super-compression coding mode of the weight is a seventh preset value, the weight code stream includes coded data of the weight; When the super-compression coding mode of the weight is the eighth preset value, the weight code stream includes the byte length of the super-compressed data of the weight and the super-compressed data of the weight.

31. The texture super-compressed code stream according to claim 30, characterized in that: When the weight mode is the fifth preset value or the sixth preset value, the weight code stream further includes the byte length of the super-compressed data of the weight table.

32. A texture encoder, characterized in that The texture encoder is configured to: Acquire images; Performing block processing on the image to obtain multiple blocks; Determining a target coding mode corresponding to the first block from a plurality of preset coding modes; wherein, in a plurality of texture code streams of the second blocks obtained by encoding the second block based on the plurality of preset coding modes, the proportion of coded data corresponding to the weight of the second block is the same, the proportion of coded data corresponding to the endpoints of the second block is the same, and the relative positions of the coded data corresponding to the weight of the second block and the coded data of the endpoints are fixed; and the first block and the second block are any one of the plurality of blocks; The first block is encoded based on a target coding mode corresponding to the first block to obtain a texture code stream of the first block; wherein the texture code stream of the first block includes encoding data of weights corresponding to the first block and encoding data of endpoints, and the texture code streams of the multiple blocks constitute a texture code stream of the image.

33. A texture decoder, characterized in that The texture decoder is configured to: Determining a target decoding mode corresponding to the first block from a plurality of preset decoding modes; wherein, in texture code streams of a plurality of second blocks decoded based on the plurality of preset decoding modes, the proportion of reconstructed data of the coded data corresponding to the weight of the second block is the same, the proportion of reconstructed data of the coded data corresponding to the endpoint of the second block is the same, and the relative positions of the reconstructed data of the coded data corresponding to the weight of the second block and the reconstructed data of the coded data of the endpoint are fixed; and the first block and the second block are any one of a plurality of blocks included in the image; Decoding a texture code stream of a first block in a texture code stream of an image based on a target decoding mode corresponding to the first block to obtain a reconstructed value of a weight and a reconstructed value of an endpoint corresponding to the first block; The first block is reconstructed based on the reconstruction value of the weight corresponding to the first block and the reconstruction value of the endpoint to obtain a reconstructed image of the first block; the reconstructed images of the multiple blocks constitute a reconstructed image of the image.

34. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program runs on a computer or a processor, the computer or the processor executes the method according to any one of claims 1 to 18.

35. A computer program product, characterized in that The computer program product comprises computer instructions, which, when executed by a computer or a processor, cause the steps of the method according to any one of claims 1 to 18 to be performed.

36. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a texture super-compressed code stream, which includes texture information, configuration information, endpoint code stream and weight code stream.

Citation Information

Patent Citations

  • Multi-output decoder for texture decompression

    CN108810544A

  • Data processing method and system, electronic equipment and computer readable medium

    CN112489180A

  • Texture data decompression method based on image distribution

    CN112767500A

  • Texture compression and decompression method and device, computer equipment and storage medium

    CN112929705A

  • Multi-Output Decoder for Texture Decompression

    US20180315218A1