WO2024148573A1 - Encoding and decoding method, encoder, decoder, and storage medium - Google Patents
Encoding and decoding method, encoder, decoder, and storage medium Download PDFInfo
- Publication number
- WO2024148573A1 WO2024148573A1 PCT/CN2023/071931 CN2023071931W WO2024148573A1 WO 2024148573 A1 WO2024148573 A1 WO 2024148573A1 CN 2023071931 W CN2023071931 W CN 2023071931W WO 2024148573 A1 WO2024148573 A1 WO 2024148573A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- shift
- index
- coefficient
- coefficients
- coordinate dimension
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Definitions
- 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.
- the encoding and decoding of the geometric information of the mesh mainly includes the organization and compression of the shift coefficients corresponding to the original mesh.
- the embodiments of the present application provide a coding and decoding method, an encoder, a decoder and a storage medium.
- a coding and decoding method 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, thereby improving the coding efficiency of the shift coefficients.
- an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
- the plurality of shift coefficients are determined according to the shift coefficient identification information and the position index information.
- an embodiment of the present application provides a decoding method, which is applied to a decoder, wherein the decoder includes an entropy decoder and a grid decoder, and the method includes:
- 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 described in the embodiment of the present application.
- an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
- 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.
- an embodiment of the present application provides a coding method, which is 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 described in the embodiment of the present application.
- 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; determine position index information of the non-zero shift coefficients in the plurality of shift coefficients according to the non-zero shift coefficients; and determine shift coefficient identification information according to the position index information of the non-zero shift coefficients;
- the encoding unit encodes the shift coefficient identification information and the position index information, and writes the obtained encoding bits into the bit stream; and encodes the non-zero shift coefficients among the multiple shift coefficients according to the position index information, and writes the obtained encoding bits into the bit stream.
- an embodiment of the present application provides an encoder, the 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
- an embodiment of the present application provides a decoder, the decoder comprising: a decoding unit, a second determining unit; wherein,
- the decoding unit is configured to decode the code stream
- the second determination unit is configured to determine shift coefficient identification information of multiple shift coefficients corresponding to multiple mesh vertices in the current image block; determine position index information of non-zero shift coefficients among 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.
- the second memory is used to store a computer program that can be run on the second processor
- the second processor is used to execute the method described in the first aspect and the second aspect when running the computer program.
- the embodiments of the present application provide a coding and decoding method, an encoder, a decoder and a storage medium.
- encoding there is no need to map the shift coefficients from three-dimensional space to two-dimensional images, and the transformed and quantized shift coefficients are directly encoded.
- 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.
- a position index information is used to indicate the encoding range of the second and third dimensional shift coefficients
- a shift identification information is used to indicate whether the second and third dimensional coefficients at an index position are both 0. This can simplify the encoding of the second and third dimensional shift coefficients and further improve the encoding efficiency of the shift coefficients.
- FIG1A is a schematic diagram 1 of a three-dimensional grid image
- FIG1B is a partial enlarged view of a three-dimensional grid image
- FIG3B is a schematic diagram of a grid data storage format
- FIG3C is a property diagram of a three-dimensional grid image
- Figure 4 is a diagram of the overall framework of grid coding
- FIG5A is a schematic diagram of a grid preprocessing process
- FIG5B is a schematic diagram of generating a shift coefficient
- FIG7A is a schematic diagram of intra-frame decoding
- FIG7B is a schematic diagram of inter-frame decoding
- FIG9 is a schematic diagram of a network architecture of a codec provided in an embodiment of the present application.
- FIG10 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application.
- FIG12 is a second schematic diagram of index positions of multiple shift coefficients in an embodiment of the present application.
- FIG13 is a schematic diagram of intra-frame decoding provided in an embodiment of the present application.
- FIG14 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application.
- FIG15 is a schematic diagram of intra-frame coding provided by an embodiment of the present application.
- FIG16 is a schematic diagram of the structure of the encoder
- FIG17 is a second schematic diagram of the structure of the encoder
- FIG18 is a schematic diagram of the structure of a decoder
- FIG19 is a second schematic diagram of the structure of the decoder.
- 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 in 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.
- different data format bitstreams can be decoded and synthesized in the same video scene.
- at least image format, point cloud format, and mesh format can be included.
- real-time immersive video interaction services can be provided for multiple data formats (for example, mesh, point cloud, image, etc.) with different sources.
- the data format-based method can allow independent processing at the bitstream level of the data format. That is, like tiles or slices in video encoding, different data formats in the scene can be encoded in an independent manner, so that independent encoding and decoding can be performed based on the data format.
- 3D animation content is represented based on keyframes, that is, each frame is a static mesh. Static meshes at different times have the same topological structure and different geometric structures.
- 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.
- 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.
- each position in the acquisition process may have corresponding attribute information, usually RGB color values, which reflect the color of the object; for 3D mesh images, in addition to color, the attribute information corresponding to each vertex is also commonly reflectance values, which reflect the surface material of the object.
- the attribute information of 3D mesh images is stored in 2D images, and the mapping from 2D to 3D is specified by UV coordinates.
- the 3D mesh data usually includes 3D geometric coordinate information (x, y, z), geometric connection information, UV coordinates, and attribute graphs.
- Figure 3A is a 3D mesh image
- Figure 3B shows a mesh data storage format including 3D geometric coordinates, UV coordinates and connection information
- Figure 3C is a corresponding attribute graph.
- FIG4 is a diagram of the overall framework of mesh coding
- FIG5A is a schematic diagram of the mesh preprocessing process
- FIG5B is a schematic diagram of the generation of the displacement coefficient.
- the encoding end is mainly divided into two parts: preprocessing (Pre-processing) and encoder (Encoder).
- the basic mesh and the displacement coefficient are first generated by preprocessing.
- the preprocessing process includes: first, the original mesh (Original Mesh) is downsampled to generate a simplified mesh (Decimated Mesh) with a greatly reduced number of vertices, or a base mesh/basic mesh (Base Mesh).
- FIG6A is a schematic diagram of intra-frame coding.
- 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).
- the displacement coefficients are updated (Update Displacements) using the reconstructed simplified mesh.
- the updated displacement coefficients are subjected to wavelet transform (Wavelet Transform) to obtain the displacement coefficients.
- Wavelet Transform wavelet transform
- H.265-HEVC High Efficiency Video Coding
- 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), packaged (Video Packing), and encoded using a video encoder to form an attribute bitstream (Compressed attribute bitstream).
- Figure 6B is a schematic diagram of inter-frame coding. As shown in Figure 6B, the inter-frame encoder and intra-frame encoder processes are roughly the same, but the inter-frame encoder does not directly encode the simplified grid, but encodes the motion vector between the simplified grid of the current frame and the simplified grid of the reference frame (Motion Encoder), and generates the corresponding motion vector bitstream (Compressed motion bitstream).
- Motion Encoder Motion Encoder
- Compressed motion bitstream Compressed motion bitstream
- the decoder can also be divided into an intra-frame decoder and an inter-frame decoder according to the type of the frame it acts on, which are used to perform intra-frame decoding and inter-frame decoding respectively.
- 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 by the simplified grid of the previous frame (reference frame).
- the dynamic mesh coding process is divided into the following steps:
- step 5 Adjust the shift coefficients in step 3 according to the reconstructed simplified grid obtained in step 4.
- step 6 Perform wavelet transform on the shift coefficients in step 5, and quantize the shift coefficients after wavelet transform to obtain quantized transform coefficients.
- the shift coefficient bit stream is decoded using a standard video encoder such as H.265 to obtain a shift coefficient two-dimensional image.
- the decoded base grid and the decoded shift coefficients are combined to generate the reconstructed 3D grid geometry information.
- FIG 8 is a schematic diagram of the MPEG DMC shift coefficient encoding process.
- the shift coefficient encoding process does not have parallelism. 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 encoded for video. The encoding efficiency of the shift coefficients is low, which reduces the grid compression performance.
- an embodiment of the present application provides a coding and decoding method.
- 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.
- 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.
- FIG. 9 is a schematic diagram of a network architecture of a codec provided by the embodiment of the present application.
- 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.
- 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.
- the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
- FIG. 10 is a flowchart of a decoding method provided by the embodiment of the present application.
- the method for the decoder to perform decoding processing may include the following steps:
- 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.
- the shift coefficient identification information is used to indicate whether to decode the position index information of the non-zero shift coefficient among the multiple shift coefficients.
- 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;
- 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.
- the second index information indicates the decoding range of the shift coefficients in the second coordinate dimension and the third coordinate dimension.
- 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 later than the index position of the last non-zero coefficient in the third coordinate dimension, or it can indicate the offset position of the later index position.
- 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.
- Figure 12 is a second schematic diagram of the index positions of multiple shift coefficients in an embodiment of the present application.
- the shift coefficients include shift coefficients in three coordinate dimensions of XYZ.
- X is the first coordinate dimension
- the index position of the last non-zero coefficient is Indi
- the first index information is used to indicate Indi+1.
- Y is the second coordinate dimension
- the index position of the last non-zero coefficient is Indi+1.
- Z is the third coordinate dimension
- the index position of the last non-zero coefficient is Indi
- the second index information is used to indicate the index position Indi+2 after the latter index position Indi+1.
- the shift coefficient identification information includes first identification information, and the first identification information is used to indicate whether the first index information indicates the index position of the 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.
- the first shift coefficient is the shift coefficient with the first index position among the multiple shift coefficients.
- the first index information indicates the index position of the first shift coefficient among the multiple shift coefficients, and 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, and 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.
- the first numerical value may be 1, and the second numerical value may be 0.
- determining the position index information of the non-zero shift coefficient among the multiple shift coefficients according to 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.
- 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.
- the second index information is used to indicate the index position after the index position that is close to the back.
- 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.
- the 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.
- determining the plurality of shift coefficients according to the shift coefficient identification information and the position index information includes:
- nonzeroCount0 indicates the index position after the back index position in the X coordinate dimension
- nonzeroCount0-1 indicates the back index position in the X coordinate dimension
- the multiple shift coefficients are dequantized and inversely transformed by wavelet transform to obtain multiple reconstructed shift coefficients.
- determining the multiple shift coefficients according to 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 of 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 after the first index position to the second index position, the decoding code stream determines the third identification information of each 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 the decoding code stream determines the shift coefficients in the shift coefficients
- a decoding process is as follows:
- the multiple shift coefficients are dequantized and inversely transformed by wavelet transform to obtain multiple reconstructed shift coefficients.
- 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 first preset value and the second preset value can be fixed values, and the two are equal or different.
- the first preset value and the second preset value are the difference between the two items.
- nonzeroCount0-1 and nonzeroCount-1 can be encoded, and nonzeroCount0-1 and nonzeroCount-1 can be decoded accordingly.
- the method further includes: decoding a simplified grid code stream to determine a simplified grid of a current image block; subdividing the simplified grid to obtain a subdivided grid; and determining a reconstructed grid of the current image block using the subdivided grid of the current image block and multiple reconstruction shift coefficients.
- 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 grid decoder, and the method includes:
- 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 shift coefficient decoding method described in any one of 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.
- FIG13 is a schematic diagram of intra-frame decoding provided by an embodiment of the present application.
- 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 bitstream 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 reconstructing the shift coefficient.
- the decoding of the attribute graph is directly decoded by the video decoder.
- the process is basically the same as that of the intra-frame decoder, except that the simplified grid is not decoded directly, but the motion vector is decoded and the simplified grid of the current frame is calculated from the simplified grid of the previous frame (reference frame).
- 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.
- FIG. 14 is a flow chart of an encoding method provided by an embodiment of the present application.
- the method for encoding processing by the encoder may include the following steps:
- Step 201 determining a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block
- the current image block may be a current three-dimensional mesh image, or an image block after image segmentation of the current three-dimensional mesh image.
- the current image block is preprocessed to generate a base mesh and a displacement coefficient.
- the preprocessing process includes: first, the original mesh is downsampled to generate a simplified mesh (Decimated Mesh) with a greatly reduced number of vertices, or 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 displacement coefficient are input into the encoder to generate a bitstream.
- 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.
- the position index information includes: 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 according to the non-zero shift coefficients in the multiple shift coefficients; determining the first index information according to the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; determining the second index information according to 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.
- the method further comprises: determining the index positions of the plurality of shift coefficients according to the coding order of the plurality of shift coefficients corresponding to the mesh vertices.
- 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 later than the index position of the last non-zero coefficient in the third coordinate dimension, or it can indicate the offset position of the later index position.
- the shift coefficients include shift coefficients in three coordinate dimensions 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
- nonzeroCount i.e., the second index information
- NonzeroCount0 and nonzeroCount can be the index position of the last non-zero coefficient, or the index position of the last non-zero coefficient plus the offset.
- the shift coefficient identification information is used to indicate whether to encode the position index information.
- 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.
- the value of the first identification information is determined to be the first value, otherwise, the value of the first identification information is the 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 the second value.
- the first value may be 1, and the second value may be 0.
- the encoding of the shift coefficient identification information and the position index information comprises: encoding the first identification information; When the first identification information determines that the first index information does not indicate the index position of the first shift coefficient, the first index information is encoded; when the second identification information determines that the second index information does not indicate the index position of the first shift coefficient, the second index information is encoded.
- 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.
- 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.
- 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.
- 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.
- an encoding process is as follows:
- the encoding method for the quantized transform coefficients is as follows:
- nonzeroCount0 ⁇ nonzeroCount indicates that the index position of the last nonzero coefficient in the X coordinate dimension is located after or at the same position as the index position of the last nonzero coefficient in the Y and Z coordinate dimensions, that is, the number of mobile coefficients to be encoded in the X coordinate dimension is greater than or equal to the larger number of mobile coefficients in the Y and Z coordinate dimensions, otherwise, it is less than.
- first encode the flag bit 3 (corresponding to the third identification information) indicating whether the second-dimensional and third-dimensional coefficients are both 0 at the current index position; if both are 0, encode the value of the first-dimensional coefficient; otherwise, encode the values of the first, second, and third-dimensional coefficients; for coefficients with indexes between nonzeroCount and (nonzeroCount0-1), encode the value of the first-dimensional coefficient;
- first encode flag bit 3 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 nonzeroCount0 and (nonzeroCount-1), encode the values of the second and third dimension coefficients.
- 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.
- nonzeroCount0-1 and nonzeroCount-1 can be encoded.
- 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 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 grid encoder can encode the simplified grid of the current frame to obtain a code stream of the simplified grid.
- FIG15 is a schematic diagram of an intra-frame decoding provided by an embodiment of the present application.
- 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).
- 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.
- attribute map For attribute map (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).
- Texture Transfer Text Transfer
- Video Packing Video Packing
- the grid encoder 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.
- the entropy encoding method is used to directly encode the transformed and quantized shift coefficient, which can improve the encoding efficiency of the shift coefficient.
- the encoding of the second and third-dimensional shift coefficients can be simplified and the encoding efficiency of the shift coefficients can be further improved.
- the general test sequences include three categories: Cat1-A, Cat1-B and Cat1-C, all of which contain geometric and color attribute information.
- FIG. 16 is a schematic diagram of a composition structure of an encoder.
- the encoder 110 may include: a first determining unit 111, an encoding unit 112, wherein:
- 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 according to the non-zero shift coefficients in the plurality of shift coefficients; and determine shift coefficient identification information according to the position index information of the non-zero shift coefficients;
- 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.
- a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
- the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
- the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
- the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
- 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, the method described in any one of the aforementioned embodiments is implemented.
- the first communication interface 115 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
- the first memory 113 is used to store a computer program that can be run on the first processor
- 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.
- 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.
- RAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate synchronous DRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous link DRAM
- DRRAM direct RAM bus RAM
- the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
- the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or a programmable read-only memory.
- 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.
- the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
- ASIC Application Specific Integrated Circuits
- DSP Digital Signal Processing
- DSP Device digital signal processing devices
- PLD programmable logic devices
- FPGA field programmable gate array
- general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
- the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this 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.
- 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.
- a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
- the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
- Figure 19 is a second schematic diagram of the composition structure of the decoder.
- 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.
- the second bus system 126 is used to achieve connection and communication between these components.
- the second bus system 126 also includes a power bus, a control bus and a status signal bus.
- various buses are labeled as the second bus system 126 in Figure 19. Among them,
- 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
- the second memory 123 is used to store a computer program that can be run on the second processor
- RAM random access memory
- DRAM dynamic random access memory
- SDRAM synchronous dynamic random access memory
- DDRSDRAM double data rate synchronous dynamic random access memory
- ESDRAM enhanced synchronous dynamic random access memory
- SLDRAM synchronous link dynamic random access memory
- DRRAM direct memory bus random access memory
- the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed.
- the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, 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.
- the embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium.
- multiple shift coefficients corresponding to multiple mesh vertices in the current image block are determined; according to the non-zero shift coefficients in the multiple shift coefficients, the position index information of the non-zero shift coefficients in the multiple shift coefficients is determined; according to the position index information of the non-zero shift coefficients, the 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 the code stream.
- 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.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
本申请实施例涉及网格压缩编码技术领域,尤其涉及一种编解码方法、编码器、解码器以及存储介质。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.
在运动图像专家组(Moving Picture Experts Group,MPEG)提供的动态网格编码(Dynamic Mesh Coding)的标准参考软件中,在对网格的几何信息进行编解码时,主要包括对原始网格对应的移位系数的组织和压缩。In the standard reference software of Dynamic Mesh Coding provided by the Moving Picture Experts Group (MPEG), the encoding and decoding of the geometric information of the mesh mainly includes the organization and compression of the shift coefficients corresponding to the original mesh.
然而,目前常见的移位系数的组织方法并不是最佳的,进而会增大后续的无损编码移位系数的码率,降低了网格压缩性能。However, the currently common organization method of the shift coefficients is not optimal, which will increase the bit rate of the subsequent lossless coding of the shift coefficients and reduce the grid compression performance.
发明内容Summary of the invention
本申请实施例提供一种编解码方法、编码器、解码器以及存储介质,编解码移位系数时,无需将移位系数进行三维空间到二维图像的映射,采用熵编码方法直接编码变换和量化后的移位系数,能够提高移位系数的编码效率。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, thereby improving the coding efficiency of the shift coefficients.
本申请实施例的技术方案可以如下实现:The technical solution of the embodiment of the present application can be implemented as follows:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,所述方法包括:In a first aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
解码码流,确定当前图像块中多个网格顶点对应的多个移位系数的移位系数标识信息;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.
第二方面,本申请实施例提供了一种解码方法,应用于解码器,其中,所述解码器包括熵解码器和网格解码器,所述方法包括:In a second aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, wherein the decoder includes an entropy decoder and a grid decoder, and the method includes:
所述网格解码器,用于解码简化网格的码流,确定当前图像块的简化网格;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 described in the embodiment of the present application.
第三方面,本申请实施例提供了一种编码方法,应用于编码器,所述方法包括:In a third aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
确定当前图像块中多个网格顶点对应的多个移位系数;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.
第四方面,本申请实施例提供了一种编码方法,应用于编码器,所述编码器包括熵编码器、网格编码器以及预处理器,所述方法包括:In a fourth aspect, an embodiment of the present application provides a coding method, which is 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 described in the embodiment of the present application.
第五方面,本申请实施例提供了一种编码器,所述编码器包括:In a fifth aspect, an embodiment of the present application provides an encoder, the 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; determine position index information of the non-zero shift coefficients in the plurality of shift coefficients according to the non-zero shift coefficients; and determine shift coefficient identification information according to the position index information of the non-zero shift coefficients;
编码单元,对所述对所述移位系数标识信息和所述位置索引信息进行编码,将所得到的编码比特写入码流;根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,将所得到的编码比特写入码流。The encoding unit encodes the shift coefficient identification information and the position index information, and writes the obtained encoding bits into the bit stream; and encodes the non-zero shift coefficients among the multiple shift coefficients according to the position index information, and writes the obtained encoding bits into the bit stream.
第六方面,本申请实施例提供了一种编码器,所述编码器包括:第一存储器和第一处理器;其中, In a sixth aspect, an embodiment of the present application provides an encoder, the 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 used to execute the method described in the third aspect and the fourth aspect when running the computer program.
第七方面,本申请实施例提供了一种解码器,所述解码器包括:解码单元,第二确定单元;其中,In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising: a decoding unit, a second determining unit; wherein,
所述解码单元,配置为解码码流;The decoding unit is configured to decode the code stream;
所述第二确定单元,配置为确定当前图像块中多个网格顶点对应的多个移位系数的移位系数标识信息;根据所述移位系数标识信息,确定所述多个移位系数中的非零移位系数的位置索引信息;根据所述移位系数标识信息和所述位置索引信息,确定所述多个移位系数。The second determination unit is configured to determine shift coefficient identification information of multiple shift coefficients corresponding to multiple mesh vertices in the current image block; determine position index information of non-zero shift coefficients among 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.
第八方面,本申请实施例提供了一种解码器,第二存储器和第二处理器;其中,In an eighth aspect, an embodiment of the present application provides a decoder, 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 used to execute the method described in the first aspect and the second aspect when running the computer program.
第九方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如第一方面、第二方面所述的方法、或者实现如第三方面、第四方面所述的方法。In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, 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.
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,编码时,无需将移位系数进行三维空间到二维图像的映射,直接编码变换和量化后的移位系数,解码时,直接解码移位系数码流得到移位系数,再进行反量化和反变换得到重建移位系数,从而提高移位系数的编解码效率。The embodiments of the present application provide a coding and decoding method, an encoder, a decoder and a storage medium. When encoding, there is no need to map the shift coefficients from three-dimensional space to two-dimensional images, and the transformed and quantized shift coefficients are directly encoded. When 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.
进一步地,根据移位系数的第二、三维系数具有相似的分布特征,通过一个位置索引信息指示第二、三维移位系数的编码范围,通过一个移位标识信息指示一个索引位置下第二、三维系数是否均为0,可以简化第二、三维移位系数的编码,进一步提升移位系数的编码效率。Furthermore, based on the similar distribution characteristics of the second and third dimensional coefficients of the shift coefficients, a position index information is used to indicate the encoding range of the second and third dimensional shift coefficients, and a shift identification information is used to indicate whether the second and third dimensional coefficients at an index position are both 0. This can simplify the encoding of the second and third dimensional shift coefficients and further improve the encoding efficiency of the shift coefficients.
图1A为三维网格图像的示意图一;FIG1A is a schematic diagram 1 of a three-dimensional grid image;
图1B为三维网格图像的局部放大图;FIG1B is a partial enlarged view of a three-dimensional grid image;
图2为三维网格的连接方式示意图;FIG2 is a schematic diagram of a connection method of a three-dimensional grid;
图3A为一幅三维网格图像的示意图二;FIG3A is a second schematic diagram of a three-dimensional grid image;
图3B为网格数据存储格式的示意图;FIG3B is a schematic diagram of a grid data storage format;
图3C为三维网格图像的属性图;FIG3C is a property diagram of a three-dimensional grid image;
图4为网格编码整体框架图;Figure 4 is a diagram of the overall framework of grid coding;
图5A为网格预处理流程的示意图;FIG5A is a schematic diagram of a grid preprocessing process;
图5B为移位系数的生成示意图;FIG5B is a schematic diagram of generating a shift coefficient;
图6A为帧内编码的示意图;FIG6A is a schematic diagram of intra-frame coding;
图6B为帧间编码的示意图;FIG6B is a schematic diagram of inter-frame coding;
图7A为帧内解码的示意图;FIG7A is a schematic diagram of intra-frame decoding;
图7B为帧间解码的示意图;FIG7B is a schematic diagram of inter-frame decoding;
图8为MPEG DMC移位系数编码流程示意图;Figure 8 is a schematic diagram of the MPEG DMC shift coefficient encoding process;
图9为本申请实施例提供的一种编解码的网络架构示意图;FIG9 is a schematic diagram of a network architecture of a codec provided in an embodiment of the present application;
图10为本申请实施例提供的一种解码方法的流程示意图;FIG10 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;
图11为本申请实施例中多个移位系数的索引位置示意图一;FIG11 is a schematic diagram of index positions of multiple shift coefficients in an embodiment of the present application;
图12为本申请实施例中多个移位系数的索引位置示意图二;FIG12 is a second schematic diagram of index positions of multiple shift coefficients in an embodiment of the present application;
图13为本申请实施例提供的一种帧内解码的示意图;FIG13 is a schematic diagram of intra-frame decoding provided in an embodiment of the present application;
图14为本申请实施例提供的一种编码方法的流程示意图;FIG14 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
图15为本申请实施例提供的一种帧内编码的示意图;FIG15 is a schematic diagram of intra-frame coding provided by an embodiment of the present application;
图16为编码器的组成结构示意图一;FIG16 is a schematic diagram of the structure of the encoder;
图17为编码器的组成结构示意图二;FIG17 is a second schematic diagram of the structure of the encoder;
图18为解码器的组成结构示意图一;FIG18 is a schematic diagram of the structure of a decoder;
图19为解码器的组成结构示意图二。FIG19 is a second schematic diagram of the structure of the decoder.
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。 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 in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to “some embodiments”, which describe 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.
还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。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 in 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.
需要说明的是,可以允许在同一视频场景中解码和合成不同的数据格式比特流。其中,至少可以包括图像格式、点云(Point Cloud)格式、网格(Mesh)格式。通过这种方式,可以为具有不同来源的多个数据格式(例如,网格、点云、图像等等)提供实时沉浸式视频交互服务。It should be noted that different data format bitstreams can be decoded and synthesized in the same video scene. Among them, at least image format, point cloud format, and mesh format can be included. In this way, real-time immersive video interaction services can be provided for multiple data formats (for example, mesh, point cloud, image, etc.) with different sources.
在本申请实施例中,基于数据格式的方法可以允许以数据格式的比特流级进行独立性处理。即与视频编码中的瓦片(tiles)或切片(slices)一样,该场景中的不同数据格式可以以独立的方式编码,从而可以基于数据格式进行独立的编码和解码。In the embodiment of the present application, the data format-based method can allow independent processing at the bitstream level of the data format. That is, like tiles or slices in video encoding, different data formats in the scene can be encoded in an independent manner, so that independent encoding and decoding can be performed based on the data format.
一般而言,三维动画内容采用基于关键帧的表示方法,即每帧是一个静态网格。不同时刻的静态网格具有相同的拓扑结构和不同的几何结构。但是,基于关键帧表示的三维动态网格的数据量特别大,因此如何能够有效的存储、传输和绘制成为三维动态网格发展所面临的问题。另外针对不同的用户终端(电脑、笔记本、便携式设备、手机)需要支持网格的空间可伸缩性;不同的网络带宽(宽带、窄带、无线)需要支持网格的质量可伸缩性。因此,三维动态网格压缩是一个非常关键的问题。Generally speaking, 3D animation content is represented based on keyframes, 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.
三维网格是通过空间中的无数个多边形组成的三维物体表面,多边形由顶点和边组成,图1A展示了三维网格图像,图1B展示了三维网格图像的局部放大图,可以看到网格表面是由闭合多边形所组成的。A three-dimensional grid is the surface of a three-dimensional object composed of countless polygons in space. A polygon is composed of vertices and edges. FIG. 1A shows a three-dimensional grid image, and FIG. 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.
二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而网格中的顶点在三维空间中的分布具有随机性和不规则性,以及多边形的构成方式需要进行额外的规定,因此需要记录每一个顶点在空间中的位置,以及每个多边形的连接信息,才能完整地表达一幅网格图像,如图2所示,同样的顶点数目和顶点位置,由于连接方式的不同,所形成的表面也完全不同。A two-dimensional image has information expressed at each pixel point and is distributed regularly, so there is no need to record its position information additionally; 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 in order to fully express a mesh image. As shown in Figure 2, the same number of vertices and vertex positions, due to different connection methods, form completely different surfaces.
除了以上信息之外,由于三维网格图像通常采用已有的二维图像/视频编码方式进行编码,因此需要将三维网格图像进行从三维空间到二维空间的转化,UV坐标就定义了这一转化过程。In addition to the above information, since the 3D grid image is usually encoded using an existing 2D image/video encoding method, the 3D grid image needs to be converted from 3D space to 2D space, and the UV coordinates define this conversion process.
与二维图像类似,采集过程中每一个位置可能会有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于三维网格图像来说,每一个顶点所对应的属性信息除了颜色以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。三维网格图像的属性信息通过二维图像进行存储,其从二维到三维的映射由UV坐标规定。Similar to 2D images, each position in the acquisition process may have corresponding attribute information, usually RGB color values, which reflect the color of the object; for 3D mesh images, in addition to color, the attribute information corresponding to each vertex is also commonly reflectance values, which reflect the surface material of the object. The attribute information of 3D mesh images is stored in 2D images, and the mapping from 2D to 3D is specified by UV coordinates.
因此,三维网格数据通常包括三维几何坐标信息(x,y,z)、几何连接信息、UV坐标,以及属性图。图3A为一幅三维网格图像,图3B网格数据存储格式包括三维几何坐标、UV坐标和连接信息,图3C为对应的属性图。Therefore, the 3D mesh data usually includes 3D geometric coordinate information (x, y, z), geometric connection information, UV coordinates, and attribute graphs. Figure 3A is a 3D mesh image, Figure 3B shows a mesh data storage format including 3D geometric coordinates, UV coordinates and connection information, and Figure 3C is a corresponding attribute graph.
目前的三维动态网格压缩方法有基于空间-时间的预测方法,通过消除空间和时间相关性来提高压缩效率;基于主成分分析(Principal Components Analysis,PCA)的技术,在特征向量空间进行投影,使能量集中;基于小波的方法,支持空间可伸缩和质量可伸缩。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.
需要说明的是,图4为网格编码整体框架图,图5A为网格预处理流程的示意图,图5B为移位系数的生成示意图,在编码端主要分为预处理(Pre-processing)和编码器(Encoder)两部分。其中,首先通过预处理生成基础网格和移位系数。预处理流程包括:首先对原始网格(Original Mesh)进行下采样,生成顶点数量大幅减少的简化网格(Decimated Mesh),或称基础网格/基本网格(Base Mesh)。然后对简化网格进行细分,在简化网格的边上插入新生成的顶点,得到细分网格(Subdivided Mesh)。最后对于细分网格中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位系数(Displacement)。在经过预处理后,将简化网格和移位系数输入编码器,生成码流。It should be noted that FIG4 is a diagram of the overall framework of mesh coding, FIG5A is a schematic diagram of the mesh preprocessing process, and FIG5B is a schematic diagram of the generation of the displacement coefficient. The encoding end is mainly divided into two parts: preprocessing (Pre-processing) and encoder (Encoder). Among them, the basic mesh and the displacement coefficient are first generated by preprocessing. The preprocessing process includes: first, the original mesh (Original Mesh) is downsampled to generate a simplified mesh (Decimated Mesh) with a greatly reduced number of vertices, or 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, find the point closest to it in the original mesh, and calculate the displacement coefficients of the two points. After preprocessing, the simplified mesh and the displacement coefficient are input into the encoder to generate a bit stream.
图6A为帧内编码的示意图,如图6A所示,在帧内编码器中,可以采用常见的静态网格编码器(Static Mesh Encoder)对简化网格进行编码,生成对应的码流(Compressed base mesh bitstream)。接下来,用重构的简化网格更新移位系数(Update Displacements)。对更新后的移位系数进行小波变换(Wavelet Transform)后得到移位系数。并将其打包成图像、视频(Image Packing、Video Packing)后采用高效率视频编码(High Efficiency Video Coding,H.265-HEVC)进行编码,生成移位系数的码流(Compressed displacements bitstream)。对于属性图(Attribute Map)编码,首先根据重构的几何信息与原始几何信息间的差异对特征图进行变换(Texture Transfer),然后将其进行填补(Padding)、打包(Video Packing)后用视频编码器编码形成属性码流(Compressed attribute bitstream)。 FIG6A is a schematic diagram of intra-frame coding. As shown in FIG6A , 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) 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 (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), packaged (Video Packing), and encoded using a video encoder to form an attribute bitstream (Compressed attribute bitstream).
图6B为帧间编码的示意图,如图6B所示,帧间编码器与帧内编码器流程大致相同,但帧间编码器并不直接对简化网格进行编码,而是编码当前帧的简化网格与参考帧的简化网格间的运动矢量(Motion Encoder),并生成相应的运动矢量的码流(Compressed motion bitstream)。Figure 6B is a schematic diagram of inter-frame coding. As shown in Figure 6B, the inter-frame encoder and intra-frame encoder processes are roughly the same, but the inter-frame encoder does not directly encode the simplified grid, but encodes the motion vector between the simplified grid of the current frame and the simplified grid of the reference frame (Motion Encoder), and generates the corresponding motion vector bitstream (Compressed motion bitstream).
相应的,在解码过程中,解码器按照作用帧的类型不同,也可以分为帧内解码器和帧间解码器,分别用于执行帧内解码和帧间解码。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 acts on, which are used to perform intra-frame decoding and inter-frame decoding respectively.
图7A为帧内解码的示意图,如图7A所示,在帧内解码器中,可以采用静态网格解码器(Static Mesh Decoder)解码出简化网格。采用视频解码器(Video Decoder)解码出移位系数视频,并通过视频解包(Video Unpacking)和小波逆变换(Inverse Wavelet Transform)得到移位系数。通过解码得到的简化网格和移位系数得到解码的网格几何信息。属性图的解码则直接通过视频解码器进行解码。FIG7A is a schematic diagram of intra-frame decoding. As shown in FIG7A , in the intra-frame decoder, a static mesh decoder (Static Mesh Decoder) can be used to decode a simplified mesh. A video decoder (Video Decoder) is used to decode the shift coefficient video, and the shift coefficient is obtained through video unpacking (Video Unpacking) and inverse wavelet transform (Inverse Wavelet Transform). The decoded simplified mesh and shift coefficient are used to obtain the decoded mesh geometry information. The decoding of the attribute graph is directly decoded by the video decoder.
图7B为帧间解码的示意图,如图7B所示,对于帧间解码器,其流程与帧内解码器基本一致。除了不直接解码简化网格,而是解码运动矢量,并通过前一帧(参考帧)的简化网格计算得到当前帧的简化网格。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 by the simplified grid of the previous frame (reference frame).
综上,目前运动图像专家组(Moving Picture Experts Group,MPEG)提供的动态网格编码(Dynamic Mesh Coding)的标准参考软件(下称标准参考软件)中,动态网格编码过程分为如下步骤:In summary, in the standard reference software for dynamic mesh coding (Dynamic Mesh Coding) provided by the Moving Picture Experts Group (MPEG) (hereinafter referred to as the standard reference software), the dynamic mesh coding process is divided into the following steps:
1、对原始网格进行预处理,具体表现为减少网格中的顶点数并简化连接关系。1. Preprocess the original mesh by reducing the number of vertices in the mesh and simplifying the connection relationship.
2、细分步骤1中的简化网格,具体操作为对于步骤1中任意有连接关系的两个顶点,在其连线段的中点加入一个新的点,并重复2次。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 line segment connecting them, and repeat twice.
3、对于步骤2中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位系数(Displacement)。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 the two points.
4、采用编码器如Draco对步骤1中的简化网格量化后进行编码。4. Use an encoder such as Draco to quantize the simplified grid in step 1 and then encode it.
5、根据步骤4所得到的重构简化网格对步骤3中的移位系数进行调整。5. Adjust the shift coefficients in step 3 according to the reconstructed simplified grid obtained in step 4.
6、对步骤5中的移位系数进行小波变换,并将小波变换后的移位系数进行量化得到量化变换系数。6. Perform wavelet transform on the shift coefficients in step 5, and quantize the shift coefficients after wavelet transform to obtain quantized transform coefficients.
7、将量化变换系数进行三维空间到二维图像的映射(或称“图像打包”),生成移位系数二维图像。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.
8、采用标准视频编码器如H.265对步骤6中的移位系数二维图像进行编码。8. Use a standard video encoder such as H.265 to encode the shift coefficient two-dimensional image in step 6.
动态网格解码过程分为如下步骤:The dynamic grid decoding process is divided into the following steps:
1、基础网格码流经过解码器如draco解码之后生成解码基础网格。1. The basic grid code stream is decoded by a decoder such as draco to generate a decoded basic grid.
2、移位系数码流采用标准视频编码器如H.265解码得到移位系数二维图像。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.
3、将移位系数二维图像进行从二维图像到三维空间的映射(或称“图像解包”),得到量化变换系数。3. Map the shift coefficient two-dimensional image from the two-dimensional image to the three-dimensional space (or "image unpacking") to obtain the quantized transform coefficients.
4、对量化变换系数进行反量化、小波反变换得到解码移位系数。4. Dequantize and inverse wavelet transform the quantized transform coefficients to obtain the decoded shift coefficients.
5、将解码基础网格和解码移位系数一起生成重建三维网格几何信息。5. The decoded base grid and the decoded shift coefficients are combined to generate the reconstructed 3D grid geometry information.
6、属性码流经过HEVC解码之后生成重建属性图。6. After the attribute code stream is decoded by HEVC, a reconstructed attribute graph is generated.
图8为MPEG DMC移位系数编码流程示意图,如图8所示,移位系数编码流程不具备并行性,需要先将变换量化后的移位系数进行图像打包从三维空间映射到二维图像,生成移位系数二维图像,再对移位系数二维图像进行视频编码,移位系数的编码效率较低,降低了网格压缩性能。Figure 8 is a schematic diagram of the MPEG DMC shift coefficient encoding process. As shown in Figure 8, the shift coefficient encoding process does not have parallelism. 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 encoded for video. The encoding efficiency of the shift coefficients is low, which reduces the grid compression performance.
为了解决上述问题,本申请实施例提供了一种编解码方法,编码时,无需将移位系数进行三维空间到二维图像的映射,直接编码变换和量化后的移位系数,解码时,直接解码移位系数码流得到移位系数,再进行反量化和反变换得到重建移位系数,从而提高移位系数的编解码效率。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.
进一步地,根据移位系数的第二、三维系数具有相似的分布特征,通过一个位置索引信息指示第二、三维移位系数的编码范围,通过一个移位标识信息指示一个索引位置下第二、三维系数是否均为0,可以简化第二、三维移位系数的编码,进一步提升移位系数的编码效率。Furthermore, based on the similar distribution characteristics of the second and third dimensional coefficients of the shift coefficients, a position index information is used to indicate the encoding range of the second and third dimensional shift coefficients, and a shift identification information is used to indicate whether the second and third dimensional coefficients at an index position are both 0. This can simplify the encoding of the second and third dimensional shift coefficients and further improve the encoding efficiency of the shift coefficients.
本申请实施例提供了一种包含解码方法和编码方法的编解码系统的网络架构,图9为本申请实施例提供的一种编解码的网络架构示意图。如图9所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限制。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。The embodiment of the present application provides a network architecture of a codec system including a decoding method and an encoding method, and FIG. 9 is a schematic diagram of a network architecture of a codec provided by the embodiment of the present application. As shown in FIG. 9, 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. Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
本申请的实施例提出了一种解码方法,图10为本申请实施例提供的一种解码方法的流程示意图,如图10所示,在本申请的实施例中,解码器进行解码处理的方法可以包括以下步骤:The embodiment of the present application proposes a decoding method. FIG. 10 is a flowchart of a decoding method provided by the embodiment of the present application. As shown in FIG. 10 , in the embodiment of the present application, the method for the decoder to perform decoding processing may include the following steps:
步骤101:解码码流,确定当前图像块中多个网格顶点对应的多个移位系数的移位系数标识信息;Step 101: Decode a bitstream to determine shift coefficient identification information of a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block;
其中,当前图像块可以为当前三维网格图像,或者对当前三维网格图像进行图像分割后的图像块。 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.
在一些实施例中,所述解码码流,确定当前图像块中多个网格顶点对应的多个移位系数的移位系数标识信息,包括:解码移位系数码流,确定当前图像块的移位标识信息。In some embodiments, the decoding of the code stream to determine the shift coefficient identification information of multiple shift coefficients corresponding to 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.
其中,移位系数标识信息用于指示是否解码多个移位系数中非零移位系数的位置索引信息。The shift coefficient identification information is used to indicate whether to decode the position index information of the non-zero shift coefficient among the multiple shift coefficients.
步骤102:根据所述移位系数标识信息,确定所述多个移位系数中的非零移位系数的位置索引信息;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;
其中,位置索引信息用于指示多个移位系数中非零移位系数。示例性的,位置索引信息用于指示移位系数的解码范围。在一些实施例中,根据所述位置索引信息确定所述多个移位系数中最后一个非零系数的索引位置,解码第一个移位系数到最后一个非零系数之间的移位系数。The position index information is used to indicate a non-zero shift coefficient among the multiple 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 multiple shift coefficients is determined according to the position index information, and the shift coefficients between the first shift coefficient and the last non-zero coefficient are decoded.
在一些实施例中,所述移位系数包括三个坐标维度下的移位系数;所述位置索引信息包括第一索引信息和第二索引信息,所述第一索引信息指示第一坐标维度下移位系数的解码范围,所述第二索引信息指示第二坐标维度和所述第三坐标维度下移位系数的解码范围。相应的,所述移位系数标识信息包括第一标识信息和第二标识信息;其中,所述第一标识信息用于指示是否解码所述第一索引信息;所述第二标识信息用于指示是否解码所述第二索引信息。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 indicates the decoding range of the shift coefficient in the first coordinate dimension, and the second index information indicates the decoding range of the shift coefficient in the second coordinate dimension and the third coordinate dimension. Correspondingly, 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; and the second identification information is used to indicate whether to decode the second index information.
示例性的,所述第一索引信息用于指示所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置;所述第二索引信息用于指示所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置。可以理解为所述第二索引信息指示第二坐标维度下和第三坐标维度下移位系数的解码范围。通过第二位置索引信息指示第二和三维移位系数的解码范围,可以简化第二、三维移位系数的解码,从而提升解码效率,带来性能增益。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. By indicating the decoding range of the second and three-dimensional shift coefficients through the second position index information, the decoding of the second and three-dimensional shift coefficients can be simplified, thereby improving the decoding efficiency and bringing performance gain.
在一些实施例中,该方法还包括:根据所述多个移位系数对应网格顶点的解码顺序确定所述多个移位系数的索引位置。示例性的,多个移位系数的索引位置为Indi,i=0,1,2,3,…。In some embodiments, the method further comprises: determining the index positions of the plurality of shift coefficients according to the decoding order of the mesh vertices corresponding to the plurality of shift coefficients. Exemplarily, the index positions of the plurality of shift coefficients are Indi, i=0, 1, 2, 3, ...
实际应用中,第一索引信息可以直接指示第一坐标维度下的最后一个非零系数的索引位置,也可以指示最后一个非零系数的索引位置的偏移位置;第二索引信息可以直接指示第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置,也可以指示靠后索引位置的偏移位置。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 later than the index position of the last non-zero coefficient in the third coordinate dimension, or it can indicate the offset position of the later index position.
图11为本申请实施例中多个移位系数的索引位置示意图一,如图11所示,移位系数包括XYZ三个坐标维度下的移位系数,X为第一坐标维度时最后一个非零系数的索引位置为Indi,第一索引信息用于指示Indi,Y为第二坐标维度时最后一个非零系数的索引位置为Indi+1,Z为第三坐标维度时最后一个非零系数的索引位置为Indi,第二索引信息用于指示靠后的索引位置Indi+1。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.
在一些实施例中,所述第一索引信息用于指示所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置的后一个索引位置;所述第二索引信息用于指示所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置的后一个索引位置。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.
图12为本申请实施例中多个移位系数的索引位置示意图二,如图12所示,移位系数包括XYZ三个坐标维度下的移位系数,X为第一坐标维度时最后一个非零系数的索引位置为Indi,第一索引信息用于指示Indi+1,Y为第二坐标维度时最后一个非零系数的索引位置为Indi+1,Z为第三坐标维度时最后一个非零系数的索引位置为Indi,第二索引信息用于指示靠后的索引位置Indi+1的后一个索引位置Indi+2。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.
相应的,所述移位系数标识信息包括第一标识信息,所述第一标识信息用于指示所述第一索引信息是否指示所述多个移位系数中第一个移位系数的索引位置;所述移位系数标识信息包括第二标识信息,所述第二标识信息用于指示所述第二索引信息是否指示所述多个移位系数中第一个移位系数的索引位置。其中,第一个移位系数为多个移位系数中索引位置位于首位的移位系数。Correspondingly, the shift coefficient identification information includes first identification information, and the first identification information is used to indicate whether the first index information indicates the index position of the 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. The first shift coefficient is the shift coefficient with the first index position among the multiple shift coefficients.
当第一标识信息的取值为第一数值,第一索引信息指示所述多个移位系数中第一个移位系数的索引位置,当第一标识信息的取值为第二数值,第一索引信息不指示所述多个移位系数中第一个移位系数的索引位置;当第二标识信息的取值为第一数值,第二索引信息指示所述多个移位系数中第一个移位系数的索引位置,当第二标识信息的取值为第二数值,第二索引信息不指示所述多个移位系数中第一个移位系数的索引位置。示例性的,第一数值可以为1,第二数值可以为0。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, and 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, and 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. Exemplarily, the first numerical value may be 1, and the second numerical value may be 0.
相应的,所述根据所述移位系数标识信息,确定所述多个移位系数中的非零移位系数的位置索引信息,包括:根据所述第一标识信息确定所述第一索引信息不指示第一个移位系数的索引位置时,解码码流确定所述第一索引信息;根据所述第二标识信息确定所述第二索引信息不指示第一个移位系数的索引位置时,解码码流确定所述第二索引信息。Correspondingly, determining the position index information of the non-zero shift coefficient among the multiple shift coefficients according to 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.
根据第一标识信息确定所述第一索引信息指示所述多个移位系数中第一个移位系数的索引位置,已经能够确定所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置,因此无需解码码流确定第一索引信息。同样,根据第二标识信息确定所述第二索引信息指示所述多个移位系数中第一个移位 系数的索引位置,已经能够确定所述多个移位系数在第二坐标维度和第三坐标维度下的最后一个非零系数的索引位置的靠后索引位置,也无需解码码流确定第二索引信息。By determining that the first index information indicates the index position of the first shift coefficient among the multiple shift coefficients according to the first identification information, the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension can be determined, so there is no need to decode the code stream to determine the first index information. Similarly, by determining that the second index information indicates the first shift coefficient among the multiple shift coefficients according to the second identification information The index position of the coefficient can determine the index position after the index position of the last non-zero coefficient of the multiple shifted coefficients in the second coordinate dimension and the third coordinate dimension, and there is no need to decode the code stream to determine the second index information.
步骤103:根据所述移位系数标识信息和所述位置索引信息,确定所述多个移位系数。Step 103: Determine the multiple shift coefficients according to the shift coefficient identification information and the position index information.
其中,所述非零移位系数的位置索引信息确定移位系数的解码范围,根据移位系数的解码范围解码码流确定多个移位系数中的非零移位系数。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.
在一些实施例中,所述第一索引信息用于指示所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置的后一个索引位置;所述第二索引信息用于指示所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置的后一个索引位置。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.
相应的,该方法还包括:根据第一标识信息确定所述第一索引信息指示第一个移位系数的索引位置时,确定所述第一坐标维度下所有移位系数均为0;根据第二标识信息确定所述第二索引信息指示第一个移位系数的索引位置时,确定所述第二坐标维度和所述第三坐标维度下所有移位系数均为0。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.
需要说明的是,当所述第一索引信息用于指示最后一个非零系数的索引位置的后一个索引位置,所述第二索引信息用于指示靠后的索引位置的后一个索引位置。当第一坐标维度下所有移位系数均为0,第一索引信息指示第一个移位系数的位置索引,则无需解码第一索引信息和第一坐标维度下的移位系数。当第二坐标维度和所述第三坐标维度下所有移位系数均为0,则无需解码第二索引信息和第二、第三坐标维度下的移位系数,能够提高位置索引信息和移位系数的解码效率。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 index position that is close to the back. When all the 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 the 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.
在一些实施例中,移位系数信息还包括第三标识信息,所述第三标识信息用于指示是否解码第二坐标维度的移位系数和第三坐标维度的移位系数。示例性的,所述第三标识信息用于指示同一索引位置下第二坐标维度的移位系数和第三坐标维度的移位系数是否均为0。也就是说,解码移位系数时,还需要根据第三标识信息确定每个索引位置的移位系数中第二维系数和第三维系数是否均为0,当均为0时,则无需解码第二、第三维移位系数,否则需要解码第二、第三维移位系数。这里,通过第三标识信息去指示第二、三维系数是否均为0,可以进一步简化第二、三维移位系数的编解码,从而提升编解码效率,带来性能增益。In some embodiments, the shift coefficient information also 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 according to 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.
示例性的,当前索引位置的第三标识信息的取值为第三数值,当前索引位置下第二坐标维度的移位系数和第三坐标维度的移位系数均为0;当前索引位置的第三标识信息的取值为第四数值,当前索引位置的第二坐标维度的移位系数和第三坐标维度的移位系数不均为0。示例性的,第三数值可以为1,第四数值可以为0。Exemplarily, the value of the third identification information of 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 of 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.
在一些实施例中,所述根据所述移位系数标识信息和所述位置索引信息,确定所述多个移位系数,包括:In some embodiments, determining the plurality of shift coefficients according to the shift coefficient identification information and the position index information includes:
根据所述第一索引信息确定在所述第一坐标维度下的最后一个非零系数的索引位置,作为第一索引位置;根据所述第二索引信息在所述第二坐标维度下的最后一个非零系数的索引位置和在所述第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置,作为第二索引位置;确定所述第一索引位置位于所述第二索引位置之后或者位置相同;针对第一个移位系数的索引位置到所述第二索引位置的移位系数,解码码流确定每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数均为0,解码码流确定所述第一坐标维度下的移位系数;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,解码码流确定所述第一坐标维度、所述第二坐标维度和所述第三坐标维度下的移位系数;针对所述第二索引位置的后一个索引位置到所述第一索引位置的移位系数,解码码流确定所述第一坐标维度下的移位系数。According to the first index information, the index position of the last non-zero coefficient in the first coordinate dimension is determined as the first index position; according to the second index information, 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 are determined as the second index position; the first index position is determined to be located after the second index position or the same 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; according to the third identification information, it is determined that the shift coefficients in the second coordinate dimension and the third coordinate dimension are both 0, and the decoded code stream determines the shift coefficient in the first coordinate dimension; according to the third identification information, it is determined 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 first coordinate dimension, the second coordinate dimension, and the third coordinate dimension; 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.
在一些实施例中,所述根据所述移位系数标识信息和所述位置索引信息,确定所述多个移位系数,包括:确定所述第一索引位置位于所述第二索引位置之前;针对第一个移位系数的索引位置到所述第一索引位置的移位系数,解码码流确定每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数均为0,解码码流确定所述第一坐标维度下的移位系数;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,解码码流确定所述第一坐标维度、所述第二坐标维度和所述第三坐标维度下的移位系数;针对所述第一索引位置的后一个索引位置到所述第二索引位置的移位系数,解码码流确定所述第二坐标维度和所述第三坐标维度下的移位系数。In some embodiments, determining the multiple shift coefficients according to 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 the third identification information of 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 after 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.
示例性的,一种解码过程如下:Exemplarily, a decoding process is as follows:
a)解码指示nonzeroCount0是否等于0的标志位1(对应第一标识信息),若nonzeroCount0不等于0,则解码nonzeroCount0(对应第一索引信息)值,解码指示nonzeroCount是否等于0的标志位2(对应第二标识信息),若nonzeroCount不等于0,则解码nonzeroCount(对应第二索引信息)值;a) decoding the 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 the 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);
b)若满足nonzeroCount0≥nonzeroCount,则进入步骤c),否则进入步骤d);nonzeroCount0≥nonzeroCount表示X坐标维度下最后一个非零系数的索引位置位于Y和Z坐标维度下最后一个非零系 数的索引位置之后或位置相同,即X坐标维度需要解码的移动系数数量大于或者等于Y和Z坐标维度中较大的移动系数数量,否则,小于。b) If nonzeroCount0≥nonzeroCount is satisfied, then proceed to step c), otherwise proceed to step d); nonzeroCount0≥nonzeroCount means that the index position of the last nonzero coefficient in the X coordinate dimension is located at the index position of the last nonzero coefficient in the Y and Z coordinate dimensions. The index position of the number is after or the same as that of the number, that is, the number of mobile coefficients that need to be decoded in the X coordinate dimension is greater than or equal to the larger number of mobile coefficients in the Y and Z coordinate dimensions, otherwise, it is less than.
c)对于索引在0~(nonzeroCount-1)的系数,首先解码当前索引位置指示第二维和第三维系数是否均为0的标志位3(对应第三标识信息),若均为0,则解码第一维系数的值,否则解码第一、二、三维系数的值;对于索引在nonzeroCount~(nonzeroCount0-1)的系数,解码第一维系数的值;需要说明的是,nonzeroCount指示YZ坐标维度下靠后索引位置的后一个索引位置,因此,nonzeroCount-1指示YZ坐标维度下靠后索引位置;c) For coefficients with indexes between 0 and (nonzeroCount-1), first decode the 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;
d)对于索引在0~(nonzeroCount0-1)的系数,首先解码当前索引位置指示第二维和第三维系数是否均为0的标志位3,若均为0,则解码第一维系数的值,否则解码第一、二、三维系数的值;对于索引在nonzeroCount0~(nonzeroCount-1)的系数,解码第二、三维系数的值。需要说明的是,nonzeroCount0指示X坐标维度下靠后索引位置的后一个索引位置,因此,nonzeroCount0-1指示X坐标维度下靠后索引位置。d) For coefficients with indexes between 0 and (nonzeroCount0-1), first decode the flag bit 3 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 nonzeroCount0 and (nonzeroCount-1), decode the values of the second and third dimension coefficients. It should be noted that nonzeroCount0 indicates the index position after the back index position in the X coordinate dimension, so nonzeroCount0-1 indicates the back index position in the X coordinate dimension.
进一步地,对多个移位系数进行反量化和小波逆变换得到的多个重建移位系数。Furthermore, the multiple shift coefficients are dequantized and inversely transformed by wavelet transform to obtain multiple reconstructed shift coefficients.
在一些实施例中,所述根据所述移位系数标识信息和所述位置索引信息,确定所述多个移位系数,包括:确定所述第一索引位置位于所述第二索引位置之前;针对第一个移位系数的索引位置到所述第一索引位置的移位系数,解码码流确定每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数均为0,解码码流确定所述第一坐标维度下的移位系数;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,解码码流确定所述第一坐标维度、所述第二坐标维度和所述第三坐标维度下的移位系数;针对所述第一索引位置的后一个索引位置到所述第二索引位置的移位系数,解码码流确定每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,解码码流确定所述第二坐标维度和所述第三坐标维度下的移位系数。In some embodiments, determining the multiple shift coefficients according to 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 of 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 after the first index position to the second index position, the decoding code stream determines the third identification information of each 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 the decoding code stream determines the shift coefficients in the second coordinate dimension and the third coordinate dimension.
示例性的,一种解码过程如下:Exemplarily, a decoding process is as follows:
a)解码指示nonzeroCount0是否等于0的标志位1,若nonzeroCount0不等于0,则解码nonzeroCount0值,解码指示nonzeroCount是否等于0的标志位2,若nonzeroCount不等于0,则解码nonzeroCount值;a) decode the flag bit 1 indicating whether nonzeroCount0 is equal to 0, if nonzeroCount0 is not equal to 0, decode the nonzeroCount0 value, decode the flag bit 2 indicating whether nonzeroCount is equal to 0, if nonzeroCount is not equal to 0, decode the nonzeroCount value;
b)若满足nonzeroCount0≥nonzeroCount,则进入步骤c),否则进入步骤d);b) If nonzeroCount0≥nonzeroCount is satisfied, proceed to step c), otherwise proceed to step d);
c)对于索引在0~(nonzeroCount-1)的系数,首先解码指示第二维和第三维系数是否均为0的标志位3,若均为0,则解码第一维系数的值,否则解码第一、二、三维系数的值;对于索引在nonzeroCount~(nonzeroCount0-1)的系数,解码第一维系数的值;c) For coefficients with indices between 0 and (nonzeroCount-1), first decode the flag bit 3 indicating whether the coefficients of the second dimension and the third dimension are both 0. If both are 0, decode the value of the coefficient of the first dimension, otherwise decode the values of the coefficients of the first, second, and third dimensions; for coefficients with indices between nonzeroCount and (nonzeroCount0-1), decode the value of the coefficient of the first dimension;
d)对于索引在0~(nonzeroCount0-1)的系数,首先解码指示第二维和第三维系数是否均为0的标志位3,若均为0,则解码第一维系数的值,否则解码第一、二、三维系数的值;对于索引在nonzeroCount0~(nonzeroCount-1)的系数,首先解码指示第二维和第三维系数是否均为0的标志位3,若不满足均为0,则继续解码第二、三维系数的值。d) For coefficients with indexes between 0 and (nonzeroCount0-1), first decode the 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 the flag bit 3 indicating whether the second and third dimension coefficients are both 0. If both are not 0, continue to decode the values of the second and third dimension coefficients.
进一步地,对多个移位系数进行反量化和小波逆变换得到的多个重建移位系数。Furthermore, the multiple shift coefficients are dequantized and inversely transformed by wavelet transform to obtain multiple reconstructed shift coefficients.
在一些实施例中,所述第一索引信息的值为所述第一索引信息的实际值减去第一预设值得到的中间值;所述第二索引信息的值为所述第二索引信息的实际值减去第二预设值得到的中间值;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;
所述方法还包括:所述第一索引信息的中间值加上所述第一预设值,得到第一索引信息的实际值;所述第二索引信息的中间值加上所述第二预设值,得到第二索引信息的实际值。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.
其中,第一预设值和第二预设值可以为固定值,二者相等或者不等。示例性的,多个移位系数的索引位置为Indi,i=0,1,2,3,…,n。多个移位系数的索引位置用等差数列表示时,第一预设值和第二预设值为两项差值。示例性的,Indi=0,1,2,3,…,n时,第一预设值和第二预设值为1。Wherein, the first preset value and the second preset value can be fixed values, and the two are equal or different. Exemplarily, the index position of the plurality of shift coefficients is Indi, i=0,1,2,3,…,n. When the index position of the plurality of shift coefficients is represented by an arithmetic progression, the first preset value and the second preset value are the difference between the two items. Exemplarily, when Indi=0,1,2,3,…,n, the first preset value and the second preset value are 1.
当索引位置的取值范围为0,1,2,3,…,n,即移位系数的索引从0开始。因此,若标志位1指示nonzeroCount0不等于0,则表示nonzeroCount0的取值为大于或者等于1的数,若标志位2指示nonzeroCount不等于0,则表示nonzeroCount的取值为大于或者等于1的数。在一些实施例中,为了进一步节约编码比特数,降低移位系数的码率,可以编码nonzeroCount0-1和nonzeroCount-1,对应的解码nonzeroCount0-1和nonzeroCount-1。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 the 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, and if the 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, and nonzeroCount0-1 and nonzeroCount-1 can be decoded accordingly.
相应的,上述解码端,步骤b)可以替换为:解码指示nonzeroCount0是否等于0的标志位1,若nonzeroCount0不等于0,解码nonzeroCount0-1值,解码指示nonzeroCount是否等于0的标志位2,若nonzeroCount不等于0,则解码nonzeroCount-1值;进一步地,将(nonzeroCount0-1)+1得到nonzeroCount0的实际值,将(nonzeroCount-1)+1得到nonzeroCount的实际值;根据nonzeroCount0的实际值和nonzeroCount的实际值解码非零移位系数的值。 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 nonzeroCount0-1 value, decoding flag bit 2 indicating whether nonzeroCount is equal to 0, if nonzeroCount is not equal to 0, decoding nonzeroCount-1 value; further, adding (nonzeroCount0-1)+1 to obtain the actual value of nonzeroCount0, adding (nonzeroCount-1)+1 to obtain the actual value of nonzeroCount; decoding the value of the non-zero shift coefficient according to the actual value of nonzeroCount0 and the actual value of nonzeroCount.
在一些实施例中,所述方法还包括:对所述多个移位系数进行反量化和反变换得到的多个重建移位系数。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.
在一些实施例中,所述方法还包括:解码简化网格码流,确定当前图像块的简化网格;对所述简化网格进行细分,得到细分网格;当前图像块的细分网格和多个重建移位系数,确定当前图像块的重建网格。In some embodiments, the method further includes: decoding a simplified grid code stream to determine a simplified grid of a current image block; subdividing the simplified grid to obtain a subdivided grid; and determining a reconstructed grid of the current image block using the subdivided grid of the current image block and multiple reconstruction shift coefficients.
在一些实施例中,所述方法还包括:解码属性图码流,得到重建属性图。In some embodiments, the method further includes: decoding the attribute graph code stream to obtain a reconstructed attribute graph.
基于上述实施例,本申请的再一实施例提出了一种解码方法,该解码方法应用于解码器,其中,所述解码器包括熵解码器和网格解码器,所述方法包括: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 grid decoder, and the method includes:
所述网格解码器,用于解码简化网格的码流,确定当前图像块的简化网格;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 shift coefficient decoding method described in any one of the embodiments of the present application.
需要说明的是,在本申请的实施例中,解码方法可以用于帧内解码,也可以用于帧间解码。本申请不进行具体限定。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.
示例性的,图13为本申请实施例提供的一种帧内解码的示意图,如图13所示,在帧内解码器中,可以采用静态网格解码器(Static Mesh Decoder)解码出简化网格。采用熵解码器对移位系数码流进行熵解码得到移位系数,并通过反量化和小波逆变换(Inverse Wavelet Transform)得到重建移位系数。通过解码得到的简化网格和重建移位系数得到解码的网格几何信息。属性图的解码则直接通过视频解码器进行解码。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 bitstream 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 reconstructing the shift coefficient. The decoding of the attribute graph is directly decoded by the video decoder.
对于帧间解码器,其流程与帧内解码器基本一致。除了不直接解码简化网格,而是解码运动矢量,并通过前一帧(参考帧)的简化网格计算得到当前帧的简化网格。For the inter-frame decoder, the process is basically the same as that of the intra-frame decoder, except that the simplified grid is not decoded directly, but the motion vector is decoded and the simplified grid of the current frame is calculated from the simplified grid of the previous frame (reference frame).
采用上述解码方法,解码移位系数时,无需将移位系数进行三维空间到二维图像的映射,采用熵解码方法直接解码变换和量化后的移位系数,能够提高移位系数的解码效率。By adopting 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.
进一步地,通过一个位置索引信息指示第二、三维移位系数的解码范围,通过一个移位标识信息指示一个索引位置下第二、三维系数是否均为0,可以简化第二、三维移位系数的解码,进一步提升移位系数的解码效率。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 are both 0 at an index position 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.
基于上述实施例,本申请的再一实施例提出了一种编码方法,图14为本申请实施例提供的一种编码方法的流程示意图,如图14所示,在本申请的实施例中,编码器进行编码处理的方法可以包括以下步骤:Based on the above embodiment, another embodiment of the present application proposes an encoding method. FIG. 14 is a flow chart of an encoding method provided by an embodiment of the present application. As shown in FIG. 14, in an embodiment of the present application, the method for encoding processing by the encoder may include the following steps:
步骤201:确定当前图像块中多个网格顶点对应的多个移位系数;Step 201: determining a plurality of shift coefficients corresponding to a plurality of mesh vertices in a current image block;
其中,当前图像块可以为当前三维网格图像,或者对当前三维网格图像进行图像分割后的图像块。对当前图像块预处理生成基础网格和移位系数,预处理流程包括:首先对原始网格(Original Mesh)进行下采样,生成顶点数量大幅减少的简化网格(Decimated Mesh),或称基础网格/基本网格(Base Mesh)。然后对简化网格进行细分,在简化网格的边上插入新生成的顶点,得到细分网格(Subdivided Mesh)。最后对于细分网格中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位系数(Displacement)。在经过预处理后,将简化网格和移位系数输入编码器,生成码流。The current image block may be a current three-dimensional mesh image, or an image block after image segmentation of the current three-dimensional mesh image. The current image block is preprocessed to generate a base mesh and a displacement coefficient. The preprocessing process includes: first, the original mesh is downsampled to generate a simplified mesh (Decimated Mesh) with a greatly reduced number of vertices, or 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 displacement coefficient are input into the encoder to generate a bitstream.
示例性的,在一些实施例中,所述确定当前图像块中多个网格顶点对应的多个移位系数,包括:确定当前当前图像块中的多个网格顶点对应的多个原始移位系数;将所述多个原始移位系数进行变换和量化得到的所述多个移位系数。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.
步骤202:根据所述多个移位系数中的非零移位系数,确定所述多个移位系数中的非零移位系数的位置索引信息;Step 202: Determine position index information of the non-zero shift coefficients in the multiple shift coefficients according to the non-zero shift coefficients in the multiple shift coefficients;
其中,位置索引信息用于指示多个移位系数中非零移位系数。示例性的,所述位置索引信息用于指示所述移位系数的编码范围。在一些实施例中,根据所述位置索引信息确定所述多个移位系数中最后一个非零系数的索引位置,编码第一个移位系数到最后一个非零系数之间的移位系数。The position index information is used to indicate a non-zero shift coefficient among the multiple shift coefficients. Exemplarily, the position index information is used to indicate a coding range of the shift coefficient. In some embodiments, the index position of the last non-zero coefficient among the multiple shift coefficients is determined according to the position index information, and the shift coefficients between the first shift coefficient and the last non-zero coefficient are encoded.
示例性的,在一些实施例中,所述移位系数包括三个坐标维度下的移位系数;所述位置索引信息包括第一索引信息和第二索引信息,其中,所述第一索引信息用于指示第一坐标维度下移位系数的编码范围,所述第二索引信息指示第二坐标维度和所述第三坐标维度下移位系数的编码范围。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.
示例性的,在一些实施例中,所述第一索引信息用于指示所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置;所述第二索引信息用于指示所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置。可以理解为所述第二索引信息指示第二坐标维度下和第三坐标维度下移位系数的编码范围。通过第二位置索引信息指示第二和三维移位系数的编码范围,可以简化第二、三维移位系数的编码,从而提升编码效率,带来性能增益。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. By indicating the encoding range of the second and three-dimensional shift coefficients through the second position index information, the encoding of the second and three-dimensional shift coefficients can be simplified, thereby improving the encoding efficiency and bringing performance gain.
相应的,所述根据所述多个移位系数中的非零移位系数,确定所述多个移位系数中的非零移位系数 的位置索引信息,包括:根据所述多个移位系数中的非零移位系数,确定所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置,在第二坐标维度下的最后一个非零系数的索引位置,以及在第三坐标维度下的最后一个非零系数的索引位置;根据所述多个移位系数在第一坐标维度的最后一个非零系数的索引位置,确定所述第一索引信息;根据所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置,确定所述第二索引信息。Correspondingly, the non-zero shift coefficients among the multiple shift coefficients are determined according to the non-zero shift coefficients among the multiple shift coefficients. The position index information includes: 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 according to the non-zero shift coefficients in the multiple shift coefficients; determining the first index information according to the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension; determining the second index information according to 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.
在一些实施例中,该方法还包括:根据所述多个移位系数对应网格顶点的编码顺序确定所述多个移位系数的索引位置。示例性的,多个移位系数的索引位置为Indi,i=0,1,2,3,…。In some embodiments, the method further comprises: determining the 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, ...
实际应用中,第一索引信息可以直接指示第一坐标维度下的最后一个非零系数的索引位置,也可以指示最后一个非零系数的索引位置的偏移位置;第二索引信息可以直接指示第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置,也可以指示靠后索引位置的偏移位置。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 later than the index position of the last non-zero coefficient in the third coordinate dimension, or it can indicate the offset position of the later index position.
图11为多个移位系数的索引位置示意图一,如图11所示,移位系数包括XYZ三个坐标维度下的移位系数,X为第一坐标维度时最后一个非零系数的索引位置为Indi,第一索引信息用于指示Indi,Y为第二坐标维度时最后一个非零系数的索引位置为Indi+1,Z为第三坐标维度时最后一个非零系数的索引位置为Indi,第二索引信息用于指示靠后的索引位置Indi+1。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.
在一些实施例中,根据所述多个移位系数在第一坐标维度的最后一个非零系数的索引位置的后一个索引位置,确定所述第一索引信息;根据所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置的后一个索引位置,确定所述第二索引信息。In some embodiments, the first index information is determined based on an 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 an index position after the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and an index position after the latter index position of the last non-zero coefficient in the third coordinate dimension.
也就是说,所述第一索引信息用于指示所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置的后一个索引位置;所述第二索引信息用于指示所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置的后一个索引位置。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.
图12为多个移位系数的索引位置示意图二,如图12所示,移位系数包括XYZ三个坐标维度下的移位系数,X为第一坐标维度时最后一个非零系数的索引位置为Indi,第一索引信息用于指示Indi+1,Y为第二坐标维度时最后一个非零系数的索引位置为Indi+1,Z为第三坐标维度时最后一个非零系数的索引位置为Indi,第二索引信息用于指示靠后的索引位置Indi+1的后一个索引位置Indi+2。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.
示例性的,多个移位系数的索引位置为Indi,i=0,1,2,3,…,n。多个移位系数的索引位置用等差数列表示时,移位系数包括XYZ三个坐标维度下的移位系数,每一维的最后一个非零系数的索引位置,分别是nonzeroCount0、nonzeroCount1、nonzeroCount2,确定nonzeroCount0(即第一索引信息)和nonzeroCount(即第二索引信息),nonzeroCount为nonzeroCount1和nonzeroCount2中的较大值。nonzeroCount0和nonzeroCount可以是最后一个非零系数的索引位置,也可以是最后一个非零系数的索引位置加上偏移量之后的索引位置。Exemplarily, the index positions of multiple shift coefficients are Indi, i = 0, 1, 2, 3, ..., n. When the index positions of multiple shift coefficients are represented by an arithmetic progression, the shift coefficients include shift coefficients in three coordinate dimensions 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 of the last non-zero coefficient plus the offset.
步骤203:根据所述非零移位系数的位置索引信息,确定移位系数标识信息;Step 203: Determine shift coefficient identification information according to the position index information of the non-zero shift coefficient;
其中,所述移位系数标识信息用于指示是否编码所述位置索引信息。The shift coefficient identification information is used to indicate whether to encode the position index information.
示例性的,在一些实施例中,所述移位系数标识信息包括第一标识信息和第二标识信息;其中,所述第一标识信息用于指示是否编码所述第一索引信息;所述第二标识信息用于指示是否编码所述第二索引信息。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.
示例性的,所述第一标识信息用于指示所述第一索引信息是否指示所述多个移位系数中第一个移位系数的索引位置;所述第二标识信息用于指示所述第二索引信息是否指示所述多个移位系数中第一个移位系数的索引位置。其中,第一个移位系数为多个移位系数中索引位置位于首位的移位系数。Exemplarily, the first identification information is used to indicate whether the first index information indicates the index position of the first shift coefficient among the multiple shift coefficients; 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.
当第一索引信息指示所述多个移位系数中第一个移位系数的索引位置,确定第一标识信息的取值为第一数值,否则,第一标识信息的取值为第二数值;当第二索引信息指示所述多个移位系数中第一个移位系数的索引位置,确定第二标识信息的取值为第一数值,否则,第二标识信息的取值为第二数值。示例性的,第一数值可以为1,第二数值可以为0。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 the first value, otherwise, the value of the first identification information is the 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 the second value. Exemplarily, the first value may be 1, and the second value may be 0.
步骤204:对所述移位系数标识信息和所述位置索引信息进行编码,将所得到的编码比特写入码流;Step 204: Encode the shift coefficient identification information and the position index information, and write the obtained coded bits into a bit stream;
示例性的,在一些实施例中,所述第一索引信息用于指示所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置的后一个索引位置;所述第二索引信息用于指示所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置的后一个索引位置。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.
所述对所述移位系数标识信息和所述位置索引信息进行编码,包括:编码第一标识信息;根据所述 第一标识信息确定所述第一索引信息不指示第一个移位系数的索引位置时,编码所述第一索引信息;根据所述第二标识信息确定所述第二索引信息不指示第一个移位系数的索引位置时,编码所述第二索引信息。The encoding of the shift coefficient identification information and the position index information comprises: encoding the first identification information; When the first identification information determines that the first index information does not indicate the index position of the first shift coefficient, the first index information is encoded; when the second identification information determines that the second index information does not indicate the index position of the first shift coefficient, the second index information is encoded.
根据第一标识信息确定所述第一索引信息指示所述多个移位系数中第一个移位系数的索引位置,已经能够确定所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置,因此无需编码第一索引信息。同样,根据第二标识信息确定所述第二索引信息指示所述多个移位系数中第一个移位系数的索引位置,已经能够确定所述多个移位系数在第二坐标维度和第三坐标维度下的最后一个非零系数的索引位置的靠后索引位置,也无需编码第二索引信息。By determining that the first index information indicates the index position of the first shift coefficient among the multiple shift coefficients according to the first identification information, the index position of the last non-zero coefficient of the multiple shift coefficients in the first coordinate dimension can be determined, so there is no need to encode the first index information. Similarly, by determining that the second index information indicates the index position of the first shift coefficient among the multiple shift coefficients according to the second identification information, the index position behind the index position of the last non-zero coefficient of the multiple shift coefficients in the second coordinate dimension and the third coordinate dimension can be determined, and there is no need to encode the second index information.
步骤205:根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,将所得到的编码比特写入码流。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 bit stream.
根据非零移位系数的位置索引信息确定移位系数的编码范围,根据移位系数的编码范围编码移位系数中的非零移位系数。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.
在一些实施例中,所述第一索引信息用于指示所述多个移位系数在第一坐标维度下的最后一个非零系数的索引位置的后一个索引位置;所述第二索引信息用于指示所述多个移位系数在第二坐标维度下的最后一个非零系数的索引位置和在第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置的后一个索引位置。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.
相应的,该方法还包括:根据第一标识信息确定所述第一索引信息指示第一个移位系数的索引位置时,确定所述第一坐标维度下所有移位系数均为0;根据第二标识信息确定所述第二索引信息指示第一个移位系数的索引位置时,确定所述第二坐标维度和所述第三坐标维度下所有移位系数均为0。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.
在一些实施例中,所述移位系数包括三个坐标维度下的移位系数;所述移位系数标识信息包括第三标识信息;其中,所述第三标识信息用于指示同一索引位置下第二坐标维度的移位系数和第三坐标维度的移位系数是否均为0。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.
相应的,所述根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,包括:根据所述位置索引信息和第三标识信息对所述多个移位系数中的非零移位系数进行编码。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.
在一些实施例中,所述根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,包括:根据所述第一索引信息确定在所述第一坐标维度下的最后一个非零系数的索引位置,作为第一索引位置;根据所述第二索引信息在所述第二坐标维度下的最后一个非零系数的索引位置和在所述第三坐标维度下的最后一个非零系数的索引位置中靠后的索引位置,作为第二索引位置;确定所述第一索引位置位于所述第二索引位置之后或者位置相同;针对第一个移位系数的索引位置到所述第二索引位置的移位系数,编码每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数均为0,编码所述第一坐标维度下的移位系数;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,编码所述第一坐标维度、所述第二坐标维度和所述第三坐标维度下的移位系数;针对所述第二索引位置的后一个索引位置到所述第一索引位置的移位系数,编码所述第一坐标维度下的移位系数。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 the second index position or the same 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 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 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 coefficient in the first coordinate dimension for the shift coefficient from the index position after the second index position to the first index position.
在一些实施例中,所述根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,包括:确定所述第一索引位置位于所述第二索引位置之前;针对第一个移位系数的索引位置到所述第一索引位置的移位系数,编码每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数均为0,编码所述第一坐标维度下的移位系数;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,编码所述第一坐标维度、所述第二坐标维度和所述第三坐标维度下的移位系数;针对所述第一索引位置的后一个索引位置到所述第二索引位置的移位系数,编码所述第二坐标维度和所述第三坐标维度下的移位系数。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.
示例性的,一种编码过程如下:Exemplarily, an encoding process is as follows:
对于多个原始移位系数进行小波变换和量化,得到变换量化后的多个移位系数,每个移位系数包括三维坐标下的的移位系数,例如,包括XYZ三个方向的移位系数,多个移位系数按照对应顶点的编码顺序排列,例如,第i个移位系数的索引位置为Indi,i=0,1,2,3,…,n。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, and the multiple shift coefficients are arranged in the encoding order of corresponding vertices, for example, the index position of the i-th shift coefficient is Indi, i=0,1,2,3,…,n.
在编码端,对于量化后的变换系数的编码方法如下:At the encoding end, the encoding method for the quantized transform coefficients is as follows:
a)首先找到每一维的最后一个非零系数的索引位置,分别是nonzeroCount0、nonzeroCount1、nonzeroCount2,确定nonzeroCount0,以及nonzeroCount1和nonzeroCount2中的较大值,记为nonzeroCount;a) First find the index position of the last non-zero coefficient of each dimension, which are nonzeroCount0, nonzeroCount1, and nonzeroCount2. Determine the larger value of nonzeroCount0, nonzeroCount1, and nonzeroCount2, and record it as nonzeroCount.
b)编码指示nonzeroCount0是否等于0的标志位1(对应第一标识信息),若nonzeroCount0不等于0,则编码nonzeroCount0(对应第一索引信息)值,编码指示nonzeroCount是否等于0的标志位2(对应第二标识信息),若nonzeroCount不等于0,则编码nonzeroCount(对应第二索引信息)值; b) encoding a 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 a 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);
c)若满足nonzeroCount0≥nonzeroCount,则进入步骤d),否则进入步骤;nonzeroCount0≥nonzeroCount表示X坐标维度下最后一个非零系数的索引位置位于Y和Z坐标维度下最后一个非零系数的索引位置之后或位置相同,即X坐标维度需要编码的移动系数数量大于或者等于Y和Z坐标维度中较大的移动系数数量,否则,小于。c) If nonzeroCount0≥nonzeroCount is satisfied, proceed to step d), otherwise proceed to step; nonzeroCount0≥nonzeroCount indicates that the index position of the last nonzero coefficient in the X coordinate dimension is located after or at the same position as the index position of the last nonzero coefficient in the Y and Z coordinate dimensions, that is, the number of mobile coefficients to be encoded in the X coordinate dimension is greater than or equal to the larger number of mobile coefficients in the Y and Z coordinate dimensions, otherwise, it is less than.
d)对于索引在0~(nonzeroCount-1)的系数,首先编码当前索引位置指示第二维和第三维系数是否均为0的标志位3(对应第三标识信息),若均为0,则编码第一维系数的值,否则编码第一、二、三维系数的值;对于索引在nonzeroCount~(nonzeroCount0-1)的系数,编码第一维系数的值;d) For coefficients with indexes between 0 and (nonzeroCount-1), first encode the flag bit 3 (corresponding to the third identification information) indicating whether the second-dimensional and third-dimensional coefficients are both 0 at the current index position; if both are 0, encode the value of the first-dimensional coefficient; otherwise, encode the values of the first, second, and third-dimensional coefficients; for coefficients with indexes between nonzeroCount and (nonzeroCount0-1), encode the value of the first-dimensional coefficient;
e)对于索引在0~(nonzeroCount0-1)的系数,首先编码当前索引位置指示第二维和第三维系数是否均为0的标志位3,若均为0,则编码第一维系数的值,否则编码第一、二、三维系数的值;对于索引在nonzeroCount0~(nonzeroCount-1)的系数,编码第二、三维系数的值。e) For coefficients with indexes between 0 and (nonzeroCount0-1), first encode flag bit 3 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 nonzeroCount0 and (nonzeroCount-1), encode the values of the second and third dimension coefficients.
在一些实施例中,所述根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,包括:确定所述第一索引位置位于所述第二索引位置之前;针对第一个移位系数的索引位置到所述第一索引位置的移位系数,编码每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数均为0,编码所述第一坐标维度下的移位系数;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,编码所述第一坐标维度、所述第二坐标维度和所述第三坐标维度下的移位系数;针对所述第一索引位置的后一个索引位置到所述第二索引位置的移位系数,编码每个索引位置的第三标识信息;根据所述第三标识信息确定第二坐标维度和第三坐标维度下的移位系数不均为0,编码所述第一坐标维度、所述第二坐标维度和所述第三坐标维度下的移位系数。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.
示例性的,在编码端,对于量化后的变换系数的编码方法如下:Exemplarily, at the encoding end, the encoding method for the quantized transform coefficients is as follows:
在编码端,对于量化后的变换系数:At the encoding end, for the quantized transform coefficients:
a)首先找到每一维的最后一个非零系数的索引位置,分别是nonzeroCount0、nonzeroCount1、nonzeroCount2,确定nonzeroCount0,以及nonzeroCount1和nonzeroCount2中的较大值,记为nonzeroCount;a) First find the index position of the last non-zero coefficient of each dimension, which are nonzeroCount0, nonzeroCount1, and nonzeroCount2. Determine the larger value of nonzeroCount0, nonzeroCount1, and nonzeroCount2, and record it as nonzeroCount.
b)编码指示nonzeroCount0是否等于0的标志位1,若nonzeroCount0不等于0,则编码nonzeroCount0值,编码指示nonzeroCount是否等于0的标志位2,若nonzeroCount不等于0,则编码nonzeroCount值;b) Encode the flag bit 1 indicating whether nonzeroCount0 is equal to 0, if nonzeroCount0 is not equal to 0, then encode the nonzeroCount0 value, encode the flag bit 2 indicating whether nonzeroCount is equal to 0, if nonzeroCount is not equal to 0, then encode the nonzeroCount value;
c)若满足nonzeroCount0≥nonzeroCount,则进入步骤d),否则进入步骤e);c) If nonzeroCount0≥nonzeroCount is satisfied, proceed to step d), otherwise proceed to step e);
d)对于索引在0~(nonzeroCount-1)的系数,首先编码当前索引位置)指示第二维和第三维系数是否均为0的标志位3,若均为0,则编码第一维系数的值,否则编码第一、二、三维系数的值;对于索引在nonzeroCount~(nonzeroCount0-1)的系数,编码第一维系数的值;d) For coefficients with indices between 0 and (nonzeroCount-1), first encode the flag bit 3 indicating whether the coefficients of the second and third dimensions are both 0 at the current index position; if both are 0, encode the value of the coefficient of the first dimension; otherwise, encode the values of the coefficients of the first, second, and third dimensions; for coefficients with indices between nonzeroCount and (nonzeroCount0-1), encode the value of the coefficient of the first dimension;
e)对于索引在0~(nonzeroCount0-1)的系数,首先编码当前索引位置指示第二维和第三维系数是否均为0的标志位3,若均为0,则编码第一维系数的值,否则编码第一、二、三维系数的值;对于索引在nonzeroCount0~(nonzeroCount-1)的系数,若第二维和第三维系数均为0,则编码当前索引位置的标志位3,否则编码标志位3,然后编码第二、三维系数的值。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.
进一步的,当索引位置的的取值范围为0,1,2,3,…,n,即移位系数的索引从0开始。因此,若标志位1指示nonzeroCount0不等于0,则表示nonzeroCount0的取值为大于或者等于1的数,若标志位2指示nonzeroCount不等于0,则表示nonzeroCount的取值为大于或者等于1的数。在一些实施例中,为了进一步节约编码比特数,降低移位系数的码率,可以编码nonzeroCount0-1和nonzeroCount-1。Further, 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 the 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, and if the 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.
示例性的,在一些实施例中,所述第一索引信息的值为所述第一索引信息的实际值减去第一预设值得到的中间值;所述第二索引信息的值为所述第二索引信息的实际值减去第二预设值得到的中间值。Exemplarily, 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.
其中,第一预设值和第二预设值可以为固定值,二者相等或者不等。示例性的,多个移位系数的索引位置为Indi,i=0,1,2,3,…,n。多个移位系数的索引位置用等差数列表示时,第一预设值和第二预设值为两项差值。示例性的,Indi=0,1,2,3,…,n时,第一预设值和第二预设值为1。Wherein, the first preset value and the second preset value can be fixed values, and the two are equal or different. Exemplarily, the index position of the plurality of shift coefficients is Indi, i=0,1,2,3,…,n. When the index position of the plurality of shift coefficients is represented by an arithmetic progression, the first preset value and the second preset value are the difference between the two items. Exemplarily, when Indi=0,1,2,3,…,n, the first preset value and the second preset value are 1.
当索引位置的取值范围为0,1,2,3,…,n,即移位系数的索引从0开始。因此,若标志位1指示nonzeroCount0不等于0,则表示nonzeroCount0的取值为大于或者等于1的数,若标志位2指示nonzeroCount不等于0,则表示nonzeroCount的取值为大于或者等于1的数。在一些实施例中,为了进一步节约编码比特数,降低移位系数的码率,可以编码nonzeroCount0-1和nonzeroCount-1。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 the 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, and if the 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.
相应的,上述编码端,步骤b)可以替换为:编码指示nonzeroCount0是否等于0的标志位1,若nonzeroCount0不等于0,则编码nonzeroCount0-1值,编码指示nonzeroCount是否等于0的标志位2,若nonzeroCount不等于0,则编码nonzeroCount-1值;Correspondingly, at the encoding end, step b) can be replaced by: encoding a flag bit 1 indicating whether nonzeroCount0 is equal to 0, if nonzeroCount0 is not equal to 0, encoding a nonzeroCount0-1 value, encoding a flag bit 2 indicating whether nonzeroCount is equal to 0, if nonzeroCount is not equal to 0, encoding a nonzeroCount-1 value;
基于上述实施例,本申请的再一实施例提出了一种编码方法,该编码方法应用于编码器,其中,所述编码器包括熵编码器、网格编码器以及预处理器。 Based on the above embodiments, another embodiment of the present application proposes a coding method, which is applied to an encoder, wherein the encoder includes an entropy encoder, a grid encoder, and a preprocessor.
所述预处理器,用于根据当前帧的原始网格生成简化网格和移位系数;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 of the shift coefficient described in any one of the embodiments of the present application.
需要说明的是,在本申请的实施例中,预处理器可以用于根据当前帧的原始网格生成简化网格和移位系数。It should be noted that, in the embodiments of the present application, the preprocessor may be used to generate a simplified grid and shift coefficients according to the original grid of the current frame.
可以理解的是,在本申请的实施例中,在预处理过程中,可以先对当前帧的原始网格(Original Mesh)进行简化,得到简化网格(Decimated Mesh),或称基本网格(Base Mesh)。然后可以对简化网格进行细分,得到细分网格(Subdivided Mesh)。最后对于细分网格中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位系数(Displacement)。It is understandable that in the embodiment 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 (Base Mesh). Then the simplified mesh can be subdivided 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.
进一步地,在本申请的实施例中,在预处理器基于原始网格生成对应的简化网格之后,网格编码器可以用于编码所述简化网格,然后生成简化网格的码流。Further, 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.
需要说明的是,在本申请的实施例中,对于帧内编码,网格编码器可以对当前帧的简化网格进行编码,获得简化网格的码流。It should be noted that, in the embodiments 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.
图15为本申请实施例提供的一种帧内解编码的示意图,如图15所示,在帧内编码器中,可以采用常见的静态网格编码器(Static Mesh Encoder)对简化网格进行编码,生成对应的码流(Compressed base mesh bitstream)。接下来,用重构的简化网格更新移位系数(Update Displacements)。对更新后的移位系数进行小波变换(Wavelet Transform)和量化后得到移位系数。对变化量化后的移位系数进行熵编码,生成移位系数的码流(Compressed displacements bitstream)。对于属性图(Attribute Map)编码,首先根据重构的几何信息与原始几何信息间的差异对特征图进行变换(Texture Transfer),然后将其进行填补(Padding)、打包(Video Packing)后用视频编码器编码形成属性码流(Compressed attribute bitstream)。FIG15 is a schematic diagram of an intra-frame decoding provided by an embodiment of the present application. As shown in FIG15 , in an 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 (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).
帧间编码器与帧内编码器流程大致相同,但帧间编码器并不直接对简化网格进行编码,而是编码当前帧的简化网格与参考帧的简化网格间的运动矢量(Motion Encoder),并生成相应的运动矢量的码流(Compressed motion bitstream)。The inter-frame encoder has the same process as 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 the corresponding motion vector bitstream (Compressed motion bitstream).
需要说明的是,在本申请的实施例中,预处理器可以用于根据当前帧的原始网格生成简化网格和移位系数。It should be noted that, in the embodiments of the present application, the preprocessor may be used to generate a simplified grid and shift coefficients according to the original grid of the current frame.
可以理解的是,在本申请的实施例中,在预处理过程中,可以先对当前帧的原始网格(Original Mesh)进行简化,得到简化网格(Decimated Mesh),或称基本网格(Base Mesh)。然后可以对简化网格进行细分,得到细分网格(Subdivided Mesh)。最后对于细分网格中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位系数(Displacement)。It is understandable that in the embodiment 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 (Base Mesh). Then the simplified mesh can be subdivided 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.
可以理解的是,在本申请的实施例中,网格编码器在生成简化网格的码流或者运动矢量的码流之后,可以将简化网格的码流或者运动矢量的码流传输至解码端。It can be understood 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.
采用上述编码方法,编码移位系数时,无需将移位系数进行三维空间到二维图像的映射,采用熵编码方法直接编码变换和量化后的移位系数,能够提高移位系数的编码效率。When using the above encoding method to encode the shift coefficient, there is no need to map the shift coefficient from a three-dimensional space to a two-dimensional image. The entropy encoding method is used to directly encode the transformed and quantized shift coefficient, which can improve the encoding efficiency of the shift coefficient.
进一步地,通过一个位置索引信息指示第二、三维移位系数的编码范围,通过一个移位标识信息指示一个索引位置下第二、三维系数是否均为0,可以简化第二、三维移位系数的编码,进一步提升移位系数的编码效率。Furthermore, by indicating the encoding range of the second and third-dimensional shift coefficients through a position index information and indicating whether the second and third-dimensional coefficients are both 0 at an index position through a shift identification information, the encoding of the second and third-dimensional shift coefficients can be simplified and the encoding efficiency of the shift coefficients can be further improved.
进一步地,对本申请实施例提供的移位系数编码方法的编码性能进行测试。Furthermore, the coding performance of the shift coefficient coding method provided in the embodiment of the present application is tested.
1)MPEG DMC的通用测试条件测试条件共2种:1) Common test conditions for MPEG DMC There are 2 types of test conditions:
条件1:全帧内(all intra)几何有损、属性有损;Condition 1: all intra geometry lossy and attribute lossy;
条件2:随机介入(random access)几何有损、属性有损;Condition 2: Random access is lossy in geometry and lossy in attributes;
2)通用测试序列包括Cat1-A,Cat1-B和Cat1-C共三类,均包含几何和颜色属性信息。2) The general test sequences include three categories: Cat1-A, Cat1-B and Cat1-C, all of which contain geometric and color attribute information.
表1为测试条件1下的实验结果
Table 1 shows the experimental results under test condition 1
表2为测试条件2下的实验结果
Table 2 shows the experimental results under test condition 2
从表1和表2这两种测试条件下的实验结果来看,本申请实施例提供的移位系数编码方法对于不同类型测试序列的几何信息和属性信息的编码性能均有提升。From the experimental results under the two test conditions of Table 1 and Table 2, it can be seen that 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.
基于上述实施例,在本申请的再一实施例中,基于前述实施例相同的发明构思,图16为编码器的组成结构示意图一,如图16所示,编码器110可以包括:第一确定单元111,编码单元112,其中,Based on the above embodiment, in another embodiment of the present application, based on the same inventive concept as the above embodiment, FIG. 16 is a schematic diagram of a composition structure of an encoder. As shown in FIG. 16, the encoder 110 may include: a first determining unit 111, an encoding unit 112, wherein:
第一确定单元111,配置为确定当前图像块中多个网格顶点对应的多个移位系数;根据所述多个移位系数中的非零移位系数,确定所述多个移位系数中的非零移位系数的位置索引信息;根据所述非零移位系数的位置索引信息,确定移位系数标识信息;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 according to the non-zero shift coefficients in the plurality of shift coefficients; and determine shift coefficient identification information according to the position index information of the non-zero shift coefficients;
编码单元112,对所述对所述移位系数标识信息和所述位置索引信息进行编码,将所得到的编码比特写入码流;根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,将所得到的编码比特写入码流。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.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器110,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。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, the method described in any one of the aforementioned embodiments is implemented.
基于上述编码器110的组成以及计算机可读存储介质,图17为编码器的组成结构示意图二,如图17所示,编码器110可以包括:第一存储器113和第一处理器114,第一通信接口115和第一总线系统116。第一存储器113、第一处理器114、第一通信接口115通过第一总线系统116耦合在一起。可理解,第一总线系统116用于实现这些组件之间的连接通信。第一总线系统116除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图17中将各种总线都标为第一总线系统116。其中,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,
第一通信接口115,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The first communication interface 115 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
所述第一存储器113,用于存储能够在所述第一处理器上运行的计算机程序;The first memory 113 is used to store a computer program that can be run on the first processor;
所述第一处理器114,用于在运行所述计算机程序时,The first processor 114 is configured to, when running the computer program,
可以理解,本申请实施例中的第一存储器113可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器113旨在包括但不限于这些和任意其它适合类型的存储器。It can be 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 RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (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.
而第一处理器114可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器114中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器114可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读 存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器113,第一处理器114读取第一存储器113中的信息,结合其硬件完成上述方法的步骤。The first processor 114 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the first processor 114 or the instructions in the form of software. The above-mentioned first processor 114 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or a programmable read-only memory. 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.
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this 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.
可选地,作为另一个实施例,第一处理器114还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。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.
图18为解码器的组成结构示意图一,如图18所示,解码器120可以包括:解码单元121和第二确定单元122;其中,FIG18 is a schematic diagram of a structure of a decoder. As shown in FIG18 , the decoder 120 may include: a decoding unit 121 and a second determining unit 122; wherein,
解码单元121,配置为解码码流;A decoding unit 121, configured to decode a code stream;
第二确定单元122,配置确定当前图像块中多个网格顶点对应的多个移位系数的移位系数标识信息;根据所述移位系数标识信息,解码码流确定多个移位系数中的非零移位系数的位置索引信息;根据所述移位系数标识信息和所述位置索引信息,解码码流确定多个移位系数。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.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
因此,本申请实施例提供了一种计算机可读存储介质,应用于解码器120,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。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, the method described in any one of the above embodiments is implemented.
基于上述解码器120的组成以及计算机可读存储介质,图19为解码器的组成结构示意图二,如图19所示,解码器120可以包括:第二存储器123和第二处理器124,第二通信接口125和第二总线系统126。第二存储器123和第二处理器124,第二通信接口125通过第二总线系统126耦合在一起。可理解,第二总线系统126用于实现这些组件之间的连接通信。第二总线系统126除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图19中将各种总线都标为第二总线系统126。其中,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 achieve 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,
第二通信接口125,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;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;
所述第二存储器123,用于存储能够在所述第二处理器上运行的计算机程序;The second memory 123 is used to store a computer program that can be run on the second processor;
所述第二处理器124,用于在运行所述计算机程序时,解码码流,确定当前图像块中多个网格顶点对应的多个移位系数的移位系数标识信息;根据所述移位系数标识信息,确定所述多个移位系数中的非零移位系数的位置索引信息;根据所述移位系数标识信息和所述位置索引信息,确定所述多个移位系数。The second processor 124 is used 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 according to the shift coefficient identification information; determine the multiple shift coefficients according to the shift coefficient identification information and the position index information.
可以理解,本申请实施例中的第二存储器123可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第二存储器123旨在包括但不限于这些和任意其它适合类型的存储器。 It can be 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 but 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 memory bus random access memory (DRRAM). The second memory 123 of the system and method described in the present application is intended to include but is not limited to these and any other suitable types of memory.
而第二处理器124可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第二处理器124中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第二处理器124可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第二存储器123,第二处理器124读取第二存储器123中的信息,结合其硬件完成上述方法的步骤。The second processor 124 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the second processor 124. The above-mentioned second processor 124 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, 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.
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this 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.
需要说明的是,在本申请的实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,在编码端,确定当前图像块中多个网格顶点对应的多个移位系数;根据所述多个移位系数中的非零移位系数,确定所述多个移位系数中的非零移位系数的位置索引信息;根据所述非零移位系数的位置索引信息,确定移位系数标识信息;对所述移位系数标识信息和所述位置索引信息进行编码,根据所述位置索引信息对所述多个移位系数中的非零移位系数进行编码,将所得到的编码比特写入码流。编码时,无需将移位系数进行三维空间到二维图像的映射,直接编码变换和量化后的移位系数,解码时,直接解码移位系数码流得到移位系数,再进行反量化和反变换得到重建移位系数,从而提高移位系数的编解码效率。 The embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium. At the coding end, multiple shift coefficients corresponding to multiple mesh vertices in the current image block are determined; according to the non-zero shift coefficients in the multiple shift coefficients, the position index information of the non-zero shift coefficients in the multiple shift coefficients is determined; according to the position index information of the non-zero shift coefficients, the 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 the code stream. When encoding, there is no need to map the shift coefficients from three-dimensional space to two-dimensional images, and the transformed and quantized shift coefficients are directly encoded. When 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.
Claims (40)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2023/071931 WO2024148573A1 (en) | 2023-01-12 | 2023-01-12 | Encoding and decoding method, encoder, decoder, and storage medium |
| CN202380082256.9A CN120283407A (en) | 2023-01-12 | 2023-01-12 | Encoding/decoding method, encoder, decoder, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2023/071931 WO2024148573A1 (en) | 2023-01-12 | 2023-01-12 | Encoding and decoding method, encoder, decoder, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024148573A1 true WO2024148573A1 (en) | 2024-07-18 |
Family
ID=91897615
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/071931 Ceased WO2024148573A1 (en) | 2023-01-12 | 2023-01-12 | Encoding and decoding method, encoder, decoder, and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN120283407A (en) |
| WO (1) | WO2024148573A1 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102792688A (en) * | 2010-02-19 | 2012-11-21 | 斯凯普公司 | Data compression for video |
| US20200186814A1 (en) * | 2018-12-06 | 2020-06-11 | Qualcomm Incorporated | Coefficient processing for video encoding and decoding |
| US20210409769A1 (en) * | 2019-03-18 | 2021-12-30 | Panasonic Intellectual Property Corporation Of America | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device |
| WO2021260266A1 (en) * | 2020-06-23 | 2021-12-30 | Nokia Technologies Oy | A method, an apparatus and a computer program product for volumetric video coding |
-
2023
- 2023-01-12 WO PCT/CN2023/071931 patent/WO2024148573A1/en not_active Ceased
- 2023-01-12 CN CN202380082256.9A patent/CN120283407A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102792688A (en) * | 2010-02-19 | 2012-11-21 | 斯凯普公司 | Data compression for video |
| US20200186814A1 (en) * | 2018-12-06 | 2020-06-11 | Qualcomm Incorporated | Coefficient processing for video encoding and decoding |
| US20210409769A1 (en) * | 2019-03-18 | 2021-12-30 | Panasonic Intellectual Property Corporation Of America | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device |
| WO2021260266A1 (en) * | 2020-06-23 | 2021-12-30 | Nokia Technologies Oy | A method, an apparatus and a computer program product for volumetric video coding |
Also Published As
| Publication number | Publication date |
|---|---|
| CN120283407A (en) | 2025-07-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN118614061A (en) | Coding and decoding method, encoder, decoder and storage medium | |
| KR20240132486A (en) | Method, device and medium for point cloud coding | |
| US20240267527A1 (en) | Method, apparatus, and medium for point cloud coding | |
| CN119631402A (en) | Method, device and medium for point cloud encoding and decoding | |
| WO2024148573A1 (en) | Encoding and decoding method, encoder, decoder, and storage medium | |
| CN120092264A (en) | Method, device and medium for point cloud encoding and decoding | |
| WO2025007270A1 (en) | Encoding method, decoding method, encoder, decoder, code stream, and storage medium | |
| WO2025076795A1 (en) | Coding and decoding methods, bit stream, encoder, decoder, and storage medium | |
| WO2024213067A1 (en) | Decoding method, encoding method, bitstream, decoder, encoder and storage medium | |
| WO2025000342A1 (en) | Encoding and decoding method, encoder, decoder, and storage medium | |
| WO2025000429A1 (en) | Coding method, decoding method, code stream, coder, decoder, and storage medium | |
| WO2025000523A1 (en) | Coding method, decoding method, coder, decoder, code stream, and storage medium | |
| WO2025148072A1 (en) | Coding method, decoding method, code stream, encoder, decoder, and storage medium | |
| WO2025151992A1 (en) | Coding method, decoding method, code stream, coders, decoders and storage medium | |
| WO2025076656A1 (en) | Encoding method, decoding method, encoder, decoder, and storage medium | |
| WO2025067513A1 (en) | Encoding and decoding methods, encoder, decoder and storage medium | |
| WO2024255912A1 (en) | Encoding method, decoding method, bitstream, encoder, decoder, medium and program product | |
| WO2025076790A1 (en) | Coding method and apparatus, decoding method and apparatus, coder, decoder, code stream, and storage medium | |
| JP7736934B2 (en) | Method, apparatus, and medium for point cloud coding | |
| WO2024255475A1 (en) | Coding and decoding methods, bitstream, encoder, decoder and storage medium | |
| WO2025208498A1 (en) | Encoding method, decoding method, encoders, decoders, bitstream and storage media | |
| JP7735574B2 (en) | Method, apparatus, and medium for point cloud coding | |
| WO2025152015A1 (en) | Coding method, decoding method, code stream, coder, decoder, and storage medium | |
| WO2025145325A1 (en) | Encoding method, decoding method, encoders, decoders and storage medium | |
| WO2025076749A1 (en) | Encoding method, decoding method, code stream, encoder, decoder, and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23915343 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202380082256.9 Country of ref document: CN |
|
| WWP | Wipo information: published in national office |
Ref document number: 202380082256.9 Country of ref document: CN |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |