Mesh decoding method and apparatus, mesh coding method and apparatus, and coder, decoder and medium

By using the connection information of the current grid and the distance to the reference grid to filter neighboring vertices in dynamic mesh coding, the problem of inaccurate motion vector prediction in existing technologies is solved, and the encoding and decoding efficiency is improved.

WO2026011434A1PCT designated stage Publication Date: 2026-01-15GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, the inter-frame dynamic mesh coding method cannot effectively utilize the connection information of neighboring vertices when predicting motion vectors, resulting in low encoding and decoding efficiency.

Method used

By using the connection information of the current grid and the distance between vertices in the reference grid, neighboring vertices with similar motion states to the current vertex are selected for motion vector encoding and decoding.

Benefits of technology

It improves the accuracy of motion vector prediction and encoding/decoding efficiency, and enhances the encoding/decoding performance of 3D meshes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024105293_15012026_PF_FP_ABST
    Figure CN2024105293_15012026_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 and apparatus, a mesh coding method and apparatus, and a coder, a decoder and a medium. The mesh coding method comprises: on the basis of connection information of a current mesh and the distance between vertices in a reference mesh, determining a neighboring vertex of a current vertex, wherein the current vertex is a vertex in the current mesh; and on the basis of a motion vector reconstruction value of the neighboring vertex, performing motion vector coding on the current vertex. The solution provided in the embodiments of the present application can improve the coding and decoding efficiency of a three-dimensional mesh.
Need to check novelty before this filing date? Find Prior Art

Description

Mesh decoding, encoding methods, devices, codecs and media Technical Field

[0001] This application relates to the field of dynamic grid coding and decoding technology, and in particular to a grid decoding, encoding method, apparatus, codec, and medium. Background Technology

[0002] Dynamic Mesh Coding (DMC) is a high-efficiency compression technique 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, during the inter-frame DMC encoding process, when encoding the base mesh, it is not necessary to encode the connection information of the vertices in the base mesh; only the motion vector between the geometric coordinates of the vertices in the current base mesh and the geometric 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 bitstream, it can reconstruct the current base mesh based on this motion vector, the connection information of the vertices in the reference base mesh, and the geometric coordinates of the vertices in the reference base mesh.

[0004] Summary of the Invention

[0005] This application provides a grid decoding and encoding method, apparatus, codec, and medium. The technical solution is as follows:

[0006] On one hand, embodiments of this application provide a grid decoding method, the method comprising:

[0007] Based on the connection information of the current grid and the distance between vertices in the reference grid, the neighboring vertices of the current vertex are determined, wherein the current vertex is a vertex in the current grid;

[0008] Based on the motion vector decoding values ​​of the neighboring vertices, the motion vector of the current vertex is decoded.

[0009] On the other hand, embodiments of this application provide a grid coding method, the method comprising:

[0010] Based on the connection information of the current grid and the distance between vertices in the reference grid, the neighboring vertices of the current vertex are determined, wherein the current vertex is a vertex in the current grid;

[0011] Based on the motion vector reconstruction values ​​of the neighboring vertices, the current vertex is encoded using motion vectors.

[0012] On the other hand, embodiments of this application provide a mesh decoding device, the device comprising:

[0013] The decoding unit is used to determine the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid, wherein the current vertex is a vertex in the current grid;

[0014] The decoding unit is used to perform motion vector decoding on the current vertex based on the motion vector decoding values ​​of the neighboring vertices.

[0015] On the other hand, embodiments of this application provide a grid coding device, the device comprising:

[0016] An encoding unit is used to determine the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid, wherein the current vertex is a vertex in the current grid;

[0017] The encoding unit is used to perform motion vector encoding on the current vertex based on the motion vector reconstruction values ​​of the neighboring vertices.

[0018] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the grid decoding method or the grid encoding method described above.

[0019] On the other hand, embodiments of this application provide a bitstream that is decoded using the grid decoding method described above, or encoded using the grid encoding method described above.

[0020] On the other hand, embodiments of this application provide a decoder, the decoder including a memory and a processor, the memory being used to store a computer program running on the processor; the processor being used to execute the mesh decoding method as described above when running the computer program.

[0021] On the other hand, embodiments of this application provide an encoder, the encoder including a memory and a processor, the memory for storing a computer program running on the processor; the processor for executing the mesh encoding method as described above when running the computer program.

[0022] In this embodiment, since vertices that are close to each other have a higher probability of having similar motion states than vertices that are far apart, during the mesh encoding and decoding process, the encoder and decoder determines candidate neighbor vertices based on the connection information of the current mesh, and filters out the neighbor vertices of the current vertex from the candidate neighbor vertices based on the distance between vertices in the reference mesh. This can improve the probability of filtering out neighbor vertices that have similar motion states to the current vertex. Furthermore, using the filtered neighbor vertices to perform motion vector encoding and decoding on the current vertex helps to improve the efficiency of mesh encoding and decoding. Attached Figure Description

[0023] Figure 1 is a schematic diagram illustrating the current base mesh and the reference base mesh in an exemplary embodiment;

[0024] Figure 2 is a flowchart illustrating a mesh coding method in an exemplary embodiment of this application;

[0025] Figure 3 shows a flowchart of the decoder determining intra-frame neighbor vertices according to an exemplary embodiment of this application;

[0026] Figure 4 is a schematic diagram illustrating the intra-frame neighbor point set update process in an exemplary embodiment of this application;

[0027] Figure 5 is a schematic diagram illustrating the intra-frame neighbor point set preservation process in an exemplary embodiment of this application;

[0028] Figure 6 is a schematic diagram illustrating the intra-frame neighbor point set update process in another exemplary embodiment of this application;

[0029] Figure 7 illustrates a flowchart of the decoder's process for determining inter-frame neighbor vertices according to an exemplary embodiment of this application;

[0030] Figure 8 illustrates a flowchart of the decoder's process for determining inter-frame neighbor vertices according to another exemplary embodiment of this application;

[0031] Figure 9 is a schematic diagram illustrating the inter-frame neighbor point set update process in another exemplary embodiment of this application;

[0032] Figure 10 is a flowchart illustrating a motion vector decoding process in an exemplary embodiment of this application;

[0033] Figure 11 is a flowchart of a mesh coding method provided in an exemplary embodiment of this application;

[0034] Figure 12 shows a flowchart of the encoder's process for determining intra-frame neighbor vertices according to an exemplary embodiment of this application;

[0035] Figure 13 shows a flowchart of the decoder determining inter-frame neighbor vertices according to an exemplary embodiment of this application;

[0036] Figure 14 shows a flowchart of the decoder determining inter-frame neighbor vertices provided in another exemplary embodiment of this application;

[0037] Figure 15 is a flowchart illustrating a motion vector encoding process in an exemplary embodiment of this application;

[0038] Figure 16 shows a structural block diagram of a grid decoding apparatus provided in an exemplary embodiment of this application;

[0039] Figure 17 shows a structural block diagram of a grid coding apparatus provided in an exemplary embodiment of this application;

[0040] Figure 18 shows a structural block diagram of a decoder provided in an exemplary embodiment of this application;

[0041] Figure 19 shows a structural block diagram of an encoder provided in an exemplary embodiment of this application. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0043] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0044] For ease of understanding, the terms used in the embodiments of this application will be explained below.

[0045] 3D Mesh: A 3D mesh is the surface of a three-dimensional object composed of multiple polygons in space. A polygon consists of vertices and edges. In a 2D image, each pixel has its own information representation and distribution rules, so there's no need to record its position information separately. However, the distribution of vertices in a 3D mesh in 3D space is random and irregular, and the way the polygons are constructed requires additional specifications. Therefore, it's necessary to record the position of each vertex in space, as well as the connection information of each polygon, to fully represent the 3D mesh.

[0046] 3D mesh compression: At the encoding end, a base mesh and shift coefficients are first generated through preprocessing. The base mesh is obtained by downsampling the original mesh, resulting in a mesh with a significantly reduced number of vertices. After obtaining the base mesh, a subdivision algorithm is used to subdivide the base mesh, inserting newly generated vertices onto the edges of the base mesh. For each vertex in the subdivided mesh, the nearest vertex in the original mesh is found, and the vector between the nearest vertex in the subdivided mesh and the nearest vertex in the original mesh is determined as the shift coefficient.

[0047] Since the subdivision algorithm and the number of subdivision iterations are determined, the subdivision grid can be automatically generated at the encoder and decoder. Therefore, after preprocessing, the original grid only needs to be represented as a simple basic grid and a series of shift coefficients, which greatly reduces the amount of data to be transmitted without affecting the reconstruction at the decoder.

[0048] Intra-frame encoding / decoding: At the encoding end, the preprocessed base mesh is encoded using a draco encoder after two passes. The shift coefficients are encoded using HEVC after wavelet transform, quantization, and 2D mapping. At the decoding end, the base mesh bitstream is decoded by the draco decoder to generate the decoded base mesh. The shift coefficients are then decoded using HEVC decoding, inverse 2D mapping, inverse quantization, and inverse transform to generate decoded shift coefficients. Thus, a 3D mesh is reconstructed based on the decoded base mesh and shift coefficients.

[0049] Inter-frame encoding and decoding: At the encoding end, due to the use of inter-frame mode, it is no longer necessary to encode the connection information between vertices for the base mesh; 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 using HEVC after wavelet transform, quantization, and 2D mapping. At the decoding end, after decoding the motion vectors from the base mesh bitstream, they are combined with the vertex connection information of the reference base mesh to reconstruct the current base mesh. The shift coefficients are still generated by HEVC decoding, inverse 2D mapping, inverse quantization, and inverse transform, thereby reconstructing the 3D mesh based on the decoded base mesh and shift coefficients.

[0050] Motion vector: refers to the difference in geometric coordinates between a vertex in the current mesh and its corresponding vertex (with 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 ,Piy ,P iz (P') represents the geometric coordinates of vertex i in the current mesh. ix ,P′ iy ,P′ iz ) represents the geometric coordinates of vertex i in the reference mesh.

[0051] Current base mesh and reference base mesh: The current base mesh and the reference base mesh have the same vertex connection information, only the geometric coordinates of the vertices in the base mesh are different. As shown in Figure 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 relationships between the vertices are consistent.

[0052] Candidate intra-frame neighbor vertices: Based on the triangular face connection information of the base mesh, neighbor vertices that are connected to the current vertex and whose encoding / decoding order precedes the current vertex (i.e., the vertex index of the intra-frame neighbor vertex is less than or equal to the vertex index of the current vertex). As shown in Figure 1, in the current base mesh 101, the candidate intra-frame neighbor vertices of vertex 17 include vertices 1, 11, and 16, and the candidate intra-frame neighbor vertices of vertex 19 include vertices 4, 5, 7, 8, 9, and 10. During the encoding / decoding process, the encoder / decoder can predict the motion vector of the current point based on all or some of the candidate intra-frame neighbor points.

[0053] Candidate inter-frame neighbor vertices: These are the reference grid neighbor vertices of the current vertex in the current base grid, determined based on the triangular face connection information of the base grid. Reference grid neighbor vertices are those vertices in the reference base grid that have a connection relationship with the reference vertex corresponding to the current vertex in the current base grid. As shown in Figure 1, for vertex 17 in the current base grid 101, its candidate inter-frame neighbor vertices in the reference base grid 102 include vertices 17, 1, 11, 16, 18, and 21; for vertex 19 in the current base grid 101, its candidate inter-frame neighbor vertices in the reference base grid 102 include vertices 19, 4, 5, 7, 8, 9, and 10. During encoding and decoding, the codec can predict the motion vector of the current point based on all or some of the candidate inter-frame neighbor points.

[0054] In related technologies, each vertex in the current base grid corresponds to its own set of neighboring points. This set is initially empty, and the number of neighboring vertices in the set has an upper limit. The codec updates the neighboring vertices in the set by traversing the triangles (each consisting of three vertices) in the current base grid. Once all triangles in the current base grid have been traversed, the codec encodes and decodes the motion vector of the current vertex based on the neighboring vertices in the set corresponding to that vertex.

[0055] In an illustrative example, the encoding and decoding of the motion vector of the current vertex may include the following steps:

[0056] Step 1: Traverse the triangles in the base mesh based on the connection information of the base mesh.

[0057] Step 2: For each triangle, determine the vertex combination consisting of the triangle's vertices.

[0058] For example, for a triangle (v0, v1, v2), the determined vertex combinations include (v0, v1), (v0, v2), and (v1, v2), where v0, v1, and v2 are the vertex indices of the three vertices of the triangle, respectively.

[0059] Step 3: Determine whether the vertex with the smaller vertex index in the vertex combination belongs to the set of neighboring vertices of the vertex with the larger index.

[0060] Step 4: If the number of neighboring vertices in the neighbor set of a vertex with a larger index has not reached the upper limit, then add the vertex with the smaller index to the neighbor set.

[0061] For example, as shown in Figure 1, if the triangle (1,2,18) in the current base grid 101 is traversed, and this triangle is the first triangle traversed, for the vertex combination (1,2), the codec adds vertex 1 to the neighbor set of vertex 2; for the vertex combination (1,18), the codec adds vertex 1 to the neighbor set of vertex 18; and for the vertex combination (2,18), the codec adds vertex 2 to the neighbor set of vertex 18.

[0062] Step 5: If the number of neighbor vertices in the neighbor set of a vertex with a larger index reaches the upper limit, then replace the last neighbor vertex in the neighbor set with a vertex with a smaller index.

[0063] When the vertex indices added to the neighbor set of a vertex are A, B, and C respectively, and the maximum number of neighbor vertices in the neighbor set is 3, the arrangement of vertex indices in the neighbor set is as follows.

[0064] vertexAdjTableMotion[vertex*maxNumNeighborsMotion]=A

[0065] vertexAdjTableMotion[vertex*maxNumNeighborsMotion+1]=B

[0066] vertexAdjTableMotion[vertex*maxNumNeighborsMotion+2]=C

[0067] After replacing the last neighbor vertex in the neighbor set with a vertex having a smaller vertex index (e.g., vertex D), the vertex indices in the neighbor set are updated as follows:

[0068] vertexAdjTableMotion[vertex*maxNumNeighborsMotion]=A

[0069] vertexAdjTableMotion[vertex*maxNumNeighborsMotion+1]=B

[0070] vertexAdjTableMotion[vertex*maxNumNeighborsMotion+2]=D

[0071] As shown in Figure 1, if the current triangle is (20,21,17), and triangles (1,18,17), (14,15,21), (12,13,20), and (12,20,11) have been traversed previously, the neighbor set of vertex 20 contains [12,13,11], the neighbor set of vertex 21 contains [14,15], and the neighbor set of vertex 17 contains [1]. After completing the traversal of the current triangle (20,21,17), the neighbor set of vertex 20 contains [12,13,17], the neighbor set of vertex 21 contains [14,15,17], and the neighbor set of vertex 17 contains [1].

[0072] Step 6: After all triangles have been traversed, the motion vector of the current vertex is encoded or decoded based on the reconstructed motion vector values ​​(encoding process) or decoded motion vector values ​​(decoding process) of each neighbor vertex in the neighbor point set.

[0073] The codec can predict the motion vector of the current vertex based on the reconstructed or decoded motion vector values ​​of each neighboring vertex, and then perform motion vector encoding or decoding on the current vertex based on the predicted motion vector value.

[0074] Obviously, in the above method, the neighboring vertices used for motion vector prediction are determined from the candidate neighboring vertices based solely on the connection relationship between vertices. This cannot guarantee the accuracy of the motion vector prediction of the current vertex by the neighboring vertices. When the motion states of the determined neighboring vertices differ greatly from those of the current vertex, the accuracy of the motion vector prediction of the current vertex will be low, which in turn leads to low encoding and decoding efficiency.

[0075] Considering that vertices that are close to each other are more likely to have similar motion states than vertices that are far apart, the mesh encoding and decoding method provided in this application, in addition to determining neighboring vertices based on the connection information of the current mesh, also determines neighboring vertices based on the distance between vertices in the reference mesh of the current mesh. Introducing the distance between vertices as a filtering condition for neighboring vertices can increase the probability of selecting neighboring vertices with similar motion states from the candidate neighboring vertices, which helps to improve the accuracy of motion vector prediction of the current vertex, and thus improves the encoding and decoding efficiency of the 3D mesh.

[0076] Please refer to Figure 2, which shows a flowchart of a mesh decoding method provided in an exemplary embodiment of this application. The method is applied to a decoder and may include the following steps:

[0077] Step 201: The decoder determines the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid. The current vertex is a vertex in the current grid.

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

[0079] In some embodiments, when the decoding mode of the current frame is inter-frame decoding mode, the decoder obtains the connection information of the current grid in the current frame, as well as the reference grid in the reference frame of the current frame. The reference frame has been decoded prior to the current frame.

[0080] Since the current grid and the reference grid have the same connection information (the coordinates of the vertices are different), the decoder determines the connection information of the reference grid as the connection information of the current grid, without needing to decode the connection information of the current grid from the bitstream.

[0081] Since the reference mesh has been decoded before the current mesh, meaning the vertex coordinates of each vertex in the reference mesh have been decoded, the decoder can determine the distance between each vertex based on the vertex coordinates of each vertex.

[0082] In one possible implementation, the distance between vertices can be either Euclidean distance or Manhattan distance.

[0083] For example, the distance between vertices A(v0, v1, v2) and B(v3, v4, v5) can be expressed as: Alternatively, |v0-v3|+|v1-v4|+|v2-v5|, or (v0-v3) 2 +(v1-v4) 2 +(v2-v5)2 .

[0084] Of course, other distance calculation methods can be used between vertices, and this application does not limit this method.

[0085] In some embodiments, for the current vertex in the current grid, the decoder determines candidate neighbor vertices that are connected to the current vertex based on the connection information of the current grid, and further filters out neighbor vertices from the candidate neighbor vertices for predicting the motion vector of the current vertex based on the distance between vertices in the reference grid.

[0086] Each vertex has an upper limit on the number of its neighboring vertices (e.g., 3), and the number of neighboring vertices of different vertices may be the same or different.

[0087] Step 202: The decoder performs motion vector decoding on the current vertex based on the motion vector decoding values ​​of its neighboring vertices.

[0088] Among them, the motion vector decoded value is used to characterize the coordinate difference between a vertex and its corresponding co-located reference vertex.

[0089] Since the connection information of vertices in the reference grid is consistent with that in the current grid, neighboring vertices that are closer to the current vertex can be selected based on the distance between vertices in the reference grid. Furthermore, when using neighboring vertices that are closer to the current vertex to decode the motion vector, the prediction accuracy of the motion vector of the current vertex can be improved, thereby improving the efficiency of motion vector decoding of the vertex.

[0090] In some embodiments, the vertices in the base mesh are decoded for motion vectors 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.

[0091] Of course, in other embodiments, the vertices of the base mesh may not be grouped, or all vertices of the base mesh may be grouped together and motion vector decoding may be performed on all vertices of the base mesh.

[0092] In some embodiments, the decoder determines the motion vector decoding mode of the current vertex by parsing the bitstream. If the motion vector decoding mode indicates that motion vector decoding should not be skipped, the decoder determines the motion vector prediction mode adopted by the current vertex by parsing the bitstream. Then, under the motion vector prediction mode, the decoder performs motion vector decoding on the current vertex based on the motion vector decoding values ​​of the neighboring vertices.

[0093] Optionally, the motion vector prediction mode may include at least one of the following: no prediction, at least one intra-frame prediction mode, and at least one inter-frame prediction mode. This application does not limit the specific type of motion vector prediction mode.

[0094] In summary, in the embodiments of this application, since vertices that are close to each other have a higher probability of having similar motion states than vertices that are far apart, during the mesh encoding and decoding process, the encoder and decoder determines candidate neighbor vertices based on the connection information of the current mesh, and filters out the neighbor vertices of the current vertex from the candidate neighbor vertices based on the distance between vertices in the reference mesh. This can improve the probability of filtering out neighbor vertices that have similar motion states to the current vertex. Furthermore, using the filtered neighbor vertices to perform motion vector encoding and decoding on the current vertex helps to improve the efficiency of mesh encoding and decoding.

[0095] During decoding, the decoder can use either intra-frame prediction mode or inter-frame prediction mode to predict the motion vector of the current vertex. Accordingly, the decoder can determine neighboring vertices in two ways:

[0096] First, the decoder determines the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid. Intra-frame neighbor vertices belong to the current grid.

[0097] In this case, the vertex index of the neighboring vertex within the frame is less than the vertex index of the current vertex, meaning that the decoding of the neighboring vertex within the frame is completed between the current vertex.

[0098] In one possible implementation, in order to improve the prediction accuracy of motion vectors in intra-frame prediction mode, the decoder selects the n nearest intra-frame neighbor vertices from the candidate intra-frame neighbor vertices of the current vertex, where n is a positive integer.

[0099] In some embodiments, the distance between the collocated point of the current vertex in the reference grid and the collocated point of its intra-frame neighbor vertices in the reference grid is less than or equal to the distance between the collocated point of the current vertex in the reference grid and the collocated points of other candidate intra-frame neighbor vertices other than its intra-frame neighbor vertices in the reference grid. Here, collocated points refer to vertices with the same vertex index.

[0100] In an illustrative example, in the current grid, the candidate intra-frame neighbor vertices of the current vertex A include vertices B, C, D, E, F, and G, and the corresponding points of these vertices in the reference grid are a, b, c, d, e, f, and g, respectively.

[0101] In the reference mesh, the distance between vertex a and vertex b is dis. ab The distance between vertex a and vertex c is dis.ac The distance between vertex a and vertex d is dis ad The distance between vertex a and vertex e is dis. ae The distance between vertex a and vertex f is dis af The distance between vertex a and vertex g is dis. ag If dis ae >dis ab >dis ag >dis ac >dis ad >dis af Then the decoder will determine vertices E, B, and G as intra-frame neighbor vertices of the current vertex A.

[0102] In other embodiments, the weights of intra-frame neighbor vertices are greater than or equal to the weights of other candidate intra-frame neighbor vertices.

[0103] Optionally, the weight of an intra-frame neighbor vertex is the reciprocal of the distance between the current vertex at the same point in the reference grid and the distance between the intra-frame neighbor vertex at the same point in the reference grid. The weight of other candidate intra-frame neighbor vertices is the reciprocal of the distance between the current vertex at the same point in the reference grid and the distance between the other candidate intra-frame neighbor vertices at the same point in the reference grid.

[0104] Second, the decoder determines the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid. The inter-frame neighbor vertices belong to the reference grid.

[0105] Among them, the vertex index of the inter-frame neighbor vertex may be greater than, less than or equal to the vertex index of the current vertex.

[0106] In one possible implementation, in order to improve the prediction accuracy of motion vectors in the inter-frame prediction mode, the decoder selects the m inter-frame neighbor vertices that are closest to the corresponding point of the current vertex in the reference grid from the candidate inter-frame neighbor vertices of the current vertex, where m is a positive integer (m and n can be the same or different).

[0107] In some embodiments, the distance between the current vertex's co-location in the reference grid and its inter-frame neighbor vertices is less than or equal to the distance between the current vertex's co-location in the reference grid and other candidate inter-frame neighbor vertices other than its inter-frame neighbor vertices. Here, co-location refers to vertices with the same vertex index.

[0108] In an illustrative example, the co-location of the current vertex A in the current grid with vertex a in the reference grid, and the candidate inter-frame neighbor vertices of vertex A in the reference grid include vertices a, b, c, d, e, and f.

[0109] In the reference mesh, the distance between vertex a and vertex b is dis. ab The distance between vertex a and vertex c is dis. ac The distance between vertex a and vertex d is dis ad The distance between vertex a and vertex e is dis. ae The distance between vertex a and vertex f is dis af If dis ae >dis ab >dis ac >dis ad >dis af Then the decoder will determine vertices e, b, and c as the inter-frame neighbor vertices of the current vertex A.

[0110] In other embodiments, the weights corresponding to inter-frame neighbor vertices are greater than or equal to the weights corresponding to other candidate inter-frame neighbor vertices.

[0111] Optionally, the weight corresponding to the inter-frame neighbor vertex is the reciprocal of the distance between the current vertex's same point in the reference grid and the inter-frame neighbor vertex, and the weight corresponding to the other candidate inter-frame neighbor vertex is the reciprocal of the distance between the current vertex's same point in the reference grid and the other candidate inter-frame neighbor vertex.

[0112] Please refer to Figure 3, which illustrates a flowchart of an intra-frame neighbor vertex determination process provided in an exemplary embodiment of this application. This method is applied to a decoder and may include the following steps:

[0113] Step 301: The decoder determines the current triangle in the current grid based on the connection information of the current grid.

[0114] In some embodiments, the decoder traverses each triangle in the current grid sequentially based on the connection information of the current grid, where each triangle is composed of three vertices in the current grid. For each triangle, the decoder performs steps 302 to 304 as described below. In this embodiment, the currently traversed triangle is referred to as the current triangle.

[0115] Step 302: The decoder determines the vertex combinations formed by the vertices of the current triangle, each vertex combination containing two vertices of the current triangle.

[0116] In some embodiments, for the current triangle, the decoder combines the vertices of the current triangle in pairs based on a preset combination order to obtain a three-vertex combination.

[0117] In one possible implementation, if the current triangle is (v0, v1, v2), then the vertices of the triangle are combined in pairs according to a preset combination order, resulting in vertex combinations (v0, v1), (v0, v2), and (v1, v2). Here, v0, v1, and v2 are the three vertices of the triangle in a clockwise direction, or the three vertices of the triangle in a counterclockwise direction.

[0118] Step 303: The decoder determines the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination.

[0119] For the first vertex and the second vertex in the current vertex combination, the decoder determines the first corresponding point in the reference grid and the second corresponding point in the reference grid, wherein the first vertex and the first corresponding point have the same vertex index, and the second vertex and the second corresponding point have the same vertex index.

[0120] Furthermore, the decoder determines a first distance between two corresponding vertices based on their vertex coordinates. This first distance can be either Euclidean distance or Manhattan distance.

[0121] Step 304: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of neighboring points in the first frame corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of neighboring points in the first frame is equal to the first number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of neighboring points in the first frame, the decoder replaces the vertex index corresponding to the maximum distance in the set of neighboring points in the first frame with the vertex index of the second vertex.

[0122] In some embodiments, each vertex in the current grid is provided with a corresponding intra-neighbor set, and the intra-neighbor set is initially empty.

[0123] In one possible implementation, the decoder determines the larger and smaller vertex indices in a vertex combination by comparing the individual vertex indices of the two vertices. Further, the decoder determines whether the intra-neighbor set corresponding to the vertex with the larger vertex index contains the smaller vertex index.

[0124] Optionally, the decoder compares the smaller vertex index with the vertex indices in the intra-neighbor set to determine whether the smaller vertex index is included in the intra-neighbor set.

[0125] If the intra-neighbor set does not contain smaller vertex indices, and the number of vertex indices in the intra-neighbor set reaches the upper limit, the decoder needs to determine whether to update the vertex indices in the intra-neighbor set based on the distance.

[0126] In some embodiments, the decoder sorts the vertex indices in the intra-neighbor set based on the distances corresponding to each vertex index in the intra-neighbor set. The distance corresponding to a vertex index is the distance between the vertex at that index and the vertex with the larger index in the reference mesh, i.e., the distance between vertices in the vertex combination determined during the previous triangle traversal.

[0127] Optionally, the decoder sorts the vertex indices in the intra-frame neighbor set in descending order of distance (i.e., from largest to smallest distance).

[0128] The decoder compares the distances between corresponding points in the current vertex combination with the maximum distance corresponding to the set of intra-neighbor points. If the distances between corresponding points in the current vertex combination are less than or equal to the maximum distance corresponding to the set of intra-neighbor points, the decoder replaces the vertex index corresponding to the maximum distance in the set of intra-neighbor points with the smaller vertex index in the current vertex combination. After replacing the vertex index, the number of vertex indices in the set of intra-neighbor points remains at the maximum allowed.

[0129] When the vertex indices in the intra-neighbor set are sorted in descending order of distance, the maximum distance corresponding to the intra-neighbor set is the distance corresponding to the first vertex index of the intra-neighbor set.

[0130] In some embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex (i.e., the first vertex is a vertex with a larger vertex index and the second vertex is a vertex with a smaller vertex index), and the set of neighboring points in the first frame corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of neighboring points in the first frame is equal to a first number (i.e., the upper limit of the number of vertex indices is reached), and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of neighboring points in the first frame, the decoder replaces the vertex index corresponding to the maximum distance in the set of neighboring points in the first frame with the vertex index of the second vertex.

[0131] Optionally, after completing the vertex index replacement, the decoder sorts the vertex indices in the neighbor set within the first frame based on the distances corresponding to the vertex indices in the neighbor set within the first frame.

[0132] In an illustrative example, the process of updating the intra-frame neighbor point set is shown in Figure 4.

[0133] S401, the decoder obtains the current vertex combination (v1, v2), where v1 > v2.

[0134] S402, the decoder calculates the distance dis21 between corresponding points of vertex v1 and vertex v2 in the reference mesh.

[0135] S403, the decoder obtains the set of intra-frame neighbor points [v0, v3, v4] of vertex v1, and the distance dis01 corresponding to vertex index v0 (the distance between vertex v0 and vertex v1 at corresponding points in the reference grid) ≥ the distance dis31 corresponding to vertex index v3 (the distance between vertex v3 and vertex v1 at corresponding points in the reference grid) ≥ the distance dis41 corresponding to vertex index v4 (the distance between vertex v4 and vertex v1 at corresponding points in the reference grid).

[0136] S404, the decoder compares the size of dis21 with the size of dis01.

[0137] S405, when dis21≤dis01, the decoder updates the set of intra-frame neighbors of vertex v1, replacing vertex index v0 with v2.

[0138] S406, the decoder sorts the vertex indices in the set of intra-frame neighbor points based on the distances corresponding to each updated vertex index.

[0139] S407, the decoder updates the intra-frame neighbor set of vertex v1 to [v3, v2, v4], where the distance dis31 corresponding to vertex index v3 is greater than or equal to the distance dis21 corresponding to vertex index v2 and greater than or equal to the distance dis41 corresponding to vertex index v4.

[0140] Step 305: After all triangles in the current grid have been traversed, the decoder determines the intra-frame neighbor vertices of the current vertex based on the vertex index in the intra-frame neighbor set corresponding to the current vertex.

[0141] The decoder repeats the above steps to complete the traversal of all triangles in the current grid. Upon completion of the traversal, the decoder identifies the vertex indicated by the vertex index in the set of intra-neighbor points corresponding to the current vertex as the intra-neighbor vertex of the current vertex.

[0142] In addition to updating the intra-frame neighbor set as described in step 304 above, in some embodiments, when the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first intra-frame neighbor set is equal to a first number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first intra-frame neighbor set, the decoder maintains the first intra-frame neighbor set, that is, the decoder does not need to add the vertex index of the second vertex to the first intra-frame neighbor set.

[0143] Schematic, based on Figure 4, as shown in Figure 5, in S408, when dis21≥dis01, the decoder maintains the set of intra-frame neighbor points [v0, v2, v4] of vertex v1.

[0144] In other embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of intra-frame neighbor points is less than a first number, the decoder adds the vertex index of the second vertex to the set of intra-frame neighbor points. Correspondingly, the number of vertex indices in the set of intra-frame neighbor points is incremented by one.

[0145] Optionally, after adding the vertex index of the second vertex to the set of neighboring points in the first frame, the decoder sorts the vertex indices based on the distances corresponding to each vertex index in the set of neighboring points in the first frame.

[0146] In an illustrative example, the process of updating the intra-frame neighbor point set is shown in Figure 6.

[0147] S601, the decoder obtains the current vertex combination (v1, v3), where v1 > v3.

[0148] S602, the decoder calculates the distance dis31 between the corresponding points of vertex v1 and vertex v3 in the reference grid.

[0149] S603, the decoder obtains the set of intra-frame neighbor points [v0, v4] of vertex v1, and the distance dis01 corresponding to vertex index v0 (the distance between vertex v0 and vertex v1 at corresponding points in the reference grid) is greater than or equal to the distance dis41 corresponding to vertex index v4 (the distance between vertex v4 and vertex v1 at corresponding points in the reference grid).

[0150] S604, since the number of vertex indices in the intra-neighbor set of vertex v1 has not reached the upper limit (e.g., 3), the decoder adds vertex index v3 to the intra-neighbor set to obtain the intra-neighbor set [v0, v4, v3].

[0151] S605, the decoder sorts the vertex indices in the set of neighboring points within the frame based on the distances corresponding to each updated vertex index.

[0152] S606, the decoder updates the intra-frame neighbor set of vertex v1 to [v0, v3, v4], where the distance dis01 corresponding to vertex index v0 is greater than or equal to the distance dis31 corresponding to vertex index v3 and greater than or equal to the distance dis41 corresponding to vertex index v4.

[0153] In some other embodiments, when the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex contains the vertex index of the second vertex, the decoder maintains the set of intra-frame neighbor points to avoid duplicate vertex indices in the same set of intra-frame neighbor points.

[0154] In this embodiment, the decoder selects several intra-frame neighbor vertices that are closest to the current vertex from the candidate intra-frame neighbor vertices of the current vertex based on the distance between vertices in the reference grid. Since the selected intra-frame neighbor vertices have a high probability of having similar motion states to the current vertex, the accuracy of subsequent intra-frame motion vector prediction using the selected intra-frame neighbor vertices is high, which helps to improve decoding efficiency.

[0155] It should be noted that, in the above embodiments, the example of the decoder updating the intra-neighbor set based on distance and sorting the vertex indices in the set is used for illustration. In other possible embodiments, the decoder can determine whether to update the intra-neighbor set and sort the vertex indices in the set based on the weight corresponding to the vertex index (which can be the reciprocal of the distance between corresponding points of vertices).

[0156] In some embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of neighboring points in the first frame corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of neighboring points in the first frame is equal to a first quantity, and the first weight is greater than or equal to the minimum weight corresponding to the vertex index in the set of neighboring points in the first frame, the vertex index corresponding to the minimum weight in the set of neighboring points in the first frame is replaced with the vertex index of the second vertex.

[0157] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of neighboring points in the first frame corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of neighboring points in the first frame is equal to the first quantity, and the first weight is less than or equal to the minimum weight corresponding to the vertex index in the set of neighboring points in the first frame, then the set of neighboring points in the first frame is maintained.

[0158] In some embodiments, the vertex indices in the neighbor set within the first frame are sorted based on the weights corresponding to the vertex indices in the neighbor set within the first frame.

[0159] Optionally, the weight corresponding to the smaller vertex index is the reciprocal of the distance between the corresponding points of the two vertices in the reference grid. For example, in the current vertex combination (where the vertex index of the first vertex is greater than the vertex index of the second vertex), the weight corresponding to the second vertex is: the reciprocal of the first distance between the corresponding points of the first and second vertices in the reference grid.

[0160] In one possible implementation, in inter-frame prediction mode, the decoder can reuse the method used in intra-frame prediction mode to determine the intra-frame neighbor vertices and determine the inter-frame neighbor vertices of the current vertex.

[0161] Please refer to Figure 7, which illustrates a flowchart of an inter-frame neighbor vertex determination process provided in an exemplary embodiment of this application. This method is applied to a decoder and may include the following steps:

[0162] Step 701: The decoder determines the current triangle in the current grid based on the connection information of the current grid.

[0163] Step 702: The decoder determines the vertex combinations formed by the vertices of the current triangle, each vertex combination containing two vertices of the current triangle.

[0164] Step 703: The decoder determines the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination.

[0165] The implementation process of steps 701 to 703 above can refer to steps 301 to 303, and will not be repeated here in this embodiment.

[0166] Step 704: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the decoder replaces the vertex index corresponding to the maximum distance in the first inter-frame neighbor set with the vertex index of the second vertex.

[0167] In some embodiments, each vertex in the current grid is provided with a corresponding set of inter-frame neighbor points, and the set of inter-frame neighbor points is initially empty.

[0168] In one possible implementation, the decoder determines the larger and smaller vertex indices in a vertex combination by comparing the individual vertex indices of the two vertices. Further, the decoder determines whether the set of inter-frame neighbor points corresponding to the vertex with the larger vertex index contains the smaller vertex index.

[0169] Optionally, the decoder compares the smaller vertex index with the vertex indices in the inter-frame neighbor set to determine whether the smaller vertex index is included in the inter-frame neighbor set.

[0170] If the inter-frame neighbor set does not contain smaller vertex indices, and the number of vertex indices in the inter-frame neighbor set reaches the upper limit, the decoder needs to determine whether to update the vertex indices in the inter-frame neighbor set based on the distance.

[0171] In some embodiments, the decoder sorts the vertex indices in the inter-frame neighbor set based on the distances corresponding to each vertex index in the inter-frame neighbor set. The distance corresponding to a vertex index is the distance between the vertex at that index and the vertex with the larger index in the reference mesh, i.e., the distance between vertices in the vertex combination determined during the previous triangle traversal.

[0172] Optionally, the decoder sorts the vertex indices in the inter-frame neighbor set in descending order of distance (i.e., from largest to smallest distance).

[0173] The decoder compares the distances between corresponding points in the current vertex combination with the maximum distance in the inter-frame neighbor set. If the distances between corresponding points in the current vertex combination are less than or equal to the maximum distance in the inter-frame neighbor set, the decoder replaces the vertex index corresponding to the maximum distance in the inter-frame neighbor set with the smaller vertex index in the current vertex combination. After replacing the vertex index, the number of vertex indices in the inter-frame neighbor set remains at the maximum allowed.

[0174] When the vertex indices in the inter-frame neighbor set are sorted in descending order of distance, the maximum distance corresponding to the inter-frame neighbor set is the distance corresponding to the first vertex index in the inter-frame neighbor set.

[0175] In some embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex (i.e., the first vertex has a larger vertex index and the second vertex has a smaller vertex index), and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number (i.e., reaching the upper limit of the number of vertex indices), and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the decoder replaces the vertex index corresponding to the maximum distance in the first inter-frame neighbor set with the vertex index of the second vertex. The second number may be the same as or different from the first number.

[0176] Optionally, after completing the vertex index replacement, the decoder sorts the vertex indices in the first inter-frame neighbor set based on the distances corresponding to the vertex indices in the first inter-frame neighbor set.

[0177] Step 705: After all triangles in the current grid have been traversed, the decoder determines the inter-frame neighbor vertices of the current vertex based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

[0178] The decoder repeats the above steps to complete the traversal of all triangles in the current grid. Upon completion of the traversal, the decoder identifies the vertex indicated by the vertex index in the set of inter-frame neighbors corresponding to the current vertex as the current vertex's inter-frame neighbor vertex.

[0179] In addition to updating the inter-frame neighbor set as described in step 704 above, in some embodiments, when the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the decoder maintains the first inter-frame neighbor set, that is, the decoder does not need to add the vertex index of the second vertex to the first inter-frame neighbor set.

[0180] In other embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is less than a second number, the decoder adds the vertex index of the second vertex to the first inter-frame neighbor set. Correspondingly, the number of vertex indices in the first inter-frame neighbor set is incremented by one.

[0181] Optionally, after adding the vertex index of the second vertex to the set of inter-frame neighbor points, the decoder sorts the vertex indices based on the distances corresponding to each vertex index in the set of inter-frame neighbor points.

[0182] Since inter-frame neighbor vertices belong to the reference grid, and the reference grid has been decoded before the current grid, that is, when decoding the vertices in the current grid, the decoder can obtain the motion vector decoding values ​​of each vertex in the reference grid. Therefore, there is no need to restrict the smaller index vertex to be the neighbor vertex of the larger index vertex.

[0183] In another possible implementation, in inter-frame prediction mode, the decoder can use a different neighbor vertex determination method than in intra-frame prediction mode to determine the inter-frame neighbor vertices of the current vertex.

[0184] Please refer to Figure 8, which illustrates a flowchart of an inter-frame neighbor vertex determination process provided in another exemplary embodiment of this application. This method is applied to a decoder and may include the following steps:

[0185] Step 801: The decoder determines the current triangle in the current grid based on the connection information of the current grid.

[0186] Step 802: The decoder determines the vertex combinations formed by the vertices of the current triangle, each vertex combination containing two vertices of the current triangle.

[0187] Step 803: The decoder determines the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination.

[0188] The implementation process of steps 801 to 803 above can refer to steps 301 to 303, and will not be repeated here in this embodiment.

[0189] Step 804: If the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the decoder replaces the vertex index corresponding to the maximum distance in the first inter-frame neighbor set with the vertex index of the second vertex.

[0190] Step 805: If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, the decoder replaces the vertex index corresponding to the maximum distance in the second inter-frame neighbor set with the vertex index of the first vertex.

[0191] In one possible implementation, for each vertex in the current vertex combination, the decoder determines whether the inter-frame neighbor point set corresponding to one vertex contains the vertex index of the other vertex, that is, it detects whether the vertex indices of the vertices in the vertex combination exist in each other's inter-frame neighbor point sets.

[0192] If the inter-frame neighbor set corresponding to one vertex does not contain the vertex index of the other vertex, and the number of vertex indices in the inter-frame neighbor set reaches the upper limit, the decoder needs to determine whether to update the vertex indices in the inter-frame neighbor set based on the distance.

[0193] The decoder compares the distances between corresponding points of vertices in the current vertex combination with the maximum distance corresponding to the inter-frame neighbor set. If the distances between corresponding points of vertices in the current vertex combination are less than or equal to the maximum distance corresponding to the inter-frame neighbor set, the decoder replaces the vertex index corresponding to the maximum distance in the inter-frame neighbor set with the vertex index of another vertex in the current vertex combination. After replacing the vertex index, the number of vertex indices in the inter-frame neighbor set remains at the maximum limit.

[0194] In some embodiments, the decoder sorts the vertex indices in the inter-frame neighbor set based on the distances corresponding to each vertex index in the inter-frame neighbor set. The distances corresponding to the vertex indices are the distances between vertices in the vertex combinations determined during the previous triangle traversal.

[0195] Optionally, the decoder sorts the vertex indices in the inter-frame neighbor set in descending order of distance (i.e., from largest to smallest distance).

[0196] When the vertex indices in the inter-frame neighbor set are sorted in descending order of distance, the maximum distance corresponding to the inter-frame neighbor set is the distance corresponding to the first vertex index in the inter-frame neighbor set.

[0197] Optionally, the upper limit of the number of vertex indices in the inter-frame neighbor set can be the same as the upper limit of the number of vertex indices in the intra-frame neighbor set; for example, the upper limit of the number of vertex indices in both the inter-frame and intra-frame neighbor sets can be 3. Alternatively, the upper limit of the number of vertex indices in the inter-frame neighbor set can be different from the upper limit of the number of vertex indices in the intra-frame neighbor set; for example, the upper limit of the number of vertex indices in the inter-frame neighbor set can be 3, and the upper limit of the number of vertex indices in the intra-frame neighbor set can be 4. That is, the second number can be the same as or different from the first number.

[0198] Optionally, after completing the vertex index replacement, the decoder sorts the vertex indices in the first inter-frame neighbor set based on the distances corresponding to the vertex indices in the first inter-frame neighbor set (updating the first inter-frame neighbor set), and / or, the decoder sorts the vertex indices in the second inter-frame neighbor set based on the distances corresponding to the vertex indices in the second inter-frame neighbor set (updating the second inter-frame neighbor set), to facilitate distance comparison during subsequent traversal.

[0199] In an illustrative example, the process of updating the inter-frame neighbor point set is shown in Figure 9.

[0200] S901, the decoder obtains the current vertex combination (v1, v2).

[0201] S902, the decoder calculates the distance dis21 between corresponding points of vertex v1 and vertex v2 in the reference mesh.

[0202] S903, the decoder obtains the set of inter-frame neighbor points [v0, v3, v4] of vertex v1, and the distance dis01 corresponding to vertex index v0 (the distance between vertex v1 and vertex v0 in the reference grid) is greater than or equal to the distance dis31 corresponding to vertex index v3 (the distance between vertex v1 and vertex v3 in the reference grid) and the distance dis41 corresponding to vertex index v4 (the distance between vertex v1 and vertex v4 in the reference grid).

[0203] S904, the decoder compares the size of dis21 with dis01.

[0204] S905, when dis21≤dis01, the decoder updates the set of inter-frame neighbor points of vertex v1 and replaces vertex index v0 with v2.

[0205] S906, the decoder sorts the vertex indices in the inter-frame neighbor set based on the distances corresponding to each updated vertex index.

[0206] S907, the decoder updates the set of inter-frame neighbor points of vertex v1 to [v3, v2, v4], where the distance dis31 corresponding to vertex index v3 is greater than or equal to the distance dis21 corresponding to vertex index v2 and greater than or equal to the distance dis41 corresponding to vertex index v4.

[0207] S908, the decoder obtains the set of inter-frame neighbor points [v5, v6, v7] of vertex v2, and the distance dis52 corresponding to vertex index v5 (the distance between vertex v2 and vertex v5 in the reference grid) is greater than or equal to the distance dis62 corresponding to vertex index v6 ​​(the distance between vertex v2 and vertex v6 ​​in the reference grid) and the distance dis72 corresponding to vertex index v7 (the distance between vertex v2 and vertex v7 in the reference grid).

[0208] S909, the decoder compares the size of dis21 with dis52.

[0209] S910, when dis21≤dis52, the decoder updates the set of inter-frame neighbor points of vertex v2, replacing vertex index v5 with v1.

[0210] S911, the decoder sorts the vertex indices in the inter-frame neighbor set based on the distances corresponding to each updated vertex index.

[0211] S912, the decoder updates the set of inter-frame neighbor points of vertex v2 to [v6, v7, v1], where the distance dis62 corresponding to vertex index v6 ​​is greater than or equal to the distance dis72 corresponding to vertex index v7 and greater than or equal to the distance dis21 corresponding to vertex index v1.

[0212] Step 806: After all triangles in the current grid have been traversed, the decoder determines the inter-frame neighbor vertex of the current vertex based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

[0213] The implementation method of this step can refer to step 705 above, and will not be repeated here.

[0214] In addition to updating the inter-frame neighbor set as described in steps 804 and 805 above, in some embodiments, when the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is less than the second number, the decoder adds the vertex index of the second vertex to the first inter-frame neighbor set. Correspondingly, the number of vertex indices in the first inter-frame neighbor set is incremented by one.

[0215] If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is less than the second number, then the vertex index of the first vertex is added to the second inter-frame neighbor set. Correspondingly, the number of vertex indices in the second inter-frame neighbor set is incremented by one.

[0216] Optionally, to facilitate distance comparisons during subsequent traversal, after adding the vertex index of the first vertex to the second inter-frame neighbor set, the decoder sorts the vertex indices in the second inter-frame neighbor set based on the distances corresponding to the vertex indices in the second inter-frame neighbor set. Similarly, after adding the vertex index of the second vertex to the first inter-frame neighbor set, the decoder sorts the vertex indices in the first inter-frame neighbor set based on the distances corresponding to the vertex indices in the first inter-frame neighbor set.

[0217] In addition to needing to update the inter-frame neighbor set in the above situations, in some embodiments, when the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the decoder maintains the first inter-frame neighbor set.

[0218] If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, the decoder maintains the second inter-frame neighbor set.

[0219] In some embodiments, if the first inter-frame neighbor set corresponding to the first vertex contains the vertex index of the second vertex, the decoder maintains the first inter-frame neighbor set; or, if the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the decoder maintains the second inter-frame neighbor set to avoid duplicate neighbor vertices in the same inter-frame neighbor set.

[0220] Furthermore, in the process of determining inter-frame neighbor points, for a vertex combination (A, B), if the inter-frame neighbor point set corresponding to vertex A contains the vertex index of vertex B, while the inter-frame neighbor point set corresponding to vertex B does not contain the vertex index of vertex A, it indicates that the other triangles traversed previously contain the vertex combination (A, B). However, vertex A was not added to the inter-frame neighbor point set corresponding to vertex B because the distance between vertex A and vertex B is too large. Alternatively, vertex A was first added to the inter-frame neighbor point set corresponding to vertex B, but was subsequently replaced by a vertex with a smaller distance during traversal.

[0221] Therefore, when the vertex combination (A, B) is traversed again, the decoder does not need to compare the distance between vertices A and B with the maximum distance of the vertex index in the inter-frame neighbor set corresponding to vertex B (even if it is compared, it will not be added to the inter-frame neighbor set because the distance is too large). Instead, it keeps the inter-frame neighbor sets corresponding to the two vertices unchanged.

[0222] In other embodiments, if the first inter-frame neighbor set corresponding to the first vertex contains the vertex index of the second vertex, the decoder maintains the first inter-frame neighbor set and the second inter-frame neighbor set; or, if the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the decoder maintains the first inter-frame neighbor set and the second inter-frame neighbor set to avoid duplicate neighbor vertices in the same inter-frame neighbor set.

[0223] In this embodiment, the decoder selects several inter-frame neighbor vertices that are closest to the current vertex from the candidate inter-frame neighbor vertices of the current vertex based on the distance between vertices in the reference grid. Since the selected inter-frame neighbor vertices have a high probability of having similar motion states to the current vertex, the accuracy of subsequent inter-frame motion vector prediction using the selected inter-frame neighbor vertices is high, which helps to improve decoding efficiency.

[0224] During the process of generating the intra-neighbor set of the current vertex based on vertex combinations, it is impossible to add the same point of the current vertex in the reference grid to the intra-neighbor set. However, in reality, this same point usually has a similar motion state to the current vertex. Therefore, in order to improve the accuracy of subsequent inter-frame motion vector prediction, in one possible implementation, the inter-frame neighbor vertices of the current vertex include at least the same point of the current vertex in the reference grid.

[0225] In some embodiments, after the decoder generates the set of inter-frame neighbor points corresponding to the current vertex based on the vertex combination, it adds the vertex index of the current vertex to the set of inter-frame neighbor points, that is, it determines the corresponding point of the current vertex in the reference grid as the inter-frame neighbor vertex of the current vertex.

[0226] In other embodiments, when initializing the inter-frame neighbor set for each vertex, the decoder adds the vertex index of the current vertex to the inter-frame neighbor set and sets the distance corresponding to that vertex index to 0. The decoder then updates the initialized inter-frame neighbor set based on the vertex combinations. Since the distance between vertices in a vertex combination is always greater than 0, the vertex index of the current vertex will not be removed from the inter-frame neighbor set.

[0227] In some embodiments, the (intra-frame and inter-frame) neighbor set corresponds to a distance set, which includes the distances corresponding to the vertex indices in the intra-frame neighbor set.

[0228] Optionally, the vertex indices in the neighbor set and the distances in the distance set are arranged in order, so that the decoder can obtain the distance corresponding to the vertex index from the distance set based on the position of the vertex index in the neighbor set.

[0229] In some embodiments, the neighbor set and the distance set are ordered according to a uniform rule. For example, the distances in the distance set are sorted in descending order, and the vertex indices in the neighbor set are sorted in descending order of their corresponding distances.

[0230] In other embodiments, the neighbor set and the distance set are ordered according to different rules. For example, the distances in the distance set are sorted in descending order, while the vertex indices in the neighbor set are sorted in ascending order of their corresponding distances.

[0231] It should be noted that in the above embodiments, when the vertex index in the neighbor set changes (including adding a vertex index or replacing a vertex index), the decoder needs to re-sort the vertex index in the neighbor set (for example, sorting it in descending order according to the distance corresponding to the vertex index).

[0232] Figure 10 is a flowchart illustrating a motion vector decoding process according to an exemplary embodiment of this application. The method is applied to a decoder and may include the following steps:

[0233] Step 1001: The decoder parses the bitstream and determines the motion vector difference of the current vertex.

[0234] The motion vector difference is the difference between the original value of the motion vector of the current vertex and the predicted value of the motion vector.

[0235] Step 1002: The decoder determines the motion vector prediction value of the current vertex based on the motion vector decoding values ​​of its neighboring vertices.

[0236] Since the selected neighboring vertices all completed motion vector decoding before the current vertex, and vertices that are close to each other usually have similar motion states, the decoder can predict the motion vector of the current vertex based on the motion vector decoding values ​​of the neighboring vertices, thus obtaining the motion vector prediction value. Specifically, the encoder and decoder predict the motion vector of the current vertex based on the same neighboring vertices and the same motion vector prediction mode to ensure consistency between the encoder and decoder.

[0237] In some embodiments, the decoder parses the bitstream to determine the motion vector mode used by the current vertex. Optionally, the encoder may write syntax elements indicating the motion vector mode used by vertices within a group into the bitstream.

[0238] In some embodiments, the coordinate dimensions (x, y, z) of the current vertex adopt a unified motion vector prediction mode, or the coordinate dimensions of the current vertex adopt their own motion vector prediction modes.

[0239] For example, all coordinate dimensions of the current vertex adopt the inter-frame prediction mode of motion vectors; or, the coordinate dimensions x and y of the current vertex adopt the inter-frame prediction mode of motion vectors, and the coordinate dimension z of the current vertex adopts the inter-frame prediction mode of motion vectors; or, the coordinate dimension x of the current vertex adopts the first inter-frame prediction mode of motion vectors, the coordinate dimension y of the current vertex adopts the second inter-frame prediction mode of motion vectors, and the coordinate dimension z of the current vertex adopts the intra-frame prediction mode of motion vectors.

[0240] In some embodiments, the decoder may perform motion vector prediction in at least one of the following ways.

[0241] Method 1: The decoder uses the motion vector decoding value of the specified neighboring vertex as the motion vector prediction value of the current vertex.

[0242] In one possible implementation, the decoder determines a specified neighbor vertex from the filtered neighbor vertices, and then determines the motion vector decoded value of the specified neighbor vertex as the motion vector prediction value of the current vertex. That is, the motion vector prediction value (P) of the current vertex. x P y P z This can be represented as:

[0243] in, The motion vector decoding value for the specified neighboring vertices of the current vertex.

[0244] Optionally, when using the motion vector intra-frame prediction mode, the decoder determines the specified intra-frame neighbor vertex from the intra-frame neighbor vertices of the current vertex; when using the motion vector inter-frame prediction mode, the decoder determines the specified inter-frame neighbor vertex from the inter-frame neighbor vertices of the current vertex.

[0245] In some embodiments, when using the motion vector intra-prediction mode, the decoder determines the specified intra-neighbor vertex based on the distance between the current vertex and the corresponding point of the intra-neighbor vertex in the reference grid.

[0246] Optionally, the decoder determines the minimum distance between corresponding points and identifies the intra-neighbor vertex corresponding to the minimum distance as the specified intra-neighbor vertex.

[0247] Of course, the encoder and decoder can also determine the neighboring vertices within a specified frame based on the distance between the same points and a unified selection criterion, but this application embodiment does not limit this.

[0248] In some embodiments, when using the motion vector inter-frame prediction mode, the decoder determines the specified inter-frame neighbor vertex based on the distance between the current vertex's co-location in the reference grid and its inter-frame neighbor vertex.

[0249] Optionally, the decoder determines the minimum distance between the current vertex's co-location in the reference grid and its inter-frame neighbor vertices, and identifies the inter-frame neighbor vertex corresponding to the minimum distance as the specified inter-frame neighbor vertex.

[0250] Of course, the encoder and decoder can also determine the specified inter-frame neighbor vertex based on the distance between the current vertex and its inter-frame neighbor vertex in the reference grid, as well as a unified selection criterion. This application embodiment does not limit this.

[0251] Method 2: The decoder determines the motion vector prediction value of the current vertex based on the motion vector decoding values ​​of all or some of the neighboring vertices of the current vertex.

[0252] Optionally, when using the intra-frame motion vector prediction mode, the decoder determines the motion vector prediction value of the current vertex based on the motion vector decoding values ​​of all or some of the intra-frame neighbor vertices; when using the inter-frame motion vector prediction mode, the decoder determines the motion vector prediction value of the current vertex based on the motion vector decoding values ​​of all or some of the inter-frame neighbor vertices.

[0253] In one possible implementation, the decoder can perform an offset-free weighted average of the motion vector decoded values ​​of all or some of the neighboring vertices obtained from the filtering process, and determine the result as the predicted motion vector value of the current vertex.

[0254] In an illustrative example, the predicted motion vector value (P) of the current vertex x P y P z This can be represented as:

[0255] Wherein, predCount is the total number of all or some of the neighboring vertices of the current vertex (i.e., the number of neighboring vertices used for motion vector prediction), and when predCount is 0, the motion vector prediction value is 0; This is the decoded value of the motion vector of the i-th neighboring vertex of the current vertex.

[0256] Regarding the selection method of some neighboring vertices, in some embodiments, in the motion vector intra-frame prediction mode, the decoder determines some intra-frame neighboring vertices based on the distance between the current vertex and the corresponding point of the intra-frame neighboring vertices in the reference grid; in the motion vector inter-frame prediction mode, the decoder determines some inter-frame neighboring vertices based on the distance between the corresponding point of the current vertex in the reference grid and the inter-frame neighboring vertices.

[0257] Optionally, the decoder can sort neighboring vertices in descending order based on distance (intra-frame or inter-frame), and determine the motion vector prediction value of the current vertex based on the motion vector decoding values ​​of the last k neighboring vertices (intra-frame or inter-frame). Here, k is an integer greater than or equal to 1, and when the number of neighboring vertices of the current vertex is less than k, motion vector prediction of the current vertex is performed based on the motion vector decoding values ​​of all neighboring vertices.

[0258] Method 3: The decoder determines the motion vector prediction value of the current vertex based on the motion vector decoding values ​​of all or some of the neighboring vertices, as well as the offset. The offset is determined based on the number of all or some of the neighboring vertices.

[0259] Building upon Method 2, the decoder can further add an offset to the motion vector prediction process. This offset is related to the number of neighboring vertices used for motion vector prediction. For example, when the number of neighboring vertices used for motion vector prediction is predCount, the offset bias = predCount >> 1.

[0260] In one possible implementation, the decoder can perform an offset-weighted average of the motion vector decoded values ​​of all or some of the neighboring vertices obtained from the filtering process, and determine the result as the predicted motion vector value of the current vertex.

[0261] In an illustrative example, the predicted motion vector value (P) of the current vertexx P y P z This can be represented as:

[0262] Wherein, predCount is the total number of all or some of the neighboring vertices of the current vertex (i.e., the number of neighboring vertices used for motion vector prediction), and when predCount is 0, the motion vector prediction value is 0; The motion vector decoding value of the i-th neighboring vertex of the current vertex; bias = predCount >> 1. Furthermore, in When it is positive, "±" is taken as positive. When the value is negative, "±" is negative.

[0263] Regarding the selection method of some neighboring vertices, in some embodiments, in the motion vector intra-frame prediction mode, the decoder determines some intra-frame neighboring vertices based on the distance between the current vertex and the corresponding points of its intra-frame neighboring vertices in the reference grid; in the motion vector inter-frame prediction mode, the decoder determines some inter-frame neighboring vertices based on the distance between the corresponding points of the current vertex in the reference grid and the inter-frame neighboring vertices. Details of the selection method can be found in method 2, and will not be elaborated here.

[0264] It should be noted that, in addition to the three motion vector prediction modes mentioned above, the decoder may also use other motion vector prediction modes, such as no prediction, other types of intra-frame motion vector prediction modes, or other types of inter-frame motion vector prediction modes, etc. The embodiments of this application do not limit this.

[0265] Step 1003: The decoder determines the motion vector decoded value of the current vertex based on the motion vector difference and the motion vector prediction value.

[0266] Optionally, the decoder determines the motion vector decoded value of the current vertex by summing the motion vector difference with the motion vector prediction value.

[0267] Furthermore, in some embodiments, the decoder determines the vertex coordinates of the current vertex based on the vertex coordinates of the corresponding point of the current vertex in the reference mesh and the motion vector decoding value, thereby completing the vertex coordinate decoding of the current vertex.

[0268] Please refer to Figure 11, which shows a flowchart of a mesh encoding method provided in an exemplary embodiment of this application. The method is applied to an encoder and may include the following steps:

[0269] Step 1101: The encoder determines the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid. The current vertex is a vertex in the current grid.

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

[0271] In some embodiments, when the decoding mode of the current frame is inter-frame coding mode, the encoder obtains the connection information of the current grid in the current frame, as well as the reference grid in the reference frame of the current frame. The reference frame has been encoded prior to the current frame.

[0272] Since the current mesh and the reference mesh have the same connection information (but the coordinates of the vertices are different), the encoder determines the connection information of the reference mesh as the connection information of the current mesh.

[0273] Since the reference mesh has been encoded before the current mesh is decoded, the encoder can determine the distance between vertices based on their vertex coordinates. These vertex coordinates are the reconstructed values ​​of the vertices during the encoding process.

[0274] In one possible implementation, the distance between vertices can be either Euclidean distance or Manhattan distance.

[0275] For example, the distance between vertices A(v0, v1, v2) and B(v3, v4, v5) can be expressed as: Alternatively, |v0-v3|+|v1-v4|+|v2-v5|, or (v0-v3) 2 +(v1-v4) 2 +(v2-v5) 2 .

[0276] Of course, other distance calculation methods can be used between vertices, and this application does not limit this method.

[0277] In some embodiments, for the current vertex in the current grid, the encoder determines candidate neighbor vertices that are connected to the current vertex based on the connection information of the current grid, and further filters out neighbor vertices from the candidate neighbor vertices for predicting the motion vector of the current vertex based on the distance between vertices in the reference grid.

[0278] Each vertex has an upper limit on the number of its neighboring vertices (e.g., 3), and the number of neighboring vertices of different vertices may be the same or different.

[0279] Step 1102: The encoder performs motion vector encoding on the current vertex based on the motion vector reconstruction values ​​of the neighboring vertices.

[0280] The motion vector reconstruction value is used to characterize the coordinate difference between a vertex and its corresponding co-located reference vertex, and this motion vector reconstruction value is obtained by the encoder during the encoding process.

[0281] Since the connection information of vertices in the reference grid is consistent with that in the current grid, neighboring vertices closer to the current vertex can be selected based on the distance between vertices in the reference grid. Furthermore, using neighboring vertices closer to the current vertex to encode the motion vector of the current vertex can improve the prediction accuracy of the motion vector of the current vertex, thereby improving the efficiency of motion vector encoding of the vertex.

[0282] In some embodiments, the vertices in the base mesh are encoded into motion vectors 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.

[0283] Of course, in other embodiments, the vertices of the base mesh may not be grouped, or all vertices of the base mesh may be grouped together and motion vector encoding may be performed on all vertices of the base mesh.

[0284] In some embodiments, if the encoder determines that the motion vector encoding method of the current vertex is to not skip motion vector encoding, it further determines the motion vector prediction mode adopted by the current vertex, and then performs motion vector encoding on the current vertex based on the motion vector reconstruction values ​​of neighboring vertices under the motion vector prediction mode, and encodes the motion vector encoding result and the syntax element indicating the motion vector prediction mode into the bitstream.

[0285] Optionally, the motion vector prediction mode may include at least one of the following: no prediction, at least one intra-frame prediction mode, and at least one inter-frame prediction mode. This application does not limit the specific type of motion vector prediction mode.

[0286] In summary, in the embodiments of this application, since vertices that are close to each other have a higher probability of having similar motion states than vertices that are far apart, during the mesh encoding and decoding process, the encoder and decoder determines candidate neighbor vertices based on the connection information of the current mesh, and filters out the neighbor vertices of the current vertex from the candidate neighbor vertices based on the distance between vertices in the reference mesh. This can improve the probability of filtering out neighbor vertices that have similar motion states to the current vertex. Furthermore, using the filtered neighbor vertices to perform motion vector encoding and decoding on the current vertex helps to improve the efficiency of mesh encoding and decoding.

[0287] During the encoding process, the encoder can use either intra-frame prediction mode or inter-frame prediction mode to predict the motion vector of the current vertex. Accordingly, the encoder's determination of neighboring vertices can include the following two cases:

[0288] 1. The encoder determines the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid. The intra-frame neighbor vertices belong to the current grid.

[0289] In this case, the vertex index of the neighboring vertex within the frame is less than the vertex index of the current vertex, meaning that the neighboring vertices within the frame are encoded between the current vertex.

[0290] In one possible implementation, in order to improve the prediction accuracy of motion vectors in intra-frame prediction mode, the encoder selects the n nearest intra-frame neighbor vertices from the candidate intra-frame neighbor vertices of the current vertex, where n is a positive integer.

[0291] In some embodiments, the distance between the co-location of the current vertex in the reference grid and the co-location of its intra-frame neighbor vertices in the reference grid is less than or equal to the distance between the co-location of the current vertex in the reference grid and the co-locations of other candidate intra-frame neighbor vertices (excluding its intra-frame neighbor vertices) in the reference grid. Here, co-location refers to vertices with the same vertex index.

[0292] In an illustrative example, in the current grid, the candidate intra-frame neighbor vertices of the current vertex A include vertices B, C, D, E, F, and G, and the corresponding points of these vertices in the reference grid are a, b, c, d, e, f, and g, respectively.

[0293] In the reference mesh, the distance between vertex a and vertex b is dis. ab The distance between vertex a and vertex c is dis. ac The distance between vertex a and vertex d is dis ad The distance between vertex a and vertex e is dis. ae The distance between vertex a and vertex f is dis af The distance between vertex a and vertex g is dis. ag If dis ae >dis ab >dis ag >dis ac >dis ad >dis af Then the encoder will determine vertices E, B, and G as intra-frame neighbor vertices of the current vertex A.

[0294] In other embodiments, the weights of intra-frame neighbor vertices are greater than or equal to the weights of other candidate intra-frame neighbor vertices.

[0295] Optionally, the weight of an intra-frame neighbor vertex is the reciprocal of the distance between the current vertex at the same point in the reference grid and the distance between the intra-frame neighbor vertex at the same point in the reference grid. The weight of other candidate intra-frame neighbor vertices is the reciprocal of the distance between the current vertex at the same point in the reference grid and the distance between the other candidate intra-frame neighbor vertices at the same point in the reference grid.

[0296] Second, the encoder determines the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid. The inter-frame neighbor vertices belong to the reference grid.

[0297] Among them, the vertex index of the inter-frame neighbor vertex may be greater than, less than or equal to the vertex index of the current vertex.

[0298] In one possible implementation, in order to improve the prediction accuracy of motion vectors in the inter-frame prediction mode, the encoder selects the m inter-frame neighbor vertices that are closest to the corresponding point of the current vertex in the reference grid from the candidate inter-frame neighbor vertices of the current vertex, where m is a positive integer (m and n can be the same or different).

[0299] In some embodiments, the distance between the current vertex's co-location in the reference grid and its inter-frame neighbor vertices is less than or equal to the distance between the current vertex's co-location in the reference grid and other candidate inter-frame neighbor vertices other than its inter-frame neighbor vertices. Here, co-location refers to vertices with the same vertex index.

[0300] In an illustrative example, the co-location of the current vertex A in the current grid with vertex a in the reference grid, and the candidate inter-frame neighbor vertices of vertex A in the reference grid include vertices a, b, c, d, e, and f.

[0301] In the reference mesh, the distance between vertex a and vertex b is dis. ab The distance between vertex a and vertex c is dis. ac The distance between vertex a and vertex d is dis ad The distance between vertex a and vertex e is dis. ae The distance between vertex a and vertex f is dis af If dis ae >dis ab >dis ac >dis ad >dis af If so, the encoder will determine vertices e, b, and c as the inter-frame neighbor vertices of the current vertex A.

[0302] In other embodiments, the weights corresponding to inter-frame neighbor vertices are greater than or equal to the weights corresponding to other candidate inter-frame neighbor vertices.

[0303] Optionally, the weight corresponding to the inter-frame neighbor vertex is the reciprocal of the distance between the current vertex's same point in the reference grid and the inter-frame neighbor vertex, and the weight corresponding to the other candidate inter-frame neighbor vertex is the reciprocal of the distance between the current vertex's same point in the reference grid and the other candidate inter-frame neighbor vertex.

[0304] Please refer to Figure 12, which illustrates a flowchart of an intra-frame neighbor vertex determination process provided in an exemplary embodiment of this application. This method is applied to an encoder and may include the following steps:

[0305] Step 1201: The encoder determines the current triangle in the current grid based on the connection information of the current grid.

[0306] In some embodiments, the encoder sequentially traverses each triangle in the current grid based on the connection information of the current grid, where each triangle is composed of three vertices in the current grid. For each triangle, the encoder performs steps 1202 to 1204 as described below. In this embodiment, the currently traversed triangle is referred to as the current triangle.

[0307] Step 1202: The encoder determines the vertex combinations formed by the vertices of the current triangle, each vertex combination containing two vertices of the current triangle.

[0308] In some embodiments, for the current triangle, the encoder combines the vertices of the current triangle in pairs based on a preset combination order to obtain a three-vertex combination. The encoder and decoder combine the vertices according to a unified preset combination order to ensure consistency of the vertex combinations obtained at the encoding and decoding ends.

[0309] In one possible implementation, if the current triangle is (v0, v1, v2), then the vertices of the triangle are combined in pairs according to a preset combination order, resulting in vertex combinations (v0, v1), (v0, v2), and (v1, v2). Here, v0, v1, and v2 are the three vertices of the triangle in a clockwise direction, or the three vertices of the triangle in a counterclockwise direction.

[0310] Step 1203: The encoder determines the first distance between the corresponding points of the first and second vertices in the reference mesh in the current vertex combination.

[0311] For the first vertex and the second vertex in the current vertex combination, the encoder determines the first corresponding point in the reference mesh for the first vertex and the second corresponding point in the reference mesh, wherein the first vertex and the first corresponding point have the same vertex index, and the second vertex and the second corresponding point have the same vertex index.

[0312] Furthermore, the encoder determines a first distance between two corresponding vertices based on their vertex coordinates. This first distance can be either Euclidean distance or Manhattan distance.

[0313] Step 1204: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of neighboring points in the first frame corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of neighboring points in the first frame is equal to the first number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of neighboring points in the first frame, the encoder replaces the vertex index corresponding to the maximum distance in the set of neighboring points in the first frame with the vertex index of the second vertex.

[0314] In some embodiments, each vertex in the current grid is provided with a corresponding intra-neighbor set, and the intra-neighbor set is initially empty.

[0315] In one possible implementation, the encoder determines the larger and smaller vertex indices in a vertex combination by comparing the individual vertex indices of the two vertices. Further, the encoder determines whether the intra-frame neighbor set corresponding to the vertex with the larger vertex index contains the smaller vertex index.

[0316] Optionally, the encoder compares the smaller vertex index with the vertex indices in the intra-neighbor set to determine whether the smaller vertex index is included in the intra-neighbor set.

[0317] If the intra-neighbor set does not contain smaller vertex indices, and the number of vertex indices in the intra-neighbor set reaches the upper limit, the encoder needs to determine whether to update the vertex indices in the intra-neighbor set based on distance.

[0318] In some embodiments, the encoder sorts the vertex indices in the intra-neighbor set based on the distances corresponding to each vertex index in the intra-neighbor set. The distance corresponding to a vertex index is the distance between the vertex at that index and the vertex with the larger index in the reference mesh, i.e., the distance between vertices in the vertex combination determined during the previous triangle traversal.

[0319] Optionally, the encoder sorts the vertex indices in the intra-frame neighbor set in descending order of distance (i.e., from largest to smallest distance).

[0320] The encoder compares the distances between corresponding points in the current vertex combination with the maximum distance corresponding to the set of intra-neighbor points. If the distances between corresponding points in the current vertex combination are less than or equal to the maximum distance corresponding to the set of intra-neighbor points, the encoder replaces the vertex index corresponding to the maximum distance in the set of intra-neighbor points with the smaller vertex index in the current vertex combination. After replacing the vertex index, the number of vertex indices in the set of intra-neighbor points remains at the maximum allowed.

[0321] When the vertex indices in the intra-neighbor set are sorted in descending order of distance, the maximum distance corresponding to the intra-neighbor set is the distance corresponding to the first vertex index of the intra-neighbor set.

[0322] In some embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex (i.e., the first vertex is a vertex with a larger vertex index and the second vertex is a vertex with a smaller vertex index), and the set of neighboring points in the first frame corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of neighboring points in the first frame is equal to a first number (i.e., the upper limit of the number of vertex indices is reached), and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of neighboring points in the first frame, the encoder replaces the vertex index corresponding to the maximum distance in the set of neighboring points in the first frame with the vertex index of the second vertex.

[0323] Optionally, after completing the vertex index replacement, the encoder sorts the vertex indices in the neighbor set within the first frame based on the distances corresponding to the vertex indices in the neighbor set within the first frame.

[0324] In an illustrative example, the process of the encoder updating the intra-frame neighbor set can be seen in Figure 4, which shows the process of the decoder updating the intra-frame neighbor set.

[0325] Step 1205: After all triangles in the current grid have been traversed, the encoder determines the intra-frame neighbor vertices of the current vertex based on the vertex index in the intra-frame neighbor set corresponding to the current vertex.

[0326] The encoder repeats the above steps to complete the traversal of all triangles in the current mesh. Upon completion of the traversal, the encoder identifies the vertex indicated by the vertex index in the set of intra-neighbor points corresponding to the current vertex as the intra-neighbor vertex of the current vertex.

[0327] In addition to the need to update the intra-frame neighbor set as described in step 1204 above, in some embodiments, when the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first intra-frame neighbor set is equal to a first number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first intra-frame neighbor set, the encoder maintains the first intra-frame neighbor set, that is, the encoder does not need to add the vertex index of the second vertex to the first intra-frame neighbor set.

[0328] In other embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of intra-frame neighbor points is less than a first number, the encoder adds the vertex index of the second vertex to the set of intra-frame neighbor points. Correspondingly, the number of vertex indices in the set of intra-frame neighbor points is incremented by one.

[0329] Optionally, after adding the vertex index of the second vertex to the set of neighboring points in the first frame, the encoder sorts the vertex indices based on the distances corresponding to each vertex index in the set of neighboring points in the first frame.

[0330] In an illustrative example, the process of updating the intra-frame neighbor point set is shown in Figure 6.

[0331] In some other embodiments, when the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex contains the vertex index of the second vertex, the encoder maintains the set of intra-frame neighbor points to avoid duplicate vertex indices in the same set of intra-frame neighbor points.

[0332] In this embodiment, the encoder selects several intra-frame neighbor vertices that are closest to the current vertex from the candidate intra-frame neighbor vertices of the current vertex based on the distance between vertices in the reference grid. Since the selected intra-frame neighbor vertices have a high probability of having similar motion states to the current vertex, the accuracy of subsequent intra-frame motion vector prediction using the selected intra-frame neighbor vertices is high, which helps to improve coding efficiency.

[0333] It should be noted that, in the above embodiments, the example of the encoder updating the intra-neighbor set based on distance and sorting the vertex indices in the set is used for illustration. In other possible embodiments, the encoder can determine whether to update the intra-neighbor set and sort the vertex indices in the set based on the weight corresponding to the vertex index (which can be the reciprocal of the distance between corresponding points of vertices).

[0334] In some embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of intra-frame neighbor points is equal to a first quantity, and the first weight is greater than or equal to the minimum weight corresponding to the vertex index in the set of intra-frame neighbor points, the encoder replaces the vertex index corresponding to the minimum weight in the set of intra-frame neighbor points with the vertex index of the second vertex.

[0335] The encoder maintains the set of neighboring points in the first frame if the vertex index of the first vertex is greater than the vertex index of the second vertex, the set of neighboring points in the first frame corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the set of neighboring points in the first frame is equal to the first quantity, and the first weight is less than or equal to the minimum weight corresponding to the vertex index in the set of neighboring points in the first frame.

[0336] In some embodiments, the encoder sorts the vertex indices in the neighbor set within the first frame based on the weights corresponding to the vertex indices in the neighbor set within the first frame.

[0337] Optionally, the weight corresponding to the smaller vertex index is the reciprocal of the distance between the corresponding points of the two vertices in the reference grid. For example, in the current vertex combination (where the vertex index of the first vertex is greater than the vertex index of the second vertex), the weight corresponding to the second vertex is: the reciprocal of the first distance between the corresponding points of the first and second vertices in the reference grid.

[0338] In one possible implementation, in inter-frame prediction mode, the encoder can reuse the method used in intra-frame prediction mode to determine the inter-frame neighbor vertices of the current vertex.

[0339] Please refer to Figure 13, which illustrates a flowchart of an inter-frame neighbor vertex determination process provided in an exemplary embodiment of this application. This method is applied to an encoder and may include the following steps:

[0340] Step 1301: The encoder determines the current triangle in the current grid based on the connection information of the current grid.

[0341] Step 1302: The encoder determines the vertex combinations formed by the vertices of the current triangle, each vertex combination containing two vertices of the current triangle.

[0342] Step 1303: The encoder determines the first distance between the corresponding points of the first and second vertices in the reference mesh in the current vertex combination.

[0343] The implementation process of steps 1301 to 1303 above can be referred to steps 1201 to 1203, and will not be repeated here in this embodiment.

[0344] Step 1304: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the encoder replaces the vertex index corresponding to the maximum distance in the first inter-frame neighbor set with the vertex index of the second vertex.

[0345] In some embodiments, each vertex in the current grid is provided with a corresponding set of inter-frame neighbor points, and the set of inter-frame neighbor points is initially empty.

[0346] In one possible implementation, the encoder determines the larger and smaller vertex indices in a vertex combination by comparing the individual vertex indices of the two vertices. Further, the encoder determines whether the set of inter-frame neighbor points corresponding to the vertex with the larger vertex index contains the smaller vertex index.

[0347] Optionally, the encoder compares the smaller vertex index with the vertex indices in the inter-frame neighbor set to determine whether the smaller vertex index is included in the inter-frame neighbor set.

[0348] If the inter-frame neighbor set does not contain smaller vertex indices, and the number of vertex indices in the inter-frame neighbor set reaches the upper limit, the encoder needs to determine whether to update the vertex indices in the inter-frame neighbor set based on the distance.

[0349] In some embodiments, the encoder sorts the vertex indices in the inter-frame neighbor set based on the distances corresponding to each vertex index in the inter-frame neighbor set. The distance corresponding to a vertex index is the distance between the vertex at that index and the vertex with the larger index in the reference mesh, i.e., the distance between vertices in the vertex combination determined during the previous triangle traversal.

[0350] Optionally, the encoder sorts the vertex indices in the inter-frame neighbor set in descending order of distance (i.e., from largest to smallest distance).

[0351] The encoder compares the distances between corresponding points in the current vertex combination with the maximum distance corresponding to the inter-frame neighbor set. If the distances between corresponding points in the current vertex combination are less than or equal to the maximum distance corresponding to the inter-frame neighbor set, the encoder replaces the vertex index corresponding to the maximum distance in the inter-frame neighbor set with the smaller vertex index in the current vertex combination. After replacing the vertex index, the number of vertex indices in the inter-frame neighbor set remains at the maximum allowed.

[0352] When the vertex indices in the inter-frame neighbor set are sorted in descending order of distance, the maximum distance corresponding to the inter-frame neighbor set is the distance corresponding to the first vertex index in the inter-frame neighbor set.

[0353] In some embodiments, when the vertex index of the first vertex is greater than the vertex index of the second vertex (i.e., the first vertex has a larger vertex index and the second vertex has a smaller vertex index), and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number (i.e., reaching the upper limit of the number of vertex indices), and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the encoder replaces the vertex index corresponding to the maximum distance in the first inter-frame neighbor set with the vertex index of the second vertex. The second number may be the same as or different from the first number.

[0354] Optionally, after completing the vertex index replacement, the encoder sorts the vertex indices in the first inter-frame neighbor set based on the distances corresponding to the vertex indices in the first inter-frame neighbor set.

[0355] Step 1305: After all triangles in the current grid have been traversed, the encoder determines the inter-frame neighbor vertices of the current vertex based on the vertex index in the set of inter-frame neighbor points corresponding to the current vertex.

[0356] The encoder repeats the above steps to complete the traversal of all triangles in the current mesh. Upon completion of the traversal, the encoder identifies the vertex indicated by the vertex index in the set of inter-frame neighbors corresponding to the current vertex as the current vertex's inter-frame neighbor vertex.

[0357] In addition to the need to update the inter-frame neighbor point set as described in step 1304 above, in some embodiments, when the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, the encoder maintains the first inter-frame neighbor point set, that is, the encoder does not need to add the vertex index of the second vertex to the first inter-frame neighbor point set.

[0358] In other embodiments, if the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is less than a second number, the encoder adds the vertex index of the second vertex to the first inter-frame neighbor set. Correspondingly, the number of vertex indices in the first inter-frame neighbor set is incremented by one.

[0359] Optionally, after adding the vertex index of the second vertex to the first inter-frame neighbor set, the encoder sorts the vertex indices based on the distances corresponding to each vertex index in the first inter-frame neighbor set.

[0360] Since inter-frame neighbor vertices belong to the reference grid, and the reference grid has been decoded before the current grid, the encoder can obtain the motion vector reconstruction values ​​of each vertex in the reference grid when decoding the vertices in the current grid. Therefore, there is no need to restrict the smaller index vertex to be the neighbor vertex of the larger index vertex.

[0361] In another possible implementation, in inter-frame prediction mode, the encoder can use a different neighbor vertex determination method than in intra-frame prediction mode to determine the inter-frame neighbor vertices of the current vertex.

[0362] Please refer to Figure 14, which illustrates a flowchart of an inter-frame neighbor vertex determination process provided in another exemplary embodiment of this application. This method is applied to an encoder and may include the following steps:

[0363] Step 1401: The encoder determines the current triangle in the current grid based on the connection information of the current grid.

[0364] Step 1402: The encoder determines the vertex combinations formed by the vertices of the current triangle, each vertex combination containing two vertices of the current triangle.

[0365] Step 1403: The encoder determines the first distance between the corresponding points of the first and second vertices in the reference mesh in the current vertex combination.

[0366] The implementation process of steps 1401 to 1403 above can be referred to steps 1201 to 1203, and will not be repeated here in this embodiment.

[0367] Step 1404: If the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, the encoder replaces the vertex index corresponding to the maximum distance in the first inter-frame neighbor set with the vertex index of the second vertex.

[0368] Step 1405: If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, the encoder replaces the vertex index corresponding to the maximum distance in the second inter-frame neighbor set with the vertex index of the first vertex.

[0369] In one possible implementation, for each vertex in the current vertex combination, the encoder determines whether the inter-frame neighbor point set corresponding to one vertex contains the vertex index of the other vertex, that is, it detects whether the vertex indices of the vertices in the vertex combination exist in each other's inter-frame neighbor point sets.

[0370] If the inter-frame neighbor set corresponding to one vertex does not contain the vertex index of the other vertex, and the number of vertex indices in the inter-frame neighbor set reaches the upper limit, the encoder needs to determine whether to update the vertex indices in the inter-frame neighbor set based on the distance.

[0371] The encoder compares the distances between corresponding points in the current vertex combination with the maximum distance corresponding to the inter-neighbor set. If the distances between corresponding points in the current vertex combination are less than or equal to the maximum distance corresponding to the inter-neighbor set, the encoder replaces the vertex index corresponding to the maximum distance in the inter-neighbor set with the vertex index of another vertex in the current vertex combination. After replacing the vertex index, the number of vertex indices in the inter-neighbor set remains at the maximum limit.

[0372] In some embodiments, the encoder sorts the vertex indices in the inter-frame neighbor set based on the distances corresponding to each vertex index in the inter-frame neighbor set. The distances corresponding to the vertex indices are the distances between vertices in the vertex combinations determined during the previous triangle traversal.

[0373] Optionally, the encoder sorts the vertex indices in the inter-frame neighbor set in descending order of distance (i.e., from largest to smallest distance).

[0374] When the vertex indices in the inter-frame neighbor set are sorted in descending order of distance, the maximum distance corresponding to the inter-frame neighbor set is the distance corresponding to the first vertex index in the inter-frame neighbor set.

[0375] Optionally, the upper limit of the number of vertex indices in the inter-frame neighbor set can be the same as the upper limit of the number of vertex indices in the intra-frame neighbor set; for example, the upper limit of the number of vertex indices in both the inter-frame and intra-frame neighbor sets can be 3. Alternatively, the upper limit of the number of vertex indices in the inter-frame neighbor set can be different from the upper limit of the number of vertex indices in the intra-frame neighbor set; for example, the upper limit of the number of vertex indices in the inter-frame neighbor set can be 3, and the upper limit of the number of vertex indices in the intra-frame neighbor set can be 4. That is, the second number can be the same as or different from the first number.

[0376] Optionally, after completing the vertex index replacement, the encoder sorts the vertex indices in the first inter-frame neighbor set based on the distances corresponding to the vertex indices in the first inter-frame neighbor set (the first inter-frame neighbor set is updated), and / or, the encoder sorts the vertex indices in the second inter-frame neighbor set based on the distances corresponding to the vertex indices in the second inter-frame neighbor set (the second inter-frame neighbor set is updated), to facilitate distance comparison during subsequent traversal.

[0377] In an illustrative example, the process of the encoder updating the inter-frame neighbor set can be seen in Figure 9, which shows the process of the decoder updating the inter-frame neighbor set.

[0378] Step 1406: After all triangles in the current grid have been traversed, the encoder determines the inter-frame neighbor vertex of the current vertex based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

[0379] The implementation method of this step can refer to step 1305 above, and will not be repeated here.

[0380] In addition to updating the inter-frame neighbor set as described in steps 1404 and 1405 above, in some embodiments, when the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is less than the second number, the encoder adds the vertex index of the second vertex to the first inter-frame neighbor set. Correspondingly, the number of vertex indices in the first inter-frame neighbor set is incremented by one.

[0381] If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is less than the second number, the encoder adds the vertex index of the first vertex to the second inter-frame neighbor set. Correspondingly, the number of vertex indices in the second inter-frame neighbor set is incremented by one.

[0382] Optionally, to facilitate distance comparisons during subsequent traversal, after adding the vertex index of the first vertex to the second inter-frame neighbor set, the encoder sorts the vertex indices in the second inter-frame neighbor set based on the distances corresponding to the vertex indices in the second inter-frame neighbor set. Similarly, after adding the vertex index of the second vertex to the first inter-frame neighbor set, the encoder sorts the vertex indices in the first inter-frame neighbor set based on the distances corresponding to the vertex indices in the first inter-frame neighbor set.

[0383] In addition to needing to update the inter-frame neighbor set in the above situations, in some embodiments, the encoder maintains the first inter-frame neighbor set when the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set.

[0384] The encoder maintains the second inter-frame neighbor set if the second vertex's corresponding second inter-frame neighbor set does not contain the first vertex's vertex index, the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set.

[0385] In some embodiments, if the first inter-frame neighbor set corresponding to the first vertex contains the vertex index of the second vertex, the encoder maintains the first inter-frame neighbor set; or, if the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the encoder maintains the second inter-frame neighbor set to avoid duplicate neighbor vertices in the same inter-frame neighbor set.

[0386] Furthermore, in the process of determining inter-frame neighbor points, for a vertex combination (A, B), if the inter-frame neighbor point set corresponding to vertex A contains the vertex index of vertex B, while the inter-frame neighbor point set corresponding to vertex B does not contain the vertex index of vertex A, it indicates that the other triangles traversed previously contain the vertex combination (A, B). However, vertex A was not added to the inter-frame neighbor point set corresponding to vertex B because the distance between vertex A and vertex B is too large. Alternatively, vertex A was first added to the inter-frame neighbor point set corresponding to vertex B, but was subsequently replaced by a vertex with a smaller distance during traversal.

[0387] Therefore, when traversing the vertex combination (A, B) again, the encoder does not need to compare the distance between vertices A and B with the maximum distance of the vertex index in the inter-frame neighbor set corresponding to vertex B (even if it is compared, it will not be added to the inter-frame neighbor set because the distance is too large). Instead, it keeps the inter-frame neighbor sets corresponding to the two vertices unchanged.

[0388] In some embodiments, if the first inter-frame neighbor set corresponding to the first vertex contains the vertex index of the second vertex, the encoder maintains the first inter-frame neighbor set and the second inter-frame neighbor set; or, if the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the encoder maintains the first inter-frame neighbor set and the second inter-frame neighbor set to avoid duplicate neighbor vertices in the same inter-frame neighbor set.

[0389] In this embodiment, the encoder selects several inter-frame neighbor vertices that are closest to the current vertex from the candidate inter-frame neighbor vertices of the current vertex based on the distance between vertices in the reference grid. Since the selected inter-frame neighbor vertices have a high probability of having similar motion states to the current vertex, the accuracy of subsequent inter-frame motion vector prediction using the selected inter-frame neighbor vertices is high, which helps to improve coding efficiency.

[0390] During the process of generating the intra-neighbor set of the current vertex based on vertex combinations, it is impossible to add the same point of the current vertex in the reference grid to the intra-neighbor set. However, in reality, this same point usually has a similar motion state to the current vertex. Therefore, in order to improve the accuracy of subsequent inter-frame motion vector prediction, in one possible implementation, the inter-frame neighbor vertices of the current vertex include at least the same point of the current vertex in the reference grid.

[0391] In some embodiments, after the encoder generates the set of inter-frame neighbor points corresponding to the current vertex based on the vertex combination, it adds the vertex index of the current vertex to the set of inter-frame neighbor points, that is, it determines the corresponding point of the current vertex in the reference grid as the inter-frame neighbor vertex of the current vertex.

[0392] In other embodiments, when initializing the inter-frame neighbor set for each vertex, the encoder adds the vertex index of the current vertex to the inter-frame neighbor set and sets the distance corresponding to that vertex index to 0. The encoder then updates the initialized inter-frame neighbor set based on vertex combinations. Since the distance between vertices in a vertex combination is always greater than 0, the vertex index of the current vertex will not be removed from the inter-frame neighbor set.

[0393] It should be noted that in the above embodiments, when the vertex index in the neighbor set changes (including adding a vertex index or replacing a vertex index), the encoder needs to re-sort the vertex index in the neighbor set (for example, sorting it in descending order according to the distance corresponding to the vertex index).

[0394] Figure 15 is a flowchart illustrating a motion vector encoding process according to an exemplary embodiment of this application. The method is applied to an encoder and may include the following steps:

[0395] Step 1501: The encoder determines the predicted motion vector value of the current vertex based on the reconstructed motion vector values ​​of the neighboring vertices.

[0396] Since the selected neighboring vertices all completed motion vector encoding before the current vertex, and vertices that are close to each other usually have similar motion states, the encoder can predict the motion vector of the current vertex based on the reconstructed motion vector values ​​of the neighboring vertices, thus obtaining the predicted motion vector value. Specifically, the encoder and decoder predict the motion vector of the current vertex based on the same neighboring vertices and the same motion vector prediction mode to ensure consistency between the encoder and decoder.

[0397] Regarding the method for determining the motion vector prediction mode, in one possible implementation, the encoder determines the total cost of rate distortion and coding cost under various motion vector prediction modes, and selects the motion vector prediction mode with the lowest total cost.

[0398] In some embodiments, the encoder may write syntax elements indicating the motion vector motion pattern adopted by the vertices within a group into the bitstream on a group-by-group basis.

[0399] In some embodiments, the coordinate dimensions (x, y, z) of the current vertex adopt a unified motion vector prediction mode, or the coordinate dimensions of the current vertex adopt their own motion vector prediction modes.

[0400] For example, all coordinate dimensions of the current vertex adopt the inter-frame prediction mode of motion vectors; or, the coordinate dimensions x and y of the current vertex adopt the inter-frame prediction mode of motion vectors, and the coordinate dimension z of the current vertex adopts the inter-frame prediction mode of motion vectors; or, the coordinate dimension x of the current vertex adopts the first inter-frame prediction mode of motion vectors, the coordinate dimension y of the current vertex adopts the second inter-frame prediction mode of motion vectors, and the coordinate dimension z of the current vertex adopts the intra-frame prediction mode of motion vectors.

[0401] In some embodiments, the encoder may perform motion vector prediction in at least one of the following ways.

[0402] Method 1: The encoder determines the motion vector reconstruction value of the specified neighboring vertex as the motion vector prediction value of the current vertex.

[0403] In one possible implementation, the encoder determines a specified neighbor vertex from the filtered neighbor vertices, and then determines the motion vector reconstruction value of the specified neighbor vertex as the motion vector prediction value of the current vertex. That is, the motion vector prediction value (P) of the current vertex. x P y P z This can be represented as:

[0404] in, The reconstructed motion vector values ​​for the specified neighboring vertices of the current vertex.

[0405] Optionally, when using the motion vector intra-frame prediction mode, the encoder determines the specified intra-frame neighbor vertex from the intra-frame neighbor vertices of the current vertex; when using the motion vector inter-frame prediction mode, the encoder determines the specified inter-frame neighbor vertex from the inter-frame neighbor vertices of the current vertex.

[0406] In some embodiments, when using the motion vector intra-prediction mode, the encoder determines the specified intra-neighbor vertex based on the distance between the current vertex and the corresponding point of the intra-neighbor vertex in the reference grid.

[0407] Optionally, the encoder determines the minimum distance between co-locations and identifies the intra-neighbor vertex corresponding to the minimum distance as the specified intra-neighbor vertex.

[0408] Of course, the encoder and decoder can also determine the neighboring vertices within a specified frame based on the distance between the same points and a unified selection criterion, but this application embodiment does not limit this.

[0409] In some embodiments, when using the motion vector inter-frame prediction mode, the encoder determines the specified inter-frame neighbor vertex based on the distance between the current vertex's co-location in the reference grid and its inter-frame neighbor vertex.

[0410] Optionally, the encoder determines the minimum distance between the current vertex at the same point in the reference grid and its inter-frame neighbor vertex, and determines the inter-frame neighbor vertex corresponding to the minimum distance as the specified inter-frame neighbor vertex.

[0411] Of course, the encoder and decoder can also determine the specified inter-frame neighbor vertex based on the distance between the current vertex and its inter-frame neighbor vertex in the reference grid, as well as a unified selection criterion. This application embodiment does not limit this.

[0412] Method 2: The encoder determines the predicted motion vector value of the current vertex based on the reconstructed motion vector values ​​of all or some of the neighboring vertices.

[0413] Optionally, when using the intra-frame motion vector prediction mode, the encoder determines the motion vector prediction value of the current vertex based on the motion vector reconstruction values ​​of all or some of the intra-frame neighbor vertices; when using the inter-frame motion vector prediction mode, the encoder determines the motion vector prediction value of the current vertex based on the motion vector reconstruction values ​​of all or some of the inter-frame neighbor vertices.

[0414] In one possible implementation, the encoder can perform an offset-free weighted average of the motion vector reconstruction values ​​of all or some of the neighboring vertices obtained from the filtering process, and determine the result as the predicted motion vector value of the current vertex.

[0415] In an illustrative example, the predicted motion vector value (P) of the current vertex x P y P z This can be represented as:

[0416] Wherein, predCount is the total number of all or some of the neighboring vertices of the current vertex (i.e., the number of neighboring vertices used for motion vector prediction), and when predCount is 0, the motion vector prediction value is 0; The reconstructed motion vector value of the i-th neighboring vertex of the current vertex.

[0417] Regarding the selection method of some neighboring vertices, in some embodiments, in the motion vector intra-frame prediction mode, the encoder determines some intra-frame neighboring vertices based on the distance between the current vertex and the corresponding point of the intra-frame neighboring vertices in the reference grid; in the motion vector inter-frame prediction mode, the encoder determines some inter-frame neighboring vertices based on the distance between the corresponding point of the current vertex in the reference grid and the inter-frame neighboring vertices.

[0418] Optionally, the encoder can sort neighboring vertices in descending order based on distance (intra-frame or inter-frame), and determine the motion vector prediction value of the current vertex based on the motion vector reconstruction values ​​of the last k neighboring vertices (intra-frame or inter-frame). Here, k is an integer greater than or equal to 1, and when the number of neighboring vertices of the current vertex is less than k, the motion vector prediction of the current vertex is based on the motion vector reconstruction values ​​of all neighboring vertices.

[0419] Method 3: The encoder determines the predicted motion vector value of the current vertex based on the reconstructed motion vector values ​​of all or some of the neighboring vertices, as well as the offset. The offset is determined based on the number of all or some of the neighboring vertices.

[0420] Building upon Method 2, the encoder can further add an offset to the motion vector prediction process. This offset is related to the number of neighboring vertices used for motion vector prediction. For example, when the number of neighboring vertices used for motion vector prediction is predCount, the offset bias = predCount >> 1.

[0421] In one possible implementation, the encoder can perform offset-weighted averaging on the motion vector reconstruction values ​​of all or some of the neighboring vertices obtained from the filtering, and determine the calculation result as the motion vector prediction value of the current vertex.

[0422] In an illustrative example, the predicted motion vector values ​​(Px, Py, Pz) of the current vertex can be represented as:

[0423] Wherein, predCount is the total number of all or some of the neighboring vertices of the current vertex (i.e., the number of neighboring vertices used for motion vector prediction), and when predCount is 0, the motion vector prediction value is 0; The reconstructed motion vector value of the i-th neighboring vertex of the current vertex; bias = predCount >> 1. Furthermore, in When it is positive, "±" is taken as positive. When the value is negative, "±" is negative.

[0424] Regarding the selection method for some neighboring vertices, in some embodiments, in the intra-frame prediction mode of motion vectors, the encoder determines some intra-frame neighboring vertices based on the distance between the current vertex and the corresponding points of intra-frame neighboring vertices in the reference grid; in the inter-frame prediction mode of motion vectors, the encoder determines some inter-frame neighboring vertices based on the distance between the corresponding points of the current vertex in the reference grid and the inter-frame neighboring vertices. Details of the selection method can be found in method 2, and will not be elaborated here.

[0425] It should be noted that, in addition to the three motion vector prediction modes mentioned above, the encoder may also use other motion vector prediction modes, such as no prediction, other types of intra-frame motion vector prediction modes, or other types of inter-frame motion vector prediction modes, etc. The embodiments of this application do not limit this.

[0426] Step 1502: The encoder determines the motion vector difference based on the original motion vector value and the predicted motion vector value of the current vertex.

[0427] Optionally, the encoder calculates the difference between the original motion vector value and the predicted motion vector value of the current vertex to obtain the motion vector difference. The original motion vector value is determined based on the coordinates of the current vertex in the current grid and the coordinates of the same point of the current vertex in the reference grid.

[0428] Step 1503: The encoder encodes the motion vector difference into the bitstream.

[0429] In some embodiments, the encoder encodes motion vector differences and syntax elements indicating motion vector prediction modes into the bitstream.

[0430] Please refer to Figure 16, which shows a structural block diagram of a mesh decoding apparatus provided in an exemplary embodiment of this application. The apparatus includes:

[0431] Decoding unit 1601 is used to determine the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid, wherein the current vertex is a vertex in the current grid;

[0432] Decoding unit 1601 is used to perform motion vector decoding on the current vertex based on the motion vector decoding value of the neighboring vertex.

[0433] Optionally, the decoding unit 1601 is used for:

[0434] Based on the connection information of the current grid and the distance between vertices in the reference grid, the intra-frame neighbor vertices of the current vertex are determined, and the intra-frame neighbor vertices belong to the current grid;

[0435] or,

[0436] Based on the connection information of the current grid and the distance between vertices in the reference grid, the inter-frame neighbor vertices of the current vertex are determined, and the inter-frame neighbor vertices belong to the reference grid.

[0437] Optionally, the distance between the current vertex at the same point in the reference grid and the distance between the intra-neighbor vertex at the same point in the reference grid is less than or equal to the distance between the current vertex at the same point in the reference grid and the distance between other candidate intra-neighbor vertices (excluding the intra-neighbor vertex) at the same point in the reference grid.

[0438] Optionally, the decoding unit 1601 is used for:

[0439] Based on the connection information of the current grid, determine the current triangle in the current grid;

[0440] Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle;

[0441] Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination;

[0442] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of intra-frame neighbor points is equal to the first number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of intra-frame neighbor points, then the vertex index corresponding to the maximum distance in the set of intra-frame neighbor points is replaced with the vertex index of the second vertex.

[0443] When all triangles in the current grid have been traversed, the intra-frame neighbor vertices of the current vertex are determined based on the vertex index in the intra-frame neighbor set corresponding to the current vertex.

[0444] Optionally, the decoding unit 1601 is used for:

[0445] The first intra-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first intra-frame neighbor set is equal to the first number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first intra-frame neighbor set.

[0446] Optionally, the decoding unit 1601 is used for:

[0447] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first intra-frame neighbor set is less than the first number, then the vertex index of the second vertex is added to the first intra-frame neighbor set.

[0448] Optionally, the decoding unit 1601 is used for:

[0449] Based on the distances corresponding to the vertex indices in the first intra-frame neighbor set, the vertex indices in the first intra-frame neighbor set are sorted.

[0450] Optionally, the distance between the current vertex at the same point in the reference grid and the inter-frame neighbor vertex is less than or equal to the distance between the current vertex at the same point in the reference grid and other candidate inter-frame neighbor vertices besides the inter-frame neighbor vertex.

[0451] Optionally, the decoding unit 1601 is used for:

[0452] Based on the connection information of the current grid, determine the current triangle in the current grid;

[0453] Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle;

[0454] Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination;

[0455] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, then the vertex index corresponding to the maximum distance in the first inter-frame neighbor point set is replaced with the vertex index of the second vertex.

[0456] When all triangles in the current grid have been traversed, the inter-frame neighbor vertices of the current vertex are determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

[0457] Optionally, the decoding unit 1601 is used for:

[0458] The first inter-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set.

[0459] Optionally, the decoding unit 1601 is used for:

[0460] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set.

[0461] Optionally, the decoding unit 1601 is used for:

[0462] Based on the connection information of the current grid, determine the current triangle in the current grid;

[0463] Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle;

[0464] Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination;

[0465] If the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the first inter-frame neighbor set is replaced with the vertex index of the second vertex; or, if the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the second inter-frame neighbor set is replaced with the vertex index of the first vertex.

[0466] When all triangles in the current grid have been traversed, the inter-frame neighbor vertex of the current vertex is determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

[0467] Optionally, the decoding unit 1601 is used for:

[0468] If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indexes in the first inter-frame neighbor point set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, then the first inter-frame neighbor point set is maintained.

[0469] or,

[0470] If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the second inter-frame neighbor set is maintained.

[0471] or,

[0472] If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set is maintained.

[0473] or,

[0474] If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the second inter-frame neighbor set is maintained.

[0475] or,

[0476] If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set and the second inter-frame neighbor point set are maintained.

[0477] or,

[0478] If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the first inter-frame neighbor set and the second inter-frame neighbor set are maintained.

[0479] Optionally, the decoding unit 1601 is used for:

[0480] If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set.

[0481] or,

[0482] If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is less than the second number, then the vertex index of the first vertex is added to the second inter-frame neighbor set.

[0483] Optionally, the decoding unit 1601 is used for:

[0484] Based on the distances corresponding to the vertex indices in the first inter-frame neighbor set, sort the vertex indices in the first inter-frame neighbor set;

[0485] or,

[0486] Based on the distances corresponding to the vertex indices in the second inter-frame neighbor set, the vertex indices in the second inter-frame neighbor set are sorted.

[0487] Optionally, the inter-frame neighbor vertices of the current vertex include at least the co-location of the current vertex in the reference grid.

[0488] Optionally, the decoding unit 1601 is used for:

[0489] Analyze the bitstream to determine the motion vector difference of the current vertex;

[0490] Based on the motion vector decoding values ​​of the neighboring vertices, determine the motion vector prediction value of the current vertex;

[0491] Based on the motion vector difference and the motion vector prediction value, the motion vector decoding value of the current vertex is determined.

[0492] Optionally, the decoding unit 1601 is used for:

[0493] The motion vector decoding value of the specified neighboring vertex is determined as the motion vector prediction value of the current vertex;

[0494] or,

[0495] Based on the motion vector decoding values ​​of all or some of the neighboring vertices of the current vertex, determine the motion vector prediction value of the current vertex;

[0496] or,

[0497] Based on the motion vector decoding values ​​of all or some of the neighboring vertices of the current vertex, and the offset, the motion vector prediction value of the current vertex is determined, wherein the offset is determined based on the number of all or some of the neighboring vertices.

[0498] Optionally, if the neighboring vertex is an intra-frame neighboring vertex, the decoding unit 1601 is configured to:

[0499] The specified intra-frame neighbor vertex is determined based on the distance between the current vertex and the corresponding intra-frame neighbor vertex at their respective points in the reference grid.

[0500] or,

[0501] Based on the distance between the current vertex and the corresponding points of the intra-frame neighbor vertices in the reference grid, a subset of intra-frame neighbor vertices are determined.

[0502] Optionally, if the neighboring vertex is an inter-frame neighbor vertex, the decoding unit 1601 is configured to:

[0503] The specified inter-frame neighbor vertex is determined based on the distance between the current vertex's co-location in the reference grid and the inter-frame neighbor vertex;

[0504] or,

[0505] Based on the distance between the current vertex at its corresponding point in the reference grid and the inter-frame neighbor vertices, a subset of inter-frame neighbor vertices are determined.

[0506] Optionally, the coordinate dimensions of the current vertex adopt a unified motion vector prediction mode, or the coordinate dimensions of the current vertex adopt their own motion vector prediction modes.

[0507] Optionally, the distance between vertices in the reference mesh is Euclidean distance or Manhattan distance.

[0508] Optionally, the current mesh is the base mesh in VDMC.

[0509] It should be noted that the above-mentioned decoding unit can refer to the above-mentioned grid decoding method embodiment for the grid decoding process, and will not be repeated here.

[0510] Please refer to Figure 17, which shows a structural block diagram of a grid coding apparatus provided in an exemplary embodiment of this application. The apparatus includes:

[0511] The encoding unit 1701 is used to determine the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid, wherein the current vertex is a vertex in the current grid;

[0512] The encoding unit 1701 is used to perform motion vector encoding on the current vertex based on the motion vector reconstruction values ​​of the neighboring vertices.

[0513] Optionally, encoding unit 1701 is used for:

[0514] Based on the connection information of the current grid and the distance between vertices in the reference grid, the intra-frame neighbor vertices of the current vertex are determined, and the intra-frame neighbor vertices belong to the current grid;

[0515] or,

[0516] Based on the connection information of the current grid and the distance between vertices in the reference grid, the inter-frame neighbor vertices of the current vertex are determined, and the inter-frame neighbor vertices belong to the reference grid.

[0517] Optionally, the distance between the current vertex at the same point in the reference grid and the distance between the intra-neighbor vertex at the same point in the reference grid is less than or equal to the distance between the current vertex at the same point in the reference grid and the distance between other candidate intra-neighbor vertices (excluding the intra-neighbor vertex) at the same point in the reference grid.

[0518] Optionally, encoding unit 1701 is used for:

[0519] Based on the connection information of the current grid, determine the current triangle in the current grid;

[0520] Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle;

[0521] Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination;

[0522] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of intra-frame neighbor points is equal to the first number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of intra-frame neighbor points, then the vertex index corresponding to the maximum distance in the set of intra-frame neighbor points is replaced with the vertex index of the second vertex.

[0523] When all triangles in the current grid have been traversed, the intra-frame neighbor vertices of the current vertex are determined based on the vertex index in the intra-frame neighbor set corresponding to the current vertex.

[0524] Optionally, encoding unit 1701 is used for:

[0525] The first intra-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first intra-frame neighbor set is equal to the first number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first intra-frame neighbor set.

[0526] Optionally, encoding unit 1701 is used for:

[0527] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first intra-frame neighbor set is less than the first number, then the vertex index of the second vertex is added to the first intra-frame neighbor set.

[0528] Optionally, encoding unit 1701 is used for:

[0529] Based on the distances corresponding to the vertex indices in the first intra-frame neighbor set, the vertex indices in the first intra-frame neighbor set are sorted.

[0530] Optionally, the distance between the current vertex at the same point in the reference grid and the inter-frame neighbor vertex is less than or equal to the distance between the current vertex at the same point in the reference grid and other candidate inter-frame neighbor vertices besides the inter-frame neighbor vertex.

[0531] Optionally, encoding unit 1701 is used for:

[0532] Based on the connection information of the current grid, determine the current triangle in the current grid;

[0533] Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle;

[0534] Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination;

[0535] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, then the vertex index corresponding to the maximum distance in the first inter-frame neighbor point set is replaced with the vertex index of the second vertex.

[0536] When all triangles in the current grid have been traversed, the inter-frame neighbor vertices of the current vertex are determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

[0537] Optionally, encoding unit 1701 is used for:

[0538] The first inter-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set.

[0539] Optionally, encoding unit 1701 is used for:

[0540] If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set.

[0541] Optionally, encoding unit 1701 is used for:

[0542] Based on the connection information of the current grid, determine the current triangle in the current grid;

[0543] Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle;

[0544] Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination;

[0545] If the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the first inter-frame neighbor set is replaced with the vertex index of the second vertex; or, if the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the second inter-frame neighbor set is replaced with the vertex index of the first vertex.

[0546] When all triangles in the current grid have been traversed, the inter-frame neighbor vertex of the current vertex is determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

[0547] Optionally, encoding unit 1701 is used for:

[0548] If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indexes in the first inter-frame neighbor point set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, then the first inter-frame neighbor point set is maintained.

[0549] or,

[0550] If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the second inter-frame neighbor set is maintained.

[0551] or,

[0552] If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set is maintained.

[0553] or,

[0554] If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the second inter-frame neighbor set is maintained.

[0555] or,

[0556] If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set and the second inter-frame neighbor point set are maintained.

[0557] or,

[0558] If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the first inter-frame neighbor set and the second inter-frame neighbor set are maintained.

[0559] Optionally, encoding unit 1701 is used for:

[0560] If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set.

[0561] or,

[0562] If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is less than the second number, then the vertex index of the first vertex is added to the second inter-frame neighbor set.

[0563] Optionally, encoding unit 1701 is used for:

[0564] Based on the distances corresponding to the vertex indices in the first inter-frame neighbor set, sort the vertex indices in the first inter-frame neighbor set;

[0565] or,

[0566] Based on the distances corresponding to the vertex indices in the second inter-frame neighbor set, the vertex indices in the second inter-frame neighbor set are sorted.

[0567] Optionally, the inter-frame neighbor vertices of the current vertex include at least the co-location of the current vertex in the reference grid.

[0568] Optionally, encoding unit 1701 is used for:

[0569] Based on the reconstructed motion vector values ​​of the neighboring vertices, the predicted motion vector value of the current vertex is determined;

[0570] Based on the original value of the motion vector of the current vertex and the predicted value of the motion vector, determine the motion vector difference;

[0571] The motion vector difference is encoded into a bitstream.

[0572] Optionally, encoding unit 1701 is used for:

[0573] The reconstructed motion vector values ​​of the specified neighboring vertices are determined as the predicted motion vector values ​​of the current vertex;

[0574] or,

[0575] Based on the reconstructed motion vector values ​​of all or some of the neighboring vertices of the current vertex, determine the predicted motion vector value of the current vertex;

[0576] or,

[0577] Based on the reconstructed motion vector values ​​of all or some of the neighboring vertices of the current vertex, and the offset, the predicted motion vector value of the current vertex is determined, wherein the offset is determined based on the number of all or some of the neighboring vertices.

[0578] Optionally, if the neighboring vertex is an intra-frame neighboring vertex, the coding unit 1701 is used to:

[0579] The specified intra-frame neighbor vertex is determined based on the distance between the current vertex and the corresponding intra-frame neighbor vertex at their respective points in the reference grid.

[0580] or,

[0581] Based on the distance between the current vertex and the corresponding points of the intra-frame neighbor vertices in the reference grid, a subset of intra-frame neighbor vertices are determined.

[0582] Optionally, if the neighboring vertex is an inter-frame neighbor vertex, the coding unit 1701 is used to:

[0583] The specified inter-frame neighbor vertex is determined based on the distance between the current vertex's co-location in the reference grid and the inter-frame neighbor vertex;

[0584] or,

[0585] Based on the distance between the current vertex at its corresponding point in the reference grid and the inter-frame neighbor vertices, a subset of inter-frame neighbor vertices are determined.

[0586] Optionally, the coordinate dimensions of the current vertex adopt a unified motion vector prediction mode, or the coordinate dimensions of the current vertex adopt their own motion vector prediction modes.

[0587] Optionally, the distance between vertices in the reference mesh is Euclidean distance or Manhattan distance.

[0588] Optionally, the current mesh is the base mesh in VDMC.

[0589] It should be noted that the process of lattice coding by the above coding unit can be referred to the above lattice coding method embodiment, and will not be repeated here.

[0590] Please refer to Figure 18, which shows a structural block diagram of a decoder provided in an exemplary embodiment of this application. The decoder may include one or more components such as a processor 1801 and a memory 1802. The components are coupled together via a bus system. It is understood that the bus system is used to implement communication between these components. In addition to a data bus, the bus system also includes a power bus, a control bus, and a status signal bus.

[0591] Memory 1802 is used to store computer programs that can run on processor 1801; processor 1801 is used to execute, when running the computer program:

[0592] Based on the connection information of the current grid and the distance between vertices in the reference grid, the neighboring vertices of the current vertex are determined, wherein the current vertex is a vertex in the current grid;

[0593] Based on the motion vector decoding values ​​of the neighboring vertices, the motion vector of the current vertex is decoded.

[0594] It is understood that the memory 1802 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be 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 Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1802 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0595] The processor 1801 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above-described grid decoding method can be completed by the integrated logic circuitry in the hardware of the processor 1801 or by software instructions. The processor 1801 can be a general-purpose 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, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1802. Processor 1801 reads information from memory 1802 and, in conjunction with its hardware, completes the steps of the above method. It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more ASICs, DSPs, digital signal processing devices (DSP Devices, DSPDs), programmable logic devices (PLDs), FPGAs, general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by the processor. The memory can be implemented in the processor or external to the processor. Optionally, as another embodiment, processor 1801 is also configured to execute the mesh decoding method described in any of the foregoing embodiments when running the computer program.

[0596] Please refer to Figure 19, which shows a structural block diagram of an encoder provided in an exemplary embodiment of this application. The encoder may include one or more components such as a processor 1901 and a memory 1902. The components are coupled together via a bus system. It is understood that the bus system is used to enable communication between these components. In addition to a data bus, the bus system also includes a power bus, a control bus, and a status signal bus.

[0597] Memory 1902 is used to store computer programs that can run on processor 1901; processor 1901 is used to execute, when running the computer program:

[0598] Based on the connection information of the current grid and the distance between vertices in the reference grid, the neighboring vertices of the current vertex are determined, wherein the current vertex is a vertex in the current grid;

[0599] Based on the motion vector reconstruction values ​​of the neighboring vertices, the current vertex is encoded using motion vectors.

[0600] It is understood that the memory 1902 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be 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 Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory described in this application 1902 is intended to include, but is not limited to, these and any other suitable types of memory.

[0601] The processor 1901 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the aforementioned lattice encoding method can be completed by the integrated logic circuitry in the hardware of the processor 1901 or by instructions in software form. The processor 1901 can be a general-purpose 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, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1902. Processor 1901 reads information from memory 1902 and, in conjunction with its hardware, completes the steps of the above method. It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more ASICs, DSPs, digital signal processing devices (DSP Devices, DSPDs), programmable logic devices (PLDs), FPGAs, general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by the processor. The memory can be implemented in the processor or external to the processor. Optionally, as another embodiment, processor 1901 is also configured to execute the lattice coding method described in any of the foregoing embodiments when running the computer program.

[0602] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the grid decoding method or the grid encoding method as described in the above embodiments.

[0603] This application also provides a bitstream that is decoded using the grid decoding method described above, or encoded using the grid encoding method described above.

[0604] This application also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. A processor retrieves the computer instructions from the computer-readable storage medium and executes the computer instructions to implement the grid decoding method or the grid encoding method as described in the above embodiments.

[0605] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0606] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A grid decoding method, characterized in that, The method includes: Based on the connection information of the current grid and the distance between vertices in the reference grid, the neighboring vertices of the current vertex are determined, wherein the current vertex is a vertex in the current grid; Based on the motion vector decoding values ​​of the neighboring vertices, the motion vector of the current vertex is decoded.

2. The method according to claim 1, characterized in that, The determination of the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes at least one of the following: Based on the connection information of the current grid and the distance between vertices in the reference grid, the intra-frame neighbor vertices of the current vertex are determined, and the intra-frame neighbor vertices belong to the current grid; or, Based on the connection information of the current grid and the distance between vertices in the reference grid, the inter-frame neighbor vertices of the current vertex are determined, and the inter-frame neighbor vertices belong to the reference grid.

3. The method according to claim 2, characterized in that, The distance between the co-location of the current vertex in the reference grid and the co-location of the intra-frame neighbor vertex in the reference grid is less than or equal to the distance between the co-location of the current vertex in the reference grid and the co-location of other candidate intra-frame neighbor vertices other than the intra-frame neighbor vertex in the reference grid.

4. The method according to claim 3, characterized in that, The step of determining the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes: Based on the connection information of the current grid, determine the current triangle in the current grid; Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle; Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination; If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of intra-frame neighbor points is equal to the first number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of intra-frame neighbor points, then the vertex index corresponding to the maximum distance in the set of intra-frame neighbor points is replaced with the vertex index of the second vertex. When all triangles in the current grid have been traversed, the intra-frame neighbor vertices of the current vertex are determined based on the vertex index in the intra-frame neighbor set corresponding to the current vertex.

5. The method according to claim 4, characterized in that, The step of determining the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: The first intra-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first intra-frame neighbor set is equal to the first number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first intra-frame neighbor set.

6. The method according to claim 4, characterized in that, The step of determining the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first intra-frame neighbor set is less than the first number, then the vertex index of the second vertex is added to the first intra-frame neighbor set.

7. The method according to claim 4, characterized in that, The method further includes: Based on the distances corresponding to the vertex indices in the first intra-frame neighbor set, the vertex indices in the first intra-frame neighbor set are sorted.

8. The method according to claim 2, characterized in that, The distance between the current vertex at the same point in the reference grid and the inter-frame neighbor vertex is less than or equal to the distance between the current vertex at the same point in the reference grid and other candidate inter-frame neighbor vertices other than the inter-frame neighbor vertex.

9. The method according to claim 8, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes: Based on the connection information of the current grid, determine the current triangle in the current grid; Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle; Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination; If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, then the vertex index corresponding to the maximum distance in the first inter-frame neighbor point set is replaced with the vertex index of the second vertex. When all triangles in the current grid have been traversed, the inter-frame neighbor vertices of the current vertex are determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

10. The method according to claim 9, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: The first inter-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set.

11. The method according to claim 9, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set.

12. The method according to claim 8, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes: Based on the connection information of the current grid, determine the current triangle in the current grid; Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle; Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination; If the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the first inter-frame neighbor set is replaced with the vertex index of the second vertex; or, if the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the second inter-frame neighbor set is replaced with the vertex index of the first vertex. When all triangles in the current grid have been traversed, the inter-frame neighbor vertex of the current vertex is determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

13. The method according to claim 12, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indexes in the first inter-frame neighbor point set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, then the first inter-frame neighbor point set is maintained. or, If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the second inter-frame neighbor set is maintained. or, If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set is maintained. or, If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the second inter-frame neighbor set is maintained. or, If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set and the second inter-frame neighbor point set are maintained. or, If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the first inter-frame neighbor set and the second inter-frame neighbor set are maintained.

14. The method according to claim 12, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set. or, If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is less than the second number, then the vertex index of the first vertex is added to the second inter-frame neighbor set.

15. The method according to claim 9 or 12, characterized in that, The method further includes: Based on the distances corresponding to the vertex indices in the first inter-frame neighbor set, sort the vertex indices in the first inter-frame neighbor set; or, Based on the distances corresponding to the vertex indices in the second inter-frame neighbor set, the vertex indices in the second inter-frame neighbor set are sorted.

16. The method according to claim 2, characterized in that, The inter-frame neighbor vertices of the current vertex include at least the same point of the current vertex in the reference grid.

17. The method according to any one of claims 1 to 16, characterized in that, The motion vector decoding of the current vertex based on the motion vector decoding values ​​of the neighboring vertices includes: Analyze the bitstream to determine the motion vector difference of the current vertex; Based on the motion vector decoding values ​​of the neighboring vertices, determine the motion vector prediction value of the current vertex; Based on the motion vector difference and the motion vector prediction value, the motion vector decoding value of the current vertex is determined.

18. The method according to claim 17, characterized in that, Determining the predicted motion vector value of the current vertex based on the decoded motion vector values ​​of the neighboring vertices includes at least one of the following methods: The motion vector decoding value of the specified neighboring vertex is determined as the motion vector prediction value of the current vertex; or, Based on the motion vector decoding values ​​of all or some of the neighboring vertices of the current vertex, determine the motion vector prediction value of the current vertex; or, Based on the motion vector decoding values ​​of all or some of the neighboring vertices of the current vertex, and the offset, the motion vector prediction value of the current vertex is determined, wherein the offset is determined based on the number of all or some of the neighboring vertices.

19. The method according to claim 18, characterized in that, When the neighboring vertex is an intra-frame neighboring vertex, the method further includes: The specified intra-frame neighbor vertex is determined based on the distance between the current vertex and the corresponding intra-frame neighbor vertex at their respective points in the reference grid. or, Based on the distance between the current vertex and the corresponding points of the intra-frame neighbor vertices in the reference grid, a subset of intra-frame neighbor vertices are determined.

20. The method according to claim 18, characterized in that, When the neighboring vertex is an inter-frame neighbor vertex, the method further includes: The specified inter-frame neighbor vertex is determined based on the distance between the current vertex's co-location in the reference grid and the inter-frame neighbor vertex; or, Based on the distance between the current vertex at its corresponding point in the reference grid and the inter-frame neighbor vertices, a subset of inter-frame neighbor vertices are determined.

21. The method according to claim 18, characterized in that, The coordinate dimensions of the current vertex adopt a unified motion vector prediction mode, or the coordinate dimensions of the current vertex adopt their own motion vector prediction modes.

22. The method according to any one of claims 1 to 21, characterized in that, The distance between vertices in the reference mesh is either Euclidean distance or Manhattan distance.

23. The method according to any one of claims 1 to 22, characterized in that, The current grid is the base grid in VDMC.

24. A grid coding method, characterized in that, The method includes: Based on the connection information of the current grid and the distance between vertices in the reference grid, the neighboring vertices of the current vertex are determined, wherein the current vertex is a vertex in the current grid; Based on the motion vector reconstruction values ​​of the neighboring vertices, the current vertex is encoded using motion vectors.

25. The method according to claim 24, characterized in that, The determination of the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes at least one of the following: Based on the connection information of the current grid and the distance between vertices in the reference grid, the intra-frame neighbor vertices of the current vertex are determined, and the intra-frame neighbor vertices belong to the current grid; or, Based on the connection information of the current grid and the distance between vertices in the reference grid, the inter-frame neighbor vertices of the current vertex are determined, and the inter-frame neighbor vertices belong to the reference grid.

26. The method according to claim 25, characterized in that, The distance between the co-location of the current vertex in the reference grid and the co-location of the intra-frame neighbor vertex in the reference grid is less than or equal to the distance between the co-location of the current vertex in the reference grid and the co-location of other candidate intra-frame neighbor vertices other than the intra-frame neighbor vertex in the reference grid.

27. The method according to claim 26, characterized in that, The step of determining the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes: Based on the connection information of the current grid, determine the current triangle in the current grid; Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle; Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination; If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the set of intra-frame neighbor points corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the set of intra-frame neighbor points is equal to the first number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the set of intra-frame neighbor points, then the vertex index corresponding to the maximum distance in the set of intra-frame neighbor points is replaced with the vertex index of the second vertex. When all triangles in the current grid have been traversed, the intra-frame neighbor vertices of the current vertex are determined based on the vertex index in the intra-frame neighbor set corresponding to the current vertex.

28. The method according to claim 27, characterized in that, The step of determining the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: The first intra-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first intra-frame neighbor set is equal to the first number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first intra-frame neighbor set.

29. The method according to claim 27, characterized in that, The step of determining the intra-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first intra-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first intra-frame neighbor set is less than the first number, then the vertex index of the second vertex is added to the first intra-frame neighbor set.

30. The method according to claim 27, characterized in that, The method further includes: Based on the distances corresponding to the vertex indices in the first intra-frame neighbor set, the vertex indices in the first intra-frame neighbor set are sorted.

31. The method according to claim 25, characterized in that, The distance between the current vertex at the same point in the reference grid and the inter-frame neighbor vertex is less than or equal to the distance between the current vertex at the same point in the reference grid and other candidate inter-frame neighbor vertices other than the inter-frame neighbor vertex.

32. The method according to claim 31, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes: Based on the connection information of the current grid, determine the current triangle in the current grid; Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle; Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination; The vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the number of vertex indices in the second set, and the first... If a distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, the vertex index corresponding to the maximum distance in the first inter-frame neighbor point set is replaced with the vertex index of the second vertex. When all triangles in the current grid have been traversed, the inter-frame neighbor vertices of the current vertex are determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

33. The method according to claim 32, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: The first inter-frame neighbor set is maintained when the vertex index of the first vertex is greater than the vertex index of the second vertex, the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set.

34. The method according to claim 32, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the vertex index of the first vertex is greater than the vertex index of the second vertex, and the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set.

35. The method according to claim 31, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid includes: Based on the connection information of the current grid, determine the current triangle in the current grid; Determine vertex combinations formed by the vertices of the current triangle, wherein each vertex combination contains two vertices of the current triangle; Determine the first distance between the corresponding points of the first and second vertices in the reference grid in the current vertex combination; If the first inter-frame neighbor set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the first inter-frame neighbor set is replaced with the vertex index of the second vertex; or, if the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is less than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the vertex index corresponding to the maximum distance in the second inter-frame neighbor set is replaced with the vertex index of the first vertex. When all triangles in the current grid have been traversed, the inter-frame neighbor vertex of the current vertex is determined based on the vertex index in the inter-frame neighbor point set corresponding to the current vertex.

36. The method according to claim 35, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indexes in the first inter-frame neighbor point set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the first inter-frame neighbor point set, then the first inter-frame neighbor point set is maintained. or, If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is equal to the second number, and the first distance is greater than or equal to the maximum distance corresponding to the vertex index in the second inter-frame neighbor set, then the second inter-frame neighbor set is maintained. or, If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set is maintained. or, If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the second inter-frame neighbor set is maintained. or, If the first inter-frame neighbor point set corresponding to the first vertex contains the vertex index of the second vertex, the first inter-frame neighbor point set and the second inter-frame neighbor point set are maintained. or, If the second inter-frame neighbor set corresponding to the second vertex contains the vertex index of the first vertex, the first inter-frame neighbor set and the second inter-frame neighbor set are maintained.

37. The method according to claim 35, characterized in that, The step of determining the inter-frame neighbor vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid further includes: If the first inter-frame neighbor point set corresponding to the first vertex does not contain the vertex index of the second vertex, and the number of vertex indices in the first inter-frame neighbor point set is less than the second number, then the vertex index of the second vertex is added to the first inter-frame neighbor point set. or, If the second inter-frame neighbor set corresponding to the second vertex does not contain the vertex index of the first vertex, and the number of vertex indices in the second inter-frame neighbor set is less than the second number, then the vertex index of the first vertex is added to the second inter-frame neighbor set.

38. The method according to claim 32 or 35, characterized in that, The method further includes: Based on the distances corresponding to the vertex indices in the first inter-frame neighbor set, sort the vertex indices in the first inter-frame neighbor set; or, Based on the distances corresponding to the vertex indices in the second inter-frame neighbor set, the vertex indices in the second inter-frame neighbor set are sorted.

39. The method according to claim 25, characterized in that, The inter-frame neighbor vertices of the current vertex include at least the same point of the current vertex in the reference grid.

40. The method according to any one of claims 24 to 39, characterized in that, The motion vector encoding of the current vertex based on the motion vector reconstruction values ​​of the neighboring vertices includes: Based on the reconstructed motion vector values ​​of the neighboring vertices, the predicted motion vector value of the current vertex is determined; Based on the original value of the motion vector of the current vertex and the predicted value of the motion vector, determine the motion vector difference; The motion vector difference is encoded into a bitstream.

41. The method according to claim 40, characterized in that, Determining the predicted motion vector value of the current vertex based on the reconstructed motion vector values ​​of the neighboring vertices includes at least one of the following methods: The reconstructed motion vector values ​​of the specified neighboring vertices are determined as the predicted motion vector values ​​of the current vertex; or, Based on the reconstructed motion vector values ​​of all or some of the neighboring vertices of the current vertex, determine the predicted motion vector value of the current vertex; or, Based on the reconstructed motion vector values ​​of all or some of the neighboring vertices of the current vertex, and the offset, the predicted motion vector value of the current vertex is determined, wherein the offset is determined based on the number of all or some of the neighboring vertices.

42. The method according to claim 41, characterized in that, When the neighboring vertex is an intra-frame neighboring vertex, the method further includes: The specified intra-frame neighbor vertex is determined based on the distance between the current vertex and the corresponding intra-frame neighbor vertex at their respective points in the reference grid. or, Based on the distance between the current vertex and the corresponding points of the intra-frame neighbor vertices in the reference grid, a subset of intra-frame neighbor vertices are determined.

43. The method according to claim 41, characterized in that, When the neighboring vertex is an inter-frame neighbor vertex, the method further includes: The specified inter-frame neighbor vertex is determined based on the distance between the current vertex's co-location in the reference grid and the inter-frame neighbor vertex; or, Based on the distance between the current vertex at its corresponding point in the reference grid and the inter-frame neighbor vertices, a subset of inter-frame neighbor vertices are determined.

44. The method according to claim 41, characterized in that, The coordinate dimensions of the current vertex adopt a unified motion vector prediction mode, or the coordinate dimensions of the current vertex adopt their own motion vector prediction modes.

45. The method according to any one of claims 24 to 44, characterized in that, The distance between vertices in the reference mesh is either Euclidean distance or Manhattan distance.

46. ​​The method according to any one of claims 24 to 45, characterized in that, The current grid is the base grid in VDMC.

47. A grid decoding device, characterized in that, The device includes: The decoding unit is used to determine the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid, wherein the current vertex is a vertex in the current grid; The decoding unit is used to perform motion vector decoding on the current vertex based on the motion vector decoding values ​​of the neighboring vertices.

48. A grid coding device, characterized in that, The device includes: An encoding unit is used to determine the neighboring vertices of the current vertex based on the connection information of the current grid and the distance between vertices in the reference grid, wherein the current vertex is a vertex in the current grid; The encoding unit is used to perform motion vector encoding on the current vertex based on the motion vector reconstruction values ​​of the neighboring vertices.

49. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the grid decoding method as described in any one of claims 1 to 23, or the grid encoding method as described in any one of claims 24 to 46.

50. A bitstream, characterized in that, The bitstream is decoded using the grid decoding method as described in any one of claims 1 to 23, or encoded using the grid encoding method as described in any one of claims 24 to 46.

51. A decoder, characterized in that, The decoder includes a memory and a processor, the memory being used to store a computer program running on the processor; the processor being used to execute the grid decoding method as described in any one of claims 1 to 23 when running the computer program.

52. An encoder, characterized in that, The encoder includes a memory and a processor, the memory for storing a computer program running on the processor; the processor for executing the mesh encoding method as described in any one of claims 24 to 46 when running the computer program.

Citation Information

Patent Citations

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

    CN116668703A

  • Coding method, decoding method and terminal

    CN116843771A

  • Coding method and terminal

    CN116843855A

  • Coding and decoding method, device and equipment

    CN117412058A

  • Encoding method, apparatus and device, and decoding method, apparatus and device

    WO2024007951A1