Search

CN-122003863-A - Encoding/decoding method, code stream, encoder, decoder, and storage medium

CN122003863ACN 122003863 ACN122003863 ACN 122003863ACN-122003863-A

Abstract

The embodiment of the application discloses a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, wherein the method comprises the steps of determining an initial reference block of a current block and determining a macro pixel homonymy block corresponding to the initial reference block (S901); searching is performed according to the initial reference block and the macro-pixel co-located block respectively to determine a target motion parameter (S902), and a predicted value of the current block is determined according to the target motion parameter (S903). Therefore, the accuracy of the motion vector in the light field video coding and decoding can be improved, and the compression efficiency of the light field video can be improved.

Inventors

  • YANG YOU
  • LUO JINGYANG
  • HU ZIYU
  • LIU QIONG

Assignees

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

Dates

Publication Date
20260508
Application Date
20231009

Claims (20)

  1. A decoding method applied to a decoder, the method comprising: Determining an initial reference block of a current block and determining a macro pixel homonymous block corresponding to the initial reference block; Searching according to the initial reference block and the macro pixel homonymy block respectively to determine target motion parameters; and determining the predicted value of the current block according to the target motion parameter.
  2. The method of claim 1, wherein the determining the initial reference block for the current block comprises: Decoding a code stream, and determining a prediction parameter of the current block; and determining an initial reference block of the current block according to the prediction parameters.
  3. The method of claim 2, wherein the prediction parameters comprise inter-prediction identification parameters, the method further comprising: determining that the inter prediction identity parameter indicates that the prediction mode used to decode the current block is bi-prediction.
  4. The method of claim 3, wherein the prediction parameters further comprise a motion vector and a reference picture index, the reference picture index comprising a first reference picture index and a second reference picture index, the determining an initial reference block for the current block based on the prediction parameters comprising: Determining a first reference block of the current block according to a first reference image indicated by the first reference image index and a first initial motion vector in the motion vectors; determining a second reference block of the current block according to a second reference image indicated by the second reference image index and a second initial motion vector in the motion vectors; and taking the first reference block and the second reference block as initial reference blocks of the current block.
  5. The method of claim 3, wherein the prediction parameters further comprise a motion vector difference and a reference picture index, the reference picture index comprising a first reference picture index and a second reference picture index, the determining an initial reference block for the current block based on the prediction parameters comprising: Determining a first initial motion vector predicted value of the current block in a first reference image and a second initial motion vector predicted value of the current block in a second reference image; determining a first initial motion vector according to a first motion vector difference value in the motion vector difference values and the first initial motion vector predicted value, and determining a first reference block of the current block according to a first reference image indicated by the first reference image index and the first initial motion vector; Determining a second initial motion vector according to a second motion vector difference value in the motion vector difference values and the second initial motion vector predicted value, and determining a second reference block of the current block according to a second reference image indicated by the second reference image index and the second initial motion vector; and taking the first reference block and the second reference block as initial reference blocks of the current block.
  6. The method of claim 3, wherein the prediction parameters further comprise a motion vector index and a reference picture index, the reference picture index comprising a first reference picture index and a second reference picture index, the determining an initial reference block for the current block based on the prediction parameters comprising: Constructing a motion vector candidate list of the current block; Determining a first initial motion vector according to the motion vector candidate list and a first motion vector index in the motion vector indexes, and determining a first reference block of the current block according to a first reference image indicated by the first reference image index and the first initial motion vector; Determining a second initial motion vector according to the motion vector candidate list and a second motion vector index in the motion vector indexes, and determining a second reference block of the current block according to a second reference image indicated by the second reference image index and the second initial motion vector; and taking the first reference block and the second reference block as initial reference blocks of the current block.
  7. The method according to any one of claims 4 to 6, wherein the determining a macro-pixel co-located block corresponding to the initial reference block comprises: Determining at least one first macro-pixel co-located block of the first reference block in the first reference image according to the first reference block; and determining at least one second macro-pixel co-located block of the second reference block in the second reference image according to the second reference block.
  8. The method of claim 7, wherein the determining at least one first macro-pixel co-located block of the first reference block in the first reference image from the first reference block comprises: Determining a first current macro-pixel and at least one first candidate macro-pixel in the first reference image, the first current macro-pixel including at least a portion of the first reference block; determining respective macro-pixel co-location blocks in the at least one first candidate macro-pixel according to the position relation of the first reference block in the first current macro-pixel so as to obtain the at least one first macro-pixel co-location block; The determining, according to the second reference block, at least one second macro-pixel co-located block of the second reference block in the second reference image includes: Determining a second current macro-pixel and at least one second candidate macro-pixel in the second reference image, the second current macro-pixel including at least a portion of the second reference block; and determining respective macro-pixel co-location blocks in the at least one second candidate macro-pixel according to the position relation of the second reference block in the second current macro-pixel so as to obtain the at least one second macro-pixel co-location block.
  9. The method of claim 8, wherein the determining the target motion parameter from the searching of the initial reference block and the macro-pixel co-located block, respectively, comprises: Searching in a preset area of the macro pixel according to the initial reference block and the macro pixel parity block respectively, and determining a plurality of groups of candidate motion parameters, wherein each group of candidate motion parameters comprises a first candidate motion vector and a second candidate motion vector; respectively carrying out cost calculation on the multiple groups of candidate motion parameters to obtain multiple groups of cost results; And determining a minimum cost result from the multiple groups of cost results, and determining a group of candidate motion parameters corresponding to the minimum cost result as the target motion parameters.
  10. The method of claim 9, wherein the determining a plurality of candidate motion parameters according to the searching of the initial reference block and the macro-pixel co-located block in the preset area of the macro-pixel comprises: Searching a first preset area of the macro pixel of the initial reference block by taking the initial reference block as a center, and determining at least one group of first candidate motion parameters; Searching a second preset area of the macro pixel belonging to the macro pixel co-located block by taking the macro pixel co-located block as a center, and determining at least one group of second candidate motion parameters; The at least one set of first candidate motion parameters and the at least one set of second candidate motion parameters are determined as the plurality of sets of candidate motion parameters.
  11. The method of claim 10, wherein the searching in the first preset region of the macro-pixel of the initial reference block to determine at least one set of first candidate motion parameters comprises: searching in a first preset area of the first current macro pixel by taking the first reference block as a center to determine at least one first candidate motion vector, and determining at least one second candidate motion vector corresponding to the second reference block according to the at least one first candidate motion vector and the first preset area of the second current macro pixel by taking the second reference block as a center; The at least one set of first candidate motion parameters is determined from the at least one first candidate motion vector and at least one second candidate motion vector.
  12. The method of claim 11, wherein a first offset between the first initial motion vector and the first candidate motion vector and a second offset between the second initial motion vector and the second candidate motion vector have a symmetrical relationship.
  13. The method of claim 9, wherein the performing cost calculation on the plurality of sets of candidate motion parameters respectively to obtain a plurality of sets of cost results includes: determining a first candidate block corresponding to the first candidate motion vector and a second candidate block corresponding to the second candidate motion vector based on each set of candidate motion parameters; And calculating the cost results of the first candidate block and the second candidate block according to a preset criterion to obtain the cost result corresponding to each group of candidate motion parameters.
  14. The method of claim 9, wherein the performing cost calculation on the plurality of sets of candidate motion parameters respectively to obtain a plurality of sets of cost results includes: determining a first candidate block corresponding to the first candidate motion vector and a second candidate block corresponding to the second candidate motion vector based on each group of candidate motion parameters, and determining a candidate prediction block according to weighting calculation of the first candidate block and the second candidate block; performing weighted calculation according to the first reference block and the second reference block, and determining an initial prediction block; And calculating the cost results of the candidate prediction block and the initial prediction block according to a preset criterion, and obtaining the cost result corresponding to each group of candidate motion parameters.
  15. The method according to claim 13 or 14, wherein the predetermined criteria comprises at least one of the following, sum of absolute errors SAD, sum of absolute transform errors SATD, mean square error MSE, sum of square errors SSE, mean absolute error MAE.
  16. The method of any one of claims 1 to 15, wherein the target motion parameters include a first target motion vector and a second target motion vector, the determining the predicted value of the current block according to the target motion parameters comprising: Determining a first prediction block of the current block according to the first target motion vector; determining a second predicted block of the current block according to the second target motion vector; and determining a predicted value of the current block according to the first predicted block and the second predicted block.
  17. The method of claim 16, wherein the determining the prediction value of the current block from the first prediction block and the second prediction block comprises: and carrying out weighted calculation according to the first prediction block and the second prediction block, and determining the prediction value of the current block.
  18. The method of any one of claims 1 to 15, wherein the method further comprises: decoding a code stream, and determining a prediction difference value of the current block; And determining a reconstruction value of the current block according to the prediction difference value of the current block and the prediction value of the current block.
  19. An encoding method applied to an encoder, the method comprising: Determining an initial reference block of a current block and determining a macro pixel homonymous block corresponding to the initial reference block; Searching according to the initial reference block and the macro pixel homonymy block respectively to determine target motion parameters; and determining the predicted value of the current block according to the target motion parameter.
  20. The method of claim 19, wherein the method further comprises: Determining a prediction difference value of the current block according to the prediction value of the current block; and carrying out coding treatment on the prediction difference value of the current block, and writing the obtained coding bit into a code stream.

Description

Encoding/decoding method, code stream, encoder, decoder, and storage medium Technical Field The embodiment of the application relates to the technical field of video encoding and decoding, in particular to an encoding and decoding method, a code stream, an encoder, a decoder and a storage medium. Background Light field video is a video format acquired by a light field camera, and because of the unique microlens array design inside the light field camera, the image frames of the light field video will show a series of closely arranged macro-pixels (or called micro-images), as shown in fig. 1. The circular pattern shown in fig. 1 is macro-pixels, and in this example, the macro-pixels are closely arranged in a hexagonal template. Light field video tends to be huge in data volume, which presents difficulties for its transmission and compression. Therefore, video coding techniques for light field video are particularly important. However, in the related art, for example, the decoding-end motion vector refinement (Decoder side Motion Vector Refinement, DMVR) technology is not sufficiently considered for light field arrangement, resulting in low efficiency of light field video compression. Disclosure of Invention The embodiment of the application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can improve the compression efficiency of light field video. The technical scheme of the embodiment of the application can be realized as follows: In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, including: Determining an initial reference block of the current block and determining a macro pixel homonymous block corresponding to the initial reference block; searching according to the initial reference block and the macro pixel homonymy block respectively to determine target motion parameters; And determining the predicted value of the current block according to the target motion parameter. In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, including: Determining an initial reference block of the current block and determining a macro pixel homonymous block corresponding to the initial reference block; searching according to the initial reference block and the macro pixel homonymy block respectively to determine target motion parameters; And determining the predicted value of the current block according to the target motion parameter. In a third aspect, an embodiment of the present application provides a code stream, where the code stream is generated by performing bit encoding according to information to be encoded, where the information to be encoded includes at least one of a prediction difference value of a current block and a prediction parameter of the current block. In a fourth aspect, an embodiment of the present application provides an encoder, including a first determining unit, a first searching unit, and a first predicting unit, wherein: The first determining unit is configured to determine an initial reference block of the current block and determine a macro pixel homonymous block corresponding to the initial reference block; the first searching unit is configured to search according to the initial reference block and the macro pixel homonymous block respectively and determine target motion parameters; and the first prediction unit is configured to determine a predicted value of the current block according to the target motion parameter. In a fourth aspect, an embodiment of the present application provides an encoder including a first memory and a first processor, wherein: a first memory for storing a computer program capable of running on the first processor; a first processor for performing the method as described in the second aspect when the computer program is run. In a fifth aspect, an embodiment of the present application provides a decoder, including a second determining unit, a second searching unit, and a second predicting unit, wherein: the second determining unit is configured to determine an initial reference block of the current block and determine a macro pixel homonymy block corresponding to the initial reference block; The second searching unit is configured to search according to the initial reference block and the macro pixel homonymous block respectively and determine target motion parameters; And the second prediction unit is configured to determine a predicted value of the current block according to the target motion parameter. In a sixth aspect, an embodiment of the present application provides a decoder including a second memory and a second processor, wherein: a second memory for storing a computer program capable of running on the second processor; a second processor for performing the method according to the first aspect when the computer program is run. In a seventh aspect, embodiments of the present applicatio