Search

CN-116347082-B - Method and device for encoding multimedia resources, electronic equipment and storage medium

CN116347082BCN 116347082 BCN116347082 BCN 116347082BCN-116347082-B

Abstract

The embodiment of the disclosure provides a method and a device for encoding multimedia resources, electronic equipment and a storage medium. The method comprises the steps of obtaining a current coding unit corresponding to a multimedia resource to be coded and candidate motion information corresponding to a merging mode with motion vector difference, wherein the candidate motion information comprises a plurality of candidate motion vectors and adjustment information of each candidate motion vector, arranging and combining each candidate motion vector, each offset direction, each list index and each offset step in an offset step list indicated by each list index to obtain a plurality of coding parameter combinations, coding the current coding unit by using each coding parameter combination to obtain respective rate-distortion cost data of each coding parameter combination, and determining the coding parameter combination of which the rate-distortion cost data meets preset conditions as a target coding parameter combination of the current coding unit to obtain a target coding result. The method can save computer resources and improve the coding effect.

Inventors

  • Jian Yunrui
  • HUANG YUE
  • WEN XING

Assignees

  • 北京达佳互联信息技术有限公司

Dates

Publication Date
20260512
Application Date
20230410

Claims (10)

  1. 1. A method for encoding a multimedia asset, comprising: Acquiring a current coding unit corresponding to a multimedia resource to be coded and candidate motion information corresponding to a merging mode with motion vector difference, wherein the candidate motion information comprises a plurality of candidate motion vectors and adjustment information of each candidate motion vector, the adjustment information comprises offset direction adjustment information and offset step length adjustment information, the offset direction adjustment information comprises a plurality of offset directions, the offset step length adjustment information comprises a plurality of list indexes and offset step length lists indicated by the list indexes, and each offset step length list comprises a plurality of offset step lengths; Arranging and combining each candidate motion vector, each offset direction, each list index and each offset step in an offset step list indicated by each list index to obtain a plurality of coding parameter combinations; coding the current coding unit by using each coding parameter combination to obtain respective rate distortion cost data of each coding parameter combination; and determining the coding parameter combination of which the rate distortion cost data meets the preset condition as the target coding parameter combination of the current coding unit, so as to obtain the target coding result of the multimedia resource to be coded according to the coding result of the current coding unit corresponding to the target coding parameter combination.
  2. 2. The method according to claim 1, wherein the method further comprises: Determining candidate motion vector indexes, offset direction indexes, list indexes of offset step lists and offset step indexes corresponding to target coding parameter combinations of the current coding unit; and writing the candidate motion vector index, the offset direction index, the list index of the offset step list and the offset step index corresponding to the target coding parameter combination of the current coding unit into a code stream, and transmitting the code stream to a decoding end for decoding.
  3. 3. The method of claim 1, wherein the list of offset steps comprises a first list of offset steps and a second list of offset steps; Each offset step in the first offset step list is smaller than each offset step in the second offset step list; Step intervals between adjacent offset step sizes in the first offset step size list are smaller than step intervals between adjacent offset step sizes in the second offset step size list.
  4. 4. A method according to claim 1 or 3, characterized in that the number of coding parameter combinations is the product of the number of candidate motion vectors, the number of offset directions, the number of list indices, and the number of offset steps comprised by each offset step list.
  5. 5. The method of claim 1, wherein the candidate motion information comprises a plurality of motion vector accuracies; The step of arranging and combining each candidate motion vector, each offset direction, each list index, and each offset step in the offset step list indicated by each list index to obtain a plurality of coding parameter combinations includes: and arranging and combining each candidate motion vector, each offset direction, each list index, each offset step in an offset step list indicated by each list index and each motion vector precision to obtain the plurality of coding parameter combinations.
  6. 6. The method of claim 5, wherein the method further comprises: Determining candidate motion vector indexes, offset direction indexes, list indexes of offset step lists, offset step indexes and motion vector precision indexes corresponding to target coding parameter combinations of the current coding unit; And writing the candidate motion vector index, the offset direction index, the list index of the offset step list, the offset step index and the motion vector precision index corresponding to the target coding parameter combination of the current coding unit into a code stream to be transmitted to a decoding end for decoding.
  7. 7. The method of claim 5, wherein the number of coding parameter combinations is a product of the number of candidate motion vectors, the number of offset directions, the number of list indices, the number of offset steps included in each offset step list, and the number of motion vector accuracies.
  8. 8. An apparatus for encoding a multimedia asset, comprising: The acquisition module is configured to acquire the current coding unit corresponding to the multimedia resource to be coded and candidate motion information corresponding to the merging mode with the motion vector difference, wherein the candidate motion information comprises a plurality of candidate motion vectors and adjustment information of each candidate motion vector, the adjustment information comprises offset direction adjustment information and offset step length adjustment information, the offset direction adjustment information comprises a plurality of offset directions, the offset step length adjustment information comprises a plurality of list indexes and offset step length lists indicated by the list indexes, and each offset step length list comprises a plurality of offset step lengths; a determining module configured to perform permutation and combination of each candidate motion vector, each offset direction, each list index, and each offset step in the offset step list indicated by each list index, to obtain a plurality of coding parameter combinations; an obtaining module configured to perform encoding of the current encoding unit using each encoding parameter combination, obtaining rate-distortion cost data of each encoding parameter combination; The determining module is configured to execute the coding parameter combination that the rate distortion cost data of each coding parameter combination meets the preset condition, determine the coding parameter combination as the target coding parameter combination of the current coding unit, and obtain the target coding result of the to-be-coded multimedia resource according to the coding result of the current coding unit corresponding to the target coding parameter combination.
  9. 9. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; Wherein the processor is configured to execute the executable instructions to implement the method of encoding a multimedia asset as claimed in any one of claims 1 to 7.
  10. 10. A computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method of encoding a multimedia asset as claimed in any one of claims 1 to 7.

Description

Method and device for encoding multimedia resources, electronic equipment and storage medium Technical Field The disclosure relates to the field of computer technology, and in particular, to a method and a device for encoding multimedia resources, electronic equipment and a computer readable storage medium. Background MMVD (MERGE WITH Motion Vector Difference, merging mode with motion vector difference) is an inter prediction technique in VVC (VERSATILE VIDEO CODING, general video coding) coding standard in video coding. MMVD constructing MMVD candidates by using the first two candidate motion information in the Merge list, shifting in both horizontal and vertical directions, and selecting the optimal candidate motion information index, shifting direction and shifting step size by rate-distortion optimization. In the related art, 8 offset steps are defined to be selectable in MMVD mode, wherein the offset steps are {1/4,1/2,1,2,4,8,16,32}, when the offset step selected by the coding block is larger, the number of bits needed for coding the syntax element is more, more computer resources are needed to be occupied, and meanwhile, the selectable offset step has poorer coding effect. It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art. Disclosure of Invention The embodiment of the disclosure provides a multimedia resource encoding method, a multimedia resource encoding device, electronic equipment and a computer readable storage medium. The embodiment of the disclosure provides a method for encoding multimedia resources, which comprises the steps of obtaining a current encoding unit corresponding to the multimedia resources to be encoded and candidate motion information corresponding to a merging mode with motion vector difference, wherein the candidate motion information comprises a plurality of candidate motion vectors and adjustment information of each candidate motion vector, the adjustment information comprises offset direction adjustment information and offset step length adjustment information, the offset direction adjustment information comprises a plurality of offset directions, the offset step length adjustment information comprises a plurality of list indexes and offset step length lists indicated by the list indexes, each offset step length list comprises a plurality of offset step lengths, arranging and combining each candidate motion vector, each offset direction, each list index and each offset step length list indicated by the list index to obtain a plurality of encoding parameter combinations, encoding the current encoding unit by using each encoding parameter combination to obtain respective rate-distortion cost data of each encoding parameter combination, and determining the encoding parameter combination with the rate-distortion cost data meeting preset conditions as a target encoding parameter combination of the current encoding unit, so as to obtain a target encoding result of the multimedia resources to be encoded by the current encoding unit corresponding to the target encoding parameter combination. In some exemplary embodiments of the present disclosure, the method further includes determining a candidate motion vector index, an offset direction index, a list index of an offset step list, and an offset step index corresponding to a target coding parameter combination of the current coding unit, and writing the candidate motion vector index, the offset direction index, the list index of the offset step list, and the offset step index corresponding to the target coding parameter combination of the current coding unit into a bitstream for transmission to a decoding end for decoding. In some exemplary embodiments of the present disclosure, the list of offset steps includes a first list of offset steps and a second list of offset steps, each offset step in the first list of offset steps being smaller than each offset step in the second list of offset steps, and step spacing between adjacent offset steps in the first list of offset steps being smaller than step spacing between adjacent offset steps in the second list of offset steps. In some exemplary embodiments of the present disclosure, the number of coding parameter combinations is a product of the number of candidate motion vectors, the number of offset directions, the number of list indices, and the number of offset steps included per offset step list. In some exemplary embodiments of the present disclosure, the candidate motion information includes a plurality of motion vector accuracies, and the permutation and combination of each candidate motion vector, each offset direction, each list index, and each offset step in the offset step list indicated by each list index is performed to obtain a plurality of coding para