Encoding and decoding method, code stream, encoder, decoder and storage medium

CN121866770APending Publication Date: 2026-04-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

The existing codec method for encoding and decoding point cloud attribute information is only applicable to the situation where there is only one set of attribute data for each attribute type, and it is impossible to effectively deal with the situation where there are multiple attribute types and each attribute type has multiple sets of attribute data.

Method used

A codec is provided, which determines the value of the syntax element of the current attribute type by decoding the attribute header information. If there is attribute encoding, the attribute header information is decoded to determine the number of supported attribute data sets and grouping parameters, and then grouping the attribute data sets.

Benefits of technology

This method optimizes the codec of point cloud attribute header information, which is suitable for single-attribute data sets and multi-attribute data sets, and improves the efficiency of attribute codec.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121866770A_ABST
    Figure CN121866770A_ABST
Patent Text Reader

Abstract

The invention discloses a coding and decoding method, a code stream, a coder, a decoder and a storage medium. Attribute header information is decoded, and a value of a first syntax element of a current attribute type is determined; if it is determined that the attribute code of the current attribute type exists in the code stream according to the value of the first syntax element, decoding the value of a second syntax element of the current attribute type; if the first number is greater than 1, decoding the attribute header information according to the first number, and determining a grouping parameter of each attribute data set of the current attribute type; and decoding the attribute data sets of the current attribute type in groups according to the grouping parameters of each attribute data set of the current attribute type. Therefore, the encoding and decoding scheme of the point cloud attribute header information is optimized so as to be suitable for encoding and decoding of a single-attribute data set and encoding and decoding of a multi-attribute data set, and the attribute encoding and decoding efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

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

[0001] The embodiments of the present application relate to the field of point cloud data processing technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art

[0002] Currently, point cloud encoding and decoding frameworks include the Geometry-based Point Cloud Compression (G-PCC) encoding and decoding framework, the Audio Video Standard (AVS) encoder framework, and the Low Latency, Low Complexity Coding (Low Latency, Low Complexity Coding) framework. Point cloud compression generally compresses point cloud geometry and attribute information separately. On the encoding side, the point cloud geometry is first encoded in the geometry encoder, and then the reconstructed geometry is input as additional information into the attribute encoder to assist in the compression of point cloud attributes. On the decoding side, the point cloud geometry is first decoded in the geometry decoder, and then the decoded geometry is input as additional information into the attribute decoder to assist in the compression of point cloud attributes.

[0003] The attribute information of a point cloud includes three-dimensional color information (r, g, b) and one-dimensional reflectance information (r). Each attribute type can correspond to one or more sets of attribute data. However, the existing attribute information encoding and decoding methods are only applicable to the case where there is only one set of attribute data for each attribute type. They are not fully applicable to the case where there are multiple attribute types and each attribute type has multiple sets of attribute data. Therefore, the attribute information encoding and decoding methods need to be improved urgently.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a coding and decoding method, code stream, encoder, decoder and storage medium, which optimize the coding and decoding scheme of point cloud attribute header information to be suitable for the coding and decoding of single-attribute data sets, as well as the coding and decoding of multi-attribute data sets, thereby improving the efficiency of attribute coding and decoding.

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

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

[0008] Decode the attribute header information to determine the value of a first syntax element of the current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream;

[0009] If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, decoding the attribute header information to determine the value of the second syntax element of the current attribute type;

[0010] Determining, according to a value of the second syntax element, a first number of attribute data sets supported by a current attribute type in the codestream;

[0011] If the first number is greater than 1, decoding the attribute header information according to the first number to determine the grouping parameter of each attribute data set of the current attribute type;

[0012] The attribute data sets of the current attribute type are decoded in groups according to the grouping parameters of each attribute data set of the current attribute type.

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

[0014] Determine a value of a first syntax element of a current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream;

[0015] If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, determining the value of the second syntax element of the current attribute type;

[0016] Determining, according to a value of the second syntax element, a first number of attribute data sets supported by a current attribute type in the codestream;

[0017] If the first number is greater than 1, determining the grouping parameter of each attribute data set of the current attribute type according to the first number;

[0018] Adding the value of the first syntax element, the value of the second syntax element, and the grouping parameter of each attribute data set corresponding to the current attribute type to the attribute header information;

[0019] The attribute header information is encoded, and the obtained encoded bits are written into a bitstream.

[0020] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following: a first syntax element, a second syntax element, a third syntax element, a fourth syntax element, a grouping parameter of an attribute data set, a cross-attribute prediction parameter, and attribute information; wherein the first syntax element indicates whether attribute encoding of the current attribute type exists in the code stream, the second syntax element indicates a first number of attribute data sets supported by the current attribute type, the third syntax element indicates a second number of attribute information supported by the current attribute type, and the fourth syntax element indicates whether support for using multiple sets of attribute information for the current attribute type is enabled.

[0021] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first determining unit and an encoding unit; wherein,

[0022] The first determining unit is configured to determine a value of a first syntax element of the current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream;

[0023] The first determining unit is further configured to, if it is determined based on the value of the first syntax element that the attribute code of the current attribute type exists in the codestream, determine a value of a second syntax element of the current attribute type; and determine a first number of attribute data sets supported by the current attribute type in the codestream based on the value of the second syntax element;

[0024] The first determining unit is further configured to determine a grouping parameter of each attribute data set of the current attribute type according to the first number if the first number is greater than 1;

[0025] The encoding unit is configured to add the value of the first syntax element, the value of the second syntax element, and the grouping parameter of each attribute data set corresponding to the current attribute type to the attribute header information; encode the attribute header information, and write the obtained encoded bits into the bitstream.

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

[0027] a first memory for storing a computer program capable of running on the first processor;

[0028] The first processor is configured to execute the method according to the first aspect when running a computer program.

[0029] In a sixth aspect, an embodiment of the present application provides a decoder, comprising a decoding unit and a second determining unit; wherein,

[0030] The decoding unit is configured to decode the attribute header information and determine the value of a first syntax element of the current attribute type; wherein the first syntax element indicates whether the attribute code of the current attribute type exists in the bitstream;

[0031] The decoding unit is further configured to, if it is determined based on the value of the first syntax element that the attribute encoding of the current attribute type exists in the codestream, decode the attribute header information to determine the value of a second syntax element of the current attribute type; and determine, based on the value of the second syntax element, a first number of attribute data sets supported by the current attribute type in the codestream;

[0032] The decoding unit is further configured to, if the first number is greater than 1, decode the attribute header information according to the first number to determine a grouping parameter of each attribute data set of the current attribute type;

[0033] The second determining unit is configured to group and decode the attribute data sets of the current attribute type according to the grouping parameter of each attribute data set of the current attribute type.

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

[0035] a second memory for storing a computer program capable of running on the second processor;

[0036] The second processor is configured to execute the method according to the second aspect when running a computer program.

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

[0038] The embodiments of the present application provide a coding and decoding method, bitstream, encoder, decoder, and storage medium. These methods decode attribute header information to determine the value of the first syntax element of the current attribute type. If the value of the first syntax element indicates that the attribute encoding of the current attribute type exists in the bitstream, the value of the second syntax element of the current attribute type is decoded. If the first number is greater than 1, the attribute header information is decoded based on the first number to determine the grouping parameters of each attribute data set of the current attribute type. The attribute data sets of the current attribute type are grouped and decoded based on the grouping parameters of each attribute data set of the current attribute type. In this way, the coding and decoding scheme for point cloud attribute header information is optimized to be applicable to the coding and decoding of single-attribute data sets as well as the coding and decoding of multi-attribute data sets, thereby improving the efficiency of attribute coding and decoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] FIG1A is a schematic diagram of a three-dimensional point cloud image;

[0040] FIG1B is a partially enlarged schematic diagram of a three-dimensional point cloud image;

[0041] FIG2A is a schematic diagram of a point cloud image at different viewing angles;

[0042] FIG2B is a schematic diagram of a data storage format corresponding to FIG2A ;

[0043] FIG3 is a schematic diagram of a network architecture for point cloud encoding and decoding;

[0044] FIG4A is a schematic diagram of a coding block diagram of PCRM;

[0045] FIG4B is a schematic diagram of a decoding block diagram of PCRM;

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

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

[0048] FIG7 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0049] FIG8 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

[0050] FIG9 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;

[0051] FIG10 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;

[0052] FIG11 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION

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

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

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

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

[0057] Point cloud is a three-dimensional representation of the surface of an object. Point cloud (data) of the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.

[0058] A point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or scene. Figure 1A shows a three-dimensional point cloud image and Figure 1B shows a partially enlarged view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.

[0059] In a two-dimensional image, each pixel contains information and is distributed regularly, so there's no need to record its location. However, the distribution of points in a point cloud in three-dimensional space is random and irregular, so recording the location of each point in space is necessary to fully represent the point cloud. Similar to a two-dimensional image, each location in the acquisition process has corresponding attribute information, typically an RGB color value, which reflects the object's color. For a point cloud, in addition to color information, each point's attribute information often includes a reflectance value, which reflects the surface texture of the object. Therefore, a point in a point cloud can include both location information and attribute information. For example, the location information of a point can be its three-dimensional coordinates (x, y, z). The location information of a point can also be referred to as its geometric information. For example, the attribute information of a point can include color information (three-dimensional color information) and / or reflectance (one-dimensional reflectance information r). For example, the color information can be information in any color space. For example, the color information can be RGB information, where R represents red (R), G represents green (G), and B represents blue (B). For another example, color information can be luminance and chrominance (YCbCr, YUV) information. Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference. Color information is generally represented by a first color component, a second color component, and a third color component. These three color components are a luminance component, a blue chrominance component, and a red chrominance component, respectively. For example, when a video image is represented in YCbCr or YUV format, the luminance component is typically represented by the symbol Y, the blue chrominance component is typically represented by the symbols Cb or U, and the red chrominance component is typically represented by the symbols Cr or V.

[0060] For example, a point cloud generated using laser measurement principles can include both its 3D coordinate information and its reflectivity. For another example, a point cloud generated using photogrammetry principles can include both its 3D coordinate information and its 3D color information. For another example, a point cloud generated using a combination of laser measurement and photogrammetry principles can include both its 3D coordinate information, its reflectivity value, and its 3D color information.

[0061] Figures 2A and 2B show a point cloud image and its corresponding data storage format. Figure 2A provides six viewing angles of the point cloud image, while Figure 2B consists of a file header and data. The header includes the data format, data representation type, the 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 207,242 points. Each point has 3D coordinate information (x, y, z) and 3D color information (r, g, b).

[0062] Point clouds can be divided into the following categories according to the acquisition method:

[0063] Static point cloud: the object is stationary and the device that acquires the point cloud is also stationary;

[0064] Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;

[0065] Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.

[0066] For example, point clouds can be divided into two categories according to their usage:

[0067] Category 1: Machine perception 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;

[0068] Category 2: Human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.

[0069] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Moreover, since point clouds are obtained by directly sampling real objects, they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.

[0070] Point clouds are primarily collected through computer generation, 3D laser scanning, and 3D photogrammetry. Computers can generate point clouds of virtual 3D objects and scenes; 3D laser scanning can obtain point clouds of static real-world 3D objects or scenes, generating millions of point clouds per second; and 3D photogrammetry can obtain point clouds of dynamic real-world 3D objects or scenes, generating tens of millions of point clouds per second. These technologies reduce the cost and time required to acquire point cloud data while improving data accuracy. While changes in point cloud data acquisition methods have made it possible to acquire large amounts of point cloud data, the processing of this massive amount of 3D point cloud data is facing bottlenecks due to storage space and transmission bandwidth constraints, as application demands grow.

[0071] For example, taking a point cloud video with a frame rate of 30 frames per second (fps), each frame contains 700,000 points, and each point has coordinate information (xyz, float) and color information (RGB, uchar). The data volume of a 10-second point cloud video is approximately 0.7 million × (4 bytes × 3 + 1 byte × 3) × 30 fps × 10 seconds = 3.15 GB. Where 1 byte is 10 bits, and the YUV sampling format is 4:2:0, and the frame rate is 24 fps, the data volume of a 1280 × 720 2D video is approximately 1280 × 720 × 12 bits × 24 fps × 10 seconds ≈ 0.33 GB. The data volume of a 10-second two-view 3D video is approximately 0.33 × 2 = 0.66 GB. This shows that the data volume of a point cloud video far exceeds that of a 2D or 3D video of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.

[0072] That is to say, since the point cloud is a collection of massive points, storing the point cloud not only consumes a lot of memory, but is also not conducive to transmission. There is also not enough bandwidth to support direct transmission of the point cloud at the network layer without compression. Therefore, the point cloud needs to be compressed.

[0073] Point cloud compression generally compresses point cloud geometry and attribute information separately. On the encoding side, the point cloud geometry is first encoded in the geometry encoder, and the reconstructed geometry is then fed into the attribute encoder as additional information to aid in the compression of the point cloud attributes. On the decoding side, the point cloud geometry is first decoded in the geometry decoder, and the decoded geometry is then fed into the attribute decoder as additional information to aid in the reconstruction of the point cloud attributes. The entire codec consists of pre-processing / post-processing, geometry encoding / decoding, and attribute encoding / decoding.

[0074] Currently, the point cloud coding framework that can compress point clouds can be the geometry-based Point Cloud Compression (G-PCC) codec framework or the video-based Point Cloud Compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC codec framework provided by AVS. The G-PCC codec framework can be used to compress the first type of static point clouds and the third type of dynamically acquired point clouds, which can be based on the Point Cloud Compression Test Platform (Test Model Compression 13, TMC13). The V-PCC codec framework can be used to compress the second type of dynamic point clouds, which can be based on the Point Cloud Compression Test Platform (Test Model Compression 2, TMC2). Therefore, the G-PCC codec framework is also called the point cloud codec TMC13, and the V-PCC codec framework is also called the point cloud codec TMC2.

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

[0076] Among them, the electronic device in the embodiment of the present application has a point cloud encoding and decoding function, generally including a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).

[0077] The following describes the related technologies using the AVS codec framework as an example.

[0078] It can be understood that in the point cloud AVS codec framework, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately. Specifically, in the codec framework of the Point Cloud Reference Model (PCRM) provided by the AVS Point Cloud Compression Task Force, Figure 4A shows a PCRM encoding framework, and Figure 4B shows a PCRM decoding framework.

[0079] For the coding framework of PCRM, in the geometric coding part of the encoding end, the original geometric information is first preprocessed, the geometric origin is normalized to the minimum position in the point cloud space through coordinate translation, and the geometric information is converted from floating point numbers to integers through coordinate quantization to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and 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 of each sub-block is judged. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty. The occupancy codeword information of all blocks is recorded in the last layer of the recursive division and encoded; the geometric information expressed by the octree structure is input into the geometric entropy encoder to form a geometric code stream, and on the other hand, geometric reconstruction is performed in the encoder. The reconstructed geometric information is input into the attribute encoder as additional information. In the attribute encoding phase, the original attribute information is first preprocessed. Since geometric information changes after geometric encoding, attribute values ​​must be reassigned to each geometrically encoded point. This process is called attribute recoloring. Furthermore, if the attribute information being processed is color information, the original color space must be transformed into a YUV color space that better reflects human visual characteristics. Attribute encoding then proceeds to attribute encoding. Attribute encoding begins by reordering the point cloud using Morton code, resulting in a Morton-order traversal sequence. The attribute prediction method in PCRM is single-point prediction based on the Morton order. This involves backtracking one point from the current point to be encoded, using the Morton order as the prediction reference point. The attribute reconstructed value of the predicted reference point is then used as the attribute prediction value. The attribute residual is the difference between the attribute value of the current point to be encoded and the attribute prediction value. Finally, the residual is quantized and fed into the attribute entropy encoder to form the attribute bitstream. Attribute encoding primarily targets color and reflectance information. Before encoding attributes, you can first determine whether to perform color space conversion. If color space conversion is performed, the color information is converted from RGB color space to YUV color space. If color space conversion is not performed, the color components of the RGB color space are directly encoded.

[0080] At the decoding end, the same method of decoding geometry and attributes separately is adopted. In the geometry decoding part, the geometry bitstream is first entropy decoded, and then the octree structure is constructed in the same way as the geometry encoding. The geometric information expressed by the octree structure after coordinate transformation is reconstructed in combination with the decoded geometry. On the one hand, the coordinates of this information are dequantized and detranslated to obtain decoded geometry information. On the other hand, it is input into the attribute decoder as additional information (which can be information after or before coordinate dequantization) for attribute prediction. In the attribute decoding part, the Morton order is constructed in the same way as the encoding end. The attribute bitstream is first entropy decoded to obtain the quantized residual information; then dequantization is performed to obtain the point cloud residual information; similarly, the attribute prediction value of the current point to be decoded is obtained in the same way as the attribute encoding, and then the attribute prediction value is added to the residual value to restore the YUV attribute value of the current point to be decoded; finally, the decoded attribute information is obtained through inverse color space transformation.

[0081] It can also be understood that for the AVS codec framework, the general test conditions are as follows:

[0082] (1) There are 4 test conditions:

[0083] Condition 1: The geometric position is limited and the attributes are lost;

[0084] Condition 2: Geometric position lossless, attribute lossy;

[0085] Condition 3: Geometric position lossless, attribute loss limited;

[0086] Condition 4: Geometric position and attributes are lossless.

[0087] (2) The general test sequence includes five categories: Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3. Among them, Cat1A and Cat2-frame point clouds only contain reflectance attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1C point cloud contains both color and reflectance attribute information.

[0088] (3) Technical routes: There are two types, which are distinguished by the algorithm used for attribute compression.

[0089] Technical route 1: Prediction branch, attribute compression adopts an intra-frame prediction-based method.

[0090] At the encoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc.). First, the prediction algorithm is used to obtain the attribute prediction value. The attribute residual is obtained based on the attribute value and the attribute prediction value. Then, the attribute residual is quantized to generate the quantized residual. Finally, the quantized residual is encoded.

[0091] At the decoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.). First, the prediction algorithm is used to obtain the attribute prediction value, then the decoding is performed to obtain the quantized residual, and then the quantized residual is dequantized. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized residual.

[0092] Technical Route 2: Prediction Transform Branch—Resources are limited. Attribute compression uses a method based on intra-frame prediction and discrete cosine transform (DCT). When encoding quantized transform coefficients, there is a maximum point number X (e.g., 4096), meaning that at most X points can be encoded as a group.

[0093] At the encoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of Y (such as 2). These small groups are then combined into several large groups (the number of points in each large group does not exceed X, such as 4096). Then, a prediction algorithm is used to obtain attribute prediction values. Based on the attribute values ​​and attribute prediction values, attribute residuals are obtained. The attribute residuals are transformed by DCT in small groups to generate transform coefficients. The transform coefficients are then quantized to generate quantized transform coefficients. Finally, the quantized transform coefficients are encoded in large groups.

[0094] At the decoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of Y (such as 2). Then these small groups are combined into several large groups (the number of points in each large group does not exceed X, such as 4096). The quantized transform coefficients are decoded in large groups, and then the prediction algorithm is used to obtain the attribute prediction value. The quantized transform coefficients are then dequantized and inversely transformed in small groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.

[0095] Technical Route 3: Prediction Transform Branch - Resources are not limited. Attribute compression uses a method based on intra-frame prediction and DCT transformation. When encoding the quantized transform coefficients, there is no limit on the maximum number of points X, that is, all coefficients are encoded together.

[0096] At the encoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of Y (such as 2). Then, a prediction algorithm is used to obtain attribute prediction values. Based on the attribute values ​​and attribute prediction values, attribute residuals are obtained. The attribute residuals are transformed by DCT in groups to generate transformation coefficients. The transformation coefficients are then quantized to generate quantized transformation coefficients. Finally, the quantized transformation coefficients of the entire point cloud are encoded.

[0097] At the decoding end, the points in the point cloud are processed in a certain order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.). First, the entire point cloud is divided into several small groups with a maximum length of Y (such as 2). The quantized transformation coefficients of the entire point cloud are obtained by decoding, and then the prediction algorithm is used to obtain the attribute prediction value. The quantized transformation coefficients are then dequantized and inversely transformed in groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.

[0098] Technical route 4: Multi-layer transformation branch, attribute compression adopts a method based on multi-layer wavelet transform.

[0099] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0100] In one embodiment of the present application, referring to FIG5 , a first flow chart of a decoding method provided by the embodiment of the present application is shown. As shown in FIG5 , the method may include:

[0101] S501: Decode the attribute header information to determine the value of the first syntax element of the current attribute type; wherein the first syntax element indicates whether the attribute code of the current attribute type exists in the bitstream;

[0102] It should be noted that the decoding method of the embodiment of the present application can be a point cloud attribute decoding method, specifically a method for decoding attribute header information. The point cloud sequence is the highest-level grammatical structure of the point cloud code stream. The point cloud sequence starts with sequence header information (referred to as sequence header), followed by one or more point cloud frames. Each point cloud frame can be preceded by geometric header information (referred to as geometric header), attribute header information (referred to as attribute header) and one or more point cloud slice data. The point cloud slice data (slice) here consists of a geometric slice header, geometric information, an attribute slice header and attribute information. In the embodiment of the present application, the attribute header information can be the attribute header information of the point cloud frame, or it can be the attribute header information of the point cloud slice.

[0103] It should be noted that the attribute types of the point cloud include color attributes and reflectivity attributes, and may also include normal vector attributes, material attributes, and the like. In some embodiments, different attribute types are indicated by different values ​​of the attribute index (attrIdx), and the current attribute type may be the attribute type indicated by the current attribute index. In an embodiment of the present application, the first syntax element of different attribute types can be distinguished by the attribute index, which is used to indicate whether the attribute encoding of the attribute type corresponding to the current attribute index exists in the code stream. Exemplarily, the first syntax element may be defined as attributePresentFlag[attrIdx]. The first syntax element may be a syntax element at the sequence level, the frame level, the coding tree unit, or the like.

[0104] In some embodiments, decoding the attribute header information and determining the value of the first syntax element of the current attribute type includes: decoding the attribute header information and determining whether the first syntax element exists in the attribute header information; if the first syntax element exists in the attribute header information, obtaining the value of the first syntax element from the attribute header information; if the first syntax element does not exist in the attribute header information, determining the value of the first syntax element to be a first value. In other words, when the first syntax element exists in the attribute header information, decoding the attribute header information to determine the value of the first syntax element; when the first syntax element does not exist in the attribute header information, determining the value of the first syntax element to be a default first value. Adding a description of the default value for the first syntax element not only saves coding bits but also facilitates subsequent decoding of the attribute data set.

[0105] In some embodiments, the method further includes: the value of the first syntax element is a first numerical value, determining that the attribute code of the current attribute type does not exist in the codestream; the value of the first syntax element is a second numerical value, determining that the attribute code of the current attribute type exists in the codestream. Exemplarily, the first numerical value can be 0 and the second numerical value can be 1. That is, the first syntax element is a binary variable. A value of '1' indicates that the current codestream contains the attrIdx attribute code; a value of '0' indicates that the current codestream does not contain the attrIdx attribute code, and its default value is 0. The value range of attrIdx is [0,15], and its meaning is as follows.

[0106] S502: If it is determined based on the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, decode the attribute header information and determine the value of the second syntax element of the current attribute type;

[0107] It should be noted that the second syntax element of different attribute types can be distinguished by the attribute index. The second syntax element indicates the first number of attribute data sets supported by the current attribute type in the code stream. The first number indicates the number of one or more attribute data sets supported by each attribute type. Furthermore, for one attribute data set, attribute data of the corresponding number of points needs to be decoded. For example, assuming that the point cloud data contains multiple attribute data sets of multiple attribute types, for example, color attribute data set 1, color attribute data set 2, color attribute data set 3 and reflectance attribute data set 1, reflectance attribute data set 2, if the reflectance attribute data set 2 is currently being predicted, the reflectance attribute data set 1 of the same attribute can be referenced for data prediction, or one or more of the cross-attribute color attribute data set 1, color attribute data set 2, and color attribute data set 3 can be referenced, or both a certain color attribute data set and a reflectance attribute data set 1 may be referenced. It can be seen from this that the prediction reference relationship between different attribute data sets may be different.

[0108] In some embodiments, decoding the attribute header information and determining the value of the second syntax element of the current attribute type includes: decoding the attribute header information and determining whether the second syntax element exists in the attribute header information; if the second syntax element exists in the attribute header information, obtaining the value of the second syntax element from the attribute header information; if the second syntax element does not exist in the attribute header information, determining the value of the second syntax element as a default value. In other words, when the second syntax element exists in the attribute header information, decoding the attribute header information and determining the value of the second syntax element; when the second syntax element does not exist in the attribute header information, determining the value of the second syntax element as a default value. Adding a description of the default value for the second syntax element not only saves coding bits but also facilitates subsequent decoding of the attribute data set.

[0109] S503: Determine a first number of attribute data sets supported by the current attribute type in the bitstream according to the value of the second syntax element;

[0110] In some embodiments, the first number of attribute data sets of the current attribute type is determined based on the value of the second syntax element; or, a reference value of the first number is determined based on the value of the second syntax element; and the first number is determined based on the reference value of the first number.

[0111] It should be noted that when encoding the reference value of the first number can save coding bits and improve coding efficiency compared to directly encoding the original value of the first number, the reference value of the first number can be encoded, and the original value of the first number can be obtained by performing a certain mathematical operation based on the reference value. Exemplarily, the reference value of the first number can be the first number minus 1. When the second syntax element does not exist in the attribute header information, its default value can be -1.

[0112] In the embodiment of the present application, the second syntax elements of different attribute types can be distinguished by attribute index. For example, the second syntax element can be defined as attribute_data_num_set_minus1[attrIdx], and the second syntax element can be a syntax element at the sequence level, frame level, coding tree unit, etc.

[0113] S504: If the first number is greater than 1, decode the attribute header information according to the first number to determine the grouping parameters of each attribute data set of the current attribute type;

[0114] It should be noted that, since the first number represents the number of one or more attribute data sets supported by each attribute type, when the first number is greater than 1, the decoding grouping parameters are controlled by the first number to ensure that the grouping parameters of all attribute data sets are obtained, and group decoding is performed according to the grouping parameters, which can improve the decoding efficiency of the attribute data.

[0115] In some embodiments, the method further includes: if the current attribute type is the first attribute type and the first number is greater than 1, decoding the attribute header information according to the first number to determine the grouping parameter of each attribute data set of the current attribute type.

[0116] It should be noted that the first attribute type may be any attribute type with a number of attribute data sets greater than 1. In some embodiments, the first attribute type may be a reflectivity attribute. In other embodiments, the first attribute type may also be a color attribute.

[0117] In some embodiments, decoding the attribute header information based on the first number to determine the grouping parameter of each attribute data set of the current attribute type includes: initializing a first index parameter of the attribute data set; decoding the attribute header information based on the first index parameter to determine the grouping parameter of the attribute data set corresponding to the first index parameter; if the first index parameter is less than the first number, updating the first index parameter to decode the grouping parameter of the next attribute data set; and if the first index parameter is equal to the first number, determining that decoding of the grouping parameters of all attribute data sets of the current attribute type has ended. In some embodiments, the grouping parameter of the current attribute data set is greater than or equal to the grouping parameter of the previous attribute data set, and the grouping parameter of the current attribute data set is less than or equal to the first index parameter of the current attribute data set.

[0118] It should be noted that the first number is used to control the grouping parameters for decoding each attribute data set. In some embodiments, different attribute data sets are indicated by a first index parameter, and the first index parameter is initialized. The first number can serve as the upper limit of the first index parameter. The current attribute data set can be the data set indicated by the current first index parameter, and the grouping parameters of each attribute data set are obtained by the first index parameter. Exemplarily, the definitions of the relevant syntax elements are as follows:

[0119] When the condition "the attribute type corresponding to the index attrIdx is reflectivity (attrIdx==1), and the number of attribute data corresponding to the attribute of the index attrIdx minus one is greater than 0 (attribute_data_num_set_minus1[attrIdx]>0)" is met, the multi-attribute grouping parameter multi_attr_group_id[i] corresponding to each group of data sets of the index attrIdx is passed / parsed in turn, where i is the first index parameter to indicate different attribute data sets.

[0120] In some embodiments, the method further includes: not decoding the grouping parameter of the attribute data set if the first number is greater than 1. That is, when the current attribute type contains only one attribute data set, there is no need to perform group decoding on it.

[0121] S505: Decode the attribute data sets of the current attribute type in groups according to the grouping parameters of each attribute data set of the current attribute type.

[0122] It should be noted that the grouping parameter is used to group multi-attribute data sets, and attribute data sets with the same grouping parameter are divided into the same group. Attributes in the same group need to be decoded as group. It should be noted that in some embodiments, each attribute data set in the same group corresponds to the same attribute information.

[0123] In some embodiments, grouping and decoding the attribute data sets of the current attribute type based on the grouping parameter of each attribute data set of the current attribute type includes: grouping the attribute data sets with the same grouping parameter into an attribute data set group; determining the number of attribute data sets within the attribute data set group; and decoding the attribute data sets within the attribute data set group based on the number of attribute data sets within the attribute data set group. In other words, the number of attribute data sets within the attribute data set group is determined by sequentially accumulating the number of attribute data sets with the same grouping parameter, which is then used for subsequent decoding of the attribute data sets.

[0124] In some embodiments, the method further includes: determining whether the current attribute type satisfies a cross-attribute prediction condition based on the value of the first syntax element and the value of the second syntax element; if the cross-attribute prediction condition is satisfied, decoding the attribute header information to determine a cross-attribute prediction parameter for the current attribute type; and decoding an attribute data set for the current attribute type based on the cross-attribute prediction parameter. In some embodiments, if the cross-attribute prediction condition is not satisfied, not decoding the cross-attribute prediction parameter.

[0125] In some embodiments, the cross-attribute prediction condition includes: determining, based on the value of the first syntax element, whether attribute coding of the first attribute type and attribute coding of the second attribute type exist in the code stream; and / or, based on the value of the second syntax element, determining that the first number of the first attribute type is the second numerical value, and the first number of the second attribute type is the third numerical value; wherein the second numerical value and the third numerical value are both greater than 0. It should be noted that, that is, the simultaneous presence of attribute coding of the first attribute type and attribute coding of the second attribute type in the code stream is a basic condition for cross-attribute prediction. In some embodiments, the cross-attribute prediction condition can be further limited by limiting the number of each attribute data set. In some embodiments, the second numerical value can be 1, and the third numerical value can be 1.

[0126] In some embodiments, decoding the attribute header information to determine the cross-attribute prediction parameters of the current attribute type includes: decoding the attribute header information to determine the first cross-attribute prediction parameter; wherein the first cross-attribute prediction parameter is used to indicate whether cross-attribute prediction is allowed; if it is determined according to the first cross-attribute prediction parameter that cross-attribute prediction is allowed, decoding the attribute header information to determine other cross-attribute prediction parameters. If it is determined according to the first cross-attribute prediction parameter that cross-attribute prediction is allowed, the first cross-attribute prediction parameter is added to the attribute header information. It should be noted that other cross-attribute prediction parameters include one or more parameters when performing cross-attribute prediction. Exemplarily, the definitions of the relevant syntax elements are as follows:

[0127] Cross-attribute prediction flag crossAttrTypePred

[0128] Binary variable. A value of '1' indicates that cross-attribute prediction is allowed; a value of '0' indicates that cross-attribute prediction is not allowed. If the current point cloud only has one set of color and one set of reflectance attributes, the cross-attribute prediction tool can be used.

[0129] Attribute encoding order attrEncodeOrder

[0130] Binary variable. Used to control the order in which attributes are encoded when the point cloud contains multiple attribute types. A value of '0' means encoding color first, then reflectance; a value of '1' means encoding reflectance first, then color.

[0131] Cross-type attribute prediction weight parameter 1crossAttrTypePredParam1

[0132] 15-bit unsigned integer. Used to control the weight parameter 1 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0133] Cross-type attribute prediction weight parameter 2crossAttrTypePredParam2

[0134] 21-bit unsigned integer. Used to control the weight parameter 2 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0135] In some embodiments, the method further includes: if it is determined based on the value of the first syntax element that attribute encoding of the current attribute type exists in the bitstream, decoding the attribute header information and determining the value of a third syntax element; determining a second number of attribute information supported by the current attribute type based on the value of the third syntax element; and decoding the attribute header information based on the second number to determine at least one set of attribute information supported by the current attribute type. It should be noted that the attribute information includes a set of encoding parameters used to decode the attribute data set. In some embodiments, the attribute information includes at least one of the following: attribute transform parameters, attribute quantization parameters, and attribute prediction parameters.

[0136] It should be noted that the third syntax element represents the second number of attribute information supported by the current attribute type, and the second number represents the number of one or more groups of attribute information supported by the current attribute type. When the second number is greater than 1, multiple groups of attribute information need to be decoded, and the attribute data set of the current attribute type can use multiple groups of attribute information for attribute data decoding. When the second number is equal to 1, only one group of attribute information needs to be decoded. In other words, the decoding method provided in the embodiment of the present application can be applied to both single-attribute data set decoding and multi-attribute data set decoding. For multi-attribute data sets, group decoding can also be performed using the grouping parameters of the attribute data set to improve decoding efficiency.

[0137] In some embodiments, decoding the attribute header information and determining the value of the third syntax element includes: decoding the attribute header information and determining whether the third syntax element exists in the attribute header information; if the third syntax element exists in the attribute header information, obtaining the value of the third syntax element from the attribute header information; if the third syntax element does not exist in the attribute header information, determining the value of the third syntax element as a default value. In other words, when the third syntax element exists in the attribute header information, decoding the attribute header information and determining the value of the third syntax element; if the third syntax element does not exist in the attribute header information, determining the value of the third syntax element as a default value. Adding a description of the default value for the third syntax element not only saves coding bits but also facilitates subsequent decoding of the attribute data set.

[0138] In some embodiments, the second number of attribute data sets of the current attribute type is determined based on the value of the third syntax element; or, a reference value of the second number is determined based on the value of the second syntax element; and the second number is determined based on the reference value of the second number.

[0139] It should be noted that when encoding the reference value of the second number can save coding bits and improve coding efficiency compared to directly encoding the original value of the second number, the reference value of the second number can be encoded, and the original value of the second number can be obtained by performing a certain mathematical operation based on the reference value. Exemplarily, the reference value of the second number can be the second number minus 1. When the third syntax element does not exist in the attribute header information, its default value can be -1.

[0140] In the embodiment of the present application, the third syntax element of different attribute types can be distinguished by attribute index. For example, the third syntax element can be defined as attribute_info_num_set_minus1[attrIdx], and the third syntax element can be a syntax element at the sequence level, frame level, coding tree unit, etc.

[0141] In some embodiments, the method further includes: if it is determined based on the value of the first syntax element that attribute encoding of the current attribute type exists in the codestream, decoding the attribute header information, and determining the value of a fourth syntax element of the current attribute type; wherein the fourth syntax element indicates whether support for the use of multiple sets of attribute information for the current attribute type is enabled; if it is determined based on the value of the fourth syntax element that support for the use of multiple sets of attribute information for the current attribute type is enabled, decoding the attribute header information, and determining the value of the third syntax element.

[0142] In other embodiments, the method further includes: if it is determined based on the value of the first syntax element that attribute encoding of the current attribute type exists in the code stream, decoding the attribute header information, and determining the value of a fourth syntax element of the current attribute type; wherein the fourth syntax element indicates whether the current attribute type supports multiple attribute information; if it is determined based on the value of the fourth syntax element that support for the use of multiple sets of attribute information is enabled for the current attribute type, and the first number is greater than 1, decoding the attribute header information and determining the value of the third syntax element.

[0143] In embodiments of the present application, fourth syntax elements of different attribute types can be distinguished by attribute indexes. For example, the fourth syntax element can be defined as multi_set_flag[attrIdx]. The fourth syntax element can be a sequence-level, frame-level, coding tree unit, or other syntax element. In some embodiments, a higher-level syntax element can also be used to indicate whether to decode the fourth syntax element.

[0144] In some embodiments, the current attribute type includes at least one grouping parameter of an attribute data set, a group of attribute information includes a grouping parameter of a group of attribute data sets, and the attribute header information is decoded according to the second number to determine at least one group of attribute information supported by the current attribute type, including: in the process of decoding the attribute header information according to the second number to determine each group of attribute information, if the first number is greater than 1, the attribute header information is decoded according to the first number to determine the grouping parameter of each attribute data set of the current attribute type.

[0145] It should be noted that the grouping parameters of the attribute data set can be decoded separately from the attribute information, or can be attached to the attribute information, that is, each decoded set of attribute information contains a set of grouping parameters of the attribute data set, and the grouping parameters in different attribute information are the same or different.

[0146] In some embodiments, the current attribute type includes at least one group of cross-attribute prediction parameters, a group of attribute information includes a group of cross-attribute prediction parameters, and the attribute header information is decoded according to the second number to determine at least one group of attribute information supported by the current attribute type, including: in the process of decoding the attribute header information according to the second number to determine each group of attribute information, if the current attribute type is determined to meet the cross-attribute prediction condition according to the value of the first syntax element and the value of the second syntax element, the attribute header information is decoded to determine the cross-attribute prediction parameters of the current attribute type.

[0147] It should be noted that the cross-attribute prediction parameters can be decoded separately from the attribute information, or they can be attached to the attribute information, that is, each decoded set of attribute information contains a set of cross-attribute prediction parameters, and the attribute prediction parameters in different attribute information are the same or different.

[0148] In some embodiments, the attribute header information is decoded according to the second number to determine at least one group of attribute information supported by the current attribute type, including: initializing the second index parameter of the attribute information; decoding the attribute header information according to the second index parameter of the attribute information to determine a group of attribute information corresponding to the second index parameter; when the second index parameter is less than the second number, updating the second index parameter to decode the next group of attribute information; when the second index parameter is equal to the second number, determining that the decoding of all attribute information of the current attribute type is completed.

[0149] It should be noted that the second number is used to control the decoding of each attribute information. In some embodiments, different attribute information is indicated by a second index parameter, the second index parameter is initialized, and the second number can serve as the upper limit of the second index parameter. The current attribute information can be the attribute information indicated by the current second index parameter, and each set of attribute information is obtained through the second index parameter. Exemplarily, the definition of the relevant syntax elements is as follows:

[0150] attrIdx is the attribute index, attribute_data_num_set_minus1[attrIdx] is the second syntax element, j is the first index parameter, to indicate different attribute data sets, attribute_info_num_set_minus1[attrIdx] is the third syntax element, i is the second index parameter, to indicate different sets of attribute information.

[0151] The above scheme is adopted to optimize the decoding scheme of point cloud attribute header information. When multi-attribute datasets are supported, one or more groups of attribute information are parsed in sequence. When multi-attribute datasets are not supported, one group of attribute information is parsed in sequence for decoding. Therefore, it is suitable for decoding single-attribute datasets and decoding multi-attribute datasets, improving the efficiency of attribute decoding.

[0152] In one embodiment of the present application, referring to FIG6 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG6 , the method may include:

[0153] S601: Determine the value of the first syntax element of the current attribute type; wherein the first syntax element indicates whether the attribute code of the current attribute type exists in the bitstream;

[0154] It should be noted that the encoding method of the embodiment of the present application can be a point cloud attribute encoding method, specifically a method for encoding attribute header information. The point cloud sequence is the highest-level grammatical structure of the point cloud code stream. The point cloud sequence starts with sequence header information (referred to as sequence header), followed by one or more point cloud frames. Each point cloud frame can be preceded by geometric header information (referred to as geometric header), attribute header information (referred to as attribute header) and one or more point cloud slice data. The point cloud slice data (slice) here consists of a geometric slice header, geometric information, an attribute slice header and attribute information. In the embodiment of the present application, the attribute header information can be the attribute header information of the point cloud frame, or it can be the attribute header information of the point cloud slice.

[0155] It should be noted that the attribute types of the point cloud include color attributes and reflectivity attributes, and may also include normal vector attributes, material attributes, and the like. In some embodiments, different attribute types are indicated by different values ​​of the attribute index (attrIdx), and the current attribute type may be the attribute type indicated by the current attribute index. In an embodiment of the present application, the first syntax element of different attribute types can be distinguished by the attribute index, which is used to indicate whether the attribute encoding of the attribute type corresponding to the current attribute index exists in the code stream. Exemplarily, the first syntax element may be defined as attributePresentFlag[attrIdx]. The first syntax element may be a syntax element at the sequence level, the frame level, the coding tree unit, or the like.

[0156] In some embodiments, the method further includes: when the value of the first syntax element is a first numerical value, not adding the first syntax element to the attribute header information. In other words, the first syntax element may be encoded; when the value of the first syntax element is a default value and may not be encoded, the decoding end decodes the attribute header information and determines that the first syntax element does not exist, then determines that the value of the first syntax element is the default value. Adding a description of the default value to the first syntax element not only saves encoding bits but also facilitates subsequent encoding of attribute data sets.

[0157] In some embodiments, the method further includes: the value of the first syntax element is a first numerical value, determining that the attribute code of the current attribute type does not exist in the codestream; the value of the first syntax element is a second numerical value, determining that the attribute code of the current attribute type exists in the codestream. Exemplarily, the first numerical value can be 0 and the second numerical value can be 1. That is, the first syntax element is a binary variable. A value of '1' indicates that the current codestream contains the attrIdx attribute code; a value of '0' indicates that the current codestream does not contain the attrIdx attribute code, and its default value is 0. The value range of attrIdx is [0,15], and its meaning is as follows.

[0158] S602: If it is determined based on the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, determine the value of the second syntax element of the current attribute type;

[0159] It should be noted that the second syntax element of different attribute types can be distinguished by the attribute index. The second syntax element indicates the first number of attribute data sets supported by the current attribute type in the code stream. The first number indicates the number of one or more attribute data sets supported by each attribute type. Furthermore, for one attribute data set, attribute data of the corresponding number of points needs to be encoded. For example, assuming that the point cloud data contains multiple attribute data sets of multiple attribute types, for example, color attribute data set 1, color attribute data set 2, color attribute data set 3 and reflectance attribute data set 1, reflectance attribute data set 2, if the reflectance attribute data set 2 is currently being predicted, the reflectance attribute data set 1 of the same attribute can be referenced for data prediction, or one or more of the cross-attribute color attribute data set 1, color attribute data set 2, and color attribute data set 3 can be referenced, or both a certain color attribute data set and a reflectance attribute data set 1 may be referenced. It can be seen from this that the prediction reference relationship between different attribute data sets may not be the same.

[0160] In some embodiments, the method further includes: when the value of the second syntax element is a default value, not adding the second syntax element to the attribute header information. In other words, the second syntax element may be encoded; when the value of the second syntax element is the default value and may not be encoded, the decoder determines that the second syntax element does not exist after decoding the attribute header information, then determines that the value of the second syntax element is the default value. Adding a description of the default value to the second syntax element not only saves encoding bits but also facilitates subsequent encoding of the attribute data set.

[0161] S603: Determine a first number of attribute data sets supported by the current attribute type in the bitstream according to the value of the second syntax element;

[0162] In some embodiments, the first number of attribute data sets of the current attribute type is determined based on the value of the second syntax element; or, a reference value of the first number is determined based on the value of the second syntax element; and the first number is determined based on the reference value of the first number.

[0163] It should be noted that when encoding the reference value of the first number can save coding bits and improve coding efficiency compared to directly encoding the original value of the first number, the reference value of the first number can be encoded, and the original value of the first number can be obtained by performing a certain mathematical operation based on the reference value. Exemplarily, the reference value of the first number can be the first number minus 1. When the second syntax element does not exist in the attribute header information, its default value can be -1.

[0164] In the embodiment of the present application, the second syntax elements of different attribute types can be distinguished by attribute index. For example, the second syntax element can be defined as attribute_data_num_set_minus1[attrIdx], and the second syntax element can be a syntax element at the sequence level, frame level, coding tree unit, etc.

[0165] S604: If the first number is greater than 1, determine the grouping parameter of each attribute data set of the current attribute type according to the first number;

[0166] It should be noted that, since the first number represents the number of one or more attribute data sets supported by each attribute type, when the first number is greater than 1, the decoding grouping parameters are controlled by the first number to ensure that the grouping parameters of all attribute data sets are obtained, and group decoding is performed according to the grouping parameters, which can improve the decoding efficiency of the attribute data.

[0167] In some embodiments, the method further includes: if the current attribute type is the first attribute type and the first number is greater than 1, determining a grouping parameter of each attribute data set of the current attribute type according to the first number.

[0168] It should be noted that the first attribute type may be any attribute type with a number of attribute data sets greater than 1. In some embodiments, the first attribute type may be a reflectivity attribute. In other embodiments, the first attribute type may also be a color attribute.

[0169] In some embodiments, determining the grouping parameter for each attribute data set of the current attribute type based on the first number includes: initializing a first index parameter of the attribute data set; determining the grouping parameter of the attribute data set corresponding to the first index parameter based on the first index parameter; if the first index parameter is less than the first number, updating the first index parameter to encode the grouping parameter of the next attribute data set; and if the first index parameter is equal to the first number, determining that encoding of the grouping parameters for all attribute data sets of the current attribute type has ended. In some embodiments, the grouping parameter of the current attribute data set is greater than or equal to the grouping parameter of the previous attribute data set, and the grouping parameter of the current attribute data set is less than or equal to the first index parameter of the current attribute data set.

[0170] It should be noted that the first number is used to control the grouping parameters for encoding each attribute data set. In some embodiments, different attribute data sets are indicated by a first index parameter, and the first index parameter is initialized. The first number can serve as the upper limit of the first index parameter. The current attribute data set can be the data set indicated by the current first index parameter, and the grouping parameters of each attribute data set are obtained by the first index parameter. Exemplarily, the definitions of the relevant syntax elements are as follows:

[0171] When the condition "the attribute type corresponding to the index attrIdx is reflectivity (attrIdx==1), and the number of attribute data corresponding to the attribute of the index attrIdx minus one is greater than 0 (attribute_data_num_set_minus1[attrIdx]>0)" is met, the multi-attribute grouping parameter multi_attr_group_id[i] corresponding to each group of data sets of the index attrIdx is passed / parsed in turn, where i is the first index parameter to indicate different attribute data sets.

[0172] In some embodiments, the method further includes: not encoding the grouping parameter of the attribute data set if the first number is greater than 1. That is, when the current attribute type only includes one attribute data set, there is no need to perform group encoding on it.

[0173] S605: Add the value of the first syntax element, the value of the second syntax element, and the grouping parameter of each attribute data set corresponding to the current attribute type to the attribute header information;

[0174] S606: Encode the attribute header information and write the obtained encoded bits into the bitstream.

[0175] It should be noted that the grouping parameter is used to group multi-attribute datasets, and attribute datasets with the same grouping parameter are divided into the same group. Attributes in the same group need to be encoded as attribute data in groups. In some embodiments, each attribute dataset in the same group corresponds to the same attribute information.

[0176] In some embodiments, the method further includes: grouping attribute data sets with the same grouping parameter into an attribute data set group; determining the number of attribute data sets within the attribute data set group; encoding the attribute data sets within the attribute data set group based on the number of attribute data sets within the attribute data set group, and writing the resulting encoded bits into the bitstream. In other words, the number of attribute data sets within the attribute data set group is determined by sequentially accumulating the number of attribute data sets with the same grouping parameter, and used for subsequent encoding of the attribute data sets.

[0177] In some embodiments, the method further includes: determining whether the current attribute type satisfies a cross-attribute prediction condition based on the value of the first syntax element and the value of the second syntax element; if the cross-attribute prediction condition is satisfied, determining a cross-attribute prediction parameter for the current attribute type; and adding the cross-attribute prediction parameter to the attribute header information. In some embodiments, if the cross-attribute prediction condition is not satisfied, the cross-attribute prediction parameter is not encoded.

[0178] In some embodiments, the cross-attribute prediction condition includes: determining, based on the value of the first syntax element, whether attribute coding of the first attribute type and attribute coding of the second attribute type exist in the code stream; and / or, based on the value of the second syntax element, determining that the first number of the first attribute type is the second numerical value, and the first number of the second attribute type is the third numerical value; wherein the second numerical value and the third numerical value are both greater than 0. It should be noted that, that is, the simultaneous presence of attribute coding of the first attribute type and attribute coding of the second attribute type in the code stream is a basic condition for cross-attribute prediction. In some embodiments, the cross-attribute prediction condition can be further limited by limiting the number of each attribute data set. In some embodiments, the second numerical value can be 1, and the third numerical value can be 1.

[0179] In some embodiments, determining the cross-attribute prediction parameter of the current attribute type includes: determining a first cross-attribute prediction parameter; wherein the first cross-attribute prediction parameter is used to indicate whether cross-attribute prediction is allowed; if it is determined that cross-attribute prediction is allowed according to the first cross-attribute prediction parameter, determining other cross-attribute prediction parameters. If it is determined that cross-attribute prediction is allowed according to the first cross-attribute prediction parameter, the first cross-attribute prediction parameter is added to the attribute header information. It should be noted that the other cross-attribute prediction parameters include one or more parameters when performing cross-attribute prediction. Exemplarily, the definitions of the relevant syntax elements are as follows:

[0180] Cross-attribute prediction flag crossAttrTypePred

[0181] Binary variable. A value of '1' indicates that cross-attribute prediction is allowed; a value of '0' indicates that cross-attribute prediction is not allowed. If the current point cloud only has one set of color and one set of reflectance attributes, the cross-attribute prediction tool can be used.

[0182] Attribute encoding order attrEncodeOrder

[0183] Binary variable. Used to control the order in which attributes are encoded when the point cloud contains multiple attribute types. A value of '0' means encoding color first, then reflectance; a value of '1' means encoding reflectance first, then color.

[0184] Cross-type attribute prediction weight parameter 1crossAttrTypePredParam1

[0185] 15-bit unsigned integer. Used to control the weight parameter 1 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0186] Cross-type attribute prediction weight parameter 2crossAttrTypePredParam2

[0187] 21-bit unsigned integer. Used to control the weight parameter 2 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0188] In some embodiments, the method further includes: if it is determined based on the value of the first syntax element that attribute coding of the current attribute type exists in the bitstream, determining the value of a third syntax element; determining based on the value of the third syntax element a second number of attribute information supported by the current attribute type; and determining based on the second number at least one set of attribute information supported by the current attribute type. It should be noted that the attribute information includes a set of coding parameters used to encode the attribute data set. In some embodiments, the attribute information includes at least one of the following: attribute transform parameters, attribute quantization parameters, and attribute prediction parameters.

[0189] It should be noted that the third syntax element represents the second number of attribute information supported by the current attribute type, and the second number represents the number of one or more groups of attribute information supported by the current attribute type. When the second number is greater than 1, multiple groups of attribute information need to be encoded. When the second number is equal to 1, only one group of attribute information needs to be encoded, and the attribute data set of the current attribute type can only use one group of attribute information for attribute data encoding. In other words, the encoding method provided in the embodiment of the present application can be applied to both single-attribute data set encoding and multi-attribute data set encoding. For multi-attribute data sets, group encoding can also be performed through the grouping parameters of the attribute data set to improve encoding efficiency.

[0190] In some embodiments, the method further includes: setting the value of the third syntax element to a default value, and not adding the third syntax element to the attribute header information. In other words, the third syntax element may be encoded; if the value of the third syntax element is the default value and may not be encoded, and the decoding end decodes the attribute header information and determines that the third syntax element does not exist, then the value of the third syntax element is determined to be the default value. Adding a description of the default value to the third syntax element not only saves encoding bits but also facilitates subsequent encoding of the attribute data set.

[0191] In some embodiments, the second number of attribute data sets of the current attribute type is determined based on the value of the third syntax element; or, a reference value of the second number is determined based on the value of the second syntax element; and the second number is determined based on the reference value of the second number.

[0192] It should be noted that when encoding the reference value of the second number can save coding bits and improve coding efficiency compared to directly encoding the original value of the second number, the reference value of the second number can be encoded, and the original value of the second number can be obtained by performing a certain mathematical operation based on the reference value. Exemplarily, the reference value of the second number can be the second number minus 1. When the third syntax element does not exist in the attribute header information, its default value can be -1.

[0193] In the embodiment of the present application, the third syntax element of different attribute types can be distinguished by attribute index. For example, the third syntax element can be defined as attribute_info_num_set_minus1[attrIdx], and the third syntax element can be a syntax element at the sequence level, frame level, coding tree unit, etc.

[0194] In some embodiments, the method further includes: if it is determined based on the value of the first syntax element that attribute coding of the current attribute type exists in the codestream, determining the value of a fourth syntax element of the current attribute type; wherein the fourth syntax element indicates whether support for the use of multiple sets of attribute information for the current attribute type is enabled; if it is determined based on the value of the fourth syntax element that support for the use of multiple sets of attribute information for the current attribute type is enabled, determining the value of the third syntax element.

[0195] In other embodiments, the method further includes: if it is determined based on the value of the first syntax element that attribute encoding of the current attribute type exists in the code stream, decoding the attribute header information, and determining the value of a fourth syntax element of the current attribute type; wherein the fourth syntax element indicates whether the current attribute type supports multiple attribute information; if it is determined based on the value of the fourth syntax element that support for the use of multiple sets of attribute information is enabled for the current attribute type, and the first number is greater than 1, determining the value of the third syntax element.

[0196] In embodiments of the present application, fourth syntax elements of different attribute types can be distinguished by attribute indexes. For example, the fourth syntax element can be defined as multi_set_flag[attrIdx]. The fourth syntax element can be a sequence-level, frame-level, coding tree unit, or other syntax element. In some embodiments, a higher-level syntax element can also be used to indicate whether the fourth syntax element is encoded.

[0197] In some embodiments, the current attribute type includes at least one grouping parameter of an attribute data set, a group of attribute information includes a grouping parameter of a group of attribute data sets, and at least one group of attribute information supported by the current attribute type is determined based on the second number, including: in the process of determining each group of attribute information based on the second number, if the first number is greater than 1, determining the grouping parameter of each attribute data set of the current attribute type based on the first number.

[0198] It should be noted that the grouping parameters of the attribute data set can be encoded separately from the attribute information, or can be attached to the attribute information, that is, each encoded set of attribute information contains a set of grouping parameters of the attribute data set, and the grouping parameters in different attribute information are the same or different.

[0199] In some embodiments, the current attribute type includes at least one group of cross-attribute prediction parameters, a group of attribute information includes a group of cross-attribute prediction parameters, and at least one group of attribute information supported by the current attribute type is determined based on the second number, including: in the process of determining each group of attribute information based on the second number, if the current attribute type is determined to meet the cross-attribute prediction condition based on the value of the first syntax element and the value of the second syntax element, the cross-attribute prediction parameters of the current attribute type are determined.

[0200] It should be noted that the cross-attribute prediction parameters can be encoded separately from the attribute information, or they can be attached to the attribute information, that is, each encoded set of attribute information contains a set of cross-attribute prediction parameters, and the attribute prediction parameters in different attribute information are the same or different.

[0201] In some embodiments, based on the second number, at least one set of attribute information supported by the current attribute type is determined, including: initializing the second index parameter of the attribute information; based on the second index parameter of the attribute information, determining a set of attribute information corresponding to the second index parameter; if the second index parameter is less than the second number, updating the second index parameter to encode the next set of attribute information; if the second index parameter is equal to the second number, determining that the encoding of all attribute information of the current attribute type is completed.

[0202] It should be noted that the second number is used to control the encoding of each attribute information. In some embodiments, different attribute information is indicated by a second index parameter, the second index parameter is initialized, and the second number can serve as the upper limit of the second index parameter. The current attribute information can be the attribute information indicated by the current second index parameter, and each set of attribute information is obtained through the second index parameter. Exemplarily, the definition of the relevant syntax elements is as follows:

[0203] attrIdx is the attribute index, attribute_data_num_set_minus1[attrIdx] is the second syntax element, j is the first index parameter, to indicate different attribute data sets, attribute_info_num_set_minus1[attrIdx] is the third syntax element, i is the second index parameter, to indicate different sets of attribute information.

[0204] The above scheme is adopted to optimize the encoding scheme of point cloud attribute header information. When multi-attribute datasets are supported, one or more groups of attribute information are transmitted in sequence. When multi-attribute datasets are not supported, one group of attribute information decoding is transmitted in sequence. Therefore, it is suitable for the encoding of single-attribute datasets and the encoding of multi-attribute datasets, improving the efficiency of attribute encoding.

[0205] (1) Syntax design for multiple reflectivity attributes, Scheme 1

[0206] Table 1 Attribute header information definition 1

[0207] The syntax elements involved in the attribute header information of the embodiment of this application are:

[0208] attributePresentFlag[attrIdx]

[0209] Binary variable. A value of '1' indicates that the codestream contains the attrIdx attribute code; a value of '0' indicates that the codestream does not contain the attrIdx attribute code. The default value is 0. The value range of attrIdx is [0, 15]. Its meaning is shown in Table 1.

[0210] attribute_data_num_set_minus1[attrIdx]

[0211] Unsigned integer. 1 added to indicate the number of attribute multi-data sets supported by the attribute identified by attribute index attrIdx in the codestream of this standard. The value range is [0,127]. When attribute_data_num_set_minus1[attrIdx] does not appear in the codestream, its default value is -1.

[0212] When the condition "the attribute type corresponding to the index attrIdx is reflectivity (attrIdx==1), and the number of attribute data corresponding to the attribute of the index attrIdx minus one is greater than 0 (attribute_data_num_set_minus1[attrIdx]>0)" is met, the multi-attribute grouping parameter multi_attr_group_id[i] corresponding to each set of data sets of the index attrIdx is passed / parsed in turn.

[0213] Multi-attribute grouping parameter multi_attr_group_id[i]

[0214] Unsigned integer array. When attribute_data_num_set_minus1[1] is greater than 0, it specifies that the i-th data set of the reflectivity attribute belongs to the multi_attr_group_id[i]-th group, and multi_attr_group_id[i] is less than or equal to attribute_data_num_set_minus1[1]. Attributes in the same group need to be decoded by group. The value of multi_attr_group_id[0] must be 0, and the value of the next element in the array must be equal to or greater than the value of the previous element, that is, multi_attr_group_id[i] = multi_attr_group_id[i-1], or multi_attr_group_id[i] - multi_attr_group_id[i-1] = 1. Use multi_attr_group_num to represent the number of data in an attribute group, which is obtained by accumulating the number of consecutive identical multi_attr_group_id[i].

[0215] Sequence-level attribute information enable flag sps_multi_set_flag

[0216] Binary variable. A value of '1' indicates that the point cloud sequence can support the use of multiple sets of attribute information; a value of '0' indicates that the point cloud sequence can support the use of multiple sets of attribute information, and only one set of attribute information can be used for the attribute data. When sps_multi_set_flag is not present in the bitstream, its default value is 0.

[0217] Attribute information enable flag multi_set_flag[attrIdx]

[0218] A binary variable. A value of '1' indicates that the attribute identified by the attribute index attrIdx can support the use of multiple sets of attribute information; a value of '0' indicates that the attribute identified by the attribute index attrIdx can support the use of multiple sets of attribute information, and only one set of attribute information can be used for the attribute data. When multi_set_flag[attrIdx] is not present in the codestream, its default value is 0.

[0219] attribute_info_num_set_minus1[attrIdx]

[0220] Unsigned integer. 1 is added to indicate the number of attribute information supported by the attribute identified by the attribute index attrIdx in the codestream of this standard. This is a number between 0 and 127. When attribute_info_num_set_minus1[attrIdx] is not present in the codestream, its default value is -1.

[0221] Cross-attribute prediction flag crossAttrTypePred

[0222] Binary variable. A value of '1' indicates that cross-type attribute prediction is allowed; a value of '0' indicates that cross-type attribute prediction is not allowed. If the current point cloud only has one set of color and one set of reflectance attributes, the cross-type attribute prediction tool can be used.

[0223] Attribute encoding order attrEncodeOrder

[0224] Binary variable. Used to control the order in which attributes are encoded when the point cloud contains multiple attribute types. A value of '0' means encoding color first, then reflectance; a value of '1' means encoding reflectance first, then color.

[0225] Cross-type attribute prediction weight parameter 1crossAttrTypePredParam1

[0226] 15-bit unsigned integer. Used to control the weight parameter 1 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0227] Cross-type attribute prediction weight parameter 2crossAttrTypePredParam2

[0228] 21-bit unsigned integer. Used to control the weight parameter 2 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0229] (2) Syntax Design of Multiple Reflectivity Attributes, Solution 2

[0230] Table 2 Attribute header information definition 2

[0231] When the condition "the number of attribute data corresponding to the attribute of index attrIdx minus one is greater than 0 (attribute_data_num_set_minus1[attrIdx]>0)" is met, the multi-attribute grouping parameter multi_attr_group_id[i][j] corresponding to each set of data sets in each set of attribute information of index attrIdx is transferred / parsed in sequence.

[0232] The grammatical elements involved here are:

[0233] attribute_data_num_set_minus1[attrIdx]

[0234] Unsigned integer. 1 added to indicate the number of attribute multi-data sets supported by the attribute identified by attribute index attrIdx in the codestream of this standard. The value range is [0,127]. When attribute_data_num_set_minus1[attrIdx] does not appear in the codestream, its default value is -1.

[0235] attribute_info_num_set_minus1[attrIdx]

[0236] Unsigned integer. 1 is added to indicate the number of attribute information supported by the attribute identified by the attribute index attrIdx in the codestream of this standard. This is a number between 0 and 127. When attribute_info_num_set_minus1[attrIdx] is not present in the codestream, its default value is -1.

[0237] Multi-attribute grouping parameters multi_attr_group_id[i][j]

[0238] Unsigned integer array. When attribute_data_num_set_minus1[1] is greater than 0, it specifies that the jth data set of the reflectance attribute in the i-th set of attribute information belongs to the multi_attr_group_id[i][j]th group, and multi_attr_group_id[i] is less than or equal to attribute_data_num_set_minus1[1]. Attributes in the same group need to be decoded by group. The value of multi_attr_group_id[i][0] must be 0, and the value of the next element in the array must be equal to or greater than the value of the previous element, that is, multi_attr_group_id[i][j] = multi_attr_group_id[i][j-1], or multi_attr_group_id[i][j] - multi_attr_group_id[i][j-1] = 1. Use multi_attr_group_num to represent the number of data in an attribute group, which is obtained by accumulating the number of consecutive identical multi_attr_group_id[i][j].

[0239] (3) Add the judgment condition of whether to parse attribute_info_num_set_minus1[attrIdx]

[0240] Table 3 Attribute header information definition three

[0241] When the condition "the attribute information enable flag of the attribute corresponding to the index attrIdx is 1 (multi_set_flag[attrIdx]), and the number of attribute data of the attribute corresponding to the index attrIdx minus one is greater than 0 (attribute_data_num_set_minus1[attrIdx]>0)" is met, it is necessary to pass / parse the attribute information number of the attribute corresponding to the index attrIdx minus one (attribute_info_num_set_minus1[attrIdx]).

[0242] (IV) Related grammar design of cross-attribute prediction parameters, solution 1

[0243] Table 4 Attribute header information definition 4

[0244] When the condition "the attribute presence flag of the attribute corresponding to index 0 is 1 (attributePresentFlag[0]), and the attribute presence flag of the attribute corresponding to index 1 is 1 (attributePresentFlag[1]), and the number of attribute data of the attribute corresponding to index 0 minus one is equal to 0 (attribute_data_num_set_minus1[0]==0), and the number of attribute data of the attribute corresponding to index 1 minus one is equal to 0 (attribute_data_num_set_minus1[1]==0)" is met, crossAttrTypePred[i], attrEncodeOrder[i], crossAttrTypePredParam1[i], and crossAttrTypePredParam2[i] are passed / parsed in sequence.

[0245] The grammatical elements involved here are:

[0246] Cross-type attribute prediction crossAttrTypePred[i]

[0247] Binary variable. A value of '1' indicates that cross-type attribute prediction is allowed for the i-th attribute group; a value of '0' indicates that cross-type attribute prediction is not allowed for the i-th attribute group. If the current point cloud only has one set of color and one set of reflectance attributes, the cross-type attribute prediction tool can be used.

[0248] Attribute encoding order attrEncodeOrder[i]

[0249] Binary variable. If the i-th attribute information group is selected, this parameter controls the order in which the attributes are encoded when the point cloud contains multiple attribute types. A value of '0' means encoding color first, then reflectivity; a value of '1' means encoding reflectivity first, then color.

[0250] Cross-type attribute prediction weight parameter 1crossAttrTypePredParam1[i]

[0251] 15-bit unsigned integer. If the i-th group of attribute information is selected, this parameter is used to control the weight parameter 1 for calculating the geometric information distance and attribute information distance in cross-type attribute prediction.

[0252] Cross-type attribute prediction weight parameter 2crossAttrTypePredParam2[i]

[0253] 21-bit unsigned integer. If the i-th group of attribute information is selected, this parameter is used to control the weight parameter 2 for calculating the geometric information distance and attribute information distance in cross-type attribute prediction.

[0254] It can be understood that the attribute header information defines the attribute_info_num_set_minus1[attrIdx]+1 group of cross-type attribute prediction parameters (also referred to as "cross-attribute prediction parameters").

[0255] (V) Related grammar design of cross-attribute prediction parameters, solution 2

[0256] Table 5 Attribute header information definition 5

[0257] When the condition "the attribute presence flag of the attribute corresponding to index 0 is 1 (attributePresentFlag[0]), and the attribute presence flag of the attribute corresponding to index 1 is 1 (attributePresentFlag[1]), and the number of attribute data of the attribute corresponding to index 0 minus one is equal to 0 (attribute_data_num_set_minus1[0]==0), and the number of attribute data of the attribute corresponding to index 1 minus one is equal to 0 (attribute_data_num_set_minus1[1]==0)" is met, crossAttrTypePred[i], attrEncodeOrder[i], crossAttrTypePredParam1[i], and crossAttrTypePredParam2[i] are passed / parsed in sequence.

[0258] The grammatical elements involved here are:

[0259] Cross-type attribute prediction crossAttrTypePred

[0260] Binary variable. A value of '1' indicates that cross-type attribute prediction is allowed; a value of '0' indicates that cross-type attribute prediction is not allowed. If the current point cloud only has one set of color and one set of reflectance attributes, the cross-type attribute prediction tool can be used.

[0261] Attribute encoding order attrEncodeOrder

[0262] Binary variable. Used to control the order in which attributes are encoded when the point cloud contains multiple attribute types. A value of '0' means encoding color first, then reflectance; a value of '1' means encoding reflectance first, then color.

[0263] Cross-type attribute prediction weight parameter 1crossAttrTypePredParam1

[0264] 15-bit unsigned integer. Used to control the weight parameter 1 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0265] Cross-type attribute prediction weight parameter 2crossAttrTypePredParam2

[0266] 21-bit unsigned integer. Used to control the weight parameter 2 used to calculate the geometric information distance and attribute information distance in cross-type attribute prediction.

[0267] It can be understood that the attribute header information defines a set of cross-type attribute prediction parameters (also referred to as "cross-attribute prediction parameters").

[0268] Furthermore, an embodiment of the present application also provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following: a first syntax element, a second syntax element, a third syntax element, a fourth syntax element, a grouping parameter of an attribute data set, a cross-attribute prediction parameter, and attribute information; wherein the first syntax element indicates whether attribute encoding of the current attribute type exists in the code stream, the second syntax element indicates a first number of attribute data sets supported by the current attribute type, the third syntax element indicates a second number of attribute information supported by the current attribute type, and the fourth syntax element indicates whether support for using multiple sets of attribute information for the current attribute type is enabled.

[0269] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG7 , which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in FIG7 , the encoder 70 may include a first determining unit 701 and an encoding unit 702; wherein,

[0270] The first determining unit 701 is configured to determine a value of a first syntax element of a current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream;

[0271] The first determining unit 701 is further configured to, if it is determined based on the value of the first syntax element that the attribute code of the current attribute type exists in the codestream, determine the value of the second syntax element of the current attribute type; and determine, based on the value of the second syntax element, a first number of attribute data sets supported by the current attribute type in the codestream;

[0272] The first determining unit 701 is further configured to determine a grouping parameter of each attribute data set of the current attribute type according to the first number if the first number is greater than 1;

[0273] The encoding unit 702 is configured to add the value of the first syntax element corresponding to the current attribute type, the value of the second syntax element, and the grouping parameter of each attribute data set to the attribute header information; encode the attribute header information, and write the obtained encoded bits into the bitstream.

[0274] It can be understood that each functional unit of the encoder also executes the encoding method described in any one of the aforementioned embodiments, which will not be repeated here.

[0275] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

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

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

[0278] [Corrected 01.09.2023 according to Rule 91] Based on the composition of the encoder 70 and the computer-readable storage medium, refer to Figure 8, which shows a specific hardware structure diagram of the encoder 70 provided in an embodiment of the present application. As shown in Figure 8, the encoder 70 may include: a first communication interface 801, a first memory 802 and a first processor 803; the various components are coupled together through a first bus system 804. It can be understood that the first bus system 804 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 804 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 804 in Figure 8. Among them,

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

[0280] A first memory 802 is used to store computer programs that can be run on the first processor 803;

[0281] The first processor 803 is configured to, when running the computer program, execute:

[0282] Determine a value of a first syntax element of a current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream;

[0283] If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, determining the value of the second syntax element of the current attribute type;

[0284] Determining, according to a value of the second syntax element, a first number of attribute data sets supported by a current attribute type in the codestream;

[0285] If the first number is greater than 1, determining the grouping parameter of each attribute data set of the current attribute type according to the first number;

[0286] Adding the value of the first syntax element, the value of the second syntax element, and the grouping parameter of each attribute data set corresponding to the current attribute type to the attribute header information;

[0287] The attribute header information is encoded, and the obtained encoded bits are written into a bitstream.

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

[0289] The first processor 803 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 803. The above-mentioned first processor 803 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 802 , and the first processor 803 reads the information in the first memory 802 and completes the steps of the above method in combination with its hardware.

[0290] It is understood that the embodiments described herein can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (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 of the present application or a combination thereof. For software implementation, the technology of the present application can be implemented by a module (such as a process, a function, etc.) that performs the functions of the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0291] Optionally, as another embodiment, the first processor 803 is further configured to execute any one of the methods in the foregoing embodiments when running a computer program.

[0292] This embodiment provides an encoder in which the encoding scheme of point cloud attribute header information is optimized. When supporting multi-attribute datasets, one or more groups of attribute information are transmitted in sequence. When multi-attribute datasets are not supported, one group of attribute information decoding is transmitted in sequence. Therefore, the encoder is suitable for encoding single-attribute datasets and encoding multi-attribute datasets, thereby improving the efficiency of attribute encoding.

[0293] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG9 , which shows a schematic diagram of the structure of a decoder 90 provided in an embodiment of the present application. As shown in FIG9 , the decoder 90 may include: a decoding unit 901 and a second determining unit 902; wherein,

[0294] The decoding unit 901 is configured to decode the attribute header information and determine the value of a first syntax element of the current attribute type; wherein the first syntax element indicates whether the attribute code of the current attribute type exists in the bitstream;

[0295] The decoding unit 901 is further configured to, if it is determined based on the value of the first syntax element that the attribute encoding of the current attribute type exists in the bitstream, decode the attribute header information to determine the value of the second syntax element of the current attribute type; and determine, based on the value of the second syntax element, a first number of attribute data sets supported by the current attribute type in the bitstream;

[0296] The decoding unit 901 is further configured to, if the first number is greater than 1, decode the attribute header information according to the first number to determine the grouping parameter of each attribute data set of the current attribute type;

[0297] The second determining unit 902 is configured to group and decode the attribute data sets of the current attribute type according to the grouping parameter of each attribute data set of the current attribute type.

[0298] It can be understood that each functional unit of the decoder also executes the decoding method described in any one of the aforementioned embodiments, which will not be repeated here.

[0299] Based on the composition of the decoder 90 and the computer-readable storage medium, refer to Figure 10, which shows a specific hardware structure diagram of the decoder 90 provided in an embodiment of the present application. As shown in Figure 10, the decoder 90 may include: a second communication interface 1001, a second memory 1002 and a second processor 1003; each component is coupled together through a second bus system 1004. It can be understood that the second bus system 1004 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 1004 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 1004 in Figure 10. Among them,

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

[0301] The second memory 1002 is used to store computer programs that can be run on the second processor 1003;

[0302] The second processor 1003 is configured to, when running the computer program, execute:

[0303] Decode the attribute header information to determine the value of a first syntax element of the current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream;

[0304] If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, decoding the attribute header information to determine the value of the second syntax element of the current attribute type;

[0305] Determining, according to a value of the second syntax element, a first number of attribute data sets supported by a current attribute type in the codestream;

[0306] If the first number is greater than 1, decoding the attribute header information according to the first number to determine the grouping parameter of each attribute data set of the current attribute type;

[0307] The attribute data sets of the current attribute type are decoded in groups according to the grouping parameters of each attribute data set of the current attribute type.

[0308] Optionally, as another embodiment, the second processor 1003 is further configured to execute any one of the methods in the foregoing embodiments when running the computer program.

[0309] It can be understood that the hardware functions of the second memory 1002 and the first memory 802 are similar, and the hardware functions of the second processor 1003 and the first processor 803 are similar; they will not be described in detail here.

[0310] This embodiment provides a decoder in which the decoding scheme of point cloud attribute header information is optimized. When supporting multi-attribute datasets, one or more groups of attribute information are parsed in sequence. When multi-attribute datasets are not supported, one group of attribute information is parsed in sequence for decoding. This decoder is suitable for decoding single-attribute datasets as well as decoding multi-attribute datasets, thereby improving the efficiency of attribute decoding.

[0311] In yet another embodiment of the present application, referring to FIG11 , a schematic diagram of the structure of a coding and decoding system provided in an embodiment of the present application is shown. As shown in FIG11 , the coding and decoding system 110 may include an encoder 1101 and a decoder 1102 .

[0312] In the embodiment of the present application, the encoder 1101 may be the encoder described in any one of the aforementioned embodiments, and the decoder 1102 may be the decoder described in any one of the aforementioned embodiments.

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

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

[0315] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new method embodiments. The features disclosed in the several product embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new product embodiments. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new method embodiments or device embodiments.

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

[0317] In an embodiment of the present application, a coding and decoding method, bitstream, encoder, decoder, and storage medium are provided. These methods decode attribute header information to determine the value of the first syntax element of the current attribute type. If the value of the first syntax element indicates that the bitstream contains an attribute encoding of the current attribute type, the value of the second syntax element of the current attribute type is decoded. If the first number is greater than 1, the attribute header information is decoded based on the first number to determine the grouping parameters of each attribute data set of the current attribute type. The attribute data sets of the current attribute type are then grouped and decoded based on the grouping parameters of each attribute data set of the current attribute type. In this way, the coding and decoding scheme for point cloud attribute header information is optimized to be applicable to the coding and decoding of single-attribute data sets as well as the coding and decoding of multi-attribute data sets, thereby improving the efficiency of attribute coding and decoding.

Claims

1. A decoding method, applied to a decoder, the method comprising: Decode the attribute header information to determine the value of the first syntax element of the current attribute type; wherein the first syntax element indicates whether the attribute code of the current attribute type exists in the bitstream; If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, decoding the attribute header information to determine the value of the second syntax element of the current attribute type; Determining, according to a value of the second syntax element, a first number of attribute data sets supported by a current attribute type in the codestream; If the first number is greater than 1, decoding the attribute header information according to the first number to determine the grouping parameter of each attribute data set of the current attribute type; The attribute data sets of the current attribute type are decoded in groups according to the grouping parameters of each attribute data set of the current attribute type.

2. The method according to claim 1, wherein: The method further comprises: If the current attribute type is the first attribute type and the first number is greater than 1, the attribute header information is decoded according to the first number to determine the grouping parameters of each attribute data set of the current attribute type.

3. The method according to claim 2, wherein: The first attribute type is a reflectivity attribute.

4. The method according to any one of claims 1 to 3, wherein: The step of decoding the attribute header information according to the first number to determine the grouping parameter of each attribute data set of the current attribute type includes: Initialize the first index parameter of the attribute data set; Decoding the attribute header information according to the first index parameter to determine a grouping parameter of the attribute data set corresponding to the first index parameter; The first index parameter is smaller than the first number, and the first index parameter is updated to decode a grouping parameter of a next attribute data set; The first index parameter is equal to the first number, and it is determined that decoding of grouping parameters of all attribute data sets of the current attribute type is completed.

5. The method according to any one of claims 1 to 4, wherein: The step of grouping and decoding the attribute data sets of the current attribute type according to the grouping parameters of each attribute data set of the current attribute type includes: Grouping the attribute data sets with the same grouping parameters into one attribute data set group; Determining the number of attribute data sets within the attribute data set group; The attribute data sets in the attribute data set group are decoded according to the number of the attribute data sets in the attribute data set group.

6. The method according to claim 1, wherein: The decoding of the attribute header information to determine the value of the first syntax element of the current attribute type includes: Decoding the attribute header information, and determining whether the first syntax element exists in the attribute header information; When the first syntax element exists in the attribute header information, obtaining a value of the first syntax element from the attribute header information; When the first syntax element does not exist in the attribute header information, determine that the value of the first syntax element is a first numerical value.

7. The method according to claim 6, wherein: The first value is used to indicate that the attribute code of the current attribute type does not exist in the code stream.

8. The method according to any one of claims 1 to 7, wherein: The method further comprises: Determining, according to a value of the first syntax element and a value of the second syntax element, whether a current attribute type satisfies a cross-attribute prediction condition; If the cross-attribute prediction condition is met, decoding the attribute header information to determine a cross-attribute prediction parameter of the current attribute type; The attribute data set of the current attribute type is decoded according to the cross-attribute prediction parameter.

9. The method according to claim 8, wherein: The cross-attribute prediction conditions include: Determining, according to a value of the first syntax element, whether attribute codes of the first attribute type and attribute codes of the second attribute type exist in the bitstream; And / or, according to the value of the second syntax element, determine that the first number of the first attribute type is a second value, and the first number of the second attribute type is a third value; wherein the second value and the third value are both greater than 0.

10. The method according to claim 8, wherein: The decoding of the attribute header information to determine the cross-attribute prediction parameter of the current attribute type includes: Decoding the attribute header information to determine a first cross-attribute prediction parameter; wherein the first cross-attribute prediction parameter is used to indicate whether cross-attribute prediction is allowed; If it is determined according to the first cross-attribute prediction parameter that cross-attribute prediction is allowed, the attribute header information is decoded to determine other cross-attribute prediction parameters.

11. The method according to any one of claims 1 to 10, wherein: The method further comprises: If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, decoding the attribute header information to determine the value of the third syntax element; Determining, according to a value of the third syntax element, a second number of attribute information supported by the current attribute type; The attribute header information is decoded according to the second number to determine at least one set of attribute information supported by the current attribute type.

12. The method according to claim 11, wherein: The attribute information includes at least one of the following: an attribute transformation parameter, an attribute quantization parameter, and an attribute prediction parameter.

13. The method according to claim 11, wherein: The method further comprises: If it is determined according to the value of the first syntax element that the attribute encoding of the current attribute type exists in the bitstream, the attribute header information is decoded to determine the value of the fourth syntax element of the current attribute type; wherein the fourth syntax element indicates whether the current attribute type is enabled to support the use of multiple sets of attribute information; If it is determined according to the value of the fourth syntax element that the current attribute type is enabled to support the use of multiple sets of attribute information, the attribute header information is decoded to determine the value of the third syntax element.

14. The method according to claim 13, wherein: The method further comprises: If it is determined based on the value of the fourth syntax element that the current attribute type is enabled to support the use of multiple sets of attribute information, and the first number is greater than 1, the attribute header information is decoded to determine the value of the third syntax element.

15. The method according to claim 11, wherein: The current attribute type includes at least one grouping parameter of an attribute data set, and a set of attribute information includes a grouping parameter of a set of attribute data sets. The step of decoding the attribute header information according to the second number to determine at least one set of attribute information supported by the current attribute type includes: In the process of decoding the attribute header information according to the second number to determine each group of attribute information, if the first number is greater than 1, the attribute header information is decoded according to the first number to determine the grouping parameter of each attribute data set of the current attribute type.

16. The method according to claim 11, wherein: The current attribute type includes at least one set of cross-attribute prediction parameters, a set of attribute information includes a set of cross-attribute prediction parameters, The step of decoding the attribute header information according to the second number to determine at least one set of attribute information supported by the current attribute type includes: In the process of decoding the attribute header information according to the second number to determine each group of attribute information, if it is determined that the current attribute type meets the cross-attribute prediction condition according to the value of the first syntax element and the value of the second syntax element, the attribute header information is decoded to determine the cross-attribute prediction parameters of the current attribute type.

17. The method according to any one of claims 11 to 16, wherein: The step of decoding the attribute header information according to the second number to determine at least one set of attribute information supported by the current attribute type includes: Initialize the second index parameter of the attribute information; Decoding the attribute header information according to a second index parameter of the attribute information to determine a group of attribute information corresponding to the second index parameter; The second index parameter is smaller than the second number, and the second index parameter is updated to decode the next set of attribute information; The second index parameter is equal to the second number, and it is determined that the decoding of all attribute information of the current attribute type is completed.

18. A coding method, applied to an encoder, the method comprising: Determine a value of a first syntax element of a current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in a bitstream; If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, determining the value of the second syntax element of the current attribute type; Determining, according to a value of the second syntax element, a first number of attribute data sets supported by a current attribute type in the codestream; If the first number is greater than 1, determining a grouping parameter of each attribute data set of the current attribute type according to the first number; Adding the value of the first syntax element, the value of the second syntax element, and the grouping parameter of each attribute data set corresponding to the current attribute type to the attribute header information; The attribute header information is encoded, and the obtained encoded bits are written into a bitstream.

19. The method according to claim 18, wherein: The method further comprises: If the current attribute type is the first attribute type and the first number is greater than 1, the grouping parameter of each attribute data set of the current attribute type is determined according to the first number.

20. The method according to claim 19, wherein: The first attribute type is a reflectivity attribute.

21. The method according to any one of claims 18 to 20, wherein: The determining the grouping parameter of each attribute data set of the current attribute type according to the first number includes: Initialize the first index parameter of the attribute data set; Determining, according to the first index parameter, a grouping parameter of the attribute data set corresponding to the first index parameter; The first index parameter is smaller than the first number, and the first index parameter is updated to encode a grouping parameter of the next attribute data set; The first index parameter is equal to the first number, and it is determined that the grouping parameter encoding of all attribute data sets of the current attribute type is completed.

22. The method according to any one of claims 18 to 21, wherein: The method further comprises: Grouping the attribute data sets with the same grouping parameters into one attribute data set group; Determining the number of attribute data sets within the attribute data set group; According to the number of attribute data sets in the attribute data set group, the attribute data sets in the attribute data set group are encoded, and the obtained encoding bits are written into a bitstream.

23. The method according to claim 18, wherein: The method further comprises: The value of the first syntax element is a first value, and the first syntax element is not added to the attribute header information.

24. The method according to claim 23, wherein: The first value is used to indicate that the attribute code of the current attribute type does not exist in the code stream.

25. The method according to any one of claims 18 to 24, wherein: The method further comprises: Determining, according to a value of the first syntax element and a value of the second syntax element, whether a current attribute type satisfies a cross-attribute prediction condition; If the cross-attribute prediction condition is met, determining the cross-attribute prediction parameters of the current attribute type; The cross-attribute prediction parameter is added to the attribute header information.

26. The method according to claim 25, wherein: The cross-attribute prediction conditions include: Determining, according to a value of the first syntax element, whether attribute codes of the first attribute type and attribute codes of the second attribute type exist in the bitstream; And / or, according to the value of the second syntax element, determine that the first number of the first attribute type is a second value, and the first number of the second attribute type is a third value; wherein the second value and the third value are both greater than 0.

27. The method according to claim 25, wherein: The determining of the cross-attribute prediction parameter of the current attribute type includes: Determine a first cross-attribute prediction parameter; wherein the first cross-attribute prediction parameter is used to indicate whether cross-attribute prediction is allowed; If it is determined according to the first cross-attribute prediction parameter that cross-attribute prediction is allowed, other cross-attribute prediction parameters are determined.

28. The method according to any one of claims 18 to 27, wherein: The method further comprises: If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, determining the value of the third syntax element; Determining, according to a value of the third syntax element, a second number of attribute information supported by the current attribute type; Determine, according to the second number, at least one set of attribute information supported by the current attribute type; Adding the value of the third syntax element corresponding to the current attribute type and the at least one set of attribute information to the attribute header information.

29. The method according to claim 28, wherein: The attribute information includes at least one of the following: an attribute transformation parameter, an attribute quantization parameter, and an attribute prediction parameter.

30. The method of claim 28, wherein: The method further comprises: If it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the bitstream, determine the value of the fourth syntax element of the current attribute type; wherein the fourth syntax element indicates whether the current attribute type is enabled to support the use of multiple sets of attribute information; If it is determined according to the value of the fourth syntax element that the current attribute type supports the use of multiple sets of attribute information, the value of the third syntax element is determined; The value of the fourth syntax element is added to the attribute header information.

31. The method according to claim 30, wherein: The method further comprises: If it is determined according to the value of the fourth syntax element that the current attribute type is enabled to support the use of multiple sets of attribute information, and the first number is greater than 1, the value of the third syntax element is determined.

32. The method of claim 28, wherein: The current attribute type includes at least one grouping parameter of an attribute data set, and a set of attribute information includes a grouping parameter of a set of attribute data sets. The determining, according to the second number, at least one set of attribute information supported by the current attribute type includes: In the process of determining each group of attribute information according to the second number, if the first number is greater than 1, the grouping parameter of each attribute data set of the current attribute type is determined according to the first number.

33. The method of claim 28, wherein: The current attribute type includes at least one set of cross-attribute prediction parameters, a set of attribute information includes a set of cross-attribute coding prediction parameters, The determining, according to the second number, at least one set of attribute information supported by the current attribute type includes: In the process of determining each group of attribute information according to the second number, if it is determined according to the value of the first syntax element and the value of the second syntax element that the current attribute type meets the cross-attribute prediction condition, a cross-attribute prediction parameter of the current attribute type is determined.

34. The method according to any one of claims 28 to 33, wherein: The determining, according to the second number, at least one set of attribute information supported by the current attribute type includes: Initialize the second index parameter of the attribute information; Determining, according to a second index parameter of the attribute information, a set of attribute information corresponding to the second index parameter; The second index parameter is smaller than the second number, and the second index parameter is updated to encode the next set of attribute information; The second index parameter is equal to the second number, and it is determined that the encoding of all attribute information of the current attribute type is completed.

35. A code stream, wherein The bitstream is generated by bit encoding according to the attribute header information; wherein the attribute header information includes at least one of the following: a first syntax element, a second syntax element, a third syntax element, a fourth syntax element, a grouping parameter of an attribute data set, a cross-attribute prediction parameter, and attribute information; wherein the first syntax element indicates whether there is an attribute encoding of the current attribute type in the bitstream, the second syntax element indicates a first number of attribute data sets supported by the current attribute type, the third syntax element indicates a second number of attribute information supported by the current attribute type, and the fourth syntax element indicates whether the current attribute type is enabled to support the use of multiple sets of attribute information.

36. An encoder, comprising a first determining unit and an encoding unit; wherein: The first determining unit is configured to determine a value of a first syntax element of a current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream; The first determining unit is further configured to determine a value of a second syntax element of the current attribute type if it is determined according to the value of the first syntax element that the attribute code of the current attribute type exists in the code stream; and determine a first number of attribute data sets supported by the current attribute type in the code stream according to the value of the second syntax element; The first determining unit is further configured to determine a grouping parameter of each attribute data set of the current attribute type according to the first number if the first number is greater than 1; The encoding unit is configured to add the value of the first syntax element, the value of the second syntax element and the grouping parameter of each attribute data set corresponding to the current attribute type to the attribute header information; encode the attribute header information, and write the obtained encoded bits into the bitstream.

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

38. A decoder, comprising a decoding unit and a second determining unit; wherein: The decoding unit is configured to decode the attribute header information to determine the value of a first syntax element of the current attribute type; wherein the first syntax element indicates whether an attribute code of the current attribute type exists in the bitstream; The decoding unit is further configured to, if it is determined according to the value of the first syntax element that the attribute encoding of the current attribute type exists in the code stream, decode the attribute header information to determine the value of the second syntax element of the current attribute type; and determine, according to the value of the second syntax element, a first number of attribute data sets supported by the current attribute type in the code stream; The decoding unit is further configured to, if the first number is greater than 1, decode the attribute header information according to the first number to determine a grouping parameter of each attribute data set of the current attribute type; The second determining unit is configured to group and decode the attribute data sets of the current attribute type according to the grouping parameter of each attribute data set of the current attribute type.

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

40. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 17 or the method according to any one of claims 18 to 34 is implemented.