Encoding and decoding method, encoder, decoder and storage medium

CN120283407APending Publication Date: 2025-07-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380082256.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-01-12
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When the existing dynamic mesh coding method encodes and decodes the geometric information of the mesh, the shift coefficients are poorly organized, which results in an increase in the code rate of the lossless coding shift coefficients and reduces the mesh compression performance.

Method used

The entropy coding method is used to directly encode the transformed and quantized shift coefficients to avoid mapping them to two-dimensional images. The encoding of the second and three-dimensional shift coefficients is simplified through position index information to improve encoding and decoding efficiency.

Benefits of technology

The encoding and decoding efficiency of the shift coefficient is improved, the code rate is reduced, and the grid compression performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120283407A_ABST
    Figure CN120283407A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a coding and decoding method, a coder, a decoder and a storage medium, and the method comprises the steps: determining a plurality of shift coefficients corresponding to a plurality of grid vertexes in a current image block at a coding end; determining position index information of a non-zero shift coefficient in the plurality of shift coefficients according to the non-zero shift coefficient in the plurality of shift coefficients; determining shift coefficient identification information according to the position index information of the non-zero shift coefficient; and coding the shift coefficient identification information and the position index information, coding a non-zero shift coefficient in the plurality of shift coefficients according to the position index information, and writing obtained coding bits into a code stream. During coding, the shift coefficient does not need to be mapped from a three-dimensional space to a two-dimensional image, the converted and quantized shift coefficient is directly coded, during decoding, a shift coefficient code stream is directly decoded to obtain the shift coefficient, and then inverse quantization and inverse conversion are performed to obtain a reconstructed shift coefficient, so that the coding and decoding efficiency of the shift coefficient is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method, encoder, decoder and storage medium Technical Field

[0001] The embodiments of the present application relate to the technical field of grid compression coding, and in particular to a coding and decoding method, an encoder, a decoder, and a storage medium. Background Art

[0002] In the standard reference software for Dynamic Mesh Coding provided by the Moving Picture Experts Group (MPEG), encoding and decoding geometric information of a mesh mainly involves organizing and compressing shift coefficients corresponding to the original mesh.

[0003] However, the current common method of organizing shift coefficients is not optimal, which will increase the bit rate of subsequent lossless coding of shift coefficients and reduce the grid compression performance.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a coding and decoding method, an encoder, a decoder, and a storage medium. When encoding and decoding shift coefficients, there is no need to map the shift coefficients from a three-dimensional space to a two-dimensional image. An entropy coding method is used to directly encode the transformed and quantized shift coefficients, which can improve the coding efficiency of the shift coefficients.

[0006] The technical solution of the embodiment of the present application can be implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, the method comprising:

[0008] Decoding the code stream to determine shift coefficient identification information of a plurality of shift coefficients corresponding to a plurality of mesh vertices in the current image block;

[0009] Determining position index information of a non-zero shift coefficient among the plurality of shift coefficients according to the shift coefficient identification information;

[0010] The plurality of shift coefficients are determined according to the shift coefficient identification information and the position index information.

[0011] In a second aspect, an embodiment of the present application provides a decoding method applied to a decoder, wherein the decoder includes an entropy decoder and a trellis decoder, and the method includes:

[0012] The grid decoder is used to decode the code stream of the simplified grid and determine the simplified grid of the current image block;

[0013] The entropy decoder is used to execute the decoding method described in the embodiment of the present application.

[0014] In a third aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:

[0015] Determining a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block;

[0016] Determining position index information of the non-zero shift coefficients among the multiple shift coefficients according to the non-zero shift coefficients among the multiple shift coefficients;

[0017] Determining shift coefficient identification information according to position index information of the non-zero shift coefficient;

[0018] Encoding the shift coefficient identification information and the position index information, and writing the obtained coded bits into a bitstream;

[0019] Non-zero shift coefficients among the multiple shift coefficients are encoded according to the position index information, and the obtained encoded bits are written into a bitstream.

[0020] In a fourth aspect, an embodiment of the present application provides an encoding method applied to an encoder, the encoder including an entropy encoder, a trellis encoder, and a preprocessor, the method comprising:

[0021] The preprocessor is used to generate a simplified grid and shift coefficients based on the original grid of the current frame;

[0022] The grid encoder is used to encode the simplified grid to generate a code stream of the simplified grid;

[0023] The entropy encoder is used to execute the encoding method described in the embodiment of the present application.

[0024] In a fifth aspect, an embodiment of the present application provides an encoder, comprising:

[0025] a first determining unit configured to determine a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block; determine position index information of the non-zero shift coefficients in the plurality of shift coefficients based on non-zero shift coefficients in the plurality of shift coefficients; and determine shift coefficient identification information based on the position index information of the non-zero shift coefficients;

[0026] The encoding unit encodes the shift coefficient identification information and the position index information, and writes the obtained coded bits into the bitstream; and encodes the non-zero shift coefficients among the multiple shift coefficients according to the position index information, and writes the obtained coded bits into the bitstream.

[0027] In a sixth aspect, an embodiment of the present application provides an encoder, comprising: a first memory and a first processor; wherein,

[0028] The first memory is used to store a computer program that can be run on the first processor;

[0029] The first processor is configured to execute the method described in the third aspect and the fourth aspect when running the computer program.

[0030] In a seventh aspect, an embodiment of the present application provides a decoder, comprising: a decoding unit, a second determining unit; wherein,

[0031] The decoding unit is configured to decode the code stream;

[0032] The second determination unit is configured to determine the shift coefficient identification information of multiple shift coefficients corresponding to multiple mesh vertices in the current image block; determine the position index information of non-zero shift coefficients in the multiple shift coefficients based on the shift coefficient identification information; and determine the multiple shift coefficients based on the shift coefficient identification information and the position index information.

[0033] In an eighth aspect, an embodiment of the present application provides a decoder, a second memory, and a second processor; wherein,

[0034] The second memory is used to store a computer program that can be run on the second processor;

[0035] The second processor is configured to execute the method described in the first aspect and the second aspect when running the computer program.

[0036] In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it implements the method described in the first aspect or the second aspect, or implements the method described in the third aspect or the fourth aspect.

[0037] The embodiments of the present application provide a coding and decoding method, an encoder, a decoder, and a storage medium. During encoding, there is no need to map the shift coefficients from a three-dimensional space to a two-dimensional image, and the transformed and quantized shift coefficients are directly encoded. During decoding, the shift coefficient code stream is directly decoded to obtain the shift coefficients, and then inverse quantization and inverse transformation are performed to obtain the reconstructed shift coefficients, thereby improving the coding and decoding efficiency of the shift coefficients.

[0038] Furthermore, since the second and third-dimensional coefficients of the shift coefficients have similar distribution characteristics, the encoding range of the second and third-dimensional shift coefficients is indicated by a position index information, and whether the second and third-dimensional coefficients at an index position are both 0 is indicated by a shift identification information. This can simplify the encoding of the second and third-dimensional shift coefficients and further improve the encoding efficiency of the shift coefficients. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] FIG1A is a first schematic diagram of a three-dimensional grid image;

[0040] FIG1B is a partial enlarged view of a three-dimensional grid image;

[0041] Figure 2 is a schematic diagram of the connection method of the three-dimensional grid;

[0042] FIG3A is a second schematic diagram of a three-dimensional grid image;

[0043] FIG3B is a schematic diagram of a grid data storage format;

[0044] FIG3C is a property diagram of a three-dimensional grid image;

[0045] Figure 4 is a diagram of the overall framework of grid coding;

[0046] FIG5A is a schematic diagram of a grid preprocessing process;

[0047] FIG5B is a schematic diagram of generating a shift coefficient;

[0048] FIG6A is a schematic diagram of intra-frame coding;

[0049] FIG6B is a schematic diagram of inter-frame coding;

[0050] FIG7A is a schematic diagram of intra-frame decoding;

[0051] FIG7B is a schematic diagram of inter-frame decoding;

[0052] FIG8 is a schematic diagram of the MPEG DMC shift coefficient encoding process;

[0053] FIG9 is a schematic diagram of a network architecture of a codec provided in an embodiment of the present application;

[0054] FIG10 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0055] FIG11 is a schematic diagram of index positions of multiple shift coefficients according to an embodiment of the present application;

[0056] FIG12 is a second schematic diagram of index positions of multiple shift coefficients in an embodiment of the present application;

[0057] FIG13 is a schematic diagram of intra-frame decoding provided by an embodiment of the present application;

[0058] FIG14 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0059] FIG15 is a schematic diagram of intra-frame coding provided by an embodiment of the present application;

[0060] FIG16 is a schematic diagram of the structure of the encoder;

[0061] FIG17 is a second schematic diagram of the structure of the encoder;

[0062] FIG18 is a schematic diagram of the first structure of a decoder;

[0063] FIG19 is a second schematic diagram of the decoder structure. DETAILED DESCRIPTION

[0064] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0066] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0067] It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0068] It should be noted that it is possible to decode and synthesize different data format bitstreams within the same video scene. These can include at least image format, point cloud format, and mesh format. In this way, real-time immersive video interaction services can be provided for multiple data formats (e.g., mesh, point cloud, image, etc.) from different sources.

[0069] In embodiments of the present application, the data format-based approach allows for independent processing at the bitstream level of the data format. This means that, similar to tiles or slices in video encoding, different data formats in this scenario can be encoded independently, enabling independent encoding and decoding based on the data format.

[0070] Generally speaking, 3D animation content uses a keyframe-based representation method, that is, each frame is a static mesh. Static meshes at different times have the same topological structure and different geometric structures. However, the amount of data of 3D dynamic meshes represented based on keyframes is extremely large, so how to effectively store, transmit and draw them has become a problem faced by the development of 3D dynamic meshes. In addition, the spatial scalability of the mesh needs to be supported for different user terminals (computers, notebooks, portable devices, mobile phones); different network bandwidths (broadband, narrowband, wireless) need to support the quality scalability of the mesh. Therefore, 3D dynamic mesh compression is a very critical issue.

[0071] A three-dimensional grid is the surface of a three-dimensional object composed of countless polygons in space. Polygons are composed of vertices and edges. Figure 1A shows a three-dimensional grid image, and Figure 1B shows a partial enlarged view of the three-dimensional grid image. It can be seen that the grid surface is composed of closed polygons.

[0072] A two-dimensional image has information expressed at every pixel point and is distributed regularly, so there is no need to record its position information separately. However, the distribution of vertices in the mesh in three-dimensional space is random and irregular, and the way polygons are formed requires additional regulations. Therefore, it is necessary to record the position of each vertex in space and the connection information of each polygon to fully express a mesh image. As shown in Figure 2, the same number of vertices and vertex positions will form completely different surfaces due to different connection methods.

[0073] In addition to the above information, since 3D grid images are usually encoded using existing 2D image / video encoding methods, the 3D grid images need to be converted from 3D space to 2D space. The UV coordinates define this conversion process.

[0074] Similar to 2D images, each position in the image acquisition process may have corresponding attribute information, typically RGB color values, which reflect the object's color. For 3D mesh images, in addition to color, each vertex's attribute information often includes reflectance values, which reflect the object's surface texture. The attribute information of a 3D mesh image is stored in a 2D image, and the mapping from 2D to 3D is specified by UV coordinates.

[0075] Therefore, 3D mesh data typically includes 3D geometric coordinate information (x, y, z), geometric connectivity information, UV coordinates, and an attribute map. Figure 3A shows a 3D mesh image, Figure 3B shows the mesh data storage format including 3D geometric coordinates, UV coordinates, and connectivity information, and Figure 3C shows the corresponding attribute map.

[0076] Current 3D dynamic mesh compression methods include space-time prediction methods, which improve compression efficiency by eliminating spatial and temporal correlations; principal component analysis (PCA)-based technology, which projects in the eigenvector space to concentrate energy; and wavelet-based methods, which support spatial scalability and quality scalability.

[0077] It should be noted that Figure 4 is a diagram of the overall framework of grid coding, Figure 5A is a schematic diagram of the grid preprocessing process, and Figure 5B is a schematic diagram of the generation of the shift coefficient. At the encoding end, it is mainly divided into two parts: preprocessing and encoder. Among them, the basic grid and shift coefficient are first generated through preprocessing. The preprocessing process includes: first, downsampling the original mesh (Original Mesh) to generate a simplified mesh (Decimated Mesh) with a significantly reduced number of vertices, or called a base mesh / basic mesh (Base Mesh). Then, the simplified mesh is subdivided, and the newly generated vertices are inserted on the edges of the simplified mesh to obtain a subdivided mesh (Subdivided Mesh). Finally, for each vertex in the subdivided mesh, the point closest to it in the original mesh is found, and the displacement coefficients of the two points are calculated. After preprocessing, the simplified mesh and the shift coefficient are input into the encoder to generate a bitstream.

[0078] Figure 6A is a schematic diagram of intra-frame coding. As shown in Figure 6A, in the intra-frame encoder, a common static mesh encoder (Static Mesh Encoder) can be used to encode the simplified mesh to generate the corresponding bitstream (Compressed base mesh bitstream). Next, the reconstructed simplified mesh is used to update the displacement coefficients (Update Displacements). The updated displacement coefficients are subjected to wavelet transform (Wavelet Transform) to obtain the displacement coefficients. After being packaged into images and videos (Image Packing, Video Packing), they are encoded using High Efficiency Video Coding (H.265-HEVC) to generate a bitstream of displacement coefficients (Compressed displacements bitstream). For attribute map encoding, the feature map is first transformed (Texture Transfer) according to the difference between the reconstructed geometric information and the original geometric information, and then padded (Padding) and packed (Video Packing) and encoded using a video encoder to form an attribute bitstream (Compressed attribute bitstream).

[0079] Figure 6B is a schematic diagram of inter-frame coding. As shown in Figure 6B, the inter-frame encoder and the intra-frame encoder process are roughly the same, but the inter-frame encoder does not directly encode the simplified grid. Instead, it encodes the motion vector between the simplified grid of the current frame and the simplified grid of the reference frame (Motion Encoder) and generates a corresponding motion vector bitstream (Compressed motion bitstream).

[0080] Correspondingly, during the decoding process, the decoder can also be divided into an intra-frame decoder and an inter-frame decoder according to the type of the frame it operates on, which are used to perform intra-frame decoding and inter-frame decoding respectively.

[0081] FIG7A is a schematic diagram of intra-frame decoding. As shown in FIG7A , in the intra-frame decoder, a static mesh decoder can be used to decode a simplified mesh. A video decoder is used to decode the shift coefficient video, and the shift coefficients are obtained through video unpacking and inverse wavelet transform. The decoded simplified mesh and shift coefficients are used to obtain the decoded mesh geometry information. The attribute map is decoded directly through the video decoder.

[0082] FIG7B is a schematic diagram of inter-frame decoding. As shown in FIG7B , for an inter-frame decoder, the process is basically the same as that of an intra-frame decoder, except that the simplified grid is not directly decoded, but the motion vector is decoded and the simplified grid of the current frame is calculated using the simplified grid of the previous frame (reference frame).

[0083] In summary, the standard reference software for dynamic mesh coding (DMC) currently provided by the Moving Picture Experts Group (MPEG) (hereinafter referred to as the standard reference software) includes the following steps:

[0084] 1. Preprocess the original mesh by reducing the number of vertices in the mesh and simplifying the connection relationship.

[0085] 2. Subdivide the simplified mesh in step 1. For any two connected vertices in step 1, add a new point at the midpoint of the connecting line, and repeat this process twice.

[0086] 3. For each vertex in step 2, find the point in the original mesh that is closest to it and calculate the displacement coefficient of these two points.

[0087] 4. Use an encoder such as Draco to quantize the simplified grid in step 1 and then encode it.

[0088] 5. Adjust the shift coefficients in step 3 based on the reconstructed simplified grid obtained in step 4.

[0089] 6. Perform wavelet transform on the shift coefficients in step 5, and quantize the shift coefficients after wavelet transform to obtain quantized transform coefficients.

[0090] 7. Map the quantized transform coefficients from three-dimensional space to a two-dimensional image (or "image packing") to generate a two-dimensional image of shifted coefficients.

[0091] 8. Use a standard video encoder such as H.265 to encode the shift coefficient two-dimensional image in step 6.

[0092] The dynamic grid decoding process is divided into the following steps:

[0093] 1. The basic grid code stream is decoded by a decoder such as draco to generate a decoded basic grid.

[0094] 2. The shift coefficient bit stream is decoded using a standard video encoder such as H.265 to obtain a shift coefficient two-dimensional image.

[0095] 3. Map the shift coefficient two-dimensional image from the two-dimensional image to the three-dimensional space (or "image unpacking") to obtain quantized transform coefficients.

[0096] 4. Dequantize and inverse wavelet transform the quantized transform coefficients to obtain the decoded shift coefficients.

[0097] 5. The decoded base grid and the decoded shift coefficients are combined to generate the reconstructed 3D grid geometric information.

[0098] 6. After the attribute code stream is decoded by HEVC, a reconstructed attribute graph is generated.

[0099] FIG8 is a schematic diagram of the MPEG DMC shift coefficient coding process. As shown in FIG8 , the shift coefficient coding process is not parallel. It is necessary to first package the transformed and quantized shift coefficients into images and map them from three-dimensional space to two-dimensional images to generate shift coefficient two-dimensional images. Then, the shift coefficient two-dimensional images are video-encoded. The coding efficiency of the shift coefficients is low, which reduces the grid compression performance.

[0100] In order to solve the above problems, an embodiment of the present application provides a coding and decoding method. During encoding, there is no need to map the shift coefficients from three-dimensional space to two-dimensional images. The transformed and quantized shift coefficients are directly encoded. During decoding, the shift coefficient code stream is directly decoded to obtain the shift coefficients, and then inverse quantization and inverse transformation are performed to obtain the reconstructed shift coefficients, thereby improving the coding and decoding efficiency of the shift coefficients.

[0101] Furthermore, since the second and third-dimensional coefficients of the shift coefficients have similar distribution characteristics, the encoding range of the second and third-dimensional shift coefficients is indicated by a position index information, and whether the second and third-dimensional coefficients at an index position are both 0 is indicated by a shift identification information. This can simplify the encoding of the second and third-dimensional shift coefficients and further improve the encoding efficiency of the shift coefficients.

[0102] The embodiment of the present application provides a network architecture of a codec system including a decoding method and an encoding method. FIG9 is a schematic diagram of a network architecture of a codec provided by the embodiment of the present application. As shown in FIG9 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During the implementation process, the electronic device can be various types of devices with codec functions. For example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., and the embodiment of the present application is not limited thereto. Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.

[0103] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0104] The embodiment of the present application provides a decoding method. FIG10 is a flowchart of a decoding method provided by the embodiment of the present application. As shown in FIG10 , in the embodiment of the present application, the method for performing decoding processing by the decoder may include the following steps:

[0105] Step 101: Decode a code stream to determine shift coefficient identification information of a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block;

[0106] The current image block may be a current three-dimensional grid image, or an image block obtained by performing image segmentation on the current three-dimensional grid image.

[0107] In some embodiments, the decoding of the code stream to determine the shift coefficient identification information of the multiple shift coefficients corresponding to the multiple mesh vertices in the current image block includes: decoding the shift coefficient code stream to determine the shift identification information of the current image block.

[0108] The shift coefficient identification information is used to indicate whether to decode position index information of a non-zero shift coefficient among the multiple shift coefficients.

[0109] Step 102: Determine position index information of a non-zero shift coefficient among the plurality of shift coefficients according to the shift coefficient identification information;

[0110] The position index information is used to indicate a non-zero shift coefficient among the plurality of shift coefficients. Exemplarily, the position index information is used to indicate a decoding range of the shift coefficient. In some embodiments, the index position of the last non-zero coefficient among the plurality of shift coefficients is determined based on the position index information, and the shift coefficients between the first shift coefficient and the last non-zero coefficient are decoded.

[0111] In some embodiments, the shift coefficient includes shift coefficients in three coordinate dimensions; the position index information includes first index information and second index information, the first index information indicating a decoding range for the shift coefficient in the first coordinate dimension, and the second index information indicating a decoding range for the shift coefficient in the second coordinate dimension and the third coordinate dimension. Accordingly, the shift coefficient identification information includes first identification information and second identification information; the first identification information is used to indicate whether to decode the first index information; and the second identification information is used to indicate whether to decode the second index information.

[0112] Exemplarily, the first index information is used to indicate the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; the second index information is used to indicate the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension. It can be understood that the second index information indicates the decoding range of the shift coefficients in the second coordinate dimension and the third coordinate dimension. Indicating the decoding range of the second and third three-dimensional shift coefficients by the second position index information can simplify the decoding of the second and third three-dimensional shift coefficients, thereby improving decoding efficiency and bringing performance gains.

[0113] In some embodiments, the method further comprises: determining index positions of the plurality of shift coefficients according to a decoding order of the plurality of shift coefficients corresponding to the mesh vertices. Exemplarily, the index positions of the plurality of shift coefficients are Indi, i=0, 1, 2, 3, ...

[0114] In actual applications, the first index information can directly indicate the index position of the last non-zero coefficient in the first coordinate dimension, or it can indicate the offset position of the index position of the last non-zero coefficient; the second index information can directly indicate the index position of the last non-zero coefficient in the second coordinate dimension and the index position behind the last non-zero coefficient in the third coordinate dimension, or it can indicate the offset position of the behind index position.

[0115] Figure 11 is a schematic diagram of the index positions of multiple shift coefficients in an embodiment of the present application. As shown in Figure 11, the shift coefficients include shift coefficients in three coordinate dimensions of XYZ. When X is the first coordinate dimension, the index position of the last non-zero coefficient is Indi, and the first index information is used to indicate Indi. When Y is the second coordinate dimension, the index position of the last non-zero coefficient is Indi+1. When Z is the third coordinate dimension, the index position of the last non-zero coefficient is Indi, and the second index information is used to indicate the later index position Indi+1.

[0116] In some embodiments, the first index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; the second index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension.

[0117] Figure 12 is a second schematic diagram of the index positions of multiple shift coefficients in an embodiment of the present application. As shown in Figure 12, the shift coefficients include shift coefficients in three coordinate dimensions of XYZ. When X is the first coordinate dimension, the index position of the last non-zero coefficient is Indi, and the first index information is used to indicate Indi+1. When Y is the second coordinate dimension, the index position of the last non-zero coefficient is Indi+1. When Z is the third coordinate dimension, the index position of the last non-zero coefficient is Indi, and the second index information is used to indicate the index position Indi+2 after the latter index position Indi+1.

[0118] Accordingly, the shift coefficient identification information includes first identification information, the first identification information being used to indicate whether the first index information indicates the index position of the first shift coefficient among the multiple shift coefficients; and the shift coefficient identification information includes second identification information, the second identification information being used to indicate whether the second index information indicates the index position of the first shift coefficient among the multiple shift coefficients. The first shift coefficient is the shift coefficient with the first index position among the multiple shift coefficients.

[0119] When the value of the first identification information is a first numerical value, the first index information indicates the index position of the first shift coefficient among the multiple shift coefficients; when the value of the first identification information is a second numerical value, the first index information does not indicate the index position of the first shift coefficient among the multiple shift coefficients; when the value of the second identification information is a first numerical value, the second index information indicates the index position of the first shift coefficient among the multiple shift coefficients; when the value of the second identification information is a second numerical value, the second index information does not indicate the index position of the first shift coefficient among the multiple shift coefficients. For example, the first numerical value may be 1 and the second numerical value may be 0.

[0120] Correspondingly, determining the position index information of the non-zero shift coefficient among the multiple shift coefficients based on the shift coefficient identification information includes: when it is determined according to the first identification information that the first index information does not indicate the index position of the first shift coefficient, the decoding code stream determines the first index information; when it is determined according to the second identification information that the second index information does not indicate the index position of the first shift coefficient, the decoding code stream determines the second index information.

[0121] By determining, based on the first identification information, that the first index information indicates the index position of the first shifted coefficient among the multiple shifted coefficients, the index position of the last non-zero coefficient of the multiple shifted coefficients in the first coordinate dimension can be determined, and thus, there is no need to decode the code stream to determine the first index information. Similarly, by determining, based on the second identification information, that the second index information indicates the index position of the first shifted coefficient among the multiple shifted coefficients, the index position after the index position of the last non-zero coefficient of the multiple shifted coefficients in the second and third coordinate dimensions can be determined, and there is no need to decode the code stream to determine the second index information.

[0122] Step 103: Determine the multiple shift coefficients according to the shift coefficient identification information and the position index information.

[0123] The position index information of the non-zero shift coefficient determines a decoding range of the shift coefficient, and the code stream is decoded according to the decoding range of the shift coefficient to determine the non-zero shift coefficient among the multiple shift coefficients.

[0124] In some embodiments, the first index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; the second index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension.

[0125] Correspondingly, the method also includes: when determining according to the first identification information that the first index information indicates the index position of the first shift coefficient, determining that all shift coefficients in the first coordinate dimension are 0; when determining according to the second identification information that the second index information indicates the index position of the first shift coefficient, determining that all shift coefficients in the second coordinate dimension and the third coordinate dimension are 0.

[0126] It should be noted that when the first index information is used to indicate the index position after the index position of the last non-zero coefficient, the second index information is used to indicate the index position after the next index position. When all shift coefficients in the first coordinate dimension are 0, the first index information indicates the position index of the first shift coefficient, and there is no need to decode the first index information and the shift coefficient in the first coordinate dimension. When all shift coefficients in the second coordinate dimension and the third coordinate dimension are 0, there is no need to decode the second index information and the shift coefficients in the second and third coordinate dimensions, which can improve the decoding efficiency of the position index information and the shift coefficient.

[0127] In some embodiments, the shift coefficient information further includes third identification information, and the third identification information is used to indicate whether to decode the shift coefficient of the second coordinate dimension and the shift coefficient of the third coordinate dimension. Exemplarily, the third identification information is used to indicate whether the shift coefficient of the second coordinate dimension and the shift coefficient of the third coordinate dimension at the same index position are both 0. That is to say, when decoding the shift coefficient, it is also necessary to determine whether the second-dimensional coefficient and the third-dimensional coefficient in the shift coefficient of each index position are both 0 based on the third identification information. When both are 0, there is no need to decode the second and third-dimensional shift coefficients, otherwise the second and third-dimensional shift coefficients need to be decoded. Here, by indicating whether the second and third-dimensional coefficients are both 0 through the third identification information, the encoding and decoding of the second and third-dimensional shift coefficients can be further simplified, thereby improving the encoding and decoding efficiency and bringing performance gains.

[0128] Exemplarily, the value of the third identification information at the current index position is a third numerical value, and the shift coefficient of the second coordinate dimension and the shift coefficient of the third coordinate dimension at the current index position are both 0; the value of the third identification information at the current index position is a fourth numerical value, and the shift coefficient of the second coordinate dimension and the shift coefficient of the third coordinate dimension at the current index position are not both 0. Exemplarily, the third numerical value may be 1, and the fourth numerical value may be 0.

[0129] In some embodiments, determining the plurality of shift coefficients according to the shift coefficient identification information and the position index information includes:

[0130] The method further comprises: determining, based on the first index information, an index position of the last non-zero coefficient in the first coordinate dimension as the first index position; determining, based on the second index information, an index position later than the index position of the last non-zero coefficient in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension as the second index position; determining that the first index position is after or at the same position as the second index position; determining, for the shift coefficient from the index position of the first shift coefficient to the second index position, third identification information for each index position in the decoded code stream; determining, based on the third identification information, that the shift coefficients in the second and third coordinate dimensions are both 0, and determining the shift coefficient in the first coordinate dimension in the decoded code stream; determining, based on the third identification information, that the shift coefficients in the second and third coordinate dimensions are not both 0, and determining the shift coefficients in the first, second, and third coordinate dimensions in the decoded code stream; and determining, for the shift coefficient from the index position after the second index position to the first index position, the decoded code stream determines the shift coefficient in the first coordinate dimension.

[0131] In some embodiments, determining the multiple shift coefficients based on the shift coefficient identification information and the position index information includes: determining that the first index position is located before the second index position; for the shift coefficient from the index position of the first shift coefficient to the first index position, the decoding code stream determines third identification information for each index position; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0 according to the third identification information, and the decoding code stream determines the shift coefficient in the first coordinate dimension; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0 according to the third identification information, and the decoding code stream determines the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; for the shift coefficient from the index position subsequent to the first index position to the second index position, the decoding code stream determines the shift coefficients in the second coordinate dimension and the third coordinate dimension.

[0132] Exemplarily, a decoding process is as follows:

[0133] a) decoding flag bit 1 (corresponding to the first identification information) indicating whether nonzeroCount0 is equal to 0, and if nonzeroCount0 is not equal to 0, decoding the value of nonzeroCount0 (corresponding to the first index information), decoding flag bit 2 (corresponding to the second identification information) indicating whether nonzeroCount is equal to 0, and if nonzeroCount is not equal to 0, decoding the value of nonzeroCount (corresponding to the second index information);

[0134] b) If nonzeroCount0 ≥ nonzeroCount is satisfied, proceed to step c), otherwise proceed to step d); nonzeroCount0 ≥ nonzeroCount indicates that the index position of the last non-zero coefficient in the X coordinate dimension is located after or at the same position as the index position of the last non-zero coefficient in the Y and Z coordinate dimensions, that is, the number of motion coefficients to be decoded in the X coordinate dimension is greater than or equal to the larger number of motion coefficients in the Y and Z coordinate dimensions, otherwise, it is less.

[0135] c) For coefficients with indexes between 0 and (nonzeroCount-1), first decode flag bit 3 (corresponding to the third identification information) indicating whether the second and third dimension coefficients are both 0 at the current index position; if both are 0, decode the value of the first dimension coefficient; otherwise, decode the values ​​of the first, second, and third dimension coefficients; for coefficients with indexes between nonzeroCount and (nonzeroCount0-1), decode the value of the first dimension coefficient; it should be noted that nonzeroCount indicates the index position after the rear index position in the YZ coordinate dimension, and therefore, nonzeroCount-1 indicates the rear index position in the YZ coordinate dimension;

[0136] d) For coefficients with indices between 0 and (nonzeroCount0-1), first decode flag bit 3, which indicates whether the second and third dimension coefficients are both 0 at the current index position. If both are 0, decode the value of the first dimension coefficient; otherwise, decode the values ​​of the first, second, and third dimension coefficients. For coefficients with indices between nonzeroCount0 and (nonzeroCount-1), decode the values ​​of the second and third dimension coefficients. Note that nonzeroCount0 indicates the index position after the later index position in the X-coordinate dimension, and therefore, nonzeroCount0-1 indicates the later index position in the X-coordinate dimension.

[0137] Furthermore, the multiple shift coefficients are dequantized and inversely transformed with wavelet transform to obtain multiple reconstructed shift coefficients.

[0138] In some embodiments, determining the multiple shift coefficients based on the shift coefficient identification information and the position index information includes: determining that the first index position is located before the second index position; for the shift coefficients from the index position of the first shift coefficient to the first index position, the decoded codestream determines third identification information for each index position; determining, based on the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and the decoded codestream determines the shift coefficients in the first coordinate dimension; determining, based on the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and the decoded codestream determines the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; for the shift coefficients from the index position subsequent to the first index position to the second index position, the decoded codestream determines third identification information for each index position; determining, based on the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and the decoded codestream determines the shift coefficients in the second coordinate dimension and the third coordinate dimension.

[0139] Exemplarily, a decoding process is as follows:

[0140] a) decoding flag bit 1 indicating whether nonzeroCount0 is equal to 0, and if nonzeroCount0 is not equal to 0, decoding the value of nonzeroCount0, decoding flag bit 2 indicating whether nonzeroCount is equal to 0, and if nonzeroCount is not equal to 0, decoding the value of nonzeroCount;

[0141] b) If nonzeroCount0≥nonzeroCount is satisfied, proceed to step c), otherwise proceed to step d);

[0142] c) For coefficients with indices between 0 and (nonzeroCount-1), first decode flag bit 3, which indicates whether the second and third dimension coefficients are both 0. If both are 0, decode the value of the first dimension coefficient; otherwise, decode the values ​​of the first, second, and third dimension coefficients. For coefficients with indices between nonzeroCount and (nonzeroCount0-1), decode the value of the first dimension coefficient.

[0143] d) For coefficients with indexes between 0 and (nonzeroCount0-1), first decode flag bit 3 indicating whether the second and third dimension coefficients are both 0. If both are 0, decode the value of the first dimension coefficient; otherwise, decode the values ​​of the first, second, and third dimension coefficients. For coefficients with indexes between nonzeroCount0 and (nonzeroCount-1), first decode flag bit 3 indicating whether the second and third dimension coefficients are both 0. If not, continue decoding the values ​​of the second and third dimension coefficients.

[0144] Furthermore, the multiple shift coefficients are dequantized and inversely transformed with wavelet transform to obtain multiple reconstructed shift coefficients.

[0145] In some embodiments, the value of the first index information is an intermediate value obtained by subtracting a first preset value from an actual value of the first index information; the value of the second index information is an intermediate value obtained by subtracting a second preset value from an actual value of the second index information;

[0146] The method further includes: adding the first preset value to the intermediate value of the first index information to obtain the actual value of the first index information; and adding the second preset value to the intermediate value of the second index information to obtain the actual value of the second index information.

[0147] The first preset value and the second preset value can be fixed values, and they can be equal or different. For example, the index positions of the multiple shift coefficients are Indi, i = 0, 1, 2, 3, ..., n. When the index positions of the multiple shift coefficients are represented by an arithmetic progression, the first preset value and the second preset value are the difference between the two. For example, when Indi = 0, 1, 2, 3, ..., n, the first preset value and the second preset value are 1.

[0148] When the value range of the index position is 0, 1, 2, 3, ..., n, the index of the shift coefficient starts from 0. Therefore, if flag bit 1 indicates that nonzeroCount0 is not equal to 0, it means that the value of nonzeroCount0 is greater than or equal to 1. If flag bit 2 indicates that nonzeroCount is not equal to 0, it means that the value of nonzeroCount is greater than or equal to 1. In some embodiments, in order to further save the number of coding bits and reduce the bit rate of the shift coefficient, nonzeroCount0-1 and nonzeroCount-1 can be encoded, and nonzeroCount0-1 and nonzeroCount-1 can be decoded accordingly.

[0149] Correspondingly, at the above decoding end, step b) can be replaced by: decoding flag bit 1 indicating whether nonzeroCount0 is equal to 0; if nonzeroCount0 is not equal to 0, decoding the value of nonzeroCount0-1; decoding flag bit 2 indicating whether nonzeroCount is equal to 0; if nonzeroCount is not equal to 0, decoding the value of nonzeroCount-1; further, adding (nonzeroCount0-1)+1 to obtain the actual value of nonzeroCount0, and adding (nonzeroCount-1)+1 to obtain the actual value of nonzeroCount; and decoding the value of the non-zero shift coefficient according to the actual value of nonzeroCount0 and the actual value of nonzeroCount.

[0150] In some embodiments, the method further comprises: performing inverse quantization and inverse transformation on the plurality of shift coefficients to obtain a plurality of reconstructed shift coefficients.

[0151] In some embodiments, the method further includes: decoding a simplified grid code stream to determine a simplified grid of the current image block; subdividing the simplified grid to obtain a subdivided grid; and determining a reconstructed grid of the current image block based on the subdivided grid of the current image block and multiple reconstruction shift coefficients.

[0152] In some embodiments, the method further includes: decoding the attribute graph code stream to obtain a reconstructed attribute graph.

[0153] Based on the above embodiment, another embodiment of the present application proposes a decoding method, which is applied to a decoder, wherein the decoder includes an entropy decoder and a trellis decoder, and the method includes:

[0154] The grid decoder is used to decode the code stream of the simplified grid and determine the simplified grid of the current image block;

[0155] The entropy decoder is used to execute the shift coefficient decoding method described in any one of the embodiments of the present application.

[0156] It should be noted that, in the embodiments of the present application, the decoding method can be used for intra-frame decoding or inter-frame decoding, which is not specifically limited in the present application.

[0157] Exemplarily, FIG13 is a schematic diagram of intra-frame decoding provided by an embodiment of the present application. As shown in FIG13 , in the intra-frame decoder, a static mesh decoder (Static Mesh Decoder) can be used to decode a simplified mesh. An entropy decoder is used to entropy decode the shift coefficient code stream to obtain the shift coefficient, and the reconstructed shift coefficient is obtained by inverse quantization and inverse wavelet transform (Inverse Wavelet Transform). The decoded mesh geometry information is obtained by decoding the simplified mesh and reconstructed shift coefficient. The decoding of the attribute graph is directly performed by the video decoder.

[0158] For the inter-frame decoder, the process is basically the same as that of the intra-frame decoder, except that instead of decoding the simplified grid directly, the motion vector is decoded and the simplified grid of the current frame is calculated using the simplified grid of the previous frame (reference frame).

[0159] When using the above decoding method, when decoding the shift coefficients, there is no need to map the shift coefficients from three-dimensional space to two-dimensional images. The entropy decoding method is used to directly decode the transformed and quantized shift coefficients, which can improve the decoding efficiency of the shift coefficients.

[0160] Furthermore, by indicating the decoding range of the second and third-dimensional shift coefficients through a position index information and indicating whether the second and third-dimensional coefficients at an index position are both 0 through a shift identification information, the decoding of the second and third-dimensional shift coefficients can be simplified, and the decoding efficiency of the shift coefficients can be further improved.

[0161] Based on the above embodiment, another embodiment of the present application proposes an encoding method. FIG14 is a flow chart of an encoding method provided in an embodiment of the present application. As shown in FIG14 , in an embodiment of the present application, the method for encoding by the encoder may include the following steps:

[0162] Step 201: Determine multiple shift coefficients corresponding to multiple mesh vertices in the current image block;

[0163] The current image block can be the current 3D mesh image, or an image block obtained by segmenting the current 3D mesh image. The current image block is preprocessed to generate a base mesh and displacement coefficients. The preprocessing process includes: first, downsampling the original mesh to generate a simplified mesh (decimated mesh) with a significantly reduced number of vertices, also known as a base mesh. The simplified mesh is then subdivided, and newly generated vertices are inserted along the edges of the simplified mesh to obtain a subdivided mesh. Finally, for each vertex in the subdivided mesh, the point in the original mesh closest to it is found, and the displacement coefficients of the two points are calculated. After preprocessing, the simplified mesh and displacement coefficients are input into the encoder to generate a bitstream.

[0164] Exemplarily, in some embodiments, determining multiple shift coefficients corresponding to multiple mesh vertices in the current image block includes: determining multiple original shift coefficients corresponding to multiple mesh vertices in the current image block; and transforming and quantizing the multiple original shift coefficients to obtain the multiple shift coefficients.

[0165] Step 202: Determine position index information of the non-zero shift coefficients in the plurality of shift coefficients according to the non-zero shift coefficients in the plurality of shift coefficients;

[0166] The position index information is used to indicate a non-zero shift coefficient among the plurality of shift coefficients. Exemplarily, the position index information is used to indicate an encoding range for the shift coefficient. In some embodiments, the index position of the last non-zero coefficient among the plurality of shift coefficients is determined based on the position index information, and the shift coefficients between the first and last non-zero coefficients are encoded.

[0167] Exemplarily, in some embodiments, the shift coefficient includes shift coefficients in three coordinate dimensions; the position index information includes first index information and second index information, wherein the first index information is used to indicate the encoding range of the shift coefficient in the first coordinate dimension, and the second index information indicates the encoding range of the shift coefficient in the second coordinate dimension and the third coordinate dimension.

[0168] Exemplarily, in some embodiments, the first index information is used to indicate the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; the second index information is used to indicate the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension. It can be understood that the second index information indicates the encoding range of the shift coefficients in the second coordinate dimension and the third coordinate dimension. Indicating the encoding range of the second and third three-dimensional shift coefficients by the second position index information can simplify the encoding of the second and third three-dimensional shift coefficients, thereby improving encoding efficiency and achieving performance gains.

[0169] Correspondingly, the position index information of the non-zero shift coefficients among the multiple shift coefficients is determined based on the non-zero shift coefficients among the multiple shift coefficients, including: determining the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension, the index position of the last non-zero coefficient in the second coordinate dimension, and the index position of the last non-zero coefficient in the third coordinate dimension based on the non-zero shift coefficients among the multiple shift coefficients; determining the first index information based on the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; determining the second index information based on the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position closer to the index position of the last non-zero coefficient in the third coordinate dimension.

[0170] In some embodiments, the method further comprises: determining index positions of the plurality of shift coefficients according to the coding order of the plurality of shift coefficients corresponding to the mesh vertices. Exemplarily, the index positions of the plurality of shift coefficients are Indi, i=0, 1, 2, 3, ...

[0171] In actual applications, the first index information can directly indicate the index position of the last non-zero coefficient in the first coordinate dimension, or it can indicate the offset position of the index position of the last non-zero coefficient; the second index information can directly indicate the index position of the last non-zero coefficient in the second coordinate dimension and the index position behind the last non-zero coefficient in the third coordinate dimension, or it can indicate the offset position of the behind index position.

[0172] Figure 11 is a schematic diagram of the index positions of multiple shift coefficients. As shown in Figure 11, the shift coefficients include shift coefficients in three coordinate dimensions of XYZ. When X is the first coordinate dimension, the index position of the last non-zero coefficient is Indi, and the first index information is used to indicate Indi. When Y is the second coordinate dimension, the index position of the last non-zero coefficient is Indi+1. When Z is the third coordinate dimension, the index position of the last non-zero coefficient is Indi, and the second index information is used to indicate the later index position Indi+1.

[0173] In some embodiments, the first index information is determined based on the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; and the second index information is determined based on the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension.

[0174] That is, the first index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; the second index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension.

[0175] Figure 12 is a second schematic diagram of the index positions of multiple shift coefficients. As shown in Figure 12, the shift coefficients include shift coefficients in three coordinate dimensions of XYZ. When X is the first coordinate dimension, the index position of the last non-zero coefficient is Indi, and the first index information is used to indicate Indi+1. When Y is the second coordinate dimension, the index position of the last non-zero coefficient is Indi+1. When Z is the third coordinate dimension, the index position of the last non-zero coefficient is Indi, and the second index information is used to indicate the index position Indi+2 after the latter index position Indi+1.

[0176] Exemplarily, the index positions of the multiple shift coefficients are Indi, i = 0, 1, 2, 3, ..., n. When the index positions of the multiple shift coefficients are represented by an arithmetic progression, the shift coefficients include the shift coefficients in the three coordinate dimensions of XYZ, and the index position of the last non-zero coefficient in each dimension is nonzeroCount0, nonzeroCount1, and nonzeroCount2, respectively. NonzeroCount0 (i.e., the first index information) and nonzeroCount (i.e., the second index information) are determined, and nonzeroCount is the larger value of nonzeroCount1 and nonzeroCount2. NonzeroCount0 and nonzeroCount can be the index position of the last non-zero coefficient, or the index position after the last non-zero coefficient is added with the offset.

[0177] Step 203: Determine shift coefficient identification information according to the position index information of the non-zero shift coefficient;

[0178] The shift coefficient identification information is used to indicate whether to encode the position index information.

[0179] Exemplarily, in some embodiments, the shift coefficient identification information includes first identification information and second identification information; wherein, the first identification information is used to indicate whether the first index information is encoded; and the second identification information is used to indicate whether the second index information is encoded.

[0180] Exemplarily, the first identification information is used to indicate whether the first index information indicates the index position of a first shift coefficient among the multiple shift coefficients; and the second identification information is used to indicate whether the second index information indicates the index position of the first shift coefficient among the multiple shift coefficients. The first shift coefficient is the shift coefficient with the first index position among the multiple shift coefficients.

[0181] When the first index information indicates the index position of the first shift coefficient among the multiple shift coefficients, the value of the first identification information is determined to be a first value; otherwise, the value of the first identification information is determined to be a second value; when the second index information indicates the index position of the first shift coefficient among the multiple shift coefficients, the value of the second identification information is determined to be the first value; otherwise, the value of the second identification information is determined to be the second value. For example, the first value may be 1 and the second value may be 0.

[0182] Step 204: Encode the shift coefficient identification information and the position index information, and write the obtained coded bits into a bitstream;

[0183] Exemplarily, in some embodiments, the first index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; the second index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension.

[0184] The encoding of the shift coefficient identification information and the position index information includes: encoding first identification information; encoding the first index information when it is determined based on the first identification information that the first index information does not indicate the index position of the first shift coefficient; encoding the second index information when it is determined based on the second identification information that the second index information does not indicate the index position of the first shift coefficient.

[0185] By determining, based on the first identification information, that the first index information indicates the index position of the first shifted coefficient among the multiple shifted coefficients, the index position of the last non-zero coefficient of the multiple shifted coefficients in the first coordinate dimension can be determined, and thus the first index information does not need to be encoded. Similarly, by determining, based on the second identification information, that the second index information indicates the index position of the first shifted coefficient among the multiple shifted coefficients, the index position after the index position of the last non-zero coefficient of the multiple shifted coefficients in the second and third coordinate dimensions can be determined, and thus the second index information does not need to be encoded.

[0186] Step 205: Encode the non-zero shift coefficients among the multiple shift coefficients according to the position index information, and write the obtained coded bits into the bitstream.

[0187] The coding range of the shift coefficients is determined according to the position index information of the non-zero shift coefficients, and the non-zero shift coefficients in the shift coefficients are coded according to the coding range of the shift coefficients.

[0188] In some embodiments, the first index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; the second index information is used to indicate the index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension.

[0189] Correspondingly, the method also includes: when determining according to the first identification information that the first index information indicates the index position of the first shift coefficient, determining that all shift coefficients in the first coordinate dimension are 0; when determining according to the second identification information that the second index information indicates the index position of the first shift coefficient, determining that all shift coefficients in the second coordinate dimension and the third coordinate dimension are 0.

[0190] In some embodiments, the shift coefficient includes shift coefficients in three coordinate dimensions; the shift coefficient identification information includes third identification information; wherein the third identification information is used to indicate whether the shift coefficient of the second coordinate dimension and the shift coefficient of the third coordinate dimension at the same index position are both 0.

[0191] Correspondingly, encoding the non-zero shift coefficients among the multiple shift coefficients according to the position index information includes: encoding the non-zero shift coefficients among the multiple shift coefficients according to the position index information and third identification information.

[0192] In some embodiments, encoding the non-zero shift coefficients among the multiple shift coefficients according to the position index information includes: determining the index position of the last non-zero coefficient in the first coordinate dimension according to the first index information as the first index position; determining the index position of the last non-zero coefficient in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension according to the second index information as the second index position; determining that the first index position is after or at the same position as the second index position; encoding third identification information of each index position for the shift coefficients from the index position of the first shift coefficient to the second index position; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0 according to the third identification information, and encoding the shift coefficients in the first coordinate dimension; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0 according to the third identification information, and encoding the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; and encoding the shift coefficient in the first coordinate dimension for the shift coefficient from the index position after the second index position to the first index position.

[0193] In some embodiments, encoding the non-zero shift coefficients among the multiple shift coefficients according to the position index information includes: determining that the first index position is located before the second index position; encoding the third identification information of each index position for the shift coefficient from the index position of the first shift coefficient to the first index position; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0 according to the third identification information, and encoding the shift coefficient in the first coordinate dimension; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0 according to the third identification information, and encoding the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; encoding the shift coefficients in the second coordinate dimension and the third coordinate dimension for the shift coefficient from the index position after the first index position to the second index position.

[0194] Exemplarily, an encoding process is as follows:

[0195] Wavelet transform and quantization are performed on multiple original shift coefficients to obtain multiple shift coefficients after transformation and quantization. Each shift coefficient includes a shift coefficient under three-dimensional coordinates, for example, including shift coefficients in three directions of XYZ. The multiple shift coefficients are arranged in the encoding order of the corresponding vertices. For example, the index position of the i-th shift coefficient is Indi, i = 0, 1, 2, 3, ..., n.

[0196] At the encoding end, the encoding method for the quantized transform coefficients is as follows:

[0197] a) First find the index position of the last non-zero coefficient in each dimension, which are nonzeroCount0, nonzeroCount1, and nonzeroCount2. Determine the larger value of nonzeroCount0, nonzeroCount1, and nonzeroCount2, and record it as nonzeroCount.

[0198] b) encoding flag bit 1 (corresponding to the first identification information) indicating whether nonzeroCount0 is equal to 0, and if nonzeroCount0 is not equal to 0, encoding the value of nonzeroCount0 (corresponding to the first index information), encoding flag bit 2 (corresponding to the second identification information) indicating whether nonzeroCount is equal to 0, and if nonzeroCount is not equal to 0, encoding the value of nonzeroCount (corresponding to the second index information);

[0199] c) If nonzeroCount0 ≥ nonzeroCount is satisfied, proceed to step d), otherwise proceed to step d); nonzeroCount0 ≥ nonzeroCount indicates that the index position of the last non-zero coefficient in the X coordinate dimension is located after or at the same position as the index position of the last non-zero coefficient in the Y and Z coordinate dimensions, that is, the number of motion coefficients to be encoded in the X coordinate dimension is greater than or equal to the larger number of motion coefficients in the Y and Z coordinate dimensions, otherwise, it is less than.

[0200] d) For coefficients with indexes between 0 and (nonzeroCount-1), first encode flag bit 3 (corresponding to the third identification information) indicating whether the second and third dimension coefficients are both 0 at the current index position; if both are 0, encode the value of the first dimension coefficient; otherwise, encode the values ​​of the first, second, and third dimension coefficients; for coefficients with indexes between nonzeroCount and (nonzeroCount0-1), encode the value of the first dimension coefficient;

[0201] e) For coefficients with indexes between 0 and (nonzeroCount0-1), first encode flag bit 3 at the current index position, which indicates whether the second and third dimension coefficients are both 0. If both are 0, encode the value of the first dimension coefficient; otherwise, encode the values ​​of the first, second, and third dimension coefficients. For coefficients with indexes between nonzeroCount0 and (nonzeroCount-1), encode the values ​​of the second and third dimension coefficients.

[0202] In some embodiments, encoding the non-zero shift coefficients among the multiple shift coefficients according to the position index information includes: determining that the first index position is located before the second index position; encoding the third identification information of each index position for the shift coefficient from the index position of the first shift coefficient to the first index position; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0 according to the third identification information, and encoding the shift coefficient in the first coordinate dimension; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0 according to the third identification information, and encoding the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; encoding the third identification information of each index position for the shift coefficient from the next index position of the first index position to the second index position; determining that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0 according to the third identification information, and encoding the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension.

[0203] Exemplarily, at the encoding end, the encoding method for the quantized transform coefficients is as follows:

[0204] At the encoding end, for the quantized transform coefficients:

[0205] a) First find the index position of the last non-zero coefficient in each dimension, which are nonzeroCount0, nonzeroCount1, and nonzeroCount2. Determine the larger value of nonzeroCount0, nonzeroCount1, and nonzeroCount2, and record it as nonzeroCount.

[0206] b) Encode flag bit 1 indicating whether nonzeroCount0 is equal to 0, and if nonzeroCount0 is not equal to 0, encode the value of nonzeroCount0, and encode flag bit 2 indicating whether nonzeroCount is equal to 0, and if nonzeroCount is not equal to 0, encode the value of nonzeroCount;

[0207] c) If nonzeroCount0≥nonzeroCount is satisfied, proceed to step d), otherwise proceed to step e);

[0208] d) For coefficients with indexes between 0 and (nonzeroCount-1), first encode flag bit 3 (indicates whether the second and third dimension coefficients are both 0 at the current index position). If both are 0, encode the value of the first dimension coefficient; otherwise, encode the values ​​of the first, second, and third dimension coefficients. For coefficients with indexes between nonzeroCount and (nonzeroCount0-1), encode the value of the first dimension coefficient.

[0209] e) For coefficients with indexes between 0 and (nonzeroCount0-1), first encode the flag bit 3 at the current index position indicating whether the second and third dimension coefficients are both 0. If both are 0, encode the value of the first dimension coefficient; otherwise, encode the values ​​of the first, second, and third dimension coefficients. For coefficients with indexes between nonzeroCount0 and (nonzeroCount-1), if both the second and third dimension coefficients are 0, encode the flag bit 3 at the current index position; otherwise, encode the flag bit 3, and then encode the values ​​of the second and third dimension coefficients.

[0210] Furthermore, when the value range of the index position is 0, 1, 2, 3, ..., n, the index of the shift coefficient starts from 0. Therefore, if flag bit 1 indicates that nonzeroCount0 is not equal to 0, it means that the value of nonzeroCount0 is greater than or equal to 1. If flag bit 2 indicates that nonzeroCount is not equal to 0, it means that the value of nonzeroCount is greater than or equal to 1. In some embodiments, in order to further save the number of coding bits and reduce the code rate of the shift coefficient, nonzeroCount0-1 and nonzeroCount-1 can be encoded.

[0211] Exemplarily, in some embodiments, the value of the first index information is an intermediate value obtained by subtracting a first preset value from the actual value of the first index information; the value of the second index information is an intermediate value obtained by subtracting a second preset value from the actual value of the second index information.

[0212] The first preset value and the second preset value can be fixed values, and they can be equal or different. For example, the index positions of the multiple shift coefficients are Indi, i = 0, 1, 2, 3, ..., n. When the index positions of the multiple shift coefficients are represented by an arithmetic progression, the first preset value and the second preset value are the difference between the two. For example, when Indi = 0, 1, 2, 3, ..., n, the first preset value and the second preset value are 1.

[0213] When the value range of the index position is 0, 1, 2, 3, ..., n, the index of the shift coefficient starts from 0. Therefore, if flag bit 1 indicates that nonzeroCount0 is not equal to 0, it means that the value of nonzeroCount0 is greater than or equal to 1. If flag bit 2 indicates that nonzeroCount is not equal to 0, it means that the value of nonzeroCount is greater than or equal to 1. In some embodiments, in order to further save the number of coding bits and reduce the code rate of the shift coefficient, nonzeroCount0-1 and nonzeroCount-1 can be encoded.

[0214] Accordingly, on the encoding end, step b) can be replaced by: encoding flag bit 1 indicating whether nonzeroCount0 is equal to 0, and if nonzeroCount0 is not equal to 0, encoding the value of nonzeroCount0-1, encoding flag bit 2 indicating whether nonzeroCount is equal to 0, and if nonzeroCount is not equal to 0, encoding the value of nonzeroCount-1;

[0215] Based on the above embodiments, another embodiment of the present application proposes an encoding method, which is applied to an encoder, wherein the encoder includes an entropy encoder, a grid encoder, and a preprocessor.

[0216] The preprocessor is used to generate a simplified grid and shift coefficients based on the original grid of the current frame;

[0217] The grid encoder is used to encode the simplified grid to generate a code stream of the simplified grid;

[0218] The entropy encoder is used to execute the encoding method of the shift coefficient described in any one of the embodiments of the present application.

[0219] It should be noted that, in the embodiment of the present application, the preprocessor can be used to generate a simplified grid and shift coefficients based on the original grid of the current frame.

[0220] It is understood that in the embodiments of the present application, during the preprocessing process, the original mesh of the current frame can be simplified to obtain a simplified mesh (decimated mesh), or a base mesh. The simplified mesh can then be subdivided to obtain a subdivided mesh. Finally, for each vertex in the subdivided mesh, the point in the original mesh closest to it is found, and the displacement coefficient of the two points is calculated.

[0221] Furthermore, in an embodiment of the present application, after the preprocessor generates a corresponding simplified grid based on the original grid, the grid encoder can be used to encode the simplified grid and then generate a code stream of the simplified grid.

[0222] It should be noted that, in the embodiment of the present application, for intra-frame coding, the grid encoder can encode the simplified grid of the current frame to obtain a code stream of the simplified grid.

[0223] Figure 15 is a schematic diagram of intra-frame decoding provided by an embodiment of the present application. As shown in Figure 15, in the intra-frame encoder, a common static mesh encoder (Static Mesh Encoder) can be used to encode the simplified mesh to generate a corresponding bitstream (Compressed base mesh bitstream). Next, the displacement coefficients are updated (Update Displacements) using the reconstructed simplified mesh. The updated displacement coefficients are subjected to wavelet transform (Wavelet Transform) and quantization to obtain the displacement coefficients. The quantized displacement coefficients are entropy encoded to generate a bitstream (Compressed displacements bitstream) of the displacement coefficients. For attribute map encoding, the feature map is first transformed (Texture Transfer) according to the difference between the reconstructed geometric information and the original geometric information, and then padded (Padding) and packaged (Video Packing) and encoded using a video encoder to form an attribute bitstream (Compressed attribute bitstream).

[0224] The inter-frame encoder has a similar process to the intra-frame encoder, but the inter-frame encoder does not directly encode the simplified grid. Instead, it encodes the motion vector between the simplified grid of the current frame and the simplified grid of the reference frame (Motion Encoder) and generates a corresponding motion vector bitstream (Compressed motion bitstream).

[0225] It should be noted that, in the embodiment of the present application, the preprocessor can be used to generate a simplified grid and shift coefficients based on the original grid of the current frame.

[0226] It is understood that in the embodiments of the present application, during the preprocessing process, the original mesh of the current frame can be simplified to obtain a simplified mesh (decimated mesh), or a base mesh. The simplified mesh can then be subdivided to obtain a subdivided mesh. Finally, for each vertex in the subdivided mesh, the point in the original mesh closest to it is found, and the displacement coefficient of the two points is calculated.

[0227] It is understandable that, in the embodiment of the present application, after the grid encoder generates the code stream of the simplified grid or the code stream of the motion vector, it can transmit the code stream of the simplified grid or the code stream of the motion vector to the decoding end.

[0228] When encoding the shift coefficients using the above encoding method, there is no need to map the shift coefficients from three-dimensional space to two-dimensional images. The entropy encoding method is used to directly encode the transformed and quantized shift coefficients, which can improve the encoding efficiency of the shift coefficients.

[0229] Furthermore, by indicating the coding range of the second and third-dimensional shift coefficients through a position index information and indicating whether the second and third-dimensional coefficients at an index position are both 0 through a shift identification information, the coding of the second and third-dimensional shift coefficients can be simplified, and the coding efficiency of the shift coefficients can be further improved.

[0230] Furthermore, the coding performance of the shift coefficient coding method provided in the embodiment of the present application is tested.

[0231] 1) MPEG DMC general test conditions There are two test conditions:

[0232] Condition 1: All intra-frame geometry and attributes are lossy;

[0233] Condition 2: Random access is lossy in geometry and attributes.

[0234] 2) Common test sequences include three categories: Cat1-A, Cat1-B and Cat1-C, all of which contain geometric and color attribute information.

[0235] Table 1 shows the experimental results under test condition 1

[0236] Table 2 shows the experimental results under test condition 2

[0237] Judging from the experimental results under the two test conditions of Table 1 and Table 2, the shift coefficient encoding method provided in the embodiment of the present application has improved the encoding performance of geometric information and attribute information of different types of test sequences.

[0238] Based on the above embodiment, in another embodiment of the present application, based on the same inventive concept as the above embodiment, FIG16 is a schematic diagram of the composition structure of an encoder. As shown in FIG16 , the encoder 110 may include: a first determining unit 111, an encoding unit 112, wherein:

[0239] The first determining unit 111 is configured to determine a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block; determine position index information of the non-zero shift coefficients in the plurality of shift coefficients based on non-zero shift coefficients in the plurality of shift coefficients; and determine shift coefficient identification information based on the position index information of the non-zero shift coefficients;

[0240] The encoding unit 112 encodes the shift coefficient identification information and the position index information, and writes the obtained coded bits into the bitstream; encodes the non-zero shift coefficients among the multiple shift coefficients according to the position index information, and writes the obtained coded bits into the bitstream.

[0241] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.

[0242] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0243] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 110. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the aforementioned embodiments.

[0244] Based on the composition of the above-mentioned encoder 110 and the computer-readable storage medium, Figure 17 is a second schematic diagram of the composition structure of the encoder. As shown in Figure 17, the encoder 110 may include: a first memory 113 and a first processor 114, a first communication interface 115 and a first bus system 116. The first memory 113, the first processor 114, and the first communication interface 115 are coupled together through the first bus system 116. It can be understood that the first bus system 116 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 116 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 116 in Figure 17. Among them,

[0245] The first communication interface 115 is used to receive and send signals during the process of sending and receiving information with other external network elements;

[0246] The first memory 113 is used to store a computer program that can be run on the first processor;

[0247] The first processor 114 is configured to, when running the computer program,

[0248] It is understood that the first memory 113 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 113 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0249] The first processor 114 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 114. The above-mentioned first processor 114 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. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 113 , and the first processor 114 reads the information in the first memory 113 and completes the steps of the above method in combination with its hardware.

[0250] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0251] Optionally, as another embodiment, the first processor 114 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.

[0252] FIG18 is a schematic diagram of the first structure of a decoder. As shown in FIG18 , the decoder 120 may include: a decoding unit 121 and a second determining unit 122; wherein,

[0253] The decoding unit 121 is configured to decode the code stream;

[0254] The second determination unit 122 is configured to determine shift coefficient identification information of multiple shift coefficients corresponding to multiple mesh vertices in the current image block; based on the shift coefficient identification information, the decoded code stream determines the position index information of non-zero shift coefficients among the multiple shift coefficients; based on the shift coefficient identification information and the position index information, the decoded code stream determines the multiple shift coefficients.

[0255] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.

[0256] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0257] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the decoder 120. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the aforementioned embodiments.

[0258] Based on the composition of the above-mentioned decoder 120 and the computer-readable storage medium, Figure 19 is a second schematic diagram of the composition structure of the decoder. As shown in Figure 19, the decoder 120 may include: a second memory 123 and a second processor 124, a second communication interface 125 and a second bus system 126. The second memory 123 and the second processor 124, and the second communication interface 125 are coupled together through the second bus system 126. It can be understood that the second bus system 126 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 126 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 126 in Figure 19. Among them,

[0259] The second communication interface 125 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

[0260] The second memory 123 is used to store computer programs that can be run on the second processor;

[0261] The second processor 124 is configured to decode the code stream when running the computer program, determine the shift coefficient identification information of multiple shift coefficients corresponding to multiple mesh vertices in the current image block; determine the position index information of non-zero shift coefficients in the multiple shift coefficients based on the shift coefficient identification information; and determine the multiple shift coefficients based on the shift coefficient identification information and the position index information.

[0262] It is understood that the second memory 123 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The second memory 123 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0263] The second processor 124 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the second processor 124. The above-mentioned second processor 124 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 various 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 method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the second memory 123 , and the second processor 124 reads the information in the second memory 123 and completes the steps of the above method in combination with its hardware.

[0264] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0265] It should be noted that, in the embodiments of the present application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0266] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0267] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0268] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0269] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0270] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability

[0271] The embodiment of the present application provides a coding and decoding method, an encoder, a decoder, and a storage medium. At the encoding end, multiple shift coefficients corresponding to multiple mesh vertices in a current image block are determined; based on the non-zero shift coefficients in the multiple shift coefficients, position index information of the non-zero shift coefficients in the multiple shift coefficients is determined; based on the position index information of the non-zero shift coefficients, shift coefficient identification information is determined; the shift coefficient identification information and the position index information are encoded, and the non-zero shift coefficients in the multiple shift coefficients are encoded according to the position index information, and the obtained coding bits are written into a bitstream. During encoding, there is no need to map the shift coefficients from a three-dimensional space to a two-dimensional image, and the transformed and quantized shift coefficients are directly encoded. During decoding, the shift coefficient bitstream is directly decoded to obtain the shift coefficients, and then inverse quantization and inverse transformation are performed to obtain the reconstructed shift coefficients, thereby improving the coding and decoding efficiency of the shift coefficients.

Claims

1. A decoding method, applied to a decoder, wherein: The method comprises: Decoding the code stream, and determining shift coefficient identification information of a plurality of shift coefficients corresponding to a plurality of mesh vertices in the current image block; Determining, according to the shift coefficient identification information, position index information of a non-zero shift coefficient among the plurality of shift coefficients; The plurality of shift coefficients are determined according to the shift coefficient identification information and the position index information.

2. The method according to claim 1, wherein: The shift coefficient identification information is used to indicate whether to decode the position index information.

3. The method according to claim 1, wherein: The position index information is used to indicate a decoding range for decoding the shift coefficient.

4. The method according to claim 2, wherein: The shift coefficients include shift coefficients in three coordinate dimensions; The location index information includes first index information and second index information, wherein: The first index information is used to indicate a decoding range of the shift coefficient in the first coordinate dimension, The second index information indicates a decoding range of the shift coefficient in the second coordinate dimension and the third coordinate dimension.

5. The method according to claim 4, wherein: The shift coefficient identification information includes first identification information and second identification information; wherein, The first identification information is used to indicate whether to decode the first index information; The second identification information is used to indicate whether to decode the second index information.

6. The method according to claim 1, wherein: The shift coefficients include shift coefficients in three coordinate dimensions; The shift coefficient identification information includes third identification information; wherein, The third identification information is used to indicate whether the shift coefficient of the second coordinate dimension and the shift coefficient of the third coordinate dimension at the same index position are both 0.

7. The method according to any one of claims 1 to 6, wherein: The shift coefficients include shift coefficients in three coordinate dimensions; The position index information includes first index information, where the first index information is used to indicate an index position subsequent to an index position of a last non-zero coefficient of the plurality of shift coefficients in the first coordinate dimension; The position index information includes second index information, and the second index information is used to indicate the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the next index position after the index position of the last non-zero coefficient in the third coordinate dimension.

8. The method according to claim 7, wherein: The shift coefficient identification information includes first identification information, where the first identification information is used to indicate whether the first index information indicates an index position of a first shift coefficient among the multiple shift coefficients; The shift coefficient identification information includes second identification information, and the second identification information is used to indicate whether the second index information indicates the index position of the first shift coefficient among the multiple shift coefficients.

9. The method according to claim 8, wherein: The step of determining, according to the shift coefficient identification information, position index information of a non-zero shift coefficient among the plurality of shift coefficients comprises: When it is determined according to the first identification information that the first index information does not indicate the index position of the first shift coefficient, decoding the code stream to determine the first index information; When it is determined according to the second identification information that the second index information does not indicate the index position of the first shift coefficient, the second index information is determined by decoding the code stream.

10. The method according to claim 8, wherein: Also includes: When determining, according to the first identification information, that the first index information indicates an index position of a first shift coefficient, determining that all shift coefficients in the first coordinate dimension are 0; When it is determined according to the second identification information that the second index information indicates the index position of the first shift coefficient, it is determined that all shift coefficients in the second coordinate dimension and the third coordinate dimension are 0.

11. The method according to claim 7, wherein: The determining the plurality of shift coefficients according to the shift coefficient identification information and the position index information comprises: Determine, according to the first index information, an index position of the last non-zero coefficient in the first coordinate dimension as a first index position; According to the index position of the last non-zero coefficient in the second coordinate dimension of the second index information and the index position of the last non-zero coefficient in the third coordinate dimension The latter index position among the index positions of the last non-zero coefficient under the dimension is used as the second index position; Determining that the first index position is located after or is at the same position as the second index position; For the shift coefficient from the index position of the first shift coefficient to the second index position, the decoded code stream determines the third identification information of each index position; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and determine the shift coefficient in the first coordinate dimension by decoding the bit stream; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and decode the bitstream to determine the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; For a shift coefficient from an index position subsequent to the second index position to the first index position, the decoded code stream determines a shift coefficient in the first coordinate dimension.

12. The method according to claim 11, wherein: The determining the plurality of shift coefficients according to the shift coefficient identification information and the position index information comprises: determining that the first index position is before the second index position; For the shift coefficient from the index position of the first shift coefficient to the first index position, the decoded code stream determines the third identification information of each index position; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and determine the shift coefficient in the first coordinate dimension by decoding the bit stream; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and decode the bitstream to determine the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; For the shift coefficient from an index position subsequent to the first index position to the second index position, the decoded code stream determines the shift coefficient in the second coordinate dimension and the third coordinate dimension.

13. The method according to claim 11, wherein: The determining the plurality of shift coefficients according to the shift coefficient identification information and the position index information comprises: determining that the first index position is before the second index position; For the shift coefficient from the index position of the first shift coefficient to the first index position, the decoded code stream determines the third identification information of each index position; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and determine the shift coefficient in the first coordinate dimension by decoding the bit stream; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and decode the bitstream to determine the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; Determine, by decoding the code stream, third identification information of each index position for a shift coefficient from an index position following the first index position to the second index position; It is determined according to the third identification information that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and the decoded code stream determines the shift coefficients in the second coordinate dimension and the third coordinate dimension.

14. The method according to claim 7, wherein: The value of the first index information is an intermediate value obtained by subtracting a first preset value from an actual value of the first index information; The value of the second index information is an intermediate value obtained by subtracting a second preset value from an actual value of the second index information; The method further comprises: The intermediate value of the first index information is added to the first preset value to obtain an actual value of the first index information; The actual value of the second index information is obtained by adding the second preset value to the intermediate value of the second index information.

15. The method according to claim 7, wherein: The method further comprises: The index positions of the plurality of shift coefficients are determined according to a decoding order of the mesh vertices corresponding to the plurality of shift coefficients.

16. The method according to claim 1, wherein: The method further comprises: The multiple shift coefficients are inversely quantized and inversely transformed to obtain multiple reconstructed shift coefficients.

17. A decoding method, applied to a decoder, wherein: The decoder comprises an entropy decoder and a trellis decoder, and the method comprises: The grid decoder is used to decode the code stream of the simplified grid and determine the simplified grid of the current image block; The entropy decoder is used to execute the decoding method according to any one of claims 1-16.

18. A coding method, applied to an encoder, wherein: The method comprises: Determine a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block; Determining, according to the non-zero shift coefficients among the multiple shift coefficients, position index information of the non-zero shift coefficients among the multiple shift coefficients; Determining shift coefficient identification information according to the position index information of the non-zero shift coefficient; Encoding the shift coefficient identification information and the position index information, and writing the obtained coded bits into a bit stream; The non-zero shift coefficients among the plurality of shift coefficients are encoded according to the position index information, and the obtained encoded bits are written into a bit stream.

19. The method according to claim 18, wherein: The shift coefficient identification information is used to indicate whether to encode the position index information.

20. The method according to claim 18, wherein: The position index information is used to indicate a coding range of the shift coefficient.

21. The method according to claim 19, wherein: The shift coefficients include shift coefficients in three coordinate dimensions; The location index information includes first index information and second index information, wherein: The first index information is used to indicate the encoding range of the shift coefficient in the first coordinate dimension, The second index information indicates a coding range of the shift coefficient in the second coordinate dimension and the third coordinate dimension.

22. The method according to claim 21, wherein: The shift coefficient identification information includes first identification information and second identification information; wherein, The first identification information is used to indicate whether to encode the first index information; The second identification information is used to indicate whether to encode the second index information.

23. The method according to claim 19, wherein: The shift coefficients include shift coefficients in three coordinate dimensions; The shift coefficient identification information includes third identification information; wherein, The third identification information is used to indicate whether the shift coefficient of the second coordinate dimension and the shift coefficient of the third coordinate dimension at the same index position are both 0.

24. The method according to any one of claims 18 to 23, wherein: The shift coefficients include shift coefficients in three coordinate dimensions; The position index information includes first index information, where the first index information is used to indicate an index position subsequent to an index position of a last non-zero coefficient of the plurality of shift coefficients in the first coordinate dimension; The position index information includes second index information, and the second index information is used to indicate the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the next index position after the index position of the last non-zero coefficient in the third coordinate dimension.

25. The method according to claim 24, wherein: The determining, according to the non-zero shift coefficients in the multiple shift coefficients, position index information of the non-zero shift coefficients in the multiple shift coefficients comprises: Determine, according to the non-zero shift coefficients among the multiple shift coefficients, an index position of a last non-zero coefficient of the multiple shift coefficients in a first coordinate dimension, an index position of a last non-zero coefficient in a second coordinate dimension, and an index position of a last non-zero coefficient in a third coordinate dimension; Determine the first index information according to an index position subsequent to the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; The second index information is determined according to an index position after the latter index position between the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension.

26. The method according to claim 24, wherein: The value of the first index information is an intermediate value obtained by subtracting a first preset value from an actual value of the first index information; The value of the second index information is an intermediate value obtained by subtracting a second preset value from an actual value of the second index information.

27. The method according to claim 24, wherein: The shift coefficient identification information includes first identification information, where the first identification information is used to indicate whether the first index information indicates an index position of a first shift coefficient among the multiple shift coefficients; The shift coefficient identification information includes second identification information, and the second identification information is used to indicate whether the second index information indicates the index position of the first shift coefficient among the multiple shift coefficients.

28. The method according to claim 27, wherein: The encoding of the shift coefficient identification information and the position index information includes: encoding first identification information; When it is determined according to the first identification information that the first index information does not indicate the index position of the first shift coefficient, encoding the first index information; When it is determined according to the second identification information that the second index information does not indicate the index position of the first shift coefficient, the second index information is encoded.

29. The method according to claim 27, wherein: Also includes: When determining, according to the first identification information, that the first index information indicates an index position of a first shift coefficient, determining that all shift coefficients in the first coordinate dimension are 0; When it is determined according to the second identification information that the second index information indicates the index position of the first shift coefficient, it is determined that all shift coefficients in the second coordinate dimension and the third coordinate dimension are 0.

30. The method of claim 24, wherein: The encoding of the non-zero shift coefficients among the plurality of shift coefficients according to the position index information comprises: Determine, according to the first index information, an index position of the last non-zero coefficient in the first coordinate dimension as a first index position; According to the second index information, a later index position between the index position of the last non-zero coefficient in the second coordinate dimension and the index position of the last non-zero coefficient in the third coordinate dimension is used as the second index position; Determining that the first index position is located after or is at the same position as the second index position; For the shift coefficient from the index position of the first shift coefficient to the second index position, encode third identification information of each index position; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and encode the shift coefficient in the first coordinate dimension; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and encode the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; For a shift coefficient from an index position subsequent to the second index position to the first index position, a shift coefficient in the first coordinate dimension is encoded.

31. The method according to claim 30, wherein: The encoding of the non-zero shift coefficients among the plurality of shift coefficients according to the position index information comprises: determining that the first index position is before the second index position; For the shift coefficient from the index position of the first shift coefficient to the first index position, encode the third identification information of each index position; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and encode the shift coefficient in the first coordinate dimension; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and encode the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; For the shift coefficient from the index position following the first index position to the second index position, the shift coefficient in the second coordinate dimension and the third coordinate dimension are encoded.

32. The method of claim 30, wherein: The encoding of the non-zero shift coefficients among the plurality of shift coefficients according to the position index information comprises: determining that the first index position is before the second index position; For the shift coefficient from the index position of the first shift coefficient to the first index position, encode the third identification information of each index position; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and encode the shift coefficient in the first coordinate dimension; Determine, according to the third identification information, that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and encode the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; For a shift coefficient from an index position following the first index position to the second index position, encode third identification information of each index position; It is determined according to the third identification information that the shift coefficients in the second coordinate dimension and the third coordinate dimension are not both 0, and the shift coefficients in the first coordinate dimension, the second coordinate dimension, and the third coordinate dimension are encoded.

33. The method of claim 24, wherein: The method further comprises: The index positions of the plurality of shift coefficients are determined according to the coding order of the mesh vertices corresponding to the plurality of shift coefficients.

34. The method of claim 18, wherein: The determining of a plurality of shift coefficients corresponding to a plurality of mesh vertices in the current image block comprises: Determine a plurality of original shift coefficients corresponding to a plurality of mesh vertices in a current image block; The multiple shift coefficients are obtained by transforming and quantizing the multiple original shift coefficients.

35. A coding method, applied to an encoder, wherein: The encoder includes an entropy encoder, a grid encoder and a preprocessor, and the method includes: The preprocessor is used to generate a simplified grid and a shift coefficient according to the original grid of the current frame; The grid encoder is used to encode the simplified grid to generate a code stream of the simplified grid; The entropy encoder is used to execute the encoding method as described in any one of claims 18-34.

36. An encoder, comprising: A first determining unit, configured to determine a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block; Determining position index information of the non-zero shift coefficients among the multiple shift coefficients according to the non-zero shift coefficients; determining shift coefficient identification information according to the position index information of the non-zero shift coefficients; An encoding unit, encoding the shift coefficient identification information and the position index information, and writing the obtained encoding bits into a bit stream; The non-zero shift coefficients among the plurality of shift coefficients are encoded according to the position index information, and the obtained encoded bits are written into a bit stream.

37. An encoder, comprising: a first memory and a first processor; wherein, The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 18 to 35 when running the computer program.

38. A decoder, comprising: A decoding unit configured to decode a bit stream; A second determining unit is configured to determine shift coefficient identification information of a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block; According to the shift coefficient identification information, the decoded code stream determines the position index information of the non-zero shift coefficient among the multiple shift coefficients; according to the shift coefficient identification information and the position index information, the decoded code stream determines the multiple shift coefficients.

39. A decoder, comprising: A second memory and a second processor; wherein, The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 17 when running the computer program.

40. A computer-readable storage medium storing a computer program, wherein the computer program, when executed, implements the decoding method according to any one of claims 1 to 17, or implements the encoding method according to any one of claims 18 to 35.