Encoding and decoding method, code stream, encoder, decoder and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2026-04-07
AI Technical Summary
In point cloud compression, unnecessary syntax elements exist in the decoding process of geometric macroblocks, resulting in low encoding efficiency.
By determining the point value of the current macroblock and determining the values of the first syntax element information and at least one second syntax element information based on the point value, encoding or decoding is performed to correct the relevant syntax elements in the geometric encoding process.
Save code rate, improve encoding and decoding efficiency, and thus improve geometric encoding and decoding performance.
Smart Images

Figure CN121816752A_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field
[0001] The embodiments of the present application relate to the field of point cloud coding technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art
[0002] In the Point Cloud Compression (PCC) framework, based on the AVS-PCC framework provided by the Audio Video Coding Standard (AVS), the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately. The geometric information encoding methods can be divided into octree-based geometry coding and prediction tree-based geometry coding.
[0003] During the coding process of geometric information, the coding can be performed based on the geometric macroblock of the Largest Coding Unit (LCU). However, when decoding the geometric macroblock, some syntax elements transmitted in the bitstream are unnecessary, resulting in low coding efficiency.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium, which can improve coding and decoding efficiency.
[0006] The technical solution of the embodiment of the present application can be implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, the method comprising:
[0008] Decoding a bitstream, and determining a value of a first syntax element and a value of at least one second syntax element; wherein the first syntax element is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element;
[0009] A point value of the current macroblock is determined according to a value of the first syntax element information and a value of at least one second syntax element information.
[0010] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
[0011] Determine the point value of the current macroblock;
[0012] Determining, based on the point value of the current macroblock, a value of a first syntax element information and a value of at least one second syntax element information; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information;
[0013] The value of the first syntax element information and the value of at least one second syntax element information are encoded, and the obtained encoded bits are written into a bitstream.
[0014] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:
[0015] The value of the first syntax element information, the value of at least one second syntax element information, and the first identification information; wherein the first identification information is used to indicate whether the prediction tree encoding mode is enabled for the current sequence, the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information.
[0016] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first determining unit and an encoding unit, wherein:
[0017] A first determining unit is configured to determine a point value of a current macroblock; and determine a value of a first syntax element information and a value of at least one second syntax element information based on the point value of the current macroblock; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information;
[0018] The encoding unit is configured to encode the value of the first syntax element information and the value of at least one second syntax element information, and write the obtained encoding bits into the bitstream.
[0019] In a fifth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor; wherein,
[0020] a first memory for storing a computer program capable of running on the first processor;
[0021] The first processor is configured to execute the method according to the first aspect when running the computer program.
[0022] In a sixth aspect, an embodiment of the present application provides a decoder, comprising a decoding unit and a second determining unit, wherein:
[0023] a decoding unit configured to decode a bitstream and determine a value of a first syntax element and a value of at least one second syntax element; wherein the first syntax element is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element;
[0024] The second determining unit is configured to determine a point value of the current macroblock according to a value of the first syntax element information and a value of at least one second syntax element information.
[0025] In a seventh aspect, an embodiment of the present application provides a decoder, comprising a second memory and a second processor, wherein:
[0026] a second memory for storing a computer program capable of running on the second processor;
[0027] The second processor is configured to execute the method according to the second aspect when running the computer program.
[0028] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method described in the first aspect when executed by a first processor, or implements the method described in the second aspect when executed by a second processor.
[0029] The embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium. At the encoding end, the point value of the current macroblock is determined; then, based on the point value of the current macroblock, the value of the first syntax element information and the value of at least one second syntax element information are determined; then, the value of the first syntax element information and the value of at least one second syntax element information are encoded, and the obtained coded bits are written into the code stream. At the decoding end, the code stream is decoded, and the value of the first syntax element information and the value of at least one second syntax element information are determined; then, based on the value of the first syntax element information and the value of at least one second syntax element information, the point value of the current macroblock is determined. The first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information. In this way, by making corresponding corrections to the relevant syntax elements in the geometric coding process, the decoding end no longer needs to decode the syntax elements used to represent the maximum number of points in the geometric prediction tree, but instead determines the point value of the current macroblock through the first syntax element information and the second syntax element information, thereby saving bit rate, improving encoding and decoding efficiency, and thus improving geometric encoding and decoding performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] FIG1A is a schematic diagram of a three-dimensional point cloud image;
[0031] FIG1B is a partially enlarged view of a three-dimensional point cloud image;
[0032] FIG2A is a schematic diagram of six viewing angles of a point cloud image;
[0033] FIG2B is a schematic diagram of a data storage format corresponding to a point cloud image;
[0034] FIG3 is a schematic diagram of the positions of reference nodes selected by each sub-node;
[0035] FIG4 is a schematic diagram showing the positions of four groups of reference neighbor nodes of a current node;
[0036] FIG5 is a schematic diagram showing the positions of six adjacent parent blocks corresponding to each child block;
[0037] FIG6 is a schematic diagram showing the positions of 18 adjacent blocks around a current block and their Morton sequence numbers;
[0038] FIG7 is a schematic diagram of a simplified prediction tree structure;
[0039] FIG8A is a schematic diagram of a framework of an AVS encoder;
[0040] FIG8B is a schematic diagram of a framework of an AVS decoder;
[0041] FIG9 is a schematic diagram of a network architecture for point cloud encoding and decoding;
[0042] FIG10 is a flowchart diagram of a decoding method provided in an embodiment of the present application;
[0043] FIG11 is a second flow chart of a decoding method provided in an embodiment of the present application;
[0044] FIG12 is a third flow chart of a decoding method provided in an embodiment of the present application;
[0045] FIG13 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0046] FIG14 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0047] FIG15 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;
[0048] FIG16 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0049] FIG17 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
[0050] FIG18 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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 corresponding 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 geometric information and attribute information. For example, geometric information can be its three-dimensional coordinates (x, y, z), so this information can also be referred to as its location information. For example, attribute information can include color information (three-dimensional color information) and / or reflectance (one-dimensional reflectance information r). For example, color information can be information in any color space. For example, 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.
[0058] 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.
[0059] 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).
[0060] Point clouds can be divided into the following categories according to the acquisition method:
[0061] Static point cloud: the object is stationary and the device that acquires the point cloud is also stationary;
[0062] Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;
[0063] Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.
[0064] For example, point clouds can be divided into two categories according to their usage:
[0065] 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;
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] Currently, point cloud coding frameworks 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 the Audio Video Standard (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, and it 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, and it 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.
[0072] The following is a detailed introduction using the AVS-PCC encoding and decoding framework in related technologies as an example.
[0073] In the point cloud AVS-PCC encoding and decoding framework, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately. First, the geometric information is converted into coordinates so that the entire point cloud is contained in a bounding box. Before the preprocessing process, it is decided whether to divide the entire point cloud sequence into multiple point cloud slices (slices) based on the parameter configuration, and each divided slice is treated as a single independent point cloud serial processing. Among them, the preprocessing process includes quantization and removal of duplicate points. Quantization mainly plays a role in scaling. Due to quantization rounding, the geometric information of some points is the same, and whether to remove duplicate points is determined based on the parameters. Next, the bounding box is divided in the order of breadth-first traversal (octree / quadtree / binary tree, etc.), and the placeholder code of each node is encoded. During the octree-based geometric encoding process, the encoder divides the bounding box into sub-cubes in sequence, and continues to divide the non-empty sub-cubes (containing points in the point cloud) until the leaf node obtained 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 code stream. During the octree-based geometric decoding process, the decoder continuously parses the placeholder code of each node in the order of breadth-first traversal, and continuously divides the nodes in sequence until the division reaches a 1×1×1 unit cube. The number of points contained in each leaf node is parsed, and the geometric reconstructed point cloud information is finally recovered.
[0074] In AVS-PCC geometry coding, there are two encoding methods, one is an octree-based encoding method (Octree geometry encoding, OctGeomEnc), and the other is a predictive tree-based encoding method (PredGeomTree).
[0075] 1. Octree-based encoding method:
[0076] If octree encoding is used, there are two context encoding models. Context model 1 can be used for cat1-A and cat2 point cloud sequences; context model 2 can be used for cat1-B and cat3 sequences.
[0077] (1) Context model 1.
[0078] Among them, context model 1 includes the sub-layer neighbor prediction of the current point and the neighbor prediction of the current point layer.
[0079] 1) Sub-layer neighbor prediction of the current point.
[0080] Under the octree breadth-first traversal partitioning method, the neighbor information that can be obtained when encoding the child nodes of the current point includes neighboring 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, the occupancy of the three coplanar nodes, three colinear nodes, and one co-point node in the left, front, and bottom directions of the same layer as the child node to be encoded, as well as the node with the shortest node side length and a distance of two node side lengths from the current child node to be encoded in the negative direction, are searched. Taking the node with the shortest side length in the X dimension as an example, the reference node selected by each child node is shown in Figure 3. Among them, the dotted box node is the current node, the dotted filled node is the current child node to be encoded, and the solid box node is the reference node selected by each child node.
[0081] Here, the occupancy of the three coplanar nodes, the three collinear nodes, and the node with the shortest side length in the negative direction and two node side lengths away from the current sub-node to be encoded is considered in detail. The occupancy of these seven nodes is 2 7 = 128 cases. If not all are unoccupied, there are 2 7 -1 = 127 possible 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 neighboring node has two possibilities: occupied or unoccupied. In this case, a separate context model is assigned to the occupied case of the common neighboring node. If the 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 context models.
[0082] 2) Neighbor prediction of the current node layer.
[0083] If none of the eight reference nodes in the same layer of the subnode to be encoded are occupied, consider the occupancy of the four groups of neighbor nodes in the current node layer, as shown in Figure 4. In Figure 4, (a) represents the first group of reference neighbor nodes, specifically the coplanar neighbor nodes in the upper right and rear corners; (b) represents the second group of reference neighbor nodes, specifically the coplanar neighbor nodes in the lower left and front corners; (c) represents the third group of reference neighbor nodes, specifically the collinear neighbor nodes in the upper right and rear corners; and (d) represents the fourth group of reference neighbor nodes, specifically the collinear neighbor nodes in the lower left and front corners. The nodes in the dotted box are the current node, and the nodes in the solid box are the neighbor nodes.
[0084] For the current node layer, the context model is determined as follows:
[0085] Step 1: 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 model. Considering that the child node to be encoded is located at the current node's position, this group of neighboring nodes provides a total of (8-1) × 8 = 56 context models. If the three coplanar neighbors immediately above and to the right of the current node are unoccupied, then the remaining three groups of neighboring nodes at the current node level are considered.
[0086] Step 2: Consider the distance between the most recently occupied node and the current node.
[0087] Here, the higher the importance of the neighbor node, the smaller the distance. The specific correspondence between the distribution of neighbor nodes and the distance is shown in Table 1.
[0088] Table 1
[0089] For example, in the current node, it is assumed that there are three values of distance, among which the importance of the left front and lower coplanar neighbors or the upper right and rear collinear neighbors is the highest, and the value of the distance is set to 1; when the left front and lower coplanar neighbors and the upper right and rear collinear neighbors are not occupied, the importance of the left front and lower collinear neighbors is the second highest, and the value of the distance is set to 2; if none of these four groups of neighbor nodes are occupied, then the value of the distance is set to 3.
[0090] According to Table 1, there are three possible distance values. A context model is assigned to each of these three values. Considering the position of the child node to be encoded at the current node, there are a total of 3×8=24 context models.
[0091] So far, a total of 128+56+24=208 context models have been allocated to this set of context models.
[0092] (2) Context Model 2.
[0093] This method uses a two-layer context reference relationship configuration, as shown in formula (1). The first layer is the occupancy of the parent node of the current sub-block to be encoded (i.e., ctxIdxParent), and the second layer is the occupancy of the encoded adjacent blocks at the same depth as the current sub-block to be encoded (i.e., ctxIdxChild). idx = LUT[ctxIdxParent][ctxIdxChild] (1)
[0094] 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.
[0095] 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 the ctxIdxParent is calculated according to the occupancy of the adjacent parent blocks according to formula (3). As shown in Figure 5, the node filled with dots is the current node, and the child nodes filled with grids are the sub-blocks to be encoded. 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 2 correspond to the Morton numbers in Figure 6. This method takes into account the different sub-block positions and the geometric central rotational symmetry. As can be seen from Figure 6, 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.
[0096] Therefore, the number of context models used in this method is at most 2 3 ×2 5 = 256 context models.
[0097] Here, Table 2 shows the correspondence between a child block i and its adjacent parent block j, wherein the numbers in Table 2 correspond to the Morton sequence numbers in FIG6 .
[0098] Table 2
[0099] 2. Encoding method based on prediction tree:
[0100] If prediction tree coding is used, the geometric information of the point cloud is first used at the encoding end to perform Morton code sorting, and then the geometric information of the point cloud is predictively coded using a KD-Tree, similar to a single chain structure that predictively codes the geometric information of the child node by using the parent node.
[0101] For example, Figure 7 shows a simplified prediction tree structure. As shown in Figure 7, the prediction tree uses a single-link structure. Each tree node, except for a single leaf node, has only one child node. Except for the root node, which is predicted by default, all other nodes are provided with geometric prediction values by their parent nodes.
[0102] During multitree geometry coding, if the current block satisfies the following three conditions at the same time, the isolated point direct coding mode is effective:
[0103] Condition 1: The direct coding mode identifier of the isolated point in the geometry header information is 1;
[0104] Condition 2: The current block contains only one point cloud data point;
[0105] Condition 3: The sum of the number of Morton code bits to be encoded for the points in the current block is greater than twice the number of directions that do not reach the minimum side length.
[0106] Thus, this branch is entered when all three of the above conditions are met. A flag is introduced to indicate whether the current node uses the isolated point direct encoding mode. This flag uses a context for entropy encoding. If the flag is true (True), the isolated point mode is used to directly encode the geometric coordinates of the point, and the octree partitioning is terminated. If the flag is false (False), the occupancy code is encoded and the octree partitioning continues.
[0107] In certain cases, this flag can be inferred to be False and not encoded. If the parent block of the current block already allows the use of isolated point coding mode, and the current block is the only child node of the parent block, then the current block must not contain isolated points. Therefore, in this case, the bits for encoding the flag can be omitted.
[0108] After encoding the flag bit, since the current block contains only one point cloud point, the geometric coordinates of the point cloud point corresponding to the uncoded bits of the Morton code are directly encoded. The specific encoding process is as follows:
[0109] Assuming that the remaining encoding bit depth of the point is nodeSizeLog2, the specific encoding process is as follows: for(int axisIdx=0;axisIdx<3;++axisIdx); for(int mask=(1<<nodeSizeLog2[axisIdx])> >1;mask;mask>>1); encodePosBit(!!(pointPos[axisIdx]&mask)).
[0110] Figure 8A is a schematic diagram of the AVS encoder framework. As shown in Figure 8A, in the AVS encoder framework, the input point cloud is sliced, and the slices are independently encoded. Within the slice, the geometric information of the point cloud and the attribute information within the point cloud are encoded separately. The AVS encoder first encodes the geometric information. The AVS encoder performs coordinate transformation (including coordinate translation and coordinate quantization) on the geometric positions so that the entire point cloud is contained within a bounding box. The bounding box is then constructed and entropy encoded using an octree to generate a binary bitstream (specifically, a geometric bitstream). After the geometric encoding is completed, the geometric information is reconstructed. Currently, attribute encoding is mainly performed on color and reflectance information. First, a determination is made as to whether color space conversion is to be performed. If color space conversion is to be performed, the color information is converted from RGB color space to YUV color space. Then, the reconstructed point cloud is recolored using the original point cloud so that the unencoded attribute information corresponds to 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, and then differential prediction is performed. There are two reordering methods: Morton reordering and Hilbert reordering. For the cat1A sequence and cat2 sequence, Hilbert reordering is performed; for the cat1B sequence and cat3 sequence, Morton reordering is performed. The attribute prediction of the sorted point cloud is performed using a differential method, and finally the prediction residual is quantized and entropy encoded to generate a binary code stream (specifically, an attribute code stream). The attribute transformation process is as follows: first, a wavelet transform is performed on the point cloud attributes, and the transform coefficients are quantized; secondly, the attribute reconstruction value is obtained by inverse quantization and inverse wavelet transform; then the difference between the original attribute and the attribute reconstruction value is calculated to obtain the attribute residual and quantize it; finally, the quantized transform coefficients and attribute residuals are entropy encoded to generate a binary code stream (specifically, an attribute code stream).
[0111] Figure 8B is a schematic diagram of the framework of an AVS decoder. As shown in Figure 8B, in the AVS decoder framework, after obtaining the binary code stream, the geometric code stream and the attribute code stream in the binary code stream are independently decoded. When decoding the geometric code stream, the geometric position of the point cloud is obtained through entropy decoding-octree reconstruction-inverse coordinate quantization and inverse coordinate translation. When decoding the attribute code stream, the attribute information of the point cloud is obtained through entropy decoding-inverse quantization-attribute prediction compensation-inverse space conversion; or the attribute information of the point cloud is obtained through entropy decoding-inverse quantization-attribute inverse transformation-inverse space transformation. Finally, the slice to be encoded can be restored based on the geometric position and attribute information; then, after merging the slices, the three-dimensional image model of the input point cloud can be restored.
[0112] It can be understood that in the embodiment of the present application, the technical solution mainly involves the geometric encoding part of Figure 8A and the geometric decoding part of Figure 8B.
[0113] It can also be understood that the 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. FIG9 is a schematic diagram of a network architecture of a point cloud encoding and decoding system. As shown in FIG9 , 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 implementation, 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., and the embodiment of the present application is not limited thereto.
[0114] Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device. In other words, the electronic device in the embodiment of the present application has point cloud encoding and decoding functions, generally including a point cloud encoder (i.e., encoder) and a point cloud decoder (i.e., decoder).
[0115] For the AVS-PCC codec framework, the general test conditions are as follows:
[0116] 1) There are 4 test conditions:
[0117] Condition 1: The geometric position is limited and the attributes are lost;
[0118] Condition 2: Geometric position lossless, attribute lossy;
[0119] Condition 3: Geometric position lossless, attribute loss limited;
[0120] Condition 4: Geometric position and attributes are lossless.
[0121] 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.
[0122] 3) Technical routes: There are 2 types in total, distinguished by the algorithm used for attribute compression.
[0123] Technical Route 1: Prediction branch, attribute compression uses an intra-frame prediction-based method:
[0124] 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.
[0125] 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.
[0126] 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). That is, at most every X points can be encoded as a group:
[0127] 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.
[0128] 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.
[0129] Technical Route 3: Prediction Transform Branch - Resources are not limited. Attribute compression uses a method based on intra-frame prediction and DCT transform. When encoding the quantized transform coefficients, there is no limit on the maximum number of points X, that is, all coefficients are encoded together:
[0130] 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.
[0131] 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.
[0132] Technical Route 4: Multi-layer transformation branch, attribute compression adopts a method based on multi-layer wavelet transform:
[0133] 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.
[0134] 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.
[0135] Simply put, when AVS-PCC encodes the geometric information of the point cloud, it encodes the geometric macroblocks based on the largest coding unit (LCU), that is, firstly, the point cloud slices are spatially divided to obtain different geometric macroblocks, and then each geometric macroblock is adaptively encoded. When decoding each geometric macroblock, the decoding type of the current macroblock is first obtained: octree decoding or prediction tree decoding. However, there is currently a syntax element geom_max_tree_size_log2_minus8 in AVS-PCC, which has no effect on the decoding end. In other words, when decoding geometric macroblocks, some syntax elements transmitted in the bitstream are redundant, resulting in low coding efficiency.
[0136] Based on this, an embodiment of the present application provides an encoding method that determines a point value of a current macroblock; then, based on the point value of the current macroblock, determines a value of a first syntax element and a value of at least one second syntax element; then, encodes the value of the first syntax element and the value of the at least one second syntax element, and writes the resulting coded bits into a bitstream. An embodiment of the present application also provides a decoding method that decodes a bitstream, determines a value of a first syntax element and a value of at least one second syntax element; then, based on the value of the first syntax element and the value of the at least one second syntax element, determines a point value of the current macroblock.
[0137] The first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information. In this way, by making corresponding corrections to the relevant syntax elements in the geometric coding process, the decoding end no longer needs to decode the syntax element used to represent the maximum number of points in the geometric prediction tree. Instead, the first syntax element information and the second syntax element information are used to determine the point value of the current macroblock, thereby saving bit rate, improving encoding and decoding efficiency, and further improving geometric encoding and decoding performance.
[0138] The following describes in detail the various embodiments of the present application with reference to the accompanying drawings.
[0139] In one embodiment of the present application, referring to FIG10 , a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG10 , the method may include:
[0140] S1001: Decode a bitstream and determine a value of a first syntax element and a value of at least one second syntax element.
[0141] It should be noted that the decoding method of the embodiment of the present application is applied to a decoder, specifically to the AVS-PCC decoding framework, or the AVS-GPCC decoding framework. Here, the embodiment of the present application specifically provides a point cloud geometry decoding solution, and more specifically, provides a method for decoding parameters related to geometric macroblocks and prediction trees to improve encoding and decoding efficiency.
[0142] It should also be noted that, in the embodiment of the present application, the point cloud slice may be spatially divided based on the Largest Coding Unit (LCU) to determine at least one geometric macroblock, wherein the current macroblock is any one of the at least one geometric macroblock.
[0143] In some embodiments, decoding the bitstream and determining the value of the first syntax element information and the value of at least one second syntax element information may include:
[0144] Decoding the bitstream and determining a value of the first syntax element information; when i is greater than or equal to 0 and less than the value of the first syntax element information, looping through the following steps to obtain a value of at least one second syntax element information:
[0145] Decode the code stream, determine the value of the i-th second syntax element information, and perform an increment operation on i.
[0146] That is, in the embodiment of the present application, decoding is first performed to determine the value of the first syntax element information; then, when i is greater than or equal to 0 and less than the value of the first syntax element information, the step of decoding the code stream to determine the value of the i-th second syntax element information is performed in a loop until i is equal to the value of the first syntax element information, thereby obtaining the value of at least one second syntax element information.
[0147] It should also be noted that, in an embodiment of the present application, if the value of the first syntax element information is N, then the number of at least one second syntax element information is N; that is, the number of at least one second syntax element information is the same as the value of the first syntax element information.
[0148] In some embodiments, the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock. Here, the first syntax element information can also be referred to as the number of bytes occupied by the point value of the current macroblock, which can be represented by num_bits_in_lcu_num_points.
[0149] In some embodiments, the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock. Here, the i-th second syntax element information may also be referred to as the byte of the point value of the current macroblock, and may be represented by lcu_num_points[i]. Where i is an integer greater than or equal to 0 and less than the value of the first syntax element information.
[0150] It should be noted that, in the embodiment of the present application, the value of the first syntax element information is an unsigned integer, specifically a 5-bit unsigned integer. The value of the second syntax element information is a binary variable, specifically 0 or 1.
[0151] For example, the relevant syntax elements are described as follows:
[0152] It should also be noted that, in the embodiment of the present application, the value of the first syntax element information and the value of at least one second syntax element information can be obtained by decoding based on a bypass model.
[0153] S1002: Determine a point value of the current macroblock according to a value of the first syntax element information and a value of at least one second syntax element information.
[0154] It should be noted that in an embodiment of the present application, after decoding to obtain the value of the first syntax element information and the value of at least one second syntax element information, the point value of the current macroblock can be calculated based on the value of the first syntax element information and the value of at least one second syntax element information.
[0155] In one possible implementation, when determining the point value of the current macroblock based on the value of the first syntax element information and the value of at least one second syntax element information, referring to FIG. 11 , the method may include:
[0156] S1101: Determine the initial point value of the current macroblock.
[0157] S1102: Determine N midpoint values of the current macroblock according to the value of at least one second syntax element information.
[0158] S1103: Determine the point value of the current macroblock according to the initial point value of the current macroblock and the N intermediate point values of the current macroblock.
[0159] It should be noted that, in the embodiment of the present application, the value of N is equal to the value of the first syntax element information, and the number of at least one second syntax element information is N. In other words, the value of each second syntax element information corresponds to a determined midpoint value.
[0160] It should also be noted that, in the embodiment of the present application, determining the N intermediate point values of the current macroblock based on the value of at least one second syntax element information may include: when i is greater than or equal to 0 and less than the value of the first syntax element information, loopingly performing the following steps to obtain the N intermediate point values of the current macroblock:
[0161] According to the value of the i-th second syntax element information and the value of i, the i-th midpoint value of the current macroblock is determined, and an addition operation is performed on i.
[0162] That is, in an embodiment of the present application, when i is greater than or equal to 0 and less than the value of the first syntax element information, the step of determining the i-th intermediate point value of the current macroblock based on the value of the i-th second syntax element information and the value of i is executed in a loop until i is equal to the value of the first syntax element information, thereby obtaining N intermediate point values of the current macroblock.
[0163] In some embodiments, determining the i-th midpoint value of the current macroblock based on the value of the i-th second syntax element information and the value of i can include: performing an i-bit left shift operation on the value of the i-th second syntax element information to obtain the i-th midpoint value of the current macroblock.
[0164] Here, the value of the i-th second syntax element information can be represented by lcu_num_points[i]. At this time, the i-th midpoint value of the current macroblock can be specifically expressed as: lcu_num_points[i]< <i。
[0165] In some embodiments, when determining the initial point value of the current macroblock, the method may include: setting the initial point value of the current macroblock to 0. Specifically, here, lcu_num_points0=0.
[0166] In some embodiments, when determining the point value of the current macroblock based on the initial point value of the current macroblock and the N intermediate point values of the current macroblock, the method may include: performing an accumulation operation based on the initial point value of the current macroblock and the N intermediate point values of the current macroblock to obtain the point value of the current macroblock.
[0167] In the embodiment of the present application, the point value of the current macroblock is calculated as follows: lcu_num_points=lcu_num_points0+∑i(lcu_num_points[i]<<i) (4)
[0168] Among them, lcu_num_points represents the point value of the current macroblock, lcu_num_points0 represents the initial point value of the current macroblock, and lcu_num_points[i] represents the value of the i-th second syntax element information.
[0169] In another possible implementation, when determining the point value of the current macroblock based on the value of the first syntax element information and the value of at least one second syntax element information, referring to FIG. 12 , the method may include:
[0170] S1201: i=0.
[0171] S1202: The value of the 0th point of the current macroblock is set to 0.
[0172] S1203: Determine whether i is greater than or equal to 0 and less than N.
[0173] S1204: Determine the value of the i-th point of the current macroblock.
[0174] S1205: Determine the i-th midpoint value of the current macroblock according to the value of the i-th second syntax element information and the value of i.
[0175] S1206: Determine the i+1th point value of the current macroblock according to the i-th point value of the current macroblock and the i-th middle point value of the current macroblock.
[0176] S1207: i=i+1.
[0177] S1208: When i is equal to N, the determined Nth point value is used as the point value of the current macroblock.
[0178] It should be noted that in the embodiment of the present application, after step S1207, if step S1203 is satisfied, steps S1204 to S1207 are continued. If step S1203 is not satisfied, that is, when i is equal to N, the determined Nth point value is used as the point value of the current macroblock.
[0179] That is, when i is greater than or equal to 0 and less than N, the following steps are executed in a loop:
[0180] Determine the i-th point value of the current macroblock; determine the i-th midpoint value of the current macroblock based on the value of the i-th second syntax element information and the value of i; and determine the i+1-th point value of the current macroblock based on the i-th point value of the current macroblock and the i-th midpoint value of the current macroblock;
[0181] After the Nth point value of the current macroblock is obtained, the Nth point value is used as the point value of the current macroblock.
[0182] It should also be noted that, in the embodiment of the present application, the 0th point value of the current macroblock is the initial point value of the current macroblock and can be set to 0. And when i is equal to N-1, the Nth point value calculated at this time is the point value (lcu_num_points) of the current macroblock.
[0183] It should also be noted that, in an embodiment of the present application, when determining the i-th midpoint value of the current macroblock based on the value of the i-th second syntax element information and the value of i, it can include: performing an i-bit left shift operation on the value of the i-th second syntax element information to obtain the i-th midpoint value of the current macroblock.
[0184] It should also be noted that, in an embodiment of the present application, when determining the i+1th point value of the current macroblock based on the i-th point value of the current macroblock and the i-th midpoint value of the current macroblock, it can include: performing an addition operation on the i-th point value of the current macroblock and the i-th midpoint value of the current macroblock to determine the i+1th point value of the current macroblock.
[0185] For example, for the calculation of the point value (lcu_num_points) of the current macroblock, the relevant syntax elements are described as follows:
[0186] lcu_num_points=0;
[0187] for(i=0;i <num_bits_in_lcu_num_points;i++);
[0188] lcu_num_points+=(lcu_num_points[i]< <i);
[0189] In this way, based on the decoded num_bits_in_lcu_num_points and lcu_num_points[i], the decoder can calculate the point value lcu_num_points of the current macroblock.
[0190] In some embodiments, the method may further include: decoding the bitstream to determine first identification information; if the first identification information indicates that the current sequence starts the prediction tree decoding mode, decoding the bitstream to determine the value of the third syntax element information.
[0191] Furthermore, the method may further include: if the first identification information indicates that the prediction tree decoding mode is not enabled for the current sequence, then the decoding code stream is not performed, and the value of the third syntax element information is determined.
[0192] It should be noted that in this embodiment of the present application, the current sequence includes the current macroblock, and the third syntax element information is used to indicate the maximum number of points in the prediction tree corresponding to the current macroblock. The third syntax element information can be represented by geom_max_tree_size_log2_minus8, and the value of the third syntax element information is an unsigned integer.
[0193] For example, the maximum number of points in the prediction tree is calculated as follows: geom_max_tree_size = 2^(geom_max_tree_size_log2_minus8+8) (5)
[0194] In some embodiments, the method may further include: if the value of the first identification information is a first value, determining that the first identification information indicates that the current sequence starts the prediction tree decoding mode; if the value of the first identification information is a second value, determining that the first identification information indicates that the current sequence does not start the prediction tree decoding mode.
[0195] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the first identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0196] In addition, for the first value and the second value, the first value can be set to 1 and the second value can be set to 0; or the first value can be set to 0 and the second value can be set to 1; or the first value can be set to true and the second value can be set to false; or the first value can be set to false and the second value can be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0197] It should also be noted that in the embodiment of the present application, for the current macroblock in the current sequence, when decoding the current macroblock, the decoding method of the current macroblock is first determined: octree decoding method or prediction tree decoding method. If the current sequence does not enable the prediction tree decoding method, that is, the current macroblock is decoded using the octree decoding method, then there is no need to decode geom_max_tree_size_log2_minus8 in the code stream. If the current sequence enables the prediction tree decoding method, then for the current macroblock, geom_max_tree_size_log2_minus8 in the code stream can also be decoded to determine the maximum number of points in the geometric prediction tree of the current macroblock.
[0198] In short, the embodiment of the present application removes the syntax element geom_max_tree_size_log2_minus8 in the AVS-GPCC Geometry Parameter Set (GPS) by modifying it, so the decoder does not need to decode this syntax element. Specifically, the number of bytes occupied by the point value of the current macroblock, num_bits_in_lcu_num_points, is first decoded, and then each bit of the point value of the current macroblock, i.e., lcu_num_points[i], is decoded. The decoder then calculates the point value of the current macroblock based on the two syntax elements num_bits_in_lcu_num_points and lcu_num_points[i] corresponding to the current macroblock.
[0199] For example, Table 3 shows a syntax table corresponding to the GPS header, and the description of its syntax elements is shown in Table 3.
[0200] Table 3
[0201] For example, Table 4 shows the syntax table corresponding to the current macroblock LCU in the prediction tree decoding mode, and the description of its syntax elements is shown in Table 4.
[0202] Table 4
[0203] An embodiment of the present application provides a decoding method for decoding a bitstream, determining the value of a first syntax element information and the value of at least one second syntax element information; and then determining the point value of the current macroblock based on the value of the first syntax element information and the value of at least one second syntax element information. The first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information. In this way, by making corresponding corrections to the relevant syntax elements in the geometric decoding process, the decoding end no longer needs to decode the syntax elements used to represent the maximum number of points in the geometric prediction tree, but instead determines the point value of the current macroblock through the first syntax element information and the second syntax element information, thereby saving bit rate, improving encoding and decoding efficiency, and further improving geometric encoding and decoding performance.
[0204] In another embodiment of the present application, referring to FIG13 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG13 , the method may include:
[0205] S1301: Determine the point value of the current macroblock.
[0206] It should be noted that the encoding method of the embodiment of the present application is applied to an encoder, specifically to the AVS-PCC encoding framework, or the AVS-GPCC encoding framework. Here, the embodiment of the present application specifically provides a point cloud geometry encoding scheme, and more specifically, provides a method for encoding parameters related to geometric macroblocks and prediction trees to improve encoding and decoding efficiency.
[0207] It should also be noted that, in the embodiment of the present application, for the current macroblock, the point cloud to be processed is spatially divided to determine at least one geometric macroblock, wherein the at least one geometric macroblock includes the current macroblock, or in other words, the current macroblock is any one of the at least one macroblock.
[0208] It should also be noted that in the embodiment of the present application, the point cloud to be processed can be a point cloud slice. In this way, the slice is spatially divided based on the largest coding unit (LCU) to obtain at least one geometric macroblock. For each geometric macroblock, the encoder counts the number of points in each geometric macroblock and can determine the respective point values.
[0209] S1302: Determine a value of a first syntax element information and a value of at least one second syntax element information according to a point value of a current macroblock.
[0210] It should be noted that, in the embodiment of the present application, the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock. Here, the first syntax element information can also be referred to as the number of bytes occupied by the point value of the current macroblock, which can be represented by num_bits_in_lcu_num_points.
[0211] It should also be noted that in this embodiment of the present application, the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock. Here, the i-th second syntax element information can also be referred to as the byte of the point value of the current macroblock, and can be represented by lcu_num_points[i]. Where i is an integer greater than or equal to 0 and less than the value of the first syntax element information.
[0212] In some embodiments, when encoding the point value of the current macroblock, it is first necessary to determine the value of the corresponding syntax element information. In some embodiments, this may specifically include: binarizing the point value of the current macroblock to determine the value of the first syntax element information and the value of at least one second syntax element information.
[0213] It should be noted that, in the embodiment of the present application, the value of the first syntax element information is an unsigned integer, specifically a 5-bit unsigned integer. The value of the second syntax element information is a binary variable, specifically 0 or 1.
[0214] That is, in the embodiment of the present application, the dot value of the current macroblock is binarized to generate a binary string; based on the generated binary string, the value of the first syntax element information and the value of at least one second syntax element information can be determined. For example, assuming that the dot value of the current macroblock is 26, then after the binarization process, the generated binary string is 11010, and the value of the first syntax element information can be determined to be 5. There are a total of five second syntax elements here, the value of the 0th second syntax element information is 0, the value of the 1st second syntax element information is 1, the value of the 2nd second syntax element information is 0, the value of the 3rd second syntax element information is 1, and the value of the 4th second syntax element information is 1.
[0215] It should also be noted that, in an embodiment of the present application, if the value of the first syntax element information is N, then the number of at least one second syntax element information is N; that is, the number of at least one second syntax element information is the same as the value of the first syntax element information.
[0216] S1303: Encode the value of the first syntax element information and the value of at least one second syntax element information, and write the obtained coded bits into a bitstream.
[0217] It should be noted that, in the embodiment of the present application, when encoding the point value of the current macroblock, the encoding may be performed for the value of the first syntax element information and the value of at least one second syntax element information. In some embodiments, when encoding the value of the first syntax element information and the value of at least one second syntax element information, the method may include:
[0218] Encoding a value of the first syntax element information;
[0219] When i is greater than or equal to 0 and less than the value of the first syntax element information, the following steps are executed in a loop to implement encoding of the value of at least one second syntax element information:
[0220] The value of the i-th second syntax element information is encoded, and an operation of adding 1 is performed on i.
[0221] That is, in the embodiment of the present application, the value of the first syntax element information is first encoded; then, when i is greater than or equal to 0 and less than the value of the first syntax element information, the step of encoding the value of the i-th second syntax element information is performed repeatedly until i is equal to the value of the first syntax element information, thereby encoding the value of the first syntax element information and at least one value of the second syntax element information into the bitstream.
[0222] For example, in the code stream, the relevant syntax elements are described as follows:
[0223] It should also be noted that, in the embodiment of the present application, the value of the first syntax element information and the value of at least one second syntax element information can be encoded based on a bypass model.
[0224] In some embodiments, the method may further include: determining first identification information; wherein the first identification information is used to indicate whether the current sequence enables the prediction tree coding mode; and encoding the value of the first identification information and writing the obtained coding bits into the bitstream.
[0225] It should be noted that, in an embodiment of the present application, when determining the first identification information, it may include: if the current sequence turns on the prediction tree encoding mode, then determining the first identification information to be the first value; if the current sequence does not turn on the prediction tree encoding mode, then determining the first identification information to be the second value.
[0226] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the first identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0227] In addition, for the first value and the second value, the first value can be set to 1 and the second value can be set to 0; or the first value can be set to 0 and the second value can be set to 1; or the first value can be set to true and the second value can be set to false; or the first value can be set to false and the second value can be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0228] It should also be noted that in the embodiment of the present application, the current sequence includes the current macroblock. The first identification information can be a GPS parameter. If the current sequence enables the prediction tree encoding mode, the first identification information can be determined to be a first value. In this case, for the current macroblock, the encoding mode needs to be further determined, such as the octree encoding mode or the prediction tree encoding mode. If the current sequence does not enable the prediction tree encoding mode, the first identification information can be determined to be a second value, that is, the encoding mode of the current macroblock is the octree encoding mode.
[0229] In some embodiments, the method may further include: determining a maximum number of points in a prediction tree corresponding to the current macroblock; and determining an encoding method for the current macroblock based on a comparison between the point value of the current macroblock and the maximum number of points.
[0230] It should be noted that, in the embodiment of the present application, the encoding method of the current macroblock may include an octree encoding method and a prediction tree encoding method, and the encoding end performs adaptive encoding in these two methods. In some embodiments, when determining the encoding method of the current macroblock based on the comparison between the point value of the current macroblock and the maximum point value, the following may be included:
[0231] If the point value of the current macroblock is less than the maximum point value, it is determined that the current macroblock uses the prediction tree encoding method;
[0232] If the point value of the current macroblock is greater than the maximum point value, it is determined that the current macroblock uses the octree encoding method.
[0233] In an embodiment of the present application, the method may further include: when the current macroblock uses a prediction tree encoding method, determining the value of the third syntax element information based on the maximum number of points; encoding the value of the third syntax element information, and writing the obtained encoding bits into the bitstream.
[0234] In an embodiment of the present application, the method may further include: when the current macroblock does not use the prediction tree encoding method, that is, the current macroblock uses the octree encoding method, at this time there is no need to determine the value of the third syntax element information, nor is there any need to encode the value of the third syntax element information into the bitstream.
[0235] It should be noted that in this embodiment of the present application, the current sequence includes the current macroblock, and the third syntax element information is used to indicate the maximum number of points in the prediction tree corresponding to the current macroblock. The third syntax element information can be represented by geom_max_tree_size_log2_minus8, and the value of the third syntax element information is an unsigned integer.
[0236] For example, assuming that the maximum number of points in the prediction tree is represented by geom_max_tree_size, the calculation of the value of the third syntax element information is as follows: geom_max_tree_size_log2_minus8=log2(geom_max_tree_size)-8 (6)
[0237] It should also be noted that in the embodiment of the present application, for the current macroblock in the current sequence, when encoding the current macroblock, the encoding method of the current sequence is first determined: octree encoding method or prediction tree encoding method. If the current sequence turns on the prediction tree decoding method, then for the current macroblock, it is necessary to further determine the encoding method of the current macroblock; if the current macroblock uses prediction tree encoding, then it is necessary to determine the value of the third syntax element geom_max_tree_size_log2_minus8 and write it to the bitstream; if the current sequence does not turn on the prediction tree encoding method, that is, the current macroblock uses octree encoding, then it is not necessary to determine the value of the third syntax element geom_max_tree_size_log2_minus8 and write it to the bitstream.
[0238] In short, the embodiment of the present application removes the syntax element geom_max_tree_size_log2_minus8 in the geometry parameter set (GPS) of AVS-GPCC by modifying it. Since this syntax element is only used to control the encoding of each macroblock at the encoding end, if the current macroblock adopts the prediction tree encoding method, the number of coding points in the current macroblock must be controlled to be less than a certain threshold (such as the maximum number of points). The decoding end does not need this syntax element for control. At the decoding end, the point value of the current macroblock is calculated by taking the syntax element lcu_num_points of each macroblock. Specifically, the number of bytes occupied by the point value of the current macroblock, num_bits_in_lcu_num_points, is first decoded, and then each bit of the point value of the current macroblock is decoded, that is, lcu_num_points[i]. The decoding end then calculates the point value of the current macroblock based on the two syntax elements num_bits_in_lcu_num_points and lcu_num_points[i] corresponding to the current macroblock. For example, for the calculation of the point value (lcu_num_points) of the current macroblock, the relevant syntax elements are described as follows: lcu_num_points=0; for (i=0; i <num_bits_in_lcu_num_points;i++); lcu_num_points+=(lcu_num_points[i]<<i);
[0239] In another embodiment of the present application, the embodiment of the present application further provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:
[0240] The value of the first syntax element information, the value of at least one second syntax element information, and the first identification information.
[0241] In an embodiment of the present application, the first identification information is used to indicate whether the prediction tree encoding mode is enabled in the current sequence, the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information.
[0242] In this way, in order to better determine the point value of the current macroblock, the encoder can write num_bits_in_lcu_num_points and lcu_num_points[i] into the bitstream, so that the decoder can calculate the point value lcu_num_points of the current macroblock based on num_bits_in_lcu_num_points and lcu_num_points[i] obtained by decoding.
[0243] The embodiment of the present application provides a coding method for determining the point value of the current macroblock; determining the value of the first syntax element information and the value of at least one second syntax element information based on the point value of the current macroblock; encoding the value of the first syntax element information and the value of at least one second syntax element information, and writing the obtained coded bits into the bitstream. The first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information. In this way, by making corresponding corrections to the relevant syntax elements in the geometric coding process, the decoding end no longer needs to decode the syntax element used to represent the maximum number of points in the geometric prediction tree, but instead determines the point value of the current macroblock through the first syntax element information and the second syntax element information, thereby saving bit rate, improving encoding and decoding efficiency, and further improving geometric encoding and decoding performance.
[0244] In another embodiment of the present application, when AVS-PCC encodes the geometric information of the point cloud, it encodes based on the geometric macroblock of the LCU, that is, firstly, the point cloud slice is spatially divided to obtain different geometric macroblocks, and then each geometric macroblock is adaptively encoded. When decoding each geometric macroblock, the decoding type of the current geometric macroblock is first obtained: octree decoding or prediction tree decoding. If the current geometric macroblock is decoded using a prediction tree, it is necessary to decode the point value of the current geometric macroblock. However, there is a syntax element in AVS-PCC: geom_max_tree_size_log2_minus8, the specific meaning of which is: the maximum number of points in the geometric prediction tree geom_max_tree_size_log2_minus8, an unsigned integer. Among them, the maximum number of points in the geometric prediction tree is calculated as shown in the aforementioned formula (5).
[0245] Here, when the encoding end uses prediction tree encoding, due to the cache pressure problem, the rate-distortion optimization algorithm needs to control the number of coding points in the current macroblock to be less than a certain threshold, so it is necessary to determine the maximum number of points corresponding to the geometric prediction tree; however, at the decoding end, the embodiment of the present application is a single-chain structure that is decoded in sequence, so the decoding end no longer has a cache pressure problem, that is, there is no need to determine the maximum number of points. In addition, at the encoding end, for the syntax element geom_max_tree_size_log2_minus8, it can also be used to indicate whether the current macroblock can perform adaptive selection of prediction tree or octree; if the number of coding points in the current macroblock is greater than the maximum number of points, then only octree encoding can be selected, and there is no adaptive selection decoding at the decoding end. Therefore, in the embodiment of the present application, the syntax element geom_max_tree_size_log2_minus8 has no effect on the decoding end, and the decoding end can obtain the point value of the prediction tree decoding in the current geometric macroblock based on lcu_num_points.
[0246] Based on the encoding and decoding method of the aforementioned embodiment, in the embodiment of the present application, the technical solution makes corresponding corrections to the relevant syntax elements of the prediction tree decoding point cloud in the geometric coding in AVS-GPCC. Specifically:
[0247] The syntax element geom_max_tree_size_log2_minus8 in GPS can be removed, as shown in Table 3 above; and the calculation method of the number of points when decoding using the prediction tree in the geometry macroblock needs to be specified as follows:
[0248] (1) The number of bytes occupied by the geometry macroblock (LCU) point value is num_bits_in_lcu_num_points, a 5-bit unsigned integer; this syntax element indicates the number of bits used by the geometry macroblock point value.
[0249] (2) Geometry macroblock (LCU) point value byte lcu_num_points[i], a binary variable, this syntax element represents the i-th bit of the geometry macroblock point value.
[0250] At this time, the calculation of lcu_num_points is as follows: lcu_num_points = 0; for (i = 0; i <num_bits_in_lcu_num_points;i++); lcu_num_points+=(lcu_num_points[i]<<i);
[0251] In the embodiment of the present application, the specific implementation of the aforementioned embodiment is described in detail through the above embodiment. It can be seen that according to the technical solution of the aforementioned embodiment, the present technical solution is removed by correcting the syntax element geom_max_tree_size_log2_minus8 in the GPS in the current AVS-GPCC geometry coding. Since this syntax element is only used to control the encoding of each LCU at the encoding end, if the current LCU adopts prediction tree encoding, the number of coding points in the current LCU must be controlled to be less than a certain threshold. The decoding end does not need this syntax element to control. At the decoding end, the number of points of the current geometry macroblock is calculated by taking the syntax element lcu_num_points of each LCU geometry macroblock. Specifically, the number of bytes occupied by the geometry macroblock point value num_bits_in_lcu_num_points is first decoded, and then each bit of the point value in the geometry macroblock is decoded, that is, lcu_num_points[i]. Similarly, since the AVS-PCC text does not specify how to calculate the point value in the geometric macroblock through two syntax elements, the calculation method is further specified in the embodiment of the present application so that the point value of the geometric macroblock can still be determined when one syntax element is removed; thereby saving bit rate, improving encoding and decoding efficiency, and thus improving geometric encoding and decoding performance.
[0252] In yet another embodiment of the present application, based on the same inventive concept as the aforementioned embodiment, referring to FIG14 , a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application is shown. As shown in FIG14 , the encoder 140 may include a first determining unit 1401 and an encoding unit 1402, wherein:
[0253] A first determining unit 1401 is configured to determine a point value of a current macroblock; and determine a value of a first syntax element information and a value of at least one second syntax element information based on the point value of the current macroblock; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information;
[0254] The encoding unit 1402 is configured to encode the value of the first syntax element information and the value of at least one second syntax element information, and write the obtained coded bits into the bitstream.
[0255] In some embodiments, the first determining unit 1401 is further configured to spatially divide the point cloud to be processed and determine at least one geometric macroblock; wherein the at least one geometric macroblock includes the current macroblock.
[0256] In some embodiments, the first determining unit 1401 is further configured to perform binarization processing on the point value of the current macroblock to determine the value of the first syntax element information and the value of at least one second syntax element information.
[0257] In some embodiments, the encoding unit 1402 is further configured to encode the value of the first syntax element information; and when i is greater than or equal to 0 and less than the value of the first syntax element information, loop the following steps to achieve encoding of the value of at least one second syntax element information: encode the value of the i-th second syntax element information, and perform an addition operation on i.
[0258] In some embodiments, the value of the first syntax element information is an unsigned integer, and the value of the second syntax element information is a binary variable.
[0259] In some embodiments, the first determining unit 1401 is further configured to determine first identification information; wherein the first identification information is used to indicate whether the current sequence starts the prediction tree encoding mode;
[0260] The encoding unit 1402 is further configured to encode the value of the first identification information and write the obtained coded bits into the bit stream.
[0261] In some embodiments, the first determining unit 1401 is further configured to determine that the first identification information is a first value if the current sequence enables the prediction tree coding mode; and to determine that the first identification information is a second value if the current sequence does not enable the prediction tree coding mode.
[0262] In some embodiments, the first determining unit 1401 is further configured to determine the maximum number of points of the prediction tree corresponding to the current macroblock; and determine the encoding method of the current macroblock based on the comparison between the point value of the current macroblock and the maximum number of points.
[0263] In some embodiments, the first determination unit 1401 is further configured to determine that the current macroblock uses a prediction tree encoding method if the point value of the current macroblock is less than the maximum point number; if the point value of the current macroblock is greater than the maximum point number, determine that the current macroblock uses an octree encoding method.
[0264] In some embodiments, the first determining unit 1401 is further configured to determine a value of the third syntax element information according to the maximum number of points when the current macroblock uses a prediction tree coding mode;
[0265] The encoding unit 1402 is further configured to encode the value of the third syntax element information and write the obtained coded bits into the bitstream.
[0266] 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.
[0267] 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.
[0268] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 140. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the aforementioned embodiments.
[0269] Based on the composition of the above-mentioned encoder 140 and the computer-readable storage medium, refer to Figure 15, which shows a specific hardware structure diagram of the encoder 140 provided in an embodiment of the present application. As shown in Figure 15, the encoder 140 may include: a first communication interface 1501, a first memory 1502 and a first processor 1503; each component is coupled together through a first bus system 1504. It can be understood that the first bus system 1504 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 1504 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 1504 in Figure 15. Among them,
[0270] The first communication interface 1501 is used to receive and send signals when sending and receiving information with other external network elements;
[0271] A first memory 1502 is used to store computer programs that can be run on the first processor 1503;
[0272] The first processor 1503 is configured to, when running the computer program, execute:
[0273] Determine the point value of the current macroblock;
[0274] Determining, based on the point value of the current macroblock, a value of a first syntax element information and a value of at least one second syntax element information; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information;
[0275] The value of the first syntax element information and the value of at least one second syntax element information are encoded, and the obtained encoded bits are written into a bitstream.
[0276] It is understood that the first memory 1502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 1502 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0277] The first processor 1503 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1503. The above-mentioned first processor 1503 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 1502 , and the first processor 1503 reads the information in the first memory 1502 and completes the steps of the above method in combination with its hardware.
[0278] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0279] Optionally, as another embodiment, the first processor 1503 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
[0280] This embodiment provides an encoder. For this encoder, by making corresponding corrections to the relevant syntax elements in the geometric coding process, the decoding end no longer needs to decode the syntax elements used to represent the maximum number of points in the geometric prediction tree, but instead determines the point value of the current macroblock through the first syntax element information and the second syntax element information, thereby saving bit rate, improving encoding and decoding efficiency, and further improving geometric encoding and decoding performance.
[0281] In yet another embodiment of the present application, based on the same inventive concept as the aforementioned embodiment, see FIG16 , which shows a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application. As shown in FIG16 , the decoder 160 may include a decoding unit 1601 and a second determining unit 1602, wherein:
[0282] The decoding unit 1601 is configured to decode a bitstream and determine a value of a first syntax element and a value of at least one second syntax element; wherein the first syntax element is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element;
[0283] The second determining unit 1602 is configured to determine a point value of the current macroblock according to a value of the first syntax element information and a value of at least one second syntax element information.
[0284] In some embodiments, the decoding unit 1601 is further configured to decode the code stream, determine the value of the first syntax element information; and when i is greater than or equal to 0 and less than the value of the first syntax element information, loop through the following steps to obtain the value of at least one second syntax element information: decode the code stream, determine the value of the i-th second syntax element information, and add 1 to i.
[0285] In some embodiments, the number of at least one second syntax element information is N; the second determination unit 1602 is further configured to determine an initial point value of the current macroblock; determine N intermediate point values of the current macroblock based on the value of at least one second syntax element information; wherein the value of N is equal to the value of the first syntax element information; and determine the point value of the current macroblock based on the initial point value of the current macroblock and the N intermediate point values of the current macroblock.
[0286] In some embodiments, the second determination unit 1602 is further configured to, when i is greater than or equal to 0 and less than the value of the first syntax element information, loop through the following steps to obtain N midpoint values of the current macroblock: determine the i-th midpoint value of the current macroblock based on the value of the i-th second syntax element information and the value of i, and perform an addition operation on i.
[0287] In some embodiments, the second determining unit 1602 is further configured to perform an i-bit left shift operation on the value of the i-th second syntax element information to obtain the i-th midpoint value of the current macroblock.
[0288] In some embodiments, the second determining unit 1602 is further configured to set the initial point value of the current macroblock to 0.
[0289] In some embodiments, the second determining unit 1602 is further configured to perform an accumulation operation based on the initial point value of the current macroblock and the N intermediate point values of the current macroblock to obtain the point value of the current macroblock.
[0290] In some embodiments, the value of the first syntax element information is an unsigned integer, and the value of the second syntax element information is a binary variable.
[0291] In some embodiments, the decoding unit 1601 is further configured to decode the code stream and determine the first identification information; and if the first identification information indicates that the current sequence starts the prediction tree decoding mode, decode the code stream and determine the value of the third syntax element information; wherein the current sequence includes the current macroblock, and the third syntax element information is used to indicate the maximum number of points of the prediction tree corresponding to the current macroblock.
[0292] In some embodiments, the decoding unit 1601 is further configured to not perform the steps of decoding the bitstream and determining the value of the third syntax element information if the first identification information indicates that the prediction tree decoding mode is not enabled for the current sequence.
[0293] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.
[0294] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium, which is applied to the decoder 160 and stores a computer program. When the computer program is executed by the second processor, it implements any of the methods in the aforementioned embodiments.
[0295] Based on the composition of the above-mentioned decoder 160 and the computer-readable storage medium, refer to Figure 17, which shows a specific hardware structure diagram of the decoder 160 provided in an embodiment of the present application. As shown in Figure 17, the decoder 160 may include: a second communication interface 1701, a second memory 1702 and a second processor 1703; each component is coupled together through a second bus system 1704. It can be understood that the second bus system 1704 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 1704 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 1704 in Figure 17. Among them,
[0296] The second communication interface 1701 is used to receive and send signals when sending and receiving information with other external network elements;
[0297] The second memory 1702 is used to store computer programs that can be run on the second processor 1703;
[0298] The second processor 1703 is configured to, when running the computer program, execute:
[0299] Decoding a bitstream, and determining a value of a first syntax element and a value of at least one second syntax element; wherein the first syntax element is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element;
[0300] A point value of the current macroblock is determined according to a value of the first syntax element information and a value of at least one second syntax element information.
[0301] Optionally, as another embodiment, the second processor 1703 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
[0302] It can be understood that the hardware functions of the second memory 1702 and the first memory 1502 are similar, and the hardware functions of the second processor 1703 and the first processor 1503 are similar; they will not be described in detail here.
[0303] This embodiment provides a decoder. For this decoder, by making corresponding corrections to the relevant syntax elements in the geometric coding process, the decoding end no longer needs to decode the syntax elements used to represent the maximum number of points in the geometric prediction tree. Instead, the point value of the current macroblock is determined by the first syntax element information and the second syntax element information, thereby saving bit rate, improving encoding and decoding efficiency, and further improving geometric encoding and decoding performance.
[0304] In yet another embodiment of the present application, referring to FIG18 , a schematic diagram of the structure of a coding and decoding system provided by an embodiment of the present application is shown. As shown in FIG18 , the coding and decoding system 180 may include an encoder 1801 and a decoder 1802 .
[0305] In the embodiment of the present application, the encoder 1801 may be the encoder described in any one of the aforementioned embodiments, and the decoder 1802 may be the decoder described in any one of the aforementioned embodiments.
[0306] 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.
[0307] 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.
[0308] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0309] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0310] 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.
[0311] 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
[0312] In an embodiment of the present application, at the encoder, the point value of the current macroblock is determined; then, based on the point value of the current macroblock, the value of a first syntax element and the value of at least one second syntax element are determined; the values of the first syntax element and the values of the at least one second syntax element are encoded, and the resulting coded bits are written into the bitstream. At the decoder, the bitstream is decoded, the values of the first syntax element and the values of the at least one second syntax element are determined; then, based on the values of the first syntax element and the values of the at least one second syntax element, the point value of the current macroblock is determined. The first syntax element indicates the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element indicates the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element. Thus, by making corresponding modifications to the relevant syntax elements in the geometry coding process, the decoder no longer needs to decode the syntax element representing the maximum point value of the geometry prediction tree. Instead, the first syntax element and the second syntax element are used to determine the point value of the current macroblock, thereby saving bit rate, improving encoding and decoding efficiency, and ultimately improving geometry encoding and decoding performance.
Claims
1. A decoding method, applied to a decoder, the method comprising: Decoding a bitstream, determining a value of a first syntax element information and a value of at least one second syntax element information; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information; The point value of the current macroblock is determined according to a value of the first syntax element information and a value of the at least one second syntax element information.
2. The method according to claim 1, wherein: The decoding bitstream determines a value of the first syntax element information and a value of at least one second syntax element information, including: Decoding the bitstream to determine a value of the first syntax element information; When i is greater than or equal to 0 and less than the value of the first syntax element information, the following steps are executed in a loop to obtain the value of the at least one second syntax element information: The code stream is decoded, the value of the i-th second syntax element information is determined, and an operation of adding 1 is performed on i.
3. The method according to claim 1, wherein: The number of the at least one second syntax element information is N; The determining, according to the value of the first syntax element information and the value of the at least one second syntax element information, the point value of the current macroblock includes: Determining an initial point value of the current macroblock; Determine N intermediate point values of the current macroblock according to the value of the at least one second syntax element information; wherein the value of N is equal to the value of the first syntax element information; The point value of the current macroblock is determined according to the initial point value of the current macroblock and the N intermediate point values of the current macroblock.
4. The method according to claim 3, wherein: The determining, according to the value of the at least one second syntax element information, the N intermediate point values of the current macroblock includes: When i is greater than or equal to 0 and less than the value of the first syntax element information, the following steps are executed in a loop to obtain N intermediate point values of the current macroblock: According to the value of the i-th second syntax element information and the value of i, the i-th midpoint value of the current macroblock is determined, and an addition operation is performed on i.
5. The method according to claim 4, wherein: The determining, according to the value of the i-th second syntax element information and the value of i, the i-th midpoint value of the current macroblock includes: The value of the i-th second syntax element information is shifted left by i bits to obtain the i-th midpoint value of the current macroblock.
6. The method according to claim 3, wherein: The determining of the initial point value of the current macroblock includes: The initial point value of the current macroblock is set to 0.
7. The method according to claim 3, wherein: Determining the point value of the current macroblock according to the initial point value of the current macroblock and the N intermediate point values of the current macroblock includes: The point value of the current macroblock is obtained by performing a cumulative operation on the initial point value of the current macroblock and the N intermediate point values of the current macroblock.
8. The method according to any one of claims 1 to 7, wherein: The value of the first syntax element information is an unsigned integer, and the value of the second syntax element information is a binary variable.
9. The method according to claim 1, wherein: The method further comprises: Decoding the code stream to determine the first identification information; If the first identification information indicates that the current sequence starts the prediction tree decoding mode, decode the bitstream to determine the value of the third syntax element information; The current sequence includes the current macroblock, and the third syntax element information is used to indicate the maximum number of points of the prediction tree corresponding to the current macroblock.
10. The method according to claim 9, wherein: The method further comprises: If the first identification information indicates that the current sequence does not enable the prediction tree decoding mode, the decoding bit stream is not performed, and the third The steps of obtaining the value of syntax element information.
11. A coding method, applied to an encoder, the method comprising: Determine the point value of the current macroblock; Determine, according to the point value of the current macroblock, a value of a first syntax element information and a value of at least one second syntax element information; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information; The value of the first syntax element information and the value of the at least one second syntax element information are encoded, and the obtained encoding bits are written into a bitstream.
12. The method according to claim 11, wherein: The method further comprises: The point cloud to be processed is spatially divided to determine at least one geometric macroblock; wherein the at least one geometric macroblock includes the current macroblock.
13. The method according to claim 11, wherein: The determining, according to the point value of the current macroblock, a value of the first syntax element information and a value of at least one second syntax element information, comprises: Binarization is performed on the point value of the current macroblock to determine a value of the first syntax element information and a value of the at least one second syntax element information.
14. The method according to claim 11, wherein: The encoding of the value of the first syntax element information and the value of the at least one second syntax element information includes: Encoding a value of the first syntax element information; When i is greater than or equal to 0 and less than the value of the first syntax element information, the following steps are executed in a loop to implement encoding of the value of the at least one second syntax element information: The value of the i-th second syntax element information is encoded, and an operation of adding 1 is performed on i.
15. The method according to any one of claims 11 to 14, wherein: The value of the first syntax element information is an unsigned integer, and the value of the second syntax element information is a binary variable.
16. The method according to claim 11, wherein: The method further comprises: Determine first identification information; wherein the first identification information is used to indicate whether the current sequence starts the prediction tree encoding mode; The value of the first identification information is encoded, and the obtained encoded bits are written into a bit stream.
17. The method according to claim 16, wherein: The determining of the first identification information includes: If the current sequence starts the prediction tree encoding mode, determining that the first identification information is a first value; If the current sequence does not enable the prediction tree encoding mode, the first identification information is determined to be a second value.
18. The method according to claim 11, wherein: The method further comprises: Determine the maximum number of points of the prediction tree corresponding to the current macroblock; Based on the comparison between the point value of the current macroblock and the maximum point value, the encoding mode of the current macroblock is determined.
19. The method according to claim 18, wherein: The step of determining the encoding mode of the current macroblock based on the comparison between the point value of the current macroblock and the maximum point value includes: If the point value of the current macroblock is less than the maximum point value, determining that the current macroblock uses a prediction tree encoding method; If the point value of the current macroblock is greater than the maximum point value, it is determined that the current macroblock uses an octree encoding method.
20. The method according to claim 19, wherein: The method further comprises: When the current macroblock uses a prediction tree coding mode, determining a value of the third syntax element information according to the maximum number of points; The value of the third syntax element information is encoded, and the obtained encoded bits are written into a bitstream.
21. A code stream, wherein The code stream is generated by bit encoding according to the information to be encoded; wherein the information to be encoded includes at least one of the following: The value of a first syntax element information, the value of at least one second syntax element information and a first identification information; wherein the first identification information is used to indicate whether the prediction tree encoding mode is turned on for the current sequence, the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information.
22. An encoder, comprising a first determining unit and an encoding unit, wherein: The first determination unit is configured to determine a point value of the current macroblock; and determine a value of a first syntax element information and a value of at least one second syntax element information according to the point value of the current macroblock; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information; The encoding unit is configured to encode the value of the first syntax element information and the value of the at least one second syntax element information, and write the obtained encoding bits into a bitstream.
23. An encoder, comprising a first memory and a first processor, wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 11 to 20 when running the computer program.
24. A decoder, comprising a decoding unit and a second determining unit, wherein: The decoding unit is configured to decode the bitstream and determine the value of the first syntax element information and the value of at least one second syntax element information; wherein the first syntax element information is used to indicate the number of bits occupied by the point value of the current macroblock, and the i-th second syntax element information is used to indicate the i-th bit corresponding to the point value of the current macroblock, where i is an integer greater than or equal to 0 and less than the value of the first syntax element information; The second determination unit is configured to determine a point value of the current macroblock according to a value of the first syntax element information and a value of the at least one second syntax element information.
25. A decoder, comprising a second memory and a second processor, wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 10 when running the computer program.
26. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, which implements the method according to any one of claims 1 to 10 when executed by a first processor, or implements the method according to any one of claims 11 to 20 when executed by a second processor.