Search

CN-122029818-A - Encoding and decoding method, encoder and decoder, and storage medium

CN122029818ACN 122029818 ACN122029818 ACN 122029818ACN-122029818-A

Abstract

The embodiment of the application provides a coding and decoding method, a coder and decoder and a storage medium. The decoding method comprises the steps of analyzing a code stream, determining first information, determining a target value of a first expansion factor from a plurality of candidate values of the first expansion factor according to the first information, performing loop filtering on a reconstructed image according to a neural network, determining a first residual image, correcting the first residual image according to the target value of the first expansion factor, and determining the reconstructed image after loop filtering.

Inventors

  • DAI ZHENYU

Assignees

  • OPPO广东移动通信有限公司

Dates

Publication Date
20260512
Application Date
20231004

Claims (20)

  1. A decoding method, applied to a decoder, comprising: Analyzing the code stream and determining first information; determining a target value of a first expansion factor from a plurality of candidate values of the first expansion factor according to the first information; performing loop filtering on the reconstructed image according to the neural network to determine a first residual image; And correcting the first residual image according to the target value of the first expansion factor, and determining a reconstructed image after loop filtering.
  2. The method of claim 1, wherein the determining, from the first information, a target value of a first scaling factor from a plurality of candidate values of the first scaling factor comprises: determining the traversal times corresponding to the first expansion factors according to the first information; and determining a target value of the first expansion factor according to the initial value of the first expansion factor, the traversal step length and the traversal times.
  3. The method of claim 2, wherein the range of values of the first scaling factor includes a first value interval and a second value interval, the first value interval corresponding to a first traversal step and the second value interval corresponding to a second traversal step, the first and second traversal steps being different.
  4. The method of claim 1, wherein the first information is index information of the target value among the plurality of candidate values.
  5. The method of claim 1, wherein the method further comprises: and analyzing the code stream, and determining second information, wherein the second information is used for indicating whether the first residual image is corrected based on the first expansion factor.
  6. The method of claim 5, wherein the second information comprises a first value representing a correction of the first residual image based on the first scale factor and a second value representing a non-correction of the first residual image based on the first scale factor.
  7. The method of claim 6, wherein if the value of the second information is the second value, the method further comprises: And analyzing the code stream, and determining third information, wherein the third information is a target value of the second expansion factor.
  8. The method of claim 1, wherein the loop filtering the reconstructed image from the neural network to determine a first residual image comprises: performing loop filtering on the reconstructed image according to the neural network to determine a filtered image; and determining the first residual image according to the filtered image and the reconstructed image.
  9. The method of claim 1, wherein the modifying the first residual image according to the target value of the first scaling factor, determining a loop-filtered reconstructed image, comprises: Correcting the first residual image according to the target value of the first expansion factor, and determining a corrected residual image; And determining the reconstructed image after loop filtering according to the corrected residual image and the reconstructed image.
  10. The method of claim 1, wherein the reconstructed image is a frame of image or is a block of image in a frame of image.
  11. An encoding method applied to an encoder, comprising: Determining a reconstructed image of the original image; Performing loop filtering on the reconstructed image according to a neural network, and determining a first residual image; correcting the first residual image according to a plurality of candidate values of a first expansion factor, and determining a plurality of output images; and determining a target value of the first expansion factor from the candidate values according to the output images.
  12. The method of claim 11, wherein the plurality of candidate values are determined based on: traversing within the value range of the first expansion factor according to the traversing step length.
  13. The method of claim 12, wherein the range of values of the first scaling factor comprises a first value interval and a second value interval, the first value interval corresponding to a first traversal step and the second value interval corresponding to a second traversal step, the first and second traversal steps being different.
  14. The method of claim 12, wherein the method further comprises: And writing first information into the code stream, wherein the first information is used for indicating the traversal times corresponding to the first expansion factors.
  15. The method of claim 11, wherein the method further comprises: Determining a second residual image from the original image and the reconstructed image; determining a target value of a second expansion factor according to the first residual image and the second residual image; And determining a target scaling factor from the first scaling factor and the second scaling factor according to the target value of the first scaling factor and the target value of the second scaling factor.
  16. The method of claim 15, wherein the determining a target scaling factor from the first scaling factor and the second scaling factor based on the target value of the first scaling factor and the target value of the second scaling factor comprises: Correcting the first residual image according to the target value of the second expansion factor, and determining a first output image; And determining the target expansion factor from the first expansion factor and the second expansion factor according to the first output image and the second output image, wherein the second output image is an output image corresponding to the target value of the first expansion factor.
  17. The method of claim 16, wherein the determining the target scaling factor from the first and second scaling factors from the first and second output images comprises: determining a cost corresponding to the first expansion factor according to the first output image and the original image; Determining the cost corresponding to the second expansion factor according to the second output image and the original image; and determining the target expansion factor from the first expansion factor and the second expansion factor according to the cost corresponding to the first expansion factor and the cost corresponding to the second expansion factor.
  18. The method of claim 11, wherein the method further comprises: and writing first information into the code stream, wherein the first information is index information of the target value in the candidate values.
  19. The method of claim 11, wherein the method further comprises: And writing second information into the code stream, wherein the second information is used for indicating whether the first residual image is corrected based on the first expansion factor.
  20. The method of claim 19, wherein the second information comprises a first value representing a correction of the first residual image based on the first scale factor and a second value representing a non-correction of the first residual image based on the first scale factor.

Description

Encoding and decoding method, encoder and decoder, and storage medium Technical Field The present application relates to the field of video encoding and decoding in the technical field, and in particular, to a coding and decoding method, a codec, and a storage medium. Background A neural network based loop filter (neural network based loop filter, NNLF) may modify a prediction residual image of the neural network based on the derived scaling factor and determine a loop-filtered reconstructed image based on the modified residual image. However, the deriving mode of the scaling factor provided by the related technology leads to inaccurate value of the scaling factor, and reduces the loop filtering quality. Disclosure of Invention The embodiment of the application provides a coding and decoding method, a coder and decoder and a storage medium so as to improve loop filtering quality. Various aspects of the application are described below. In a first aspect, a decoding method is provided, applied to a decoder, and includes parsing a code stream to determine first information, determining a target value of a first scaling factor from a plurality of candidate values of the first scaling factor according to the first information, loop filtering a reconstructed image according to a neural network to determine a first residual image, correcting the first residual image according to the target value of the first scaling factor, and determining the reconstructed image after loop filtering. In a second aspect, an encoding method is provided and applied to an encoder, and the encoding method comprises the steps of determining a reconstructed image of an original image, performing loop filtering on the reconstructed image according to a neural network to determine a first residual image, correcting the first residual image according to a plurality of candidate values of a first expansion factor to determine a plurality of output images, and determining a target value of the first expansion factor from the plurality of candidate values according to the plurality of output images. In a third aspect, a decoder is provided, the decoder including an parsing unit configured to parse a code stream and determine first information, a filtering unit configured to determine a target value of a first scaling factor from a plurality of candidate values of the first scaling factor according to the first information, loop-filter a reconstructed image according to a neural network and determine a first residual image, and correct the first residual image according to the target value of the first scaling factor and determine a loop-filtered reconstructed image. In a fourth aspect, there is provided a decoder comprising a memory for storing a computer program, and a processor for performing the method according to the first aspect when the computer program is run. In a fifth aspect, an encoder is provided, the encoder comprising a determining unit configured to determine a reconstructed image of an original image, a filtering unit configured to loop filter the reconstructed image according to a neural network, determine a first residual image, correct the first residual image according to a plurality of candidate values of a first scaling factor, determine a plurality of output images, and determine a target value of the first scaling factor from the plurality of candidate values according to the plurality of output images. In a sixth aspect, there is provided an encoder comprising a memory for storing a computer program, and a processor for performing the method according to the second aspect when the computer program is run. In a seventh aspect, there is provided a computer readable storage medium storing a computer program which when executed performs the method of the first or second aspect. In an eighth aspect, there is provided a computer program product comprising a computer program which when executed implements the method of the first or second aspect. According to the correction results of the candidate values of the telescopic factors, the target values of the telescopic factors are determined from the candidate values, so that the telescopic factors can be more accurately valued, and the loop filtering quality can be improved. Drawings Fig. 1 is a diagram showing an exemplary structure of a video encoder to which an embodiment of the present application can be applied. Fig. 2 is a diagram showing an example of the structure of a video decoder to which an embodiment of the present application can be applied. Fig. 3 is a diagram showing an example of the structure of a high-complexity neural network filter. Fig. 4 is a diagram showing an example of the structure of a low-complexity neural network filter. Fig. 5 is a schematic diagram of a filtering mode of NNLF. Fig. 6 is a schematic diagram of the relationship between the residuals of the original and reconstructed images and the prediction residuals output by NNLF. Fig. 7 is a