CN121058043A - Encoding methods, decoding methods, bitstreams, encoders, decoders, media and program products - Google Patents
Encoding methods, decoding methods, bitstreams, encoders, decoders, media and program productsInfo
- Publication number
- CN121058043A CN121058043A CN202480027912.XA CN202480027912A CN121058043A CN 121058043 A CN121058043 A CN 121058043A CN 202480027912 A CN202480027912 A CN 202480027912A CN 121058043 A CN121058043 A CN 121058043A
- Authority
- CN
- China
- Prior art keywords
- current
- lod
- grid
- subdivision
- mesh
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/001—Model-based coding, e.g. wire frame
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/004—Predictors, e.g. intraframe, interframe coding
-
- 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/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为63/521,327、申请日为2021年6月15日的美国专利申请提出,并要求该专利申请的优先权,该专利申请的全部内容在此引入本公开作为参考。This application is based on and claims priority to U.S. Patent Application No. 63/521,327, filed June 15, 2021, the entire contents of which are incorporated herein by reference.
技术领域Technical Field
本公开涉及视频编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器、存储介质及程序产品。This disclosure relates to the field of video encoding and decoding technology, and in particular to an encoding and decoding method, a bitstream, an encoder, a decoder, a storage medium, and a program product.
背景技术Background Technology
在运动图像专家组(Moving Picture Experts Group,MPEG)提供的动态网格编码(Dynamic Mesh Coding,DMC)的标准参考软件中,在对网格的几何信息进行编解码时进行以下操作。首先,对原始网格进行预处理,得到基础网格。其中,利用通用编码方法(例如“edgebreaker”)对基础网格进行编码。然后,对基础网格进行细分,得到细分网格。接下来,根据细分网格与原始网格的近似点之间的差异确定位移系数。最后,将位移系数打包到二维图像中,并使用诸如高效视频编码(High Efficiency Video Coding, HEVC)的无损视频编码方法来编码。In the standard reference software for Dynamic Mesh Coding (DMC) provided by the Moving Picture Experts Group (MPEG), the following operations are performed when encoding and decoding the geometric information of the mesh: First, the original mesh is preprocessed to obtain a base mesh. This base mesh is then encoded using a general coding method (e.g., "edgebreaker"). Next, the base mesh is subdivided to obtain a subdivided mesh. Then, displacement coefficients are determined based on the differences between approximate points of the subdivided mesh and the original mesh. Finally, the displacement coefficients are packed into a two-dimensional image and encoded using a lossless video coding method such as High Efficiency Video Coding (HEVC).
然而,在对网格的几何信息进行编解码的过程中,由于细分过程考虑不全面,导致编码位移系数时存在冗余,降低了编解码效率。However, during the encoding and decoding of the geometric information of the mesh, the subdivision process is not fully considered, resulting in redundancy in the encoding of displacement coefficients, which reduces the encoding and decoding efficiency.
发明内容Summary of the Invention
本公开提供一种编码方法、解码方法、码流、编码器、解码器、介质及产品,可以减少位移系数的编码比特,进而提升编解码效率。This disclosure provides an encoding method, a decoding method, a bitstream, an encoder, a decoder, a medium, and a product that can reduce the number of coded bits with shift coefficients, thereby improving encoding and decoding efficiency.
本公开的技术方案可以如下实现。The technical solution disclosed herein can be implemented as follows.
第一方面,本公开实施例提供了一种解码方法,应用于解码器,该方法包括:解码码流,确定第一语法元素的取值;在所述第一语法元素的取值指示当前网格使用非线性细分方式时,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;其中,i为大于预设值的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点;根据所述当前LOD的细分网格和所述当前LOD的第一点的位移系数,确定所述当前网格中的下一LOD的重建网格。In a first aspect, embodiments of this disclosure provide a decoding method applied to a decoder. The method includes: decoding a bitstream and determining the value of a first syntax element; when the value of the first syntax element indicates that the current grid uses a non-linear subdivision method, determining the reconstructed grid of the current LOD in the current grid, and subdividing the reconstructed grid of the current LOD to determine the subdivision grid of the current LOD; when the current LOD is the i-th LOD, determining the displacement coefficient of the first point of the current LOD to be 0; wherein i is an integer greater than a preset value; the first point includes the vertex of the reconstructed base grid corresponding to the current grid; and determining the reconstructed grid of the next LOD in the current grid based on the subdivision grid of the current LOD and the displacement coefficient of the first point of the current LOD.
第二方面,本公开实施例提供了一种编码方法,应用于编码器,该方法包括:在当前网格使用非线性细分方式时,确定第一语法元素的取值,并将所述第一语法元素写入码流,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;其中,i为大于预设值的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点;根据所述当前LOD的细分网格和所述当前LOD的第一点的位移系数,确定所述当前网格中的下一LOD的重建网格。Secondly, embodiments of this disclosure provide an encoding method applied to an encoder. The method includes: when the current grid uses a non-linear subdivision method, determining the value of a first syntax element and writing the first syntax element into the bitstream; determining the reconstructed grid of the current LOD in the current grid and subdividing the reconstructed grid of the current LOD to determine the subdivision grid of the current LOD; when the current LOD is the i-th LOD, determining the displacement coefficient of the first point of the current LOD to be 0; wherein i is an integer greater than a preset value; the first point includes the vertex of the reconstructed base grid corresponding to the current grid; and determining the reconstructed grid of the next LOD in the current grid based on the subdivision grid of the current LOD and the displacement coefficient of the first point of the current LOD.
第三方面,本公开实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:当前网格的基础网格、当前网格的至少一个LOD的位移系数、当前网格的至少一个LOD的量化参数、当前网格的至少一个LOD的量化参数增量、第一语法元素的取值、第二语法元素的取值和第三语法元素的取值。Thirdly, embodiments of this disclosure provide a bitstream generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following: the base grid of the current grid, the displacement coefficient of at least one LOD of the current grid, the quantization parameter of at least one LOD of the current grid, the quantization parameter increment of at least one LOD of the current grid, the value of a first syntax element, the value of a second syntax element, and the value of a third syntax element.
第四方面,本公开实施例提供了一种编码器,包括第一确定单元,被配置为:在当前网格使用非线性细分方式时,确定第一语法元素的取值,并将所述第一语法元素写入码流,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;其中,i为大于预设值的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点;根据所述当前LOD的细分网格和所述当前LOD的位移系数,确定所述当前网格中的下一LOD的重建网格。Fourthly, embodiments of this disclosure provide an encoder, including a first determining unit, configured to: when the current grid uses a non-linear subdivision method, determine the value of a first syntax element and write the first syntax element into the bitstream; determine the reconstructed grid of the current LOD in the current grid; and subdivide the reconstructed grid of the current LOD to determine the subdivision grid of the current LOD; when the current LOD is the i-th LOD, determine the displacement coefficient of the first point of the current LOD to be 0; where i is an integer greater than a preset value; the first point includes the vertex of the reconstructed base grid corresponding to the current grid; and determine the reconstructed grid of the next LOD in the current grid based on the subdivision grid of the current LOD and the displacement coefficient of the current LOD.
第五方面,本公开实施例提供了一种编码器,包括存储器和处理器。存储器用于存储能够在处理器上运行的计算机程序。处理器用于在运行计算机程序时,执行如第二方面所述的方法。Fifthly, embodiments of this disclosure provide an encoder, including a memory and a processor. The memory is used to store a computer program capable of running on the processor. The processor is used to execute the method described in the second aspect when running the computer program.
第六方面,本公开实施例提供了一种解码器,包括确定单元。确定单元配置为:解码码流,确定第一语法元素的取值;在所述第一语法元素的取值指示当前网格使用非线性细分方式时,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;其中,i为大于预设值的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点;根据所述当前LOD的细分网格和所述当前LOD的第一点的位移系数,确定所述当前网格中的下一LOD的重建网格。In a sixth aspect, embodiments of this disclosure provide a decoder, including a determining unit. The determining unit is configured to: decode a bitstream; determine the value of a first syntax element; when the value of the first syntax element indicates that the current grid uses a non-linear subdivision method, determine the reconstructed grid of the current LOD in the current grid, and subdivide the reconstructed grid of the current LOD to determine the subdivision grid of the current LOD; if the current LOD is the i-th LOD, determine the displacement coefficient of the first point of the current LOD to be 0; where i is an integer greater than a preset value; the first point includes the vertex of the reconstructed base grid corresponding to the current grid; and determine the reconstructed grid of the next LOD in the current grid based on the subdivision grid of the current LOD and the displacement coefficient of the first point of the current LOD.
第七方面,本公开实施例提供了一种解码器,包括存储器和处理器。存储器用于存储能够在处理器上运行的计算机程序;处理器用于在运行计算机程序时,执行如第一方面所述的方法。In a seventh aspect, embodiments of this disclosure provide a decoder, including a memory and a processor. The memory is used to store a computer program capable of running on the processor; the processor is used to execute the method described in the first aspect when running the computer program.
第八方面,本公开实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,计算机程序被执行时实现如第一方面所述的方法、或者如第二方面所述的方法。Eighthly, embodiments of this disclosure provide a computer-readable storage medium storing a computer program that, when executed, implements the method described in the first aspect or the method described in the second aspect.
第九方面,本公开实施例提供了一种计算机程序产品,包括计算机程序或指令,该计算机程序或指令被至少一个处理器执行时实现如第一方面所述的方法、或者如第二方面所述的方法。In a ninth aspect, embodiments of this disclosure provide a computer program product, including a computer program or instructions that, when executed by at least one processor, implement the method described in the first aspect or the method described in the second aspect.
本公开实施例提供了一种编码方法、解码方法、码流、编码器、解码器、存储介质及程序产品。在解码端,解码码流,确定第一语法元素的取值;在第一语法元素指示当前网格使用非线性细分方式时,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格;在当前LOD为第i个LOD的情况下,将当前LOD的第一点的位移系数确定为0;其中,i为大于预设值的整数;第一点包括当前网格对应的重建基础网格的顶点;根据当前LOD的细分网格和当前LOD的第一点的位移系数,确定当前网格中的下一LOD的重建网格。在编码端,在当前网格使用非线性细分方式时,确定第一语法元素的取值,并将第一语法元素写入码流,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格;在当前LOD为第i个LOD的情况下,将当前LOD的第一点的位移系数确定为0;其中,i为大于预设值的整数;第一点包括当前网格对应的重建基础网格的顶点;根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。也就是说,在本公开的实施例中,通过增加第一语法元素指示当前网格使用非线性细分方式,在编码阶段,接近基本层中的顶点的位移系数可以从位移列表中去掉,在解码阶段,接近基本层中的顶点的位移系数被推断为等于0,因而在后续将位移系数递归地应用于先前重建的多细节层(Level of Details,LOD)的过程中,能够改善高级别上位移系数存在的冗余问题,减少位移系数的编码比特,进而提升编解码效率。This disclosure provides an encoding method, a decoding method, a bitstream, an encoder, a decoder, a storage medium, and a program product. At the decoding end, the bitstream is decoded, and the value of a first syntax element is determined. When the first syntax element indicates that the current grid uses a non-linear subdivision method, the reconstructed grid of the current LOD in the current grid is determined, and the reconstructed grid of the current LOD is subdivided to determine the subdivided grid of the current LOD. If the current LOD is the i-th LOD, the displacement coefficient of the first point of the current LOD is determined to be 0; where i is an integer greater than a preset value; the first point includes the vertex of the reconstructed base grid corresponding to the current grid. Based on the subdivided grid of the current LOD and the displacement coefficient of the first point of the current LOD, the reconstructed grid of the next LOD in the current grid is determined. At the encoding end, when the current grid uses a non-linear subdivision method, the value of the first syntax element is determined and written into the bitstream. The reconstructed grid of the current LOD in the current grid is determined, and the reconstructed grid of the current LOD is subdivided to determine the subdivided grid of the current LOD. If the current LOD is the i-th LOD, the displacement coefficient of the first point of the current LOD is determined to be 0. Here, i is an integer greater than a preset value. The first point includes the vertex of the reconstructed base grid corresponding to the current grid. Based on the subdivided grid of the current LOD and the displacement coefficient of the current LOD, the reconstructed grid of the next LOD in the current grid is determined. That is, in the embodiments of this disclosure, by adding a first syntax element to indicate that the current grid uses a non-linear subdivision method, during the encoding stage, the displacement coefficients of vertices close to the base layer can be removed from the displacement list. During the decoding stage, the displacement coefficients of vertices close to the base layer are inferred to be equal to 0. Therefore, in the subsequent process of recursively applying the displacement coefficients to the previously reconstructed Level of Details (LOD), the redundancy problem of displacement coefficients at higher levels can be improved, the coding bits of displacement coefficients can be reduced, and thus the encoding and decoding efficiency can be improved.
附图说明Attached Figure Description
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,在附图中:The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. In the drawings:
图1为一种几何编码的流程示意图;Figure 1 is a schematic diagram of a geometric coding process;
图2为一种位移分量的生成过程示意图;Figure 2 is a schematic diagram of the generation process of a displacement component;
图3为一种局部坐标系中位移分量的分解示意图;Figure 3 is a schematic diagram of the decomposition of displacement components in a local coordinate system;
图4为一种使用垂直于表面的法线方向上位移的递归细分示意图;Figure 4 is a schematic diagram of a recursive subdivision method using displacement in the direction perpendicular to the surface normal;
图5为一种网格细分的流程示意图;Figure 5 is a schematic diagram of a grid subdivision process;
图6为一种具有2个LOD和一维位移的网格细分结果示意图;Figure 6 is a schematic diagram of a mesh subdivision result with two LODs and one-dimensional displacement;
图7为一种参数化网格的编码过程示意图;Figure 7 is a schematic diagram of the encoding process of a parametric mesh;
图8为一种网格框架(mesh frame)中的几何信息示意图;Figure 8 is a schematic diagram of geometric information in a mesh frame;
图9为一种由四个顶点和三个面组成的网格的表面示意图;Figure 9 is a schematic diagram of a mesh surface consisting of four vertices and three faces;
图10为一种由四个顶点和三个面组成的网格的数据结构示意图;Figure 10 is a schematic diagram of a data structure for a grid consisting of four vertices and three faces;
图11为一种由具有属性纹理图的参数化网格的数据结构示意图;Figure 11 is a schematic diagram of a data structure consisting of a parameterized mesh with attribute texture maps;
图12为一种由四个顶点和三个三角形面组成的具有属性映射特征的网格示意图;Figure 12 is a schematic diagram of a mesh with attribute mapping features, consisting of four vertices and three triangular faces;
图13A为一种流形网格示意图;Figure 13A is a schematic diagram of a manifold mesh;
图13B为一种非流形网格示意图;Figure 13B is a schematic diagram of a non-manifold mesh;
图14为一种位移分量的映射示意图;Figure 14 is a schematic diagram of a displacement component mapping;
图15A为一种二维图像的位移分量填充示意图;Figure 15A is a schematic diagram of displacement component filling in a two-dimensional image;
图15B为另一种二维图像的位移分量填充示意图;Figure 15B is a schematic diagram of displacement component filling in another two-dimensional image;
图16为本公开实施例提供的一种解码方法的流程示意图一;Figure 16 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure;
图17为本公开实施例提供的一种解码方法的流程示意图二;Figure 17 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure;
图18为本公开实施例提供的一种解码方法的流程示意图三;Figure 18 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure;
图19为本公开实施例提供的一种解码方法的流程示意图四;Figure 19 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure;
图20为本公开实施例提供的一种网格的递归细分结果示意图;Figure 20 is a schematic diagram of a recursive subdivision result of a mesh provided in an embodiment of this disclosure;
图21为本公开实施例提供的一种递归细分的详细流程示意图;Figure 21 is a detailed flowchart of a recursive subdivision provided in an embodiment of this disclosure;
图22为本公开实施例提供的一种网格的非线性细分结果示意图;Figure 22 is a schematic diagram of a nonlinear subdivision result of a mesh provided in an embodiment of this disclosure;
图23为本公开实施例提供的一种非线性细分的详细流程示意图;Figure 23 is a detailed flowchart illustrating a nonlinear subdivision method according to an embodiment of this disclosure;
图24为本公开实施例提供的一种解码方法的流程示意图五;Figure 24 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure;
图25为本公开实施例提供的一种编码方法的流程示意图一;Figure 25 is a schematic flowchart of an encoding method provided in an embodiment of this disclosure;
图26为本公开实施例提供的一种编码方法的流程示意图二;Figure 26 is a schematic flowchart of an encoding method provided in an embodiment of this disclosure;
图27为本公开实施例提供的一种编码方法的流程示意图三;Figure 27 is a schematic flowchart of an encoding method provided in an embodiment of this disclosure;
图28为本公开实施例提供的一种编码方法的流程示意图四;Figure 28 is a schematic flowchart of an encoding method provided in an embodiment of this disclosure;
图29A为本公开实施例提供的一种位移系数在二维图像中的填充方式示意图;Figure 29A is a schematic diagram of a filling method for displacement coefficients in a two-dimensional image provided by an embodiment of this disclosure;
图29B为本公开实施例提供的另一种位移系数在二维图像中的填充方式示意图;Figure 29B is a schematic diagram of another way of filling displacement coefficient in a two-dimensional image according to an embodiment of the present disclosure;
图30为本公开实施例提供的一种编码器的组成结构示意图;Figure 30 is a schematic diagram of the composition structure of an encoder provided in an embodiment of this disclosure;
图31为本公开实施例提供的一种编码器的具体硬件结构示意图;Figure 31 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of this disclosure;
图32为本公开实施例提供的一种解码器的组成结构示意图;Figure 32 is a schematic diagram of the composition structure of a decoder provided in an embodiment of this disclosure;
图33为本公开实施例提供的一种解码器的具体硬件结构示意图;Figure 33 is a schematic diagram of the specific hardware structure of a decoder provided in an embodiment of this disclosure;
图34为本公开实施例提供的一种编解码系统的组成结构示意图。Figure 34 is a schematic diagram of the composition structure of an encoding and decoding system provided in an embodiment of this disclosure.
具体实施方式Detailed Implementation
为了能够更加详尽地了解本公开实施例的特点与技术内容,下面结合附图对本公开实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本公开实施例。To gain a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this disclosure.
除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开实施例的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing embodiments of this disclosure only and is not intended to be limiting of this disclosure.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is 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 noted that the terms "first, second, third" used in the embodiments of this disclosure are only used to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this disclosure described herein can be implemented in an order other than that illustrated or described herein.
在本公开实施例中,可以允许在同一视频场景中解码和合成不同的数据格式比特流。这些数据格式至少可以包括图像格式、点云(Point Cloud)格式、网格(Mesh)格式。通过这种方式,可以为具有不同来源的多个数据格式(例如,网格、点云、图像等等)提供实时沉浸式视频交互服务。In this embodiment of the disclosure, it is possible to decode and synthesize bitstreams of different data formats within the same video scene. These data formats may include at least image formats, point cloud formats, and mesh formats. In this way, real-time immersive video interactive services can be provided for multiple data formats (e.g., mesh, point cloud, image, etc.) from different sources.
在本公开实施例中,基于数据格式的方法可以允许以数据格式的比特流级进行独立性处理。即与视频编码中的瓦片(tiles)或切片(slices)一样,该场景中的不同数据格式可以以独立的方式编码,从而可以基于数据格式进行独立的编码和解码。In this embodiment of the disclosure, the data format-based method allows for independent processing at the bitstream level of the data format. That is, similar to tiles or slices in video coding, different data formats in this scenario can be encoded independently, thus enabling independent encoding and decoding based on the data format.
一般而言,三维动画内容采用基于关键帧的表示方法,即每帧是一个静态网格。不同时刻的静态网格具有相同的拓扑结构和不同的几何结构。但是,基于关键帧表示的三维动态网格的数据量特别大,因此如何能够有效的存储、传输和绘制成为三维动态网格发展所面临的问题。另外针对不同的用户终端(例如,电脑、笔记本、便携式设备、手机)需要支持网格的空间可伸缩性;不同的网络带宽(例如,宽带、窄带、无线)需要支持网格的质量可伸缩性。因此,三维动态网格压缩是一个非常关键的问题。在这里,“一帧”可以理解为一幅图像。示例性地,关键帧可以理解为三维动画中的一幅关键图像。Generally, 3D animation content uses a keyframe-based representation, where each frame is a static mesh. Static meshes at different times have the same topological structure but different geometric structures. However, the data volume of keyframe-based 3D dynamic meshes is particularly large, so how to effectively store, transmit, and render them becomes a problem facing the development of 3D dynamic meshes. Furthermore, spatial scalability of the mesh needs to be supported for different user terminals (e.g., computers, laptops, portable devices, mobile phones); different network bandwidths (e.g., broadband, narrowband, wireless) need to support quality scalability of the mesh. Therefore, 3D dynamic mesh compression is a very critical issue. Here, "one frame" can be understood as an image. For example, a keyframe can be understood as a key image in a 3D animation.
在对本公开实施例进行进一步详细说明之前,先对本公开实施例中涉及的关键术语和相关技术进行介绍。Before providing a more detailed description of the embodiments of this disclosure, the key terms and related technologies involved in the embodiments of this disclosure will be introduced first.
(1)关键术语。(1) Key terms.
本公开实施例中涉及的术语适用于如下的解释:The terms used in the embodiments of this disclosure are to be interpreted as follows:
网格(Mesh)——定义多面体对象形状/拓扑的顶点、边和面的集合。面通常由三角形(三角形网格)组成。A mesh is a collection of vertices, edges, and faces that define the shape/topology of a polyhedral object. Faces are typically composed of triangles (triangular meshes).
基础网格(Base mesh)——具有更少顶点但保持与原始曲面相似性的网格。Base mesh – A mesh with fewer vertices but maintaining similarity to the original surface.
动态网格(Dynamic mesh)——如下一种网格,该网格的五个分量(连接性、几何形状、映射、顶点属性、属性图)中的至少一个随时间变化。A dynamic mesh is a type of mesh in which at least one of its five components (connectivity, geometry, mapping, vertex properties, and property graph) changes over time.
动画网格(Animated mesh)——如下一种网格,该网格的拓扑被定义为映射分量。Animated mesh – a type of mesh whose topology is defined by mapped components.
参数化网格(Parametrized mesh)——是拓扑定义为映射组件的网格。A parametric mesh is a mesh whose topology is defined as a mapping component.
连接性(Connectivity)——描述如何连接网格顶点以创建3D表面的一组顶点索引。(几何形状和所有属性共享相同的唯一连接性信息)。Connectivity – A set of vertex indices that describes how mesh vertices are connected to create a 3D surface. (Geometry and all properties share the same unique connectivity information).
几何形状(Geometry)——描述与网格顶点相关的位置的一组顶点3D(x,y,z)坐标。表示位置的坐标(x,y,z)应该具有有限的精度和动态范围。Geometry – A set of 3D (x, y, z) coordinates of a vertex describing its position relative to a mesh vertex. The coordinates (x, y, z) representing the position should have finite precision and dynamic range.
映射(Mapping)——描述如何将网格表面映射到平面的2D区域。这种映射由与网格顶点相关联的一组UV参数/纹理[映射]坐标以及连接性信息来描述。Mapping describes how a mesh surface is mapped to a 2D region of a plane. This mapping is described by a set of UV parameters/texture [mapping] coordinates associated with the mesh vertices and connectivity information.
顶点属性(Vertex attribute)——与网格顶点相关联的矢量属性值的标量。Vertex attribute – A scalar of vector attribute values associated with mesh vertices.
属性图(Attribute Map)——与网格表面相关联并存储为2D图像/视频的属性。视频(即,参数空间)和表面之间的映射由映射信息定义。Attribute Map – Attributes associated with the mesh surface and stored as a 2D image/video. The mapping between the video (i.e., parameter space) and the surface is defined by the mapping information.
顶点(Vertex)——位置(通常在3D空间中)以及其他信息,例如颜色、法向量和纹理坐标。Vertex – position (usually in 3D space) and other information such as color, normal vector and texture coordinates.
边(Edge)——两个顶点之间的连接。An edge is a connection between two vertices.
面(Face)——一组封闭的边,其中三角形面有由三个顶点定义的三条边。使用“右手”坐标系来确定面的方向。A face is a set of closed edges, where a triangular face has three edges defined by its three vertices. The orientation of a face is determined using a right-handed coordinate system.
表面(Surface)——将三维对象与环境分开的面的集合。Surface – A collection of faces that separate a three-dimensional object from its environment.
每点比特数(bits per point,bpp)——用于描述网格中一个点的信息量(以比特表示)。Bits per point (bpp) – This describes the amount of information (in bits) at a point in a grid.
位移(Displacements)——原始网格的几何形状和由于基础网格细分过程而重建的网格几何形状之间的差异。Displacements are the differences between the geometry of the original mesh and the geometry of the mesh reconstructed due to the underlying mesh subdivision process.
LOD(Level of Details,LOD)——网格重建的可缩放表示,每个LOD都包含足够的信息,以便以指示的精度或空间分辨率来重建网格。后续的每个LOD都是在多个先前重建的网格之上进行的细化。LOD (Level of Details) – A scalable representation of mesh reconstruction. Each LOD contains enough information to reconstruct the mesh with the indicated precision or spatial resolution. Each subsequent LOD is a refinement on top of multiple previously reconstructed meshes.
(2)相关技术(2) Related technologies
当前算法可以应用于两阶段编码过程来编码几何信息。首先,抽取几何信息以创建使用通用几何编码方法(例如“edgebreaker”)编码的基础网格。然后对基础网格进行分层细分,细分点和原始网格的近似值之间的差异存储为几何位移分量。该位移分量被打包(或称为“填充”)到2D图像中,并利用诸如高效视频编码(High Efficiency Video Coding,HEVC)之类的无损视频编码方法进行编码。其中,两阶段几何编码过程的流程如图1所示。The current algorithm can be applied to a two-stage coding process to encode geometric information. First, geometric information is extracted to create a base mesh encoded using a general geometric coding method (e.g., "edgebreaker"). Then, the base mesh is subdivided layer by layer, and the difference between the subdivision points and approximations of the original mesh is stored as a geometric displacement component. This displacement component is packed (or "filled") into the 2D image and encoded using a lossless video coding method such as High Efficiency Video Coding (HEVC). The flow of the two-stage geometric coding process is shown in Figure 1.
在图1中,静态或动态网格输入预处理模块,该预处理模块用于抽取几何信息以生成基础网格和位移分量。然后通过通用网格编码器(例如“edgebreaker”)对抽取的基础网格进行编码处理,以及将位移分量打包到2D图像中,再利用HEVC之类的视频编码器对位移信息进行编码处理,将所得到的编码比特写入码流中。In Figure 1, a static or dynamic mesh input preprocessing module is used to extract geometric information to generate a base mesh and displacement components. The extracted base mesh is then encoded using a general mesh encoder (e.g., an "edgebreaker"), and the displacement components are packed into a 2D image. The displacement information is then encoded using a video encoder such as HEVC, and the resulting encoded bits are written into the bitstream.
图2描述了使用一个细化步骤生成基础网格中一个面的位移的过程。其中,PB1、PB2和PB3表示基础网格点,PS1、PS2和PS3表示细分点,PSD1、PSD2和PSD3表示进行移位后的细分点。在这里,细分点PS1作为 PB1和PB2点之间的中点计算得到。该过程可以递归重复执行。Figure 2 illustrates the process of generating the displacement of a face in the base mesh using a refinement step. Here, PB1, PB2, and PB3 represent base mesh points, PS1, PS2, and PS3 represent refinement points, and PSD1, PSD2, and PSD3 represent the repositioned refinement points. The refinement point PS1 is calculated as the midpoint between PB1 and PB2. This process can be recursively repeated.
在图3中,PS1和PSD1的每个向量可以由法线、切线和双切线方向上的三个分量描述。其中,这三个分量可以用小波变换进一步处理,并且相应的变换系数可以映射到颜色平面(例如,YUV 444颜色空间中的Y、U和V分量),或者顺序映射到单个颜色平面(例如,YUV420或YUV 400颜色空间中的Y平面分量),或者使用颜色平面(例如,YUV 420颜色空间中的Y、U和V分量)之间的交错方法打包。In Figure 3, each vector of PS1 and PSD1 can be described by three components in the directions of normal, tangent, and double tangent. These three components can be further processed using wavelet transform, and the corresponding transform coefficients can be mapped to color planes (e.g., the Y, U, and V components in the YUV 444 color space), or sequentially mapped to a single color plane (e.g., the Y plane component in the YUV420 or YUV 400 color space), or packed using an interleaving method between color planes (e.g., the Y, U, and V components in the YUV 420 color space).
递归地重复细分过程,直至达到期望的点密度。图4描述了在2D空间中使用垂直于表面的法线方向上的位移进行递归细分的一个示例。如图4所示,在该迭代细分过程中,(a)、(c)和(e)为凸连续表面的三级细分过程,(b)、(d)和(f)为振荡表面的三级细分过程。The subdivision process is repeated recursively until the desired point density is achieved. Figure 4 illustrates an example of recursive subdivision using displacements in the direction perpendicular to the surface normal in 2D space. As shown in Figure 4, in this iterative subdivision process, (a), (c), and (e) represent the three-level subdivision process for a convex continuous surface, while (b), (d), and (f) represent the three-level subdivision process for an oscillating surface.
示例性地,这里存在三个LOD细化,并且细分处理包括如下步骤。For example, there are three LOD refinements here, and the refinement process includes the following steps.
在步骤1中,使用重建的基础网格中的两个相邻点PB0和PB1定义一条边。In step 1, an edge is defined using two adjacent points PB0 and PB1 in the reconstructed base mesh.
在步骤2中,使用包含点PB0和PB1的面计算边的法线。In step 2, the normals of the edges are calculated using the face containing points PB0 and PB1.
在步骤3中,在点PS1_1处细分重建的基础网格。In step 3, the base mesh for reconstruction is subdivided at point PS1_1.
在步骤4中,沿着步骤2中定义的法线将位移d1_1应用到点PS1_1。In step 4, the displacement d1_1 is applied to point PS1_1 along the normal defined in step 2.
在步骤5中,创建两条边:PB0 PS1_1和PS1_1 PB1,如图4中的(a)和(b)。In step 5, two edges are created: PB0 PS1_1 and PS1_1 PB1, as shown in (a) and (b) of Figure 4.
在步骤6中,将步骤3-5应用于步骤5中的每个新边,直到生成所需的LOD,如图4中的(c)和(e)以及图4中的(d)和(f)。In step 6, steps 3-5 are applied to each new edge in step 5 until the desired LOD is generated, as shown in (c) and (e) and (d) and (f) in Figure 4.
需要注意的是,法线总是参考重建的基础网格计算。另外,位移是参考步骤5中生成的细分边计算得到的,而不是参考步骤1中获得的重建基本边。It is important to note that the normals are always calculated with reference to the reconstructed base mesh. Additionally, the displacements are calculated with reference to the subdivision edges generated in step 5, not the reconstructed base edges obtained in step 1.
进一步地,细分过程的流程框图如图5所示。在图5中,在步骤S501中,首先对原始网格进行网格简化,以得到基础网格。在步骤S502中,对基础网格进行量化。在步骤S503中,对量化后的基础网格进行编码。在步骤S504中,从码流中解码基础网络,以得到重建的基础网格。在步骤S505中,初始化n=0,并对重建的基础网格进行网格细分以得到细分网格。在步骤S506中,判断n是否小于L-1。若判断结果为是,即n<L-1,则n=n+1(S507),继续执行步骤S505至S506。若步骤S506的判断结果为否,即n<L-1不成立,则表明细分完成,然后再执行步骤S508和S509。也就是说,在细分完成之后,对所得到的细分网格与原始网格进行位移计算,以得到位移系数,并将位移系数编码到码流中。Further, the flowchart of the subdivision process is shown in Figure 5. In Figure 5, in step S501, the original mesh is first simplified to obtain the base mesh. In step S502, the base mesh is quantized. In step S503, the quantized base mesh is encoded. In step S504, the base network is decoded from the bitstream to obtain the reconstructed base mesh. In step S505, n is initialized to 0, and the reconstructed base mesh is subdivided to obtain the subdivided mesh. In step S506, it is determined whether n is less than L-1. If the determination result is yes, i.e., n < L-1, then n = n + 1 (S507), and steps S505 to S506 are continued. If the determination result of step S506 is no, i.e., n < L-1 is not true, it indicates that the subdivision is completed, and then steps S508 and S509 are executed. That is, after the subdivision is completed, the displacement of the obtained subdivided mesh and the original mesh is calculated to obtain the displacement coefficient, and the displacement coefficient is encoded into the bitstream.
其中,n表示迭代细分次数,n为从0开始索引的整数。L表示LOD个数,L为从1开始索引的整数。Where n represents the number of iterations and subdivisions, and n is an integer indexed starting from 0. L represents the number of Levels of Detail (LODs), and L is an integer indexed starting from 1.
示例性地,图6提供了具有2个LOD和1维位移的三维内容的网格细分结果。其中,黑色实线(由顶点PB_1、PB_2和PB_3组成)表示基础网格,黑色虚线表示细分网格,第一加粗实线则为应用位移的LOD1,第二加粗实线则为应用位移的LOD2。For example, Figure 6 provides a mesh subdivision result for a 3D content with 2 LODs and 1D displacement. In the figure, the black solid line (composed of vertices PB_1, PB_2, and PB_3) represents the base mesh, the black dashed line represents the subdivision mesh, the first bold solid line is LOD1 with applied displacement, and the second bold solid line is LOD2 with applied displacement.
进一步地,图7提供了参数化网格的编码过程示意图,该编码过程具体如下。Furthermore, Figure 7 provides a schematic diagram of the encoding process for the parameterized mesh, which is as follows.
使用静态网格编码器对基础网格帧进行量化和编码。该过程与用于压缩基础网格的编码方案的类型无关。The base grid frame is quantized and encoded using a static grid encoder. This process is independent of the type of encoding scheme used to compress the base grid.
位移是使用分层细分过程生成的,并且表示原始网格拓扑和先前重建的细分LOD之间的差异。位移的第一次迭代使用基础网格作为输入。The displacement is generated using a layered subdivision process and represents the difference between the original mesh topology and the previously reconstructed subdivision LOD. The first iteration of the displacement uses the base mesh as input.
位移经过分层小波变换处理(或其他变换处理),该变换递归地将LOD应用于重建的基础网格。The displacement is processed by layered wavelet transform (or other transform processing), which recursively applies the LOD to the reconstructed base mesh.
然后,对小波系数进行量化,打包到2D图像/视频中,并且可以通过使用传统的图像/视频编码器来压缩。The wavelet coefficients are then quantized, packed into a 2D image/video, and compressed using a conventional image/video encoder.
通过对在图像/视频解码过程中生成的重建小波系数图像/视频应用图像解包和反量化,来获得小波系数的重建版本。The reconstructed version of the wavelet coefficients is obtained by applying image unpacking and inverse quantization to the reconstructed wavelet coefficient image/video generated during image/video decoding.
然后再通过对重建的小波系数应用逆小波变换,来计算重建的位移。Then, the reconstructed displacement is calculated by applying inverse wavelet transform to the reconstructed wavelet coefficients.
小波系数以浮点格式计算,且可以是正数和负数。在一些系统中,为了生成2D图像,首先将系数转换为正值,并映射到给定的位深。Wavelet coefficients are calculated in floating-point format and can be both positive and negative. In some systems, to generate a 2D image, the coefficients are first converted to positive values and mapped to a given bit depth.
c‘(i)=2^[bit_depth-1]+[c(i)*2^bit_depth]/[c_max-c_min],c‘(i)=2^[bit_depth-1]+[c(i)*2^bit_depth]/[c_max-c_min],
其中,c′(i)是积分位移系数值,c(i)是当前位移系数值,c_max是最大位移系数值,c_min是最小位移系数值,bit_depth是定义用于图像编码的固定级别的数量的值。Where c′(i) is the integral displacement coefficient value, c(i) is the current displacement coefficient value, c_max is the maximum displacement coefficient value, c_min is the minimum displacement coefficient value, and bit_depth is a value that defines the number of fixed levels used for image encoding.
在图8中示出了一种网格框架中的几何信息示例,这里具体为每个顶点都具有属性的网格的数据结构示例。Figure 8 shows an example of geometric information in a mesh framework, specifically an example of a mesh data structure where each vertex has attributes.
在图9中展示了一个由四个顶点和三个面组成的网格的表面示例,在图10中展示了一个由四个顶点和三个面组成的网格的数据结构示例。其中,对于图9展示的由四个顶点和三个面组成的具有每个顶点颜色特征(color-per-vertex)的网格(图8)表示的表面示例。空间中的每个顶点由其X、Y、Z位置坐标和三个颜色属性R、G、B描述。如下所示,每个面由形成三角形的三个顶点索引定义。Figure 9 shows an example of a surface composed of a mesh with four vertices and three faces, and Figure 10 shows an example of a data structure for a mesh composed of four vertices and three faces. The example shown in Figure 9 (Figure 8) represents a surface with color-per-vertex characteristics for each vertex, consisting of four vertices and three faces. Each vertex in space is described by its X, Y, Z position coordinates and three color attributes R, G, and B. As shown below, each face is defined by the indices of the three vertices forming a triangle.
# ---------------------------------# ---------------------------------
#第1部分:#Part 1:
#几何信息#Geometric Information
#X Y Z a_1 a_2 a_3#X Y Z a_1 a_2 a_3
#顶点0(v_idx_0)#Vertex 0 (v_idx_0)
v 0.0 0.0 0.0 127 127 127v 0.0 0.0 0.0 127 127 127
#顶点1(v_idx_1)#Vertex 1 (v_idx_1)
v 1.0 0.0 0.0 127 127 127v 1.0 0.0 0.0 127 127 127
#顶点2(v_idx_2)#Vertex 2 (v_idx_2)
v 0.0 1.0 0.0 127 127 127v 0.0 1.0 0.0 127 127 127
#顶点3(v_idx_3)#Vertex 3 (v_idx_3)
v 0.0 0.0 1.0 127 127 127v 0.0 0.0 1.0 127 127 127
# ---------------------------------# ---------------------------------
#第2部分:#Part 2:
#连接性信息#Connectivity Information
#v_idx,v_idx,v_idx#v_idx, v_idx, v_idx
#面0(f_idx_0)#face0 (f_idx_0)
f 0 12f 0 12
#面1(f_idx_1)#Interview 1 (f_idx_1)
f 0 31f 0 31
#面2(f_idx_2)#Interview 2 (f_idx_2)
f 0 23f 0 23
# ---------------------------------# ---------------------------------
在图11中展示一个由具有属性纹理图的参数化网格的数据结构示例。Figure 11 shows an example of a data structure consisting of a parametric mesh with attribute texture maps.
在图12中展示一个由具有属性映射特征的网格(图11)表示的表面示例,该网格由四个顶点和三个面组成。空间中的每个顶点都由其X,Y,Z位置坐标来描述。(U,V)表示2D纹理顶点图中的属性坐标。每个面由三对顶点索引和纹理顶点坐标定义,它们在3D空间中形成一个三角形且在2D纹理图中形成一个三角形。Figure 12 shows an example of a surface represented by a mesh (Figure 11) with attribute mapping features, consisting of four vertices and three faces. Each vertex in space is described by its X, Y, Z position coordinates. (U, V) represent the attribute coordinates in the 2D texture vertex graph. Each face is defined by three pairs of vertex indices and texture vertex coordinates, which form a triangle in 3D space and a triangle in the 2D texture graph.
# ---------------------------------# ---------------------------------
#第1部分:#Part 1:
#几何信息#Geometric Information
#X Y Z#X Y Z
#顶点0(v_idx_0)#Vertex 0 (v_idx_0)
v 0.0 0.0 0.0v 0.0 0.0 0.0
#顶点1(v_idx_1)#Vertex 1 (v_idx_1)
v 1.0 0.0 0.0v 1.0 0.0 0.0
#顶点2(v_idx_2)#Vertex 2 (v_idx_2)
v 0.0 1.0 0.0v 0.0 1.0 0.0
#顶点3(v_idx_3)#Vertex 3 (v_idx_3)
v 0.0 0.0 1.0v 0.0 0.0 1.0
# ---------------------------------# ---------------------------------
#第2部分:#Part 2:
#映射信息#Mapping Information
#U V#UV
#纹理顶点0(vt_0)#Texture vertex 0 (vt_0)
vt 0.500000 0.500000vt 0.500000 0.500000
#纹理顶点1(vt_1)#Texture Vertex 1 (vt_1)
vt 0.0000000.500000vt 0.0000000.500000
#纹理顶点2(vt_2)#Texture Vertex 2 (vt_2)
vt 0.5000001.000000vt 0.5000001.000000
#纹理顶点3(vt_3)#Texture Vertex 3 (vt_3)
vt 1.0000000.500000vt 1.0000000.500000
#纹理顶点4(vt_4)#Texture Vertex 4 (vt_4)
vt 0.5000000.000000vt 0.5000000.000000
# ---------------------------------# ---------------------------------
#第3部分:#Part 3:
#连接性信息#Connectivity Information
#v_idx/vt_idx#v_idx/vt_idx
#面0(f_idx_0)#face0 (f_idx_0)
f 0/0 1/2 2/1f 0/0 1/2 2/1
#面1(f_idx_1)#Interview 1 (f_idx_1)
f 0/0 3/2 1/3f 0/0 3/2 1/3
#面2(f_idx_2)#Interview 2 (f_idx_2)
f 0/0 2/3 3/4f 0/0 2/3 3/4
在本公开实施例中,可以使用右手坐标系确定面的取向。一个面由属于三条边的三个顶点组成,三个顶点索引描述每个面。In this embodiment of the disclosure, the orientation of a face can be determined using a right-handed coordinate system. A face consists of three vertices belonging to three edges, and the three vertex indices describe each face.
流形网格是一条边最多属于两个不同的面的网格,如图13A所示。非流形网格是一条边属于两个以上的面的网格,如图13B所示。A manifold mesh is a mesh in which an edge belongs to at most two different faces, as shown in Figure 13A. A non-manifold mesh is a mesh in which an edge belongs to more than two faces, as shown in Figure 13B.
进一步地,为了使用现有的视频编码标准对位移分量进行编码,可以将变换后的位移分量从一维阵列映射到二维图像,如图14所示。Furthermore, in order to encode the displacement components using existing video coding standards, the transformed displacement components can be mapped from a one-dimensional array to a two-dimensional image, as shown in Figure 14.
每个单位矢量分量与不同的颜色平面相关联。示例性地,当法线单位向量映射到Y平面时;将切线单位向量映射到U平面;双切单位向量被映射到V平面。在这种情况下,YUV444颜色映射用于编码。如图15A和图15B所示,这里提供了视频分量的位移系数8×8填充块示例。其中,图15A表示正向填充,图15B表示反向填充。Each unit vector component is associated with a different color plane. For example, the normal unit vector is mapped to the Y-plane; the tangent unit vector is mapped to the U-plane; and the bitangent unit vector is mapped to the V-plane. In this case, the YUV444 color mapping is used for encoding. As shown in Figures 15A and 15B, examples of 8×8 padding blocks for the shift coefficients of the video components are provided here. Figure 15A shows forward padding, and Figure 15B shows reverse padding.
位移系数编码中使用的提升变换(Lifting Transform)的性质导致独立的细分级别,其具有用于重建的单独的系数集。The properties of the lifting transform used in displacement coefficient encoding result in independent subdivision levels, each with a separate set of coefficients for reconstruction.
在相关技术中,如图5所示,将位移系数应用于先前重建的LOD。在某些情况下,位移系数在高级别上通常会存在冗余,导致编码比特开销大,降低了编解码效率。In related techniques, as shown in Figure 5, shift coefficients are applied to the previously reconstructed LOD. In some cases, shift coefficients often exhibit redundancy at higher levels, leading to high coded bit overhead and reduced encoding/decoding efficiency.
基于此,本公开实施例提供了一种编解码方法,通过增加第一语法元素指示当前网格使用非线性细分方式,在确定当前网格使用非线性细分方式时,对当前网格中的当前LOD的重建网格进行细分,确定当前LOD的细分网格;直接将当前LOD的第一点(与基点重合或相邻的点)的位移系数设置为0,即与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于0;根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。如此,在当前网格使用非线性细分方式时,能够进一步改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。Based on this, embodiments of this disclosure provide an encoding/decoding method. By adding a first syntax element to indicate that the current grid uses a non-linear subdivision method, when it is determined that the current grid uses a non-linear subdivision method, the reconstructed grid of the current LOD in the current grid is subdivided to determine the subdivision grid of the current LOD; the displacement coefficient of the first point of the current LOD (the point that coincides with or is adjacent to the base point) is directly set to 0, that is, the displacement adjacent to the base point (e.g., PB_1, PB_2, and PB_3) is inferred to be equal to 0; based on the subdivision grid of the current LOD and the displacement coefficient of the current LOD, the reconstructed grid of the next LOD in the current grid is determined. In this way, when the current grid uses a non-linear subdivision method, the redundancy problem of displacement coefficients at higher levels can be further improved, saving the encoding bits of displacement coefficients, thereby improving the encoding/decoding efficiency.
也就是说,在本公开的实施例中,通过增加第一语法元素指示当前网格使用非线性细分方式的情况,在编码阶段,接近基本层中的顶点的位移系数可以从位移列表中去掉,在解码阶段,接近基本层中的顶点的位移系数被推断为等于0,因而在后续将位移系数递归地应用于先前重建的LOD的过程中,能够改善高级别上位移系数存在的冗余问题,减少位移系数的编码比特,进而提升编解码效率。In other words, in the embodiments of this disclosure, by adding a first syntax element to indicate that the current mesh uses a non-linear subdivision method, during the encoding stage, the displacement coefficients of vertices close to the base layer can be removed from the displacement list, and during the decoding stage, the displacement coefficients of vertices close to the base layer are inferred to be equal to 0. Therefore, in the subsequent process of recursively applying the displacement coefficients to the previously reconstructed LOD, the redundancy problem of displacement coefficients at higher levels can be improved, the number of encoded bits of displacement coefficients can be reduced, and thus the encoding and decoding efficiency can be improved.
为便于理解本公开实施例的技术方案,以下通过具体实施例详述本公开的技术方案。以上相关技术作为可选方案与本公开实施例的技术方案可以进行任意结合,其均属于本公开实施例的保护范围。本公开实施例包括以下内容中的至少部分内容。To facilitate understanding of the technical solutions of the embodiments of this disclosure, the technical solutions of this disclosure are described in detail below through specific embodiments. The above-mentioned related technologies are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this disclosure, all of which fall within the protection scope of the embodiments of this disclosure. The embodiments of this disclosure include at least some of the following contents.
图16为本公开实施例提供的一种解码方法的流程示意图一。如图16所示,该方法可以包括以下步骤。Figure 16 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure. As shown in Figure 16, the method may include the following steps.
在步骤101中,解码码流,确定第一语法元素的取值。In step 101, the bitstream is decoded to determine the value of the first syntax element.
需要说明的是,在本公开实施例中,该解码方法可以是指一种网格细分方法,具体地,是一种用于动态网格解码的递归细分方法,能够提升编解码效率。It should be noted that, in the embodiments disclosed herein, the decoding method may refer to a grid subdivision method, specifically a recursive subdivision method for dynamic grid decoding, which can improve encoding and decoding efficiency.
还需要说明的是,在本公开实施例中,基于视频的动态网格编码(Video-basedDynamic Mesh Coding,VDMC)是一种用于压缩三维网格的标准,其主要是利用已有的基于视频的视觉体积编码(Visual Volumetric Video-based Coding,V3C)标准对三维网格进行压缩。在本公开实施例中,细分方法在所有的LOD上共享功能,并且由Atlas序列参数集VDMC扩展RBSP语法结构中的两个语法元素来定义:asps_vdmc_ext_subdivision_method和asps_vdmc_ext_subdivision_iteration_count。It should also be noted that, in this embodiment, Video-based Dynamic Mesh Coding (VDMC) is a standard for compressing 3D meshes, which mainly utilizes the existing Visual Volumetric Video-based Coding (V3C) standard to compress the 3D mesh. In this embodiment, the subdivision method shares functionality across all LODs and is defined by two syntax elements in the Atlas sequence parameter set VDMC extended RBSP syntax structure: asps_vdmc_ext_subdivision_method and asps_vdmc_ext_subdivision_iteration_count.
其中,表1提供了一种示意性的Atlas序列参数集VDMC扩展的语法结构。Table 1 provides an illustrative syntax structure for the Atlas sequence parameter set VDMC extension.
表1Table 1
在表1中,asps_vdmc_ext_subdivision_method用于指示当前Atlas序列参数集相关联的网格的细分方法标识符,asps_vdmc_ext_subdivision_iteration_count用于指示网格的细分迭代次数,asps_vdmc_ext_ displacement_coordinate_system用于指示网格的坐标系标识符,asps_vdmc_ext_transform_method用于指示网格的小波变换标识符。In Table 1, asps_vdmc_ext_subdivision_method is used to indicate the subdivision method identifier of the mesh associated with the current Atlas sequence parameter set, asps_vdmc_ext_subdivision_iteration_count is used to indicate the number of subdivision iterations of the mesh, asps_vdmc_ext_displacement_coordinate_system is used to indicate the coordinate system identifier of the mesh, and asps_vdmc_ext_transform_method is used to indicate the wavelet transform identifier of the mesh.
其中,对于asps_vdmc_ext_subdivision_method来说,表2描述了所支持的细分方法与asps_vdmc_ext_subdivision_method的对应关系列表。For asps_vdmc_ext_subdivision_method, Table 2 describes a list of the supported subdivision methods and their correspondence with asps_vdmc_ext_subdivision_method.
表2Table 2
对于asps_vdmc_ext_subdivision_iteration_count来说,当不存在时,推断asps_vdmc_ext_ subdivision_iteration_count的值等于0。For asps_vdmc_ext_subdivision_iteration_count, if it does not exist, it is inferred that the value of asps_vdmc_ext_subdivision_iteration_count is equal to 0.
对于asps_vdmc_ext_displacement_coordinate_system来说,表3描述了所支持的坐标系与asps_vdmc_ ext_displacement_coordinate_system的对应关系列表。For asps_vdmc_ext_displacement_coordinate_system, Table 3 describes a list of the supported coordinate systems and their correspondence with asps_vdmc_ext_displacement_coordinate_system.
表3Table 3
对于asps_vdmc_ext_transform_method来说,表4描述了所支持的小波变换方法与asps_vdmc_ext_ transform_method的对应关系列表。For asps_vdmc_ext_transform_method, Table 4 describes the list of supported wavelet transform methods and their correspondence with asps_vdmc_ext_transform_method.
表4Table 4
在本公开实施例中,这里的第一语法元素可以用asps_vdmc_ext_subdivision_method表示,用于指示网格的细分方法,例如可以是中点细分、Loop细分等。In this embodiment of the disclosure, the first syntax element can be represented by asps_vdmc_ext_subdivision_method, which indicates the subdivision method of the grid, such as midpoint subdivision, loop subdivision, etc.
由于细分的特殊性,较高级别的LOD通常退化为“0”位移,从而在信令和编码信息中引入显著的冗余。Due to the specific nature of the subdivision, higher-level LODs typically degenerate into "0" shifts, thereby introducing significant redundancy in signaling and coded information.
基于此,为了有效编码体积内容的网格表示的几何分量,可以通过去除诸如基础网格的边和来自先前LOD的继承值的情况下的冗余位移。本公开实施例提出了一种新的自适应细分方式,其中在较高级别的LOD上,与基点相邻的边总是等于0 。Based on this, in order to effectively encode the geometric components of the mesh representation of volumetric content, redundant displacements such as edges of the base mesh and inherited values from previous LODs can be removed. Embodiments of this disclosure propose a novel adaptive subdivision scheme, wherein at higher LOD levels, edges adjacent to the base point are always equal to 0.
可以理解,在本公开实施例中,在前述表2的基础上,针对第一语法元素增加了新的取值,以使得第一语法元素能够用于指示当前网格是否使用非线性细分方式。在这里,非线性细分方式可以是创建与相关技术相同的细分,但是与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于0。简单来说,针对每一个LOD,位移是基于先前重建的LOD中的细分顶点计算得到的,从而能够将位移递归地用于先前重建的LOD,因此,这里的自适应细分方式称为“递归细分方式”。以中点细分为例,该递归细分方式则可以称为中点递归的细分方法。It is understood that in this embodiment of the disclosure, based on the aforementioned Table 2, new values are added to the first syntax element so that the first syntax element can be used to indicate whether the current mesh uses a nonlinear subdivision method. Here, the nonlinear subdivision method can create subdivisions similar to those in related techniques, but the displacements adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to 0. Simply put, for each LOD, the displacement is calculated based on the subdivision vertices in the previously reconstructed LOD, thus enabling the displacements to be recursively used in the previously reconstructed LOD. Therefore, this adaptive subdivision method is called a "recursive subdivision method." Taking midpoint subdivision as an example, this recursive subdivision method can be called a midpoint recursive subdivision method.
在一种可能的实现方式中,如表5所示,这里增加了等于2和3的新asps_vdmc_ext_subdivision_method,该新asps_vdmc_ext_subdivision_method将创建与相关技术相同的细分,但是与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于零,从而能够节省位移的编码比特。In one possible implementation, as shown in Table 5, a new asps_vdmc_ext_subdivision_method equal to 2 and 3 is added. This new asps_vdmc_ext_subdivision_method will create the same subdivision as the related techniques, but the shifts adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to zero, thus saving the coded bits of the shifts.
表5Table 5
步骤102中,在第一语法元素指示当前网格使用非线性细分方式时,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格。In step 102, when the first syntax element indicates that the current mesh uses a non-linear subdivision method, the reconstructed mesh of the current LOD in the current mesh is determined, and the reconstructed mesh of the current LOD is subdivided to determine the subdivision mesh of the current LOD.
需要说明的是,在本公开实施例中,第一语法元素用于指示当前网格是否使用非线性细分方式。其中,在第一语法元素的取值为第一值时,确定第一语法元素指示当前网格不使用细分方式;在第一语法元素的取值为第二值时,确定第一语法元素指示当前网格使用中点细分方式;在第一语法元素的取值为第三值时,确定第一语法元素指示当前网格使用递归细分方式;在第一语法元素的取值为第四值时,确定第一语法元素指示当前网格使用非线性细分方式。It should be noted that, in this embodiment of the disclosure, the first syntax element is used to indicate whether the current mesh uses a non-linear subdivision method. Specifically, when the value of the first syntax element is a first value, it is determined that the first syntax element indicates that the current mesh does not use a subdivision method; when the value of the first syntax element is a second value, it is determined that the first syntax element indicates that the current mesh uses a midpoint subdivision method; when the value of the first syntax element is a third value, it is determined that the first syntax element indicates that the current mesh uses a recursive subdivision method; and when the value of the first syntax element is a fourth value, it is determined that the first syntax element indicates that the current mesh uses a non-linear subdivision method.
在这里,第一值、第二值、第三值、第四值各不相同。示例性地,第一值可以设置为0,第二值可以设置为1,第三值可以设置为2,第四值可以设置为3。也就是说,根据第一语法元素的取值不同,能够确定当前网格是否使用非线性细分方式。Here, the first, second, third, and fourth values are all different. For example, the first value can be set to 0, the second value can be set to 1, the third value can be set to 2, and the fourth value can be set to 3. That is, based on the different values of the first syntax element, it can be determined whether the current mesh uses a non-linear subdivision method.
在一实施例中,如果第一语法元素的取值为0,那么可以确定当前网格不使用任何细分方式,例如中点细分方式、递归细分方式、非线性细分方式等;如果第一语法元素的取值为1,那么可以确定当前网格使用中点细分方式;如果第一语法元素的取值为2,那么可以确定当前网格使用递归细分方式;如果第一语法元素的取值为3,那么可以确定当前网格使用非线性细分方式。In one embodiment, if the value of the first syntax element is 0, it can be determined that the current grid does not use any subdivision method, such as midpoint subdivision, recursive subdivision, non-linear subdivision, etc.; if the value of the first syntax element is 1, it can be determined that the current grid uses midpoint subdivision; if the value of the first syntax element is 2, it can be determined that the current grid uses recursive subdivision; if the value of the first syntax element is 3, it can be determined that the current grid uses non-linear subdivision.
还需要说明的是,在本公开实施例中,在当前网格使用非线性细分方式时,可以通过至少一个LOD进行递归重建得到当前网格的重建网格。具体地,在得到当前网格中的当前LOD的重建网格之后可以对当前LOD的重建网格进行细分,确定当前LOD的细分网格。然后,根据当前LOD的细分网格以及预先设置的位移系数或者码流中的位移系数,从而能够递归得到当前LOD的下一LOD的重建网格。It should also be noted that, in this embodiment of the disclosure, when the current grid uses a nonlinear subdivision method, the reconstructed grid of the current grid can be obtained by recursively reconstructing at least one LOD. Specifically, after obtaining the reconstructed grid of the current LOD in the current grid, the reconstructed grid of the current LOD can be subdivided to determine the subdivided grid of the current LOD. Then, based on the subdivided grid of the current LOD and a pre-set displacement coefficient or a displacement coefficient in the bitstream, the reconstructed grid of the next LOD can be recursively obtained.
在一些实施例中,首先确定当前网格中的第一LOD的重建网格。该方法可以包括:解码码流,确定重建基础网格;对重建基础网格进行细分,确定初始细分网格;解码码流,确定初始细分网格的位移系数;根据初始细分网格和初始细分网格的位移系数,确定当前网格中的第一LOD的重建网格。In some embodiments, the reconstructed grid of the first LOD in the current grid is first determined. The method may include: decoding the bitstream to determine the reconstructed base grid; subdividing the reconstructed base grid to determine the initial subdivision grid; decoding the bitstream to determine the displacement coefficients of the initial subdivision grid; and determining the reconstructed grid of the first LOD in the current grid based on the initial subdivision grid and the displacement coefficients of the initial subdivision grid.
在本公开实施例中,基础网格又可以称为“简化网格”。在一些实施例中,通过解码基础网格码流,确定重建基础网格。示例性地,可以是通过网格解码器(例如EdgeBreaker等)解码基础网格码流,以获得重建基础网格。In this disclosure, the base mesh may also be referred to as a "simplified mesh". In some embodiments, the reconstructed base mesh is determined by decoding the base mesh bitstream. Exemplarily, the reconstructed base mesh may be obtained by decoding the base mesh bitstream using a mesh decoder (e.g., EdgeBreaker).
在一些实施例中,在确定所述当前网格中的第一LOD的重建网格之后,对第一LOD的重建网格进行细分以确定第二LOD的细分网格;解码码流以确定第二LOD的细分网格的位移系数; 根据第二LOD的细分网格和第二LOD的细分网格的位移系数,确定当前网格中的下一LOD的重建网格;以及继续执行细分操作,直至确定出当前网格中的第L个LOD的重建网格。其中, L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, after determining the reconstructed grid of the first LOD in the current grid, the reconstructed grid of the first LOD is subdivided to determine the subdivided grid of the second LOD; the bitstream is decoded to determine the displacement coefficients of the subdivided grid of the second LOD; based on the subdivided grid of the second LOD and the displacement coefficients of the subdivided grid of the second LOD, the reconstructed grid of the next LOD in the current grid is determined; and the subdivision operation continues until the reconstructed grid of the Lth LOD in the current grid is determined. The value of L is related to the number of subdivision iterations of the current grid.
在本公开实施例中,对于第一LOD来说,位移系数是指原始网格的顶点坐标信息和初始细分网格的顶点坐标信息之间的差异。这样,在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格,再根据LOD1上的细分网格和对应的位移系数可以确定出LOD2的重建网格,依次类推,直至重建完成。In this embodiment, for the first LOD, the displacement coefficient refers to the difference between the vertex coordinate information of the original mesh and the vertex coordinate information of the initial subdivided mesh. Thus, after decoding to obtain the displacement coefficient of the initial subdivided mesh, corresponding displacement calculations are performed on the vertex coordinate information of the initial subdivided mesh based on this displacement coefficient to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, based on the reconstructed mesh of LOD1, further subdivision is performed to obtain the subdivided mesh on LOD1. Then, based on the subdivided mesh on LOD1 and the corresponding displacement coefficient, the reconstructed mesh of LOD2 can be determined, and so on, until reconstruction is complete.
在步骤103中,在当前LOD为第i个LOD的情况下,将当前LOD的第一点的位移系数确定为0;其中,i为大于2的整数;第一点包括当前网格对应的重建基础网格的顶点。In step 103, when the current LOD is the i-th LOD, the displacement coefficient of the first point of the current LOD is determined to be 0; where i is an integer greater than 2; the first point includes the vertex of the reconstructed base mesh corresponding to the current mesh.
需要说明的是,在本公开实施例中,位移系数可以包括一个或多个方向上的位移分量,如图3所示,位移系数包括法线方向、切线方向和双切线方向等三个方向上的位移分量。其中,第一LOD的位移系数是相对于基础网格的细分顶点来计算的,后续层级的位移系数则都是相对于前一LOD重建LOD的细分顶点来计算的,从而可以实现位移系数的递归细分。It should be noted that, in this embodiment, the displacement coefficient may include displacement components in one or more directions, as shown in Figure 3. The displacement coefficient includes displacement components in three directions: normal direction, tangent direction, and double tangent direction. The displacement coefficient of the first LOD is calculated relative to the subdivision vertices of the base mesh, while the displacement coefficients of subsequent levels are calculated relative to the subdivision vertices of the reconstructed LOD from the previous LOD, thus enabling recursive subdivision of the displacement coefficient.
需要说明的是,在本公开实施例中,如果当前LOD为第i个LOD,i为大于2的整数,即当前LOD满足LoD大于2,那么,可以将当前LOD的第一点的位移系数确定为0。It should be noted that, in this embodiment of the disclosure, if the current LOD is the i-th LOD, where i is an integer greater than 2, that is, the current LOD satisfies that the LOD is greater than 2, then the displacement coefficient of the first point of the current LOD can be determined to be 0.
需要说明的是,在本公开的实施例中,当前LOD的第一点包括当前网格对应的重建基础网格的顶点,即第一点可以理解为与基点(例如,PB_1、PB_2、PB_3)重合或相邻的点。It should be noted that, in the embodiments of this disclosure, the first point of the current LOD includes the vertex of the reconstructed base mesh corresponding to the current mesh, that is, the first point can be understood as a point that coincides with or is adjacent to the base point (e.g., PB_1, PB_2, PB_3).
也就是说,在本公开的实施例中,如果第一语法元素指示当前网格使用非线性细分方式,且当前LOD大于2,那么可以直接将当前LOD的第一点的位移系数设置为0,并利用该位移系数进行后续的网格重建。In other words, in the embodiments of this disclosure, if the first syntax element indicates that the current mesh uses a non-linear subdivision method and the current LOD is greater than 2, then the displacement coefficient of the first point of the current LOD can be directly set to 0, and the displacement coefficient can be used for subsequent mesh reconstruction.
在步骤104中,根据当前LOD的细分网格和当前LOD的第一点的位移系数,确定当前网格中的下一LOD的重建网格。In step 104, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the first point of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的第一点的位移系数,确定当前网格中的下一LOD的重建网格,具体地:根据第一点的位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the first point of the current LOD. Specifically, the vertex coordinate information of the subdivision mesh of the current LOD is subjected to corresponding displacement calculation based on the displacement coefficient of the first point to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD,具体是将当前LOD的细分网格的每个顶点按照顺序加上解码得到的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD. Specifically, the displacement coefficients obtained by decoding are added sequentially to each vertex of the subdivided mesh of the current LOD, thereby obtaining the reconstructed mesh of the next LOD.
可以理解的是,在本公开的实施例中,在第一语法元素指示当前网格使用非线性细分方式时,如果当前LOD大于2,那么当前LOD的第一点的位移系数设置为0,即设置与基点重合或相邻的点(第一点)的位移为0,此时,在获得重建网格时,对于第一点,其实是将当前LOD的细分网格与0进行位移运算。It is understood that in the embodiments of this disclosure, when the first syntax element indicates that the current mesh uses a non-linear subdivision method, if the current LOD is greater than 2, then the displacement coefficient of the first point of the current LOD is set to 0, that is, the displacement of the point (the first point) that coincides with or is adjacent to the base point is set to 0. At this time, when the reconstructed mesh is obtained, for the first point, the subdivision mesh of the current LOD is actually subjected to displacement operation with 0.
在一些实施例中,该方法还可以包括:在确定当前网格中的下一LOD的重建网格之后,将下一LOD的重建网格作为当前LOD的重建网格,返回执行对当前LOD的重建网格进行细分,确定当前LOD的细分网格的步骤,直至确定出当前网格中的第L个LOD的重建网格;其中,L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, the method may further include: after determining the reconstruction grid of the next LOD in the current grid, using the reconstruction grid of the next LOD as the reconstruction grid of the current LOD, returning to the step of subdividing the reconstruction grid of the current LOD and determining the subdivided grid of the current LOD, until the reconstruction grid of the Lth LOD in the current grid is determined; wherein, the value of L is related to the number of subdivision iterations of the current grid.
还需要说明的是,在本公开实施例中,当前网格的细分迭代次数可以是由码流中的第二语法元素来指示。在一实施例中,该方法可以包括:解码码流,确定第二语法元素的取值;根据第二语法元素的取值,确定当前网格的细分迭代次数。It should also be noted that, in this embodiment of the disclosure, the number of subdivision iterations of the current grid can be indicated by a second syntax element in the bitstream. In one embodiment, the method may include: decoding the bitstream to determine the value of the second syntax element; and determining the number of subdivision iterations of the current grid based on the value of the second syntax element.
在本公开实施例中,第二语法元素可以用asps_vmc_ext_subdivision_iteration_count表示。也就是说,当前网格的细分迭代次数可以是由码流中的asps_vmc_ext_subdivision_iteration_count所指示的数值。In this embodiment of the disclosure, the second syntax element can be represented by asps_vmc_ext_subdivision_iteration_count. That is, the number of subdivision iterations of the current grid can be the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
另外,L表示当前网格对应的LOD层数,L的取值可以是由当前网格的细分迭代次数确定的,即L的取值等于asps_vmc_ext_subdivision_iteration_count所指示的数值。Additionally, L represents the LOD level corresponding to the current mesh. The value of L can be determined by the number of subdivision iterations of the current mesh, that is, the value of L is equal to the value indicated by asps_vmc_ext_subdivision_iteration_count.
进一步地,图17为本公开实施例提供的一种解码方法的流程示意图二。如图17所示,在步骤102之后,该方法可以包括以下步骤。Furthermore, Figure 17 is a second schematic flowchart of a decoding method provided by an embodiment of this disclosure. As shown in Figure 17, after step 102, the method may include the following steps.
在步骤105中,在当前LOD为第i个LOD的情况下,解码码流,确定当前LOD的第二点的位移系数。其中,第二点不包括当前网格对应的重建基础网格的顶点。换句话说,第二点为当前网格对应的重建基础网格中的点中的除了第一点以外的点。In step 105, if the current LOD is the i-th LOD, the bitstream is decoded to determine the displacement coefficient of the second point of the current LOD. The second point does not include the vertices of the reconstructed base mesh corresponding to the current mesh. In other words, the second point is any point in the reconstructed base mesh corresponding to the current mesh, excluding the first point.
需要说明的是,在本公开实施例中,如果当前LOD为第i个LOD,i为大于2的整数,即当前LOD满足LoD大于2,那么,可以将当前LOD的第一点的位移系数确定为0,而第二点的位移系数则可以通过解码码流获得的。在这里,码流可以是位移码流。对于位移码流的具体解码方式也可以有多种,如视频解码、熵解码等等。也就是说,在本公开实施例中,可以通过视频解码器进行解码来获得位移信息,或者可以通过熵解码器进行解码来获得位移信息,这里也不作任何限定。It should be noted that, in this embodiment, if the current LOD is the i-th LOD, where i is an integer greater than 2 (i.e., the current LOD satisfies LOD greater than 2), then the displacement coefficient of the first point of the current LOD can be determined to be 0, while the displacement coefficient of the second point can be obtained by decoding the bitstream. Here, the bitstream can be a displacement bitstream. There can be various specific decoding methods for the displacement bitstream, such as video decoding, entropy decoding, etc. That is, in this embodiment, displacement information can be obtained by decoding using a video decoder or an entropy decoder; no limitation is made here.
需要说明的是,在本公开的实施例中,当前LOD的第二点不包括当前网格对应的重建基础网格的顶点,即第二点可以理解为与基点(例如,PB_1、PB_2、PB_3)不接近的点。It should be noted that in the embodiments disclosed herein, the second point of the current LOD does not include the vertices of the reconstructed base mesh corresponding to the current mesh. That is, the second point can be understood as a point that is not close to the base point (e.g., PB_1, PB_2, PB_3).
也就是说,在本公开的实施例中,如果第一语法元素指示当前网格使用非线性细分方式,且当前LOD的层数大于2,一方面可以将当前LOD的第一点的位移系数设置为0,同时可以通过解码码流确定当前LOD的第二点的位移系数。In other words, in the embodiments of this disclosure, if the first syntax element indicates that the current grid uses a non-linear subdivision method and the number of layers of the current LOD is greater than 2, on the one hand, the displacement coefficient of the first point of the current LOD can be set to 0, and on the other hand, the displacement coefficient of the second point of the current LOD can be determined by decoding the bitstream.
在步骤106中,根据当前LOD的细分网格和当前LOD的第二点的位移系数,确定当前网格中的下一LOD的重建网格。In step 106, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the second point of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的第二点的位移系数,确定当前网格中的下一LOD的重建网格,可以包括:根据第二点的位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, determining the reconstructed mesh of the next LOD in the current mesh based on the subdivision mesh of the current LOD and the displacement coefficient of the second point of the current LOD may include: performing corresponding displacement calculations on the vertex coordinate information of the subdivision mesh of the current LOD based on the displacement coefficient of the second point to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD,具体是将当前LOD的细分网格的每个顶点按照顺序加上解码得到的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD. Specifically, the displacement coefficients obtained by decoding are added sequentially to each vertex of the subdivided mesh of the current LOD, thereby obtaining the reconstructed mesh of the next LOD.
进一步地,在本公开的实施例中,图18为本公开实施例提供的一种解码方法的流程示意图三。如图18所示,在步骤102之后,该方法可以包括以下步骤。Furthermore, in an embodiment of this disclosure, Figure 18 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure. As shown in Figure 18, after step 102, the method may include the following steps.
在步骤107中,在当前LOD为第二LOD的情况下,解码码流,确定当前LOD的位移系数。In step 107, if the current LOD is the second LOD, the bitstream is decoded to determine the shift coefficient of the current LOD.
需要说明的是,在本公开实施例中,如果当前LOD为第二LOD,即当前LOD为LoD 2,那么,可以通过解码码流获得当前LOD的位移系数。在这里,码流可以是位移码流。对于位移码流的具体解码方式也可以有多种,如视频解码、熵解码等等。也就是说,在本公开实施例中,可以通过视频解码器进行解码来获得位移信息,或者可以通过熵解码器进行解码来获得位移信息,这里也不作任何限定。It should be noted that, in this embodiment of the disclosure, if the current LOD is the second LOD, i.e., the current LOD is LoD 2, then the displacement coefficient of the current LOD can be obtained by decoding the bitstream. Here, the bitstream can be a displacement bitstream. There can be various specific decoding methods for the displacement bitstream, such as video decoding, entropy decoding, etc. That is to say, in this embodiment of the disclosure, displacement information can be obtained by decoding with a video decoder or by decoding with an entropy decoder, and no limitation is made here.
在步骤108中,根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。In step 108, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格,具体地:根据位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD. Specifically, the vertex coordinate information of the subdivision mesh of the current LOD is subjected to corresponding displacement calculation based on the displacement coefficient to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD,具体是将当前LOD的细分网格的每个顶点按照顺序加上解码得到的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD. Specifically, the displacement coefficients obtained by decoding are added sequentially to each vertex of the subdivided mesh of the current LOD, thereby obtaining the reconstructed mesh of the next LOD.
在一些实施例中,该方法还可以包括:在确定当前网格中的下一LOD的重建网格之后,将下一LOD的重建网格作为当前LOD的重建网格,返回执行对当前LOD的重建网格进行细分,确定当前LOD的细分网格的步骤,直至确定出当前网格中的第L个LOD的重建网格;其中,L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, the method may further include: after determining the reconstruction grid of the next LOD in the current grid, using the reconstruction grid of the next LOD as the reconstruction grid of the current LOD, returning to the step of subdividing the reconstruction grid of the current LOD and determining the subdivided grid of the current LOD, until the reconstruction grid of the Lth LOD in the current grid is determined; wherein, the value of L is related to the number of subdivision iterations of the current grid.
还需要说明的是,在本公开实施例中,当前网格的细分迭代次数可以是由码流中的第二语法元素来指示。在一实施例中,该方法可以包括:解码码流,确定第二语法元素的取值;根据第二语法元素的取值,确定当前网格的细分迭代次数。It should also be noted that, in this embodiment of the disclosure, the number of subdivision iterations of the current grid can be indicated by a second syntax element in the bitstream. In one embodiment, the method may include: decoding the bitstream to determine the value of the second syntax element; and determining the number of subdivision iterations of the current grid based on the value of the second syntax element.
在本公开实施例中,第二语法元素可以用asps_vmc_ext_subdivision_iteration_count表示。也就是说,当前网格的细分迭代次数可以是由码流中的asps_vmc_ext_subdivision_iteration_count所指示的数值。In this embodiment of the disclosure, the second syntax element can be represented by asps_vmc_ext_subdivision_iteration_count. That is, the number of subdivision iterations of the current grid can be the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
另外,L表示当前网格对应的LOD层数,L的取值可以是由当前网格的细分迭代次数确定的,即L的取值等于asps_vmc_ext_subdivision_iteration_count所指示的数值。Additionally, L represents the LOD level corresponding to the current mesh. The value of L can be determined by the number of subdivision iterations of the current mesh, that is, the value of L is equal to the value indicated by asps_vmc_ext_subdivision_iteration_count.
进一步地,在本公开的实施例中,图19为本公开实施例提供的一种解码方法的流程示意图四。如图19所示,在步骤101之后,该方法可以包括:Further, in an embodiment of this disclosure, Figure 19 is a schematic flowchart of a decoding method provided in an embodiment of this disclosure. As shown in Figure 19, after step 101, the method may include:
在步骤109中,在第一语法元素指示当前网格使用递归细分方式时,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格。In step 109, when the first syntax element indicates that the current mesh uses a recursive subdivision method, the reconstructed mesh of the current LOD in the current mesh is determined, and the reconstructed mesh of the current LOD is subdivided to determine the subdivided mesh of the current LOD.
需要说明的是,在本公开实施例中,第一语法元素也可以用于指示当前网格是否使用递归细分方式。其中,在第一语法元素的取值为第一值时,确定第一语法元素指示当前网格不使用细分方式;在第一语法元素的取值为第二值时,确定第一语法元素指示当前网格使用中点细分方式;在第一语法元素的取值为第三值时,确定第一语法元素指示当前网格使用递归细分方式;在第一语法元素的取值为第四值时,确定第一语法元素指示当前网格使用非线性细分方式。It should be noted that, in this embodiment of the disclosure, the first syntax element can also be used to indicate whether the current mesh uses a recursive subdivision method. Specifically, when the value of the first syntax element is a first value, it is determined that the first syntax element indicates that the current mesh does not use a subdivision method; when the value of the first syntax element is a second value, it is determined that the first syntax element indicates that the current mesh uses a midpoint subdivision method; when the value of the first syntax element is a third value, it is determined that the first syntax element indicates that the current mesh uses a recursive subdivision method; and when the value of the first syntax element is a fourth value, it is determined that the first syntax element indicates that the current mesh uses a non-linear subdivision method.
在这里,第一值、第二值、第三值、第四值各不相同。示例性地,第一值可以设置为0,第二值可以设置为1,第三值可以设置为2,第四值可以设置为3。也就是说,根据第一语法元素的取值不同,能够确定当前网格是否使用递归细分方式。Here, the first, second, third, and fourth values are all different. For example, the first value can be set to 0, the second value can be set to 1, the third value can be set to 2, and the fourth value can be set to 3. That is, based on the different values of the first syntax element, it can be determined whether the current grid uses a recursive subdivision method.
在一实施例中,如果第一语法元素的取值为0,那么可以确定当前网格不使用任何细分方式,例如中点细分方式、递归细分方式、非线性细分方式等;如果第一语法元素的取值为1,那么可以确定当前网格使用中点细分方式;如果第一语法元素的取值为2,那么可以确定当前网格使用递归细分方式;如果第一语法元素的取值为3,那么可以确定当前网格使用非线性细分方式。In one embodiment, if the value of the first syntax element is 0, it can be determined that the current grid does not use any subdivision method, such as midpoint subdivision, recursive subdivision, non-linear subdivision, etc.; if the value of the first syntax element is 1, it can be determined that the current grid uses midpoint subdivision; if the value of the first syntax element is 2, it can be determined that the current grid uses recursive subdivision; if the value of the first syntax element is 3, it can be determined that the current grid uses non-linear subdivision.
还需要说明的是,在本公开实施例中,在当前网格使用递归细分方式时,可以由至少一个LOD进行递归重建得到当前网格的重建网格。具体地,在得到当前网格中的当前LOD的重建网格之后可以对当前LOD的重建网格进行细分,确定当前LOD的细分网格。然后根据细分网格和码流中的位移系数,从而能够递归得到当前LOD的下一LOD的重建网格。It should also be noted that, in this embodiment of the disclosure, when the current grid uses a recursive subdivision method, the reconstructed grid of the current grid can be obtained by recursively reconstructing at least one LOD. Specifically, after obtaining the reconstructed grid of the current LOD in the current grid, the reconstructed grid of the current LOD can be subdivided to determine the subdivided grid of the current LOD. Then, based on the subdivided grid and the displacement coefficients in the bitstream, the reconstructed grid of the next LOD of the current LOD can be recursively obtained.
在一些实施例中,首先确定当前网格中的第一LOD的重建网格。该方法可以包括:解码码流,确定重建基础网格;对重建基础网格进行细分,确定初始细分网格;解码码流,确定初始细分网格的位移系数;根据初始细分网格和初始细分网格的位移系数,确定当前网格中的第一LOD的重建网格。In some embodiments, the reconstructed grid of the first LOD in the current grid is first determined. The method may include: decoding the bitstream to determine the reconstructed base grid; subdividing the reconstructed base grid to determine the initial subdivision grid; decoding the bitstream to determine the displacement coefficients of the initial subdivision grid; and determining the reconstructed grid of the first LOD in the current grid based on the initial subdivision grid and the displacement coefficients of the initial subdivision grid.
在本公开实施例中,基础网格又可以称为“简化网格”。在一些实施例中,通过解码基础网格码流,确定重建基础网格。示例性地,可以是通过网格解码器(例如EdgeBreaker等)解码基础网格码流,以获得重建基础网格。In this disclosure, the base mesh may also be referred to as a "simplified mesh". In some embodiments, the reconstructed base mesh is determined by decoding the base mesh bitstream. Exemplarily, the reconstructed base mesh may be obtained by decoding the base mesh bitstream using a mesh decoder (e.g., EdgeBreaker).
在本公开实施例中,对于第一LOD来说,位移系数是指原始网格的顶点坐标信息和初始细分网格的顶点坐标信息之间的差异。这样,在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格,再根据LOD1上的细分网格和对应的位移系数可以确定出LOD2的重建网格,依次类推,直至重建完成。In this embodiment, for the first LOD, the displacement coefficient refers to the difference between the vertex coordinate information of the original mesh and the vertex coordinate information of the initial subdivided mesh. Thus, after decoding to obtain the displacement coefficient of the initial subdivided mesh, corresponding displacement calculations are performed on the vertex coordinate information of the initial subdivided mesh based on this displacement coefficient to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, based on the reconstructed mesh of LOD1, further subdivision is performed to obtain the subdivided mesh on LOD1. Then, based on the subdivided mesh on LOD1 and the corresponding displacement coefficient, the reconstructed mesh of LOD2 can be determined, and so on, until reconstruction is complete.
在步骤110中,解码码流,确定当前LOD的位移系数。In step 110, the bitstream is decoded to determine the displacement coefficient of the current LOD.
需要说明的是,在本公开实施例中,位移系数可以包括一个或多个方向上的位移分量,如图3所示,位移系数包括法线方向、切线方向和双切线方向等三个方向上的位移分量。其中,第一LOD的位移系数是相对于基础网格的细分顶点来计算的,后续层级的位移系数则都是相对于前一LOD重建LOD的细分顶点来计算的,从而可以实现位移系数的递归细分。It should be noted that, in this embodiment, the displacement coefficient may include displacement components in one or more directions, as shown in Figure 3. The displacement coefficient includes displacement components in three directions: normal direction, tangent direction, and double tangent direction. The displacement coefficient of the first LOD is calculated relative to the subdivision vertices of the base mesh, while the displacement coefficients of subsequent levels are calculated relative to the subdivision vertices of the reconstructed LOD from the previous LOD, thus enabling recursive subdivision of the displacement coefficient.
还需要说明的是,在本公开实施例中,当前LOD的位移系数是通过解码码流获得的。在这里,码流可以是位移码流。对于位移码流的具体解码方式也可以有多种,如视频解码、熵解码等等。也就是说,在本公开实施例中,可以通过视频解码器进行解码来获得位移信息,或者可以通过熵解码器进行解码来获得位移信息,这里也不作任何限定。It should also be noted that, in this embodiment of the disclosure, the displacement coefficient of the current LOD is obtained by decoding the bitstream. Here, the bitstream can be a displacement bitstream. There can be various specific decoding methods for the displacement bitstream, such as video decoding, entropy decoding, etc. That is to say, in this embodiment of the disclosure, displacement information can be obtained by decoding with a video decoder or by decoding with an entropy decoder, and no limitation is made here.
在一些实施例中,对于步骤105、步骤107、步骤110中任一个步骤所涉及的确定当前LOD的位移系数的方法,具体可以包括:解码码流,确定当前LOD的解码位移系数。根据当前LOD的量化参数对当前LOD的解码位移系数进行反量化,确定当前LOD的反量化位移系数。对当前LOD的反量化位移系数进行逆小波变换,确定当前LOD的位移系数。In some embodiments, the method for determining the shift coefficients of the current LOD involved in any of steps 105, 107, and 110 may specifically include: decoding the bitstream to determine the decoded shift coefficients of the current LOD; dequantizing the decoded shift coefficients of the current LOD according to the quantization parameters of the current LOD to determine the dequantized shift coefficients of the current LOD; and performing an inverse wavelet transform on the dequantized shift coefficients of the current LOD to determine the shift coefficients of the current LOD.
需要说明的是,在本公开实施例中,在解码获得当前LOD的解码位移系数之后,可以对当前LOD的解码位移系数进行预处理,确定当前LOD的位移系数。其中,预处理可以包括反量化、逆小波变换等处理。It should be noted that, in this embodiment of the disclosure, after decoding to obtain the decoded shift coefficients of the current LOD, the decoded shift coefficients of the current LOD can be preprocessed to determine the shift coefficients of the current LOD. The preprocessing may include inverse quantization, inverse wavelet transform, and other similar processes.
在一实施例中,对当前LOD的解码位移系数进行预处理,确定当前LOD的位移系数,具体地:确定当前LOD的量化参数;根据当前LOD的量化参数对当前LOD的解码位移系数进行反量化,确定当前LOD的反量化位移系数;对当前LOD的反量化位移系数进行逆小波变换,确定当前LOD的位移系数。In one embodiment, the decoding shift coefficients of the current LOD are preprocessed to determine the shift coefficients of the current LOD. Specifically, the quantization parameters of the current LOD are determined; the decoding shift coefficients of the current LOD are dequantized according to the quantization parameters of the current LOD to determine the dequantized shift coefficients of the current LOD; and the dequantized shift coefficients of the current LOD are subjected to inverse wavelet transform to determine the shift coefficients of the current LOD.
需要说明的是,在本公开实施例中,反量化是量化的逆过程,用于将量化后的定点转换为浮点数;而逆小波变换是小波转换的逆过程,用于将小波域中的信号恢复到原始的时间域,从而可以得到当前LOD的位移系数。It should be noted that in this embodiment, inverse quantization is the reverse process of quantization, used to convert quantized fixed-point numbers into floating-point numbers; while inverse wavelet transform is the reverse process of wavelet transform, used to restore the signal in the wavelet domain to the original time domain, thereby obtaining the displacement coefficient of the current LOD.
还需要说明的是,在本公开实施例中,量化参数(Quantizer Parameter,QP)反映了空间细节压缩情况。其中,值越小,量化越精细,图像质量越高,产生的码流也越长。如QP小,大部分的细节都会被保留;QP增大,一些细节丢失,码率降低,但图像失真加强和质量下降。具体地,QP是量化步长Qstep的序号,QP的取值为0 时,表示量化最精细;相反,QP的取值为51时,表示量化越粗糙。It should also be noted that in this embodiment, the quantizer parameter (QP) reflects the spatial detail compression. A smaller value indicates finer quantization, higher image quality, and a longer bitstream. If QP is small, most details are preserved; if QP is large, some details are lost, the bitrate decreases, but image distortion increases and quality deteriorates. Specifically, QP is the sequence number of the quantization step size Qstep. A QP value of 0 indicates the finest quantization; conversely, a QP value of 51 indicates coarser quantization.
在一种可能的实现方式中,对于当前LOD的量化参数来说,该方法可以包括:解码码流,确定当前LOD的量化参数。In one possible implementation, for the quantization parameters of the current LOD, the method may include: decoding the bitstream to determine the quantization parameters of the current LOD.
在另一种可能的实现方式中,对于当前LOD的量化参数来说,该方法可以包括:确定当前LOD的前一LOD的量化参数;解码码流,确定当前LOD的量化参数增量;根据前一LOD的量化参数和量化参数增量,确定当前LOD的量化参数。In another possible implementation, for the quantization parameters of the current LOD, the method may include: determining the quantization parameters of the previous LOD; decoding the bitstream to determine the quantization parameter increment of the current LOD; and determining the quantization parameters of the current LOD based on the quantization parameters of the previous LOD and the quantization parameter increment.
也就是说,编码端可以将量化参数直接写入码流,使得解码端通过解码即可得到对应的量化参数;或者编码端也可以将量化参数增量写入码流,然后解码端根据解码得到的量化参数增量和前一LOD的量化参数也可以得到对应的量化参数。In other words, the encoder can directly write the quantization parameters into the bitstream, so that the decoder can obtain the corresponding quantization parameters through decoding; or the encoder can write the quantization parameter increment into the bitstream, and then the decoder can obtain the corresponding quantization parameters based on the quantization parameter increment obtained from decoding and the quantization parameters of the previous LOD.
示例性地,假设当前LOD的量化参数可以用QP(i)表示,前一LOD的量化参数可以用QP(i-1)表示,量化参数增量可以用ΔQP表示,那么QP(i)= QP(i-1)+ΔQP。其中,对于第一LOD的量化参数来说,可以是将对应的量化参数QP(1) 直接写入码流。For example, assuming the quantization parameter of the current LOD can be represented by QP(i), the quantization parameter of the previous LOD can be represented by QP(i-1), and the quantization parameter increment can be represented by ΔQP, then QP(i) = QP(i-1) + ΔQP. For the quantization parameter of the first LOD, the corresponding quantization parameter QP(1) can be directly written into the bitstream.
需要注意的是,在本公开实施例中,也可以是在编码端和解码端设置一个参考量化参数,然后将每一LOD的量化参数与参考量化参数之间的量化参数增量写入码流。这样,解码端在解码码流确定出当前LOD的量化参数增量之后,可以根据当前LOD的量化参数增量和参考量化参数来确定出当前LOD的量化参数,从而也能够节省解码量化参数的信令开销。It should be noted that, in this embodiment, a reference quantization parameter can also be set at both the encoding and decoding ends, and then the quantization parameter increment between the quantization parameter of each LOD and the reference quantization parameter can be written into the bitstream. In this way, after the decoding end determines the quantization parameter increment of the current LOD by decoding the bitstream, it can determine the quantization parameter of the current LOD based on the quantization parameter increment of the current LOD and the reference quantization parameter, thereby saving signaling overhead for decoding the quantization parameter.
在一些实施例中,解码码流,确定当前LOD的解码位移系数,可以包括:解码码流,确定二维图像;根据预设填充方式从二维图像中进行位移系数提取,得到当前LOD的解码位移系数。In some embodiments, decoding the bitstream and determining the decoding displacement coefficients of the current LOD may include: decoding the bitstream and determining a two-dimensional image; extracting displacement coefficients from the two-dimensional image according to a preset filling method to obtain the decoding displacement coefficients of the current LOD.
在本公开实施例中,可以是解码位移码流来确定当前LOD的解码位移系数。另外,预设填充方式包括正向填充方式或者反向填充方式。其中,对于预设填充方式的确定,可以是解码端和编码端设置相同的填充方式,或者也可以是根据码流中的第三语法元素来指示。In this embodiment of the disclosure, the decoding shift coefficient of the current LOD can be determined by decoding the shift bitstream. Additionally, the preset padding method includes either forward padding or reverse padding. The preset padding method can be determined by setting the same padding method at both the decoding and encoding ends, or it can be indicated by a third syntax element in the bitstream.
在一实施例中,该方法可以包括:解码码流,确定第三语法元素的取值;根据第三语法元素的取值,确定预设填充方式。In one embodiment, the method may include: decoding the bitstream to determine the value of a third syntax element; and determining a preset padding method based on the value of the third syntax element.
在本公开实施例中,第三语法元素可以可以用dmsps_packing_order表示。也就是说,预设填充方式可以是由码流中的dmsps_packing_order所指示的填充方式。In this embodiment of the disclosure, the third syntax element can be represented by dmsps_packing_order. That is, the preset padding method can be the padding method indicated by dmsps_packing_order in the bitstream.
这样,在本公开实施例中,位移码流可以通过位移解码器进行解码。若编码端通过视频编码的方式压缩位移,则解码端通过相应的视频解码器进行解码,并根据预设填充方式将其从二维图像中按照对应的顺序恢复出来。再对其执行反量化、逆小波变换等操作使其恢复出与编码端一致的位移系数。否则,如果编码端对位移系数采用熵编码的方式,那么解码端可以直接对其进行熵解码,再进行后续的反量化、逆小波变换等操作,以得到当前LOD的位移系数。Thus, in this embodiment, the displacement bitstream can be decoded by a displacement decoder. If the encoder compresses the displacement using video encoding, the decoder decodes it using a corresponding video decoder and recovers it from the two-dimensional image in the corresponding order according to a preset padding method. Then, it performs operations such as inverse quantization and inverse wavelet transform to recover the displacement coefficients consistent with those of the encoder. Otherwise, if the encoder uses entropy encoding for the displacement coefficients, the decoder can directly perform entropy decoding, followed by subsequent inverse quantization, inverse wavelet transform, and other operations to obtain the displacement coefficients of the current LOD.
步骤1011:根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。Step 1011: Determine the reconstructed mesh of the next LOD in the current mesh based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格,具体地:根据位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD. Specifically, the vertex coordinate information of the subdivision mesh of the current LOD is subjected to corresponding displacement calculation based on the displacement coefficient to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD,具体是将当前LOD的细分网格的每个顶点按照顺序加上解码得到的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD. Specifically, the displacement coefficients obtained by decoding are added sequentially to each vertex of the subdivided mesh of the current LOD, thereby obtaining the reconstructed mesh of the next LOD.
在一些实施例中,该方法还可以包括:在确定当前网格中的下一LOD的重建网格之后,将下一LOD的重建网格作为当前LOD的重建网格,返回执行对当前LOD的重建网格进行细分,确定当前LOD的细分网格的步骤,直至确定出当前网格中的第L个LOD的重建网格;其中,L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, the method may further include: after determining the reconstruction grid of the next LOD in the current grid, using the reconstruction grid of the next LOD as the reconstruction grid of the current LOD, returning to the step of subdividing the reconstruction grid of the current LOD and determining the subdivided grid of the current LOD, until the reconstruction grid of the Lth LOD in the current grid is determined; wherein, the value of L is related to the number of subdivision iterations of the current grid.
还需要说明的是,在本公开实施例中,当前网格的细分迭代次数可以是由码流中的第二语法元素来指示。在一实施例中,该方法可以包括:解码码流,确定第二语法元素的取值;根据第二语法元素的取值,确定当前网格的细分迭代次数。It should also be noted that, in this embodiment of the disclosure, the number of subdivision iterations of the current grid can be indicated by a second syntax element in the bitstream. In one embodiment, the method may include: decoding the bitstream to determine the value of the second syntax element; and determining the number of subdivision iterations of the current grid based on the value of the second syntax element.
在本公开实施例中,第二语法元素可以用asps_vmc_ext_subdivision_iteration_count表示。也就是说,当前网格的细分迭代次数可以是由码流中的asps_vmc_ext_subdivision_iteration_count所指示的数值。In this embodiment of the disclosure, the second syntax element can be represented by asps_vmc_ext_subdivision_iteration_count. That is, the number of subdivision iterations of the current grid can be the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
另外,L表示当前网格对应的LOD层数,L的取值可以是由当前网格的细分迭代次数确定的,即L的取值等于asps_vmc_ext_subdivision_iteration_count所指示的数值。Additionally, L represents the LOD level corresponding to the current mesh. The value of L can be determined by the number of subdivision iterations of the current mesh, that is, the value of L is equal to the value indicated by asps_vmc_ext_subdivision_iteration_count.
这样,在本公开实施例中,对于第一语法元素指示示当前网格使用递归细分方式的情况,如图20所示,首先对基础网格进行细分,可以得到初始细分网格;在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格;然后在解码获得LOD1的位移系数之后,根据LOD1上的细分网格以及LOD1的位移系数可以确定出LOD2的重建网格,依次类推,直至得到LOD L的重建网格,表明当前网格重建完成。其中,在图20中,黑色实线(由顶点PB_1、PB_2和PB_3组成)表示基础网格,黑色虚线表示细分网格,第一加粗实线则为应用位移的LOD1,第二加粗实线则为应用位移的LOD2。Thus, in this embodiment of the disclosure, when the first syntax element indicates that the current mesh uses a recursive subdivision method, as shown in Figure 20, the base mesh is first subdivided to obtain an initial subdivided mesh. After decoding to obtain the displacement coefficients of the initial subdivided mesh, the vertex coordinate information of the initial subdivided mesh is subjected to corresponding displacement calculations based on these displacement coefficients to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, the reconstructed mesh of LOD1 is subdivided to obtain the subdivided mesh on LOD1. After decoding to obtain the displacement coefficients of LOD1, the reconstructed mesh of LOD2 can be determined based on the subdivided mesh on LOD1 and the displacement coefficients of LOD1, and so on, until the reconstructed mesh of LOD L is obtained, indicating that the current mesh reconstruction is complete. In Figure 20, the black solid line (composed of vertices PB_1, PB_2, and PB_3) represents the base mesh, the black dashed line represents the subdivided mesh, the first bold solid line is LOD1 with applied displacement, and the second bold solid line is LOD2 with applied displacement.
在一些实施例中,递归细分的详细流程如图21所示,该详细流程可以包括如下步骤。In some embodiments, the detailed process of recursive subdivision is shown in Figure 21, and the detailed process may include the following steps.
在步骤S1901中,首先对原始网格进行网格简化,以得到基础网格。在步骤S1902中,对基础网格进行量化。在步骤S1903中对量化后的基础网格进行编码。在步骤S1904中解析码流以从码流中解码基础网络,以得到重建的基础网格。在步骤S1905中,初始化n=0,并将重建的基础网格作为临时网格进行网格细分。在步骤S1906中,根据细分网格和原始网格计算位移系数。在步骤S1907中,根据位移系数和细分网格来更新临时网格,以及将位移系数保存至存储器。在步骤S1909中,判断n是否小于L-1。若步骤S1909的判断结果为是,即n<L-1,则n=n+1(S1910),然后继续执行步骤S1905至S1909。若步骤S1909的判断结果为否,即n<L-1不成立,则表明细分完成。最后,将位移系数编码到码流中。In step S1901, the original mesh is first simplified to obtain a base mesh. In step S1902, the base mesh is quantized. In step S1903, the quantized base mesh is encoded. In step S1904, the bitstream is parsed to decode the base network from the bitstream to obtain the reconstructed base mesh. In step S1905, n is initialized to 0, and the reconstructed base mesh is used as a temporary mesh for mesh subdivision. In step S1906, displacement coefficients are calculated based on the subdivided mesh and the original mesh. In step S1907, the temporary mesh is updated based on the displacement coefficients and the subdivided mesh, and the displacement coefficients are saved to memory. In step S1909, it is determined whether n is less than L-1. If the result of step S1909 is yes, i.e., n < L-1, then n = n + 1 (S1910), and steps S1905 to S1909 continue to be executed. If the result of step S1909 is no, i.e., n < L-1 is not true, then the subdivision is complete. Finally, the displacement coefficients are encoded into the bitstream.
这样,在本公开实施例中,对于第一语法元素指示示当前网格使用非线性细分方式的情况,如图22所示,首先对基础网格进行细分,可以得到初始细分网格;在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格;然后在解码获得LOD1的位移系数之后,根据LOD1上的细分网格以及LOD1的位移系数可以确定出LOD2的重建网格。对于LOD3到LOD L的重建网格,如LODi(i大于预设值,预设值可以是例如2),LOD i中的相邻基基础格顶点(第一点)的位移系数可以设置为0,而其他点(第二点)的位移系数依然可以解码获得,根据LOD i上的细分网格以及LOD i的位移系数可以确定下一LOD的重建网格。依次类推,直至得到LOD L的重建网格,表明当前网格重建完成。其中,在图22中,黑色实线(由顶点PB_1、PB_2和PB_3组成)表示基础网格,黑色虚线表示细分网格,第一加粗实线则为应用位移的LOD1,第二加粗实线则为应用位移的LOD2。尽管预设值可以是例如2,但是各实施例并不限于此。在各个实施例中,预设值可以是2,3,4,……,或任意其他整数。Thus, in this embodiment of the disclosure, when the first syntax element indicates that the current mesh uses a non-linear subdivision method, as shown in Figure 22, the base mesh is first subdivided to obtain an initial subdivided mesh. After decoding to obtain the displacement coefficients of the initial subdivided mesh, the vertex coordinate information of the initial subdivided mesh is subjected to corresponding displacement calculations based on these displacement coefficients to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, the reconstructed mesh of LOD1 is subdivided to obtain the subdivided mesh on LOD1. After decoding to obtain the displacement coefficients of LOD1, the reconstructed mesh of LOD2 can be determined based on the subdivided mesh on LOD1 and the displacement coefficients of LOD1. For the reconstructed meshes from LOD3 to LOD L, such as LODi (i is greater than a preset value, which can be, for example, 2), the displacement coefficients of the adjacent base base mesh vertices (first point) in LOD i can be set to 0, while the displacement coefficients of other points (second point) can still be decoded. The reconstructed mesh of the next LOD can be determined based on the subdivided mesh on LOD i and the displacement coefficients of LOD i. This process continues until the reconstructed mesh of LOD L is obtained, indicating that the current mesh reconstruction is complete. In Figure 22, the solid black line (composed of vertices PB_1, PB_2, and PB_3) represents the base mesh, the dashed black line represents the subdivision mesh, the first bold solid line is the LOD1 with applied displacement, and the second bold solid line is the LOD2 with applied displacement. Although the preset value can be, for example, 2, the embodiments are not limited to this. In various embodiments, the preset value can be 2, 3, 4, ..., or any other integer.
在一些实施例中,非线性细分的详细流程如图23所示,该详细流程可以包括如下步骤。In some embodiments, the detailed process of nonlinear subdivision is shown in Figure 23, and the detailed process may include the following steps.
在步骤S1901中,对原始网格进行网格简化,以得到基础网格。在步骤S1902中,对基础网格进行量化。在步骤S1903中,对量化后的基础网格进行编码。在步骤S1904中,解析码流,以从码流中解码基础网络,以得到重建的基础网格。在步骤S1905中,初始化n=0,并将重建的基础网格作为临时网格进行网格细分。在步骤S1906中,根据细分网格和原始网格计算位移系数。在步骤S1911中,为了去冗余,删除相邻基础格顶点的位移系数。在步骤S1907中,根据位移系数和细分网格来更新临时网格。在步骤S1908中,将其他位移系数保存至存储器。在步骤S1909中,判断n是否小于L-1。若步骤S1909中的判断结果为是,即n<L-1,则n=n+1(S1910),然后继续执行S1905至S1909。若步骤S1909中的判断结果为否,即n<L-1不成立,则表明细分完成。最后,还需要将其他位移系数编码到码流中。In step S1901, the original mesh is simplified to obtain the base mesh. In step S1902, the base mesh is quantized. In step S1903, the quantized base mesh is encoded. In step S1904, the bitstream is parsed to decode the base network from the bitstream to obtain the reconstructed base mesh. In step S1905, n is initialized to 0, and the reconstructed base mesh is used as a temporary mesh for mesh subdivision. In step S1906, displacement coefficients are calculated based on the subdivided mesh and the original mesh. In step S1911, to remove redundancy, displacement coefficients of adjacent base mesh vertices are deleted. In step S1907, the temporary mesh is updated based on the displacement coefficients and the subdivided mesh. In step S1908, other displacement coefficients are saved to memory. In step S1909, it is determined whether n is less than L-1. If the judgment result in step S1909 is yes, i.e., n < L-1, then n = n + 1 (S1910), and then continue to execute S1905 to S1909. If the judgment result in step S1909 is no, i.e., n < L-1 is not true, then the subdivision is complete. Finally, the other shift coefficients need to be encoded into the bitstream.
也就是说,在本公开的实施例中,当多LOD(LoD)大于2且asps_vdmc_ext_subdivision_method 为3时,属于包含基础网格顶点的边的位移被推断为等于零,并且这些位移被添加到用于基础重建的位移列表中的对应位置。In other words, in the embodiments of this disclosure, when the multiple LOD (LoD) is greater than 2 and asps_vdmc_ext_subdivision_method is 3, the displacements of edges containing the base mesh vertices are inferred to be equal to zero, and these displacements are added to the corresponding positions in the displacement list used for base reconstruction.
还可以理解地,在当前网格不使用递归细分方式时,这时候当前网格可以使用中点细分方式。在一些实施例中,如图24所示,该方法可以包括如下步骤。It is also understandable that when the current mesh does not use recursive subdivision, the current mesh can use midpoint subdivision. In some embodiments, as shown in Figure 24, the method may include the following steps.
在步骤201中,在第一语法元素指示当前网格使用中点细分方式时,解码码流,确定重建基础网格。In step 201, when the first syntax element indicates that the current grid uses a midpoint subdivision method, the bitstream is decoded to determine the reconstructed base grid.
在步骤202中,对重建基础网格进行细分,确定当前网格中的至少一个LOD的细分网格。In step 202, the reconstructed base mesh is subdivided to determine the subdivision mesh of at least one LOD in the current mesh.
在步骤203中,解码码流,确定当前网格中的至少一个LOD的位移系数。In step 203, the bitstream is decoded to determine the displacement coefficient of at least one LOD in the current grid.
在步骤204中,根据当前网格中的至少一个LOD的细分网格和至少一个LOD的位移系数,确定当前网格中的至少一个LOD的重建网格。In step 204, the reconstructed mesh of at least one LOD in the current mesh is determined based on the subdivision mesh of at least one LOD in the current mesh and the displacement coefficient of at least one LOD.
需要说明的是,在本公开实施例中,至少一个LOD的层数与当前网格的细分迭代次数具有关联关系。在这里,L表示至少一个LOD的层数,即当前网格对应的LOD层数,它可以是等于码流中的asps_vmc_ext_ subdivision_iteration_count所指示的数值。It should be noted that, in this embodiment, the number of at least one LOD layer is related to the number of subdivision iterations of the current grid. Here, L represents the number of at least one LOD layer, that is, the LOD layer corresponding to the current grid, which can be equal to the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
还需要说明的是,在本公开实施例中,如图5和图6所示,当前网格使用中点细分方式时,这时候每一LOD的位移系数都是由细分网格的顶点坐标信息与原始网格的顶点坐标信息进行位移计算得到的,而不是基于先前重建的LOD上递归得到的。It should also be noted that, in the embodiments disclosed herein, as shown in Figures 5 and 6, when the current mesh uses the midpoint subdivision method, the displacement coefficient of each LOD is obtained by displacement calculation using the vertex coordinate information of the subdivided mesh and the vertex coordinate information of the original mesh, rather than recursively obtained based on the previously reconstructed LOD.
本公开实施例提供了一种解码方法,具体是一种动态网格的递归细分方法。在本公开的实施例中,通过增加第一语法元素指示当前网格使用非线性细分方式的情况,在解码阶段,接近基本层中的顶点的位移系数被推断为等于0,因而在后续将位移系数递归地应用于先前重建的LOD的过程中,能够改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。This disclosure provides a decoding method, specifically a recursive subdivision method for dynamic meshes. In this embodiment, by adding a first syntax element to indicate that the current mesh uses a non-linear subdivision method, during the decoding stage, the displacement coefficients of vertices near the base layer are inferred to be equal to 0. Therefore, in the subsequent recursive application of the displacement coefficients to the previously reconstructed LOD, the redundancy problem of displacement coefficients at higher levels can be improved, saving the encoding bits of the displacement coefficients and thus improving encoding and decoding efficiency.
在本公开的另一实施例中,图25为本公开实施例提供的一种编码方法的流程示意图一。如图25所示,该方法可以包括如下步骤。In another embodiment of this disclosure, FIG25 is a schematic flowchart of an encoding method provided by an embodiment of this disclosure. As shown in FIG25, the method may include the following steps.
在步骤301中,在当前网格使用非线性细分方式时,确定第一语法元素的取值,并将第一语法元素写入码流,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格。In step 301, when the current grid uses a non-linear subdivision method, the value of the first syntax element is determined and written into the code stream. The reconstructed grid of the current LOD in the current grid is determined and the reconstructed grid of the current LOD is subdivided to determine the subdivision grid of the current LOD.
需要说明的是,在本公开实施例中,该编码方法可以是一种网格细分方法,具体地,是一种用于动态网格编码的递归细分方法,能够提升编解码效率。It should be noted that, in the embodiments disclosed herein, the encoding method can be a grid subdivision method, specifically a recursive subdivision method for dynamic grid coding, which can improve encoding and decoding efficiency.
还需要说明的是,在本公开实施例中,基于视频的动态网格编码(Video-basedDynamic Mesh Coding,VDMC)是一种用于压缩三维网格的标准,其主要是利用已有的V3C标准对三维网格进行压缩。在本公开实施例中,细分方法在所有的LOD上共享功能,并且由Atlas序列参数集VDMC扩展RBSP语法结构中的两个语法元素来定义:asps_vdmc_ext_subdivision_method和asps_vdmc_ext_subdivision_ iteration_count,如前述的表1所示。It should also be noted that, in this embodiment of the disclosure, Video-based Dynamic Mesh Coding (VDMC) is a standard for compressing 3D meshes, which mainly utilizes the existing V3C standard to compress 3D meshes. In this embodiment of the disclosure, the subdivision method shares functionality across all LODs and is defined by two syntax elements in the Atlas sequence parameter set VDMC extended RBSP syntax structure: asps_vdmc_ext_subdivision_method and asps_vdmc_ext_subdivision_iteration_count, as shown in Table 1 above.
对于网格细分来说,由于细分的特殊性,较高级别的LOD通常退化为“0”位移,从而在信令和编码信息中引入显著的冗余。基于此,为了有效编码体积内容的网格表示的几何分量,可以通过去除诸如基础网格的边和来自先前LOD的继承值的情况下的冗余位移。本公开实施例提出了一种新的自适应细分方式,其中在较高LOD上,与基点相邻的边总是等于0。For mesh subdivision, due to the specific nature of subdivision, higher-level LODs often degenerate into "0" displacements, introducing significant redundancy in signaling and coding information. Therefore, to effectively encode the geometric components of the mesh representation of volumetric content, redundant displacements, such as edges of the base mesh and inherited values from previous LODs, can be removed. This disclosure proposes a novel adaptive subdivision scheme where, at higher LODs, edges adjacent to the base point are always equal to 0.
在本公开实施例中,可以通过设置第一语法元素来表示当前网格是否使用非线性细分方式。其中,这里的第一语法元素可以用asps_vdmc_ext_subdivision_method表示,用于指示网格的细分方法。示例性地,如表2所示,若第一语法元素的取值为0,则表示当前网格不使用细分方式;若第一语法元素的取值为1,则表示当前网格使用中点细分方式。In this embodiment of the disclosure, a first syntax element can be set to indicate whether the current mesh uses a non-linear subdivision method. This first syntax element can be represented by `asps_vdmc_ext_subdivision_method`, which indicates the mesh subdivision method. For example, as shown in Table 2, if the value of the first syntax element is 0, it indicates that the current mesh does not use a subdivision method; if the value of the first syntax element is 1, it indicates that the current mesh uses a midpoint subdivision method.
可以理解,在本公开实施例中,在前述表2的基础上,针对第一语法元素增加了新的取值,以使得第一语法元素能够用于指示当前网格是否使用非线性细分方式。在这里,非线性细分方式可以是创建与相关技术相同的细分,但是与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于0。换句话说,针对每一个LOD,位移是基于先前重建的LOD中的细分顶点计算得到的,从而能够将位移递归地用于先前重建的LOD,因此,这里的自适应细分方式称为“递归细分方式”。以中点细分为例,该递归细分方式则可以称为中点递归的细分方法。It is understood that in this embodiment of the disclosure, based on the aforementioned Table 2, new values are added to the first syntax element so that the first syntax element can be used to indicate whether the current mesh uses a nonlinear subdivision method. Here, the nonlinear subdivision method can create subdivisions similar to those in related techniques, but the displacements adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to 0. In other words, for each LOD, the displacement is calculated based on the subdivision vertices in the previously reconstructed LOD, thus enabling the displacements to be recursively used in the previously reconstructed LOD. Therefore, this adaptive subdivision method is called a "recursive subdivision method." Taking midpoint subdivision as an example, this recursive subdivision method can be called a midpoint recursive subdivision method.
在一种可能的实现方式中,如前述表5所示,这里增加了等于2和3的新asps_vdmc_ext_subdivision_ method,该新asps_vdmc_ext_subdivision_method将创建与相关技术相同的细分,但是与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于零,从而能够节省位移的编码比特。In one possible implementation, as shown in Table 5 above, a new asps_vdmc_ext_subdivision_method equal to 2 and 3 is added. This new asps_vdmc_ext_subdivision_method will create the same subdivision as the related techniques, but the shifts adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to zero, thereby saving the coded bits of the shifts.
需要说明的是,在本公开实施例中,第一语法元素用于指示当前网格是否使用非线性细分方式。在一些实施例中,该方法可以包括:确定第一语法元素的取值;对第一语法元素的取值进行编码处理,将编码比特写入码流。It should be noted that, in this embodiment of the disclosure, the first syntax element is used to indicate whether the current grid uses a non-linear subdivision method. In some embodiments, the method may include: determining the value of the first syntax element; encoding the value of the first syntax element and writing the encoded bits into the bitstream.
需要说明的是,在本公开的实施例中,如果当前网格使用非线性细分方式,那么可以确定第一语法元素的取值为第四值。It should be noted that, in the embodiments of this disclosure, if the current grid uses a non-linear subdivision method, then the value of the first syntax element can be determined to be the fourth value.
在一实施例中,在当前网格不使用细分方式时,确定第一语法元素的取值为第一值;在当前网格使用中点细分方式时,确定第一语法元素的取值为第二值;在当前网格使用递归细分方式时,确定第一语法元素的取值为第三值;在当前网格使用非线性细分方式时,确定第一语法元素的取值为第四值。In one embodiment, when the current grid does not use a subdivision method, the value of the first syntax element is determined to be a first value; when the current grid uses a midpoint subdivision method, the value of the first syntax element is determined to be a second value; when the current grid uses a recursive subdivision method, the value of the first syntax element is determined to be a third value; and when the current grid uses a non-linear subdivision method, the value of the first syntax element is determined to be a fourth value.
在这里,第一值、第二值、第三值、第四值各不相同。示例性地,第一值可以设置为0,第二值可以设置为1,第三值可以设置为2,第四值可以设置为3。也就是说,根据第一语法元素的取值不同,能够确定当前网格是否使用非线性细分方式。Here, the first, second, third, and fourth values are all different. For example, the first value can be set to 0, the second value can be set to 1, the third value can be set to 2, and the fourth value can be set to 3. That is, based on the different values of the first syntax element, it can be determined whether the current mesh uses a non-linear subdivision method.
在一实施例中,如果第一语法元素的取值为0,那么可以确定当前网格不使用任何细分方式,例如中点细分方式、递归细分方式、非线性细分方式等;如果第一语法元素的取值为1,那么可以确定当前网格使用中点细分方式;如果第一语法元素的取值为2,那么可以确定当前网格使用递归细分方式;如果第一语法元素的取值为3,那么可以确定当前网格使用非线性细分方式。In one embodiment, if the value of the first syntax element is 0, it can be determined that the current grid does not use any subdivision method, such as midpoint subdivision, recursive subdivision, non-linear subdivision, etc.; if the value of the first syntax element is 1, it can be determined that the current grid uses midpoint subdivision; if the value of the first syntax element is 2, it can be determined that the current grid uses recursive subdivision; if the value of the first syntax element is 3, it can be determined that the current grid uses non-linear subdivision.
还需要说明的是,在本公开实施例中,在当前网格使用非线性细分方式时,可以由至少一个LOD进行递归重建得到的当前网格的重建网格。具体地,在得到当前网格中的当前LOD的重建网格之后可以对当前LOD的重建网格进行细分,确定当前LOD的细分网格。然后结合设置的位移系数或者码流中的位移系数,从而能够递归得到当前LOD的下一LOD的重建网格。It should also be noted that, in this embodiment of the disclosure, when the current grid uses a nonlinear subdivision method, the reconstructed grid of the current grid can be obtained by recursively reconstructing at least one LOD. Specifically, after obtaining the reconstructed grid of the current LOD in the current grid, the reconstructed grid of the current LOD can be subdivided to determine the subdivided grid of the current LOD. Then, combined with the set displacement coefficient or the displacement coefficient in the bitstream, the reconstructed grid of the next LOD of the current LOD can be recursively obtained.
在一些实施例中,首先确定当前网格中的第一LOD的重建网格。该方法可以包括:确定当前网格的基础网格;对基础网格进行编码与解码处理,确定重建基础网格;对重建基础网格进行细分,确定初始细分网格;确定初始细分网格的位移系数;根据初始细分网格和初始细分网格的位移系数,确定当前网格中的第一LOD的重建网格。In some embodiments, the reconstructed mesh of the first LOD in the current mesh is first determined. The method may include: determining the base mesh of the current mesh; encoding and decoding the base mesh to determine the reconstructed base mesh; subdividing the reconstructed base mesh to determine the initial subdivision mesh; determining the displacement coefficient of the initial subdivision mesh; and determining the reconstructed mesh of the first LOD in the current mesh based on the initial subdivision mesh and the displacement coefficient of the initial subdivision mesh.
在本公开实施例中,基础网格又可以称为“简化网格”。在一些实施例中,确定当前网格的基础网格,可以包括:确定当前网格的原始网格;对原始网格进行下采样处理,得到基础网格。In this embodiment of the disclosure, the base mesh may also be referred to as a "simplified mesh". In some embodiments, determining the base mesh of the current mesh may include: determining the original mesh of the current mesh; and performing downsampling processing on the original mesh to obtain the base mesh.
还需要说明的是,在本公开实施例中,当前的输入网格可以称为原始网格。通过对输入网格进行下采样处理,即实现对输入网格的简化操作,可以得到基础网格。It should also be noted that, in this embodiment of the disclosure, the current input mesh can be referred to as the original mesh. By downsampling the input mesh, i.e., simplifying the input mesh, the base mesh can be obtained.
在一些实施例中,该方法还可以包括:对基础网格进行编码处理,将所得到的编码比特写入码流。In some embodiments, the method may further include: encoding the base grid and writing the resulting encoded bits into the bitstream.
示例性地,这里的码流可以是指基础网格码流。那么通过网格编码器(例如EdgeBreaker等)可以将基础网格写入基础网格码流。For example, the bitstream here can refer to the base mesh bitstream. Then, a mesh encoder (such as EdgeBreaker) can write the base mesh into the base mesh bitstream.
在一些实施例中,对于确定初始细分网格的位移系数,该方法可以包括:对初始细分网格的顶点坐标信息与原始网格的顶点坐标信息进行位移计算,确定初始细分网格的位移系数。In some embodiments, the method for determining the displacement coefficient of the initial subdivision mesh may include: performing displacement calculations on the vertex coordinate information of the initial subdivision mesh and the vertex coordinate information of the original mesh to determine the displacement coefficient of the initial subdivision mesh.
在一些实施例中,在确定所述当前网格中的第一LOD的重建网格之后,对第一LOD的重建网格进行细分以确定第二LOD的细分网格;解码码流以确定第二LOD的细分网格的位移系数; 根据第二LOD的细分网格和第二LOD的细分网格的位移系数,确定当前网格中的下一LOD的重建网格;以及继续执行细分操作,直至确定出当前网格中的第L个LOD的重建网格。其中, L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, after determining the reconstructed grid of the first LOD in the current grid, the reconstructed grid of the first LOD is subdivided to determine the subdivided grid of the second LOD; the bitstream is decoded to determine the displacement coefficients of the subdivided grid of the second LOD; based on the subdivided grid of the second LOD and the displacement coefficients of the subdivided grid of the second LOD, the reconstructed grid of the next LOD in the current grid is determined; and the subdivision operation continues until the reconstructed grid of the Lth LOD in the current grid is determined. The value of L is related to the number of subdivision iterations of the current grid.
在本公开实施例中,对于第一LOD来说,位移系数是指原始网格的顶点坐标信息和初始细分网格的顶点坐标信息之间的差异。这样,在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格,根据细分网格和对应的位移系数可以确定出LOD2的重建网格,依次类推,直至重建完成。In this embodiment, for the first LOD, the displacement coefficient refers to the difference between the vertex coordinate information of the original mesh and the vertex coordinate information of the initial subdivided mesh. Thus, after decoding to obtain the displacement coefficient of the initial subdivided mesh, corresponding displacement calculations are performed on the vertex coordinate information of the initial subdivided mesh based on this displacement coefficient to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, the reconstructed mesh of LOD1 is subdivided to obtain the subdivided mesh on LOD1. Based on the subdivided mesh and the corresponding displacement coefficient, the reconstructed mesh of LOD2 can be determined, and so on, until reconstruction is complete.
在步骤302中,在当前LOD为第i个LOD的情况下,将当前LOD的第一点的位移系数确定为0;其中,i为大于2的整数;第一点包括当前网格对应的重建基础网格的顶点。In step 302, when the current LOD is the i-th LOD, the displacement coefficient of the first point of the current LOD is determined to be 0; where i is an integer greater than 2; the first point includes the vertices of the reconstructed base mesh corresponding to the current mesh.
需要说明的是,在本公开实施例中,位移系数可以包括一个或多个方向上的位移分量,如图3所示,位移系数包括法线方向、切线方向和双切线方向等三个方向上的位移分量。其中,第一LOD的位移系数是相对于基础网格的细分顶点来计算的,后续层级的位移系数则都是相对于前一LOD重建LOD的细分顶点来计算的,从而可以实现位移系数的递归细分。It should be noted that, in this embodiment, the displacement coefficient may include displacement components in one or more directions, as shown in Figure 3. The displacement coefficient includes displacement components in three directions: normal direction, tangent direction, and double tangent direction. The displacement coefficient of the first LOD is calculated relative to the subdivision vertices of the base mesh, while the displacement coefficients of subsequent levels are calculated relative to the subdivision vertices of the reconstructed LOD from the previous LOD, thus enabling recursive subdivision of the displacement coefficient.
需要说明的是,在本公开实施例中,如果当前LOD为第i个LOD,i为大于2的整数,即当前LOD满足LoD大于2,那么,可以将当前LOD的第一点的位移系数确定为0。It should be noted that, in this embodiment of the disclosure, if the current LOD is the i-th LOD, where i is an integer greater than 2, that is, the current LOD satisfies that the LOD is greater than 2, then the displacement coefficient of the first point of the current LOD can be determined to be 0.
需要说明的是,在本公开的实施例中,当前LOD的第一点包括当前网格对应的重建基础网格的顶点,即第一点可以理解为与基点(例如,PB_1、PB_2、PB_3)重合或相邻的点。It should be noted that, in the embodiments of this disclosure, the first point of the current LOD includes the vertex of the reconstructed base mesh corresponding to the current mesh, that is, the first point can be understood as a point that coincides with or is adjacent to the base point (e.g., PB_1, PB_2, PB_3).
也就是说,在本公开的实施例中,如果第一语法元素指示当前网格使用非线性细分方式,且当前LOD大于2,那么可以直接将当前LOD的第一点的位移系数设置为0,并利用该位移系数进行后续的网格重建。In other words, in the embodiments of this disclosure, if the first syntax element indicates that the current mesh uses a non-linear subdivision method and the current LOD is greater than 2, then the displacement coefficient of the first point of the current LOD can be directly set to 0, and the displacement coefficient can be used for subsequent mesh reconstruction.
在步骤303中,根据当前LOD的细分网格和当前LOD的第一点的位移系数,确定当前网格中的下一LOD的重建网格。In step 303, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the first point of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的第一点的位移系数,确定当前网格中的下一LOD的重建网格,可以包括:根据第一点的位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, determining the reconstructed mesh of the next LOD in the current mesh based on the subdivision mesh of the current LOD and the displacement coefficient of the first point of the current LOD may include: performing corresponding displacement calculations on the vertex coordinate information of the subdivision mesh of the current LOD based on the displacement coefficient of the first point to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD,具体是将当前LOD的细分网格的每个顶点按照顺序加上对应的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD. Specifically, the corresponding displacement coefficients are added to each vertex of the subdivided mesh of the current LOD in sequence, so as to obtain the reconstructed mesh of the next LOD.
可以理解的是,在本公开的实施例中,在第一语法元素指示当前网格使用非线性细分方式时,如果当前LOD的层数大于2,那么当前LOD的第一点的位移系数设置为0,即设置与基点重合或相邻的点(第一点)的位移为0,此时,在获得重建网格时,对于第一点,其实是将当前LOD的细分网格与0进行相应位移运算。It is understood that in the embodiments of this disclosure, when the first syntax element indicates that the current mesh uses a non-linear subdivision method, if the number of layers of the current LOD is greater than 2, then the displacement coefficient of the first point of the current LOD is set to 0, that is, the displacement of the point (the first point) that coincides with or is adjacent to the base point is set to 0. At this time, when the reconstructed mesh is obtained, for the first point, the subdivision mesh of the current LOD is actually subjected to the corresponding displacement operation with 0.
在一些实施例中,该方法还可以包括:在确定当前网格中的下一LOD的重建网格之后,将下一LOD的重建网格作为当前LOD的重建网格,返回执行对当前LOD的重建网格进行细分,确定当前LOD的细分网格的步骤,直至确定出当前网格中的第L个LOD的重建网格;其中,L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, the method may further include: after determining the reconstruction grid of the next LOD in the current grid, using the reconstruction grid of the next LOD as the reconstruction grid of the current LOD, returning to the step of subdividing the reconstruction grid of the current LOD and determining the subdivided grid of the current LOD, until the reconstruction grid of the Lth LOD in the current grid is determined; wherein, the value of L is related to the number of subdivision iterations of the current grid.
还需要说明的是,在本公开实施例中,当前网格的细分迭代次数可以是由码流中的第二语法元素来指示。在一实施例中,该方法可以包括:解码码流,确定第二语法元素的取值;根据第二语法元素的取值,确定当前网格的细分迭代次数。It should also be noted that, in this embodiment of the disclosure, the number of subdivision iterations of the current grid can be indicated by a second syntax element in the bitstream. In one embodiment, the method may include: decoding the bitstream to determine the value of the second syntax element; and determining the number of subdivision iterations of the current grid based on the value of the second syntax element.
在本公开实施例中,第二语法元素可以用asps_vmc_ext_subdivision_iteration_count表示。也就是说,当前网格的细分迭代次数可以是由码流中的asps_vmc_ext_subdivision_iteration_count所指示的数值。In this embodiment of the disclosure, the second syntax element can be represented by asps_vmc_ext_subdivision_iteration_count. That is, the number of subdivision iterations of the current grid can be the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
另外,L表示当前网格对应的LOD层数,L的取值可以是由当前网格的细分迭代次数确定的,即L的取值等于asps_vmc_ext_subdivision_iteration_count所指示的数值。Additionally, L represents the LOD level corresponding to the current mesh. The value of L can be determined by the number of subdivision iterations of the current mesh, that is, the value of L is equal to the value indicated by asps_vmc_ext_subdivision_iteration_count.
进一步地,在本公开的实施例中,图26为本公开实施例提供的一种编码方法的流程示意图二。如图26所示,在步骤步骤301之后,该方法可以包括以下步骤。Furthermore, in an embodiment of this disclosure, FIG26 is a second schematic flowchart of an encoding method provided by an embodiment of this disclosure. As shown in FIG26, after step 301, the method may include the following steps.
在步骤304中,在当前LOD为第i个LOD的情况下,确定当前LOD的第二点的位移系数,将第二点的位移系数写入码流。其中,第二点不包括当前网格对应的重建基础网格的顶点。换句话说,第二点为当前网格对应的重建基础网格中的点中的除了第一点以外的点。In step 304, if the current LOD is the i-th LOD, the displacement coefficient of the second point of the current LOD is determined and written into the bitstream. The second point does not include the vertices of the reconstructed base mesh corresponding to the current mesh. In other words, the second point is any point in the reconstructed base mesh corresponding to the current mesh, excluding the first point.
需要说明的是,在本公开实施例中,如果当前LOD为第i个LOD,i为大于2的整数,即当前LOD大于2,那么,可以将当前LOD的第一点的位移系数确定为0,而第二点的位移系数则可以通过相应地位移运算获得的,然后可以将第二点的位移系数写入码流。在这里,码流可以是位移码流。对于位移码流的具体编码方式也可以有多种,如视频编码、熵编码等等。也就是说,在本公开实施例中,可以通过视频编码器将位移信息写入位移码流,或者可以通过熵编码器将位移信息写入位移码流,这里也不作任何限定。It should be noted that, in this embodiment, if the current LOD is the i-th LOD, where i is an integer greater than 2 (i.e., the current LOD is greater than 2), then the displacement coefficient of the first point of the current LOD can be set to 0, while the displacement coefficient of the second point can be obtained through corresponding displacement operations. Then, the displacement coefficient of the second point can be written into the bitstream. Here, the bitstream can be a displacement bitstream. There can be various specific encoding methods for the displacement bitstream, such as video encoding, entropy encoding, etc. That is, in this embodiment, displacement information can be written into the displacement bitstream using a video encoder or an entropy encoder; no limitation is made here.
在一些实施例中,确定当前LOD的第二点的位移系数,可以包括:对当前LOD的细分网格的顶点坐标信息与原始网格的顶点坐标信息进行位移计算,确定当前LOD的第二点的位移系数。In some embodiments, determining the displacement coefficient of the second point of the current LOD may include: performing displacement calculations on the vertex coordinate information of the subdivided mesh of the current LOD and the vertex coordinate information of the original mesh to determine the displacement coefficient of the second point of the current LOD.
进一步地,在一些实施例中,该方法还可以包括:对当前LOD的第二点的位移系数进行预处理,确定当前LOD的第二点的量化位移系数;对当前LOD的第二点的量化位移系数进行编码处理,将所得到的编码比特写入码流。Furthermore, in some embodiments, the method may further include: preprocessing the displacement coefficient of the second point of the current LOD to determine the quantized displacement coefficient of the second point of the current LOD; encoding the quantized displacement coefficient of the second point of the current LOD and writing the obtained encoded bits into the bitstream.
需要说明的是,在本公开的实施例中,当前LOD的第二点不包括当前网格对应的重建基础网格的顶点。换句话说,第二点为当前网格对应的重建基础网格中的点中的除了第一点以外的点。即第二点可以理解为与基点(例如,PB_1、PB_2、PB_3)不相邻的边。It should be noted that, in the embodiments disclosed herein, the second point of the current LOD does not include the vertices of the reconstructed base mesh corresponding to the current mesh. In other words, the second point is any point in the reconstructed base mesh corresponding to the current mesh other than the first point. That is, the second point can be understood as an edge that is not adjacent to the base point (e.g., PB_1, PB_2, PB_3).
也就是说,在本公开的实施例中,如果当前网格使用非线性细分方式,且当前LOD大于2,可以将当前LOD的第一点的位移系数设置为0,同时可以通过计算确定当前LOD的第二点的位移系数,并编码第二点的位移系数。In other words, in the embodiments of this disclosure, if the current mesh uses a non-linear subdivision method and the current LOD is greater than 2, the displacement coefficient of the first point of the current LOD can be set to 0, and the displacement coefficient of the second point of the current LOD can be determined by calculation and encoded.
在步骤305中,根据当前LOD的细分网格和当前LOD的第二点的位移系数,确定当前网格中的下一LOD的重建网格。In step 305, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the second point of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的第二点的位移系数,确定当前网格中的下一LOD的重建网格,具体地:根据第二点的位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the second point of the current LOD. Specifically, the vertex coordinate information of the subdivision mesh of the current LOD is subjected to corresponding displacement calculation based on the displacement coefficient of the second point to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD层,具体是将当前LOD的细分网格的每个顶点按照顺序加上对应的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD layer. Specifically, the corresponding displacement coefficients are added to each vertex of the subdivided mesh of the current LOD in sequence, so as to obtain the reconstructed mesh of the next LOD.
进一步地,在本公开的实施例中,图27为本公开实施例提供的一种编码方法的流程示意图三。如图27所示,在步骤步骤301之后,该方法可以包括以下步骤。Furthermore, in an embodiment of this disclosure, Figure 27 is a schematic flowchart of an encoding method provided by an embodiment of this disclosure. As shown in Figure 27, after step 301, the method may include the following steps.
在步骤306中,在当前LOD为第二LOD的情况下,确定当前LOD的位移系数,并将当前LOD的位移系数写入码流。In step 306, if the current LOD is the second LOD, the displacement coefficient of the current LOD is determined and written into the bitstream.
需要说明的是,在本公开实施例中,如果当前LOD为第二LOD,即当前LOD为LoD 2,那么,可以通过位移运算确定当前LOD的位移系数,并将当前LOD的位移系数写入码流。在这里,码流可以是位移码流。It should be noted that, in this embodiment of the disclosure, if the current LOD is the second LOD, i.e., the current LOD is LOD 2, then the displacement coefficient of the current LOD can be determined by displacement operation, and the displacement coefficient of the current LOD can be written into the bitstream. Here, the bitstream can be a displacement bitstream.
对于位移码流的具体编码方式也可以有多种,如视频编码、熵编码等等。也就是说,在本公开实施例中,可以通过视频编码器将位移信息写入位移码流,或者可以通过熵编码器将位移信息写入位移码流,这里也不作任何限定。There can be various specific encoding methods for the displacement bitstream, such as video encoding, entropy encoding, etc. That is to say, in the embodiments of this disclosure, displacement information can be written into the displacement bitstream by a video encoder or by an entropy encoder, and no limitation is made here.
在一些实施例中,确定当前LOD的位移系数,可以包括:对当前LOD的细分网格的顶点坐标信息与原始网格的顶点坐标信息进行位移计算,确定当前LOD的位移系数。In some embodiments, determining the displacement coefficient of the current LOD may include: performing displacement calculations on the vertex coordinate information of the subdivided mesh of the current LOD and the vertex coordinate information of the original mesh to determine the displacement coefficient of the current LOD.
进一步地,在一些实施例中,该方法还可以包括:对当前LOD的位移系数进行预处理,确定当前LOD的量化位移系数;对当前LOD的量化位移系数进行编码处理,将所得到的编码比特写入码流。Furthermore, in some embodiments, the method may further include: preprocessing the displacement coefficients of the current LOD to determine the quantization displacement coefficients of the current LOD; encoding the quantization displacement coefficients of the current LOD and writing the obtained encoded bits into the bitstream.
在步骤307中,根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。In step 307, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格,可以包括:根据位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, determining the reconstructed mesh of the next LOD in the current mesh based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD may include: performing corresponding displacement calculations on the vertex coordinate information of the subdivision mesh of the current LOD according to the displacement coefficient to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD,具体是将当前LOD的细分网格的每个顶点按照顺序加上解码得到的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD. Specifically, the displacement coefficients obtained by decoding are added sequentially to each vertex of the subdivided mesh of the current LOD, thereby obtaining the reconstructed mesh of the next LOD.
在一些实施例中,该方法还可以包括:在确定当前网格中的下一LOD的重建网格之后,将下一LOD的重建网格作为当前LOD的重建网格,返回执行对当前LOD的重建网格进行细分,确定当前LOD的细分网格的步骤,直至确定出当前网格中的第L个LOD的重建网格;其中,L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, the method may further include: after determining the reconstruction grid of the next LOD in the current grid, using the reconstruction grid of the next LOD as the reconstruction grid of the current LOD, returning to the step of subdividing the reconstruction grid of the current LOD and determining the subdivided grid of the current LOD, until the reconstruction grid of the Lth LOD in the current grid is determined; wherein, the value of L is related to the number of subdivision iterations of the current grid.
还需要说明的是,在本公开实施例中,当前网格的细分迭代次数可以是由码流中的第二语法元素来指示。在一实施例中,该方法可以包括:解码码流,确定第二语法元素的取值;根据第二语法元素的取值,确定当前网格的细分迭代次数。It should also be noted that, in this embodiment of the disclosure, the number of subdivision iterations of the current grid can be indicated by a second syntax element in the bitstream. In one embodiment, the method may include: decoding the bitstream to determine the value of the second syntax element; and determining the number of subdivision iterations of the current grid based on the value of the second syntax element.
在本公开实施例中,第二语法元素可以用asps_vmc_ext_subdivision_iteration_count表示。也就是说,当前网格的细分迭代次数可以是由码流中的asps_vmc_ext_subdivision_iteration_count所指示的数值。In this embodiment of the disclosure, the second syntax element can be represented by asps_vmc_ext_subdivision_iteration_count. That is, the number of subdivision iterations of the current grid can be the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
另外,L表示当前网格对应的LOD层数,L的取值可以是由当前网格的细分迭代次数确定的,即L的取值等于asps_vmc_ext_subdivision_iteration_count所指示的数值。Additionally, L represents the LOD level corresponding to the current mesh. The value of L can be determined by the number of subdivision iterations of the current mesh, that is, the value of L is equal to the value indicated by asps_vmc_ext_subdivision_iteration_count.
进一步地,在本公开的实施例中,图28为本公开实施例提供的一种编码方法的流程示意图四。如图28所示,该方法可以包括以下步骤。Furthermore, in an embodiment of this disclosure, FIG28 is a schematic flowchart of an encoding method provided in an embodiment of this disclosure. As shown in FIG28, the method may include the following steps.
在步骤308中,在当前网格使用递归细分方式时,确定第一语法元素的取值,并将第一语法元素写入码流,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格。In step 308, when the current grid uses the recursive subdivision method, the value of the first syntax element is determined and written into the code stream. The reconstructed grid of the current LOD in the current grid is determined and the reconstructed grid of the current LOD is subdivided to determine the subdivided grid of the current LOD.
在本公开实施例中,还可以通过设置第一语法元素来表示当前网格是否使用递归细分方式。其中,这里的第一语法元素可以用asps_vdmc_ext_subdivision_method表示,用于指示网格的细分方法。示例性地,如表2所示,若第一语法元素的取值为0,则表示当前网格不使用细分方式;若第一语法元素的取值为1,则表示当前网格使用中点细分方式。In this embodiment of the disclosure, a first syntax element can also be set to indicate whether the current mesh uses a recursive subdivision method. This first syntax element can be represented by `asps_vdmc_ext_subdivision_method`, which indicates the mesh subdivision method. For example, as shown in Table 2, if the value of the first syntax element is 0, it indicates that the current mesh does not use a subdivision method; if the value of the first syntax element is 1, it indicates that the current mesh uses a midpoint subdivision method.
可以理解,在本公开实施例中,在前述表2的基础上,针对第一语法元素增加了新的取值,以使得第一语法元素能够用于指示当前网格是否使用递归细分方式。在这里,递归细分方式可以是创建与相关技术相同的细分,但是与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于0。换句话说,针对每一个LOD,位移是基于先前重建的LOD中的细分顶点计算得到的,从而能够将位移递归地用于先前重建的LOD,因此,这里的自适应细分方式称为“递归细分方式”。以中点细分为例,该递归细分方式则可以称为中点递归的细分方法。It is understood that in this embodiment of the disclosure, based on the aforementioned Table 2, new values are added to the first syntax element so that the first syntax element can be used to indicate whether the current mesh uses a recursive subdivision method. Here, the recursive subdivision method may create subdivisions identical to those in related techniques, but the displacements adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to 0. In other words, for each LOD, the displacement is calculated based on the subdivision vertices in the previously reconstructed LOD, thus enabling the displacements to be recursively used in the previously reconstructed LOD. Therefore, this adaptive subdivision method is called a "recursive subdivision method." Taking midpoint subdivision as an example, this recursive subdivision method can be called a midpoint recursive subdivision method.
在一种可能的实现方式中,如前述表5所示,这里增加了等于2和3的新asps_vdmc_ext_subdivision_ method,该新asps_vdmc_ext_subdivision_method将创建与相关技术相同的细分,但是与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于零,从而能够节省位移的编码比特。In one possible implementation, as shown in Table 5 above, a new asps_vdmc_ext_subdivision_method equal to 2 and 3 is added. This new asps_vdmc_ext_subdivision_method will create the same subdivision as the related techniques, but the shifts adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to zero, thereby saving the coded bits of the shifts.
需要说明的是,在本公开实施例中,第一语法元素用于指示当前网格是否使用递归细分方式。在一些实施例中,该方法可以包括:确定第一语法元素的取值;对第一语法元素的取值进行编码处理,将编码比特写入码流。It should be noted that, in this embodiment of the disclosure, the first syntax element is used to indicate whether the current grid uses a recursive subdivision method. In some embodiments, the method may include: determining the value of the first syntax element; encoding the value of the first syntax element and writing the encoded bits into the bitstream.
需要说明的是,在本公开的实施例中,如果当前网格使用递归细分方式,那么可以确定第一语法元素的取值为第三值。It should be noted that, in the embodiments disclosed herein, if the current grid uses a recursive subdivision method, then the value of the first syntax element can be determined to be the third value.
在一实施例中,在当前网格不使用细分方式时,确定第一语法元素的取值为第一值;在当前网格使用中点细分方式时,确定第一语法元素的取值为第二值;在当前网格使用递归细分方式时,确定第一语法元素的取值为第三值;在当前网格使用非线性细分方式时,确定第一语法元素的取值为第四值。In one embodiment, when the current grid does not use a subdivision method, the value of the first syntax element is determined to be a first value; when the current grid uses a midpoint subdivision method, the value of the first syntax element is determined to be a second value; when the current grid uses a recursive subdivision method, the value of the first syntax element is determined to be a third value; and when the current grid uses a non-linear subdivision method, the value of the first syntax element is determined to be a fourth value.
在这里,第一值、第二值、第三值、第四值各不相同。示例性地,第一值可以设置为0,第二值可以设置为1,第三值可以设置为2,第四值可以设置为3。也就是说,根据第一语法元素的取值不同,能够确定当前网格是否使用非线性细分方式。Here, the first, second, third, and fourth values are all different. For example, the first value can be set to 0, the second value can be set to 1, the third value can be set to 2, and the fourth value can be set to 3. That is, based on the different values of the first syntax element, it can be determined whether the current mesh uses a non-linear subdivision method.
在一实施例中,如果第一语法元素的取值为0,那么可以确定当前网格不使用任何细分方式,例如中点细分方式、递归细分方式、非线性细分方式等;如果第一语法元素的取值为1,那么可以确定当前网格使用中点细分方式;如果第一语法元素的取值为2,那么可以确定当前网格使用递归细分方式;如果第一语法元素的取值为3,那么可以确定当前网格使用非线性细分方式。In one embodiment, if the value of the first syntax element is 0, it can be determined that the current grid does not use any subdivision method, such as midpoint subdivision, recursive subdivision, non-linear subdivision, etc.; if the value of the first syntax element is 1, it can be determined that the current grid uses midpoint subdivision; if the value of the first syntax element is 2, it can be determined that the current grid uses recursive subdivision; if the value of the first syntax element is 3, it can be determined that the current grid uses non-linear subdivision.
还需要说明的是,在本公开实施例中,在当前网格使用非线性细分方式时,可以由至少一个LOD进行递归重建得到当前网格的重建网格,。具体地,在得到当前网格中的当前LOD的重建网格之后可以对当前LOD的重建网格进行细分,确定当前LOD的细分网格。然后,根据细分网格、以及设置的位移系数或者码流中的位移系数,从而能够递归得到当前LOD的下一LOD的重建网格。It should also be noted that, in this embodiment of the disclosure, when the current grid uses a non-linear subdivision method, the reconstructed grid of the current grid can be obtained by recursively reconstructing at least one LOD. Specifically, after obtaining the reconstructed grid of the current LOD in the current grid, the reconstructed grid of the current LOD can be subdivided to determine the subdivided grid of the current LOD. Then, based on the subdivided grid and the set displacement coefficient or the displacement coefficient in the bitstream, the reconstructed grid of the next LOD of the current LOD can be recursively obtained.
在一些实施例中,首先确定当前网格中的第一LOD的重建网格。该方法可以包括:确定当前网格的基础网格;对基础网格进行编码与解码处理,确定重建基础网格;对重建基础网格进行细分,确定初始细分网格;确定初始细分网格的位移系数;根据初始细分网格和初始细分网格的位移系数,确定当前网格中的第一LOD的重建网格。In some embodiments, the reconstructed mesh of the first LOD in the current mesh is first determined. The method may include: determining the base mesh of the current mesh; encoding and decoding the base mesh to determine the reconstructed base mesh; subdividing the reconstructed base mesh to determine the initial subdivision mesh; determining the displacement coefficient of the initial subdivision mesh; and determining the reconstructed mesh of the first LOD in the current mesh based on the initial subdivision mesh and the displacement coefficient of the initial subdivision mesh.
在本公开实施例中,基础网格又可以称为“简化网格”。在一些实施例中,确定当前网格的基础网格,可以包括:确定当前网格的原始网格;对原始网格进行下采样处理,得到基础网格。In this embodiment of the disclosure, the base mesh may also be referred to as a "simplified mesh". In some embodiments, determining the base mesh of the current mesh may include: determining the original mesh of the current mesh; and performing downsampling processing on the original mesh to obtain the base mesh.
还需要说明的是,在本公开实施例中,当前的输入网格可以称为原始网格。通过对输入网格进行下采样处理,即实现对输入网格的简化操作,可以得到基础网格。It should also be noted that, in this embodiment of the disclosure, the current input mesh can be referred to as the original mesh. By downsampling the input mesh, i.e., simplifying the input mesh, the base mesh can be obtained.
在一些实施例中,该方法还可以包括:对基础网格进行编码处理,将所得到的编码比特写入码流。In some embodiments, the method may further include: encoding the base grid and writing the resulting encoded bits into the bitstream.
示例性地,这里的码流可以是指基础网格码流。那么通过网格编码器(例如EdgeBreaker等)可以将基础网格写入基础网格码流。For example, the bitstream here can refer to the base mesh bitstream. Then, a mesh encoder (such as EdgeBreaker) can write the base mesh into the base mesh bitstream.
在一些实施例中,对于确定初始细分网格的位移系数,该方法可以包括:对初始细分网格的顶点坐标信息与原始网格的顶点坐标信息进行位移计算,确定初始细分网格的位移系数。In some embodiments, the method for determining the displacement coefficient of the initial subdivision mesh may include: performing displacement calculations on the vertex coordinate information of the initial subdivision mesh and the vertex coordinate information of the original mesh to determine the displacement coefficient of the initial subdivision mesh.
在本公开实施例中,对于第一LOD来说,位移系数是指原始网格的顶点坐标信息和初始细分网格的顶点坐标信息之间的差异。这样,在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格,再结合对应的位移系数可以确定出LOD2的重建网格,依次类推,直至重建完成。In this embodiment, for the first LOD, the displacement coefficient refers to the difference between the vertex coordinates of the original mesh and the vertex coordinates of the initial subdivided mesh. Thus, after decoding to obtain the displacement coefficient of the initial subdivided mesh, corresponding displacement calculations are performed on the vertex coordinates of the initial subdivided mesh based on this displacement coefficient to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, based on the reconstructed mesh of LOD1, further subdivision is performed to obtain the subdivided mesh on LOD1. Combined with the corresponding displacement coefficient, the reconstructed mesh of LOD2 can be determined, and so on, until reconstruction is complete.
步骤309:确定当前LOD的位移系数,将当前LOD的位移系数写入码流。Step 309: Determine the displacement coefficient of the current LOD and write the displacement coefficient of the current LOD into the bitstream.
需要说明的是,在本公开实施例中,位移系数可以包括一个或多个方向上的位移分量,如图3所示,位移系数包括法线方向、切线方向和双切线方向等三个方向上的位移分量。其中,第一LOD的位移系数是相对于基础网格的细分顶点来计算的,后续层级的位移系数则都是相对于前一LOD重建LOD的细分顶点来计算的,从而可以实现位移系数的递归细分。It should be noted that, in this embodiment, the displacement coefficient may include displacement components in one or more directions, as shown in Figure 3. The displacement coefficient includes displacement components in three directions: normal direction, tangent direction, and double tangent direction. The displacement coefficient of the first LOD is calculated relative to the subdivision vertices of the base mesh, while the displacement coefficients of subsequent levels are calculated relative to the subdivision vertices of the reconstructed LOD from the previous LOD, thus enabling recursive subdivision of the displacement coefficient.
在一些实施例中,,对于步骤304、步骤306、步骤309中任一个步骤所涉及的确定当前LOD的位移系数的方法,具体可以包括:对当前LOD的细分网格的顶点坐标信息与原始网格的顶点坐标信息进行位移计算,确定当前LOD的位移系数。In some embodiments, the method for determining the displacement coefficient of the current LOD involved in any of steps 304, 306, and 309 may specifically include: performing displacement calculations on the vertex coordinate information of the subdivided mesh of the current LOD and the vertex coordinate information of the original mesh to determine the displacement coefficient of the current LOD.
进一步地,在一些实施例中,该方法还可以包括:对当前LOD的位移系数进行预处理,确定当前LOD的量化位移系数;对当前LOD的量化位移系数进行编码处理,将所得到的编码比特写入码流。Furthermore, in some embodiments, the method may further include: preprocessing the displacement coefficients of the current LOD to determine the quantization displacement coefficients of the current LOD; encoding the quantization displacement coefficients of the current LOD and writing the obtained encoded bits into the bitstream.
也就是说,在本公开实施例中,在生成细分网格之后,可以为细分网格的每个顶点计算几何位移矢量,以使细分网格的形状尽可能接近原始网格的形状。这些几何位移矢量就是这里的位移系数。具体地,细分网格顶点与原始网格顶点之间的几何信息存在差异,该差异即为的位移系数。In other words, in this embodiment of the disclosure, after generating the subdivided mesh, a geometric displacement vector can be calculated for each vertex of the subdivided mesh to make the shape of the subdivided mesh as close as possible to the shape of the original mesh. These geometric displacement vectors are the displacement coefficients. Specifically, there is a difference in geometric information between the vertices of the subdivided mesh and the vertices of the original mesh, and this difference is the displacement coefficient.
还需要说明的是,在本公开实施例中,在确定当前LOD的量化位移系数之后,将当前LOD的量化位移系数编码到码流中,这里的码流可以是位移码流。对于位移码流的具体编码方式也可以有多种,如视频编码、熵编码等等。也就是说,在本公开实施例中,可以通过视频编码器将位移信息写入位移码流,或者可以通过熵编码器将位移信息写入位移码流,这里也不作任何限定。It should also be noted that, in this embodiment of the disclosure, after determining the quantization displacement coefficient of the current LOD, the quantization displacement coefficient of the current LOD is encoded into the bitstream, where the bitstream can be a displacement bitstream. There can be various specific encoding methods for the displacement bitstream, such as video encoding, entropy encoding, etc. That is to say, in this embodiment of the disclosure, displacement information can be written into the displacement bitstream using a video encoder, or it can be written into the displacement bitstream using an entropy encoder; no limitation is made here.
还需要说明的是,在本公开实施例中,在得到当前LOD的位移系数之后,可以对当前LOD的位移系数进行预处理。其中,预处理可以包括小波变换、量化等处理。It should also be noted that, in this embodiment of the disclosure, after obtaining the displacement coefficients of the current LOD, the displacement coefficients of the current LOD can be preprocessed. Preprocessing may include wavelet transform, quantization, and other processing.
在一实施例中,对当前LOD的位移系数进行预处理,确定当前LOD的量化位移系数,可以包括:对当前LOD的位移系数进行小波变换,确定当前LOD的小波变换系数;对当前LOD的小波变换系数进行量化,确定当前LOD的量化位移系数。In one embodiment, preprocessing the displacement coefficients of the current LOD to determine the quantized displacement coefficients of the current LOD may include: performing wavelet transform on the displacement coefficients of the current LOD to determine the wavelet transform coefficients of the current LOD; and quantizing the wavelet transform coefficients of the current LOD to determine the quantized displacement coefficients of the current LOD.
在本公开实施例中,小波变换是将当前LOD的位移系数转换为小波域中的信号,这里的小波变换系数是以浮点格式进行计算。量化则是将浮点数转换为预设精度的定点数,其中,预设精度可以是在小块(patch)、图像或序列等级别的编码码流中指示的精度。In this embodiment of the disclosure, wavelet transform converts the displacement coefficients of the current LOD into signals in the wavelet domain, where the wavelet transform coefficients are calculated in floating-point format. Quantization converts the floating-point number into a fixed-point number with a preset precision, where the preset precision can be the precision indicated in the coded bitstream at the patch, image, or sequence level.
在一些实施例中,对当前LOD的小波变换系数进行量化,确定当前LOD的量化位移系数,可以包括:确定当前LOD的量化参数;根据当前LOD的量化参数对当前LOD的小波变换系数进行量化,确定当前LOD的量化位移系数。In some embodiments, quantizing the wavelet transform coefficients of the current LOD to determine the quantization shift coefficients of the current LOD may include: determining the quantization parameters of the current LOD; quantizing the wavelet transform coefficients of the current LOD according to the quantization parameters of the current LOD to determine the quantization shift coefficients of the current LOD.
需要说明的是,在本公开实施例中,量化参数(Quantizer Parameter,QP)反映了空间细节压缩情况。其中,值越小,量化越精细,图像质量越高,产生的码流也越长。如QP小,大部分的细节都会被保留;QP增大,一些细节丢失,码率降低,但图像失真加强和质量下降。具体地,QP是量化步长Qstep的序号,QP的取值为0 时,表示量化最精细;相反,QP的取值为51时,表示量化越粗糙。It should be noted that in this embodiment, the quantizer parameter (QP) reflects the spatial detail compression. A smaller QP value results in finer quantization, higher image quality, and a longer bitstream. A small QP preserves most details; a larger QP leads to some detail loss, lower bitrate, but increased image distortion and reduced quality. Specifically, QP is the sequence number of the quantization step size Qstep. A QP value of 0 indicates the finest quantization; conversely, a QP value of 51 indicates coarser quantization.
在一些实施例中,确定当前LOD的量化参数,可以包括:确定当前LOD的多个候选量化参数;基于多个候选量化参数对当前LOD的小波变换系数进行量化与编码代价计算,确定多个候选量化参数各自的代价结果;从多个候选量化参数各自的代价结果中确定最小代价结果,将最小代价结果对应的候选量化参数确定为当前LOD的量化参数。In some embodiments, determining the quantization parameters of the current LOD may include: determining multiple candidate quantization parameters of the current LOD; calculating the quantization and encoding costs of the wavelet transform coefficients of the current LOD based on the multiple candidate quantization parameters, and determining the cost results of each of the multiple candidate quantization parameters; determining the minimum cost result from the cost results of each of the multiple candidate quantization parameters, and determining the candidate quantization parameter corresponding to the minimum cost result as the quantization parameter of the current LOD.
需要说明的是,在本公开实施例中,对于每一LOD来说,可以存在多个候选量化参数,根据这多个候选量化参数各自的代价结果,从中选取最小代价结果对应的候选量化参数,将其作为当前LOD的量化参数。其中,这里的代价计算可以包括以下至少之一:率失真代价(Rate-Distortion Optimization,RDO)均方误差(Mean Square Error,MSE)、误差平方和(Sum of Squared Difference,SSD)、绝对误差和(Sum of Absolute Difference,SAD)、绝对误差和(Sum of Absolute Transformed Difference,SATD)、峰值信噪比(PeakSignal to Noise Ratio,PSNR)等。It should be noted that, in this embodiment of the disclosure, for each LOD, there may be multiple candidate quantization parameters. Based on the cost results of these multiple candidate quantization parameters, the candidate quantization parameter corresponding to the minimum cost result is selected and used as the quantization parameter of the current LOD. The cost calculation here may include at least one of the following: Rate-Distortion Optimization (RDO), Mean Square Error (MSE), Sum of Squared Difference (SSD), Sum of Absolute Difference (SAD), Sum of Absolute Transformed Difference (SATD), Peak Signal-to-Noise Ratio (PSNR), etc.
还需要说明的是,在本公开实施例中,量化参数可以用vmc_transform_lifting_quantization_ parameters[ltpIndex][i][j]表示。在这里,可以根据码流中的对应坐标i和LoD j的量化参数vmc_transform_ lifting_quantization_parameters[ltpIndex][i][j],按照在patch、图像或序列等级别的编码码流中指示的精度将小波变换系数转换成定点表示。其中,i表示位移系数的分量信息(x,y,z用于典范坐标系,n,t,bt用于局部坐标系);j表示LOD的层数;ltpIndex表示应用的级别,其中,0代表序列级,1代表图像级,2代表patch级。It should also be noted that, in this embodiment, the quantization parameters can be represented by `vmc_transform_lifting_quantization_parameters[ltpIndex][i][j]`. Here, the wavelet transform coefficients can be converted into fixed-point representations according to the precision indicated in the coded bitstream at the patch, image, or sequence level, based on the quantization parameters `vmc_transform_lifting_quantization_parameters[ltpIndex][i][j]` of the corresponding coordinates `i` and `j` in the bitstream, respectively. Here, `i` represents the component information of the displacement coefficients (x, y, z for the canonical coordinate system, n, t, bt for the local coordinate system); `j` represents the LOD level; and `ltpIndex` represents the level of application, where 0 represents the sequence level, 1 represents the image level, and 2 represents the patch level.
在一种可能的实现方式中,对于当前LOD的量化参数来说,该方法可以包括:对当前LOD的量化参数进行编码处理,将所得到的编码比特写入码流。In one possible implementation, for the quantization parameters of the current LOD, the method may include: encoding the quantization parameters of the current LOD and writing the resulting encoded bits into the bitstream.
在另一种可能的实现方式中,对于当前LOD的量化参数来说,该方法可以包括:确定当前LOD的前一LOD的量化参数;根据前一LOD的量化参数和当前LOD的量化参数,确定当前LOD的量化参数增量;对当前LOD的量化参数增量进行编码处理,将所得到的编码比特写入码流。In another possible implementation, for the quantization parameters of the current LOD, the method may include: determining the quantization parameters of the previous LOD; determining the quantization parameter increment of the current LOD based on the quantization parameters of the previous LOD and the quantization parameters of the current LOD; encoding the quantization parameter increment of the current LOD; and writing the obtained encoded bits into the bitstream.
也就是说,在本公开实施例中,编码端可以将量化参数直接写入码流,使得解码端通过解码即可得到对应的量化参数;或者编码端也可以将量化参数增量写入码流,然后解码端根据解码得到的量化参数增量和前一LOD的量化参数也可以得到对应的量化参数。In other words, in this embodiment of the disclosure, the encoding end can directly write the quantization parameters into the bitstream, so that the decoding end can obtain the corresponding quantization parameters by decoding; or the encoding end can also write the quantization parameter increment into the bitstream, and then the decoding end can obtain the corresponding quantization parameters based on the quantization parameter increment obtained by decoding and the quantization parameters of the previous LOD.
在一实施例中,可以根据当前LOD的量化参数与前一LOD的量化参数进行减法运算,确定当前LOD的量化参数增量。示例性地,假设当前LOD的量化参数可以用QP(i)表示,前一LOD的量化参数可以用QP(i-1)表示,量化参数增量可以用ΔQP表示,那么ΔQP =QP(i)-QP(i-1)。其中,对于第一LOD的量化参数来说,可以是将对应的量化参数QP(1) 直接写入码流。In one embodiment, the quantization parameter increment of the current LOD can be determined by subtracting the quantization parameter of the previous LOD from the quantization parameter of the current LOD. For example, assuming the quantization parameter of the current LOD can be represented by QP(i), the quantization parameter of the previous LOD can be represented by QP(i-1), and the quantization parameter increment can be represented by ΔQP, then ΔQP = QP(i) - QP(i-1). For the quantization parameter of the first LOD, the corresponding quantization parameter QP(1) can be directly written into the bitstream.
还需要说明的是,在本公开实施例中,也可以是在编码端和解码端设置一个参考量化参数,然后将每一LOD的量化参数与参考量化参数之间的量化参数增量写入码流。这样,解码端在解码码流确定出当前LOD的量化参数增量之后,可以根据当前LOD的量化参数增量和参考量化参数来确定出当前LOD的量化参数,从而也能够节省码流中量化参数的编码比特。It should also be noted that, in this embodiment of the disclosure, a reference quantization parameter can be set at both the encoding and decoding ends, and then the quantization parameter increment between the quantization parameter of each LOD and the reference quantization parameter can be written into the bitstream. In this way, after the decoding end determines the quantization parameter increment of the current LOD in the decoded bitstream, it can determine the quantization parameter of the current LOD based on the quantization parameter increment of the current LOD and the reference quantization parameter, thereby saving the encoding bits of the quantization parameter in the bitstream.
在一些实施例中,该方法还可以包括:确定当前网格中的至少一个LOD的量化位移系数,其中,至少一个LOD包括当前LOD;根据预设填充方式将至少一个LOD的量化位移系数填充到二维图像中;对二维图像进行编码处理,将所得到的编码比特写入码流。In some embodiments, the method may further include: determining the quantization displacement coefficient of at least one LOD in the current grid, wherein the at least one LOD includes the current LOD; filling the quantization displacement coefficient of the at least one LOD into the two-dimensional image according to a preset filling method; encoding the two-dimensional image and writing the obtained encoded bits into the bitstream.
在本公开实施例中,预设填充方式包括正向填充方式或者反向填充方式。其中,对于预设填充方式的确定,可以是解码端和编码端设置相同的填充方式,或者也可以是根据码流中的第三语法元素来指示。In the embodiments of this disclosure, the preset padding method includes a forward padding method or a reverse padding method. The preset padding method can be determined by setting the same padding method for both the decoder and encoder, or it can be indicated by a third syntax element in the bitstream.
在一实施例中,该方法还可以包括:根据预设填充方式,确定第三语法元素的取值;对第三语法元素的取值进行编码处理,将所得到的编码比特写入码流。In one embodiment, the method may further include: determining the value of a third syntax element according to a preset padding method; encoding the value of the third syntax element; and writing the obtained encoded bits into a bitstream.
在本公开实施例中,第三语法元素可以可以用dmsps_packing_order表示。也就是说,预设填充方式可以是由码流中的dmsps_packing_order所指示的填充方式。In this embodiment of the disclosure, the third syntax element can be represented by dmsps_packing_order. That is, the preset padding method can be the padding method indicated by dmsps_packing_order in the bitstream.
这样,若编码端通过视频编码的方式压缩位移,则解码端通过相应的视频解码器进行解码,并根据预设填充方式将其从二维图像中按照对应的顺序恢复出来。再对其执行反量化、逆小波变换等操作使其恢复出与编码端一致的位移系数。否则,如果编码端对位移系数采用熵编码的方式,那么解码端可以直接对其进行熵解码,再进行后续的反量化、逆小波变换等操作,以得到当前LOD的位移系数。Thus, if the encoder compresses the displacement using video encoding, the decoder decodes it using a corresponding video decoder and recovers it from the 2D image in the corresponding order according to a preset padding method. Then, it performs operations such as inverse quantization and inverse wavelet transform to recover the displacement coefficients consistent with those of the encoder. Otherwise, if the encoder uses entropy encoding for the displacement coefficients, the decoder can directly perform entropy decoding, followed by subsequent operations such as inverse quantization and inverse wavelet transform to obtain the displacement coefficients of the current LOD.
示例性地,图29A为本公开实施例提供的一种位移系数在二维图像中的填充方式示意图,图29B为本公开实施例提供的另一种位移系数在二维图像中的填充方式示意图。其中,图29A为示例性的正向填充方式,或称为“连续填充(continuous-packing)”;图29B为示例性的反向填充方式(inverse packing)。For example, Figure 29A is a schematic diagram of a filling method for the displacement coefficient in a two-dimensional image provided by an embodiment of the present disclosure, and Figure 29B is a schematic diagram of another filling method for the displacement coefficient in a two-dimensional image provided by an embodiment of the present disclosure. Figure 29A is an exemplary forward filling method, also known as "continuous-packing"; Figure 29B is an exemplary inverse filling method.
也就是说,在本公开实施例中,对于量化位移系数来说,量化位移系数在每个LOD内沿着3D空间扫描模式(例如,Morton、Hilbert或沿着其他空间填充曲线)进行扫描,每个分量形成三个一维阵列(参见图29A和图29B)。根据LOD和由语法元素dmsps_packing_order指示的预设填充方式,将量化位移系数转换成二维图像。其中,编码树单元(Coding TreeUnit,CTU)中未被占用的符号可以使用其中一种填充方法(例如零填充)进行填充。In other words, in this embodiment of the disclosure, for the quantized displacement coefficients, the quantized displacement coefficients are scanned within each LOD along a 3D spatial scanning pattern (e.g., Morton, Hilbert, or along other spatial filling curves), and each component forms three one-dimensional arrays (see Figures 29A and 29B). The quantized displacement coefficients are converted into a two-dimensional image according to the LOD and the preset padding method indicated by the syntax element dmsps_packing_order. Unoccupied symbols in the Coding Tree Unit (CTU) can be filled using one of the padding methods (e.g., zero-padding).
在步骤310中,根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。In step 310, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD.
需要说明的是,在本公开实施例中,根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格,具体地:根据位移系数对当前LOD的细分网格的顶点坐标信息进行相应位移运算,得到当前网格中的下一LOD的重建网格。It should be noted that, in this embodiment of the disclosure, the reconstructed mesh of the next LOD in the current mesh is determined based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD. Specifically, the vertex coordinate information of the subdivision mesh of the current LOD is subjected to corresponding displacement calculation based on the displacement coefficient to obtain the reconstructed mesh of the next LOD in the current mesh.
也就是说,在本公开实施例中,这里是将位移系数递归地应用于先前重建的LOD,具体是将当前LOD的细分网格的每个顶点按照顺序加上解码得到的位移系数,从而可以得到下一LOD的重建网格。In other words, in this embodiment of the disclosure, the displacement coefficients are recursively applied to the previously reconstructed LOD. Specifically, the displacement coefficients obtained by decoding are added sequentially to each vertex of the subdivided mesh of the current LOD, thereby obtaining the reconstructed mesh of the next LOD.
在一些实施例中,该方法还可以包括:在确定当前网格中的下一LOD的重建网格之后,将下一LOD的重建网格作为当前LOD的重建网格,返回执行对当前LOD的重建网格进行细分,确定当前LOD的细分网格的步骤,直至确定出当前网格中的第L个LOD的重建网格;其中,L的取值与当前网格的细分迭代次数具有关联关系。In some embodiments, the method may further include: after determining the reconstruction grid of the next LOD in the current grid, using the reconstruction grid of the next LOD as the reconstruction grid of the current LOD, returning to the step of subdividing the reconstruction grid of the current LOD and determining the subdivided grid of the current LOD, until the reconstruction grid of the Lth LOD in the current grid is determined; wherein, the value of L is related to the number of subdivision iterations of the current grid.
还需要说明的是,在本公开实施例中,当前网格的细分迭代次数可以是由码流中的第二语法元素来指示。在一实施例中,该方法可以包括:确定当前网格的细分迭代次数;根据当前网格的细分迭代次数,确定第二语法元素的取值;对第二语法元素的取值进行编码处理,将所得到的编码比特写入码流。It should also be noted that, in this embodiment of the disclosure, the number of subdivision iterations of the current grid can be indicated by a second syntax element in the bitstream. In one embodiment, the method may include: determining the number of subdivision iterations of the current grid; determining the value of the second syntax element based on the number of subdivision iterations of the current grid; encoding the value of the second syntax element; and writing the obtained encoded bits into the bitstream.
在本公开实施例中,第二语法元素可以用asps_vmc_ext_subdivision_iteration_count表示。也就是说,当前网格的细分迭代次数可以是由码流中的asps_vmc_ext_subdivision_iteration_count所指示的数值。In this embodiment of the disclosure, the second syntax element can be represented by asps_vmc_ext_subdivision_iteration_count. That is, the number of subdivision iterations of the current grid can be the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
另外,L表示当前网格对应的LOD层数,L的取值可以是由当前网格的细分迭代次数确定的,即L的取值等于asps_vmc_ext_subdivision_iteration_count所指示的数值。Additionally, L represents the LOD level corresponding to the current mesh. The value of L can be determined by the number of subdivision iterations of the current mesh, that is, the value of L is equal to the value indicated by asps_vmc_ext_subdivision_iteration_count.
这样,在本公开实施例中,对于第一语法元素指示示当前网格使用递归细分方式的情况,如图20所示,首先对基础网格进行细分,可以得到初始细分网格;在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格;然后在解码获得LOD1的位移系数之后,根据LOD1上的细分网格以及LOD1的位移系数可以确定出LOD2的重建网格,依次类推,直至得到LOD L的重建网格,表明当前网格重建完成。其中,在图20中,黑色实线(由顶点PB_1、PB_2和PB_3组成)表示基础网格,黑色虚线表示细分网格,第一加粗实线则为应用位移的LOD1,第二加粗实线则为应用位移的LOD2。Thus, in this embodiment of the disclosure, when the first syntax element indicates that the current mesh uses a recursive subdivision method, as shown in Figure 20, the base mesh is first subdivided to obtain an initial subdivided mesh. After decoding to obtain the displacement coefficients of the initial subdivided mesh, the vertex coordinate information of the initial subdivided mesh is subjected to corresponding displacement calculations based on these displacement coefficients to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, the reconstructed mesh of LOD1 is subdivided to obtain the subdivided mesh on LOD1. After decoding to obtain the displacement coefficients of LOD1, the reconstructed mesh of LOD2 can be determined based on the subdivided mesh on LOD1 and the displacement coefficients of LOD1, and so on, until the reconstructed mesh of LOD L is obtained, indicating that the current mesh reconstruction is complete. In Figure 20, the black solid line (composed of vertices PB_1, PB_2, and PB_3) represents the base mesh, the black dashed line represents the subdivided mesh, the first bold solid line is LOD1 with applied displacement, and the second bold solid line is LOD2 with applied displacement.
在一些实施例中,递归细分的详细流程如图21所示,该详细流程可以包括如下步骤。In some embodiments, the detailed process of recursive subdivision is shown in Figure 21, and the detailed process may include the following steps.
在步骤S1901中,对原始网格进行网格简化,以得到基础网格。在步骤S1902中,对基础网格进行量化。在步骤S1903中,对量化后的基础网格进行编码。在步骤S1904中,解析码流以从码流中解码基础网络,以得到重建的基础网格。在步骤S1905中,初始化n=0,并将重建的基础网格作为临时网格进行网格细分。在步骤S1906中,根据细分网格和原始网格计算位移系数。在步骤S1907中,根据位移系数和细分网格来更新临时网格。在步骤S1908中,将位移系数保存至存储器。在步骤S1909中,判断n是否小于L-1。若步骤S1909中的判断结果为是,即n<L-1,则n=n+1(S1910),继续执行步骤S1905至S1909。若步骤S1909中的判断结果为否,即n<L-1不成立,则表明细分完成。最后,还需要将位移系数编码到码流中。In step S1901, the original mesh is simplified to obtain the base mesh. In step S1902, the base mesh is quantized. In step S1903, the quantized base mesh is encoded. In step S1904, the bitstream is parsed to decode the base network from the bitstream to obtain the reconstructed base mesh. In step S1905, n is initialized to 0, and the reconstructed base mesh is used as a temporary mesh for mesh subdivision. In step S1906, displacement coefficients are calculated based on the subdivided mesh and the original mesh. In step S1907, the temporary mesh is updated based on the displacement coefficients and the subdivided mesh. In step S1908, the displacement coefficients are saved to memory. In step S1909, it is determined whether n is less than L-1. If the result of the determination in step S1909 is yes, i.e., n < L-1, then n = n + 1 (S1910), and steps S1905 to S1909 continue to be executed. If the judgment result in step S1909 is negative, i.e., n < L-1 is not true, then the subdivision is complete. Finally, the displacement coefficients need to be encoded into the bitstream.
这样,在本公开实施例中,对于第一语法元素指示示当前网格使用非线性细分方式的情况,如图22所示,首先对基础网格进行细分,可以得到初始细分网格;在解码获得初始细分网格的位移系数之后,根据该位移系数对初始细分网格的顶点坐标信息进行相应位移运算,可以得到第一LOD的重建网格,即LOD1的重建网格。然后基于LOD1的重建网格进行细分,得到LOD1上的细分网格;然后在解码获得LOD1的位移系数之后,根据LOD1上的细分网格以及LOD1的位移系数可以确定出LOD2的重建网格。对于LOD3到LOD L的重建网格,如LODi(i大于预设值,预设值可以例如是2),LOD i中的相邻基基础格顶点(第一点)的位移系数可以设置为0,而其他点(第二点)的位移系数依然可以解码获得,根据LOD i上的细分网格以及LOD i的位移系数可以确定下一LOD的重建网格。依次类推,直至得到LOD L的重建网格,表明当前网格重建完成。其中,在图22中,黑色实线(由顶点PB_1、PB_2和PB_3组成)表示基础网格,黑色虚线表示细分网格,第一加粗实线则为应用位移的LOD1,第二加粗实线则为应用位移的LOD2。尽管预设值可以是例如2,但是各实施例并不限于此。在各个实施例中,预设值可以是2,3,4,……,或任意其他整数值。Thus, in this embodiment of the disclosure, when the first syntax element indicates that the current mesh uses a non-linear subdivision method, as shown in Figure 22, the base mesh is first subdivided to obtain an initial subdivided mesh. After decoding to obtain the displacement coefficients of the initial subdivided mesh, the vertex coordinate information of the initial subdivided mesh is subjected to corresponding displacement calculations based on these displacement coefficients to obtain the reconstructed mesh of the first LOD, i.e., the reconstructed mesh of LOD1. Then, the reconstructed mesh of LOD1 is subdivided to obtain the subdivided mesh on LOD1. After decoding to obtain the displacement coefficients of LOD1, the reconstructed mesh of LOD2 can be determined based on the subdivided mesh on LOD1 and the displacement coefficients of LOD1. For the reconstructed meshes from LOD3 to LOD L, such as LODi (i is greater than a preset value, which can be, for example, 2), the displacement coefficients of the adjacent base base mesh vertices (first point) in LOD i can be set to 0, while the displacement coefficients of other points (second point) can still be decoded. The reconstructed mesh of the next LOD can be determined based on the subdivided mesh on LOD i and the displacement coefficients of LOD i. This process continues until the reconstructed mesh of LOD L is obtained, indicating that the current mesh reconstruction is complete. In Figure 22, the solid black line (composed of vertices PB_1, PB_2, and PB_3) represents the base mesh, the dashed black line represents the subdivision mesh, the first bold solid line is the LOD1 with applied displacement, and the second bold solid line is the LOD2 with applied displacement. Although the preset value can be, for example, 2, the embodiments are not limited to this. In various embodiments, the preset value can be 2, 3, 4, ..., or any other integer value.
在一些实施例中,非线性细分的详细流程如图23所示,该详细流程可以包括如下步骤。In some embodiments, the detailed process of nonlinear subdivision is shown in Figure 23, and the detailed process may include the following steps.
在步骤S1901中,对原始网格进行网格简化,以得到基础网格。在步骤S1902中,对基础网格进行量化。在步骤S1903中,对量化后的基础网格进行编码。在步骤S1904中,解析码流以从码流中解码基础网络,以得到重建的基础网格。在步骤S1905中,初始化n=0,并将重建的基础网格作为临时网格进行网格细分。在步骤S1906中,根据细分网格和原始网格计算位移系数。在步骤S1911中,为了去冗余,删除相邻基础格顶点的位移系数。在步骤S1907中,根据位移系数和细分网格来更新临时网格。在步骤S1908中,将其他位移系数保存至存储器。在步骤S1909中,判断n是否小于L-1。若步骤S1909中的判断结果为是,即n<L-1,则n=n+1,然后继续执行步骤S1905至S1909。若步骤S1909中的判断结果为否,即n<L-1不成立,则表明细分完成。最后,还需要将其他位移系数编码到码流中。In step S1901, the original mesh is simplified to obtain the base mesh. In step S1902, the base mesh is quantized. In step S1903, the quantized base mesh is encoded. In step S1904, the bitstream is parsed to decode the base network from the bitstream to obtain the reconstructed base mesh. In step S1905, n is initialized to 0, and the reconstructed base mesh is used as a temporary mesh for mesh subdivision. In step S1906, displacement coefficients are calculated based on the subdivided mesh and the original mesh. In step S1911, to remove redundancy, displacement coefficients of adjacent base mesh vertices are deleted. In step S1907, the temporary mesh is updated based on the displacement coefficients and the subdivided mesh. In step S1908, other displacement coefficients are saved to memory. In step S1909, it is determined whether n is less than L-1. If the determination result in step S1909 is yes, i.e., n < L-1, then n = n + 1, and steps S1905 to S1909 continue to be executed. If the judgment result in step S1909 is negative, i.e., n < L-1 is not true, then the subdivision is complete. Finally, the other displacement coefficients need to be encoded into the bitstream.
还可以理解地,在当前网格不使用递归细分方式时,当前网格可以使用中点细分方式。在一些实施例中,该方法可以包括:在当前网格使用中点细分方式时,确定重建基础网格;对重建基础网格进行细分,确定当前网格中的至少一个LOD的细分网格;确定当前网格中的至少一个LOD的位移系数;根据当前网格中的至少一个LOD的细分网格和至少一个LOD的位移系数,确定当前网格中的至少一个LOD的重建网格。It is also understandable that when the current mesh does not use a recursive subdivision method, the current mesh can use a midpoint subdivision method. In some embodiments, the method may include: when the current mesh uses a midpoint subdivision method, determining a reconstructed base mesh; subdividing the reconstructed base mesh to determine the subdivision mesh of at least one LOD in the current mesh; determining the displacement coefficient of at least one LOD in the current mesh; and determining the reconstructed mesh of at least one LOD in the current mesh based on the subdivision mesh of at least one LOD in the current mesh and the displacement coefficient of at least one LOD.
需要说明的是,在本公开实施例中,至少一个LOD的层数与当前网格的细分迭代次数具有关联关系。在这里,L表示至少一个LOD的层数,即当前网格对应的LOD层数,它可以是等于码流中的asps_vmc_ext_ subdivision_iteration_count所指示的数值。It should be noted that, in this embodiment, the number of at least one LOD layer is related to the number of subdivision iterations of the current grid. Here, L represents the number of at least one LOD layer, that is, the LOD layer corresponding to the current grid, which can be equal to the value indicated by asps_vmc_ext_subdivision_iteration_count in the bitstream.
还需要说明的是,在本公开实施例中,如图5和图6所示,当前网格使用中点细分方式时,这时候每一LOD的位移系数都是由细分网格的顶点坐标信息与原始网格的顶点坐标信息进行位移计算得到的,而不是基于先前重建的LOD上递归得到的。It should also be noted that, in the embodiments disclosed herein, as shown in Figures 5 and 6, when the current mesh uses the midpoint subdivision method, the displacement coefficient of each LOD is obtained by displacement calculation using the vertex coordinate information of the subdivided mesh and the vertex coordinate information of the original mesh, rather than recursively obtained based on the previously reconstructed LOD.
还可以理解地,在本公开实施例中,这里还提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一类信息:当前网格的基础网格、当前网格的至少一个LOD的位移系数、当前网格的至少一个LOD的量化参数、当前网格的至少一个LOD的量化参数增量、第一语法元素的取值、第二语法元素的取值和第三语法元素的取值。It is also understood that, in this embodiment of the disclosure, a bitstream is also provided, which is generated by bit encoding based on information to be encoded; wherein, the information to be encoded includes at least one of the following types of information: the base grid of the current grid, the displacement coefficient of at least one LOD of the current grid, the quantization parameter of at least one LOD of the current grid, the quantization parameter increment of at least one LOD of the current grid, the value of the first syntax element, the value of the second syntax element, and the value of the third syntax element.
本公开实施例提供了一种编码方法,具体是一种动态网格的递归细分方法。在本公开的实施例中,通过增加第一语法元素指示当前网格使用非线性细分方式的情况,在编码阶段,接近基本层中的顶点的位移系数可以从位移列表中去掉,因而在后续将位移系数递归地应用于先前重建的LOD的过程中,能够改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。This disclosure provides an encoding method, specifically a recursive subdivision method for dynamic meshes. In this embodiment, by adding a first syntax element to indicate that the current mesh uses a non-linear subdivision method, during the encoding stage, displacement coefficients near vertices in the base layer can be removed from the displacement list. Therefore, in the subsequent recursive application of displacement coefficients to the previously reconstructed LOD, the redundancy problem of displacement coefficients at higher levels can be improved, saving encoding bits for displacement coefficients and thus improving encoding/decoding efficiency.
在本公开的又一实施例中,基于前述实施例所述的编解码方法,如图6所示,将位移系数应用于先前重建的LOD。在某些情况下,位移系数在LOD的高级别上通常是冗余的。In yet another embodiment of this disclosure, based on the encoding/decoding method described in the foregoing embodiments, as shown in FIG6, displacement coefficients are applied to the previously reconstructed LOD. In some cases, displacement coefficients are often redundant at higher levels of the LOD.
在一些系统中,细分方法在所有LOD上共享功能,并且是由Atlas序列参数集VDMC扩展RBSP语法结构中的两个语法元素asps_vdmc_ext_subdivision_method和asps_vdmc_ext_subdivision_iteration_ count定义,如前述表1所示。In some systems, the subdivision method shares functionality across all LODs and is defined by two syntax elements, asps_vdmc_ext_subdivision_method and asps_vdmc_ext_subdivision_iteration_count, in the Atlas sequence parameter set VDMC extended RBSP syntax structure, as shown in Table 1 above.
asps_vdmc_ext_subdivision_method可以指示当前atlas序列参数集相关联的网格的细分方法标识符。前述表2描述了支持的细分方法列表及其与asps_vdmc_ext_subdivision_method的关系。`asps_vdmc_ext_subdivision_method` indicates the subdivision method identifier for the grid associated with the current atlas sequence parameter set. Table 2 above describes the list of supported subdivision methods and their relationship to `asps_vdmc_ext_subdivision_method`.
asps_vdmc_ext_subdivision_iteration_count可以指示网格的细分迭代次数。当不存在时,推断asps_vdmc_ext_subdivision_iteration_count的值等于0。`asps_vdmc_ext_subdivision_iteration_count` indicates the number of subdivision iterations of the mesh. If it does not exist, the value of `asps_vdmc_ext_subdivision_iteration_count` is assumed to be 0.
由于细分的特殊性,LOD较高级别上的位移通常退化为“0”,从而在信令和编码信息中引入显著的冗余。本公开实施例所提出的解决方案引入了有效和灵活的方法和装置,用于通过去除诸如基础网格的边和来自先前LOD的继承值的情况下的冗余位移来有效编码体积内容的网格表示的几何分量。Due to the specific nature of subdivision, displacements at higher levels of the LOD typically degenerate to "0", introducing significant redundancy in signaling and coding information. The solution proposed in this disclosure introduces an efficient and flexible method and apparatus for efficiently encoding the geometric components of a mesh representation of volumetric content by removing redundant displacements, such as edges of the base mesh and inherited values from previous LODs.
为了克服通过信号发送退化边的问题,本公开实施例提出了一种新的自适应细分方法,其中在较高级别的LOD上,与基点相邻的边总是等于0。其中,实现这点的一种方式是通过添加等于2和3的新asps_vdmc_ext_subdivision_method,该新asps_vdmc_ext_subdivision_method将创建与原始方法相同的细分,但是与基点(例如,PB_1、PB_2和PB_3)相邻的位移被推断为等于零,具体实施过程如图20、21、22、23所示。To overcome the problem of degenerate edges transmitted via signals, embodiments of this disclosure propose a novel adaptive subdivision method, wherein at higher levels of LOD, edges adjacent to base points are always equal to 0. One way to achieve this is by adding a new asps_vdmc_ext_subdivision_method equal to 2 and 3. This new asps_vdmc_ext_subdivision_method will create the same subdivision as the original method, but the displacements adjacent to base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to zero, as illustrated in Figures 20, 21, 22, and 23.
在一实施例中,编码端对网格中的几何位移系数进行有效编码的方法包括具有递归细分更新的细分过程,而位移系数是相对于先前重建LOD中的细分顶点计算的。In one embodiment, the method for effectively encoding geometric displacement coefficients in the mesh at the encoding end includes a subdivision process with recursive subdivision updates, wherein the displacement coefficients are calculated relative to the subdivision vertices in the previously reconstructed LOD.
第一阶段:网格分割,这是创建网格内容的表示独立对象/感兴趣区域/体积图块的片段或块、语义块等的步骤。LOD细分的数量由asps_vmc_ext_subdivision_iteration_count定义。Phase 1: Mesh Segmentation. This is the step of creating fragments or blocks, semantic blocks, etc., representing independent objects/regions of interest/volume map tiles, etc., of the mesh content. The number of LOD subdivisions is defined by asps_vmc_ext_subdivision_iteration_count.
第二阶段:网格简化,其创建基网格,使用未定义的静态网格编码器对基网格进行编码。对基网格进行解码并根据LOD的数量来递归地细分。The second stage is mesh simplification, which involves creating a base mesh and encoding it using an undefined static mesh encoder. The base mesh is then decoded and recursively subdivided based on the number of Levels of Distance (LODs).
第三阶段:对于每个LOD,计算网格的先前更新的细分LOD和网格的原始表面之间的网格位移。然后,使用小波变换来处理位移。The third stage: For each LOD, the mesh displacement between the previously updated subdivision LOD and the original surface of the mesh is calculated. Then, wavelet transform is used to process the displacement.
当LoD大于2且语法元素asps_vdmc_ext_subdivision_method的值等于3时,属于包含基网格的顶点的边的位移被推断为等于0,且不记录在位移列表中以便进一步编码。When LoD is greater than 2 and the value of the syntax element asps_vdmc_ext_subdivision_method is equal to 3, the displacement of the edge belonging to the vertex containing the base mesh is inferred to be equal to 0 and is not recorded in the displacement list for further encoding.
第四阶段:根据如比特流中用信号表示的LODj和对应的坐标I的量化参数vmc_transform_lifting_quantization_parameters[ltpIndex][i][j],小波变换系数转换成固定点表示,其精度在在斑块(patch)、图片或序列级别(ltpIndex)的编码比特流中指示。Fourth stage: Based on the quantization parameters vmc_transform_lifting_quantization_parameters[ltpIndex][i][j] of the LODj and corresponding coordinates I in the bitstream, the wavelet transform coefficients are converted into fixed-point representations, the accuracy of which is indicated in the coded bitstream at the patch, image, or sequence level (ltpIndex).
第五阶段:在每个LoD内沿着3D空间扫描模式(例如,莫顿、Hilbert,或者沿着其它空间填充曲线)来扫描量化后的小波系数,每个分量形成三个一维阵列(图29A和29B)。Fifth stage: Scan the quantized wavelet coefficients within each LoD along a 3D spatial scanning pattern (e.g., Morton, Hilbert, or other spatial filling curves), forming three one-dimensional arrays for each component (Figures 29A and 29B).
根据LoD以及由标志dmsps_packing_order指示的选定的打包顺序,将变换系数转换成二维图像。使用填充方法之一(例如,零填充)来填充CTU中未被占用的符号。The transform coefficients are converted into a 2D image based on the LoD and the selected packing order indicated by the flag dmsps_packing_order. Unoccupied symbols in the CTU are filled using one of the padding methods (e.g., zero-padding).
在一实施例中,解码过程与编码过程相反,解码端可以由以下五个阶段组成。In one embodiment, the decoding process is the reverse of the encoding process, and the decoding end can consist of the following five stages.
第一阶段:基网格从几何形状比特流中解码,并递归地细分到由编码器定义的LOD。Phase 1: The base grid is decoded from the geometric bitstream and recursively subdivided into LODs defined by the encoder.
第二阶段:获得几何形状位移的编码比特流,并使用对应于dmsps_mesh_codec_id解码器的编解码器来对该比特流进行解码。The second stage involves obtaining the encoded bitstream of geometric displacement and decoding it using the codec corresponding to the dmsps_mesh_codec_id decoder.
第三阶段:使用比特流中用信号表示的量化参数,对位移小波系数进行反量化。The third stage: using the quantization parameters represented by signals in the bitstream, the shift wavelet coefficients are dequantized.
第四阶段:使用反量化的位移小波系数进行反小波变换处理。Fourth stage: Perform inverse wavelet transform using the inverse-quantized displacement wavelet coefficients.
第五阶段:在每个变换级别,网格位移递归地应用于细分后的基网格,以生成重建的网格,重建的网格由表示独立对象/感兴趣区域/体积图块的块、语义块等组成。Fifth stage: At each transformation level, mesh displacement is recursively applied to the subdivided base mesh to generate a reconstructed mesh, which consists of blocks representing independent objects/regions of interest/volume tiles, semantic blocks, etc.
也就是说,在本公开的实施例中,当LoD大于2且asps_vdmc_ext_subdivision_method为3时,属于包含基网格的顶点的边的位移被推断为等于0,且添加到位移列表中的对应位置以用于网格重建。In other words, in the embodiments of this disclosure, when LoD is greater than 2 and asps_vdmc_ext_subdivision_method is 3, the displacement of the edge belonging to the vertex containing the base mesh is inferred to be equal to 0, and is added to the corresponding position in the displacement list for mesh reconstruction.
通过上述实施例对前述实施例的具体实现进行详细阐述,从中可以看出,根据前述实施例的技术方案,通过增加第一语法元素指示当前网格使用非线性细分方式的情况,在确定当前网格使用非线性细分方式时,对当前网格中的当前LOD的重建网格进行细分,确定当前LOD的细分网格;直接将当前LOD的第一点(与基点重合或相邻的点)的位移系数设置为0,即与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于0;根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。如此,在当前网格使用非线性细分方式时,能够进一步改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。The specific implementation of the aforementioned embodiments is described in detail through the above examples. It can be seen that, according to the technical solution of the aforementioned embodiments, by adding a first syntax element to indicate that the current grid uses a non-linear subdivision method, when it is determined that the current grid uses a non-linear subdivision method, the reconstructed grid of the current LOD in the current grid is subdivided to determine the subdivided grid of the current LOD; the displacement coefficient of the first point of the current LOD (the point that coincides with or is adjacent to the base point) is directly set to 0, that is, the displacement adjacent to the base point (e.g., PB_1, PB_2, and PB_3) is inferred to be equal to 0; based on the subdivided grid of the current LOD and the displacement coefficient of the current LOD, the reconstructed grid of the next LOD in the current grid is determined. Thus, when the current grid uses a non-linear subdivision method, the redundancy problem of displacement coefficients at higher levels can be further improved, saving the encoding bits of displacement coefficients, thereby improving encoding and decoding efficiency.
也就是说,在本公开的实施例中,通过增加第一语法元素指示当前网格使用非线性细分方式的情况,在编码阶段,接近基本层中的顶点的位移系数可以从位移列表中去掉,在解码阶段,接近基本层中的顶点的位移系数被推断为等于0,因而在后续将位移系数递归地应用于先前重建的LOD的过程中,能够改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。In other words, in the embodiments of this disclosure, by adding a first syntax element to indicate that the current mesh uses a non-linear subdivision method, during the encoding stage, the displacement coefficients of vertices close to the base layer can be removed from the displacement list, and during the decoding stage, the displacement coefficients of vertices close to the base layer are inferred to be equal to 0. Therefore, in the subsequent process of recursively applying the displacement coefficients to the previously reconstructed LOD, the redundancy problem of displacement coefficients at higher levels can be improved, the encoding bits of displacement coefficients can be saved, and the encoding and decoding efficiency can be improved.
在本公开的再一实施例中,基于前述实施例相同的发明构思,图30为本公开实施例提供的一种编码器的组成结构示意图。如图30所示,编码器300可以包括第一确定单元3001。In another embodiment of this disclosure, based on the same inventive concept as the foregoing embodiments, FIG30 is a schematic diagram of the composition structure of an encoder provided by an embodiment of this disclosure. As shown in FIG30, the encoder 300 may include a first determining unit 3001.
第一确定单元3001被配置为在当前网格使用非线性细分方式时,确定第一语法元素的取值,并将所述第一语法元素写入码流,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;根据所述当前LOD的细分网格和所述当前LOD的位移系数,确定所述当前网格中的下一LOD的重建网格。其中,i为大于2的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点。The first determining unit 3001 is configured to, when the current mesh uses a non-linear subdivision method, determine the value of a first syntax element, write the first syntax element into the code stream, determine the reconstructed mesh of the current LOD in the current mesh, and subdivide the reconstructed mesh of the current LOD to determine the subdivision mesh of the current LOD; if the current LOD is the i-th LOD, determine the displacement coefficient of the first point of the current LOD as 0; and determine the reconstructed mesh of the next LOD in the current mesh based on the subdivision mesh of the current LOD and the displacement coefficient of the current LOD. Here, i is an integer greater than 2; the first point includes the vertex of the reconstructed base mesh corresponding to the current mesh.
可以理解地,在本公开实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。Understandably, in the embodiments of this disclosure, a "unit" can be a portion of circuitry, a portion of processor, a portion of program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The integrated unit can be implemented in hardware or as a software functional module.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented as a software functional module and 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, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
因此,本公开实施例提供了一种计算机可读存储介质,应用于编码器300,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。Therefore, this disclosure provides a computer-readable storage medium applied to an encoder 300, the computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method described in any of the foregoing embodiments.
基于编码器300的组成以及计算机可读存储介质,图31为本公开实施例提供的一种编码器的具体硬件结构示意图。如图31所示,编码器300可以包括:第一通信接口3101、第一存储器3102和第一处理器3103;各个组件通过第一总线系统3104耦合在一起。可理解,第一总线系统3104用于实现这些组件之间的连接通信。第一总线系统3104除包括数据总线、电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图31中将各种总线都标为第一总线系统3104。Based on the composition of the encoder 300 and the computer-readable storage medium, Figure 31 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of this disclosure. As shown in Figure 31, the encoder 300 may include: a first communication interface 3101, a first memory 3102, and a first processor 3103; the various components are coupled together through a first bus system 3104. It can be understood that the first bus system 3104 is used to realize the connection and communication between these components. The first bus system 3104 includes a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clarity, all buses are labeled as the first bus system 3104 in Figure 31.
第一通信接口3101用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送。The first communication interface 3101 is used for receiving and sending signals during the process of sending and receiving information with other external network elements.
第一存储器3102用于存储能够在第一处理器3103上运行的计算机程序。The first memory 3102 is used to store computer programs that can run on the first processor 3103.
第一处理器3103用于在运行所述计算机程序时,执行如下操作:在当前网格使用非线性细分方式时,确定第一语法元素的取值,并将所述第一语法元素写入码流,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;其中,i为大于2的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点;根据所述当前LOD的细分网格和所述当前LOD的位移系数,确定所述当前网格中的下一LOD的重建网格。The first processor 3103 is configured to perform the following operations when running the computer program: when the current grid uses a non-linear subdivision method, determine the value of a first syntax element and write the first syntax element into the code stream; determine the reconstructed grid of the current LOD in the current grid; and subdivide the reconstructed grid of the current LOD to determine the subdivision grid of the current LOD; when the current LOD is the i-th LOD, determine the displacement coefficient of the first point of the current LOD to be 0; where i is an integer greater than 2; the first point includes the vertex of the reconstructed base grid corresponding to the current grid; and determine the reconstructed grid of the next LOD in the current grid based on the subdivision grid of the current LOD and the displacement coefficient of the current LOD.
可以理解,本公开实施例中的第一存储器3102可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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 DataRate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本公开描述的系统和方法的第一存储器3102旨在包括但不限于这些和任意其它适合类型的存储器。It is understood that the first memory 3102 in this embodiment of the present disclosure may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 3102 of the systems and methods described in this disclosure is intended to include, but is not limited to, these and any other suitable types of memory.
而第一处理器3103可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器3103中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器3103可以是通用处理器、数字信号处理器(Digital SignalProcessor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本公开实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本公开实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器3102,第一处理器3103读取第一存储器3102中的信息,结合其硬件完成上述方法的步骤。The first processor 3103 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the first processor 3103 or by instructions in software form. The first processor 3103 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the first memory 3102. The first processor 3103 reads the information in the first memory 3102 and completes the steps of the above method in conjunction with its hardware.
可以理解的是,本公开描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital SignalProcessing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(ProgrammableLogic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本公开所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本公开所述功能的模块(例如过程、函数等)来实现本公开所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this disclosure can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this disclosure, or combinations thereof. For software implementation, the techniques described in this disclosure can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this disclosure. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
可选地,作为另一个实施例,第一处理器3103还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Alternatively, as another embodiment, the first processor 3103 is further configured to perform the method described in any of the foregoing embodiments when running the computer program.
本实施例提供了一种编码器,在该编码器中,通过增加第一语法元素指示当前网格使用非线性细分方式的情况,在确定当前网格使用非线性细分方式时,将第一点的位移系数设置为0,即与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于0,并递归地应用于先前重建的LOD,从而能够改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。This embodiment provides an encoder in which a first syntax element is added to indicate that the current grid uses a non-linear subdivision method. When it is determined that the current grid uses a non-linear subdivision method, the displacement coefficient of the first point is set to 0. That is, the displacements adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to 0 and are recursively applied to the previously reconstructed LOD. This can improve the redundancy problem of displacement coefficients at higher levels, save the coding bits of displacement coefficients, and thus improve the encoding and decoding efficiency.
在本公开的再一实施例中,基于前述实施例相同的发明构思,图32为本公开实施例提供的一种解码器的组成结构示意图。如图32所示,解码器320可以包括第二确定单元3201。In another embodiment of this disclosure, based on the same inventive concept as the foregoing embodiments, FIG32 is a schematic diagram of the composition structure of a decoder provided in an embodiment of this disclosure. As shown in FIG32, the decoder 320 may include a second determining unit 3201.
所述第二确定单元3201被配置为解码码流,确定第一语法元素的取值;在所述第一语法元素指示当前网格使用非线性细分方式时,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;根据所述当前LOD的细分网格和所述当前LOD的第一点的位移系数,确定所述当前网格中的下一LOD的重建网格。其中,i为大于2的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点。The second determining unit 3201 is configured to decode the bitstream and determine the value of the first syntax element; when the first syntax element indicates that the current grid uses a non-linear subdivision method, it determines the reconstructed grid of the current LOD in the current grid, and subdivides the reconstructed grid of the current LOD to determine the subdivision grid of the current LOD; if the current LOD is the i-th LOD, the displacement coefficient of the first point of the current LOD is determined to be 0; based on the subdivision grid of the current LOD and the displacement coefficient of the first point of the current LOD, the reconstructed grid of the next LOD in the current grid is determined. Here, i is an integer greater than 2; the first point includes the vertex of the reconstructed base grid corresponding to the current grid.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器320,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium applied to the decoder 320. This computer-readable storage medium stores a computer program, which, when executed by a second processor, implements the method described in any of the foregoing embodiments.
基于解码器320的组成以及计算机可读存储介质,图33为本公开实施例提供的一种解码器的具体硬件结构示意图。如图33所示,解码器320可以包括:第二通信接口3301、第二存储器3302和第二处理器3303;各个组件通过第二总线系统3304耦合在一起。可理解,第二总线系统3304用于实现这些组件之间的连接通信。第二总线系统3304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图33中将各种总线都标为第二总线系统3304。Based on the composition of decoder 320 and the computer-readable storage medium, Figure 33 is a schematic diagram of the specific hardware structure of a decoder provided in an embodiment of this disclosure. As shown in Figure 33, decoder 320 may include: a second communication interface 3301, a second memory 3302, and a second processor 3303; the various components are coupled together through a second bus system 3304. It is understood that the second bus system 3304 is used to realize the connection and communication between these components. In addition to a data bus, the second bus system 3304 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the second bus system 3304 in Figure 33.
第二通信接口3301用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送。The second communication interface 3301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements.
第二存储器3302用于存储能够在第二处理器3303上运行的计算机程序。The second memory 3302 is used to store computer programs that can run on the second processor 3303.
第二处理器3303用于在运行所述计算机程序时,执行如下操作:解码码流,确定第一语法元素的取值;在所述第一语法元素指示当前网格使用非线性细分方式时,确定所述当前网格中的当前LOD的重建网格,并对所述当前LOD的重建网格进行细分以确定所述当前LOD的细分网格;在所述当前LOD为第i个LOD的情况下,将所述当前LOD的第一点的位移系数确定为0;其中,i为大于2的整数;所述第一点包括所述当前网格对应的重建基础网格的顶点;根据所述当前LOD的细分网格和所述当前LOD的第一点的位移系数,确定所述当前网格中的下一LOD的重建网格。The second processor 3303 is configured to perform the following operations when running the computer program: decode the bitstream and determine the value of the first syntax element; when the first syntax element indicates that the current grid uses a non-linear subdivision method, determine the reconstructed grid of the current LOD in the current grid, and subdivide the reconstructed grid of the current LOD to determine the subdivision grid of the current LOD; when the current LOD is the i-th LOD, determine the displacement coefficient of the first point of the current LOD to be 0; where i is an integer greater than 2; the first point includes the vertex of the reconstructed base grid corresponding to the current grid; and determine the reconstructed grid of the next LOD in the current grid based on the subdivision grid of the current LOD and the displacement coefficient of the first point of the current LOD.
可选地,作为另一个实施例,第二处理器3303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Alternatively, as another embodiment, the second processor 3303 is also configured to perform the method described in any of the foregoing embodiments when running the computer program.
可以理解,第二存储器3302与第一存储器3102的硬件功能类似,第二处理器3303与第一处理器3103的硬件功能类似;这里不再详述。It is understood that the second memory 3302 has similar hardware functions to the first memory 3102, and the second processor 3303 has similar hardware functions to the first processor 3103; these will not be described in detail here.
本实施例提供了一种解码器,在该解码器中,在确定当前网格使用非线性细分方式时,将第一点的位移系数设置为0,即与基点(例如PB_1、PB_2和PB_3)相邻的位移被推断为等于0,并递归地应用于先前重建的LOD,从而能够改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。This embodiment provides a decoder in which, when it is determined that the current grid uses a nonlinear subdivision method, the displacement coefficient of the first point is set to 0. That is, the displacements adjacent to the base points (e.g., PB_1, PB_2, and PB_3) are inferred to be equal to 0 and recursively applied to the previously reconstructed LOD. This can improve the redundancy problem of displacement coefficients at higher levels, save the coding bits of displacement coefficients, and thus improve the encoding and decoding efficiency.
在本公开的再一实施例中,图34为本公开实施例提供的一种编解码系统的组成结构示意图。如图34所示,编解码系统340可以包括编码器3401和解码器3402。In another embodiment of this disclosure, FIG34 is a schematic diagram of the composition structure of an encoding/decoding system provided in an embodiment of this disclosure. As shown in FIG34, the encoding/decoding system 340 may include an encoder 3401 and a decoder 3402.
在本公开实施例中,编码器3401可以为前述实施例中任一项所述的编码器,解码器3402可以为前述实施例中任一项所述的解码器。In this embodiment, encoder 3401 can be any of the encoders described in the foregoing embodiments, and decoder 3402 can be any of the decoders described in the foregoing embodiments.
需要说明的是,在本公开实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in the embodiments of this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
还需要说明的是,本公开实施例还提供了一种计算机程序产品,包括计算机程序或指令。It should also be noted that the present disclosure also provides a computer program product, including a computer program or instructions.
在一些实施例中,该计算机程序产品可应用于本公开实施例中的终端设备,并且该计算机程序或指令使得计算机执行本公开实施例的各个方法中由终端设备实现的相应流程,为了简洁,在此不再赘述。In some embodiments, the computer program product may be applied to a terminal device in the embodiments of this disclosure, and the computer program or instructions cause the computer to execute the corresponding processes implemented by the terminal device in the various methods of the embodiments of this disclosure. For the sake of brevity, these will not be described in detail here.
还需要说明的是,本公开实施例还提供了一种计算机程序。It should also be noted that the present disclosure also provides a computer program.
在一些实施例中,该计算机程序可应用于本公开实施例中的终端设备,当该计算机程序在计算机上运行时,使得计算机执行本公开实施例的各个方法中由终端设备实现的相应流程,为了简洁,在此不再赘述。In some embodiments, the computer program can be applied to the terminal device in the embodiments of this disclosure. When the computer program is run on a computer, it causes the computer to execute the corresponding processes implemented by the terminal device in the various methods of the embodiments of this disclosure. For the sake of brevity, it will not be described in detail here.
本领域普通技术人员可以意识到,结合本公开所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
本公开所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new method embodiments.
本公开所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in the several product embodiments provided in this disclosure can be combined arbitrarily without conflict to obtain new product embodiments.
本公开所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in the several method or device embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new method or device embodiments.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
工业实用性Industrial applicability
本公开实施例提供了一种编解码方法、码流、编码器、解码器、介质及产品,在解码端,解码码流,确定第一语法元素的取值;在第一语法元素指示当前网格使用非线性细分方式时,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格;在当前LOD为第i个LOD的情况下,将当前LOD的第一点的位移系数确定为0;其中,i为大于2的整数;第一点包括当前网格对应的重建基础网格的顶点;根据当前LOD的细分网格和当前LOD的第一点的位移系数,确定当前网格中的下一LOD的重建网格。在编码端,在当前网格使用非线性细分方式时,确定第一语法元素的取值,并将第一语法元素写入码流,确定当前网格中的当前LOD的重建网格,并对当前LOD的重建网格进行细分,确定当前LOD的细分网格;在当前LOD为第i个LOD的情况下,将当前LOD的第一点的位移系数确定为0;其中,i为大于2的整数;第一点包括当前网格对应的重建基础网格的顶点;根据当前LOD的细分网格和当前LOD的位移系数,确定当前网格中的下一LOD的重建网格。也就是说,在本公开的实施例中,通过增加第一语法元素指示当前网格使用非线性细分方式的情况,在编码阶段,接近基本层中的顶点的位移系数可以从位移列表中去掉,在解码阶段,接近基本层中的顶点的位移系数被推断为等于0,因而在后续将位移系数递归地应用于先前重建的LOD的过程中,能够改善高级别上位移系数存在的冗余问题,节省位移系数的编码比特,进而提升编解码效率。This disclosure provides an encoding/decoding method, a bitstream, an encoder, a decoder, a medium, and a product. At the decoding end, the bitstream is decoded, and the value of a first syntax element is determined. When the first syntax element indicates that the current grid uses a non-linear subdivision method, the reconstructed grid of the current LOD in the current grid is determined, and the reconstructed grid of the current LOD is subdivided to determine the subdivided grid of the current LOD. If the current LOD is the i-th LOD, the displacement coefficient of the first point of the current LOD is determined to be 0; where i is an integer greater than 2; the first point includes the vertex of the reconstructed base grid corresponding to the current grid. Based on the subdivided grid of the current LOD and the displacement coefficient of the first point of the current LOD, the reconstructed grid of the next LOD in the current grid is determined. At the encoding end, when the current grid uses a non-linear subdivision method, the value of the first syntax element is determined and written into the bitstream. The reconstructed grid of the current LOD in the current grid is determined, and the reconstructed grid of the current LOD is subdivided to determine the subdivided grid of the current LOD. When the current LOD is the i-th LOD, the displacement coefficient of the first point of the current LOD is determined to be 0; where i is an integer greater than 2; the first point includes the vertex of the reconstructed base grid corresponding to the current grid. Based on the subdivided grid of the current LOD and the displacement coefficient of the current LOD, the reconstructed grid of the next LOD in the current grid is determined. That is, in the embodiments of this disclosure, by adding a first syntax element to indicate that the current grid uses a non-linear subdivision method, during the encoding stage, the displacement coefficients of vertices close to the base layer can be removed from the displacement list. During the decoding stage, the displacement coefficients of vertices close to the base layer are inferred to be equal to 0. Therefore, in the subsequent process of recursively applying the displacement coefficients to the previously reconstructed LOD, the redundancy problem of displacement coefficients at higher levels can be improved, the encoding bits of displacement coefficients can be saved, and thus the encoding and decoding efficiency can be improved.
Claims (49)
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US202363521327P | 2023-06-15 | 2023-06-15 | |
| US63/521,327 | 2023-06-15 | ||
| PCT/CN2024/099684 WO2024255912A1 (en) | 2023-06-15 | 2024-06-17 | Encoding method, decoding method, bitstream, encoder, decoder, medium and program product |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN121058043A true CN121058043A (en) | 2025-12-02 |
Family
ID=93851365
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202480027912.XA Pending CN121058043A (en) | 2023-06-15 | 2024-06-17 | Encoding methods, decoding methods, bitstreams, encoders, decoders, media and program products |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN121058043A (en) |
| WO (1) | WO2024255912A1 (en) |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080031325A1 (en) * | 2006-08-03 | 2008-02-07 | Yingyong Qi | Mesh-based video compression with domain transformation |
| CN106408620A (en) * | 2016-09-08 | 2017-02-15 | 成都希盟泰克科技发展有限公司 | Compressive sensing-based three-dimensional grid model data processing method |
| US11450030B2 (en) * | 2019-09-24 | 2022-09-20 | Apple Inc. | Three-dimensional mesh compression using a video encoder |
| US12340468B2 (en) * | 2020-03-15 | 2025-06-24 | Intel Corporation | Apparatus and method for displaced mesh compression |
| CN114331816B (en) * | 2021-12-27 | 2025-09-12 | 北京达佳互联信息技术有限公司 | Image processing method, device, electronic device and storage medium |
-
2024
- 2024-06-17 CN CN202480027912.XA patent/CN121058043A/en active Pending
- 2024-06-17 WO PCT/CN2024/099684 patent/WO2024255912A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| WO2024255912A1 (en) | 2024-12-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101986282B1 (en) | Method and apparatus for repetitive structure discovery based 3d model compression | |
| WO2024035762A1 (en) | Dynamic mesh geometry refinement component adaptive coding | |
| CN119678499A (en) | Method, device and medium for point cloud encoding and decoding | |
| WO2024163690A2 (en) | Visual volumetric video-based coding method, encoder and decoder | |
| CN120092264A (en) | Method, device and medium for point cloud encoding and decoding | |
| WO2023155045A1 (en) | Prediction method and apparatus, coder, decoder, and coding and decoding system | |
| CN121058043A (en) | Encoding methods, decoding methods, bitstreams, encoders, decoders, media and program products | |
| WO2024148573A1 (en) | Encoding and decoding method, encoder, decoder, and storage medium | |
| WO2025067513A1 (en) | Encoding and decoding methods, encoder, decoder and storage medium | |
| WO2024255475A1 (en) | Coding and decoding methods, bitstream, encoder, decoder and storage medium | |
| WO2024039703A1 (en) | Dynamic mesh geometry refinement | |
| WO2025081769A1 (en) | Coding and decoding methods, bitstream, 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 | |
| WO2025152005A1 (en) | Encoding method, decoding method, encoding apparatus, decoding apparatus, encoder, decoder, code stream, device, and storage medium | |
| US12445613B2 (en) | Displacement quantization syntax | |
| US20240282011A1 (en) | Fix-point implementation of mesh codec | |
| CN120982094A (en) | Encoding and decoding methods, encoders, decoders, bitstreams, and storage media | |
| WO2025076656A1 (en) | Encoding method, decoding method, encoder, decoder, and storage medium | |
| WO2025213480A1 (en) | Encoding method and apparatus, decoding method and apparatus, point cloud encoder, point cloud decoder, bit stream, device, and storage medium | |
| WO2025213306A1 (en) | Coding method, decoding method, coders, decoders and storage medium | |
| WO2025007270A9 (en) | Encoding method, decoding method, encoder, decoder, code stream, and storage medium | |
| WO2025000429A1 (en) | Coding method, decoding method, code stream, coder, decoder, and storage medium | |
| WO2025208498A1 (en) | Encoding method, decoding method, encoders, decoders, bitstream and storage media | |
| WO2025145325A1 (en) | Encoding method, decoding method, encoders, decoders and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication |