Mesh decoding method, mesh coding method, decoding apparatus, coding apparatus, medium and bitstream

By simplifying the motion vector prediction mode of the current group by utilizing the motion vector coding method of the reference grid in dynamic grid coding, the problems of high bitstream size and time complexity in inter-frame coding are solved, and a more efficient coding process is achieved.

WO2026007117A1PCT designated stage Publication Date: 2026-01-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/103976
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2026-01-08

AI Technical Summary

Technical Problem

Existing technologies in dynamic grid coding fail to effectively simplify the setting of motion vector prediction modes during inter-frame coding, resulting in high bitstream size and time complexity.

Method used

In inter-frame coding mode, by considering the motion vector coding method of the reference group in the reference grid, the motion vector prediction mode of the current group is simplified, and the codewords and computational complexity of the motion vector prediction mode are reduced.

Benefits of technology

This reduces the bitstream size and the time complexity of motion vector prediction, thus improving coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103976_08012026_PF_FP_ABST
    Figure CN2024103976_08012026_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application belong to the technical field of dynamic mesh coding and decoding. Disclosed are a mesh decoding method, a mesh coding method, a decoding apparatus, a coding apparatus, a medium and a bitstream. The mesh coding method comprises: in an inter-frame coding mode, on the basis of a motion vector coding mode of a current group in a current mesh and a motion vector coding mode of a reference group in a reference mesh, coding a prediction mode syntax element into a bitstream, wherein the prediction mode syntax element is configured to represent a motion vector prediction mode used by the current group.
Need to check novelty before this filing date? Find Prior Art

Description

Mesh decoding, encoding method, device, medium and code stream TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of dynamic mesh coding and decoding, and particularly relate to a mesh decoding and encoding method, device, medium and code stream. BACKGROUND

[0002] Dynamic mesh coding (DMC) is a high-efficiency compression technology for dynamic mesh sequences. A dynamic mesh sequence refers to a three-dimensional mesh sequence with time-varying geometry and topology.

[0003] In related technologies, in the DMC encoding process based on inter-frame, when a base mesh is encoded, the connection information of the vertices in the base mesh does not need to be encoded, and only the motion vector between the geometry coordinates of the vertices in the current base mesh and the geometry coordinates of the vertices in the reference base mesh needs to be encoded. Correspondingly, in the decoding process, after the decoder parses the motion vector from the code stream, the current base mesh can be reconstructed based on the motion vector, the connection information of the vertices in the reference base mesh, and the geometry coordinates of the vertices in the reference base mesh.

[0004] SUMMARY

[0005] Embodiments of the present application provide a mesh decoding and encoding method, device, medium and code stream. The technical solutions are as follows:

[0006] In one aspect, the present application provides a mesh decoding method, which comprises:

[0007] In the inter-frame decoding mode, the motion vector prediction mode adopted by the current group is determined based on the motion vector decoding mode of the current group in the current mesh and the motion vector decoding mode of the reference group in the reference mesh.

[0008] In another aspect, the present application provides a mesh encoding method, which comprises:

[0009] In the inter-frame encoding mode, a prediction mode syntax element is encoded into a code stream based on the motion vector encoding mode of the current group in the current mesh and the motion vector encoding mode of the reference group in the reference mesh, the prediction mode syntax element being used to represent the motion vector prediction mode adopted by the current group.

[0010] In another aspect, the present application provides a decoding device, which comprises:

[0011] The decoding unit is configured to determine, in the inter-frame decoding mode, a motion vector prediction mode adopted by a current group in a current grid based on a motion vector decoding manner of the current group and a motion vector decoding manner of a reference group in a reference grid, and the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the current group.

[0012] In another aspect, an embodiment of the present application provides an encoding device, which comprises:

[0013] The encoding unit is configured to encode, in the inter-frame encoding mode, a prediction mode syntax element into a code stream based on a motion vector encoding manner of a current group in a current grid and a motion vector encoding manner of a reference group in a reference grid, and the prediction mode syntax element is used to represent a motion vector prediction mode adopted by the current group.

[0014] In another aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is used to be executed by a processor to implement the grid decoding method in the above aspect, or the grid encoding method in the above aspect.

[0015] In another aspect, an embodiment of the present application provides a code stream, which is decoded by using the grid decoding method in the above aspect, or is encoded by using the grid encoding method in the above aspect.

[0016] In another aspect, an embodiment of the present application provides a decoder, which comprises a memory and a processor, wherein the memory is configured to store a computer program running on the processor; and the processor is configured to execute the grid decoding method in the above aspect when running the computer program.

[0017] In another aspect, an embodiment of the present application provides an encoder, which comprises a memory and a processor, wherein the memory is configured to store a computer program running on the processor; and the processor is configured to execute the grid encoding method in the above aspect when running the computer program.

[0018] In the embodiment of the present application, because the selection of the motion vector prediction mode adopted by the current group in the current grid is affected by the motion vector encoding manner of the reference group in the reference grid in the inter-frame encoding mode, the motion vector encoding manner of the reference group is considered in the grid encoding process, which can simplify the setting of the motion vector prediction mode of the current group, and further can save the code word of the motion vector prediction mode encoding, and help to reduce the code stream size. Moreover, after simplifying the motion vector prediction mode of the current group, the number of modes to be calculated in the motion vector prediction in the encoding process is reduced, which helps to reduce the time complexity of the motion vector prediction. BRIEF DESCRIPTION OF DRAWINGS

[0019] FIG. 1 is a schematic diagram of a current base grid and a reference base grid according to an example embodiment;

[0020] FIG. 2 is a flowchart of a grid encoding method according to an example embodiment of the present application;

[0021] FIG. 3 is a schematic diagram of a correspondence between a motion vector prediction mode and a binary symbol string according to an example embodiment of the present application;

[0022] FIG. 4 is a schematic diagram of a correspondence between a motion vector prediction mode and a binary symbol string according to another example embodiment of the present application;

[0023] FIG. 5 is a flowchart of a motion vector encoding mode determination and encoding process according to an example embodiment of the present application;

[0024] FIG. 6 is a flowchart of a motion vector encoding mode determination process according to an example embodiment of the present application;

[0025] FIG. 7 is a flowchart of a motion vector encoding mode determination process according to another example embodiment of the present application;

[0026] FIG. 8 is a flowchart of a motion vector encoding mode determination process according to yet another example embodiment of the present application;

[0027] FIG. 9 is a flowchart of a motion vector difference encoding process according to an example embodiment of the present application;

[0028] FIG. 10 is a flowchart of a grid decoding method according to an example embodiment of the present application;

[0029] FIG. 11 is a flowchart of a motion vector reconstruction process according to an example embodiment of the present application;

[0030] FIG. 12 is a block diagram of a grid decoding apparatus according to an example embodiment of the present application;

[0031] FIG. 13 is a block diagram of a grid encoding apparatus according to an example embodiment of the present application;

[0032] FIG. 14 is a block diagram of a decoder according to an example embodiment of the present application;

[0033] FIG. 15 is a block diagram of an encoder according to an example embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0035] The "multiple" mentioned in this paper refers to two or more than two. "And / or" describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.

[0036] For the convenience of understanding, the following explains the terms involved in the embodiments of the present application.

[0037] Three-dimensional mesh: A three-dimensional mesh is a three-dimensional object surface composed of multiple polygons in space, and a polygon is composed of vertices and edges. A two-dimensional image has information expression and distribution rules at each pixel point, so it does not need to record its position information additionally. The distribution of vertices in a three-dimensional mesh in three-dimensional space has randomness and irregularity, and the composition of polygons needs additional provisions, so the position of each vertex in space and the connection information of each polygon need to be recorded to completely express the three-dimensional mesh.

[0038] Three-dimensional mesh compression: At the encoding end, a base mesh and a displacement coefficient are first generated through preprocessing. The base mesh is a mesh with a greatly reduced number of vertices obtained by downsampling the original mesh. After obtaining the base mesh, the base mesh is subdivided by a subdivision algorithm, and new vertices are inserted on the edges of the base mesh. For each vertex in the subdivided mesh, find the nearest vertex in the original mesh, and determine the vector between the vertex in the subdivided mesh and the nearest vertex in the original mesh as the displacement coefficient.

[0039] Since the subdivision algorithm and the number of subdivision iterations are determined, the subdivided mesh can be automatically generated at the encoding and decoding ends. Therefore, after preprocessing, the original mesh only needs to be represented as a simple base mesh and a series of displacement coefficients, which greatly reduces the amount of data to be transmitted without affecting the reconstruction at the decoding end.

[0040] Intra-frame-based coding: At the encoding end, the base mesh generated by preprocessing is quantized and encoded using the draco encoder, and the displacement coefficient is transformed by wavelet, quantized, two-dimensionally mapped, and encoded by HEVC. At the decoding end, the base mesh stream is decoded by the draco decoder to generate the decoded base mesh, and the displacement coefficient is decoded by HEVC, inverse two-dimensionally mapped, inverse quantized, and inverse transformed to generate the decoded displacement coefficient, so as to reconstruct the three-dimensional mesh based on the decoded base mesh and displacement coefficient.

[0041] Inter-frame based coding: at the encoding end, since the inter-frame mode is adopted, the connection information between vertices is no longer needed to be encoded for the base mesh part, and only the motion vector between the vertex coordinates of the current base mesh and the vertex coordinates of the reference base mesh needs to be encoded; the shift coefficients are still encoded by HEVC after wavelet transform, quantization and two-dimensional mapping. At the decoding end, after the motion vector is decoded from the base mesh code stream, the current base mesh can be reconstructed by combining the connection information of the vertices of the reference base mesh; and the decoded shift coefficients are generated after the HEVC decoding, inverse two-dimensional mapping, inverse quantization and inverse transform of the shift coefficients, so as to reconstruct the three-dimensional mesh based on the decoded base mesh and the shift coefficients.

[0042] Motion vector: refers to the difference between the geometric coordinates of a vertex in the current mesh and the corresponding vertex (having the same vertex index) in the reference mesh. For example, for vertex i, its motion vector (m ix ,m iy ,m iz ) = (P ix ,P iy ,P iz ) - (P' ix ,P' iy ,P' iz ), where (P ix ,P iy ,P iz ) is the geometric coordinates of vertex i in the current mesh, and (P' ix ,P' iy ,P' iz ) is the geometric coordinates of vertex i in the reference mesh.

[0043] Current base mesh and reference base mesh: the current base mesh and the reference base mesh have the same vertex connection information, and only the geometric coordinates of the vertices in the base mesh are different. As shown in FIG. 1, the current base mesh 101 in the current frame and the reference base mesh 102 in the reference frame both have 21 vertices, and the connection relationship between the vertices is consistent.

[0044] Intra-frame prediction point: a neighbor vertex which has a connection relationship with the current vertex and whose coding order is before that of the current vertex is determined according to the triangle face connection information of the base mesh. As shown in FIG. 1, in the current base mesh 101, the neighbor vertices of vertex 17 include vertex 1, 11 and 16, and the neighbor vertices of vertex 19 include vertex 4, 5, 7, 8, 9 and 10. The intra-frame prediction points of the current vertex can be composed of all neighbor vertices or part of the neighbor vertices.

[0045] Inter-prediction point: according to the triangular face connection information of the base mesh, the reference mesh neighbor vertex of the current vertex in the current base mesh is determined. The reference mesh neighbor vertex is a vertex in the reference base mesh that has a connection relationship with the reference vertex corresponding to the current vertex in the current base mesh. As shown in FIG. 1, for the vertex 17 in the current base mesh 101, the reference mesh vertices in the reference base mesh 102 include vertices 17, 1, 11, 16, 18, and 21; for the vertex 19 in the current base mesh 101, the reference mesh vertices in the reference base mesh 102 include vertices 19, 4, 5, 7, 8, 9, and 10. The inter-prediction point of the current vertex can be composed of all reference mesh neighbor vertices or part of the reference mesh neighbor vertices.

[0046] Referring to FIG. 2, a flowchart of a mesh coding method provided by an example embodiment of the present application is shown. The method is applied to an encoder, and the method can include the following steps:

[0047] In step 201, in the inter-frame coding mode, a prediction mode syntax element is encoded into a bitstream based on the motion vector coding mode of the current group in the current mesh and the motion vector coding mode of the reference group in the reference mesh, and the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the current group.

[0048] In some embodiments, the current mesh is a base mesh in VDMC (Video-based Dynamic Mesh Coding).

[0049] In the case where the coding mode of the current mesh in the current frame is the inter-frame coding mode, the encoder adopts the scheme provided by the embodiments of the present application to perform mesh coding.

[0050] In some embodiments, the syntax element A in the bitstream is used to indicate the coding mode of the base mesh in each frame. For example, the value 0 of the syntax element A indicates that the inter-frame coding mode is adopted, the value 1 of the syntax element A indicates that the intra-frame coding mode is adopted, the value 2 of the syntax element A indicates that the skip coding mode is adopted, and the value 3 of the syntax element A is a reserved bit.

[0051] The vertices in the base mesh have respective vertex indexes. For example, when the total number of vertices in the base mesh is N, the vertex indexes of the vertices are from 0 to N-1. In the coding process, the vertices are usually coded in the order of increasing vertex indexes.

[0052] In some embodiments, the vertices in the base mesh are motion vector coded in groups. For example, when the total number of vertices in the base mesh is 40 and the group size is 16, the vertex index range of the vertices in the first group is 0-15, the vertex index range of the vertices in the second group is 16-31, and the vertex index range of the vertices in the third group is 32-39. In the inter-frame coding mode, the encoder encodes each vertex in a group in the present embodiment.

[0053] Of course, in other embodiments, the vertices in the base mesh can not be grouped, or all the vertices in the base mesh are divided into the same group, and all the vertices in the base mesh are motion vector coded, i.e., the motion vector coding mode and the motion vector prediction mode of the entire base mesh are indicated by one syntax element.

[0054] In some embodiments, the motion vector coding mode includes skip coding and non-skip coding. In the case of skip coding, the encoder will not encode the motion vector of the vertices in the current group, i.e., the motion vector reconstruction values of the vertices in the group in each dimension are all (0, 0, 0).

[0055] In the case of non-skip coding, the encoder continues to determine whether the motion vector of the current group is skip coded in each dimension. The dimensions include the three coordinate dimensions x, y, and z.

[0056] Further, if the motion vector of the current group is skip coded in a certain dimension, the encoder will not encode the motion vector of the vertices in that dimension, i.e., the motion vector reconstruction values of the vertices in the group in that dimension are all 0.

[0057] If the motion vector of the current group is not skip coded in a certain dimension, the encoder continues to determine the motion vector prediction mode adopted by the motion vector in that dimension. The motion vector prediction mode belongs to a plurality of candidate motion vector prediction modes.

[0058] In addition to being able to determine the motion vector prediction mode corresponding to each dimension in the current group respectively, the different dimensions in the current group can adopt a unified motion vector prediction mode.

[0059] That is, the prediction mode syntax element in the code stream can be used to indicate the motion vector prediction mode adopted by each dimension in the current group, or can be used to indicate the unified motion vector prediction mode adopted by each dimension in the current group. Different values of the prediction mode syntax element correspond to different motion vector prediction modes.

[0060] ​​​​In a possible implementation, the prediction mode syntax element is used to represent a motion vector prediction mode adopted by the whole current group, or is used to represent motion vector prediction modes adopted by different dimensions in the current group.

[0061] In a case where the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the whole current group, the same motion vector prediction mode is adopted by different dimensions in the current group.

[0062] For example, in a case where the prediction mode syntax element represents that the motion vector prediction mode adopted by the whole current group is the unbiased intra prediction mode, the unbiased intra prediction mode is adopted by each dimension in the current group.

[0063] For another example, the prediction mode syntax element corresponding to the dimension x and the dimension y in the current group respectively represents that the unbiased intra prediction is adopted for the dimension x and the dimension y of the vertex, and the prediction mode syntax element corresponding to the dimension z represents that the inter prediction is adopted for the dimension z of the vertex.

[0064] In the embodiments of the present application, when determining the motion vector prediction mode adopted by the current group, the encoder needs to additionally obtain the motion vector coding mode of a reference group in a reference mesh. The reference mesh has the same connection information as the current mesh, and the vertex indexes of the vertices included in the reference group are consistent with those of the current group. The current mesh is a base mesh of a current frame, and the reference mesh is a base mesh of a reference frame corresponding to the current frame.

[0065] In some embodiments, the motion vector coding mode of the reference group includes the motion vector coding mode of the whole reference group, and / or includes the motion vector coding mode of different dimensions in the reference group.

[0066] In some embodiments, based on the motion vector coding mode of the reference group in the reference mesh, the encoder can determine a partially invalid motion vector prediction mode, that is, when determining the motion vector prediction mode of the current group from the candidate motion vector prediction modes, the encoder can only calculate part of the candidate motion vector prediction modes, which helps to reduce the time complexity of motion vector prediction and improve the encoding efficiency.

[0067] In addition, after filtering out the partially invalid motion vector prediction mode, the motion vector prediction mode setting is simplified (for example, from 4 candidate motion vector prediction modes to 3), and when encoding the motion vector prediction mode of the current group subsequently, a more simplified binary symbol string coding prediction mode syntax element can be used to encode the motion vector prediction mode, so as to save the code word.

[0068] In summary, in the embodiments of the present application, because in the inter-frame coding mode, the selection of the motion vector prediction mode of the current group in the current grid is affected by the motion vector coding mode of the reference group in the reference grid, therefore, in the grid coding process, the motion vector coding mode of the reference group is considered, which can simplify the setting of the motion vector prediction mode of the current group, and further can save the code word of the motion vector prediction mode coding, which is helpful to reduce the code stream size. Moreover, after simplifying the motion vector prediction mode of the current group, the number of modes to be calculated in the motion vector prediction in the coding process is reduced, which is helpful to reduce the time complexity of the motion vector prediction.

[0069] Influence of whether the reference group is skip coded on the motion vector prediction mode configuration of the current group

[0070] In the case that the non-prediction and inter-frame prediction mode are included in the candidate motion vector prediction mode, if the motion vector coding mode of the reference group in the reference grid is skip coding, and the motion vector reconstruction value of the vertex in the reference group is 0, at this time, the prediction results of the inter-frame prediction and the non-prediction of the encoder for the current group are the same.

[0071] Therefore, for the purpose of reducing the time complexity of the motion vector prediction and saving the code word, in a possible implementation, in the case that the motion vector coding mode of the current group in the current grid is non-skip coding, and the motion vector coding mode of the reference group in the reference grid is non-skip coding, the candidate motion vector prediction mode of the current group includes the inter-frame prediction mode.

[0072] In the case that the motion vector coding mode of the current group in the current grid is non-skip coding, and the motion vector coding mode of the reference group in the reference grid is skip coding, the candidate motion vector prediction mode of the current group does not include the inter-frame prediction mode.

[0073] Optionally, the motion vector coding mode of the current group refers to the motion vector coding mode of the whole current group, i.e. whether the whole current group skips the motion vector coding; and / or, the motion vector coding mode of the current group refers to the motion vector coding mode of different dimensions in the current group, i.e. whether the motion vector coding is skipped in each dimension in the current group.

[0074] Optionally, the motion vector coding mode of the reference group refers to the motion vector coding mode of the whole reference group, i.e. whether the whole reference group skips the motion vector coding; and / or, the motion vector coding mode of the reference group refers to the motion vector coding mode of different dimensions in the reference group, i.e. whether the motion vector coding is skipped in each dimension in the reference group.

[0075] In some embodiments, when the motion vector coding mode of the reference group is skip coding, the encoder can remove the inter prediction mode from the candidate motion vector prediction modes of the current group, i.e. the motion vector prediction of the current group in the inter prediction mode is not needed, because the motion vector prediction results of the current group in the non-prediction and inter prediction modes are the same.

[0076] When the motion vector coding mode of the reference group is non-skip coding, the encoder needs to perform the motion vector prediction of the current group in the inter prediction mode, i.e. the inter prediction mode is still included in the candidate motion vector prediction modes of the current group, because the motion vector prediction results of the current group in the non-prediction and inter prediction modes are different.

[0077] In some embodiments, when the motion vector coding mode of the current group in the current grid is non-skip coding and the motion vector coding mode of the reference group in the reference grid is non-skip coding, the encoder determines the motion vector prediction mode of the current group from the candidate motion vector prediction modes including the inter prediction mode.

[0078] In some embodiments, when the motion vector coding mode of the current group in the current grid is non-skip coding and the motion vector coding mode of the reference group in the reference grid is skip coding, the encoder determines the motion vector prediction mode of the current group from the candidate motion vector prediction modes not including the inter prediction mode.

[0079] In some embodiments, when the motion vector coding mode of the entire current group in the current grid is non-skip coding and the motion vector coding mode of the entire reference group in the reference grid is skip coding, the candidate motion vector prediction modes of the entire current group do not include the inter prediction mode.

[0080] When the motion vector coding mode of the entire reference group is skip coding, it indicates that the motion vector coding mode of each dimension in the reference group is skip coding, so the encoder determines that the candidate motion vector prediction modes of the entire current group, i.e. the candidate motion vector prediction modes of each dimension in the current group, do not include the inter prediction mode.

[0081] In one possible implementation, a syntax element B is used to represent the motion vector coding mode of the entire group. When the syntax element B corresponding to the current group indicates non-skip coding and the syntax element B corresponding to the reference group indicates skip coding, the encoder determines that the candidate motion vector prediction modes of the current group do not include the inter prediction mode.

[0082] For example, when the value of the syntax element B is 1, it indicates that the skip coding is used, and when the value of the syntax element B is 0, it indicates that the non-skip coding is used. When the value of the syntax element B corresponding to the current group is 0 and the value of the syntax element B corresponding to the reference group is 1, the encoder determines that the candidate motion vector prediction mode of the current group does not include the inter prediction mode.

[0083] In the case that the motion vector coding mode of the whole reference group is non-skip coding, it indicates that at least one dimension of the motion vector coding mode in the reference group is non-skip coding, and thus the encoder needs to further determine whether to exclude the intra prediction mode in a specific dimension based on the motion vector coding mode corresponding to each dimension in the reference group.

[0084] In some embodiments, in the case that the motion vector coding mode of the whole current group in the current grid is non-skip coding and the motion vector coding mode of the whole reference group in the reference grid is non-skip coding, the following two cases are further included:

[0085] Case 1, in the case that the motion vector coding mode of the current dimension in the current group is non-skip coding and the motion vector coding mode of the reference dimension in the reference group is skip coding, the candidate motion vector prediction mode of the current dimension in the current group does not include the inter prediction mode.

[0086] The reference dimension is the same dimension as the current dimension. For example, the current dimension and the reference dimension are both x, or the current dimension and the reference dimension are both y, or the current dimension and the reference dimension are both z.

[0087] When the motion vector coding mode of the reference dimension in the reference group is skip coding, because the motion vector prediction results of the non-prediction mode and the inter prediction mode in the current dimension in the current group are the same, the encoder can remove the inter prediction mode from the candidate motion vector prediction mode of the current dimension, i.e., the motion vector prediction of the current dimension in the inter prediction mode is not needed.

[0088] Correspondingly, the encoder determines the motion vector prediction mode of the current dimension in the current group from the candidate motion vector prediction mode which does not include the inter prediction mode.

[0089] In a possible implementation, the syntax elements C, D, and E are respectively used to represent the motion vector coding modes of different dimensions (x, y, and z). When the syntax element B corresponding to the current group indicates non-skip coding and the syntax element B corresponding to the reference group indicates non-skip coding, the encoder further acquires the syntax element C (or D, E) corresponding to the current dimension in the current group and the syntax element C (or D, E) corresponding to the reference dimension in the reference group.

[0090] If the syntax element C (or D, E) corresponding to the current dimension in the current group indicates non-skip coding, and the syntax element C (or D, E) corresponding to the reference dimension in the reference group indicates skip coding, the encoder determines that the candidate motion vector prediction mode of the current dimension does not include the inter prediction mode.

[0091] For example, the value of the syntax element C (or D, E) is 1, indicating skip coding, and the value of the syntax element C (or D, E) is 0, indicating non-skip coding. When the value of the syntax element C (or D, E) corresponding to the current dimension in the current group is 0, and the value of the syntax element C (or D, E) corresponding to the reference dimension in the reference group is 1, the encoder determines that the candidate motion vector prediction mode of the current dimension does not include the inter prediction mode.

[0092] Case 2: In the case that the motion vector coding mode of the current dimension in the current group is non-skip coding, and the motion vector coding mode of the reference dimension in the reference group is non-skip coding, the candidate motion vector prediction mode of the current dimension in the current group includes the inter prediction mode.

[0093] When the motion vector coding mode of the reference dimension in the reference group is non-skip coding, because the motion vector prediction results of the current dimension in the current group are different when the non-prediction and inter prediction modes are used, the encoder needs to perform motion vector prediction on the current dimension in the current group in the inter prediction mode, that is, the candidate motion vector prediction mode of the current dimension in the current group still includes the inter prediction mode.

[0094] Correspondingly, the encoder determines the motion vector prediction mode of the current dimension in the current group from the candidate motion vector prediction mode including the inter prediction mode.

[0095] In a possible implementation, if the syntax element C (or D, E) corresponding to the current dimension in the current group indicates non-skip coding, and the syntax element C (or D, E) corresponding to the reference dimension in the reference group indicates non-skip coding, the encoder determines that the candidate motion vector prediction mode of the current dimension includes the inter prediction mode.

[0096] For example, the value of the syntax element C (or D, E) is 1, indicating skip coding, and the value of the syntax element C (or D, E) is 0, indicating non-skip coding. When the value of the syntax element C (or D, E) corresponding to the current dimension in the current group is 0, and the value of the syntax element C (or D, E) corresponding to the reference dimension in the reference group is 0, the encoder determines that the candidate motion vector prediction mode of the current dimension includes the inter prediction mode.

[0097] In another possible implementation, the code stream contains syntax elements corresponding to each dimension in the current group, but does not contain syntax elements corresponding to the entire current group. Accordingly, the encoder can determine whether the candidate motion vector prediction mode of the current dimension includes the inter prediction mode directly according to the motion vector decoding mode of the current dimension in the current group and the motion vector decoding mode of the reference dimension in the reference group, without first determining the motion vector decoding mode of the entire current group and the motion vector decoding mode of the entire reference group.

[0098] In some embodiments, in the case that the motion vector encoding mode of the current dimension in the current group is non-skip encoding, and the motion vector encoding mode of the reference dimension in the reference group is skip encoding, the candidate motion vector prediction mode of the current dimension in the current group does not include the inter prediction mode.

[0099] In the case that the motion vector encoding mode of the current dimension in the current group is non-skip encoding, and the motion vector encoding mode of the reference dimension in the reference group is non-skip encoding, the candidate motion vector prediction mode of the current dimension in the current group includes the inter prediction mode.

[0100] In another possible implementation, if the motion vector encoding mode of each dimension in the entire group is uniform, the code stream contains syntax elements corresponding to the entire current group, but does not contain syntax elements corresponding to each dimension in the current group (which are consistent with the syntax elements corresponding to the entire group). Accordingly, the encoder can determine the candidate motion vector prediction mode of the entire current group based on the motion vector decoding mode of the entire current group and the motion vector decoding mode of the entire reference group, and further determine the candidate motion vector prediction mode of each dimension in the current group.

[0101] In some embodiments, in the case that the motion vector encoding mode of the entire current group in the current grid is non-skip encoding, and the motion vector encoding mode of the entire reference group in the reference grid is skip encoding, the candidate motion vector prediction mode of the entire current group does not include the inter prediction mode;

[0102] In the case that the motion vector encoding mode of the entire current group in the current grid is non-skip encoding, and the motion vector encoding mode of the entire reference group in the reference grid is non-skip encoding, the candidate motion vector prediction mode of the entire current group includes the inter prediction mode.

[0103] Encoding of the prediction mode syntax element

[0104] In the embodiments of the present application, the encoder can use either of variable length coding and fixed length coding to encode the prediction mode syntax element into the code stream, so as to save code words.

[0105] Variable length coding

[0106] In a possible implementation, the encoder encodes the prediction mode syntax element into the bitstream by a variable length coding manner based on the total number of the candidate motion vector prediction modes of the current group and the motion vector prediction mode adopted by the current group.

[0107] In the embodiment, the prediction mode syntax element used to represent the motion vector prediction mode adopted by the current group is binarized to obtain a binary string and written into the bitstream. The binary string is a string composed of 0 and 1.

[0108] Optionally, when the variable length coding is used, the longest binary string length of the prediction mode syntax element is the total number of the candidate motion vector prediction modes minus 1. As can be seen from the above embodiment, since the candidate motion vector prediction modes of the current group do not include the inter prediction mode in some scenarios, the longest binary string length of the prediction mode syntax element is smaller in such scenarios, thereby achieving the effect of saving code words.

[0109] For example, when the inter prediction mode is included, the total number of the candidate motion vector prediction modes is 4, and the encoder can use 0, 10, 110 and 111 to represent different candidate motion vector prediction modes; and when the inter prediction mode is not included, the total number of the candidate motion vector prediction modes is 3, and the encoder can use 0, 10 and 11 to represent different candidate motion vector prediction modes.

[0110] In an illustrative example, when the motion vector coding manner of the current group in the current grid is non-skip coding and the motion vector coding manner of the reference group in the reference grid is non-skip coding, the total number of the candidate motion vector prediction modes is 4, the encoder uses 0 to represent no prediction, 10 to represent non-offset intra prediction, 110 to represent offset intra prediction, and 111 to represent inter prediction.

[0111] When the motion vector coding manner of the current group in the current grid is non-skip coding and the motion vector coding manner of the reference group in the reference grid is skip coding, the total number of the candidate motion vector prediction modes is 3, the encoder uses 0 to represent no prediction, 10 to represent non-offset intra prediction, and 11 to represent offset intra prediction.

[0112] Obviously, when the current group adopts the offset intra prediction mode, one binary character (110 changes to 11) can be saved after excluding the inter prediction mode.

[0113] Fixed length coding

[0114] In one possible implementation, the correspondence between the two motion vector prediction modes and the prediction mode syntax element values can be pre-set for both cases of including and not including the inter prediction mode in the candidate motion vector prediction modes. Accordingly, the encoder determines which correspondence to use according to the motion vector coding manner of the current group and the reference group, and then determines the prediction mode syntax element value (bin string) corresponding to the motion vector prediction mode used by the current group based on the correspondence.

[0115] In some embodiments, the first correspondence includes the inter prediction mode (and the corresponding prediction mode syntax element value) and the second correspondence does not include the inter prediction mode.

[0116] In addition, in order to save the code, the length of at least one bin string representing the prediction mode in the first correspondence is greater than the length of the bin string representing the prediction mode in the second correspondence.

[0117] In the case where the motion vector coding manner of the current group in the current grid is non-skip coding and the motion vector coding manner of the reference group in the reference grid is non-skip coding, the encoder encodes the prediction mode syntax element into the bitstream based on the first correspondence.

[0118] In the case where the motion vector coding manner of the current group in the current grid is non-skip coding and the motion vector coding manner of the reference group in the reference grid is skip coding, the encoder encodes the prediction mode syntax element into the bitstream based on the second correspondence.

[0119] In one illustrative example, in the case of including the inter prediction mode, the total number of the candidate motion vector prediction modes is 4, and the first correspondence is shown in FIG. 3.

[0120] In the case of not including the inter prediction mode, the total number of the candidate motion vector prediction modes is 3, and the second correspondence is shown in FIG. 4.

[0121] Obviously, the length of the bin string of the non-prediction motion vector prediction mode in the second correspondence is less than the length of the bin string of the non-prediction motion vector prediction mode in the first correspondence. Accordingly, when the non-prediction mode is used by the current group, one bin (00 becomes 0) is saved by encoding based on the second correspondence compared with encoding based on the first correspondence.

[0122] It should be noted that the above candidate motion vector prediction modes are only used for illustrative purposes, and more or fewer candidate motion vector prediction modes or other different types of candidate motion vector prediction modes can be set by those skilled in the art, and the embodiments of the present application do not constitute a limitation in this regard.

[0123] In the embodiment, when the reference group is skipped from encoding, the encoder encodes the prediction mode syntax element into the bitstream by simplifying the configuration of the candidate motion vector prediction mode and using variable length coding, or by setting a corresponding relationship with different lengths of binary symbol strings and selecting one of the corresponding relationships to encode the prediction mode syntax element into the bitstream based on the motion vector encoding mode of the reference group, so as to save the code word.

[0124] Process of determining whether to skip encoding and the motion vector encoding mode

[0125] In order to ensure the consistency of the prediction process at the encoding and decoding ends, the encoder needs to encode the syntax element representing the motion vector encoding mode of each group in the current grid into the bitstream. In a possible implementation, the process is shown in FIG. 5.

[0126] Step 501, determine the motion vector encoding mode of the current group in the current grid.

[0127] The motion vector encoding mode of the current group can include at least one of the motion vector encoding mode of the entire current group and the motion vector encoding mode of each dimension in the current group.

[0128] Optionally, determining the motion vector encoding mode of the current group in the current grid can include the following cases:

[0129] Case 1, determine the motion vector encoding mode of the entire current group and the motion vector encoding mode of different dimensions in the current group.

[0130] In some embodiments, when the first syntax element (such as syntax element B) representing the motion vector encoding mode of the entire current group and the second syntax element (such as syntax elements C, D, and E) representing the motion vector encoding mode of different dimensions need to be encoded into the bitstream, the encoder needs to determine the motion vector encoding mode of the entire current group and the motion vector encoding mode of different dimensions in the current group.

[0131] The encoder can first determine the motion vector encoding mode of the entire current group, and then determine the motion vector encoding mode of each dimension; or the encoder can first determine the motion vector encoding mode of each dimension, and then determine the motion vector encoding mode of the entire current group.

[0132] Case 2, determine the motion vector encoding mode of different dimensions in the current group.

[0133] In some embodiments, when only the second syntax elements (such as syntax elements C, D, E) representing the motion vector coding modes of different dimensions need to be encoded into the bitstream, the encoder only determines the motion vector coding modes of different dimensions in the current group, without determining the motion vector coding mode of the entire current group.

[0134] Case 3, determine the motion vector coding mode of the entire current group in the current grid.

[0135] In some embodiments, when only the first syntax element (such as syntax element B) representing the motion vector coding mode of the entire current group needs to be encoded into the bitstream, the encoder only determines the motion vector coding mode of the entire current group. In this case where only the first syntax element is encoded, in the case where the motion vector coding mode of the entire current group is skip coding, each dimension in the current group is skip coded; in the case where the motion vector coding mode of the entire current group is not skip coding, each dimension in the current group is not skip coded, i.e., the motion vector coding modes of each dimension in the current group are consistent with the motion vector coding mode of the entire current group.

[0136] Step 502, encode the syntax element representing the motion vector coding mode of the current group into the bitstream.

[0137] The syntax element representing the motion vector coding mode of the current group includes at least one of the first syntax element (such as syntax element B) representing the motion vector coding mode of the entire current group, and the second syntax element (such as syntax elements C, D, E) representing the motion vector coding mode of different dimensions in the current group.

[0138] Optionally, encoding the syntax element representing the motion vector coding mode of the current group into the bitstream can include the following cases:

[0139] Case 1, encode the first syntax element representing the motion vector coding mode of the entire current group in the current grid, and the second syntax element representing the motion vector coding mode of different dimensions in the current group into the bitstream.

[0140] In some embodiments, in the case where the first syntax element representing the motion vector coding mode of the entire current group, and the second syntax element representing the motion vector coding mode of different dimensions need to be encoded into the bitstream, and based on the first syntax element, the individual second syntax elements cannot be determined, or based on the first syntax element and part of the second syntax elements, the remaining second syntax elements cannot be determined, the encoder needs to encode the first syntax element and all the second syntax elements into the bitstream.

[0141] For example, the encoder encodes syntax elements B, C, D, and E into the bitstream.

[0142] In some embodiments, the encoder encodes the first syntax element and part of the second syntax elements into the bitstream.

[0143] For example, the encoder encodes syntax elements B, C, D into the bitstream, where syntax element E can be determined according to syntax elements BCD.

[0144] Case 2: The second syntax elements representing the encoding modes of the motion vectors of different dimensions in the current group are encoded into the bitstream.

[0145] In some embodiments, when only the second syntax elements representing the encoding modes of the motion vectors of different dimensions in the current group need to be encoded into the bitstream, the encoder encodes the second syntax elements corresponding to each dimension into the bitstream.

[0146] For example, the encoder encodes syntax elements C, D, E into the bitstream.

[0147] Case 3: The first syntax element representing the encoding mode of the motion vectors of the entire current group in the current grid is encoded into the bitstream.

[0148] In some embodiments, when the first syntax element representing the encoding mode of the motion vectors of the entire current group and the second syntax elements representing the encoding modes of the motion vectors of different dimensions in the current group need to be encoded into the bitstream, and each second syntax element can be determined based on the first syntax element, the encoder can only encode the first syntax element into the bitstream.

[0149] For example, when syntax element B represents that the current group is skip-encoded, the encoder can only encode syntax element B into the bitstream, without the need to encode syntax elements C, D, and E into the bitstream.

[0150] In some embodiments, when the encoding modes of the motion vectors of each dimension in the current group are consistent with the encoding mode of the motion vectors of the entire current group, the encoder only needs to encode the first syntax element into the bitstream.

[0151] The above cases will be further illustrated by embodiments as follows.

[0152] 1. The bitstream can include the first syntax element and the second syntax elements.

[0153] In a possible implementation, the encoder first determines the encoding modes of the motion vectors of different dimensions in the current group, and then determines the encoding mode of the motion vectors of the entire current group in the current grid based on the encoding modes of the motion vectors of different dimensions in the current group.

[0154] Optionally, the encoder calculates the rate-distortion cost of the motion vector of the current group under different dimensions and different candidate motion vector prediction modes, calculates the syntax element coding cost of the motion vector of the current group under different dimensions and different candidate motion vector prediction modes, and calculates the rate-distortion cost of the current group under different dimension skip coding, so as to determine whether to skip coding of each dimension based on the calculation results.

[0155] In some embodiments, as shown in FIG. 6, determining the motion vector coding mode of different dimensions in the current group can include the following steps:

[0156] Step 601: determining a first total cost of the current dimension in the current group under different motion vector prediction modes, the first total cost including a first rate-distortion cost of the current dimension in the current group under different motion vector prediction modes and a coding cost of using different motion vector prediction modes.

[0157] In a possible implementation, bits[m][n] represents the first total cost of dimension n under motion vector prediction mode m. Wherein, bits[m][n] is the sum of the rate-distortion cost of the motion vector of the current group under dimension n using motion vector prediction mode m and the coding cost of the syntax element using motion vector prediction mode m. The rate-distortion cost is used to balance the code stream and the distortion, and the coding cost is used to represent the influence of coding syntax element on the bit rate.

[0158] Illustratively, when there are M motion vector prediction modes, for dimension x, the encoder calculates bits[0][0] to bits[M-1][0] respectively, for dimension y, the encoder calculates bits[0][1] to bits[M-1][1] respectively, and for dimension z, the encoder calculates bits[0][2] to bits[M-1][2] respectively.

[0159] Step 602: determining a second rate-distortion cost of the current dimension in the current group when skip coding.

[0160] In a possible implementation, skipcost[n] represents the rate-distortion cost of dimension n of the current group when skip coding.

[0161] Illustratively, for dimension x, the encoder calculates the rate-distortion cost skipcost[0] of dimension x when skip coding; for dimension y, the encoder calculates the rate-distortion cost skipcost[1] of dimension y when skip coding; and for dimension z, the encoder calculates the rate-distortion cost skipcost[2] of dimension z when skip coding.

[0162] Further, the encoder determines whether the current dimension is coded by skip mode by comparing the first total cost and the second rate-distortion cost.

[0163] In some embodiments, since different motion vector prediction modes correspond to respective first total costs, the encoder determines the minimum value of the first total costs, and then compares the second rate-distortion cost with the minimum value of the first total costs.

[0164] At step 603, if the second rate-distortion cost is less than or equal to the minimum value of the first total costs, the encoder determines that the motion vector of the current dimension in the current group is coded by skip mode.

[0165] In one possible implementation, when there are M motion vector prediction modes, for dimension n, if skipcost[n] is less than or equal to the minimum value of bits[0][n], bits[1][n], …, bits[M-1][n], the encoder determines that the current dimension is coded by skip mode.

[0166] At step 604, if the second rate-distortion cost is greater than the minimum value of the first total costs, the encoder determines that the motion vector of the current dimension in the current group is not coded by skip mode.

[0167] In one possible implementation, when there are M motion vector prediction modes, for dimension n, if skipcost[n] is greater than the minimum value of bits[0][n], bits[1][n], …, bits[M-1][n], the encoder determines that the current dimension is not coded by skip mode.

[0168] After determining the motion vector coding mode of each dimension in the current group, the encoder determines the motion vector coding mode of the entire current group based on the motion vector coding modes of different dimensions. When the motion vector coding mode of each dimension in the current group is skip mode, the encoder determines that the motion vector coding mode of the entire current group in the current grid is skip mode.

[0169] When there is at least one dimension in the current group whose motion vector coding mode is not skip mode, the encoder determines that the motion vector coding mode of the entire current group in the current grid is not skip mode.

[0170] In one illustrative example, if the x, y, and z dimensions in the current group are all coded by skip mode, the encoder determines that the motion vector coding mode of the entire current group is skip mode. If the x and y dimensions in the current group are coded by skip mode, and the z dimension is not coded by skip mode, the encoder determines that the motion vector coding mode of the entire current group is not skip mode.

[0171] In another possible implementation, the encoder first determines the encoding mode of the motion vector of the entire current group in the current grid. In the case that the encoding mode of the motion vector of the entire current group in the current grid is non-skip encoding, the encoding mode of the motion vector of different dimensions in the current group is further determined; in the case that the encoding mode of the motion vector of the entire current group in the current grid is skip encoding, the encoding mode of the motion vector of each dimension in the current group is determined as skip encoding.

[0172] Optionally, for the current group, the encoder calculates the rate-distortion cost of the motion vector of the current group in different dimensions and under different candidate motion vector prediction modes, calculates the syntax element encoding cost of the motion vector of the current group in different dimensions and under different candidate motion vector prediction modes, and calculates the rate-distortion cost of skip encoding of the current group in different dimensions, so as to determine whether to skip encoding in each dimension based on the calculation results.

[0173] In some embodiments, as shown in FIG. 7, determining the encoding mode of the motion vector of the entire current group can include the following steps:

[0174] Step 701, determining a second total cost of different dimensions in the current group under the same motion vector prediction mode, the second total cost including the sum of the third rate-distortion cost of different dimensions in the current group under the same motion vector prediction mode and the sum of the encoding cost of different dimensions using the motion vector prediction mode.

[0175] In a possible implementation, bits[m][n] is the sum of the rate-distortion cost of the motion vector of the current group in dimension n using the motion vector prediction mode m and the encoding cost of the syntax element when using the motion vector prediction mode m. By accumulating the sum of the rate-distortion cost and the encoding cost of different dimensions using the same motion vector prediction mode, the second total cost of different dimensions under the same motion vector prediction mode is obtained.

[0176] In an illustrative example, when N dimensions and M motion vector prediction modes are included, the second total cost is represented as bits[0][0]+bits[0][1]+…+bits[0][N-1], bits[1][0]+bits[1][1]+…+bits[1][N-1], …, bits[M-1][0]+bits[M-1][1]+…+bits[M-1][N-1].

[0177] Step 702, determining the fourth rate-distortion cost of each dimension in the current group when skip encoding.

[0178] In a possible implementation, skipcost[n] represents the rate-distortion cost of dimension n of the current group when skip coding is performed. Accordingly, the fourth rate-distortion cost when each dimension of the current group is coded by skip coding is the sum of the rate-distortion costs of different dimensions, represented as skipcost[0]+skipcost[1]+…+skipcost[N-1], where N is the total number of dimensions.

[0179] For example, for dimension x, the encoder calculates the rate-distortion cost skipcost[0] of dimension x when skip coding is performed; for dimension y, the encoder calculates the rate-distortion cost skipcost[1] of dimension y when skip coding is performed; for dimension z, the encoder calculates the rate-distortion cost skipcost[2] of dimension z when skip coding is performed, and finally calculates the fourth rate-distortion cost as skipcost[0]+skipcost[1]+skipcost[2].

[0180] Further, the encoder determines whether the current group is coded by skip coding by comparing the second total cost and the fourth rate-distortion cost.

[0181] In some embodiments, since different dimensions correspond to respective second total costs, the encoder determines the minimum value of the second total costs, and then compares the fourth rate-distortion cost with the minimum value of the second total costs.

[0182] Step 703, in the case that the fourth rate-distortion cost is less than or equal to the minimum value of the second total costs, it is determined that the motion vector coding mode of the entire current group in the current grid is skip coding.

[0183] In a possible implementation, when there are M motion vector prediction modes and N dimensions, if skipcost[0]+skipcost[1]+…+skipcost[N-1] is less than or equal to the minimum value of bits[0][0]+bits[0][1]+…+bits[0][N-1], bits[1][0]+bits[1][1]+…+bits[1][N-1], …, bits[M-1][0]+bits[M-1][1]+…+bits[M-1][N-1], the encoder determines that the current group is coded by skip motion vector coding.

[0184] Step 704, in the case that the fourth rate-distortion cost is greater than the minimum value of the second total costs, it is determined that the motion vector coding mode of the entire current group in the current grid is not skip coding.

[0185] In a possible implementation, when there are M motion vector prediction modes and N dimensions, if skipcost[0]+skipcost[1]+…+skipcost[N-1] is greater than the minimum value of bits[0][0]+bits[0][1]+…+bits[0][N-1], bits[1][0]+bits[1][1]+…+bits[1][N-1], …, bits[M-1][0]+bits[M-1][1]+…+bits[M-1][N-1], the encoder determines that the entire current group is not skip motion vector coding.

[0186] Further, in the case where it is determined that the motion vector coding mode of the entire current group is not skip coding, the encoder calculates whether the motion vector of each dimension in the current group is skip coding respectively. The process of determining the motion vector coding mode of each dimension can refer to steps 601 to 604 described above, and will not be repeated here.

[0187] After determining the motion vector coding mode of the entire group and each dimension by using any of the above two methods, the syntax element corresponding to the motion vector coding mode can be encoded into the bitstream in the following ways:

[0188] Method 1: a first syntax element representing the motion vector coding mode of the entire current group in the current grid, and a second syntax element representing the motion vector coding mode of different dimensions in the current group are encoded into the bitstream.

[0189] In a possible implementation, the encoder encodes the first syntax element and the second syntax element corresponding to part of the dimensions into the bitstream.

[0190] In some embodiments, in the case where the motion vector coding mode of the entire current group in the current grid is not skip coding, and the motion vector coding mode of other dimensions except the last dimension in the current group is skip coding, the first syntax element representing the motion vector coding mode of the entire current group in the current grid, and the second syntax element corresponding to other dimensions except the last dimension in the current group are encoded into the bitstream.

[0191] Optionally, the last dimension in the current group refers to the last dimension encoded into the bitstream. For example, when the current group includes three dimensions x, y and z, the last dimension is dimension z.

[0192] When the current group is not skip coded, the motion vector coding mode of at least one dimension in the current group is not skip coded. Therefore, when the motion vector coding mode of other dimensions than the last dimension in the current group is not all skip coded (i.e. the motion vector coding mode of at least one other dimension is not skip coded), the motion vector coding mode of the last dimension cannot be inferred. In order to ensure the decoding accuracy, the encoder needs to encode the first syntax element corresponding to the current group and the second syntax elements corresponding to each dimension into the bitstream.

[0193] In another possible implementation, the encoder encodes the first syntax element and the second syntax elements corresponding to all dimensions in the current group into the bitstream.

[0194] In some embodiments, when the motion vector coding mode of the entire current group in the current grid is not skip coded, and the motion vector coding mode of other dimensions than the last dimension in the current group is not all skip coded, the first syntax element representing the motion vector coding mode of the entire current group in the current grid and the second syntax elements corresponding to each dimension in the current group are encoded into the bitstream.

[0195] When the current group is not skip coded, the motion vector coding mode of at least one dimension in the current group is not skip coded. Therefore, when the motion vector coding mode of other dimensions than the last dimension in the current group is not all skip coded (i.e. the motion vector coding mode of at least one other dimension is not skip coded), the motion vector coding mode of the last dimension cannot be inferred. In order to ensure the decoding accuracy, the encoder needs to encode the first syntax element corresponding to the current group and the second syntax elements corresponding to each dimension into the bitstream.

[0196] In a possible implementation, when the motion vector coding mode of the entire current group in the current grid is skip coded, the first syntax element representing the motion vector coding mode of the entire current group in the current grid is encoded into the bitstream, and the second syntax elements corresponding to each dimension in the current group can not be encoded into the bitstream.

[0197] When the current group is skip coded, the motion vector coding mode of each dimension in the current group is skip coded. Therefore, in order to save the code bits, in a possible implementation, when the motion vector coding mode of the entire current group in the current grid is skip coded, the first syntax element representing the motion vector coding mode of the entire current group in the current grid is encoded into the bitstream, and the second syntax elements corresponding to each dimension in the current group can not be encoded into the bitstream.

[0198] In an illustrative embodiment, the syntax element B is used to represent the motion vector coding mode of the current group, the syntax elements CDE are used to represent the motion vector coding mode of the xyz dimensions in the current group respectively, and the value of 1 of the syntax element represents skip coding, and the value of 0 of the syntax element represents non-skip coding.

[0199] The encoder encoding the syntax elements representing the motion vector coding mode into the bitstream can include the following cases:

[0200] 1. The motion vectors of the whole current group are not skip coded, the value of the syntax element B is 0; the motion vectors of the current group are not skip coded in x dimension, are not skip coded in y dimension, and are not skip coded in z dimension, the values of the syntax elements CDE are 0, 0, 0 respectively.

[0201] The encoder encodes the syntax elements BCDE into the bitstream.

[0202] 2. The motion vectors of the whole current group are not skip coded, the value of the syntax element B is 0; the motion vectors of the current group are not skip coded in x dimension, are not skip coded in y dimension, and are skip coded in z dimension, the values of the syntax elements CDE are 0, 0, 1 respectively.

[0203] The encoder encodes the syntax elements BCDE into the bitstream.

[0204] 3. The motion vectors of the whole current group are not skip coded, the value of the syntax element B is 0; the motion vectors of the current group are not skip coded in x dimension, are skip coded in y dimension, and are not skip coded in z dimension, the values of the syntax elements CDE are 0, 1, 0 respectively.

[0205] The encoder encodes the syntax elements BCDE into the bitstream.

[0206] 4. The motion vectors of the whole current group are not skip coded, the value of the syntax element B is 0; the motion vectors of the current group are not skip coded in x dimension, are skip coded in y dimension, and are skip coded in z dimension, the values of the syntax elements CDE are 0, 1, 1 respectively.

[0207] The encoder encodes the syntax elements BCDE into the bitstream.

[0208] 5. The motion vectors of the whole current group are not skip coded, the value of the syntax element B is 0; the motion vectors of the current group are skip coded in x dimension, are not skip coded in y dimension, and are not skip coded in z dimension, the values of the syntax elements CDE are 1, 0, 0 respectively.

[0209] The encoder encodes the syntax elements BCDE into the bitstream.

[0210] 6. The motion vectors of the whole current group are not skip coded, the value of the syntax element B is 0; the motion vectors of the current group are skip coded in x dimension, are not skip coded in y dimension, and are skip coded in z dimension, the values of the syntax elements CDE are 1, 0, 1 respectively.

[0211] The encoder encodes the syntax elements BCDE into the bitstream.

[0212] 7. The motion vector of the whole current group is not skip coded, the value of the syntax element B is 0; the motion vector of the current group is skip coded in x dimension, skip coded in y dimension and not skip coded in z dimension, the values of the syntax elements C, D and E are 1, 1 and 0 respectively.

[0213] The encoder encodes the syntax elements B, C, D and E into the bitstream; or the encoder encodes the syntax elements B, C and D into the bitstream, and the syntax element E is not written into the bitstream.

[0214] 8. The motion vector of the whole current group is skip coded, the value of the syntax element B is 1; the motion vector of the current group is skip coded in x dimension, skip coded in y dimension and skip coded in z dimension, the values of the syntax elements C, D and E are 1, 1 and 1 respectively.

[0215] The encoder encodes the syntax elements B, C, D and E into the bitstream; or the encoder encodes the syntax element B into the bitstream, and the syntax elements C, D and E are not written into the bitstream.

[0216] 2. The bitstream only contains the second syntax element.

[0217] In a possible implementation, the encoder only needs to encode the second syntax element representing the encoding mode of the motion vector in different dimensions in the current group into the bitstream, and does not need to encode the first syntax element representing the encoding mode of the motion vector of the whole current group into the bitstream.

[0218] Optionally, for the current group, the encoder calculates the rate-distortion cost of the motion vector of the current group in different dimensions and different candidate motion vector prediction modes, calculates the syntax element encoding cost of the motion vector of the current group in different dimensions and different candidate motion vector prediction modes, and calculates the rate-distortion cost of skip coding in different dimensions of the current group, so as to determine whether to skip coding in each dimension based on the calculation results.

[0219] In some embodiments, the encoder determines a first total cost of the current dimension in the current group in different motion vector prediction modes, and determines a second rate-distortion cost of the current dimension in the current group when skip coding. The first total cost includes a first rate-distortion cost of the current dimension in the current group in different motion vector prediction modes, and an encoding cost of using different motion vector prediction modes.

[0220] In the case that the second rate-distortion cost is less than or equal to the minimum value of the first total cost, the encoder determines that the motion vector encoding mode of the current dimension in the current group is skip coding.

[0221] In the case that the second rate-distortion cost is greater than the minimum value of the first total cost, the encoder determines that the motion vector encoding mode of the current dimension in the current group is not skip coding.

[0222] It should be noted that the detailed process of determining the motion vector coding mode of each dimension by the encoder can refer to steps 601 to 604, and will not be described here in this embodiment.

[0223] In a possible implementation, after determining the motion vector coding mode of each dimension of the current group in the above manner, the encoder encodes a second syntax element representing the motion vector coding mode of different dimensions in the current group into the bitstream.

[0224] In an illustrative embodiment, the syntax elements CDE are respectively used to represent the motion vector coding mode of the xyz dimensions in the current group, and when the value of the syntax element is 1, it represents skip coding, and when the value of the syntax element is 0, it represents non-skip coding.

[0225] The encoding of the syntax element representing the motion vector coding mode into the bitstream by the encoder can include the following cases:

[0226] 1. The motion vector of the current group is not skip coded in the x dimension, not skip coded in the y dimension, and not skip coded in the z dimension, and the values of the syntax elements CDE are respectively 0, 0, and 0.

[0227] The encoder encodes the syntax elements CDE into the bitstream.

[0228] 2. The motion vector of the current group is not skip coded in the x dimension, not skip coded in the y dimension, and skip coded in the z dimension, and the values of the syntax elements CDE are respectively 0, 0, and 1.

[0229] The encoder encodes the syntax elements CDE into the bitstream.

[0230] 3. The motion vector of the current group is not skip coded in the x dimension, skip coded in the y dimension, and not skip coded in the z dimension, and the values of the syntax elements CDE are respectively 0, 1, and 0.

[0231] The encoder encodes the syntax elements CDE into the bitstream.

[0232] 4. The motion vector of the current group is not skip coded in the x dimension, skip coded in the y dimension, and skip coded in the z dimension, and the values of the syntax elements CDE are respectively 0, 1, and 1.

[0233] The encoder encodes the syntax elements CDE into the bitstream.

[0234] 5. The motion vector of the current group is skip coded in the x dimension, not skip coded in the y dimension, and not skip coded in the z dimension, and the values of the syntax elements CDE are respectively 1, 0, and 0.

[0235] The encoder encodes the syntax elements CDE into the bitstream.

[0236] 6. The motion vector of the current group is skip coded in the x dimension, not skip coded in the y dimension, and skip coded in the z dimension, and the syntax element CDE has values of 1, 0, and 1, respectively.

[0237] The encoder encodes the syntax element CDE into the bitstream.

[0238] 7. The motion vector of the current group is skip coded in the x dimension, skip coded in the y dimension, and not skip coded in the z dimension, and the syntax element CDE has values of 1, 1, and 0, respectively.

[0239] The encoder encodes the syntax element CDE into the bitstream.

[0240] 8. The motion vector of the current group is skip coded in the x dimension, skip coded in the y dimension, and skip coded in the z dimension, and the syntax element CDE has values of 1, 1, and 1, respectively.

[0241] The encoder encodes the syntax element CDE into the bitstream.

[0242] 3. The bitstream only contains the first syntax element.

[0243] In a possible implementation, the same motion vector coding mode is used in each dimension of the current group (i.e., all dimensions uniformly skip motion vector coding, or uniformly not skip motion vector coding), and the same motion vector prediction mode is used in each dimension. Therefore, the first syntax element representing the motion vector coding mode of the entire current group can represent the motion vector coding mode of each dimension in the current group, and accordingly, the encoder only needs to encode the first syntax element into the bitstream.

[0244] Optionally, for the current group, the encoder calculates the rate-distortion cost of the entire motion vector of the current group under different candidate motion vector prediction modes (the same motion vector prediction mode is used in each dimension of the current group), calculates the syntax element coding cost of the entire motion vector of the current group under different candidate motion vector prediction modes (the same motion vector prediction mode is used in each dimension of the current group), and calculates the rate-distortion cost of skip coding of the entire current group (all dimensions), so as to determine whether the entire current group is skip coded based on the calculation results.

[0245] In some embodiments, as shown in FIG. 8, determining the motion vector coding mode of the entire current group can include the following steps:

[0246] Step 801: determining a third total cost of the entire current group under the same motion vector prediction mode, the third total cost including the sum of third rate-distortion costs of different dimensions in the current group under the same motion vector prediction mode, and the coding cost of the entire current group using the motion vector prediction mode.

[0247] In a possible implementation, bits[m] represents a third total cost of the current group of integers in the motion vector prediction mode m. Wherein, bits[m] is the sum of the rate-distortion cost of the current group of integers using the motion vector prediction mode m (each dimension of the motion vector uses the motion vector prediction mode m) and the encoding cost of the syntax elements when the current group of integers uses the motion vector prediction mode m.

[0248] In an illustrative example, when there are M motion vector prediction modes, the third total cost includes bits[0], bits[1], …, bits[M-1].

[0249] Step 802, determine a fifth rate-distortion cost when the entire current group is skip coded.

[0250] In a possible implementation, skipcost represents the rate-distortion cost when the entire current group is skip coded (i.e., all dimensions are skip coded).

[0251] Further, the encoder determines whether the entire current group is skip coded by comparing the third total cost and the fifth rate-distortion cost.

[0252] In some embodiments, since different motion vector prediction modes correspond to respective third total costs, the encoder determines the minimum value of the third total costs, and then compares the fifth rate-distortion cost with the minimum value of the third total costs.

[0253] Step 803, when the fifth rate-distortion cost is less than or equal to the minimum value of the third total costs, determine that the motion vector coding mode of the entire current group in the current grid is skip coding.

[0254] In a possible implementation, when there are M motion vector prediction modes, if skipcost is less than or equal to the minimum value of bits[0], bits[1], …, bits[M-1], the encoder determines that the entire current group is skip coded.

[0255] Step 804, when the fifth rate-distortion cost is greater than the minimum value of the third total costs, determine that the motion vector coding mode of the entire current group in the current grid is not skip coding.

[0256] In a possible implementation, when there are M motion vector prediction modes, if skipcost is greater than the minimum value of bits[0], bits[1], …, bits[M-1], the encoder determines that the entire current group is not skip coded, i.e., all dimensions in the current group are not skip coded.

[0257] After the motion vector coding mode of the whole group is determined in the above manner, the encoder encodes a first syntax element representing the motion vector coding mode of the whole current group in the current grid into the bitstream.

[0258] In an illustrative embodiment, the syntax element B is used to represent the motion vector coding mode of the whole current group, and when the syntax element B has a value of 1, it represents skip coding, and when the syntax element B has a value of 0, it represents non-skip coding.

[0259] The encoding of the syntax element representing the motion vector coding mode by the encoder into the bitstream can include the following cases:

[0260] 1. The motion vectors of the whole current group are not skip coded, and the syntax element B has a value of 0.

[0261] The encoder encodes the syntax element B into the bitstream.

[0262] 2. The motion vectors of the whole current group are skip coded, and the syntax element B has a value of 1.

[0263] The encoder encodes the syntax element B into the bitstream.

[0264] In addition to the need to encode the syntax element representing whether to skip coding and the prediction mode syntax element into the bitstream, the encoder also needs to encode the motion vector difference between the current group and the reference group in the prediction mode into the bitstream, so that the decoder can reconstruct the grid based on the motion vector difference.

[0265] In a possible implementation, the process of encoding the motion vector difference is shown in FIG. 9.

[0266] Step 901, in the case where the motion vector coding mode of the current group in the current grid is non-skip coding, the motion vector prediction value of the current group is determined based on the motion vector prediction mode adopted by the current group.

[0267] In a possible implementation, when the motion vector coding mode of the current group is non-skip coding, the encoder can attempt to use various candidate motion vector prediction modes for motion vector prediction, and based on the motion vector prediction results, select the motion vector prediction mode adopted by the current group, and determine the motion vector prediction value of the current group when the motion vector prediction mode is adopted.

[0268] Optionally, the motion vector prediction value can be the motion vector prediction value in a specific dimension of the current group (each dimension in the current group adopts a respective motion vector prediction mode), or the motion vector prediction value can be the motion vector prediction value in all dimensions of the current group (all dimensions in the current group adopt a unified motion vector prediction mode).

[0269] In some embodiments, the motion vector prediction mode adopted by the current group can include at least one of the following: no prediction, at least one intra prediction mode (such as unbiased intra prediction and biased intra prediction), and at least one inter prediction mode (such as inter prediction based on a same-site and inter prediction based on multiple sites). Embodiments of the present application do not limit the specific type of motion vector prediction mode.

[0270] At step 902, a motion vector difference value is determined based on the motion vector original value and the motion vector prediction value of the current group.

[0271] The motion vector difference value is the motion vector encoding value. Motion vector difference value = motion vector original value - motion vector prediction value.

[0272] It should be noted that when the motion vector prediction mode adopted is no prediction, the motion vector prediction value can be set to 0, and accordingly, the motion vector difference value is the motion vector original value.

[0273] In some embodiments, the encoder determines the motion vector original value of each vertex in the current group based on the difference in geometric coordinates between the vertex in the current group and the same-site vertex in the reference group.

[0274] At step 903, the motion vector difference value is encoded into the bitstream.

[0275] Further, the encoder encodes the motion vector difference value corresponding to the vertex in the current group into the bitstream.

[0276] In one possible implementation, the encoder encodes the prediction mode syntax element representing the motion vector prediction mode adopted by each dimension in the current group, and the motion vector difference value of the vertex in each dimension into the bitstream.

[0277] In one illustrative example, the candidate motion vector prediction mode of the current group includes an inter prediction mode, and the prediction mode syntax element corresponding to each of the x, y, and z dimensions in the current group is syntax element FGH, the value of the syntax element FGH, and the motion vector difference value can include the following cases:

[0278] 1. The value of F (or H) is 0 (binary symbol string is 0, or 00), indicating that the motion vector of the current group is not predicted in the x (y or z) dimension, and the motion vector difference value of the motion vector of the current group in the x (y or z) dimension is the motion vector original value. Wherein, "the value of F is 0 (binary symbol string is 0, or 00)" means that the syntax element F can be binarized to 0 or 00, and the following examples will not be described in detail.

[0279] 2, the value of F(G or H) is 1 (binary symbol string is expressed as 10, or 01), indicating that the motion vector of the current group adopts unbiased intra prediction in x (y or z) dimension, and the motion vector difference r x (r y ,r z )=m x (m y ,m z )-P x (P y ,P z ), wherein P x (P y ,P z ) is the unbiased intra prediction value, and m x (m y ,m z ) is the original value of the motion vector. The unbiased intra prediction value predCount is the number of intra prediction points of the current vertex, when predCount is 0, the unbiased intra prediction value is 0, is the reconstructed value of the motion vector of the i-th intra prediction point of the current vertex.

[0280] 3, the value of F(G or H) is 2 (binary symbol string is expressed as 110, or 10), indicating that the motion vector of the current group adopts biased intra prediction in x (y or z) dimension, and the motion vector difference r x (r y ,r z )=m x (m y ,m z )-P x (P y ,P z ), wherein P x (P y ,P z ) is the biased intra prediction value, and m x (m y ,m z ) is the original value of the motion vector. The biased intra prediction value predCount is the number of intra prediction points of the current vertex, when predCount is 0, the unbiased intra prediction value is 0, is the reconstructed value of the motion vector of the i-th intra prediction point of the current vertex, bias=predCount>>1.

[0281] 4. F(G or H) is equal to 3 (binary string is 111 or 11), indicating that the motion vector of the current group uses inter prediction in x (y or z) dimension, and the motion vector difference r x (r y ,r z ) = m x (m y ,m z ) - P x (P y ,P z ), wherein P x (P y ,P z ) is the inter prediction value, and m x (m y ,m z ) is the original motion vector value. The inter prediction value is the reconstructed motion vector value of the same point of the current vertex in the reference mesh.

[0282] In another illustrative example, the candidate motion vector prediction mode of the current group does not include the inter prediction mode, and the prediction mode syntax elements corresponding to the x, y and z dimensions of the current group are respectively syntax elements FGH, the value of the syntax element FGH, and the motion vector difference can include the following cases:

[0283] 1. F(G or H) is equal to 0 (binary string is 0), indicating that the motion vector of the current group is not predicted in x (y or z) dimension, and the motion vector difference of the motion vector of the current group in x (y or z) dimension is the original motion vector value.

[0284] 2. F(G or H) is equal to 2 (binary string is 10), indicating that the motion vector of the current group uses non-offset intra prediction in x (y or z) dimension, and the motion vector difference r x (r y ,r z ) = m x (m y ,m z ) - P x (P y ,P z ), wherein P x (P y ,P z ) is the non-offset intra prediction value, and m x (m y ,m z ) is the original motion vector value. The non-offset intra prediction value predCount is the number of intra-prediction points of the current vertex, when predCount is 0, the non-biased intra-prediction value is 0, is the motion vector reconstructed value of the i-th intra-prediction point of the current vertex, bias = predCount » 1.

[0285] 3, the value of F (G or H) is 3 (binary symbol string is 11), indicating that the motion vector of the current group adopts biased intra-prediction in x (y or z) dimension, the motion vector difference r x (r y ,r z ) = m x (m y ,m z ) - P x (P y ,P z ), wherein P x (P y ,P z ) is the biased intra-prediction value, m x (m y ,m z ) is the original motion vector value. The biased intra-prediction value predCount is the number of intra-prediction points of the current vertex, when predCount is 0, the non-biased intra-prediction value is 0, is the motion vector reconstructed value of the i-th intra-prediction point of the current vertex, bias = predCount » 1.

[0286] In another possible implementation, the encoder encodes into the bitstream the prediction mode syntax element representing the motion vector prediction mode adopted by the current group as a whole (the motion vector prediction mode is adopted by all dimensions of the current group), and the motion vector difference values of the vertices in each dimension.

[0287] In an illustrative example, the candidate motion vector prediction modes of the current group include the inter-prediction mode, and the prediction mode syntax element corresponding to the current group is syntax element F, the value of the syntax element F is 1, and the motion vector difference values can include the following cases:

[0288] 1, the value of F is 0 (binary symbol string is 0, or 00), indicating that the motion vector of the current group as a whole is not predicted, and the motion vector difference value of the current group as a whole is the original motion vector value.

[0289] 2, the value of F is 1 (binary symbol string is 10, or 01), indicating that the motion vector of the current group as a whole adopts non-biased intra-prediction, and the motion vector difference value rx (r y ,r z ) = m x (m y ,m z )-P x (P y ,P z ), where P x (P y ,P z ) represents the offset-free intra-frame prediction value, m x (m y ,m z () represents the original value of the motion vector. Intra-frame prediction value without offset. predCount is the number of intra-predicted points for the current vertex. When predCount is 0, the intra-predicted value without offset is 0. This is the reconstructed motion vector value of the i-th intra-frame predicted point of the current vertex.

[0290] 3. The value of F is 2 (represented by the binary symbol string 110 or 10), indicating that the motion vectors of the entire current group are predicted using offset intra-frame prediction, and the motion vector difference r between each vertex in the current group is... x (r y ,r z ) = m x (m y ,m z )-P x (P y ,P z ), where P x (P y ,P z ) represents the offset intra-frame prediction value, m x (m y ,m z The original values ​​of the motion vectors are shown. Intra-frame predicted values ​​with offsets are also included. predCount is the number of intra-predicted points for the current vertex. When predCount is 0, the intra-predicted value without offset is 0. The reconstructed motion vector value of the i-th intra-frame predicted point of the current vertex, bias = predCount >> 1.

[0291] 4. The value of F is 3 (represented as 111 or 11 in binary notation), indicating that the motion vectors of the entire current group are predicted using inter-frame prediction, and the motion vector difference r between each vertex in the current group is... x (r y ,r z ) = m x (my ,m z )-P x (P y ,P z ), where P x (P y ,P z ) represents the inter-frame prediction value, m x (m y ,m z () represents the original value of the motion vector. Inter-frame predicted value. This is the reconstructed motion vector value of the current vertex at the same point in the reference mesh.

[0292] In another illustrative example, the candidate motion vector prediction modes for the current group do not include inter-frame prediction modes, and the syntax element for the prediction modes corresponding to the entire current group is syntax element F. The values ​​of syntax element F and the motion vector differences can include the following:

[0293] 1. The value of F is 0 (represented by a binary symbol string), which means that the motion vector of the entire current group is not predicted, and the difference between the motion vectors of the entire current group is the original value of the motion vector.

[0294] 2. The value of F is 2 (represented as 10 in a binary symbol string), indicating that the motion vectors of the entire current group are predicted using offset-free intra-frame prediction, and the motion vector difference r between each vertex in the current group is... x (r y ,r z ) = m x (m y ,m z )-P x (P y ,P z ), where P x (P y ,P z ) represents the offset-free intra-frame prediction value, m x (m y ,m z () represents the original value of the motion vector. Intra-frame prediction value without offset. predCount is the number of intra-predicted points for the current vertex. When predCount is 0, the intra-predicted value without offset is 0. This is the reconstructed motion vector value of the i-th intra-frame predicted point of the current vertex.

[0295] 3. The value of F is 3 (represented as 11 in a binary symbol string), indicating that the motion vectors of the entire current group are predicted using offset intra-frame prediction, and the motion vector difference r between each vertex in the current group is... x (r y ,rz ) = m x (m y , m z ) = P x (P y , P z ), wherein P x (P y , P z ) is the biased intra prediction value, m x (m y , m z ) is the original value of the motion vector. The biased intra prediction value predCount is the number of intra prediction points of the current vertex, when predCount is 0, the unbiased intra prediction value is 0, is the reconstructed value of the i-th intra prediction point of the current vertex, bias = predCount » 1.

[0296] The grid decoding process at the decoder side is described as follows.

[0297] Referring to FIG. 10, a flowchart of a grid decoding method according to an example embodiment of the present disclosure is shown. The method is applied to a decoder, and the method can include the following steps:

[0298] In step 1001, in the inter-frame decoding mode, based on the motion vector decoding mode of the current group in the current grid and the motion vector decoding mode of the reference group in the reference grid, a prediction mode syntax element is used to determine the motion vector prediction mode adopted by the current group.

[0299] In some embodiments, the current grid is the base grid in the VDMC.

[0300] In the case that the decoding mode of the current grid of the current frame is the inter-frame decoding mode, the decoder adopts the scheme provided in the embodiments of the present disclosure to decode the grid.

[0301] In some embodiments, the syntax element A is used to indicate the coding mode of the base grid in each frame. For example, the value 0 of the syntax element A indicates that the inter-frame coding mode is adopted, the value 1 of the syntax element A indicates that the intra-frame coding mode is adopted, the value 2 of the syntax element A indicates that the skip coding mode is adopted, and the value 3 of the syntax element A is a reserved bit. Correspondingly, the decoder determines whether the inter-frame decoding mode is adopted for the current grid based on the value of the syntax element A decoded from the bitstream.

[0302] The vertices in the base grid have respective vertex indexes. For example, when the total number of vertices in the base grid is N, the vertex indexes of the vertices are from 0 to N-1. In the decoding process, the decoding is usually performed in the order of the vertex indexes from small to large.

[0303] In some embodiments, the vertices in the base mesh are decoded in units of groups. For example, when the total number of vertices in the base mesh is 40 and the group size is 16, the vertex indices of the vertices in the first group range from 0 to 15, the vertex indices of the vertices in the second group range from 16 to 31, and the vertex indices of the vertices in the third group range from 32 to 39. In the inter-decoding mode, the decoder decodes each vertex in a group in the present embodiment.

[0304] In some embodiments, the motion vector decoding manner includes skip decoding and non-skip decoding. In the case of skip decoding, the decoder directly determines the motion vector reconstruction value of each vertex in the group as (0, 0, 0).

[0305] In the case of non-skip decoding, the decoder continues to determine whether the motion vector of the current group is skipped in each dimension. The dimensions include the three coordinate dimensions of x, y, and z.

[0306] Further, if the motion vector of the current group is skipped in a certain dimension, the decoder will not decode the motion vector of the vertex in the dimension, but will determine the motion vector reconstruction value of each vertex in the group in the dimension as 0.

[0307] In a possible implementation, a prediction mode syntax element is used to represent the motion vector prediction mode adopted in each dimension in the current group. Accordingly, the decoder determines the motion vector prediction mode adopted in each dimension in the current group based on the prediction mode syntax element in the code stream.

[0308] If the motion vector of the current group is not skipped in a certain dimension, the decoder parses the prediction mode syntax element in the code stream, and determines the motion vector prediction mode adopted in the dimension based on the value of the prediction mode syntax element. The motion vector prediction mode belongs to a plurality of candidate motion vector prediction modes.

[0309] For example, the decoder determines, by parsing the code stream, that the prediction mode syntax elements corresponding to the dimensions x and y in the current group represent that the unbiased intra prediction is adopted for the dimensions x and y of the vertex, and the prediction mode syntax element corresponding to the dimension z represents that the inter prediction is adopted for the dimension z of the vertex.

[0310] ​​​​In another possible implementation, in addition to representing the motion vector prediction mode corresponding to each dimension in the current group, the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the entire current group when the motion vector prediction mode is uniform in different dimensions in the current group. Accordingly, the decoder determines the motion vector prediction mode adopted by the entire current group based on the prediction mode syntax element in the code stream, and the motion vector prediction mode corresponding to each dimension in the current group is consistent with the motion vector prediction mode corresponding to the entire group.

[0311] That is, the prediction mode syntax element in the code stream can be used to indicate the motion vector prediction mode adopted by each dimension in the current group, or can be used to indicate the uniform motion vector prediction mode adopted by each dimension in the current group. Different values of the prediction mode syntax element correspond to different motion vector prediction modes.

[0312] In the case where the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the entire current group, the motion vector prediction mode adopted by different dimensions in the current group is the same.

[0313] For example, the decoder determines that the motion vector prediction mode adopted by each dimension in the current group is the unbiased intra prediction mode, in the case where the prediction mode syntax element represents the motion vector prediction mode adopted by the entire current group as the unbiased intra prediction mode by parsing the code stream.

[0314] In the embodiments of the present application, when determining the motion vector prediction mode adopted by the current group, the decoder needs to additionally obtain the motion vector decoding manner of the reference group in the reference grid. The reference grid has the same connection information as the current grid, and the vertex indexes of the vertices included in the reference group are consistent with those of the current group. The current grid is the base grid of the current frame, and the reference grid is the base grid of the corresponding reference frame of the current frame.

[0315] In some embodiments, the motion vector decoding manner of the reference group includes the motion vector decoding manner of the entire reference group, and / or includes the motion vector decoding manner of different dimensions in the reference group.

[0316] In some embodiments, the encoder can determine part of the invalid motion vector prediction modes based on the motion vector encoding manner of the reference group in the reference grid, and after filtering out part of the invalid motion vector prediction modes, the motion vector prediction mode setting is refined (for example, from 4 candidate motion vector prediction modes to 3). When subsequently encoding the motion vector prediction mode of the current group, the encoder can use a more refined binary symbol string to encode the prediction mode syntax element, thereby saving code words.

[0317] In order to ensure that the decoder can correctly identify the motion vector prediction mode adopted by the current group, the decoder needs to determine whether the encoding end excludes the invalid motion vector prediction mode during encoding based on the motion vector decoding manner of the reference group in the reference grid, and then adopts the corresponding decoding strategy to determine the motion vector prediction mode represented by the prediction mode syntax element in the current code stream.

[0318] In some embodiments, in the case that the motion vector decoding manner of the current group in the current grid is non-skip decoding, and the motion vector decoding manner of the reference group in the reference grid is non-skip decoding, the candidate motion vector prediction mode of the current group includes the inter prediction mode.

[0319] In the case that the motion vector decoding manner of the current group in the current grid is non-skip decoding, and the motion vector decoding manner of the reference group in the reference grid is skip decoding, the candidate motion vector prediction mode of the current group does not include the inter prediction mode.

[0320] Optionally, in the case that the motion vector decoding manner of the entire current group in the current grid is non-skip decoding, and the motion vector decoding manner of the entire reference group in the reference grid is skip decoding, the candidate motion vector prediction mode of the entire current group does not include the inter prediction mode.

[0321] Optionally, in the case that the motion vector decoding manner of the current dimension in the current group is non-skip decoding, and the motion vector decoding manner of the reference dimension in the reference group is skip decoding, the candidate motion vector prediction mode of the current dimension in the current group does not include the inter prediction mode; in the case that the motion vector decoding manner of the current dimension in the current group is non-skip decoding, and the motion vector decoding manner of the reference dimension in the reference group is non-skip decoding, the candidate motion vector prediction mode of the current dimension in the current group includes the inter prediction mode.

[0322] In summary, in the embodiments of the present application, since the selection of the motion vector prediction mode of the current group in the current grid under the inter coding mode is affected by the motion vector encoding manner of the reference group in the reference grid, the motion vector encoding manner of the reference group is considered in the grid encoding process, which can simplify the setting of the motion vector prediction mode of the current group, and thus can save the code word of the motion vector prediction mode encoding, which is helpful to reduce the code stream size. Moreover, after simplifying the motion vector prediction mode of the current group, the number of modes to be calculated during the motion vector prediction in the encoding process is reduced, which is helpful to reduce the time complexity of the motion vector prediction.

[0323] Determining the motion vector prediction mode represented by the prediction mode syntax element

[0324] Mode 1

[0325] When the encoding end encodes the prediction mode syntax element in a variable length coding manner, the decoder determines the motion vector prediction mode adopted by the current group according to the prediction mode syntax element based on the total number of candidate motion vector prediction modes of the current group.

[0326] In contrast to the process of mapping the motion vector prediction mode into a binary symbol string in a variable length binarization manner by the encoding end, the decoder reverses the variable length binarization of the prediction mode syntax element (binary symbol string) in the code stream, so as to determine the motion vector prediction mode adopted by the current group according to the reversed binarization result.

[0327] In an illustrative example, when the motion vector decoding manner of the current group in the current grid is non-skip decoding, and the motion vector decoding manner of the reference group in the reference grid is non-skip decoding, the total number of candidate motion vector prediction modes is 4. When the decoded prediction mode syntax element is 110 (the result of variable length reverse binarization is 3), the decoder determines that the current group adopts biased intra prediction (in the case that the total number of candidate motion vector prediction modes is 4, the encoder adopts 0 to represent no prediction, 10 to represent non-biased intra prediction, 110 to represent biased intra prediction, and 111 to represent inter prediction).

[0328] In an illustrative example, when the motion vector decoding manner of the current group in the current grid is non-skip decoding, and the motion vector decoding manner of the reference group in the reference grid is skip decoding, the total number of candidate motion vector prediction modes is 3. When the decoded prediction mode syntax element is 11 (the result of variable length reverse binarization is 3), the decoder determines that the current group adopts biased intra prediction (in the case that the total number of candidate motion vector prediction modes is 3, the encoder adopts 0 to represent no prediction, 10 to represent non-biased intra prediction, and 11 to represent biased intra prediction).

[0329] Mode 2

[0330] When the encoding end encodes the prediction mode syntax element in a fixed length coding manner, in a possible implementation, the decoder can pre-set the correspondence between the two motion vector prediction modes and the prediction mode syntax element values for the two cases of including and not including inter prediction in the candidate motion vector prediction modes, which is consistent with the correspondence on the encoder side.

[0331] The decoder determines which correspondence to adopt according to the motion vector decoding manners of the current group and the reference group, and then determines the motion vector prediction mode represented by the prediction mode syntax element based on the correspondence.

[0332] In some embodiments, the first correspondence and the second correspondence are provided, wherein the inter prediction mode is included in the first correspondence (and its corresponding prediction mode syntax element value), and the inter prediction mode is not included in the second correspondence.

[0333] In order to save the code word, the length of the binary symbol string representing the prediction mode syntax in the first correspondence is greater than the length of the binary symbol string representing the prediction mode in the second correspondence.

[0334] In the case that the motion vector decoding manner of the current group in the current grid is non-skip decoding, and the motion vector decoding manner of the reference group in the reference grid is non-skip decoding, the decoder determines the motion vector prediction mode adopted by the current group based on the first correspondence and the prediction mode syntax element.

[0335] In the case that the motion vector decoding manner of the current group in the current grid is non-skip decoding, and the motion vector decoding manner of the reference group in the reference grid is skip decoding, the decoder determines the motion vector prediction mode adopted by the current group based on the second correspondence and the prediction mode syntax element.

[0336] In an illustrative example, in the case that the inter prediction mode is included, the total number of the candidate motion vector prediction modes is 4, and the first correspondence is shown in FIG. 3.

[0337] In the case that the inter prediction mode is not included, the total number of the candidate motion vector prediction modes is 3, and the second correspondence is shown in FIG. 4.

[0338] Illustratively, in the case that the inter prediction mode is included, the decoder determines that the motion vector prediction mode of the current group is non-prediction based on the prediction mode syntax element 00 and the first correspondence; in the case that the inter prediction mode is not included, the decoder determines that the motion vector prediction mode of the current group is non-prediction based on the prediction mode syntax element 0 and the second correspondence.

[0339] Process of determining the motion vector decoding manner of the current group

[0340] In some embodiments, before determining the motion vector prediction mode adopted by the current group represented by the prediction mode syntax element, the decoder parses the code stream to obtain a syntax element representing the motion vector decoding manner of the current group, and determines the motion vector decoding manner of the current group based on the syntax element.

[0341] The syntax element representing the motion vector decoding manner of the current group in the code stream can include the following cases:

[0342] Case 1: a first syntax element representing a motion vector decoding manner of the whole current group in the current grid, and a second syntax element representing a motion vector decoding manner of different dimensions in the current group.

[0343] In some embodiments, the bitstream includes the first syntax element and the second syntax element corresponding to each dimension in the current group. In a case where the first syntax element represents that the motion vector decoding manner of the whole current group in the current grid is non-skip decoding, the decoder determines the motion vector decoding manner of each dimension based on the second syntax element corresponding to each dimension.

[0344] In order to save code words, in a case where the second syntax element corresponding to the remaining part of the dimensions can be inferred according to the first syntax element and the second syntax element corresponding to the part of the dimensions, the encoder omits encoding the second syntax element corresponding to the remaining part of the dimensions. Therefore, in some other embodiments, the bitstream includes the first syntax element and the second syntax element corresponding to the part of the dimensions in the current group. At this time, the decoder can infer the value of the second syntax element corresponding to the remaining part of the dimensions based on the value of the first syntax element and the value of the second syntax element, and then determine whether the motion vector decoding of each dimension is skipped.

[0345] For example, when the first syntax element represents that the motion vector of the whole current group in the current grid is non-skip decoding, it indicates that there is at least one dimension in the current group whose motion vector is non-skip decoding. Therefore, when the second syntax element corresponding to the other dimensions except the last dimension in the current group all represent skip decoding, the decoder can determine that the motion vector of the last dimension is non-skip decoding.

[0346] In a possible implementation, in a case where the syntax elements include the first syntax element and the second syntax element corresponding to the other dimensions except the last dimension in the current group, the first syntax element represents that the motion vector decoding manner of the whole current group in the current grid is non-skip decoding, and the second syntax element corresponding to the other dimensions except the last dimension in the current group all represent skip decoding, the decoder determines that the motion vector decoding manner of the last dimension in the current group is non-skip decoding.

[0347] In an illustrative embodiment, the syntax element B is used to represent the motion vector decoding manner of the current group, the syntax elements CDE are used to represent the motion vector decoding manner of the xyz dimensions in the current group respectively, and the value of 1 of the syntax element represents skip decoding, and the value of 0 of the syntax element represents non-skip decoding. The above case 1 can include the following sub-cases:

[0348] 1. Parse syntax element B, which takes the value 0, indicating that the current group is not skipped in the motion vector decoding. Continue to parse syntax element C, which takes the value 0, indicating that the motion vector of the current group is not skipped in the x-dimension decoding. Continue to parse syntax element D, which takes the value 0, indicating that the motion vector of the current group is not skipped in the y-dimension decoding. Continue to parse syntax element E, which takes the value 0, indicating that the motion vector of the current group is not skipped in the z-dimension decoding.

[0349] 2. Parse syntax element B, which takes the value 0, indicating that the current group is not skipped in the motion vector decoding. Continue to parse syntax element C, which takes the value 0, indicating that the motion vector of the current group is not skipped in the x-dimension decoding. Continue to parse syntax element D, which takes the value 0, indicating that the motion vector of the current group is not skipped in the y-dimension decoding. Continue to parse syntax element E, which takes the value 1, indicating that the motion vector of the current group is skipped in the z-dimension decoding.

[0350] 3. Parse syntax element B, which takes the value 0, indicating that the current group is not skipped in the motion vector decoding. Continue to parse syntax element C, which takes the value 0, indicating that the motion vector of the current group is not skipped in the x-dimension decoding. Continue to parse syntax element D, which takes the value 1, indicating that the motion vector of the current group is skipped in the y-dimension decoding. Continue to parse syntax element E, which takes the value 0, indicating that the motion vector of the current group is not skipped in the z-dimension decoding.

[0351] 4. Parse syntax element B, which takes the value 0, indicating that the current group is not skipped in the motion vector decoding. Continue to parse syntax element C, which takes the value 0, indicating that the motion vector of the current group is not skipped in the x-dimension decoding. Continue to parse syntax element D, which takes the value 1, indicating that the motion vector of the current group is skipped in the y-dimension decoding. Continue to parse syntax element E, which takes the value 1, indicating that the motion vector of the current group is skipped in the z-dimension decoding.

[0352] 5. Parse syntax element B, which takes the value 0, indicating that the current group is not skipped in the motion vector decoding. Continue to parse syntax element C, which takes the value 1, indicating that the motion vector of the current group is skipped in the x-dimension decoding. Continue to parse syntax element D, which takes the value 0, indicating that the motion vector of the current group is not skipped in the y-dimension decoding. Continue to parse syntax element E, which takes the value 0, indicating that the motion vector of the current group is not skipped in the z-dimension decoding.

[0353] 6. Parse syntax element B, which takes the value 0, indicating that the current group is not skipped in the motion vector decoding. Continue to parse syntax element C, which takes the value 1, indicating that the motion vector of the current group is skipped in the x-dimension decoding. Continue to parse syntax element D, which takes the value 0, indicating that the motion vector of the current group is not skipped in the y-dimension decoding. Continue to parse syntax element E, which takes the value 1, indicating that the motion vector of the current group is skipped in the z-dimension decoding.

[0354] 7、parse syntax element B, value 0, indicating that the current group is not skipped in the whole group. Continue to parse syntax element C, value 1, indicating that the current group is skipped in the x dimension. Continue to parse syntax element D, value 1, indicating that the current group is skipped in the y dimension. Continue to parse syntax element E, value 0, indicating that the current group is not skipped in the z dimension.

[0355] Alternatively, parse syntax element B, value 0, indicating that the current group is not skipped in the whole group. Continue to parse syntax element C, value 1, indicating that the current group is skipped in the x dimension. Continue to parse syntax element D, value 1, indicating that the current group is skipped in the y dimension. At this time, there is no need to continue to parse syntax element E, and it can be inferred that the current group is not skipped in the z dimension.

[0356] 8、parse syntax element B, value 1, indicating that the current group is not skipped in the whole group. Continue to parse syntax element C, value 1, indicating that the current group is skipped in the x dimension. Continue to parse syntax element D, value 1, indicating that the current group is skipped in the y dimension. Continue to parse syntax element E, value 1, indicating that the current group is skipped in the z dimension.

[0357] Alternatively, parse syntax element B, value 1, indicating that the current group is skipped in the whole group. At this time, there is no need to continue to parse syntax elements CDE, and it can be inferred that the current group is skipped in the xyz dimension.

[0358] Case 2, the second syntax element indicating the decoding mode of the motion vector in different dimensions in the current group.

[0359] On the encoder side, only the second syntax element corresponding to each dimension is encoded into the code stream; correspondingly, the decoder decodes the code stream to obtain only the second syntax element corresponding to each dimension in the current group.

[0360] Optionally, the decoder determines the motion vector decoding mode of each dimension based on the second syntax element corresponding to each dimension.

[0361] In an illustrative embodiment, syntax element B is used to indicate the decoding mode of the motion vector in the current group, syntax elements CDE are used to indicate the decoding mode of the motion vector in the xyz dimension in the current group, and when the value of the syntax element is 1, it indicates that the decoding is skipped, and when the value of the syntax element is 0, it indicates that the decoding is not skipped. The above case 2 can include the following subcases:

[0362] 1. Parse syntax element C, value 0 indicates that the motion vector of the current group does not skip decoding in x dimension. Continue to parse syntax element D, value 0 indicates that the motion vector of the current group does not skip decoding in y dimension. Continue to parse syntax element E, value 0 indicates that the motion vector of the current group does not skip decoding in z dimension.

[0363] 2. Parse syntax element C, value 0 indicates that the motion vector of the current group does not skip decoding in x dimension. Continue to parse syntax element D, value 0 indicates that the motion vector of the current group does not skip decoding in y dimension. Continue to parse syntax element E, value 1 indicates that the motion vector of the current group skips decoding in z dimension.

[0364] 3. Parse syntax element C, value 0 indicates that the motion vector of the current group does not skip decoding in x dimension. Continue to parse syntax element D, value 1 indicates that the motion vector of the current group skips decoding in y dimension. Continue to parse syntax element E, value 0 indicates that the motion vector of the current group does not skip decoding in z dimension.

[0365] 4. Parse syntax element C, value 0 indicates that the motion vector of the current group does not skip decoding in x dimension. Continue to parse syntax element D, value 1 indicates that the motion vector of the current group skips decoding in y dimension. Continue to parse syntax element E, value 1 indicates that the motion vector of the current group skips decoding in z dimension.

[0366] 5. Parse syntax element C, value 1 indicates that the motion vector of the current group skips decoding in x dimension. Continue to parse syntax element D, value 0 indicates that the motion vector of the current group does not skip decoding in y dimension. Continue to parse syntax element E, value 0 indicates that the motion vector of the current group does not skip decoding in z dimension.

[0367] 6. Parse syntax element C, value 1 indicates that the motion vector of the current group skips decoding in x dimension. Continue to parse syntax element D, value 0 indicates that the motion vector of the current group does not skip decoding in y dimension. Continue to parse syntax element E, value 1 indicates that the motion vector of the current group skips decoding in z dimension.

[0368] 7. Parse syntax element C, value 1 indicates that the motion vector of the current group skips decoding in x dimension. Continue to parse syntax element D, value 1 indicates that the motion vector of the current group skips decoding in y dimension. Continue to parse syntax element E, value 0 indicates that the motion vector of the current group does not skip decoding in z dimension.

[0369] 8. parsing syntax element C, which has a value of 1, indicating that the motion vector of the current group skips decoding in the x dimension. Syntax element D is parsed, which has a value of 1, indicating that the motion vector of the current group skips decoding in the y dimension. Syntax element E is parsed, which has a value of 1, indicating that the motion vector of the current group skips decoding in the z dimension.

[0370] Case 3: the first syntax element represents the decoding mode of the motion vector of the entire current group in the current grid.

[0371] In some embodiments, the same motion vector coding mode is used for each dimension in the current group (i.e., all dimensions uniformly skip motion vector coding, or uniformly do not skip motion vector coding), and the same motion vector prediction mode is used for each dimension. The encoder only writes the first syntax element representing the decoding mode of the motion vector of the entire current group into the bitstream, without separately writing the second syntax element corresponding to each dimension. Correspondingly, the decoder parses the bitstream to obtain only the first syntax element.

[0372] Optionally, in the case where the first syntax element represents that the decoding mode of the motion vector of the entire current group in the current grid is skip decoding, the decoder determines that the decoding mode of the motion vector of each dimension in the current group is skip decoding.

[0373] In the case where the first syntax element represents that the decoding mode of the motion vector of the entire current group in the current grid is not skip decoding, the decoder determines that the decoding mode of the motion vector of each dimension in the current group is not skip decoding.

[0374] In an illustrative embodiment, syntax element B is used to represent the decoding mode of the motion vector of the current group, and when the syntax element has a value of 1, it represents skip decoding, and when the syntax element has a value of 0, it represents not skip decoding. Case 3 above can include the following sub-cases:

[0375] 1. Parsing syntax element B, which has a value of 0, indicating that the current group does not skip motion vector decoding. It is further determined that the current group does not skip motion vector decoding in the xyz dimension.

[0376] 2. Parsing syntax element B, which has a value of 1, indicating that the current group skips motion vector decoding. It is further determined that the current group skips motion vector decoding in the xyz dimension.

[0377] In a possible implementation, the process of encoding the motion vector difference is shown in FIG. 11.

[0378] Step 1101: In the case where the decoding mode of the motion vector of the current group in the current grid is not skip decoding, the bitstream is parsed to obtain the motion vector difference.

[0379] The motion vector difference is a motion vector coding value calculated by the encoder and written into the bitstream.

[0380] The motion vector difference includes motion vector differences in each dimension in the current group.

[0381] In step 1102, a motion vector prediction value of the current group is determined based on a motion vector prediction mode adopted by the current group.

[0382] The decoder predicts the motion vector of the vertex in the current group based on the motion vector prediction mode represented by the prediction mode syntax element to obtain the motion vector prediction value.

[0383] Optionally, the motion vector prediction value can be a motion vector prediction value in a specific dimension in the current group (each dimension in the current group adopts a respective motion vector prediction mode), or the motion vector prediction value can be a motion vector prediction value in all dimensions in the current group (all dimensions in the current group adopt a unified motion vector prediction mode).

[0384] In some embodiments, the motion vector prediction mode adopted by the current group can include at least one of the following: no prediction, at least one intra prediction mode (such as unbiased intra prediction and biased intra prediction), and at least one inter prediction mode (such as same-site based inter prediction and multi-site based inter prediction). The embodiments of the present application do not limit the specific type of the motion vector prediction mode.

[0385] It should be noted that when the adopted motion vector prediction mode is no prediction, the motion vector prediction value can be set to 0, and accordingly, the motion vector difference is the original motion vector value.

[0386] In step 1103, a motion vector reconstruction value is determined based on the motion vector difference and the motion vector prediction value.

[0387] The motion vector reconstruction value = the motion vector prediction value + the motion vector difference.

[0388] In a possible implementation, the bitstream includes prediction mode syntax elements representing the motion vector prediction modes adopted by each dimension in the current group, and motion vector differences of the vertex in each dimension.

[0389] In an illustrative example, the candidate motion vector prediction modes of the current group include an inter prediction mode, and the respective prediction mode syntax elements of the xyz dimensions in the current group are syntax elements FGH, the value of the syntax element FGH, and the motion vector reconstruction value can include the following cases:

[0390] 1. F(G or H) is 0 (binary string is 0, or 00), indicating that the motion vector of the current group is not predicted in the x (y or z) dimension, and the motion vector reconstruction value of the motion vector of the current group in the x (y or z) dimension is the motion vector difference.

[0391] 2. F(G or H) is 1 (binary string is 10, or 01), indicating that the motion vector of the current group uses unbiased intra prediction in the x (y or z) dimension, and the motion vector reconstruction value of the motion vector of the current group in the x (y or z) dimension Wherein, P x (P y , P z ) is the unbiased intra prediction value, is the motion vector difference. The unbiased intra prediction value predCount is the number of intra prediction points of the current vertex, and when predCount is 0, the unbiased intra prediction value is 0, is the motion vector reconstruction value of the i-th intra prediction point of the current vertex.

[0392] 3. F(G or H) is 2 (binary string is 110, or 10), indicating that the motion vector of the current group uses biased intra prediction in the x (y or z) dimension, and the motion vector reconstruction value of the motion vector of the current group in the x (y or z) dimension Wherein, P x (P y , P z ) is the biased intra prediction value, is the motion vector difference. The biased intra prediction value predCount is the number of intra prediction points of the current vertex, and when predCount is 0, the unbiased intra prediction value is 0, is the motion vector reconstruction value of the i-th intra prediction point of the current vertex, and bias = predCount >> 1.

[0393] 4. F(G or H) is 3 (binary string is 111, or 11), indicating that the motion vector of the current group uses inter prediction in the x (y or z) dimension, and the motion vector reconstruction value of the motion vector of the current group in the x (y or z) dimension Wherein, P x (P y , P z ) is the inter prediction value, is the motion vector difference. Inter prediction value is the motion vector reconstruction value of the co-located point in the reference mesh for the current vertex.

[0394] In another illustrative example, the candidate motion vector prediction modes of the current group do not include the inter prediction mode, and the prediction mode syntax elements of the current group corresponding to the x, y and z dimensions respectively are syntax elements FG, Fy and Fz, the value of the syntax elements FG, Fy and Fz, and the motion vector reconstruction value can include the following cases:

[0395] 1. The value of F(G or H) is 0 (binary string representation is 0), indicating that the motion vector of the current group is not predicted in the x (y or z) dimension, and the motion vector reconstruction value of the motion vector of the current group in the x (y or z) dimension is the motion vector difference.

[0396] 2. The value of F(G or H) is 2 (binary string representation is 10), indicating that the motion vector of the current group adopts non-offset intra prediction in the x (y or z) dimension, and the motion vector reconstruction value of the motion vector of the current group in the x (y or z) dimension is wherein, P x (P y , P z ) is the non-offset intra prediction value, is the motion vector difference. Non-offset intra prediction value predCount is the number of intra prediction points of the current vertex, when predCount is 0, the non-offset intra prediction value is 0, is the motion vector reconstruction value of the i-th intra prediction point of the current vertex.

[0397] 3. The value of F(G or H) is 3 (binary string representation is 11), indicating that the motion vector of the current group adopts offset intra prediction in the x (y or z) dimension, and the motion vector reconstruction value of the motion vector of the current group in the x (y or z) dimension is wherein, P x (P y , P z ) is the offset intra prediction value, is the motion vector difference. Offset intra prediction value predCount is the number of intra prediction points of the current vertex, when predCount is 0, the non-offset intra prediction value is 0, is the motion vector reconstruction value of the i-th intra prediction point of the current vertex, bias = predCount » 1.

[0398] In another possible implementation, the bitstream includes a prediction mode syntax element representing a motion vector prediction mode adopted by the current group (all dimensions of the current group adopt the motion vector prediction mode), and motion vector difference values of the vertices in each dimension.

[0399] In an illustrative example, the candidate motion vector prediction mode of the current group includes an inter-prediction mode, and the prediction mode syntax element corresponding to the current group is syntax element F, the value of syntax element F is 0, and the motion vector reconstruction value can include the following cases:

[0400] 1. The value of F is 0 (represented by 0 or 00 in a binary symbol string), indicating that the motion vector of the current group is not predicted, and the motion vector reconstruction value of the current group is the motion vector difference value.

[0401] 2. The value of F is 1 (represented by 10 or 01 in a binary symbol string), indicating that the motion vector of the current group adopts unbiased intra-prediction, and the motion vector reconstruction value of the current group is wherein, P x (P y ,P z ) is the unbiased intra-prediction value, is the motion vector difference value. The unbiased intra-prediction value predCount is the number of intra-prediction points of the current vertex, and when predCount is 0, the unbiased intra-prediction value is 0, is the motion vector reconstruction value of the i-th intra-prediction point of the current vertex.

[0402] 3. The value of F is 2 (represented by 110 or 10 in a binary symbol string), indicating that the motion vector of the current group adopts biased intra-prediction, and the motion vector reconstruction value of the current group is wherein, P x (P y ,P z ) is the biased intra-prediction value, is the motion vector difference value. The biased intra-prediction value predCount is the number of intra-prediction points of the current vertex, and when predCount is 0, the unbiased intra-prediction value is 0, is the motion vector reconstruction value of the i-th intra-prediction point of the current vertex, and bias=predCount>>1.

[0403] 4. F is equal to 3 (binary string is 111 or 11), indicating that the motion vector of the current group is predicted by inter prediction, and the reconstructed value of the motion vector of the current group is where P x (P y , P z ) is the inter prediction value, is the motion vector difference value. The inter prediction value is the reconstructed value of the motion vector of the corresponding collocated point of the current vertex in the reference mesh.

[0404] In another illustrative example, the candidate motion vector prediction mode of the current group does not include the inter prediction mode, and the prediction mode syntax element corresponding to the current group is the syntax element F, the value of the syntax element F is

[0405] 1. F is equal to 0 (binary string is 0), indicating that the motion vector of the current group is not predicted, and the reconstructed value of the motion vector of the current group is the motion vector difference value.

[0406] 2. F is equal to 2 (binary string is 10), indicating that the motion vector of the current group is predicted by non-biased intra prediction, and the reconstructed value of the motion vector of the current group is where P x (P y , P z ) is the non-biased intra prediction value, is the motion vector difference value. The non-biased intra prediction value predCount is the number of intra prediction points of the current vertex, when predCount is 0, the non-biased intra prediction value is 0, is the reconstructed value of the motion vector of the i-th intra prediction point of the current vertex.

[0407] 3. F is equal to 3 (binary string is 11), indicating that the motion vector of the current group is predicted by biased intra prediction, and the reconstructed value of the motion vector of the current group is where P x (P y , P z ) is the biased intra prediction value, is the motion vector difference value. The biased intra prediction value predCount is the number of intra prediction points of the current vertex, when predCount is 0, the non-biased intra prediction value is 0, is the reconstructed value of the motion vector of the i-th intra prediction point of the current vertex, bias = predCount » 1.

[0408] It should be noted that, when performing inter prediction, in addition to being able to predict only according to the same point, it can also be predicted according to multiple inter prediction points, that is, the inter prediction value predCount is the number of inter prediction points of the current vertex, is the motion vector reconstruction value of the i th inter prediction point of the current vertex.

[0409] It can also add a bias when predicting, that is, the inter prediction value predCount is the number of inter prediction points of the current vertex, is the motion vector reconstruction value of the i th inter prediction point of the current vertex, and bias = predCount >> 1.

[0410] Different weights can also be set for different inter prediction points, so that a weighted average is used when inter prediction, that is, Or,

[0411] The inter prediction value w ix (w iy ,w iz is the weight of the i th inter prediction point of the current vertex, w ix ,w iy ,w iz They can be the same or different.

[0412] Please refer to FIG. 12, which shows the structure block diagram of the mesh decoding device provided by an exemplary embodiment of the present application. The device includes:

[0413] The decoding unit 1201 is configured to determine, in the inter decoding mode, a motion vector prediction mode used by a current group in a current mesh based on a motion vector decoding mode of the current group in the current mesh and a motion vector decoding mode of a reference group in a reference mesh, and a prediction mode syntax element representing the motion vector prediction mode.

[0414] Optionally, in the case that the motion vector decoding mode of the current group in the current mesh is non-skip decoding, and the motion vector decoding mode of the reference group in the reference mesh is non-skip decoding, the candidate motion vector prediction mode of the current group includes an inter prediction mode;

[0415] In case that the motion vector of the current group in the current grid is decoded in non-skip mode and the motion vector of the reference group in the reference grid is decoded in skip mode, the candidate motion vector prediction modes of the current group do not include an inter prediction mode.

[0416] Optionally, in case that the motion vector of the entire current group in the current grid is decoded in non-skip mode and the motion vector of the entire reference group in the reference grid is decoded in skip mode, the candidate motion vector prediction modes of the entire current group do not include an inter prediction mode.

[0417] In case that the motion vector of the entire current group in the current grid is decoded in non-skip mode and the motion vector of the entire reference group in the reference grid is decoded in non-skip mode, the candidate motion vector prediction modes of the entire current group include an inter prediction mode.

[0418] Optionally, in case that the motion vector of the entire current group in the current grid is decoded in non-skip mode and the motion vector of the entire reference group in the reference grid is decoded in skip mode, the candidate motion vector prediction modes of the entire current group do not include an inter prediction mode.

[0419] In case that the motion vector of the entire current group in the current grid is decoded in non-skip mode, the motion vector of the entire reference group in the reference grid is decoded in non-skip mode, and the motion vector of the current dimension in the current group is decoded in non-skip mode and the motion vector of the reference dimension in the reference group is decoded in skip mode, the candidate motion vector prediction modes of the current dimension in the current group do not include an inter prediction mode.

[0420] In case that the motion vector of the entire current group in the current grid is decoded in non-skip mode, the motion vector of the entire reference group in the reference grid is decoded in non-skip mode, and the motion vector of the current dimension in the current group is decoded in non-skip mode and the motion vector of the reference dimension in the reference group is decoded in non-skip mode, the candidate motion vector prediction modes of the current dimension in the current group include an inter prediction mode.

[0421] Optionally, in case that the motion vector of the current dimension in the current group is decoded in non-skip mode and the motion vector of the reference dimension in the reference group is decoded in skip mode, the candidate motion vector prediction modes of the current dimension in the current group do not include an inter prediction mode.

[0422] In a case that the motion vector decoding manner of the current dimension in the current group is non-skip decoding and the motion vector decoding manner of the reference dimension in the reference group is non-skip decoding, the candidate motion vector prediction mode of the current dimension in the current group comprises an inter prediction mode.

[0423] Optionally, the decoding unit 1201 is configured to:

[0424] Based on the total number of the candidate motion vector prediction modes of the current group, a variable-length de-binarization method is used to determine the motion vector prediction mode adopted by the current group, which is represented by the prediction mode syntax element.

[0425] Optionally, the decoding unit 1201 is configured to:

[0426] In a case that the motion vector decoding manner of the current dimension in the current group is non-skip decoding and the motion vector decoding manner of the reference dimension in the reference group is non-skip decoding, the motion vector prediction mode adopted by the current group is determined based on the first correspondence relationship and the prediction mode syntax element.

[0427] In a case that the motion vector decoding manner of the current dimension in the current group is non-skip decoding and the motion vector decoding manner of the reference dimension in the reference group is skip decoding, the motion vector prediction mode adopted by the current group is determined based on the second correspondence relationship and the prediction mode syntax element.

[0428] The first correspondence relationship comprises an inter prediction mode, the second correspondence relationship does not comprise the inter prediction mode, and there is at least one binary symbol string of a prediction mode in the first correspondence relationship, the length of which is greater than the length of a binary symbol string representing a prediction mode in the second correspondence relationship.

[0429] Optionally, the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the entire current group, or is used to represent the motion vector prediction mode adopted by different dimensions in the current group.

[0430] In a case that the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the entire current group, the same motion vector prediction mode is adopted by different dimensions in the current group.

[0431] Optionally, the decoding unit 1201 is further configured to:

[0432] The code stream is parsed to obtain a syntax element representing the motion vector decoding manner of the current group.

[0433] Optionally, the syntax element representing the motion vector decoding manner of the current group comprises:

[0434] a first syntax element representing a motion vector decoding mode of the whole current group in the current grid, and a second syntax element representing a motion vector decoding mode of different dimensions in the current group;

[0435] or,

[0436] a second syntax element representing a motion vector decoding mode of different dimensions in the current group;

[0437] or,

[0438] a first syntax element representing a motion vector decoding mode of the whole current group in the current grid.

[0439] Optionally, in the case that the syntax element comprises the first syntax element and the second syntax element, the decoding unit 1201 is configured to:

[0440] in the case that the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is skip decoding, determining that the motion vector decoding mode of each dimension in the current group is skip decoding;

[0441] in the case that the syntax element comprises the first syntax element and the second syntax element corresponding to each dimension, and the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, determining the motion vector decoding mode of each dimension based on the second syntax element corresponding to each dimension;

[0442] in the case that the syntax element comprises the first syntax element and the second syntax element corresponding to the dimensions other than the last dimension in the current group, and the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, and the second syntax element corresponding to the dimensions other than the last dimension in the current group represents that the motion vector decoding mode of the dimensions other than the last dimension is skip decoding, determining that the motion vector decoding mode of the last dimension in the current group is non-skip decoding. Optionally, in the case that the syntax element comprises the first syntax element, the decoding unit 1201 is configured to:

[0443] in the case that the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is skip decoding, determining that the motion vector decoding mode of each dimension in the current group is skip decoding;

[0444] in the case that the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, determining that the motion vector decoding mode of each dimension in the current group is non-skip decoding.

[0445] Optionally, in the case that the syntax element comprises the second syntax element, the decoding unit 1201 is configured to:

[0446] determine the motion vector decoding mode of each dimension based on the second syntax element corresponding to the dimension.

[0447] Optionally, the decoding unit 1201 is configured to:

[0448] in the case that the motion vector decoding mode of the current group in the current grid is non-skip decoding, parse the bitstream to obtain a motion vector difference value;

[0449] determine a motion vector prediction value of the current group based on the motion vector prediction mode adopted by the current group;

[0450] determine a motion vector reconstruction value based on the motion vector difference value and the motion vector prediction value.

[0451] Optionally, the current grid is a base grid in the VDMC.

[0452] Referring to FIG. 13, a structural block diagram of a grid encoding apparatus provided by an example embodiment of the present application is shown. The apparatus comprises:

[0453] the encoding unit 1301 is configured to, in the inter-frame encoding mode, encode a prediction mode syntax element into a bitstream based on the motion vector decoding mode of the current group in the current grid and the motion vector decoding mode of the reference group in the reference grid, the prediction mode syntax element being used to represent the motion vector prediction mode adopted by the current group.

[0454] Optionally, in the case that the motion vector decoding mode of the current group in the current grid is non-skip encoding and the motion vector decoding mode of the reference group in the reference grid is non-skip encoding, the candidate motion vector prediction mode of the current group comprises an inter-frame prediction mode.

[0455] in the case that the motion vector decoding mode of the current group in the current grid is non-skip encoding and the motion vector decoding mode of the reference group in the reference grid is skip encoding, the candidate motion vector prediction mode of the current group does not comprise an inter-frame prediction mode.

[0456] Optionally, in the case that the motion vector decoding mode of the entire current group in the current grid is non-skip encoding and the motion vector decoding mode of the entire reference group in the reference grid is skip encoding, the candidate motion vector prediction mode of the entire current group does not comprise an inter-frame prediction mode.

[0457] In a case that the motion vector coding manner of the whole current group in the current grid is non-skip coding, and the motion vector coding manner of the whole reference group in the reference grid is non-skip coding, the candidate motion vector prediction mode of the whole current group comprises an inter prediction mode.

[0458] Optionally, in a case that the motion vector decoding manner of the whole current group in the current grid is non-skip decoding, and the motion vector decoding manner of the whole reference group in the reference grid is skip decoding, the candidate motion vector prediction mode of the whole current group does not comprise an inter prediction mode.

[0459] In a case that the motion vector decoding manner of the whole current group in the current grid is non-skip decoding, the motion vector decoding manner of the whole reference group in the reference grid is non-skip decoding, and the motion vector decoding manner of the current dimension in the current group is non-skip decoding, and the motion vector decoding manner of the reference dimension in the reference group is skip decoding, the candidate motion vector prediction mode of the current dimension in the current group does not comprise an inter prediction mode.

[0460] In a case that the motion vector decoding manner of the whole current group in the current grid is non-skip decoding, the motion vector decoding manner of the whole reference group in the reference grid is non-skip decoding, and the motion vector decoding manner of the current dimension in the current group is non-skip decoding, and the motion vector decoding manner of the reference dimension in the reference group is non-skip decoding, the candidate motion vector prediction mode of the current dimension in the current group comprises an inter prediction mode.

[0461] Optionally, in a case that the motion vector coding manner of the current dimension in the current group is non-skip coding, and the motion vector coding manner of the reference dimension in the reference group is skip coding, the candidate motion vector prediction mode of the current dimension in the current group does not comprise an inter prediction mode.

[0462] In a case that the motion vector coding manner of the current dimension in the current group is non-skip coding, and the motion vector coding manner of the reference dimension in the reference group is non-skip coding, the candidate motion vector prediction mode of the current dimension in the current group comprises an inter prediction mode.

[0463] Optionally, the encoding unit 1301 is configured to:

[0464] The prediction mode syntax element is encoded into the code stream by a variable length coding manner based on the total number of the candidate motion vector prediction modes of the current group, and the motion vector prediction mode adopted by the current group.

[0465] Optionally, the encoding unit 1301 is configured to:

[0466] when the motion vector of the current group in the current grid is encoded in a non-skip mode and the motion vector of the reference group in the reference grid is encoded in a skip mode, the prediction mode syntax element is encoded into the bitstream according to a second correspondence relationship;

[0467] when the motion vector of the current group in the current grid is encoded in a non-skip mode and the motion vector of the reference group in the reference grid is encoded in a skip mode, the prediction mode syntax element is encoded into the bitstream according to a second correspondence relationship;

[0468] wherein the first correspondence relationship includes an inter prediction mode, the second correspondence relationship does not include the inter prediction mode, and a length of at least one binary symbol string representing a prediction mode in the first correspondence relationship is greater than a length of a binary symbol string representing a prediction mode in the second correspondence relationship.

[0469] Optionally, the prediction mode syntax element is used to represent a motion vector prediction mode adopted by the entire current group, or is used to represent motion vector prediction modes adopted by different dimensions in the current group; when the prediction mode syntax element is used to represent the motion vector prediction mode adopted by the entire current group, the same motion vector prediction mode is adopted by different dimensions in the current group.

[0470] Optionally, the encoding unit 1301 is further configured to:

[0471] determine a motion vector encoding mode of the current group in the current grid;

[0472] encode a syntax element representing the motion vector encoding mode of the current group into the bitstream.

[0473] Optionally, the encoding unit 1301 is configured to:

[0474] determine a motion vector encoding mode of the entire current group in the current grid and a motion vector encoding mode of different dimensions in the current group;

[0475] or,

[0476] determine a motion vector encoding mode of different dimensions in the current group;

[0477] or,

[0478] determine a motion vector encoding mode of the entire current group in the current grid.

[0479] Optionally, the encoding unit 1301 is configured to:

[0480] determining the motion vector coding mode of each dimension in the current group based on the motion vector coding mode of each dimension in the current group;

[0481] or,

[0482] determining the motion vector coding mode of each dimension in the current group based on the motion vector coding mode of each dimension in the current group;

[0483] Optionally, the encoding unit 1301 is configured to:

[0484] determining a first total cost of the current dimension in the current group under different motion vector prediction modes, the first total cost comprising a first rate-distortion cost of the current dimension in the current group under different motion vector prediction modes and an encoding cost of using different motion vector prediction modes;

[0485] determining a second rate-distortion cost of the current dimension in the current group when skip coding is used;

[0486] determining that the motion vector coding mode of the current dimension in the current group is skip coding when the second rate-distortion cost is less than or equal to the minimum value of the first total cost;

[0487] determining that the motion vector coding mode of the current dimension in the current group is not skip coding when the second rate-distortion cost is greater than the minimum value of the first total cost.

[0488] Optionally, the encoding unit 1301 is configured to:

[0489] determining that the motion vector coding mode of the entire current group in the current grid is skip coding when the motion vector coding mode of each dimension in the current group is skip coding;

[0490] determining that the motion vector coding mode of the entire current group in the current grid is not skip coding when there is at least one dimension in the current group whose motion vector coding mode is not skip coding.

[0491] Optionally, the encoding unit 1301 is configured to:

[0492] determining a second total cost of different dimensions in the current group under the same motion vector prediction mode, the second total cost comprising a sum of third rate-distortion costs of different dimensions in the current group under the same motion vector prediction mode and a sum of encoding costs of different dimensions adopting the motion vector prediction mode;

[0493] determining a fourth rate-distortion cost of each dimension in the current group when skip encoding;

[0494] determining that the motion vector encoding mode of the entire current group in the current grid is skip encoding in a case where the fourth rate-distortion cost is less than or equal to a minimum value of the second total cost;

[0495] determining that the motion vector encoding mode of the entire current group in the current grid is non-skip encoding in a case where the fourth rate-distortion cost is greater than the minimum value of the second total cost.

[0496] Optionally, the encoding unit 1301 is configured to:

[0497] determining a first total cost of the current dimension in the current group under different motion vector prediction modes, the first total cost comprising a sum of first rate-distortion costs of the current dimension in the current group under different motion vector prediction modes and an encoding cost of the current dimension adopting different motion vector prediction modes;

[0498] determining a second rate-distortion cost of the current dimension in the current group when skip encoding;

[0499] determining that the motion vector encoding mode of the current dimension in the current group is skip encoding in a case where the second rate-distortion cost is less than or equal to a minimum value of the first total cost;

[0500] determining that the motion vector encoding mode of the current dimension in the current group is non-skip encoding in a case where the second rate-distortion cost is greater than the minimum value of the first total cost.

[0501] Optionally, the encoding unit 1301 is configured to:

[0502] determining a third total cost of the entire current group under the same motion vector prediction mode, the third total cost comprising a sum of third rate-distortion costs of different dimensions in the current group under the same motion vector prediction mode and an encoding cost of the entire current group adopting the motion vector prediction mode;

[0503] determining a fifth rate-distortion cost of the entire current group when skip encoding;

[0504] determining that the motion vector encoding mode of the entire current group in the current grid is skip encoding in a case where the fifth rate-distortion cost is less than or equal to a minimum value of the third total cost;

[0505] in a case that the fifth rate-distortion cost is greater than the minimum value of the third total cost, determining that a motion vector coding mode of the whole current group in the current grid is non-skip coding.

[0506] Optionally, the encoding unit 1301 is configured to:

[0507] encode, into the bitstream, a first syntax element representing the motion vector coding mode of the whole current group in the current grid, and a second syntax element representing the motion vector coding mode of different dimensions in the current group.

[0508] or,

[0509] encode, into the bitstream, the first syntax element representing the motion vector coding mode of the whole current group in the current grid.

[0510] Optionally, the encoding unit 1301 is configured to:

[0511] in a case that the motion vector coding mode of the whole current group in the current grid is non-skip coding, and the motion vector coding mode of other dimensions except the last dimension in the current group is all skip coding, encode, into the bitstream, the first syntax element representing the motion vector coding mode of the whole current group in the current grid, and the second syntax element corresponding to the other dimensions except the last dimension in the current group.

[0512] in a case that the motion vector coding mode of the whole current group in the current grid is non-skip coding, and the motion vector coding mode of other dimensions except the last dimension in the current group is not all skip coding, encode, into the bitstream, the first syntax element representing the motion vector coding mode of the whole current group in the current grid, and the second syntax element corresponding to each dimension in the current group.

[0513] Optionally, the encoding unit 1301 is configured to:

[0514] in a case that the motion vector coding mode of the whole current group in the current grid is skip coding, encode, into the bitstream, the first syntax element representing the motion vector coding mode of the whole current group in the current grid.

[0515] Optionally, the encoding unit 1301 is configured to:

[0516] encode, into the bitstream, the second syntax element representing the motion vector coding mode of different dimensions in the current group.

[0517] Optionally, the encoding unit 1301 is configured to:

[0518] encode a first syntax element representing a manner of encoding motion vectors of the current group in the current grid into a bitstream.

[0519] Optionally, the encoding unit 1301 is configured to:

[0520] In a case where the manner of encoding motion vectors of the current group in the current grid is non-skip encoding, determine a motion vector prediction value of the current group based on a motion vector prediction mode adopted by the current group.

[0521] determine a motion vector difference value based on the motion vector original value of the current group and the motion vector prediction value.

[0522] encode the motion vector difference value into a bitstream.

[0523] Optionally, the current grid is a base grid in a VDMC.

[0524] It should be noted that the grid decoding process performed by the decoding unit described above can refer to the grid decoding method embodiments described above, and the grid encoding process performed by the encoding unit described above can refer to the grid encoding method embodiments described above. Therefore, the present embodiment will not be described here.

[0525] Please refer to FIG. 14, which shows a structural block diagram of a decoder provided by an example embodiment of the present application. The decoder can include one or more of the following components: a processor 1401, a memory 1402. The components are coupled together by a bus system. It can be understood that the bus system is used to realize the connection and communication between the components. In addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.

[0526] The memory 1402 is configured to store a computer program capable of running on the processor 1401; and the processor 1401 is configured to execute the following when running the computer program:

[0527] In the inter-frame decoding mode, determine a motion vector prediction mode adopted by the current group represented by the prediction mode syntax element based on the manner of encoding motion vectors of the current group in the current grid and the manner of encoding motion vectors of the reference group in the reference grid.

[0528] It is to be appreciated that the memory 1402 in embodiments of the application can be volatile, nonvolatile, or a combination of both. By way of example, the nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which acts as external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory 1402 described herein are intended to include, without being limited to, these and any other suitable types of memory.

[0529] The processor 1401 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above-mentioned trellis decoding method can be completed by integrated logic circuits of hardware in the processor 1401 or instructions in the form of software. The processor 1401 mentioned above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 1402, and the processor 1401 reads the information in the memory 1402, and combines the hardware to complete the steps of the above-mentioned method. It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or their combination. For hardware implementation, the processing unit can be realized in one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, general processors, controllers, microcontrollers, microprocessors, other electronic units for executing the functions described in the present application or their combination. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing the functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be realized in the processor or outside the processor. Alternatively, as another embodiment, the processor 1401 is also configured to execute the trellis decoding method described in any one of the preceding embodiments when running the computer program.

[0530] Please refer to FIG. 15, which shows a structural block diagram of an encoder provided by an exemplary embodiment of the present application. The encoder can include one or more of the following components: a processor 1501, a memory 1502. The components are coupled together by a bus system. It can be understood that the bus system is used to realize the connection communication between the components. In addition to including a data bus, the bus system also includes a power supply bus, a control bus and a state signal bus.

[0531] a memory 1502, configured to store a computer program capable of running on the processor 1501; and the processor 1501, configured to execute the following when running the computer program:

[0532] In the inter-frame coding mode, a prediction mode syntax element is encoded into the bitstream based on a manner of encoding a motion vector of a current group in a current grid and a manner of encoding a motion vector of a reference group in a reference grid, the prediction mode syntax element being used to represent a motion vector prediction mode adopted by the current group.

[0533] It can be understood that the memory 1502 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The description of the memory 1502 herein is intended to include, but not be limited to, these and any other suitable types of memory.

[0534] The processor 1501 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above-mentioned trellis encoding method can be completed by the integrated logic circuit of hardware in the processor 1501 or the instruction in the form of software. The above-mentioned processor 1501 can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 1502, and the processor 1501 reads the information in the memory 1502, and combines the hardware to complete the steps of the above-mentioned method. It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or their combination. For hardware implementation, the processing unit can be realized in one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, general processors, controllers, microcontrollers, microprocessors, other electronic units for executing the functions described in the present application or their combination. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing the functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be realized in the processor or outside the processor. Alternatively, as another embodiment, the processor 1501 is also configured to execute the trellis encoding method described in any one of the preceding embodiments when running the computer program.

[0535] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the computer program is used to be executed by a processor to implement the trellis decoding method or the trellis encoding method as described in the above embodiments.

[0536] The embodiment of the present application further provides a code stream, which is decoded by using the trellis decoding method in the above aspect, or is obtained by using the trellis encoding method in the above aspect.

[0537] The embodiment of the present application further provides a computer program product, which comprises computer instructions stored in a computer readable storage medium, and a processor acquires the computer instructions from the computer readable storage medium, and executes the computer instructions to implement the trellis decoding method or the trellis encoding method in the above embodiment.

[0538] Those skilled in the art should be aware that the functions described in the above one or more examples can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, and the communication medium includes any medium that facilitates the transfer of computer programs from one place to another. The storage medium can be any available medium accessible by a general or special purpose computer.

[0539] The above description is only optional embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A trellis decoding method characterized by, The method comprises: In the inter-frame decoding mode, based on the motion vector decoding mode of a current group in a current grid and the motion vector decoding mode of a reference group in a reference grid, a motion vector prediction mode adopted by the current group represented by a prediction mode syntax element is determined.

2. The method of claim 1, wherein, in a case that the motion vector decoding mode of the current group in the current grid is non-skip decoding and the motion vector decoding mode of the reference group in the reference grid is non-skip decoding, the candidate motion vector prediction mode of the current group comprises an inter-frame prediction mode; in a case that the motion vector decoding mode of the current group in the current grid is non-skip decoding and the motion vector decoding mode of the reference group in the reference grid is skip decoding, the candidate motion vector prediction mode of the current group does not comprise an inter-frame prediction mode.

3. The method of claim 2, wherein, in a case that the motion vector decoding mode of the entire current group in the current grid is non-skip decoding and the motion vector decoding mode of the entire reference group in the reference grid is skip decoding, the candidate motion vector prediction mode of the entire current group does not comprise an inter-frame prediction mode; in a case that the motion vector decoding mode of the entire current group in the current grid is non-skip decoding and the motion vector decoding mode of the entire reference group in the reference grid is non-skip decoding, the candidate motion vector prediction mode of the entire current group comprises an inter-frame prediction mode.

4. The method of claim 2, wherein, in a case that the motion vector decoding mode of the entire current group in the current grid is non-skip decoding and the motion vector decoding mode of the entire reference group in the reference grid is skip decoding, the candidate motion vector prediction mode of the entire current group does not comprise an inter-frame prediction mode; in a case that the motion vector decoding mode of the entire current group in the current grid is non-skip decoding, the motion vector decoding mode of the entire reference group in the reference grid is non-skip decoding, and the motion vector decoding mode of a current dimension in the current group is non-skip decoding and the motion vector decoding mode of a reference dimension in the reference group is skip decoding, the candidate motion vector prediction mode of the current dimension in the current group does not comprise an inter-frame prediction mode; in a case that the motion vector decoding mode of the entire current group in the current grid is non-skip decoding, the motion vector decoding mode of the entire reference group in the reference grid is non-skip decoding, and the motion vector decoding mode of a current dimension in the current group is non-skip decoding and the motion vector decoding mode of a reference dimension in the reference group is non-skip decoding, the candidate motion vector prediction mode of the current dimension in the current group comprises an inter-frame prediction mode.

5. The method of claim 2, wherein, in a case that the motion vector decoding mode of a current dimension in the current group is non-skip decoding and the motion vector decoding mode of a reference dimension in the reference group is skip decoding, the candidate motion vector prediction mode of the current dimension in the current group does not comprise an inter-frame prediction mode; In a case that a motion vector decoding manner of a current dimension in the current group is non-skip decoding, and a motion vector decoding manner of a reference dimension in the reference group is non-skip decoding, a candidate motion vector prediction mode of the current dimension in the current group comprises an inter prediction mode.

6. The method of claim 2, wherein, The determining the motion vector prediction mode adopted by the current group according to the prediction mode syntax element comprises: The motion vector prediction mode adopted by the current group according to the prediction mode syntax element is determined by using a variable length de-binarization method based on a total number of candidate motion vector prediction modes of the current group.

7. The method of claim 2, wherein, The determining the motion vector prediction mode adopted by the current group according to the prediction mode syntax element comprises: In a case that a motion vector decoding manner of the current group in the current grid is non-skip decoding, and a motion vector decoding manner of the reference group in the reference grid is non-skip decoding, the motion vector prediction mode adopted by the current group is determined based on a first correspondence relationship and the prediction mode syntax element; In a case that a motion vector decoding manner of the current group in the current grid is non-skip decoding, and a motion vector decoding manner of the reference group in the reference grid is skip decoding, the motion vector prediction mode adopted by the current group is determined based on a second correspondence relationship and the prediction mode syntax element; The first correspondence relationship comprises an inter prediction mode, the second correspondence relationship does not comprise the inter prediction mode, and a length of at least one binary symbol string representing a prediction mode in the first correspondence relationship is greater than a length of a binary symbol string representing a prediction mode in the second correspondence relationship.

8. The method of claim 1, wherein, The prediction mode syntax element is used to represent a motion vector prediction mode adopted by the entire current group, or is used to represent motion vector prediction modes adopted by different dimensions in the current group. In a case that the prediction mode syntax element is used to represent a motion vector prediction mode adopted by the entire current group, the same motion vector prediction mode is adopted by different dimensions in the current group.

9. The method according to any one of claims 1 to 8, characterized in that, The method further comprises: parsing a bitstream to obtain a syntax element representing a motion vector decoding manner of the current group.

10. The method of claim 8, wherein, The syntax element representing the motion vector decoding manner of the current group comprises: a first syntax element representing a motion vector decoding manner of the entire current group in the current grid, and a second syntax element representing motion vector decoding manners of different dimensions in the current group; or, the second syntax element representing motion vector decoding manners of different dimensions in the current group; or, the first syntax element representing a motion vector decoding manner of the entire current group in the current grid.

11. The method of claim 10, wherein, In a case that the syntax element comprises the first syntax element and the second syntax element, the method further comprises: in a case that the first syntax element represents that the motion vector decoding manner of the entire current group in the current grid is skip decoding, determining that the motion vector decoding manner of each dimension in the current group is skip decoding; in a case that the syntax element comprises the first syntax element and the second syntax element corresponding to each dimension, and the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, determining the motion vector decoding mode of each dimension based on the second syntax element corresponding to each dimension; in a case that the syntax element comprises the first syntax element and the second syntax element corresponding to each dimension except the last dimension in the current group, and the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, and the second syntax element corresponding to each dimension except the last dimension in the current group represents that the motion vector decoding mode is skip decoding, determining that the motion vector decoding mode of the last dimension in the current group is non-skip decoding.

12. The method of claim 10, wherein, in a case that the syntax element comprises the first syntax element, the method further comprises: in a case that the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is skip decoding, determining that the motion vector decoding mode of each dimension in the current group is skip decoding; in a case that the first syntax element represents that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, determining that the motion vector decoding mode of each dimension in the current group is non-skip decoding.

13. The method of claim 10, wherein, in a case that the syntax element comprises the second syntax element, the method further comprises: determining the motion vector decoding mode of each dimension based on the second syntax element corresponding to each dimension.

14. The method according to any one of claims 1 to 13, characterized in that, the method further comprises: in a case that the motion vector decoding mode of the current group in the current grid is non-skip decoding, parsing a code stream to obtain a motion vector difference value; determining a motion vector prediction value of the current group based on a motion vector prediction mode adopted by the current group; determining a motion vector reconstruction value based on the motion vector difference value and the motion vector prediction value.

15. The method according to any one of claims 1 to 13, characterized in that, the current grid is a basic grid in a VDMC.

16. A trellis encoding method characterized by, the method comprises: in an inter coding mode, encoding a prediction mode syntax element into a code stream based on a motion vector coding mode of a current group in a current grid and a motion vector coding mode of a reference group in a reference grid, the prediction mode syntax element being used to represent a motion vector prediction mode adopted by the current group.

17. The method of claim 16, wherein, in a case that the motion vector coding mode of the current group in the current grid is non-skip coding, and the motion vector coding mode of the reference group in the reference grid is non-skip coding, the candidate motion vector prediction mode of the current group comprises an inter prediction mode; in a case that the motion vector coding mode of the current group in the current grid is non-skip coding, and the motion vector coding mode of the reference group in the reference grid is skip coding, the candidate motion vector prediction mode of the current group does not comprise an inter prediction mode.

18. The method of claim 16, wherein, In a case that the motion vector coding mode of the whole current group in the current grid is non-skip coding, and the motion vector coding mode of the whole reference group in the reference grid is skip coding, the candidate motion vector prediction mode of the whole current group does not include an inter prediction mode; In a case that the motion vector coding mode of the whole current group in the current grid is non-skip coding, and the motion vector coding mode of the whole reference group in the reference grid is non-skip coding, the candidate motion vector prediction mode of the whole current group includes an inter prediction mode.

19. The method of claim 16, wherein, In a case that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, and the motion vector decoding mode of the whole reference group in the reference grid is skip decoding, the candidate motion vector prediction mode of the whole current group does not include an inter prediction mode; In a case that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, the motion vector decoding mode of the whole reference group in the reference grid is non-skip decoding, and the motion vector decoding mode of the current dimension in the current group is non-skip decoding, and the motion vector decoding mode of the reference dimension in the reference group is skip decoding, the candidate motion vector prediction mode of the current dimension in the current group does not include an inter prediction mode; In a case that the motion vector decoding mode of the whole current group in the current grid is non-skip decoding, the motion vector decoding mode of the whole reference group in the reference grid is non-skip decoding, and the motion vector decoding mode of the current dimension in the current group is non-skip decoding, and the motion vector decoding mode of the reference dimension in the reference group is non-skip decoding, the candidate motion vector prediction mode of the current dimension in the current group includes an inter prediction mode.

20. The method of claim 16, wherein, In a case that the motion vector coding mode of the current dimension in the current group is non-skip coding, and the motion vector coding mode of the reference dimension in the reference group is skip coding, the candidate motion vector prediction mode of the current dimension in the current group does not include an inter prediction mode; In a case that the motion vector coding mode of the current dimension in the current group is non-skip coding, and the motion vector coding mode of the reference dimension in the reference group is non-skip coding, the candidate motion vector prediction mode of the current dimension in the current group includes an inter prediction mode. The encoding the prediction mode syntax element into the bitstream comprises:

21. The method of claim 16, wherein, based on the total number of the candidate motion vector prediction modes of the current group, and the motion vector prediction mode adopted by the current group, encoding the prediction mode syntax element into the bitstream by a variable length coding mode. The encoding the prediction mode syntax element into the bitstream comprises:

22. The method of claim 16, wherein, in a case that the motion vector coding mode of the current group in the current grid is non-skip coding, and the motion vector coding mode of the reference group in the reference grid is non-skip coding, encoding the prediction mode syntax element into the bitstream based on a first correspondence relationship; ​ in a case that the motion vector coding mode of the current group in the current grid is non-skip coding and the motion vector coding mode of the reference group in the reference grid is skip coding, encoding the prediction mode syntax element into the bitstream based on a second correspondence relationship; wherein the first correspondence relationship includes inter prediction modes, the second correspondence relationship does not include inter prediction modes, and a length of at least one binary string representing a prediction mode in the first correspondence relationship is greater than a length of a binary string representing a prediction mode in the second correspondence relationship.

23. The method of claim 16, wherein, The prediction mode syntax element is used to represent a motion vector prediction mode adopted by the entire current group, or is used to represent motion vector prediction modes adopted by different dimensions in the current group; wherein, in a case that the prediction mode syntax element is used to represent a motion vector prediction mode adopted by the entire current group, the same motion vector prediction mode is adopted by different dimensions in the current group.

24. The method of any one of claims 16 to 23, wherein, The method further comprises: determining a motion vector coding mode of the current group in the current grid; encoding a syntax element representing the motion vector coding mode of the current group into the bitstream.

25. The method of claim 24, wherein, The determination of the motion vector coding mode of the current group in the current grid comprises: determining a motion vector coding mode of the entire current group in the current grid and motion vector coding modes of different dimensions in the current group; or, determining motion vector coding modes of different dimensions in the current group; or, determining a motion vector coding mode of the entire current group in the current grid.

26. The method of claim 25, wherein, The determination of the motion vector coding mode of the entire current group in the current grid and the motion vector coding modes of different dimensions in the current group comprises: determining motion vector coding modes of different dimensions in the current group; and determining a motion vector coding mode of the entire current group in the current grid based on the motion vector coding modes of different dimensions in the current group; or, determining a motion vector coding mode of the entire current group in the current grid; determining motion vector coding modes of different dimensions in the current group in a case that the motion vector coding mode of the entire current group in the current grid is non-skip coding; and determining motion vector coding modes of different dimensions in the current group to be skip coding in a case that the motion vector coding mode of the entire current group in the current grid is skip coding.

27. The method of claim 26, wherein, The determination of the motion vector coding modes of different dimensions in the current group comprises: determining a first total cost of a current dimension in the current group under different motion vector prediction modes, the first total cost including a first rate-distortion cost of the current dimension in the current group under different motion vector prediction modes and coding costs of adopting different motion vector prediction modes; determining a second rate-distortion cost of the current dimension in the current group when skip coding is used; determining a motion vector coding mode of the current dimension in the current group to be skip coding in a case that the second rate-distortion cost is less than or equal to a minimum value of the first total cost; and In a case that the second rate-distortion cost is greater than the minimum value of the first total cost, it is determined that the motion vector coding mode of the current dimension in the current group is non-skip coding.

28. The method of claim 26, wherein, The determining of the motion vector coding mode of the entire current group in the current grid comprises: In a case that the motion vector coding mode of each dimension in the current group is skip coding, it is determined that the motion vector coding mode of the entire current group in the current grid is skip coding. In a case that the motion vector coding mode of at least one dimension in the current group is non-skip coding, it is determined that the motion vector coding mode of the entire current group in the current grid is non-skip coding.

29. The method of claim 26, wherein, The determining of the motion vector coding mode of the entire current group in the current grid comprises: determining a second total cost of different dimensions in the current group in the same motion vector prediction mode, the second total cost comprising a sum of third rate-distortion costs of different dimensions in the current group in the same motion vector prediction mode and a sum of coding costs of different dimensions in the motion vector prediction mode; determining a fourth rate-distortion cost of each dimension in the current group in skip coding; In a case that the fourth rate-distortion cost is less than or equal to the minimum value of the second total cost, it is determined that the motion vector coding mode of the entire current group in the current grid is skip coding. In a case that the fourth rate-distortion cost is greater than the minimum value of the second total cost, it is determined that the motion vector coding mode of the entire current group in the current grid is non-skip coding.

30. The method of claim 25, wherein, The determining of the motion vector coding mode of different dimensions in the current group comprises: determining a first total cost of the current dimension in the current group in different motion vector prediction modes, the first total cost comprising a first rate-distortion cost of the current dimension in the current group in different motion vector prediction modes and a coding cost of the current dimension in different motion vector prediction modes; determining a second rate-distortion cost of the current dimension in the current group in skip coding; In a case that the second rate-distortion cost is less than or equal to the minimum value of the first total cost, it is determined that the motion vector coding mode of the current dimension in the current group is skip coding. In a case that the second rate-distortion cost is greater than the minimum value of the first total cost, it is determined that the motion vector coding mode of the current dimension in the current group is non-skip coding.

31. The method of claim 25, wherein, The determining of the motion vector coding mode of the entire current group in the current grid comprises: determining a third total cost of the entire current group in the same motion vector prediction mode, the third total cost comprising a sum of third rate-distortion costs of different dimensions in the current group in the same motion vector prediction mode and a coding cost of the entire current group in the motion vector prediction mode; determining a fifth rate-distortion cost of the entire current group in skip coding; In a case that the fifth rate-distortion cost is less than or equal to the minimum value of the third total cost, it is determined that the motion vector coding mode of the entire current group in the current grid is skip coding; In a case that the fifth rate-distortion cost is greater than the minimum value of the third total cost, it is determined that the motion vector coding mode of the whole current group in the current grid is non-skip coding.

32. The method of claim 26, wherein, The encoding of the syntax element representing the motion vector coding mode of the current group into the bitstream comprises: encoding a first syntax element representing the motion vector coding mode of the whole current group in the current grid and a second syntax element representing the motion vector coding mode of different dimensions in the current group into the bitstream; or, encoding the first syntax element representing the motion vector coding mode of the whole current group in the current grid into the bitstream.

33. The method of claim 32, wherein, The encoding of the first syntax element representing the motion vector coding mode of the whole current group in the current grid and the second syntax element representing the motion vector coding mode of different dimensions in the current group into the bitstream comprises: in a case that the motion vector coding mode of the whole current group in the current grid is non-skip coding and the motion vector coding mode of other dimensions except the last dimension in the current group is all skip coding, encoding the first syntax element representing the motion vector coding mode of the whole current group in the current grid and the second syntax element corresponding to other dimensions except the last dimension in the current group into the bitstream; in a case that the motion vector coding mode of the whole current group in the current grid is non-skip coding and the motion vector coding mode of other dimensions except the last dimension in the current group is not all skip coding, encoding the first syntax element representing the motion vector coding mode of the whole current group in the current grid and the second syntax element corresponding to each dimension in the current group into the bitstream. The encoding of the first syntax element representing the motion vector coding mode of the whole current group in the current grid into the bitstream comprises:

34. The method of claim 32, wherein, in a case that the motion vector coding mode of the whole current group in the current grid is skip coding, encoding the first syntax element representing the motion vector coding mode of the whole current group in the current grid into the bitstream. The encoding of the syntax element representing the motion vector coding mode of the current group into the bitstream comprises:

35. The method of claim 30, wherein, encoding the second syntax element representing the motion vector coding mode of different dimensions in the current group into the bitstream. The encoding of the syntax element representing the motion vector coding mode of the current group into the bitstream comprises:

36. The method of claim 31, wherein, encoding the first syntax element representing the motion vector coding mode of the whole current group in the current grid into the bitstream. The method further comprises:

37. The method of any one of claims 16 to 36, wherein, in a case that the motion vector coding mode of the current group in the current grid is non-skip coding, determining a motion vector prediction value of the current group based on a motion vector prediction mode adopted by the current group; determining a motion vector difference value based on the motion vector original value of the current group and the motion vector prediction value; encoding the motion vector difference value into the bitstream. The current grid is a basic grid in a VDMC.

38. The method of any one of claims 16 to 37, wherein, The apparatus comprises:

39. A decoding apparatus, comprising: ​ The decoding unit is configured to determine, in the inter-frame decoding mode, a motion vector prediction mode adopted by a current group in a current grid based on a motion vector decoding manner of the current group and a motion vector decoding manner of a reference group in a reference grid, the motion vector prediction mode being represented by a prediction mode syntax element.

40. An encoding device, comprising: The apparatus comprises: The encoding unit is configured to encode, in the inter-frame encoding mode, a prediction mode syntax element into a bitstream, the prediction mode syntax element being used to represent a motion vector prediction mode adopted by a current group in a current grid, the motion vector prediction mode being based on a motion vector encoding manner of the current group and a motion vector encoding manner of a reference group in a reference grid.

41. A computer-readable storage medium, comprising: The computer readable storage medium stores a computer program, the computer program being used by a processor to implement the grid decoding method according to any one of claims 1 to 15, or the grid encoding method according to any one of claims 16 to 38.

42. A bitstream, characterized by, The bitstream is decoded by the grid decoding method according to any one of claims 1 to 15, or is encoded by the grid encoding method according to any one of claims 16 to 38.

43. A decoder, comprising: The decoder comprises a memory and a processor, the memory is configured to store a computer program running on the processor, and the processor is configured to execute the grid decoding method according to any one of claims 1 to 15 when the computer program is running.

44. An encoder comprising: The encoder comprises a memory and a processor, the memory is configured to store a computer program running on the processor, and the processor is configured to execute the grid encoding method according to any one of claims 16 to 38 when the computer program is running.

Citation Information

Patent Citations

  • Method and apparatus for history-based motion vector prediction with parallel processing

    CN111937387A

  • Coding method and device, decoding method and device, and equipment

    CN112135127A

  • Method and apparatus for sub-block based temporal motion vector prediction

    CN112154663A

  • Method and Apparatus for Encoding and Decoding Motion Vector in Plural Number of Reference Pictures and Video Encoding / Decoding Method and Apparatus Using Same

    KR1020140027437A