Image encoding method, device and computer equipment based on transformation and quantization

By decomposing the image transformation algorithm into multiple transformation groups and setting up a quantization process between transformations, the problem of low flexibility in image compression rate control in the existing technology is solved, and more efficient image compression and decoding effects are achieved.

CN118524216BActive Publication Date: 2024-10-25深圳市欧冶半导体有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410889332.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-25
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

Existing image compression methods cannot effectively control the image compression rate, resulting in low flexibility.

Method used

By decomposing the preset image transformation algorithm into a first sub-transformation group and a second sub-transformation group, and setting the quantization process between the two transformations, the image compression rate can be flexibly adjusted, information loss reduced, and image compression control improved. rate flexibility.

Benefits of technology

It achieves flexible adjustment of the image compression rate, reduces information loss, improves the control flexibility of the image compression rate, ensures that the error during decoding is only related to the first sub-transformation group, and avoids more information loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118524216B_ABST
    Figure CN118524216B_ABST
Patent Text Reader

Abstract

The present application relates to a method, apparatus and computer equipment for image encoding based on transformation and quantization. The method comprises: obtaining a first sub-transformation formula group and a second sub-transformation formula group, wherein the first sub-transformation formula group and the second sub-transformation formula group are obtained by decomposing a preset image transformation algorithm; obtaining image pixel data of the image to be compressed, transforming the image pixel data based on the first sub-transformation formula group to obtain a first transformation coefficient; quantizing the first transformation coefficient to obtain a first quantization coefficient; transforming the first quantization coefficient based on the second sub-transformation formula group to obtain a second transformation coefficient; encoding the second transformation coefficient to obtain image pixel encoding data corresponding to the image to be compressed. The use of this method can improve the flexibility of controlling the image compression rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, and computer device for image encoding based on transformation and quantization. Background Art

[0002] With the development of computer technology, image compression technology has emerged. Image compression technology refers to the technology of reducing the amount of data required to represent digital images by removing redundant information in the image.

[0003] In the prior art, images are compressed mainly through transformation algorithms such as Hadamard transform and quantization. However, the existing image compression methods cannot effectively and finely control the compression rate of the compressed image, resulting in low flexibility in controlling the image compression rate. Summary of the invention

[0004] Based on this, it is necessary to provide a transformation and quantization-based image encoding method, apparatus, computer device, computer-readable storage medium and computer program product that can improve the flexibility of controlling image compression rate in order to address the above technical problems.

[0005] In a first aspect, the present application provides an image encoding method based on transformation and quantization, comprising:

[0006] Obtaining a first sub-transformation formula group and a second sub-transformation formula group, wherein the first sub-transformation formula group and the second sub-transformation formula group are obtained by decomposing a preset image transformation algorithm;

[0007] Obtain image pixel data of the image to be compressed, transform the image pixel data based on the first sub-transformation formula group to obtain a first transform coefficient; quantize the first transform coefficient to obtain a first quantization coefficient; transform the first quantization coefficient based on the second sub-transformation formula group to obtain a second transform coefficient;

[0008] The second transform coefficient is encoded to obtain image pixel encoding data corresponding to the image to be compressed.

[0009] In one embodiment, quantizing the first transform coefficient to obtain the first quantized coefficient includes:

[0010] Acquire multiple groups of different quantization curves; wherein different quantization curves have different low-frequency quantization parameter values ​​or high-frequency quantization parameter values ​​set;

[0011] The quantization curve whose low-frequency quantization parameter value and high-frequency quantization parameter value meet the target quantization requirement is used as the target quantization curve among the multiple groups of quantization curves;

[0012] Based on the target quantization curve, the first transform coefficient is quantized to obtain a first quantization coefficient.

[0013] In one embodiment, quantizing the first transform coefficient based on the target quantization curve to obtain the first quantization coefficient includes:

[0014] Determining a target low-frequency component parameter value and a target high-frequency component parameter value from a target quantization curve;

[0015] Each low-frequency component value in the first transform coefficient is moved in a preset direction by the number of bits corresponding to the target low-frequency component parameter value, and each high-frequency component value in the first transform coefficient is moved in a preset direction by the number of bits corresponding to the target high-frequency component parameter value to obtain a first quantization coefficient.

[0016] In one of the embodiments, the first sub-transformation formula in the first sub-transformation formula group is reversible; the second sub-transformation formula in the second sub-transformation formula group is reversible; and the image encoding method based on transformation and quantization further includes:

[0017] Decoding the image pixel coded data to obtain a second transform coefficient;

[0018] Obtaining a second inverse transform equation group corresponding to the second sub-transform equation group; performing an inverse transform on the second transform coefficient based on the second inverse transform equation group to obtain a first inverse transform coefficient;

[0019] Dequantizing the first inverse transform coefficient to obtain a second quantized coefficient;

[0020] A first inverse transform equation group corresponding to the first sub-transform equation group is obtained; and the second quantization coefficient is inversely transformed based on the first inverse transform equation group to obtain image pixel decoding data.

[0021] In one embodiment, inverse quantizing the first inverse transform coefficient to obtain a second quantized coefficient includes:

[0022] The second quantization coefficient is obtained by moving each low-frequency component value in the first inverse transformation coefficient in a preset reverse direction by the number of bits corresponding to the target low-frequency component parameter value, and by moving each high-frequency component value in the first inverse transformation coefficient in a preset reverse direction by the number of bits corresponding to the target high-frequency component parameter value; the preset direction and the preset reverse direction are in opposite directions to each other.

[0023] In a second aspect, the present application further provides an image encoding device based on transformation and quantization, comprising:

[0024] An acquisition module, used for acquiring a first sub-transformation formula group and a second sub-transformation formula group, wherein the first sub-transformation formula group and the second sub-transformation formula group are decomposed based on a preset image transformation algorithm;

[0025] The transformation and quantization module is used to obtain image pixel data of the image to be compressed, transform the image pixel data based on the first sub-transformation formula group to obtain a first transformation coefficient; quantize the first transformation coefficient to obtain a first quantization coefficient; transform the first quantization coefficient based on the second sub-transformation formula group to obtain a second transformation coefficient;

[0026] The encoding module is used to encode the second transform coefficient to obtain image pixel encoding data corresponding to the image to be compressed.

[0027] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method when executing the computer program.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when the computer program is executed by a processor.

[0029] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps in the above method when executed by a processor.

[0030] The above-mentioned image encoding method, apparatus, computer device, computer-readable storage medium and computer program product based on transformation and quantization obtain the first sub-transformation formula group and the second sub-transformation formula group obtained by decomposing the preset image transformation algorithm and the image pixel data of the image to be compressed, transform the image pixel data based on the first sub-transformation formula group to obtain the first transformation coefficient; quantize the first transformation coefficient to obtain the first quantization coefficient; transform the first quantization coefficient based on the second sub-transformation formula group to obtain the second transformation coefficient; encode the second transformation coefficient to obtain the image pixel encoding data corresponding to the image to be compressed, so as to realize the flexible adjustment of the image compression rate for image compression. During the image compression process, the preset image transformation algorithm is decomposed into the first sub-transformation formula group and the second sub-transformation formula group, and the quantization process is set between the first sub-transformation and the second sub-transformation, so that the information loss generated by the quantization of the encoding process and the information loss of the corresponding inverse quantization process of the decoding are only related to the coefficients in the first sub-transformation formula group, that is, the error loss corresponding to the final decoded compressed image is only related to the coefficients in the first sub-transformation formula group, avoiding more information loss, and setting the quantization process between the two transformations is conducive to better adjusting the compression rate of the compressed image, thereby improving the flexibility of controlling the image compression rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A diagram of an application environment of an image coding method based on transformation and quantization in one embodiment;

[0033] Figure 2 is a schematic flow chart of an image encoding method based on transformation and quantization in one embodiment;

[0034] Figure 3 A schematic diagram of a process of image encoding and decoding based on transformation and quantization in one embodiment;

[0035] Figure 4 is a structural block diagram of an image encoding device based on transformation and quantization in one embodiment;

[0036] Figure 5 is an internal structure diagram of a computer device in one embodiment;

[0037] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] The image encoding method based on transformation and quantization provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0040] Both the terminal and the server can be used independently to execute the image encoding method based on transformation and quantization provided in the embodiments of the present application.

[0041] For example, the terminal obtains a first sub-transformation formula group and a second sub-transformation formula group, where the first sub-transformation formula group and the second sub-transformation formula group are obtained by decomposing a preset image transformation algorithm; obtains image pixel data of the image to be compressed, transforms the image pixel data based on the first sub-transformation formula group to obtain a first transformation coefficient; quantizes the first transformation coefficient to obtain a first quantization coefficient; transforms the first quantization coefficient based on the second sub-transformation formula group to obtain a second transformation coefficient; and encodes the second transformation coefficient to obtain image pixel encoding data corresponding to the image to be compressed.

[0042] For example, the server obtains a first sub-transformation formula group and a second sub-transformation formula group, where the first sub-transformation formula group and the second sub-transformation formula group are decomposed from a preset image transformation algorithm; obtains image pixel data of the image to be compressed, transforms the image pixel data based on the first sub-transformation formula group to obtain a first transformation coefficient; quantizes the first transformation coefficient to obtain a first quantization coefficient; transforms the first quantization coefficient based on the second sub-transformation formula group to obtain a second transformation coefficient; and encodes the second transformation coefficient to obtain image pixel encoding data corresponding to the image to be compressed.

[0043] In an exemplary embodiment, Figure 2 As shown, a method for image coding based on transformation and quantization is provided, and the method is applied to Figure 1 The terminal or server in the example is used to illustrate, including the following steps 200 to 204. Among them:

[0044] Step S200: obtaining a first sub-transformation formula group and a second sub-transformation formula group, wherein the first sub-transformation formula group and the second sub-transformation formula group are obtained by decomposing a preset image transformation algorithm.

[0045] Among them, the first sub-transformation formula group refers to one of the transformation formula groups obtained after decomposing the preset image transformation algorithm; the first sub-transformation formula group includes multiple transformation equations, and the first sub-transformation formula group is reversible. In order to better control the compression rate of the compressed image when quantized after transformation, and better control the maximum reconstruction error of the decoded data when decoding the compressed image to reduce the information loss of the compressed image, the form of the transformation equations in the first sub-transformation formula group can be designed to be as simple as possible, so that the inverse transformation equation of the first sub-transformation formula group is only related to a preset number of coefficients (for example, only related to 2 coefficients), and the preset number is less than the number of coefficients of the preset image transformation algorithm, so that the error loss generated when decoding the compressed image is only related to fewer coefficients. The second sub-transformation formula group refers to another transformation formula group obtained by decomposing the preset image transformation algorithm; the second sub-transformation formula group includes multiple transformation equations, the second sub-transformation formula group is reversible, and the coefficients of the transformation equations in the first sub-transformation formula group have a mathematical relationship with the coefficients in the first sub-transformation formula group. Since the second sub-transformation formula group is applied after quantization in the process of encoding compressed images, and the second sub-transformation formula group is reversible, no information loss will be generated in the process of decoding compressed images, so the transformation equations in the second sub-transformation formula group can be simple or complex. The preset image transformation algorithm refers to the transformation algorithm used to compress the image, which can be Hadamard transform.

[0046] Exemplarily, in order to better control the compression rate of the compressed image and reduce the information loss when decoding the compressed image, the preset image transformation algorithm can be decomposed into a first sub-transformation group and a second sub-transformation group, both of which are reversible. The transformation coefficients of the second sub-transformation group have a mathematical relationship with the transformation coefficients in the first sub-transformation group. Since the information loss when decoding the compressed image is related to fewer transformation coefficients, the form of each transformation equation in the first sub-transformation group can be as simple as possible. Since the second sub-transformation group is also reversible, when decoding the compressed image, the second inverse transformation group corresponding to the second sub-transformation group is used for transformation, and no information loss will occur. Therefore, there is no restriction on the form of the transformation equation in the second sub-transformation group. The transformation equation in the second sub-transformation group can be simple or complex. If the purpose is to reduce the amount of calculation, the form of the transformation equation in the second sub-transformation group can be as simple as possible.

[0047] For example, formula (1) is a preset image transformation algorithm (i.e., Hadamard transform), and formula (1) can be decomposed into formulas (2) to (9) and formulas (10) to (25), wherein formulas (2) to (9) are the first sub-transformation formula group, formulas (10) to (25) are the second sub-transformation formula group, H in formula (1) is the Hadamard transform matrix, X (i.e. ) is the image pixel data of the image to be compressed, Y (i.e. ) is the image pixel data after transformation based on the preset image transformation algorithm. In formula (2) to formula (9) is the transformation value corresponding to the first sub-transformation of Hadamard, is the low frequency component, is the high frequency component; in formula (10) to formula (25), is the intermediate variable, is the transformation value corresponding to the second subtransformation of Hadamard.

[0048]

[0049]

[0050]

[0051] Step S202, obtain image pixel data of the image to be compressed, transform the image pixel data based on the first sub-transformation formula group to obtain a first transform coefficient; quantize the first transform coefficient to obtain a first quantization coefficient; transform the first quantization coefficient based on the second sub-transformation formula group to obtain a second transform coefficient.

[0052] The image pixel data refers to the image pixel value of the image to be compressed. The first transform coefficient refers to the value obtained by substituting the image pixel data into the corresponding transform equation in the first sub-transformation equation group, expressed in the form of a matrix. The first quantization coefficient refers to the value obtained by quantizing the first transform coefficient, expressed in the form of a matrix. The second transform coefficient refers to the value obtained by substituting the first quantization coefficient into the corresponding transform equation in the second sub-transformation equation group, expressed in the form of a matrix.

[0053] Exemplarily, the image pixel data of the image to be compressed can be substituted into the corresponding transformation equation in the first sub-transformation equation group to obtain the first transformation coefficient corresponding to each transformation equation, and then according to the actual needs of the current application scenario, a target quantization curve is screened out from multiple groups of quantization curves, and the first transformation coefficient is quantized based on the target quantization curve to obtain the quantized first quantization coefficient, and then the first quantization coefficient is substituted into the corresponding transformation equation in the second sub-transformation equation group to obtain the second transformation coefficient. The quantization process is placed between the two transformations. Since when the preset image transformation algorithm is decomposed, it can be determined whether the form of each transformation equation in the first sub-transformation equation group is simple or complicated, that is, the number of coefficients related to each transformation equation in the first sub-transformation equation group can be determined. In order to reduce the loss as much as possible when decoding the compressed image, the information loss generated by the quantization process during encoding and the inverse quantization process during decoding is reduced. When the inverse transformation of the first inverse transformation equation group corresponding to the first sub-transformation equation group is performed during decoding, only a small amount of coefficient error superposition is performed, so that the information loss of the decoded image is less; in addition, setting the quantization process between the two transformations is also conducive to flexibly setting the quantization parameter and improving the flexibility of controlling the image compression rate.

[0054] Step S204: encode the second transform coefficient to obtain image pixel encoding data corresponding to the image to be compressed.

[0055] The image pixel encoding data refers to data obtained by encoding the second transform coefficient; the encoding may be performed by using methods such as Golomb encoding and Huffman encoding, and there is no restriction on the encoding method.

[0056] Exemplarily, the second transform coefficient can be encoded based on a preset encoding algorithm, such as Golomb coding, Huffman coding, etc., to obtain a code stream corresponding to the image to be compressed, that is, image pixel encoding data. Since the first sub-transformation formula combination and the second sub-transformation formula group are reversible, when the image pixel encoding data is decoded on a local device or sent to other devices (other terminals or other servers) for decoding, the accuracy of the decoded image pixel decoding data is also relatively high.

[0057] The above-mentioned image coding method based on transformation and quantization obtains the first sub-transformation formula group and the second sub-transformation formula group obtained by decomposing the preset image transformation algorithm and the image pixel data of the image to be compressed, transforms the image pixel data based on the first sub-transformation formula group to obtain the first transformation coefficient; quantizes the first transformation coefficient to obtain the first quantization coefficient; transforms the first quantization coefficient based on the second sub-transformation formula group to obtain the second transformation coefficient; encodes the second transformation coefficient to obtain the image pixel encoding data corresponding to the image to be compressed, thereby realizing flexible adjustment of the image compression rate for image compression. During the image compression process, the preset image transformation algorithm is decomposed into the first sub-transformation formula group and the second sub-transformation formula group, and the quantization process is set between the first sub-transformation and the second sub-transformation, so that the information loss generated by the quantization of the encoding process and the information loss of the corresponding inverse quantization process of the decoding are only related to the coefficients in the first sub-transformation formula group, that is, the error loss corresponding to the final decoded compressed image is only related to the coefficients in the first sub-transformation formula group, avoiding more information loss, and setting the quantization process between two transformations is conducive to better adjusting the compression rate of the compressed image, thereby improving the flexibility of controlling the image compression rate.

[0058] In some embodiments, quantizing the first transform coefficient in step S202 to obtain a first quantized coefficient includes:

[0059] Step S300, obtaining a plurality of different groups of quantization curves; wherein different quantization curves are set with different low-frequency quantization parameter values ​​or high-frequency quantization parameter values.

[0060] Step S302 : taking, among the multiple groups of quantization curves, a quantization curve whose low-frequency quantization parameter value and high-frequency quantization parameter value meet the target quantization requirement as a target quantization curve.

[0061] Step S304: quantize the first transform coefficient based on the target quantization curve to obtain a first quantization coefficient.

[0062] Among them, the low-frequency quantization parameter value refers to the parameter value quantized in a low-frequency manner. The high-frequency quantization parameter value refers to the parameter value quantized in a high-frequency manner. The target quantization requirement refers to the expected quantization requirement of the current application scenario; since the smaller the low-frequency quantization parameter value and the high-frequency quantization parameter value, the higher the image restoration quality, the smaller the maximum reconstruction error, and the lower the image compression rate, conversely, the larger the low-frequency quantization parameter value and the high-frequency quantization parameter value, the lower the image restoration quality, the higher the maximum reconstruction error, and the higher the image compression rate. The target quantization curve refers to the quantization curve that meets the needs of the current application scenario.

[0063] Exemplarily, in order to be able to make more detailed adjustments to the image quality and compression rate of image compression, multiple groups of quantization curves with different low-frequency quantization parameter values ​​or high-frequency quantization parameter values ​​can be set, and according to the actual needs of the current application scenario, quantization curves whose low-frequency quantization parameter values ​​and high-frequency quantization parameter values ​​meet the target quantization requirements are screened from the multiple groups of quantization curves, and the quantization curve that meets the target quantization requirements is used as the target quantization curve, and the first transform coefficient is quantized based on the target quantization curve; specifically, the screening method of the quantization curve that meets the target quantization requirement can be but is not limited to: if the current application scenario focuses on image restoration quality and compression rate, the quantization curve whose low-frequency quantization parameter value is less than a preset low-frequency quantization threshold and whose high-frequency quantization parameter value is less than a preset high-frequency quantization threshold can be screened as the target quantization curve.

[0064] In addition, if there is no quantization curve that meets the target quantization requirements among the current multiple groups of different quantization curves, the quantization parameters of the quantization curve (including low-frequency quantization parameter values ​​and high-frequency quantization parameter values) can also be adjusted, so that the first transform coefficient is quantized according to the adjusted quantization curve to obtain the first quantization coefficient, thereby improving the flexibility of quantization parameter setting and further improving the flexibility of controlling image compression rate.

[0065] In the above embodiment, a quantization curve that meets the target quantization requirement is selected from multiple groups of different quantization curves as a target quantization curve, and the first transform coefficient is quantized based on the target quantization curve to obtain a first quantization coefficient. This is beneficial for selecting a quantization curve that better meets actual requirements from multiple groups of quantization curves for quantization, more finely controlling the image compression rate, and to a certain extent controlling the maximum reconstruction value error when decoding the compressed image, thereby improving the flexibility of controlling the image compression rate.

[0066] In some embodiments, step S304 quantizes the first transform coefficient based on the target quantization curve to obtain the first quantization coefficient, including:

[0067] Step S400, determining a target low-frequency component parameter value and a target high-frequency component parameter value from a target quantization curve;

[0068] Step S402, shift each low frequency component value in the first transform coefficient in a preset direction by the number of bits corresponding to the target low frequency component parameter value, and shift each high frequency component value in the first transform coefficient in a preset direction by the number of bits corresponding to the target high frequency component parameter value, to obtain a first quantization coefficient.

[0069] Exemplarily, when quantizing, each low-frequency component value in the first transform coefficient can be moved in a preset direction by the number of bits corresponding to the target low-frequency component parameter value in the target quantization curve, and the high-frequency component value in the first transform coefficient can be moved in a preset direction by the number of bits corresponding to the target low-frequency component parameter value in the target quantization curve; wherein the preset direction can be to the right. For example, the following multiple groups of quantization curves can be set: ① The first group of quantization curves: the low-frequency quantization parameter value is 0, and the high-frequency quantization parameter value is 1; ② The second group of quantization curves: the low-frequency quantization parameter value is 1, and the high-frequency quantization parameter value is 1; ③ The third group of quantization curves: the low-frequency quantization parameter value is 1, and the high-frequency quantization parameter value is 2; Combined with the above formulas (2) to (9), formulas (2) to (9) is the low frequency component value, is the high-frequency component value. If the third group of quantization curves is selected as the target quantization curve, the low-frequency quantization value can be are all shifted right by one position, and the high-frequency quantized values Both are shifted right by 2 bits.

[0070] In the above embodiment, the first transform coefficient is quantized through the target quantization curve to achieve quantization compression of image pixel data, and the quantization process is set between the first sub-transformation formula group and the second sub-transformation formula group, which is beneficial to decoding the compressed image. The decoded data error is only related to the coefficients in the first sub-transformation formula group, and the setting of the quantization parameter is relatively flexible, ensuring the flexibility of setting the image compression rate.

[0071] In some embodiments, the first sub-transformation formula in the first sub-transformation formula group is reversible; the second sub-transformation formula in the second sub-transformation formula group is reversible; and the image encoding method based on transformation and quantization further includes an image decoding process:

[0072] Step S500: decode the image pixel coded data to obtain a second transform coefficient.

[0073] Step S502, obtaining a second inverse transform equation group corresponding to the second sub-transform equation group; performing an inverse transform on the second transform coefficients based on the second inverse transform equation group to obtain first inverse transform coefficients.

[0074] Step S504: Dequantize the first inverse transform coefficient to obtain a second quantized coefficient.

[0075] Step S506, obtaining a first inverse transform equation group corresponding to the first sub-transform equation group; performing an inverse transform on the second quantization coefficient based on the first inverse transform equation group to obtain image pixel decoding data.

[0076] Among them, the second inverse transform equation group refers to the combination of inverse transform equations corresponding to each transform equation in the second sub-transform equation group. The first inverse transform coefficient refers to the value obtained by substituting the second transform coefficient into each inverse transform equation in the second inverse transform equation group. The second quantization coefficient refers to the value obtained by inverse quantizing the first inverse transform coefficient; the second quantization coefficient is actually the same as the first quantization coefficient. The first inverse transform equation group refers to the combination of inverse transform equations corresponding to each transform equation in the first sub-transform equation group. Image pixel decoded data refers to the image pixel data obtained by inverse transforming and inverse quantizing the image to be compressed after compression encoding through transformation and quantization.

[0077] Exemplarily, the image pixel coded data is the data after compression coding of the image pixel data corresponding to the image to be compressed. When decoding the compressed image, the image pixel coded data can be initially decoded on a local device to obtain the second transform coefficient corresponding to the coded data (i.e., the compressed image). Since the first sub-transformation formula group and the second sub-transformation formula group are both reversible, the second transform coefficient can be first inversely transformed according to the second inverse transform formula group corresponding to the second sub-transformation formula group to obtain the first inverse transform coefficient. Further, the first inverse transform coefficient can be inversely quantized to obtain the second quantized coefficient, wherein the inverse quantization is the inverse quantization corresponding to the quantization in the image compression coding process. Then, based on the first inverse transform formula group corresponding to the first sub-transformation formula group, the second quantized coefficient can be inversely transformed to obtain the image pixel decoded data. The image pixel decoded data is obtained by decoding the image pixel coded data obtained after compression coding of the image to be compressed. Since the image to be compressed is compressed and coded In the process, a first sub-transformation formula group with a simple form is first used for transformation, and the quantization process is set between the processing process of the first sub-transformation formula group and the processing process of the second sub-transformation formula group, and the first sub-transformation formula group and the second sub-transformation formula group are both reversible. Then, in the process of decoding the compressed image, the inverse transformation process of the second inverse transformation formula group corresponding to the second sub-transformation formula group is first performed, and then the inverse quantization corresponding to the quantization of the image encoding process is performed, and finally the inverse transformation process of the first inverse transformation formula group corresponding to the first sub-transformation formula group is performed, and the information error is only generated in the process of quantization and inverse quantization. The coefficients related to the first sub-transformation formula group and the corresponding first inverse transformation formula group are the same. The error of the final image pixel decoded data is the superposition of the transformation coefficient errors related to the first inverse transformation formula group. Therefore, as long as the coefficients related to the first sub-transformation formula group are small, the error of the corresponding image pixel decoded data is smaller, and the decoded image loses less information, thereby making the decoded image pixel data have higher accuracy.

[0078] It can be understood that the sequence of steps in the process of compressing and encoding image pixel data is: first sub-transformation, quantization, second sub-transformation, and encoded data; the process of decoding compressed image pixel encoded data is: decoded data, second inverse transform, inverse quantization, and first inverse transform; and precisely because the first sub-transformation formula group in the compression encoding process is simple in form, has few related coefficients, and information loss occurs in the quantization and inverse quantization processes, the error corresponding to the decoding is the superposition of the errors of the coefficients related to the first inverse transform, and the coefficients related to the first sub-transformation formula group are the same as the coefficients related to the first inverse transform formula group, so that the error in the final decoding is only related to the coefficients corresponding to the transformation equations in the first sub-transformation formula group. For example, taking the examples corresponding to formulas (2) to (49) for understanding, formula (26) x0 = u0 + ((u4 + 1) >> 1) and formula (31) x5 = u0- (u4 >> 1) in the first inverse transform group as examples, the final decoded image pixel decoding data (that is, reconstruction value or reconstruction value) x0 and x5 are only related to u0 and u4. If the maximum error introduced by u0 during quantization and inverse quantization is error_u0, and the maximum error introduced by u4 is error_u4, then the maximum error between x0 and x5 is error_u0 + (error_u4 >> 1). Compared with the traditional method in which the reconstruction value is related to multiple coefficients, making it impossible to control the reconstruction error within a certain range, resulting in a large information loss, the maximum reconstruction error of each reconstruction value of the present application is strictly and effectively controlled based on the number of coefficients related to the first sub-transform group, and the quantization parameter can also be flexibly selected and set during quantization, which is conducive to better control of information loss, thereby improving the accuracy of the image after the compressed image is decoded.

[0079] The first inverse transformation formula group and the second inverse transformation formula group can be understood in conjunction with the following examples. Formula (26) to Formula (33) are the first inverse transformation formula group corresponding to the first sub-transformation formula group represented by Formula (2) to Formula (9), and Formula (34) to Formula (49) are the second inverse transformation formula group corresponding to the second sub-transformation formula group represented by Formula (10) to Formula (25).

[0080]

[0081]

[0082] The understanding of dequantizing the first inverse transform coefficient to obtain the second quantization coefficient can be understood by combining the following example. For example, if the "third group of quantization curves: low-frequency quantization parameter value is 1, high-frequency quantization parameter value is 2" is selected as the target quantization curve for quantization in the quantization process corresponding to the compressed encoded image, the low-frequency quantization value is quantized. are all shifted right by one position, and the high-frequency quantized values All are shifted 2 bits to the right. In the dequantization process corresponding to the decoded compressed image, dequantization is to convert the low-frequency quantization value are all shifted one position to the left, and the high-frequency quantized values Both are shifted left by 2 bits.

[0083] In one embodiment, the decoding process of the compressed image, i.e., "decoding the image pixel encoding data to obtain a second transform coefficient; obtaining a second inverse transform formula group corresponding to the second sub-transform formula group; inversely transforming the second transform coefficient based on the second inverse transform formula group to obtain a first inverse transform coefficient; inversely quantizing the first inverse transform coefficient to obtain a second quantized coefficient; obtaining a first inverse transform formula group corresponding to the first sub-transform formula group; inversely transforming the second quantized coefficient based on the first inverse transform formula group to obtain image pixel decoded data" can also be sent to other devices (other terminals or other servers) for execution.

[0084] In the above embodiment, the image coded data is first decoded to obtain the second transform coefficient, and then the second transform coefficient is inversely transformed based on the second inverse transform formula group to obtain the first inverse transform coefficient, and then the first inverse transform coefficient is inversely quantized to obtain the second quantized coefficient, and finally the second quantized coefficient is inversely transformed based on the first inverse transform formula group to obtain the image pixel decoded data, based on the reversibility of the first sub-transform formula group and the second sub-transform formula group, and the inverse quantization operation corresponding to the quantization operation when compressing the image, the image pixel coded data obtained by the compression coding is decoded to obtain the image pixel decoded data with higher accuracy, and the compression coding process is opposite to the decoding process and is reversible, thereby ensuring the information accuracy of the compressed image decoding.

[0085] In some embodiments, step S504 performs inverse quantization on the first inverse transform coefficient to obtain a second quantization coefficient, including:

[0086] The second quantization coefficient is obtained by moving each low-frequency component value in the first inverse transformation coefficient in a preset reverse direction by the number of bits corresponding to the target low-frequency component parameter value, and by moving each high-frequency component value in the first inverse transformation coefficient in a preset reverse direction by the number of bits corresponding to the target high-frequency component parameter value; the preset direction and the preset reverse direction are in opposite directions to each other.

[0087] Exemplarily, when the first inverse transform coefficient is dequantized, the operation corresponding to the dequantization is the opposite operation of the quantization operation in the compression coding process, wherein the preset direction may be the right direction, and the preset reverse direction may be the left direction; the dequantization may be understood by the following example: in the compressed image quantization process, the "third group of quantization curves: low-frequency quantization parameter value is 1, high-frequency quantization parameter value is 2" is selected as the target quantization curve for quantization, and the low-frequency quantization value is quantized during quantization. are all shifted right by one position, and the high-frequency quantized values are all shifted 2 bits to the right. Conversely, during the dequantization of the decoding process, the low-frequency quantization value is are all shifted one position to the left, and the high-frequency quantized values Both are shifted left by 2 bits.

[0088] In the above embodiment, by inverse quantizing the first inverse transform coefficient, the correspondence with the quantization operation in the process of compressing and encoding data is ensured, thereby ensuring the accuracy of the image pixel decoding data finally obtained by decoding.

[0089] In some embodiments, formula (2)-formula (49) and Figure 3 As an example, the image encoding (i.e., compression) and compressed image decoding process based on transformation and quantization in this application can obtain the image pixel data of the image to be compressed (corresponding to Figure 3 The image pixel data is substituted into the first sub-transformation formula group (i.e., formula (2) to formula (9), which also corresponds to Figure 3 In the Hadamard transform 1), we get the first transform coefficient (i.e. Figure 3 The first transform coefficient is quantized to obtain the first quantized coefficient (i.e. Figure 3 The first quantized coefficient is then substituted into the second sub-transformation formula group (i.e., formula (10) to formula (25)) obtained by decomposing the Hadamard transform algorithm, which also corresponds to Figure 3 In the Hadamard transform 2), the second transform coefficient is obtained, and the first transform coefficient is encoded by Golomb coding, Huffman coding, etc. to obtain the corresponding code stream, which is the image pixel encoding data, and the image compression is realized. In the process of image compression, the Hadamard transform is decomposed into a first sub-transformation formula group with a simple form and a second sub-transformation formula group with no form requirements, and the quantization process is set between the first sub-transformation and the second sub-transformation, which is conducive to controlling the maximum reconstruction value error generated by the final decoding to be only related to the coefficients related to the first sub-transformation formula group, rather than all the coefficients of the preset image transformation algorithm, and is conducive to flexibly setting the quantization parameters of the quantization process, thereby improving the flexibility of controlling the image compression rate. Furthermore, when decoding the compressed image, the image pixel encoding data is first decoded into the second transform coefficient (corresponding Figure 3 The code stream is decoded to obtain the transform coefficient 2), and then the second transform coefficient is inversely transformed based on the second inverse transform equation group corresponding to the second sub-transform equation group to obtain the first inverse transform coefficient (corresponding to Figure 3 The inverse transform coefficient 1 in the image compression process is then dequantized based on the inverse quantization operation corresponding to the quantization operation in the image compression process to obtain the second quantization coefficient (corresponding to Figure 3Finally, based on the first inverse transform group corresponding to the first sub-transform group, the second quantized coefficient is inversely transformed to obtain the image pixel decoding data with higher accuracy (corresponding to Figure 3 The image decoded data in the image is obtained by inverse transformation and inverse quantization during the decoding process, which corresponds to the image compression encoding process, ensuring the accuracy of the image pixel decoded data.

[0090] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0091] Based on the same inventive concept, the embodiment of the present application also provides a transform and quantization-based image coding device for implementing the transform and quantization-based image coding method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more transform and quantization-based image coding device embodiments provided below can refer to the above limitations on the transform and quantization-based image coding method, which will not be repeated here.

[0092] In an exemplary embodiment, Figure 4 As shown, a transform and quantization-based image encoding device is provided, comprising: an acquisition module 400, a transform and quantization module 402 and an encoding module 404, wherein:

[0093] The acquisition module 400 is used to acquire a first sub-transformation formula group and a second sub-transformation formula group, where the first sub-transformation formula group and the second sub-transformation formula group are decomposed based on a preset image transformation algorithm.

[0094] The transformation and quantization module 402 is used to obtain image pixel data of the image to be compressed, transform the image pixel data based on the first sub-transformation formula group to obtain a first transformation coefficient; quantize the first transformation coefficient to obtain a first quantization coefficient; transform the first quantization coefficient based on the second sub-transformation formula group to obtain a second transformation coefficient.

[0095] The encoding module 404 is used to encode the second transform coefficient to obtain image pixel encoding data corresponding to the image to be compressed.

[0096] In some embodiments, in quantizing the first transform coefficient to obtain the first quantized coefficient, the transform and quantization module 402 is specifically configured to:

[0097] Acquire multiple groups of different quantization curves; wherein different quantization curves have different low-frequency quantization parameter values ​​or high-frequency quantization parameter values ​​set;

[0098] The quantization curve whose low-frequency quantization parameter value and high-frequency quantization parameter value meet the target quantization requirement is used as the target quantization curve among the multiple groups of quantization curves;

[0099] Based on the target quantization curve, the first transform coefficient is quantized to obtain a first quantization coefficient.

[0100] In one embodiment, in terms of quantizing the first transform coefficient based on the target quantization curve to obtain the first quantization coefficient, the transform and quantization module 402 is further configured to:

[0101] Determining a target low-frequency component parameter value and a target high-frequency component parameter value from a target quantization curve;

[0102] Each low-frequency component value in the first transform coefficient is moved in a preset direction by the number of bits corresponding to the target low-frequency component parameter value, and each high-frequency component value in the first transform coefficient is moved in a preset direction by the number of bits corresponding to the target high-frequency component parameter value to obtain a first quantization coefficient.

[0103] In some embodiments, the first sub-transformation formula in the first sub-transformation formula group is reversible; the second sub-transformation formula in the second sub-transformation formula group is reversible; the image encoding apparatus based on transformation and quantization further includes a decoding module 406, the decoding module 406 is used to:

[0104] Decoding the image coded data to obtain a second transform coefficient;

[0105] Obtaining a second inverse transform equation group corresponding to the second sub-transform equation group; performing an inverse transform on the second transform coefficient based on the second inverse transform equation group to obtain a first inverse transform coefficient;

[0106] Dequantizing the first inverse transform coefficient to obtain a second quantized coefficient;

[0107] A first inverse transform equation group corresponding to the first sub-transform equation group is obtained; and the second quantization coefficient is inversely transformed based on the first inverse transform equation group to obtain image pixel decoding data.

[0108] In some embodiments, in performing inverse quantization on the first inverse transform coefficient to obtain the second quantization coefficient, the decoding module 406 is further configured to:

[0109] The second quantization coefficient is obtained by moving each low-frequency component value in the first inverse transformation coefficient in a preset reverse direction by the number of bits corresponding to the target low-frequency component parameter value, and by moving each high-frequency component value in the first inverse transformation coefficient in a preset reverse direction by the number of bits corresponding to the target high-frequency component parameter value; the preset direction and the preset reverse direction are in opposite directions to each other.

[0110] Each module in the above-mentioned image encoding device based on transformation and quantization can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0111] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store relevant data for transforming and quantizing the image pixel data of the compressed image. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for image encoding based on transformation and quantization is implemented.

[0112] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a transformation and quantization-based image coding method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0113] Those skilled in the art will understand that Figure 5 or Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0115] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0116] In one embodiment, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0118] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0120] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for image coding based on transformation and quantization, characterized in that: The method comprises: Obtaining a first sub-transformation formula group and a second sub-transformation formula group, wherein the first sub-transformation formula group and the second sub-transformation formula group are obtained by decomposing a Hadamard transform algorithm; Acquire image pixel data of the image to be compressed, transform the image pixel data based on the first sub-transformation formula group to obtain a first transform coefficient; quantize the first transform coefficient to obtain a first quantization coefficient; transform the first quantization coefficient based on the second sub-transformation formula group to obtain a second transform coefficient; Encoding the second transform coefficient to obtain image pixel encoding data corresponding to the image to be compressed; in, (1) , Formula (1) is the Hadamard transform algorithm. is the Hadamard transformation matrix, formula (2) to formula (9) are the first sub-transformation formula group, formula (10) to formula (25) are the second sub-transformation formula group, is the image pixel data of the image to be compressed, is the image pixel data after transformation based on the Hadamard transform algorithm; in formula (2) to formula (9) is the transformation value corresponding to the first sub-transformation of Hadamard; in formula (10) to formula (25), is the intermediate variable, is the transformation value corresponding to the second sub-transformation of Hadamard.

2. The method according to claim 1, characterized in that: The step of quantizing the first transform coefficient to obtain a first quantization coefficient includes: Acquire multiple groups of different quantization curves; wherein different quantization curves have different low-frequency quantization parameter values ​​or high-frequency quantization parameter values ​​set; Using, among the multiple groups of different quantization curves, a quantization curve whose low-frequency quantization parameter value and high-frequency quantization parameter value meet the target quantization requirement as a target quantization curve; Based on the target quantization curve, the first transform coefficient is quantized to obtain a first quantization coefficient.

3. The method according to claim 2, characterized in that The step of quantizing the first transform coefficient based on the target quantization curve to obtain a first quantization coefficient includes: Determining a target low-frequency component parameter value and a target high-frequency component parameter value from the target quantization curve; Each low-frequency component value in the first transform coefficient is moved in a preset direction by the number of bits corresponding to the target low-frequency component parameter value, and each high-frequency component value in the first transform coefficient is moved in the preset direction by the number of bits corresponding to the target high-frequency component parameter value to obtain a first quantization coefficient.

4. The method according to claim 3, characterized in that The first sub-transformation in the first sub-transformation group is reversible; the second sub-transformation in the second sub-transformation group is reversible; and the method further comprises: Decoding the image pixel coded data to obtain the second transform coefficient; Acquire a second inverse transform equation group corresponding to the second sub-transform equation group; perform inverse transform on the second transform coefficients based on the second inverse transform equation group to obtain first inverse transform coefficients; Dequantizing the first inverse transform coefficient to obtain a second quantized coefficient; Obtain a first inverse transform formula group corresponding to the first sub-transform formula group; perform inverse transform on the second quantization coefficient based on the first inverse transform formula group to obtain image pixel decoding data.

5. The method according to claim 4, characterized in that The step of inverse quantizing the first inverse transform coefficient to obtain a second quantized coefficient includes: The low-frequency component values ​​in the first inverse transform coefficient are moved in a preset reverse direction by the number of bits corresponding to the target low-frequency component parameter value, and the high-frequency component values ​​in the first inverse transform coefficient are moved in the preset reverse direction by the number of bits corresponding to the target high-frequency component parameter value, to obtain a second quantization coefficient; the preset direction and the preset reverse direction are in opposite directions to each other.

6. An image encoding device based on transformation and quantization, characterized in that: The device comprises: An acquisition module is used to acquire a first sub-transformation formula group and a second sub-transformation formula group, wherein the first sub-transformation formula group and the second sub-transformation formula group are decomposed based on a Hadamard transform algorithm; a transform and quantization module, configured to obtain image pixel data of the image to be compressed, transform the image pixel data based on the first sub-transformation formula group to obtain a first transform coefficient; quantize the first transform coefficient to obtain a first quantization coefficient; and transform the first quantization coefficient based on the second sub-transformation formula group to obtain a second transform coefficient; An encoding module, used for encoding the second transform coefficient to obtain image pixel encoding data corresponding to the image to be compressed; in, (1) , Formula (1) is a Hadamard transform algorithm, H in Formula (1) is a Hadamard transform matrix, Formulas (2) to (9) are the first sub-transformation formula group, Formulas (10) to (25) are the second sub-transformation formula group, is the image pixel data of the image to be compressed, is the image pixel data after transformation based on the Hadamard transform algorithm; in formula (2) to formula (9) is the transformation value corresponding to the first sub-transformation of Hadamard; in formula (10) to formula (25), is the intermediate variable, is the transformation value corresponding to the second sub-transformation of Hadamard.

7. The device according to claim 6, characterized in that In terms of quantizing the first transform coefficient to obtain the first quantized coefficient, the transform and quantization module is specifically used for: Acquire multiple groups of different quantization curves; wherein different quantization curves have different low-frequency quantization parameter values ​​or high-frequency quantization parameter values ​​set; Using, among the multiple groups of different quantization curves, a quantization curve whose low-frequency quantization parameter value and high-frequency quantization parameter value meet the target quantization requirement as a target quantization curve; Based on the target quantization curve, the first transform coefficient is quantized to obtain a first quantization coefficient.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.