Encoding method, decoding method and related apparatus

WO2026158048A1PCT designated stage Publication Date: 2026-07-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2026-01-09
Publication Date
2026-07-30

Smart Images

  • Figure CN2026071641_30072026_PF_FP_ABST
    Figure CN2026071641_30072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are an encoding method, a decoding method and a related apparatus. The encoding method comprises: performing wavelet transform on data to be encoded of an original image, so as to obtain a low-frequency wavelet coefficient of a low-frequency sub-band, wherein the low-frequency wavelet coefficient falls within a first data range, and the bit width of the low-frequency wavelet coefficient is a first bit width; performing wavelet transform post-processing on the low-frequency wavelet coefficient, so as to obtain a post-processed wavelet coefficient of the low-frequency sub-band, wherein the post-processed wavelet coefficient falls within a second data range, the bit width of the post-processed wavelet coefficient is a second bit width, the second data range is different from the first data range, and the second bit width is smaller than the first bit width; on the basis of the post-processed wavelet coefficient, acquiring encoded data of the low-frequency sub-band; and on the basis of the encoded data of the low-frequency sub-band, acquiring an image bitstream of the original image. Therefore, the encoding complexity is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding methods, decoding methods and related devices

[0001] This application claims priority to Chinese Patent Application No. 202510121218.0, filed on January 24, 2025, entitled "Encoding Method, Decoding Method and Related Apparatus", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of image processing, and in particular to an encoding method, a decoding method, and related apparatus. Background Technology

[0003] Digital video capabilities can be applied to a wide variety of digital video devices, including digital television, digital live broadcasting systems, wireless broadcasting systems, personal digital assistants (PDAs), laptops or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio phones (i.e., "smartphones"), video conferencing devices, video streaming devices, and the like. Digital video devices implement video compression technologies, such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), the H.265 / HEVC video coding standard, and extensions to such standards. By implementing such video compression technologies, digital video devices can transmit, receive, encode, decode, and / or store digital video information more efficiently.

[0004] Current encoding and decoding technologies suffer from high complexity. Summary of the Invention

[0005] This application provides an encoding method, a decoding method, and related apparatus, which can reduce the complexity of encoding and decoding.

[0006] Firstly, this application provides an encoding method, comprising: performing wavelet transform on the data to be encoded of the original image to obtain low-frequency wavelet coefficients of a low-frequency sub-band, wherein the low-frequency wavelet coefficients are within a first data range and the bit width of the low-frequency wavelet coefficients is the first bit width; performing wavelet transform post-processing on the low-frequency wavelet coefficients to obtain post-processed wavelet coefficients of the low-frequency sub-band, wherein the post-processed wavelet coefficients are within a second data range and the bit width of the post-processed wavelet coefficients is the second bit width, the second data range is different from the first data range, and the second bit width is smaller than the first bit width; obtaining low-frequency sub-band encoded data based on the post-processed wavelet coefficients; and obtaining the image bitstream of the original image based on the low-frequency sub-band encoded data. Thus, by reducing the bit width of the wavelet coefficients of the low-frequency sub-band, this application enables encoding or other processing to be performed based on the wavelet coefficients with reduced bit width during the encoding process, thereby reducing the processing complexity on the encoding side and improving the encoding speed.

[0007] In one possible implementation, the wavelet transform post-processing includes truncation and offset processing. The truncation process involves truncating low-frequency wavelet coefficients to obtain truncated wavelet coefficients for the low-frequency subband. These truncated wavelet coefficients are within a third data range, and their bit width is equal to the first data range. The offset processing involves adding a first offset to the truncated wavelet coefficients to obtain the post-processed wavelet coefficients. Thus, through truncation and offset processing, the data range of the wavelet coefficients can be adjusted to reduce their bit width.

[0008] In one possible implementation, the wavelet transform post-processing includes offset processing and truncation processing. The offset processing involves adding a second offset to the low-frequency wavelet coefficients to obtain offset wavelet coefficients for the low-frequency sub-band. These offset wavelet coefficients are within a fourth data range, and their bit width is greater than or equal to the second bit width. The truncation processing involves truncating the offset wavelet coefficients to obtain post-processed wavelet coefficients. The second data range is contained within the fourth data range. Thus, through truncation and offset processing, the data range of the wavelet coefficients can be adjusted to reduce their bit width.

[0009] In one possible implementation, the minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded.

[0010] In one possible implementation, the first bit is 14 bits wide and the second bit is 13 bits wide.

[0011] In one possible implementation, the method further includes: obtaining target wavelet coefficients for the low-frequency sub-band based on post-processed wavelet coefficients; wherein the bit width of the target wavelet coefficients for the low-frequency sub-band is a third bit width, which is equal to the bit width of the original image; the target wavelet coefficients are used to display the image corresponding to the low-frequency sub-band at the encoding end. Thus, by performing pre-processing on the post-processed wavelet coefficients, the image of the low-frequency sub-band corresponding to the processed target wavelet coefficients can meet the display requirements.

[0012] In one possible implementation, the target wavelet coefficients of the low-frequency sub-band are obtained based on the post-processed wavelet coefficients of the low-frequency sub-band. This includes: subtracting a set offset from the post-processed wavelet coefficients and then shifting them to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; and the target wavelet coefficients of the low-frequency sub-band are obtained by truncating the right-shifted wavelet coefficients. By adjusting the precision through right shifting and truncating the right-shifted wavelet coefficients, the bit width can be made to meet the display requirements.

[0013] In one possible implementation, before performing wavelet transform on the data to be encoded of the original image, the method further includes: shifting the image data of the original image to the left to obtain the data to be encoded of the original image.

[0014] Secondly, this application provides a decoding method, comprising: obtaining post-processed wavelet coefficients of the low-frequency sub-band based on the low-frequency sub-band encoded data in the image bitstream of the original image; wherein the post-processed wavelet coefficients are within a second data range, and the bit width of the post-processed wavelet coefficients is a second bit width; performing wavelet transform preprocessing on the post-processed wavelet coefficients to obtain the low-frequency wavelet coefficients of the low-frequency sub-band; the low-frequency wavelet coefficients are within a first data range, and the bit width of the low-frequency wavelet coefficients is a first bit width; the second data range is different from the first data range, and the second bit width is smaller than the first bit width; and obtaining the reconstructed image of the original image based on the low-frequency wavelet coefficients. Thus, by reducing the bit width of the wavelet coefficients of the low-frequency sub-band, this application enables decoding or other processing to be performed based on the wavelet coefficients with reduced bit width during the decoding process, thereby reducing the processing complexity on the decoding side and improving the decoding speed.

[0015] In one possible implementation, the wavelet transform preprocessing includes an offset process; wherein the offset process includes subtracting a predetermined offset from the wavelet coefficients to obtain low-frequency wavelet coefficients. Thus, by subtracting the offset, the bit width of the wavelet coefficients can be transformed to a first bit width.

[0016] In one possible implementation, the minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded in the original image.

[0017] In one possible implementation, the first bit is 14 bits wide and the second bit is 13 bits wide.

[0018] In one possible implementation, the method further includes: obtaining target wavelet coefficients for the low-frequency sub-band based on post-processed wavelet coefficients; wherein the bit width of the target wavelet coefficients for the low-frequency sub-band is a third bit width, which is equal to the bit width of the original image; the target wavelet coefficients are used to display the image corresponding to the low-frequency sub-band at the decoding end.

[0019] In one possible implementation, the target wavelet coefficients of the low-frequency sub-band are obtained based on the post-processed wavelet coefficients of the low-frequency sub-band, including: subtracting a set offset from the post-processed wavelet coefficients and then shifting them to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; and the target wavelet coefficients of the low-frequency sub-band are obtained by truncating the right-shifted wavelet coefficients of the low-frequency sub-band.

[0020] Thirdly, this application provides an encoder, comprising: a wavelet transform unit for performing wavelet transform on the data to be encoded of the original image to obtain low-frequency wavelet coefficients of a low-frequency sub-band, wherein the low-frequency wavelet coefficients are within a first data range and the bit width of the low-frequency wavelet coefficients is the first bit width; a wavelet transform post-processing unit for performing wavelet transform post-processing on the low-frequency wavelet coefficients to obtain post-processed wavelet coefficients of the low-frequency sub-band, wherein the post-processed wavelet coefficients are within a second data range and the bit width of the post-processed wavelet coefficients is the second bit width, the second data range is different from the first data range, and the second bit width is smaller than the first bit width; a low-frequency sub-band processing unit for obtaining low-frequency sub-band encoded data based on the post-processed wavelet coefficients; and a low-frequency sub-band entropy coding unit for obtaining the image bitstream of the original image based on the low-frequency sub-band encoded data.

[0021] In one possible implementation, the wavelet transform post-processing includes truncation and offset processing; wherein, the truncation process includes truncating the low-frequency wavelet coefficients to obtain truncated wavelet coefficients of the low-frequency subband, wherein the truncated wavelet coefficients are within a third data range, the bit width of the truncated wavelet coefficients is the first bit width, and the third data range is within the first data range; the offset processing includes adding a first offset to the truncated wavelet coefficients to obtain the post-processed wavelet coefficients.

[0022] In one possible implementation, the wavelet transform post-processing includes offset processing and truncation processing. The offset processing includes adding a second offset to the low-frequency wavelet coefficients to obtain the offset wavelet coefficients of the low-frequency subband. The offset wavelet coefficients are within the fourth data range, and the bit width of the offset wavelet coefficients is greater than or equal to the second bit width. The truncation processing includes truncating the offset wavelet coefficients to obtain the post-processed wavelet coefficients. The second data range is included in the fourth data range.

[0023] In one possible implementation, the minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded.

[0024] In one possible implementation, the first bit is 14 bits wide and the second bit is 13 bits wide.

[0025] In one possible implementation, the encoder further includes: obtaining target wavelet coefficients for the low-frequency sub-band based on post-processed wavelet coefficients; wherein the bit width of the target wavelet coefficients for the low-frequency sub-band is a third bit width, which is equal to the bit width of the original image; the target wavelet coefficients are used to display the image corresponding to the low-frequency sub-band at the encoding end.

[0026] In one possible implementation, the target wavelet coefficients of the low-frequency sub-band are obtained based on the post-processed wavelet coefficients of the low-frequency sub-band, including: subtracting a set offset from the post-processed wavelet coefficients and then shifting them to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; and the target wavelet coefficients of the low-frequency sub-band are obtained by truncating the right-shifted wavelet coefficients of the low-frequency sub-band.

[0027] In one possible implementation, before performing wavelet transform on the data to be encoded of the original image, the encoder further includes: shifting the image data of the original image to the left to obtain the data to be encoded of the original image.

[0028] Fourthly, this application provides a decoder, comprising: a low-frequency subband entropy decoding unit, used to obtain post-processing wavelet coefficients of the low-frequency subband based on low-frequency subband encoded data in the image bitstream of the original image; wherein the post-processing wavelet coefficients are within a second data range, and the bit width of the post-processing wavelet coefficients is a second bit width; a wavelet transform preprocessing unit, used to perform wavelet transform preprocessing on the post-processing wavelet coefficients to obtain low-frequency wavelet coefficients of the low-frequency subband; the low-frequency wavelet coefficients are within a first data range, and the bit width of the low-frequency wavelet coefficients is a first bit width; the second data range is different from the first data range, and the second bit width is smaller than the first bit width; and a wavelet transform unit, used to obtain a reconstructed image of the original image based on the low-frequency wavelet coefficients.

[0029] In one possible implementation, the wavelet transform preprocessing includes offset processing; wherein the offset processing includes postprocessing the wavelet coefficients by subtracting a set offset to obtain low-frequency wavelet coefficients.

[0030] In one possible implementation, the minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded in the original image.

[0031] In one possible implementation, the first bit is 14 bits wide and the second bit is 13 bits wide.

[0032] In one possible implementation, a preprocessing unit is configured to: obtain target wavelet coefficients of the low-frequency sub-band based on the post-processed wavelet coefficients; wherein the bit width of the target wavelet coefficients of the low-frequency sub-band is a third bit width, which is equal to the bit width of the original image; the target wavelet coefficients are used by the decoding end to display the image corresponding to the low-frequency sub-band.

[0033] In one possible implementation, the display preprocessing unit is specifically used to: subtract a set offset from the post-processed wavelet coefficients and then shift them to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; and to obtain the target wavelet coefficients of the low-frequency sub-band by truncating the right-shifted wavelet coefficients of the low-frequency sub-band.

[0034] Fifthly, this application provides an encoder, including: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, which, when executed by the processor, cause the encoder to perform the method in the first aspect or any possible implementation thereof.

[0035] In a sixth aspect, this application provides a decoder, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, which, when executed by the processor, cause the decoder to perform the method in the second aspect or any possible implementation thereof.

[0036] In a seventh aspect, this application provides a chip including one or more interface circuits and one or more processors; the one or more processors receive or transmit data through the one or more interface circuits, and when the one or more processors execute computer instructions, cause the electronic device to perform the method in the first aspect or any possible implementation of the first aspect.

[0037] Eighthly, this application provides a chip including one or more interface circuits and one or more processors; the one or more processors receive or transmit data through the one or more interface circuits, and when the one or more processors execute computer instructions, cause the electronic device to perform the method in the second aspect or any possible implementation of the second aspect.

[0038] Ninthly, this application provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the method of the first aspect or any possible implementation thereof.

[0039] In a tenth aspect, this application provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the method of the second aspect or any possible implementation thereof.

[0040] In one aspect, this application provides a computer program product, which includes computer instructions that, when executed by a computer or processor, cause the computer or processor to perform the method in the first aspect or any possible implementation thereof.

[0041] In a twelfth aspect, this application provides a computer program product including computer instructions that, when executed by a computer or processor, cause the computer or processor to perform the method in the second aspect or any possible implementation thereof.

[0042] In a thirteenth aspect, this application provides a computer-readable storage medium that stores a bitstream from the third aspect or any possible implementation thereof.

[0043] In a fourteenth aspect, this application provides an encoder including processing circuitry that can be used to perform the methods in the first aspect or any possible implementation thereof.

[0044] In a fifteenth aspect, this application provides a decoder including processing circuitry that can be used to perform the methods in the second aspect or any possible implementation thereof.

[0045] In a sixteenth aspect, this application provides a bitstream generated according to the third aspect and any implementation thereof.

[0046] In this embodiment, the electronic device, computer-readable storage medium, computer program product, chip, or codec are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding methods provided above. Attached Figure Description

[0047] Figure 1A is a schematic block diagram of an exemplary video encoding and decoding system;

[0048] Figure 1B is a schematic block diagram of an exemplary video decoding system;

[0049] Figure 2 is a schematic block diagram of an encoder as an example;

[0050] Figure 3 is a schematic block diagram of an exemplary decoder;

[0051] Figure 4 is a schematic diagram of the structure of an exemplary video decoding device;

[0052] Figure 5 is a schematic diagram of the structure of an exemplary device;

[0053] Figure 6 is a schematic block diagram of an encoder based on wavelet transform, which is an example shown.

[0054] Figure 7 is a schematic block diagram of an exemplary wavelet transform-based decoder;

[0055] Figure 8 is a schematic block diagram of an encoder as an example;

[0056] Figure 9A is an exemplary schematic diagram of subgraph partitioning;

[0057] Figure 9B is an exemplary schematic diagram of subgraph partitioning;

[0058] Figure 10 is an exemplary schematic diagram of wavelet transform;

[0059] Figure 11 is a schematic block diagram of an exemplary decoder;

[0060] Figure 12 is a schematic block diagram of an encoder as an example;

[0061] Figure 13A is a schematic diagram of the structure of an image bitstream as an example;

[0062] Figure 13B is a schematic diagram of the structure of an image bitstream as an example;

[0063] Figure 14A is a schematic diagram of the structure of an image bitstream as an example;

[0064] Figure 14B is a schematic diagram of the structure of an image bitstream as an example;

[0065] Figure 15 is a schematic diagram of the structure of an image bitstream as an example;

[0066] Figures 16A to 16C are schematic diagrams illustrating the structure of an image bitstream as an example;

[0067] Figures 17A and 17B are schematic diagrams of the structure of an image bitstream as an example;

[0068] Figure 18 is a schematic block diagram of an exemplary decoder;

[0069] Figure 19 is a schematic block diagram of an exemplary decoder;

[0070] Figure 20 is a schematic diagram illustrating the application of the wavelet transform method to the coding side;

[0071] Figure 21 is a schematic diagram illustrating the application of the wavelet transform method to the decoding side;

[0072] Figure 22 is a schematic diagram of the first wavelet transform result as an example;

[0073] Figure 23 is a schematic diagram of the second wavelet transform result as an example;

[0074] Figure 24 is an exemplary schematic diagram of wavelet transform;

[0075] Figure 25 is a schematic diagram of the lifting form of the 5 / 3 integer wavelet transform, as exemplarily shown;

[0076] Figure 26 is an exemplary schematic diagram of the first wavelet transform;

[0077] Figure 27 is an exemplary schematic diagram of the inverse wavelet transform;

[0078] Figure 28 is a schematic diagram of the lifting form of the 5 / 3 integer wavelet inverse transform, as exemplarily shown.

[0079] Figure 29 is a flowchart illustrating an exemplary encoding method;

[0080] Figure 30 is an exemplary diagram showing the variation of data range and bit width;

[0081] Figure 31 is an exemplary schematic diagram of wavelet transform post-processing;

[0082] Figure 32 is an exemplary schematic diagram of wavelet transform post-processing;

[0083] Figure 33 is an exemplary schematic diagram of the pre-processing flow for display;

[0084] Figure 34 is a flowchart illustrating an exemplary decoding method;

[0085] Figure 35 is an exemplary flowchart of wavelet transform preprocessing.

[0086] Figure 36 is a schematic diagram of the structure of an exemplary device. Detailed Implementation

[0087] The embodiments of this application are described below with reference to the accompanying drawings. In the following description, reference is made to the accompanying drawings, which form part of this application and illustrate specific aspects of the embodiments of this application or to which specific aspects of the embodiments of this application may be used. It should be understood that the embodiments of this application may be used in other aspects and may include structural or logical variations not depicted in the drawings. Therefore, the following detailed description should not be construed in a limiting sense, and the scope of this application is defined by the appended claims. For example, it should be understood that the disclosure of the described methods is equally applicable to corresponding devices or systems for performing the methods, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units, such as functional units, to perform the described one or more method steps (e.g., one unit performs one or more steps, or multiple units, each performing one or more of multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, if a specific apparatus is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of one or more units (e.g., a step to perform the functionality of one or more units, or multiple steps, each of which performs the functionality of one or more units among a plurality of units), even if such one or more steps are not explicitly described or illustrated in the accompanying drawings. Furthermore, it should be understood that, unless otherwise expressly stated, features of the various exemplary embodiments and / or aspects described herein can be combined with each other.

[0088] In the embodiments of this application, the modules / components shown in the framework diagram (or structural diagram or system diagram) are merely examples of this application. The actual framework (or structure or system) may include more or fewer modules / components than those shown in the diagram, or may have different component configurations. Furthermore, the various components / modules shown in the diagrams may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0089] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0090] The following is a brief introduction to some concepts that may be involved in the embodiments of this application. These concepts are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0091] The residual is the difference between the reconstructed value and the predicted value of a sample or data element.

[0092] A residual block is an M×N residual matrix composed of the residuals corresponding to the coded blocks.

[0093] Dequantization is the process of scaling the quantized residual to obtain the reconstructed residual value.

[0094] A partition divides a set into subsets. Each element in the set belongs to one and only one subset.

[0095] Partition type: The way the subsets obtained from the partition are organized.

[0096] A decoded picture is an image reconstructed by the decoder based on the bitstream.

[0097] Prediction is the specific implementation of the prediction process.

[0098] The prediction process uses previously decoded samples to obtain the predicted value for the current sample.

[0099] Syntax element: The result of parsing data units in a bitstream.

[0100] A bitstream is a binary data stream that encodes all or part of an image sample.

[0101] Video coding generally refers to the processing of a sequence of images that form a video or video sequence. In the field of video coding, the terms "picture," "frame," or "image" can be used synonymously. Video coding is performed on the source side and typically involves processing (e.g., by compression) the raw video images to reduce the amount of data required to represent them, thus enabling more efficient storage and / or transmission. Video decoding is performed on the destination side and typically involves inverse processing relative to the encoder to reconstruct the video images. The combination of encoding and decoding is also known as encoding and decoding.

[0102] A video sequence consists of a series of pictures, which are further divided into slices, and slices into blocks. Video coding is performed on a block-by-block basis. In some newer video coding standards, the concept of a block has been further expanded. For example, the H.264 standard uses macroblocks (MBs), which can be further divided into multiple prediction blocks (partitions) for predictive coding. The High Efficiency Video Coding (HEVC) standard uses basic concepts such as coding units (CUs), prediction units (PUs), and transform units (TUs) to functionally divide various block units, and employs a novel tree-based structure for description. For instance, a CU can be divided into smaller CUs using a quadtree, and these smaller CUs can be further divided, forming a quadtree structure. The CU is the basic unit for partitioning and encoding the image. Similar tree structures exist for PUs and TUs. A PU corresponds to a prediction block and is the basic unit for predictive coding. CUs are further divided into multiple PUs according to partitioning patterns. TU can correspond to a transform block, which is the basic unit for transforming the prediction residual. However, whether it is CU, PU or TU, they all essentially belong to the concept of a block (or image block).

[0103] For example, in HEVC, the CTU is split into multiple CUs using a quadtree structure represented as a coding tree. At the CU level, a decision is made on whether to use inter-picture (temporal) or intra-picture (spatial) prediction to encode picture regions. Each CU can be further split into one, two, or four PUs based on the PU splitting type. The same prediction process is applied within a PU, and relevant information is transmitted to the decoder based on the PU. After obtaining residual blocks by applying the prediction process based on the PU splitting type, the CU can be segmented into transform units (TUs) according to other quadtree structures similar to the coding tree used for CUs. In the latest developments in video compression technology, quadtree and binary tree (QTBT) frame segmentation is used to divide coding blocks. In the QTBT block structure, CUs can be square or rectangular in shape.

[0104] In this paper, for ease of description and understanding, the image block to be processed in the current image is referred to as the current block. For example, in encoding, it refers to the block currently being encoded; in decoding, it refers to the block currently being decoded. The decoded image block in the reference image used to predict the current block is called the reference block. That is, the reference block is the block that provides a reference signal for the current block, where the reference signal represents the pixel value within the image block. The block in the reference image that provides a prediction signal for the current block is called the prediction block, where the prediction signal represents the pixel value, sampled value, or sampled signal within the prediction block. For example, after traversing multiple reference blocks, an optimal reference block is found. This optimal reference block will provide prediction for the current block; this block is called the prediction block.

[0105] In lossless video coding, the original video image can be reconstructed, meaning the reconstructed video image has the same quality as the original (assuming no transmission loss or other data loss during storage or transmission). In lossy video coding, further compression is performed, for example, through quantization, to reduce the amount of data required to represent the video image. However, the decoder cannot fully reconstruct the video image, meaning the quality of the reconstructed video image is lower or worse than the original video image.

[0106] The system architecture used in the embodiments of this application is described below. Referring to FIG1A, FIG1A provides an exemplary schematic block diagram of a video encoding and decoding system 10 used in the embodiments of this application. As shown in FIG1A, the video encoding and decoding system 10 may include a source device 12 and a destination device 14. The source device 12 generates encoded video data, and therefore, the source device 12 may be referred to as a video encoding device. The destination device 14 can decode the encoded video data generated by the source device 12, and therefore, the destination device 14 may be referred to as a video decoding device. Various embodiments of the source device 12, the destination device 14, or both may include one or more processors and memory coupled to the one or more processors. The memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other media that can be used to store desired program code in the form of computer-accessible instructions or data structures. The source device 12 and the destination device 14 may include a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handsets, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, wireless communication devices, or the like.

[0107] Source device 12 and destination device 14 can communicate via link 13, through which destination device 14 can receive encoded video data from source device 12. Link 13 may include one or more media or devices capable of transmitting encoded video data from source device 12 to destination device 14. In one example, link 13 may include one or more communication media enabling source device 12 to transmit encoded video data to destination device 14 in real time. In this example, source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to destination device 14. The one or more communication media may include wireless and / or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, wide area network, or global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices facilitating communication from source device 12 to destination device 14.

[0108] The source device 12 includes an encoder 20. Optionally, the source device 12 may also include an image source 16, an image preprocessor 18, and a communication interface 22. In specific implementations, the encoder 20, image source 16, image preprocessor 18, and communication interface 22 may be hardware components or software programs within the source device 12. These are described below:

[0109] Image source 16 may include or be any type of image capture device for, for example, capturing real-world images, and / or any type of image or commentary (for screen content encoding, some text on the screen is also considered as an image to be encoded or part of an image) generation device, such as a computer graphics processor for generating computer-animated images, or any type of device for acquiring and / or providing real-world images, computer-animated images (e.g., screen content, virtual reality (VR) images), and / or any combination thereof (e.g., augmented reality (AR) images). Image source 16 may be a camera for capturing images or a memory for storing images. Image source 16 may also include any type of (internal or external) interface for storing previously captured or generated images and / or acquiring or receiving images. When image source 16 is a camera, image source 16 may be, for example, a local or integrated camera integrated into a source device; when image source 16 is a memory, image source 16 may be a local or integrated memory integrated into a source device. When the image source 16 includes an interface, the interface may be, for example, an external interface for receiving images from an external video source, such as an external image capture device, like a camera, external storage, or an external image generation device, such as an external computer graphics processor, computer, or server. The interface can be any type of interface according to any proprietary or standardized interface protocol, such as a wired or wireless interface, or an optical interface.

[0110] An image can be viewed as a two-dimensional array or matrix of pixels. Pixels in the array are also called sampling points. The number of sampling points in the array or image along the horizontal and vertical directions (or axes) defines the image's size and / or resolution. To represent color, three color components are typically used; that is, an image can be represented as or contain three sampling arrays. For example, in RBG format or color space, an image includes corresponding red, green, and blue sampling arrays. However, in video coding, each pixel is typically represented in a luma / chroma format or color space. For example, for a YUV format image, this includes a luma component indicated by Y (sometimes also indicated by L) and two chroma components indicated by U and V. The luma component Y represents the brightness or grayscale level intensity (e.g., both are the same in a grayscale image), while the two chroma components U and V represent chroma or color information components. Accordingly, a YUV format image includes a luma sampling array of luma sample values ​​(Y) and two chroma sampling arrays of chroma values ​​(U and V). An RGB format image can be converted or transformed to YUV format, and vice versa; this process is also called color transformation or conversion. If the image is black and white, it may only include a luminance sampling array. In this embodiment, the image transmitted from image source 16 to image processor can also be referred to as raw image data 17.

[0111] Image preprocessor 18 is configured to receive raw image data 17 and perform preprocessing on the raw image data 17 to obtain a preprocessed image 19 or preprocessed image data 19. For example, the preprocessing performed by image preprocessor 18 may include retouching, color format conversion (e.g., from RGB format to YUV format), color correction, or noise reduction.

[0112] Encoder 20 (or video encoder 20) is used to receive preprocessed image data 19 and process the preprocessed image data 19 using a relevant prediction mode (such as the prediction mode in the various embodiments herein) to provide encoded image data 21. In some embodiments, encoder 20 may be used to perform the various embodiments described below to implement the encoding method described herein on the encoding side.

[0113] Communication interface 22 can be used to receive encoded image data 21 and transmit the encoded image data 21 via link 13 to destination device 14 or any other device (such as a memory) for storage or direct reconstruction. The other device can be any device used for decoding or storage. Communication interface 22 can, for example, be used to encapsulate the encoded image data 21 into a suitable format, such as data packets, for transmission over link 13.

[0114] Destination device 14 includes decoder 30. Optionally, destination device 14 may also include communication interface 28, image post-processor 32, and display device 34. These are described below:

[0115] Communication interface 28 can be used to receive encoded image data 21 from source device 12 or any other source, such as a storage device, for example, an encoded image data storage device. Communication interface 28 can be used to transmit or receive encoded image data 21 via link 13 between source device 12 and destination device 14 or via any type of network, such as a wired or wireless connection, any type of network, such as a wired or wireless network or any combination thereof, or any type of private and public network, or any combination thereof. Communication interface 28 can be used, for example, to decapsulate data packets transmitted by communication interface 22 to obtain encoded image data 21.

[0116] Both communication interface 28 and communication interface 22 can be configured as unidirectional or bidirectional communication interfaces, and can be used, for example, to send and receive messages to establish connections, acknowledge and exchange any other information related to the communication link and / or data transmission, such as encoded image data transmission.

[0117] Decoder 30 (or video decoder 30) is used to receive encoded image data 21 and provide decoded image data 31 or decoded image 31 (the structural details of decoder 30 will be further described below based on FIG3, FIG4 or FIG5). In some embodiments, decoder 30 can be used to perform the various embodiments described below to implement the decoding method described in this application on the decoding side.

[0118] Image post-processor 32 is used to perform post-processing on decoded image data 31 (also referred to as reconstructed image data) to obtain post-processed image data 33. The post-processing performed by image post-processor 32 may include: color format conversion (e.g., from YUV format to RGB format), color correction, retouching or resampling, or any other processing, and may also be used to transmit the post-processed image data 33 to display device 34.

[0119] Display device 34 is used to receive post-processed image data 33 to display an image to, for example, a user or viewer. Display device 34 can be or may include any class of displays for presenting reconstructed images, such as integrated or external displays or monitors. For example, displays may include liquid crystal displays (LCDs), organic light emitting diode (OLED) displays, plasma displays, projectors, micro-LED displays, liquid crystal on silicon (LCoS), digital light processors (DLP), or any other class of displays.

[0120] Although Figure 1A illustrates source device 12 and destination device 14 as separate devices, device embodiments may also include the functionality of both source device 12 and destination device 14, or both; that is, the functionality of source device 12 or its corresponding features and the functionality of destination device 14 or its corresponding features. In such embodiments, the same hardware and / or software, or separate hardware and / or software, or any combination thereof, may be used to implement the functionality of source device 12 or its corresponding features and the functionality of destination device 14 or its corresponding features.

[0121] Both encoder 20 and decoder 30 can be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the technology is implemented in part in software, the device can store the software instructions in a suitable non-transitory computer-readable storage medium, and one or more processors can be used to execute the instructions in hardware to perform the technology of this disclosure. Any of the foregoing (including hardware, software, combinations of hardware and software, etc.) can be considered as one or more processors.

[0122] In some cases, the video encoding and decoding system 10 shown in Figure 1A is merely an example, and the technology of this application can be applied to video encoding setups (e.g., video encoding or video decoding) that do not necessarily involve any data communication between the encoding and decoding devices. In other instances, data may be retrieved from local storage, streamed over a network, etc. The video encoding device may encode the data and store it in storage, and / or the video decoding device may retrieve the data from storage and decode it. In some instances, encoding and decoding are performed by devices that do not communicate with each other but only encode data to storage and / or retrieve data from storage and decode the data.

[0123] Referring to FIG1B, FIG1B is an illustrative diagram of an example of a video decoding system 40 including the encoder 20 of FIG2 and / or the decoder 30 of FIG3 according to an exemplary embodiment. The video decoding system 40 can implement various combinations of technologies of the embodiments of this application. In the illustrated embodiment, the video decoding system 40 may include an imaging device 41, an encoder 20, a decoder 30 (and / or a video encoder / decoder implemented by logic circuitry of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and a display device 45.

[0124] As shown in Figure 1B, the imaging device 41, antenna 42, processing unit 46, logic circuit, encoder 20, decoder 30, processor 43, memory 44, and display device 45 are capable of communicating with each other. As discussed, although encoder 20 and decoder 30 are used as examples to describe the video decoding system 40, in different instances, the video decoding system 40 may contain only encoder 20 or only decoder 30.

[0125] In some instances, antenna 42 can be used to transmit or receive encoded video data streams. Additionally, in some instances, display device 45 can be used to present video data. In some instances, logic circuitry can be implemented using processing unit 46. Processing unit 46 can include an ASIC, graphics processor, general-purpose processor, etc. Video decoding system 40 can also include an optional processor 43, which can similarly include an ASIC, graphics processor, general-purpose processor, etc. In some instances, logic circuitry can be implemented in hardware, such as dedicated video encoding hardware, while processor 43 can be implemented in general-purpose software, operating system, etc. Furthermore, memory 44 can be any type of memory, such as volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.). In a non-limiting instance, memory 44 can be implemented using cache memory. In some instances, logic circuitry can access memory 44 (e.g., for implementing an image buffer). In other instances, the logic circuitry and / or processing unit 46 may include memory (e.g., cache, etc.) for implementing image buffers, etc.

[0126] In some instances, the encoder 20 implemented via logic circuitry may include (e.g., implemented via processing unit 46 or memory 44) an image buffer and (e.g., implemented via processing unit 46) a graphics processing unit. The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the encoder 20 implemented via logic circuitry to implement various modules discussed with reference to Figure 2 and / or any other encoder system or subsystem described herein. The logic circuitry may be used to perform various operations discussed herein.

[0127] In some instances, decoder 30 may be implemented via logic circuitry in a similar manner to implement the various modules discussed in reference to decoder 30 of Figure 3 and / or any other decoder system or subsystem described herein. In some instances, the logic circuitry-implemented decoder 30 may include an image buffer (implemented via processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented via processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include decoder 30 implemented via logic circuitry to implement the various modules discussed in reference to Figure 3 and / or any other decoder system or subsystem described herein.

[0128] In some instances, antenna 42 can be used to receive an encoded stream of video data. As discussed herein, the encoded stream may contain data related to encoded video frames, indicators, index values, mode selection data, etc., such as data related to code segmentation (e.g., transform coefficients or quantized transform coefficients, optional indicators, and / or data defining code segmentation). Video decoding system 40 may also include a decoder 30 coupled to antenna 42 for decoding the encoded stream. Display device 45 is used to display the video frames.

[0129] It should be understood that, referring to the examples described for encoder 20 in the embodiments of this application, decoder 30 can be used to perform the reverse process. Regarding signaling syntax elements, decoder 30 can be used to receive and parse such syntax elements, and accordingly decode the associated video data. In some examples, encoder 20 can entropy-encode syntax elements into an encoded video stream. In such instances, decoder 30 can parse such syntax elements and accordingly decode the associated video data.

[0130] It should be noted that the encoding and decoding method described in the embodiments of this application is mainly used for the encoding and decoding process of video or images. This process exists in both the encoder 20 and the decoder 30. The encoder 20 and decoder 30 in the embodiments of this application can be, for example, the encoder / decoder corresponding to video standard protocols such as H.263, H.264, HEVV, MPEG-2, MPEG-4, VP8, VP9, ​​or next-generation video standard protocols (such as H.266).

[0131] Referring to Figure 2, which is a schematic / conceptual block diagram of an exemplary example of encoder 20, encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy coding unit 270. Prediction processing unit 260 may include inter-frame prediction unit 244, intra-frame prediction unit 254, and mode selection unit 262. Inter-frame prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). Encoder 20 shown in Figure 2 may also be referred to as a hybrid video encoder or a video encoder based on a hybrid video codec.

[0132] Referring to Figure 3, which is a schematic / conceptual block diagram of an example of a decoder 30, the decoder 30 is used to receive, for example, encoded image data (e.g., encoded bitstream) 21 encoded by encoder 20 to obtain a decoded image 331. During the decoding process, the decoder 30 receives video data from encoder 20, such as encoded video bitstreams representing image blocks of encoded video stripes and associated syntax elements.

[0133] In the example of Figure 3, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., a summer 314), a buffer 316, a loop filter 320, a decoded image buffer 330, and a prediction processing unit 360. Prediction processing unit 360 may include an inter-frame prediction unit 344, an intra-frame prediction unit 354, and a mode selection unit 362. In some instances, decoder 30 may perform a decoding process that is generally the inverse of the encoding process described in video encoder 20 of Figure 2.

[0134] Referring to Figure 4, Figure 4 is a structural schematic diagram of a video decoding device 400 (e.g., a video encoding device 400 or a video decoding device 400) provided in an embodiment of this application. The video decoding device 400 is adapted to implement the embodiments described herein. In one embodiment, the video decoding device 400 may be a video decoder (e.g., decoder 30 of Figure 1A) or a video encoder (e.g., encoder 20 of Figure 1A). In another embodiment, the video decoding device 400 may be one or more components of the decoder 30 of Figure 1A or the encoder 20 of Figure 1A.

[0135] The video decoding device 400 includes: an input port 410 and a receiving unit (Rx) 420 for receiving data; a processor, logic unit, or central processing unit (CPU) 430 for processing data; a transmitter unit (Tx) 440 and an output port 450 for transmitting data; and a memory 460 for storing data. The video decoding device 400 may also include photoelectric conversion components and electro-optical (EO) components coupled to the input port 410, receiver unit 420, transmitter unit 440, and output port 450 for the input or output of optical or electrical signals.

[0136] Processor 430 is implemented in both hardware and software. Processor 430 can be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. Processor 430 communicates with ingress port 410, receiver unit 420, transmitter unit 440, egress port 450, and memory 460. Processor 430 includes either an encoding module 470 or a decoding module 470. The encoding / decoding module 470 implements the embodiments disclosed herein to implement the encoding or decoding methods provided in the embodiments of this application. For example, the encoding / decoding module 470 implements, processes, or provides various encoding operations. Therefore, the encoding / decoding module 470 provides a substantial improvement to the functionality of the video decoding device 400 and affects the transitions of the video decoding device 400 to different states. Alternatively, the encoding / decoding module 470 can be implemented with instructions stored in memory 460 and executed by processor 430.

[0137] Memory 460 includes one or more disks, tape drives, and solid-state drives, which can be used as overflow data storage devices to store programs while they are selectively executed, and to store instructions and data read during program execution. Memory 460 can be volatile and / or non-volatile, and can be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random access memory (SRAM).

[0138] Referring to FIG5, FIG5 is a simplified block diagram of an apparatus 500 that can be used as either or both of the source device 12 and destination device 14 in FIG1A according to an exemplary embodiment. The apparatus 500 can implement the technology of this application. In other words, FIG5 is a schematic block diagram of an implementation of an encoding or decoding apparatus (hereinafter referred to as decoding apparatus 500) according to an embodiment of this application. The decoding apparatus 500 may include a processor 510, a memory 530, and a bus system 550. The processor and the memory are connected via the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. The memory of the decoding apparatus stores program code, and the processor can call the program code stored in the memory to execute various video encoding or decoding methods described in this application. To avoid repetition, detailed descriptions are not provided here.

[0139] In this embodiment, the processor 510 may be a central processing unit (CPU), or it may be other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0140] The memory 530 may include a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may also be used as memory 530. Memory 530 may include code and data 531 accessed by processor 510 using bus 550. Memory 530 may further include an operating system 533 and an application program 535, which includes at least one program that allows processor 510 to execute the encoding or decoding methods described in this application. For example, application program 535 may include applications 1 to N, which further include video encoding or decoding applications that execute the encoding or decoding methods described in this application.

[0141] In addition to the data bus, the bus system 550 may also include a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 550 in the diagram.

[0142] Optionally, the decoding device 500 may also include one or more output devices, such as a display 570. In one example, the display 570 may be a haptic display that combines a display with a haptic unit capable of operatively sensing touch input. The display 570 may be connected to the processor 510 via a bus 550.

[0143] For example, commonly used transform methods in image coding include discrete cosine transform and wavelet transform. Wavelet transform is a local transform method that can perform localized, multi-scale analysis of images, focusing on the details of signal changes, making it very suitable for image coding tasks.

[0144] Referring to Figure 6, which is an exemplary schematic / conceptual block diagram of a wavelet transform-based encoder, the encoder 60 includes, but is not limited to, a wavelet forward transform unit 610, a quantization unit 620, and an entropy coding unit 630. Specifically, the encoder acquires the original image 601 through an interface unit (also called an input interface, not shown in the figure). The original image 601 is input to the wavelet forward transform unit 610, and after wavelet transform (also called wavelet forward transform), wavelet transform coefficients 602 are obtained, which can also be simply referred to as wavelet coefficients in this embodiment. The quantization unit 620 quantizes the wavelet transform coefficients 602 to obtain quantization coefficients 603. The entropy coding unit 630 entropy codes the quantization coefficients 603 to obtain the image bitstream 604 of the original image, which can also be called a compressed bitstream or bitstream.

[0145] It should be noted that the wavelet transform-based encoder architecture in Figure 6 is for illustrative purposes only, and other instances may include more units or modules. For example, it may include, but is not limited to, prediction units, transform units, etc., and this application does not impose any limitations.

[0146] Referring to Figure 7, which is an exemplary schematic / conceptual block diagram of a wavelet transform-based decoder, the decoder 70 in the example of Figure 7 includes, but is not limited to, an entropy decoding unit 710, an inverse quantization unit 720, and an inverse wavelet transform unit 730. Specifically, at the decoding end, the decoder interfaces with the image bitstream 701 through an input interface (also called an interface unit, not shown in the figure). The entropy decoding unit 710 performs entropy decoding on the image bitstream 701 to obtain quantization coefficients 702. The image bitstream 701 can be a bitstream 604 generated based on the encoder 60 in Figure 6. The inverse quantization unit 720 performs inverse quantization on the quantization coefficients 702 to obtain inverse quantization coefficients 703 (dequantized coefficient(s)), which can also be called reconstructed coefficients, reconstructed wavelet coefficients, etc. The inverse wavelet transform unit 730 performs inverse wavelet transform on the inverse quantization coefficients 703 to obtain the reconstructed image 704.

[0147] It should be noted that the wavelet transform-based decoder architecture in Figure 7 is for illustrative purposes only, and other instances may include more units or modules. For example, it may include, but is not limited to, prediction units, inverse transform units, etc., and this application does not impose any limitations.

[0148] For example, the wavelet coefficients obtained after wavelet transform include wavelet coefficients of the high-frequency subband and wavelet coefficients of the low-frequency subband. In the architecture shown in Figures 6 and 7, the codec performs the same processing on the wavelet coefficients of the high-frequency subband and the low-frequency subband, which has high processing complexity. In the embodiments of this application, the wavelet coefficients of the high-frequency subband can be simply referred to as the high-frequency subband, and the wavelet coefficients of the low-frequency subband can be simply referred to as the low-frequency subband. It can be understood that the high-frequency subband obtained after wavelet transform can optionally be the set of wavelet coefficients of the high-frequency subband, and the low-frequency subband obtained after wavelet transform can optionally be the set of wavelet coefficients of the low-frequency subband.

[0149] For example, the frequency of the high-frequency sub-band is greater than the frequency of the low-frequency sub-band. This can be understood as the frequency of various coefficients corresponding to the high-frequency sub-band in this application (such as wavelet coefficients, reconstruction coefficients, inverse quantization coefficients, etc. involved in this application) being greater than the frequency of the coefficients of the low-frequency sub-band.

[0150] This application provides a wavelet transform-based codec that can independently encode and decode low-frequency and high-frequency sub-bands, effectively reducing encoding and decoding complexity and improving efficiency. For example, an image undergoes wavelet transform to obtain low-frequency and high-frequency sub-bands, which are then encoded to generate low-frequency and high-frequency sub-band bitstreams, respectively. The low-frequency sub-band can be understood as a sub-image representing the low-frequency signal (or low-frequency information) of the original image, and the high-frequency sub-band can be understood as a sub-image representing the high-frequency signal (or high-frequency information) of the original image.

[0151] Referring to Figure 8, which is a schematic / conceptual block diagram of an encoder as an example, the encoder 80 includes, but is not limited to, a sub-graph partitioning unit 810, a wavelet forward transform unit 820, a low-frequency sub-band processing path 830, and a high-frequency sub-band processing path 840. Optionally, the wavelet forward transform unit and the wavelet inverse transform unit in this embodiment can also be collectively referred to as wavelet transform units, which can be understood as performing both wavelet forward transform processing and wavelet inverse transform processing. In this application, the low-frequency sub-band processing path can also be referred to as a low-frequency sub-band processing unit, and the high-frequency sub-band processing path can also be referred to as a high-frequency sub-band processing unit.

[0152] The low-frequency subband processing path 830 includes, but is not limited to: a transform / quantization unit 831 (also known as a low-frequency subband transform / quantization unit) and a low-frequency subband entropy coding unit 832.

[0153] The high-frequency subband processing path 840 includes, but is not limited to: a transform / quantization unit 841 (also known as a high-frequency subband transform / quantization unit) and a high-frequency subband entropy coding unit 842.

[0154] Specifically, encoder 80 receives image 801. Image 801 can be an image in an image sequence that forms a video or video sequence. Image 801 can be referred to as the current image or the image to be encoded, and image 801 can be the original image or an image obtained by processing the original image.

[0155] The sub-image partitioning unit 810 is used to acquire the current image and partition it to obtain at least one sub-image. Specifically, the sub-image partitioning unit 810 partitions the current image into N sub-images according to a sub-image partitioning method, where N is an integer greater than 0 (or an integer greater than 1). The sub-image partitioning method can include, but is not limited to, at least one of the following:

[0156] The width and / or height of the subgraph are multiples of 128;

[0157] The maximum width of the subimage is 1024 pixels;

[0158] The minimum height and / or width of the subimage is 256 pixels;

[0159] The original image resolution is less than or equal to 1080p, and N is an integer greater than 1 and less than or equal to 8; or,

[0160] The original image has a length greater than or equal to 4320 pixels, a width greater than or equal to 2160 pixels, and N is an integer greater than 1 and less than or equal to 16; or,

[0161] The original image has a length greater than or equal to 7680 pixels, a width greater than or equal to 4320 pixels, and N is an integer greater than 1 and less than or equal to 32.

[0162] For example, common video resolutions are shown in Table 1:

[0163] Table 1

[0164] The values ​​mentioned above are merely illustrative examples and can be set according to actual needs.

[0165] For example, the subgraph partitioning unit 810 can set specific subgraph specifications (including width and height) based on the above subgraph partitioning method. The specific values ​​can be set according to actual needs within the range specified by the subgraph partitioning method.

[0166] Referring to Figure 9A, which is an exemplary schematic diagram of sub-image partitioning, in the example of Figure 9A, the sub-image partitioning unit 810 can partition the image 801 into m*n sub-images according to the sub-image partitioning method. Optionally, in this example, the width and height of each sub-image satisfy a multiple of 128.

[0167] Referring to Figure 9B, which is an exemplary schematic diagram of sub-image partitioning, in the example of Figure 9B, the sub-image partitioning unit 810 can partition the image into m*n sub-images according to the sub-image partitioning method. When the sub-image partitioning unit 810 partitions the boundary portion of the current image, the width and / or height of the boundary sub-images may optionally not satisfy a multiple of 128. Figure 9B only illustrates this by showing that the width of some boundaries does not satisfy a multiple of 128. Referring to Figure 9B, in this embodiment, for sub-images whose width and height do not satisfy a multiple of 128, the sub-image partitioning unit 810 can pad these sub-images, such as the gray portion in Figure 9B. Taking sub-image 1_n as an example, the height of sub-image 1_n satisfies a multiple of 128, but its width does not. The sub-image partitioning unit 810 pads sub-image 1_n.

[0168] In one possible implementation, the width and / or height of the filled subgraph can optionally be less than or equal to the subgraph size set by the subgraph partitioning method. For example, the size (i.e., width and height) of the filled subgraph 1_n can be the same as that of subgraph 1_1. As another example, the size of the filled subgraph 1_n can be less than the size of subgraph 1_1, where the width of subgraph 1_1 is a, the height is b, the width of subgraph 1_n before filling is c, the height is b, c is less than b, and c is not a multiple of 128. The subgraph partitioning unit 810 fills the subgraph 1_n, and the width of the filled subgraph 1_n is d, and the height is b. Here, d can optionally be a multiple of 16, and d is greater than c and less than or equal to a.

[0169] In this way, by padding the sub-images, each macroblock can meet the 8x8 (pixel) partitioning requirement during the block division process of the encoding. Furthermore, by finding the least common multiple of the width and / or height of the sub-image before padding and 16, sub-images that do not meet the multiple of 16 are padded. This ensures that the size of the sub-image is a multiple of 16 while minimizing the size of the padded sub-image, thereby reducing the encoding complexity of the padded sub-image.

[0170] Optionally, the sub-image partitioning method can be the same for each image in the same video sequence.

[0171] Optionally, the sub-image division unit 810 can divide the image into sub-images along the horizontal and vertical directions, starting from the upper left corner, according to a preset sub-image size. The division order can be set according to actual needs. Typically, the sub-images that need to be filled are boundary sub-images, as shown in Figure 9B.

[0172] In this embodiment, each sub-image is encoded and decoded independently. Specifically, the image is divided into N sub-images, and the encoder 80 encodes each of the N sub-images separately. During the encoding process, a sub-image can also be referred to as the current sub-image or the sub-image to be encoded.

[0173] Referring again to Figure 8, the wavelet forward transform unit 820 is used to perform wavelet transform (also called wavelet forward transform) on the subgraph to obtain low-frequency subband and high-frequency subband. The low-frequency subband includes low-frequency signals in the subgraph that satisfy the low-frequency filter coefficients, and the high-frequency subband includes high-frequency signals in the subgraph that have been decomposed by the high-frequency filter in the wavelet transform.

[0174] Referring to Figure 10, which is an exemplary schematic diagram of wavelet transform, in the example of Figure 10, the wavelet forward transform unit 820 acquires the current sub-image, for example, sub-image 1_1. The wavelet forward transform unit 820 performs a wavelet transform on the current sub-image, wherein the wavelet transform includes one horizontal wavelet transform and one vertical wavelet transform to obtain the wavelet coefficients of the low-low (LL) sub-band (abbreviated as LL sub-band), the wavelet coefficients of the low-high (LH) sub-band (abbreviated as LH sub-band), the wavelet coefficients of the high-high (HH) sub-band (abbreviated as HH sub-band), and the wavelet coefficients of the high-low (HL) sub-band (abbreviated as HL sub-band).

[0175] In this embodiment, the low-frequency subband includes an LL subband, and the high-frequency subband includes an LH subband, an HH subband, and an HL subband. Optionally, the LL subband, LH subband, HH subband, and HL subband have the same dimensions (including width and height).

[0176] Referring again to Figure 8, the low-frequency subband processing path 830 is used to encode the low-frequency subband to obtain low-frequency subband encoded data 806, which can also be referred to as coded low-frequency subband. The high-frequency subband processing path 840 is used to encode the high-frequency subband to obtain high-frequency subband encoded data 809, which can also be referred to as coded high-frequency subband. In this application, the high-frequency subband encoded data can also be referred to as second encoded data.

[0177] Specifically, the wavelet forward transform unit 820 outputs wavelet coefficients 803 of the low-frequency subband to the transform / quantization unit 831, and outputs wavelet coefficients 804 of the high-frequency subband to the transform / quantization unit 841.

[0178] For example, the transform / quantization unit 831 is used to obtain the wavelet coefficients 803 of the low-frequency sub-band, perform quantization processing on the wavelet coefficients 803 of the low-frequency sub-band, or perform transform and quantization processing, and output the quantized coefficients 805 of the low-frequency sub-band, or the quantized wavelet coefficients of the low-frequency sub-band.

[0179] The transform / quantization unit 831 outputs the quantization coefficients 805 of the low-frequency subband to the low-frequency subband entropy encoding unit 832. Optionally, the transform / quantization unit 831 may include, but is not limited to, a transform processing unit and a quantization processing unit (not shown in the figure).

[0180] The transform processing unit is used to transform the low-frequency subband and output transform coefficients, also known as low-frequency subband transform coefficients. The quantization processing unit is used to quantize the subband or the transformed transform coefficients and output quantized coefficients (also known as quantization results).

[0181] The low-frequency subband entropy coding unit 832 is used to acquire the data to be encoded and perform entropy coding on the data to be encoded to obtain low-frequency subband encoded data. The data to be encoded may include, but is not limited to, the quantization coefficients 805 of the low-frequency subband. In some instances, the data to be encoded may also include parameters or information (or syntax elements) input from other modules not shown in the figure. The low-frequency subband encoded data may also be referred to as the first encoded data in this application.

[0182] Referring again to Figure 8, the transform / quantization unit 841 is used to quantize the wavelet coefficients 804 of the high-frequency subband, or to perform both transform and quantization processing, to obtain the quantized coefficients 807 of the high-frequency subband, which can also be referred to as the quantized wavelet coefficients of the high-frequency subband. The transform / quantization unit 841 outputs the quantized coefficients 807 of the high-frequency subband to the high-frequency subband entropy coding unit 842. For parts not described, please refer to the low-frequency subband transform / quantization unit 831; further details are omitted here.

[0183] The high-frequency subband entropy coding unit 842 is used to acquire the data to be encoded and perform entropy coding on the data to be encoded to obtain high-frequency subband encoded data 808, which can also be called encoded high-frequency subband. Optionally, the data to be encoded may include, but is not limited to, the quantization coefficients 807 of the high-frequency subband. In some instances, the data to be encoded may also include parameters or information (or syntax elements) input from other modules not shown in the figure.

[0184] Optionally, the entropy coding unit (including the low-frequency subband entropy coding unit 832 and the high-frequency subband entropy coding unit 842) is used to encode the data to be encoded using an entropy coding algorithm or scheme. The aforementioned entropy coding scheme may be, for example, at least one of the following: variable-length coding (VLC), context-adaptive VLC (CAVLC), arithmetic coding, and context-adaptive binary arithmetic coding (CABAC).

[0185] Optionally, the encoder 80 may also include, but is not limited to, a combining unit (not shown in the figure), which may also be called a multiplexer (MUX). The combining unit is used to generate an image bitstream based on the low-frequency subband coded data 806 and the high-frequency subband coded data 808.

[0186] Specifically, the combining unit writes low-frequency subband coded data 806 into the image bitstream and writes high-frequency subband coded data 808 into the image bitstream. In this embodiment, by encoding the low-frequency subband and high-frequency subband separately, the low-frequency subband coded data and high-frequency subband coded data can be decoded independently. That is, at the decoding end, it can independently decode the low-frequency subband coded data and high-frequency subband coded data in the image bitstream, thereby improving decoding efficiency.

[0187] As mentioned above, a single image can be divided into multiple sub-images, for example, N sub-images. Each sub-image can be decomposed into wavelet coefficients of a high-frequency sub-band and wavelet coefficients of a low-frequency sub-band after wavelet forward transform. Encoder 80 independently encodes the low-frequency and high-frequency sub-bands of each sub-image to obtain the low-frequency sub-band encoded data and high-frequency sub-band encoded data of a single sub-image. In this way, the combining unit can obtain the high-frequency sub-band encoded data and low-frequency sub-band encoded data of each of the N sub-images, that is, obtain N high-frequency sub-band encoded data (optionally, the high-frequency sub-band encoded data of each sub-image includes the HL sub-band encoded data corresponding to the HL sub-band, the HH sub-band encoded data corresponding to the HH sub-band, and the LH sub-band encoded data corresponding to the LH sub-band) and N low-frequency sub-band encoded data. The combining unit can optionally write the low-frequency sub-band encoded data and high-frequency sub-band encoded data of the N sub-images into the image bitstream. The format (or structure) of the image bitstream will be described in detail below.

[0188] Referring to Figure 11, which is a schematic / conceptual block diagram of an exemplary decoder, decoder 110 is used to receive, for example, a bitstream encoded by an encoder to obtain a decoded image, also referred to as a reconstructed image 1108. During the decoding process, the decoder receives a bitstream (also referred to as the bitstream of the original image, or the image data of the original image) from the encoder.

[0189] In the example shown in Figure 11, the decoder 110 includes, but is not limited to: a high-frequency subband processing path 1120, a low-frequency subband processing path 1110, a wavelet inverse transform unit 1130, and a subgraph stitching unit 1140.

[0190] The low-frequency subband processing path 1110 includes, but is not limited to: a low-frequency subband entropy decoding unit 1111 and an inverse quantization / inverse transform unit 1112 (also referred to as a low-frequency subband inverse quantization / inverse transform unit). The high-frequency subband decoding path 1120 includes, but is not limited to: a high-frequency subband entropy decoding unit 1121 and an inverse quantization / inverse transform unit 1122 (also referred to as a high-frequency subband inverse quantization / inverse transform unit).

[0191] For example, decoder 110 receives an image bitstream and obtains a reconstructed image 1108 (also known as a decoded image) based on high-frequency subband coded data 1102 and low-frequency subband coded data 1101 in the image bitstream.

[0192] For example, the low-frequency subband entropy decoding unit 1111 is used to acquire low-frequency subband encoded data 1101 in the image bitstream to obtain entropy decoding data, which includes, but is not limited to, the quantization coefficients 1103 of the low-frequency subband. Specifically, the low-frequency subband entropy decoding unit 1111 performs entropy decoding processing on the low-frequency subband encoded data 1101 to obtain entropy decoding data. The low-frequency subband entropy decoding unit 1111 outputs the quantization coefficients 1103 of the low-frequency subband to the inverse quantization / inverse transform unit 1112.

[0193] The inverse quantization / inverse transform unit 1112 is used to obtain the quantization coefficients 1103 of the low-frequency subband to obtain the reconstruction coefficients 1105 of the low-frequency subband, which can also be simply referred to as the reconstructed low-frequency subband. In some instances, it can also be called the reconstructed value of the low-frequency subband, the reconstruction coefficient of the low-frequency subband, or the reconstructed wavelet coefficients of the low-frequency subband. Specifically, the low-frequency inverse quantization / inverse transform unit performs inverse quantization and / or inverse transform processing on the quantization coefficients to obtain the reconstructed low-frequency subband, such as the reconstructed LL subband. Optionally, the inverse quantization / inverse transform unit 1112 may include, but is not limited to, an inverse quantization processing unit and an inverse transform processing unit (not shown in the figure). The inverse quantization processing unit can be used to perform inverse quantization processing on the input parameters to obtain inverse quantization coefficients. The inverse transform unit can be used to perform inverse transform processing on the input parameters to obtain inverse transform coefficients, which can also be called inverse transform coefficients. For example, the inverse transform processing unit can perform inverse transform processing on the inverse quantization coefficients output by the inverse quantization processing unit to obtain inverse transform inverse quantization coefficients.

[0194] The high-frequency subband entropy decoding unit 1121 is used to acquire the high-frequency subband encoded data 1102 in the image bitstream to obtain entropy-decoded data. The entropy-decoded data includes, but is not limited to, the quantization coefficients 1104 of the high-frequency subband. Specifically, the high-frequency subband entropy decoding unit 1121 performs entropy decoding processing on the high-frequency subband encoded data 1102 to obtain the entropy-decoded data. The high-frequency subband entropy decoding unit 1121 outputs the quantization coefficients 1104 of the high-frequency subband to the inverse quantization / inverse transform unit 1122.

[0195] The inverse quantization / inverse transform unit 1122 is used to obtain the quantization coefficients 1104 of the high-frequency subband, resulting in the reconstructed coefficients 1106 of the high-frequency subband, which can be simply referred to as the reconstructed high-frequency subband. In some instances, it can also be called the reconstructed value of the high-frequency subband, the reconstructed wavelet coefficients of the high-frequency subband, etc. The inverse quantization / inverse transform unit 1122 outputs the reconstructed high-frequency subband to the wavelet inverse transform unit 1130. Specifically, the inverse quantization / inverse transform unit 1122 performs inverse quantization processing on the quantization coefficients 1104 of the high-frequency subband, or performs inverse quantization and inverse transform processing, to obtain the reconstructed high-frequency subband. For example, this includes reconstructing the HH subband (e.g., the reconstructed coefficients of the HH subband), reconstructing the HL subband (e.g., the reconstructed coefficients of the HL subband), and reconstructing the LH subband (e.g., the reconstructed coefficients of the LH subband).

[0196] For example, the wavelet inverse transform unit 1130 is used to obtain the reconstruction coefficients 1105 of the low-frequency sub-band and the reconstruction coefficients 1106 of the high-frequency sub-band to obtain the reconstructed sub-map 1107. Specifically, the wavelet inverse transform unit 1130 can obtain the reconstructed low-frequency sub-band and the reconstructed high-frequency sub-band of each sub-map. The wavelet inverse transform unit performs wavelet inverse transform processing on the obtained reconstructed low-frequency sub-band and reconstructed high-frequency sub-band corresponding to the same sub-map to obtain the reconstructed sub-map. Its inverse transform process is the inverse of the wavelet forward transform process, which will not be described in detail here.

[0197] The sub-image stitching unit 1140, also known as an image reconstruction unit or sub-image combination unit, is used to obtain reconstructed sub-images of the original image to obtain a reconstructed image of the original image. Specifically, the sub-image stitching unit 1140 obtains N reconstructed sub-images corresponding to the current decoded image. Based on the N reconstructed sub-images, the sub-image stitching unit 1140 can obtain the reconstructed image (also known as the decoded image or the decoded image) of the current image.

[0198] Based on the codecs shown in Figures 8 and 11, there can be more variations of the codec, such as including more processing units or modules.

[0199] Referring to Figure 12, which is a schematic / conceptual block diagram of an encoder as an example, the encoder in the example of Figure 12 includes, but is not limited to, a sub-graph partitioning unit 1210, a wavelet forward transform unit 1220, a low-frequency sub-band processing path 1230, and a high-frequency sub-band processing path 1240.

[0200] The descriptions of the subgraph partitioning unit 1210 and the wavelet forward transform unit 1220 can be found in the relevant content in Figure 8, and will not be repeated here.

[0201] The low-frequency subband processing path 1230 is used to obtain the wavelet coefficients 1203 of the low-frequency subband to obtain the low-frequency subband encoded data 1213. The low-frequency subband processing path 1230 includes, but is not limited to: a block partitioning unit 1231 (also called the low-frequency subband block partitioning unit 1231 or the first block partitioning unit 1231), a residual calculation unit 1232, a prediction unit 1237, a control unit 1238, a transform / quantization unit (also called the low-frequency subband transform / quantization unit 1233 or the first transform / quantization unit), an inverse quantization / inverse transform unit 1234 (also called the low-frequency subband inverse quantization / inverse transform unit 1234 or the first inverse transform / inverse quantization unit), a low-frequency subband wavelet coefficient 1203 splicing unit 1246, a low-frequency subband wavelet coefficient 1203 splicing unit 1246, and a low-frequency subband entropy coding unit 1239, etc.

[0202] The high-frequency subband processing path 1240 is used to acquire high-frequency subbands to obtain high-frequency subband encoded data. The high-frequency subband processing path 1240 includes, but is not limited to: block partitioning unit 1231 (also referred to as high-frequency subband block partitioning unit 1231 or second block partitioning unit 1231), transform / quantization unit (also referred to as transform / quantization unit 1242 or second transform / quantization unit), high-frequency subband entropy coding unit 1243, etc.

[0203] Alternatively, in some instances, the encoder may include more or fewer units or modules than in the structure shown in Figure 12.

[0204] The image 1201 encoding method provided in this application will be described in detail below with reference to the encoder shown in Figure 12:

[0205] The codec receives image 1201. A description of image 1201 can be found above and will not be repeated here.

[0206] Sub-image partitioning unit 1210 partitions image 1201 into sub-images and outputs N sub-images. N is an integer greater than 0. In this embodiment, each sub-image is encoded and decoded independently. During the encoding process, sub-image 1202 can be referred to as the current sub-image or the sub-image to be encoded.

[0207] Wavelet forward transform unit 1220 performs wavelet forward transform on the current sub-image to obtain wavelet coefficients 1203 (hereinafter referred to as low-frequency sub-band) and wavelet coefficients 1214 (hereinafter referred to as high-frequency sub-band) of the current sub-image. The wavelet coefficients 1203 of the low-frequency sub-band include the wavelet coefficients of the LL sub-band, and the high-frequency sub-band includes the wavelet coefficients of the LH, HL, and HH sub-bands. In this embodiment, each sub-image of the image can be independently encoded and decoded, and the high-frequency sub-band and low-frequency sub-band of each sub-image are independently encoded and decoded. The LH, HL, and HH sub-bands in the high-frequency sub-band can also be independently encoded and decoded.

[0208] The block partitioning unit 1231 (which may be called the low-frequency sub-band block partitioning unit) is used to obtain the wavelet coefficients 1203 of the low-frequency sub-band of the current sub-graph 1202, so as to obtain at least one macroblock 1204 of the low-frequency sub-band of the sub-graph 1202, wherein the macroblock can also be understood as a set of partial coefficients in the wavelet coefficients of the low-frequency sub-band.

[0209] Specifically, the block partitioning unit 1231 partitions the wavelet coefficients 1203 of the low-frequency sub-band of the current subgraph 1202 into blocks based on the block partitioning method, obtaining at least one macroblock 1204 of the low-frequency sub-band of the current subgraph, for example, M macroblocks, where M is an integer greater than 0 (or greater than 1). The low-frequency block partitioning unit 1231 outputs the macroblocks 1204 of the wavelet coefficients 1203 of the current low-frequency sub-band one by one to the residual calculation unit 1232 and the control unit 1238.

[0210] In this embodiment, macroblock 1204 is a basic encoding / decoding unit. During the encoding process, macroblock 1204 can also be referred to as the current block, current image 1201 block, macroblock 1204 to be encoded, block to be encoded, image 1204 block to be encoded, etc.

[0211] Alternatively, the block partitioning method includes, but is not limited to:

[0212] The wavelet coefficients 1203 of both the high-frequency subband and the low-frequency subband are divided into basic coding units of 8x8 macroblocks 1204 (unit is pixels).

[0213] For example, as described above, each subband uses macroblock 1204 as the basic coding unit. The macroblock 1204 currently to be encoded is referred to as the current macroblock 1204. Specifically, the low-frequency subband processing path 1230 encodes each macroblock 1204 of the wavelet coefficients 1203 of the low-frequency subband block by block. For example, encoding and prediction are performed on each macroblock 1204. The following description only uses the encoding process of the current macroblock 1204; the processing processes for other macroblocks are the same, and will not be described in detail here. For example, in encoding, it refers to the macroblock currently being encoded; in decoding, it refers to the macroblock currently being decoded. The decoded macroblock in the reference image used for predicting the current macroblock 1204 is called the reference block (i.e., the low-frequency subband reconstruction block 1209 in the figure). The reference block is the block that provides the reference signal for the current block, where the reference signal represents the pixel value within the macroblock 1204. The block in the reference image that provides the prediction signal for the current block can be called prediction block 1205, where the prediction signal represents the pixel value, sample value, or sample signal within prediction block 1205. For example, after traversing multiple reference blocks, an optimal reference block is found, which will provide the prediction for the current block; this block is called prediction block 1205.

[0214] Specifically, referring to Figure 12, the residual calculation unit 1232 is used to obtain the current macroblock 1204 and the prediction block 1205 (further details of the prediction block 1205 are provided below) to obtain the residual block 1206. Specifically, the residual calculation unit performs residual calculations on the current macroblock 1204 and the prediction block 1205 to obtain the residual block 1206. The residual calculation unit 1232 outputs the residual block 1206 to the transform / quantization unit 1233.

[0215] The transform / quantization unit 1233 is used to acquire the residual block 1206 to obtain the residual coefficients 1207. Specifically, the transform / quantization unit 1233 performs transform and / or quantization processing on the residual block 1206 to obtain the residual coefficients 1207, which can also be called the quantization coefficients of the residual block, or the quantized residual block. The transform / quantization unit 1233 outputs the residual coefficients 1207 to the inverse quantization single / inverse transform unit 1234 and the low-frequency subband entropy coding unit 1239.

[0216] The inverse quantization / inverse transform unit 1234, also known as the inverse quantization / inverse transform unit, is used to obtain the residual coefficients 1207 to obtain the residual reconstruction block 1208. Specifically, the inverse quantization / inverse transform unit 1234 performs inverse quantization and / or inverse transform processing on the residual coefficients 1207 to obtain the residual reconstruction block 1208, which can also be referred to as the inverse quantization coefficients of the residual block, the inverse quantized residual block, etc. The inverse quantization / inverse transform unit 1234 outputs the residual reconstruction block 1208 to the low-frequency subband splicing unit 1236.

[0217] The dequantization / inverse transform unit 1234 may include a dequantization unit and an inverse transform unit (not shown in the figure). The dequantization unit is used to dequantize the input coefficients, and the inverse transform unit is used to inverse transform the input coefficients.

[0218] The low-frequency subband reconstruction unit 1235 is used to obtain a low-frequency subband reconstruction block 1209 based on the prediction block 1205 and the residual reconstruction block 1208. Specifically, the low-frequency subband reconstruction unit 1235 adds the residual reconstruction block 1208 to the prediction block 1205 to obtain the low-frequency subband reconstruction block 1209, which can also be referred to as the reconstructed low-frequency subband macroblock. Optionally, the low-frequency subband reconstruction unit 1235 outputs the low-frequency subband reconstruction block 1209 to the prediction unit 1237 and the low-frequency subband splicing unit 1236. Optionally, the low-frequency subband reconstruction unit 1235 outputs the low-frequency subband reconstruction block 1209 to the control unit 1238.

[0219] The low-frequency subband stitching unit 1236 is used to obtain the reconstructed low-frequency subband 1211, which can also be referred to as the reconstructed value or reconstructed data of the low-frequency subband, based on the low-frequency subband reconstruction block 1209. Optionally, the low-frequency subband stitching unit 1236 outputs the reconstructed low-frequency subband 1211 to the prediction unit 1237. Optionally, the low-frequency subband stitching unit 1236 outputs the reconstructed low-frequency subband 1211 to the control unit 1238.

[0220] Specifically, as described above, the low-frequency subband uses macroblocks as the basic coding unit, and the low-frequency subband splicing unit 1236 can obtain M low-frequency subband reconstruction blocks of a low-frequency subband. The low-frequency subband splicing unit 1236 can reconstruct the corresponding low-frequency subband based on the M low-frequency subband reconstruction blocks, that is, obtain the reconstructed low-frequency subband 1211.

[0221] The control unit 1238, also known as the mode selection unit, is used to determine the syntax element 1213 based on the macroblock 1204 (i.e. the current block); or to determine the syntax element 1213 based on the current macroblock 1204, the low-frequency subband reconstruction block 1209, and the reconstructed low-frequency subband 1211.

[0222] Syntax element 1213 includes at least one syntax element, such as pattern information. Pattern information, also known as prediction mode information, is used to indicate the prediction mode (or prediction method) of prediction unit 1237, such as inter-frame or intra-frame prediction mode. Control unit 1238 can output syntax element 1213 to prediction unit 1237 and low-frequency subband entropy coding unit 1239.

[0223] Prediction unit 1237, also known as prediction processing unit, is used to acquire syntax element 1213 and perform prediction processing based on syntax element 1213. Specifically, prediction unit 1237 may select a prediction mode based on syntax element 1213 (e.g., mode information in the syntax element). In one example, prediction unit 1237 may acquire low-frequency subband reconstruction block 1209 based on syntax element 1213 to acquire prediction block 1205. Specifically, prediction unit 1237 may perform intra-frame prediction based on low-frequency subband reconstruction block 1209 to acquire prediction block 1205. In another example, prediction unit 1237 may acquire reconstructed low-frequency subband 1211 based on syntax element 1213 to acquire prediction block 1205.

[0224] The prediction unit 1237 outputs prediction block 1205 to the residual calculation unit 1232 and the low-frequency sub-band splicing unit 1236.

[0225] The low-frequency subband entropy coding unit 1239 is used to obtain low-frequency subband encoded data 1213, also known as encoded low-frequency subband, based on residual coefficients 1207 and syntax elements 1213. Specifically, the low-frequency subband entropy coding unit 1239 uses an entropy coding algorithm or scheme (e.g., variable length coding (VLC) scheme, context adaptive VLC (CAVLC) scheme, arithmetic coding scheme, context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy coding methods or techniques) to entropy encode the residual coefficients 1207 and syntax elements 1213 to obtain low-frequency subband encoded data 1213 output in the form of, for example, an encoded bitstream.

[0226] Referring again to Figure 12, the block partitioning unit 1241, also known as the high-frequency subband block partitioning unit, is used to obtain the high-frequency subband of the current subgraph 1202 to obtain at least one macroblock 1215 of the high-frequency subband of the subgraph 1202. For a detailed description, please refer to the low-frequency subband section; it will not be repeated here. Specifically, the block partitioning unit 1241 partitions the high-frequency subband 1214 of the current subgraph 1202 (hereinafter referred to as the current high-frequency subband) into blocks based on the block partitioning method, obtaining at least one macroblock 1215 of the current subgraph 1202, for example, M macroblocks, where M is an integer greater than 0 (or an integer greater than 1). Other undescribed parts can be referred to the relevant description of the block partitioning unit 1231; it will not be repeated here.

[0227] Block partitioning unit 1241 outputs the macroblocks of the current high-frequency subband one by one to quantization / conversion unit 1242.

[0228] The transform / quantization unit 1242 is used to transform and / or quantize the macroblock 1215 to obtain the quantization coefficients 1216 of the high-frequency subband block (i.e., the quantization coefficients of the current macroblock). The transform / quantization unit 1242 outputs the quantization coefficients 1216 of the high-frequency subband block to the high-frequency subband entropy coding unit 1243.

[0229] The high-frequency subband entropy coding unit 1243 is used to perform entropy coding on the data to be encoded to obtain high-frequency subband encoded data 1217. The data to be encoded may include, but is not limited to, the quantization coefficients and syntax elements of each high-frequency subband block. The high-frequency subband encoded data 1217 includes, but is not limited to, HH subband encoded data, HL subband encoded data, and LH subband encoded data.

[0230] The encoding and decoding method provided in this application supports two scenarios: full I-frame configuration and I / P frame alternating encoding configuration. The encoder architecture shown in Figure 12 adds relevant modules required for the prediction process based on the wavelet transform architecture shown in Figure 8, which can improve the compression efficiency of I / P frame alternating encoding for scenarios such as fixed camera positions and slow camera movement.

[0231] Optionally, the encoder may also include a combination unit (not shown in the figure) for generating an image bitstream based on low-frequency subband coded data and high-frequency subband coded data. The specific process can be referred to the relevant description in Figure 8 above.

[0232] The bitstream output by the encoder in the embodiments of this application will be described in detail below. The bitstream structure described below can be applied to the encoders shown in Figures 8 and 12, and of course, it can also be applied to other encoder variations based on Figures 8 or 12.

[0233] For example, as described above, the low-frequency subband entropy coding unit 1239 and the high-frequency subband entropy coding unit 1243 output low-frequency subband coded data 1213 and high-frequency subband coded data 1217, respectively. This can be understood as the encoder 120 independently encoding the low-frequency and high-frequency subbands of each subgraph, outputting low-frequency and high-frequency subband coded data corresponding to the current subgraph.

[0234] Referring to Figure 13A, which is an exemplary schematic diagram of an image bitstream structure, the image bitstream in the example of Figure 13A includes, but is not limited to, image header information and image data (also referred to as an image data region).

[0235] For example, the image data includes at least one image data region (also referred to as an image data sub-region), such as, but not limited to, a first image data region and a second image data region. During the encoding process, the encoder (e.g., through a combination unit) writes high-frequency subband encoded data and low-frequency subband encoded data into the image bitstream. Specifically, the encoder writes high-frequency subband encoded data into the first image data region and low-frequency subband encoded data into the second image data region.

[0236] For example, image header information includes, but is not limited to, offset information and image size information.

[0237] For example, image size information is used to indicate the size of the original image. As mentioned above, during the encoding process, some sub-images may be padded during sub-image partitioning to ensure that the length and width of each sub-image are multiples of 16. Thus, during decoding, the size of the reconstructed image obtained by the decoder may be larger than the original image size. The decoder can process the reconstructed image based on the image size information to remove the padded portions.

[0238] For example, offset information is used to indicate the position of a data region in the image bitstream, and can also be understood as indicating the position of independently decodeable coded data in the image bitstream. When decoding coded data (i.e., the image bitstream) according to this application, the offset information in the image header information can be used to obtain independently decodeable coded data, and decoding operations can be performed on the coded data. The independently decodeable coded data (e.g., low-frequency subband coded data and high-frequency subband coded data) can be decoded synchronously during decoding to improve decoding efficiency.

[0239] In one example, the offset information can be the length of the image data region containing adjacent, independently decodeable encoded data in the image bitstream.

[0240] In another example, the offset information can be the offset (i.e., the difference) between the starting position of the image data region where the independently decoded encoded data is located and the ending position of the image header information.

[0241] Referring to Figure 13B, which is an exemplary schematic diagram of an image bitstream structure, the bitstream in the example of Figure 13B includes, but is not limited to, image header information and image data. The image header information includes, but is not limited to, offset information, etc., detailed concepts of which can be found above and will not be repeated here. The image data includes, but is not limited to, low-frequency subband coded data and high-frequency subband coded data. The low-frequency subband coded data is written to the first image data area, and the high-frequency subband coded data is written to the second image data area. Other descriptions can be found in Figure 13A and will not be repeated here.

[0242] It should be noted that the embodiments in this application only use the image bitstream of a single image as an example for illustration, that is, the bitstream includes only one image data. In the process of encoding video images, the encoder can generate an encoded image bitstream for each image, that is, the image bitstream includes multiple image data, and each image data carries the encoded data of the corresponding image.

[0243] Referring to Figure 14A, which is an exemplary schematic diagram of an image bitstream structure, in the example of Figure 14A, as described above, the high-frequency subband coding data of each sub-image further includes: HH subband coding data, HL subband coding data, and LH subband coding data. Accordingly, in this example, the image data includes, but is not limited to: HH subband coding data, HL subband coding data, and LH subband coding data of each sub-image of the image.

[0244] For example, in the example shown in Figure 14A, LL subband coded data is written to the second image data region, HL subband coded data is written to the first image data subregion, HH subband coded data is written to the second image data subregion, and LH subband coded data is written to the dotted image data subregion. The writing order of each high-frequency subband is only an illustrative example and will not be repeated below.

[0245] Optionally, in the example shown in Figure 14A, the offset information of each segment of independently decodeable encoded data in the image header information may include, but is not limited to: the offset of the starting position of the first image data sub-region relative to the ending position of the image header information (this data is usually measured in n bytes), the offset of the starting position of the second image data sub-region relative to the ending position of the image header information, and the offset of the starting position of the third image data sub-region relative to the ending position of the image header information. After obtaining these offsets by decoding the image header information, the starting position of each segment of independently decodeable encoded data can be obtained, so that the LL subband encoded data, HH subband encoded data, HL subband encoded data, and LH subband encoded data can be decoded independently during decoding.

[0246] Optionally, in the example shown in Figure 14A, the offset information may include, but is not limited to: the length information L0 of the first image data region (this length is typically measured in n bytes), the length information L1 of the first image data sub-region, and the length information L2 of the second image data sub-region. L0 is the offset of the starting position of the first image data sub-region relative to the ending position of the image header information. L0 + L1 yields the offset of the starting position of the second image data sub-region relative to the ending position of the image header information. L0 + L1 + L2 yields the offset of the starting position of the third image data sub-region relative to the ending position of the image header information. After obtaining the offset information by decoding the image header information, the starting position of each independently decodeable segment of encoded data can be obtained by addition calculation, so that the LL subband encoded data, HH subband encoded data, HL subband encoded data, and LH subband encoded data can be decoded independently during decoding.

[0247] Referring to Figure 14B, which is an exemplary schematic diagram of an image bitstream structure, in the example of Figure 14B, low-frequency subband coded data is written to the first image data region, and high-frequency subband coded data is written to the second image data region. Further details can be found in Figure 14A, and will not be repeated here.

[0248] Referring to Figure 15, which is an exemplary schematic diagram of an image bitstream structure, in the example of Figure 15, the high-frequency subband encoded data is written to the corresponding image data region according to the type of subband. Specifically, the description of the first image data region and its sub-regions, and the second image data region, can be referred to above and will not be repeated here. Taking HL subband encoded data as an example, the HL subbands of each sub-image (e.g., sub-image 1 to sub-image N) of the image are written to the first image data sub-region; the order is only illustrative.

[0249] In this context, for example, sub-image 1-HL in the figure represents the HL subband encoded data of sub-image 1 of the image. The HL subband encoded data of each sub-image further includes the encoded macroblocks of the HL subband of that sub-image. For example, sub-image 1-HL includes, but is not limited to: sub-image 1-HL-MB0 to sub-image 1-HL-MBm. Sub-image 1-HL-MBx represents the encoded macroblock MBx in the HL subband of sub-image 1. The HH subband encoded data and LH subband encoded data are similar to the HL subband encoded data and will not be described further here.

[0250] Referring again to Figure 15, the LL subband coding data includes, but is not limited to, the LL subband coding data of each sub-image of the image. For example, sub-image 1-LL to sub-image N-LL. Sub-image 1-LL represents the LL subband coding data of sub-image 1 of the image. Each sub-image-LL further includes, but is not limited to, the coding data of each macroblock of that sub-image, i.e., the coded macroblock. For example, sub-image 1-LL includes, but is not limited to, sub-image 1-LL-MB0 to sub-image 1-LL-MBn. Sub-image 1-LL-MBx represents the coding data of macroblock MBx of the LL subband of sub-image 1 of the image.

[0251] For example, during the encoding process, each sub-band of each subgraph is encoded independently; correspondingly, during the decoding process, each encoded sub-band of each subgraph can be decoded independently. In the example shown in Figure 15, it can be understood that the four encoded sub-bands of each subgraph can be decoded independently. For instance, during decoding, the decoder can obtain the HL sub-band encoded data, LH sub-band encoded data, HH sub-band encoded data, and LL sub-band encoded data of subgraph 1 based on the offset information, and perform independent decoding to obtain the decoded subgraph 1.

[0252] In this example, the coded subbands and their coded macroblocks of each sub-image in the figure can also be written into the corresponding image data sub-regions, which are not shown in the figure and will not be repeated below. Accordingly, offset information can be used to indicate the position of the image region to which the independently coded subbands of each sub-image belong. Thus, during decoding, the decoder can obtain the positions of the four coded subbands (LL subband coded data, HH subband coded data, HL subband coded data, and LH subband coded data) of a single sub-image in the image data based on the offset information, and perform decoding on them to obtain the decoded subbands of the corresponding sub-image (including LL subband decoded data, HH subband decoded data, HL subband decoded data, and LH subband decoded data). For example, during decoding, the decoder obtains sub-image 1-HL (including each coded macroblock contained in its sub-region, the same below, and will not be repeated), sub-image 1-HH, sub-image 1-LH, and sub-image 1-LL. In this way, the decoder can obtain the decoded sub-graph 1 based on the above encoded sub-bands without having to decode other sub-graphs one by one according to the order of the bitstream. This can improve decoding efficiency while reducing the occupation of the decoding buffer (e.g., DPB) and reducing the hardware processing pressure and storage burden on the decoding end.

[0253] In one possible implementation, on the encoding side, the low-frequency subband entropy encoding unit can output low-frequency subband encoded data (e.g., LL subband bitstream), and the high-frequency subband entropy encoding unit can output high-frequency subband encoded data (e.g., including HH subband decoded data, HL subband decoded data, and LH subband decoded data). The combining unit writes this data into the image data to generate an image bitstream.

[0254] In another possible implementation, the low-frequency subband entropy coding unit and the high-frequency subband entropy coding unit can also output the coded macroblock of the coded subband to the combining unit after each macroblock is encoded. The combining unit can generate the bitstream structure as shown in the figures (e.g., Figures 15, 16A-16C, 17A-17B, etc.) according to the specified order of the coded macroblocks of the image data.

[0255] Optionally, the subgraph and bitstream structure in Figure 15 can also be applied to the bitstream structures shown in Figures 13B and 14B, and will not be illustrated in detail here.

[0256] In the embodiments of this application, the subbands in the high-frequency subband coded data of the image data can be interleaved and sorted. The interleaving and sorting can be at the sub-image granularity, the subband type granularity, or the macroblock (MB) granularity. Several interleaving and sorting methods are provided below. It should be noted that the interleaving methods shown in the embodiments of this application are only illustrative examples. In other embodiments, other interleaving methods can also be set according to the encoding and decoding requirements.

[0257] Referring to Figure 16A, which is an exemplary schematic diagram of an image bitstream structure, the interleaving method in the example of Figure 16A is interleaving at the subband type of the subimage. Specifically, as shown in Figure 16A, the HL subband encoded data, encoded HH, and encoded LH of each subimage of the image are continuously written into the image bitstream. The subimage order and macroblock order shown in the figure are merely illustrative examples. The format of the low-frequency subband is not shown in the figure; please refer to Figure 15 and its related description, which will not be repeated here.

[0258] For example, as shown in Figure 16A, sub-images 1-HL, 1-HH, and 1-LH are continuously written into the image bitstream. Sub-image 1-HL represents the HL subband encoded data of sub-image 1, which includes, but is not limited to, all encoded macroblocks (MB) of the HL subband of sub-image 1, such as MB0-HL to MBm-HL. Only the bitstream format of sub-image 1 is shown in the figure; other sub-images are similar and will not be described individually here. The LL subband encoded data can be referred to above and will not be repeated here.

[0259] In this example, similar to the description in Figure 15, each coded subband of each sub-image can be decoded independently. Accordingly, offset information can be used to indicate the location of the image region to which the independently coded subband of each sub-image belongs. This allows, during decoding, the positions of the four coded subbands (LL subband coded data, HH subband coded data, HL subband coded data, and LH subband coded data) of a single sub-image can be obtained in the image data based on the offset information, and decoding can be performed on them to obtain the decoded subbands of the corresponding sub-image (including LL subband decoded data, HH subband decoded data, HL subband decoded data, and LH subband decoded data). Details not described herein can be found in Figure 15 and will not be repeated here.

[0260] Referring to Figure 16B, which is an exemplary schematic diagram of the image bitstream structure, the interleaving method in the example of Figure 16B is interleaving at the macroblock level for each sub-image.

[0261] Specifically, in the example shown in Figure 16B, the high-frequency subband encoded data (including LH subband encoded data, HH subband encoded data, and HL subband encoded data) of each sub-image of the image are continuously written into the first image data region. A description of the second image data region can be found in Figure 15, and will not be repeated here.

[0262] For example, as shown in Figure 16B, sub-images 1-HL-MB0, 1-HH-MB0, and 1-LH-MB0 are consecutively written into the first image data region. Here, 1-HL-MB0 represents the encoded macroblock MB0 of the HL subband of 1, 1-HH-MB0 represents the encoded macroblock MB0 of the HH subband of 1, and 1-LH-MB0 represents the encoded macroblock MB0 of the LH subband of 1. The figure only shows the encoded data structure of 1 in the bitstream; the other sub-images are similar and will not be illustrated individually here.

[0263] In this example, during decoding, the decoding end can decode the high-frequency subband encoded data according to the sub-image order, that is, each sub-image in the first image data region is decoded independently. The low-frequency subband encoded data is also decoded according to the sub-image order, that is, each sub-image in the second image data region is decoded independently. Unlike Figures 15, 16A, and 16C, when the bitstream structure in the above figures is applied to decoding, the decoding end decodes the different types of encoded subbands of each sub-image separately. This can also be understood as needing to simultaneously decode the four sub-bitstreams (each sub-bitstream corresponds to one type of encoded subband) of each sub-image to obtain four decoded subbands of an image at the output end, thereby obtaining the decoded sub-image and storing additional data. For the bitstream structure shown in Figure 16B, the decoding end only needs to decode the high-frequency subband and low-frequency subband of each sub-image, that is, two bitstreams. For example, as shown in Figure 16B, when the decoding end decodes the first image data region, it can decode each encoded macroblock one by one according to the encoded macroblock order of each sub-image in the region. That is, the three high-frequency subband encoded data of sub-Figure 1 are written continuously into the first image data area. Therefore, during decoding, the three high-frequency subband encoded data of sub-Figure 1 can be decoded one by one to obtain the decoded high-frequency subband. The processing of LL subband encoded data can be referred to Figure 15, and will not be described in detail here.

[0264] In the example shown in Figure 16B, the offset information is used to indicate the position of the first image data region and the position of the second image data region. That is, the example shown in Figure 16B includes two sub-bitstreams that can be decoded independently. Compared with the framework and decoding methods in Figures 15, 16A, and 16C, it has lower hardware performance requirements, only requiring simultaneous decoding of the two sub-bitstreams of the sub-image (corresponding to low-frequency sub-band encoded data and high-frequency sub-band encoded data).

[0265] Referring to Figure 16C, which is an exemplary schematic diagram of an image bitstream structure, the interleaving method in Figure 16C is based on the sub-bands of each sub-image. Specifically, as shown in Figure 16C, each sub-image of the image is continuously written into the first image data region according to its high-frequency sub-band type. For example, taking sub-image 1 as an example, the coded macroblocks of the HL sub-band encoded data of sub-image 1 are continuously written into the first image data region, that is, sub-image 1-HL-MB0 to sub-image 1-HL-MBm of sub-image 1 are continuously written into the image bitstream. The coded macroblocks of the HH sub-band encoded data of sub-image 1 are continuously written into the first image data region, that is, sub-image 1-HH-MB0 to sub-image 1-HH-MBm of sub-image 1 are continuously written into the image bitstream. The coded macroblocks of the LH sub-band encoded data of sub-image 1 are continuously written into the first image data region, that is, sub-image 1-LH-MB0 to sub-image 1-LH-MBm of sub-image 1 are continuously written into the image bitstream. Other subgraphs are similar and will not be described in detail here. The order of subband types is for illustrative purposes only.

[0266] In this example, similar to the description in Figure 15, each coded subband of each sub-image can be decoded independently. Accordingly, offset information can be used to indicate the location of the image region to which the independently coded subband of each sub-image belongs. This allows, during decoding, the positions of the four coded subbands (LL subband encoded data, HH subband encoded data, HL subband encoded data, and LH subband encoded data) of a single sub-image can be obtained in the image data based on the offset information, and decoding can be performed on them to obtain the decoded subbands of the corresponding sub-image (including LL decoded data, HH decoded data, HL decoded data, and LH decoded data). Parts not described herein can be referred to Figure 15 and will not be repeated here.

[0267] For example, in the example of Figure 16C, during decoding, the decoder obtains the HH subband encoded data, LH subband encoded data, HL subband encoded data, and LL subband encoded data of sub-Figure 1 from the image bitstream based on offset information (not shown in Figure 16C, see Figure 15). The decoder decodes the encoded data of the four subbands of sub-Figure 1 to obtain the reconstructed sub-Figure 1, which can also be called decoded sub-Figure 1 or decoded sub-Figure 1.

[0268] In the embodiments of this application, multiple independently decoded encoded data can be decoded simultaneously, or one or more high-frequency subbands can be decoded simultaneously, and the number of simultaneous decodes depends on the decoder hardware performance.

[0269] Referring to Figure 17A, which is an exemplary schematic diagram of an image bitstream structure, the interleaving method in the example of Figure 17A is granular at the low-frequency and high-frequency subbands of the subgraph. Only the interleaving method of subgraph 1 is shown; other subgraphs are similar and will not be described in detail here. For example, the structure of the low-frequency subband encoded data of the subgraph can be seen in Figure 15, and will not be repeated here. In one example, the structure of the high-frequency subband encoded data of the subgraph can use any of the interleaving methods for high-frequency subband encoded data in Figures 16A to 16C.

[0270] Referring to Figure 17B, which is an exemplary schematic diagram of the bitstream structure, in the example of Figure 17B, the splicing order of the sub-graphs can be low-frequency subband coded data followed by high-frequency subband coded data. Other descriptions can be found in Figure 17A, and will not be repeated here.

[0271] Optionally, for the examples shown in Figures 17A and 17B, the offset information in the image header information is also used to indicate each encoded data that can be decoded independently. The indication method can be seen in Figures 15 and 16A to 16C, which will not be repeated here.

[0272] Referring to Figure 18, which is a schematic / conceptual block diagram of an exemplary decoder, in the example of Figure 18, the decoder receives, for example, an image bitstream encoded by an encoder to obtain a decoded image of the original image, also referred to as a decoded image, reconstructed image, etc. During the decoding process, the decoder receives the image bitstream from the encoder, including, but not limited to, image header information and image data. The image bitstream can be any of the bitstream formats shown in Figures 13A to 17B.

[0273] In the example shown in Figure 18, the decoder includes, but is not limited to: low-frequency subband processing path 1810, high-frequency subband processing path 1820, wavelet inverse transform unit 1830, image combination unit 1840 (also known as image stitching unit), etc.

[0274] For example, the low-frequency subband processing path 1810 is used to acquire low-frequency subband encoded data to obtain reconstructed low-frequency subband 1806 (also known as decoded low-frequency subband). The low-frequency subband processing path includes, but is not limited to: low-frequency subband entropy decoding unit 1811, inverse quantization / inverse transform unit 1812 (also known as low-frequency subband inverse quantization / inverse transform unit), low-frequency subband reconstruction unit 1813, low-frequency subband splicing unit 1815, prediction unit 1814, etc.

[0275] The high-frequency subband processing path 1820 is used to acquire high-frequency subband encoded data to obtain the reconstructed high-frequency subband 1831, which can also be called the reconstructed value of the high-frequency subband or the reconstructed data of the high-frequency subband, including but not limited to: high-frequency subband entropy decoding unit 1821, inverse quantization / inverse transform unit 1821 (also called high-frequency subband inverse quantization / inverse transform unit), high-frequency subband reconstruction unit 1831, etc.

[0276] In some instances, the decoder shown in Figure 18 can perform a decoding process that is largely the reverse of the encoding process described with reference to the encoder in Figure 12.

[0277] The decoding method in the embodiments of this application will be described in detail below with reference to the decoder 180 shown in Figure 18.

[0278] For example, the decoder 180 can obtain high-frequency subband encoded data and low-frequency subband encoded data in the image bitstream based on the image header information in the image bitstream. Furthermore, as described above, during the encoding process, the encoder uses macroblocks as the basic encoding unit, and correspondingly, during the decoding process, the decoder also uses macroblocks (e.g., encoded macroblocks) as the basic decoding unit for decoding.

[0279] For example, the low-frequency subband entropy decoding unit 1811 performs entropy decoding on the low-frequency subband encoded data 1801 in the image bitstream, using macroblocks as the basic decoding unit, to obtain the quantization coefficients 1802 (i.e., the quantization coefficients of the current macroblock) and syntax elements 1807 of the low-frequency subband block. The description of the quantization coefficients 1802 of the low-frequency subband can be found on the encoder side and will not be repeated here. Specifically, the low-frequency subband entropy decoding unit 1811 obtains the encoded macroblocks (i.e., the encoded data of the macroblocks) of the low-frequency subbands (e.g., LL subbands) of each sub-image in the image bitstream, and performs entropy decoding on each encoded macroblock to obtain the quantization coefficients 1802 (which can be simply referred to as the quantization coefficients of the macroblock of the low-frequency subband) and syntax elements 1807 of the corresponding low-frequency subband for each encoded macroblock. During the decoding process, the currently decoded encoded macroblock can be called the current block.

[0280] The low-frequency subband decoding unit is used to output the quantization coefficients 1802 of the low-frequency subband block to the inverse quantization / inverse transform unit 1812, and to output the syntax elements 1807 to the prediction unit 1814.

[0281] The inverse quantization / inverse transform unit 1812 is used to obtain the quantization coefficients 1802 of the low-frequency subband block to obtain the inverse quantization coefficients 1803 of the low-frequency subband block. Alternatively, it can be the inverse transform coefficients of the current block of the low-frequency subband (depending on whether inverse transform processing was performed). Specifically, the inverse quantization / inverse transform unit 1812 performs inverse quantization on the quantization coefficients of the current block of the low-frequency subband, or performs both inverse quantization and inverse transform, to obtain the inverse quantization coefficients of the current block of the low-frequency subband. The inverse quantization / inverse transform unit 1812 outputs the inverse quantization coefficients 1803 of the low-frequency subband block to the low-frequency subband reconstruction unit 1813, for example, the inverse quantization coefficients of the current block of the low-frequency subband.

[0282] The low-frequency subband reconstruction unit 1813 is used to obtain the low-frequency subband reconstruction block 1804, which can also be called the reconstruction coefficient of the low-frequency subband block, based on the quantization coefficients 1803 and prediction block 1805 of the low-frequency subband. Specifically, the low-frequency subband reconstruction unit 1813 adds a prediction block to the inverse quantization coefficients of the current block of the low-frequency subband to obtain the low-frequency subband reconstruction block 1804 corresponding to the current macroblock.

[0283] The prediction unit 1814 is used to obtain syntax element 1807 and perform corresponding prediction processing according to syntax element 1807. For example, intra-frame prediction can be performed based on low-frequency subband reconstruction block 1804, or inter-frame prediction can be performed based on reconstructed low-frequency subband 1806. Its execution method can be referred to the coding side, and will not be elaborated here. The prediction unit 1814 outputs prediction block 1805 to the low-frequency subband reconstruction block 1804 unit.

[0284] For example, the high-frequency subband entropy decoding unit 1821 acquires the high-frequency subband encoded data 1802 in the image bitstream, and, using macroblocks as the basic decoding unit, acquires the quantization coefficients 1808 (which are the quantization coefficients of the current macroblock) of each high-frequency subband block. Specifically, the high-frequency subband entropy decoding unit 1821 performs entropy decoding on the current block of the high-frequency subband encoded data 1802 to obtain the quantization coefficients of the current block of the high-frequency subband. Optionally, based on entropy decoding, the syntax elements corresponding to the current block can also be obtained. The high-frequency subband entropy decoding unit 1821 outputs the quantization coefficients 1808 of the high-frequency subband block to the inverse quantization / inverse transform unit 1822.

[0285] The inverse quantization / inverse transform unit 1822, also known as the high-frequency subband inverse quantization / inverse transform unit, is used to obtain the quantization coefficients 1808 of the high-frequency subband block to obtain the reconstruction coefficients 1809 of the high-frequency subband block. The reconstruction coefficients can be either inverse quantization coefficients after inverse quantization processing, or inverse transform coefficients after inverse quantization and inverse transform processing.

[0286] The high-frequency subband reconstruction unit 1823 (also known as the high-frequency subband splicing unit) is used to obtain the reconstruction coefficients 1809 of the high-frequency subband block to obtain the reconstructed high-frequency subband 1831, which can also be referred to as the reconstructed value or reconstructed data of the high-frequency subband. Specifically, the high-frequency subband reconstruction unit 1823 can obtain the reconstruction coefficients corresponding to each macroblock of the high-frequency subband, that is, reconstruct the high-frequency subband block. The high-frequency subband reconstruction unit 1823 can splice the obtained multiple macroblocks to obtain the corresponding high-frequency subband. Among them, the reconstructed high-frequency subband may optionally include reconstructing the HL subband (e.g., the reconstruction coefficients of the HL subband), reconstructing the HH subband (e.g., the reconstruction coefficients of the HH subband), and reconstructing the LH subband (e.g., the reconstruction coefficients of the LH subband).

[0287] The inverse wavelet transform unit 1830 is used to acquire the reconstructed high-frequency subband 1831 and the reconstructed low-frequency subband 1806 to obtain the reconstructed sub-image 1832. Specifically, the inverse wavelet transform unit 1830 acquires the reconstructed low-frequency subband 1806 output by the low-frequency subband stitching unit 1815 and the reconstructed high-frequency subband 1831 output by the high-frequency subband reconstruction unit 1823, and performs an inverse wavelet transform on the reconstructed low-frequency subband 1806 and the reconstructed high-frequency subband 1831 to obtain the reconstructed sub-image 1832. The inverse wavelet transform unit 1830 outputs the reconstructed sub-image 1832 to the image combining unit (which may also be called the image stitching unit, etc.).

[0288] Image combining unit 1840 is used to acquire reconstructed sub-images 1832 to obtain a reconstructed image 1833 of the original image, which can also be called a decoded image or a decoded image, etc. Specifically, image combining unit 1840 can acquire N reconstructed sub-images (N is an integer greater than 0) of the image (referring to the original image), and stitch (or combine) the N reconstructed sub-images according to the division method (including size and position) of each reconstructed sub-image during encoding to obtain the reconstructed image 1833.

[0289] Optionally, after obtaining the reconstructed image, the image combining unit 1840 can determine whether the reconstructed image contains a padding portion based on the image size information in the image header information and the size information of the current reconstructed image. In one example, if the size of the current reconstructed image is the same as the size indicated by the image size information (i.e., the same as the original image size), the image combining unit 1840 can send the reconstructed image to the display device. In this case, the sizes of the displayed image, the original image, and the reconstructed image are all the same. In another example, if the size of the current reconstructed image is different from the size indicated by the image size information (e.g., larger than the original image size), the image combining unit 1840 can remove the padding portion of the current reconstructed image based on the size indicated by the image size information to obtain the displayed image. The size of the displayed image is the same as the size of the original image. Specifically, in this embodiment, when the encoding side performs sub-image division, the division order is preset, usually from left to right in the horizontal direction and from top to bottom in the vertical direction. Correspondingly, at least one padding sub-image is usually located at the edge of the image, as shown in Figure 9B. For example, the image combining unit 1840 may crop the vertical and / or horizontal edges of the image according to the size information to remove the fill portion of the sub-image at the edge.

[0290] Optionally, in some instances, the image reconstruction unit may also perform the above-mentioned operation of removing the padding portion during the process of acquiring the reconstructed image, so that the size of the reconstructed image is the same as the size of the original image.

[0291] Optionally, the decoder is used, for example, to output a reconstructed image via the decoder's output port (or output interface) for presentation to or viewing by the user.

[0292] Other variations of the decoder can be used to decode compressed image bitstreams.

[0293] For example, as described above, each sub-image in the image bitstream may include two or four independently decodeable encoded data. For instance, in the examples shown in Figures 15, 16A, and 16C, the encoded HH sub-band, encoded LH sub-band, encoded HL sub-band, and encoded LL sub-band of each sub-image can be independently decoded. In the above scenario, the high-frequency sub-band entropy decoding unit can obtain each independently decodeable image data region based on the offset information in the image header information, and obtain the encoded data within the image data region. The high-frequency sub-band entropy decoding unit can simultaneously decode the encoded data of one or more independently decoded image data regions.

[0294] Optionally, in the above scenario, the high-frequency subband processing path may include at least one high-frequency processing subpath (not shown in the figure). For example, the high-frequency subband processing path may include three high-frequency processing subpaths to process three coded subbands of a subgraph simultaneously. Of course, in some instances, there may be more than three or fewer high-frequency subband processing subpaths. The more high-frequency subband processing paths there are, the higher the decoding efficiency. The fewer the paths, the lower the hardware design complexity requirements.

[0295] The decoding method is illustrated below using the bitstream structure shown in Figure 16A. In the example shown in Figure 16A, the low-frequency entropy decoding unit 1801 acquires the LL subband encoded data and performs decoding based on macroblocks. Taking sub-Figure 1 as an example, the low-frequency entropy decoding unit 1801 acquires the LL subband encoded data of sub-Figure 1 and decodes each encoded macroblock. The low-frequency subband decoding path 1810 processes the current block (inverse quantization / inverse transform, prediction, reconstruction, etc.) to output the reconstructed low-frequency subband of sub-Figure 1 to the wavelet inverse transform unit.

[0296] The high-frequency subband entropy decoding unit 1821 acquires LH subband encoded data, HL subband encoded data, and HH subband encoded data, and performs decoding based on the encoded macroblocks. Taking sub-image 1 as an example, specifically, the high-frequency entropy decoding unit 1821 acquires the LH subband encoded data, HL subband encoded data, and HH subband encoded data of sub-image 1 in the image bitstream based on offset information. The acquisition order can be in the order of the bitstream or according to actual needs. The high-frequency subband processing path 1820 processes the decoded macroblocks of sub-image 1 output by the high-frequency subband entropy decoding unit. In one example, the high-frequency subband entropy decoding unit can optionally decode the LH subband encoded data, HL subband encoded data, and HH subband encoded data of sub-Figure 1 simultaneously. The high-frequency subband processing path obtains multiple decoded high-frequency subbands output by the high-frequency subband entropy decoding unit and processes each macroblock in the multiple decoded high-frequency subbands simultaneously to output the reconstructed HH subband, reconstructed HL subband, and reconstructed LH subband of sub-Figure 1 to the wavelet inverse transform unit.

[0297] In another example, the high-frequency subband entropy decoding unit can optionally decode the LH, HL, and HH subband encoded data of sub-Figure 1 simultaneously. The high-frequency subband processing path acquires multiple decoded high-frequency subbands output by the high-frequency subband entropy encoding unit. It can process each macroblock in at least one decoded high-frequency subband, and the decoded data of other received but unprocessed high-frequency subbands can be cached in storage. The processing order can follow the order in the bitstream or be set according to actual needs. Similarly, the high-frequency subband processing path outputs to the wavelet inverse transform unit after acquiring a reconstructed high-frequency subband of sub-Figure 1.

[0298] After the wavelet inverse transform unit obtains the four reconstructed high-frequency subbands of sub-figure 1, including the reconstructed LL subband, reconstructed HL subband, reconstructed HH subband, and reconstructed LH subband, it performs wavelet inverse transform to obtain the reconstructed sub-figure 1.

[0299] Optionally, before acquiring the four reconstructed high-frequency subbands of sub-graph 1, the wavelet inverse transform unit can cache each reconstructed subband acquired. After acquiring all the reconstructed high-frequency subbands of sub-graph 1, it can acquire the cached reconstructed high-frequency subbands of sub-graph 1 and perform the wavelet inverse transform.

[0300] It can be understood that, in the embodiments of this application, when the high-frequency subband processing path and the low-frequency subband processing path process the encoded data of the sub-graph, the order of the sub-graphs and their macroblocks in each independent decoded data is the same. For example, as shown in Figure 15, the high-frequency subband entropy decoding unit can obtain the HH subband encoded data, HL subband encoded data, and LH subband encoded data of a single sub-graph (e.g., sub-graph 1) from the offset. In this way, when decoding, the high-frequency subband entropy decoding unit can obtain each encoded subband and its encoded macroblock of sub-graph 1 to decode sub-graph 1. Correspondingly, the high-frequency subband processing path can process the decoded macroblocks corresponding to the high-frequency subbands of sub-graph 1 to obtain each reconstructed high-frequency subband of sub-graph 1 and output it to the wavelet inverse transform unit so that the wavelet inverse transform unit can output the reconstructed sub-graph 1. In this way, the wavelet inverse transform unit only needs to buffer the decoded data of sub-graph 1 during the processing. If the high-frequency processing unit processes the encoded data in the code stream as shown in Figure 15, the wavelet inverse transform unit will cache the reconstructed HL subbands of other sub-graphs before obtaining the reconstructed HH subband of sub-graph 1, which increases the storage burden and requires a large hardware cache space, affecting the complexity of hardware design.

[0301] For example, in the example shown in Figure 16B, the high-frequency subband encoded data in the image bitstream is interleaved at the MB granularity. That is, during decoding, the high-frequency subband encoded data and low-frequency subband encoded data of each sub-image can be decoded independently. The high-frequency subband processing path can process each macroblock according to the order of the encoded macroblocks of the sub-image in the image bitstream, that is, the reconstructed subbands of each sub-image are obtained according to the order of the sub-images, which can reduce the hardware design complexity of the decoding end.

[0302] Referring to Figure 19, which is an exemplary schematic / conceptual block diagram of a decoder, the decoder 190 includes, but is not limited to: a low-frequency subband processing path 1910, a high-frequency subband processing path 1920, a wavelet inverse transform unit 1930, a sub-image combination unit 1940, and an image combination unit 1950. The low-frequency subband processing path 1910 includes, but is not limited to: a low-frequency subband entropy coding unit 1911, an inverse quantization / inverse transform unit 1912, a low-frequency subband reconstruction unit 1913, a low-frequency subband stitching unit 1915, and a prediction unit 1914. Detailed descriptions can be found in Figure 18, and will not be repeated here. The descriptions of the input and output coefficients or data of each unit (such as low-frequency subband coding data 1901, low-frequency subband quantization coefficients 1902, low-frequency subband inverse quantization coefficients 1903, low-frequency subband reconstruction block 1904, reconstructed low-frequency subband 1906, prediction block 1905, and syntax element 1907) can be found in Figure 18, and will not be repeated here.

[0303] The high-frequency subband processing path 1920 includes, but is not limited to: high-frequency subband entropy coding unit 1921, inverse quantization / inverse transform unit 1922, and high-frequency subband reconstruction unit 1923.

[0304] The high-frequency subband entropy coding unit 1921 obtains the quantization coefficients 1908 of the high-frequency subband block based on the high-frequency subband coded data 1902. The inverse quantization / inverse transform unit 1922 obtains the reconstruction coefficients 1909 of the high-frequency subband block based on the quantization coefficients 1908 of the high-frequency subband block, which can also be called the high-frequency subband reconstruction block.

[0305] The wavelet inverse transform unit 1903 is used to obtain the reconstruction coefficients 1909 of the high-frequency subband block, i.e., the high-frequency subband reconstruction block, and the low-frequency subband reconstruction block 1904 output by the low-frequency subband reconstruction block unit 1913. The wavelet inverse transform is performed on the high-frequency subband reconstruction block (e.g., including HH subband reconstruction block, HL subband reconstruction block, LH subband reconstruction block) and the low-frequency subband reconstruction block 1904 to obtain the reconstruction block 1931, which is the reconstruction block of the current subgraph. It can also be called the reconstruction data of the current block of the current subgraph or the reconstruction value of the current block of the current subgraph.

[0306] The wavelet inverse transform unit 1930 outputs a reconstructed block 1931 to the subgraph combination unit 1940. The subgraph combination unit 1940 can obtain the reconstructed subgraph of the current subgraph based on at least one reconstructed block corresponding to the current subgraph, which can also be referred to as the reconstructed value or reconstructed data of the current subgraph.

[0307] Subgraph combining unit 1940 outputs reconstructed subgraph 1932 to image combining unit 1950.

[0308] The image combination unit 1950 is used to acquire the reconstructed sub-image 1932 to obtain the reconstructed image 1933 of the original image, or the reconstructed value or reconstructed data of the original image, etc. The undescribed parts of Figure 19 can be referred to Figure 18, and will not be repeated here.

[0309] This application provides a wavelet transform method applied to wavelet transform architecture. By using a combination of 9 / 7 integer wavelet transform and 5 / 3 integer wavelet transform, wavelet transform is performed on the image to be encoded to obtain the wavelet transform result. This can effectively reduce the computational complexity of wavelet transform, improve wavelet transform efficiency, and thus improve the overall encoding and decoding efficiency.

[0310] The wavelet transform methods in the following embodiments (including the wavelet forward transform method applied to the coding side and the wavelet inverse transform method applied to the decoding side) can be applied to any of the wavelet transform architectures in the above embodiments.

[0311] Referring to Figure 20, which is an exemplary flowchart of a wavelet transform method applied to the coding side, the method includes, but is not limited to, the following steps:

[0312] S2001, perform the first wavelet transform on the image to obtain the first-level wavelet coefficients.

[0313] For example, a wavelet transform unit (a forward wavelet transform unit on the encoding side and an inverse wavelet transform unit on the decoding side, which will not be repeated below) acquires the image to be encoded (i.e., the image mentioned above). The image to be encoded can be the original image, a sub-image obtained by subdividing the original image (the concept of a sub-image can be referred to above, and will not be repeated here), an image after precise adjustment and related processing of the original image, or a sub-image obtained after precise adjustment of the original image and then subdivision. Precise adjustment is used to adjust the precision of the original image, and its operation can be shifting the pixels of the original image to the left or right. Shifting to the left increases precision, while shifting to the right decreases precision. In this example, the precise adjustment of the original image can optionally be a left shift, i.e., increasing the precision of the original image.

[0314] For example, after one wavelet transform, an image can be obtained into four wavelet transform images. One of these wavelet transform images is called the approximate image, which is a low-resolution approximation of the original image. The other three wavelet transform images are called detail images, which contain high-frequency information from the original image.

[0315] In this embodiment, a wavelet transform may include a first wavelet transform and a second wavelet transform. The first wavelet transform (also called the first forward wavelet transform) and the second wavelet transform (also called the second forward wavelet transform) are different. These differences include, but are not limited to, at least one of the following: different processing objects, different wavelet transform directions, and different algorithms used. The processing objects include: chroma components and luminance components. The wavelet transform directions include: horizontal and vertical. The algorithms used include: 9 / 7 integer wavelet transform and 5 / 3 integer wavelet transform, wherein the 5 / 3 integer wavelet transform further includes a lifting form 5 / 3 integer wavelet transform and a convolutional form 5 / 3 integer wavelet transform.

[0316] In other words, the wavelet transform unit can perform first and second wavelet transforms on images in different combinations based on the processing object, wavelet transform direction, and algorithm used. Specific combinations will be explained below.

[0317] For example, the wavelet transform unit (which on the encoding side could be the wavelet forward transform unit in the above embodiment) performs a first wavelet transform on the image to obtain first-level wavelet coefficients. Specifically, the first wavelet transform acquires the current image (i.e., the image to be encoded as described above), performs a first wavelet transform on the current image, and obtains first-level wavelet coefficients. The first-level wavelet coefficients include wavelet coefficients of the L subband (low-frequency subband) and wavelet coefficients of the H subband (high-frequency subband). The frequency of the wavelet coefficients of the H subband is greater than the frequency of the wavelet coefficients of the L subband.

[0318] S2002, Perform a second wavelet transform on the first-level wavelet coefficients to obtain second-level wavelet coefficients; wherein the first wavelet transform and the second wavelet transform are different.

[0319] For example, the wavelet transform unit performs a second wavelet transform on the wavelet transform result after the first wavelet transform, that is, performs a second wavelet transform on the first-level wavelet coefficients to obtain the second-level wavelet coefficients.

[0320] Specifically, after the wavelet transform unit obtains the first-level wavelet coefficients, namely the wavelet coefficients of the L subband and the wavelet coefficients of the H subband, it performs wavelet transform on the wavelet coefficients of the L subband and the wavelet coefficients of the H subband respectively to obtain the second-level wavelet coefficients.

[0321] Specifically, after performing a second wavelet transform based on the wavelet coefficients of the L subband, wavelet coefficients of the LH subband and the LL subband are obtained. The frequency of the wavelet coefficients of the LH subband is greater than the frequency of the LL wavelet coefficients.

[0322] After performing a second wavelet transform based on the wavelet coefficients of the H subband, wavelet coefficients of the HH subband and HL subband are obtained. The frequency of the wavelet coefficients of the HH subband is greater than the frequency of the wavelet coefficients of the HL subband.

[0323] S2003, based on the second-level wavelet coefficients, obtain the image bitstream.

[0324] For example, the encoder obtains the wavelet transform result, i.e., the second-level wavelet coefficients, including the wavelet coefficients of the LH subband, LL subband, HH subband, and HL subband. The encoder can obtain the image bitstream based on the second-level wavelet coefficients. Specifically, the encoder can obtain the first encoded data (e.g., the low-frequency subband encoded data in the above embodiment) based on the wavelet coefficients of the low-frequency subband. It can also obtain the second encoded data (e.g., the high-frequency subband encoded data in the above embodiment) based on the wavelet coefficients of the high-frequency subband. The first and second encoded data are then written into the image bitstream. The low-frequency subband includes the LL subband, and the high-frequency subband includes the LH, HH, and HL subbands. The specific encoding method can be referred to the relevant description of the wavelet transform architecture in the above embodiment, and will not be repeated here.

[0325] Referring to Figure 21, which is an exemplary flowchart of a wavelet transform method applied to the decoding side, the method includes, but is not limited to, the following steps:

[0326] S2101, based on the target encoded data in the image bitstream, the second-level wavelet coefficients are obtained.

[0327] For example, the decoder acquires the target coded data in the image bitstream and performs entropy decoding on the target coded data to obtain the second-level wavelet coefficients. The target coded data includes first coded data and second coded data.

[0328] The decoder obtains the wavelet coefficients of the LL subband based on the first encoded data. Specifically, the decoder performs entropy decoding on the first encoded data to obtain the wavelet coefficients of the LL subband.

[0329] The decoder obtains the wavelet coefficients of the LH subband, HH subband, and HL subband based on the second encoded data. Specifically, the decoder performs entropy decoding on the second encoded data to obtain the wavelet coefficients of the LH subband, HH subband, and HL subband.

[0330] The specific decoding method can be referred to the description in the above embodiments, and will not be repeated here.

[0331] S2102, perform a second wavelet inverse transform on the second-level wavelet coefficients to obtain the first-level wavelet coefficients.

[0332] For example, the wavelet transform unit (also known as the inverse wavelet transform unit) at the decoder performs a second inverse wavelet transform on the second-level wavelet coefficients (including the wavelet coefficients of the LL subband, LH subband, HH subband, and HL subband) to obtain the first-level wavelet coefficients. The first-level wavelet coefficients include the wavelet coefficients of the L subband and the H subband.

[0333] For example, the inverse second wavelet transform is the inverse operation of the second wavelet transform on the coding side. The inverse second wavelet transform can also be called the inverse second wavelet transform.

[0334] S2103, perform a first inverse wavelet transform on the first-level wavelet coefficients to obtain the reconstructed image. The first inverse wavelet transform is different from the second inverse wavelet transform.

[0335] For example, the wavelet transform unit performs a first wavelet inverse transform on the first-level wavelet coefficients (i.e., the wavelet coefficients of the L subband and the wavelet coefficients of the H subband) to obtain the reconstructed image of the original image.

[0336] The first wavelet inverse transform is the inverse operation of the first wavelet transform (also known as the first wavelet forward transform) on the coding side. The second wavelet inverse transform can also be called the second wavelet inverse transform.

[0337] For example, as described above, the first wavelet transform and the second wavelet transform are different. Correspondingly, the first inverse wavelet transform, which is the inverse transform of the first wavelet transform, is also different from the second inverse wavelet transform, which is the inverse transform of the second wavelet transform.

[0338] The first wavelet transform and the second wavelet transform in the embodiments of this application are described in detail below:

[0339] As mentioned above, the first wavelet transform and the second wavelet transform are different, including but not limited to at least one of the following: different processing objects, different wavelet transform directions, and different algorithms used. The processing objects include: chroma components and luminance components. The wavelet transform directions include: horizontal and vertical. The algorithms used include: 9 / 7 integer wavelet transform and 5 / 3 integer wavelet transform. The 5 / 3 integer wavelet transform further includes a lifting form and a convolutional form of the 5 / 3 integer wavelet transform.

[0340] Two different combinations are provided below. Of course, the combinations described below are only illustrative examples, and any combination can be set according to actual needs in other embodiments.

[0341] Method 1:

[0342] Encoding side:

[0343] First wavelet transform:

[0344] The 9 / 7 integer wavelet transform is used to perform wavelet transform on the chrominance component of the image to be encoded in the horizontal direction, to obtain the wavelet coefficients of the L subband and H subband of the chrominance component.

[0345] The luminance component of the image to be encoded is subjected to a 9 / 7 integer wavelet transform. The wavelet transform is performed in the horizontal direction to obtain the wavelet coefficients of the L subband and the H subband of the luminance component.

[0346] In this example, the first-level wavelet coefficients include wavelet coefficients for the L-band and H-band of the chroma component, and wavelet coefficients for the L-band and H-band of the luma component of the image to be encoded. Specifically, the wavelet coefficients for the L-band in the first-level wavelet coefficients include both the wavelet coefficients for the chroma component and the L-band of the luma component. The wavelet coefficients for the H-band include both the wavelet coefficients for the chroma component and the H-band of the luma component.

[0347] The luminance component is the Y component of the original image. The chrominance components are the U and V components of the original image.

[0348] Second wavelet transform:

[0349] The wavelet coefficients of the L subband are subjected to wavelet transform in the vertical direction using a 5 / 3 integer wavelet transform.

[0350] The wavelet coefficients of the H subband are subjected to wavelet transform in the vertical direction using a 5 / 3 integer wavelet transform.

[0351] For example, using 5 / 3 integer wavelet transform to perform wavelet transform on the wavelet coefficients of the L subband in the vertical direction includes:

[0352] The wavelet coefficients of the L subband of the chrominance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the LL subband and the LH subband of the chrominance component.

[0353] The wavelet coefficients of the L subband of the luminance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the LL subband and the LH subband of the luminance component.

[0354] For example, using 5 / 3 integer wavelet transform to perform wavelet transform on the wavelet coefficients of the H subband in the vertical direction includes:

[0355] The wavelet coefficients of the H subband of the chrominance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the HH subband and the HL subband of the chrominance component.

[0356] The wavelet coefficients of the H subband of the luminance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the HH subband and the HL subband of the luminance component.

[0357] Referring to Figure 22, which is an exemplary schematic diagram of the first wavelet transform result, the wavelet transform unit performs the first wavelet transform on the image to obtain the first-level wavelet coefficients of the image, including the wavelet coefficients of the L subband and the wavelet coefficients of the H subband. Taking the L subband as an example, the wavelet coefficients of the L subband include: the wavelet coefficients of the Y component, the wavelet coefficients of the U component, and the wavelet coefficients of the V component.

[0358] Referring to Figure 23, which is an exemplary schematic diagram of the second wavelet transform result, the wavelet transform unit performs a second wavelet transform on the first-level wavelet coefficients to obtain the second-level wavelet coefficients of the image. Specifically, the wavelet coefficients of the L subband are subjected to a second transform to obtain the wavelet coefficients of the LL subband and the LH subband. The wavelet coefficients of the H subband are subjected to a second wavelet transform to obtain the wavelet coefficients of the HL subband and the HH subband. Taking the LL subband as an example, the wavelet coefficients of the LL subband include: the wavelet coefficients of the Y component, the wavelet coefficients of the U component, and the wavelet coefficients of the V component.

[0359] Decoding side:

[0360] Second wavelet inverse transform:

[0361] The wavelet coefficients of the LL subband and LH subband of the chrominance component are subjected to inverse wavelet transform in the vertical direction using 5 / 3 integer wavelet transform to obtain the wavelet coefficients of the L subband of the chrominance component.

[0362] Using the 5 / 3 integer wavelet inverse transform, the wavelet coefficients of the LL subband and the LH subband of the luminance component are subjected to an inverse wavelet transform in the vertical direction to obtain the wavelet coefficients of the L subband of the luminance component.

[0363] The wavelet coefficients of the HH subband and the HL subband of the chrominance component are subjected to inverse wavelet transform in the vertical direction using 5 / 3 integer wavelet transform to obtain the wavelet coefficients of the H subband of the chrominance component.

[0364] Using the 5 / 3 integer wavelet inverse transform, the wavelet coefficients of the HH subband and the HL subband of the luminance component are subjected to inverse wavelet transform in the vertical direction to obtain the wavelet coefficients of the H subband of the luminance component.

[0365] First wavelet inverse transform:

[0366] The wavelet coefficients of the L-band and H-band of the chrominance component are subjected to inverse wavelet transform in the horizontal direction using 9 / 7 integer wavelet transform to obtain the reconstructed values ​​of the chrominance component.

[0367] The wavelet coefficients of the L subband and H subband of the luminance component are subjected to inverse wavelet transform in the horizontal direction using 9 / 7 integer wavelet transform to obtain the reconstructed value of the luminance component.

[0368] For example, the encoder can obtain the reconstructed value of the original image based on the reconstructed values ​​of the luminance component and the chrominance component, which is the reconstructed image described in the above embodiment.

[0369] Method 2:

[0370] Encoding side:

[0371] First wavelet transform:

[0372] The luminance component of the image to be encoded is subjected to a 9 / 7 integer wavelet transform. The wavelet transform is performed in the horizontal direction to obtain the wavelet coefficients of the L subband and the H subband of the luminance component.

[0373] The chroma component of the image to be encoded is subjected to a 5 / 3 integer wavelet transform. The wavelet transform is performed in the horizontal direction to obtain the wavelet coefficients of the L subband and the H subband of the chroma component.

[0374] In this example, the first-level wavelet coefficients include wavelet coefficients for the L-band and H-band of the chroma component, and wavelet coefficients for the L-band and H-band of the luma component of the image to be encoded. Specifically, the wavelet coefficients for the L-band in the first-level wavelet coefficients include both the wavelet coefficients for the chroma component and the L-band of the luma component. The wavelet coefficients for the H-band include both the wavelet coefficients for the chroma component and the H-band of the luma component.

[0375] Second wavelet transform:

[0376] The wavelet coefficients of the L subband are subjected to wavelet transform in the vertical direction using a 5 / 3 integer wavelet transform.

[0377] The wavelet coefficients of the H subband are subjected to wavelet transform in the vertical direction using a 5 / 3 integer wavelet transform.

[0378] For example, using 5 / 3 integer wavelet transform to perform wavelet transform on the wavelet coefficients of the L subband in the vertical direction includes:

[0379] The wavelet coefficients of the L subband of the chrominance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the LL subband and the LH subband of the chrominance component.

[0380] The wavelet coefficients of the L subband of the luminance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the LL subband and the LH subband of the luminance component.

[0381] For example, using 5 / 3 integer wavelet transform to perform wavelet transform on the wavelet coefficients of the H subband in the vertical direction includes:

[0382] The wavelet coefficients of the H subband of the chrominance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the HH subband and the HL subband of the chrominance component.

[0383] The wavelet coefficients of the H subband of the luminance component are obtained by performing a 5 / 3 integer wavelet transform on the wavelet coefficients in the vertical direction, resulting in the wavelet coefficients of the HH subband and the HL subband of the luminance component.

[0384] Decoding side:

[0385] Second wavelet inverse transform:

[0386] The wavelet coefficients of the LL subband and LH subband of the chrominance component are subjected to inverse wavelet transform in the vertical direction using 5 / 3 integer wavelet transform to obtain the wavelet coefficients of the L subband of the chrominance component.

[0387] Using the 5 / 3 integer wavelet inverse transform, the wavelet coefficients of the LL subband and the LH subband of the luminance component are subjected to an inverse wavelet transform in the vertical direction to obtain the wavelet coefficients of the L subband of the luminance component.

[0388] The wavelet coefficients of the HH subband and the HL subband of the chrominance component are subjected to inverse wavelet transform in the vertical direction using 5 / 3 integer wavelet transform to obtain the wavelet coefficients of the H subband of the chrominance component.

[0389] Using the 5 / 3 integer wavelet inverse transform, the wavelet coefficients of the HH subband and the HL subband of the luminance component are subjected to inverse wavelet transform in the vertical direction to obtain the wavelet coefficients of the H subband of the luminance component.

[0390] First wavelet inverse transform:

[0391] The wavelet coefficients of the L subband and H subband of the luminance component are subjected to inverse wavelet transform in the horizontal direction using 9 / 7 integer wavelet transform to obtain the reconstructed value of the luminance component.

[0392] The wavelet coefficients of the L-band and H-band of the chrominance component are subjected to inverse wavelet transform in the horizontal direction using 5 / 3 integer wavelet transform to obtain the reconstructed values ​​of the chrominance component.

[0393] For example, the encoder can obtain the reconstructed value of the original image based on the reconstructed values ​​of the luminance component and the chrominance component, which is the reconstructed image described in the above embodiment.

[0394] For example, the 9 / 7 integer wavelet transform achieves better performance on the Y component, but its performance gain on the U / V components is less, and it increases the computational complexity on the chrominance component. Correspondingly, in Method 2, using the less complex 5 / 3 integer wavelet transform on the chrominance component reduces the computational complexity of the chrominance component and improves the overall performance gain.

[0395] Furthermore, in this application, compared to the 9 / 7 floating-point wavelet transform, the 9 / 7 integer wavelet transform is used, which can reduce the complexity of the wavelet transform. When combined with the 5 / 3 integer wavelet transform, it combines the high compression performance of the 9 / 7 integer wavelet transform with the low computational complexity of the 5 / 3 integer wavelet transform, thereby achieving higher benefits and reducing the requirements for hardware design.

[0396] The following is a detailed explanation of the 9 / 7 integer wavelet and the 5 / 3 integer wavelet:

[0397] The wavelet transform encoding and decoding method may optionally include two wavelet transform forms: the first-generation wavelet transform form (also known as filter wavelet transform or convolutional wavelet transform) and the second-generation wavelet transform form (also known as lifting wavelet transform).

[0398] The 5 / 3 integer wavelet transform involved in the embodiments of this application includes both convolutional and lifting forms. The 9 / 7 integer wavelet transform includes both convolutional and lifting forms.

[0399] The following sections explain the different integer wavelet transforms described above:

[0400] Lifting form 5 / 3 integer wavelet forward transform:

[0401] Referring to Figure 24, which is an exemplary schematic diagram of wavelet transform, the image (e.g., the image to be encoded, or any sub-band after the first wavelet transform) is first sampled and decomposed, typically into odd and even decompositions, resulting in two sampled signals: an odd-numbered sampled component and an even-numbered sampled component. The odd-numbered sampled component consists of pixels with odd indices in each row or column of the image (see below for a detailed representation). The even-numbered sampled component consists of pixels with even indices in each row or column of the image (see below for a detailed representation). In some instances, the odd-numbered sampled component consists of pixels in an odd number of rows (or columns) of the image, and the even-numbered sampled component consists of pixels in an even number of rows (or columns) of the image.

[0402] Then, the two sampled signals (i.e., odd-numbered sampled components and even-numbered sampled components) undergo mutual prediction and update processing to obtain approximate components and detail components.

[0403] For example, prediction and update processes can be performed alternately multiple times to obtain the final decomposition result, and are not limited to being performed only once as shown in Figure 2. For two-dimensional images, one-dimensional wavelet transforms are typically performed sequentially in the row (or column) and column (or row) directions, and combined to obtain a two-dimensional wavelet transform. Therefore, an image will yield four sub-images after one wavelet transform. One sub-image (i.e., the LL subband) is called the approximate image, which is a low-resolution approximation of the original image; the other three sub-images (i.e., the LH subband, HH subband, and HL subband) are called detail images, which contain high-frequency information of the original image.

[0404] Specifically, the lifting form of the 5 / 3 integer wavelet transform can be expressed using the following formula:

[0405] Where, x i The input values ​​are the wavelet transform values, such as the chroma or luminance components of a single pixel. Where 0 ≤ i ≤ N-1, and x ranges from x0, ..., x... 2N-1 N represents the number of coefficients in the low-frequency and high-frequency subbands after wavelet transform in the horizontal or vertical direction, and 2N-1 represents the number of pixels in the horizontal or vertical direction of the image to be encoded. This represents the input value after the positional parity split operation. This represents the even-numbered sampled component of an even-numbered pixel. This represents the odd-numbered sampled components of an odd-numbered pixel. These represent the wavelet coefficients after prediction and update processing, respectively, representing the wavelet coefficients of the high-frequency subband and the low-frequency subband. This can be called a predictive component. This can be called the update component. L l and H lLet L represent the wavelet coefficients after scaling, which are the final output of the wavelet forward transform. l H represents the approximate component. l Indicates the detail component.

[0406] Referring to Figure 25, which is an exemplary schematic diagram of the lifting form of the 5 / 3 integer wavelet transform, equations (1) to (4) will be explained below with reference to Figure 25.

[0407] Specifically, referring to formula (1), the wavelet transform unit predicts the odd-numbered sampled components between two adjacent even-numbered sampled components. For example, taking the chromaticity component as an example, based on formula (1), the chromaticity component of pixel x0 is used... and the chromaticity component of 2 pixels (i.e., two adjacent even-numbered sampled components), for the chromaticity component of pixel x1. The prediction is performed to obtain the prediction result of the chromaticity component of pixel x1. These can be denoted as prediction components. Based on the above method, the same processing is performed on each pixel to obtain the prediction components corresponding to each odd-numbered sampling component.

[0408] Referring again to Figure 5, based on formula (2), the predicted components of two adjacent odd-numbered sampled components are used to update the even-numbered sampled components, thus obtaining the update result corresponding to each even-numbered sample point. This can be referred to as the update component. For example, taking the update processing of pixel x0 as an example, specifically, the wavelet transform unit updates pixel x0 based on the predicted components of the odd-numbered sampled components corresponding to the two odd-numbered pixels adjacent to it. In this example, pixel x0 is the starting pixel of the left boundary of the image; thus, the odd-numbered sampled components adjacent to x0 only include x1. In the embodiments of this application, a symmetrical sampling method can be used, based on the odd-numbered sampled components corresponding to the odd-numbered pixels x1 adjacent to x0 and existing in the image. Obtain another odd-numbered pixel that does not exist in the image (e.g., it can be denoted as x). -1 odd-numbered sampled components For example, two values ​​can be equal. The processing for pixel x5 is similar during prediction; for example, the even-numbered sampled components to the right of x5 (i.e., in the diagram)... It can be compared with the even-numbered sampled components to the left of x5 (i.e., in the figure). The values ​​of ) are the same. That is to say, in the embodiments of this application, during the execution of prediction processing or update processing, the components corresponding to pixels that are required for calculation but do not exist in the image can be obtained in a symmetrical manner (which can be sampling components or prediction components).

[0409] Referring again to Figure 25, the wavelet transform unit is based on formula (2) and uses the prediction component of the odd-numbered sampled component corresponding to pixel x1. and pixel x -1 The prediction component of the corresponding odd-numbered sampled components Get the update result corresponding to pixel x0 This can be recorded as an update component.

[0410] For example, the wavelet transform unit can obtain approximate components (e.g., wavelet coefficients of the LL subband of the chrominance component and wavelet coefficients of the HL component of the chrominance component as described in the above embodiment) based on formula (3), that is, based on the update components corresponding to each even-numbered sampling component. That is, the approximate components L corresponding to each even-numbered pixel in Figure 23. l Based on formula (4), that is, based on the prediction components corresponding to each odd-numbered sampling component, the detail components (including, for example, the wavelet coefficients of the LH subband of the chrominance component and the wavelet coefficients of the HH subband of the chrominance component as described in the above embodiment) are obtained, that is, the detail components H corresponding to each odd-numbered pixel in Figure 25. l .

[0411] Referring to Figure 26, which is an exemplary schematic diagram of the first wavelet transform, taking the first wavelet transform as an example of applying a lifting form 5 / 3 integer wavelet transform to the luminance component of each pixel in the image, and combining it with the example in Figure 25, after the first wavelet transform, each pixel in the image obtains the wavelet coefficients of the L subband (i.e., the approximate component mentioned above) and the wavelet coefficients of the H subband (i.e., the detail component mentioned above) of the luminance component. The wavelet coefficients of the L subband of the luminance component include the wavelet coefficients of the chrominance components corresponding to each even-numbered pixel x0, x2, and x4 after the processing shown in Figure 25. The wavelet coefficients of the H subband of the luminance component include the wavelet coefficients of the chrominance components corresponding to each odd-numbered pixel x1, x3, and x5 after the processing shown in Figure 23.

[0412] For example, taking the second wavelet transform as the wavelet coefficients of the L and H subbands of the luminance component of each pixel in the image, and using the lifting form 5 / 3 integer wavelet transform in the vertical direction as an example, based on the processing result shown in Figure 26, the processing flow shown in Figure 25 is executed for each pixel in the vertical direction of the L subband of the luminance component, and the processing flow shown in Figure 23 is executed for each pixel in the vertical direction of the H subband of the luminance component. This yields the wavelet coefficients of the LL and LH subbands of the luminance component obtained based on the wavelet coefficients of the L subband of the luminance component, and the wavelet coefficients of the HL and HH subbands of the luminance component obtained based on the wavelet coefficients of the H subband of the luminance component, as shown in Figure 23. The processing of the chrominance component is similar, and will not be illustrated in detail here.

[0413] Lifting form 5 / 3 integer wavelet inverse transform:

[0414] Referring to Figure 27, which is an exemplary schematic diagram of the inverse wavelet transform, this inverse wavelet transform process is the inverse operation of the forward wavelet transform process on the coding side. It involves updating the approximate components based on the detail components to obtain updated components. Predictions are then made on the detail components based on the updated components to obtain predicted components. Odd-sampled components and even-sampled components are obtained based on the predicted and updated components, respectively. The odd-sampled and even-sampled components are then merged to obtain the reconstructed image.

[0415] Specifically, the lifting form of the 5 / 3 integer wavelet inverse transform can be expressed using the following formula:

[0416] The definitions of each parameter can be found above, and will not be repeated here.

[0417] Referring to Figure 28, which is an exemplary schematic diagram of the lifting form 5 / 3 integer wavelet inverse transform, it can be seen from formulas (8) to (11) and Figure 28 that each operation in the lifting form 5 / 3 integer wavelet inverse transform is the inverse operation of each operation in the lifting form 5 / 3 integer wavelet forward transform. Specifically, taking the chroma component as an example (the luminance component is the same), based on formulas (8) and (9), the wavelet transform unit performs scaling operations based on the chroma components of the pixels in each sub-band to obtain the scaling results corresponding to each pixel. and Then, based on adjacent odd-numbered sampled components, the even-numbered sampled components between two odd-numbered sampled components are updated to obtain the even-numbered sampled components. Based on adjacent even-numbered sampled components, the odd-numbered sampled components between even-numbered sampled components are predicted to obtain the odd-numbered sampled components. By merging the odd-numbered and even-numbered sampled components, the reconstructed image of the original image can be obtained. Similarly, the wavelet transform unit can perform a second inverse wavelet transform in the vertical reverse direction as described above to obtain the reconstruction coefficients of the L subband and the H subband. Then, the first inverse wavelet transform is performed in the horizontal reverse direction as described above to obtain the reconstructed image. Wherein, if the second wavelet transform on the encoding side uses a lifting form 5 / 3 integer wavelet transform, the wavelet transform unit (e.g., the wavelet inverse transform unit in the above embodiment) performs the second inverse wavelet transform based on the lifting form 5 / 3 integer wavelet inverse transform. And, if the first wavelet transform on the encoding side uses a lifting form 5 / 3 integer wavelet transform, the wavelet transform unit performs the first inverse wavelet transform based on the lifting form 5 / 3 integer wavelet inverse transform.

[0418] Convolutional form of 5 / 3 integer wavelet forward transform:

[0419] For example, the convolutional form of the 5 / 3 integer wavelet transform (including forward and inverse transforms) filters the luminance and chrominance components of pixel values ​​using a filter approach. The filter coefficients are shown below:

[0420] Low-frequency filter coefficients: -1 / 8, 1 / 4, 3 / 4, 1 / 4, -1 / 8

[0421] High-frequency filter coefficients: -1 / 4, 1 / 2, -1 / 4

[0422] The corresponding transformation formula is as follows:

[0423] Low-frequency filtering:

[0424] Where 0≤i≤N-1, N is the number of coefficients of the low-frequency subband and high-frequency subband after wavelet transform in the horizontal or vertical direction, and 2N-1 is the number of pixels in the horizontal or vertical direction of the image to be encoded.

[0425] High-frequency filtering:

[0426] Where 0≤i≤N-1, N is the number of coefficients of the low-frequency subband and high-frequency subband after wavelet transform in the horizontal or vertical direction, and 2N-1 is the number of pixels in the horizontal or vertical direction of the image to be encoded.

[0427] The wavelet transform unit performs a first wavelet transform, including: in a first direction (which may be horizontal or vertical), filtering five consecutive pixels (including luminance and / or chrominance components, which will not be repeated below) in the image to be encoded by using a low-pass filter to obtain the wavelet coefficients of the L subband.

[0428] For example, the wavelet transform unit filters three consecutive pixels of the image to be encoded in the first direction based on the high-frequency filtering coefficients mentioned above, to obtain the wavelet coefficients of the H subband.

[0429] Similar to the lifting method, if at least one adjacent pixel does not exist in the image, a corresponding component can be generated using symmetry (or other methods).

[0430] The wavelet transform unit performs a second wavelet transform, including: in a second direction (which can be vertical or horizontal), filtering the wavelet coefficients of three consecutive pixels in the L subband based on the high-frequency filtering coefficients using a high-frequency filter to obtain the wavelet coefficients of the LH subband; and filtering the wavelet coefficients of five consecutive pixels in the L subband based on the low-frequency filtering coefficients using a low-frequency filter to obtain the wavelet coefficients of the LL subband.

[0431] In the second direction (which can be vertical or horizontal), the wavelet coefficients of the H subband are obtained by filtering the wavelet coefficients of three consecutive pixels based on the high-frequency filtering coefficients mentioned above using a high-frequency filter. Then, the wavelet coefficients of the HL subband are obtained by filtering the wavelet coefficients of five consecutive pixels based on the low-frequency filtering coefficients mentioned above using a low-frequency filter.

[0432] Inverse 5 / 3 integer wavelet transform in convolutional form:

[0433] Dual low-frequency filter coefficients: 1 / 2, 1, 1 / 2

[0434] Dual high-frequency filter coefficients: -1 / 4, -1 / 2, 3 / 2, -1 / 2, -1 / 4

[0435] The corresponding transformation formula is as follows:

[0436] Where 0≤i≤N-1, and x ranges from x0,…,x 2N-1 .

[0437] For example, if the second wavelet transform on the encoding side uses a convolutional 5 / 3 integer wavelet transform, the wavelet transform unit (e.g., the wavelet inverse transform unit in the above embodiment) performs the second wavelet inverse transform based on the convolutional 5 / 3 integer wavelet inverse transform, and its operation is the inverse operation of the second wavelet transform. Specifically, the wavelet inverse transform unit filters the reconstruction coefficients of the HH subband (i.e., the reconstructed HH subband in the above embodiment) and the reconstruction coefficients of the HL subband (i.e., the reconstructed HL subband in the above embodiment) in the second direction (which can be vertical or horizontal) based on the dual high-frequency filter coefficients and the dual low-frequency filter coefficients and their corresponding transform formulas (14) and (15), to obtain the reconstruction coefficients of the H subband, which can also be called the reconstructed H subband.

[0438] The wavelet inverse transform unit filters the reconstruction coefficients of the LH subband (i.e., the reconstructed LH subband in the above embodiment) and the reconstruction coefficients of the LL subband (i.e., the reconstructed LL subband in the above embodiment) in the second direction (which can be vertical or horizontal), based on the dual high-frequency filter coefficients and dual low-frequency filter coefficients and their corresponding transformation formulas (14) and (15), to obtain the reconstruction coefficients of the L subband, which can also be called the reconstructed L subband.

[0439] For example, if the first wavelet transform on the encoding side uses a convolutional 5 / 3 integer wavelet transform, the wavelet transform unit performs the first inverse wavelet transform based on the convolutional 5 / 3 integer wavelet inverse transform, which is the inverse operation of the first wavelet transform. Specifically, the wavelet inverse transform unit filters the reconstruction coefficients of the L subband and the H subband based on the dual high-frequency filter coefficients and the dual low-frequency filter coefficients and their corresponding transform formulas (14) and (15) to obtain the reconstructed image of the original image.

[0440] Convolutional form of 9 / 7 integer wavelet forward transform:

[0441] Low-frequency filter coefficients: 1 / 64, 0, -1 / 8, 1 / 4, 23 / 32, 1 / 4, -1 / 8, 0, 1 / 64

[0442] High-frequency filter coefficients: 1 / 32, 0, -9 / 32, 1 / 2, -9 / 32, 0, 1 / 32

[0443] The corresponding transformation formula is as follows:

[0444] Low-frequency filtering:

[0445] Where 0≤i≤N-1, and N is the number of pixels in the horizontal or vertical direction of the image to be encoded.

[0446] High-frequency filtering:

[0447] Where 0≤i≤N-1, N is the number of coefficients of the low-frequency subband and high-frequency subband after wavelet transform in the horizontal or vertical direction, and 2N-1 is the number of pixels in the horizontal or vertical direction of the image to be encoded.

[0448] For a description of its wavelet forward transform method, please refer to the relevant content on the convolutional form of the 5 / 3 integer wavelet forward transform, which will not be repeated here.

[0449] Inverse 9 / 7 integer wavelet transform in convolutional form:

[0450] Dual low-frequency filter coefficients: -1 / 16, 0, 9 / 16, 1, 9 / 16, 0, -1 / 16

[0451] Dual high-frequency filter coefficients: 1 / 32, 0, -1 / 4, -1 / 2, 23 / 16, -1 / 2, -1 / 4, 0, 1 / 32

[0452] The corresponding transformation formula is as follows:

[0453] For a description of its inverse wavelet transform method, please refer to the relevant content on the inverse wavelet transform of the 5 / 3 integer form of convolution, which will not be repeated here.

[0454] For example, filtering using a convolutional 9 / 7 integer wavelet transform may result in a loss of accuracy. To overcome this loss, the inverse wavelet transform unit performs a fixed-point transformation on the result, thereby improving the accuracy of the wavelet coefficients.

[0455] After fixed-point processing, it can be represented as: x 2i =L i -(H i-1 +H i +1>>1)

[0456] x 2i+1 =(9×(L) i +L i+1 )-L i-1 -L i+2 +8>>4)+(H i-2 +H i+2 -(H i-1 +H i+1 <<3)+16>>5)+(23×H i +8>>4)

[0457] Multiplication can be broken down into addition as follows: x 2i+1 =((L) i +L i+1 <<3)+(L i +L i+1 )-L i-1 -L i+2 +8>>4)+(H i-2 +H i+2 -(H i-1 +H i+1 <<3)+16>>5)+((H i <<4)+(H i <<3)-H i +8>>4)

[0458] Where 0≤i≤N-1, and x ranges from x0,…,x 2N-1 .

[0459] For example, as described above, the wavelet transform in this application is a wavelet transform performed on an image. A wavelet transform includes a horizontal transform (i.e., a wavelet transform performed in the horizontal direction) and a vertical transform (i.e., a wavelet transform performed in the vertical direction). This application also provides a post-processing procedure for the wavelet transform, which can reduce the bit width of the wavelet coefficients in the LL subband.

[0460] For example, the post-processing flow of wavelet transform in the embodiments of this application can be applied to any of the wavelet transform architectures in the above embodiments. For example, it can be applied to the wavelet transform architecture including subgraph partitioning units shown in Figures 8 and 11. It can also be applied to the wavelet transform architecture without subgraph partitioning units shown in Figures 6 and 7, the main purpose of which is to reduce the bit width of the wavelet coefficients of the low-frequency subband output by the wavelet transform unit.

[0461] Referring to Figure 29, which is a flowchart illustrating an exemplary encoding method, the wavelet transform post-processing operation in the encoding process will be described in detail with reference to Figure 29, including but not limited to the following steps:

[0462] S2901, perform wavelet transform on the data to be encoded in the original image to obtain the low-frequency wavelet coefficients of the low-frequency sub-band. The low-frequency wavelet coefficients are within the first data range, and the bit width of the low-frequency wavelet coefficients is the first bit width.

[0463] For example, a wavelet transform unit (e.g., a wavelet forward transform unit on the coding side) acquires the data to be encoded from the original image.

[0464] In one example, the data to be encoded from the original image can be the result of precision adjustment applied to the original image. In another example, the data to be encoded from the original image can also be a sub-image resulting from precision adjustment and sub-image partitioning of the original image. That is, in this example, the input object of the wavelet transform is the sub-image. In yet another example, the data to be encoded from the original image can also be the result of precision adjustment, sub-image partitioning, and then macroblock partitioning of the original image. That is, in this example, the input object of the wavelet transform can be a macroblock.

[0465] For example, precision adjustment is used to adjust the precision of the original image. In the embodiments of this application, the processing of the original image may optionally involve processing each pixel in the original image. For example, precision adjustment can also be understood as adjusting the precision of each pixel value in the original image, which will not be repeated below.

[0466] For example, precision adjustment includes increasing precision adjustment and decreasing precision adjustment. Increasing precision adjustment involves shifting each pixel value to the left (which can be represented as "<<") to increase the precision of each pixel. Decreasing precision adjustment involves shifting each pixel value to the right (which can be represented as ">>") to decrease the precision of each pixel.

[0467] In this embodiment, the data range of each pixel in the original image is denoted as the original image data range, and the bit width of each pixel in the original image is denoted as the original image bit width. The data range of each pixel in the data to be encoded is denoted as the data range of the data to be encoded, and the bit width of each pixel in the data to be encoded is denoted as the bit width of the data to be encoded.

[0468] In this embodiment, the wavelet transform unit (or other units preceding the wavelet transform unit, such as a precision adjustment unit (not shown in the figure)) shifts each pixel of the original image to the left, i.e., performs precision adjustment to improve the precision of each pixel. Accordingly, the range of the data to be encoded is different from the range of the original image data, and the bit width of the data to be encoded is greater than the bit width of the original image.

[0469] Referring to Figure 30, which is an exemplary schematic diagram illustrating the changes in data range and bit width, this figure shows the transformation process of the wavelet coefficients of the LL subband. Specifically, the data range of the original image is: [0, 2...]. N -1]. In this embodiment, N is 10. The bit width of the original image is 10 bits. This can be understood as each pixel of the original image being in the range [0, 2]. 10 The data range is [-1]. Each pixel occupies a bit width of 10 bits. The value of N is only an illustrative example; it can be set according to actual needs in other instances, and the bit width occupied by each pixel will change accordingly. That is, the bit width of the original image is related to the maximum value of its data range. Correspondingly, the maximum value of the data range of the original image is also related to the maximum value of the data range and the bit width of the subsequently obtained post-processing wavelet coefficients. In other words, if the data range and bit width of the original image are different, the data range and bit width of the post-processing wavelet coefficients obtained based on the original image will also be different.

[0470] Referring again to Figure 30, the wavelet transform unit (or the previous unit) shifts the original image to the left to obtain the data to be encoded from the original image. In this embodiment, the left shift value can optionally be 2 bits, or other values, depending on actual needs. After the left shift, the data range of the data to be encoded from the original image is: [0, 2...]. 12 -1], its bit width is 12 bits.

[0471] For example, on the encoding side, the wavelet transform unit performs a forward wavelet transform on the data to be encoded to obtain the low-frequency subband wavelet coefficients (e.g., the wavelet coefficients of the low-frequency subband described above) and the high-frequency subband wavelet coefficients (e.g., the wavelet coefficients of the high-frequency subband described above) of the high-frequency subband. The wavelet coefficients of the low-frequency subband are within a first data range (also called a first coefficient range), and their bit width is the first bit width (also called bit depth). The first data range is different from the range of data to be encoded, and the first bit width is different from the bit width of the data to be encoded.

[0472] As mentioned above, a wavelet transform consists of a first wavelet transform and a second wavelet transform, that is, performing one wavelet transform in the horizontal direction and one in the vertical direction to obtain the wavelet coefficients of the LL subband, HL subband, HH subband, and LH subband. Specifically, the low-frequency subband wavelet coefficients of the low-frequency subband mentioned above include the wavelet coefficients of the LL subband, and the high-frequency subband wavelet coefficients of the high-frequency subband include the wavelet coefficients of the HL subband, HH subband, and LH subband.

[0473] In the embodiments of this application, the first wavelet transform and the second wavelet transform are different and can be different combinations of processing objects, wavelet transform directions, and algorithms used.

[0474] In one example, based on different combinations, the data range and bit width of the low-frequency wavelet coefficients obtained after wavelet transform are the same, as shown in Figure 30.

[0475] The data range for the low-frequency wavelet coefficients (i.e., the first data range) is as follows: Where M = 2 12 The bit width (i.e., the first bit width) of low-frequency wavelet coefficients is 14 bits. This can be understood as the data range and bit width of the low-frequency wavelet coefficients being related to the maximum value of the data range of the original image or the data to be encoded in the original image.

[0476] For example, based on Method 2 in the above embodiments, the wavelet transform unit applies a 9 / 7 integer wavelet transform to the luminance component in the horizontal direction and a 5 / 3 integer wavelet transform in the vertical direction. The resulting wavelet coefficients of the low-frequency sub-band of the luminance component have a data range of [data missing]. The bandwidth is 14 bits.

[0477] For example, based on Method 2 in the above embodiments, the wavelet transform unit applies a 5 / 3 integer wavelet transform to the chrominance component in both the horizontal and vertical directions. The resulting wavelet coefficients of the low-frequency subband of the chrominance component have a data range of [data missing]. The bandwidth is 14 bits.

[0478] In another example, based on different combinations, the data range and / or bit width of the high-frequency wavelet coefficients obtained after wavelet transform may be different.

[0479] For example, based on Method 2 in the above embodiments, the wavelet transform unit applies a 9 / 7 integer wavelet transform to the luminance component in the horizontal direction and a 5 / 3 integer wavelet transform in the vertical direction. The wavelet coefficients of the high-frequency subband of the luminance component have the following data range:

[0480] Wavelet coefficients of LH subband:

[0481] Wavelet coefficients of HL subband:

[0482] Wavelet coefficients of HH subband:

[0483] For example, based on Method 2 in the above embodiments, the wavelet transform unit applies a 5 / 3 integer wavelet transform to the luminance component in both the horizontal and vertical directions. The resulting wavelet coefficients of the high-frequency sub-bands of the luminance component have a data range of [data missing].

[0484] Wavelet coefficients of LH subband:

[0485] Wavelet coefficients of HL subband:

[0486] Wavelet coefficients of HH subband:

[0487] The bit width corresponding to the wavelet coefficients of each high-frequency subband can be obtained based on the data range, and this application will not provide examples for each one.

[0488] In the embodiments of this application, the bit width of wavelet coefficients refers to the bit width (also known as bit depth) of each wavelet coefficient. For example, the wavelet coefficients of the LL subband include one or more wavelet coefficients, which can also be understood as a set of multiple wavelet coefficients. The data range and bit width of each wavelet coefficient in the LL subband are equal.

[0489] S2902, perform wavelet transform post-processing on the low-frequency wavelet coefficients to obtain the post-processed wavelet coefficients of the low-frequency sub-band. The post-processed wavelet coefficients are within the second data range and have a bit width of the second bit width. The second data range is different from the first data range, and the second bit width is smaller than the first bit width.

[0490] For example, the wavelet transform post-processing unit obtains low-frequency wavelet coefficients and performs wavelet transform post-processing on the low-frequency wavelet coefficients to obtain the post-processed wavelet coefficients of the low-frequency subband. The wavelet transform post-processing unit can be included within the wavelet transform unit or can be a separate module (or unit).

[0491] As shown in Figure 30, the post-processed wavelet coefficients are within a second data range, which is [0, 2M). The second bit width of the post-processed wavelet coefficients is 13 bits. The first and second data ranges are different, and the second bit width is smaller than the first bit width. In other words, through the wavelet transform post-processing operation in this embodiment, the bit width of the wavelet coefficients in the low-frequency subband is reduced from 14 bits to 13 bits. This allows subsequent processing (such as other steps performed by the low-frequency processing path in Figure 12) to be based on the wavelet coefficients with a reduced bit width of 13 bits, thereby reducing coding complexity and improving coding efficiency.

[0492] For example, the wavelet transform post-processing unit performs wavelet transform post-processing including clipping and offsetting. In one example, the wavelet transform post-processing unit may first perform clipping on the low-frequency wavelet coefficients to obtain the clipped wavelet coefficients of the low-frequency subband. Then, offsetting is performed on the clipped wavelet coefficients to obtain the offset wavelet coefficients, which are the post-processed wavelet coefficients. In another example, the wavelet transform post-processing unit may first perform offsetting to obtain the offset wavelet coefficients of the low-frequency subband, and then perform clipping on the offset wavelet coefficients to obtain the clipped wavelet coefficients, which are the post-processed wavelet coefficients.

[0493] The two methods described above will be explained below.

[0494] Method 1: Wavelet transform post-processing includes: performing truncation processing followed by offset processing.

[0495] Referring to Figure 31, which is an exemplary schematic diagram of wavelet transform post-processing, specifically, the wavelet transform post-processing unit truncates the low-frequency wavelet coefficients to a specified truncation range (e.g., ...). Within ) . The numerical range of the truncated wavelet coefficients of the low-frequency subband after truncation (which can be denoted as the third data range) differs from the numerical range of the low-frequency wavelet coefficients. The third data range is: The third data range is within the first data range, and the bit width of the truncated wavelet coefficients is the first bit width of the low-frequency wavelet coefficients, for example, 14 bits.

[0496] The wavelet transform post-processing unit adds an offset (which can be denoted as the first offset) to the truncated wavelet coefficients. Optionally, the added offset can be greater than 0, less than 0, or equal to 0. In the embodiments of this application, the added offset is taken as... Taking the transformation of the minimum value of the truncated wavelet coefficients after offsetting to 0 as an example, the maximum value of the post-processed wavelet coefficients is related to the maximum value of the image to be encoded or the original image. Referring again to Figure 31, specifically, the wavelet transform post-processing unit adds an offset value to the truncated wavelet coefficients. The offset wavelet coefficients, i.e. the post-processed wavelet coefficients, are obtained. Their corresponding numerical range is [0, 2M), and the corresponding second bit width is 13 bits.

[0497] Method 2: Wavelet transform post-processing includes: performing offset processing followed by truncation processing.

[0498] Referring to Figure 32, which is an exemplary schematic diagram of wavelet transform post-processing, specifically, the wavelet transform post-processing unit adds an offset (which can be denoted as a second offset, and may be the same as or different from the first offset) to the low-frequency wavelet coefficients. In this embodiment, the added offset is used as... For example, specifically, the wavelet transform post-processing unit adds an offset to the low-frequency wavelet coefficients by an amount of... The offset wavelet coefficients are obtained. The fourth numerical range of the offset wavelet coefficients is... The bit width of the offset wavelet coefficients is greater than or equal to the second bit width (i.e., the bit width of the post-processed wavelet coefficients), for example, in the fourth data range, the corresponding bit width is 15 bits.

[0499] The wavelet transform post-processing unit truncates the offset wavelet coefficients to a specified range (e.g., [0, 2M), which falls within the fourth data range). Specifically, the wavelet transform post-processing unit truncates the offset wavelet coefficients to the numerical range [0, 2M) to obtain the post-processed wavelet coefficients. The bit width of the post-processed wavelet coefficients is 13 bits.

[0500] S2903, based on post-processed wavelet coefficients, obtains low-frequency subband coded data.

[0501] Specifically, the low-frequency subband processing unit in the encoder (for example, at least one unit in the low-frequency subband processing path in the above embodiment) obtains post-processed wavelet coefficients with a bit width reduced to 13 bits, and performs other encoding processing procedures on them to obtain low-frequency subband encoded data. The specific processing procedure can be referred to the above embodiment based on the wavelet processing architecture, and will not be repeated here.

[0502] S2904, based on low-frequency subband coded data, obtains the image bitstream of the original image.

[0503] For example, the low-frequency subband entropy coding unit in the encoder writes the low-frequency subband coded data into the image bitstream to obtain the image bitstream of the original image. The image bitstream also includes high-frequency subband coded data generated based on wavelet coefficients of the high-frequency subband.

[0504] In this embodiment, the image corresponding to the post-processed wavelet coefficients can also be used for display on either the encoding or decoding side. For example, before display, the wavelet transform post-processing unit (or other units or modules such as a wavelet transform display unit (not shown in the figure)) can perform pre-display processing to obtain the target wavelet coefficients of the low-frequency sub-band. The target wavelet coefficients are used to display the image corresponding to the low-frequency sub-band at the encoding or decoding end. The bit width of the target wavelet coefficients is equal to the bit width of the original image; this can also be understood as the bit width of each pixel in the processed low-frequency sub-band being equal to the bit width of each pixel in the original image, for example, both being 10 bits, so that the image corresponding to the low-frequency sub-band meets the display requirements of the encoding or decoding end.

[0505] Referring to Figure 33, which is an exemplary schematic diagram of the pre-processing flow for display, the encoder (e.g., a wavelet transform post-processing unit or a pre-processing unit for display, not shown in the figure) subtracts a set offset from the post-processed wavelet coefficients. This set offset is equal to the value of the offset added in the aforementioned wavelet transform post-processing, for example, the offset is... The range of wavelet coefficient values ​​after subtracting the set offset is: Its bit width is 14 bits.

[0506] For example, the encoder shifts the wavelet coefficients to the right after subtracting the offset, effectively reducing their precision. The right shift value is equal to the left shift value of the data to be encoded obtained by shifting the original image to the left, for example, 2 bits, resulting in the right-shifted wavelet coefficients. The numerical range of the right-shifted wavelet coefficients is... Its bit width is 12 bits.

[0507] For example, the encoder performs truncation on the right-shifted wavelet coefficients to obtain the target wavelet coefficients. Specifically, the encoder truncates the right-shifted wavelet coefficients to a specified range, such as [0, 2]. 10 [-1], which means that the numerical range is the same as that of the original image, and its bit width is also the same as that of the original image, for example, 10 bits.

[0508] Referring to Figure 34, which is a schematic flowchart illustrating an exemplary decoding method, the specific steps include, but are not limited to, the following:

[0509] S3401, based on the low-frequency subband encoded data in the image bitstream of the original image, obtain the post-processing wavelet coefficients of the low-frequency subband; wherein, the post-processing wavelet coefficients are within the second data range, and the bit width of the post-processing wavelet coefficients is the second bit width.

[0510] For example, the low-frequency subband entropy decoding unit in the decoder acquires the low-frequency subband encoded data from the image bitstream of the original image, performs entropy decoding and other processing on it, and obtains the post-processing wavelet coefficients of the low-frequency subband. For example, these can be the reconstruction coefficients of the low-frequency subband of the sub-image as described in the above embodiment, or the reconstruction coefficients of the low-frequency subband block of the sub-image. In the case of an encoding / decoding architecture that does not include sub-image partitioning, the post-processing wavelet coefficients of the low-frequency subband obtained by the decoder can also be the reconstruction coefficients of the low-frequency subband of the image or the reconstruction coefficients of the low-frequency subband block.

[0511] The wavelet transform preprocessing unit (also known as the inverse wavelet transform preprocessing unit, which can be included in the inverse wavelet transform unit or placed before the inverse wavelet transform unit) acquires the post-processed wavelet coefficients of the low-frequency subband. The numerical range of the post-processed wavelet coefficients of the low-frequency subband is the second numerical range, for example, [0, 2M), and its bit width is the second bit width, for example, 13 bits.

[0512] S3402, perform wavelet transform preprocessing on the post-processing wavelet coefficients to obtain the low-frequency wavelet coefficients of the low-frequency sub-band; the low-frequency wavelet coefficients are within the first data range, and the bit width of the low-frequency wavelet coefficients is the first bit width; the second data range is different from the first data range, and the second bit width is smaller than the first bit width.

[0513] For example, the wavelet transform preprocessing unit performs wavelet transform preprocessing on the post-processing wavelet coefficients to adjust the bit width of the post-processing wavelet coefficients to be the same as the bit width of the pixels in the data to be encoded, for example, 14 bits, to obtain the low-frequency wavelet coefficients of the low-frequency subband. The range of the low-frequency wavelet coefficients is within a first data range, and the values ​​of the first data range on the decoding side are different from those on the encoding side. Optionally, the first data range on the decoding side can be equal to the truncation range in Method 1 of the wavelet transform post-processing flow described above.

[0514] Referring to Figure 35, which is an exemplary flowchart of wavelet transform preprocessing, the wavelet transform preprocessing unit performs offset processing on the post-processing wavelet coefficients, subtracting a set offset to obtain the pre-processed wavelet coefficients (also known as low-frequency wavelet coefficients). The set offset can optionally be equal to the offset added in the aforementioned wavelet transform post-processing, for example, an offset of... For example, the numerical range of the preprocessing wavelet coefficients is: This numerical range differs from the second numerical range. The bit width of the preprocessing wavelet coefficients is 14 bits, which is greater than the bit width of the postprocessing wavelet coefficients.

[0515] For example, the decoding end can also perform pre-processing on the post-processing wavelet coefficients for display purposes, so that the decoding end can display the image corresponding to the low-frequency subband. The processing flow is the same as that on the encoding side, and will not be described in detail here.

[0516] S3403, based on low-frequency wavelet coefficients, obtains the reconstructed image of the original image.

[0517] For example, the wavelet transform unit (i.e., the inverse wavelet transform unit in the decoder) obtains the low-frequency wavelet coefficients, which can also be understood as the reconstruction coefficients of the low-frequency sub-band (or the reconstruction coefficients of the low-frequency sub-band block) after wavelet transform preprocessing, and the reconstruction coefficients of the high-frequency sub-band (block), and performs the inverse wavelet transform to obtain the reconstructed image of the original image. The specific process can be referred to the above embodiment, and will not be repeated here.

[0518] In one example, FIG36 shows a schematic block diagram of an apparatus 3600 according to an embodiment of the present application. The apparatus 3600 may include a processor 3601 and a transceiver 3602, and optionally, a memory 3603.

[0519] The various components of device 3600 are coupled together via bus 3604, which 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 3604 in the figure.

[0520] Optionally, the memory 3603 can be used to store instructions for implementing the foregoing method embodiments. The processor 3601 can be used to execute the instructions in the memory 3603, and control the transceiver 3602 to receive signals and transmit signals.

[0521] The device 3600 may be the encoder and / or decoder in the above method embodiments. Exemplarily, the device may be a terminal device or a server.

[0522] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0523] This application also provides a chip, including 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 steps of the above-described related method steps to implement the methods in the above embodiments are executed. This embodiment also provides a computer-readable storage medium storing computer instructions, which, when executed on an electronic device, cause the electronic device to execute the above-described related method steps to implement the methods in the above embodiments. Exemplarily, the computer-readable storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0524] This embodiment also provides a computer program product containing computer instructions that, when executed by a computer or processor, cause the computer to perform the aforementioned steps to implement the methods in the above embodiments. Exemplarily, the computer program product can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art.

[0525] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the methods in the above-described method embodiments.

[0526] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0527] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to 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.

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

[0529] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0530] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

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

[0532] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An encoding method, characterized in that, include: Wavelet transform is performed on the data to be encoded in the original image to obtain the low-frequency wavelet coefficients of the low-frequency sub-band. The low-frequency wavelet coefficients are within the first data range, and the bit width of the low-frequency wavelet coefficients is the first bit width. The low-frequency wavelet coefficients are post-processed by wavelet transform to obtain the post-processed wavelet coefficients of the low-frequency sub-band. The post-processed wavelet coefficients are within a second data range and have a bit width of a second bit width. The second data range is different from the first data range, and the second bit width is smaller than the first bit width. Based on the post-processed wavelet coefficients, low-frequency subband coded data is obtained; Based on the low-frequency subband encoded data, the image bitstream of the original image is obtained.

2. The method according to claim 1, characterized in that, The wavelet transform post-processing includes truncation processing and offset processing; wherein, the truncation processing includes truncating the low-frequency wavelet coefficients to obtain the truncated wavelet coefficients of the low-frequency subband, wherein the truncated wavelet coefficients are within a third data range, the bit width of the truncated wavelet coefficients is the first bit width, and the third data range is within the first data range; The offset processing includes adding a first offset to the truncated wavelet coefficients to obtain the post-processed wavelet coefficients.

3. The method according to claim 1, characterized in that, The wavelet transform post-processing includes offset processing and truncation processing. The offset processing includes adding a second offset to the low-frequency wavelet coefficients to obtain the offset wavelet coefficients of the low-frequency sub-band. The offset wavelet coefficients are within the fourth data range, and the bit width of the offset wavelet coefficients is greater than or equal to the second bit width. The truncation process includes truncating the offset wavelet coefficients to obtain the post-processed wavelet coefficients; wherein the second data range is included in the fourth data range.

4. The method according to any one of claims 1-3, characterized in that, The minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded.

5. The method according to any one of claims 1-4, characterized in that, The first bit width is 14 bits, and the second bit width is 13 bits.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: Based on the post-processed wavelet coefficients, the target wavelet coefficients of the low-frequency sub-band are obtained; wherein, the bit width of the target wavelet coefficients of the low-frequency sub-band is a third bit width, and the third bit width is equal to the bit width of the original image. The target wavelet coefficients are used to display the image corresponding to the low-frequency sub-band at the encoding end.

7. The method according to claim 6, characterized in that, The step of obtaining the target wavelet coefficients of the low-frequency sub-band based on the post-processed wavelet coefficients of the low-frequency sub-band includes: The post-processed wavelet coefficients are subtracted by a set offset and then shifted to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; The target wavelet coefficients of the low-frequency sub-band are obtained by truncating the wavelet coefficients after right shifting.

8. The method according to any one of claims 1-7, characterized in that, Before performing wavelet transform on the data to be encoded in the original image, the method further includes: The image data of the original image is shifted to the left to obtain the data to be encoded from the original image.

9. A decoding method, characterized in that, include: Based on the low-frequency subband encoded data in the image bitstream of the original image, the post-processed wavelet coefficients of the low-frequency subband are obtained; wherein, the post-processed wavelet coefficients are within the second data range, and the bit width of the post-processed wavelet coefficients is the second bit width; The post-processed wavelet coefficients are subjected to wavelet transform preprocessing to obtain the low-frequency wavelet coefficients of the low-frequency sub-band; the low-frequency wavelet coefficients are within a first data range, and the bit width of the low-frequency wavelet coefficients is the first bit width; the second data range is different from the first data range, and the second bit width is smaller than the first bit width; Based on the low-frequency wavelet coefficients, a reconstructed image of the original image is obtained.

10. The method according to claim 9, characterized in that, The wavelet transform preprocessing includes offset processing; wherein, the offset processing includes processing the wavelet coefficients backward by subtracting a set offset amount to obtain the low-frequency wavelet coefficients.

11. The method according to claim 9 or 10, characterized in that, The minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded in the original image.

12. The method according to any one of claims 9-11, characterized in that, The first bit width is 14 bits, and the second bit width is 13 bits.

13. The method according to any one of claims 9-12, characterized in that, The method further includes: Based on the post-processed wavelet coefficients, the target wavelet coefficients of the low-frequency sub-band are obtained; wherein, the bit width of the target wavelet coefficients of the low-frequency sub-band is a third bit width, and the third bit width is equal to the bit width of the original image. The target wavelet coefficients are used by the decoder to display the image corresponding to the low-frequency sub-band.

14. The method according to claim 13, characterized in that, The step of obtaining the target wavelet coefficients of the low-frequency sub-band based on the post-processed wavelet coefficients of the low-frequency sub-band includes: The post-processed wavelet coefficients are subtracted by a set offset and then shifted to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; The target wavelet coefficients of the low-frequency sub-band are obtained by truncating the wavelet coefficients after right shifting.

15. An encoder, characterized in that, include: The wavelet transform unit is used to perform wavelet transform on the data to be encoded in the original image to obtain the low-frequency wavelet coefficients of the low-frequency subband. The low-frequency wavelet coefficients are within the first data range, and the bit width of the low-frequency wavelet coefficients is the first bit width. The wavelet transform post-processing unit is used to perform wavelet transform post-processing on the low-frequency wavelet coefficients to obtain the post-processed wavelet coefficients of the low-frequency sub-band. The post-processed wavelet coefficients are within a second data range, and the bit width of the post-processed wavelet coefficients is a second bit width. The second data range is different from the first data range, and the second bit width is smaller than the first bit width. The low-frequency subband processing unit is used to obtain low-frequency subband coded data based on the post-processed wavelet coefficients. The low-frequency subband entropy coding unit is used to obtain the image bitstream of the original image based on the low-frequency subband coding data.

16. The encoder according to claim 15, characterized in that, The wavelet transform post-processing includes truncation processing and offset processing; wherein, the truncation processing includes truncating the low-frequency wavelet coefficients to obtain the truncated wavelet coefficients of the low-frequency subband, wherein the truncated wavelet coefficients are within a third data range, the bit width of the truncated wavelet coefficients is the first bit width, and the third data range is within the first data range; The offset processing includes adding a first offset to the truncated wavelet coefficients to obtain the post-processed wavelet coefficients.

17. The encoder according to claim 15, characterized in that, The wavelet transform post-processing includes offset processing and truncation processing. The offset processing includes adding a second offset to the low-frequency wavelet coefficients to obtain the offset wavelet coefficients of the low-frequency sub-band. The offset wavelet coefficients are within the fourth data range, and the bit width of the offset wavelet coefficients is greater than or equal to the second bit width. The truncation process includes truncating the offset wavelet coefficients to obtain the post-processed wavelet coefficients; wherein the second data range is included in the fourth data range.

18. The encoder according to any one of claims 15-17, characterized in that, The minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded.

19. The encoder according to any one of claims 15-18, characterized in that, The first bit width is 14 bits, and the second bit width is 13 bits.

20. The encoder according to any one of claims 15-19, characterized in that, The encoder also includes: The preprocessing unit is configured to obtain the target wavelet coefficients of the low-frequency sub-band based on the post-processing wavelet coefficients; wherein the bit width of the target wavelet coefficients of the low-frequency sub-band is a third bit width, and the third bit width is equal to the bit width of the original image. The target wavelet coefficients are used to display the image corresponding to the low-frequency sub-band at the encoding end.

21. The encoder according to claim 20, characterized in that, The display preprocessing unit is specifically used for: The post-processed wavelet coefficients are subtracted by a set offset and then shifted to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; The target wavelet coefficients of the low-frequency sub-band are obtained by truncating the wavelet coefficients after right shifting.

22. The encoder according to any one of claims 15-21, characterized in that, The encoder also includes: The precision adjustment unit is used to shift the image data of the original image to the left to obtain the data to be encoded from the original image.

23. A decoder, characterized in that, include: The low-frequency subband entropy decoding unit is used to obtain the post-processing wavelet coefficients of the low-frequency subband based on the low-frequency subband encoded data in the image bitstream of the original image; wherein the post-processing wavelet coefficients are within the second data range and the bit width of the post-processing wavelet coefficients is the second bit width; The wavelet transform preprocessing unit is used to perform wavelet transform preprocessing on the post-processing wavelet coefficients to obtain the low-frequency wavelet coefficients of the low-frequency sub-band; the low-frequency wavelet coefficients are within a first data range, and the bit width of the low-frequency wavelet coefficients is the first bit width; the second data range is different from the first data range, and the second bit width is smaller than the first bit width; The wavelet transform unit is used to obtain the reconstructed image of the original image based on the low-frequency wavelet coefficients.

24. The decoder according to claim 23, characterized in that, The wavelet transform preprocessing includes offset processing; wherein, the offset processing includes processing the wavelet coefficients backward by subtracting a set offset amount to obtain the low-frequency wavelet coefficients.

25. The decoder according to claim 23 or 24, characterized in that, The minimum value of the second data range is 0, and the maximum value of the second data range is related to the maximum value of the data to be encoded in the original image.

26. The decoder according to any one of claims 23-25, characterized in that, The first bit width is 14 bits, and the second bit width is 13 bits.

27. The decoder according to any one of claims 23-26, characterized in that, The encoder also includes: The preprocessing unit is configured to obtain the target wavelet coefficients of the low-frequency sub-band based on the post-processing wavelet coefficients; wherein the bit width of the target wavelet coefficients of the low-frequency sub-band is a third bit width, and the third bit width is equal to the bit width of the original image. The target wavelet coefficients are used by the decoder to display the image corresponding to the low-frequency sub-band.

28. The decoder according to claim 27, characterized in that, The display preprocessing unit is specifically used for: The post-processed wavelet coefficients are subtracted by a set offset and then shifted to the right to obtain the right-shifted wavelet coefficients of the low-frequency sub-band; wherein the bit width of the right-shifted wavelet coefficients is greater than or equal to the third bit width; The target wavelet coefficients of the low-frequency sub-band are obtained by truncating the wavelet coefficients after right shifting.

29. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a computer or processor, cause the steps of the method as described in any one of claims 1 to 14 to be performed.

30. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a bitstream generated according to the encoding method described in any one of claims 1 to 8.