Coding and decoding method and device, codec, code stream, equipment and storage medium
Patent Information
- Application Number
- CN202280099717.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2025-04-08
AI Technical Summary
Existing technology is difficult to effectively compress and manage massive 3D point cloud data, resulting in limitations in storage space and transmission bandwidth, which affects the processing efficiency of point cloud data.
A coding and decoding method is proposed, which encodes the first flag bit to indicate whether the attribute coefficients in the point cloud code stream are all specific values, reducing the amount of coding information, improving coding efficiency, and determining the value of the attribute coefficient based on the flag bit at the decoding end. , improve decoding efficiency.
It effectively improves the encoding and decoding efficiency of the point cloud compression system, saves code stream overhead, reduces storage and transmission requirements, and solves the storage and transmission bottleneck problem of massive point cloud data.
Smart Images

Figure CN119790659A_ABST
Abstract
Description
Coding and decoding method and device, codec, code stream, device, storage medium Technical Field
[0001] The embodiments of the present application relate to point cloud compression technology, including but not limited to encoding and decoding methods and devices, codecs, bit streams, devices, and storage media. Background Art
[0002] A point cloud is a collection of randomly distributed discrete points in space that represent the spatial structure and surface properties of a three-dimensional object or scene. Point cloud data typically includes both geometric and attribute information about the sampling points. Geometric information includes the three-dimensional position (x, y, z) of the sampling points, while attribute information includes color information and / or one-dimensional reflectance information.
[0003] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Moreover, since point clouds are obtained by directly sampling real objects, they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.
[0004] As application demands grow, the processing of massive amounts of three-dimensional (3D) point cloud data is facing bottlenecks in storage space and transmission bandwidth. To better manage data, conserve server storage space, and reduce transmission traffic and time between servers and clients, point cloud compression has become a key issue in promoting the development of the point cloud industry.
[0005] Summary of the Invention
[0006] The encoding and decoding methods and apparatuses, codecs, bitstreams, devices, and storage media provided in the embodiments of this application are intended to improve the encoding and decoding efficiency in a point cloud compression system. The encoding and decoding processing methods and apparatuses, codecs, bitstreams, devices, and storage media provided in the embodiments of this application are implemented as follows:
[0007] According to one aspect of an embodiment of the present application, a coding method is provided, which is applied to an encoder, and the method includes: encoding a first flag bit to a point cloud code stream; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first numerical values; when the attribute coefficients of the at least two first attribute components are both first numerical values, encoding a second attribute coefficient of the second attribute component of the current point to the point cloud code stream; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components.
[0008] According to another aspect of an embodiment of the present application, a decoding method is provided, which is applied to a decoder, and the method includes: decoding a point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first numerical values; when the first flag bit indicates that the attribute coefficients of the at least two first attribute components are both first numerical values, determining that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; the second attribute component is different from the at least two first attribute components.
[0009] According to another aspect of the embodiments of the present application, there is provided an encoding device, which is applied to an encoder, and the device includes: an encoding module, configured to encode a first flag bit to a point cloud code stream; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first numerical values; a second determination module, configured to encode a second attribute coefficient of the second attribute component of the current point to the point cloud code stream when the attribute coefficients of the at least two first attribute components are both first numerical values; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components.
[0010] According to another aspect of an embodiment of the present application, an encoder is provided, comprising a second memory and a second processor; wherein the second memory is used to store a computer program that can be run on the second processor; and the second processor is used to execute the encoding method described in the embodiment of the present application when running the computer program.
[0011] According to another aspect of an embodiment of the present application, a point cloud code stream is provided, which is generated by the encoding method described in the embodiment of the present application.
[0012] According to another aspect of the embodiments of the present application, a decoding device is provided, which is applied to a decoder, and the device includes: a decoding module, configured to decode a point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first numerical values; a first determination module, configured to determine that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1 when the first flag bit indicates that the attribute coefficients of the at least two first attribute components are both first numerical values; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; the second attribute component is different from the at least two first attribute components.
[0013] According to another aspect of an embodiment of the present application, a decoder is provided, comprising a first memory and a first processor; wherein the first memory is used to store a computer program that can be run on the first processor; and the first processor is used to execute the decoding method described in the embodiment of the present application when running the computer program.
[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor adapted to execute a computer program; and a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the decoding method described in the embodiment of the present application is implemented, or when the computer program is executed by the processor, the encoding method described in the embodiment of the present application is implemented.
[0015] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the decoding method described in the embodiments of the present application, or implements the encoding method described in the embodiments of the present application.
[0016] In the encoding method provided in the embodiment of the present application, a first flag is encoded to the point cloud code stream, and the first flag indicates whether the attribute coefficients of at least two first attribute components (instead of one attribute component) of the current point are all first values; when the attribute coefficients of the at least two first attribute components are all first values, the second attribute coefficient of the second attribute component of the current point is encoded to the point cloud code stream; in this way, compared with directly encoding the attribute coefficients of each attribute component of the current point separately, encoding the attribute coefficients of at least two attribute components by encoding the first flag can reduce the amount of encoded information, thereby improving encoding efficiency and saving code stream overhead; accordingly, the decoding efficiency of the decoding end is also improved.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into and constitute a part of this specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, serve to illustrate the technical solutions of the present application. Obviously, the drawings described below are merely some embodiments of the present application. Those skilled in the art can, without inventive effort, derive other drawings from these drawings.
[0019] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0020] Figure 1 is a partial enlarged view of a certain three-dimensional point cloud image;
[0021] FIG2 is a schematic diagram of the structure of an encoder in the MPEG G-PCC attribute codec framework provided in an embodiment of the present application;
[0022] FIG3 is a schematic diagram of the structure of a decoder in the MPEG G-PCC attribute codec framework provided in an embodiment of the present application;
[0023] FIG4 is a schematic diagram of the structure of an AVS encoder provided in an embodiment of the present application;
[0024] FIG5 is a schematic diagram of the structure of an AVS decoder provided in an embodiment of the present application;
[0025] FIG6 is a schematic diagram of an implementation flow of the encoding method provided in an embodiment of the present application;
[0026] FIG7 is a schematic diagram of an implementation flow of another encoding method provided in an embodiment of the present application;
[0027] FIG8 is a schematic diagram of an implementation flow of another encoding method provided in an embodiment of the present application;
[0028] FIG9 is a schematic diagram of an implementation flow of a decoding method provided in an embodiment of the present application;
[0029] FIG10 is a schematic diagram of an implementation flow of another decoding method provided in an embodiment of the present application;
[0030] FIG11 is a schematic diagram of an implementation flow of another decoding method provided in an embodiment of the present application;
[0031] FIG12 is a schematic diagram of an implementation flow of yet another encoding method provided in an embodiment of the present application;
[0032] FIG13 is a schematic diagram of an implementation flow of yet another decoding method provided in an embodiment of the present application;
[0033] FIG14 is a schematic diagram of an implementation flow of another encoding method provided in an embodiment of the present application;
[0034] FIG15 is a schematic diagram of an implementation flow of another decoding method provided in an embodiment of the present application;
[0035] FIG16 is a schematic diagram of the structure of an encoding device provided in an embodiment of the present application;
[0036] FIG17 is a schematic diagram of the structure of a decoding device provided in an embodiment of the present application;
[0037] FIG18 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0038] FIG19 is a schematic diagram of the structure of the encoder provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the specific technical solutions of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but do not limit the scope of the present application.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0041] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0042] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are intended to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0043] A point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or scene. Figure 1 shows a partially enlarged view of a three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
[0044] Two-dimensional images contain information at every pixel, and their distribution is regular, so there's no need to record their location information. However, the distribution of points in a point cloud in three-dimensional space is random and irregular, so recording the location of each point in space is necessary to fully represent a point cloud. Similar to two-dimensional images, each location in the acquisition process has corresponding attribute information, typically an RGB color value, which reflects the object's color. For point clouds, in addition to color, reflectance is also a common attribute for each point, which reflects the surface material of the object. Therefore, a point cloud typically includes geometric information (x, y, z) composed of three-dimensional position information, as well as attribute information such as three-dimensional color information (r, g, b) and one-dimensional reflectance information (r).
[0045] Point clouds are primarily collected through computer generation, 3D laser scanning, and 3D photogrammetry. Computers can generate point clouds of virtual 3D objects and scenes; 3D laser scanning can obtain point clouds of static real-world 3D objects or scenes, generating millions of point clouds per second; and 3D photogrammetry can obtain point clouds of dynamic real-world 3D objects or scenes, generating tens of millions of point clouds per second. These technologies reduce the cost and time required to acquire point cloud data while improving data accuracy. While changes in point cloud data acquisition methods have made it possible to acquire large amounts of point cloud data, the processing of this massive amount of 3D point cloud data is facing bottlenecks due to storage space and transmission bandwidth constraints, as application demands grow.
[0046] Taking a point cloud video with a frame rate of 30 fps (frames per second) as an example, each frame contains 700,000 points, each with float coordinate information (x, y, z) and uchar color information (r, g, b). Therefore, the data volume of a 10-second point cloud video is approximately 0.7 million (4 bytes 3 + 1 byte 3) 30 fps 10 seconds = 3.15 GB. For a 1280 x 720 2D video with a YUV sampling format of 4:2:0 and a frame rate of 24 fps, the data volume for 10 seconds is approximately 1280 x 720 12-bit 24 frames 10 seconds = 0.33 GB. A 10-second two-view 3D video has a data volume of approximately 0.33 x 2 = 0.66 GB. This shows that the data volume of a point cloud video far exceeds that of 2D and 3D videos of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.
[0047] In the point cloud MPEG G-PCC encoder framework, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately. The reference software attribute encoding framework of G-PCC can be divided into Pred branch, PredLift branch and / or RAHT branch.
[0048] Figure 2 shows the encoder architecture within the MPEG G-PCC attribute codec framework. As shown in Figure 2, during the geometry encoding process, geometric information is transformed so that all point clouds are contained within a bounding box. Quantization then occurs. This quantization step primarily serves a scaling purpose. Due to quantization rounding, some point clouds have identical geometric information. Parameters are then used to determine whether to remove duplicate points. This process of quantization and removing duplicate points is also known as voxelization. The bounding box is then partitioned into an octree or constructed as a prediction tree. During this process, arithmetic coding is performed on the points in the leaf nodes of the partition to generate a binary geometry bitstream. Alternatively, arithmetic coding is performed on the intersection points (vertices) generated by the partition (surface fitting is performed based on the intersections) to generate a binary geometry bitstream. During the attribute encoding process, after geometry encoding is completed and the geometric information is reconstructed, color conversion is performed to convert the color information (i.e., attribute information) from RGB color space to YUV color space. The reconstructed geometry is then used to recolor the point cloud, aligning the unencoded attribute information with the reconstructed geometry. Attribute encoding is mainly performed on color information. In the color information encoding process, there are two main transformation methods. One is the distance-based lifting transformation that relies on the level of detail (LOD) division, and the other is the direct region adaptive hierarchical transformation (RAHT). Both methods convert color information from the spatial domain to the frequency domain, obtain high-frequency coefficients and low-frequency coefficients through transformation, and finally quantize the coefficients to obtain quantized coefficients; then, the quantized coefficients are arithmetically encoded to generate a binary attribute bit stream.
[0049] Figure 3 shows the structure of the decoder in the MPEG G-PCC attribute codec framework. As shown in Figure 3, for the obtained binary bit stream, the geometric bit stream and attribute bit stream in the binary bit stream are first decoded independently. When decoding the geometric bit stream, the geometric information of the point cloud is obtained through arithmetic decoding-reconstruction of the octree / reconstruction of the prediction tree-reconstruction of the geometry-coordinate inverse conversion; when decoding the attribute bit stream, the attribute information of the point cloud is obtained through arithmetic decoding-inverse quantization-LOD partitioning / RAHT-color inverse conversion, and the point cloud data to be encoded (i.e., the output point cloud) is restored based on the geometric information and attribute information. The attribute bit stream and geometric bit stream shown in Figures 2 and 3 can be understood as point cloud code streams.
[0050] It should be noted that, as shown in Figure 2 or Figure 3, the geometric codec of MPEG G-PCC can be divided into octree-based geometric codec (marked by a dotted box) and prediction tree-based geometric codec (marked by a dotted box).
[0051] The general test conditions for G-PCC are as follows:
[0052] 1) There are four test conditions: Condition 1: Geometric position lossless, attribute lossy; Condition 2: Geometric position lossy, attribute lossy;
[0053] Condition 3: The geometric position is lossless and the attributes are lossless; Condition 4: The geometric position is lossless and the attributes are lossy to a limited extent.
[0054] The general test sequences include four categories: Cat1A, Cat1B, Cat3-fused and Cat3-frame; among them, Cat2-frame point cloud only contains reflectance attribute information, Cat1A and Cat1B point clouds only contain color attribute information, and Cat3-fused point cloud contains both color and reflectance attribute information.
[0055] 2) Technical route: The following three technical routes are distinguished based on the algorithm used for attribute compression; among them,
[0056] Technical Route 1: Pred branch (for conditions 3 and 4): On the encoding side, the attribute residual coefficients are obtained using the Pred prediction method, and the attribute residual coefficients are entropy encoded; on the decoding side, the attribute residual coefficients are obtained through entropy decoding, and the original values are restored using the Pred prediction method.
[0057] Technical Route 2: Predlift branch (for conditions 1 and 2): On the encoding side, the Predlift method is used to obtain the attribute transformation coefficients, and the attribute transformation coefficients are entropy encoded; on the decoding side, entropy decoding is performed to obtain the attribute transformation coefficients, and the Predlift transformation method is used to restore the original values.
[0058] Technical Route 3: RAHT branch (for conditions 1 and 2): At the encoding end, the RAHT method is used to obtain the attribute transformation coefficients, and the attribute transformation coefficients are entropy encoded; at the decoding end, the attribute transformation coefficients are obtained by entropy decoding, and the RAHT method is used to restore the original values.
[0059] For the attribute residual coefficients (attribute residual coefficients generated by pred encoding) or attribute transformation coefficients (attribute transformation coefficients generated by predlift encoding or raht encoding) generated by the above technical route, attribute entropy encoding and decoding are performed.
[0060] For Pred: Let the three components of the color attribute be value0, value1, and value2 that have been predicted and quantized; where value0 represents the residual coefficient of Y or R, value1 represents the residual coefficient of U or G, and value2 represents the residual coefficient of V or B.
[0061] For PredLift: Let the three components of the color attribute be value0, value1 and value2 after prediction, transformation and quantization; among them, value0 represents the transformation coefficient of Y or R, value1 represents the transformation coefficient of U or G, and value2 represents the transformation coefficient of V or B.
[0062] For RAHT: value0, value1 and value2 are the transform coefficients generated after RAHT transformation and quantization.
[0063] The encoding and decoding processes used for the Pred branch, PredLift branch, and RAHT branch are described as follows:
[0064] Then, for the encoding side, the encoding method is as follows:
[0065] When value0=value1=value2=0, run length is used for encoding. When value0, value1 and value2 are not all 0 at the same time, the encoding of value0, value1 and value2 is realized by the following encoding method:
[0066] Calculate b0, b1, b2, and b3; b0 represents whether the absolute value of value1 is equal to 0, b1 represents whether the absolute value of value1 is less than or equal to 1, b2 represents whether the absolute value of value2 is equal to 0, and b3 represents whether the absolute value of value2 is less than or equal to 1.
[0067] The G-PCC attribute encoder is used to encode the absolute value of value1 using a fixed context; it can also be understood that the G-PCC attribute encoder uses a fixed context to encode the absolute value of value1;
[0068] The attribute encoder of G-PCC uses b0 and b1 to adaptively select context for encoding the absolute value of value2; it can also be understood that the attribute encoder of G-PCC uses b0 and b1 to adaptively select context for encoding the absolute value of value2.
[0069] When the absolute value of value1 and the absolute value of value2 are both equal to 0, the G-PCC attribute encoder uses b0, b1, b2 and b3 to adaptively select contexts to encode the absolute value of value0 minus one. It can also be understood that the G-PCC attribute encoder uses b0, b1, b2 and b3 to adaptively select contexts to encode the absolute value of value0 minus one.
[0070] When the absolute value of value1 and the absolute value of value2 are not equal to 0 at the same time, the attribute encoder of G-PCC uses b0, b1, b2 and b3 to adaptively select the context for encoding the absolute value of value0; it can also be understood that the attribute encoder of G-PCC uses b0, b1, b2 and b3 to adaptively select the context for encoding the absolute value of value0.
[0071] Finally, if the absolute value of value0 is not 0, its sign is encoded; if the absolute value of value1 is not 0, its sign is encoded; if the absolute value of value2 is not 0, its sign is encoded.
[0072] Correspondingly, for the decoding end, the decoding method is as follows:
[0073] Decode the value of run length. When the value of run length is not 0, that is, starting from the current point, value0=value1=value2 of the subsequent run length points are all equal to 0.
[0074] When the run length value is 0, value0, value1, and value2 are decoded as follows:
[0075] The G-PCC attribute decoder is used to decode the absolute value of value1 using a fixed context; it can also be understood that the G-PCC attribute decoder uses a fixed context to decode the absolute value of value1;
[0076] Calculate b0 and b1; b0 represents whether the absolute value of value1 is equal to 0, and b1 represents whether the absolute value of value1 is less than or equal to 1;
[0077] The G-PCC attribute decoder uses b0 and b1 to adaptively select the context for decoding the absolute value of value2; it can also be understood that the G-PCC attribute decoder uses b0 and b1 to adaptively select the context for decoding the absolute value of value2;
[0078] Calculate b2 and b3; b2 represents whether the absolute value of value2 is equal to 0, and b3 represents whether the absolute value of value2 is less than or equal to 1;
[0079] The attribute decoder of G-PCC uses b0, b1, b2 and b3 to adaptively select the context of the absolute value of value0 for decoding; It can be understood that the attribute decoder of G-PCC uses b0, b1, b2 and b3 to adaptively select the context of the absolute value of value0 for decoding;
[0080] When the absolute value of value1 and the absolute value of value2 are both equal to 0, the final absolute value of value0 is equal to the absolute value decoded value of value0 plus one;
[0081] When the absolute value of value1 and the absolute value of value2 are different and equal to 0 at the same time, the absolute value of value0 is equal to the absolute value decoded value of value0.
[0082] Finally, if the absolute final value of value0 is not 0, its sign is decoded; if the absolute final value of value1 is not 0, its sign is decoded; if the absolute final value of value2 is not 0, its sign is decoded.
[0083] In the point cloud AVS PCC attribute encoder framework, the point cloud's geometric information and the attribute information corresponding to each point are encoded separately. The AVS PCC reference software attribute encoding framework can be divided into Pred-based, Predtrans-resource-constrained, Predtrans-unrestricted, and Trans-based.
[0084] It is understood that in the point cloud AVS codec framework, the geometric information of the point cloud and the attribute information corresponding to each point are also encoded separately. Figure 4 shows a schematic diagram of the structure of an AVS encoder, and Figure 5 shows a schematic diagram of the structure of an AVS decoder.
[0085] As shown in Figure 4, in the structural framework of the AVS encoder, the geometric information is first transformed into coordinates so that all point clouds are contained in a Bounding Box. Before the preprocessing process, the parameter configuration is used to determine whether to divide the entire point cloud sequence into multiple slices, and each divided slice is treated as a single independent point cloud for serial processing. The preprocessing process includes quantization and removal of duplicate points. Quantization mainly plays a role in scaling. Due to the quantization rounding, the geometric information of some points is the same, and whether to remove duplicate points is determined based on the parameters. Next, the Bounding Box is divided in the order of breadth-first traversal (octree / quadtree / binary tree), and the placeholder code of each node is encoded. In octree-based geometric coding, the bounding box is sequentially divided into sub-cubes. The sub-cubes that are not empty (contain points in the point cloud) are divided again until the leaf nodes obtained are 1×1×1 unit cubes. Then, in the case of lossless geometric coding, the number of points contained in the leaf nodes is encoded, and finally the geometric octree is encoded to generate a binary geometric bitstream (i.e., geometry codestream). The geometry codestream and attribute codestream shown in Figure 4 can be understood as a point cloud codestream.
[0086] As shown in Figure 5, in the structural framework of the AVS decoder, based on the octree-based geometric decoding process, the decoding end obtains the placeholder code of each node by continuous parsing in the order of breadth-first traversal, and continuously divides the nodes in sequence until a 1×1×1 unit cube is obtained. The division stops, the number of points contained in each leaf node is parsed, and finally the geometric information is restored.
[0087] After geometric encoding is complete, the geometric information is reconstructed. Attribute encoding primarily targets color information and / or reflectance information. First, a determination is made as to whether color space conversion is required. If so, the color information is converted from RGB to YUV. The reconstructed point cloud is then recolored using the original point cloud to align the unencoded attribute information with the reconstructed geometric information. Color information encoding is divided into two modules: attribute prediction and attribute transformation. The attribute prediction process is as follows: first, the point cloud is reordered, followed by differential prediction. There are two reordering methods: Morton reordering and Hilbert reordering. For Cat1A and Cat2 sequences, Hilbert reordering is performed; for Cat1B and Cat3 sequences, Morton reordering is performed. Attribute prediction is then performed on the sorted point cloud using a differential method. Finally, the prediction residual is quantized and entropy coded to generate a binary attribute bitstream. The attribute transformation process is as follows: First, wavelet transform the point cloud attributes and quantize the transform coefficients; second, attribute reconstruction values are obtained through inverse quantization and inverse wavelet transform; then, the difference between the original attribute and the reconstructed attribute value is calculated to obtain the attribute residual and quantized; finally, the quantized transform coefficients and attribute residual are entropy encoded to generate a binary attribute bitstream (i.e., attribute codestream). In the AVS decoder framework, the decoder performs entropy decoding, inverse quantization, attribute prediction compensation / attribute inverse transform, and inverse spatial transform on the attribute bitstream to ultimately recover the attribute information.
[0088] It can also be understood that for the AVS codec framework, the general test conditions are as follows:
[0089] 1) There are four test conditions: Condition 1: limited loss of geometry and loss of attributes; Condition 2: lossless geometry and lossy attributes; Condition 3: lossless geometry and limited loss of attributes; Condition 4: lossless geometry and lossless attributes.
[0090] 2) The general test sequence includes five categories: Cat1A, Cat1B, Cat1C, Cat2-frame, and Cat3. Among them, Cat1A and Cat2-frame point clouds only contain reflectance attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1B point cloud contains both color and reflectance attribute information.
[0091] 3) Technical route: There are 4 technical routes, which are divided into the following 4 routes based on the algorithm used for attribute compression.
[0092] Technical Route 1: Pred (prediction) branch, attribute compression uses an intra-frame prediction-based method:
[0093] At the encoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, the Morton order, or the Hilbert order, etc.). First, a prediction algorithm is used to obtain the attribute prediction value. The attribute residual is obtained based on the attribute value and the attribute prediction value. Then, the attribute residual is quantized to generate a quantized residual, and finally the quantized residual is encoded.
[0094] At the decoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, the Morton order or the Hilbert order, etc.). The prediction algorithm is first used to obtain the attribute prediction value, and then the decoding is performed to obtain the quantized residual. The quantized residual is then dequantized, and finally the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized residual.
[0095] Technical Route 2: Based on Predtrans-Resource Constraints (based on the prediction transform branch - resource constraints), attribute compression uses a method based on intra-frame prediction and DCT transform. When encoding the quantized transform coefficients, there is a maximum point number M (such as 4096), that is, at most every M points can be encoded as a group:
[0096] At the encoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, the Morton order, or the Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of N (such as 2). These small groups are then combined into several large groups (the number of points in each large group does not exceed M, such as 4096). Then, a prediction algorithm is used to obtain attribute prediction values. Based on the attribute values and attribute prediction values, attribute residuals are obtained. DCT transforms are performed on the attribute residuals in small groups to generate transform coefficients. The transform coefficients are then quantized to generate quantized transform coefficients. Finally, the quantized transform coefficients are encoded in large groups.
[0097] At the decoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, the Morton order or the Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of N (such as 2), and then these small groups are combined into several large groups (the number of points in each large group does not exceed M, such as 4096). The quantized transform coefficients are decoded in large groups, and then the prediction algorithm is used to obtain the attribute prediction value. The quantized transform coefficients are then dequantized and inversely transformed in small groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.
[0098] Technical Route 3: Based on Predtrans-Unrestricted Resources (based on the prediction transform branch - Unrestricted Resources), attribute compression uses a method based on intra-frame prediction and DCT transform. When encoding the quantized transform coefficients, there is no limit on the maximum number of points M, that is, all coefficients are encoded together:
[0099] At the encoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, the Morton order, or the Hilbert order, etc.). The entire point cloud is first divided into several small groups with a maximum length of N (such as 2). Then, a prediction algorithm is used to obtain attribute prediction values. Attribute residuals are obtained based on the attribute values and attribute prediction values. The attribute residuals are subjected to DCT transformation in groups to generate transformation coefficients. The transformation coefficients are then quantized to generate quantized transformation coefficients. Finally, the quantized transformation coefficients of the entire point cloud are encoded.
[0100] At the decoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, the Morton order or the Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of N (such as 2). The quantized transformation coefficients of the entire point cloud are obtained by decoding, and then the prediction algorithm is used to obtain the attribute prediction value. The quantized transformation coefficients are then dequantized and inversely transformed in groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.
[0101] Technical Route 4: Based on the Trans branch (multi-layer transform branch), attribute compression adopts a method based on multi-layer wavelet transform:
[0102] At the encoding end, the entire point cloud is subjected to multi-layer wavelet transform to generate transform coefficients, which are then quantized to generate quantized transform coefficients. Finally, the quantized transform coefficients of the entire point cloud are encoded.
[0103] At the decoding end, decoding obtains the quantized transform coefficients of the entire point cloud, and then dequantizes and inversely transforms the quantized transform coefficients to obtain attribute reconstruction values.
[0104] For the attribute residual coefficients (attribute residual coefficients generated by Pred encoding) or attribute transform coefficients (Predtrans-resource limited, Predtrans-resource unlimited, Trans) generated by the above technical route, attribute entropy encoding and decoding are performed.
[0105] The entropy encoding method of the above attributes is:
[0106] For Pred: value0, value1 and value2 after prediction quantization, value0 represents the residual coefficient of Y or R, value1 represents the residual coefficient of U or G, and value2 represents the residual coefficient of V or B.
[0107] For Predtrans-resource-limited and Predtrans-resource-unlimited: value0, value1, and value2 are DC coefficients and AC coefficients after transformation and quantization, also known as transformation coefficients.
[0108] For Trans: value0, value1 and value2 are transform coefficients after multi-layer transform quantization.
[0109] The AVS PCC encoding and decoding scheme is described as follows:
[0110] For the encoding side, the encoding method is described as follows:
[0111] 1. Use a fixed context to encode a flag bit, which represents whether value1 is equal to 0;
[0112] 2. If value1 is equal to 0, continue to use the fixed context to encode a flag bit, which indicates whether value0 is equal to 0;
[0113] 1) If value1 and value0 are both equal to 0, use a fixed context to encode the absolute value of value2 minus 1 and its sign;
[0114] 2) If value1 is equal to 0 but value0 is not equal to 0, use the fixed context to encode the absolute value of value0 minus 1 and its sign, and continue to use the fixed context to encode value2 and its sign;
[0115] 3. If value1 is not equal to 0, use the fixed context to encode the absolute value of value1 minus 1 and encode its sign, continue to use the fixed context to encode value0 and encode its sign; continue to use the fixed context to encode value2 and encode its sign.
[0116] For the decoding end, the decoding method is described as follows:
[0117] 1. Use a fixed context to decode a flag bit, which represents whether value1 is equal to 0;
[0118] 2. If value1 is equal to 0, continue to use the fixed context to decode a flag bit, which indicates whether value0 is equal to 0;
[0119] 1) If value1 and value0 are both equal to 0, use the fixed context to decode the absolute value of value2 and decode its sign. The final value of the absolute value of value2 is equal to the absolute value of value2 plus 1.
[0120] 2) If value1 is equal to 0 but value0 is not equal to 0, use the fixed context to decode the absolute value of value0 and decode its sign, and continue to use the fixed context to decode value2 and decode its sign; wherein, the final absolute value of value0 is equal to the absolute value of value0 plus 1;
[0121] 3. If value1 is not equal to 0, use the fixed context to decode the absolute value of value1 and decode its sign, continue to use the fixed context to decode value0 and decode its sign; continue to use the fixed context to decode value2 and decode its sign; among which, the final value of the absolute value of value1 is equal to the absolute value decoded value of value0 plus 1.
[0122] In the above encoding, value0, value1, and value2 are encoded one by one. However, in the following embodiment, joint encoding is considered, that is, a flag bit can be used to encode value1 and value2 simultaneously. At the same time, the encoded value is used to adaptively select the context for encoding, thereby saving codewords. The decoding end also adopts a similar principle.
[0123] In view of this, an embodiment of the present application first provides a coding method, which can be applied to the arithmetic coding of the attribute coding part in the encoder shown in Figure 2, and can also be applied to the entropy coding of the attribute coding part in the encoder shown in Figure 4. Of course, it is not limited to being applied only to the encoders shown in Figures 2 and 4. The framework of the encoder, decoder and business scenarios described in the embodiment of the present application are for the purpose of more clearly illustrating the technical solutions of the embodiment of the present application, and do not constitute a limitation on the technical solutions provided in the embodiment of the present application. It is known to those skilled in the art that with the evolution of encoders and decoders and the emergence of new business scenarios, the technical solutions provided in the embodiment of the present application are equally applicable to similar technical problems.
[0124] FIG6 is a schematic diagram of an implementation flow of the encoding method provided in an embodiment of the present application. As shown in FIG6 , the method includes the following steps 601 and 602:
[0125] In step 601, the encoder encodes a first flag bit into a point cloud code stream; wherein the first flag bit is used to indicate whether the attribute coefficients (attribute coefficent) of at least two first attribute components of the current point are both first values.
[0126] In the embodiment of the present application, there is no limitation on the number of bits of the first flag bit, which can be one bit or multiple bits. For example, when the first flag bit is encoded with one bit, the first flag bit is equal to 0, indicating that the attribute coefficients of at least two first attribute components of the current point are both the first value; the first flag bit is equal to 1, indicating that at least one of the attribute coefficients of at least two first attribute components of the current point is not the first value; or the first flag bit is equal to 1, indicating that the attribute coefficients of at least two first attribute components of the current point are both the first value; the first flag bit is equal to 0, indicating that at least one of the attribute coefficients of at least two first attribute components of the current point is not the first value.
[0127] Step 602: When the attribute coefficients of the at least two first attribute components are both first values, the encoder encodes the second attribute coefficient of the second attribute component of the current point into a point cloud code stream; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components.
[0128] In the embodiments of the present application, the first value is not limited. In some embodiments, the first value is equal to 0.
[0129] In an embodiment of the present application, the encoder encodes a first flag bit to a point cloud code stream, and the first flag bit indicates whether the attribute coefficients of at least two first attribute components (instead of one attribute component) of the current point are all first values; when the attribute coefficients of the at least two first attribute components are all first values, the second attribute coefficient of the second attribute component of the current point is encoded to the point cloud code stream; in this way, compared with directly encoding the attribute coefficients of each attribute component of the current point separately, encoding the attribute coefficients of at least two attribute components by encoding the first flag bit can reduce the amount of encoded information, thereby improving encoding efficiency and saving code stream overhead; accordingly, the decoding efficiency of the decoding end is also improved.
[0130] It should be noted that in the G-PCC codec framework, for Pred: the first attribute coefficient represents the attribute residual coefficient, for PredLift and for RAHT: the first attribute coefficient represents the attribute transformation coefficient. In the AVS codec framework, for Pred: the first attribute coefficient represents the attribute residual coefficient. For Predtrans-resource-limited, Predtrans-resource-unlimited and Trans: the first attribute coefficient represents the attribute transformation coefficient. Of course, the first attribute coefficient described in the embodiment of the present application is not limited to the above coefficients. In short, it is the coefficient output by the previous step such as entropy coding and decoding or arithmetic coding and decoding.
[0131] The present embodiment further provides an encoding method. FIG7 is a schematic diagram of an implementation flow of another encoding method provided by the present embodiment. As shown in FIG7 , the method includes the following steps 700 to 710:
[0132] In step 700 , the encoder encodes the first parameter into a point cloud code stream.
[0133] Among them, in some embodiments, the first parameter is used to represent the number of consecutive points where each attribute coefficient is the first value. In some embodiments, the first parameter can be understood as runlength. It can be understood that runlength represents that the attribute coefficients of consecutive runlength groups (each n is a group, such as n is equal to 3) are all 0 at the same time or that the attribute coefficients of n consecutive runlength points (such as n is equal to 3) are all 0 at the same time. That is to say, the first parameter represents the number of consecutive sampling points or consecutive sampling point groups where each attribute coefficient is 0. Runlength = 0 means that the attribute coefficients of the various attribute components of the current group are not all 0 at the same time or the attribute coefficients of the various attribute components of the current point are not all 0 at the same time. First, the encoder encodes runlength. When runlength is equal to 0, it enters the following encoding scheme, thereby saving codewords.
[0134] In other embodiments, the first parameter is used to represent the number of consecutive groups in which each attribute coefficient is the first value. For example, in DCT transform: in DCT transform, runlength represents m1 points performing DCT transform and outputting k1 transform coefficients (wherein each n (such as n is equal to 3) is a group), and runlength is not 0, which means that the transform coefficients of consecutive runlength groups are all 0. A runlength of 0 means that the n (such as n is equal to 3) transform coefficients of the current group are not all 0. For another example, in RAHT transform: in RAHT transform, runlength represents m2 points performing RAHT transform and outputting k2 transform coefficients (wherein each n (such as n is equal to 3) is a group), and runlength is not 0, which means that the transform coefficients of consecutive runlength groups are all 0. A runlength of 0 means that the n (such as n is equal to 3) transform coefficients of the current group are not all 0.
[0135] Step 701: When the number of points where each attribute component is the first value is equal to the first value, the encoder encodes the first flag bit to the point cloud code stream; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are all the first value.
[0136] In some embodiments, the first value is equal to zero.
[0137] In step 701, in some embodiments, the encoder encodes the first flag using a first context. Further, in some embodiments, the first context is a fixed context model.
[0138] In step 702, the encoder determines whether the attribute coefficients of the at least two first attribute components are both first values; if so, execute step 703; otherwise, execute step 704; that is, when at least one of the attribute coefficients of the at least two first attribute components is not the first value, execute step 704.
[0139] Step 703: The encoder encodes a second attribute coefficient of the second attribute component of the current point into a point cloud code stream; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components;
[0140] In step 703, in some embodiments, the encoder encodes the second attribute coefficient using a second context. Further, in some embodiments, the second context is a fixed context.
[0141] Step 704: The encoder encodes the second flag into the point cloud code stream, and then proceeds to step 705;
[0142] The second flag bit is used to indicate whether the attribute coefficient of at least one first attribute component among the at least two first attribute components is the first value.
[0143] In some embodiments, the encoder may use the eleventh context to encode the second flag bit. Further, in some embodiments, the eleventh context is a fixed context.
[0144] In step 705, the encoder determines whether the attribute coefficient of at least one of the at least two first attribute components is the first value; if so, execute step 706; otherwise, execute step 708; that is, when at least one of the attribute coefficients of the at least two first attribute components is not the first value, execute step 708.
[0145] Step 706: The encoder encodes a fourth attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component into a point cloud code stream, and then proceeds to step 707.
[0146] The fourth attribute coefficient is equal to the third attribute coefficient of the first attribute component different from the at least one first attribute component minus 1.
[0147] In step 706, in some embodiments, the encoder encodes the fourth attribute coefficient using the third context. Further, in some embodiments, the third context is a fixed context.
[0148] Step 707: The encoder encodes the fifth attribute coefficient of the second attribute component into a point cloud code stream.
[0149] In step 707, in some embodiments, the encoder selects a fourth context using the third attribute coefficient or the fourth attribute coefficient; and encodes the fifth attribute coefficient using the fourth context.
[0150] Further, in some embodiments, the encoder determines whether the absolute value of the third attribute coefficient or the fourth attribute coefficient is equal to 1 and whether the absolute value of the third attribute coefficient or the fourth attribute coefficient is greater than or equal to 2, and adaptively selects the fourth context based on this; or, in other embodiments, the encoder determines whether the absolute value of the third attribute coefficient or the fourth attribute coefficient is equal to 1 and whether the absolute value of the third attribute coefficient or the fourth attribute coefficient is less than or equal to 2, and adaptively selects the fourth context based on this.
[0151] In step 708 , the encoder encodes the seventh attribute coefficient of the at least one first attribute component into a point cloud code stream, and proceeds to step 709 ; wherein the seventh attribute coefficient is equal to the sixth attribute coefficient of the at least one first attribute component minus 1.
[0152] In step 708, in some embodiments, the encoder encodes the seventh attribute coefficient of the at least one first attribute component using the fifth context. Further, in some embodiments, the fifth context is a fixed context.
[0153] In step 709 , the encoder encodes an eighth attribute coefficient of a first attribute component different from the at least one first attribute component in the at least two first attribute components into a point cloud code stream, and then proceeds to step 710 .
[0154] In step 709, in some embodiments, the encoder selects a sixth context using the sixth attribute coefficient or the seventh attribute coefficient; and encodes the eighth attribute coefficient of the first attribute component different from the at least one first attribute component using the sixth context.
[0155] Further, in some embodiments, the encoder determines whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is equal to 1 and whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is greater than or equal to 2, and adaptively selects the sixth context based on this; or, in other embodiments, the encoder determines whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is equal to 1 and whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is less than or equal to 2, and adaptively selects the sixth context based on this.
[0156] In step 710 , the encoder encodes the ninth attribute coefficient of the second attribute component into a point cloud code stream.
[0157] In step 710, in some embodiments, the encoder selects a seventh context using the sixth attribute coefficient or one of the seventh attribute coefficients, and / or the eighth attribute coefficient; and encodes the ninth attribute coefficient of the second attribute component using the seventh context.
[0158] For example, the seventh context is selected using the sixth attribute coefficient and the eighth attribute coefficient; for another example, the seventh context is selected using the seventh attribute coefficient and the eighth attribute coefficient; for another example, the seventh context is selected using the sixth attribute coefficient or the seventh attribute coefficient; for another example, the seventh context is selected using the eighth attribute coefficient.
[0159] Further, in some embodiments, the encoder determines whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is equal to 1, and whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is greater than or equal to 2, and determines whether the absolute value of the eighth attribute coefficient is equal to 0, and whether the absolute value of the eighth attribute coefficient is greater than or equal to 1 to jointly and adaptively select the seventh context.
[0160] Alternatively, in other embodiments, the encoder determines whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is equal to 1, and whether the absolute value of the sixth attribute coefficient or the seventh attribute coefficient is less than or equal to 2, and determines whether the absolute value of the eighth attribute coefficient is equal to 0, and whether the absolute value of the eighth attribute coefficient is less than or equal to 1 to jointly and adaptively select the seventh context.
[0161] The present application further provides an encoding method. FIG8 is a schematic diagram of an implementation flow of another encoding method provided in the present application. As shown in FIG8 , the method includes the following steps 800 to 806:
[0162] In step 800 , the encoder encodes the first parameter into a point cloud code stream.
[0163] In some embodiments, the first parameter is used to represent the number of consecutive points where each attribute coefficient is the first value. In other embodiments, the first parameter is used to represent the number of consecutive groups where each attribute coefficient is the first value.
[0164] Step 801: When the number of points where each attribute component is the first value is equal to the first value, the encoder encodes the first flag bit to the point cloud code stream; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are all the first value.
[0165] In some embodiments, the first value is equal to zero.
[0166] In step 801, in some embodiments, the encoder encodes the first flag bit using a first context. Further, in some embodiments, the first context is a fixed context.
[0167] Step 802: The encoder determines whether the attribute coefficients of the at least two first attribute components are both first values; if so, execute step 803; otherwise, execute step 804; that is, when at least one of the attribute coefficients of the at least two first attribute components is not the first value, execute step 804;
[0168] In step 803, the encoder encodes a second attribute coefficient of the second attribute component of the current point into a point cloud code stream; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components.
[0169] In step 803, in some embodiments, the encoder encodes the second attribute coefficient using a second context. Further, in some embodiments, the second context is a fixed context.
[0170] Step 804: The encoder encodes the tenth attribute coefficient of at least one of the at least two first attribute components into a point cloud code stream, and then proceeds to step 805.
[0171] In step 804, in some embodiments, the encoder encodes the tenth attribute coefficient using the eighth context. Further, in some embodiments, the eighth context is a fixed context.
[0172] Step 805: The encoder encodes an eleventh attribute coefficient of the first attribute component of the at least two first attribute components, which is different from the at least one first attribute component, into a point cloud code stream using the tenth attribute coefficient, and then proceeds to step 806;
[0173] In step 805, in some embodiments, the encoder selects a ninth context using the tenth attribute coefficient; and encodes the eleventh attribute coefficient using the ninth context.
[0174] Further, in some embodiments, the encoder determines whether the absolute value of the tenth attribute coefficient is equal to 1 and whether the absolute value of the tenth attribute coefficient is greater than or equal to 2, and adaptively selects the ninth context based on this; or, in other embodiments, the encoder determines whether the absolute value of the tenth attribute coefficient is equal to 1 and whether the absolute value of the tenth attribute coefficient is less than or equal to 2, and adaptively selects the ninth context based on this.
[0175] Step 806: The encoder encodes the twelfth attribute coefficient of the second attribute component into a point cloud code stream using the tenth attribute coefficient and the eleventh attribute coefficient.
[0176] In step 806, in some embodiments, the encoder selects a tenth context using the tenth attribute coefficient and the eleventh attribute coefficient; and encodes the twelfth attribute coefficient using the tenth context.
[0177] Further, in some embodiments, the encoder determines whether the absolute value of the tenth attribute coefficient is equal to 1, and whether the absolute value of the tenth attribute coefficient is greater than or equal to 2, and determines whether the absolute value of the eleventh attribute coefficient is equal to 0, and whether the absolute value of the eleventh attribute coefficient is greater than or equal to 1, and based on this, adaptively selects the tenth context; or, in other embodiments, the encoder determines whether the absolute value of the tenth attribute coefficient is equal to 1, and whether the absolute value of the tenth attribute coefficient is less than or equal to 2, and determines whether the absolute value of the eleventh attribute coefficient is equal to 0, and whether the absolute value of the eleventh attribute coefficient is less than or equal to 1, and based on this, adaptively selects the tenth context.
[0178] In some embodiments, the encoding method described in any of the above embodiments further includes: when the final value of the attribute coefficient of any of the attribute components is not the first value, encoding the sign of the final value of the attribute coefficient of any of the attribute components; the sign is used to indicate whether the corresponding final value of the attribute coefficient is positive or negative. In view of this, the attribute coefficients mentioned above all refer to the absolute values of the attribute coefficients.
[0179] In some embodiments, the attribute coefficients (here referring to the attribute coefficients not reduced by one), i.e., the first attribute coefficient, the third attribute coefficient, the fifth attribute coefficient, the sixth attribute coefficient, the eighth attribute coefficient, the ninth attribute coefficient, the tenth attribute coefficient, the eleventh attribute coefficient and the twelfth attribute coefficient are all determined according to one of the Pred, Predlift, RAHT, Predtrans-resource-limited, Predtrans-resource-unlimited and Trans methods.
[0180] It should be noted that in the G-PCC codec framework, for Pred, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute residual coefficients. For PredLift and RAHT, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute transform coefficients. In the AVS codec framework, for Pred, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute residual coefficients. For Predtrans-resource-limited, Predtrans-resource-unlimited, and Trans, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute transform coefficients. Of course, the attribute coefficient types described in the embodiments of the present application are not limited to the above coefficients. In short, they can be coefficients output from the previous step such as entropy coding and decoding or arithmetic coding and decoding.
[0181] In some embodiments, the encoding method further includes: obtaining an attribute reconstruction value of the attribute component at least based on the attribute coefficient of the attribute component; wherein the attribute coefficient of the attribute component is one of the following: a first attribute coefficient, a third attribute coefficient, a fifth attribute coefficient, a sixth attribute coefficient, an eighth attribute coefficient, a ninth attribute coefficient, a tenth attribute coefficient, an eleventh attribute coefficient, and a twelfth attribute coefficient.
[0182] Accordingly, an embodiment of the present application provides a decoding method, which can be applied to the arithmetic decoding of the attribute decoding part in the decoder shown in Figure 3, and can also be applied to the entropy decoding of the attribute decoding part in the decoder shown in Figure 5. Of course, it is not limited to being applied only to the decoders shown in Figures 3 and 5. The framework of the encoder, decoder and business scenarios described in the embodiment of the present application are for the purpose of more clearly illustrating the technical solutions of the embodiment of the present application, and do not constitute a limitation on the technical solutions provided in the embodiment of the present application. It is known to those skilled in the art that with the evolution of encoders and decoders and the emergence of new business scenarios, the technical solutions provided in the embodiment of the present application are equally applicable to similar technical problems.
[0183] FIG9 is a schematic diagram of an implementation flow of a decoding method provided in an embodiment of the present application. As shown in FIG9 , the method includes the following steps 901 and 902:
[0184] Step 901: The decoder decodes the point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first values;
[0185] Step 902: When the first flag indicates that the attribute coefficients of the at least two first attribute components are all first values, the decoder determines that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; the second attribute component is different from the at least two first attribute components.
[0186] In some embodiments, the first value is equal to zero.
[0187] In an embodiment of the present application, since the first flag bit indicates whether the attribute coefficients of at least two first attribute components (rather than one attribute component) of the current point are all first values; when the first flag bit indicates that the attribute coefficients of the at least two first attribute components are all first values, it is sufficient to decode the second attribute coefficient of the second attribute component of the current point without decoding the attribute coefficient of each attribute component of the current point, thereby improving the decoding efficiency of point cloud compression.
[0188] The present application further provides a decoding method. FIG10 is a schematic diagram of an implementation flow of another decoding method provided in the present application. As shown in FIG10 , the method includes the following steps 1001 to 1011:
[0189] Step 1001: The decoder decodes the point cloud code stream to obtain a first parameter.
[0190] Among them, in some embodiments, the first parameter is used to represent the number of consecutive points where each attribute coefficient is the first value. The first parameter can be understood as runlength. It can be understood that runlength represents that the attribute coefficients of consecutive runlength groups (each n is a group, n is 3) are all 0 at the same time or that the attribute coefficients of consecutive runlength points (n is 3) are all 0 at the same time. In other words, the first parameter represents the number of consecutive sampling points or consecutive sampling point groups where each attribute coefficient is 0. runlength=0 represents that the first attribute coefficient, the second attribute coefficient and the third attribute coefficient of the current group are not all 0 at the same time or the first attribute coefficient, the second attribute coefficient and the third attribute coefficient of the current point are not all 0 at the same time. First, the decoder decodes runlength. When runlength is equal to 0, it enters the following decoding scheme.
[0191] In other embodiments, the first parameter is used to represent the number of consecutive groups in which each attribute coefficient is the first value. For example, in DCT transform: in DCT transform, runlength represents m1 points performing DCT transform to output k1 transform coefficients (wherein, every n (such as n is equal to 3) is a group), and runlength is not 0, which means that the transform coefficients of consecutive runlength groups are all 0. A runlength of 0 means that the n (such as n is equal to 3) transform coefficients of the current group are not all 0. For another example, in RAHT transform: in RAHT transform, runlength represents m2 points performing RAHT transform to output k2 transform coefficients (wherein, every n (such as n is equal to 3) is a group), and runlength is not 0, which means that the transform coefficients of consecutive runlength groups are all 0. A runlength of 0 means that the n (such as n is equal to 3) transform coefficients of the current group are not all 0.
[0192] Step 1002: When the first parameter is equal to the first value, the decoder decodes the point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both the first value.
[0193] In some embodiments, the first value is equal to zero.
[0194] In step 1002, in some embodiments, the decoder decodes the point cloud code stream using the first context to obtain the first flag.
[0195] In step 1003, the decoder determines whether the attribute coefficients of at least two first attribute components of the current point indicated by the first flag are all first numerical values; if so, execute step 1004; otherwise, execute step 1005; that is, when the first flag indicates that at least one of the attribute coefficients of the at least two first attribute components is not the first numerical value, execute step 1005.
[0196] In step 1004, the decoder determines that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; and the second attribute component is different from the at least two first attribute components.
[0197] In step 1004, in some embodiments, the decoder decodes the point cloud code stream using the second context to obtain the second attribute coefficient.
[0198] In step 1005 , the decoder determines a second flag bit and proceeds to step 1006 ; wherein the second flag bit is used to indicate whether the attribute coefficient of at least one first attribute component among the at least two first attribute components is the first value.
[0199] In step 1005, in some embodiments, the decoder decodes the point cloud stream to obtain the second flag. Furthermore, in some embodiments, the decoder may decode the point cloud stream using an eleventh context to obtain the second flag. Furthermore, in some embodiments, the eleventh context is a fixed context.
[0200] In step 1006, the decoder determines whether the attribute coefficient of at least one first attribute component among the at least two first attribute components indicated by the second flag bit is the first value; if so, execute step 1007; otherwise, execute step 1009; that is, when the second flag bit indicates that the attribute coefficient of the at least one first attribute component is not the first value, execute step 1009.
[0201] In step 1007, the decoder determines that the third attribute coefficient of the first attribute component different from the at least one first attribute component in the at least two first attribute components is equal to the fourth attribute coefficient of the first attribute component different from the at least one first attribute component plus 1, and the fourth attribute coefficient is parsed from the point cloud code stream; then proceeds to step 1008.
[0202] In step 1007, in some embodiments, the decoder decodes the point cloud code stream using the third context to obtain the fourth attribute coefficient.
[0203] Step 1008: The decoder determines a fifth attribute coefficient of the second attribute component; wherein the fifth attribute coefficient is obtained by parsing the point cloud code stream.
[0204] In step 1008, in some embodiments, the decoder selects a fourth context using the third attribute coefficient or the fourth attribute coefficient; and decodes the point cloud code stream using the fourth context to obtain the fifth attribute coefficient.
[0205] In step 1009 , the decoder determines that the sixth attribute coefficient of the at least one first attribute component is equal to the seventh attribute coefficient of the at least one first attribute component plus 1, and the seventh attribute coefficient is parsed from the point cloud code stream; and proceeds to step 1010 .
[0206] In step 1009 , in some embodiments, the decoder decodes the point cloud code stream using the fifth context to obtain a seventh attribute coefficient of the at least one first attribute component.
[0207] In step 1010, the decoder determines an eighth attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component, and proceeds to step 1011; wherein the eighth attribute coefficient is obtained by parsing the point cloud code stream.
[0208] In step 1010, in some embodiments, the decoder selects a sixth context using the sixth attribute coefficient or the seventh attribute coefficient; and decodes the point cloud code stream using the sixth context to obtain an eighth attribute coefficient of the first attribute component that is different from the at least one first attribute component.
[0209] Step 1011: The decoder determines a ninth attribute coefficient of the second attribute component; wherein the ninth attribute coefficient is obtained by parsing the point cloud code stream.
[0210] In step 1011, in some embodiments, the decoder selects a seventh context using the sixth attribute coefficient or one of the seventh attribute coefficients, and / or the eighth attribute coefficient; and decodes the point cloud code stream using the seventh context to obtain a ninth attribute coefficient of the second attribute component.
[0211] The present application further provides a decoding method. FIG11 is a schematic diagram of an implementation flow of another decoding method provided in the present application. As shown in FIG11 , the method includes the following steps 1101 to 1107:
[0212] Step 1101: The decoder decodes the point cloud code stream to obtain a first parameter.
[0213] In some embodiments, the first parameter is used to represent the number of consecutive points where each attribute coefficient is the first value. In other embodiments, the first parameter is used to represent the number of consecutive groups where each attribute coefficient is the first value.
[0214] Step 1102: When the first parameter is equal to the first value, the decoder decodes the point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both the first value;
[0215] In step 1102, in some embodiments, the decoder decodes the point cloud code stream using the first context to obtain the first flag.
[0216] In step 1103, the decoder determines whether the attribute coefficients of at least two first attribute components of the current point indicated by the first flag are all first numerical values; if so, execute step 1104; otherwise, execute step 1105; that is, when the first flag indicates that at least one of the attribute coefficients of the at least two first attribute components is not the first numerical value, execute step 1105.
[0217] In step 1104, the decoder determines that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; and the second attribute component is different from the at least two first attribute components.
[0218] In step 1104 , in some embodiments, the decoder decodes the point cloud code stream using the second context to obtain the second attribute coefficient.
[0219] Step 1105: The decoder decodes the point cloud code stream to obtain a tenth attribute coefficient of at least one of the at least two first attribute components, and then proceeds to step 1106;
[0220] In step 1105 , in some embodiments, the decoder decodes the point cloud code stream using the eighth context to obtain the tenth attribute coefficient.
[0221] Step 1106: The decoder decodes the point cloud code stream using the tenth attribute coefficient to obtain an eleventh attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component, and then proceeds to step 1107.
[0222] In step 1106, in some embodiments, the decoder uses the tenth attribute coefficient to select a ninth context; and uses the ninth context to decode the point cloud code stream to obtain the eleventh attribute coefficient.
[0223] Step 1107: The decoder decodes the point cloud code stream using the tenth attribute coefficient and the eleventh attribute coefficient to obtain the twelfth attribute coefficient of the second attribute component.
[0224] In step 1107, in some embodiments, the decoder selects a tenth context using the tenth attribute coefficient and the eleventh attribute coefficient; and decodes the point cloud code stream using the tenth context to obtain the twelfth attribute coefficient.
[0225] In some embodiments, the decoding method described in any of the above embodiments further includes: when the final value of the attribute coefficient of any of the attribute components is not the first value, decoding the point cloud code stream to obtain the sign of the final value of the attribute coefficient of any of the attribute components; the sign is used to indicate whether the corresponding final value of the attribute coefficient is a positive number or a negative number.
[0226] In some embodiments, the attribute coefficients (for the decoding end, here refers to the final value of the attribute coefficient), that is, the first attribute coefficient, the third attribute coefficient, the fifth attribute coefficient, the sixth attribute coefficient, the eighth attribute coefficient, the ninth attribute coefficient, the tenth attribute coefficient, the eleventh attribute coefficient and the twelfth attribute coefficient are all determined according to one of the Pred, Predlift, RAHT, Predtrans-resource-limited, Predtrans-resource-unlimited and Trans methods.
[0227] It should be noted that in the G-PCC codec framework, for Pred, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute residual coefficients. For PredLift and RAHT, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute transform coefficients. In the AVS codec framework, for Pred, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute residual coefficients. For Predtrans-resource-limited, Predtrans-resource-unlimited, and Trans, the first, third, fifth, sixth, eighth, ninth, tenth, eleventh, and twelfth attribute coefficients represent attribute transform coefficients. Of course, the attribute coefficient types described in the embodiments of the present application are not limited to the above coefficients. In short, they can be coefficients output from the previous step such as entropy coding and decoding or arithmetic coding and decoding.
[0228] In some embodiments, the decoding method further includes: obtaining an attribute reconstruction value of the attribute component at least based on the attribute coefficient of the attribute component; the attribute coefficient of the attribute component is one of the following: a first attribute coefficient, a third attribute coefficient, a fifth attribute coefficient, a sixth attribute coefficient, an eighth attribute coefficient, a ninth attribute coefficient, a tenth attribute coefficient, an eleventh attribute coefficient, and a twelfth attribute coefficient.
[0229] It should be noted that in the encoding and decoding scheme provided in the embodiment of the present application, there is no limitation on the types of the at least two first attribute components of the current point and the second attribute component of the current point, nor is there a limitation on the number of the first attribute components. In some embodiments, for color attributes, the at least two first attribute components may include any two components from the Y component, the U component, and the V component, or the at least two first attribute components may include any two components from the R component, the G component, and the B component; accordingly, the second attribute component is the remaining component of the above three components that is different from the at least two first attribute components.
[0230] In addition, there is no limitation on the type of at least one of the at least two first attribute components and the type of the first attribute component different from the at least one first attribute component among the at least two first attribute components. It can be any component among the Y component, U component and V component, or any component among the R component, G component and B component.
[0231] For example, in some embodiments, the at least two first attribute components include a U component and a V component, and the second attribute component includes a Y component. Based on this, further, in some embodiments, at least one of the at least two first attribute components includes a U component, and the first attribute component of the at least two first attribute components that is different from the at least one first attribute component is a V component; or, in other embodiments, at least one of the at least two first attribute components includes a V component, and the first attribute component of the at least two first attribute components that is different from the at least one first attribute component is a U component.
[0232] In some embodiments, the at least two first attribute components include a U component and a Y component, and the second attribute component includes a V component. Based on this, further, in some embodiments, at least one first attribute component among the at least two first attribute components includes a U component, and the first attribute component among the at least two first attribute components that is different from the at least one first attribute component is a Y component; or, in other embodiments, at least one first attribute component among the at least two first attribute components includes a Y component, and the first attribute component among the at least two first attribute components that is different from the at least one first attribute component is a U component.
[0233] In some embodiments, the at least two first attribute components include a V component and a Y component, and the second attribute component includes a U component. Based on this, further, in some embodiments, at least one first attribute component among the at least two first attribute components includes a V component, and the first attribute component among the at least two first attribute components that is different from the at least one first attribute component is a Y component; or, in other embodiments, at least one first attribute component among the at least two first attribute components includes a Y component, and the first attribute component among the at least two first attribute components that is different from the at least one first attribute component is a V component.
[0234] Similarly, in some embodiments, the at least two first attribute components include an R component and a G component, and the second attribute component includes a B component. Based on this, further, in some embodiments, at least one of the at least two first attribute components includes an R component, and the first attribute component of the at least two first attribute components that is different from the at least one first attribute component is a G component; or, in other embodiments, at least one of the at least two first attribute components includes a G component, and the first attribute component of the at least two first attribute components that is different from the at least one first attribute component is an R component.
[0235] In some embodiments, the at least two first attribute components include an R component and a B component, and the second attribute component includes a V component. Based on this, further, in some embodiments, at least one of the at least two first attribute components includes an R component, and the first attribute component of the at least two first attribute components that is different from the at least one first attribute component is a B component; or, in other embodiments, at least one of the at least two first attribute components includes a B component, and the first attribute component of the at least two first attribute components that is different from the at least one first attribute component is an R component.
[0236] In some embodiments, the at least two first attribute components include a G component and a B component, and the second attribute component includes an R component. Based on this, further, in some embodiments, at least one first attribute component among the at least two first attribute components includes a G component, and the first attribute component among the at least two first attribute components that is different from the at least one first attribute component is a B component; or, in other embodiments, at least one first attribute component among the at least two first attribute components includes a B component, and the first attribute component among the at least two first attribute components that is different from the at least one first attribute component is a G component.
[0237] It should also be noted that the decoding method described above with respect to FIG. 9 corresponds to the encoding method described above with respect to FIG. 6 , the decoding method described above with respect to FIG. 10 corresponds to the encoding method described above with respect to FIG. The decoding method described above with respect to FIG. 11 corresponds to the encoding method described above with respect to FIG. Therefore, for any technical details not disclosed in the decoding method, please refer to the corresponding descriptions and explanations of the encoding method described above. To save space and avoid repetition, some technical details of the decoding method will not be further described here.
[0238] In some embodiments, a 1-bit flag may be used to indicate whether the encoding method provided in the embodiment of the present application is enabled. This flag is placed in the attribute header of the high-level syntax element. This flag is conditionally analyzed under certain specific conditions. If this flag does not appear in the bitstream, its default value is a fixed value. That is, if this flag does not appear in the bitstream, the encoding method provided in the embodiment of the present application is enabled / used by default. Alternatively, if this flag does not appear in the bitstream, the encoding method provided in the embodiment of the present application is not enabled / used by default.
[0239] Similarly, the decoding end needs to decode the flag bit. If this flag bit does not appear in the code stream, it will not be decoded. Its default value is a fixed value. That is, if this flag bit does not appear in the code stream, the decoding method provided in the embodiment of the present application is enabled / used by default; or, if this flag bit does not appear in the code stream, the decoding method provided in the embodiment of the present application is not enabled / used by default.
[0240] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.
[0241] The following is a description of the specific solution for the codec end:
[0242] For the encoding end, as shown in FIG12 , the process includes the following steps 1201 to 1207:
[0243] Step 1201, using the context to encode the first flag bit, which represents whether the absolute value of the attribute coefficient 1 of the current point and the absolute value of the attribute coefficient 2 are both 0; wherein, the absolute value of the attribute coefficient 1 of the current point and the absolute value of the attribute coefficient 2 refer to the example of the attribute coefficients of at least two first attribute components of the current point described in the previous embodiment.
[0244] Step 1202: determine whether the absolute value of attribute coefficient 1 and the absolute value of attribute coefficient 2 are both 0; if so, execute step 1203; otherwise, execute step 1204;
[0245] Step 1203 , the absolute value of the context coding attribute coefficient 3 is reduced by one to end the coding; wherein the absolute value of the attribute coefficient 3 refers to the example of the first attribute coefficient of the second attribute component of the current point described in the above embodiment.
[0246] Step 1204: Context-encode a second flag, which indicates whether the absolute value of the attribute coefficient 1 is 0.
[0247] Step 1205, determine whether the absolute value of attribute coefficient 1 is 0; if so, execute step 1206; otherwise, execute step 1207;
[0248] Step 1206: Using the context to encode the absolute value of attribute coefficient 2 minus one, and using the absolute value of attribute coefficient 2 to adaptively select a context; using the adaptively selected context, encode the absolute value of attribute coefficient 3, and end encoding;
[0249] Step 1207, use the context to encode the absolute value of attribute coefficient 1 minus one; and use the absolute value of attribute coefficient 1 to adaptively select a context, and use the selected context to encode the absolute value of attribute coefficient 2; and use the absolute values of attribute coefficient 1 and attribute coefficient 2 to adaptively select a context, and use the selected context to encode the absolute value of attribute coefficient 3, and end the encoding.
[0250] Finally, if the absolute value of attribute coefficient 1 is not 0, its sign is encoded; if the absolute value of attribute coefficient 2 is not 0, its sign is encoded; if the absolute value of attribute coefficient 3 is not 0, its sign is encoded.
[0251] For the decoding end, as shown in FIG13 , the process includes the following steps 1301 to 1307:
[0252] Step 1301: Utilize context decoding to decode the first flag, which indicates whether the absolute value of attribute coefficient 1 and the absolute value of attribute coefficient 2 are both 0.
[0253] Step 1302: determine whether the absolute value of attribute coefficient 1 and the absolute value of attribute coefficient 2 are both 0; if so, execute step 1303; otherwise, execute step 1304;
[0254] Step 1303: Use the context to decode the absolute value of the attribute coefficient 3. The final absolute value of the attribute coefficient 3 is the decoded value plus one, and the decoding ends.
[0255] Step 1304: Utilize context decoding to decode a second flag, which indicates whether the absolute value of the attribute coefficient 1 is 0.
[0256] Step 1305: Determine whether the absolute value of attribute coefficient 1 is 0; if so, execute step 1306; otherwise, execute step 1307;
[0257] Step 1306: Using the context to decode the absolute value of attribute coefficient 2, the final absolute value of attribute coefficient 2 is the decoded value plus one; and using the final absolute value of attribute coefficient 2 to adaptively select a context, using the adaptively selected context to decode the absolute value of attribute coefficient 3, the final absolute value of attribute coefficient 3 is the decoded value, and decoding ends.
[0258] Step 1307: Use the context to decode the absolute value of attribute coefficient 1, and the final value of the absolute value of attribute coefficient 1 is the decoded value plus one; and use the final value of the absolute value of attribute coefficient 1 to adaptively select a context, and use the adaptively selected context to decode the absolute value of attribute coefficient 2, and the final value of the absolute value of attribute coefficient 2 is the decoded value; and use the final value of the absolute value of attribute coefficient 1 and the final value of the absolute value of attribute coefficient 2 to adaptively select a context, and use the adaptively selected context to decode the absolute value of attribute coefficient 3, and the final value of the absolute value of attribute coefficient 3 is the decoded value, and end decoding.
[0259] Finally, if the absolute value of the attribute coefficient 1 is not 0, its sign is decoded; if the absolute value of the attribute coefficient 2 is not 0, its sign is decoded; if the absolute value of the attribute coefficient 3 is not 0, its sign is decoded.
[0260] Example 1:
[0261] For the case where the Pred branch, PredLift branch and RAHT branch in G-PCC encode value0, value1 and value2, for Pred: let the three components of the color attribute be value0, value1 and value2, value0 represents the residual coefficient of Y or R, value1 represents the residual coefficient of U or G, and value2 represents the residual coefficient of V or B.
[0262] For PredLift: Let the three components of the color attribute be value0, value1 and value2, where value0 represents the transformation coefficient of Y or R, value1 represents the transformation coefficient of U or G, and value2 represents the transformation coefficient of V or B.
[0263] For RAHT: value0, value1 and value2 are the transformation coefficients after RAHT transformation.
[0264] The tool of this scheme can use a 1-bit flag to indicate whether to enable the encoding and decoding methods described below. This flag is placed in the attribute header of the high-level syntax element. This flag is conditionally analyzed under certain conditions; if this flag does not appear in the codestream, its default value is a fixed value.
[0265] Similarly, the decoding end needs to decode this flag bit. If this flag bit does not appear in the bitstream, it will not be decoded. Its default value is a fixed value.
[0266] For the encoding end, the process includes steps 1401 to 1409:
[0267] Step 1401: Context-encode a first flag bit; wherein the first flag bit represents whether the absolute value of value1 and the absolute value of value2 are both 0;
[0268] Step 1402: determine whether the absolute value of value1 and the absolute value of value2 are both 0; if so, execute step 1403; otherwise, execute step 1404;
[0269] Step 1403: Use context encoding to reduce the absolute value of value0 by one, and end the encoding;
[0270] Step 1404: Utilize context encoding for the second flag; wherein the second flag represents whether the absolute value of value1 is 0, and determine whether the absolute value of value1 is 0; if so, execute step 1405; otherwise, execute step 1407;
[0271] Step 1405: Use the context code value2 to reduce the absolute value by one, and then proceed to step 1406;
[0272] Step 1406 , adaptively select a context using the absolute value of value2 , encode the absolute value of value0 using the selected context, and end encoding;
[0273] In step 1406 , the adaptive method is to determine whether the absolute value of value2 is equal to 1 and whether the absolute value of value2 is greater than or equal to 2 or less than or equal to 2 to adaptively select a context.
[0274] Step 1407: Use the context code value1 to reduce the absolute value by one, and then proceed to step 1408;
[0275] Step 1408 : Adaptively select a context using the absolute value of value1 , and use the selected context to encode the absolute value of value2 , and then proceed to step 1409 ;
[0276] In step 1408 , the adaptive method is to determine whether the absolute value of value1 is equal to 1 and whether the absolute value of value1 is greater than or equal to 2 or less than or equal to 2 to adaptively select a context.
[0277] Step 1409 : Adaptively select the absolute value of context encoding value0 using the absolute value of value1 and the absolute value of value2 , and end the encoding.
[0278] In step 1409, the adaptive method is to jointly adaptively select the context by judging whether the absolute value of value1 is equal to 1 and whether the absolute value of value1 is greater than or equal to 2 or less than or equal to 2 and judging whether the absolute value of value2 is equal to 0 and whether the absolute value of value2 is greater than or equal to 1 or less than or equal to 1.
[0279] Finally, if the absolute value of value0 is not 0, its sign is encoded; if the absolute value of value1 is not 0, its sign is encoded; if the absolute value of value2 is not 0, its sign is encoded.
[0280] Accordingly, for the decoding end, the following steps 1501 to 1509 are included:
[0281] Step 1501: Utilize context decoding to decode a first flag bit; wherein the first flag bit represents whether the absolute value of value1 and the absolute value of value2 are both 0;
[0282] Step 1502: determine whether the absolute value of value1 and the absolute value of value2 are both 0; if so, execute step 1503; otherwise, execute step 1504;
[0283] Step 1503: Use the context to decode the absolute value of value0. The final absolute value of value0 is the decoded value plus one, and the decoding ends.
[0284] Step 1504: Decode the second flag bit using the context; the second flag bit represents whether the absolute value of value1 is 0, and determine whether the absolute value of value1 is 0; if so, execute step 1505; otherwise, execute step 1507;
[0285] Step 1505: Use the context to decode the absolute value of value2. The final absolute value of value2 is the decoded value plus one, and then proceed to step 1506.
[0286] Step 1506: Adaptively select the absolute value of value0 for context decoding using the final absolute value of value2. The final absolute value of value0 is the decoded value, and decoding ends.
[0287] In step 1506 , the adaptive method is to determine whether the absolute final value of value2 is equal to 1 and whether the absolute final value of value2 is greater than or equal to 2 or less than or equal to 2 to adaptively select a context.
[0288] Step 1507: Use the context to decode the absolute value of value1. The final absolute value of value1 is the decoded value plus one, and then proceed to step 1508.
[0289] Step 1508 , using the final value of the absolute value of value1 to adaptively select the absolute value of value2 for context decoding, the final value of the absolute value of value2 is the decoded value, and then proceed to step 1509 ;
[0290] In step 1508 , the adaptive method is to determine whether the absolute final value of value1 is equal to 1 and whether the absolute final value of value1 is greater than or equal to 2 or less than or equal to 2 to adaptively select a context.
[0291] Step 1509 , using the final absolute value of value1 and the final absolute value of value2 to adaptively select the absolute value of context decoding value0 , the final absolute value of value0 is the decoded value, and decoding ends.
[0292] In step 1509, the adaptive method is to jointly adaptively select the context by judging whether the absolute value final value of value1 is equal to 1 and whether the absolute value final value of value1 is greater than or equal to 2 or less than or equal to 2 and judging whether the absolute value final value of value2 is equal to 0 and whether the absolute value final value of value2 is greater than or equal to 1 or less than or equal to 1.
[0293] Finally, if the absolute final value of value0 is not 0, its sign is decoded; if the absolute final value of value1 is not 0, its sign is decoded; if the absolute final value of value2 is not 0, its sign is decoded.
[0294] Example 2:
[0295] For the Pred branch, Predtrans-resource-constrained branch, Predtrans-resource-unconstrained branch, or Trans branch in the AVS PCC, when encoding value0, value1, and value2:
[0296] Note: For Pred: Assume that the three components of the color attribute are value0, value1 and value2, value0 represents the residual coefficient of Y or R, value1 represents the residual coefficient of U or G, and value2 represents the residual coefficient of V or B.
[0297] For Predtrans-resource-limited and Predtrans-resource-unlimited: value0, value1, and value2 are DC coefficients or AC coefficients after transformation.
[0298] For Trans: value0, value1 and value2 are the transformation coefficients after multiple layers of transformation.
[0299] The tool of this scheme can use a 1-bit flag to indicate whether it is enabled or not. This flag is placed in the attribute header of the high-level syntax element. This flag is conditionally analyzed under certain conditions. If this flag does not appear in the code stream, its default value is a fixed value.
[0300] Similarly, the decoding end needs to decode this flag bit. If this flag bit does not appear in the bitstream, it will not be decoded. Its default value is a fixed value.
[0301] The encoding end has the same solution as that in Example 1, including steps 1401 to 1409. The decoding end has the same solution as that in Example 1, including steps 1501 to 1509. To save space, the description is not repeated here.
[0302] It should be noted that for any context described in any of the above embodiments, the method of obtaining it is not limited; in the encoding and decoding method described in the embodiment of the present application, whether to use the context for encoding and decoding, or whether to adaptively select the context and then perform encoding and decoding based on the selected context are optional, and the method can be enabled or not. That is, when using a fixed context for encoding and decoding, it can be encoding and decoding using a fixed context or directly encoding and decoding without using the context. When using adaptively selected context for encoding and decoding, it can be encoding and decoding using an adaptively selected context or encoding and decoding using a fixed context or directly encoding and decoding without using the context.
[0303] In order to verify the technical effect of the above embodiment, the above embodiment is compared with G-PCC anchor; Table 1 shows the technical effect achieved by the arithmetic coding and decoding method based on G-PCC pred under condition 3, as shown in Table 1, wherein bpip ratio represents the input point bit rate, Geometry represents geometric information, Colour represents color information, and Reflectance represents reflectivity.
[0304] Table 1
[0305]
[0306] Table 2 shows the technical effects achieved by the arithmetic coding and decoding method based on G-PCC pred under condition 4. As shown in Table 2, End-to-End BD-Attr Rate represents the end-to-end attribute rate-distortion rate, Luma represents luminance, ChromaCb represents chrominance Cb, and ChromaCr represents chrominance Cr.
[0307] Table 2
[0308]
[0309] Table 3 shows the technical effects achieved by the arithmetic coding and decoding method based on G-PCC predlift under condition 1.
[0310] Table 3
[0311]
[0312] Table 4 shows the technical effects achieved by the arithmetic coding and decoding method based on G-PCC predlift under condition 2.
[0313] Table 4
[0314]
[0315] Table 5 shows the technical effects achieved by the arithmetic coding and decoding method based on G-PCC RAHT under condition 1.
[0316] Table 5
[0317]
[0318] Table 6 shows the technical effects achieved by the arithmetic coding and decoding method based on G-PCC RAHT under condition 2.
[0319] Table 6
[0320]
[0321] It can be seen from this that the above embodiment has a stable performance gain without almost increasing the time complexity.
[0322] It should be noted that: (1) the above embodiment is used for color attribute coefficients, and can also be used for other attribute coefficients, that is, it can be used in multi-attribute coding scenarios; (2) the above embodiment is only for three attribute coefficients, encoding attribute coefficient 1 and attribute coefficient 2 as 0 at the same time. If it is for four attribute coefficients, it can be expanded to first encode attribute coefficient 1, attribute coefficient 2 and attribute coefficient 3 as 0 at the same time, and then encode, etc.; (3) in the above embodiment, the order of encoding and decoding can be changed. The encoding order can be changed according to which two values are encoded first and are 0 at the same time; (4) There are many ways to adaptively select context using the already encoded / decoded values. Adaptive context selection means adaptively selecting a context model to encode / decode the next value based on the size of the already encoded / decoded value.
[0323] In addition, the embodiment of the present application further provides an encoding method. FIG14 is a schematic diagram of an implementation flow of the encoding method provided in the embodiment of the present application. As shown in FIG14 , the method includes the following steps 141 to 146:
[0324] Step 141: Context-encode the first flag bit, which represents whether the absolute value of the attribute coefficient 1 and the absolute value of the attribute coefficient 2 of the current point are both 0;
[0325] Step 142, determine whether the absolute value of attribute coefficient 1 and the absolute value of attribute coefficient 2 are both 0; if so, execute step 143; otherwise, execute step 144;
[0326] Step 143, using the absolute value of the context coding attribute coefficient 3 minus one, to end the coding;
[0327] Step 144, using the absolute value of the context coding attribute coefficient 1 minus one, proceeding to step 145;
[0328] Step 145 , adaptively select a context using the absolute value of the encoded attribute coefficient 1, and use the selected context to encode the absolute value of the attribute coefficient 2, and then proceed to step 146 ;
[0329] Step 146 : Adaptively select a context using the encoded absolute value of attribute coefficient 1 and the absolute value of attribute coefficient 2, and use the selected context to encode the absolute value of attribute coefficient 3.
[0330] at last,
[0331] If the absolute value of attribute coefficient 1 is not 0, its sign is encoded;
[0332] If the absolute value of attribute coefficient 2 is not 0, its sign is encoded;
[0333] If the absolute value of attribute coefficient 3 is not 0, its sign is encoded.
[0334] Accordingly, an embodiment of the present application further provides a decoding method. FIG15 is a schematic diagram of an implementation flow of the decoding method provided in an embodiment of the present application. As shown in FIG15 , the method includes the following steps 151 to 156:
[0335] Step 151: Utilize context decoding to decode a first flag, which indicates whether the absolute value of attribute coefficient 1 and the absolute value of attribute coefficient 2 are both 0.
[0336] Step 152: determine whether the absolute value of attribute coefficient 1 and the absolute value of attribute coefficient 2 are both 0; if so, execute step 153; otherwise, execute step 154;
[0337] Step 153: Use the context to decode the absolute value of the attribute coefficient 3. The final absolute value of the attribute coefficient 3 is the decoded value plus one, and the decoding ends.
[0338] Step 154: Use the context to decode the absolute value of the attribute coefficient 1. The final absolute value of the attribute coefficient 1 is the decoded value, and then proceed to step 155.
[0339] Step 155 , adaptively select a context using the final absolute value of the attribute coefficient 1, and decode the absolute value of the attribute coefficient 2 using the selected context. The final absolute value of the attribute coefficient 2 is the decoded value, and then proceed to step 156 ;
[0340] Step 156 : Adaptively select a context using the final absolute value of attribute coefficient 1 and the final absolute value of attribute coefficient 2, and decode the absolute value of attribute coefficient 3 using the selected context. The final absolute value of attribute coefficient 3 is the decoded value.
[0341] at last,
[0342] If the final absolute value of attribute coefficient 1 is not 0, decode its sign;
[0343] If the final absolute value of attribute coefficient 2 is not 0, decode its sign;
[0344] If the absolute final value of the attribute coefficient 3 is not 0, its sign is decoded.
[0345] It should be noted that although the steps of the method of the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all steps must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps; or steps in different embodiments may be combined to form a new technical solution.
[0346] Based on the above embodiments, an embodiment of the present application provides an encoding device, which is applied to an encoder. FIG16 is a schematic structural diagram of the encoding device provided in an embodiment of the present application. As shown in FIG16 , the encoding device 160 includes:
[0347] The encoding module 1601 is configured to encode a first flag bit into a point cloud code stream; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first values;
[0348] The second determination module 1602 is configured to encode the second attribute coefficient of the second attribute component of the current point into the point cloud code stream when the attribute coefficients of the at least two first attribute components are both first values; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components.
[0349] In some embodiments, the encoding module 1601 is configured to encode the first parameter into a point cloud code stream; when the number of points where each attribute component has the first value is equal to the first value, encode the first flag into the point cloud code stream.
[0350] In some embodiments, the encoding module 1601 is configured to encode the first flag bit using a first context.
[0351] In some embodiments, the encoding module 1601 is configured to encode the second attribute coefficient using a second context.
[0352] In some embodiments, the encoding module 1601 is further configured to encode a second flag bit to the point cloud code stream when at least one of the attribute coefficients of the at least two first attribute components is not the first value; wherein the second flag bit is used to indicate whether the attribute coefficient of at least one first attribute component of the at least two first attribute components is the first value.
[0353] In some embodiments, the encoding module 1601 is further configured to, when the attribute coefficient of the at least one first attribute component is the first value, encode the fourth attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component to the point cloud code stream; wherein the fourth attribute coefficient is equal to the third attribute coefficient of the first attribute component that is different from the at least one first attribute component minus 1.
[0354] In some embodiments, the encoding module 1601 is further configured to encode the fifth attribute coefficient of the second attribute component into a point cloud code stream when the attribute coefficient of the at least one first attribute component is the first value.
[0355] In some embodiments, the encoding module 1601 is configured to encode the fourth attribute coefficient using a third context.
[0356] In some embodiments, the encoding module 1601 is configured to select a fourth context using the third attribute coefficient or the fourth attribute coefficient; and encode the fifth attribute coefficient using the fourth context.
[0357] In some embodiments, the encoding module 1601 is further configured to encode the seventh attribute coefficient of the at least one first attribute component to the point cloud code stream when the attribute coefficient of the at least one first attribute component is not the first value; wherein the seventh attribute coefficient is equal to the sixth attribute coefficient of the at least one first attribute component minus 1.
[0358] In some embodiments, the encoding module 1601 is further configured to: when the attribute coefficient of the at least one first attribute component is not the first numerical value, encode the eighth attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component to the point cloud code stream.
[0359] In some embodiments, the encoding module 1601 is further configured to encode a ninth attribute coefficient of the second attribute component into a point cloud code stream when the attribute coefficient of the at least one first attribute component is not a first value.
[0360] In some embodiments, the encoding module 1601 is configured to encode the seventh attribute coefficient of the at least one first attribute component using the fifth context.
[0361] In some embodiments, the encoding module 1601 is configured to select a sixth context using the sixth attribute coefficient or the seventh attribute coefficient; and encode the eighth attribute coefficient of the first attribute component different from the at least one first attribute component using the sixth context.
[0362] In some embodiments, the encoding module 1601 is configured to select a seventh context using the sixth attribute coefficient or one of the seventh attribute coefficients, and / or the eighth attribute coefficient; and encode the ninth attribute coefficient of the second attribute component using the seventh context.
[0363] In some embodiments, the encoding module 1601 is further configured to, when at least one of the attribute coefficients of the at least two first attribute components is not the first numerical value, encode the tenth attribute coefficient of at least one first attribute component of the at least two first attribute components to a point cloud code stream; use the tenth attribute coefficient to encode the eleventh attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component to the point cloud code stream; and use the tenth attribute coefficient and the eleventh attribute coefficient to encode the twelfth attribute coefficient of the second attribute component to a point cloud code stream.
[0364] In some embodiments, the encoding module 1601 is configured to encode the tenth attribute coefficient using the eighth context; select the ninth context using the tenth attribute coefficient; encode the eleventh attribute coefficient using the ninth context; select the tenth context using the tenth attribute coefficient and the eleventh attribute coefficient; and encode the twelfth attribute coefficient using the tenth context.
[0365] In some embodiments, the encoding module 1601 is further configured to encode the sign of the final value of the attribute coefficient of any of the attribute components when the final value of the attribute coefficient of any of the attribute components is not the first value; the sign is used to indicate whether the corresponding final value of the attribute coefficient is a positive number or a negative number.
[0366] In some embodiments, the encoding device 160 also includes a first reconstruction module, configured to obtain an attribute reconstruction value of the attribute component based at least on the attribute coefficient of the attribute component; the attribute coefficient of the attribute component is one of the following: a first attribute coefficient, a third attribute coefficient, a fifth attribute coefficient, a sixth attribute coefficient, an eighth attribute coefficient, a ninth attribute coefficient, a tenth attribute coefficient, an eleventh attribute coefficient, and a twelfth attribute coefficient.
[0367] In some embodiments, the at least two first attribute components include a U component and a V component, and the second attribute component includes a Y component; or the at least two first attribute components include a G component and a B component, and the second attribute component includes an R component.
[0368] The present application provides a decoding device, which is applied to a decoder. FIG17 is a schematic structural diagram of the decoding device provided in the present application. As shown in FIG17 , the decoding device 170 includes:
[0369] The decoding module 1701 is configured to decode the point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first values;
[0370] The first determination module 1702 is configured to determine that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1 when the first flag indicates that the attribute coefficients of the at least two first attribute components are all first values; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; and the second attribute component is different from the at least two first attribute components.
[0371] In some embodiments, the decoding module 1701 is configured to decode the point cloud code stream to obtain a first parameter; when the first parameter is equal to a first value, the point cloud code stream is decoded to obtain a first flag.
[0372] In some embodiments, the decoding module 1701 is configured to decode the point cloud code stream using the first context to obtain the first flag.
[0373] In some embodiments, the decoding module 1701 is configured to decode the point cloud code stream using the second context to obtain the second attribute coefficient.
[0374] In some embodiments, the decoding module 1701 is further configured to determine a second flag when the first flag indicates that at least one of the attribute coefficients of the at least two first attribute components is not the first numerical value; wherein the second flag is used to indicate whether the attribute coefficient of at least one of the at least two first attribute components is the first numerical value.
[0375] In some embodiments, the decoding module 1701 is further configured to determine that the third attribute coefficient of the first attribute component different from the at least one first attribute component in the at least two first attribute components is equal to the fourth attribute coefficient of the first attribute component different from the at least one first attribute component plus 1 when the second flag indicates that the attribute coefficient of the at least one first attribute component is the first numerical value, and the fourth attribute coefficient is parsed from the point cloud code stream.
[0376] In some embodiments, the decoding module 1701 is further configured to determine the fifth attribute coefficient of the second attribute component when the second flag indicates that the attribute coefficient of the at least one first attribute component is the first value; wherein the fifth attribute coefficient is parsed from the point cloud code stream.
[0377] In some embodiments, the decoding module 1701 is configured to decode the point cloud code stream using the third context to obtain the fourth attribute coefficient.
[0378] In some embodiments, the decoding module 1701 is configured to select a fourth context using the third attribute coefficient or the fourth attribute coefficient; and decode the point cloud code stream using the fourth context to obtain the fifth attribute coefficient.
[0379] In some embodiments, the decoding module 1701 is further configured to determine that the sixth attribute coefficient of the at least one first attribute component is equal to the seventh attribute coefficient of the at least one first attribute component plus 1 when the second flag indicates that the attribute coefficient of the at least one first attribute component is not the first numerical value, and the seventh attribute coefficient is parsed from the point cloud code stream.
[0380] In some embodiments, the decoding module 1701 is further configured to determine an eighth attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component when the second flag indicates that the attribute coefficient of the at least one first attribute component is not the first numerical value; wherein the eighth attribute coefficient is parsed from the point cloud code stream.
[0381] In some embodiments, the decoding module 1701 is further configured to determine a ninth attribute coefficient of the second attribute component when the second flag indicates that the attribute coefficient of the at least one first attribute component is not a first value; wherein the ninth attribute coefficient is parsed from the point cloud code stream.
[0382] In some embodiments, the decoding module 1701 is configured to decode the point cloud code stream using the fifth context to obtain a seventh attribute coefficient of the at least one first attribute component.
[0383] In some embodiments, the decoding module 1701 is configured to select a sixth context using the sixth attribute coefficient or the seventh attribute coefficient; and decode the point cloud code stream using the sixth context to obtain an eighth attribute coefficient of the first attribute component that is different from the at least one first attribute component.
[0384] In some embodiments, the decoding module 1701 is configured to select a seventh context using the sixth attribute coefficient or one of the seventh attribute coefficients, and / or the eighth attribute coefficient; and decode the point cloud code stream using the seventh context to obtain a ninth attribute coefficient of the second attribute component.
[0385] In some embodiments, the decoding module 1701 is further configured to, when the first flag indicates that at least one of the attribute coefficients of the at least two first attribute components is not the first numerical value, decode the point cloud code stream to obtain the tenth attribute coefficient of at least one first attribute component of the at least two first attribute components; use the tenth attribute coefficient to decode the point cloud code stream to obtain the eleventh attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component; use the tenth attribute coefficient and the eleventh attribute coefficient to decode the point cloud code stream to obtain the twelfth attribute coefficient of the second attribute component.
[0386] In some embodiments, the decoding module 1701 is configured to use the eighth context to decode the point cloud code stream to obtain the tenth attribute coefficient; use the tenth attribute coefficient to select the ninth context; use the ninth context to decode the point cloud code stream to obtain the eleventh attribute coefficient; use the tenth attribute coefficient and the eleventh attribute coefficient to select the tenth context; use the tenth context to decode the point cloud code stream to obtain the twelfth attribute coefficient.
[0387] In some embodiments, the decoding module 1701 is further configured to decode the point cloud code stream when the final value of the attribute coefficient of any of the attribute components is not the first value, and obtain the sign of the final value of the attribute coefficient of any of the attribute components; the sign is used to indicate whether the corresponding final value of the attribute coefficient is a positive number or a negative number.
[0388] In some embodiments, the decoding device 170 also includes a second reconstruction module, configured to obtain an attribute reconstruction value of the attribute component based at least on the attribute coefficient of the attribute component; the attribute coefficient of the attribute component is one of the following: a first attribute coefficient, a third attribute coefficient, a fifth attribute coefficient, a sixth attribute coefficient, an eighth attribute coefficient, a ninth attribute coefficient, a tenth attribute coefficient, an eleventh attribute coefficient, and a twelfth attribute coefficient.
[0389] The description of the above device embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0390] It should be noted that the division of modules in the device described in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. In addition, the functional units in the various embodiments of the present application can be integrated into a processing unit, or they can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It can also be implemented in the form of a combination of software and hardware.
[0391] It should be noted that, in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0392] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, it implements a video image processing method such as an encoder side, or implements a video image processing method such as a decoder side.
[0393] The embodiment of the present application provides a decoder, as shown in FIG18 , the decoder 180 includes: a first communication interface 1801, a first memory 1802, and a first processor 1803; each component is coupled together via a first bus system 1804. It is understood that the first bus system 1804 is used to implement connection and communication between these components. In addition to the data bus, the first bus system 1804 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in FIG18 , various buses are labeled as the first bus system 1804. Among them,
[0394] The first communication interface 1801 is used to receive and send signals when sending and receiving information with other external network elements;
[0395] A first memory 1802 is used to store computer programs that can be run on the first processor 1803;
[0396] The first processor 1803 is configured to execute the decoding method described in the embodiment of the present application when running the computer program.
[0397] It is understood that the first memory 1802 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 1802 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0398] The first processor 1803 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1803. The above-mentioned first processor 1803 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 1802 , and the first processor 1803 reads the information in the first memory 1802 and completes the steps of the above method in combination with its hardware.
[0399] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0400] Optionally, as another embodiment, the first processor 1803 is further configured to execute any one of the aforementioned 9 decoding method embodiments when running the computer program.
[0401] The present application implements an encoder, as shown in FIG19 , the encoder 190 includes: a second communication interface 1901, a second memory 1902, and a second processor 1903; each component is coupled together via a second bus system 1904. It is understood that the second bus system 1904 is used to implement connection and communication between these components. In addition to the data bus, the second bus system 1904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 1904 in FIG19 . Among them,
[0402] The second communication interface 1901 is used for sending and receiving signals when sending and receiving information with other external network elements;
[0403] The second memory 1902 is used to store computer programs that can be run on the second processor 1903;
[0404] The second processor 1903 is configured to, when running the computer program, execute:
[0405] Sorting the samples in the first image according to differences between the samples to obtain a first list;
[0406] A sample value of the first component having the same position coordinates as the sample in the second image is obtained according to the index number of the sample in the first list and the bit depth of the first component.
[0407] Optionally, as another embodiment, the second processor 1903 is further configured to execute the aforementioned encoding method embodiment when running the computer program.
[0408] It can be understood that the hardware functions of the second memory 1902 are similar to those of the first memory 1802, and the hardware functions of the second processor 1903 are similar to those of the first processor 1803; they will not be described in detail here.
[0409] An embodiment of the present application provides an electronic device, comprising: a processor adapted to execute a computer program; and a computer-readable storage medium storing the computer program, wherein when the computer program is executed by the processor, the encoding method and / or decoding method described in the embodiment of the present application are implemented. The electronic device can be any type of device capable of video encoding and / or video decoding, such as a mobile phone, tablet computer, laptop computer, personal computer, television, projection device, or monitoring device.
[0410] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0411] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other. For the sake of brevity, they will not be repeated here.
[0412] The term "and / or" in this article is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, object A and / or object B can mean: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0413] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0414] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0415] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed across multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of this embodiment.
[0416] In addition, all functional modules in the embodiments of the present application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0417] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0418] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0419] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0420] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0421] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0422] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A decoding method, applied to a decoder, comprising: Decoding the point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first values; When the first flag indicates that the attribute coefficients of the at least two first attribute components are all first values, it is determined that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; the second attribute component is different from the at least two first attribute components.
2. The method according to claim 1, wherein Decode the point cloud code stream to obtain the first parameter; When the first parameter is equal to a first value, the point cloud code stream is decoded to obtain a first flag bit.
3. The method according to claim 2, wherein: The first parameter is used to represent the number of consecutive points where each attribute coefficient has the first value.
4. The method according to claim 2, wherein: The first parameter is used to represent the number of consecutive groups in which each attribute coefficient is a first value.
5. The method according to claim 1, wherein The point cloud code stream is decoded using the first context to obtain the first flag.
6. The method according to claim 1, wherein The point cloud code stream is decoded using a second context to obtain the second attribute coefficient.
7. The method according to claim 1, wherein The method further comprises: When the first flag bit indicates that at least one of the attribute coefficients of the at least two first attribute components is not the first value, the second flag bit is determined; wherein the second flag bit is used to indicate whether the attribute coefficient of at least one first attribute component of the at least two first attribute components is the first value.
8. The method according to claim 7, wherein: The method further comprises: When the second flag indicates that the attribute coefficient of the at least one first attribute component is the first value, it is determined that the third attribute coefficient of the first attribute component different from the at least two first attribute components is equal to the fourth attribute coefficient of the first attribute component different from the at least one first attribute component plus 1, and the fourth attribute coefficient is parsed from the point cloud code stream.
9. The method according to claim 7, wherein: The method further comprises: When the second flag indicates that the attribute coefficient of the at least one first attribute component is the first value, a fifth attribute coefficient of the second attribute component is determined; wherein the fifth attribute coefficient is obtained by parsing the point cloud code stream.
10. The method according to claim 8, wherein The point cloud code stream is decoded using the third context to obtain the fourth attribute coefficient.
11. The method according to claim 8, wherein selecting a fourth context using the third attribute coefficient or the fourth attribute coefficient; The point cloud code stream is decoded using the fourth context to obtain the fifth attribute coefficient.
12. The method according to claim 8, wherein The method further comprises: When the second flag indicates that the attribute coefficient of the at least one first attribute component is not the first value, it is determined that the sixth attribute coefficient of the at least one first attribute component is equal to the seventh attribute coefficient of the at least one first attribute component plus 1, and the seventh attribute coefficient is parsed from the point cloud code stream.
13. The method according to claim 12, wherein: The method further comprises: When the second flag indicates that the attribute coefficient of the at least one first attribute component is not the first value, determine the eighth attribute coefficient of the first attribute component of the at least two first attribute components that is different from the at least one first attribute component; wherein the eighth attribute coefficient is parsed from the point cloud code stream.
14. The method according to claim 13, wherein The method further comprises: When the second flag indicates that the attribute coefficient of the at least one first attribute component is not the first value, a ninth attribute coefficient of the second attribute component is determined; wherein the ninth attribute coefficient is obtained by parsing the point cloud code stream.
15. The method according to claim 12, wherein: The point cloud code stream is decoded using the fifth context to obtain a seventh attribute coefficient of the at least one first attribute component.
16. The method according to claim 13, wherein: selecting a sixth context using the sixth attribute coefficient or the seventh attribute coefficient; The point cloud code stream is decoded using the sixth context to obtain an eighth attribute coefficient of the first attribute component different from the at least one first attribute component.
17. The method according to claim 14, wherein: selecting a seventh context using the sixth attribute coefficient or one of the seventh attribute coefficient, and / or the eighth attribute coefficient; The point cloud code stream is decoded using the seventh context to obtain a ninth attribute coefficient of the second attribute component.
18. The method according to claim 1, wherein The method further comprises: When the first flag indicates that at least one of the attribute coefficients of the at least two first attribute components is not the first value, decoding the point cloud codestream to obtain a tenth attribute coefficient of at least one first attribute component of the at least two first attribute components; Decoding the point cloud code stream using the tenth attribute coefficient to obtain an eleventh attribute coefficient of a first attribute component of the at least two first attribute components that is different from the at least one first attribute component; The point cloud code stream is decoded using the tenth attribute coefficient and the eleventh attribute coefficient to obtain a twelfth attribute coefficient of the second attribute component.
19. The method according to claim 18, wherein Decoding the point cloud code stream using the eighth context to obtain the tenth attribute coefficient; Selecting a ninth context using the tenth attribute coefficient; Decoding the point cloud code stream using the ninth context to obtain the eleventh attribute coefficient; selecting a tenth context using the tenth attribute coefficient and / or the eleventh attribute coefficient; The point cloud code stream is decoded using the tenth context to obtain the twelfth attribute coefficient.
20. The method according to any one of claims 1 to 19, wherein When the final value of the attribute coefficient of any of the attribute components is not the first value, the point cloud code stream is decoded to obtain the sign of the final value of the attribute coefficient of any of the attribute components; the sign is used to indicate whether the corresponding final value of the attribute coefficient is positive or negative.
21. The method according to any one of claims 1 to 19, wherein: The first value is equal to 0.
22. The method according to any one of claims 1 to 19, wherein: The method further comprises: An attribute reconstruction value of the attribute component is obtained at least according to the attribute coefficient of the attribute component; wherein the attribute coefficient of the attribute component is one of the following: a first attribute coefficient, a third attribute coefficient, a fifth attribute coefficient, a sixth attribute coefficient, an eighth attribute coefficient, a ninth attribute coefficient, a tenth attribute coefficient, an eleventh attribute coefficient, and a twelfth attribute coefficient.
23. The method according to any one of claims 1 to 19, wherein: The at least two first attribute components include a U component and a V component, and the second attribute component includes a Y component; or the at least two first attribute components include a G component and a B component, and the second attribute component includes an R component.
24. A coding method, applied to an encoder, comprising: Encoding a first flag bit into a point cloud code stream; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first values; When the attribute coefficients of the at least two first attribute components are both first values, encode the second attribute coefficient of the second attribute component of the current point into the point cloud code stream; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components.
25. The method according to claim 24, wherein Encode the first parameter into a point cloud stream; When the number of points where each attribute component has the first value is equal to the first value, the first flag is encoded into the point cloud code stream.
26. The method according to claim 25, wherein The first parameter is used to represent the number of consecutive points where each attribute coefficient has the first value.
27. The method according to claim 25, wherein The first parameter is used to represent the number of consecutive groups in which each attribute coefficient is a first value.
28. The method according to claim 24, wherein The first flag is encoded using a first context.
29. The method according to claim 24, wherein The second attribute coefficient is encoded using a second context.
30. The method of claim 24, wherein: The method further comprises: When at least one of the attribute coefficients of the at least two first attribute components is not the first value, a second flag is encoded to the point cloud code stream; wherein the second flag is used to indicate whether the attribute coefficient of at least one first attribute component of the at least two first attribute components is the first value.
31. The method according to claim 30, wherein The method further comprises: When the attribute coefficient of the at least one first attribute component is the first value, the fourth attribute coefficient of the first attribute component different from the at least one first attribute component in the at least two first attribute components is encoded into the point cloud code stream; wherein, the fourth attribute coefficient is equal to the third attribute coefficient of the first attribute component different from the at least one first attribute component minus 1.
32. The method according to claim 30, wherein The method further comprises: When the attribute coefficient of the at least one first attribute component is the first value, a fifth attribute coefficient of the second attribute component is encoded into a point cloud code stream.
33. The method according to claim 31, wherein The fourth attribute coefficient is encoded using a third context.
34. The method according to claim 31, wherein selecting a fourth context using the third attribute coefficient or the fourth attribute coefficient; The fifth attribute coefficient is encoded using the fourth context.
35. The method of claim 31 , wherein: The method further comprises: When the attribute coefficient of the at least one first attribute component is not a first value, a seventh attribute coefficient of the at least one first attribute component is encoded into a point cloud code stream; wherein the seventh attribute coefficient is equal to the sixth attribute coefficient of the at least one first attribute component minus 1.
36. The method according to claim 35, wherein The method further comprises: When the attribute coefficient of the at least one first attribute component is not a first value, an eighth attribute coefficient of a first attribute component different from the at least one first attribute component in the at least two first attribute components is encoded into a point cloud codestream.
37. The method according to claim 36, wherein The method further comprises: When the attribute coefficient of the at least one first attribute component is not the first value, a ninth attribute coefficient of the second attribute component is encoded into a point cloud code stream.
38. The method of claim 35, wherein: A seventh attribute coefficient of the at least one first attribute component is encoded using a fifth context.
39. The method according to claim 36, wherein selecting a sixth context using the sixth attribute coefficient or the seventh attribute coefficient; An eighth attribute coefficient of the first attribute component different from the at least one first attribute component is encoded using the sixth context.
40. The method of claim 37, wherein selecting a seventh context using the sixth attribute coefficient or one of the seventh attribute coefficient, and / or the eighth attribute coefficient; A ninth attribute coefficient of the second attribute component is encoded using the seventh context.
41. The method of claim 24, wherein: The method further comprises: When at least one of the attribute coefficients of the at least two first attribute components is not the first value, encoding a tenth attribute coefficient of at least one first attribute component of the at least two first attribute components into a point cloud codestream; encoding an eleventh attribute coefficient of a first attribute component of the at least two first attribute components that is different from the at least one first attribute component into a point cloud code stream using the tenth attribute coefficient; The twelfth attribute coefficient of the second attribute component is encoded into a point cloud code stream using the tenth attribute coefficient and the eleventh attribute coefficient.
42. The method according to claim 41, wherein encoding the tenth attribute coefficient using an eighth context; Selecting a ninth context using the tenth attribute coefficient; encoding the eleventh attribute coefficient using the ninth context; selecting a tenth context using the tenth attribute coefficient and / or the eleventh attribute coefficient; The twelfth attribute coefficient is encoded using the tenth context.
43. The method according to any one of claims 24 to 42, wherein The method further comprises: When the final value of the attribute coefficient of any of the attribute components is not the first value, the sign of the final value of the attribute coefficient of any of the attribute components is encoded; the sign is used to indicate whether the corresponding final value of the attribute coefficient is a positive number or a negative number.
44. The method according to any one of claims 24 to 42, wherein The first value is equal to 0.
45. The method according to any one of claims 24 to 42, wherein The first attribute coefficient, the third attribute coefficient, the fifth attribute coefficient, the sixth attribute coefficient, the eighth attribute coefficient, the ninth attribute coefficient, the tenth attribute coefficient, the eleventh attribute coefficient and the twelfth attribute coefficient are all determined according to one of the Pred, Predlift, RAHT, Predtrans-resource-limited, Predtrans-resource-unlimited and Trans methods.
46. The method according to any one of claims 24 to 42, wherein The method further comprises: An attribute reconstruction value of the attribute component is obtained at least according to the attribute coefficient of the attribute component; wherein the attribute coefficient of the attribute component is one of the following: a first attribute coefficient, a third attribute coefficient, a fifth attribute coefficient, a sixth attribute coefficient, an eighth attribute coefficient, a ninth attribute coefficient, a tenth attribute coefficient, an eleventh attribute coefficient, and a twelfth attribute coefficient.
47. The method according to any one of claims 24 to 42, wherein The at least two first attribute components include a U component and a V component, and the second attribute component includes a Y component; or the at least two first attribute components include a G component and a B component, and the second attribute component includes an R component.
48. A decoding device, applied to a decoder, comprising: A decoding module configured to decode the point cloud code stream to obtain a first flag bit; wherein the first flag bit is used to indicate whether the attribute coefficients of at least two first attribute components of the current point are both first values; The first determination module is configured to, when the first flag indicates that the attribute coefficients of the at least two first attribute components are all first values, determine that the first attribute coefficient of the second attribute component of the current point is equal to the second attribute coefficient of the second attribute component plus 1; wherein the second attribute coefficient of the second attribute component is obtained by parsing the point cloud code stream; and the second attribute component is different from the at least two first attribute components.
49. A decoder comprising a first memory and a first processor; wherein, The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 1 to 22 when running the computer program.
50. An encoding device, applied to an encoder, comprising: an encoding module configured to encode a first flag bit into a point cloud code stream; wherein the first flag bit is used to indicate whether attribute coefficients of at least two first attribute components of a current point are both first values; The second determination module is configured to encode the second attribute coefficient of the second attribute component of the current point into the point cloud code stream when the attribute coefficients of the at least two first attribute components are both first values; wherein the second attribute coefficient is equal to the first attribute coefficient of the second attribute component minus 1; and the second attribute component is different from the at least two first attribute components.
51. An encoder comprising a second memory and a second processor; wherein, The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 24 to 47 when running the computer program.
52. A point cloud code stream, wherein the point cloud code stream is generated by the encoding method described in any one of claims 24 to 47.
53. An electronic device comprising: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the decoding method according to any one of claims 1 to 23, or implements the encoding method according to any one of claims 24 to 47 when the computer program is executed by the processor.
54. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the decoding method according to any one of claims 1 to 23, or implements the encoding method according to any one of claims 24 to 47.