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

CN120303932APending Publication Date: 2025-07-11GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280102288.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In existing point cloud compression technology, due to the large amount of context information, memory resource utilization is low, resulting in large memory overhead during encoding and decoding, which affects efficiency.

Method used

By parsing the code stream type, the context model is determined, and only the required context information is initialized to avoid loading all context models, thereby saving memory resources and improving efficiency.

Benefits of technology

While ensuring the encoding and decoding efficiency, the memory overhead is reduced, the utilization of memory resources is improved, and the problem of memory waste is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120303932A_ABST
    Figure CN120303932A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an encoding and decoding method, a decoder, an encoder, a code stream and a storage medium, and the method comprises the steps: analyzing the code stream, and determining the type of the code stream; determining a context model based on the code stream type; initializing context information of the context model; and decoding the current node based on the context information. Therefore, under the condition that the coding and decoding efficiency is ensured, the memory overhead during coding and decoding is reduced, and the utilization rate of memory resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

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

[0001] The present application relates to point cloud compression coding and decoding technology, and in particular to a coding and decoding method, decoder, encoder, code stream and storage medium. Background Art

[0002] A point cloud is a collection of points that can store the geometric position and related attribute information of each point, thereby accurately and three-dimensionally describing objects in space. The amount of point cloud data is huge, and a frame of point cloud can contain millions of points. This also brings great difficulties and challenges to the effective storage and transmission of point clouds. Therefore, compression technology is used to reduce redundant information in point cloud storage, thereby facilitating subsequent processing. Depending on the object of compression, point cloud compression can be divided into two categories: geometry compression and attribute compression, which correspond to compressed coordinate information and attribute information respectively, and the two are compressed independently. That is, the coordinate information is first compressed using a geometric compression algorithm, and then the attribute information is compressed using a separate attribute compression algorithm with the coordinates as known information.

[0003] Currently, geometric compression is typically implemented using methods such as multitree encoding and prediction tree encoding, while attribute compression algorithms can be categorized into methods that compress color and reflectance information. During the point cloud encoding process, there are geometric information encoding contexts and attribute information encoding contexts. The geometric information encoding context is further divided into multitree encoding contexts and prediction tree encoding contexts, while the attribute information encoding contexts are divided into color encoding contexts and reflectance attribute encoding contexts.

[0004] However, in the process of encoding and decoding using context, due to the large amount of context information, the context memory will be sharply wasted, resulting in low resource utilization.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a coding and decoding method, a decoder, an encoder, a code stream and a storage medium, which can reduce the memory overhead during coding and decoding and improve the utilization of memory resources while ensuring coding and decoding efficiency.

[0007] The technical solution of this application is achieved as follows:

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

[0009] Analyze the code stream and determine the code stream type;

[0010] Determining a context model based on the bitstream type;

[0011] Initialize the context information of the context model;

[0012] Based on the context information, the current node is decoded.

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

[0014] Determine an encoding method for the point cloud; the encoding method is used to indicate geometric encoding or attribute encoding;

[0015] Determining a context model based on the encoding method;

[0016] When encoding the current node according to the encoding method, initializing the context information of the context model;

[0017] The current node is encoded based on the context information.

[0018] In a third aspect, an embodiment of the present application provides a code stream, including:

[0019] The code stream is generated by bit encoding based on information to be encoded; the information to be encoded includes at least one of the following:

[0020] The code stream type, the first syntax element information, the second syntax element information, and the coding information of each node in the point cloud.

[0021] In a fourth aspect, an embodiment of the present application provides a decoder, including:

[0022] The decoding part is configured to parse the code stream and determine the code stream type;

[0023] A first determining part is configured to determine a context model based on the bitstream type;

[0024] A first initialization part is configured to initialize context information of the context model;

[0025] The decoding part is further configured to decode the current node based on the context information.

[0026] In a fifth aspect, an embodiment of the present application provides an encoder, including:

[0027] The second determining part is configured to determine an encoding method of the point cloud; the encoding method is used to indicate geometric encoding or attribute encoding; and determine a context model based on the encoding method;

[0028] A second initialization part is configured to initialize the context information of the context model when encoding the current node according to the encoding method;

[0029] The encoding part is configured to encode the current node based on the context information.

[0030] In a sixth aspect, an embodiment of the present application further provides a decoder, including:

[0031] a first memory configured to store executable instructions;

[0032] The first processor is configured to implement the method described in the decoder when executing the executable instructions stored in the first memory.

[0033] In a seventh aspect, an embodiment of the present application further provides an encoder, including:

[0034] a second memory configured to store executable instructions;

[0035] The second processor is configured to implement the method described by the encoder when executing the executable instructions stored in the second memory.

[0036] In an eighth aspect, an embodiment of the present application further provides a computer-readable storage medium storing executable instructions for causing a first processor to execute and implement the method described in the decoder, or for causing a second processor to execute and implement the method described in the encoder.

[0037] The embodiments of the present application provide a coding and decoding method, decoder, encoder, bitstream, and storage medium. At the decoding end, the bitstream is parsed to determine the bitstream type; based on the bitstream type, a context model is determined; context information of the context model is initialized; and based on the context information, the current node is decoded. The decoder, based on the parsed bitstream type, only needs to initialize the context information of the context model consistent with the parsed bitstream type when decoding using context information. This ensures that the context information required for decoding is already loaded at initialization, ensuring decoding efficiency. At the same time, the entire context model does not need to be loaded, saving memory resources allocated to the context model, thereby reducing memory overhead during decoding and improving memory resource utilization.

[0038] On the encoding side, the encoder can determine whether to perform geometric encoding or attribute encoding by determining the point cloud encoding method during encoding. Based on the encoding method, it can also determine whether to initialize the context information of the context model corresponding to the geometric information or the context information of the context model corresponding to the attribute information. This only requires initializing the context information of the context model consistent with the parsed encoding method. This ensures that the context information required for encoding is already loaded at initialization, ensuring encoding efficiency. At the same time, context models for all encoding methods do not need to be loaded, saving memory resources allocated to the context model, thereby reducing memory overhead during encoding and improving memory resource utilization. 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 block diagram of a G-PCC encoder;

[0045] FIG4B is a schematic block diagram of a G-PCC decoder;

[0046] FIG5A is a schematic diagram of an intersection of seed blocks;

[0047] FIG5B is a schematic diagram of fitting a triangular facet set;

[0048] FIG5C is a schematic diagram of upsampling of a triangle face set;

[0049] FIG6 is a schematic diagram of an exemplary prediction tree structure;

[0050] FIG7A is a block diagram of an AVS encoder;

[0051] FIG7B is a block diagram of an AVS decoder;

[0052] FIG8 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

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

[0054] 10A-10H are schematic diagrams of the structure of reference nodes for sub-node selection according to an embodiment of the present application;

[0055] 11A-11D are schematic structural diagrams of four groups of reference neighbor nodes of a current node provided in an embodiment of the present application;

[0056] 12A-12H are schematic diagrams of a structure in which each sub-block corresponds to six adjacent parent blocks according to an embodiment of the present application;

[0057] FIG13 is a schematic diagram of 18 adjacent blocks and their Morton sequence numbers used by a current block to be encoded according to an embodiment of the present application;

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

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

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

[0061] FIG17 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] 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, the color information may be luminance and chrominance (YCbCr, YUV) information, where Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.

[0069] 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.

[0070] 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).

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

[0072] Static point cloud: the object is stationary and the device that obtains the point cloud is also stationary;

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

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

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

[0076] 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;

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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).

[0085] The following describes the related technologies using the G-PCC codec framework and the AVS codec framework as examples.

[0086] As you can understand, in the point cloud G-PCC codec framework, the point cloud data to be encoded is first divided into multiple slices through slice partitioning. In each slice, the geometric information of the point cloud and the attribute information corresponding to each point cloud are encoded and decoded separately.

[0087] Figure 4A shows a schematic diagram of the G-PCC encoder architecture. As shown in Figure 4A, during the geometry encoding process, the geometric information is transformed so that the entire point cloud is contained within a bounding box. Quantization is then performed. This quantization step primarily serves a scaling purpose. Due to quantization rounding, the geometric information of some point clouds becomes identical. Parameters are then used to determine whether to remove duplicate points. This process of quantization and removing duplicate points is also known as voxelization. The bounding box is then partitioned into an octree or a prediction tree is constructed. During this process, arithmetic coding is performed on the points in the leaf nodes of the partition to generate a binary geometry bitstream. Alternatively, arithmetic coding is performed on the intersection points (vertices) generated by the partition (surface fitting is performed based on the intersection points) to generate a binary geometry bitstream. During the attribute encoding process, after the geometry encoding is completed and the geometric information is reconstructed, color conversion is performed to convert the color information (i.e., attribute information) from the RGB color space to the YUV color space. The reconstructed geometry information is then used to recolor the point cloud so that the unencoded attribute information corresponds to the reconstructed geometry information. Attribute encoding is mainly performed on color information. In the color information encoding process, there are two main transformation methods. One is the distance-based lifting transformation that relies on the level of detail (LOD) division, and the other is the direct region adaptive hierarchical transformation (RAHT). Both methods convert color information from the spatial domain to the frequency domain, obtain high-frequency coefficients and low-frequency coefficients through transformation, and finally quantize the coefficients. Then, the quantized coefficients are arithmetically encoded to generate a binary attribute bit stream.

[0088] Figure 4B shows a schematic diagram of the composition framework of a G-PCC decoder. As shown in Figure 4B, for the acquired binary bit stream, the geometric bit stream and attribute bit stream in the binary bit stream are first decoded independently. When decoding the geometric bit stream, the geometric information of the point cloud is obtained through arithmetic decoding-reconstruction of the octree / reconstruction of the prediction tree-reconstruction of the geometry-coordinate inverse conversion; when decoding the attribute bit stream, the attribute information of the point cloud is obtained through arithmetic decoding-inverse quantization-LOD partitioning / RAHT-color inverse conversion, and the point cloud data to be encoded (i.e., the output point cloud) is restored based on the geometric information and attribute information.

[0089] It should be noted that, as shown in FIG4A or FIG4B , the current geometric coding and decoding of G-PCC can be divided into octree-based geometric coding and decoding (marked by a dotted box) and prediction tree-based geometric coding and decoding (marked by a dotted box).

[0090] Octree geometry encoding (OctGeomEnc) involves first transforming the geometric information so that the entire point cloud is contained within a bounding box. Quantization then occurs. This quantization step primarily serves a scaling purpose. Due to quantization rounding, the geometric information of some points becomes identical. Parameters are used to determine whether to remove duplicate points. This process of quantization and removing duplicate points is also known as voxelization. Next, the bounding box is partitioned into trees (e.g., octrees, quadtrees, binary trees, etc.) in a breadth-first traversal order, encoding the placeholder code for each node. In the octree-based geometry encoding framework, the bounding box is sequentially partitioned into subcubes. Subcubes that are not empty (contain points in the point cloud) are partitioned again until the resulting leaf node is a 1x1x1 unit cube. In the case of lossless geometry encoding, the number of points contained in the leaf node is encoded. Finally, the geometric octree encoding is completed, generating a binary bitstream. In the octree-based geometric decoding process, the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in sequence until a 1x1x1 unit cube is obtained. The division stops and the number of points contained in each leaf node is parsed, and finally the geometric reconstructed point cloud information is restored.

[0091] For octree-based geometric decoding, the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in sequence until a 1×1×1 unit cube is obtained. The division stops and the number of points contained in each leaf node is parsed, and finally the geometric reconstructed point cloud information is restored.

[0092] For triangle soup (trisoup)-based geometric information coding, geometric partitioning must also be performed first in the trisoup-based geometric information coding framework. However, unlike geometric information coding based on binary trees, quadtrees, and octrees, this method does not require step-by-step partitioning of the point cloud into unit cubes with side lengths of 1×1×1. Instead, the partitioning stops when the sub-blocks (blocks) have a side length of W. Based on the surface formed by the distribution of the point cloud in each block, the surface and the twelve edges of the block are obtained. The vertex coordinates of each block are encoded in sequence to generate a binary code stream.

[0093] For trisoup-based point cloud geometry reconstruction, when performing point cloud geometry reconstruction at the decoding end, the vertex coordinates are first decoded to complete the triangle face reconstruction. This process is shown in Figures 5A, 5B, and 5C. Among them, there are three intersection points (v1, v2, v3) in the block shown in Figure 5A. The set of triangle faces formed by these three intersection points in a certain order is called triangle soup, or trisoup, as shown in Figure 5B. Afterwards, sampling is performed on the triangle face set, and the obtained sampling points are used as the reconstructed point cloud within the block, as shown in Figure 5C.

[0094] Predictive geometry coding (PredGeomTree) involves first sorting the input point cloud. Currently used sorting methods include unordered, Morton order, azimuth order, and radial distance order. At the encoding end, the prediction tree structure is established using two different methods: a high-latency slow mode (KD-Tree) and a low-latency fast mode (using lidar calibration information). When using lidar calibration information, each point is assigned to a different laser, and a prediction tree structure is established based on the different lasers. Next, based on the prediction tree structure, each node in the prediction tree is traversed. Different prediction modes are selected to predict the node's geometric position information to obtain a geometric prediction residual, which is then quantized using a quantization parameter. Finally, through continuous iteration, the prediction residual of the prediction tree node position information, the prediction tree structure, and the quantization parameter are encoded to generate a binary bitstream.

[0095] When using KD-tree encoding, the encoder first uses the geometric information of the point cloud to perform Morton code sorting. Then, the KD-tree is used to predictively encode the geometric information of the point cloud. This is similar to a single-chain structure, where the parent node predicts the geometric information of the child nodes. As shown in Figure 6, the prediction tree adopts a single-chain structure. Except for the sole leaf node, each tree node has only one child node. Except for the root node, which is predicted by default, the geometric prediction values ​​of other nodes are provided by their parent nodes.

[0096] For geometric decoding based on the prediction tree, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream. Secondly, the geometric position prediction residual information and quantization parameters of each prediction node are obtained through parsing, and the prediction residual is dequantized to restore the reconstructed geometric position information of each node, finally completing the geometric reconstruction at the decoding end.

[0097] After the geometric encoding is completed, the geometric information needs to be reconstructed. At present, attribute encoding is mainly performed on color information. First, the color information is converted from the RGB color space to the YUV color space. Then, the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information. In color information encoding, there are two main transformation methods. One is the distance-based lifting transformation that relies on LOD partitioning, and the other is to directly perform RAHT transformation. Both methods will convert the color information from the spatial domain to the frequency domain, and obtain high-frequency coefficients and low-frequency coefficients through transformation. Finally, the coefficients are quantized and encoded to generate a binary bit stream (which can be simply referred to as "code stream").

[0098] It is understood that in the point cloud AVS codec framework, the geometric information of the point cloud and the attribute information corresponding to each point are also encoded separately. Figure 7A shows a schematic diagram of the composition framework of an AVS encoder, and Figure 7B shows a schematic diagram of the composition framework of an AVS encoder. The geometric encoding of the multi-tree is illustrated as an octree.

[0099] In the framework of the AVS encoder, the geometric information is first transformed into coordinates so that all point clouds are contained in a Bounding Box. Before the preprocessing process, it is decided whether to divide the entire point cloud sequence into multiple slices based on the parameter configuration. Each divided slice is treated as a single independent point cloud for serial processing. The preprocessing process includes quantization and removal of duplicate points. Quantization mainly plays a role in scaling. Due to the quantization rounding, the geometric information of some points is the same. Whether to remove duplicate points is determined based on the parameters. Next, the Bounding Box is divided in the order of breadth-first traversal (octree / quadtree / binary tree), and the placeholder code of each node is encoded. In octree-based geometric coding, the bounding box is divided into sub-cubes in sequence. The sub-cubes that are not empty (contain points in the point cloud) are divided again until the leaf node obtained by division is a 1×1×1 unit cube. Then, in the case of geometric lossless coding, the number of points contained in the leaf node is encoded, and finally the geometric octree encoding is completed to generate a binary geometric bit stream (i.e., geometric code stream). In the framework of the AVS decoder, based on the octree-based geometric decoding process, the decoder obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in sequence until the division is a 1×1×1 unit cube. The number of points contained in each leaf node is parsed and the geometric information is finally recovered.

[0100] After geometric encoding is complete, the geometric information is reconstructed. Currently, attribute encoding primarily targets color and reflectance information. First, a determination is made as to whether color space conversion is required. If so, the color information is converted from RGB to YUV. The reconstructed point cloud is then recolored using the original point cloud to align the unencoded attribute information with the reconstructed geometric information. Color information encoding is divided into two modules: attribute prediction and attribute transformation. The attribute prediction process is as follows: first, the point cloud is reordered, followed by differential prediction. There are two reordering methods: Morton reordering and Hilbert reordering. For cat1A and cat2 sequences, Hilbert reordering is performed; for cat1B and cat3 sequences, Morton reordering is performed. Attribute prediction is then performed on the sorted point cloud using a differential method. Finally, the prediction residual is quantized and entropy coded to generate a binary attribute bitstream. The attribute transformation process is as follows: First, wavelet transform the point cloud attributes and quantize the transform coefficients; second, attribute reconstruction values ​​are obtained through inverse quantization and inverse wavelet transform; then, the difference between the original attribute and the reconstructed attribute value is calculated to obtain the attribute residual and quantized; finally, the quantized transform coefficients and attribute residual are entropy encoded to generate a binary attribute bitstream (i.e., attribute codestream). In the AVS decoder framework, the decoder performs entropy decoding, inverse quantization, attribute prediction compensation / attribute inverse transform, and inverse spatial transform on the attribute bitstream to ultimately recover the attribute information.

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

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

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

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

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

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

[0107] (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.

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

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

[0110] 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.

[0111] 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.

[0112] 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.

[0113] 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.

[0114] 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.

[0115] 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.

[0116] 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.

[0117] 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.

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

[0119] At the encoding end, the entire point cloud is subjected to multi-layer wavelet transform to generate transform coefficients, which are then quantized to generate quantized transform coefficients. Finally, the quantized transform coefficients of the entire point cloud are encoded.

[0120] At the decoding end, decoding obtains the quantized transform coefficients of the entire point cloud, and then dequantizes and inversely transforms the quantized transform coefficients to obtain attribute reconstruction values.

[0121] It should be noted that in the process of encoding the point cloud, there is the use of geometric information encoding context (i.e., the context information of the context model corresponding to the geometric information) and attribute information encoding context (i.e., the context information of the context model corresponding to the attribute information). The geometric information encoding context can be divided into multi-tree encoding context (such as octree encoding context) and prediction tree encoding context. The attribute information encoding context is divided into color encoding context and reflectance attribute encoding context. The specific context information is shown in Table 1 below:

[0122] Table 1

[0123]

[0124] In AVS-PCC, the context information for geometry information coding and attribute information coding will be loaded as a whole during the initialization process, which leads to the following problems:

[0125] 1) In the case of only geometric coding. When multi-tree coding is used, the multi-tree context model one can be used to encode the point cloud. Then the number of contexts actually applied to encoding and decoding is 208 contexts, but 599 contexts need to be initialized in the codec. And if the multi-tree context model two is used for encoding, the number of contexts actually applied to encoding and decoding is 256 contexts, but 599 contexts need to be initialized in the codec. When prediction tree coding is used, the number of contexts actually applied to encoding and decoding is 37 contexts, but 599 contexts need to be initialized in the codec.

[0126] 2) In the case of geometry encoding and attribute encoding, encoding only color information requires the codec to load at least 49 more contexts than the contexts applied to the encoding and decoding process. Encoding only reflectance information requires the codec to load at least 49 more contexts than the contexts applied to the encoding and decoding process.

[0127] Therefore, since the initialization of the geometric information coding context and the attribute information coding context is for the initialization of the overall context model, the context memory will be drastically wasted in actual encoding and decoding, which is very unfriendly to hardware implementation.

[0128] In an embodiment of the present application, in the encoder, the context required for encoding the point cloud is classified, and the initialized context model is selectively loaded according to the encoding method, so that the context model actually used by the codec and the context model allocated by initialization can correspond to each other, and there will be no phenomenon of too many context models being loaded and not used, resulting in memory waste.

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

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

[0131] S101: Analyze the code stream and determine the code stream type.

[0132] In an embodiment of the present application, the decoding method is applied to the process of initializing the context model before performing arithmetic decoding, which can be in the process of decoding geometric information or in the process of decoding attribute information, and the embodiment of the present application does not limit it.

[0133] In an embodiment of the present application, during the encoding process of an image to be processed (e.g., a three-dimensional image model), a point cloud of the three-dimensional image model to be encoded in space is obtained. The point cloud may contain geometric information and attribute information of the three-dimensional image model. During the encoding of the three-dimensional image model, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately. The geometric information of a point can also be referred to as the position information of the point, and the position information of a point can be the three-dimensional coordinate information of the point. The attribute information of a point may include color information and / or reflectivity, etc.

[0134] It should be noted that after the division of the strips (slices) during geometric information encoding is completed, geometric encoding and attribute encoding are performed on the point cloud data of each slice, that is, the point cloud to be processed. In the encoding and decoding process of geometric encoding and decoding and / or attribute encoding and decoding, the encoding and decoding method provided in the embodiment of the present application is adopted.

[0135] In the embodiment of the present application, since geometric coding and / or attribute coding are performed during encoding, the decoder may have multiple stream types when parsing the stream, wherein the stream type may include any of: geometric stream, attribute stream, and sequence-level stream.

[0136] In the embodiment of the present application, the decoder can parse out the code stream type in the byte segment of the code stream by parsing the code stream.

[0137] In some embodiments of this application, different code stream types are represented differently. For example, GPS encodes geometric information, while APS encodes attribute information. By parsing the code stream, the decoder can determine whether it is a geometry code stream or an attribute code stream based on the parsed code stream type. If the code stream type indicates a geometry code stream or an attribute code stream, the decoding method provided in the embodiments of this application is used.

[0138] It should be noted that the header information of the byte stream of the code stream may indicate the code stream type.

[0139] S102: Determine a context model based on the bitstream type.

[0140] S103: Initialize context information of the context model.

[0141] In the embodiment of the present application, the decoder can parse to obtain the type of code stream to which the code stream belongs, so as to determine which context models need to be initialized.

[0142] In some embodiments of the present application, the decoder may determine a first context model corresponding to the geometric code stream based on the geometric code stream indicated by the code stream type; or determine a second context model corresponding to the attribute code stream based on the attribute code stream indicated by the code stream type.

[0143] In this embodiment of the present application, when parsing a bitstream, the decoder can determine the context model corresponding to the bitstream type based on the bitstream type, clarifying whether to decode geometric information or attribute information. In this way, when initializing the context information of the context model, only the context information of the context model corresponding to the bitstream type can be initialized.

[0144] It should be noted that each time a bitstream is parsed, the parsed bitstream can only be of one type. Different types of bitstreams are parsed segment by segment. Therefore, in each bitstream segment parsed by the decoder, the context information of the context model of only one type of bitstream can be initialized before decoding.

[0145] In this embodiment of the present application, the context model may include: a multitree coding model, a prediction tree coding model, a color coding model, and a reflectivity coding model. The geometry codestream corresponds to the multitree coding model and the prediction tree coding model, while the attribute codestream corresponds to the color coding model and the reflectivity coding model.

[0146] In an embodiment of the present application, if the code stream type is a geometric code stream, the context information of the multi-tree coding model and the prediction tree coding model is initialized; if the code stream type is an attribute code stream, the context information of the color coding model and the reflectivity coding model is initialized.

[0147] It should be noted that the context model initialization process can be understood as the process of allocating memory for a pre-set context model and then loading the context model. Each context model can correspond to multiple pieces of context information. During the encoding and decoding process, it is necessary to determine the specific context information used for encoding and decoding from the large amount of loaded context information, and then perform encoding and decoding based on the context information. The process of determining the context model will be discussed in the subsequent encoding method.

[0148] S104: Decode the current node based on the context information.

[0149] In some embodiments of the present application, when performing geometric encoding, the encoder will determine the context information corresponding to the current node and encode the placeholder information of the current node. Or when performing attribute encoding of the current node, the context information corresponding to the current node will be used to encode the coefficients after the attribute information is transformed; when performing attribute encoding of the current node, the context information corresponding to the current node will be used to encode the predicted residual information of the attribute. Therefore, during the corresponding decoding process, the decoder needs to first initialize the context information of the set context model, so that when decoding the current node, the specific context information used in the encoding can be determined based on the index of the parsed context model, thereby realizing various decoding methods for the current node.

[0150] It can be understood that, at the decoding end, the decoder can use the parsed bitstream type to, when decoding using context information, only need to initialize the context information of the context model that is consistent with the parsed bitstream type, so that the context information required for decoding is loaded at the time of initialization, thereby ensuring the efficiency of decoding. At the same time, all context models are not loaded, saving memory resources allocated to the context model, thereby achieving the purpose of reducing memory overhead during decoding and improving the utilization of memory resources.

[0151] In some embodiments of the present application, the context model includes: a first context model corresponding to the geometry code stream and a second context model corresponding to the attribute code stream. The process of determining the initialized context model based on the different code stream types by the decoder includes:

[0152] S201, parsing the code stream and determining the code stream type;

[0153] S202: Determine a first context model corresponding to the geometric code stream based on the geometric code stream indicated by the code stream type;

[0154] S203: Initialize context information of the first context model;

[0155] S204: Decode the current node based on the context information of the first context model;

[0156] S205: Determine a second context model corresponding to the attribute code stream based on the attribute code stream indicated by the code stream type;

[0157] S206: Initialize context information of the second context model;

[0158] S207: Decode the current node based on the context information of the second context model.

[0159] In the embodiment of the present application, the first context model includes: a multitree coding model and a prediction tree coding model corresponding to the geometry code stream. The second context model includes: a color coding model and a reflectivity coding model corresponding to the attribute code stream.

[0160] It should be noted that the parsing of the geometric code stream and the parsing of the attribute code stream are not carried out synchronously. When the decoder decodes the current node based on the context information of the second context model, the geometric reconstruction information of the current node that has been decoded from the geometric information is also required to realize the decoding of the attribute information of the current node.

[0161] It can be understood that at the decoding end, the decoder can use the parsed code stream type to, when using context information decoding, only need to initialize the context information of the first context model or the second context model that is consistent with the parsed code stream type, so that the context information required for decoding geometric information or decoding attribute information has been loaded at the time of initialization, ensuring the efficiency of decoding. At the same time, all context models are not loaded, saving memory resources allocated to the context model, achieving the purpose of reducing memory overhead during decoding and improving the utilization of memory resources.

[0162] In some embodiments of the present application, the process of determining the context model by the decoder based on the bitstream type can be further subdivided into the level of the context model corresponding to the prediction method during encoding for geometric information; or, it can be subdivided into the level of the context model corresponding to different attribute information during encoding for attribute information.

[0163] In an embodiment of the present application, the coding type is used to indicate the prediction method (multi-tree coding or prediction tree coding) used in the coding process of geometric information, or to indicate the type of attribute information of one type or two types of attribute information used in the coding process of attribute information.

[0164] In an embodiment of the present application, the decoder may determine the first syntax element information based on the bitstream type; and determine the context model based on the encoding type indicated by the first syntax element information.

[0165] In the embodiment of the present application, the first syntax element information is a syntax element indicating the encoding type parsed from the code stream.

[0166] Exemplarily, during the decoding process of geometric information, the first syntax element information is geomTreeType in GPS. geomTreeType is used to indicate whether the encoding type is multi-tree encoding or prediction tree encoding.

[0167] In the decoding process of attribute information, the first syntax element information is an identification bit in APS, which is used to indicate whether the attribute information is encoded for one type of attribute information or for several types of attribute information, that is, it is used to indicate whether the encoding type is color encoding, reflectivity encoding and normal vector encoding of several attribute information, that is, what encoding types are there.

[0168] It should be noted that the embodiments of the present application do not limit the types of attribute information.

[0169] In some embodiments of the present application, when decoding geometric information, the code stream type includes: geometric code stream; the decoding method further includes:

[0170] S301, parsing the code stream and determining the code stream type;

[0171] In the embodiment of the present application, the description process of S301 is consistent with the description of S101 and will not be repeated here.

[0172] S302: If the code stream type indicates a geometry code stream, parse the geometry code stream to determine first syntax element information related to the geometry code stream; the first syntax element information indicates a coding type of the geometry information; the coding type of the geometry information includes: multitree coding or prediction tree coding;

[0173] In an embodiment of the present application, when the first syntax element indicates that the encoding mode is a geometric code stream, the decoder can parse the first syntax element information (geomTreeType) corresponding to the geometric code stream from the geometric code stream, and then determine the first context model corresponding to the encoding type used during decoding based on whether the first syntax element information indicates multi-tree encoding or prediction tree encoding. The first context model here is a prediction tree coding model or a multi-tree coding model.

[0174] S303: If the first syntax element information indicates multi-tree coding, determine a first context model corresponding to the multi-tree coding;

[0175] In the embodiment of the present application, if the first syntax element information indicates multi-tree coding, a multi-tree coding model corresponding to the multi-tree coding is determined.

[0176] S304: If the first syntax element information indicates prediction tree coding, determine a first context model corresponding to the prediction tree coding.

[0177] In an embodiment of the present application, if the first syntax element information indicates multi-tree coding, a prediction tree coding model corresponding to the prediction tree coding is determined.

[0178] It should be noted that S303 and S304 are two optional solutions after S302, and S303 or S304 is executed according to actual circumstances.

[0179] S305: Initialize context information of the first context model;

[0180] In the embodiment of the present application, if the first syntax element information indicates multi-tree coding, the context information (464 contexts) of the multi-tree coding model is initialized, and the decoder allocates memory resources for the context information of the multi-tree model.

[0181] If the first syntax element information indicates prediction tree coding, the context information (37 contexts) of the prediction tree coding model is initialized. The decoder allocates memory resources for the context information of the prediction tree model.

[0182] S306: Decode the current node based on the context information of the first context model.

[0183] In an embodiment of the present application, if the first syntax element information indicates multi-tree coding, the coding information of the current node is decoded based on the context information (464 contexts) of the multi-tree coding model to obtain the placeholder information of the current node.

[0184] If the first syntax element information indicates prediction tree coding, the coding information of the current node is decoded based on the context information (37 contexts) of the prediction tree coding model to obtain the prediction residual of the current node.

[0185] It can be understood that in the decoding process of geometric information, the decoder can determine the context model consistent with the coding type by parsing the first syntax element information, and only allocate memory resources to one of the multi-tree coding model and the prediction tree coding model that is consistent with the coding type, and discard the other coding model of the multi-tree coding model and the prediction tree coding model that is inconsistent with the coding type, further refine the classification of the initialized coding model, reduce the occupancy of memory resources, and improve resource utilization while ensuring decoding efficiency.

[0186] Exemplarily, as shown in Table 2, the context of point cloud information encoding is classified into four categories: multi-branch tree decoding model, prediction tree decoding model, color decoding model and reflectivity decoding model.

[0187] Table 2

[0188]

[0189] In an embodiment of the present application, the first syntax element is used to determine which type of model to load from the multi-tree decoding model, the prediction tree decoding model, the color decoding model, and the reflectivity decoding model to implement the decoding process of this code stream.

[0190] It should be noted that in the decoder, when the decoder only performs geometric information decoding, the decoder only needs to choose according to the method of decoding the point cloud geometric information: initialize the multi-tree decoding model or initialize the prediction tree encoding and decoding model; this allows the context model actually used by the decoder to correspond to the assigned context model, and there will be no waste of context model memory.

[0191] In some embodiments of the present application, after S302 and before S305, a decoding method provided by an embodiment of the present application may further include:

[0192] S307: Determine second syntax element information based on the coding type indicated by the first syntax element information; the second syntax element information indicates a model type when the geometric information is coded using a multitree;

[0193] In the embodiment of the present application, the model for multi-tree coding, that is, the multi-tree coding model, may include multiple multi-tree context models.

[0194] Exemplarily, the multitree coding model may include multiple model types such as multitree context model 1, multitree context model 2, and multitree context model 3, which is not limited in the embodiments of the present application.

[0195] In some embodiments of the present application, if the first syntax element information indicates multi-tree coding, the geometry code stream is parsed to determine the second syntax element information corresponding to the multi-tree coding.

[0196] In an embodiment of the present application, during the decoding process of geometric information, if the coding type indicated by the first syntax element information is multi-tree coding, the decoder parses the geometric code stream to determine the second syntax element information indicating the model type when the geometric information is encoded using multi-tree coding.

[0197] For example, the specific model type among the multiple multi-tree context models can be determined by geom_context_mode in gbh.

[0198] S308. Determine a context model based on the model indicated by the second syntax element information; the context model includes: a first context model.

[0199] In an embodiment of the present application, if the model type indicated by the second syntax element information is multi-tree context model one, the first context model is multi-tree context model one.

[0200] If the model type indicated by the second syntax element information is multi-tree context model 2, the first context model is multi-tree context model 2.

[0201] If the model type indicated by the second syntax element information is multi-tree context model three, the first context model is multi-tree context model three.

[0202] In an embodiment of the present application, the decoder is initialized according to a specific multi-tree context model type indicated by the second syntax element information in the multi-tree coding model, thereby reducing memory allocation for other multi-tree context models.

[0203] For example, as shown in Table 2, the types of multitree coding models may include multitree context model 1 and multitree context model 2. Then, in the process of geometric information encoding, there are two types of coding modes in the case of multitree encoding, so the point cloud multitree coding model can be further classified into: multitree coding model 1 and multitree coding model 2. In this way, the context of point cloud information encoding is classified into five categories: multitree decoding model 1, multitree decoding model 2, prediction tree decoding model, color decoding model and reflectivity decoding model. The embodiment of the present application does not limit the number of types of multitree models.

[0204] It can be understood that in the decoding process of geometric information, the decoder can determine the context model that is consistent with the multi-tree context model type used for encoding among multiple multi-tree context models by parsing the second syntax element information, and only allocate memory resources to the multi-tree context model type that is consistent with the multi-tree context model type used for encoding, and discard other multi-tree context model types and other coding models, further refine the classification of the initialized multi-tree coding model, reduce the occupancy of memory resources, and improve resource utilization while ensuring decoding efficiency.

[0205] In some embodiments of the present application, when decoding attribute information, the code stream type includes: attribute code stream; the decoding method further includes:

[0206] S401, parsing the code stream and determining the code stream type;

[0207] In the embodiment of the present application, the description process of S301 is consistent with the description of S101 and will not be repeated here.

[0208] S402: If the code stream type indicates an attribute code stream, parse the attribute code stream to determine first syntax element information related to the attribute code stream; the first syntax element information indicates a coding type of the attribute information; the coding type of the attribute information includes: color coding, reflectivity coding, or normal vector coding;

[0209] In an embodiment of the present application, when the first syntax element indicates that the encoding method is an attribute code stream, the decoder can parse the first syntax element information (flag identification bit) corresponding to the attribute code stream from the geometric code stream, and then based on the fact that the first syntax element information indicates the encoding of several attribute information such as color coding, reflectivity coding and normal vector coding, it can also indicate the decoding method of the specific attribute to implement the decoding of different attribute information respectively, thereby determining the second context model corresponding to the encoding type used during decoding, where the second context model is a color coding model, a reflectivity coding model or a normal vector coding model.

[0210] The first syntax element information indicates at least two of color coding, reflectivity coding, and normal vector coding, which is not limited in the present application.

[0211] S403: If the first syntax element information indicates color coding, determine a second context model and a decoding method of the attribute corresponding to the color coding;

[0212] In the embodiment of the present application, if the first syntax element information indicates color coding, a color coding model corresponding to the color coding and reflectivity coding is determined.

[0213] S404: If the first syntax element information indicates reflectivity coding, determine a decoding method for a second context modulus and attribute corresponding to the reflectivity coding.

[0214] In an embodiment of the present application, if the first syntax element information indicates reflectivity coding, a decoding method of a reflectivity coding model and attributes corresponding to the reflectivity coding is determined.

[0215] S405: If the first syntax element information indicates normal vector encoding, determine a second context modulus corresponding to the normal vector encoding.

[0216] In an embodiment of the present application, if the first syntax element information indicates normal vector coding, a normal vector coding model corresponding to the normal vector coding is determined.

[0217] It should be noted that the decoding method of the attribute indicated by the first syntax element information is used in the subsequent decoding process.

[0218] It should be noted that S403 to S405 are three optional solutions after S402, and one of S403 to S405 is executed according to actual circumstances.

[0219] S406: Initialize context information of the second context model;

[0220] In this embodiment of the present application, if the first syntax element information indicates at least two of color coding, reflectivity coding, and normal vector coding, the color coding model (49 contexts), the reflectivity coding model (49 contexts), and the normal vector coding model are initialized. The decoder allocates memory resources for the context information of the color coding model, the reflectivity coding model, and the normal vector coding model.

[0221] In the embodiment of the present application, if the first syntax element information indicates color coding, the color coding model (49 contexts) is initialized, and the decoder allocates memory resources for the context information of the color coding model.

[0222] In the embodiment of the present application, if the first syntax element information indicates reflectivity coding, the reflectivity coding model (49 contexts) is initialized, and the decoder allocates memory resources for the context information of the reflectivity coding model.

[0223] In an embodiment of the present application, if the first syntax element information indicates normal vector coding, a normal vector coding model is initialized, and the decoder allocates memory resources for context information of the normal vector coding model.

[0224] In some embodiments of the present application, after the first syntax element information is parsed, when parsing each bitstream segment, since different attribute coding information is in different bitstream segments, the decoder can also parse the coding type in the byte segment of each bitstream segment. The process of the decoder determining the context model can also be implemented as follows:

[0225] If the encoding type of the attribute information in the bitstream indicates normal vector encoding, determining a second context model corresponding to the normal vector encoding; or

[0226] If the encoding type of the attribute information in the code stream indicates color coding, determining a second context model corresponding to the color coding; or

[0227] If the encoding type of the attribute information in the code stream indicates reflectivity coding, a second context modulus corresponding to the reflectivity coding is determined.

[0228] S407: Decode the current node based on the context information of the second context model.

[0229] In an embodiment of the present application, if the first syntax element information indicates reflectivity coding, the current node is decoded based on the reflectivity coding model (49 contexts) and the attribute decoding method.

[0230] If the first syntax element information indicates normal vector coding, the current node is decoded based on the normal vector coding model.

[0231] It can be understood that in the decoder, the context of point cloud information encoding is classified into five categories: multi-tree decoding model (consistent with the multi-tree encoding model), prediction tree decoding model (consistent with the prediction tree encoding model), color decoding model (consistent with the color encoding model), reflectivity decoding model (consistent with the reflectivity encoding model) and normal vector decoding model (consistent with the normal vector encoding model). When the decoder decodes the geometry and attribute information, it is necessary to initialize the corresponding geometry decoding model and the corresponding attribute decoding model according to the geometry encoding residual. For example, if only the color is decoded, then only the color decoding model needs to be initialized in the attribute decoding model. If only the reflectivity attribute is decoded, then only the reflectivity decoding context model needs to be initialized in the attribute decoding model. If only the normal attribute is decoded, then only the normal decoding context model needs to be initialized in the attribute decoding model. This allows the context model actually used by the decoder to correspond to the allocated context model, and there will be no waste of context model memory.

[0232] In some embodiments of the present application, if the encoding type of the attribute information indicates color coding, the context information of the second context model corresponding to the color coding is initialized in the first decoding core; through the first decoding core, the color coding information of the current node is decoded based on the context information of the second context model (color coding model) corresponding to the color coding.

[0233] If the encoding type of the attribute information indicates reflectivity coding, the context information of the second context model corresponding to the reflectivity coding is initialized in the second decoding core; through the second decoding core, the reflectivity information of the current node is decoded based on the context information of the second context model (reflectivity coding model) corresponding to the reflectivity coding.

[0234] If the encoding type of the attribute information indicates normal vector encoding, the context information of the second context model corresponding to the normal vector encoding is initialized in the third decoding core; based on the context information of the second context model (normal vector encoding model) corresponding to the normal vector encoding, the normal vector of the current node is decoded.

[0235] In the decoder, there can be multiple independent decoding cores, one for each attribute information, and each attribute information can be independently decoded, which can speed up the attribute decoding. In the embodiment of the present application, the context model of color coding, the context model of reflectivity coding, and the context model of normal vector coding are separated from each other and cannot generate a mutually dependent relationship. The context models between color, reflectivity, and normal vector are independent of each other and do not generate a mutually dependent relationship.

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

[0237] S501. Determine the encoding method of the point cloud; the encoding method is used to indicate geometric encoding or attribute encoding.

[0238] S502: Determine a context model based on the encoding method.

[0239] S503: When encoding the current node according to the encoding method, initialize the context information of the context model.

[0240] In an embodiment of the present application, before encoding the point cloud, after loading the point cloud data, the encoding configuration file may indicate information such as the encoding method and encoding type.

[0241] In an embodiment of the present application, the encoder determines the encoding method of the point cloud through a configuration file; the encoding method is used to indicate geometric encoding or attribute encoding.

[0242] In some embodiments of the present application, the encoder may determine a first context model corresponding to the geometric coding based on the geometric coding indicated by the encoding method; and / or determine a second context model corresponding to the attribute coding based on the attribute coding indicated by the encoding method.

[0243] In the embodiment of the present application, the encoder can determine the context model corresponding to the encoding mode according to the encoding mode, and clearly specify whether it is the encoding of geometric information or the encoding of attribute information. In this way, when initializing the context information of the context model, only the context information of the context model corresponding to the encoding mode can be initialized.

[0244] It should be noted that each time a piece of information is encoded, the encoding method can only be one type of encoding, and different types of encoding are encoded independently. Therefore, in each encoded bit stream, the encoder can only initialize the context information of the context model of one encoding method before arithmetic coding.

[0245] In the embodiment of the present application, the context model may include: a multitree coding model, a prediction tree coding model, a color coding model, and a reflectivity coding model. Among them, geometry coding corresponds to the multitree coding model and the prediction tree coding model. Attribute coding corresponds to the color coding model and the reflectivity coding model.

[0246] In an embodiment of the present application, if the encoding method is geometric coding, the context information of the multi-tree coding model and the prediction tree coding model is initialized; if the encoding method is attribute coding, the context information of the color coding model, the reflectivity coding model or the normal vector coding model is initialized.

[0247] It should be noted that the context model initialization process can be understood as the process of allocating memory for a pre-set context model and then loading the context model. Each context model can correspond to multiple pieces of context information. During the encoding and decoding process, it is necessary to determine the specific context information used for encoding and decoding from the large amount of loaded context information, and then perform encoding and decoding based on the context information. The process of determining the context model will be discussed in the subsequent encoding method.

[0248] S504: Encode the current node based on the context information.

[0249] In some embodiments of the present application, when performing geometric encoding, the encoder determines the context information corresponding to the current node and encodes the current node. Alternatively, when performing attribute encoding of the current node, the encoder uses the context information corresponding to the current node to encode the coefficients after the attribute information is transformed.

[0250] It is understandable that, at the encoding end, the encoder can determine whether to perform geometric encoding or attribute encoding by determining the encoding method of the point cloud during encoding. It can also determine whether to initialize the context information of the context model corresponding to the geometric information or the context information of the context model corresponding to the attribute information based on the encoding method. This only requires initializing the context information of the context model consistent with the parsed encoding method. This ensures that the context information required for encoding is already loaded at initialization, ensuring encoding efficiency. At the same time, context models for all encoding methods are not loaded, saving memory resources allocated to the context model, thereby reducing memory overhead during encoding and improving memory resource utilization.

[0251] In some embodiments of the present application, the context model includes: a first context model corresponding to geometry coding and a second context model corresponding to attribute coding. The process of determining the initialized context model based on different encoding modes includes:

[0252] S601. Determine the encoding method of the point cloud; the encoding method is used to indicate geometric encoding or attribute encoding.

[0253] S602: If the coding mode indicates geometric coding, determine a first context model corresponding to the geometric coding;

[0254] S603: When encoding the current node according to the encoding mode, initialize context information of the first context model.

[0255] S604: Encode the current node based on the context information of the first context model.

[0256] S605: If the encoding mode indicates attribute encoding, determine a second context model corresponding to the attribute encoding.

[0257] S606: When encoding the current node according to the encoding mode, initialize context information of the second context model.

[0258] S607: Encode the current node based on the context information of the second context model.

[0259] S608: Write the encoding mode into the code stream as the code stream type.

[0260] In the embodiment of the present application, the first context model includes: a multitree coding model and a prediction tree coding model corresponding to geometry coding. The second context model includes: a color coding model and a reflectivity coding model corresponding to attribute coding.

[0261] It should be noted that geometric coding and attribute coding are not performed synchronously. When the encoder encodes the current node based on the context information of the second context model, the geometric reconstruction information of the current node that has been geometrically encoded is also required to realize the encoding of the attribute information of the current node.

[0262] It can be understood that the encoder can use the encoding method, and then when using context information encoding, it only needs to initialize the context information of the first context model or the information of the second context model that is consistent with the encoding method, so that the context information required for encoding geometric information or encoding attribute information is loaded at the time of initialization, thereby ensuring the efficiency of encoding. At the same time, all context models are not loaded, saving memory resources allocated to the context model, achieving the purpose of reducing memory overhead during encoding and improving the utilization of memory resources.

[0263] In some embodiments of the present application, the process of determining the context model by the encoder based on the encoding method can be further subdivided into the level of the context model corresponding to the prediction method during encoding for geometric information; or, it can be subdivided into the level of the context model corresponding to different attribute information during encoding for attribute information.

[0264] In an embodiment of the present application, the coding type is used to indicate the prediction method (multi-tree coding or prediction tree coding) used in the coding process of geometric information, or to indicate the type of attribute information used in the coding process of attribute information, whether one type of attribute information or at least two types of attribute information are used.

[0265] In some embodiments of the present application, the encoder determines an encoding type corresponding to the encoding mode; and determines a context model based on the encoding type.

[0266] In some embodiments of the present application, the geometric information is encoded, and the encoding method further includes:

[0267] S701. Determine the encoding method of the point cloud; the encoding method is used to indicate geometric encoding.

[0268] In the embodiment of the present application, the description process of S701 is consistent with the description of S501 and will not be repeated here.

[0269] S702, determining a coding type corresponding to the coding mode; the coding type includes: multi-tree coding or prediction tree coding;

[0270] In an embodiment of the present application, when the encoding method is geometric coding, the encoding type corresponding to the encoding method can be determined, and then based on whether the encoding type indicates multi-tree coding or prediction tree coding, the first context model corresponding to the encoding type used during encoding can be determined. The first context model here is a prediction tree coding model or a multi-tree coding model.

[0271] S703: If the coding type indicates multi-tree coding, determine a first context model corresponding to the multi-tree coding or a first context model corresponding to the type of the first context model corresponding to the multi-tree coding; the context model includes: a first context model.

[0272] In an embodiment of the present application, if the encoding type indicates multi-tree encoding, all multi-tree context models corresponding to the multi-tree encoding are determined, or a multi-tree context model corresponding to multiple multi-tree encodings used in encoding is determined.

[0273] S704: If the coding type indicates prediction tree coding, determine a first context model corresponding to the prediction tree coding.

[0274] In an embodiment of the present application, if the coding type indicates prediction tree coding, a prediction tree coding model corresponding to the prediction tree coding is determined.

[0275] S705 : When encoding the current node according to the encoding method, initialize context information of the first context model.

[0276] In the embodiment of the present application, if the coding type indicates multi-tree coding, the context information (464 contexts) of the multi-tree coding model is initialized. The encoder allocates memory resources for the context information of the multi-tree model.

[0277] If the coding type indicates prediction tree coding, the context information (37 contexts) of the prediction tree coding model is initialized. The encoder allocates memory resources for the context information of the prediction tree model.

[0278] S706: Encode the current node based on the context information of the first context model.

[0279] In an embodiment of the present application, if the coding type indicates multi-tree coding, the current node is encoded based on the context information (464 contexts) of the multi-tree coding model.

[0280] If the coding type indicates prediction tree coding, the current node is encoded based on the context information (37 contexts) of the prediction tree coding model.

[0281] S707: Use the encoding method as the code stream type and write it into the code stream.

[0282] S708: Write the coding type into the bitstream as the first syntax element information.

[0283] Exemplarily, during the decoding process of geometric information, the first syntax element information is geomTreeType in GPS. geomTreeType is used to indicate whether the encoding type is multi-tree encoding or prediction tree encoding.

[0284] During the decoding process of attribute information, the first syntax element information is an identification bit in the APS, which is used to indicate whether the attribute information is encoded for a single attribute information or for multiple attribute information. That is, it is used to indicate whether the encoding type is color encoding, reflectivity encoding, and normal vector encoding, and the encoding method of the attribute is used. For example, for color encoding, the encoding method of the attribute may include prediction or transformation. Before the attribute is specifically encoded, the information indicating whether the encoding type is color encoding, reflectivity encoding, and normal vector encoding, and the encoding method of the attribute can be written into the bitstream as the first syntax element information.

[0285] It can be understood that in the encoding process of geometric information, the encoder can determine the context model consistent with the encoding type through the encoding type, and only allocate memory resources to one of the multi-tree encoding model and the prediction tree encoding model that is consistent with the encoding type, and discard the other encoding model of the multi-tree encoding model and the prediction tree encoding model that is inconsistent with the encoding type, further refine the classification of the initialized encoding model, reduce the occupancy of memory resources, and improve resource utilization while ensuring encoding efficiency.

[0286] Exemplarily, as shown in Table 2, the context of point cloud information encoding is classified into four categories: multi-branch tree decoding model, prediction tree decoding model, color decoding model and reflectivity decoding model.

[0287] When the encoder encodes only geometric information, it only needs to select the method for encoding the point cloud geometry: initialize the multitree coding model or initialize the prediction tree coding model. When the encoder encodes geometric information, it needs to initialize the corresponding geometric coding model based on the geometric coding residual. This ensures that the context model actually used by the encoder corresponds to the assigned context model, and avoids wasting context model memory.

[0288] S709: If the coding type indicates multi-tree coding, write the type of the first context model corresponding to the multi-tree coding into the bitstream as second syntax element information.

[0289] It should be noted that, in the embodiment of the present application, the model for multi-tree coding, that is, the multi-tree coding model, may include multiple types of multi-tree context models.

[0290] Exemplarily, the multitree coding model may include types such as multitree context model 1, multitree context model 2, and multitree context model 3, which are not limited in the embodiments of the present application.

[0291] In some embodiments of the present application, if the coding type indicates multi-tree coding, a specific context model type corresponding to the multi-tree coding is determined from multiple multi-tree context models, that is, a type of a first context model corresponding to the multi-tree coding is determined.

[0292] It should be noted that the multi-tree coding model corresponds to multiple multi-tree coding models (ie, first context models), and the multiple multi-tree coding models may belong to different types of multi-tree coding models (ie, types of first context models).

[0293] Exemplarily, the multitree coding model includes: a plurality of multitree coding model types, and each multitree coding model type corresponds to at least one multitree model.

[0294] In an embodiment of the present application, the encoder can determine that all multi-tree coding models corresponding to the multi-tree coding are first context models; it can also specifically determine the type of the first context model corresponding to the multi-tree coding, and determine the multi-tree coding model corresponding to the type of the first context model in the multi-tree coding model as the first context model.

[0295] It can be understood that in the process of encoding geometric information, when encoding the multi-tree coding model, other multi-tree coding models in the multi-tree coding model that are inconsistent with the type of the first context model are discarded, and the classification of the initialized multi-tree coding model is further refined, thereby reducing the occupation of memory resources and improving resource utilization while ensuring coding efficiency.

[0296] In an embodiment of the present application, during the encoding process of geometric information, if the encoding type indicated by the encoding type is multitree encoding, the encoder determines the type of a multitree context model indicating that the geometric information is encoded using multitree encoding, and writes the type of the multitree context model into the bitstream as second syntax element information.

[0297] For example, the type of the specific model among the multiple multi-tree context models can be determined by geom_context_mode in gbh.

[0298] In the embodiment of the present application, if a multi-tree context model type is multi-tree context model one, the first context model is the multi-tree context corresponding to the multi-tree context model one.

[0299] If a multi-tree context model type is multi-tree context model 2, the first context model is the multi-tree context corresponding to the multi-tree context model 2.

[0300] If a multi-tree context model type is multi-tree context model three, the first context model is the multi-tree context corresponding to the multi-tree context model three.

[0301] In an embodiment of the present application, the encoder initializes the multitree context corresponding to the specific multitree context model type indicated in the multitree coding model, thereby reducing memory allocation for other multitree context model types.

[0302] For example, as shown in Table 2, multitree coding model types can include multitree context model 1 and multitree context model 2. During the geometric information encoding process, there are two coding modes in the case of multitree encoding. Therefore, the point cloud multitree coding model can be further classified into: multitree coding model 1 and multitree coding model 2. Thus, the context of point cloud information encoding can be classified into five categories: multitree decoding model 1, multitree decoding model 2, prediction tree decoding model, color decoding model, and reflectance decoding model.

[0303] For example, in the current AVS geometric coding, there are two coding methods, one is octree coding and the other is prediction tree coding.

[0304] Octree encoding: If octree encoding is used, there are two context encoding models. Context model 1 is used for cat1-A and cat2 point cloud sequences; context model 2 is used for cat1-B and cat3 sequences.

[0305] Multi-tree context model 1: This model includes the sub-layer neighbor prediction of the current point and the neighbor prediction of the current point layer.

[0306] 1) Sub-layer neighbor prediction of the current point

[0307] Under the octree breadth-first traversal division method, the neighbor information that can be obtained when encoding the child node of the current point includes the neighbor child nodes in the three directions of left, front, and bottom. The context model of the child node layer is designed as follows: for the child node layer to be encoded, search for the occupancy of the three coplanar, three colinear, and one co-point nodes in the left, front, and bottom directions of the same layer as the child node to be encoded, as well as the node in the negative direction of the dimension with the shortest node side length, which is two node side lengths away from the current child node to be encoded. Taking the node with the shortest side length in the X dimension as an example, the reference nodes selected by each child node are shown in Figures 10A-10H. The dotted box node is the current node, the gray node is the current child node to be encoded, and the solid box node is the reference node selected by each child node.

[0308] Among them, the occupancy of the 3 coplanar nodes, the 3 collinear nodes and the node with the shortest side length in the negative direction away from the current sub-node to be encoded is considered in detail. The occupancy of these 7 nodes is 2 7 = 128 cases. If not all are unoccupied, there are 2 7-1 = 127 cases, with one context model assigned to each. If all seven nodes are unoccupied, the occupied position of the common neighboring node is considered. This common neighbor has two possibilities: occupied or unoccupied. A separate context is assigned to the occupied case of the common neighboring node. If this common neighboring node is also unoccupied, the occupied position of the current node's neighbors, described below, is considered. Thus, the neighbors at the subnode level to be encoded correspond to a total of 127 + 2 - 1 = 128 contexts.

[0309] 2) Neighbor prediction of the current node layer

[0310] If the eight reference nodes in the same layer of the child node to be encoded are not occupied, the occupancy of the four groups of neighbors in the current node layer is considered as shown in Figures 11A-11D. The dotted frame node is the current node, and the solid frame node is the neighbor node.

[0311] For the current node layer, the context is determined as follows:

[0312] First, consider the three coplanar neighbors to the upper right of the current node. The occupancy of the three coplanar neighbors to the upper right of the current node is 2 3 = 8 possibilities. Each case where the nodes are not completely unoccupied is assigned a context. Considering that the child node to be coded is located at the current node's position, this group of neighboring nodes provides a total of (8-1) × 8 (8 child nodes to be coded, multiplied by 8) = 56 context models. If the three coplanar neighbors to the upper right of the current node are unoccupied, then the remaining three groups of neighbors at the current node level are considered.

[0313] Secondly, consider the distance between the most recently occupied node and the current node. The specific correspondence between the distribution of neighbor nodes and distance is shown in Table 3.

[0314] Table 3

[0315] The current node layer occupancy situation is 1: the distance between the left front and lower coplanar neighbors occupied or the upper right and rear collinear neighbors occupied. The left front and lower coplanar neighbors and the upper right and rear collinear neighbors are not occupied, and the left front and lower collinear neighbors are occupied. 2: none of the four groups of neighbors of the current node layer are occupied. 3:

[0316] As shown in Table 3, the distance has three possible values. One context is assigned to each of these three values ​​(the same number as the number of distance types). Considering the position of the child node to be encoded at the current node, there are a total of 3×8=24 contexts.

[0317] So far, this set of context models has allocated a total of 128+56+24=208 contexts.

[0318] Multi-tree context model 2: This method uses a two-layer context reference relationship configuration, as shown in formula (1). The first layer is the occupancy of the encoded adjacent blocks of the parent node of the current sub-block to be encoded (i.e., ctxIdxParent), and the second layer is the occupancy of the adjacent encoded blocks at the same depth as the current sub-block to be encoded (i.e., ctxIdxChild).

[0319] First, for each sub-block to be coded, the ctxIdxChild of the second layer is as shown in formula (2), Indicates that the current sub-block Occupancy of the three coded sub-blocks with a distance of 1.

[0320] idx=LUT[ctxIdxParent][ctxIdxChild] (1)

[0321]

[0322]

[0323] Secondly, for the relative positions of different sub-blocks, the first layer’s ctxIdxParent is used to find the adjacent parent blocks that are coplanar and colinear with them by looking up the table, and then calculates ctxIdxParent according to the occupancy of the adjacent parent blocks according to formula (3). As shown in Figures 12A-12H, each sub-graph shows the relative position relationship of the 6 adjacent parent blocks found by the i-th sub-block, including 3 coplanar parent blocks (P i,0 ,P i,1 ,P i,2 ) and 3 collinear parent blocks (P i,3 ,P i,4 ,P i,5 The positional relationship between each sub-block and its adjacent parent block is obtained using the method in Table 1. The numbers in Table 4 correspond to the Morton numbers in Figure 13. This method takes into account the different sub-block positions and the geometric central rotational symmetry. As can be seen from Figure 13, with the current block as the center, this method has a larger receptive field and can utilize up to 18 adjacent encoded parent blocks in the surrounding area. The method used in Equation (3) is the combination of the occupancy of the three coplanar parent blocks and the sum of the occupancy of the three collinear parent blocks.

[0324] Therefore, the number of contexts used in this method is at most 2 3 ×2 5 =256.

[0325] Table 4

[0326] P i,jj=0j=1j=2j=3j=4j=5i=041012139i=1410141511i=2416127315i=3416147 517i=422101219219i=5221014192311i=6221612252115i=7221614252317

[0327] It can be understood that in the process of encoding geometric information, the encoder can determine the context model that is consistent with the type of multi-tree context model used for encoding among multiple multi-tree context models, and only allocate memory resources to the multi-tree context model type that is consistent with the type of multi-tree context model used for encoding, discarding other multi-tree context models and other coding models, further refining the classification of the initialized multi-tree coding model, reducing the occupancy of memory resources, and improving resource utilization while ensuring coding efficiency.

[0328] In some embodiments of the present application, when encoding attribute information, the encoding method further includes:

[0329] S801. Determine the encoding method of the point cloud; the encoding method is used to indicate attribute encoding.

[0330] In the embodiment of the present application, the description process of S801 is consistent with the description of S501 and will not be repeated here.

[0331] S802: Determine a coding type corresponding to the coding method; the coding type includes: color coding, reflectivity coding, or normal vector coding.

[0332] In an embodiment of the present application, when the first syntax element indicates that the encoding method is attribute encoding, the encoder can determine the encoding type corresponding to the attribute encoding, and then, based on whether the encoding type indicates color encoding, reflectivity encoding, or color encoding normal vector encoding, determine the second context model corresponding to the encoding type used during encoding. The second context model here is a color encoding model, a reflectivity encoding model, or a normal vector encoding model.

[0333] It should be noted that the embodiments of the present application do not limit the types of attribute information.

[0334] S803. If the encoding type indicates normal vector encoding, determine a second context model corresponding to the normal vector encoding; the context model includes: a second context model.

[0335] In an embodiment of the present application, if the encoding type indicates normal vector encoding, a normal vector encoding model corresponding to the normal vector encoding is determined.

[0336] S804: If the encoding type indicates color encoding, determine a second context model corresponding to the color encoding.

[0337] In the embodiment of the present application, if the encoding type indicates color encoding, a color encoding model corresponding to the color encoding is determined.

[0338] S805: If the coding type indicates reflectivity coding, determine a second context modulus corresponding to the reflectivity coding.

[0339] In the embodiment of the present application, if the encoding type indicates reflectivity encoding, a reflectivity coding model corresponding to the reflectivity encoding is determined.

[0340] It should be noted that S803-S805 are three optional solutions after S802, and one of S803-S805 is executed according to the actual situation.

[0341] S806: When encoding the current node according to the encoding mode, initialize context information of the second context model.

[0342] In an embodiment of the present application, if the encoding type indicates normal vector encoding, a normal vector encoding model is initialized and the encoder allocates memory resources for context information of the normal vector encoding model.

[0343] In the embodiment of the present application, if the encoding type indicates color encoding, the color encoding model (49 contexts) is initialized. The encoder allocates memory resources for the context information of the color encoding model.

[0344] In the embodiment of the present application, if the coding type indicates reflectivity coding, the reflectivity coding model (49 contexts) is initialized. The encoder allocates memory resources for the context information of the reflectivity coding model.

[0345] S807: Encode the current node based on the context information of the second context model.

[0346] S808: Write the encoding mode into the bitstream as the bitstream type.

[0347] S809: Write the coding type into the bitstream as the first syntax element information.

[0348] In an embodiment of the present application, if the encoding type indicates normal vector encoding, the current node is encoded based on the normal vector encoding model.

[0349] If the encoding type indicates color encoding, the current node is encoded based on the color encoding model (49 contexts).

[0350] If the coding type indicates reflectivity coding, the current node is encoded based on the reflectivity coding model (49 contexts).

[0351] It can be understood that in the encoder, the context of point cloud information encoding is classified into four categories: multi-tree coding model, prediction tree coding model, color coding model, reflectivity coding model and normal vector coding model. When the encoder encodes geometric and attribute information, it is necessary to initialize the corresponding geometric coding model and the corresponding attribute coding model based on the geometric coding residual. For example, if only the color is encoded, then only the color coding model needs to be initialized in the attribute coding model. If only the reflectivity attribute is encoded, then only the reflectivity coding context model needs to be initialized in the attribute coding model. In this way, the context model actually used by the encoder corresponds to the allocated context model, and there will be no waste of context model memory.

[0352] In some embodiments of the present application, if the encoding type indicates color encoding, the context information of the second context model corresponding to the color encoding is initialized in the first encoding core; through the first encoding core, the color information of the current node is encoded based on the context information of the second context model corresponding to the color encoding.

[0353] If the coding type indicates reflectivity coding, the context information of the second context model corresponding to the reflectivity coding is initialized in the second coding core; and the reflectivity information of the current node is encoded based on the context information of the second context model corresponding to the reflectivity coding through the second coding core.

[0354] If the encoding type indicates normal vector encoding, the context information of the second context model corresponding to the reflectivity encoding is initialized in the third encoding core; through the third encoding core, the normal vector of the current node is encoded based on the context information of the second context model corresponding to the normal vector encoding.

[0355] In the encoder, there can be multiple independent encoding cores, and different types of attribute information correspond to an independent encoding core. Each type of attribute information can be independently encoded independently, which can speed up the attribute encoding. In the embodiment of the present application, the context model of color encoding, the context model of reflectivity encoding, and the context model of normal vector encoding are separated from each other and cannot generate a mutually dependent relationship. The context models between color, reflectivity, and normal vector are independent of each other and do not generate a mutually dependent relationship.

[0356] In some embodiments of the present application, when the encoder encodes the current node based on the context information, for different encoding types of geometric information and different encoding methods of attribute information, different information of the current node can be encoded based on the context information, as follows:

[0357] The encoder determines the index of the context model corresponding to the current node; based on the index of the context model, determines the target context information from the context information; if the encoding type indicates multi-tree encoding, then based on the target context information, the placeholder information of the current node is encoded to obtain the encoding information of the current node; if the encoding type indicates prediction tree encoding, then based on the target context information, the prediction residual of the current node is encoded to obtain the encoding information of the current node; if the encoding mode indicates prediction coding in attribute coding, then based on the target context information, the prediction residual information of the attribute of the current node is encoded to obtain the encoding information of the current node; if the encoding mode indicates transform coding in attribute coding, then based on the target context information, the transform coefficient of the current node is encoded to obtain the encoding information of the current node.

[0358] In an embodiment of the present application, the encoder writes the encoding information of the current node into the code stream.

[0359] Some embodiments of the present application provide a code stream, wherein the code stream is generated by bit encoding according to information to be encoded; the information to be encoded includes at least one of the following:

[0360] The code stream type, first syntax element information, second syntax element information, and coding information of each node in the point cloud.

[0361] In some embodiments of the present application, based on the same inventive concept as the above embodiments, see Figure 14, which shows a schematic diagram of the composition structure of a decoder 1 provided in an embodiment of the present application. As shown in Figure 14, the decoder 1 may include:

[0362] The decoding part 10 is configured to parse the code stream and determine the code stream type;

[0363] A first determining part 11 is configured to determine a context model based on the bitstream type;

[0364] A first initialization part 12 is configured to initialize context information of the context model;

[0365] The decoding part 10 is further configured to decode the current node based on the context information.

[0366] In some embodiments of the present application, the decoding part 10 is further configured to determine first syntax element information based on the bitstream type;

[0367] The first determining part 11 is further configured to determine the context model based on the coding type indicated by the first syntax element information.

[0368] In some embodiments of the present application, the decoding part 10 is further configured to determine second syntax element information based on the encoding type indicated by the first syntax element information; the second syntax element information indicates the type of model when the geometric information is encoded using a multi-tree;

[0369] The first determining part 11 is further configured to determine the context model according to the model corresponding to the type indicated by the second syntax element information.

[0370] In some embodiments of the present application, the code stream type includes: a geometric code stream or an attribute code stream; the context model includes: a first context model and a second context model;

[0371] The first determining part 11 is further configured to determine the first context model corresponding to the geometric code stream based on the geometric code stream indicated by the code stream type; and determine the second context model corresponding to the attribute code stream based on the attribute code stream indicated by the code stream type.

[0372] In some embodiments of the present application, the code stream type includes: a geometric code stream or an attribute code stream;

[0373] The decoding part 10 is further configured to parse the geometry code stream if the code stream type indicates a geometry code stream, and determine first syntax element information related to the geometry code stream; the first syntax element information indicates a coding type of the geometry information;

[0374] If the code stream type indicates an attribute code stream, the attribute code stream is parsed to determine first syntax element information related to the attribute code stream; the first syntax element information indicates a coding type of attribute information.

[0375] In some embodiments of the present application, the coding type of the geometric information includes: multi-tree coding or prediction tree coding; the context model includes: a first context model;

[0376] The first determining part 11 is further configured to determine a first context model corresponding to the multi-tree coding if the first syntax element information indicates the multi-tree coding; or

[0377] If the first syntax element information indicates prediction tree coding, a first context model corresponding to the prediction tree coding is determined.

[0378] In some embodiments of the present application, the encoding type of the attribute information includes: color encoding, reflectivity encoding or normal vector encoding; the context model includes: a second context model;

[0379] The first determining part 11 is further configured to determine a decoding method of a second context model and attribute corresponding to the normal vector encoding if the first syntax element information indicates the normal vector encoding; or

[0380] If the first syntax element information indicates color coding, determining a second context model and a decoding method of attributes corresponding to the color coding; or,

[0381] If the first syntax element information indicates reflectivity coding, a decoding method of a second context modulus and attribute corresponding to the reflectivity coding is determined.

[0382] In some embodiments of the present application, the encoding type of the attribute information includes: color encoding, reflectivity encoding or normal vector encoding; the context model includes: a second context model;

[0383] The first determining part 11 is further configured to determine a second context model corresponding to the normal vector coding if the coding type of the attribute information in the code stream indicates normal vector coding; or

[0384] If the encoding type of the attribute information in the code stream indicates color coding, determining a second context model corresponding to the color coding; or

[0385] If the encoding type of the attribute information in the code stream indicates reflectivity coding, a second context modulus corresponding to the reflectivity coding is determined.

[0386] In some embodiments of the present application, the decoding part 10 is further configured to parse the geometry code stream to determine second syntax element information corresponding to the multi-tree coding if the first syntax element information indicates multi-tree coding.

[0387] In some embodiments of the present application, the first initialization part 12 is further configured to, if the encoding type of the attribute information indicates color encoding, initialize the context information of the second context model corresponding to the color encoding in the first decoding core; if the encoding type of the attribute information indicates reflectivity encoding, initialize the context information of the second context model corresponding to the reflectivity encoding in the second decoding core; if the encoding type of the attribute information indicates normal vector encoding, initialize the context information of the second context model corresponding to the normal vector encoding in the third decoding core.

[0388] In some embodiments of the present application, the decoding part 10 is also configured to decode the color coding information of the current node based on the context information of the second context model corresponding to the color coding through the first decoding core; decode the reflectivity coding information of the current node based on the context information of the second context model corresponding to the reflectivity coding through the second decoding core; and decode the normal vector coding information of the current node based on the context information of the second context model corresponding to the normal vector coding through the third decoding core.

[0389] 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.

[0390] Refer to Figure 15, which shows a schematic diagram of the specific hardware structure of the decoder provided by an embodiment of the present application. As shown in Figure 15, the decoder may include: a first communication interface 1901, a first memory 1902 and a first processor 1903; each component is coupled together through a first bus system 1904. It can be understood that the first bus system 1904 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 1904 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 1904 in Figure 15. Among them,

[0391] The first communication interface 1901 is used to receive and send signals when sending and receiving information with other external network elements;

[0392] A first memory 1902 is used to store computer programs that can be run on the first processor 1903;

[0393] The first processor 1903 is configured to execute the decoding method described by the decoder when running the computer program.

[0394] It can be understood that at the decoding end, the bitstream is parsed to determine the bitstream type; based on the bitstream type, a context model is determined; context information for the context model is initialized; and based on the context information, the current node is decoded. Based on the parsed bitstream type, when decoding using context information, the decoder only needs to initialize the context information for the context model that matches the parsed bitstream type. This ensures that the context information required for decoding is already loaded during initialization, ensuring decoding efficiency. Furthermore, by not loading the entire context model, memory resources allocated to the context model are conserved, thereby reducing memory overhead during decoding and improving memory resource utilization.

[0395] In some embodiments of the present application, based on the same inventive concept as the above embodiments, see Figure 16, which shows a schematic diagram of the composition structure of an encoder 2 provided in an embodiment of the present application. As shown in Figure 16, the encoder 2 may include:

[0396] The second determining part 20 is configured to determine an encoding mode of the point cloud; the encoding mode is used to indicate geometric encoding or attribute encoding; and determine a context model based on the encoding mode;

[0397] A second initialization part 21 is configured to initialize the context information of the context model when encoding the current node according to the encoding method;

[0398] The encoding part 22 is configured to encode the current node based on the context information.

[0399] In some embodiments of the present application, the second determining part 20 is further configured to determine a coding type corresponding to the coding mode; and determine the context model based on the coding type.

[0400] In some embodiments of the present application, when the encoding mode indicates geometric encoding, the encoding type includes: multi-tree encoding or prediction tree encoding; the context model includes: a first context model;

[0401] The second determining part 20 is further configured to, if the coding type indicates multi-tree coding, determine a first context model corresponding to the multi-tree coding or a first context model corresponding to the type of the first context model corresponding to the multi-tree coding; or

[0402] If the encoding type indicates prediction tree encoding, a first context model corresponding to the prediction tree encoding is determined.

[0403] In some embodiments of the present application, when the encoding mode indicates attribute encoding, the encoding type includes: color encoding, reflectivity encoding, or normal vector encoding; the context model includes: a second context model;

[0404] The second determining part 20 is further configured to determine a second context model corresponding to the color coding if the coding type indicates color coding; or

[0405] If the encoding type indicates reflectivity encoding, a second context modulus corresponding to the reflectivity encoding is determined, or if the encoding type indicates normal vector encoding, a second context modulus corresponding to the normal vector encoding is determined.

[0406] In some embodiments of the present application, the context model includes: a first context model and a second context model;

[0407] The second determining part 20 is further configured to determine the first context model corresponding to the geometric coding if the coding mode indicates geometric coding;

[0408] If the encoding mode indicates attribute encoding, the second context model corresponding to the attribute encoding is determined.

[0409] In some embodiments of the present application, the second initialization part 21 is further configured to, if the encoding type indicates color encoding, initialize the context information of the second context model corresponding to the color encoding in the first encoding core; and if the encoding type indicates reflectivity encoding, initialize the context information of the second context model corresponding to the reflectivity encoding in the second encoding core; if the encoding type indicates normal vector encoding, initialize the context information of the second context model corresponding to the reflectivity encoding in the third encoding core.

[0410] In some embodiments of the present application, the encoding part 22 is further configured to encode the color information of the current node based on the context information of the second context model corresponding to the color encoding through the first encoding core;

[0411] Through the second coding core, the reflectivity information of the current node is encoded based on the context information of the second context model corresponding to the reflectivity encoding; through the third coding core, the normal vector of the current node is encoded based on the context information of the second context model corresponding to the normal vector encoding.

[0412] In some embodiments of the present application, the encoder 2 further includes: a writing part 23;

[0413] The writing part 23 is configured to write the code stream using the encoding method as the code stream type.

[0414] In some embodiments of the present application, the encoder 2 further includes: a writing part 23;

[0415] The writing part 23 is configured to write the coding type into the bitstream as the first syntax element information.

[0416] In some embodiments of the present application, the encoder 2 further includes: a writing part 23;

[0417] The writing part 23 is further configured to write the type of the first context model corresponding to the multi-tree coding as the second syntax element information into the bitstream if the coding type indicates multi-tree coding.

[0418] In some embodiments of the present application, the encoding part 22 is further configured to determine an index of a context model corresponding to the current node; and determine target context information from the context information based on the index of the context model;

[0419] If the encoding type indicates multi-tree encoding, encoding the placeholder information of the current node based on the target context information to obtain encoding information of the current node;

[0420] If the encoding type indicates prediction tree encoding, encoding the prediction residual of the current node based on the target context information to obtain encoding information of the current node;

[0421] If the encoding mode indicates predictive encoding in attribute encoding, encoding the prediction residual information of the attribute of the current node based on the target context information to obtain encoding information of the current node;

[0422] If the encoding mode indicates a transform encoding mode in attribute encoding, then based on the target context information, the transform coefficients of the current node are encoded to obtain encoding information of the current node.

[0423] In some embodiments of the present application, the encoder 2 further includes: a writing part 23;

[0424] The writing part 23 is further configured to write the coding information of the current node into the code stream.

[0425] Refer to Figure 17, which shows a schematic diagram of the specific hardware structure of the encoder provided by an embodiment of the present application. As shown in Figure 17, the encoder may include: a second communication interface 2001, a second memory 2002 and a second processor 2003; each component is coupled together through a second bus system 2004. It can be understood that the second bus system 2004 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 2004 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 2004 in Figure 17. Among them,

[0426] The second communication interface 2001 is used for sending and receiving signals during the process of sending and receiving information with other external network elements;

[0427] The second memory 2002 is used to store computer programs that can be run on the second processor 2003;

[0428] The second processor 2003 is configured to execute the encoding method described by the encoder when running the computer program.

[0429] It is understandable that, at the encoding end, the encoder can determine whether to perform geometric encoding or attribute encoding by determining the encoding method of the point cloud during encoding, and can determine whether to initialize the context information of the context model corresponding to the geometric information or the context information of the context model corresponding to the attribute information based on the encoding method. In this way, it is only necessary to initialize the context information of the context model consistent with the parsed encoding method, so that the context information required for encoding is loaded at the time of initialization, ensuring the efficiency of encoding. At the same time, the context models of all encoding methods are not loaded, saving the memory resources allocated to the context model, achieving the purpose of reducing memory overhead during encoding and improving the utilization of memory resources.

[0430] 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 described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0431] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to an encoder or a decoder. The computer-readable storage medium stores a computer program. When the computer program is executed by a first processor, it implements the decoding method in the aforementioned embodiment, or when the computer program is executed by a second processor, it implements the encoding method in the aforementioned embodiment.

[0432] 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.

[0433] 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.

[0434] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0435] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0436] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0437] 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

[0438] The embodiments of the present application provide a coding and decoding method, decoder, encoder, bitstream, and storage medium. At the decoding end, the bitstream is parsed to determine the bitstream type; based on the bitstream type, a context model is determined; context information of the context model is initialized; and based on the context information, the current node is decoded. The decoder, based on the parsed bitstream type, only needs to initialize the context information of the context model consistent with the parsed bitstream type when decoding using context information. This ensures that the context information required for decoding is already loaded at initialization, ensuring decoding efficiency. At the same time, the entire context model does not need to be loaded, saving memory resources allocated to the context model, thereby reducing memory overhead during decoding and improving memory resource utilization.

[0439] On the encoding side, the encoder can determine whether to perform geometric encoding or attribute encoding by determining the point cloud encoding method during encoding. Based on the encoding method, it can also determine whether to initialize the context information of the context model corresponding to the geometric information or the context information of the context model corresponding to the attribute information. This only requires initializing the context information of the context model consistent with the parsed encoding method. This ensures that the context information required for encoding is already loaded at initialization, ensuring encoding efficiency. At the same time, context models for all encoding methods do not need to be loaded, saving memory resources allocated to the context model, thereby reducing memory overhead during encoding and improving memory resource utilization.

Claims

1. A decoding method, comprising: Analyze the code stream and determine the code stream type; Determining a context model based on the bitstream type; Initialize the context information of the context model; Based on the context information, the current node is decoded.

2. The method according to claim 1, wherein The determining of the context model based on the bitstream type includes: Determining first syntax element information based on the bitstream type; The context model is determined based on the coding type indicated by the first syntax element information.

3. The method according to claim 2, wherein: The determining the context model based on the coding type indicated by the first syntax element information includes: Determining second syntax element information based on the encoding type indicated by the first syntax element information, wherein the second syntax element information indicates a model type when the geometric information is encoded using a multi-tree; The context model is determined by using a model corresponding to the model type indicated by the second syntax element information.

4. The method according to claim 1, wherein The code stream type includes: geometric code stream or attribute code stream; the context model includes: a first context model and a second context model; The determining of the context model based on the bitstream type includes: Determining, based on a geometry code stream indicated by the code stream type, the first context model corresponding to the geometry code stream; Based on the attribute code stream indicated by the code stream type, the second context model corresponding to the attribute code stream is determined.

5. The method according to claim 2, wherein: The code stream type includes: geometric code stream or attribute code stream; The determining, based on the bitstream type, first syntax element information includes: If the code stream type indicates a geometry code stream, the geometry code stream is parsed to determine first syntax element information corresponding to the geometry code stream; the first syntax element information indicates a coding type of geometry information; If the code stream type indicates an attribute code stream, the attribute code stream is parsed to determine first syntax element information related to the attribute code stream; the first syntax element information indicates a coding type of attribute information.

6. The method according to claim 5, wherein: The coding type of the geometric information includes: multi-tree coding or prediction tree coding; the context model includes: a first context model; The determining the context model based on the coding type indicated by the first syntax element information includes: If the first syntax element information indicates multi-tree coding, determining a first context model corresponding to the multi-tree coding; or, If the first syntax element information indicates prediction tree coding, a first context model corresponding to the prediction tree coding is determined.

7. The method according to claim 5, wherein: The encoding type of the attribute information includes: color encoding, reflectivity encoding or normal vector encoding; the context model includes: a second context model; The determining the context model based on the coding type indicated by the first syntax element information includes: If the first syntax element information indicates normal vector coding, determining a decoding method of a second context model and attribute corresponding to the normal vector coding; or If the first syntax element information indicates color coding, determining a second context model and a decoding method of attributes corresponding to the color coding; or, If the first syntax element information indicates reflectivity coding, a decoding method of a second context modulus and attribute corresponding to the reflectivity coding is determined.

8. The method according to claim 5, wherein The encoding type of the attribute information includes: color encoding, reflectivity encoding or normal vector encoding; the context model includes: a second context model; The method further comprises: If the encoding type of the attribute information in the code stream indicates normal vector encoding, determining a second context model corresponding to the normal vector encoding; or If the encoding type of the attribute information in the code stream indicates color coding, determining a second context model corresponding to the color coding; or If the encoding type of the attribute information in the code stream indicates reflectivity coding, a second context modulus corresponding to the reflectivity coding is determined.

9. The method according to claim 3, wherein: The determining, based on the coding type indicated by the first syntax element information, the second syntax element information includes: If the first syntax element information indicates multi-tree coding, the geometry code stream is parsed to determine second syntax element information corresponding to the multi-tree coding.

10. The method according to claim 7 or 8, wherein The context information of the initialization context model includes: If the encoding type of the attribute information indicates color coding, initializing context information of a second context model corresponding to the color coding in the first decoding core; If the encoding type of the attribute information indicates reflectivity coding, initializing context information of a second context model corresponding to the reflectivity coding in the second decoding core; If the encoding type of the attribute information indicates normal vector encoding, initialization of context information of a second context model corresponding to the normal vector encoding is performed in the third decoding core.

11. The method according to claim 10, wherein: The decoding of the current node based on the context information includes: decoding, by the first decoding core, color coding information of the current node based on context information of a second context model corresponding to the color coding; Decoding the reflectivity coding information of the current node based on context information of a second context model corresponding to the reflectivity coding by the second decoding core; The normal vector encoding information of the current node is decoded by the third decoding core based on the context information of the second context model corresponding to the normal vector encoding.

12. A coding method comprising: Determine the encoding method of the point cloud; The encoding mode is used to indicate geometric encoding or attribute encoding; Determining a context model based on the encoding method; When encoding the current node according to the encoding method, initializing the context information of the context model; The current node is encoded based on the context information.

13. The method according to claim 12, wherein: The determining of the context model based on the encoding mode includes: Determining a coding type corresponding to the coding mode; Based on the encoding type, the context model is determined.

14. The method according to claim 13, wherein: When the encoding mode indicates geometric encoding, the encoding type includes: multi-tree encoding or prediction tree encoding; the context model includes: a first context model; The determining the context model based on the encoding type includes: If the coding type indicates multi-tree coding, determining a first context model corresponding to the multi-tree coding or a first context model corresponding to the type of the first context model corresponding to the multi-tree coding; or If the encoding type indicates prediction tree encoding, a first context model corresponding to the prediction tree encoding is determined.

15. The method according to claim 13, wherein When the encoding mode indicates attribute encoding, the encoding type includes: color encoding, reflectivity encoding or normal vector encoding; the context model includes: a second context model; The determining the context model based on the encoding type includes: If the encoding type indicates color encoding, determining a second context model corresponding to the color encoding; or, If the encoding type indicates reflectivity encoding, determining a second context modulus corresponding to the reflectivity encoding; If the encoding type indicates normal vector encoding, a second context modulus corresponding to the normal vector encoding is determined.

16. The method according to claim 12, wherein: The context model includes: a first context model and a second context model; The determining of the context model based on the encoding mode includes: If the encoding mode indicates geometric encoding, determining the first context model corresponding to the geometric encoding; If the encoding mode indicates attribute encoding, the second context model corresponding to the attribute encoding is determined.

17. The method according to claim 15, wherein: The initializing the context information of the context model when encoding the current node according to the encoding mode includes: If the encoding type indicates color encoding, initializing context information of a second context model corresponding to the color encoding in the first encoding core; If the encoding type indicates reflectivity encoding, initializing context information of a second context model corresponding to the reflectivity encoding in the second encoding core; If the encoding type indicates normal vector encoding, initialization of context information of a second context model corresponding to the reflectivity encoding is performed in a third encoding core.

18. The method according to claim 17, wherein The encoding of the current node based on the context information includes: encoding, by the first encoding core, color information of the current node based on context information of a second context model corresponding to the color encoding; encoding, by the second encoding core, reflectivity information of the current node based on context information of a second context model corresponding to the reflectivity encoding; The normal vector of the current node is encoded by the third encoding core based on context information of the second context model corresponding to the normal vector encoding.

19. The method according to claim 12, wherein: The method further comprises: The encoding method is used as the code stream type and written into the code stream.

20. The method according to any one of claims 13 to 15, 17 or 18, wherein The method further comprises: The coding type is written into the bitstream as the first syntax element information.

21. The method according to claim 14, wherein The method further comprises: If the coding type indicates multi-tree coding, the type of the first context model corresponding to the multi-tree coding is written into the bitstream as the second syntax element information.

22. The method according to claim 13, wherein Encoding the current node based on the context information includes: Determine the index of the context model corresponding to the current node; determining target context information from the context information based on an index of the context model; If the encoding type indicates multi-tree encoding, encoding the placeholder information of the current node based on the target context information to obtain encoding information of the current node; If the encoding type indicates prediction tree encoding, encoding the prediction residual of the current node based on the target context information to obtain encoding information of the current node; If the encoding mode indicates predictive encoding in attribute encoding, encoding the prediction residual information of the attribute of the current node based on the target context information to obtain encoding information of the current node; If the encoding mode indicates a transform encoding mode in attribute encoding, then based on the target context information, the transform coefficients of the current node are encoded to obtain encoding information of the current node.

23. The method according to claim 22, wherein Write the encoding information of the current node into the code stream.

24. A code stream comprising: The code stream is generated by bit encoding based on information to be encoded; the information to be encoded includes at least one of the following: The code stream type, first syntax element information, second syntax element information, and coding information of each node in the point cloud.

25. A decoder comprising: The decoding part is configured to parse the code stream and determine the code stream type; A first determining part is configured to determine a context model based on a bitstream type; A first initialization part is configured to initialize context information of the context model; The decoding part is further configured to decode the current node based on the context information.

26. An encoder comprising: A second determining part is configured to determine an encoding method of the point cloud; The encoding mode is used to indicate geometric encoding or attribute encoding; and determining a context model based on the encoding manner; A second initialization part is configured to initialize the context information of the context model when encoding the current node according to the encoding method; The encoding part is configured to encode the current node based on the context information.

27. A decoder comprising: a first memory configured to store executable instructions; The first processor is configured to implement the method according to any one of claims 1 to 11 when executing the executable instructions stored in the first memory.

28. An encoder comprising: a second memory configured to store executable instructions; The second processor is configured to implement the method according to any one of claims 12 to 23 when executing the executable instructions stored in the second memory.

29. A computer-readable storage medium storing executable instructions for causing a first processor to execute the method according to any one of claims 1 to 11, or for causing a second processor to execute the method according to any one of claims 12 to 23.