Coding and decoding method, device and equipment
By losing the initial reference image at the encoding and decoding ends, the target reference image for inter-frame prediction is generated, and the problem of reference image storage and reading in the prior art occupies a large amount of resources, achieving the effect of saving storage and bandwidth.
Patent Information
- Application Number
- CN202311491925.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-09
- Publication Date
- 2025-05-09
AI Technical Summary
The prior art occupies a large amount of storage resources and bandwidth when storing and reading reference images, resulting in inefficiency.
The initial reference image is lostly compressed on the encoding and decoding ends respectively to generate a target reference image for inter-frame prediction, which can save the storage resources of the reference image buffer and reduce bandwidth usage.
Through lossy compression technology, the storage resources of the reference image buffer are effectively saved, and the bandwidth usage is reduced overall, improving the efficiency of video encoding.
Smart Images

Figure CN119967161A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of coding and decoding technology, and in particular to a coding and decoding method, device and equipment thereof. Background Art
[0002] In order to save space, video images are transmitted after being encoded. Complete video encoding can include prediction, transformation, quantization, entropy coding, filtering and other processes. For the prediction process, the prediction process can include intra-frame prediction and inter-frame prediction. Inter-frame prediction refers to the use of the correlation in the video time domain to use the pixels of the adjacent encoded images to predict the current pixel, so as to effectively remove the redundancy in the video time domain. Intra-frame prediction refers to the use of the correlation in the video space domain to use the pixels of the encoded blocks of the current frame image to predict the current pixel, so as to remove the redundancy in the video space domain.
[0003] After performing the prediction, transformation, quantization, entropy coding, filtering and other processes, the filtered image (i.e., reference image) can also be stored in the reference image buffer, and the reference image is used as a reference for inter-frame prediction. However, when storing the reference image, a large amount of storage resources of the reference image buffer need to be occupied, and the storage and reading of the reference image need to occupy a large amount of bandwidth. Summary of the invention
[0004] The present application provides a coding and decoding method, apparatus and device thereof, which can save storage resources of a reference image buffer.
[0005] The present application provides a coding and decoding method, the method comprising:
[0006] The encoding end obtains an initial reference image, and performs lossy compression on the initial reference image to obtain a first target reference image, where the first target reference image is used for inter-frame prediction encoding;
[0007] The decoding end obtains an initial reference image, performs lossy compression on the initial reference image to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding;
[0008] The pixel values of the second target reference image are consistent with the pixel values of the first target reference image.
[0009] The present application provides a decoding method, which includes: acquiring an initial reference image; performing lossy compression on the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction decoding.
[0010] The present application provides a coding method, which includes: acquiring an initial reference image; performing lossy compression on the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction coding.
[0011] The present application provides a decoding device, the device comprising:
[0012] The acquisition module is used to acquire an initial reference image; the processing module is used to perform lossy compression on the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction decoding.
[0013] The present application provides an encoding device, the device comprising:
[0014] The acquisition module is used to acquire an initial reference image; the processing module is used to perform lossy compression on the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction coding.
[0015] The present application provides a decoding end device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
[0016] The processor is used to execute machine executable instructions to implement the decoding method of the above example of the present application.
[0017] The present application provides an encoding end device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
[0018] The processor is used to execute machine executable instructions to implement the encoding method of the above example of the present application.
[0019] The present application provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the decoding method or encoding method of the above example of the present application is implemented.
[0020] It can be seen from the above technical solution that in an embodiment of the present application, the encoding end performs lossy compression on the initial reference image to obtain a first target reference image, and the first target reference image is used for inter-frame prediction encoding, and the decoding end performs lossy compression on the initial reference image to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding. In this way, the storage resources of the reference image cache can be saved, and the storage occupancy of the reference image cache can be saved while ensuring the overall bandwidth reduction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1A-Figure 1C It is a schematic diagram of the working principle of the intra-frame prediction mode;
[0022] Figure 2A-2D is a schematic diagram of a shallowly coded video coding framework;
[0023] Figure 3A and Figure 3B is a schematic diagram of the coding framework;
[0024] Figure 4A-4C is a flowchart of a coding and decoding method in one embodiment of the present application;
[0025] Figure 5A-5F is a schematic diagram of lossy compression coding positions in one embodiment of the present application;
[0026] Figure 6A-6D is a schematic diagram of a coding framework in one embodiment of the present application;
[0027] Figure 6E-6J is a schematic diagram of shallow coding in one embodiment of the present application;
[0028] Fig. 7A is a hardware structure diagram of a decoding end device in one embodiment of the present application;
[0029] Figure 7B It is a hardware structure diagram of an encoding end device in one implementation of the present application. DETAILED DESCRIPTION
[0030] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than for limiting the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items. It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information, depending on the context. In addition, the word "if" used can be interpreted as "at ... ", or "when ... ", or "in response to determination".
[0031] In the embodiments of the present application, a coding and decoding method, apparatus and device thereof are proposed, which may involve the following concepts:
[0032] Intra prediction, inter prediction and IBC (intra block copy) prediction:
[0033] Intra-frame prediction refers to the use of the correlation in the video spatial domain to predict the coded blocks of the current block to remove the spatial redundancy of the video. Intra-frame prediction specifies multiple prediction modes, each of which corresponds to a texture direction (except DC mode). For example, if the image texture is arranged horizontally, the horizontal prediction mode can better predict the image information.
[0034] Inter-frame prediction refers to the use of adjacent coded image pixels to predict the pixels of the current image based on the correlation of the video time domain. Since the video sequence contains strong temporal correlation, it can effectively remove the temporal redundancy of the video. The inter-frame prediction part of the video coding standard uses block-based motion compensation technology. The main principle is to find a best matching block in the previously coded image for each pixel block of the current image. This process is called motion estimation (ME).
[0035] Intra Block Copy (IBC) means that the same frame reference is allowed, and the reference data of the current block comes from the same frame. Intra Block Copy can also be called Intra Block Copy. In the intra block copy technology, the block vector of the current block can be used to obtain the prediction value of the current block. For example, based on the characteristic that there are a large number of repeated textures in the same frame of the screen content, when the block vector is used to obtain the prediction value of the current block, the compression efficiency of the screen content sequence can be improved.
[0036] Prediction Signal: Prediction signal refers to the pixel value derived from the coded pixel. The residual is obtained by the difference between the original pixel and the predicted pixel, and then the residual transform quantization and coefficient encoding are performed. The prediction pixel between frames refers to the pixel value derived from the reference frame of the current block. Since the pixel position is discrete, interpolation operation is required to obtain the final prediction pixel. The closer the predicted pixel is to the original pixel, the smaller the residual energy obtained by subtracting the two, and the higher the coding compression performance.
[0037] Intra-frame prediction mode: In intra-frame coding, the intra-frame prediction mode is used for motion compensation, that is, the intra-frame prediction mode is used to obtain the prediction value of the current block. The intra-frame prediction mode is a mode that only uses the reconstruction value and prediction value of the current frame for prediction. For example, the intra-frame prediction mode may include but is not limited to the DC mode, bilinear mode, angle prediction mode (such as horizontal angle prediction mode, vertical angle prediction mode, etc., there is no restriction on this angle prediction mode, it can be any angle, such as 33 angle modes or 67 angle modes), IBC mode, ISC mode, Planar mode, point-by-point prediction mode.
[0038] DC mode and angle prediction mode can be found in Figure 1AAs shown in the figure, the DC mode is suitable for large flat areas, and the average value of the surrounding pixels of the current block is used as the prediction value of the current block. The angle prediction mode uses the value of the surrounding pixels of the current block pointed to by a certain angle as the prediction value of the current block. Figure 1A In the figure, a is a schematic diagram of the DC mode, where the average of the 16 reference pixels on the upper side of "D" is used as the predicted value of "D". b is a schematic diagram of angle prediction mode 1, indicating that the value of the reference pixel pointed to by the angle is used as the predicted value of the current block. c is a schematic diagram of angle prediction mode 2, d is a schematic diagram of angle prediction mode 3, e is a schematic diagram of angle prediction mode 4, f is a schematic diagram of angle prediction mode 6, and g is a schematic diagram of angle prediction mode 6.
[0039] bilinear mode is bilinear interpolation mode, see Figure 1B As shown, the prediction process of the bilinear mode is as follows: first, the prediction value of the lower right corner C position is generated (the weighted average of the upper right corner reference pixel A and the lower left corner reference pixel B), then the prediction value of the right boundary AC position is generated (the weighted average of the prediction value of the upper right corner reference pixel A and the lower right corner C position), and then the prediction value of the lower boundary BC position is generated (the weighted average of the prediction value of the lower left corner reference pixel B and the lower right corner C position), and the prediction values of the remaining other internal pixels are generated by the weighted average of the horizontal linear prediction and the vertical linear prediction. The prediction value generated by the horizontal linear prediction is the weighted average of the prediction value of the reference pixel L at the corresponding position on the left and the prediction value of the right boundary AC position; the prediction value generated by the vertical linear prediction is the weighted average of the prediction value of the reference pixel T at the corresponding position on the top and the prediction value of the lower boundary BC position.
[0040] Planar mode (or Plane mode) is suitable for areas where pixel values change slowly. It uses two linear filters in the horizontal and vertical directions and takes the average of the two as the predicted value of the current block pixel. Planar mode is a gradient mode. Planar mode is an intra-frame prediction mode that uses reference pixels at different positions and different weight parameters to obtain the predicted value.
[0041] The IBC mode (Intra Block Copy) uses the decoded part of the current frame to perform a motion estimation-like method to obtain the prediction value of the current block. The ISC mode (Intra String Copy) arranges the pixels in the current block into several one-dimensional pixel groups in a certain scanning order (generally a horizontal raster scanning order or a vertical raster scanning order), and performs a motion estimation-like method on each pixel group to obtain the prediction value of the pixel group.
[0042] Point-by-point prediction mode, see Figure 1CAs shown in FIG. 4 , it is a schematic diagram of four point-by-point prediction modes for a 16*2 pixel block. For example, there may be four point-by-point prediction modes for a 16*2 pixel block, and each point-by-point prediction mode uses a 16*2 entire block as a basic unit for prediction. Figure 1C In , ≡ is used to indicate that the predicted value of the current pixel is obtained by averaging the reconstructed values of the left and right pixels; ||| is used to indicate that the predicted value of the current pixel is obtained by averaging the reconstructed values of the upper and lower pixels; > is used to indicate that the reconstructed value of the left pixel is directly used as the predicted value of the current pixel; ∨ is used to indicate that the reconstructed value of the upper pixel is directly used as the predicted value of the current pixel. Figure 1C It can be seen that for point-by-point prediction mode 1, the prediction of Group 2 needs to rely on the reconstruction of Group 1, and for point-by-point prediction mode 2, the prediction of Group 1 needs to rely on the reconstruction of Group 2.
[0043] Rate-Distortion Optimized: There are two major indicators for evaluating coding efficiency: bit rate and PSNR (Peak Signal to Noise Ratio). The smaller the bit stream, the greater the compression rate, and the greater the PSNR, the better the quality of the reconstructed image. When selecting a mode, the discriminant formula is essentially a comprehensive evaluation of the two. For example, the cost corresponding to the mode: J(mode) = D + λ*R, where D represents Distortion, which can usually be measured using the SSE indicator. SSE refers to the mean square sum of the difference between the reconstructed image block and the source image. In order to achieve cost considerations, the SAD indicator can also be used. SAD refers to the sum of the absolute values of the difference between the reconstructed image block and the source image; λ is the Lagrange multiplier, and R is the actual number of bits required for encoding the image block in this mode, including the sum of bits required for encoding mode information, motion information, residuals, etc. When selecting a mode, if the rate-distortion principle is used to make a comparison decision on the encoding mode, the best encoding performance can usually be guaranteed.
[0044] Code control: Control the stability of the bit rate, generally by adjusting the quantization step size to achieve the goal of bit rate stability.
[0045] Bitstream Buffer: In shallow compression scenarios, there is a bitstream buffer for storing the bits of each coding unit. In fixed bit rate control scenarios, the bitstream buffer will put the bits of each coding unit into the bitstream buffer after encoding, and remove a certain number of bits from the bitstream buffer. The purpose of shallow compression bitrate control is to prevent the bitstream buffer from overflowing or underflowing. Overflow means that the bitstream buffer is full but there are still bits that have not been put into the buffer, and underflow means that there are no bits in the bitstream buffer but the number of bits that have been removed does not reach the required number.
[0046] Fallback Mode: The fallback mode is mainly used to ensure that the code stream buffer does not overflow. The number of bits encoded using this fallback mode can be less than or equal to the fixed number of bits that need to be removed from the code stream buffer. After encoding / decoding the fallback mode, the "water level" of the code stream buffer will not rise, thereby preventing overflow. In the prediction mode of shallow coding, this fallback mode is generally included to strictly control the compression rate.
[0047] Entropy Coding: Entropy coding refers to a lossless coding method based on the principle of information entropy. It is the last processing module of video compression, which converts a series of element symbols used to represent the video sequence into a binary code stream for transmission or storage. The output data of the entropy coding module is the final code stream after the original video is compressed. Entropy coding can effectively remove the statistical redundancy of these video element symbols and is one of the important tools to ensure the efficiency of video coding compression.
[0048] Shallow coding: Shallow coding is a way to implement prediction technology. Shallow coding is a simple prediction method that is suitable for application scenarios with high real-time requirements, small cache, and high parallel requirements. Shallow coding has low compression efficiency and can use intra-frame prediction with a low compression ratio. In the implementation process of shallow coding, subjective losslessness and simple hardware implementation are generally required.
[0049] Shallow video coding framework: see Figure 2A , which is a video encoding framework of the encoding end, and the video encoding framework can be used to implement the encoding end processing flow of the embodiment of the present application, that is, to implement shallow encoding. Figure 2A Similarly, without repeating the details here, the video decoding framework can be used to implement the decoding end processing flow of the embodiment of the present application.
[0050] For example, see Figure 2A As shown, the video encoding framework may include modules such as block division, prediction, transformation, quantization, code control, entropy encoder, inverse quantization, inverse transformation, and reconstruction. At the encoding end, the encoding end processing flow can be realized through the cooperation between these modules. In addition, the video decoding framework may include modules such as block division, prediction, transformation, quantization, code control, entropy decoder, inverse quantization, inverse transformation, and reconstruction. In this case, the code control module belonging to the encoding end may also act on the decoding end to save the encoding cost of the quantization parameter and control the prediction mode. Alternatively, the video decoding framework may include modules such as block division, prediction, transformation, quantization, entropy decoder, inverse quantization, inverse transformation, and reconstruction. In this case, there is no code control module. At the decoding end, the decoding end processing flow can be realized through the cooperation between these modules.
[0051] Exemplarily, in a shallow compression scenario, the code control technology is applied to a code control unit, and the code control unit is the scope of the code control, which means that the code control operation is performed on the code control unit. For example, the code control unit can be several image blocks, or the code control unit can be several pixel rows, or the code control unit can be the entire Slice, or the code control unit can be several pixel blocks inside a Slice, or the code control unit can be several pixel rows inside a Slice, etc. Of course, the above are just a few examples of code control units, and there is no limitation on this code control unit. On this basis, the pixel blocks in each code control unit can be predicted, transformed, quantized, and the like, and the mode selection of the prediction part is participated by the code control. After the pixel block is reconstructed, the reconstruction value adjustment operation can be performed.
[0052] The following is a brief introduction to the structure of the encoding and decoding ends. Figure 2B , a schematic block diagram of an example of an encoding end for implementing an embodiment of the present application is shown. Figure 2B In the embodiment, the encoding end includes a prediction processing unit, a residual calculation unit, a transform processing unit, a quantization unit, an encoding unit, an inverse quantization unit (also referred to as an inverse quantization unit), an inverse transform processing unit (also referred to as an inverse transform processing unit), a reconstruction unit (or referred to as a reconstruction unit), and a filter unit. In one example, the encoding end may further include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed image blocks output by the reconstruction unit, and the decoded image buffer is used to cache the filtered image blocks output by the filter unit.
[0053] The input of the encoding end (also called an encoder) is an image block of an image (which can be called an image to be encoded), and the image block can also be called a current block or a block to be encoded. The encoding end can also include a segmentation unit (not shown in the figure), which is used to segment the image to be encoded into multiple image blocks. The encoding end is used to encode block by block to complete the encoding of the image to be encoded, for example, to perform the encoding process on each image block. The prediction processing unit is used to receive or obtain an image block (the current image block to be encoded of the current image to be encoded, which can also be called a current block, and the image block can be understood as the true value of the image block) and reconstructed image data, and predict the current block based on the relevant data in the reconstructed image data to obtain a prediction block of the current block. In an example, the prediction processing unit can include an inter-frame prediction unit, an intra-frame prediction unit and a mode selection unit, and the mode selection unit is used to select an intra-frame prediction mode or an inter-frame prediction mode. If the intra-frame prediction mode is selected, the prediction process is performed by the intra-frame prediction unit, and if the inter-frame prediction mode is selected, the prediction process can be performed by the inter-frame prediction unit.
[0054] The residual calculation unit is used to calculate the residual between the real value of the image block and the prediction block of the image block to obtain the residual block. For example, the residual calculation unit can subtract the pixel value of the prediction block from the pixel value of the image block pixel by pixel.
[0055] The transform processing unit is used to perform a transform, such as discrete cosine transform (DCT) or discrete sine transform (DST), on the residual block to obtain a transform coefficient in the transform domain. The transform coefficient may also be referred to as a transform residual coefficient, which may represent the residual block in the transform domain.
[0056] The quantization unit is used to quantize the transform coefficients by applying scalar quantization or vector quantization to obtain quantized transform coefficients, which may also be referred to as quantized residual coefficients. The quantization process may reduce the bit depth associated with some or all of the transform coefficients. For example, an n-bit transform coefficient may be rounded down to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, for scalar quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. A suitable quantization step size may be indicated by a quantization parameter (QP).
[0057] The coding unit is used to encode the above-mentioned quantized residual coefficients, output the encoded image data (i.e., the encoding result of the current image block to be encoded) in the form of an encoded bit stream, and then transmit the encoded bit stream to the decoder, or store it, and then transmit it to the decoder or use it for retrieval. The coding unit can also be used to encode other syntax elements of the current image block, such as encoding the prediction mode into the bit stream, etc. The coding algorithm includes but is not limited to a variable length coding (VLC) algorithm, a context adaptive VLC (CAVLC) algorithm, an arithmetic coding algorithm, a context adaptive binary arithmetic coding (CABAC) algorithm, a syntax-based context-adaptive binary arithmetic coding (SBAC) algorithm, and a probability interval partitioning entropy (PIPE) algorithm.
[0058] The inverse quantization unit is used to inversely quantize the quantized coefficients to obtain inversely quantized coefficients, where the inverse quantization is a reverse application of the quantization unit, for example, based on or using the same quantization step size as the quantization unit, applying an inverse quantization scheme of the quantization scheme applied by the quantization unit. The inversely quantized coefficients may also be referred to as inversely quantized residual coefficients.
[0059] The inverse transform processing unit is used to perform an inverse transform on the inverse quantized coefficients. It should be understood that the inverse transform is the reverse application of the transform processing unit. For example, the inverse transform may include an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) to obtain an inverse transform block in a pixel domain (or sample domain). The inverse transform block may also be referred to as an inverse transform dequantized block or an inverse transform residual block.
[0060] The reconstruction unit is used to add the inverse transform block (i.e., the inverse transform residual block) to the prediction block to obtain a reconstructed block in the sample domain. The reconstruction unit can be a summer, for example, adding the sample value (i.e., pixel value) of the residual block to the sample value of the prediction block. The reconstructed block output by the reconstruction unit can be subsequently used to predict other image blocks, for example, in an intra-frame prediction mode.
[0061] The filter unit (or simply "filter") is used to filter the reconstructed block to obtain a filtered block, so as to smoothly perform pixel conversion or improve image quality. The filter unit can be a loop filter unit, which is intended to represent one or more loop filters. For example, the filter unit can be a deblocking filter, a sample adaptive offset (sample-adaptive offset, SAO) filter or other filters, such as a bilateral filter, an adaptive loop filter (adaptive loop filter, ALF), or a sharpening or smoothing filter, or a collaborative filter. In an example, the filtered block output by the filter unit can be subsequently used to predict other image blocks, for example, in an inter-frame prediction mode, without limitation.
[0062] See also Figure 2C , a schematic block diagram of an example of a decoding end (also referred to as a decoder) for implementing an embodiment of the present application is shown. The decoder is used to receive, for example, encoded image data (i.e., an encoded bit stream, for example, an encoded bit stream including an image block and associated syntax elements) encoded by an encoder to obtain a decoded image. The decoder includes a decoding unit, an inverse quantization unit, an inverse transform processing unit, a prediction processing unit, a reconstruction unit, and a filter unit. In some examples, the decoder may perform operations substantially similar to Figure 2BThe decoding pass is the inverse of the encoding pass described by the encoder. In one example, the decoder may further include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed image blocks output by the reconstruction unit, and the decoded image buffer is used to cache the filtered image blocks output by the filter unit.
[0063] The decoding unit is used to decode the encoded image data to obtain quantized coefficients and / or decoded encoding parameters (for example, the decoded parameters may include any one or all of inter-frame prediction parameters, intra-frame prediction parameters, filter parameters and / or other syntax elements). The decoding unit is also used to forward the above-mentioned decoded encoding parameters to the prediction processing unit so that the prediction processing unit performs a prediction process according to the encoding parameters. The function of the inverse quantization unit may be the same as that of the inverse quantization unit of the encoder, and is used to inverse quantize (i.e., inverse quantize) the quantized coefficients decoded by the decoding unit.
[0064] The function of the inverse transform processing unit may be the same as that of the inverse transform processing unit of the encoder, and the function of the reconstruction unit (e.g., the summer) may be the same as that of the reconstruction unit of the encoder, and is used to perform an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) on the above-mentioned quantized coefficients to obtain an inverse transform block (also referred to as an inverse transform residual block), which is the residual block of the current image block in the pixel domain.
[0065] A prediction processing unit is used to receive or obtain encoded image data (e.g., an encoded bit stream of a current image block) and reconstructed image data. The prediction processing unit can also receive or obtain prediction-related parameters and / or information about a selected prediction mode (i.e., decoded encoding parameters) from, for example, a decoding unit, and predict the current image block based on the relevant data in the reconstructed image data and the decoded encoding parameters to obtain a prediction block of the current image block.
[0066] In one example, the prediction processing unit may include an inter-frame prediction unit, an intra-frame prediction unit and a mode selection unit. The mode selection unit is used to select an intra-frame prediction mode or an inter-frame prediction mode. If the intra-frame prediction mode is selected, the prediction process is performed by the intra-frame prediction unit. If the inter-frame prediction mode is selected, the prediction process is performed by the inter-frame prediction unit.
[0067] The reconstruction unit is used to add the inverse transform block (ie, the inverse transform residual block) to the prediction block to obtain a reconstructed block in the sample domain. For example, the sample values of the inverse transform residual block may be added to the sample values of the prediction block.
[0068] The filter unit is used for filtering the reconstructed block to obtain a filtered block, where the filtered block is a decoded image block.
[0069] It should be understood that in the encoder and decoder of the embodiments of the present application, the processing results of a certain link can also be further processed before being output to the next link. For example, after interpolation filtering, motion vector derivation or filtering, the processing results of the corresponding link are further subjected to operations such as Clip or shift.
[0070] Based on the encoder and the decoder, the embodiment of the present application provides a possible encoding and decoding implementation method, such as Figure 2D As shown, Figure 2D A schematic diagram of a coding and decoding process provided in an embodiment of the present application, wherein the coding and decoding implementation method includes process ① to process ⑤, and process ① to process ⑤ can be performed by the above-mentioned decoder and encoder. Process ①: Divide a frame of image into one or more non-overlapping parallel units. There is no dependency between one or more parallel units, and they can be completely parallel / independently coded and decoded, such as Figure 2D A parallel unit 1 and a parallel unit 2 are shown.
[0071] Process ②: For each parallel unit, it can be divided into one or more non-overlapping independent coding units. Each independent coding unit may not depend on each other, but may share some parallel unit header information. For example, the width of an independent coding unit is w_lcu and the height is h_lcu. If a parallel unit is divided into an independent coding unit, the size of the independent coding unit is exactly the same as the parallel unit; otherwise, the width of the independent coding unit should be greater than the height (unless it is an edge area).
[0072] Typically, the independent coding unit may be a fixed w_lcu×h_lcu, where w_lcu and h_lcu are both 2 to the power of N (N≥0), such as the size of the independent coding unit is 128×4, 64×4, 32×4, 16×4, 8×4, 32×2, 16×2 or 8×2.
[0073] As a possible example, the independent coding unit can be a fixed 128×4. If the size of the parallel unit is 256×8, the parallel unit can be equally divided into 4 independent coding units; if the size of the parallel unit is 288×10, the parallel unit is divided into: the first / second line is 2 128×4 + 1 32×4 independent coding units; the third line is 2 128×2 + 1 32×2 independent coding units. It is worth noting that the independent coding unit can include three components of brightness Y, chrominance Cb, and chrominance Cr, or three components of red (red, R), green (green, G), and blue (blue, B), or three components of brightness Y, chrominance Co, and chrominance Cg, or only one of them. If the independent coding unit contains three components, the sizes of the three components can be exactly the same or different, which is related to the input format of the image.
[0074] Process ③: For each independent coding unit (if any) or parallel unit, it can be further divided into one or more non-overlapping coding units. The coding units in the independent coding unit can be dependent on each other, such as multiple coding units can perform mutual reference pre-coding and decoding.
[0075] If the coding unit is the same size as the independent coding unit (i.e., the independent coding unit is divided into only one coding unit), its size may be all the sizes described in process ②. If the independent coding unit is divided into multiple non-overlapping coding units, its feasible division examples may include but are not limited to: horizontal equal division (the height of the coding unit is the same as that of the independent coding unit, but the width is different, which may be 1 / 2, 1 / 4, 1 / 8, 1 / 16, etc.), vertical equal division (the width of the coding unit is the same as that of the independent coding unit, but the height is different, which may be 1 / 2, 1 / 4, 1 / 8, 1 / 16, etc.), horizontal and vertical equal division (quadtree division), etc., preferably horizontal equal division.
[0076] The width of the coding unit is w_cu, and the height of the coding unit is h_cu. The width of the coding unit should be greater than the height (unless it is an edge area). Usually, the coding unit can be a fixed w_cu x h_cu, where w_cu and h_cu are both 2N powers (N is greater than or equal to 0), such as 16x4, 8x4, 16x2, 8x2, 8x1, 4x1, etc. As a possible example, the coding unit can be a fixed 16x4. If the size of the independent coding unit is 64x4, the independent coding unit can be divided into 4 coding units; if the size of the independent coding unit is 72x4, the coding unit can be divided into: 4 16x4 + 1 8x4. It is worth noting that the coding unit can include three components of luminance Y, chrominance Cb, and chrominance Cr (or three components of red R, green G, and blue B, or luminance Y, chrominance Co, and chrominance Cg), or it can only include one of the components. If it contains three components, the sizes of the components can be exactly the same or different, which depends on the image input format.
[0077] It is worth noting that process ③ can be an optional step in the encoding and decoding method, and the encoder and decoder can encode or decode the residual coefficients (or residual values) of the independent coding units obtained in process ②.
[0078] Process ④: For the coding unit, it can be further divided into one or more non-overlapping prediction groups (Prediction Group, PG), PG is also referred to as Group, each PG is encoded and decoded according to the selected prediction mode to obtain the prediction value of PG, which constitutes the prediction value of the entire coding unit, and the residual value of the coding unit is obtained based on the prediction value and the original value of the coding unit.
[0079] Process ⑤: Based on the residual values of the coding units, the coding units can be grouped to obtain one or more non-overlapping residual blocks (RBs), and the residual coefficients of each RB are encoded and decoded according to the selected mode to form a residual coefficient stream. Specifically, it can be divided into two categories: transforming the residual coefficients and not transforming them.
[0080] Among them, the selected mode of the residual coefficient encoding and decoding method in process ⑤ may include, but is not limited to any of the following: semi-fixed length encoding method, exponential Golomb encoding method, Golomb-Rice encoding method, truncated unary code encoding method, run-length encoding method, direct encoding of original residual values, etc. For example, the encoder may directly encode the coefficients in the RB. For another example, the encoder may also transform the residual block, such as DCT, DST, Hadamard transform, etc., and then encode the transformed coefficients. As a possible example, when the RB is small, the encoder may directly quantize each coefficient in the RB and then perform binary encoding. If the RB is large, it can be further divided into multiple coefficient groups (coefficient groups, CG), and then each CG is uniformly quantized and then binarized. In some embodiments of the present application, the coefficient group (CG) and the quantization group (QG) may be the same, and of course, the coefficient group and the quantization group may also be different.
[0081] The following is an exemplary explanation of the residual coefficient encoding part in a semi-fixed length coding method. First, the maximum value of the absolute value of the residual in an RB block is defined as the modified maximum value (modified maximum, mm). Secondly, the number of coding bits for the residual coefficient in the RB block is determined (the number of coding bits for the residual coefficient in the same RB block is consistent). For example, if the critical limit (CL) of the current RB block is 2 and the current residual coefficient is 1, then 2 bits are required to encode the residual coefficient 1, which is expressed as 01. If the CL of the current RB block is 7, it means encoding an 8-bit residual coefficient and a 1-bit sign bit. The determination of CL is to find the minimum M value that satisfies that all residuals of the current sub-block are within the range of [-2^(M-1), 2^(M-1)]. If both -2^(M-1) and 2^(M-1) exist, M increases by 1, that is, M+1 bits are needed to encode all the residuals of the current RB block; if only one of the two boundary values -2^(M-1) and 2^(M-1) exists, a trailing bit is encoded to determine whether the boundary value is -2^(M-1) or 2^(M-1); if all residuals do not exist in either -2^(M-1) or 2^(M-1), there is no need to encode the trailing bit. For some special cases, the encoder can directly encode the original value of the image instead of the residual value.
[0082] For example, see Figure 3A As shown, it is a schematic diagram of the coding framework. The complete video coding method generally includes prediction (such as intra-frame prediction, SCC prediction, inter-frame prediction, etc.), transformation, quantization, entropy coding, filtering (such as in-loop filtering) and other processes. After performing the prediction, transformation, quantization, entropy coding, filtering and other processes, the filtered image (i.e., reference image) can also be stored in the reference image buffer, and the reference image is used as a reference for inter-frame prediction. For example, in the inter-frame prediction process, due to the strong temporal correlation of the video, that is, two adjacent frames in the temporal domain have many similar image blocks, the image block of the current frame is often motion searched in the adjacent reference image (i.e., reference image), and the block that best matches the current block is found as the reference block. Among them, the reference image is managed by the reference image buffer, that is, the reference image is stored by the reference image buffer.
[0083] However, when the reference image is stored in the reference image buffer, the content of the reference image buffer is the pixel value of the reference image, which occupies a large space. In implementation, the reference image buffer is often a separate storage space (such as DDR), and the direct cache of the reference image requires a large storage resource. In addition, when performing inter-frame prediction, the direct storage and reading of pixel values occupies a large bandwidth and easily becomes a bandwidth bottleneck.
[0084] In order to reduce the bandwidth for storing and reading reference images, compression can be used to reduce the average bandwidth pressure of reference images. Figure 3B As shown, after obtaining the filtered image (i.e., the reference image), the reference image can be losslessly compressed and encoded. In this way, when reading the reference image from the reference image buffer, all or part of the code stream after the reference image is losslessly compressed and encoded is read from the reference image buffer, and then all or part of the code stream is losslessly compressed and decoded, and the reference image or reference pixel (a part of the reference image) after lossless compression and decoding is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction based on the reference image or reference pixel.
[0085] However, due to the low compression efficiency of the lossless compression algorithm, the amount of data after compression may even be larger than the amount of data before compression. Therefore, the effect of bandwidth compression varies with the image content, and does not alleviate the occupied capacity of the reference image buffer, and it is often necessary to allocate storage space according to the worst case scenario.
[0086] In view of the above findings, an encoding and decoding method is proposed in an embodiment of the present application. The encoding and decoding method is a lossy image compression method that can save the storage occupancy of the reference image buffer while ensuring that the overall bandwidth is further reduced.
[0087] The following is a detailed description of the encoding and decoding method in the embodiments of the present application in conjunction with several specific embodiments.
[0088] Embodiment 1: In the embodiment of the present application, a coding method is proposed, see Figure 4A As shown, it is a flowchart of the encoding and decoding method. The method can be applied to an encoding end (also called a video encoder) and a decoding end (also called a video decoder). The encoding end and the decoding end can also be an encoder and a decoder of intelligent encoding. Figure 4A This is just an example and is not limited to this. That is, the encoding end and the decoding end cooperate to implement the encoding and decoding method. The method may include:
[0089] Step 401: The encoding end obtains an initial reference image, and performs lossy compression on the initial reference image to obtain a first target reference image, wherein the first target reference image is used for inter-frame prediction coding.
[0090] Step 402: The decoding end obtains an initial reference image, and performs lossy compression on the initial reference image to obtain a second target reference image, wherein the second target reference image is used for inter-frame prediction decoding.
[0091] Exemplarily, the pixel values of the second target reference image are consistent with the pixel values of the first target reference image.
[0092] Exemplarily, any pixel value of the second target reference image is consistent with a pixel value of a corresponding position of the first target reference image.
[0093] Exemplarily, the pixel values of the first target reference image are inconsistent with the pixel values of the initial reference image.
[0094] Exemplarily, there is a pixel value of the first target reference image that is inconsistent with a pixel value at a corresponding position of the initial reference image.
[0095] Exemplarily, if the initial reference image is an image used for inter-frame prediction, the encoder may perform lossy compression on the initial reference image to obtain a first target reference image, and the decoder may perform lossy compression on the initial reference image to obtain a second target reference image. If the initial reference image is not an image used for inter-frame prediction, the encoder may perform lossy compression on the initial reference image to obtain a first target reference image, and the decoder may perform lossy compression on the initial reference image to obtain a second target reference image; or, the encoder may use the initial reference image as the first target reference image, and the decoder may use the initial reference image as the second target reference image, or, other methods may be used to process the initial reference image.
[0096] Exemplarily, the initial reference image obtained by the decoding end and the initial reference image obtained by the encoding end may correspond to the same image, on this basis, the pixel value of the second target reference image is consistent with the pixel value of the first target reference image. The same image can be determined by at least one of the following attributes: image display order, image decoding order, and image attributes (whether it is a long-term reference frame, whether it is a knowledge image, etc.). For example, images with the same image display order can be determined as the same image, or images that are both knowledge images and have the same knowledge image index can be determined as the same image, or images that are both non-long-term reference frames and have the same image decoding order can be determined as the same image, and there is no limitation on this.
[0097] In a possible implementation, with respect to step 401, after obtaining the initial reference image, the encoder performs lossy compression on the initial reference image to obtain the first target reference image, which may include but is not limited to the following methods:
[0098] The encoding end performs lossy compression encoding on the initial reference image to obtain a first code stream, and stores the first code stream in a first cache module; obtains the first code stream from the first cache module, and performs lossy compression decoding on the first code stream to obtain a first target reference image.
[0099] The encoding end performs lossy compression encoding on the initial reference image to obtain a first target reference image, stores the first target reference image in a first cache module; and obtains the first target reference image from the first cache module.
[0100] The encoding end performs lossy compression encoding on the initial reference image to obtain a first code stream, performs lossy compression decoding on the first code stream to obtain a first target reference image, and stores the first target reference image in a first cache module (i.e., what is stored is an image after lossy compression encoding and lossy compression decoding); and obtains the first target reference image from the first cache module.
[0101] The encoding end performs lossy compression encoding on the initial reference image to obtain a first target reference image, performs lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream (i.e., a code stream after lossless compression encoding), and stores the first lossless compressed code stream in a first cache module; obtains the first lossless compressed code stream from the first cache module, and performs lossless compression decoding on the first lossless compressed code stream to obtain the first target reference image.
[0102] The encoding end performs lossy compression encoding on the initial reference image to obtain a first bitstream, performs lossy compression decoding on the first bitstream to obtain a first target reference image, performs lossless compression encoding on the first target reference image to obtain a first lossless compressed bitstream, and stores the first lossless compressed bitstream in a first cache module; obtains the first lossless compressed bitstream from the first cache module, and performs lossless compression decoding on the first lossless compressed bitstream to obtain the first target reference image.
[0103] In a possible implementation manner, with respect to step 402, after obtaining the initial reference image, the decoding end performs lossy compression on the initial reference image to obtain the second target reference image, which may include but is not limited to the following methods:
[0104] The decoding end performs lossy compression encoding on the initial reference image to obtain a second code stream, and stores the second code stream in a second cache module; obtains the second code stream from the second cache module, and performs lossy compression decoding on the second code stream to obtain a second target reference image.
[0105] The decoding end performs lossy compression encoding on the initial reference image to obtain a second target reference image, stores the second target reference image in a second cache module; and obtains the second target reference image from the second cache module.
[0106] The decoding end performs lossy compression encoding on the initial reference image to obtain a second code stream, performs lossy compression decoding on the second code stream to obtain a second target reference image, and stores the second target reference image in a second cache module (i.e., what is stored is the image after lossy compression encoding and lossy compression decoding); and obtains the second target reference image from the second cache module.
[0107] The decoding end performs lossy compression encoding on the initial reference image to obtain a second target reference image, performs lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream (i.e., a code stream after lossless compression encoding), and stores the second lossless compressed code stream in a second cache module; obtains the second lossless compressed code stream from the second cache module, and performs lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image.
[0108] The decoding end performs lossy compression encoding on the initial reference image to obtain a second code stream, performs lossy compression decoding on the second code stream to obtain a second target reference image, performs lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and stores the second lossless compressed code stream in a second cache module; obtains the second lossless compressed code stream from the second cache module, and performs lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image.
[0109] Exemplarily, the encoding end performs lossy compression on the initial reference image to obtain the first target reference image, including but not limited to: using the first parallel unit division method to divide the initial reference image into multiple minimum parallel units, different parallel units do not refer to each other, using the first coding unit division method to divide the parallel unit into multiple coding units, and different coding units in the same parallel unit are allowed to refer to each other; using the first prediction mode to predict the coding unit, using the first quantization parameter to quantize the predicted intermediate parameters, and generating the first target reference image based on the quantized intermediate parameters.
[0110] The decoding end performs lossy compression on the initial reference image to obtain a second target reference image, which may include but is not limited to: using a second parallel unit division method to divide the initial reference image into multiple parallel units, and different parallel units do not refer to each other, and using a second coding unit division method to divide the parallel unit into multiple coding units, and different coding units in the same parallel unit are allowed to refer to each other; using a second prediction mode to predict the coding unit, using a second quantization parameter to quantize the predicted intermediate parameters, and generating the second target reference image based on the quantized intermediate parameters.
[0111] The second parallel unit division method at the decoding end is the same as the first parallel unit division method at the encoding end, the second encoding unit division method at the decoding end is the same as the first encoding unit division method at the encoding end, the second prediction mode at the decoding end is the same as the first prediction mode at the encoding end, and the second quantization parameter at the decoding end is the same as the first quantization parameter at the encoding end.
[0112] It should be noted that for the encoding end and the decoding end, the units that can be decoded independently can be divided into parallel units (also called minimum parallel units), actual parallel units, and independent coding units. Parallel units can be decoded independently. The actual parallel unit is application-related and its size is an integer multiple of the parallel unit. However, due to the channel-level arrangement problem, it does not necessarily include complete parallel units. It may be that the parallel units are repackaged according to the channel level, for example, only brightness, two chroma channels are interleaved, etc. Independent coding units are an optional level between encoding units and parallel units.
[0113] Exemplarily, the decoding end can obtain lossy compression configuration information from the bit stream, and the lossy compression configuration information includes but is not limited to at least one of the following: indication information of the first parallel unit division method, and the indication information is used to determine the second parallel unit division method, that is, the second parallel unit division method determined based on the indication information is the same as the first parallel unit division method; obviously, if the lossy compression configuration information does not include the indication information of the first parallel unit division method, the decoding end can implicitly deduce the second parallel unit division method, and the second parallel unit division method is the same as the first parallel unit division method.
[0114] The indication information of the first coding unit division method is used to determine the second coding unit division method, that is, the second coding unit division method determined based on the indication information is the same as the first coding unit division method; obviously, if the lossy compression configuration information does not include the indication information of the first coding unit division method, the decoding end can implicitly deduce the second coding unit division method, and the second coding unit division method is the same as the first coding unit division method.
[0115] The indication information of the first prediction mode is used to determine the second prediction mode, that is, the second prediction mode determined based on the indication information is the same as the first prediction mode; obviously, if the lossy compression configuration information does not include the indication information of the first prediction mode, the decoding end can implicitly derive the second prediction mode, and the second prediction mode is the same as the first prediction mode.
[0116] The indication information of the first quantization parameter is used to determine the second quantization parameter, that is, the second quantization parameter determined based on the indication information is the same as the first quantization parameter; obviously, if the lossy compression configuration information does not include the indication information of the first quantization parameter, the decoding end can implicitly derive the second quantization parameter, and the second quantization parameter is the same as the first quantization parameter.
[0117] The lossy compression configuration information may include, but is not limited to: lossy compression configuration information at the sequence level of the bitstream, or lossy compression configuration information of sequence-level extended data, or lossy compression configuration information at the image level, or lossy compression configuration information of image-level extended data, or lossy compression configuration information at the Slice level, or lossy compression configuration information at the Tile level, or lossy compression configuration information at the Patch level, or lossy compression configuration information at the LCU level, or lossy compression configuration information at the control unit level.
[0118] Exemplarily, the encoding end performs lossy compression encoding on the initial reference image to obtain a first bitstream, which may include but is not limited to: the encoding end uses a first interleaving form to perform bitstream interleaving on the bitstream generated by lossy compression of the initial reference image to obtain the first bitstream. The decoding end performs lossy compression encoding on the initial reference image to obtain a second bitstream, which may include but is not limited to: the decoding end uses a second interleaving form to perform bitstream interleaving on the bitstream generated by lossy compression of the initial reference image to obtain the second bitstream.
[0119] The second interleaving form is different from or the same as the first interleaving form; the second interleaving form and the first interleaving form represent the arrangement order of the code streams corresponding to each channel of each coding unit.
[0120] Exemplarily, the encoding end stores the first code stream in the first cache module, and obtains the first code stream from the first cache module, which may include but is not limited to: using the first addressing logic to store the first code stream in the first cache module, and using the first addressing logic to obtain the first code stream from the first cache module. The decoding end stores the second code stream in the second cache module, and obtains the second code stream from the second cache module, which may include but is not limited to: using the second addressing logic to store the second code stream in the second cache module, and using the second addressing logic to obtain the second code stream from the second cache module. Among them, the second addressing logic and the first addressing logic may be different or the same; the first addressing logic is used to indicate the identification logic of the physical address of the first actual parallel unit in the first cache module, and the second addressing logic is used to indicate the identification logic of the physical address of the second actual parallel unit in the second cache module. The size of the second actual parallel unit is different or the same as the size of the first actual parallel unit; the second actual parallel unit or the first actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream.
[0121] Exemplarily, the code stream alignment logic of the first code stream and the code stream alignment logic of the second code stream may be the same or different. For example, the code stream alignment logic of the first code stream may be byte alignment (i.e., single-byte alignment), and the code stream alignment logic of the second code stream may be two-byte alignment, or, the code stream alignment logics of the first code stream and the second code stream are both byte alignment, or, the alignment logic of the brightness channel of the first code stream is four-byte alignment, and the alignment logic of the chrominance channel is two-byte alignment, the alignment logic of the brightness channel of the second code stream is byte alignment, and the alignment logic of the chrominance channel is bit alignment, etc.
[0122] Exemplarily, the encoding end performs lossy compression decoding on the first code stream to obtain the first target reference image, which may include but is not limited to: sequentially deinterleaving, predicting, inverse quantizing and reconstructing the first code stream to obtain the first target reference image. Alternatively, sequentially predicting, inverse quantizing and reconstructing the first code stream to obtain the first target reference image. Alternatively, sequentially deinterleaving, predicting, inverse quantizing, inverse transforming and reconstructing the first code stream to obtain the first target reference image. Alternatively, sequentially predicting, inverse quantizing, inverse transforming and reconstructing the first code stream to obtain the first target reference image.
[0123] Exemplarily, the decoding end performs lossy compression decoding on the second code stream to obtain the second target reference image, which may include but is not limited to: sequentially deinterleaving, predicting, inverse quantizing and reconstructing the second code stream to obtain the second target reference image. Alternatively, sequentially predicting, inverse quantizing and reconstructing the second code stream to obtain the second target reference image. Alternatively, sequentially deinterleaving, predicting, inverse quantizing, inverse transforming and reconstructing the second code stream to obtain the second target reference image. Alternatively, sequentially predicting, inverse quantizing, inverse transforming and reconstructing the second code stream to obtain the second target reference image.
[0124] Exemplarily, for the encoding end and the decoding end, the initial reference image can be: a reference image obtained after filtering the current image (such as in-loop filtering, etc.); wherein the filtering here may include but is not limited to image processing, image enhancement, image denoising, etc., and auxiliary information may also be extracted from the bitstream for filtering, and there is no restriction on this filtering method.
[0125] For the encoding and decoding ends, the initial reference image can be: an image decoded from end-to-end video / image compression (such as JPEGAI), an intelligently generated image (AIGC), a super-resolution image, a denoised image, a knowledge image, etc.
[0126] Exemplarily, for the encoding end and the decoding end, the initial reference image may be: a reference image obtained before filtering the current image. The encoding end performs lossy compression decoding on the first bitstream to obtain a first target reference image, which may include but is not limited to: performing lossy compression decoding on the first bitstream to obtain a lossy compression decoded image, filtering the lossy compression decoded image, and determining the first target reference image based on the filtered image. The decoding end performs lossy compression decoding on the second bitstream to obtain a second target reference image, which may include but is not limited to: performing lossy compression decoding on the second bitstream to obtain a lossy compression decoded image, filtering the lossy compression decoded image, and determining the second target reference image based on the filtered image.
[0127] Exemplarily, for the encoding end and the decoding end, if the filtering operation includes the first filtering and the second filtering, the initial reference image may be: a reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image.
[0128] The encoding end performs lossy compression decoding on the first code stream to obtain a first target reference image, which may include but is not limited to: the encoding end performs lossy compression decoding on the first code stream to obtain a lossy compressed decoded image, performs a second filtering on the lossy compressed decoded image, and determines the first target reference image based on the second filtered image.
[0129] The decoding end performs lossy compression decoding on the second code stream to obtain a second target reference image, which may include but is not limited to: the decoding end performs lossy compression decoding on the second code stream to obtain a lossy compression decoded image, performs a second filtering on the lossy compression decoded image, and determines the second target reference image based on the second filtered image.
[0130] Exemplarily, the encoder obtains the first code stream from the first cache module, and performs lossy compression decoding on the first code stream to obtain the first target reference image, which may include but is not limited to: the encoder obtains the first sub-code stream of one or more actual parallel units from the first cache module, and the first sub-code stream of the one or more actual parallel units is a partial code stream in the first code stream. For the first sub-code stream of each actual parallel unit, the first sub-code stream may be lossy compressed and decoded to obtain the first decoded pixel of the actual parallel unit, and the first decoded pixel may be a partial pixel of the first target reference image.
[0131] Exemplarily, the decoding end obtains the second code stream from the second cache module, and performs lossy compression decoding on the second code stream to obtain the second target reference image, which may include but is not limited to: the decoding end obtains the second sub-code stream of one or more actual parallel units from the second cache module, and the second sub-code stream of the one or more actual parallel units is a partial code stream in the second code stream. For the second sub-code stream of each actual parallel unit, the second sub-code stream may be lossy compressed and decoded to obtain the second decoded pixel of the actual parallel unit, and the second decoded pixel may be a partial pixel of the second target reference image.
[0132] Exemplarily, after the encoder performs lossy compression decoding on the first bit stream to obtain a lossy compression decoded image, the lossy compression decoded image is used for intra-frame prediction coding, or the lossy compression decoded image is used for block copy intra-frame prediction coding, or the lossy compression decoded image is used for string copy intra-frame prediction coding; and / or, after the decoder performs lossy compression decoding on the second bit stream to obtain a lossy compression decoded image, the lossy compression decoded image is used for intra-frame prediction decoding, or the lossy compression decoded image is used for block copy intra-frame prediction decoding, or the lossy compression decoded image is used for string copy intra-frame prediction decoding.
[0133] Exemplarily, the above execution order is only for the convenience of describing the examples given. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0134] It can be seen from the above technical solution that in an embodiment of the present application, the encoding end performs lossy compression on the initial reference image to obtain a first target reference image, and the first target reference image is used for inter-frame prediction encoding, and the decoding end performs lossy compression on the initial reference image to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding. In this way, the storage resources of the reference image cache can be saved, and the storage occupancy of the reference image cache can be saved while ensuring the overall bandwidth reduction.
[0135] Example 2: A decoding method is proposed in the embodiment of the present application, see Figure 4B As shown, it is a flowchart of the decoding method, which can be applied to a decoding end (also called a video decoder), and the method may include:
[0136] Step 411: Acquire an initial reference image.
[0137] Step 412: Losslessly compress the initial reference image to obtain a target reference image, which is used for inter-frame prediction decoding. The pixel values of the target reference image (i.e., the target reference image for inter-frame prediction decoding at the decoding end) are the same as the pixel values of the target reference image for inter-frame prediction coding at the coding end.
[0138] In a possible implementation manner, with respect to step 412, after obtaining the initial reference image, the decoding end performs lossy compression on the initial reference image to obtain the target reference image, which may include but is not limited to the following methods:
[0139] The decoding end performs lossy compression encoding on the initial reference image to obtain a bit stream; stores the bit stream in a cache module; obtains the bit stream from the cache module, and performs lossy compression decoding on the bit stream to obtain a target reference image.
[0140] The decoding end performs lossy compression encoding on the initial reference image to obtain a target reference image, and stores the target reference image in a cache module; and the decoding end obtains the target reference image from the cache module.
[0141] The decoding end performs lossy compression encoding on the initial reference image to obtain a bit stream, performs lossy compression decoding on the bit stream to obtain a target reference image, and stores the target reference image in a cache module; and obtains the target reference image from the cache module.
[0142] The decoding end performs lossy compression encoding on the initial reference image to obtain a target reference image, performs lossless compression encoding on the target reference image to obtain a lossless compressed bitstream, and stores the lossless compressed bitstream in a cache module; obtains the lossless compressed bitstream from the cache module, and performs lossless compression decoding on the lossless compressed bitstream to obtain the target reference image.
[0143] The decoding end performs lossy compression encoding on the initial reference image to obtain a bitstream, performs lossy compression decoding on the bitstream to obtain a target reference image, performs lossless compression encoding on the target reference image to obtain a lossless compressed bitstream (i.e., a bitstream after lossless compression encoding), and stores the lossless compressed bitstream in a cache module; the decoding end obtains the lossless compressed bitstream from the cache module, performs lossless compression decoding on the lossless compressed bitstream to obtain the target reference image.
[0144] Exemplarily, performing lossy compression on the initial reference image to obtain the target reference image may include, but is not limited to: dividing the initial reference image into multiple parallel units by a parallel unit division method, and different parallel units do not refer to each other, and dividing the parallel unit into multiple coding units by a coding unit division method, and different coding units in the same parallel unit are allowed to refer to each other. Then, the coding unit may be predicted by a prediction mode, and the predicted intermediate parameters may be quantized by a quantization parameter, and the target reference image may be generated based on the quantized intermediate parameters.
[0145] Exemplarily, the decoding end may obtain lossy compression configuration information from the bit stream, and the lossy compression configuration information includes but is not limited to at least one of the following: indication information of a first parallel unit division method (i.e., a parallel unit division method adopted by lossy compression encoding at the encoding end), the indication information is used to determine a second parallel unit division method (i.e., a parallel unit division method adopted by lossy compression encoding at the decoding end), that is, the second parallel unit division method determined based on the indication information is the same as the first parallel unit division method. If the lossy compression configuration information does not include indication information of the first parallel unit division method, the decoding end implicitly derives the second parallel unit division method, and the second parallel unit division method is the same as the first parallel unit division method.
[0146] The indication information of the first coding unit division mode (i.e., the coding unit division mode adopted by the lossy compression coding at the encoding end), the indication information is used to determine the second coding unit division mode (i.e., the coding unit division mode adopted by the lossy compression coding at the decoding end), that is, the second coding unit division mode determined based on the indication information is the same as the first coding unit division mode. If the lossy compression configuration information does not include the indication information of the first coding unit division mode, the decoding end can implicitly derive the second coding unit division mode, and the second coding unit division mode is the same as the first coding unit division mode.
[0147] The indication information of the first prediction mode (i.e., the prediction mode adopted by the lossy compression coding at the encoding end), which is used to determine the second prediction mode (i.e., the prediction mode adopted by the lossy compression coding at the decoding end), that is, the second prediction mode determined based on the indication information is the same as the first prediction mode. If the lossy compression configuration information does not include the indication information of the first prediction mode, the decoding end can implicitly derive the second prediction mode, and the second prediction mode is the same as the first prediction mode.
[0148] The indication information of the first quantization parameter (i.e., the quantization parameter adopted by the lossy compression encoding at the encoding end), the indication information is used to determine the second quantization parameter (i.e., the quantization parameter adopted by the lossy compression encoding at the decoding end), that is, the second quantization parameter determined based on the indication information is the same as the first quantization parameter. If the lossy compression configuration information does not include the indication information of the first quantization parameter, the decoding end can implicitly derive the second quantization parameter, and the second quantization parameter is the same as the first quantization parameter.
[0149] The lossy compression configuration information may include, but is not limited to: lossy compression configuration information at the sequence level of the bitstream, or lossy compression configuration information of sequence-level extended data, or lossy compression configuration information at the image level, or lossy compression configuration information of image-level extended data, or lossy compression configuration information at the Slice level, or lossy compression configuration information at the Tile level, or lossy compression configuration information at the Patch level, or lossy compression configuration information at the LCU level, or lossy compression configuration information at the control unit level.
[0150] Exemplarily, performing lossy compression encoding on the initial reference image to obtain a code stream includes but is not limited to: interleaving the code stream generated by lossy compression of the initial reference image in an interleaved form to obtain the code stream (i.e., after the initial reference image is lossily compressed to generate the code stream, the code stream is interleaved); the interleaved form represents the arrangement order of the code streams corresponding to each channel of each coding unit.
[0151] Exemplarily, the decoding end stores the code stream in a cache module, and the decoding end obtains the code stream from the cache module, which may include but is not limited to: the decoding end uses addressing logic to store the code stream in the cache module, and uses the addressing logic to obtain the code stream from the cache module; wherein the addressing logic is used to represent the identification logic of the physical address of the actual parallel unit in the cache module, and the size of the actual parallel unit used by the decoding end may be different from or the same as the size of the actual parallel unit used by the encoding end; the actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream.
[0152] Exemplarily, performing lossy compression decoding on a bitstream to obtain a target reference image may include, but is not limited to: sequentially deinterleaving, predicting, inverse quantizing, and reconstructing the bitstream to obtain a target reference image; or sequentially predicting, inverse quantizing, and reconstructing the bitstream to obtain a target reference image; or sequentially deinterleaving, predicting, inverse quantizing, inverse transforming, and reconstructing the bitstream to obtain a target reference image; or sequentially predicting, inverse quantizing, inverse transforming, and reconstructing the bitstream to obtain a target reference image.
[0153] Exemplarily, the initial reference image may be: a reference image obtained after filtering the current image (such as in-loop filtering, etc.); wherein the filtering here may include but is not limited to image processing, image enhancement, image denoising, etc., and auxiliary information may also be extracted from the bitstream for filtering, and there is no restriction on this filtering method.
[0154] It should be noted that the filtering operation is not limited to the filtering module under the encoding framework or the decoding framework, but can be a filtering (enhancement) module for end-to-end image / video compression. Furthermore, this solution can be intuitively introduced into all modules, components, and systems that need to access images to achieve the purpose of saving cache and reducing bandwidth.
[0155] For the encoding and decoding ends, the initial reference image can be: an image decoded from end-to-end video / image compression (such as JPEGAI), an intelligently generated image (AIGC), a super-resolution image, a denoised image, a knowledge image, etc.
[0156] Exemplarily, the initial reference image may be a reference image obtained before filtering the current image. Performing lossy compression decoding on the code stream to obtain the target reference image may include: performing lossy compression decoding on the code stream to obtain a lossy compressed decoded image, filtering the lossy compressed decoded image, and determining the target reference image based on the filtered image.
[0157] Exemplarily, if the filtering operation includes a first filtering and a second filtering, the initial reference image may be: a reference image obtained after the current image is first filtered and before the current image is second filtered. Performing lossy compression decoding on the code stream to obtain a target reference image may include: performing lossy compression decoding on the code stream to obtain a lossy compressed decoded image, performing a second filtering on the lossy compressed decoded image, and determining the target reference image based on the second filtered image.
[0158] Exemplarily, obtaining a code stream from a cache module and performing lossy compression decoding on the code stream to obtain a target reference image may include, but is not limited to: obtaining one or more sub-code streams of actual parallel units from the cache module, where the one or more sub-code streams of actual parallel units are partial code streams in the code stream; and performing lossy compression decoding on the sub-code stream of each actual parallel unit to obtain decoded pixels of the actual parallel unit, where the decoded pixels are partial pixels of the target reference image.
[0159] Exemplarily, after performing lossy compression decoding on the code stream to obtain a lossy compression decoded image, the lossy compression decoded image can be used for intra-frame prediction decoding, or the lossy compression decoded image can be used for block copy intra-frame prediction decoding, or the lossy compression decoded image can be used for string copy intra-frame prediction decoding.
[0160] Exemplarily, the above execution order is only for the convenience of describing the examples given. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0161] It can be seen from the above technical solution that in an embodiment of the present application, the encoding end performs lossy compression on the initial reference image to obtain a first target reference image, and the first target reference image is used for inter-frame prediction encoding, and the decoding end performs lossy compression on the initial reference image to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding. In this way, the storage resources of the reference image cache can be saved, and the storage occupancy of the reference image cache can be saved while ensuring the overall bandwidth reduction.
[0162] Example 3: This application proposes an encoding method, see Figure 4C FIG. 1 is a flow chart of the encoding method, which can be applied to an encoding end (also referred to as a video encoder), and may include:
[0163] Step 421: Obtain an initial reference image.
[0164] Step 422: Losslessly compress the initial reference image to obtain a target reference image, which is used for inter-frame prediction coding. The pixel values of the target reference image (i.e., the target reference image for inter-frame prediction coding at the encoding end) are the same as the pixel values of the target reference image for inter-frame prediction decoding at the decoding end.
[0165] In a possible implementation, with respect to step 422, after obtaining the initial reference image, the encoder performs lossy compression on the initial reference image to obtain the target reference image, which may include but is not limited to the following methods:
[0166] The encoding end performs lossy compression encoding on the initial reference image to obtain a bit stream; stores the bit stream in a cache module; obtains the bit stream from the cache module, and performs lossy compression decoding on the bit stream to obtain a target reference image.
[0167] The encoding end performs lossy compression encoding on the initial reference image to obtain a target reference image, and stores the target reference image in a cache module; and the encoding end obtains the target reference image from the cache module.
[0168] The encoding end performs lossy compression encoding on the initial reference image to obtain a bit stream, performs lossy compression decoding on the bit stream to obtain a target reference image, and stores the target reference image in a cache module; and obtains the target reference image from the cache module.
[0169] The encoding end performs lossy compression encoding on the initial reference image to obtain a target reference image, performs lossless compression encoding on the target reference image to obtain a lossless compressed bitstream, and stores the lossless compressed bitstream in a cache module; obtains the lossless compressed bitstream from the cache module, and performs lossless compression decoding on the lossless compressed bitstream to obtain the target reference image.
[0170] The encoder performs lossy compression encoding on the initial reference image to obtain a bitstream, performs lossy compression decoding on the bitstream to obtain a target reference image, performs lossless compression encoding on the target reference image to obtain a lossless compressed bitstream (i.e., a bitstream after lossless compression encoding), and stores the lossless compressed bitstream in a cache module; the encoder obtains the lossless compressed bitstream from the cache module, and performs lossless compression decoding on the lossless compressed bitstream to obtain the target reference image.
[0171] Exemplarily, performing lossy compression on the initial reference image to obtain the target reference image may include, but is not limited to: dividing the initial reference image into multiple parallel units by a parallel unit division method, and different parallel units do not refer to each other, and dividing the parallel unit into multiple coding units by a coding unit division method, and different coding units in the same parallel unit are allowed to refer to each other. Then, the coding unit may be predicted by a prediction mode, and the predicted intermediate parameters may be quantized by a quantization parameter, and the target reference image may be generated based on the quantized intermediate parameters.
[0172] Exemplarily, performing lossy compression encoding on the initial reference image to obtain a code stream includes but is not limited to: interleaving the code stream generated by lossy compression of the initial reference image in an interleaved form to obtain a code stream; the interleaved form represents the arrangement order of the code streams corresponding to each channel of each coding unit.
[0173] Exemplarily, the encoding end stores the code stream in a cache module, and the encoding end obtains the code stream from the cache module, which may include but is not limited to: the encoding end uses addressing logic to store the code stream in the cache module, and uses the addressing logic to obtain the code stream from the cache module; wherein the addressing logic is used to represent the identification logic of the physical address of the actual parallel unit in the cache module, and the size of the actual parallel unit used by the encoding end may be different from or the same as the size of the actual parallel unit used by the decoding end; the actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream.
[0174] Exemplarily, performing lossy compression decoding on a bitstream to obtain a target reference image may include, but is not limited to: sequentially deinterleaving, predicting, inverse quantizing, and reconstructing the bitstream to obtain a target reference image; or sequentially predicting, inverse quantizing, and reconstructing the bitstream to obtain a target reference image; or sequentially deinterleaving, predicting, inverse quantizing, inverse transforming, and reconstructing the bitstream to obtain a target reference image; or sequentially predicting, inverse quantizing, inverse transforming, and reconstructing the bitstream to obtain a target reference image.
[0175] Exemplarily, the initial reference image may be: a reference image obtained after filtering the current image (such as in-loop filtering, etc.); wherein the filtering here may include but is not limited to image processing, image enhancement, image denoising, etc.
[0176] For the encoding and decoding ends, the initial reference image can be: an image decoded from end-to-end video / image compression (such as JPEGAI), an intelligently generated image (AIGC), a super-resolution image, a denoised image, a knowledge image, etc.
[0177] Exemplarily, the initial reference image may be a reference image obtained before filtering the current image. Performing lossy compression decoding on the code stream to obtain the target reference image may include: performing lossy compression decoding on the code stream to obtain a lossy compressed decoded image, filtering the lossy compressed decoded image, and determining the target reference image based on the filtered image.
[0178] Exemplarily, if the filtering operation includes a first filtering and a second filtering, the initial reference image may be: a reference image obtained after the current image is first filtered and before the current image is second filtered. Performing lossy compression decoding on the code stream to obtain a target reference image may include: performing lossy compression decoding on the code stream to obtain a lossy compressed decoded image, performing a second filtering on the lossy compressed decoded image, and determining the target reference image based on the second filtered image.
[0179] Exemplarily, obtaining a code stream from a cache module and performing lossy compression decoding on the code stream to obtain a target reference image may include, but is not limited to: obtaining one or more sub-code streams of actual parallel units from the cache module, where the one or more sub-code streams of actual parallel units are partial code streams in the code stream; and performing lossy compression decoding on the sub-code stream of each actual parallel unit to obtain decoded pixels of the actual parallel unit, where the decoded pixels are partial pixels of the target reference image.
[0180] Exemplarily, after performing lossy compression decoding on the code stream to obtain a lossy compression decoded image, the lossy compression decoded image can be used for intra-frame prediction decoding, or the lossy compression decoded image can be used for block copy intra-frame prediction decoding, or the lossy compression decoded image can be used for string copy intra-frame prediction decoding.
[0181] Exemplarily, the above execution order is only for the convenience of describing the examples given. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0182] It can be seen from the above technical solution that in an embodiment of the present application, the encoding end performs lossy compression on the initial reference image to obtain a first target reference image, and the first target reference image is used for inter-frame prediction encoding, and the decoding end performs lossy compression on the initial reference image to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding. In this way, the storage resources of the reference image cache can be saved, and the storage occupancy of the reference image cache can be saved while ensuring the overall bandwidth reduction.
[0183] Embodiment 4: With respect to Embodiment 1, Embodiment 2 and Embodiment 3, after obtaining the initial reference image, the encoder may perform lossy compression encoding on the initial reference image to obtain a first code stream (for the sake of distinction, the code stream of the encoder is recorded as the first code stream), and store the first code stream in a first cache module (for the sake of distinction, the cache module of the encoder is recorded as the first cache module, and the first cache module may be a reference image cache). On this basis, for the inter-frame prediction process, the first code stream may be obtained from the first cache module, and the first code stream may be lossy compressed and decoded to obtain a first target reference image (for the sake of distinction, the target reference image of the encoder is recorded as the first target reference image), and the first target reference image is used for inter-frame prediction encoding. After obtaining the initial reference image, the decoder may perform lossy compression encoding on the initial reference image to obtain a second code stream (for the sake of distinction, the code stream of the decoder is recorded as the second code stream), and store the second code stream in a second cache module (for the sake of distinction, the cache module of the decoder is recorded as the second cache module, and the second cache module may be a reference image cache). On this basis, for the inter-frame prediction process, a second code stream can be obtained from the second cache module, and the second code stream can be lossily compressed and decoded to obtain a second target reference image (for the convenience of distinction, the target reference image at the decoding end is recorded as the second target reference image), and the second target reference image is used for inter-frame prediction decoding.
[0184] In one possible implementation, see Figure 3A As shown, it is a schematic diagram of the coding framework. The complete video coding method may include prediction (such as intra-frame prediction, SCC prediction, inter-frame prediction, etc.), transformation, quantization, entropy coding, and the entropy-coded bit stream is transmitted to the decoding end. And, it may also include inverse quantization, inverse transformation, reconstruction and filtering (such as in-loop filtering). After performing the filtering operation, the filtered image (i.e., reference image) can be stored in the reference image buffer (recorded as the first buffer module), and the reference image is used as a reference for inter-frame prediction. Similarly, corresponding to the video coding method, the complete video decoding method may include entropy decoding (i.e., entropy decoding of the received bit stream), inverse quantization, inverse transformation, reconstruction and filtering (such as in-loop filtering). After performing the filtering operation, the filtered image (i.e., reference image) can be stored in the reference image buffer (recorded as the second buffer module), and the reference image is used as a reference for inter-frame prediction.
[0185] Case 1: For the encoder and decoder, lossy compression encoding can be added after filtering, and lossy compression decoding can be added after the cache module (recorded as the first cache module at the encoder and the second cache module at the decoder), see Figure 5A As shown, it is a schematic diagram of the positions of lossy compression encoding and lossy compression decoding.
[0186] based on Figure 5A For the positional relationship, see Figure 5B As shown, it is a schematic diagram of the coding framework. The complete video coding method may include prediction (such as intra-frame prediction, SCC prediction, inter-frame prediction, etc.), transformation, quantization, entropy coding, and the entropy-coded bit stream is transmitted to the decoding end. In addition, it may also include inverse quantization, inverse transformation, reconstruction and filtering (such as in-loop filtering).
[0187] After performing the filtering operation, the image after the filtering operation (i.e., the reference image obtained after filtering the current image) can be used as the initial reference image. For example, the filtering here can be in-loop filtering, and the filtering can also include but is not limited to image processing, image enhancement, image denoising, etc., and there is no limitation on this filtering method.
[0188] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first code stream, and store the first code stream in the first cache module, that is, the first cache module stores the first code stream instead of the initial reference image. Since the initial reference image has been lossy compressed, when storing the first code stream, the storage resources of the first cache module can be saved, and the storage occupancy of the first cache module can be saved while the overall bandwidth is reduced.
[0189] When inter-frame prediction is required, the first code stream can be obtained from the first cache module, and the first code stream can be lossily compressed and decoded to obtain a first target reference image, and the first target reference image can be provided to the inter-frame prediction unit, which performs inter-frame prediction encoding based on the first target reference image. There is no restriction on this inter-frame prediction encoding process.
[0190] Exemplarily, when the initial reference image is subjected to lossy compression encoding to obtain the first bitstream, since it is necessary to wait for filtering to be completed before lossy compression encoding can be performed, and the filtering operation can be at the LCU level (of course, filtering can also be performed for each CU, or filtering can also be performed for other size units, and there is no restriction on this), that is, filtering is performed for each LCU. Based on this, after the LCU filtering of the initial reference image is completed, the LCU of the initial reference image can be lossy compressed and encoded. When the LCU of the initial reference image has not been filtered, it is necessary to wait for the LCU filtering of the initial reference image to be completed, and then the LCU of the initial reference image can be lossy compressed and encoded. Obviously, after all the initial reference images are subjected to lossy compression encoding, the first bitstream corresponding to the initial reference image can be obtained.
[0191] Exemplarily, when performing lossy compression decoding on the first code stream to obtain the first target reference image, the decoding unit may be an actual parallel unit (such as an image block of 64*64 size, an image block of 32*32 size, etc., the size of the actual parallel unit is selected by the encoding end according to application requirements, and there is no restriction on the size of the actual parallel unit). Similarly, when performing lossy compression encoding, the encoding unit may also be an actual parallel unit (such as an image block of 64*64 size, an image block of 32*32 size, etc., the size of the actual parallel unit is selected by the encoding end according to application requirements, and there is no restriction on the size of the actual parallel unit). Optionally, the size of the actual parallel unit of the encoding unit may be larger than the size of the actual parallel unit of the decoding unit.
[0192] In this example, the decoding unit may be an actual parallel unit. For example, the first target reference image may include multiple actual parallel units. The first sub-code streams of one or more actual parallel units may be obtained from the first cache module. The first sub-code streams of these actual parallel units are partial code streams in the first code stream. In this way, for the first sub-code stream of each actual parallel unit, the first sub-code stream may be lossy compressed and decoded to obtain the first decoded pixel of the actual parallel unit. The first decoded pixel may be a partial pixel of the first target reference image.
[0193] Exemplarily, the size of the actual parallel unit is limited by the size of the parallel unit or the independent coding unit, and the size of the actual parallel unit is often an integer multiple of the size of the parallel unit or the independent coding unit (which can be adjusted according to the sampling format). For example, for a YUV420 image, if the parallel unit is 8*2, then the actual parallel unit can be 32*8 for the Y channel, or two 16*4 for the two UV chrominance channels. For an RGB444 image, if the independent coding unit is 8*8, then the actual parallel unit can be 16*16 for the R channel, 16*16 for the G channel, or 16*16 for the B channel. The actual parallel units involved in the subsequent process have similar sizes to this, and will not be repeated later.
[0194] For example, the first sub-code stream of the actual parallel unit a1 can be obtained from the first cache module, and the first sub-code stream can be lossy compressed and decoded to obtain the first decoded pixel of the actual parallel unit a1, and the first decoded pixel can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction coding based on the first decoded pixel of the actual parallel unit a1. After the first sub-code stream of the actual parallel unit a1 is decoded, the first sub-code stream of the actual parallel unit a2 and the first sub-code stream of the actual parallel unit a3 can be obtained from the first cache module, and the first sub-code streams can be lossy compressed and decoded to obtain the first decoded pixel of the actual parallel unit a2 and the first decoded pixel of the actual parallel unit a3, and the first decoded pixels can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction coding based on the first decoded pixels, and so on.
[0195] based on Figure 5A The position relationship with Figure 5B Correspondingly, a complete video decoding method may include entropy decoding (ie, entropy decoding of a received bit stream), inverse quantization, inverse transformation, reconstruction, and filtering (eg, in-loop filtering).
[0196] After performing the filtering operation, the image after the filtering operation (i.e., the reference image obtained after filtering the current image) can be used as the initial reference image (obviously, the initial reference image at the encoding end is the same as the initial reference image at the decoding end). For example, the filtering here can be in-loop filtering, such as filtering can also include but not limited to image processing, image enhancement, image denoising, etc., and auxiliary information can also be extracted from the bitstream for filtering, and there is no restriction on this filtering method.
[0197] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second code stream, and store the second code stream in the second cache module, that is, the second cache module stores the second code stream instead of the initial reference image. Since the initial reference image has been lossy compressed, when storing the second code stream, the storage resources of the second cache module can be saved, and the storage occupancy of the second cache module can be saved while the overall bandwidth is reduced.
[0198] When inter-frame prediction is required, a second code stream can be obtained from the second cache module, and the second code stream can be lossily compressed and decoded to obtain a second target reference image, and the second target reference image can be provided to the inter-frame prediction unit, which performs inter-frame prediction decoding based on the second target reference image. There is no restriction on this inter-frame prediction decoding process.
[0199] Exemplarily, when the initial reference image is losslessly compressed and encoded to obtain the second bitstream, since lossy compression encoding can only be performed after filtering is completed, and the filtering operation can be at the LCU level, that is, filtering is performed on each LCU, based on this, after the LCU filtering of the initial reference image is completed, the LCU of the initial reference image can be lossily compressed and encoded.
[0200] Exemplarily, when the second code stream is subjected to lossy compression decoding to obtain the second target reference image, the decoding unit may be an actual parallel unit (such as an image block of 64*64 size, an image block of 32*32 size, etc., the size of the actual parallel unit is selected by the decoding end according to application requirements, and may be different from the size of the actual parallel unit of the encoding end). For example, the second target reference image may include multiple actual parallel units, and the second sub-code streams of one or more actual parallel units may be obtained from the second cache module, and the second sub-code streams of these actual parallel units are partial code streams in the second code stream. In this way, for the second sub-code stream of each actual parallel unit, the second sub-code stream may be subjected to lossy compression decoding to obtain the second decoded pixel of the actual parallel unit, and the second decoded pixel may be a partial pixel of the second target reference image.
[0201] Case 2: For the encoder and decoder, lossy compression coding can be added before filtering (such as lossy compression coding is located after reconstruction), and lossy compression decoding can be added before filtering. Lossy compression decoding needs to be located after lossy compression coding, and a cache module is provided between lossy compression coding and lossy compression decoding (recorded as the first cache module at the encoder and the second cache module at the decoder), see Figure 5C As shown in Figure 1, it is a schematic diagram of the location of lossy compression encoding and lossy compression decoding. Obviously, see Figure 5C As shown, the steps of lossy compression encoding and lossy compression decoding are placed before filtering.
[0202] based on Figure 5C For the positional relationship, see Figure 5D As shown, it is a schematic diagram of the coding framework. The complete video coding method may include prediction (such as intra-frame prediction, SCC prediction, inter-frame prediction, etc.), transformation, quantization, entropy coding, and the entropy-coded bit stream is transmitted to the decoding end. In addition, it may also include inverse quantization, inverse transformation, reconstruction and filtering (such as in-loop filtering).
[0203] Before performing the filtering operation, the image before the filtering operation (ie, the reference image obtained before filtering the current image) can be used as the initial reference image. For example, the image after the reconstruction operation is performed can be used as the initial reference image.
[0204] After obtaining the initial reference image, the encoding end performs lossy compression encoding on the initial reference image to obtain a first bitstream, and stores the first bitstream in a first cache module, that is, the first cache module stores the first bitstream instead of the initial reference image.
[0205] When inter-frame prediction is required, the first code stream is obtained from the first cache module, and the first code stream is lossy compressed and decoded to obtain a lossy compressed decoded image. The image after lossy compression decoding is filtered (such as in-loop filtering), and the first target reference image is determined based on the filtered image, such as using the filtered image as the first target reference image. The filtering here may include but is not limited to image processing, image enhancement, image denoising, etc. On this basis, the first target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction encoding based on the first target reference image.
[0206] Exemplarily, when the initial reference image is losslessly compressed and encoded to obtain the first bitstream, since lossy compression encoding can be performed without waiting for filtering to be completed, after each CU of the initial reference image is reconstructed, the CU of the initial reference image can be lossily compressed and encoded, thereby quickly performing lossy compression encoding on each CU of the initial reference image.
[0207] Exemplarily, when the first code stream is subjected to lossy compression decoding to obtain the first target reference image, the decoding unit may be an actual parallel unit. For example, the first target reference image may include multiple actual parallel units, and the first sub-code streams of one or more actual parallel units are obtained from the first cache module, and the first sub-code streams of these actual parallel units are partial code streams in the first code stream. For the first sub-code stream of each actual parallel unit, the first sub-code stream is subjected to lossy compression decoding to obtain the first decoded pixel of the actual parallel unit, and the first decoded pixel is a partial pixel of the first target reference image.
[0208] based on Figure 5C The position relationship with Figure 5D Correspondingly, a complete video decoding method may include entropy decoding (ie, entropy decoding of a received bit stream), inverse quantization, inverse transformation, reconstruction, and filtering (eg, in-loop filtering).
[0209] Before performing the filtering operation, the decoding end can use the image before the filtering operation (i.e., the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image. Obviously, the initial reference image of the encoding end and the initial reference image of the decoding end can be the same.
[0210] After obtaining the initial reference image, the decoding end performs lossy compression encoding on the initial reference image to obtain a second code stream, and stores the second code stream in the second cache module, that is, the second cache module stores the second code stream instead of the initial reference image.
[0211] When inter-frame prediction is required, the second code stream is obtained from the second cache module, and the second code stream is lossy compressed and decoded to obtain a lossy compressed decoded image. The image after lossy compression decoding is filtered (such as in-loop filtering), and a second target reference image is determined based on the filtered image, such as using the filtered image as the second target reference image. The filtering here may include but is not limited to image processing, image enhancement, image denoising, etc. On this basis, the second target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0212] It should be noted that in the operation of the inter-frame prediction units at the encoding end and the decoding end, part of the pixels may be taken out for inter-frame prediction. If the reference frame is compressed (lossy or lossless) and the compressed bitstream is cached, part of the bitstream may be taken out for separate decoding and used for inter-frame prediction. For example, a 16x16 inter-frame prediction coding unit needs to obtain 23x23 integer pixels. At this time, if 16x4 parallelism is supported, several 16x4 bitstreams may be taken out according to their positions to cover the required 23x23 integer pixels to complete the inter-frame prediction.
[0213] Exemplarily, when the initial reference image is losslessly compressed and encoded to obtain the second bitstream, since lossy compression encoding can be performed without waiting for filtering to be completed, after each CU of the initial reference image is reconstructed, the CU of the initial reference image can be lossily compressed and encoded, thereby quickly performing lossy compression encoding on each CU of the initial reference image.
[0214] Exemplarily, when the second code stream is subjected to lossy compression decoding to obtain the second target reference image, the decoding unit may be an actual parallel unit (the size of the actual parallel unit is selected by the decoding end according to application requirements). For example, the second target reference image may include multiple actual parallel units, and the second sub-code streams of one or more actual parallel units may be obtained from the second cache module, and the second sub-code streams of these actual parallel units are partial code streams in the second code stream. In this way, for the second sub-code stream of each actual parallel unit, the second sub-code stream may be subjected to lossy compression decoding to obtain the second decoded pixel of the actual parallel unit, and the second decoded pixel may be a partial pixel of the second target reference image.
[0215] For example, for the encoding end and the decoding end, since lossy compression encoding and lossy compression decoding are performed first and then filtering operations are performed, part of the performance loss caused by lossy compression can be recovered through filtering operations.
[0216] Exemplarily, for the encoding end and the decoding end, lossy compression encoding and lossy compression decoding are performed first, and then the filtering operation is performed. Therefore, after each CU of the initial reference image is reconstructed, the CU of the initial reference image can be lossy compressed and encoded, so that each CU of the initial reference image can be quickly lossy compressed and encoded.
[0217] For example, see Figure 5D As shown, after obtaining the reconstructed image, the encoder can use the reconstructed image for intra-frame prediction coding, or the reconstructed image can be used for SCC prediction, and SCC prediction includes block copy intra-frame prediction and string copy intra-frame prediction. Therefore, the reconstructed image can be used for block copy intra-frame prediction coding, or the reconstructed image can be used for string copy intra-frame prediction coding. Different from the above method, in this embodiment, see Figure 5E As shown, after the encoder performs lossy compression decoding on the first bitstream to obtain a lossy compression decoded image, before filtering the lossy compression decoded image, the lossy compression decoded image can be used for intra-frame prediction coding, or the lossy compression decoded image can be used for block copy intra-frame prediction coding, or the lossy compression decoded image can be used for string copy intra-frame prediction coding. Based on this, the reference pixels of intra-frame prediction, block copy intra-frame prediction, and string copy intra-frame prediction can be unified as reference pixels after lossy compression, so that the bandwidth of intra-frame prediction, block copy intra-frame prediction, and string copy intra-frame prediction can be reduced.
[0218] Similarly, after the decoding end performs lossy compression decoding on the second bit stream to obtain a lossy compression decoded image, before filtering the lossy compression decoded image, the lossy compression decoded image is used for intra-frame prediction decoding, or the lossy compression decoded image is used for block copy intra-frame prediction decoding, or the lossy compression decoded image is used for string copy intra-frame prediction decoding.
[0219] Case 3: For the encoder and decoder, if the filtering operation includes the first filtering and the second filtering, that is, the filtering operation is a decoupled filtering operation, and the first filtering and the second filtering can be performed separately, then lossy compression encoding can be added after the first filtering, and lossy compression decoding can be added after the cache module (recorded as the first cache module at the encoder and the second cache module at the decoder), and the lossy compression decoding is before the second filtering, see Fig. 5FAs shown, it is a schematic diagram of the positions of lossy compression encoding and lossy compression decoding. Obviously, the steps of lossy compression encoding and lossy compression decoding can be placed between the first filtering and the second filtering, so that some performance can be recovered through filtering and the impact on the prediction module can be reduced.
[0220] based on Fig. 5F The complete video coding method may include prediction, transformation, quantization, and entropy coding, and the bit stream after entropy coding is transmitted to the decoding end. In addition, it may also include inverse quantization, inverse transformation, reconstruction, first filtering, and second filtering. The first filtering and the second filtering may include but are not limited to image processing, image enhancement, image denoising, etc.
[0221] After performing the first filtering and before performing the second filtering, the image before the second filtering (ie, the reference image obtained after performing the first filtering on the current image and before performing the second filtering on the current image) can be used as the initial reference image.
[0222] After obtaining the initial reference image, the encoding end performs lossy compression encoding on the initial reference image to obtain a first bitstream, and stores the first bitstream in a first cache module, that is, the first cache module stores the first bitstream instead of the initial reference image.
[0223] The encoding end obtains the first code stream from the first cache module, and performs lossy compression decoding on the first code stream to obtain a lossy compression decoded image. The lossy compression decoded image is subjected to a second filter, and a first target reference image is determined based on the second filtered image, such as using the second filtered image as the first target reference image. On this basis, the first target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction encoding based on the first target reference image.
[0224] Exemplarily, when the first code stream is subjected to lossy compression decoding to obtain the first target reference image, the decoding unit may be an actual parallel unit. For example, the first target reference image may include multiple actual parallel units, and the first sub-code streams of one or more actual parallel units are obtained from the first cache module, and the first sub-code streams of these actual parallel units are partial code streams in the first code stream. For the first sub-code stream of each actual parallel unit, the first sub-code stream is subjected to lossy compression decoding to obtain the first decoded pixel of the actual parallel unit, and the first decoded pixel is a partial pixel of the first target reference image.
[0225] based on Fig. 5FThe positional relationship between the first and second images, the complete video decoding method may include entropy decoding, inverse quantization, inverse transformation, reconstruction, first filtering and second filtering. The first filtering and the second filtering may include but are not limited to image processing, image enhancement, image denoising, etc. Based on this, after performing the first filtering and before performing the second filtering, the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) can be used as the initial reference image. Obviously, the initial reference image at the encoding end and the initial reference image at the decoding end may be the same.
[0226] After obtaining the initial reference image, the decoding end performs lossy compression encoding on the initial reference image to obtain a second code stream, and stores the second code stream in the second cache module, that is, the second cache module stores the second code stream instead of the initial reference image.
[0227] The decoding end obtains the second code stream from the second cache module, and performs lossy compression decoding on the second code stream to obtain a lossy compression decoded image. The lossy compression decoded image is subjected to a second filtering, and a second target reference image is determined based on the second filtered image, such as using the second filtered image as the second target reference image. On this basis, the second target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0228] Exemplarily, when the second code stream is subjected to lossy compression decoding to obtain the second target reference image, the decoding unit may be an actual parallel unit (the size of the actual parallel unit is selected by the decoding end according to application requirements). For example, the second target reference image may include multiple actual parallel units, and the second sub-code streams of one or more actual parallel units may be obtained from the second cache module, and the second sub-code streams of these actual parallel units are partial code streams in the second code stream. In this way, for the second sub-code stream of each actual parallel unit, the second sub-code stream may be subjected to lossy compression decoding to obtain the second decoded pixel of the actual parallel unit, and the second decoded pixel may be a partial pixel of the second target reference image.
[0229] Exemplarily, after the encoder performs lossy compression decoding on the first bitstream to obtain a lossy compression decoded image, before performing the second filtering, the lossy compression decoded image can be used for intra-frame prediction coding, or the lossy compression decoded image can be used for block copy intra-frame prediction coding, or the lossy compression decoded image is used for string copy intra-frame prediction coding. Similarly, after the decoder performs lossy compression decoding on the second bitstream to obtain a lossy compression decoded image, before performing the second filtering, the lossy compression decoded image is used for intra-frame prediction decoding, or the lossy compression decoded image is used for block copy intra-frame prediction decoding, or the lossy compression decoded image is used for string copy intra-frame prediction decoding.
[0230] Of course, Case 1, Case 2 and Case 3 are just a few examples of the positions of lossy compression encoding and lossy compression decoding, and there is no restriction on the positional relationship between lossy compression encoding and lossy compression decoding. On the one hand, the steps of lossy compression encoding and lossy compression decoding can be moved forward and backward, as long as lossless compression decoding is performed before inter-frame prediction occurs. On the other hand, in other coding and decoding frameworks involving inter-frame prediction, a cache module (i.e., a reference frame image cache, which is recorded as the first cache module at the encoding end and the second cache module at the decoding end) can be separated out for similar scheme application. For example, a module for managing reference frames (i.e., reference images) generated by intelligent coding technology under a hybrid coding framework, and a management module for reference frames (i.e., reference images) under an end-to-end video compression coding framework, etc., are not restricted.
[0231] Embodiment 5: For Embodiment 1, Embodiment 2 and Embodiment 3, this embodiment can also provide an equivalent solution for Embodiment 4. For example, when the decoding end does not support or need it (such as the parallel unit setting is not appropriate so that the decoding end cannot use it directly), the equivalent solution of Embodiment 5 can be adopted. After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first target reference image, and store the first target reference image in a first cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, the first target reference image can be obtained from the first cache module, and the first target reference image is used for inter-frame prediction encoding. After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second target reference image, and store the second target reference image in a second cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, the second target reference image can be obtained from the second cache module, and the second target reference image is used for inter-frame prediction decoding.
[0232] Case 1: For the encoder and decoder, lossy compression coding can be added after filtering, and the lossy compression coding is in front of the cache module (referred to as the first cache module at the encoder and the second cache module at the decoder). Fig. 6A As shown, it is a schematic diagram of the coding framework. After performing a filtering operation (such as in-loop filtering), the coding end can use the image after the filtering operation (that is, the reference image obtained after filtering the current image) as the initial reference image.
[0233] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first target reference image (different from Example 4, what is obtained after lossy compression encoding is a reference image, not a code stream), and store the first target reference image in the first cache module, that is, the first cache module stores the reference image, not the first code stream.
[0234] When inter-frame prediction is required, the first target reference image can be obtained from the first cache module, and the first target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction encoding based on the first target reference image.
[0235] and Fig. 6A Correspondingly, during the decoding process, after performing a filtering operation (such as in-loop filtering), the decoding end may use the image after the filtering operation (ie, the reference image obtained after filtering the current image) as the initial reference image.
[0236] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second target reference image (different from Example 4, what is obtained after lossy compression encoding is a reference image, not a code stream), and store the second target reference image in the second cache module, that is, the second cache module stores the reference image, not the second code stream.
[0237] When inter-frame prediction is required, the second target reference image can be obtained from the second cache module, and the second target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0238] Case 2: For the encoding end and the decoding end, lossy compression coding can be added before filtering (such as lossy compression coding is located after reconstruction), and the lossy compression coding is followed by a cache module (recorded as the first cache module at the encoding end and as the second cache module at the decoding end), thereby placing the lossy compression coding step before filtering.
[0239] Before performing the filtering operation, the encoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0240] After obtaining the initial reference image, the encoding end may perform lossy compression encoding on the initial reference image to obtain a first target reference image, and store the first target reference image in the first cache module, that is, the first cache module stores the reference image.
[0241] When inter-frame prediction is required, the encoding end obtains the first target reference image from the first cache module, filters the first target reference image (such as in-loop filtering), and obtains the filtered first target reference image. Then, the first target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction coding based on the first target reference image.
[0242] Before performing the filtering operation, the decoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0243] After obtaining the initial reference image, the decoding end may perform lossy compression encoding on the initial reference image to obtain a second target reference image, and store the second target reference image in the second cache module, that is, the second cache module stores the reference image.
[0244] When inter-frame prediction is required, the decoding end obtains the second target reference image from the second cache module, filters the second target reference image (such as in-loop filtering), and obtains the filtered second target reference image. Then, the second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0245] Case 3: For the encoding end and the decoding end, if the filtering operation includes the first filtering and the second filtering, that is, the filtering operation is a decoupled filtering operation, and the first filtering and the second filtering can be performed separately, then lossy compression coding can be added after the first filtering, and the lossy compression coding is in front of the second filtering, and the lossy compression coding is followed by a cache module (recorded as the first cache module at the encoding end and as the second cache module at the decoding end), that is, the lossy compression coding is located between the two filterings.
[0246] After performing the first filtering and before performing the second filtering, the encoding end may use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the encoding end may perform lossy compression encoding on the initial reference image to obtain a first target reference image, and store the first target reference image in the first cache module, that is, the first cache module stores the reference image. When inter-frame prediction is required, the encoding end obtains the first target reference image from the first cache module, performs the second filtering on the first target reference image, and obtains the first target reference image after the second filtering. Then, the first target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction encoding based on the first target reference image.
[0247] After performing the first filtering and before performing the second filtering, the decoding end may use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the decoding end may perform lossy compression encoding on the initial reference image to obtain a second target reference image, and store the second target reference image in the second cache module, that is, the second cache module stores the reference image. When inter-frame prediction is required, the decoding end obtains the second target reference image from the second cache module, performs a second filtering on the second target reference image, and obtains the second target reference image after the second filtering. Then, the second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0248] Of course, Case 1, Case 2, and Case 3 are just a few examples of the locations of lossy compression encoding and are not limiting.
[0249] Embodiment 6: For Embodiment 1, Embodiment 2 and Embodiment 3, this embodiment can also provide an equivalent solution for Embodiment 4. For example, when the decoding end does not support or need it (such as the parallel unit is not properly set so that the decoding end cannot use it directly), the equivalent solution of Embodiment 6 can be adopted. After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first code stream, perform lossy compression decoding on the first code stream to obtain a first target reference image, and store the first target reference image in a first cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, the first target reference image can be obtained from the first cache module, and the first target reference image is used for inter-frame prediction encoding. After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second code stream, perform lossy compression decoding on the second code stream to obtain a second target reference image, and store the second target reference image in a second cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, the second target reference image can be obtained from the second cache module, and the second target reference image is used for inter-frame prediction decoding.
[0250] Exemplarily, compared with Example 5, in Example 5, lossy compression coding generates a lossy compressed image, i.e., a target reference image, and there is no need to process the lossy compressed image through lossy compression decoding. In Example 6, lossy compression coding generates a code stream, and the code stream can also be processed through lossy compression decoding, i.e., the code stream is subjected to lossy compression decoding processing, thereby obtaining a target reference image, and storing the target reference image in a cache module.
[0251] Case 1: For the encoder and decoder, lossy compression encoding and lossy compression decoding can be added after filtering (that is, lossy compression encoding is followed by lossy compression decoding), and lossy compression encoding and lossy compression decoding are in front of the cache module (recorded as the first cache module at the encoder and the second cache module at the decoder). Figure 6B As shown, it is a schematic diagram of the coding framework. After performing a filtering operation (such as in-loop filtering), the coding end can use the image after the filtering operation (that is, the reference image obtained after filtering the current image) as the initial reference image.
[0252] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first code stream, and then perform lossy compression decoding on the first code stream to obtain a first target reference image, and store the first target reference image in a first cache module, that is, the first cache module stores the first target reference image, not the first code stream.
[0253] When inter-frame prediction is required, the first target reference image can be obtained from the first cache module, and the first target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction encoding based on the first target reference image.
[0254] and Figure 6B Correspondingly, during the decoding process, after performing a filtering operation (such as in-loop filtering), the decoding end may use the image after the filtering operation (ie, the reference image obtained after filtering the current image) as the initial reference image.
[0255] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second code stream, and then perform lossy compression decoding on the second code stream to obtain a second target reference image, and store the second target reference image in a second cache module, that is, the second cache module stores the second target reference image, not the second code stream.
[0256] When inter-frame prediction is required, the second target reference image can be obtained from the second cache module, and the second target reference image can be provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0257] Case 2: For the encoding end and the decoding end, lossy compression encoding (such as lossy compression encoding is located after reconstruction) and lossy compression decoding (that is, lossy compression encoding is followed by lossy compression decoding) can be added before filtering, and the lossy compression encoding and lossy compression decoding are followed by a cache module (recorded as the first cache module at the encoding end and as the second cache module at the decoding end), thereby placing the lossy compression encoding and lossy compression decoding steps before filtering.
[0258] Before performing the filtering operation, the encoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0259] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first code stream, perform lossy compression decoding on the first code stream to obtain a first target reference image, and store the first target reference image in the first cache module, that is, the first cache module stores the reference image. When inter-frame prediction is required, the first target reference image is obtained from the first cache module, and the first target reference image is filtered to obtain the filtered first target reference image. The first target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction encoding based on the first target reference image.
[0260] Before performing the filtering operation, the decoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0261] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second code stream, perform lossy compression decoding on the second code stream to obtain a second target reference image, and store the second target reference image in the second cache module, that is, the second cache module stores the reference image. When inter-frame prediction is required, the second target reference image is obtained from the second cache module, and the second target reference image is filtered to obtain a filtered second target reference image. The second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0262] Case 3: For the encoding end and the decoding end, if the filtering operation includes the first filtering and the second filtering, that is, the filtering operation is a decoupled filtering operation, and the first filtering and the second filtering can be performed separately, then lossy compression encoding and lossy compression decoding can be added after the first filtering (that is, lossy compression encoding is followed by lossy compression decoding), and the lossy compression encoding and lossy compression decoding are in front of the second filtering, and the lossy compression encoding and lossy compression decoding are followed by a cache module (recorded as the first cache module at the encoding end and as the second cache module at the decoding end), that is, located between the two filtering.
[0263] After performing the first filtering and before performing the second filtering, the encoding end may use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the encoding end may perform lossy compression encoding on the initial reference image to obtain a first code stream, perform lossy compression decoding on the first code stream to obtain a first target reference image, and store the first target reference image in a first cache module. When inter-frame prediction is required, the first target reference image is obtained from the first cache module, and the first target reference image is subjected to a second filtering to obtain the first target reference image after the second filtering. Then, the first target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction encoding based on the first target reference image.
[0264] After performing the first filtering and before performing the second filtering, the decoding end may use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the decoding end may perform lossy compression encoding on the initial reference image to obtain a second code stream, perform lossy compression decoding on the second code stream to obtain a second target reference image, and store the second target reference image in a second cache module. When inter-frame prediction is required, the second target reference image is obtained from the second cache module, and the second target reference image is subjected to a second filtering to obtain the second target reference image after the second filtering. Then, the second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0265] Of course, Case 1, Case 2, and Case 3 are just a few examples of the locations of lossy compression encoding and are not limiting.
[0266] Embodiment 7: For Embodiment 1, Embodiment 2 and Embodiment 3, this embodiment can also provide an equivalent solution for Embodiment 4. For example, when the decoding end does not support or need it (such as the parallel unit is not properly set so that the decoding end cannot use it directly), the equivalent solution of Embodiment 7 can be adopted. After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first target reference image, and then perform lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream (i.e., encode the first target reference image into a code stream), and store the first lossless compressed code stream in a first cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, the first lossless compressed code stream can be obtained from the first cache module, and the first lossless compressed code stream can be losslessly compressed and decoded to obtain the first target reference image (i.e., decode the code stream into the first target reference image), and the first target reference image is used for inter-frame prediction coding. After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second target reference image, and then perform lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and store the second lossless compressed code stream in a second cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, the second lossless compressed code stream can be obtained from the second cache module, and the second lossless compressed code stream can be losslessly compressed and decoded to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding.
[0267] Case 1: For the encoding end and the decoding end, lossy compression coding and lossless compression coding can be added after the filtering, and the lossy compression coding and lossless compression coding can be in front of the cache module (recorded as the first cache module at the encoding end and the second cache module at the decoding end), and lossless compression decoding can be added after the cache module.
[0268] See also Figure 6C As shown, it is a schematic diagram of the coding framework. After performing a filtering operation (such as in-loop filtering), the coding end can use the image after the filtering operation (that is, the reference image obtained after filtering the current image) as the initial reference image.
[0269] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first target reference image, and then perform lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream, and store the first lossless compressed code stream in the first cache module, that is, the first cache module stores the first lossless compressed code stream.
[0270] When inter-frame prediction is required, the encoding end can obtain the first lossless compressed code stream from the first cache module, and perform lossless compression decoding on the first lossless compressed code stream to obtain a first target reference image, and provide the first target reference image to the inter-frame prediction unit, which performs inter-frame prediction encoding based on the first target reference image.
[0271] and Figure 6C Correspondingly, during the decoding process, after performing a filtering operation (such as in-loop filtering), the decoding end may use the image after the filtering operation (ie, the reference image obtained after filtering the current image) as the initial reference image.
[0272] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second target reference image, and then perform lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and store the second lossless compressed code stream in the second cache module, that is, the second cache module stores the second lossless compressed code stream.
[0273] When inter-frame prediction is required, the decoding end can obtain the second lossless compressed code stream from the second cache module, and perform lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image, and provide the second target reference image to the inter-frame prediction unit, which performs inter-frame prediction decoding based on the second target reference image.
[0274] Case 2: For the encoding end and the decoding end, lossy compression coding (such as lossy compression coding is located after reconstruction) and lossless compression coding can be added before filtering, and the lossy compression coding and lossless compression coding are followed by a cache module (recorded as the first cache module at the encoding end and the second cache module at the decoding end), and lossless compression decoding is added after the cache module, and the lossless compression decoding is also located before filtering. In this way, the steps of lossy compression coding, lossless compression coding and lossless compression decoding can be placed before filtering, and the cache module is between lossless compression coding and lossless compression decoding.
[0275] Before performing the filtering operation, the encoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0276] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first target reference image, and then perform lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream, and store the first lossless compressed code stream in the first cache module, that is, the first cache module stores the first lossless compressed code stream.
[0277] When inter-frame prediction is required, the encoding end can obtain the first lossless compressed code stream from the first cache module, perform lossless compression decoding on the first lossless compressed code stream to obtain a first target reference image, and filter the first target reference image (such as in-loop filtering) to obtain a filtered first target reference image. Then, the first target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction coding based on the first target reference image.
[0278] Before performing the filtering operation, the decoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0279] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second target reference image, and then perform lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and store the second lossless compressed code stream in the second cache module, that is, the second cache module stores the second lossless compressed code stream.
[0280] When inter-frame prediction is required, the decoding end can obtain the second lossless compressed code stream from the second cache module, perform lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image, and filter the second target reference image (such as in-loop filtering) to obtain a filtered second target reference image. Then, the second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0281] Case 3: For the encoding end and the decoding end, if the filtering operation includes the first filtering and the second filtering, that is, the filtering operation is a decoupled filtering operation, and the first filtering and the second filtering can be performed separately, then lossy compression coding, lossless compression coding and lossless compression decoding can be added between the first filtering and the second filtering. For example, lossy compression coding and lossless compression coding are added after the first filtering, and the lossy compression coding and the lossless compression coding are followed by a cache module (recorded as the first cache module at the encoding end and the second cache module at the decoding end), and lossless compression decoding is added after the cache module, and the lossless compression decoding is located in front of the second filtering. In this way, the steps of lossy compression coding, lossless compression coding and lossless compression decoding can be placed between the first filtering and the second filtering, and the cache module is between the lossless compression coding and the lossless compression decoding.
[0282] After performing the first filtering and before performing the second filtering, the encoder can use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the encoder can perform lossy compression encoding on the initial reference image to obtain a first target reference image, and then perform lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream, and store the first lossless compressed code stream in the first cache module, that is, the first cache module stores the first lossless compressed code stream.
[0283] When inter-frame prediction is required, the encoding end can obtain the first lossless compressed code stream from the first cache module, and perform lossless compression decoding on the first lossless compressed code stream to obtain the first target reference image. The encoding end performs a second filtering on the first target reference image to obtain the first target reference image after the second filtering. Then, the first target reference image after the second filtering is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction coding based on the first target reference image.
[0284] After performing the first filtering and before performing the second filtering, the decoding end may use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the decoding end may perform lossy compression encoding on the initial reference image to obtain a second target reference image, and then perform lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and store the second lossless compressed code stream in the second cache module, that is, the second cache module stores the second lossless compressed code stream.
[0285] When inter-frame prediction is required, the decoding end can obtain the second lossless compressed code stream from the second cache module, and perform lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image. The decoding end performs a second filtering on the second target reference image to obtain a second filtered second target reference image. Then, the second filtered second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0286] Of course, Case 1, Case 2, and Case 3 are just a few examples of the locations of lossy compression encoding and are not limiting.
[0287] Exemplarily, for the encoding end and the decoding end, if it is necessary to save bandwidth, a form of lossless compression can be introduced, that is, lossless compression encoding and lossless compression decoding are performed. Since lossless compression encoding will be performed after lossy compression encoding, the parallel unit size of lossy compression encoding and the parallel unit size of lossless compression encoding can be designed to have a specific relationship. For example, the parallel unit size of lossy compression encoding is an integer multiple of the parallel unit size of lossless compression encoding. For another example, the parallel unit size of lossless compression encoding is an integer multiple of the parallel unit size of lossy compression encoding. Through the above design, lossless compression encoding can be started without waiting for the lossy compression encoding of the entire image to be completed. That is, after the lossy compression encoding of one or part of the parallel units is completed, the lossless compression encoding of these parallel units can be started. Figure 6C In the example, “pixel” is used instead of “image”, indicating that some parallel units can be losslessly compressed and encoded.
[0288] Embodiment 8: For Embodiment 1, Embodiment 2 and Embodiment 3, this embodiment can also provide an equivalent solution for Embodiment 4. For example, when the decoding end does not support or need it (such as the parallel unit is not properly set so that the decoding end cannot use it directly), the equivalent solution of Embodiment 8 can be adopted. After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first code stream, perform lossy compression decoding on the first code stream to obtain a first target reference image, perform lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream (i.e., encode the first target reference image into a code stream), and store the first lossless compressed code stream in a first cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, the first lossless compressed code stream can be obtained from the first cache module, and the first lossless compressed code stream can be losslessly compressed and decoded to obtain a first target reference image (i.e., decode the code stream into a first target reference image), and the first target reference image is used for inter-frame prediction coding. After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second bitstream, perform lossy compression decoding on the second bitstream to obtain a second target reference image, perform lossless compression encoding on the second target reference image to obtain a second lossless compressed bitstream, and store the second lossless compressed bitstream in a second cache module (such as a reference image cache). On this basis, for the inter-frame prediction process, a second lossless compressed bitstream can be obtained from the second cache module, and the second lossless compressed bitstream can be losslessly compressed and decoded to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding.
[0289] Exemplarily, compared with Example 7, in Example 7, lossy compression coding generates a lossy compressed image, i.e., a target reference image, and there is no need to process the lossy compressed image through lossy compression decoding. In Example 8, lossy compression coding generates a code stream, and the code stream can also be processed through lossy compression decoding, i.e., the code stream is subjected to lossy compression decoding processing to obtain a target reference image, and then the target reference image is subjected to lossless compression coding.
[0290] Case 1: For the encoding end and the decoding end, lossy compression encoding, lossy compression decoding, lossless compression encoding and lossless compression decoding can be added in sequence after the filtering, and a cache module is provided between the lossless compression encoding and the lossless compression decoding (recorded as the first cache module at the encoding end and as the second cache module at the decoding end).
[0291] See also Fig.6D As shown, it is a schematic diagram of the coding framework. After performing a filtering operation (such as in-loop filtering), the coding end can use the image after the filtering operation (that is, the reference image obtained after filtering the current image) as the initial reference image.
[0292] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first code stream, perform lossy compression decoding on the first code stream to obtain a first target reference image, and then perform lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream, and store the first lossless compressed code stream in a first cache module.
[0293] When inter-frame prediction is required, the encoding end can obtain the first lossless compressed code stream from the first cache module, and perform lossless compression decoding on the first lossless compressed code stream to obtain a first target reference image, and provide the first target reference image to the inter-frame prediction unit, which performs inter-frame prediction encoding based on the first target reference image.
[0294] and Fig.6D Correspondingly, during the decoding process, after performing a filtering operation (such as in-loop filtering), the decoding end may use the image after the filtering operation (ie, the reference image obtained after filtering the current image) as the initial reference image.
[0295] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second code stream, perform lossy compression decoding on the second code stream to obtain a second target reference image, and then perform lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and store the second lossless compressed code stream in a second cache module.
[0296] When inter-frame prediction is required, the decoding end can obtain the second lossless compressed code stream from the second cache module, and perform lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image, and provide the second target reference image to the inter-frame prediction unit, which performs inter-frame prediction decoding based on the second target reference image.
[0297] Case 2: For the encoding end and the decoding end, lossy compression encoding, lossy compression decoding, lossless compression encoding and lossless compression decoding can be added before filtering, and a cache module is provided between lossless compression encoding and lossless compression decoding (recorded as the first cache module at the encoding end and the second cache module at the decoding end). Among them, lossy compression encoding can be located after reconstruction, lossy compression encoding can be followed by lossy compression decoding, and lossy compression decoding can be followed by lossless compression encoding, so that the steps of lossy compression encoding, lossy compression decoding, lossless compression encoding and lossless compression decoding are placed before filtering.
[0298] Before performing the filtering operation, the encoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0299] After obtaining the initial reference image, the encoding end can perform lossy compression encoding on the initial reference image to obtain a first code stream, perform lossy compression decoding on the first code stream to obtain a first target reference image, and then perform lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream, and store the first lossless compressed code stream in a first cache module.
[0300] When inter-frame prediction is required, the encoding end can obtain the first lossless compressed code stream from the first cache module, perform lossless compression decoding on the first lossless compressed code stream to obtain a first target reference image, and filter the first target reference image (such as in-loop filtering) to obtain a filtered first target reference image. Then, the filtered first target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction coding based on the first target reference image.
[0301] Before performing the filtering operation, the decoding end uses the image before the filtering operation (ie, the reference image obtained before filtering the current image) as the initial reference image. For example, the image after the reconstruction operation is performed is used as the initial reference image.
[0302] After obtaining the initial reference image, the decoding end can perform lossy compression encoding on the initial reference image to obtain a second code stream, perform lossy compression decoding on the second code stream to obtain a second target reference image, and then perform lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and store the second lossless compressed code stream in a second cache module.
[0303] When inter-frame prediction is required, the decoding end can obtain the second lossless compressed code stream from the second cache module, perform lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image, and filter the second target reference image (such as in-loop filtering) to obtain a filtered second target reference image. Then, the second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0304] Case 3: For the encoding end and the decoding end, if the filtering operation includes the first filtering and the second filtering, that is, the filtering operation is a decoupled filtering operation, and the first filtering and the second filtering can be performed separately, then lossy compression encoding, lossy compression decoding, lossless compression encoding and lossless compression decoding can be added between the first filtering and the second filtering, and a cache module is provided between the lossless compression encoding and the lossless compression decoding (recorded as the first cache module at the encoding end and the second cache module at the decoding end). Among them, the lossy compression encoding can be located behind the first filtering, the lossy compression encoding can be followed by the lossy compression decoding, the lossy compression decoding can be followed by the lossless compression encoding, and the lossless compression encoding can be followed by the cache module and the lossless compression decoding.
[0305] After performing the first filtering and before performing the second filtering, the encoder can use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the encoder can perform lossy compression encoding on the initial reference image to obtain a first bitstream, perform lossy compression decoding on the first bitstream to obtain a first target reference image, and then perform lossless compression encoding on the first target reference image to obtain a first lossless compressed bitstream, and store the first lossless compressed bitstream in the first cache module.
[0306] When inter-frame prediction is required, the encoding end can obtain the first lossless compressed code stream from the first cache module, and perform lossless compression decoding on the first lossless compressed code stream to obtain the first target reference image. The encoding end performs a second filtering on the first target reference image to obtain the first target reference image after the second filtering. Then, the first target reference image after the second filtering is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction coding based on the first target reference image.
[0307] After performing the first filtering and before performing the second filtering, the decoding end may use the image before the second filtering (i.e., the reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image) as the initial reference image. After obtaining the initial reference image, the decoding end may perform lossy compression encoding on the initial reference image to obtain a second bitstream, perform lossy compression decoding on the second bitstream to obtain a second target reference image, and then perform lossless compression encoding on the second target reference image to obtain a second lossless compressed bitstream, and store the second lossless compressed bitstream in the second cache module.
[0308] When inter-frame prediction is required, the decoding end can obtain the second lossless compressed code stream from the second cache module, and perform lossless compression decoding on the second lossless compressed code stream to obtain a second target reference image. The decoding end performs a second filtering on the second target reference image to obtain a second filtered second target reference image. Then, the second filtered second target reference image is provided to the inter-frame prediction unit, and the inter-frame prediction unit performs inter-frame prediction decoding based on the second target reference image.
[0309] Of course, Case 1, Case 2, and Case 3 are just a few examples of the locations of lossy compression encoding and are not limiting.
[0310] Exemplarily, for the encoding end and the decoding end, if it is necessary to save bandwidth, a form of lossless compression can be introduced, that is, lossless compression encoding and lossless compression decoding are performed. Since lossless compression encoding will be performed after lossy compression encoding, the parallel unit size of lossy compression encoding and the parallel unit size of lossless compression encoding can be designed to have a specific relationship. For example, the parallel unit size of lossy compression encoding is an integer multiple of the parallel unit size of lossless compression encoding. For another example, the parallel unit size of lossless compression encoding is an integer multiple of the parallel unit size of lossy compression encoding. Through the above design, lossless compression encoding can be started without waiting for the lossy compression encoding of the entire image to be completed. That is, after the lossy compression encoding of one or part of the parallel units is completed, the lossless compression encoding of these parallel units can be started. Fig.6D In the example, “pixel” is used instead of “image”, indicating that some parallel units can be losslessly compressed and encoded.
[0311] In a possible implementation, the lossy compression encoding method adopted by the encoding end may be the same as or different from the lossy compression encoding method adopted by the decoding end. For example, if the encoding end adopts the lossy compression encoding method of Example 4, the decoding end may adopt the lossy compression encoding method of Example 4, or Example 5, or Example 6, or Example 7, or Example 8. For example, if the encoding end adopts the lossy compression encoding method of Example 5, the decoding end may adopt the lossy compression encoding method of Example 4, or Example 5, or Example 6, or Example 7, or Example 8. For example, if the encoding end adopts the lossy compression encoding method of Example 6, the decoding end may adopt the lossy compression encoding method of Example 4, or Example 5, or Example 6, or Example 7, or Example 8. For example, if the encoding end adopts the lossy compression encoding method of Example 7, the decoding end may adopt the lossy compression encoding method of Example 4, or Example 5, or Example 6, or Example 7, or Example 8. For example, if the encoding end adopts the lossy compression encoding method of Example 8, the decoding end can adopt the lossy compression encoding method of Example 4, or Example 5, or Example 6, or Example 7, or Example 8.
[0312] In a possible implementation, for Example 1 to Example 8, in addition to the initial reference image indicated in Example 1 to Example 8, for the encoding end and the decoding end, the initial reference image can also be an image decoded from end-to-end video / image compression (such as JPEG AI), an intelligently generated image (AIGC), a super-resolved image, a denoised image, a knowledge image, etc.
[0313] In one possible implementation, for the filtering operations in Examples 1 to 8, the filtering operations are not limited to the filtering modules under the encoding framework or the decoding framework, but can be a filtering (enhancement) module for end-to-end image / video compression. Furthermore, it can be intuitively introduced into all modules, components, and systems that involve the need to access images, so as to achieve the purpose of saving cache and reducing bandwidth.
[0314] In a possible implementation, for Example 1 to Example 8, in the operation of the inter-frame prediction units at the encoding end and the decoding end, part of the pixels may be taken out for inter-frame prediction. If the reference frame is compressed (lossy compression or lossless compression) and the compressed bitstream is cached, part of the bitstream may be taken out for separate decoding and used for inter-frame prediction. For example, a 16*16 inter-frame prediction coding unit needs to obtain 23*23 integer pixels. At this time, if 16*4 parallelism is supported, several 16*4 bitstreams may be taken out according to their positions to cover the required 23*23 integer pixels to complete the inter-frame prediction.
[0315] Example 9: In Examples 4 to 8, when the encoder performs lossy compression encoding on the initial reference image, it may output a first code stream or a first target reference image. When the decoder performs lossy compression encoding on the initial reference image, it may output a second code stream or a second target reference image. The process of lossy compression encoding is described below.
[0316] Taking the use of shallow coding (PLC) in lossy compression coding as an example, the complete shallow coding framework can include block division, code control, prediction, transformation, quantization, entropy coding, etc., that is, both the encoding end and the decoding end can use shallow coding to implement lossy compression coding. For code control, code control can only act on the encoding end, and the encoding end transmits the code control parameters to the decoding end, or code control can act on the encoding end and the decoding end at the same time to save the coding cost of quantization parameters and control the prediction mode. Of course, in addition to shallow coding, lossy compression coding can also be achieved in other ways, and the implementation process is similar, which will not be repeated later.
[0317] For example, shallow coding is a simple prediction method, mostly using intra-frame prediction, with a compression ratio of less than 10 times, generally requiring subjective losslessness, simple hardware implementation, and suitable for scenarios with high real-time requirements, small cache, and high parallelism requirements. It should be noted that the above shallow coding framework needs to be deployed on both the encoding and decoding ends to achieve lossy compression coding.
[0318] See also Fig. 6E As shown, it is an example of the encoder and decoder using shallow coding to implement lossy compression coding. The input data of the lossy compression coding is the initial reference image, and the initial reference image can be sliced (for dividing multiple parallel units), block divided (for dividing multiple coding units), predicted and quantized. When the quantized coefficients are obtained, the quantized coefficients can be directly output, that is, the quantized coefficients are used as a code stream (for the encoder, it is the first code stream, for the decoder, it is the second code stream). When the quantized coefficients are obtained, the code stream can also be interleaved (this process is optional, that is, the code stream interleaving can be performed or not) to obtain the code stream. And / or, when the quantized coefficients are obtained, the quantized coefficients can also be dequantized, and then reconstructed to output the reconstructed image, and the reconstructed image is the target reference image (for the encoder, it is the first target reference image, for the decoder, it is the second target reference image).
[0319] The above process may also involve processes such as code control initialization, code control update, complexity calculation and quantization parameter derivation. Based on the above process, quantization parameters can be derived, and the quantization parameters are used to control the quantization steps, which is not limited.
[0320] See also Fig. 6FAs shown, it is an example of the encoding end and the decoding end using shallow coding to implement lossy compression coding. The input data of the lossy compression coding is the initial reference image, and the initial reference image can be divided into parallel units, coding units, predicted and quantized. When the quantized coefficients are obtained, the quantized coefficients can be directly output, that is, the quantized coefficients are used as a code stream (the first code stream or the second code stream). When the quantized coefficients are obtained, the code stream can also be interleaved (this process is optional) to obtain the code stream. And / or, the quantized coefficients can also be dequantized and reconstructed to obtain a reconstructed image, which can be used as a reference for prediction, that is, as a basis for prediction, and the reconstructed image can also be output as a target reference image.
[0321] In the above process, a rate control process may also be involved, that is, rate control may provide parameters for prediction, thereby performing prediction based on the rate control parameters, and rate control may provide parameters for quantization, thereby performing quantization based on the rate control parameters.
[0322] Exemplarily, for the encoding end, the encoding end performs lossy compression encoding on the initial reference image, which may include:
[0323] Step S11: The encoding end divides the initial reference image into a plurality of parallel units by using a first parallel unit division method (the parallel unit division method of the encoding end is the first parallel unit division method), and different parallel units do not refer to each other.
[0324] Exemplarily, in order to process the initial reference image in parallel, the initial reference image can be divided into multiple parallel units, and different parallel units do not refer to each other. Since different parallel units do not refer to each other, lossy compression encoding can be performed on multiple parallel units at the same time, thereby improving the encoding rate of the initial reference image.
[0325] Considering that the resolution of the initial reference image is not necessarily an integer multiple of the parallel unit, or the resolution of the initial reference image is not necessarily an integer multiple of the coding unit, the initial reference image can also be processed by using a method such as padding.
[0326] Step S12: For each parallel unit, the encoding end divides the parallel unit into multiple coding units (i.e., CU units) by using the first coding unit division method (the coding unit division method of the encoding end can be recorded as the first coding unit division method), and reference is allowed between different coding units in the same parallel unit.
[0327] Step S13: The encoding end predicts the coding unit using the first prediction mode.
[0328] For example, for each parallel unit, multiple coding units in the parallel unit may be predicted in sequence according to the order of the multiple coding units in the parallel unit. Multiple coding units in the same parallel unit may be predicted in sequence, and coding units in different parallel units may be predicted simultaneously.
[0329] For example, the first prediction mode may be an intra-frame prediction mode, such as a DC mode, a Planar mode, an angular prediction mode, a horizontal prediction mode, a vertical prediction mode, a bilinear mode, etc. There is no restriction on the first prediction mode.
[0330] Exemplarily, the first prediction mode may be a fixed prediction mode, such as taking a certain fixed prediction mode as the first prediction mode, or the rate-distortion principle or other methods may be used to select a prediction mode with the smallest replacement value from multiple prediction modes as the first prediction mode. Of course, other methods may also be used to obtain the first prediction mode, and there is no limitation on this.
[0331] Step S14: The encoding end uses the first quantization parameter to quantize the predicted intermediate parameter.
[0332] For example, the first quantization parameter can be a quantization parameter obtained based on bit rate control. For each coding unit, after predicting the coding unit, the first quantization parameter can be used to quantize the predicted intermediate parameter. The predicted intermediate parameter can be a residual value or a transform coefficient value. There is no restriction on the predicted intermediate parameter.
[0333] Step S15: If there is no bitstream interleaving, the encoder generates a first bitstream based on the quantized intermediate parameters and outputs the first bitstream. The quantized intermediate parameters can be residual values or transform coefficient values, and there is no limitation on this.
[0334] If there is code stream interleaving, the encoding end uses the first interleaving form to interleave the quantized intermediate parameters to obtain the first code stream, and the first interleaving form indicates the arrangement order of the code streams corresponding to each channel of each coding unit. For example, the first interleaving form can indicate CU-level YUV interleaving, the first interleaving form can indicate image-level YUV interleaving, the first interleaving form can indicate Slice-level YUV interleaving, the first interleaving form can indicate 128*4-level Y and 64*2 UV interleaving, etc. Of course, the above are just a few examples of the first interleaving form, and the first interleaving form can be any form, without limitation.
[0335] Exemplarily, the channels of the encoding unit may include at least one of the following channels: Y channel, U channel, V channel, Co channel, Cg channel, R channel, G channel, B channel, alpha channel, IR channel, D channel, and W channel.
[0336] Step S16: The encoding end dequantizes and reconstructs the quantized intermediate parameters to obtain a reconstructed image, which can be used as a reference for prediction. The reconstructed image can also be used as a first target reference image and output.
[0337] Exemplarily, for a decoding end, the decoding end performs lossy compression encoding on the initial reference image, which may include:
[0338] Step S21: The decoding end divides the initial reference image into a plurality of parallel units by using the second parallel unit division method (the parallel unit division method of the decoding end is the second parallel unit division method), and different parallel units do not refer to each other.
[0339] Exemplarily, in order to process the initial reference image in parallel, the initial reference image can be divided into multiple parallel units, and different parallel units do not refer to each other. Since different parallel units do not refer to each other, lossy compression encoding can be performed on multiple parallel units at the same time, thereby improving the encoding rate of the initial reference image.
[0340] Considering that the resolution of the initial reference image is not necessarily an integer multiple of the parallel unit, or the resolution of the initial reference image is not necessarily an integer multiple of the coding unit, the initial reference image can also be processed by using a method such as padding.
[0341] In a possible implementation manner, the second parallel unit division manner may be the same as or different from the first parallel unit division manner. This embodiment takes the second parallel unit division manner being the same as the first parallel unit division manner as an example.
[0342] Exemplarily, if the decoding end obtains lossy compression configuration information from the bit stream, and the lossy compression configuration information includes indication information of a first parallel unit division method, the decoding end can determine a second parallel unit division method based on the indication information of the first parallel unit division method, and the second parallel unit division method is the same as the first parallel unit division method.
[0343] For example, the bit stream is different from the first bit stream / second bit stream, and the bit stream needs to be transmitted between the encoding end and the decoding end, while the first bit stream / second bit stream will not be transmitted between the encoding end and the decoding end. The encoding end can carry the indication information of the first parallel unit division method in the bit stream, and the decoding end obtains the indication information of the first parallel unit division method from the bit stream.
[0344] The indication information of the first parallel unit division mode may be indication information at the sequence level of the bitstream, used to indicate that the entire sequence adopts the first parallel unit division mode, so that the second parallel unit division mode of the entire sequence is the same as the first parallel unit division mode. Alternatively, the indication information at the sequence level extended data is used to indicate that the entire sequence adopts the first parallel unit division mode. Alternatively, the indication information at the image level is used to indicate that the entire image adopts the first parallel unit division mode. Alternatively, the indication information at the image level extended data is used to indicate that the entire image adopts the first parallel unit division mode. Alternatively, the indication information at the slice level is used to indicate that the entire slice adopts the first parallel unit division mode. Alternatively, the indication information at the tile level is used to indicate that the entire tile adopts the first parallel unit division mode. Alternatively, the indication information at the patch level is used to indicate that the entire patch adopts the first parallel unit division mode. Alternatively, the indication information at the LCU level is used to indicate that the entire LCU adopts the first parallel unit division mode. Alternatively, the indication information at the control unit level is used to indicate that the control units adopt the first parallel unit division mode.
[0345] Exemplarily, if the decoding end obtains lossy compression configuration information from the bit stream, and the lossy compression configuration information does not include indication information of the first parallel unit division method, or the lossy compression configuration information is not obtained from the bit stream, the decoding end can implicitly derive a second parallel unit division method that is the same as the first parallel unit division method.
[0346] For example, the encoding end and the decoding end may pre-agree on a parallel unit division method, so that the encoding end uses the parallel unit division method as the first parallel unit division method, and the decoding end uses the parallel unit division method as the second parallel unit division method. Of course, other methods may also be used, as long as the parallel unit division methods of the encoding end and the decoding end are the same.
[0347] Step S22: For each parallel unit, the decoding end divides the parallel unit into multiple coding units (i.e., CU units) by using the second coding unit division method (the coding unit division method of the decoding end can be recorded as the second coding unit division method), and reference is allowed between different coding units in the same parallel unit.
[0348] In a possible implementation, the second coding unit division method may be the same as or different from the first coding unit division method. This embodiment takes the second coding unit division method being the same as the first coding unit division method as an example.
[0349] Exemplarily, if the decoding end obtains lossy compression configuration information from the bit stream, and the lossy compression configuration information includes indication information of the first coding unit division method, the decoding end can determine the second coding unit division method based on the indication information of the first coding unit division method, and the second coding unit division method is the same as the first coding unit division method.
[0350] For example, the bit stream is different from the first code stream / second code stream, and the bit stream needs to be transmitted between the encoding end and the decoding end, while the first code stream / second code stream will not be transmitted between the encoding end and the decoding end. The encoding end can carry the indication information of the first coding unit division method in the bit stream, and the decoding end obtains the indication information of the first coding unit division method from the bit stream.
[0351] The indication information of the first coding unit division mode may be indication information at the sequence level of the bit stream, used to indicate that the entire sequence adopts the first coding unit division mode, so that the second coding unit division mode of the entire sequence is the same as the first coding unit division mode. Alternatively, the indication information at the sequence level extended data is used to indicate that the entire sequence adopts the first coding unit division mode. Alternatively, the indication information at the image level is used to indicate that the entire image adopts the first coding unit division mode. Alternatively, the indication information at the image level extended data is used to indicate that the entire image adopts the first coding unit division mode. Alternatively, the indication information at the slice level is used to indicate that the entire slice adopts the first coding unit division mode. Alternatively, the indication information at the tile level is used to indicate that the entire tile adopts the first coding unit division mode. Alternatively, the indication information at the patch level is used to indicate that the entire patch adopts the first coding unit division mode. Alternatively, the indication information at the LCU level is used to indicate that the entire LCU adopts the first coding unit division mode. Alternatively, the indication information at the control unit level is used to indicate that the control units adopt the first coding unit division mode.
[0352] Exemplarily, if the decoding end obtains lossy compression configuration information from the bit stream, and the lossy compression configuration information does not include indication information of the first coding unit division method, or the lossy compression configuration information is not obtained from the bit stream, the decoding end can implicitly derive a second coding unit division method that is the same as the first coding unit division method.
[0353] For example, the encoder and the decoder may pre-agree on a coding unit division method, so that the encoder uses the coding unit division method as the first coding unit division method, and the decoder uses the coding unit division method as the second coding unit division method. Of course, other methods may also be used, as long as the coding unit division methods of the encoder and the decoder are the same.
[0354] Step S23: The decoding end predicts the coding unit using the second prediction mode.
[0355] For example, for each parallel unit, multiple coding units in the parallel unit may be predicted in sequence according to the order of the multiple coding units in the parallel unit. Multiple coding units in the same parallel unit may be predicted in sequence, and coding units in different parallel units may be predicted simultaneously.
[0356] In a possible implementation manner, the second prediction mode (such as the intra-frame prediction mode) may be the same as or different from the first prediction mode. This embodiment takes the case where the second prediction mode is the same as the first prediction mode as an example.
[0357] Exemplarily, if the decoding end obtains lossy compression configuration information from the bitstream, and the lossy compression configuration information includes indication information of the first prediction mode, the decoding end can determine the second prediction mode based on the indication information of the first prediction mode, and the second prediction mode is the same as the first prediction mode. For example, the bitstream is different from the first code stream / second code stream, and the bitstream needs to be transmitted between the encoding end and the decoding end, and the first code stream / second code stream will not be transmitted between the encoding end and the decoding end. The encoding end carries the indication information of the first prediction mode in the bitstream, and the decoding end obtains the indication information of the first prediction mode from the bitstream.
[0358] The indication information of the first prediction mode may be indication information at the sequence level of the bitstream, used to indicate that the entire sequence adopts the first prediction mode, so that the second prediction mode of the entire sequence is the same as the first prediction mode. Alternatively, it may be indication information at the sequence-level extended data, used to indicate that the entire sequence adopts the first prediction mode. Alternatively, it may be indication information at the image level, used to indicate that the entire image adopts the first prediction mode. Alternatively, it may be indication information at the image-level extended data, used to indicate that the entire image adopts the first prediction mode. Alternatively, it may be indication information at the slice level, used to indicate that the entire slice adopts the first prediction mode. Alternatively, it may be indication information at the tile level, used to indicate that the entire tile adopts the first prediction mode. Alternatively, it may be indication information at the patch level, used to indicate that the entire patch adopts the first prediction mode. Alternatively, it may be indication information at the LCU level, used to indicate that the entire LCU adopts the first prediction mode. Alternatively, it may be indication information at the control unit level, used to indicate that the control units all adopt the first prediction mode.
[0359] Exemplarily, if the decoding end obtains lossy compression configuration information from the bitstream, and the lossy compression configuration information does not include indication information of the first prediction mode, or the lossy compression configuration information is not obtained from the bitstream, the decoding end can implicitly derive a second prediction mode that is the same as the first prediction mode. For example, the encoding end and the decoding end can pre-agree on the prediction mode, so that the encoding end uses the prediction mode as the first prediction mode, and the decoding end uses the prediction mode as the second prediction mode. Of course, other methods can also be used, as long as the prediction modes of the encoding end and the decoding end are the same.
[0360] Step S24: The decoding end uses the second quantization parameter to quantize the predicted intermediate parameter.
[0361] For example, for each coding unit, after the coding unit is predicted, the predicted intermediate parameter may be quantized using a second quantization parameter, and the predicted intermediate parameter may be a residual value or a transform coefficient value.
[0362] In a possible implementation manner, the second quantization parameter may be the same as the first quantization parameter, or may be different from the first quantization parameter. This embodiment takes the case where the second quantization parameter is the same as the first quantization parameter as an example.
[0363] Exemplarily, if the decoding end obtains lossy compression configuration information from the bitstream, and the lossy compression configuration information includes indication information of the first quantization parameter, the decoding end can determine the second quantization parameter based on the indication information of the first quantization parameter, and the second quantization parameter is the same as the first quantization parameter. For example, the bitstream is different from the first bitstream / second bitstream, and the bitstream needs to be transmitted between the encoding end and the decoding end, and the first bitstream / second bitstream will not be transmitted between the encoding end and the decoding end. The encoding end carries the indication information of the first quantization parameter in the bitstream, and the decoding end obtains the indication information of the first quantization parameter from the bitstream.
[0364] The indication information of the first quantization parameter may be indication information at the sequence level of the bitstream, used to indicate that the entire sequence adopts the first quantization parameter, so that the second quantization parameter of the entire sequence is the same as the first quantization parameter. Alternatively, it may be indication information at the sequence-level extended data, used to indicate that the entire sequence adopts the first quantization parameter. Alternatively, it may be indication information at the image level, used to indicate that the entire image adopts the first quantization parameter. Alternatively, it may be indication information at the image-level extended data, used to indicate that the entire image adopts the first quantization parameter. Alternatively, it may be indication information at the slice level, used to indicate that the entire slice adopts the first quantization parameter. Alternatively, it may be indication information at the tile level, used to indicate that the entire tile adopts the first quantization parameter. Alternatively, it may be indication information at the patch level, used to indicate that the entire patch adopts the first quantization parameter. Alternatively, it may be indication information at the LCU level, used to indicate that the entire LCU adopts the first quantization parameter. Alternatively, it may be indication information at the control unit level, used to indicate that the control units all adopt the first quantization parameter.
[0365] Exemplarily, if the decoding end obtains lossy compression configuration information from the bitstream, and the lossy compression configuration information does not include indication information of the first quantization parameter, or the lossy compression configuration information is not obtained from the bitstream, the decoding end can implicitly derive a second quantization parameter that is the same as the first quantization parameter. For example, the encoding end and the decoding end can pre-agree on the quantization parameter, so that the encoding end uses the quantization parameter as the first quantization parameter, and the decoding end uses the quantization parameter as the second quantization parameter. Of course, other methods can also be used, as long as the quantization parameters of the encoding end and the decoding end are the same.
[0366] Step S25: If there is no bitstream interleaving, the decoding end generates a second bitstream based on the quantized intermediate parameters and outputs the second bitstream. The quantized intermediate parameters can be residual values or transform coefficient values, and there is no limitation on this.
[0367] If there is code stream interleaving, the decoding end uses the second interleaving form to interleave the quantized intermediate parameters to obtain the second code stream, and the second interleaving form indicates the arrangement order of the code streams corresponding to each channel of each coding unit. For example, the second interleaving form can indicate CU-level YUV interleaving, the second interleaving form can indicate image-level YUV interleaving, the second interleaving form can indicate Slice-level YUV interleaving, the second interleaving form can indicate 128*4-level Y and 64*2 UV interleaving, etc. Of course, the above are just a few examples of the second interleaving form, and the second interleaving form can be any form, without limitation.
[0368] In a possible implementation manner, the second interleaving form may be different from the first interleaving form, or may be the same as the first interleaving form. This embodiment takes the case where the second interleaving form is different from the first interleaving form as an example.
[0369] For example, the decoding end can select the second interleaving form according to application requirements, that is, the decoding end can use any interleaving form as the second interleaving form. Similarly, the encoding end also selects the first interleaving form according to application requirements. Obviously, when the decoding end selects the second interleaving form, it does not need to refer to the first interleaving form of the encoding end, that is, the two have no mutual dependence.
[0370] For another example, the decoding end can obtain indication information of the second interleaving form from the bit stream. It should be noted that this is not the indication information of the first interleaving form, that is, the encoding end encodes the indication information of the second interleaving form in the bit stream. The second interleaving form is independent of the first interleaving form, and the two are not interdependent.
[0371] Of course, the above is only an example, and there is no limitation on the method for obtaining the second interleaving form. As long as the second interleaving form can be obtained, the second interleaving form is used to interleave the quantized intermediate parameters to obtain the second code stream.
[0372] Step S26: The decoding end dequantizes and reconstructs the quantized intermediate parameters to obtain a reconstructed image, which can be used as a reference for prediction. The reconstructed image can also be used as a second target reference image and output.
[0373] Exemplarily, for the encoding end, the encoding end may also store the first code stream, or the first target reference image, or the first lossless compressed code stream in the first cache module, and when inter-frame prediction is required, obtain the first code stream, or the first target reference image, or the first lossless compressed code stream from the first cache module. For the convenience of description, it is taken as an example to store the first code stream in the first cache module and obtain the first code stream from the first cache module (storage and acquisition in other cases are similar).
[0374] Based on this, the encoding end can use the first addressing logic to store the first code stream in the first cache module, and the encoding end uses the first addressing logic to obtain the first code stream from the first cache module. The first addressing logic is used to represent the identification logic of the physical address of the first actual parallel unit (i.e., the actual parallel unit of the encoding end) in the first cache module, and the first actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream, and there is no restriction on this.
[0375] For example, when the encoder stores the first code stream in the first cache module, the size of the first actual parallel unit can be selected according to application requirements, such as 64*64, 32*32, etc. The encoder can generate a first addressing logic for each first actual parallel unit, and the first addressing logic is used to represent the identification logic of the physical address of the first actual parallel unit in the first cache module.
[0376] In addition to directly identifying the physical address of each actual parallel unit, the first addressing logic can also be implemented in an equivalent form according to the application scenario, computing efficiency, address storage cost, etc. For example, the encoding end can also generate a first set addressing logic for several first actual parallel units and generate a first sub-addressing logic for each of the actual parallel units. The first set addressing logic and the first sub-addressing logic are the first addressing logic, which is used to represent the identification logic of the physical address of the first actual parallel unit in the first cache module.
[0377] Based on this, when the encoding end stores the first code stream in the first cache module, for each first actual parallel unit, the first addressing logic of the first actual parallel unit can be used to store the code stream of the first actual parallel unit in the first cache module. When the encoding end obtains the first code stream from the first cache module, for each first actual parallel unit, the first addressing logic of the first actual parallel unit can be used to obtain the code stream of the first actual parallel unit from the first cache module.
[0378] Exemplarily, for the decoding end, the decoding end may also store the second code stream, or the second target reference image, or the second lossless compressed code stream in the second cache module, and when inter-frame prediction is required, obtain the second code stream, or the second target reference image, or the second lossless compressed code stream from the second cache module. For the convenience of description, the second code stream is stored in the second cache module and obtained from the second cache module as an example (storage and acquisition in other cases are similar).
[0379] Based on this, the decoding end can use the second addressing logic to store the second code stream in the second cache module, and the decoding end uses the second addressing logic to obtain the second code stream from the second cache module. The second addressing logic is used to represent the identification logic of the physical address of the second actual parallel unit (i.e., the actual parallel unit of the decoding end) in the second cache module, and the second actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream, and there is no restriction on this.
[0380] For example, when the decoding end stores the second code stream in the second cache module, the size of the second actual parallel unit can be selected according to application requirements, such as 64*64, 32*32, etc. The decoding end can generate a second addressing logic for each second actual parallel unit, and the second addressing logic is used to represent the identification logic of the physical address of the second actual parallel unit in the second cache module.
[0381] In addition to directly identifying the physical address of each actual parallel unit, the second addressing logic can also be implemented in an equivalent form according to the application scenario, computing efficiency, address storage cost, etc. For example, the decoding end can also generate a second set addressing logic for several second actual parallel units and generate a second sub-addressing logic for each actual parallel unit. The second set addressing logic and the second sub-addressing logic are the second addressing logic, which are used to represent the identification logic of the physical address of the second actual parallel unit in the second cache module.
[0382] Based on this, when the decoding end stores the second code stream in the second cache module, for each second actual parallel unit, the second addressing logic of the second actual parallel unit can be used to store the code stream of the second actual parallel unit in the second cache module. When the decoding end obtains the second code stream from the second cache module, for each second actual parallel unit, the second addressing logic of the second actual parallel unit can be used to obtain the code stream of the second actual parallel unit from the second cache module.
[0383] In a possible implementation manner, the size of the second actual parallel unit may be different from or the same as the size of the first actual parallel unit. For example, the size of the second actual parallel unit is different from the size of the first actual parallel unit.
[0384] For example, the decoding end can select the size of the second actual parallel unit according to application requirements, that is, the decoding end can use any size as the size of the second actual parallel unit. Similarly, the encoding end also selects the size of the first actual parallel unit according to application requirements. Obviously, when the decoding end selects the size of the second actual parallel unit, it does not need to refer to the size of the first actual parallel unit of the encoding end, that is, the size of the second actual parallel unit has no mutual dependence with the size of the first actual parallel unit.
[0385] For another example, the decoding end can obtain the indication information of the size of the second actual parallel unit from the bit stream. It should be noted that this is not the indication information of the size of the first actual parallel unit, that is, the encoding end encodes the indication information of the size of the second actual parallel unit in the bit stream, and the size of the second actual parallel unit is independent of the size of the first actual parallel unit.
[0386] In a possible implementation, the second addressing logic may be different from or the same as the first addressing logic, taking the case where the second addressing logic is different from the first addressing logic as an example. For example, the decoding end may select the second addressing logic according to application requirements, that is, the decoding end may use any addressing logic as the second addressing logic. Similarly, the encoding end also selects the first addressing logic according to application requirements. Obviously, when the decoding end selects the second addressing logic, it does not need to refer to the first addressing logic of the encoding end, that is, the second addressing logic and the first addressing logic have no mutual dependence. For another example, the decoding end may obtain the indication information of the second addressing logic from the bit stream. It should be noted that this is not the indication information of the first addressing logic, that is, what the encoding end encodes in the bit stream is the indication information of the second addressing logic, and the second addressing logic has nothing to do with the first addressing logic.
[0387] In a possible implementation, the code stream alignment logic of the second code stream and the code stream alignment logic of the first code stream may be the same or different. For example, the code stream alignment logic of the first code stream may be byte alignment (i.e., single-byte alignment), and the code stream alignment logic of the second code stream may be two-byte alignment, or, the code stream alignment logics of the first code stream and the second code stream are both byte alignment, or, the alignment logic of the brightness channel of the first code stream is four-byte alignment, and the alignment logic of the chrominance channel is two-byte alignment, the alignment logic of the brightness channel of the second code stream is byte alignment, and the alignment logic of the chrominance channel is bit alignment, etc.
[0388] For example, the decoding end can select the code stream alignment logic of the second code stream according to application requirements, that is, the decoding end can use any code stream alignment logic as the code stream alignment logic of the second code stream. Similarly, the encoding end also selects the code stream alignment logic of the first code stream according to application requirements. Obviously, when the decoding end selects the code stream alignment logic of the second code stream, there is no need to refer to the code stream alignment logic of the first code stream of the encoding end, that is, the code stream alignment logic of the second code stream has no mutual dependence with the code stream alignment logic of the first code stream. For another example, the decoding end can obtain the code stream alignment logic of the second code stream from the bit stream. It should be noted that this is not the code stream alignment logic of the first code stream, and the code stream alignment logic of the second code stream has nothing to do with the code stream alignment logic of the first code stream.
[0389] Embodiment 10: In Embodiment 4, the encoder performs lossy compression decoding on the first bit stream to obtain a first target reference image, and the decoder performs lossy compression decoding on the second bit stream to obtain a second target reference image. The lossy compression decoding is described below.
[0390] Taking lossy compression coding using shallow coding as an example, lossy compression decoding is the decoding process corresponding to shallow coding, which may include prediction, inverse quantization, reconstruction, etc., that is, both the encoding end and the decoding end can implement lossy compression decoding by this process.
[0391] See also Figure 6G As shown, it is an example of implementing lossy compression decoding by using shallow coding decoders at the encoding end and the decoding end. The input data of the lossy compression decoding is a bit stream (a first bit stream for the encoding end and a second bit stream for the decoding end). The bit stream can be deinterleaved (optional), complexity parsed, syntax parsed, predicted, inverse quantized and reconstructed to obtain a reconstructed image (a first target reference image for the encoding end and a second target reference image for the decoding end) and output it.
[0392] The above process may also involve processes such as code control initialization, code control update and quantization parameter derivation. Based on the above process, quantization parameters can be derived, and the quantization parameters are used to control the inverse quantization step. There is no restriction on this process.
[0393] See also Figure 6H As shown, it is an example of the encoding end and the decoding end using shallow coding to implement lossy compression decoding. The input data of the lossy compression decoding is a code stream (the first code stream or the second code stream). The code stream can be deinterleaved (an optional step, that is, deinterleaving can be performed or not), predicted, inverse quantized and reconstructed to obtain a reconstructed image, and the reconstructed image is output as the first target reference image or the second target reference image, and the reconstructed image is used as a reference for prediction. In the above process, a rate control process can also be involved, that is, the rate control can provide parameters for prediction, so that prediction is performed based on the rate control parameters, and the rate control can provide parameters for inverse quantization, so that inverse quantization is performed based on the rate control parameters.
[0394] See also Fig.6I As shown, it is an example of the encoding end and the decoding end using shallow coding to implement lossy compression decoding. The input data of the lossy compression decoding is a code stream (a first code stream or a second code stream). The code stream can be deinterleaved (an optional step), predicted, inversely quantized, and reconstructed to obtain a reconstructed image, and the reconstructed image is output as a first target reference image or a second target reference image, and the reconstructed image is used as a reference for prediction. In the above process, a rate control process may also be involved, that is, the rate control can provide parameters for the inverse quantization process, so that inverse quantization is performed based on the rate control parameters.
[0395] See also Figure 6J As shown, it is an example of the encoding end and the decoding end using shallow coding to implement lossy compression decoding. The input data of the lossy compression decoding is a code stream (a first code stream or a second code stream). The code stream can be deinterleaved (an optional step), predicted, inversely quantized, and reconstructed to obtain a reconstructed image, and the reconstructed image is output as a first target reference image or a second target reference image, and the reconstructed image is used as a reference for prediction. In the above process, a rate control process may also be involved, that is, the rate control can provide parameters for the prediction process, so that prediction is performed based on the rate control parameters.
[0396] Exemplarily, for the encoding end, the encoding end performs lossy compression decoding on the first code stream to obtain the first target reference image, which may include but is not limited to: the encoding end sequentially deinterleaves, predicts, inverse quantizes and reconstructs the first code stream to obtain the first target reference image. Alternatively, the encoding end sequentially predicts, inverse quantizes and reconstructs the first code stream to obtain the first target reference image, that is, no deinterleaving operation is performed. Alternatively, the encoding end sequentially deinterleaves, predicts, inverse quantizes, inversely transforms and reconstructs the first code stream to obtain the first target reference image, that is, an inverse transformation process is added between inverse quantization and reconstruction. Alternatively, the encoding end sequentially predicts, inverse quantizes, inversely transforms and reconstructs the first code stream to obtain the first target reference image.
[0397] The lossy compression decoding process at the encoding end corresponds to the lossy compression encoding process and will not be described in detail here.
[0398] Exemplarily, for the decoding end, the decoding end performs lossy compression decoding on the second code stream to obtain the second target reference image, which may include but is not limited to: the decoding end sequentially deinterleaves, predicts, inverse quantizes and reconstructs the second code stream to obtain the second target reference image. Alternatively, the decoding end sequentially predicts, inverse quantizes and reconstructs the second code stream to obtain the second target reference image, that is, no deinterleaving operation is performed. Alternatively, the decoding end sequentially deinterleaves, predicts, inverse quantizes, inversely transforms and reconstructs the second code stream to obtain the second target reference image, that is, an inverse transformation process is added between inverse quantization and reconstruction. Alternatively, the decoding end sequentially predicts, inverse quantizes, inversely transforms and reconstructs the second code stream to obtain the second target reference image.
[0399] The lossy compression decoding process at the encoding end corresponds to the lossy compression encoding process and will not be described in detail here.
[0400] Embodiment 11: In Embodiments 1 to 10, the encoding end may perform lossy compression on the initial reference image to obtain a first target reference image, and the first target reference image is used for inter-frame prediction encoding. The decoding end may perform lossy compression on the initial reference image to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding.
[0401] In order to ensure that the pixel values of the second target reference image are consistent with the pixel values of the first target reference image, that is, the pixel values provided by the encoding end to the inter-frame prediction are consistent with the pixel values provided by the decoding end to the inter-frame prediction, the lossy compression configuration information (parameters related to lossy compression are referred to as lossy compression configuration information) can be divided into first type parameters and second type parameters. The encoding end uses the first type parameters and the second type parameters to perform lossy compression on the initial reference image to obtain the first target reference image, and the decoding end uses the first type parameters and the second type parameters to perform lossy compression on the initial reference image to obtain the second target reference image.
[0402] For the first type of parameters, the first type of parameters at the encoding end and the first type of parameters at the decoding end need to be the same, that is, the partial lossy compression configuration information shown in each figure represents the first type of parameters. For the second type of parameters, the second type of parameters at the encoding end and the second type of parameters at the decoding end can be different, that is, the encoding end can set the second type of parameters according to application requirements, and the decoding end can set the second type of parameters according to application requirements without referring to the second type of parameters at the encoding end.
[0403] In a possible implementation, the first type of parameters may include but are not limited to at least one of the following: parallel unit division method, coding unit division method, prediction mode, and quantization parameter. Of course, the above are just a few examples, and there is no limitation on the first type of parameters. When the first type of parameters of the encoding end and the decoding end are the same, it is sufficient to ensure that the pixel value of the reference frame of the encoding end (such as the first target reference image) is consistent with the pixel value of the reference frame of the decoding end (such as the second target reference image).
[0404] The parallel unit division method used by the lossy compression coding at the encoding end can be recorded as the first parallel unit division method, and the parallel unit division method used by the lossy compression coding at the decoding end can be recorded as the second parallel unit division method, and it is necessary to ensure that the second parallel unit division method is the same as the first parallel unit division method. The coding unit division method used by the lossy compression coding at the encoding end can be recorded as the first coding unit division method, and the coding unit division method used by the lossy compression coding at the decoding end can be recorded as the second coding unit division method, and it is necessary to ensure that the second coding unit division method is the same as the first coding unit division method. The prediction mode used by the lossy compression coding at the encoding end can be recorded as the first prediction mode, and the prediction mode used by the lossy compression coding at the decoding end can be recorded as the second prediction mode, and it is necessary to ensure that the second prediction mode is the same as the first prediction mode. The quantization parameter used by the lossy compression coding at the encoding end can be recorded as the first quantization parameter, and the quantization parameter used by the lossy compression coding at the decoding end can be recorded as the second quantization parameter, and it is necessary to ensure that the second quantization parameter is the same as the first quantization parameter.
[0405] In order to make the first-category parameters of the encoder end the same as the first-category parameters of the decoder end, the encoder end may send a bitstream to the decoder end, where the bitstream may include lossy compression configuration information (i.e., part of the lossy compression configuration information, which may be the first-category parameters in the lossy compression configuration information), and the lossy compression configuration information may include but is not limited to at least one of the following:
[0406] Indication information of the first parallel unit division method adopted by the lossy compression coding at the encoding end. If the bit stream includes the indication information, the decoding end can obtain the indication information from the bit stream, and determine the second parallel unit division method adopted by the lossy compression coding at the decoding end based on the indication information, and the second parallel unit division method is the same as the first parallel unit division method. Alternatively, if the bit stream does not include the indication information, the decoding end can derive the second parallel unit division method, and the second parallel unit division method is the same as the first parallel unit division method. For example, the decoding end uses a fixed parallel unit division method as the second parallel unit division method, and the encoding end uses a fixed parallel unit division method as the first parallel unit division method.
[0407] Indicative information of the first coding unit division method adopted by the lossy compression coding at the encoding end. If the bit stream includes the indication information, the decoding end can obtain the indication information from the bit stream, and determine the second coding unit division method adopted by the lossy compression coding at the decoding end based on the indication information, and the second coding unit division method is the same as the first coding unit division method. Alternatively, if the bit stream does not include the indication information, the decoding end can derive the second coding unit division method, and the second coding unit division method is the same as the first coding unit division method. For example, the decoding end uses a fixed coding unit division method as the second coding unit division method, and the encoding end uses a fixed coding unit division method as the first coding unit division method.
[0408] Indication information of the first prediction mode adopted by the lossy compression coding at the encoding end. If the bitstream includes the indication information, the decoding end can obtain the indication information from the bitstream, and determine the second prediction mode adopted by the lossy compression coding at the decoding end based on the indication information, and the second prediction mode is the same as the first prediction mode. Alternatively, if the bitstream does not include the indication information, the decoding end can derive the second prediction mode, and the second prediction mode is the same as the first prediction mode, such as the decoding end uses the fixed prediction mode as the second prediction mode, and the encoding end uses the fixed prediction mode as the first prediction mode.
[0409] Indication information of a first quantization parameter used in lossy compression coding at the encoding end. If the bitstream includes the indication information, the decoding end can obtain the indication information from the bitstream, and determine the second quantization parameter used in lossy compression coding at the decoding end based on the indication information, and the second quantization parameter is the same as the first quantization parameter. Alternatively, if the bitstream does not include the indication information, the decoding end can derive the second quantization parameter, and the second quantization parameter is the same as the first quantization parameter, such as the decoding end uses a fixed quantization parameter as the second quantization parameter, and the encoding end uses a fixed quantization parameter as the first quantization parameter.
[0410] Exemplarily, when lossy compression configuration information (such as at least one of the indication information of the first parallel unit division method, the indication information of the first coding unit division method, the indication information of the first prediction mode, and the indication information of the first quantization parameter) is carried by a bitstream, the lossy compression configuration information may be lossy compression configuration information located at the sequence level of the bitstream; or, the lossy compression configuration information may be lossy compression configuration information located at the sequence level extended data; or, the lossy compression configuration information may be lossy compression configuration information located at the image level; or, the lossy compression configuration information may be lossy compression configuration information located at the image level extended data; or, the lossy compression configuration information may be lossy compression configuration information located at the Slice level; or, the lossy compression configuration information may be lossy compression configuration information located at the Tile level; or, the lossy compression configuration information may be lossy compression configuration information located at the Patch level; or, the lossy compression configuration information may be lossy compression configuration information located at the LCU level; or, the lossy compression configuration information may be lossy compression configuration information located at the control unit level. Of course, the above are just a few examples, and there is no limitation on the syntax elements of the lossy compression configuration information.
[0411] In a possible implementation, the second type of parameters may include but are not limited to at least one of the following: interleaving form, size of actual parallel units, addressing logic, and code stream alignment logic. Of course, the above are just a few examples, and there is no limitation on the second type of parameters. When the second type of parameters of the encoding end and the decoding end are different, it is also possible to ensure that the pixel value of the reference frame of the encoding end (such as the first target reference image) is consistent with the pixel value of the reference frame of the decoding end (such as the second target reference image).
[0412] The interleaving form used by the lossy compression coding at the encoding end may be recorded as the first interleaving form, and the interleaving form used by the lossy compression coding at the decoding end may be recorded as the second interleaving form, and the second interleaving form may be different from the first interleaving form. For example, the decoding end decides the second interleaving form to be used based on application requirements, and the encoding end decides the first interleaving form to be used based on application requirements, and the decoding end does not need to decide the second interleaving form based on the first interleaving form of the encoding end.
[0413] The addressing logic used by the lossy compression coding at the encoding end can be recorded as the first addressing logic, and the addressing logic used by the lossy compression coding at the decoding end can be recorded as the second addressing logic, and the second addressing logic can be different from the first addressing logic. For example, the decoding end decides the second addressing logic to be used based on application requirements, and the encoding end decides the first addressing logic to be used based on application requirements, and the decoding end does not need to decide the second addressing logic based on the first addressing logic of the encoding end.
[0414] The size of the actual parallel unit used in the lossy compression coding at the encoding end can be recorded as the size of the first actual parallel unit, and the size of the actual parallel unit used in the lossy compression coding at the decoding end can be recorded as the size of the second actual parallel unit. The size of the second actual parallel unit can be different from the size of the first actual parallel unit. For example, the decoding end decides the size of the second actual parallel unit to be used based on application requirements, and the encoding end decides the size of the first actual parallel unit to be used based on application requirements. The decoding end does not need to decide the size of the second actual parallel unit based on the size of the first actual parallel unit at the encoding end.
[0415] The code stream alignment logic used by the lossy compression coding at the encoding end can be recorded as the first code stream alignment logic record (i.e., the code stream alignment logic record used by the first code stream), and the size of the actual parallel unit used by the lossy compression coding at the decoding end can be recorded as the second code stream alignment logic record (i.e., the code stream alignment logic record used by the second code stream), and the second code stream alignment logic record can be different from the first code stream alignment logic record. For example, the decoding end decides on the second code stream alignment logic record to be used based on application requirements, and the encoding end decides on the first code stream alignment logic record to be used based on application requirements. The decoding end does not need to decide on the second code stream alignment logic record to be used by the decoding end based on the first code stream alignment logic record of the encoding end.
[0416] In a possible implementation, the principle to be ensured for lossy compression is: the pixel value of the reference frame at the encoding end (such as the first target reference image) must be consistent with the pixel value of the reference frame at the decoding end (such as the second target reference image).
[0417] Under the above principles, it is necessary to ensure that the lossy compression strategy of the encoder is consistent with that of the decoder, such as consistent mode decisions, consistent quantization parameters, and other parameters that affect the lossy compression reconstruction value. For example, it is possible to ensure that the prediction mode is consistent, the quantization parameter is consistent, the parallel unit division method is consistent, and the coding unit division method is consistent.
[0418] However, the parameters that do not affect the lossy compression reconstruction value can be adapted according to the encoding end and the decoding end, that is, there is no need to ensure that the parameters that do not affect the lossy compression reconstruction value are consistent. For example, the interleaving form of the code stream can be inconsistent (that is, the arrangement order of the code stream corresponding to each channel), such as the interleaving form of the encoding end is inconsistent with the interleaving form of the decoding end. The interleaving form can be CU-level YUV interleaving, image-level YUV interleaving, Slice-level YUV interleaving, 128*4-level Y and 64*2 UV interleaving, etc.
[0419] For another example, the addressing logic of the actual parallel units may be inconsistent, such as the addressing logic of the actual parallel units at the encoding end is inconsistent with the addressing logic of the actual parallel units at the decoding end. For example, if the size of the parallel units at the encoding end is 64*64, and the size of the parallel units at the decoding end is 4*4, the size of the parallel units at the encoding end needs to match the parallel units at the decoding end, that is, it can be set to 4*4. However, the encoding end does not need to use the addressing logic with a 4*4 granularity, but can use the addressing logic of 64*64. Intuitively, the decoding end needs to generate an address for each 4*4, while the encoding end can generate an address for each 64*64.
[0420] In view of the inconsistency of the code stream interleaving forms, when the encoding end uses the first interleaving form to interleave the code stream, it can be interleaved according to 64*64. When the decoding end uses the second interleaving form to interleave the code stream, it needs to be interleaved according to 4*4.
[0421] From the above, it can be seen that the bitstreams at the encoding end and the decoding end may be inconsistent (for example, the structures of the bitstreams may be inconsistent).
[0422] In a possible implementation, it is necessary to ensure that the lossy compression strategy of the encoder is consistent with the lossy compression strategy of the decoder (such as consistent mode decisions, consistent quantization parameters, and other parameters that affect the lossy compression reconstruction value, such as consistent prediction modes, consistent quantization parameters, consistent parallel unit division methods, and consistent coding unit division methods). In order to ensure that the lossy compression strategy of the encoder is consistent with the lossy compression strategy of the decoder, the relevant strategies can be as follows:
[0423] 1. Force parameter selection (for example: force mode selection to DC prediction, force quantization parameter to 2, etc.).
[0424] 2. Pass parameters through the code stream (for example, passing the CU-level mode index (used to indicate the prediction mode), passing the Slice-level quantization parameter (used to indicate the quantization parameter), passing the image-level quantization parameter, etc.).
[0425] 3. Agreed derivation logic (e.g. directly fixing the coding decision scheme and constraining a set of quantization parameter derivation forms). For the quantization parameter derivation form, the parameters that the derivation depends on need not be affected by the interleaving form of the bitstream, the addressing logic of the parallel unit, etc.
[0426] The derivation logic is used to derive parameters, that is, the encoding end and the decoding end can derive parameters based on the derivation logic.
[0427] 4. A combination of a small number of parameter transfers + constraints to export logic.
[0428] In the above process, the transmission level of the parameters involved can be sequence level, sequence level extended data, image level, image level extended data, slice level, tile level, patch level, LCU level, control unit level, etc. for identification transmission.
[0429] In a possible implementation manner, in the lossy compression scheme of this embodiment, the encoding end generates a compressed code stream, and the decoding end also generates a compressed code stream. Therefore, the compressed code stream of the encoding end does not need to be transmitted to the decoding end.
[0430] Illustratively, the above-mentioned embodiments can be implemented individually or in combination. For example, each embodiment in Embodiment 1 to Embodiment 11 can be implemented individually, and at least two embodiments in Embodiment 1 to Embodiment 11 can be implemented in combination.
[0431] Illustratively, in the above embodiments, the content of the encoding end can also be applied to the decoding end, that is, the decoding end can be processed in the same way, and the content of the decoding end can also be applied to the encoding end, that is, the encoding end can be processed in the same way.
[0432] Example 12: Based on the same application concept as the above method, a decoding device is also proposed in the embodiment of the present application. The decoding device is applied to the decoding end, and the decoding device includes: a memory, which is configured to store video data; a decoder, which is configured to implement the decoding method in the above-mentioned embodiment 1-embodiment 11, that is, the processing flow of the decoding end.
[0433] For example, in one possible implementation, a decoder is configured to: obtain an initial reference image; and perform lossy compression on the initial reference image to obtain a target reference image, wherein the target reference image is used for inter-frame prediction decoding.
[0434] Based on the same application concept as the above method, an encoding device is also proposed in the embodiment of the present application. The encoding device is applied to the encoding end, and the encoding device includes: a memory, which is configured to store video data; an encoder, which is configured to implement the encoding method in the above embodiments 1 to 11, that is, the processing flow of the encoding end.
[0435] For example, in one possible implementation, the encoder is configured to: obtain an initial reference image; and perform lossy compression on the initial reference image to obtain a target reference image, wherein the target reference image is used for inter-frame prediction coding.
[0436] Based on the same application concept as the above method, the decoding end device (also referred to as a video decoder) provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to as Fig. 7AAs shown. It includes: a processor 711 and a machine-readable storage medium 712, the machine-readable storage medium 712 stores machine-executable instructions that can be executed by the processor 711; the processor 711 is used to execute the machine-executable instructions to implement the decoding method of the above-mentioned embodiments 1-11 of the present application.
[0437] Based on the same application concept as the above method, the encoding end device (also referred to as a video encoder) provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to as Figure 7B As shown. It includes: a processor 721 and a machine-readable storage medium 722, the machine-readable storage medium 722 stores machine-executable instructions that can be executed by the processor 721; the processor 721 is used to execute the machine-executable instructions to implement the encoding method of the above-mentioned embodiments 1-11 of the present application.
[0438] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented, such as the decoding method or encoding method in the above embodiments.
[0439] Based on the same application concept as the above method, an embodiment of the present application also provides a computer application, which, when executed by a processor, can implement the decoding method or encoding method disclosed in the above example of the present application.
[0440] Based on the same application concept as the above method, a decoding device is also proposed in an embodiment of the present application. The decoding device is applied to a decoding end, and the decoding device includes: an acquisition module, used to acquire an initial reference image; a processing module, used to lossily compress the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction decoding.
[0441] Exemplarily, when the processing module performs lossy compression on the initial reference image to obtain the target reference image, it is specifically used to: perform lossy compression encoding on the initial reference image to obtain a code stream; store the code stream in a cache module; obtain the code stream from the cache module, and perform lossy compression decoding on the code stream to obtain the target reference image; or, perform lossy compression encoding on the initial reference image to obtain the target reference image, and store the target reference image in the cache module; obtain the target reference image from the cache module; or, perform lossy compression encoding on the initial reference image to obtain a code stream, perform lossy compression decoding on the code stream to obtain the target reference image, and store the target reference image in the cache module; obtain the target reference image from the cache module; Or, the initial reference image is lossily compressed to obtain a target reference image, the target reference image is losslessly compressed to obtain a lossless compressed code stream, and the lossless compressed code stream is stored in a cache module; the lossless compressed code stream is obtained from the cache module, and the lossless compressed code stream is losslessly compressed and decoded to obtain the target reference image; or, the initial reference image is lossily compressed to obtain a code stream, the code stream is losslessly compressed and decoded to obtain the target reference image, the target reference image is losslessly compressed to obtain a lossless compressed code stream, and the lossless compressed code stream is stored in a cache module; the lossless compressed code stream is obtained from the cache module, and the lossless compressed code stream is losslessly compressed and decoded to obtain the target reference image.
[0442] Exemplarily, when the processing module performs lossy compression on the initial reference image to obtain a target reference image, it is specifically used to: divide the initial reference image into multiple parallel units using a parallel unit division method, and different parallel units do not reference each other, and divide the parallel unit into multiple coding units using a coding unit division method, and reference is allowed between different coding units in the same parallel unit; predict the coding unit using a prediction mode, quantize the predicted intermediate parameters using a quantization parameter, and generate a target reference image based on the quantized intermediate parameters.
[0443] Exemplarily, the acquisition module is also used to obtain lossy compression configuration information from a bit stream, and the lossy compression configuration information includes at least one of the following: indication information of a parallel unit division method adopted by the lossy compression coding at the encoding end, wherein the indication information is used to determine the parallel unit division method adopted by the lossy compression coding at the decoding end; indication information of a coding unit division method adopted by the lossy compression coding at the encoding end, wherein the indication information is used to determine the coding unit division method adopted by the lossy compression coding at the decoding end; indication information of a prediction mode adopted by the lossy compression coding at the encoding end, wherein the indication information is used to determine the prediction mode adopted by the lossy compression coding at the decoding end; indication information of a quantization parameter adopted by the lossy compression coding at the encoding end, wherein the indication information is used to determine the quantization parameter adopted by the lossy compression coding at the decoding end.
[0444] The lossy compression configuration information includes lossy compression configuration information at the sequence level of the bit stream, or lossy compression configuration information of sequence-level extended data, or lossy compression configuration information at the image level, or lossy compression configuration information of image-level extended data, or lossy compression configuration information at the Slice level, or lossy compression configuration information at the Tile level, or lossy compression configuration information at the Patch level, or lossy compression configuration information at the LCU level, or lossy compression configuration information at the control unit level.
[0445] Exemplarily, when the processing module performs lossy compression encoding on the initial reference image to obtain a code stream, it is specifically used to: interleave the code stream generated by lossy compression of the initial reference image in an interleaved form to obtain a code stream; wherein the interleaved form represents the arrangement order of the code streams corresponding to each channel of each coding unit.
[0446] Exemplarily, the processing module stores the code stream in a cache module, and when obtaining the code stream from the cache module, is specifically used to: use addressing logic to store the code stream in the cache module, and use the addressing logic to obtain the code stream from the cache module; wherein the addressing logic represents the identification logic of the physical address of the actual parallel unit in the cache module, and the size of the actual parallel unit is different from or the same as the size of the actual parallel unit used by the encoding end; the actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream.
[0447] Exemplarily, when the processing module performs lossy compression decoding on the code stream to obtain the target reference image, it is specifically used to: sequentially deinterleave, predict, inverse quantize and reconstruct the code stream to obtain the target reference image; or sequentially predict, inverse quantize and reconstruct the code stream to obtain the target reference image; or sequentially deinterleave, predict, inverse quantize, inverse transform and reconstruct the code stream to obtain the target reference image; or sequentially predict, inverse quantize, inverse transform and reconstruct the code stream to obtain the target reference image.
[0448] Exemplarily, the initial reference image is: a reference image obtained after filtering the current image; or, the initial reference image is: a reference image obtained before filtering the current image; when the processing module performs lossy compression decoding on the code stream to obtain a target reference image, it is specifically used to: perform lossy compression decoding on the code stream to obtain a lossy compression decoded image, and filter the lossy compression decoded image, and determine the target reference image based on the filtered image; or, if the filtering operation includes a first filtering and a second filtering, the initial reference image is: a reference image obtained after the current image is first filtered and before the current image is second filtered; when the processing module performs lossy compression decoding on the code stream to obtain a target reference image, it is specifically used to: perform lossy compression decoding on the code stream to obtain a lossy compression decoded image, and perform a second filtering on the lossy compression decoded image, and determine the target reference image based on the second filtered image.
[0449] Exemplarily, when the processing module obtains the code stream from the cache module and performs lossy compression decoding on the code stream to obtain the target reference image, it is specifically used to: obtain one or more sub-code streams of actual parallel units from the cache module, and the sub-code streams of the one or more actual parallel units are partial code streams in the code stream; for each sub-code stream of the actual parallel unit, perform lossy compression decoding on the sub-code stream to obtain decoded pixels of the actual parallel unit, and the decoded pixels are partial pixels of the target reference image.
[0450] Exemplarily, after the code stream is lossily compressed and decoded to obtain a lossy compressed decoded image, the lossy compressed decoded image is used for intra-frame prediction decoding, or the lossy compressed decoded image is used for block copy intra-frame prediction decoding, or the lossy compressed decoded image is used for string copy intra-frame prediction decoding.
[0451] Based on the same application concept as the above method, an encoding device is also proposed in an embodiment of the present application. The encoding device is applied to the encoding end, and the encoding device includes: an acquisition module, used to acquire an initial reference image; a processing module, used to lossily compress the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction encoding.
[0452] Exemplarily, when the processing module performs lossy compression on the initial reference image to obtain the target reference image, it is specifically used to: perform lossy compression encoding on the initial reference image to obtain a code stream; store the code stream in a cache module; obtain the code stream from the cache module, and perform lossy compression decoding on the code stream to obtain the target reference image; or, perform lossy compression encoding on the initial reference image to obtain the target reference image, and store the target reference image in the cache module; obtain the target reference image from the cache module; or, perform lossy compression encoding on the initial reference image to obtain a code stream, perform lossy compression decoding on the code stream to obtain the target reference image, and store the target reference image in the cache module; obtain the target reference image from the cache module; Or, the initial reference image is lossily compressed to obtain a target reference image, the target reference image is losslessly compressed to obtain a lossless compressed code stream, and the lossless compressed code stream is stored in a cache module; the lossless compressed code stream is obtained from the cache module, and the lossless compressed code stream is losslessly compressed and decoded to obtain the target reference image; or, the initial reference image is lossily compressed to obtain a code stream, the code stream is losslessly compressed and decoded to obtain the target reference image, the target reference image is losslessly compressed to obtain a lossless compressed code stream, and the lossless compressed code stream is stored in a cache module; the lossless compressed code stream is obtained from the cache module, and the lossless compressed code stream is losslessly compressed and decoded to obtain the target reference image.
[0453] Exemplarily, when the processing module performs lossy compression on the initial reference image to obtain a target reference image, it is specifically used to: divide the initial reference image into multiple parallel units using a parallel unit division method, and different parallel units do not reference each other, and divide the parallel unit into multiple coding units using a coding unit division method, and reference is allowed between different coding units in the same parallel unit; predict the coding unit using a prediction mode, quantize the predicted intermediate parameters using a quantization parameter, and generate a target reference image based on the quantized intermediate parameters.
[0454] Exemplarily, when the processing module performs lossy compression encoding on the initial reference image to obtain a code stream, it is specifically used to: interleave the code stream generated by lossy compression of the initial reference image in an interleaved form to obtain a code stream; wherein the interleaved form represents the arrangement order of the code streams corresponding to each channel of each coding unit.
[0455] Exemplarily, the processing module stores the code stream in a cache module, and when obtaining the code stream from the cache module, is specifically used to: use addressing logic to store the code stream in the cache module, and use the addressing logic to obtain the code stream from the cache module; wherein the addressing logic represents the identification logic of the physical address of the actual parallel unit in the cache module, and the size of the actual parallel unit is different from or the same as the size of the actual parallel unit used by the encoding end; the actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream.
[0456] Exemplarily, when the processing module performs lossy compression decoding on the code stream to obtain the target reference image, it is specifically used to: sequentially deinterleave, predict, inverse quantize and reconstruct the code stream to obtain the target reference image; or sequentially predict, inverse quantize and reconstruct the code stream to obtain the target reference image; or sequentially deinterleave, predict, inverse quantize, inverse transform and reconstruct the code stream to obtain the target reference image; or sequentially predict, inverse quantize, inverse transform and reconstruct the code stream to obtain the target reference image.
[0457] Exemplarily, the initial reference image is: a reference image obtained after filtering the current image; or, the initial reference image is: a reference image obtained before filtering the current image; when the processing module performs lossy compression decoding on the code stream to obtain a target reference image, it is specifically used to: perform lossy compression decoding on the code stream to obtain a lossy compression decoded image, and filter the lossy compression decoded image, and determine the target reference image based on the filtered image; or, if the filtering operation includes a first filtering and a second filtering, the initial reference image is: a reference image obtained after the current image is first filtered and before the current image is second filtered; when the processing module performs lossy compression decoding on the code stream to obtain a target reference image, it is specifically used to: perform lossy compression decoding on the code stream to obtain a lossy compression decoded image, and perform a second filtering on the lossy compression decoded image, and determine the target reference image based on the second filtered image. Exemplarily, when the processing module obtains the code stream from the cache module and performs lossy compression decoding on the code stream to obtain the target reference image, it is specifically used to: obtain one or more sub-code streams of actual parallel units from the cache module, and the sub-code streams of the one or more actual parallel units are partial code streams in the code stream; for each sub-code stream of the actual parallel unit, perform lossy compression decoding on the sub-code stream to obtain decoded pixels of the actual parallel unit, and the decoded pixels are partial pixels of the target reference image.
[0458] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. The present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. The embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0459] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A coding and decoding method, characterized in that: The method comprises: The encoding end obtains an initial reference image, and performs lossy compression on the initial reference image to obtain a first target reference image, where the first target reference image is used for inter-frame prediction encoding; The decoding end obtains an initial reference image, performs lossy compression on the initial reference image to obtain a second target reference image, and the second target reference image is used for inter-frame prediction decoding; The pixel values of the second target reference image are consistent with the pixel values of the first target reference image.
2. The method according to claim 1, characterized in that The encoding end performs lossy compression on the initial reference image to obtain a first target reference image, including: Performing lossy compression encoding on the initial reference image to obtain a first code stream, and storing the first code stream in a first cache module; obtaining the first code stream from the first cache module, and performing lossy compression decoding on the first code stream to obtain a first target reference image; or, Perform lossy compression encoding on the initial reference image to obtain a first target reference image, and store the first target reference image in a first cache module; obtain the first target reference image from the first cache module; or, Performing lossy compression encoding on the initial reference image to obtain a first bitstream, performing lossy compression decoding on the first bitstream to obtain a first target reference image, and storing the first target reference image in a first cache module; acquiring the first target reference image from the first cache module; or, Performing lossy compression encoding on the initial reference image to obtain a first target reference image, performing lossless compression encoding on the first target reference image to obtain a first lossless compressed code stream, and storing the first lossless compressed code stream in a first cache module; obtaining the first lossless compressed code stream from the first cache module, and performing lossless compression decoding on the first lossless compressed code stream to obtain the first target reference image; or, The initial reference image is lossily compressed and encoded to obtain a first code stream, the first code stream is losslessly compressed and decoded to obtain a first target reference image, the first target reference image is losslessly compressed and encoded to obtain a first lossless compressed code stream, and the first lossless compressed code stream is stored in a first cache module; the first lossless compressed code stream is obtained from the first cache module, and the first lossless compressed code stream is losslessly compressed and decoded to obtain a first target reference image.
3. The method according to claim 1 or 2, characterized in that: The decoding end performs lossy compression on the initial reference image to obtain a second target reference image, including: Performing lossy compression encoding on the initial reference image to obtain a second code stream, and storing the second code stream in a second cache module; acquiring the second code stream from the second cache module, and performing lossy compression decoding on the second code stream to obtain a second target reference image; or, Perform lossy compression encoding on the initial reference image to obtain a second target reference image, and store the second target reference image in a second cache module; obtain the second target reference image from the second cache module; or, Performing lossy compression encoding on the initial reference image to obtain a second bitstream, performing lossy compression decoding on the second bitstream to obtain a second target reference image, and storing the second target reference image in a second cache module; acquiring the second target reference image from the second cache module; or, Performing lossy compression encoding on the initial reference image to obtain a second target reference image, performing lossless compression encoding on the second target reference image to obtain a second lossless compressed code stream, and storing the second lossless compressed code stream in a second cache module; acquiring the second lossless compressed code stream from the second cache module, and performing lossless compression decoding on the second lossless compressed code stream to obtain the second target reference image; or, The initial reference image is lossily compressed and encoded to obtain a second code stream, the second code stream is losslessly compressed and decoded to obtain a second target reference image, the second target reference image is losslessly compressed and encoded to obtain a second lossless compressed code stream, and the second lossless compressed code stream is stored in a second cache module; the second lossless compressed code stream is obtained from the second cache module, and the second lossless compressed code stream is losslessly compressed and decoded to obtain a second target reference image.
4. The method according to claim 1, characterized in that The encoding end performs lossy compression on the initial reference image to obtain a first target reference image, including: dividing the initial reference image into a plurality of parallel units by adopting a first parallel unit division method, and different parallel units do not refer to each other, and dividing the parallel unit into a plurality of coding units by adopting a first coding unit division method, and different coding units in the same parallel unit are allowed to refer to each other; predicting the coding unit by adopting a first prediction mode, quantizing the predicted intermediate parameters by adopting a first quantization parameter, and generating the first target reference image based on the quantized intermediate parameters; The decoding end performs lossy compression on the initial reference image to obtain a second target reference image, including: dividing the initial reference image into a plurality of parallel units by a second parallel unit division method, wherein different parallel units do not refer to each other, and dividing the parallel unit into a plurality of coding units by a second coding unit division method, wherein different coding units in the same parallel unit are allowed to refer to each other; predicting the coding unit by a second prediction mode, quantizing the predicted intermediate parameters by a second quantization parameter, and generating the second target reference image based on the quantized intermediate parameters; Among them, the second parallel unit division method is the same as the first parallel unit division method, the second coding unit division method is the same as the first coding unit division method, the second prediction mode is the same as the first prediction mode, and the second quantization parameter is the same as the first quantization parameter.
5. The method according to claim 3, characterized in that: The encoding end performs lossy compression encoding on the initial reference image to obtain a first code stream, including: the encoding end performs code stream interleaving on the code stream generated by lossy compression of the initial reference image in a first interleaving form to obtain the first code stream; The decoding end performs lossy compression encoding on the initial reference image to obtain a second bitstream, including: the decoding end uses a second interleaving form to interleave the bitstream generated by lossy compression of the initial reference image to obtain the second bitstream; The second interleaving form is different from or the same as the first interleaving form; wherein the second interleaving form and the first interleaving form represent the arrangement order of the code streams corresponding to each channel of each coding unit.
6. The method according to claim 3, characterized in that The encoder stores the first code stream in a first cache module, and obtains the first code stream from the first cache module, including: using a first addressing logic to store the first code stream in the first cache module, and using the first addressing logic to obtain the first code stream from the first cache module; The decoding end stores the second code stream in a second cache module, and obtains the second code stream from the second cache module, including: using a second addressing logic to store the second code stream in the second cache module, and using a second addressing logic to obtain the second code stream from the second cache module; Among them, the second addressing logic is different from or the same as the first addressing logic; the first addressing logic represents the identification logic of the physical address of the first actual parallel unit in the first cache module, the second addressing logic represents the identification logic of the physical address of the second actual parallel unit in the second cache module, the size of the second actual parallel unit is different from or the same as the size of the first actual parallel unit; the second actual parallel unit or the first actual parallel unit is a single-channel code stream, a multi-channel code stream, or a multi-channel interleaved code stream.
7. A decoding method, characterized in that: The method comprises: Obtaining an initial reference image; The initial reference image is lossily compressed to obtain a target reference image, and the target reference image is used for inter-frame prediction decoding.
8. The method according to claim 7, characterized in that The lossy compression of the initial reference image to obtain a target reference image includes: Perform lossy compression encoding on the initial reference image to obtain a bitstream; store the bitstream in a cache module; obtain the bitstream from the cache module, and perform lossy compression decoding on the bitstream to obtain a target reference image; or, Perform lossy compression encoding on the initial reference image to obtain a target reference image, and store the target reference image in a cache module; obtain the target reference image from the cache module; or, Performing lossy compression encoding on the initial reference image to obtain a code stream, performing lossy compression decoding on the code stream to obtain a target reference image, and storing the target reference image in a cache module; acquiring the target reference image from the cache module; or, Performing lossy compression encoding on the initial reference image to obtain a target reference image, performing lossless compression encoding on the target reference image to obtain a lossless compressed code stream, and storing the lossless compressed code stream in a cache module; obtaining the lossless compressed code stream from the cache module, and performing lossless compression decoding on the lossless compressed code stream to obtain the target reference image; or, The initial reference image is lossily compressed and encoded to obtain a code stream, the code stream is lossily compressed and decoded to obtain a target reference image, the target reference image is losslessly compressed and encoded to obtain a lossless compressed code stream, and the lossless compressed code stream is stored in a cache module; the lossless compressed code stream is obtained from the cache module, and the lossless compressed code stream is losslessly compressed and decoded to obtain a target reference image.
9. The method according to claim 7, characterized in that: The lossy compression of the initial reference image to obtain a target reference image includes: The initial reference image is divided into multiple parallel units by adopting a parallel unit division method, and different parallel units do not refer to each other; the parallel unit is divided into multiple coding units by adopting a coding unit division method, and reference is allowed between different coding units in the same parallel unit; the coding unit is predicted by adopting a prediction mode, the predicted intermediate parameters are quantized by adopting a quantization parameter, and the target reference image is generated based on the quantized intermediate parameters.
10. The method according to claim 9, characterized in that The method further comprises: Obtain lossy compression configuration information from a bitstream, where the lossy compression configuration information includes at least one of the following: Indication information of a parallel unit division method adopted by the lossy compression coding at the encoding end, where the indication information is used to determine the parallel unit division method adopted by the lossy compression coding at the decoding end; Indication information of a coding unit division method adopted by the lossy compression coding at the encoding end, where the indication information is used to determine the coding unit division method adopted by the lossy compression coding at the decoding end; Indication information of a prediction mode adopted by lossy compression coding at the encoding end, the indication information being used to determine the prediction mode adopted by lossy compression coding at the decoding end; The indication information of the quantization parameter adopted by the lossy compression encoding at the encoding end is used to determine the quantization parameter adopted by the lossy compression encoding at the decoding end.
11. The method according to claim 10, characterized in that The lossy compression configuration information includes lossy compression configuration information at the sequence level of the bit stream, or lossy compression configuration information of sequence-level extended data, or lossy compression configuration information at the image level, or lossy compression configuration information of image-level extended data, or lossy compression configuration information at the Slice level, or lossy compression configuration information at the Tile level, or lossy compression configuration information at the Patch level, or lossy compression configuration information at the LCU level, or lossy compression configuration information at the control unit level.
12. The method according to claim 8, characterized in that The step of performing lossy compression encoding on the initial reference image to obtain a bit stream includes: Interleaving the bitstream generated by lossy compression of the initial reference image in an interleaving manner to obtain a bitstream; The interleaving form indicates the arrangement order of the code streams corresponding to each channel of each coding unit.
13. The method according to claim 8, characterized in that The storing the code stream into a cache module and obtaining the code stream from the cache module comprises: storing the code stream into a cache module by using an addressing logic and obtaining the code stream from the cache module by using the addressing logic; Among them, the addressing logic represents the identification logic of the physical address of the actual parallel unit in the cache module, and the size of the actual parallel unit is different from or the same as the size of the actual parallel unit used by the encoding end; the actual parallel unit is a single-channel code stream, or a multi-channel code stream, or a multi-channel interleaved code stream.
14. The method according to claim 8, characterized in that The step of performing lossy compression decoding on the code stream to obtain a target reference image includes: Deinterleaving, predicting, inverse quantizing and reconstructing the code stream in sequence to obtain the target reference image; or, Predicting, dequantizing and reconstructing the bitstream in sequence to obtain the target reference image; or, sequentially performing deinterleaving, prediction, inverse quantization, inverse transformation and reconstruction on the code stream to obtain the target reference image; or, The code stream is predicted, inversely quantized, inversely transformed and reconstructed in sequence to obtain the target reference image.
15. The method according to claim 8, characterized in that The initial reference image is: a reference image obtained after filtering the current image; or, The initial reference image is: a reference image obtained before filtering the current image; The step of performing lossy compression decoding on the code stream to obtain a target reference image comprises: performing lossy compression decoding on the code stream to obtain a lossy compression decoded image, filtering the lossy compression decoded image, and determining the target reference image based on the filtered image; or, If the filtering operation includes a first filtering and a second filtering, the initial reference image is: a reference image obtained after the first filtering is performed on the current image and before the second filtering is performed on the current image; The step of performing lossy compression decoding on the code stream to obtain a target reference image includes: performing lossy compression decoding on the code stream to obtain a lossy compression decoded image, performing a second filtering on the lossy compression decoded image, and determining the target reference image based on the second filtered image.
16. The method according to claim 8 or 15, characterized in that The step of obtaining the code stream from the cache module and performing lossy compression decoding on the code stream to obtain a target reference image includes: Acquire one or more sub-codestreams of actual parallel units from the buffer module, where the one or more sub-codestreams of actual parallel units are partial codestreams in the codestream; For each sub-code stream of the actual parallel unit, lossy compression decoding is performed on the sub-code stream to obtain decoded pixels of the actual parallel unit, where the decoded pixels are part of the pixels of the target reference image.
17. The method according to claim 15, characterized in that After the code stream is lossily compressed and decoded to obtain a lossy compressed decoded image, the lossy compressed decoded image is used for intra-frame prediction decoding, or the lossy compressed decoded image is used for block copy intra-frame prediction decoding, or the lossy compressed decoded image is used for string copy intra-frame prediction decoding.
18. A coding method, characterized in that: The method comprises: Obtaining an initial reference image; The initial reference image is lossily compressed to obtain a target reference image, and the target reference image is used for inter-frame prediction coding.
19. The method according to claim 18, characterized in that The lossy compression of the initial reference image to obtain a target reference image includes: The initial reference image is subjected to lossy compression encoding to obtain a code stream; the code stream is stored in a cache module; the code stream is obtained from the cache module, and the code stream is subjected to lossy compression decoding to obtain a target reference image.
20. A decoding device, characterized in that: The device comprises: An acquisition module, used for acquiring an initial reference image; The processing module is used to perform lossy compression on the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction decoding.
21. A coding device, characterized in that: The device comprises: An acquisition module, used for acquiring an initial reference image; The processing module is used to perform lossy compression on the initial reference image to obtain a target reference image, and the target reference image is used for inter-frame prediction coding.
22. A decoding end device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the method described in any one of claims 7-17.
23. A coding end device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is configured to execute machine executable instructions to implement the method of claim 18 or 19.
24. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a plurality of computer instructions, and when the computer instructions are executed by the processor, the method described in any one of claims 7 to 17 is implemented, or when the computer instructions are executed by the processor, the method described in claim 18 or 19 is implemented.