Coding method, encoder, decoder, and storage medium
By introducing coefficient identification information and zero run-length value grouping in point cloud compression technology, the encoding and decoding complexity problem caused by consecutive zero coefficients in the attribute encoding process is solved, and the encoding and decoding efficiency is improved.
Patent Information
- Application Number
- CN202280096828.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-06-17
AI Technical Summary
In existing point cloud compression technologies, the attribute encoding process requires encoding/decoding coefficients that are consecutively zero, which increases the complexity of the encoding and decoding process and reduces the efficiency of encoding and decoding.
By introducing coefficient identification information and zero run length value, multiple coefficients to be encoded/decoded are grouped using the grouping step size parameter. The coefficient identification information indicates whether all coefficients in the group are 0, and the data is written into the bitstream when necessary, simplifying the encoding and decoding process.
By grouping the data, the encoding of consecutive zero coefficients is reduced, improving the encoding and decoding efficiency of point cloud attributes and saving codewords.
Smart Images

Figure CN119318147B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of point cloud compression technology, and in particular to an encoding / decoding method, encoder, decoder, and storage medium. Background Technology
[0002] In the Audio Video Standard-Point Cloud Compression (AVS-PCC) encoding and decoding framework, the geometric and attribute information of the point cloud are encoded separately. After geometric encoding, the geometric information is reconstructed, and the encoding of attribute information depends on the reconstructed geometric information. Attribute information encoding primarily focuses on color information, converting it into the YUV color space, which better matches the characteristics of human vision. Then, the preprocessed attribute information undergoes attribute encoding, ultimately generating a binary attribute bitstream.
[0003] Currently, the Point Cloud Reference Model (PCRM) requires encoding / decoding the number of consecutive zero coefficients during the attribute encoding process. However, the coefficients after prediction, transformation, and quantization are relatively small. Statistical analysis shows that there are usually consecutive zero coefficients, which to some extent increases the complexity of the encoding and decoding process and reduces the encoding and decoding efficiency. Summary of the Invention
[0004] This application provides an encoding / decoding method, encoder, decoder, and storage medium that can improve the encoding / decoding efficiency of point cloud attributes.
[0005] The technical solution of this application embodiment can be implemented as follows:
[0006] In a first aspect, embodiments of this application provide a decoding method applied to a decoder, the method comprising:
[0007] Determine the grouping step size parameter;
[0008] The multiple coefficients to be decoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be decoded.
[0009] Determine the coefficient identification information of the current group in the at least one group of coefficients to be decoded; wherein the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0;
[0010] If the coefficient identification information indicates that all the coefficients to be decoded in the current group are 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next coefficient group to be decoded in the at least one group of coefficients to be decoded is determined.
[0011] Secondly, embodiments of this application provide an encoding method applied to an encoder, the method comprising:
[0012] Determine the grouping step size parameter;
[0013] The multiple coefficients to be encoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be encoded.
[0014] If the current coefficient in the current group of the at least one group of coefficients to be encoded is not 0, then the coefficient identification information of the current group is determined; wherein, the coefficient identification information is used to indicate whether all the coefficients to be decoded in the current group are 0;
[0015] If the value of the coefficient identifier information is the second value, then the coefficient identifier information is written into the bitstream and the value of the coefficient identifier information is set to the first value; after writing the zero run value into the bitstream, the current coefficient is encoded and the zero run value is set to 0;
[0016] If the value of the coefficient identifier information is the first value, then after writing the zero run value into the bitstream, the current coefficient is encoded and the zero run value is set to 0;
[0017] Continue encoding the next coefficient to be encoded in the current group based on the coefficient identification information and the zero run value.
[0018] In the above scheme, when the current coefficient is the last coefficient to be encoded in the current group, if the value of the coefficient identification information is the second value, then it is determined that all coefficients to be encoded in the current group are 0, and the coefficient identification information is encoded as the first value and written into the bitstream; otherwise, the zero run value is written into the bitstream.
[0019] In the above scheme, when the current coefficient is the last coefficient to be encoded in the current group, if the zero run value is the same as the number of points in the current group, then it is determined that all coefficients to be encoded in the current group are 0, and the coefficient identification information is encoded as the first value and written into the bitstream; otherwise, the zero run value is written into the bitstream.
[0020] Thirdly, embodiments of this application provide an encoder, which includes a first determining unit, a setting unit, and an encoding unit; wherein,
[0021] The first determining unit is configured to: determine a grouping step size parameter; group multiple coefficients to be encoded according to the grouping step size parameter to determine at least one group of coefficients to be encoded; if the current coefficient in the current group of the at least one group of coefficients to be encoded is not 0, then determine the coefficient identification information of the current group; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0;
[0022] The encoding unit is configured to write the coefficient identification information into the bitstream if the value of the coefficient identification information is the second value.
[0023] The setting unit is configured to set the value of the coefficient identifier information to the first value if the value of the coefficient identifier information is the second value.
[0024] The encoding unit is further configured to encode the current coefficient after writing the zero run-length value into the bitstream;
[0025] The setting unit is further configured to set the zero run value to 0;
[0026] The encoding unit is further configured to encode the current coefficient after writing the zero run value into the bitstream if the value of the coefficient identifier information is a first value.
[0027] The setting unit is further configured to set the zero run value to 0;
[0028] The encoding unit is further configured to continue encoding the next coefficient to be encoded in the current group based on the coefficient identification information and the zero run value.
[0029] Fourthly, embodiments of this application provide an encoder, the encoder including a first memory and a first processor; wherein,
[0030] The first memory is used to store computer programs that can run on the first processor;
[0031] The first processor is configured to execute the encoding method described above when running the computer program.
[0032] Fifthly, embodiments of this application provide a decoder, the decoder including a second determining unit; wherein,
[0033] The second determining unit is configured to: determine a grouping step size parameter; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one group of coefficients to be decoded; determine coefficient identification information of the current group in the at least one group of coefficients to be decoded; wherein the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the identification information of the next group of coefficients to be decoded in the at least one group of coefficients to be decoded is determined.
[0034] Sixthly, embodiments of this application provide a decoder, the decoder including a second memory and a second processor; wherein,
[0035] The second memory is used to store computer programs that can run on the second processor;
[0036] The second processor is configured to execute the decoding method described above when running the computer program.
[0037] In a seventh aspect, embodiments of this application provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed, implements the decoding method described above or the encoding method described above.
[0038] This application provides an encoding / decoding method, encoder, decoder, and storage medium. At the encoding end, a grouping step size parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be encoded; if the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, then coefficient identification information of the current group is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the value of the coefficient identification information is a second value, then the coefficient identification information is written into the bitstream, and the value of the coefficient identification information is set to a first value; after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; if the value of the coefficient identification information is a first value, then after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; the next coefficient to be encoded in the current group is then encoded according to the coefficient identification information and the zero run value. At the decoding end, the grouping step size parameter is determined; multiple coefficients to be decoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be decoded; coefficient identification information of the current group in the at least one group of coefficients to be decoded is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, the decoding process of the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next group of coefficients to be decoded in the at least one group of coefficients to be decoded is determined. Therefore, in the embodiments of this application, when encoding and decoding attribute information, the introduction of coefficient identification information allows for grouping multiple coefficients. Thus, when all coefficients in a coefficient group are 0, a single coefficient identification information can be used to indicate the values of multiple coefficients in that group, greatly saving codewords and improving the encoding and decoding performance of point cloud attributes. Attached Figure Description
[0039] Figure 1A A schematic diagram of a three-dimensional point cloud image provided in an embodiment of this application;
[0040] Figure 1B A partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of this application;
[0041] Figure 2A This application provides a schematic diagram of point cloud images from different viewing angles as an embodiment of the present application.
[0042] Figure 2B An embodiment provided in this application Figure 2A A diagram illustrating the corresponding data storage format;
[0043] Figure 3 A schematic diagram of a network architecture for point cloud encoding and decoding provided in an embodiment of this application;
[0044] Figure 4A schematic diagram of the composition structure of a point cloud encoder provided in an embodiment of this application;
[0045] Figure 5 A schematic diagram of the composition structure of a point cloud decoder provided in an embodiment of this application;
[0046] Figure 6 This is a schematic diagram illustrating the implementation process of the decoding method proposed in the embodiments of this application;
[0047] Figure 7 This is a schematic diagram illustrating the implementation process of the encoding method proposed in the embodiments of this application;
[0048] Figure 8 This is a schematic diagram of the encoder's structural components.
[0049] Figure 9 Schematic diagram of the encoder's structure (II);
[0050] Figure 10 This is a schematic diagram of the decoder's structural composition.
[0051] Figure 11 This is a schematic diagram of the decoder's structural composition. Detailed Implementation
[0052] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0054] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0055] It should also be noted that the terms "first, second, and third" used in the embodiments of this application are only used to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0056] Point cloud is a three-dimensional representation of an object's surface. It can be acquired using acquisition devices such as photoelectric radar, lidar, laser scanner, and multi-view camera.
[0057] A point cloud is a set of randomly distributed discrete points in space that represent the spatial structure and surface properties of a three-dimensional object or scene. Figure 1A Showing 3D point cloud images and Figure 1B The image shows a magnified view of a 3D point cloud, revealing that the point cloud surface is composed of densely distributed points.
[0058] Two-dimensional images contain information at each pixel, and their distribution is regular, so there's no need to record their positional information separately. However, the distribution of points in a point cloud in three-dimensional space is random and irregular, so the position of each point in space needs to be recorded to fully represent a point cloud. Similar to two-dimensional images, each location during acquisition has corresponding attribute information, usually RGB color values, reflecting the color of an object. For point clouds, in addition to color information, the attribute information corresponding to each point also commonly includes reflectance values, reflecting the surface material of the object. Therefore, points in a point cloud can include both positional and attribute information. For example, the positional information of a point can be its three-dimensional coordinates (x, y, z). This positional information can also be called the geometric information of the point. For example, the attribute information of a point can include color information (three-dimensional color information) and / or reflectance (one-dimensional reflectance information r), etc. For example, color information can be information in any color space. For example, color information can be RGB information, where R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B). For example, color information can be luminance and chromaticity (YCbCr, YUV) information. Here, Y represents luminance (Luma), Cb(U) represents blue color difference, and Cr(V) represents red color difference.
[0059] Point clouds obtained based on laser measurement principles can include the three-dimensional coordinates and reflectance values of the points. Similarly, point clouds obtained based on photogrammetry principles can include the three-dimensional coordinates and three-dimensional color information of the points. Furthermore, point clouds obtained by combining laser measurement and photogrammetry principles can include the three-dimensional coordinates, reflectance values, and three-dimensional color information of the points.
[0060] like Figure 2A and Figure 2B The image shown is a point cloud image and its corresponding data storage format. Figure 2A It provides six viewing angles for the point cloud image. Figure 2B It consists of a header information section and a data section. The header information includes the data format, data representation type, total number of points in the point cloud, and the content represented by the point cloud. For example, the point cloud is in ".ply" format, represented by ASCII code, with a total of 207242 points, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).
[0061] Point clouds can be categorized according to the acquisition method:
[0062] Static point cloud: This means that the object is stationary and the device used to acquire the point cloud is also stationary.
[0063] Dynamic point cloud: The object is in motion, but the device acquiring the point cloud is stationary;
[0064] Dynamic point cloud acquisition: The device acquiring the point cloud is in motion.
[0065] For example, point clouds can be divided into two main categories based on their uses:
[0066] Category 1: Machine-perceived point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and disaster relief robots;
[0067] Category 2: Human eye-perceived point clouds, which can be used in point cloud application scenarios such as digital cultural heritage, free-viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
[0068] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Since point clouds are obtained by directly sampling real objects, they can provide a strong sense of realism 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.
[0069] Point cloud acquisition primarily utilizes the following methods: computer generation, 3D laser scanning, and 3D photogrammetry. Computers can generate point clouds of virtual 3D objects and scenes; 3D laser scanning can acquire point clouds of static real-world 3D objects or scenes, with a capacity of millions of point clouds per second; 3D photogrammetry can acquire point clouds of dynamic real-world 3D objects or scenes, with a capacity of tens of millions of point clouds per second. These technologies reduce the cost and time required for point cloud data acquisition and improve data accuracy. While the evolution of point cloud data acquisition methods has made acquiring massive amounts of point cloud data possible, the processing of such large volumes of 3D point cloud data is facing bottlenecks due to limitations in storage space and transmission bandwidth, driven by increasing application demands.
[0070] For example, taking a point cloud video with a frame rate of 30 frames per second (fps) as an example, each frame of the point cloud contains 700,000 points, and each point has coordinate information xyz (float) and color information RGB (uchar). Therefore, the data size of a 10-second point cloud video is approximately 0.7 million × (4 bytes × 3 + 1 byte × 3) × 30 fps × 10 s = 3.15 GB, where 1 byte is 8 bits. In contrast, a 10-second 1280×720 two-dimensional video with a YUV sampling format of 4:2:0 and a frame rate of 24 fps has a data size of approximately 1280×720 × 12 bits × 24 fps × 10 s ≈ 0.33 GB. The data size of a 10-second two-view three-dimensional video is approximately 0.33 × 2 = 0.66 GB. It is evident that the data size of a point cloud video far exceeds that of two-dimensional and three-dimensional videos of the same duration. Therefore, in order to better achieve 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.
[0071] In other words, since point clouds are a collection of massive points, storing point clouds not only consumes a lot of memory, but is also not conducive to transmission. There is also not enough bandwidth to support the transmission of point clouds directly at the network layer without compression. Therefore, point clouds need to be compressed.
[0072] Currently, point cloud encoding frameworks that can compress point clouds include the Geometry-based Point Cloud Compression (G-PCC) or Video-based Point Cloud Compression (V-PCC) framework provided by the Moving Picture Experts Group (MPEG), and the AVS-PCC framework provided by AVS. The G-PCC framework can be used to compress type 1 static point clouds and type 3 dynamically acquired point clouds, while the V-PCC framework can be used to compress type 2 dynamic point clouds. The G-PCC framework is also known as the point cloud codec TMC13, and the V-PCC framework is also known as the point cloud codec TMC2.
[0073] This application provides a network architecture for a point cloud encoding / decoding system that includes decoding and encoding methods. Figure 3 This is a schematic diagram of a network architecture for point cloud encoding and decoding provided in an embodiment of this application. Figure 3As shown, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. The electronic devices can be various types of devices with point cloud encoding and decoding capabilities, such as mobile phones, tablets, personal computers, personal digital assistants, navigators, digital phones, video phones, televisions, sensing devices, servers, etc., and this application embodiment is not limited to any particular type. The decoder or encoder in this application embodiment can be one of the aforementioned electronic devices.
[0074] The electronic device in this application embodiment has point cloud encoding and decoding functions, and generally includes a point cloud encoder (i.e., encoder) and a point cloud decoder (i.e. decoder).
[0075] The following explanation uses the AVS-PCC encoding and decoding framework as an example to illustrate point cloud compression technology.
[0076] As is understandable, point cloud compression generally employs separate compression of point cloud geometric information and attribute information. At the encoding end, the point cloud geometric information is first encoded in the geometric encoder, and then the reconstructed geometric information is input as supplementary information into the attribute encoder to assist in the compression of point cloud attributes. At the decoding end, the point cloud geometric information is first decoded in the geometric decoder, and then the decoded geometric information is input as supplementary information into the attribute decoder to assist in the compression of point cloud attributes. The entire encoder-decoder system consists of preprocessing / post-processing, geometric encoding / decoding, and attribute encoding / decoding.
[0077] This application provides a point cloud encoder, such as... Figure 4 The diagram shows the framework of the point cloud compression reference platform PCRM provided by AVS. The point cloud encoder includes a geometric encoder: a coordinate translation unit 111, a coordinate quantization unit 112, an octree construction unit 113, a geometric entropy encoder 114, and a geometric reconstruction unit 115. The attribute encoder includes an attribute recoloring unit 116, a color space transformation unit 117, a first attribute prediction unit 118, a quantization unit 119, and an attribute entropy encoder 1110.
[0078] For PCRM, in the geometric encoding part at the encoding end, the original geometric information is first preprocessed. The geometric origin is normalized to the minimum position in the point cloud space by the coordinate translation unit 111, and the geometric information is converted from floating point numbers to integers by the coordinate quantization unit 112 to facilitate subsequent regularization processing. Then, the regularized geometric information is geometrically encoded. In the octree construction unit 113, the point cloud space is recursively divided using an octree structure. Each time, the current node is divided into eight sub-blocks of the same size, and the occupancy codeword status of each sub-block is determined. When the sub-block does not contain any points, it is recorded as empty; otherwise, it is recorded as non-empty. At the last level of the recursive division, the occupancy codeword information of all blocks is recorded and geometrically encoded. The geometric information expressed by the octree structure is input into the geometric entropy encoder 114 to form a geometric code stream. On the other hand, geometric reconstruction processing is performed in the geometric reconstruction unit 115. The reconstructed geometric information is input into the attribute encoder as additional information.
[0079] In the attribute encoding section, the original attribute information is first preprocessed. Since the geometric information changes after geometric encoding, the attribute recoloring unit 116 reassigns attribute values to each point after geometric encoding to achieve attribute recoloring. In addition, if the attribute information being processed is color information, the original color information needs to be transformed into the YUV color space, which is more in line with the visual characteristics of the human eye, through the color space transformation unit 117. Then, the preprocessed attribute information is attribute encoded by the first attribute prediction unit 118. Attribute encoding first requires reordering the point cloud using Morton code, so the traversal order of attribute encoding is Morton order. The attribute prediction method in PCRM is a single-point prediction based on the Merton order. That is, it backtracks one point from the current point to be encoded (current node) according to the Merton order. The found node is the prediction reference point of the current point to be encoded. Then, the attribute reconstruction value of the prediction reference point is used as the attribute prediction value. The attribute residual value is the difference between the original attribute value and the attribute prediction value of the current point to be encoded. Finally, the attribute residual value is quantized by the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form the attribute code stream.
[0080] This application also provides a point cloud decoder, such as... Figure 5 The diagram shows the framework of the point cloud compression reference platform PCRM provided by AVS. The point cloud decoder includes a geometric deencoder: a geometric entropy decoder 121, an octree reconstruction unit 122, a coordinate inverse quantization unit 123, and a coordinate inverse translation unit 124. The attribute decoder includes an attribute entropy decoder 125, an inverse quantization unit 126, a second attribute prediction unit 127, and a color space inverse transformation unit 128.
[0081] At the decoding end, the same method of decoding geometry and attributes is used separately. In the geometry decoding part, the geometry bitstream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometry information of each node. Then, an octree structure is constructed by the octree reconstruction unit 122 in the same way as the geometry encoding. Combined with the decoded geometry, the geometry information expressed by the coordinate transformation through the octree structure is reconstructed. On the one hand, this information is dequantized by the coordinate dequantization unit 123 and inversely translated by the coordinate inverse translation unit 124 to obtain the decoded geometry information. On the other hand, it is input as additional information into the attribute decoder. In the attribute decoding section, the Morton sequence is constructed in the same way as in the encoding section. First, the attribute bitstream is entropy decoded by the attribute entropy decoder 125 to obtain the quantized residual information. Then, the attribute residual value is obtained by inverse quantization by the inverse quantization unit 126. Similarly, in the same way as in attribute encoding, the attribute prediction value of the current point to be decoded is obtained by the second attribute prediction unit 127. Then, the attribute prediction value is added to the attribute residual value to recover the attribute reconstruction value (e.g., YUV attribute value) of the current point to be decoded. Finally, the decoded attribute information is obtained by color space inverse transformation by the color space inverse transformation unit 128.
[0082] It's also understandable that, for the AVS-PCC codec framework, the general test conditions are as follows:
[0083] There are four test conditions:
[0084] Condition 1: Geometric position is finitely lossy, and properties are lossy;
[0085] Condition 2: Geometric position is lossless, but attributes are lossy;
[0086] Condition 3: Geometric position is lossless, but attribute loss is limited;
[0087] Condition 4: Geometric position is lossless and attribute is lossless.
[0088] 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 Cat1C point cloud contains both color and reflectance attribute information.
[0089] There are four implementation methods, distinguished by the algorithm used for attribute compression.
[0090] Implementation method 1: Predictive branching and attribute compression employ a prediction-based method;
[0091] At the encoding end, the points in the point cloud are processed in a certain order (original point cloud acquisition order, Morton order, Hilbert order, etc.). First, the prediction algorithm is used to obtain the attribute prediction value. Then, the attribute residual is obtained based on the attribute value and the attribute prediction value. Finally, the attribute residual is quantized to generate the quantized residual.
[0092] At the decoding end, the points in the point cloud are processed in a certain order (original point cloud acquisition order, Morton order, Hilbert order, etc.). First, the prediction algorithm is used to obtain the attribute prediction value, then the quantization residual is obtained by decoding, then the quantization residual is dequantized, and finally the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized residual.
[0093] Implementation Method 2: Predictive Transform Branch—Resource-constrained, attribute compression employs a method based on intra-frame prediction and k-ary Discrete Cosine Transform (DCT). When encoding the quantized transform coefficients, there is a maximum limit of X points (e.g., 4096), meaning that a maximum of X points can be encoded as a group.
[0094] At the encoding end, the points in the point cloud are processed in a certain order (original point cloud acquisition order, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of Y (e.g., 2). Then, these small groups are combined into several large groups (the number of points in each large group does not exceed X, e.g., 4096). Then, the prediction algorithm is used to obtain the attribute prediction value. Based on the attribute value and the attribute prediction value, the attribute residual is obtained. DCT transformation is performed on the attribute residual in units of small groups to generate transformation coefficients. Then, the transformation coefficients are quantized to generate quantized transformation coefficients. Finally, the quantized transformation coefficients are encoded in units of large groups.
[0095] At the decoding end, the points in the point cloud are processed in a certain order (original point cloud acquisition order, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of Y (e.g., 2). Then, these small groups are combined into several large groups (the number of points in each large group does not exceed X, e.g., 4096). The quantized transformation coefficients are obtained by decoding the large groups. Then, the attribute prediction value is obtained by using a prediction algorithm. Then, the quantized transformation coefficients are dequantized and detransformed in units of small groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and detransformed coefficients.
[0096] Implementation Method 3: Predictive Transform Branch—Resource-unrestricted, attribute compression adopts a method based on intra-frame prediction and DCT transform. When encoding the quantized transform coefficients, there is no limit to the maximum number of points X, that is, all coefficients are encoded together:
[0097] At the encoding end, the points in the point cloud are processed in a certain order (original point cloud acquisition order, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several groups with a maximum length of Y (e.g., 2). Then, the prediction algorithm is used to obtain the attribute prediction value. Based on the attribute value and the attribute prediction value, the attribute residual is obtained. DCT transformation is performed on the attribute residual in groups to generate transformation coefficients. Then, the transformation coefficients are quantized to generate quantized transformation coefficients. Finally, the quantized transformation coefficients of the entire point cloud are encoded.
[0098] At the decoding end, the points in the point cloud are processed in a certain order (original point cloud acquisition order, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several groups with a maximum length of Y (e.g., 2). The quantized transformation coefficients of the entire point cloud are obtained by decoding. Then, the attribute prediction value is obtained by using a prediction algorithm. Next, the quantized transformation coefficients are dequantized and detransformed in groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and detransformed coefficients.
[0099] Implementation Method 4: Multi-level transform branch, attribute compression adopts a method based on multi-level wavelet transform:
[0100] At the encoding end, multi-level wavelet transform is performed on the entire point cloud to generate transform coefficients. Then, the transform coefficients are quantized to generate quantized transform coefficients. Finally, the quantized transform coefficients of the entire point cloud are encoded.
[0101] At the decoding end, the quantized transformation coefficients of the entire point cloud are obtained through decoding. Then, the quantized transformation coefficients are dequantized and inversely transformed to obtain the attribute reconstruction values.
[0102] In implementation method 1, the coefficients can be quantization residuals. In embodiments 2, 3, and 4 above, the coefficients can be quantized transform coefficients. The specific implementation steps for encoding and decoding coefficients using the AVS-PCC encoding / decoding framework are as follows:
[0103] For color attributes, the encoder and decoder use the same order (original point cloud acquisition order, Morton order, Hilbert order, transformation order, etc.) to encode / decode the coefficients of each point (containing three coefficients, namely the three color components RGB or YUV). The run_length is used to count whether the coefficients of each point are all 0, which is called the zero run value, and its initial value is set to 0.
[0104] For the coefficients of each point, at the encoding end, if all coefficients of that point are zero, then increment `run_length`, and then process the coefficients of the next point; if any coefficient of any dimension of the color components is not zero, first encode the zero run length value (`run_length`), then reset `run_length` to 0, then encode the three specific coefficient values, and then process the coefficients of the next point. For the coefficients of the last point, if all coefficients are 0, then increment `run_length` and encode the `run_length` value; otherwise, first encode the zero run length value (`run_length`), then reset `run_length` to 0, then encode the three specific coefficient values, and finally encode the `run_length` value.
[0105] At the decoding end, first decode the zero run length value (run_length). If run_length > 0, it means that all three coefficients of the current color component are zero, so perform the --run_length operation and then process the coefficient of the next point. If run_length == 0, it means that at least one dimension of the current color component has a non-zero coefficient, so first decode the coefficient of that point, then decode and update the zero run length value (run_length), and then process the coefficient of the next point.
[0106] For the reflectivity attribute, the encoder and decoder use the same order (original point cloud acquisition order, Morton order, Hilbert order, transformation order, etc.) to encode / decode each coefficient in turn. The run_length is used to count whether the coefficient is 0, which is called the zero run value, and its initial value is set to 0.
[0107] For each coefficient, at the encoding end, if the coefficient is zero, increment `run_length` and then process the next coefficient; otherwise, first encode the zero-run value (`run_length`), then reset `run_length` to 0, then encode the specific coefficient value, and then process the next coefficient. For the last coefficient, if it is 0, increment `run_length` and encode the `run_length` value; otherwise, first encode the zero-run value (`run_length`), then reset `run_length` to 0, then encode the specific coefficient value, and finally encode the `run_length` value.
[0108] On the decoding end, first decode the zero run length value (run_length). If run_length > 0, it means that the current coefficient is zero, so perform the --run_length operation and then process the next coefficient. If run_length == 0, it means that the current coefficient is not zero, so first decode the coefficient, then decode and update the zero run length value (run_length), and then process the next coefficient.
[0109] In this situation, PCRM needs to encode / decode the number of consecutive zero coefficients. However, the coefficients after prediction, transformation, and quantization are relatively small. Statistical analysis shows that there are usually consecutive zero coefficients, which increases the complexity of the encoding and decoding process and reduces the encoding and decoding efficiency to some extent.
[0110] To address the aforementioned issues, this application provides an encoding / decoding method. At the encoding end, a grouping step size parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be encoded; if the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, then coefficient identification information for the current group is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information takes a second value, then the coefficient identification information is written into the bitstream, and the value of the coefficient identification information is set to a first value; after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; if the coefficient identification information takes a first value, then after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; the next coefficient to be encoded in the current group is then encoded according to the coefficient identification information and the zero run value. At the decoding end, the grouping step size parameter is determined; multiple coefficients to be decoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be decoded; coefficient identification information of the current group in the at least one group of coefficients to be decoded is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, the decoding process of the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next group of coefficients to be decoded in the at least one group of coefficients to be decoded is determined. Therefore, in the embodiments of this application, when encoding and decoding attribute information, the introduction of coefficient identification information allows for grouping multiple coefficients. Thus, when all coefficients in a coefficient group are 0, a single coefficient identification information can be used to indicate the values of multiple coefficients in that group, greatly saving codewords and improving the encoding and decoding performance of point cloud attributes.
[0111] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0112] One embodiment of this application proposes a decoding method. Figure 6 This is a schematic diagram illustrating the implementation flow of the decoding method proposed in the embodiments of this application, as follows: Figure 6 As shown, the decoding process for point clouds may include the following steps:
[0113] Step 101: Determine the grouping step size parameter.
[0114] It should be noted that the decoding method in this application embodiment specifically refers to a point cloud decoding method, which can be applied to a point cloud decoder (or simply "decoder").
[0115] It should also be noted that, in this embodiment, the point cloud to be processed includes at least one node. Specifically, for a node in the point cloud to be processed, when decoding that node, it can be considered as a node to be decoded in the point cloud, and multiple decoded nodes exist around that node. Here, the current node is the node to be decoded among these at least one nodes.
[0116] Furthermore, in the embodiments of this application, for each node in the point cloud to be processed, there is a corresponding geometric information and an attribute information; wherein, the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point.
[0117] Here, the attribute information can be color components, reflectance, or other attributes; this application embodiment does not impose specific limitations. Specifically, when the attribute information is a color component, it can be color information in any color space. For example, the attribute information can be color information in RGB space, YUV space, YCbCr space, etc., and this application embodiment does not impose specific limitations.
[0118] It should also be noted that, in this embodiment, the decoder can arrange these at least one node according to a preset decoding order in order to determine the index number corresponding to each node. Thus, based on the index number corresponding to each node, the decoder can process each node in the point cloud to be processed according to the preset decoding order.
[0119] In some embodiments, the preset decoding order can be one of the following: the original point cloud order, the Morton order, the Hilbert order, etc., and this application embodiment does not make specific limitations.
[0120] In the embodiments of this application, decoding the bitstream can determine the group identification information. The group identification information can be used to determine whether to use group processing to decode multiple coefficients to be decoded.
[0121] It should be noted that, in the embodiments of this application, the grouping identifier information can be understood as a flag indicating whether multiple coefficients to be decoded in the point cloud are grouped. Specifically, the decoder, when decoding the bitstream, can determine a variable that serves as the grouping identifier information, and thus the grouping identifier information can be determined by the value of this variable.
[0122] In other words, in the embodiments of this application, the processing methods for multiple coefficients to be decoded in the decoded point cloud are also different depending on the value of the group identifier information.
[0123] It is understood that, in the embodiments of this application, based on the value of the group identifier information, when decoding multiple coefficients to be decoded, one can choose to group the multiple coefficients to be decoded, or one can choose not to group the multiple coefficients to be decoded.
[0124] For example, in the embodiments of this application, if the value of the group identifier information is 1, then multiple coefficients to be decoded can be grouped; if the value of the group identifier information is 0, then multiple coefficients to be decoded can be left ungrouped.
[0125] It should be noted that, in the embodiments of this application, the value of the group identifier information can also be set to other values or parameters, and this application does not impose any limitations.
[0126] Furthermore, in the embodiments of this application, a flag bit subBlock can be used to represent group identification information.
[0127] For example, in the embodiments of this application, if the value of subBlock is 1, it can indicate that multiple coefficients to be decoded are grouped; if the value of subBlock is 0, it can indicate that multiple coefficients to be decoded are grouped.
[0128] It is understood that, in the embodiments of this application, the quantization residual or quantized transform coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be decoded for that point. That is, the coefficient to be decoded can be either the quantization residual or the quantized transform coefficient.
[0129] Furthermore, in the embodiments of this application, when decoding color attributes, the coefficients to be decoded for each point in the point cloud may include the coefficients of all color components. For example, a coefficient to be decoded may include the coefficients of the R component, the G component, and the B component; or, a coefficient to be decoded may include the coefficients of the Y component, the U component, and the V component.
[0130] Furthermore, in the embodiments of this application, when decoding the reflectivity attribute, the coefficient to be decoded for each point in the point cloud can be the coefficient of reflectivity.
[0131] It is understood that, in the embodiments of this application, after the group identification information is determined in the decoded bitstream, if the group identification information indicates that multiple coefficients to be decoded are to be grouped, then the group step size parameter can be further determined. That is, after determining that the group identification information indicates that multiple coefficients to be decoded are to be grouped, the process of determining the coefficient identification information is then executed.
[0132] Of course, the coefficient identification information determination process can also be executed directly without determining the identification information. In other words, the determination of coefficient identification information can depend on the value of the group identification information, or it can be executed independently without depending on the value of the group identification information.
[0133] It should be noted that, in the embodiments of this application, the grouping step size parameter can be used to group multiple coefficients to be decoded. Specifically, after determining the grouping step size parameter, it can be directly set as the grouping step size, and then the multiple coefficients to be decoded can be grouped according to the grouping step size; alternatively, after determining the grouping step size parameter, the grouping step size can be determined first, and then the multiple coefficients to be decoded can be grouped according to the grouping step size.
[0134] Furthermore, in the embodiments of this application, the grouping step size parameter can be an integer greater than or equal to 0.
[0135] It is understood that, in the embodiments of this application, when determining the group step size parameter, the group step size parameter can be obtained by decoding the bitstream; or, the pre-set group step size parameter can be obtained directly.
[0136] In other words, in the embodiments of this application, the group step size parameter can be obtained by parsing from the bitstream or determined directly by the decoding end.
[0137] For example, in an embodiment of this application, the grouping step size parameter can be predefined in the attribute header information aps. The grouping step size parameter can be encoded and decoded before encoding and decoding the attribute coefficients.
[0138] Step 102: Group the multiple coefficients to be decoded according to the grouping step size parameter, and determine at least one group of coefficients to be decoded.
[0139] In embodiments of this application, if the group identification information indicates that multiple coefficients to be decoded are to be grouped, then after determining the group step size parameter, the multiple coefficients to be decoded can be further grouped according to the group step size parameter, thereby determining at least one group of coefficients to be decoded.
[0140] It is understood that, in the embodiments of this application, when grouping multiple coefficients to be decoded, the grouping step size parameter can be directly set to the grouping step size, and then the multiple coefficients to be decoded can be grouped according to the grouping step size; alternatively, the grouping step size can be determined first according to the grouping step size parameter, and then the multiple coefficients to be decoded can be grouped according to the grouping step size. The grouping step size parameter can be an integer greater than or equal to 0.
[0141] In other words, in the embodiments of this application, if the determined grouping step size parameter is K, then the grouping step size can be set to K; or, the grouping step size can also be determined to be 2. K Where K is an integer greater than or equal to 0.
[0142] It should be noted that, in the embodiments of this application, when determining the grouping step size based on the grouping step size parameter, the grouping step size can also be set to any function value of the grouping step size parameter, and this application does not impose any specific limitations on this.
[0143] For example, in an embodiment of this application, assuming the determined grouping step size parameter is K = 10, the grouping step size can be determined to be 2 based on the grouping step size parameter K. K =1024, and then group the multiple coefficients to be decoded according to the grouping step size.
[0144] For example, in an embodiment of this application, assuming the determined grouping step size parameter is K = 512, the grouping step size can be directly set to 512 according to the grouping step size parameter K, and then the multiple coefficients to be decoded can be grouped according to the grouping step size. Of course, the value of the grouping step size parameter can also be any integer greater than or equal to 0, such as 1024, 2048, 4096, etc., and this application does not impose any limitations.
[0145] It should be noted that, in the embodiments of this application, before grouping multiple coefficients to be decoded based on the grouping step size parameter, the length of the coefficients to be decoded can be set first. Specifically, the length of one coefficient to be decoded can be set to a length unit.
[0146] It is understood that, in the embodiments of this application, for color attributes, a coefficient to be decoded includes the coefficients of all color components, and the sum of the lengths of the coefficients of all color components of a point can be set to a length unit; for reflectivity attributes, a coefficient to be decoded includes the coefficient of reflectivity, and the coefficient of reflectivity of a point can be set to a length unit.
[0147] In other words, in the embodiments of this application, the length of the coefficient to be decoded at a point can be set to 1. Since the coefficient to be decoded at each point can include the coefficients of all color components, the sum of the lengths of the coefficients of all color components at a point can be set to 1. For example, the sum of the lengths of the coefficients of the R, G, and B color components at a point can be set to 1, or the sum of the lengths of the coefficients of the Y, U, and V color components at a point can be set to 1.
[0148] Therefore, in the embodiments of this application, the length of the N coefficients to be decoded for N points can be N, that is, the length of the coefficients to be decoded is the same as the number of points, or in other words, the length of the coefficients to be decoded is the same as the number of coefficients to be decoded.
[0149] For example, in an embodiment of this application, if the grouping step size determined based on the grouping step size parameter is K, and the length of the multiple coefficients to be decoded is N, then after grouping the multiple coefficients to be encoded according to the grouping step size K, (G+1) groups of coefficients to be encoded can be determined. Specifically, after performing a division operation with N as the dividend and K as the divisor, the quotient is G, and the remainder is K', i.e., N / K = G…K'. At this point, it can be determined that after grouping, (G+1) groups of coefficients to be decoded are obtained, with K being the number of coefficients to be decoded in the first G groups and K' being the number of coefficients to be decoded in the last group.
[0150] It is understood that in the embodiments of this application, K' is an integer less than or equal to K, that is, the number of coefficients to be decoded in the last coefficient group to be decoded is less than or equal to the number of coefficients to be decoded in the first G coefficient groups to be decoded.
[0151] Step 103: Determine the coefficient identification information of the current group in at least one group of coefficients to be decoded; wherein the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0.
[0152] In the embodiments of this application, after grouping multiple coefficients to be decoded according to the grouping step size parameter to determine at least one group of coefficients to be decoded, for the current group in the at least one group to be decoded, the coefficient identification information of the current group can be further determined, wherein the coefficient identification information can be used to indicate whether all coefficients to be decoded in the current group are 0.
[0153] It should be noted that, in the embodiments of this application, the coefficient identification information can be understood as a flag indicating whether all the coefficients in the group of coefficients to be decoded are 0. Specifically, the decoder, when decoding the bitstream, can determine a variable that serves as the coefficient identification information, and thus the value of this variable can be used to determine whether all the coefficients in the corresponding group of coefficients to be decoded are 0.
[0154] In other words, in the embodiments of this application, the values of the coefficient identification information are different, and the indication information of the values of the coefficients to be decoded in the corresponding coefficient group to be decoded is also different.
[0155] Furthermore, in the embodiments of this application, if the coefficient identification information takes a first value, it is determined that the coefficient identification information indicates that all the coefficients to be decoded in the current group are 0; if the coefficient identification information takes a second value, it is determined that the coefficient identification information indicates that not all the coefficients to be decoded in the current group are 0; wherein, the first value and the second value are not equal. For example, the first value can be 1, and the second value can be 0.
[0156] For example, in the embodiments of this application, if the value of the coefficient identification information is a first value, such as 1, then it can be considered that the coefficient identification information indicates that all the coefficients to be decoded in the corresponding coefficient group to be decoded are 0; if the value of the coefficient identification information is a second value, such as 0, then it can be considered that the coefficient identification information indicates that all the coefficients to be decoded in the corresponding coefficient group to be decoded are not all 0.
[0157] It should be noted that, in the embodiments of this application, the value of the coefficient identification information can also be set to other values or parameters. That is, as long as the first value and the second value are not equal, the specific values of the first value and the second value can also be other values. This application does not impose any limitations.
[0158] Furthermore, in the embodiments of this application, the flag longZero can be used to represent coefficient identification information.
[0159] For example, in an embodiment of this application, if the value of longZero is a first value, such as 1, it can indicate that all the coefficients to be decoded in the current group are 0; if the value of longZero is a second value, such as 0, it can indicate that not all the coefficients to be decoded in the current group are 0.
[0160] Step 104: If the coefficient identification information indicates that all the coefficients to be decoded in the current group are 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next coefficient group to be decoded in at least one group to be decoded is determined.
[0161] In the embodiments of this application, after determining the coefficient identification information of the current group in at least one group of coefficients to be decoded, if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, then the decoding process of the coefficients to be decoded in the current group can be completed, and the coefficient identification information of the next group of coefficients to be decoded in at least one group of coefficients to be decoded can be determined, so as to perform decoding process on the next group of coefficients to be decoded according to the coefficient identification information of the next group of coefficients to be decoded.
[0162] It is understood that in the embodiments of this application, if the value of the coefficient identifier information longZero obtained by decoding is the first value, such as 1, then it can be determined that all the coefficients to be decoded in the current group are 0, and it can be considered that there is no need to decode the coefficients to be decoded in the current group.
[0163] Furthermore, in the embodiments of this application, if the decoding process of the coefficients to be decoded in the current group is completed based on the coefficient identification information of the current group, then the code stream can continue to be decoded to determine the coefficient identification information of the next coefficient group to be decoded in at least one group of coefficients to be decoded, and then the next coefficient group to be decoded can be decoded according to the coefficient identification information of the next coefficient group to be decoded.
[0164] In other words, in the embodiments of this application, for the next group of coefficients to be decoded, it is still necessary to decode the bitstream to determine the corresponding coefficient identification information, and then determine whether all the coefficients to be decoded in the next group of coefficients to be decoded are 0 based on the value of the coefficient identification information. If all the coefficients to be decoded in the next group of coefficients to be decoded are 0, then the decoding process of the coefficients to be decoded in the next group of coefficients to be decoded is also completed, and the process continues to traverse at least one other group of coefficients to be decoded in the above method.
[0165] Furthermore, in embodiments of this application, after determining the coefficient identification information of the current group in at least one group of coefficients to be decoded, i.e., after step 103, the method for decoding the point cloud may further include the following steps:
[0166] Step 105: If the coefficient identification information indicates that not all the coefficients to be decoded in the current group are 0, then decode the bitstream, determine the zero run value, and determine the current coefficient in the current group based on the zero run value.
[0167] In the embodiments of this application, after determining the coefficient identification information of the current group in at least one group of coefficients to be decoded, if the coefficient identification information indicates that the coefficients to be decoded in the current group are not all 0, then the bitstream can continue to be decoded, the zero run value can be determined, and the current coefficients in the current group can be further decoded based on the zero run value.
[0168] It is understood that in the embodiments of this application, if the value of the coefficient identifier information longZero obtained by decoding is the second value, such as 0, then it can be determined that the coefficients to be decoded in the current group are not all 0, and thus it is necessary to decode the coefficients to be decoded in the current group. Therefore, it is necessary to decode the bitstream, continue to determine the zero run value, and then determine the current coefficient in the current group based on the zero run value.
[0169] Furthermore, in the embodiments of this application, the current coefficient can be the coefficient of all color components of the current point, or the current coefficient can be the coefficient of the reflectance of the current point.
[0170] It should be noted that, in the embodiments of this application, the zero-run value `run_length` can be used to count whether the coefficients to be decoded are zero. Specifically, for color attributes, if the zero-run value `run_length` is not zero (or greater than 0), it can be determined that the coefficients of all color components at the current point are 0; if the zero-run value `run_length` is 0, it can be determined that the coefficients of all color components at the current point are not all zero. For reflectivity attributes, if the zero-run value `run_length` is not zero, it can be determined that the coefficient of reflectivity at the current point is 0; if the zero-run value `run_length` is 0, it can be determined that the coefficient of reflectivity at the current point is not zero.
[0171] Furthermore, in the embodiments of this application, if the current coefficient is the coefficient of all color components of the current point, then if the zero run value indicates that the coefficients of all color components of the current point are all 0, then after decrementing the zero run value by 1, the next coefficient to be decoded in the current group is determined based on the zero run value; if the zero run value indicates that the coefficients of all color components of the current point are not all 0, then the bitstream is decoded, the coefficients of all color components of the current point and the new zero run value are determined, and the next coefficient to be decoded in the current group is determined based on the new zero run value.
[0172] It is understood that, in the embodiments of this application, for color attributes, if the zero run length value `run_length` indicates that the coefficients of all color components at the current point are 0, then there is no need to perform decoding processing on the current coefficient. Instead, the zero run length value can be decremented by 1 to update the zero run length value, and then the next coefficient to be decoded in the current group can be determined based on the zero run length value. For the next coefficient to be decoded, the zero run length value `run_length` is used to determine whether the coefficients of all color components are 0, in order to determine whether decoding processing of the coefficients of all color components is required.
[0173] For example, in an embodiment of this application, if the zero run length value (run_length) of the current coefficient determined by the decoded bitstream is 3, which is greater than 0, then it can be determined that the coefficients of all color components at the current point are 0. Therefore, it is not necessary to decode the current coefficient. The zero run length value can be decremented by 1 first, i.e., the --run_length operation is executed, and then the next coefficient to be decoded in the current group is determined based on the zero run length value. For the next coefficient to be decoded, the corresponding zero run length value (run_length) is 2, which is greater than 0. Therefore, it can be determined that the coefficients of all color components at that point are 0. Therefore, it is not necessary to decode the coefficients of all color components at that point. The zero run length value is decremented by 1 again, i.e., the --run_length operation is executed, and then the other coefficients to be decoded in the current group are determined based on the zero run length value.
[0174] It is understood that, in the embodiments of this application, for color attributes, if the zero run length value `run_length` is 0, meaning the zero run length value indicates that the coefficients of all color components at the current point are not all 0, then the bitstream needs to be decoded to further determine the coefficients of all color components at the current point and the new zero run length value. Then, based on the new zero run length value, the next coefficient to be decoded in the current group is determined. For the next coefficient to be decoded, the new zero run length value `run_length` is used to determine whether all coefficients of all color components are 0, in order to determine whether decoding processing of all color component coefficients is required.
[0175] For example, in an embodiment of this application, if the zero-run length value `run_length` of the current coefficient determined by the decoded bitstream is 0, then it can be determined that the coefficients of all color components at the current point are not all 0. Therefore, it is necessary to decode the current coefficient, that is, to determine all color components at the current point by decoding the bitstream. At the same time, a new zero-run length value can be determined by decoding the bitstream, and then the next coefficient to be decoded in the current group is determined based on the new zero-run length value obtained by decoding. For the next coefficient to be decoded, if the corresponding zero-run length value `run_length` is 3, which is greater than 0, then it can be determined that the coefficients of all color components at that point are all 0. Therefore, it is not necessary to decode the coefficients of all color components at that point, and the zero-run length value is decremented by 1, that is, the `--run_length` operation is performed. If the corresponding zero-run length value `run_length` is 0, then it can be determined that the coefficients of all color components at that point are not all 0. Therefore, it is necessary to decode the coefficients of all color components at that point.
[0176] Furthermore, in the embodiments of this application, if the current coefficient is the coefficient of the reflectivity of the current point, then if the zero run value indicates that the coefficient of the reflectivity of the current point is 0, then after decrementing the zero run value by 1, the next coefficient to be decoded in the current group is determined based on the zero run value; if the zero run value indicates that the coefficient of the reflectivity of the current point is not 0, then the bitstream is decoded, the coefficient of the reflectivity of the current point and the new zero run value are determined, and the next coefficient to be decoded in the current group is determined based on the new zero run value.
[0177] It is understood that, in the embodiments of this application, for the reflectivity attribute, if the zero run length value (run_length) indicates that the reflectivity coefficient of the current point is 0, then there is no need to perform decoding processing on the current coefficient. Instead, the zero run length value can be decremented by 1 to update the zero run length value, and then the next coefficient to be decoded in the current group can be determined based on the zero run length value. For the next coefficient to be decoded, the zero run length value (run_length) is used to determine whether the reflectivity coefficient is 0, in order to determine whether decoding processing of the reflectivity coefficient is required.
[0178] For example, in an embodiment of this application, if the zero run length value (run_length) of the current coefficient determined by the decoded bitstream is 3, which is greater than 0, then the reflectivity coefficient of the current point can be determined to be 0. Therefore, it is not necessary to decode the current coefficient. The zero run length value can be decremented by 1 first, i.e., the --run_length operation is performed, and then the next coefficient to be decoded in the current group is determined based on the zero run length value. For the next coefficient to be decoded, the corresponding zero run length value (run_length) is 2, which is greater than 0. Therefore, it is not necessary to decode the reflectivity coefficient of the point. The zero run length value can be decremented by 1 again, i.e., the --run_length operation is performed, and then the other coefficients to be decoded in the current group are determined based on the zero run length value.
[0179] It is understood that, in the embodiments of this application, for the reflectivity attribute, if the zero run length value (run_length) is 0, meaning the zero run length value indicates that the reflectivity coefficient at the current point is not 0, then the bitstream needs to be decoded to further determine the reflectivity coefficient at the current point and the new zero run length value. Then, based on the new zero run length value, the next coefficient to be decoded in the current group is determined. For the next coefficient to be decoded, the new zero run length value (run_length) is used to determine whether the reflectivity coefficient is 0, in order to determine whether decoding processing of the reflectivity coefficient is required.
[0180] For example, in an embodiment of this application, if the zero-run length value `run_length` of the current coefficient determined by the decoded bitstream is 0, then it can be determined that the reflectivity coefficient of the current point is not 0. Therefore, it is necessary to decode the current coefficient, that is, to determine the reflectivity of the current point by decoding the bitstream. At the same time, a new zero-run length value can be determined by decoding the bitstream, and then the next coefficient to be decoded in the current group is determined based on the new zero-run length value obtained by decoding. For the next coefficient to be decoded, if the corresponding zero-run length value `run_length` is 3, which is greater than 0, then it can be determined that the reflectivity coefficient of that point is 0. Therefore, it is not necessary to decode the reflectivity coefficient of that point, and the zero-run length value is decremented by 1, that is, the `--run_length` operation is performed. If the corresponding zero-run length value `run_length` is 0, then it can be determined that the reflectivity coefficient of that point is not 0. Therefore, it is necessary to decode the reflectivity coefficient of that point.
[0181] Furthermore, in the embodiments of this application, after decoding the bitstream and determining the group identification information, the method for decoding the point cloud may further include the following steps:
[0182] Step 106: If the group identification information indicates that multiple coefficients to be decoded are not to be grouped, then decode the bitstream, determine the zero run value, and determine the current coefficient based on the zero run value.
[0183] In the embodiments of this application, after the group identification information is determined in the decoded bitstream, if the group identification information indicates that multiple coefficients to be decoded are not to be grouped, then it is necessary to decode the bitstream, determine the zero run value, and then determine the current coefficient based on the zero run value.
[0184] It is understood that, in the embodiments of this application, if it is determined that multiple coefficients to be decoded will not be grouped based on the group identification information obtained by decoding, the coefficients to be decoded need to be encoded sequentially according to a preset order. Therefore, the code stream can be decoded to determine the zero run value, and then the current coefficient among the multiple coefficients to be decoded can be decoded based on the zero run value.
[0185] Furthermore, in the embodiments of this application, the current coefficient can be the coefficient of all color components of the current point, or the current coefficient can be the coefficient of the reflectance of the current point.
[0186] It should be noted that, in the embodiments of this application, the zero-run value `run_length` can be used to count whether the coefficients to be decoded are zero. Specifically, for color attributes, if the zero-run value `run_length` is not zero (or greater than 0), it can be determined that the coefficients of all color components at the current point are 0; if the zero-run value `run_length` is 0, it can be determined that the coefficients of all color components at the current point are not all zero. For reflectivity attributes, if the zero-run value `run_length` is not zero, it can be determined that the coefficient of reflectivity at the current point is 0; if the zero-run value `run_length` is 0, it can be determined that the coefficient of reflectivity at the current point is not zero.
[0187] Furthermore, in the embodiments of this application, if the current coefficient is the coefficient of all color components of the current point, then if the zero run value indicates that the coefficients of all color components of the current point are all 0, then after decrementing the zero run value by 1, the next coefficient to be decoded is determined based on the zero run value; if the zero run value indicates that the coefficients of all color components of the current point are not all 0, then the bitstream is decoded, the coefficients of all color components of the current point and the new zero run value are determined, and the next coefficient to be decoded is determined based on the new zero run value.
[0188] It is understood that, in the embodiments of this application, for color attributes, if the zero run length value `run_length` indicates that the coefficients of all color components at the current point are 0, then there is no need to perform decoding processing on the current coefficient. Instead, the zero run length value can be decremented by 1 to update the zero run length value, and then the next coefficient to be decoded can be determined based on the zero run length value. For the next coefficient to be decoded, the zero run length value `run_length` is used to determine whether the coefficients of all color components are 0, in order to determine whether decoding processing of the coefficients of all color components is required.
[0189] For example, in an embodiment of this application, if the zero run length value (run_length) of the current coefficient determined by the decoded bitstream is 3, which is greater than 0, then it can be determined that the coefficients of all color components at the current point are 0. Therefore, it is not necessary to decode the current coefficient. The zero run length value can be decremented by 1 first, i.e., the --run_length operation is performed, and then the next coefficient to be decoded is determined based on the zero run length value. For the next coefficient to be decoded, the corresponding zero run length value (run_length) is 2, which is greater than 0. Therefore, it can be determined that the coefficients of all color components at that point are 0. Therefore, it is not necessary to decode the coefficients of all color components at that point. The zero run length value can be decremented by 1 again, i.e., the --run_length operation is performed, and then other coefficients to be decoded are determined based on the zero run length value.
[0190] It is understood that, in the embodiments of this application, for color attributes, if the zero run length value (run_length) is 0, meaning the zero run length value indicates that the coefficients of all color components at the current point are not all 0, then the bitstream needs to be decoded to further determine the coefficients of all color components at the current point and the new zero run length value. Then, the next coefficient to be decoded is determined based on the new zero run length value. For the next coefficient to be decoded, the new zero run length value (run_length) is used to determine whether the coefficients of all color components are all 0, in order to determine whether decoding processing of the coefficients of all color components is required.
[0191] For example, in an embodiment of this application, if the zero-run length value `run_length` of the current coefficient determined by the decoded bitstream is 0, then it can be determined that the coefficients of all color components at the current point are not all 0. Therefore, it is necessary to decode the current coefficient, that is, to determine all color components at the current point by decoding the bitstream. At the same time, a new zero-run length value can be determined by decoding the bitstream, and then the next coefficient to be decoded is determined based on the new zero-run length value obtained by decoding. For the next coefficient to be decoded, if the corresponding zero-run length value `run_length` is 3, which is greater than 0, then it can be determined that the coefficients of all color components at that point are all 0. Therefore, it is not necessary to decode the coefficients of all color components at that point, and the zero-run length value is decremented by 1, that is, the `--run_length` operation is performed. If the corresponding zero-run length value `run_length` is 0, then it can be determined that the coefficients of all color components at that point are not all 0. Therefore, it is necessary to decode the coefficients of all color components at that point.
[0192] Furthermore, in the embodiments of this application, if the current coefficient is the coefficient of reflectivity at the current point, then if the zero run value indicates that the coefficient of reflectivity at the current point is 0, then after decrementing the zero run value by 1, the next coefficient to be decoded is determined based on the zero run value; if the zero run value indicates that the coefficient of reflectivity at the current point is not 0, then the bitstream is decoded, the coefficient of reflectivity at the current point and the new zero run value are determined, and the next coefficient to be decoded is determined based on the new zero run value.
[0193] It is understood that, in the embodiments of this application, for the reflectivity attribute, if the zero run length value (run_length) indicates that the reflectivity coefficient at the current point is 0, then there is no need to perform decoding processing on the current coefficient. Instead, the zero run length value can be decremented by 1 to update the zero run length value, and then the next coefficient to be decoded can be determined based on the zero run length value. For the next coefficient to be decoded, the zero run length value (run_length) is used to determine whether the reflectivity coefficient is 0, in order to determine whether decoding processing of the reflectivity coefficient is required.
[0194] For example, in an embodiment of this application, if the zero run length value (run_length) of the current coefficient determined by the decoded bitstream is 3, which is greater than 0, then the reflectivity coefficient of the current point can be determined to be 0. Therefore, it is not necessary to decode the current coefficient. Instead, the zero run length value can be decremented by 1 (i.e., the --run_length operation is performed), and then the next coefficient to be decoded can be determined based on the zero run length value. For the next coefficient to be decoded, the corresponding zero run length value (run_length) is 2, which is greater than 0. Therefore, it is not necessary to decode the reflectivity coefficient of the point. The zero run length value can be decremented by 1 again (i.e., the --run_length operation is performed), and then other coefficients to be decoded can be determined based on the zero run length value.
[0195] Understandably, in the embodiments of this application, for reflectivity attributes, if the zero run length value (run_length) is 0, meaning the zero run length value indicates that the reflectivity coefficient at the current point is not 0, then the bitstream needs to be decoded to further determine the reflectivity coefficient at the current point and the new zero run length value. Then, the next coefficient to be decoded is determined based on the new zero run length value. For the next coefficient to be decoded, the new zero run length value (run_length) is used to determine whether the reflectivity coefficient is 0, thus determining whether decoding processing of the reflectivity coefficient is required.
[0196] For example, in an embodiment of this application, if the zero-run length value (run_length) of the current coefficient determined by the decoded bitstream is 0, then it can be determined that the reflectivity coefficient of the current point is not 0. Therefore, it is necessary to decode the current coefficient, that is, to determine the reflectivity of the current point by decoding the bitstream. At the same time, a new zero-run length value can be determined by decoding the bitstream, and then the next coefficient to be decoded is determined based on the new zero-run length value obtained by decoding. For the next coefficient to be decoded, if the corresponding zero-run length value (run_length) is 3, which is greater than 0, then it can be determined that the reflectivity coefficient of that point is 0. Therefore, it is not necessary to decode the reflectivity coefficient of that point, and the zero-run length value is decremented by 1, that is, the --run_length operation is performed. If the corresponding zero-run length value (run_length) is 0, then it can be determined that the reflectivity coefficient of that point is not 0. Therefore, it is necessary to decode the reflectivity coefficient of that point.
[0197] In summary, the decoding method proposed in this application can group all coefficients based on the indication of the group identification information when decoding coefficients. At the same time, coefficient identification information, such as a flag bit longZero, is introduced. This flag bit longZero can be used to indicate whether all coefficients in each group are 0. Thus, when all coefficients in a group are 0, only a 1-bit flag bit is needed for indication, which can save some codewords, thereby improving encoding efficiency and compression performance.
[0198] For example, in the embodiments of this application, Table 1 below shows the effect of the decoding method proposed in the embodiments of this application on color attributes under multi-layer transformation branches, wherein the value of the group step size parameter can be set to a fixed value of 1024.
[0199] Table 1
[0200]
[0201] This application provides a decoding method. At the decoding end, a grouping step size parameter is determined; multiple coefficients to be decoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be decoded; coefficient identification information of the current group within the at least one group of coefficients to be decoded is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, the decoding process for the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next group of coefficients to be decoded within the at least one group of coefficients to be decoded is determined. Therefore, in the embodiments of this application, when encoding and decoding attribute information, the introduction of coefficient identification information allows for grouping multiple coefficients. Thus, when all coefficients in a coefficient group are 0, a single coefficient identification information can be used to indicate the values of multiple coefficients in that group, greatly saving codewords and improving the encoding and decoding performance of point cloud attributes.
[0202] One embodiment of this application proposes an encoding method. Figure 7 This is a schematic diagram illustrating the implementation flow of the encoding method proposed in the embodiments of this application, as shown below. Figure 7 As shown, encoding point clouds may include the following steps:
[0203] Step 201: Determine the grouping step size parameter.
[0204] It should be noted that the encoding method in this application embodiment specifically refers to a point cloud encoding method, which can be applied to a point cloud encoder (also referred to as an "encoder").
[0205] It should also be noted that, in this embodiment, the point cloud to be processed includes at least one node. Specifically, for a node in the point cloud to be processed, when encoding that node, it can be considered as a node to be encoded in the point cloud, and multiple encoded nodes exist around that node. Here, the current node is the node to be encoded among these at least one nodes.
[0206] Furthermore, in this embodiment, for each node in the point cloud to be processed, there is a corresponding geometric information and an attribute information; wherein, the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point. Here, the attribute information can be a color component, reflectivity, or other attributes, and this embodiment does not specifically limit it.
[0207] It should also be noted that, in this embodiment, the encoder can arrange these at least one node according to a preset encoding order in order to determine the index number corresponding to each node. Thus, based on the index number corresponding to each node, the encoder can process each node in the point cloud to be processed according to the preset encoding order.
[0208] In some embodiments, the preset encoding order can be one of the following: the original point cloud order, the Morton order, the Hilbert order, etc., and this application embodiment does not make specific limitations.
[0209] In the embodiments of this application, group identification information can be determined first. This group identification information can be used to determine whether to use grouping processing to encode multiple coefficients to be encoded.
[0210] It should be noted that, in the embodiments of this application, the grouping identifier information can be understood as a flag indicating whether multiple coefficients to be encoded in the point cloud should be grouped. Specifically, a variable can be determined first as the grouping identifier information, and the grouping identifier information can be determined by the value of this variable.
[0211] In other words, in the embodiments of this application, the processing methods for multiple coefficients to be encoded in the encoded point cloud are also different depending on the value of the group identifier information.
[0212] It is understood that, in the embodiments of this application, based on the value of the group identifier information, when encoding multiple coefficients to be encoded, one can choose to group the multiple coefficients to be encoded, or one can choose not to group the multiple coefficients to be encoded.
[0213] For example, in the embodiments of this application, if the value of the group identifier information is 1, then multiple coefficients to be encoded can be selected for group processing; if the value of the group identifier information is 0, then multiple coefficients to be encoded can be selected not to be grouped.
[0214] It should be noted that, in the embodiments of this application, the value of the group identifier information can also be set to other values or parameters, and this application does not impose any limitations.
[0215] Furthermore, in the embodiments of this application, a flag bit subBlock can be used to represent group identification information.
[0216] For example, in the embodiments of this application, if the value of subBlock is 1, it can indicate that multiple coefficients to be encoded are grouped; if the value of subBlock is 0, it can indicate that multiple coefficients to be encoded are grouped.
[0217] It is understood that, in the embodiments of this application, the quantization residual or quantized transform coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be encoded for that point. That is, the coefficient to be encoded can be either the quantization residual or the quantized transform coefficient.
[0218] Furthermore, in the embodiments of this application, when encoding color attributes, the coefficients to be encoded for each point in the point cloud may include the coefficients of all color components. For example, a coefficient to be encoded may include the coefficients of the R component, the coefficients of the G component, and the coefficients of the B component; or, a coefficient to be encoded may include the coefficients of the Y component, the coefficients of the U component, and the coefficients of the V component.
[0219] Furthermore, in the embodiments of this application, when encoding reflectance attributes, the coefficient to be encoded for each point in the point cloud can be a coefficient of reflectance.
[0220] It is understood that, in the embodiments of this application, after determining the group identification information, if the group identification information indicates that multiple coefficients to be encoded are to be grouped, then the group step size parameter can be further determined. That is, after determining that the group identification information indicates that multiple coefficients to be decoded are to be grouped, the process of determining the coefficient identification information is then executed.
[0221] Of course, the coefficient identification information determination process can also be executed directly without determining the identification information. In other words, the determination of coefficient identification information can depend on the value of the group identification information, or it can be executed independently without depending on the value of the group identification information.
[0222] It should be noted that, in the embodiments of this application, the grouping step size parameter can be used to group multiple coefficients to be encoded. Specifically, after determining the grouping step size parameter, it can be directly set as the grouping step size, and then the multiple coefficients to be decoded can be grouped according to the grouping step size; alternatively, after determining the grouping step size parameter, the grouping step size can be determined first, and then the multiple coefficients to be decoded can be grouped according to the grouping step size.
[0223] Furthermore, in the embodiments of this application, the grouping step size parameter can be an integer greater than or equal to 0.
[0224] It is understood that, in the embodiments of this application, when determining the grouping step size parameter, the grouping step size parameter can be determined directly; or, the pre-set grouping step size parameter can be obtained directly.
[0225] In other words, in the embodiments of this application, the grouping step size parameter can be determined directly by the encoding end or preset by the encoding end.
[0226] For example, in an embodiment of this application, the grouping step size parameter can be predefined in the attribute header information aps. The grouping step size parameter can be encoded and decoded before encoding and decoding the attribute coefficients.
[0227] Step 202: Group the multiple coefficients to be encoded according to the grouping step size parameter, and determine at least one group of coefficients to be encoded.
[0228] In embodiments of this application, if the grouping identification information indicates that multiple coefficients to be encoded are to be grouped, then after determining the grouping step size parameter, the multiple coefficients to be encoded can be further grouped according to the grouping step size parameter, thereby determining at least one group of coefficients to be encoded.
[0229] It is understood that, in the embodiments of this application, when grouping multiple coefficients to be encoded, the grouping step size parameter can be directly set to the grouping step size, and then the multiple coefficients to be encoded can be grouped according to the grouping step size; alternatively, the grouping step size can be determined first according to the grouping step size parameter, and then the multiple coefficients to be encoded can be grouped according to the grouping step size. The grouping step size parameter can be an integer greater than or equal to 0.
[0230] In other words, in the embodiments of this application, if the determined grouping step size parameter is K, then the grouping step size can be set to K; or, the grouping step size can also be determined to be 2. K Where K is an integer greater than or equal to 0.
[0231] It should be noted that, in the embodiments of this application, when determining the grouping step size based on the grouping step size parameter, the grouping step size can also be set to any function value of the grouping step size parameter, and this application does not impose any specific limitations on this.
[0232] For example, in an embodiment of this application, assuming the determined grouping step size parameter is K = 10, the grouping step size can be determined to be 2 based on the grouping step size parameter K. K =1024, and then group the multiple coefficients to be encoded according to the grouping step size.
[0233] For example, in an embodiment of this application, assuming the determined grouping step size parameter is K = 512, the grouping step size can be directly set to 512 according to the grouping step size parameter K, and then the multiple coefficients to be encoded can be grouped according to the grouping step size. Of course, the value of the grouping step size parameter can also be any integer greater than or equal to 0, such as 1024, 2048, 4096, etc., and this application does not impose any limitations.
[0234] It should be noted that, in the embodiments of this application, before grouping multiple coefficients to be encoded based on the grouping step size parameter, the length of the coefficients to be encoded can be set first. Specifically, the length of one coefficient to be encoded can be set to a length unit.
[0235] It is understood that, in the embodiments of this application, for color attributes, a coefficient to be encoded includes the coefficients of all color components, and the sum of the lengths of the coefficients of all color components of a point can be set to one length unit; for reflectivity attributes, a coefficient to be encoded includes the coefficient of reflectivity, and the coefficient of reflectivity of a point can be set to one length unit.
[0236] In other words, in the embodiments of this application, the length of the coefficient to be encoded at a point can be set to 1. Since the coefficient to be encoded at each point can include the coefficients of all color components, the sum of the lengths of the coefficients of all color components at a point can be set to 1. For example, the sum of the lengths of the coefficients of the R, G, and B color components at a point can be set to 1, or the sum of the lengths of the coefficients of the Y, U, and V color components at a point can be set to 1.
[0237] Therefore, in the embodiments of this application, the length of the N coefficients to be encoded at N points can be N, that is, the length of the coefficients to be encoded is the same as the number of points, or in other words, the length of the coefficients to be encoded is the same as the number of coefficients to be encoded.
[0238] For example, in an embodiment of this application, if the grouping step size determined based on the grouping step size parameter K is K, and the length of the multiple coefficients to be encoded is N, then after grouping the multiple coefficients to be encoded according to the grouping step size K, (G+1) groups of coefficients to be encoded can be determined. Specifically, after performing a division operation with N as the dividend and K as the divisor, the quotient is G, and the remainder is K', i.e., N / K = G…K'. At this point, it can be determined that after grouping, (G+1) groups of coefficients to be encoded are obtained, with K being the number of coefficients to be encoded in the first G groups and K' being the number of coefficients to be encoded in the last group.
[0239] It is understood that in the embodiments of this application, K' is an integer less than or equal to K, that is, the number of coefficients to be encoded in the last coefficient group to be encoded is less than or equal to the number of coefficients to be encoded in the first G coefficient groups to be encoded.
[0240] Step 203: If the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, then determine the coefficient identification information of the current group; wherein, the coefficient identification information is used to indicate whether all the coefficients to be encoded in the current group are 0.
[0241] In the embodiments of this application, after grouping multiple coefficients to be encoded according to the grouping step size parameter to determine at least one group of coefficients to be encoded, for the current group in the at least one group of coefficients to be encoded, if the current coefficient in the current group of coefficients to be encoded is not 0, then the coefficient identification information of the current group can be further determined, wherein the coefficient identification information can be used to indicate whether all coefficients to be encoded in the current group are 0.
[0242] It should be noted that, in the embodiments of this application, the coefficient identification information can be understood as a flag indicating whether all coefficients in the coefficient group to be encoded are 0. Specifically, the encoder can determine a variable as the coefficient identification information, and thus determine whether the coefficients in the corresponding coefficient group to be encoded are all 0 by using the value of this variable.
[0243] In other words, in the embodiments of this application, the values of the coefficient identification information are different, and the indication information of the values of the coefficients to be encoded in the corresponding coefficient group to be encoded is also different.
[0244] Furthermore, in the embodiments of this application, if the coefficient identification information takes a first value, it is determined that the coefficient identification information indicates that all coefficients to be encoded in the current group are 0; if the coefficient identification information takes a second value, it is determined that the coefficient identification information indicates that not all coefficients to be encoded in the current group are 0; wherein, the first value and the second value are not equal. For example, the first value can be 1, and the second value can be 0.
[0245] For example, in the embodiments of this application, if the value of the coefficient identification information is a first value, such as 1, then it can be considered that the coefficient identification information indicates that all the coefficients to be encoded in the corresponding coefficient group are 0; if the value of the coefficient identification information is a second value, such as 0, then it can be considered that the coefficient identification information indicates that all the coefficients to be encoded in the corresponding coefficient group are not all 0.
[0246] It should be noted that, in the embodiments of this application, the value of the coefficient identification information can also be set to other values or parameters. That is, as long as the first value and the second value are not equal, the specific values of the first value and the second value can also be other values. This application does not impose any limitations.
[0247] Furthermore, in the embodiments of this application, the flag longZero can be used to represent coefficient identification information.
[0248] For example, in an embodiment of this application, if the value of longZero is a first value, such as 1, it can indicate that all the coefficients to be encoded in the current group are 0; if the value of longZero is a second value, such as 0, it can indicate that not all the coefficients to be encoded in the current group are 0.
[0249] It should be noted that, in the embodiments of this application, before encoding the current group, the value of the coefficient identifier information can be initialized to a second value.
[0250] It is understood that, in the embodiments of this application, after grouping multiple coefficients to be encoded according to the grouping step size parameter to obtain at least one group of coefficients to be encoded, and before encoding the current group in the at least one group of coefficients to be encoded, the value of the coefficient identification information of the current group can be initialized in advance. The value of the coefficient identification information of the current group can be initialized to a second value. For example, the coefficient identification information longZero can be initialized to 0.
[0251] It should be noted that, in the embodiments of this application, by initializing the value of the coefficient identifier information of the current group to the second value, the value of the coefficient identifier information can be referenced in the subsequent encoding process. Once the current coefficient in the current group is not 0, it can be determined whether the coefficient identifier information bitstream needs to be encoded based on the value of the coefficient identifier information, thereby ensuring that the coefficient identifier information is not encoded repeatedly and saving codewords.
[0252] Furthermore, in the embodiments of this application, when encoding the coefficients in the current group according to a preset order, if the current coefficient is not 0, then it is necessary to first determine the coefficient identification information of the current group, and then refer to the value of the coefficient identification information of the current group to determine whether to encode the coefficient identification information, and whether to reset the value of the encoded coefficient identification information.
[0253] In other words, in the embodiments of this application, once it is determined that the current coefficient is not 0, the decoder will not directly write the coefficient identification information into the bitstream. Instead, after determining the coefficient identification information, it needs to select whether to encode the coefficient representation information based on the value of the coefficient identification information. In this way, the coefficient representation information can be encoded only once, which effectively improves the encoding efficiency.
[0254] It is understood that, in the embodiments of this application, for color attributes, a coefficient to be decoded includes the coefficients of all color components. Therefore, if it is determined that the current coefficient is not 0, then it can be determined that the coefficients of all corresponding color components are not all 0. If it is determined that the current coefficient is 0, then it can be determined that the coefficients of all corresponding color components are all 0. For reflectivity attributes, a coefficient to be decoded includes the coefficient of reflectivity. Therefore, if it is determined that the current coefficient is not 0, then it can be determined that the coefficient of corresponding reflectivity is not 0. If it is determined that the current coefficient is 0, then it can be determined that the coefficient of corresponding reflectivity is 0.
[0255] Step 204: If the value of the coefficient identifier information is the second value, then write the coefficient identifier information into the bitstream and set the value of the coefficient identifier information to the first value; after writing the zero run value into the bitstream, encode the current coefficient and set the zero run value to 0.
[0256] In the embodiments of this application, if the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, then after determining the coefficient identification information of the current group, if the value of the coefficient identification information is the second value, then the coefficient identification information can be written into the bitstream first, and then the value of the coefficient identification information can be set to the first value; then, after writing the zero run value into the bitstream, the current coefficient can be encoded, and then the zero run value can be set to 0.
[0257] Furthermore, in the embodiments of this application, when encoding the coefficients within the current group according to a preset order, if the current coefficient is not 0, it is necessary to first determine whether the value of the coefficient identifier information of the current group is the second value. If the value of the coefficient identifier information is the second value, then the coefficient identifier information needs to be written into the bitstream first. Wherein, when the value of the coefficient identifier information is the second value, the coefficient identifier information can indicate that the coefficients to be encoded in the current group are not all 0.
[0258] It should be noted that, in the embodiments of this application, since the coefficient identification information of the current group is initialized to a second value (e.g., 0) in advance, if the current coefficient is not 0 and the coefficient identification information of the current group is the second value, it can be said that the coefficients to be encoded in the current group are not all 0, and the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has not been encoded. Therefore, the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 can be written into the bitstream first.
[0259] Next, the value of the coefficient identifier information can be reset to the first value. This allows the system to refer to this value when encoding non-zero coefficients in the current group, avoiding the need to repeat the coefficient identifier information for the current group. For example, if it is determined again that a coefficient to be encoded in the current group is non-zero, and the coefficient identifier information for the current group is the first value, it can be concluded that although not all coefficients in the current group are zero, the coefficient identifier information indicating that not all coefficients in the current group are zero has already been encoded. Therefore, it is unnecessary to repeat the encoding of the coefficient identifier information for the current group. This saves codewords and improves encoding efficiency.
[0260] It is understood that, in the embodiments of this application, after writing the coefficient identification information into the bitstream and setting the value of the coefficient identification information to the first value, the zero run value can also be written into the bitstream, and then the current coefficient is encoded, and then the zero run value is set to 0.
[0261] Furthermore, in the embodiments of this application, the current coefficient can be the coefficient of all color components of the current point, or the current coefficient can be the coefficient of the reflectance of the current point.
[0262] It should be noted that, in the embodiments of this application, the zero-run value `run_length` can be used to count whether the coefficients to be encoded are zero. Specifically, for color attributes, if the zero-run value `run_length` is not 0 (or greater than 0), it can be determined that the coefficients of all color components at the current point are 0; if the zero-run value `run_length` is 0, it can be determined that the coefficients of all color components at the current point are not all 0. For reflectivity attributes, if the zero-run value `run_length` is not 0, it can be determined that the coefficient of reflectivity at the current point is 0; if the zero-run value `run_length` is 0, it can be determined that the coefficient of reflectivity at the current point is not 0.
[0263] For example, in the embodiments of this application, when encoding the coefficients in the current group according to a preset order, if the current coefficient is not 0, that is, the coefficients of the three color components of the current point are not all 0, that is, at least one of the three color components of the current point has a coefficient that is not 0, then it is necessary to first determine whether the value of longZero (coefficient identification information) is 0 (second value). If the value of longZero is 0, then it is necessary to write the value of longZero to 0 into the bitstream, that is, write the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 into the bitstream, and then set the value of longZero to non-zero, for example, set the value of longZero to 1 (first value). Then, the zero run length value (run_length) can be encoded, and then the current coefficient is encoded, that is, the coefficients of the specific three color components are encoded. Finally, run_length is reset to 0.
[0264] For example, in the embodiments of this application, when encoding the coefficients in the current group according to a preset order, if the current coefficient is not 0, that is, the coefficient of reflectivity of the current point is not 0, then it is necessary to first determine whether the value of longZero (coefficient identification information) is 0 (second value). If the value of longZero is 0, then it is necessary to write the value of longZero to 0 into the bitstream, that is, write the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 into the bitstream, and then set the value of longZero to non-zero, for example, set the value of longZero to 1 (first value). Then, the zero run length value (run_length) can be encoded, and then the current coefficient can be encoded, that is, the specific coefficient of reflectivity can be encoded. Finally, run_length is reset to 0.
[0265] Step 205: If the value of the coefficient identifier information is the first value, then after writing the zero run value into the bitstream, encode the current coefficient and set the zero run value to 0.
[0266] In the embodiments of this application, if the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, then after determining the coefficient identification information of the current group, if the value of the coefficient identification information is the first value, then the current coefficient can be encoded after writing the zero run value into the bitstream, and then the zero run value can be set to 0.
[0267] Furthermore, in the embodiments of this application, when encoding the coefficients within the current group according to a preset order, if the current coefficient is not 0, it is necessary to first determine whether the value of the coefficient identifier information of the current group is a second value. If the value of the coefficient identifier information is not a second value but a first value (e.g., 1), it can be determined that although the coefficients to be encoded in the current group are not all 0, the coefficient identifier information indicating that the coefficients to be encoded in the current group are not all 0 has been encoded. Therefore, it is not necessary to re-encode the coefficient identifier information of the current group. This saves codewords and improves encoding efficiency.
[0268] It is understood that, in the embodiments of this application, after the coefficient identification information is set to the first value, the zero run value can be written into the bitstream first, then the current coefficient can be encoded, and then the zero run value can be set to 0.
[0269] Furthermore, in the embodiments of this application, the current coefficient can be the coefficient of all color components of the current point, or the current coefficient can be the coefficient of the reflectance of the current point.
[0270] It should be noted that, in the embodiments of this application, the zero-run value `run_length` can be used to count whether the coefficients to be encoded are zero. Specifically, for color attributes, if the zero-run value `run_length` is not 0 (or greater than 0), it can be determined that the coefficients of all color components at the current point are 0; if the zero-run value `run_length` is 0, it can be determined that the coefficients of all color components at the current point are not all 0. For reflectivity attributes, if the zero-run value `run_length` is not 0, it can be determined that the coefficient of reflectivity at the current point is 0; if the zero-run value `run_length` is 0, it can be determined that the coefficient of reflectivity at the current point is not 0.
[0271] For example, in the embodiments of this application, when encoding the coefficients in the current group according to a preset order, if the current coefficient is not 0, that is, the coefficients of the three color components of the current point are not all 0, that is, at least one of the three color components of the current point has a coefficient that is not 0, then it is necessary to first determine whether the value of longZero (coefficient identification information) is 0 (second value). If the value of longZero is not 0, but is the first value (such as 1), it means that the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has been written into the bitstream, then longZero is no longer encoded, and then the zero run length value (run_length) can be encoded, then the current coefficient is encoded, that is, the coefficients of the specific three color components are encoded, and finally run_length is reset to 0.
[0272] For example, in the embodiments of this application, when encoding the coefficients in the current group according to a preset order, if the current coefficient is not 0, that is, the coefficient of reflectivity of the current point is not 0, then it is necessary to first determine whether the value of longZero (coefficient identification information) is 0 (second value). If the value of longZero is not 0, but is the first value (such as 1), it means that the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has been written into the bitstream. Then longZero is no longer encoded, and then the zero run length value (run_length) can be encoded, and then the current coefficient is encoded, that is, the specific coefficient of reflectivity is encoded. Finally, run_length is reset to 0.
[0273] Step 206: Continue encoding the next coefficient to be encoded in the current group based on the coefficient identification information and the zero run value.
[0274] In the embodiments of this application, the next coefficient to be encoded in the current group can continue to be encoded based on the coefficient identification information and the zero run value, until the last coefficient to be encoded in the current group.
[0275] It is understood that, in the embodiments of this application, for the last coefficient to be encoded in the current group, if the last coefficient to be encoded is 0, then it can be further determined whether all the coefficients to be encoded in the current group are 0 based on the coefficient identification information or the zero run value. If it is determined that all the coefficients to be encoded in the current group are 0, then the coefficient identification information can be set to the first value (e.g., 1), that is, the value of the coefficient identification information is set to indicate that all the coefficients to be encoded in the current group are 0, and then the coefficient identification information is written into the bitstream; if it is determined that not all the coefficients to be encoded in the current group are 0, then the zero run value can be written into the bitstream.
[0276] In other words, in the embodiments of this application, if the current coefficient is the last coefficient to be encoded in the current group, then after determining that the current coefficient is 0, it can be determined whether all the coefficients to be encoded in the current group are 0 based on the coefficient identification information, or it can be determined whether all the coefficients to be encoded in the current group are 0 based on the zero run value.
[0277] It should be noted that, in the embodiments of this application, when the current coefficient is the last coefficient to be encoded in the current group, if the value of the coefficient identification information is the second value, it is determined that all coefficients to be encoded in the current group are 0, and the coefficient identification information is encoded as the first value and written into the bitstream; otherwise, the zero run value is written into the bitstream.
[0278] In other words, in the embodiments of this application, for the last coefficient to be encoded in the current group, if the last coefficient to be encoded is 0 and the value of the coefficient identification information is the second value (e.g., 0), then it can be determined that all coefficients to be encoded in the current group are 0, and the coefficient identification information can be encoded as the first value (e.g., 1) and then written into the bitstream; if the last coefficient to be encoded is 0 and the value of the coefficient identification information is the first value (e.g., 1), then it can be determined that not all coefficients to be encoded in the current group are 0, and the zero run value can be written into the bitstream.
[0279] It should be noted that, in the embodiments of this application, when the current coefficient is the last coefficient to be encoded in the current group, if the zero run value is the same as the number of points in the current group, it is determined that all coefficients to be encoded in the current group are 0, and the coefficient identification information is encoded as the first value and written into the bitstream. If the zero run value is the same as the number of points in the current group, the zero run value is written into the bitstream.
[0280] In other words, in the embodiments of this application, for the last coefficient to be encoded in the current group, if the last coefficient to be encoded is 0 and the zero run value is the same as the number of points in the current group, then it can be determined that all coefficients to be encoded in the current group are 0, and then the coefficient identification information can be encoded as the first value (e.g., 1) and written into the bitstream; if the last coefficient to be encoded is 0 and the zero run value is less than the number of points in the current group, then it can be determined that not all coefficients to be encoded in the current group are 0, and then the zero run value can be written into the bitstream.
[0281] Furthermore, in the embodiments of this application, after grouping multiple coefficients to be encoded according to the grouping step size parameter and determining at least one group of coefficients to be encoded, i.e. after step 202, the encoding process of the point cloud may include the following steps:
[0282] Step 207: If the current coefficient in the current group of at least one group of coefficients to be encoded is 0, then after incrementing the zero run value by 1, continue encoding the next coefficient to be encoded in the current group.
[0283] In the embodiments of this application, after grouping multiple coefficients to be encoded according to the grouping step size parameter to determine at least one group of coefficients to be encoded, for the current group in the at least one group of coefficients to be encoded, if the current coefficient in the current group of coefficients to be encoded is 0, then after incrementing the zero run value by 1, the next coefficient to be encoded in the current group can be continued to be encoded.
[0284] It should be noted that, in the embodiments of this application, the zero run length value can be initialized to 0 before encoding the current group.
[0285] It is understood that, in the embodiments of this application, after grouping multiple coefficients to be encoded according to the grouping step size parameter to obtain at least one group of coefficients to be encoded, and before encoding the current group in the at least one group of coefficients to be encoded, the zero run value can be initialized in advance. For example, the zero run value run_length can be initialized to 0.
[0286] Furthermore, in an embodiment of this application, if the current coefficient is the coefficient of all color components of the current point, then if the coefficients of all color components of the current point in the current group are all 0, then after incrementing the zero run value by 1, the next coefficient to be encoded in the current group is determined.
[0287] It is understood that, in the embodiments of this application, for color attributes, if the coefficients of all color components at the current point are all 0, then there is no need to perform encoding processing on the current coefficient. Instead, the zero-run value can be incremented by 1 first to update the zero-run value, and then the next coefficient to be encoded in the current group can be determined. For the next coefficient to be encoded, it is continued to determine whether the coefficients of all color components are all 0, so as to determine whether encoding processing of the coefficients of all color components is required, and at the same time, whether the zero-run value needs to be incremented by 1.
[0288] For example, in an embodiment of this application, if it is determined that all color component coefficients of the current point are 0, then there is no need to encode the current coefficient. Instead, the zero-run value can be incremented by 1 (i.e., the ++run_length operation is performed) before determining the next coefficient to be encoded in the current group. For the next coefficient to be encoded, if it is determined that all color component coefficients of the point are 0, then similarly, there is no need to encode the coefficients of all color components of the point; the zero-run value is incremented by 1 again (i.e., the ++run_length operation is performed).
[0289] Furthermore, in the embodiments of this application, if the current coefficient is the reflectance coefficient of the current point, then if the reflectance coefficient of the current point in the current group is 0, then after incrementing the zero run value by 1, the next coefficient to be encoded in the current group is determined.
[0290] It is understood that, in the embodiments of this application, for the reflectivity attribute, if the reflectivity coefficient of the current point is 0, then there is no need to perform encoding processing on the current coefficient. Instead, the zero-run value can be incremented by 1 first to update the zero-run value, and then the next coefficient to be encoded in the current group can be determined. For the next coefficient to be encoded, it is further determined whether the reflectivity coefficient is 0 to determine whether encoding processing of the reflectivity coefficient is required, and at the same time, it is determined whether the zero-run value needs to be incremented by 1.
[0291] For example, in an embodiment of this application, if the reflectance coefficient of the current point is determined to be 0, there is no need to encode the current coefficient. Instead, the zero-run value can be incremented by 1 (i.e., the ++run_length operation is performed) before determining the next coefficient to be encoded in the current group. For the next coefficient to be encoded, if the reflectance coefficient of that point is determined to be 0, there is also no need to encode the reflectance coefficient of that point; the zero-run value is incremented by 1 again (i.e., the ++run_length operation is performed).
[0292] Furthermore, in the embodiments of this application, after determining the group identification information, the encoding process for the point cloud may include the following steps:
[0293] Step 208: If the group identification information indicates that multiple coefficients to be decoded are not grouped, then determine whether the current coefficient is 0.
[0294] In the embodiments of this application, after determining the group identification information, if the group identification information indicates that multiple coefficients to be encoded are not to be grouped, then it can be further determined whether the current coefficient is 0.
[0295] Furthermore, in the embodiments of this application, the current coefficient can be the coefficient of all color components of the current point, or the current coefficient can be the coefficient of the reflectance of the current point.
[0296] It is understood that, in the embodiments of this application, based on the group identification information, if it is determined that multiple coefficients to be encoded will not be grouped, the coefficients to be encoded need to be encoded sequentially in a preset order. Therefore, it is possible to continue to determine whether the current coefficient among the multiple coefficients to be encoded is 0.
[0297] Step 209: If the current coefficient is 0, after incrementing the zero run value by 1, continue encoding the next coefficient among multiple coefficients to be decoded.
[0298] Step 210: If the current coefficient is not 0, after writing the zero run value into the bitstream, encode the current coefficient, set the zero run value to 0, and continue encoding the next coefficient to be encoded among multiple coefficients to be decoded.
[0299] In the embodiments of this application, if the current coefficient is 0, the next coefficient to be encoded among multiple coefficients to be decoded can be encoded after incrementing the zero run value by 1; if the current coefficient is not 0, the current coefficient can be encoded after writing the zero run value into the bitstream, the zero run value can be set to 0, and the next coefficient to be encoded among multiple coefficients to be decoded can be encoded.
[0300] It is understood that, in the embodiments of this application, the zero-run value can be initialized in advance before encoding multiple coefficients to be encoded. For example, the zero-run value run_length can be initialized to 0.
[0301] Furthermore, in the embodiments of this application, if the current coefficient is the coefficient of all color components of the current point, then if the coefficients of all color components of the current point are all 0, then after incrementing the zero run value by 1, the next coefficient to be encoded is determined.
[0302] It is understood that, in the embodiments of this application, for color attributes, if the coefficients of all color components at the current point are all 0, then there is no need to perform encoding processing on the current coefficient. Instead, the zero-run value can be incremented by 1 to update the zero-run value, and then the next coefficient to be encoded can be determined. For the next coefficient to be encoded, it is continued to determine whether the coefficients of all color components are all 0, in order to determine whether encoding processing of the coefficients of all color components is required, and at the same time, whether the zero-run value needs to be incremented by 1.
[0303] For example, in an embodiment of this application, if it is determined that the coefficients of all color components of the current point are 0, then there is no need to encode the current coefficient. Instead, the zero-run value can be incremented by 1 (i.e., the ++run_length operation is performed) before determining the next coefficient to be encoded. Similarly, for the next coefficient to be encoded, if it is determined that the coefficients of all color components of the point are 0, then there is no need to encode the coefficients of all color components of the point. The zero-run value is incremented by 1 again (i.e., the ++run_length operation is performed).
[0304] Furthermore, in the embodiments of this application, if the current coefficient is the coefficient of the reflectivity of the current point, then if the coefficient of the reflectivity of the current point is 0, then after incrementing the zero run value by 1, the next coefficient to be encoded is determined.
[0305] It is understood that, in the embodiments of this application, for the reflectivity attribute, if the reflectivity coefficient of the current point is 0, then there is no need to perform encoding processing on the current coefficient. Instead, the zero-run value can be incremented by 1 to update the zero-run value, and then the next coefficient to be encoded can be determined. For the next coefficient to be encoded, it is continued to determine whether the reflectivity coefficient is 0 to determine whether encoding processing of the reflectivity coefficient is required, and at the same time, whether the zero-run value needs to be incremented by 1.
[0306] For example, in an embodiment of this application, if the reflectance coefficient of the current point is determined to be 0, there is no need to encode the current coefficient. Instead, the zero-run value can be incremented by 1 (i.e., the ++run_length operation is performed) before determining the next coefficient to be encoded. Similarly, for the next coefficient to be encoded, if the reflectance coefficient of that point is determined to be 0, there is also no need to encode the reflectance coefficient of that point. The zero-run value is incremented by 1 again (i.e., the ++run_length operation is performed).
[0307] In summary, the encoding method proposed in this application can group all coefficients based on the indication of the group identification information when encoding coefficients. At the same time, coefficient identification information, such as a flag bit longZero, is introduced. This flag bit longZero can be used to indicate whether all coefficients in each group are 0. Thus, when all coefficients in a group are 0, only a 1-bit flag bit is needed for indication, which can save some codewords, thereby improving encoding efficiency and compression performance.
[0308] This application provides an encoding / decoding method. At the encoding end, a grouping step size parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be encoded; if the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, then coefficient identification information of the current group is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the value of the coefficient identification information is a second value, then the coefficient identification information is written into the bitstream, and the value of the coefficient identification information is set to a first value; after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; if the value of the coefficient identification information is a first value, then after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; the next coefficient to be encoded in the current group is then encoded according to the coefficient identification information and the zero run value. Therefore, in the embodiments of this application, when encoding and decoding attribute information, the introduction of coefficient identification information allows multiple coefficients to be grouped. Thus, when all coefficients in a coefficient group are 0, a coefficient identification information can be used to indicate the value of multiple coefficients in that group, greatly saving codewords and improving the encoding and decoding performance of point cloud attributes.
[0309] Based on the above embodiments, in another embodiment of this application, when encoding the quantization residual or the quantized transformation coefficient, the quantization residual or the quantized transformation coefficient of the attribute information of all points in the point cloud can be grouped first, and then a flag bit longZero (coefficient identification information) can be introduced for each group. The flag bit longZero can be used to indicate whether the quantization residual or the quantized transformation coefficient of the attribute information of the points in each group is 0.
[0310] It is understood that, in the embodiments of this application, the quantization residual or the quantized transform coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be encoded for that point. That is, the coefficient to be encoded can be either the quantization residual or the quantized transform coefficient.
[0311] Furthermore, in the embodiments of this application, when encoding color attributes, the coefficients to be encoded for each point in the point cloud may include the coefficients of all color components. For example, a coefficient to be encoded may include the coefficients of the R component, the coefficients of the G component, and the coefficients of the B component; or, a coefficient to be encoded may include the coefficients of the Y component, the coefficients of the U component, and the coefficients of the V component.
[0312] It is understood that, in the embodiments of this application, when encoding the attribute information of the point cloud, the longZero flag (identification information) and the zero run length value run_length can be used. The longZero flag indicates whether all the coefficients to be encoded in each group are 0, and the zero run length value run_length is used to count whether all the coefficients of all color components of each point are 0.
[0313] Furthermore, in the embodiments of this application, at the encoding end, the coefficients to be encoded for all points can be grouped according to the grouping step size parameter, thereby determining at least one group of coefficients to be encoded. The grouping step size parameter can be a fixed length K, where K is an integer greater than or equal to 0, and can be any value pre-set for the point cloud.
[0314] For example, in an embodiment of this application, the grouping step size parameter can be predefined in the attribute header information aps. The grouping step size parameter can be encoded and decoded before encoding and decoding the attribute coefficients.
[0315] It is understood that, in the embodiments of this application, after determining the grouping step size parameter, the grouping step size parameter can be directly set as the grouping step size, and then the multiple coefficients to be encoded can be grouped according to the grouping step size; or, after determining the grouping step size parameter, the grouping step size can be determined first according to the grouping step size parameter, and then the multiple coefficients to be encoded can be grouped according to the grouping step size.
[0316] It should be noted that, in the embodiments of this application, the length of the coefficient to be encoded for a point can be set to 1. Since the coefficient to be encoded for each point can include the coefficients of all color components, the sum of the lengths of the coefficients of all color components for a point can be set to 1. For example, the sum of the lengths of the coefficients of the R, G, and B color components of a point can be set to 1, or the sum of the lengths of the coefficients of the Y, U, and V color components of a point can be set to 1.
[0317] In other words, in the embodiments of this application, the length of the N coefficients to be encoded at N points can be N, that is, the length of the coefficients to be encoded is the same as the number of points, or in other words, the length of the coefficients to be encoded is the same as the number of coefficients to be encoded.
[0318] For example, in an embodiment of this application, if the grouping step size determined based on the grouping step size parameter is K, and the length of the multiple coefficients to be decoded is N, then after grouping the multiple coefficients to be encoded according to the grouping step size K, (G+1) groups of coefficients to be encoded can be determined. Specifically, after performing a division operation with N as the dividend and K as the divisor, the quotient is G, and the remainder is K', i.e., N / K = G…K'. At this point, it can be determined that after grouping, (G+1) groups of coefficients to be decoded are obtained, with K being the number of coefficients to be decoded in the first G groups and K' being the number of coefficients to be decoded in the last group.
[0319] Furthermore, in the embodiments of this application, before encoding each group of coefficients to be encoded in sequence, for the current group in the group of coefficients to be encoded, longZero and run_length can be initialized first. For example, longZero of the current group can be initialized to 0 (the second value), and run_length can also be initialized to 0.
[0320] It is understood that in the embodiments of this application, when encoding the coefficients in the current group in a preset order, if the current coefficient is 0, that is, the coefficients of all color components of the current point are 0, then run_length is incremented, i.e., ++run_length, and then the next coefficient of the current group is processed, that is, the coefficients of the next all color components are processed.
[0321] It is understood that in the embodiments of this application, when encoding the coefficients in the current group according to a preset order, if the current coefficient is not 0, that is, the coefficients of the three color components of the current point are not all 0, that is, at least one of the three color components of the current point has a coefficient that is not 0, then it is necessary to first determine whether the value of longZero (coefficient identification information) is 0 (second value). If the value of longZero is 0, then it is necessary to write the value of longZero to 0 into the bitstream, that is, write the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 into the bitstream, and then set the value of longZero to non-zero, for example, set the value of longZero to 1 (first value). Then, the zero run length value (run_length) can be encoded, and then the current coefficient is encoded, that is, the coefficients of the specific three color components are encoded. Finally, run_length is reset to 0.
[0322] It should be noted that, in the embodiments of this application, since the coefficient identification information of the current group is initialized to a second value (e.g., 0) in advance, if the current coefficient is not 0 and the coefficient identification information of the current group is the second value, it can be said that the coefficients to be encoded in the current group are not all 0, and the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has not been encoded. Therefore, the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 can be written into the bitstream first.
[0323] Next, the value of the coefficient identifier information can be reset to the first value. This allows the system to refer to this value when encoding non-zero coefficients in the current group, avoiding the need to repeat the coefficient identifier information for the current group. For example, if it is determined again that a coefficient to be encoded in the current group is non-zero, and the coefficient identifier information for the current group is the first value, it can be concluded that although not all coefficients in the current group are zero, the coefficient identifier information indicating that not all coefficients in the current group are zero has already been encoded. Therefore, it is unnecessary to repeat the encoding of the coefficient identifier information for the current group. This saves codewords and improves encoding efficiency.
[0324] Furthermore, in the embodiments of this application, after traversing each coefficient to be encoded in the current group according to the above method until the last coefficient to be encoded in the current group, the value of longZero or the value of run_length can be used to determine whether all coefficients to be encoded in the current group are 0. For example, after traversing all coefficients to be encoded in the current group, if the value of longZero is 0, it can be determined that all coefficients to be encoded in the current group are 0; if the value of longZero is not 0, it can be determined that not all coefficients to be encoded in the current group are 0. Alternatively, after traversing all coefficients to be encoded in the current group, if the value of run_length is the same as the number of points in the current group, it can be determined that all coefficients to be encoded in the current group are 0; if the value of run_length is less than the number of points in the current group, it can be determined that not all coefficients to be encoded in the current group are 0.
[0325] For example, in an embodiment of this application, if the current coefficient is the last coefficient to be encoded in the current group, that is, the current coefficient is the coefficient of all color components of the last point in the current group, then after completing the encoding process of the current coefficient according to the above method, if it is determined that all coefficients to be encoded in the current group are 0 (if the value of longZero is 0, it means that all coefficients to be encoded in the current group are 0, or if the value of run_length is equal to the number of points in the current group, it means that all coefficients to be encoded in the current group are 0), then the value of longZero can be set to 1 and written into the bitstream; if it is determined that all coefficients to be encoded in the current group are not all 0 (if the value of longZero is not 0, it means that all coefficients to be encoded in the current group are not all 0, or if the value of run_length is less than the number of points in the current group, it means that all coefficients to be encoded in the current group are 0), then run_length is written into the bitstream.
[0326] Furthermore, in the embodiments of this application, when encoding reflectance attributes, the coefficient to be encoded for each point in the point cloud can be a coefficient of reflectance.
[0327] It is understood that, in the embodiments of this application, when encoding the attribute information of the point cloud, the longZero flag (identification information) and the zero run length value run_length can be used. The longZero flag indicates whether all the coefficients to be encoded in each group are 0, and the zero run length value run_length is used to count whether the reflectance coefficients of each point are all 0.
[0328] Furthermore, in the embodiments of this application, at the encoding end, the coefficients to be encoded for all points can be grouped according to the grouping step size parameter, thereby determining at least one group of coefficients to be encoded. The grouping step size parameter can be a fixed length K, where K is an integer greater than or equal to 0, and can be any value pre-set for the point cloud.
[0329] For example, in an embodiment of this application, the grouping step size parameter can be predefined in the attribute header information aps. The grouping step size parameter can be encoded and decoded before encoding and decoding the attribute coefficients.
[0330] It is understood that, in the embodiments of this application, after determining the grouping step size parameter, the grouping step size parameter can be directly set as the grouping step size, and then the multiple coefficients to be decoded can be grouped according to the grouping step size; or, after determining the grouping step size parameter, the grouping step size can be determined first according to the grouping step size parameter, and then the multiple coefficients to be decoded can be grouped according to the grouping step size.
[0331] It should be noted that, in the embodiments of this application, the length of the coefficient to be encoded for a point can be set to 1, that is, the length of the reflectance coefficient of a point can be set to 1.
[0332] In other words, in the embodiments of this application, the length of the coefficients to be encoded for N points can be N, that is, the length of the coefficients to be encoded is the same as the number of points.
[0333] For example, in an embodiment of this application, if the grouping step size parameter is K and the length of the coefficients to be encoded is N, then after grouping the coefficients to be encoded according to the grouping step size parameter K, (G+1) groups of coefficients to be encoded can be determined. Specifically, after performing a division operation with N as the dividend and K as the divisor, the quotient is G, and the remainder is K', i.e., N / K = G…K'. At this point, it can be determined that (G+1) groups of coefficients to be encoded are obtained after grouping. The number of points in the first G groups of coefficients to be encoded is K, i.e., the number of coefficients in the first G groups of coefficients to be encoded is K, and the number of points in the last group of coefficients to be encoded is K', i.e., the number of coefficients in the last group of coefficients to be encoded is K'. K' is greater than 0 and less than or equal to K.
[0334] Furthermore, in the embodiments of this application, before encoding each group of coefficients to be encoded in sequence, for the current group in the group of coefficients to be encoded, longZero and run_length can be initialized first. For example, longZero of the current group can be initialized to 0 (the second value), and run_length can also be initialized to 0.
[0335] It is understood that in the embodiments of this application, when encoding the coefficients in the current group in a preset order, if the coefficient of the current point is 0, that is, the coefficients of the reflectivity of the current point are all 0, then run_length is incremented, that is, ++run_length, and then the next coefficient of the current group is processed, that is, the coefficient of the next reflectivity is processed.
[0336] It is understood that in the embodiments of this application, when encoding the coefficients in the current group according to a preset order, if the coefficient of the current point is not 0, that is, the reflectivity coefficient of the current point is not 0, then it is necessary to first determine whether the value of longZero is 0. If the value of longZero is 0, then the value of longZero needs to be set to non-zero, for example, the value of longZero needs to be set to 1, so that the value of longZero indicates that the coefficients to be encoded in the current group are not all 0; if the value of longZero is not 0, then it can be considered that the value of longZero has already indicated that the coefficients to be encoded in the current group are not all 0, so it is not necessary to reset the value of longZero. Next, the zero run length value (run_length) can be encoded, then the coefficient of the current point can be encoded, that is, the reflectivity coefficient of the specific current point can be encoded, and finally the run_length is reset to 0.
[0337] It should be noted that, in the embodiments of this application, since the coefficient identification information of the current group is initialized to a second value (e.g., 0) in advance, if the current coefficient is not 0 and the coefficient identification information of the current group is the second value, it can be said that the coefficients to be encoded in the current group are not all 0, and the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has not been encoded. Therefore, the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 can be written into the bitstream first.
[0338] Next, the value of the coefficient identifier information can be reset to the first value. This allows the system to refer to this value when encoding non-zero coefficients in the current group, avoiding the need to repeat the coefficient identifier information for the current group. For example, if it is determined again that a coefficient to be encoded in the current group is non-zero, and the coefficient identifier information for the current group is the first value, it can be concluded that although not all coefficients in the current group are zero, the coefficient identifier information indicating that not all coefficients in the current group are zero has already been encoded. Therefore, it is unnecessary to repeat the encoding of the coefficient identifier information for the current group. This saves codewords and improves encoding efficiency.
[0339] Furthermore, in the embodiments of this application, after traversing each coefficient to be encoded in the current group according to the above method, up to the last coefficient to be encoded in the current group, the value of `longZero` or the value of `run_length` can be used to determine whether all coefficients to be encoded in the current group are 0. For example, after traversing all coefficients to be encoded in the current group, if the value of `longZero` is 0, it can be determined that all coefficients to be encoded in the current group are 0; if the value of `longZero` is not 0, it can be determined that not all coefficients to be encoded in the current group are 0. Alternatively, after traversing all coefficients to be encoded in the current group, if the value of `run_length` is the same as the number of points in the current group, it can be determined that all coefficients to be encoded in the current group are 0; if the value of `run_length` is less than the number of points in the current group, it can be determined that not all coefficients to be encoded in the current group are 0.
[0340] For example, in an embodiment of this application, if the current coefficient is the last coefficient to be encoded in the current group, that is, the current coefficient is the reflectance coefficient of the last point in the current group, then after completing the encoding process of the current coefficient according to the above method, if it is determined that all coefficients to be encoded in the current group are 0 (if the value of longZero is 0, it means that all coefficients to be encoded in the current group are 0, or if the value of run_length is equal to the number of points in the current group, it means that all coefficients to be encoded in the current group are 0), then the value of longZero can be set to 1 and written into the bitstream; if it is determined that all coefficients to be encoded in the current group are not all 0 (if the value of longZero is not 0, it means that all coefficients to be encoded in the current group are not all 0, or if the value of run_length is less than the number of points in the current group, it means that all coefficients to be encoded in the current group are 0), then run_length is written into the bitstream.
[0341] The encoding end can use a preset order, which may include the original point cloud acquisition order, Morton order, Hilbert order, transformation order, etc.
[0342] Furthermore, in the embodiments of this application, when decoding the quantization residual or the quantized transformation coefficients, the quantization residual or the quantized transformation coefficients of the attribute information of all points in the point cloud can be grouped first, and then a flag bit longZero (coefficient identification information) can be introduced for each group. The flag bit longZero can be used to indicate whether the quantization residual or the quantized transformation coefficients of the attribute information of the points in each group are all 0.
[0343] It is understood that, in the embodiments of this application, the quantization residual or quantized transform coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be decoded for that point. That is, the coefficient to be decoded can be either the quantization residual or the quantized transform coefficient.
[0344] Furthermore, in the embodiments of this application, when decoding color attributes, the coefficients to be decoded for each point in the point cloud may include the coefficients of all color components. For example, a coefficient to be decoded may include the coefficients of the R component, the G component, and the B component; or, a coefficient to be decoded may include the coefficients of the Y component, the U component, and the V component.
[0345] It is understood that, in the embodiments of this application, when decoding the attribute information of the point cloud, the longZero flag (identification information) and the zero run length value run_length can be used. The longZero flag indicates whether all the coefficients to be decoded in each group are 0, and the zero run length value run_length is used to count whether all the coefficients of all color components of each point are 0.
[0346] Furthermore, in the embodiments of this application, at the decoding end, the coefficients to be decoded for all points can be grouped according to the grouping step size parameter, thereby determining at least one group of coefficients to be decoded. The grouping step size parameter can be a fixed length K, where K is an integer greater than or equal to 0, and can be any value pre-set for the point cloud.
[0347] For example, in an embodiment of this application, the grouping step size parameter can be predefined in the attribute header information aps. The grouping step size parameter can be encoded and decoded before encoding and decoding the attribute coefficients.
[0348] It is understood that, in the embodiments of this application, after determining the grouping step size parameter, the grouping step size parameter can be directly set as the grouping step size, and then the multiple coefficients to be decoded can be grouped according to the grouping step size; or, after determining the grouping step size parameter, the grouping step size can be determined first according to the grouping step size parameter, and then the multiple coefficients to be decoded can be grouped according to the grouping step size.
[0349] It should be noted that, in the embodiments of this application, the length of the coefficient to be encoded for a point can be set to 1. Since the coefficient to be encoded for each point can include the coefficients of all color components, the sum of the lengths of the coefficients of all color components for a point can be set to 1. For example, the sum of the lengths of the coefficients of the R, G, and B color components of a point can be set to 1, or the sum of the lengths of the coefficients of the Y, U, and V color components of a point can be set to 1.
[0350] In other words, in the embodiments of this application, the length of the N coefficients to be encoded at N points can be N, that is, the length of the coefficients to be encoded is the same as the number of points, or in other words, the length of the coefficients to be encoded is the same as the number of coefficients to be encoded.
[0351] For example, in an embodiment of this application, if the grouping step size determined based on the grouping step size parameter is K, and the length of the multiple coefficients to be decoded is N, then after grouping the multiple coefficients to be decoded according to the grouping step size K, (G+1) groups of coefficients to be decoded can be determined. Specifically, after performing a division operation with N as the dividend and K as the divisor, the quotient is G, and the remainder is K', i.e., N / K = G…K'. At this point, it can be determined that after grouping, (G+1) groups of coefficients to be decoded are obtained, with K being the number of coefficients to be decoded in the first G groups and K' being the number of coefficients to be decoded in the last group.
[0352] It is understood that, in the embodiments of this application, when determining the group step size parameter, the group step size parameter can be obtained by decoding the bitstream; or, the pre-set group step size parameter can be obtained directly.
[0353] It is understood that in the embodiments of this application, if the value of the coefficient identifier information longZero obtained by decoding is the first value, such as 1, then it can be determined that all the coefficients to be decoded in the current group are 0, and it can be considered that there is no need to decode the coefficients to be decoded in the current group.
[0354] For example, in the embodiments of this application, for color attributes, the longZero flag is decoded. If the value of longZero is 1, it means that all coefficients in the current group are 0, so the next group of coefficients to be decoded is continued. If the value of longZero is 0, it means that all coefficients in the current group are not all 0, and the coefficients to be decoded in the current group need to be decoded. Therefore, the bitstream needs to be decoded, the zero run length value (run_length) needs to be determined, and then the current coefficient in the current group is determined based on the zero run length value. Specifically, if run_length > 0, it means that all coefficients of the current color components are 0, so the --run_length operation is performed, and then the coefficients of the next group of all color components are processed. If run_length == 0, it means that at least one dimension of the coefficients of the current color component is not 0, so the coefficients of the current color component are decoded, the zero run length value (run_length) is decoded and updated, and then the coefficients of the next group of all color components are processed.
[0355] For example, in the embodiments of this application, for the reflectivity attribute, the longZero flag is decoded. If the value of longZero is 1, it means that all coefficients in the current group are 0, so the next group of coefficients to be decoded is continued. If the value of longZero is 0, it means that all coefficients in the current group are not all 0, and the coefficients to be decoded in the current group need to be decoded. Therefore, the bitstream needs to be decoded, the zero run length value (run_length) needs to be determined, and then the current coefficient in the current group is determined based on the zero run length value. Specifically, if run_length > 0, it means that the current reflectivity coefficient is 0, so the --run_length operation is performed, and then the coefficient of the next reflectivity is processed. If run_length == 0, it means that the current reflectivity coefficient is not 0, so the coefficient of the current reflectivity is decoded, the zero run length value (run_length) is decoded and updated, and then the coefficient of the next reflectivity is processed.
[0356] The decoding end can use a preset order, which may include the original point cloud acquisition order, Morton order, Hilbert order, transformation order, etc.
[0357] In summary, the encoding and decoding method proposed in this application can group all coefficients based on the indication of the group identification information when encoding and decoding coefficients. At the same time, coefficient identification information, such as a flag bit longZero, is introduced. This flag bit longZero can be used to indicate whether all coefficients in each group are 0. Thus, when all coefficients in a group are 0, only a 1-bit flag bit is needed for indication, which can save some codewords, thereby improving encoding efficiency and compression performance.
[0358] This embodiment provides an encoding and decoding method. When encoding and decoding attribute information, the introduction of coefficient identification information allows multiple coefficients to be grouped. Thus, when all coefficients in a coefficient group are 0, a coefficient identification information can be used to indicate the value of multiple coefficients in that group, greatly saving codewords and improving the encoding and decoding performance of point cloud attributes.
[0359] Based on the above embodiments, in another embodiment of this application, based on the same inventive concept as the foregoing embodiments, Figure 8 The first diagram shows the composition of the encoder. Figure 8 As shown, the encoder 120 may include: a first determining unit 121, a setting unit 122, and an encoding unit 123; wherein,
[0360] The first determining unit 121 is configured to determine a grouping step size parameter; group the plurality of coefficients to be encoded according to the grouping step size parameter to determine at least one group of coefficients to be encoded; if the current coefficient in the current group of the at least one group of coefficients to be encoded is not 0, then determine the coefficient identification information of the current group; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0;
[0361] The encoding unit 123 is configured to write the coefficient identification information into the code stream if the value of the coefficient identification information is the second value.
[0362] The setting unit 122 is configured to set the value of the coefficient identifier information to a first value if the value of the coefficient identifier information is a second value.
[0363] The encoding unit 123 is further configured to encode the current coefficient after writing the zero run-length value into the bitstream;
[0364] The setting unit 122 is further configured to set the zero run value to 0;
[0365] The encoding unit 123 is further configured to encode the current coefficient after writing the zero run value into the bitstream if the value of the coefficient identification information is the first value.
[0366] The setting unit 122 is further configured to set the zero run value to 0;
[0367] The encoding unit 123 is further configured to continue encoding the next coefficient to be encoded in the current group based on the coefficient identification information and the zero run value.
[0368] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.
[0369] If the integrated unit is implemented as a software functional module and not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0370] Therefore, this application provides a computer-readable storage medium applied to an encoder 120, the computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method described in any of the foregoing embodiments.
[0371] Based on the composition of the encoder 120 and the computer-readable storage medium described above, Figure 9 The second schematic diagram shows the composition of the encoder. Figure 9 As shown, encoder 120 may include: a first memory 124 and a first processor 125, a first communication interface 126 and a first bus system 127. The first memory 124, the first processor 125, and the first communication interface 126 are coupled together via the first bus system 127. It is understood that the first bus system 127 is used to implement communication between these components. In addition to a data bus, the first bus system 127 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 9 The general designated all buses as the first bus system 127.
[0372] in,
[0373] The first communication interface 126 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
[0374] The first memory 124 is used to store computer programs that can run on the first processor;
[0375] The first processor 125 is configured to, when running the computer program, determine a grouping step size parameter; group multiple coefficients to be encoded according to the grouping step size parameter to determine at least one group of coefficients to be encoded; if the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, determine the coefficient identification information of the current group; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the value of the coefficient identification information is a second value, then write the coefficient identification information into the bitstream and set the value of the coefficient identification information to a first value; after writing the zero run value into the bitstream, encode the current coefficient and set the zero run value to 0; if the value of the coefficient identification information is a first value, then after writing the zero run value into the bitstream, encode the current coefficient and set the zero run value to 0; continue to encode the next coefficient to be encoded in the current group according to the coefficient identification information and the zero run value.
[0376] It is understood that the first memory 124 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 124 of the system and method described in this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0377] The first processor 125 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the first processor 125 or by instructions in software form. The first processor 125 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the first memory 124. The first processor 125 reads the information in the first memory 124 and completes the steps of the above method in conjunction with its hardware.
[0378] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), DSP devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0379] Alternatively, as another embodiment, the first processor 125 is also configured to perform the method described in any of the foregoing embodiments when running the computer program.
[0380] Figure 10 This is a schematic diagram of the decoder's structural composition, as shown in Figure 1. Figure 10 As shown, the decoder 130 may include: a second determining unit 131; wherein,
[0381] The second determining unit 131 is configured to: determine a grouping step size parameter; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one group of coefficients to be decoded; determine the coefficient identification information of the current group in the at least one group of coefficients to be decoded; wherein the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the identification information of the next group of coefficients to be decoded in the at least one group of coefficients to be decoded is determined.
[0382] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.
[0383] If the integrated unit is implemented as a software functional module and not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0384] Therefore, this application provides a computer-readable storage medium applied to a decoder 130, the computer-readable storage medium storing a computer program that, when executed by a first processor, implements the method described in any of the foregoing embodiments.
[0385] Based on the composition of the decoder 130 and the computer-readable storage medium described above, Figure 11 This is a schematic diagram of the decoder's structural composition, as shown in Figure 2. Figure 11 As shown, the decoder 130 may include: a second memory 132 and a second processor 133, a second communication interface 134, and a second bus system 135. The second memory 132, the second processor 133, and the second communication interface 134 are coupled together via the second bus system 135. It is understood that the second bus system 135 is used to implement communication between these components. In addition to a data bus, the second bus system 135 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 11 The general designated all buses as the second bus system 135.
[0386] in,
[0387] The second communication interface 134 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
[0388] The second memory 132 is used to store computer programs that can run on the second processor;
[0389] The second processor 133 is configured to, when running the computer program, determine a grouping step size parameter; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one group of coefficients to be decoded; determine coefficient identification information of the current group in the at least one group of coefficients to be decoded; wherein the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next group of coefficients to be decoded in the at least one group of coefficients to be decoded is determined.
[0390] It is understood that the second memory 132 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The second memory 132 of the systems and methods described in this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0391] The second processor 133 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the second processor 133 or by instructions in software form. The second processor 133 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the second memory 132. The second processor 133 reads the information in the second memory 132 and completes the steps of the above method in conjunction with its hardware.
[0392] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), DSP devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0393] This application provides an encoder and decoder. When encoding and decoding attribute information, the introduction of coefficient identification information allows multiple coefficients to be grouped. Thus, when all coefficients in a coefficient group are 0, a coefficient identification information can be used to indicate the value of multiple coefficients in that group, greatly saving codewords and improving the encoding and decoding performance of point cloud attributes.
[0394] It should be noted that, in the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0395] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0396] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0397] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0398] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0399] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0400] Industrial applicability
[0401] This application provides an encoding / decoding method, encoder, decoder, and storage medium. At the encoding end, a grouping step size parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be encoded; if the current coefficient in the current group of at least one group of coefficients to be encoded is not 0, then coefficient identification information of the current group is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the value of the coefficient identification information is a second value, then the coefficient identification information is written into the bitstream, and the value of the coefficient identification information is set to a first value; after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; if the value of the coefficient identification information is a first value, then after writing the zero run value into the bitstream, the current coefficient is encoded, and the zero run value is set to 0; the next coefficient to be encoded in the current group is then encoded according to the coefficient identification information and the zero run value. At the decoding end, the grouping step size parameter is determined; multiple coefficients to be decoded are grouped according to the grouping step size parameter to determine at least one group of coefficients to be decoded; coefficient identification information of the current group in the at least one group of coefficients to be decoded is determined; wherein, the coefficient identification information is used to indicate whether all coefficients to be decoded in the current group are 0; if the coefficient identification information indicates that all coefficients to be decoded in the current group are 0, the decoding process of the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next group of coefficients to be decoded in the at least one group of coefficients to be decoded is determined. Therefore, in the embodiments of this application, when encoding and decoding attribute information, the introduction of coefficient identification information allows for grouping multiple coefficients. Thus, when all coefficients in a coefficient group are 0, a single coefficient identification information can be used to indicate the values of multiple coefficients in that group, greatly saving codewords and improving the encoding and decoding performance of point cloud attributes.
Claims
1. A point cloud decoding method applied to a point cloud decoder, the method comprising: determining a grouping step parameter; grouping a plurality of to-be-decoded coefficients according to the grouping step parameter to determine at least one to-be-decoded coefficient group; determining coefficient identification information of a current group in the at least one to-be-decoded coefficient group; wherein the coefficient identification information is used to indicate whether the to-be-decoded coefficients in the current group are all 0; if the coefficient identification information indicates that the to-be-decoded coefficients in the current group are all 0, completing the decoding process of the to-be-decoded coefficients in the current group, and continuing to determine the coefficient identification information of a next to-be-decoded coefficient group in the at least one to-be-decoded coefficient group.
2. The method of claim 1, wherein, The method further comprises: if the coefficient identification information indicates that the to-be-decoded coefficients in the current group are not all 0, decoding a code stream, determining a zero run value, and determining a current coefficient in the current group according to the zero run value.
3. The method of claim 2, wherein, The method further comprises: The current coefficient is a coefficient of all color components of a current point.
4. The method of claim 3, wherein, The method further comprises: if the zero run value indicates that the coefficients of all color components of the current point are all 0, determining a next to-be-decoded coefficient in the current group according to the zero run value after a self-decrement 1 process of the zero run value; if the zero run value indicates that the coefficients of all color components of the current point are not all 0, decoding a code stream, determining the coefficients of all color components of the current point and a new zero run value, and determining a next to-be-decoded coefficient in the current group according to the new zero run value.
5. The method of claim 2, wherein, The method further comprises: The current coefficient is a coefficient of reflectance of a current point.
6. The method of claim 5, wherein, The method further comprises: if the zero run value indicates that the coefficient of reflectance of the current point is 0, determining a next to-be-decoded coefficient in the current group according to the zero run value after a self-decrement 1 process of the zero run value; if the zero run value indicates that the coefficient of reflectance of the current point is not 0, decoding a code stream, determining the coefficient of reflectance of the current point and a new zero run value, and determining a next to-be-decoded coefficient in the current group according to the new zero run value.
7. The method of claim 4 or 6, wherein, The method further comprises: if the zero run value is greater than 0, determining that the zero run value indicates that the current coefficient is 0; if the zero run value is equal to 0, determining that the zero run value indicates that the current coefficient is not 0.
8. The method of claim 1, wherein, The method further comprises: if a value of the coefficient identification information is a first value, determining that the coefficient identification information indicates that the to-be-decoded coefficients in the current group are all 0; if the value of the coefficient identification information is a second value, determining that the coefficient identification information indicates that the to-be-decoded coefficients in the current group are not all 0; wherein the first value and the second value are not equal.
9. The method of any one of claims 1-6, 8, wherein: the to-be-decoded coefficients are quantized residuals of attribute information; or the to-be-decoded coefficients are quantized transform coefficients of attribute information.
10. The method of claim 9, wherein, The method further comprises: decoding a code stream to determine the grouping step parameter; or obtaining the grouping step parameter set in advance.
11. The method of claim 1, wherein, The method further comprises: decoding a code stream to determine grouping identification information. The method further comprises: decoding a code stream to determine the grouping step parameter; or obtaining the grouping step parameter set in advance. The method further comprises: decoding a code stream to determine grouping identification information. If the grouping identification information indicates that the plurality of to-be-decoded coefficients are grouped, the determination of the grouping step parameter is performed.
12. The method of claim 11, wherein, The method further includes: If the grouping identification information indicates that the plurality of to-be-decoded coefficients are not grouped, a bitstream is decoded, a run of zero value is determined, and a current coefficient is determined according to the run of zero value.
13. The method of claim 10, wherein, The method further includes: The grouping step parameter is set as a grouping step, and the plurality of to-be-decoded coefficients are grouped according to the grouping step; or The grouping step parameter is determined according to the grouping step parameter, and the plurality of to-be-decoded coefficients are grouped according to the grouping step.
14. The method of claim 13, wherein, The method further includes: If the grouping step parameter is K, the grouping step is set as K; or if the grouping step parameter is K, then determining the grouping step to be 2 K ; wherein K is an integer greater than or equal to 0. A bitstream is decoded, and grouping identification information is determined. If the grouping identification information indicates that the plurality of to-be-decoded coefficients are grouped, a grouping step parameter is determined.
15. A point cloud encoding method applied to a point cloud encoder, the method comprising: A grouping step parameter is determined. The plurality of to-be-encoded coefficients are grouped according to the grouping step parameter, and at least one to-be-encoded coefficient group is determined. If a current coefficient in a current group in the at least one to-be-encoded coefficient group is not 0, coefficient identification information of the current group is determined; wherein the coefficient identification information is used to indicate whether the to-be-decoded coefficients in the current group are all 0. If a value of the coefficient identification information is a second value, the coefficient identification information is written into a bitstream, and the value of the coefficient identification information is set as a first value; after a run of zero value is written into the bitstream, the current coefficient is encoded, and the run of zero value is set as 0. If the value of the coefficient identification information is the first value, after the run of zero value is written into the bitstream, the current coefficient is encoded, and the run of zero value is set as 0. A next to-be-encoded coefficient in the current group is continuously encoded according to the coefficient identification information and the run of zero value. Wherein, In a case where the value of the coefficient identification information is the first value, the coefficient identification information indicates that the to-be-encoded coefficients in the current group are all 0. In a case where the value of the coefficient identification information is the second value, the coefficient identification information indicates that the to-be-encoded coefficients in the current group are not all 0.
16. The method of claim 15, wherein, The method further includes: If the current coefficient in the current group in the at least one to-be-encoded coefficient group is 0, after a run of zero value is processed by adding 1, a next to-be-encoded coefficient in the current group is continuously encoded.
17. The method of claim 16, wherein, The method further includes: Before the current group is encoded, the value of the coefficient identification information is initialized as the second value, and the run of zero value is initialized as 0.
18. The method of claim 16, wherein, The method further includes: When the current coefficient is the last to-be-encoded coefficient in the current group, if the value of the coefficient identification information is the second value, it is determined that the to-be-encoded coefficients in the current group are all 0, the coefficient identification information is encoded as the first value, and is written into a bitstream; otherwise, the run of zero value is written into the bitstream.
19. The method of claim 16, wherein, The method further includes: When the current coefficient is the last to-be-encoded coefficient of the current group, if the zero run value is the same as the number of points in the current group, it is determined that all to-be-encoded coefficients in the current group are 0, the coefficient identifier information is encoded as a first value, and the first value is written into the bitstream; otherwise, the zero run value is written into the bitstream.
20. The method of claim 15, wherein, The method further includes: determining group identifier information; if the group identifier information indicates that the plurality of to-be-decoded coefficients are grouped, determining the group step parameter.
21. The method of claim 20, wherein, The method further includes: if the group identifier information indicates that the plurality of to-be-decoded coefficients are not grouped, determining whether the current coefficient is 0; if the current coefficient is 0, continuing to encode the next to-be-encoded coefficient in the plurality of to-be-decoded coefficients after performing the self-increment 1 processing on the zero run value; if the current coefficient is not 0, encoding the current coefficient after writing the zero run value into the bitstream, setting the zero run value to 0, and continuing to encode the next to-be-encoded coefficient in the plurality of to-be-decoded coefficients.
22. The method of claim 21, wherein, The method further includes: the current coefficient is a coefficient of all color components of a current point; or the current coefficient is a coefficient of reflectivity of a current point.
23. The method of claim 16, wherein, The method further includes: if the zero run value is greater than 0, it is determined that the zero run value indicates that the current coefficient is 0; if the zero run value is equal to 0, it is determined that the zero run value indicates that the current coefficient is not 0.
24. The method of any one of claims 15-23, wherein the to-be-encoded coefficient is a quantized residual of attribute information; or the to-be-encoded coefficient is a quantized transform coefficient of attribute information.
25. The method of any one of claims 15-23, wherein the group step parameter is written into the bitstream.
26. The method of claim 25, wherein, The method further includes: the group step parameter is set to a group step, and the plurality of to-be-encoded coefficients are grouped according to the group step; or a group step is determined according to the group step parameter, and the plurality of to-be-encoded coefficients are grouped according to the group step.
27. The method of claim 26, wherein, The method further includes: if the group step parameter is K, the group step is set to K; or if the grouping step parameter is K, then determining the grouping step to be 2 K ; wherein K is an integer greater than or equal to 0.
28. A point cloud encoder, comprising a first determining unit, a setting unit and an encoding unit; wherein the first determining unit is configured to determine a group step parameter, group a plurality of to-be-encoded coefficients according to the group step parameter, and determine at least one to-be-encoded coefficient group; if a current coefficient in a current group in the at least one to-be-encoded coefficient group is not 0, determine coefficient identifier information of the current group; wherein the coefficient identifier information is used to indicate whether all to-be-decoded coefficients in the current group are 0; the encoding unit is configured to write the coefficient identifier information into the bitstream if the value of the coefficient identifier information is a second value; the setting unit is configured to set the value of the coefficient identifier information to a first value if the value of the coefficient identifier information is the second value; the encoding unit is further configured to encode the current coefficient after writing a zero run value into the bitstream. The setting unit is further configured to set the zero run value as 0. The encoding unit is further configured to, if the value of the coefficient identifier information is the first value, encode the current coefficient after the zero run value is written into the bitstream. The setting unit is further configured to set the zero run value as 0. The encoding unit is further configured to continue to encode a next to-be-encoded coefficient in the current group according to the coefficient identifier information and the zero run value. In a case where the value of the coefficient identifier information is the first value, the coefficient identifier information indicates that all the to-be-encoded coefficients in the current group are 0. In a case where the value of the coefficient identifier information is the second value, the coefficient identifier information indicates that not all the to-be-encoded coefficients in the current group are 0. 29.A point cloud encoder, comprising a first memory and a first processor; wherein, the first memory is configured to store a computer program capable of running on the first processor; the first processor is configured to execute the method according to any one of claims 15 to 27 when running the computer program. 30.A point cloud decoder, comprising a second determining unit; wherein, the second determining unit is configured to determine a grouping step parameter; group a plurality of to-be-decoded coefficients according to the grouping step parameter to determine at least one to-be-decoded coefficient group; determine coefficient identifier information of a current group in the at least one to-be-decoded coefficient group; wherein, the coefficient identifier information is used to indicate whether all the to-be-decoded coefficients in the current group are 0; if the coefficient identifier information indicates that all the to-be-decoded coefficients in the current group are 0, the decoding process of the to-be-decoded coefficients in the current group is completed, and the identifier information of a next to-be-decoded coefficient group in the at least one to-be-decoded coefficient group is determined. 31.A point cloud decoder, comprising a second memory and a second processor; wherein, the second memory is configured to store a computer program capable of running on the second processor; the second processor is configured to execute the method according to any one of claims 1 to 14 when running the computer program. The computer readable storage medium stores a computer program, and the computer program is executed to implement the method according to any one of claims 1 to 14, or implement the method according to any one of claims 15 to 27.
32. A computer readable storage medium, wherein, The method for encoding the point cloud according to any one of claims 15 to 27 is executed to generate a bitstream; and the bitstream is transmitted.
33. A method of transmitting a bitstream, the method comprising: The computer readable storage medium stores a computer program, and the computer program is executed to implement the method according to any one of claims 1 to 14, or implement the method according to any one of claims 15 to 27. The method for encoding the point cloud according to any one of claims 15 to 27 is executed to generate a bitstream; and the bitstream is transmitted.
Citation Information
Patent Citations
Coefficient encoding method, coefficient decoding method, electronic equipment and medium
CN110545437A
Encoding method, decoding method, corresponding device, electronic equipment and storage medium
CN112449186A