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

CN118743218AActive Publication Date: 2024-10-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202280092172.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-03-12
Publication Date
2024-10-01
Estimated Expiration
2042-03-12

AI Technical Summary

Technical Problem

In existing point cloud compression technology, the reference range for attribute prediction is constructed inaccurately, resulting in low point cloud attribute encoding and decoding performance.

Method used

By determining the index number of the current node and its target position in the initial reference set, the parity and even characteristics are used to construct the target reference set, and the point cloud attributes are predicted and encoded and decoded.

Benefits of technology

It improves the prediction accuracy and encoding and decoding performance of point cloud attributes, ensuring efficient compression and transmission of point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118743218A_ABST
    Figure CN118743218A_ABST
Patent Text Reader

Abstract

Disclosed are an encoding and decoding method, a code stream, an encoder, a decoder and a storage medium, applied to the decoder, the method comprising: determining an index sequence number and an initial reference set corresponding to a current node (S701); determining a target position corresponding to the current node in the initial reference set based on parity characteristics of the index sequence number (S702); and after decoding the current node according to the initial reference set, placing the current node at a target position to obtain a target reference set (S703). Therefore, the target reference set including the current node is constructed based on the odd-even characteristics of the index sequence number, the prediction accuracy of the point cloud attribute can be improved by utilizing the target reference set, and the coding and decoding performance of the point cloud attribute is improved.
Need to check novelty before this filing date? Find Prior Art

Description

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

[0001] The embodiments of the present application relate to the field of point cloud compression 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 Audio Video Standard-Point Cloud Compression (AVS-PCC) codec framework based on the Audio Video Coding Standard, the geometric and attribute information of a point cloud are encoded separately. After geometric encoding, the geometric information is reconstructed, and the encoding of the attribute information relies on the reconstructed geometric information. Attribute encoding primarily encodes color information, converting it into a YUV color space that better matches human visual characteristics. Attribute encoding is then performed on the preprocessed attribute information, ultimately generating a binary attribute bitstream.

[0003] Currently, the Point Cloud Compression Reference Model (PCRM) primarily uses global search or spatial relationship search to predict the attributes of the current node during attribute encoding. However, both existing global and spatial relationship search methods have drawbacks, resulting in inaccurate reference ranges for determining predicted nodes, reducing the accuracy of attribute prediction.

[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 the prediction accuracy of point cloud attributes and improve the coding and decoding performance of point cloud attributes.

[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] Determine the index number and initial reference set corresponding to the current node;

[0009] Based on the parity of the index number, determine the target position corresponding to the current node in the initial reference set;

[0010] After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

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

[0012] Determine the index number and initial reference set corresponding to the current node;

[0013] Based on the parity of the index number, determine the target position corresponding to the current node in the initial reference set;

[0014] After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

[0015] 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: an attribute residual value corresponding to the current node.

[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 an index number and an initial reference set corresponding to the current node; and determine a target position corresponding to the current node in the initial reference set based on an even-odd property of the index number;

[0018] The encoding unit is configured to, after encoding the current node according to the initial reference set, place the current node at a target position to obtain a target reference set.

[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 second aspect when running a computer program.

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

[0023] A second determining unit is configured to determine an index number corresponding to the current node and an initial reference set; and determine a target position corresponding to the current node in the initial reference set based on an even-odd property of the index number;

[0024] The decoding unit is configured to place the current node at a target position after decoding the current node according to the initial reference set to obtain a target reference set.

[0025] In a seventh aspect, an embodiment of the present application provides a decoder, the 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 of the first aspect when running the computer program.

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

[0029] The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium. At the coding end, the index number and the initial reference set corresponding to the current node are determined; based on the parity characteristics of the index number, the target position corresponding to the current node in the initial reference set is determined; after encoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set. At the decoding end, the index number and the initial reference set corresponding to the current node are determined; based on the parity characteristics of the index number, the target position corresponding to the current node in the initial reference set is determined; after decoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set. In this way, a target reference set including the current node is constructed based on the parity characteristics of the index number, and the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the coding and decoding performance of the point cloud attributes. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1A is a schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;

[0031] FIG1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;

[0032] FIG2A is a schematic diagram of a point cloud image at different viewing angles provided by an embodiment of the present application;

[0033] FIG2B is a schematic diagram of a data storage format corresponding to FIG2A provided in an embodiment of the present application;

[0034] FIG3 is a schematic diagram of a network architecture of point cloud encoding and decoding provided by an embodiment of the present application;

[0035] FIG4 is a schematic diagram of the structure of a point cloud encoder provided in an embodiment of the present application;

[0036] FIG5 is a schematic diagram of the structure of a point cloud decoder provided in an embodiment of the present application;

[0037] FIG6A is a schematic diagram of the distribution of a current node and coplanar nodes provided in an embodiment of the present application;

[0038] FIG6B is a schematic diagram of the distribution of a current node and collinear nodes provided in an embodiment of the present application;

[0039] FIG6C is a schematic diagram of the distribution of a current node and co-point nodes provided in an embodiment of the present application;

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

[0041] 8A to 8H are schematic diagrams of eight modes corresponding to the current node orientation provided in an embodiment of the present application;

[0042] 9A to 9H are schematic diagrams showing the distribution of coplanar, colinear, and co-point neighbor blocks corresponding to a current node in eight modes according to an embodiment of the present application;

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

[0044] FIG11 is a schematic diagram of a flow chart of a reference range determination process provided in an embodiment of the present application;

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

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

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

[0048] FIG15 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application. DETAILED DESCRIPTION

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0067] 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. A 1280 × 720 2D video with a frame rate of 24 fps has a data volume of approximately 1280 × 720 × 12 bits × 24 fps × 10 seconds = 0.33 GB. A 10-second two-view 3D video has a data volume of approximately 0.33 × 2 = 0.66 GB. This shows that the data volume of a point cloud video far exceeds that of 2D and 3D videos of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.

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

[0069] Currently, the point cloud coding framework that can compress point clouds can be the geometry-based Point Cloud Compression (G-PCC) codec framework or the video-based Point Cloud Compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC codec framework provided by AVS. The G-PCC codec framework can be used to compress the first type of static point clouds and the third type of dynamically acquired point clouds, and the V-PCC codec framework can be used to compress the second type of dynamic point clouds. 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.

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

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

[0072] The following uses the AVS-PCC codec framework as an example to illustrate point cloud compression technology.

[0073] As you can understand, point cloud compression generally uses a method that compresses point cloud geometry and attribute information separately. On the encoding side, the point cloud geometry is first encoded in the geometry encoder, and the reconstructed geometry is then input as additional information into the attribute encoder to assist in compressing the point cloud attributes. On the decoding side, the point cloud geometry is first decoded in the geometry decoder, and the decoded geometry is then input as additional information into the attribute decoder to assist in compressing the point cloud attributes. The entire codec consists of pre-processing / post-processing, geometry encoding / decoding, and attribute encoding / decoding.

[0074] The present embodiment provides a point cloud encoder. As shown in FIG4 , which is the framework of the point cloud compression reference platform PCRM provided by AVS, the point cloud encoder 11 includes a geometry encoder: a coordinate translation unit 111, a coordinate quantization unit 112, an octree construction unit 113, a geometry entropy encoder 114, and a geometry reconstruction unit 115. An attribute encoder: an attribute recoloring unit 116, a color space conversion unit 117, a first attribute prediction unit 118, a quantization unit 119, and an attribute entropy encoder 1110.

[0075] For PCRM, in the geometric coding part of the encoding end, the original geometric information is first preprocessed, and the geometric origin is normalized to the minimum position in the point cloud space through the coordinate translation unit 111. The geometric information is converted from floating point numbers to integers through the coordinate quantization unit 112 to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and the octree structure is used in the octree construction unit 113 to recursively divide the point cloud space, each time dividing the current node into eight sub-blocks of the same size, and judging the occupancy codeword of each sub-block. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty. The occupancy codeword information of all blocks is recorded in the last layer of the recursive division, and geometric encoding is performed; the geometric information expressed by the octree structure is input into the geometric entropy encoder 114 to form a geometric code stream, and on the other hand, geometric reconstruction processing is performed in the geometric reconstruction unit 115. The reconstructed geometric information is input into the attribute encoder as additional information.

[0076] In the attribute encoding part, the original attribute information is first preprocessed. Since the geometric information changes after geometric encoding, the attribute value is reassigned to each point after geometric encoding through the attribute recoloring unit 116 to achieve attribute recoloring. In addition, if the processed attribute information is color information, the original color information needs to be transformed into a YUV color space that is more in line with the visual characteristics of the human eye through the color space conversion unit 117; then, the preprocessed attribute information is attribute encoded through the first attribute prediction unit 118. Attribute encoding first requires reordering the point cloud. The reordering method is Morton code, so the traversal order of attribute encoding is Morton order. The attribute prediction method in PCRM is a single-point prediction based on the Morton order, that is, the attribute prediction method is performed from the current point to be encoded (current node) back one point in the Morton order, and the node found is the prediction reference point of the current point to be encoded. Then, the attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized by the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form an attribute code stream.

[0077] The present application also provides a point cloud decoder. FIG5 shows the framework of the point cloud compression reference platform PCRM provided by AVS. The point cloud decoder 12 includes a geometric decoder: a geometric entropy decoder 121, an octree reconstruction unit 122, a coordinate inverse quantization unit 123, and a coordinate inverse translation unit 124. An attribute decoder: an attribute entropy decoder 125, an inverse quantization unit 126, a second attribute prediction unit 127, and a color space inverse transformation unit 128.

[0078] On the decoding side, the same method of separate geometry and attribute decoding is used. In the geometry decoding part, the geometry bitstream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometric information of each node. Then, the octree structure is constructed by the octree reconstruction unit 122 in the same manner as the geometry encoding. Combined with the decoded geometry, the coordinate-transformed geometric information expressed by the octree structure is reconstructed. On the one hand, this information is dequantized by the coordinate dequantization unit 123 and detranslated by the coordinate detranslation unit 124 to obtain the decoded geometric information. On the other hand, it is input into the attribute decoder as additional information. In the attribute decoding part, the Morton order is constructed in the same way as the encoding end. The attribute code stream is first entropy decoded by the attribute entropy decoder 125 to obtain the quantized residual information; then, it is dequantized by the dequantization unit 126 to obtain the attribute residual value; similarly, in the same way as the attribute encoding, the attribute prediction value of the current point to be decoded is obtained by the second attribute prediction unit 127, and then the attribute prediction value is added to the attribute residual value to restore the attribute reconstruction value of the current point to be decoded (for example, the YUV attribute value); finally, the decoded attribute information is obtained by color space inverse transformation by the color space inverse transformation unit 128.

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

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

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

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

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

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

[0085] (2) The general test sequences include five categories: Cat1A, Cat1B, Cat1C, Cat2-frame, and Cat3. Among them, the point clouds of Cat1A and Cat2-frame only contain reflectivity attribute information, the point clouds of Cat1B and Cat3 only contain color attribute information, and the point cloud of Cat1C contains both color and reflectivity attribute information.

[0086] (3) Implementation methods: There are 2 kinds, which are distinguished by the algorithms used for attribute compression.

[0087] Implementation method 1: Prediction branch, and the attribute compression uses a prediction-based method;

[0088] Implementation method 2: Transformation branch, and the attribute compression uses a transformation-based method, which includes two transformation algorithms: one is the wavelet transform algorithm, and the other is the k-ary discrete cosine transform (Discrete Cosine Transform, DCT) algorithm.

[0089] (4) For the attribute coding part in point cloud compression, specifically referring to the intra-frame prediction part, here mainly the adjacent nodes of the current node are used to predict the current node. After calculating the attribute residual value based on the attribute prediction value and the original attribute value of the current node, through processes such as quantization and transformation, the attribute residual value is transmitted to the decoding end; after receiving and parsing the code stream, the decoding end obtains the attribute residual value through steps such as inverse transformation and inverse quantization. The decoding end predicts the attribute prediction value in the same process, and after superimposing the attribute prediction value and the attribute residual value, the attribute reconstruction value corresponding to the current node is obtained.

[0090] Among them, the same operations are implemented at both the encoding end and the decoding end to determine the attribute prediction value. The specific attribute prediction process mainly includes the following two:

[0091] The first is the global search method based on the encoding / decoding order. Assume that the current node is Pi, then the already encoded / decoded reference nodes are (P0, P1,..., Pi-1).

[0092] If i = 0, then there is no need to search, and {128, 128, 128} is directly used as the prediction value;

[0093] If i = 1, then P0 is used as the prediction node;

[0094] If i = 2, then P0 and P1 are used as the prediction nodes;

[0095] If i >= 3, then if i < maxNumOfNeighbours, then searchRange = i, otherwise searchRange = maxNumOfNeighbours (where maxNumOfNeighbours is a specific value, such as 128).

[0096] In this way, among the searchRange points before the Hilbert order of the current node, such as (Pi - searchRange, …, Pi - 2, Pi - 1), search forward one by one in the Hilbert order to find the k points closest to the current node as the prediction nodes of the current node. The specific process is as follows:

[0097] (a) When processing the first 3 nodes of the current node in the Hilbert order, insert these 3 nodes into the prediction point set in order. After each insertion, according to the distance between the points (xi - j, yi - j, zi - j) in the prediction point set and the current node (xi, yi, zi), sort the points in the prediction point set in ascending order so that the distances of the three sorted points satisfy d1 <= d2 <= d3. Among them, the distance d is calculated using the Manhattan distance calculation method, defined as:

[0098] d = |xi - xi - j| + |yi - yi - j| + |zi - zi - j| (1)

[0099] (b) Continue to search forward for the j - th point. When the number of points in the prediction point set is equal to 3, if the distance dj between the j - th point and the current node is dj = d3, add the j - th point to the equidistant point set;

[0100] if the distance dj between the j - th point and the current node is dj < d3, remove the point corresponding to d3 from the prediction point set, add the j - th point to the prediction point set, and after adding the new point, sort the points in the prediction point set in ascending order according to the distance between the points in the prediction point set and the current node again. Then compare the re - sorted d3 with the distance dtemp of the removed point. If dtemp = d3, add the removed point to the equidistant point set; otherwise, clear the equidistant point set;

[0101] (c) Until the point Pi - searchRange is searched, finally obtain 3 points with the closest distances as the prediction nodes, and at most 13 equidistant points.

[0102] The second search method is based on spatial relationships. Using the geometric relationships (i.e., spatial relationships) between nodes, the predicted nodes are those that are geometrically coplanar, colinear, or co-pointed with the current node. The predicted node must have been encoded / decoded before the current node. The weight is then set to the inverse of the geometric Manhattan distance between the predicted node and the current node: 1 for coplanar nodes, 1 / 2 for colinear nodes, and 1 / 3 for co-pointed nodes. The weighted average of the attribute reconstruction values ​​of all predicted nodes is calculated as the attribute prediction value corresponding to the current node. (In particular, for the first node encoded, there is no reference node for prediction, and its attribute prediction value can be directly set to 0.)

[0103] In simple terms, the two conditions that need to be met are: (a) the node is coplanar, colinear, and co-point with the current node; and (b) the node has been encoded / decoded before the current node.

[0104] For example, FIG6A shows a distribution diagram of a current node and its coplanar nodes provided by an embodiment of the present application, FIG6B shows a distribution diagram of a current node and its colinear nodes provided by an embodiment of the present application, and FIG6C shows a distribution diagram of a current node and its co-point nodes provided by an embodiment of the present application. As shown in FIG6A-FIG6C, assuming that the sequence number of the current node O is 7, there are 6 faces, 12 edges, and 8 points. Among them, in FIG6A, the coplanar nodes are 3, 5, 6, 14, 21, and 35; in FIG6B, the colinear nodes are 1, 2, 4, 10, 12, 17, 20, 28, 33, 34, 42, and 49; in FIG6C, the co-point nodes are 0, 8, 16, 24, 32, 40, 48, and 56.

[0105] Among all these coplanar nodes, collinear nodes, and co-point nodes, regardless of the position of the current node, the nodes that may meet the "encoding / decoding completed before the current node" condition include: coplanar nodes 3, 5, 6, collinear nodes 1, 2, 4, 10, 12, 17, 20, 33, 34, co-point nodes 0, 8, 16, 24, 32, 40, 48; therefore, the predicted node will be generated among the coplanar nodes 3, 5, 6, collinear nodes 1, 2, 4, 10, 12, 17, 20, 33, 34, and co-point nodes 0, 8, 16, 24, 32, 40, 48.

[0106] However, although the search method based on spatial relationships can quickly locate nodes near the current node, it may not be able to find the predicted node closest to the current node, and therefore cannot maximize the accuracy of intra-frame prediction.

[0107] Based on this, an embodiment of the present application provides a coding and decoding method, at the coding end, determining the index number and the initial reference set corresponding to the current node; based on the parity characteristics of the index number, determining the target position corresponding to the current node in the initial reference set; after encoding the current node according to the initial reference set, placing the current node at the target position to obtain the target reference set. At the decoding end, determining the index number and the initial reference set corresponding to the current node; based on the parity characteristics of the index number, determining the target position corresponding to the current node in the initial reference set; after decoding the current node according to the initial reference set, placing the current node at the target position to obtain the target reference set. In this way, constructing a target reference set including the current node based on the parity characteristics of the index number, and using the target reference set to predict the attributes of the point cloud can improve the prediction accuracy of the point cloud attributes and improve the coding and decoding performance of the point cloud attributes.

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

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

[0110] S701: Determine the index number corresponding to the current node and the initial reference set.

[0111] It should be noted that the decoding method described in the embodiments of this application specifically refers to a point cloud decoding method, more specifically, an intra-frame prediction method for point cloud attributes, used to construct a reference range for determining prediction nodes. This method can be applied to a point cloud decoder (also referred to as a "decoder").

[0112] It should also be noted that in the embodiments of the present application, the point cloud to be processed includes at least one node. When decoding a node in the point cloud to be processed, it can be considered a node to be decoded in the point cloud to be processed, and there are multiple decoded nodes around the node. Here, the current node is the node to be decoded that currently needs to be decoded among the at least one node.

[0113] Furthermore, in an embodiment of the present application, for each node in the point cloud to be processed, it corresponds to a geometric information and an attribute information; wherein the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point.

[0114] Here, the attribute information may be a color component, or reflectivity, or other attribute, which is not specifically limited in the embodiments of the present application. Specifically, when the attribute information is a color component, it may be color information in any color space. For example, the attribute information may be color information in an RGB space, a YUV space, a YCbCr space, or the like, which is not specifically limited in the embodiments of the present application.

[0115] It should also be noted that in this embodiment of the present application, the decoder can arrange the at least one node according to a preset decoding order to determine the index number corresponding to each node. In this way, based on the index number corresponding to each node, the decoder can process each node in the point cloud to be processed according to the preset decoding order.

[0116] In some embodiments, the preset decoding order may be one of the following: original point cloud order, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of the present application.

[0117] As can be understood, the initial reference set represents the initial reference range for each node to search for predicted nodes. The reference nodes within this range are all decoded nodes before the current node. Specifically, assuming the current node is indexed as i, then the nodes with indexes 0 to i-1 are all decoded nodes, and the initial reference set is determined based on these decoded nodes.

[0118] In some embodiments, the initial reference set consists of N decoded reference nodes; the method may further include:

[0119] If the index number of the current node is greater than or equal to 0 and less than a preset constant value, then the value of N is determined to be equal to the index number of the current node;

[0120] If the index number of the current node is greater than or equal to the preset constant value, then the value of N is determined to be equal to the preset constant value.

[0121] It should be noted that in the embodiments of the present application, the maximum value of the initial reference set used by each node to search for prediction nodes is a fixed value, which can be represented by a preset constant value. In other words, the preset constant value represents the maximum number of reference nodes included in the initial reference set. For example, the preset constant value can be 128, but this is not a specific limitation.

[0122] It should also be noted that in the embodiment of the present application, N is an integer greater than or equal to 0 and less than or equal to a preset constant value. If N is equal to 0, then the initial reference set is an empty set; if N is not equal to 0, then the initial reference set is a non-empty set.

[0123] In a specific embodiment, assuming that the preset constant value is 128, the initial reference set is composed of N decoded reference nodes. Then when the current node is the 0th to 127th node, that is, the index number of the current node i=0~127, then N=i; otherwise, N=128.

[0124] S702: Determine the target position corresponding to the current node in the initial reference set based on the even-odd property of the index number.

[0125] S703: After decoding the current node according to the initial reference set, the current node is placed at a target position to obtain a target reference set.

[0126] It should be noted that, in the embodiment of the present application, the target reference set represents the initial reference set corresponding to the next node of the current node in the preset decoding order.

[0127] It should also be noted that, in some embodiments, after decoding the current node according to the initial reference set, placing the current node at the target position may include:

[0128] If the index number of the current node is greater than or equal to 0 and less than a preset constant value, the current node is directly placed at the target position in the initial reference set;

[0129] When the index number of the current node is greater than or equal to a preset constant value, the current node is used to replace the reference node at the target position.

[0130] Here, in an embodiment of the present application, the method may further include: when the index number of the current node is greater than or equal to 0 and less than a preset constant value, after decoding the current node according to the initial reference set, the current node is placed in the initial reference set according to a preset decoding order to obtain a target reference set.

[0131] That is to say, for the case where the index number of the current node is greater than or equal to 0 and less than a preset constant value, after completing the decoding processing of the current node, the current node can be placed in the initial reference set according to the preset decoding order, or the target position can be determined based on the parity characteristic of the index number, and then the current node is directly placed in the corresponding target position in the initial reference set to obtain the target reference set; and for the case where the index number of the current node is greater than or equal to the preset constant value, after completing the decoding processing of the current node, the target position corresponding to the current node in the initial reference set is determined based on the parity characteristic of the index number, and then the current node is used to replace the reference node at the target position to obtain the target reference set.

[0132] In some embodiments, the decoding process of the current node according to the initial reference set may include:

[0133] Parse the code stream to determine the attribute residual value corresponding to the current node;

[0134] Determine the attribute prediction value corresponding to the current node based on the initial reference set;

[0135] According to the attribute residual value and the attribute predicted value, the attribute reconstruction value corresponding to the current node is determined.

[0136] It should be noted that in the embodiment of the present application, after obtaining the bitstream, the decoder can parse the bitstream to obtain the attribute residual value corresponding to the current node, wherein the attribute residual value parsed from the bitstream is the residual value after inverse transformation and inverse quantization.

[0137] It should also be noted that, in the embodiment of the present application, determining the attribute reconstruction value corresponding to the current node based on the attribute residual value and the attribute prediction value may include: adding the attribute residual value and the attribute prediction value to obtain the attribute reconstruction value corresponding to the current node.

[0138] It should also be noted that, in the embodiment of the present application, determining the attribute prediction value corresponding to the current node based on the initial reference set may include: if the index number of the current node is equal to 0, determining the initial reference set to be an empty set, and directly determining the preset attribute value as the attribute prediction value corresponding to the current node; if the index number of the current node is not equal to 0, determining the initial reference set to be a non-empty set, determining at least one prediction node from the initial reference set, and determining the attribute prediction value corresponding to the current node based on the at least one prediction node.

[0139] That is to say, if the initial reference set is an empty set, there is no prediction node at this time, and the attribute prediction value corresponding to the current node can be directly set to the preset attribute value. For example, for the color attribute, the preset attribute value can be (128, 128, 128); for the reflectivity attribute, the preset attribute value can be 0; after completing the decoding process of the current node, the current node can be placed at the head position 0 in the initial reference set according to the preset decoding order; or the current node can be placed at position 1 in the initial reference set according to the parity characteristic of the index number. If the initial reference set is a non-empty set, at this time, at least one prediction node can be obtained based on the initial reference set, and then the attribute prediction value corresponding to the current node is determined based on this at least one prediction node.

[0140] In a specific embodiment, when the index number of the current node is not equal to 0, determining the attribute prediction value corresponding to the current node according to at least one prediction node may include:

[0141] Obtaining a respective attribute reconstruction value of at least one prediction node;

[0142] If at least one prediction node includes only one prediction node, the attribute reconstruction value of the prediction node is directly determined as the attribute prediction value corresponding to the current node;

[0143] If the at least one prediction node includes at least two prediction nodes, a weighted average calculation is performed on the attribute reconstruction values ​​of the at least two prediction nodes to obtain the attribute prediction value corresponding to the current node.

[0144] It should be noted that, with respect to the weighted average calculation, in one possible implementation, if the weight values ​​are all set to 1, then a weighted average calculation is performed on the attribute reconstruction values ​​of the at least two prediction nodes, i.e., the average value of the attribute reconstruction values ​​of the at least two prediction nodes is calculated. In another possible implementation, if, among the at least two prediction nodes, the weight value of the first type of node is 1, the weight value of the second type of node is 1 / 2, and the weight value of the third type of node is 1 / 3, then a weighted average calculation can be performed on the attribute reconstruction values ​​of the at least two prediction nodes based on these weight values.

[0145] In a specific embodiment, when the index number of the current node is not equal to 0, determining at least one prediction node from the initial reference set may include:

[0146] If the index number of the current node is equal to 1, a reference node included in the initial reference set is determined as at least one prediction node;

[0147] If the index number of the current node is equal to 2, the two reference nodes included in the initial reference set are determined as at least one prediction node;

[0148] If the index number of the current node is greater than or equal to 3, a preset number of reference nodes having relatively small distances to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as at least one prediction node.

[0149] It should be noted that the preset number can be set to k; wherein k can be a fixed value (for example, 3) or a range (for example, 3 to 16), and the embodiment of the present application does not make any specific limitation.

[0150] It should also be noted that, in the embodiment of the present application, when the index number of the current node is greater than or equal to 3, in a specific implementation, there are two cases:

[0151] If the index number of the current node is greater than or equal to 3 and less than or equal to a preset constant value, obtain the first m reference nodes of the current node in a preset decoding order from the initial reference set, and determine the m reference nodes as at least one prediction node;

[0152] If the index number of the current node is greater than a preset constant value, k reference nodes with relatively small distance values ​​to the current node are obtained from the initial reference set, and the k reference nodes are determined as at least one prediction node.

[0153] Here, m is an integer greater than 0. Typically, the value of m is equal to 3, but this is not specifically limited.

[0154] In one specific implementation, assuming i represents the index number of the current node, then for the prediction node, if i = 0, there is no prediction node; if i = 1, the initial reference set includes the 0th node, and the 0th node can be directly determined as the prediction node; if i = 2, the initial reference set includes the 0th node and the 1st node, and the 0th node and the 1st node can be directly determined as the prediction node; if i > = 3 and i < = 128, the first three reference nodes of the current node in the preset decoding order are obtained from the initial reference set, and these three reference nodes are determined as the prediction nodes; if i > 128, k reference nodes with relatively small distance values ​​from the current node are obtained from the initial reference set, and these k reference nodes are determined as the prediction nodes. In another specific implementation, the case of i < 3 is the same as the aforementioned implementation; if i > = 3, k reference nodes with relatively small distance values ​​from the current node are obtained from the initial reference set, and these k reference nodes are determined as the prediction nodes.

[0155] Furthermore, in some embodiments, when the index number of the current node is greater than a preset constant value, obtaining a preset number of reference nodes having relatively small distances to the current node from the initial reference set may include:

[0156] From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained using a global search method; or,

[0157] From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained using a spatial relationship search method; or

[0158] From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained using a spatial relationship depth-first search method.

[0159] That is to say, in an embodiment of the present application, the preset number of reference nodes can be determined by searching in the initial reference set using a global search method, or by searching in the initial reference set using a spatial relationship search method, or by searching in the initial reference set using a spatial relationship depth-first search method, or even by searching in the initial reference set using other search methods, etc., which are not specifically limited here.

[0160] In a possible implementation, acquiring a preset number of reference nodes having relatively small distances to the current node by using a global search method may include:

[0161] Calculate the distance between each reference node in the initial reference set and the current node, and select a preset number of distance values ​​with relatively small distance values ​​from the obtained N distance values;

[0162] A preset number of reference nodes is determined according to a preset number of distance values.

[0163] It should be noted that in the embodiment of the present application, the distance value between each reference node in the initial reference set and the current node can be calculated using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., which is not specifically limited in the embodiment of the present application.

[0164] It should also be noted that the preset number is represented by k. Thus, since the initial reference set includes N reference nodes, N distance values ​​can be calculated; from these N distance values, the k smallest distance values ​​are selected, and the reference nodes determined based on these k distance values ​​are the k reference nodes closest to the current node, and are used as the k prediction nodes.

[0165] In another possible implementation, the acquiring of a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship search method may include:

[0166] Based on the spatial relationship between nodes, search for reference nodes that meet the preset conditions from the initial reference set to obtain M reference nodes;

[0167] Calculate the distance between each of the M reference nodes and the current node, select K distance values ​​with relatively small distance values ​​from the obtained M distance values, and determine K reference nodes based on the K distance values;

[0168] If K is equal to the preset number, K reference nodes are used as the preset number of reference nodes.

[0169] In an embodiment of the present application, the reference nodes that meet the preset conditions include at least: child nodes in the upper-layer block of the current node, child nodes in the neighboring block that is coplanar with the upper-layer block of the current node, child nodes in the neighboring block that is colinear with the upper-layer block of the current node, and child nodes in the neighboring block that is co-pointed with the upper-layer block of the current node.

[0170] It should also be noted that, in the embodiment of the present application, the upper block of the current node includes at least one of the following: the parent block of the current node, and the grandparent block of the current node.

[0171] It should also be noted that in the embodiment of the present application, the distance value between each of the M reference nodes and the current node can be calculated using a Manhattan distance calculation method, a Euclidean distance calculation method, or the like, which is not specifically limited in the embodiment of the present application. In addition, M is an integer greater than or equal to 0, and K is an integer greater than or equal to 0 and less than or equal to M.

[0172] In this way, based on the spatial relationship between nodes, the parent block of the current node (or the grandparent block of the current node, etc.) itself and the child nodes in the neighboring blocks that are coplanar, colinear, and co-point with the parent block of the current node (or the grandparent block of the current node, etc.) can be searched from the initial reference set to obtain M reference nodes; then, the k reference nodes closest to the current node are determined from these M reference nodes as k prediction nodes.

[0173] Furthermore, if the point cloud to be processed is a sparse point cloud and k prediction nodes cannot be determined from the M reference nodes, it is necessary to enter a global search mode to continue searching for reference nodes in order to complete the k prediction nodes. Therefore, in some embodiments, the method may further include:

[0174] If K is less than a preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

[0175] It should be noted that after M reference nodes are determined using the spatial relationship search method, if only K reference nodes with relatively small distance values ​​can be selected from the M reference nodes, and K is less than the second number, that is, the k prediction nodes are not met, then it is necessary to enter the global search method, by calculating the distance value between the reference node in the initial reference set and the current node, and determining a preset number of reference nodes with relatively small distance values ​​based on the comparison result of the calculated distance value and the K distance values, so as to complete the k prediction nodes.

[0176] In another possible implementation, acquiring a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship depth-first search method may include:

[0177] Based on the spatial relationship between nodes, search the child nodes in the upper block of the current node from the initial reference set to obtain K1 reference nodes;

[0178] Calculate the distance between each of the K1 reference nodes and the current node, select K2 distance values ​​with relatively small distance values ​​from the obtained K1 distance values, and determine K2 reference nodes based on the K2 distance values;

[0179] If K2 is equal to the preset number, K2 reference nodes are used as the preset number of reference nodes;

[0180] If K2 is less than the preset number, continue searching for child nodes in neighboring blocks that are coplanar with the upper block of the current node from the initial reference set to obtain K3 reference nodes;

[0181] Calculate the distance between each of the K3 reference nodes and the current node, and determine K4 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K3 distance values ​​and the K2 distance values, and determine the K4 reference nodes based on the K4 distance values;

[0182] If K4 is equal to the preset number, K4 reference nodes are used as the preset number of reference nodes;

[0183] If K4 is less than the preset number, continue searching for child nodes in neighboring blocks that are collinear with the upper-layer block of the current node from the initial reference set to obtain K5 reference nodes;

[0184] Calculate the distance between each of the K5 reference nodes and the current node, and determine K6 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K5 distance values ​​and the K4 distance values, and determine K6 reference nodes based on the K6 distance values;

[0185] If K6 is equal to the preset number, K6 reference nodes are used as the preset number of reference nodes;

[0186] If K6 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that have points in common with the upper-layer block of the current node, and obtain K7 reference nodes;

[0187] Calculate the distance between each of the K7 reference nodes and the current node, and determine K8 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K7 distance values ​​and the K6 distance values, and determine the K8 reference nodes based on the K8 distance values;

[0188] If K8 is equal to the preset number, K8 reference nodes are used as the preset number of reference nodes;

[0189] If K8 is less than the preset number, the distance value between the reference node in the initial reference set and the current node is calculated using a global search method, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K8 distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

[0190] It should be noted that, in the embodiment of the present application, the upper block of the current node includes at least one of the following: the parent block of the current node, and the grandparent block of the current node.

[0191] It should also be noted that in the embodiment of the present application, the distance value between each of the M reference nodes and the current node can be calculated using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., which is not specifically limited in the embodiment of the present application.

[0192] It should also be noted that in an embodiment of the present application, when searching for subnodes in neighboring blocks that are coplanar with the upper block of the current node from the initial reference set, if there are multiple coplanar neighboring blocks, then these multiple coplanar neighboring blocks can be searched at once or in sequence. For example, when searching in sequence, you can first search in the first coplanar neighboring block. If the search completes k reference nodes, then the search will not be continued; if the k reference nodes are not completed, then search in the second coplanar neighboring block. If the search completes k reference nodes, then the search will not be continued; otherwise, continue searching in the third coplanar neighboring block, and so on. Similarly, the same operation can be applied to searching for subnodes in neighboring blocks that are colinear with the upper block of the current node from the initial reference set, and searching for subnodes in neighboring blocks that have points in common with the upper block of the current node from the initial reference set; there is no limitation on this here.

[0193] In this way, in the spatial relationship depth-first search method, based on the spatial relationship between nodes, the first step is to search the child nodes in the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are not met, then the second step is to search the child nodes in the neighboring blocks that are coplanar with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the third step is to search the child nodes in the neighboring blocks that are colinear with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the fourth step is to search the child nodes in the neighboring blocks that are co-points with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the sum of the previous four steps does not meet the k predicted nodes, then the fifth step enters the global search method again, by calculating the distance value between the reference node in the initial reference set and the current node, so as to complete the k predicted nodes.

[0194] It can be understood that in the embodiments of the present application, whether it is a spatial relationship search method or a spatial relationship depth-first search method, the search process based on spatial relationships is described as follows:

[0195] (a) First, based on the position of the current node in the parent block (or grandparent block, etc.), the neighbor blocks that are coplanar, colinear, and co-point with the parent block (or grandparent block, etc.) are determined. As shown in Figures 8A to 8H, there are eight modes for the position of the current node, specifically including: the mode in which the current node is in the upper right of the rear side as shown in Figure 8A, the mode in which the current node is in the lower right of the rear side as shown in Figure 8B, the mode in which the current node is in the upper left of the rear side as shown in Figure 8C, the mode in which the current node is in the lower left of the rear side as shown in Figure 8D, the mode in which the current node is in the upper right of the front side as shown in Figure 8E, the mode in which the current node is in the lower right of the front side as shown in Figure 8F, the mode in which the current node is in the upper left of the front side as shown in Figure 8G, and the mode in which the current node is in the lower left of the front side as shown in Figure 8H. For these eight modes, Figures 9A to 9H respectively show the corresponding coplanar neighbor blocks, colinear neighbor blocks, and co-point neighbor blocks in each mode. 9A to 9H , the parent block (or grandparent block, etc.) of the current node is represented by a bold frame and filled with white, coplanar neighbor blocks are filled with grid lines, colinear neighbor blocks are filled with oblique lines, and co-point neighbor blocks are filled with dots.

[0196] For example, taking the Hilbert code (or Morton code, etc.) as an example, the geometric coordinates of the parent block (or grandparent block, etc.) of the current node, plus a certain offset, can be used to calculate the geometric coordinates of the neighboring block. The corresponding Hilbert code can be calculated from the geometric coordinates. The offsets corresponding to the eight modes are:

[0197] hilbertShift[8][7][3]={

[0198] {{0,-1,0},{-1,0,0},{0,0,-1},{-1,-1,0},{-1,0,-1},{0,-1,-1},{-1,-1,-1}},

[0199] {{0,-1,0},{-1,0,0},{0,0,1},{-1,-1,0},{-1,0,1},{0,-1,1},{-1,-1,1}},

[0200] {{0,1,0},{-1,0,0},{0,0,-1},{-1,1,0},{-1,0,-1},{0,1,-1},{-1,1,-1}},

[0201] {{0,1,0},{-1,0,0},{0,0,1},{-1,1,0},{-1,0,1},{0,1,1},{-1,1,1}},

[0202] {{0,-1,0},{1,0,0},{0,0,-1},{1,-1,0},{1,0,-1},{0,-1,-1},{1,-1,-1}},

[0203] {{0,-1,0},{1,0,0},{0,0,1},{1,-1,0},{1,0,1},{0,-1,1},{1,-1,1}},

[0204] {{0,1,0},{1,0,0},{0,0,-1},{-1,1,0},{1,0,-1},{0,1,-1},{1,1,-1}},

[0205] {{0,1,0},{1,0,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,1,1}}

[0206] }

[0207] (b) By comparing the Hilbert code of the reference node in the initial reference set with the Hilbert code of the neighboring blocks, it can be determined whether the reference node meets the conditions of coplanarity, colinearity, and co-pointness.

[0208] It can also be understood that in an embodiment of the present application, it is necessary to determine the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number, so that after the decoding process of the current node is completed, the current node can be used to replace the reference node at the target position.

[0209] In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining a target reference node from the initial reference set that has the opposite parity characteristic of the index number and is placed earliest in the initial reference set, and determining the position corresponding to the target reference node as the target position.

[0210] It should be noted that, taking the preset constant value of 128 as an example, if the index number i of the current node is an even number, the value of the target position can be equal to the remainder of i and 128 plus 1; if the index number i of the current node is an odd number, the value of the target position can be equal to the remainder of i and 128 minus 1. For example, if the index number of the current node is 128, the target position is 1; if the index number of the current node is 129, the target position is 0; if the index number of the current node is 130, the target position is 3; if the index number of the current node is 131, the target position is 2; and so on.

[0211] In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining a group of candidate reference nodes placed earliest in the initial reference set according to a preset step size; determining a target reference node with an opposite parity characteristic to the index number from a group of candidate reference nodes, and determining the position corresponding to the target reference node as the target position.

[0212] It should be noted that in the embodiment of the present application, the preset step size is the step size used when determining the parity characteristic. The value of the preset step size can vary, for example, the preset step size can be set to 2, 4, 8, etc., which is not specifically limited here.

[0213] For example, when the preset step size is equal to 4, taking the circular buffer as an example:

[0214] If the current node is the 128th node (i.e., the index number is 128), it is placed at position 3 in the initial reference set;

[0215] If the current node is the 129th node (i.e., the index number is 129), it is placed at position 2 in the initial reference set;

[0216] If the current node is the 130th node (i.e., the index number is 130), then place it at position 1 in the initial reference set;

[0217] If the current node is the 131st node (i.e., the index number is 131), then place it at position 0 in the initial reference set;

[0218] If the current node is the 132nd node (i.e., the index number is 132), then place it at position 7 in the initial reference set;

[0219] If the current node is the 133rd node (i.e., the index number is 133), then place it at position 6 in the initial reference set;

[0220] If the current node is the 134th node (i.e., the index number is 134), then place it at position 5 in the initial reference set;

[0221] If the current node is the 135th node (i.e., the index number is 135), then place it at position 4 in the initial reference set;

[0222] And so on until the last node. The same logic can be applied to the first-in-first-out principle.

[0223] It should also be noted that, in the embodiment of the present application, the placement method within a preset step size can also be changed. For example, when the preset step size is equal to 4, taking the circular buffer as an example:

[0224] If the current node is the 128th node (i.e., the index number is 128), it is placed at position 3 in the initial reference set;

[0225] If the current node is the 129th node (i.e., the index number is 129), it is placed at position 0 in the initial reference set;

[0226] If the current node is the 130th node (i.e., the index number is 130), then place it at position 1 in the initial reference set;

[0227] If the current node is the 131st node (i.e., the index number is 131), then place it at position 2 in the initial reference set;

[0228] If the current node is the 132nd node (i.e., the index number is 132), then place it at position 7 in the initial reference set;

[0229] If the current node is the 133rd node (i.e., the index number is 133), then place it at position 4 in the initial reference set;

[0230] If the current node is the 134th node (i.e., the index number is 134), then place it at position 5 in the initial reference set;

[0231] If the current node is the 135th node (i.e., the index number is 135), then place it at position 6 in the initial reference set;

[0232] And so on until the last node. The same logic can be applied to the first-in-first-out principle.

[0233] In some embodiments, the method may further include: when the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set;

[0234] After decoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.

[0235] It should be noted that, in the embodiment of the present application, the head position indicates the position in the initial reference set corresponding to the value obtained by performing a modulo operation between the index number of the current node and a preset constant value; the tail position indicates the position where the current node is to be placed; therefore, after completing the decoding process of the current node, the point at the head position in the initial reference set can be removed, and the current node can be added to the tail position of the initial reference set; it can also be regarded as replacing the reference node at the head position with the current node to obtain the target reference set.

[0236] In a specific embodiment, if k predicted nodes are searched based on the spatial relationship, the current node is decoded, and then the point at the head of the initial reference set is removed, and the current node is added to the tail of the initial reference set; only when entering the global search, the target position is determined in the initial reference set based on the parity of the index number, and then the current node is used to replace the reference node at the target position to obtain the target reference set.

[0237] In some embodiments, the initial reference set may include a first initial reference set and a second initial reference set; and the method may further include:

[0238] After decoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and / or

[0239] After decoding the current node according to the second initial reference set, a second target reference set is obtained; wherein the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

[0240] In a specific embodiment, the method may also include: if the current node uses a spatial relationship search method or a spatial relationship depth-first search method, decoding the current node according to the second initial reference set; if the current node uses a global search method, decoding the current node according to the first initial reference set.

[0241] It should be noted that the first target reference set is the first initial reference set of the next node of the current node in the preset decoding order, which can be regarded as reference range 1; the second target reference set is the second initial reference set of the next node of the current node in the preset decoding order, which can be regarded as reference range 2. In other words, the embodiment of the present application can maintain two reference ranges, and the contents in reference range 1 and reference range 2 are consistent, but the order is inconsistent. Here, reference range 1 is maintained by determining the target position based on the parity characteristic of the index number and replacing the reference node at the target position with the current node, while reference range 2 is maintained by deleting the point at the target position and placing the current node at the end of the queue; this ensures that the reference nodes in reference range 2 are arranged in Hilbert order, which can speed up searches based on spatial relationships; therefore, when determining the predicted node based on the spatial relationship, the search is performed in reference range 2; when entering the global search to determine the predicted node, the search is performed in reference range 1.

[0242] In addition, in some embodiments, after decoding the current node, the method may further include:

[0243] If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue;

[0244] If the current node uses a global search method, the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.

[0245] It should be noted that the embodiment of the present application can maintain two reference ranges. If k predicted nodes are found based on the spatial relationship, the current node is decoded, and then both reference range 1 and reference range 2 are maintained by removing the point at the head of the queue and adding the current node to the tail. When entering the global search, reference range 1 is maintained by determining the target position by the parity of the index number and replacing the reference node at the target position with the current node, while reference range 2 is maintained by removing the point at the target position and adding the current node to the tail.

[0246] It should also be noted that, in the embodiment of the present application, the head position of the team represents the position in the initial reference set corresponding to the value obtained by performing a modulo operation on the index number of the current node and a preset constant value; the tail position of the team represents the position where the current node is to be placed; therefore, after completing the decoding process of the current node, the point at the head position of the team can be removed and the current node can be added to the tail position of the team; it can also be regarded as replacing the reference node at the head position of the team with the current node.

[0247] This embodiment provides a decoding method, through which a reference range can be determined. Specifically, a reference range is constructed by the parity of the index number corresponding to the current node, and a prediction node is searched within this reference range to perform intra-frame prediction of point cloud attributes. This method can reduce encoding and decoding efficiency based on spatial relationships and improve intra-frame prediction accuracy through global search, thereby achieving a good compromise between encoding efficiency and performance, thereby improving the encoding and decoding performance of point cloud attributes.

[0248] In another embodiment of the present application, referring to FIG10 , which shows a schematic flow chart of an encoding method provided by an embodiment of the present application. As shown in FIG10 , the method may include:

[0249] S1001: Determine the index number corresponding to the current node and the initial reference set.

[0250] It should be noted that the encoding method described in the embodiments of this application specifically refers to a point cloud encoding method, more specifically, an intra-frame prediction method for point cloud attributes, used to construct a reference range for determining prediction nodes. This method can be applied to a point cloud encoder (also referred to as an "encoder").

[0251] It should also be noted that in the embodiment of the present application, the point cloud to be processed includes at least one node. When encoding a node in the point cloud to be processed, it can be considered as a node to be encoded in the point cloud to be processed, and there are multiple encoded nodes around the node. Here, the current node is the node to be encoded that currently needs to be encoded among the at least one node.

[0252] Furthermore, in this embodiment of the present application, each node in the point cloud to be processed corresponds to a pair of geometric information and attribute information. The geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point. Here, the attribute information can be a color component, reflectivity, or other attribute, which is not specifically limited in this embodiment of the present application.

[0253] It should also be noted that, in the embodiment of the present application, the encoder may arrange the at least one node according to a preset coding order to determine the index number corresponding to each node. In this way, based on the index number corresponding to each node, the encoder can process each node in the point cloud to be processed according to the preset coding order.

[0254] In some embodiments, the preset encoding order may be one of the following: original point cloud order, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of the present application.

[0255] As can be understood, the initial reference set represents the initial reference range for each node to search for predicted nodes. The reference nodes within this range are all coded nodes before the current node. Specifically, assuming the current node is indexed as i, then the nodes with indexes 0 to i-1 are all coded nodes, and the initial reference set is determined based on these coded nodes.

[0256] In some embodiments, the initial reference set consists of N encoded reference nodes; the method may further include:

[0257] If the index number of the current node is greater than or equal to 0 and less than a preset constant value, then the value of N is determined to be equal to the index number of the current node;

[0258] If the index number of the current node is greater than or equal to the preset constant value, then the value of N is determined to be equal to the preset constant value.

[0259] It should be noted that in the embodiments of the present application, the maximum value of the initial reference set used by each node to search for prediction nodes is a fixed value, which can be represented by a preset constant value. In other words, the preset constant value represents the maximum number of reference nodes included in the initial reference set. For example, the preset constant value can be 128, but this is not a specific limitation.

[0260] It should also be noted that in the embodiment of the present application, N is an integer greater than or equal to 0 and less than or equal to a preset constant value. If N is equal to 0, then the initial reference set is an empty set; if N is not equal to 0, then the initial reference set is a non-empty set.

[0261] In a specific embodiment, assuming that the preset constant value is 128, the initial reference set is composed of N encoded reference nodes. Then when the current node is the 0th to 127th node, that is, the index number of the current node i=0~127, then N=i; otherwise, N=128.

[0262] S1002: Based on the even-odd property of the index number, determine the target position corresponding to the current node in the initial reference set.

[0263] S1003: After encoding the current node according to the initial reference set, the current node is placed at a target position to obtain a target reference set.

[0264] It should be noted that, in the embodiment of the present application, the target reference set represents the initial reference set corresponding to the next node of the current node in the preset coding order.

[0265] It should also be noted that, in some embodiments, after decoding the current node according to the initial reference set, placing the current node at the target position may include:

[0266] If the index number of the current node is greater than or equal to 0 and less than a preset constant value, the current node is directly placed at the target position in the initial reference set;

[0267] When the index number of the current node is greater than or equal to a preset constant value, the current node is used to replace the reference node at the target position.

[0268] Here, in an embodiment of the present application, the method may further include: when the index number of the current node is greater than or equal to 0 and less than a preset constant value, after encoding the current node according to the initial reference set, the current node is placed in the initial reference set according to a preset coding order to obtain a target reference set.

[0269] In some embodiments, encoding the current node according to the initial reference set may include:

[0270] Get the original value of the attribute corresponding to the current node;

[0271] Determine the attribute prediction value corresponding to the current node based on the initial reference set;

[0272] Determine the attribute residual value corresponding to the current node based on the attribute original value and the attribute predicted value;

[0273] The attribute residual value is encoded and the obtained encoded bits are written into the bitstream.

[0274] In a specific embodiment, determining the attribute residual value corresponding to the current node based on the attribute original value and the attribute predicted value may include: performing a subtraction calculation on the attribute original value and the attribute predicted value to obtain the attribute residual value corresponding to the current node.

[0275] It should be noted that in the embodiment of the present application, the attribute residual value written into the bitstream is the residual value after transformation and quantization. In other words, the attribute residual value is encoded, including transformation and quantization of the attribute residual value, and then written into the bitstream according to the coded bits.

[0276] In some embodiments, determining the attribute prediction value corresponding to the current node based on the initial reference set may include: if the index number is equal to 0, determining that the initial reference set is an empty set, and directly determining the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not equal to 0, determining that the initial reference set is a non-empty set, determining at least one prediction node from the initial reference set, and determining the attribute prediction value corresponding to the current node based on the at least one prediction node.

[0277] It should be noted that when the index number is equal to 0, it means that the initial reference set is an empty set. At this time, there is no prediction node. The attribute prediction value corresponding to the current node can be directly set to the preset attribute value. For example, for the color attribute, the preset attribute value can be (128,128,128); for the reflectivity attribute, the preset attribute value can be 0. After the encoding process of the current node is completed, the current node can be placed at the head of the queue at position 0 in the initial reference set according to the preset encoding order; or the current node can be placed at position 1 in the initial reference set according to the parity of the index number.

[0278] It should also be noted that, when the index number is not equal to 0, determining at least one prediction node from the initial reference set may include:

[0279] If the index number is equal to 1, a reference node included in the initial reference set is determined as at least one prediction node;

[0280] If the index number is equal to 2, the two reference nodes included in the initial reference set are determined as at least one prediction node;

[0281] If the index number of the current node is greater than or equal to 3, a preset number of reference nodes having relatively small distances to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as at least one prediction node.

[0282] It should be noted that the preset number can be set to k; wherein k can be a fixed value (for example, 3) or a range (for example, 3 to 16), and the embodiment of the present application does not make any specific limitation.

[0283] It should also be noted that, in the embodiment of the present application, when the index number of the current node is greater than or equal to 3, in a specific implementation, there are two cases:

[0284] If the index number is greater than or equal to 3 and less than or equal to a preset constant value, then obtaining the first m reference nodes of the current node in a preset coding order from the initial reference set, and determining the m reference nodes as at least one prediction node;

[0285] If the index number is greater than a preset constant value, k reference nodes with relatively small distance values ​​to the current node are obtained from the initial reference set, and the k reference nodes are determined as at least one prediction node.

[0286] Here, m is an integer greater than 0. Typically, the value of m is equal to 3, but this is not specifically limited.

[0287] In the embodiment of the present application, after determining at least one prediction node, determining the attribute prediction value corresponding to the current node according to the at least one prediction node may include:

[0288] Obtaining a respective attribute reconstruction value of at least one prediction node;

[0289] If at least one prediction node includes only one prediction node, the attribute reconstruction value of the prediction node is directly determined as the attribute prediction value corresponding to the current node;

[0290] If the at least one prediction node includes at least two prediction nodes, a weighted average calculation is performed on the attribute reconstruction values ​​of the at least two prediction nodes to obtain the attribute prediction value corresponding to the current node.

[0291] Here, for the weighted average calculation, in a possible implementation, if the weight values ​​are all set to 1, then a weighted average calculation is performed on the attribute reconstruction values ​​of at least two prediction nodes, that is, the average value of the attribute reconstruction values ​​of at least two prediction nodes is calculated.

[0292] Furthermore, in some embodiments, when the index number of the current node is greater than a preset constant value, obtaining a preset number of reference nodes having relatively small distances to the current node from the initial reference set may include:

[0293] From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained using a global search method; or,

[0294] From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained using a spatial relationship search method; or

[0295] From the initial reference set, a preset number of reference nodes with relatively small distances to the current node are obtained using a spatial relationship depth-first search method.

[0296] In a possible implementation, acquiring a preset number of reference nodes having relatively small distances to the current node by using a global search method may include:

[0297] Calculate the distance between each reference node in the initial reference set and the current node, and select a preset number of distance values ​​with relatively small distance values ​​from the obtained N distance values;

[0298] A preset number of reference nodes is determined according to a preset number of distance values.

[0299] In a possible implementation, the acquiring of a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship search method may include:

[0300] Based on the spatial relationship between nodes, search for reference nodes that meet the preset conditions from the initial reference set to obtain M reference nodes;

[0301] Calculate the distance between each of the M reference nodes and the current node, select K distance values ​​with relatively small distance values ​​from the obtained M distance values, and determine K reference nodes based on the K distance values;

[0302] If K is equal to the preset number, K reference nodes are used as the preset number of reference nodes.

[0303] In an embodiment of the present application, the reference nodes that meet the preset conditions include at least: child nodes in the upper-layer block of the current node, child nodes in the neighboring block that is coplanar with the upper-layer block of the current node, child nodes in the neighboring block that is colinear with the upper-layer block of the current node, and child nodes in the neighboring block that is co-pointed with the upper-layer block of the current node.

[0304] In the embodiment of the present application, M is an integer greater than or equal to 0, and K is an integer greater than or equal to 0 and less than or equal to M.

[0305] In this way, based on the spatial relationship between nodes, the parent block of the current node (or the grandparent block of the current node, etc.) itself and the child nodes in the neighboring blocks that are coplanar, colinear, and co-point with the parent block of the current node (or the grandparent block of the current node, etc.) can be searched from the initial reference set to obtain M reference nodes; then, the k reference nodes closest to the current node are determined from these M reference nodes as k prediction nodes.

[0306] Furthermore, if the point cloud to be processed is a sparse point cloud and k prediction nodes cannot be determined from the M reference nodes, it is necessary to enter a global search mode to continue searching for reference nodes in order to complete the k prediction nodes. Therefore, in some embodiments, the method may further include:

[0307] If K is less than a preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

[0308] It should be noted that after M reference nodes are determined using the spatial relationship search method, if only K reference nodes with relatively small distance values ​​can be selected from the M reference nodes, and K is less than the second number, that is, the k prediction nodes are not met, then it is necessary to enter the global search method, by calculating the distance value between the reference node in the initial reference set and the current node, and determining a preset number of reference nodes with relatively small distance values ​​based on the comparison result of the calculated distance value and the K distance values, so as to complete the k prediction nodes.

[0309] In another possible implementation, acquiring a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship depth-first search method may include:

[0310] Based on the spatial relationship between nodes, search the child nodes in the upper block of the current node from the initial reference set to obtain K1 reference nodes;

[0311] Calculate the distance between each of the K1 reference nodes and the current node, select K2 distance values ​​with relatively small distance values ​​from the obtained K1 distance values, and determine K2 reference nodes based on the K2 distance values;

[0312] If K2 is equal to the preset number, K2 reference nodes are used as the preset number of reference nodes;

[0313] If K2 is less than the preset number, continue searching for child nodes in neighboring blocks that are coplanar with the upper block of the current node from the initial reference set to obtain K3 reference nodes;

[0314] Calculate the distance between each of the K3 reference nodes and the current node, and determine K4 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K3 distance values ​​and the K2 distance values, and determine the K4 reference nodes based on the K4 distance values;

[0315] If K4 is equal to the preset number, K4 reference nodes are used as the preset number of reference nodes;

[0316] If K4 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that are collinear with the upper-layer block of the current node, and obtain K5 reference nodes;

[0317] Calculate the distance between each of the K5 reference nodes and the current node, and determine K6 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K5 distance values ​​and the K4 distance values, and determine K6 reference nodes based on the K6 distance values;

[0318] If K6 is equal to the preset number, K6 reference nodes are used as the preset number of reference nodes;

[0319] If K6 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that have points in common with the upper-layer block of the current node, and obtain K7 reference nodes;

[0320] Calculate the distance between each of the K7 reference nodes and the current node, and determine K8 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K7 distance values ​​and the K6 distance values, and determine the K8 reference nodes based on the K8 distance values;

[0321] If K8 is equal to the preset number, K8 reference nodes are used as the preset number of reference nodes;

[0322] If K8 is less than the preset number, the distance value between the reference node in the initial reference set and the current node is calculated using a global search method, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K8 distance values, and a preset number of reference nodes are determined based on the preset number of distance values.

[0323] It should be noted that, in the embodiment of the present application, the upper block of the current node includes at least one of the following: the parent block of the current node, and the grandparent block of the current node.

[0324] It should also be noted that in the embodiment of the present application, the distance value between each of the M reference nodes and the current node can be calculated using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., which is not specifically limited in the embodiment of the present application.

[0325] It should also be noted that in an embodiment of the present application, when searching for subnodes in neighboring blocks that are coplanar with the upper block of the current node from the initial reference set, if there are multiple coplanar neighboring blocks, then these multiple coplanar neighboring blocks can be searched at once or in sequence. For example, when searching in sequence, you can first search in the first coplanar neighboring block. If the search completes k reference nodes, then the search will not be continued; if the k reference nodes are not completed, then search in the second coplanar neighboring block. If the search completes k reference nodes, then the search will not be continued; otherwise, continue searching in the third coplanar neighboring block, and so on. Similarly, the same operation can be applied to searching for subnodes in neighboring blocks that are colinear with the upper block of the current node from the initial reference set, and searching for subnodes in neighboring blocks that have points in common with the upper block of the current node from the initial reference set; there is no limitation on this here.

[0326] In this way, in the spatial relationship depth-first search method, based on the spatial relationship between nodes, the first step is to search the child nodes in the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are not met, then the second step is to search the child nodes in the neighboring blocks that are coplanar with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the third step is to search the child nodes in the neighboring blocks that are colinear with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the k predicted nodes are still not met, then the fourth step is to search the child nodes in the neighboring blocks that are co-points with the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. If the sum of the previous four steps does not meet the k predicted nodes, then the fifth step enters the global search method again, by calculating the distance value between the reference node in the initial reference set and the current node, so as to complete the k predicted nodes.

[0327] It can also be understood that in an embodiment of the present application, it is necessary to determine the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number, so that after the encoding processing of the current node is completed, the current node can be used to replace the reference node at the target position.

[0328] In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining a target reference node from the initial reference set that has the opposite parity characteristic of the index number and is placed earliest in the initial reference set, and determining the position corresponding to the target reference node as the target position.

[0329] It should be noted that, taking the preset constant value of 128 as an example, if the index number i of the current node is an even number, the value of the target position can be equal to the remainder of i and 128 plus 1; if the index number i of the current node is an odd number, the value of the target position can be equal to the remainder of i and 128 minus 1. For example, if the index number of the current node is 128, the target position is 1; if the index number of the current node is 129, the target position is 0; and so on.

[0330] In some embodiments, determining the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number may include: determining a group of candidate reference nodes placed earliest in the initial reference set according to a preset step size; determining a target reference node with an opposite parity characteristic to the index number from a group of candidate reference nodes, and determining the position corresponding to the target reference node as the target position.

[0331] It should be noted that, in the embodiment of the present application, the preset step size is the step size used to determine the parity characteristic. The value of the preset step size can vary. For example, the preset step size can be set to 2, or it can be set to 4, 8, and so on, which is not specifically limited here. In addition, in the embodiment of the present application, within a preset step size, the placement method within a preset step size can also be changed. For example, when the preset step size is equal to 4, if the index number of the current node is 128, 129, 130, 131, it will be placed at position 3, 2, 1, 0 in the initial reference set; or it can be placed at position 3, 0, 1, 2, and so on in the initial reference set, which is not specifically limited here.

[0332] In some embodiments, the method may further include: when the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set;

[0333] After encoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.

[0334] In a specific embodiment, if k prediction nodes are searched based on the spatial relationship, the current node is encoded, and then the point at the head of the initial reference set is removed, and the current node is added to the tail of the initial reference set; only when entering the global search, the target position is determined in the initial reference set based on the parity of the index number, and then the current node is used to replace the reference node at the target position to obtain the target reference set.

[0335] Here, the head position indicates the position in the initial reference set corresponding to the value obtained by performing a modulo operation between the index number of the current node and a preset constant value; the tail position indicates the position where the current node is to be placed; therefore, after completing the decoding process of the current node, the point at the head position in the initial reference set can be removed, and the current node can be added to the tail position of the initial reference set; it can also be regarded as replacing the reference node at the head position with the current node to obtain the target reference set.

[0336] In some embodiments, the initial reference set includes a first initial reference set and a second initial reference set; the method may further include:

[0337] After encoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and / or

[0338] After decoding the current node according to the second initial reference set, a second target reference set is obtained; wherein the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

[0339] In a specific embodiment, the method may also include: if the current node uses a spatial relationship search method or a spatial relationship depth-first search method, encoding the current node according to the second initial reference set; if the current node uses a global search method, encoding the current node according to the first initial reference set.

[0340] It should be noted that the first target reference set is the first initial reference set of the next node of the current node in the preset coding order, which can be regarded as reference range 1; the second target reference set is the second initial reference set of the next node of the current node in the preset coding order, which can be regarded as reference range 2. That is to say, the embodiment of the present application can maintain two reference ranges, and the contents in reference range 1 and reference range 2 are consistent, but the order is inconsistent. Here, reference range 1 is maintained by determining the target position based on the parity characteristic of the index number and replacing the reference node at the target position with the current node, while reference range 2 is maintained by deleting the point at the target position and placing the current node at the end of the queue; this ensures that the reference nodes in reference range 2 are arranged in Hilbert order, which can speed up searches based on spatial relationships; therefore, when determining the predicted node based on the spatial relationship, the search is performed in reference range 2; when entering the global search to determine the predicted node, the search is performed in reference range 1.

[0341] In addition, in some embodiments, after encoding the current node, the method may further include:

[0342] If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue;

[0343] If the current node uses a global search method, the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.

[0344] It should be noted that the embodiment of the present application can maintain two reference ranges. If k prediction nodes are found based on the spatial relationship, the current node is encoded, and then both reference range 1 and reference range 2 are maintained by removing the point at the head of the queue and adding the current node to the tail. When entering the global search, reference range 1 is maintained by determining the target position by the parity of the index number and replacing the reference node at the target position with the current node, while reference range 2 is maintained by removing the point at the target position and adding the current node to the tail.

[0345] It should also be noted that, in the embodiment of the present application, the head position of the team represents the position in the initial reference set corresponding to the value obtained by performing a modulo operation on the index number of the current node and a preset constant value; the tail position of the team represents the position where the current node is to be placed; therefore, after completing the encoding processing of the current node, the point at the head position of the team can be removed and the current node can be added to the tail position of the team; it can also be regarded as replacing the reference node at the head position of the team with the current node.

[0346] This embodiment provides an encoding method, through which a reference range can be determined. Specifically, a reference range is constructed by the parity of the index number corresponding to the current node, and a prediction node is searched within this reference range to perform intra-frame prediction of point cloud attributes. This method can reduce encoding and decoding efficiency based on spatial relationships and improve intra-frame prediction accuracy through global search, thereby achieving a good compromise between encoding efficiency and performance, thereby improving the encoding and decoding performance of point cloud attributes.

[0347] In another embodiment of the present application, see Figure 11, which shows a schematic diagram of a process for determining a reference range provided in an embodiment of the present application. As shown in Figure 11, the process may include:

[0348] S1101: Determine the index number corresponding to the current node and the initial reference set.

[0349] S1102: Determine at least one prediction node according to the initial reference set, and simultaneously determine a target position for placing the current node within the initial reference set.

[0350] S1103: Predicting the current node according to at least one prediction node, and after completing encoding / decoding processing on the current node, placing the current node at the determined target position to obtain a target reference set.

[0351] It should be noted that in this embodiment of the present application, the initial reference set does not include the current node, while the target reference set does include the current node. Furthermore, the target reference set represents the initial reference set corresponding to the node immediately following the current node in the preset encoding / decoding order. In other words, the initial reference set and target reference set represent a reference range for determining the predicted node, and this reference range is continuously updated as the current node changes.

[0352] It should also be noted that the reference range determination process shown in Figure 11 can be applied to both the encoding end and the decoding end. In the embodiment of the present application, each node in the point cloud is processed according to a fixed encoding / decoding order (for example, the original order of the point cloud, Morton order, Hilbert order, etc.) at the encoding and decoding end. The specific implementation steps are as follows:

[0353] Step 1: Assume that the maximum value of the reference range for each node to search for prediction nodes is a fixed value, such as 128. This reference range can be composed of N reference nodes that have been encoded / decoded before the current node. If the current node is the 0th to 127th node (i.e., its index number i = 0 to 127), then N = i; otherwise, N = 128.

[0354] Step 2: After determining the reference range, the current node needs to determine the predicted node within the reference range, and at the same time determine the target position where the current node is placed within the reference range;

[0355] Step 3: predict the current node according to the attribute reconstruction value of the predicted node, complete the encoding / decoding of the current node, and then place the encoded / decoded current node at the target position within the reference range determined in step 2.

[0356] For step 2, there are multiple implementation methods for the embodiment of the present application. The following describes in detail three implementation methods as examples.

[0357] The first implementation method: global search (ie, global search method).

[0358] Assume that the current node is Pi and the encoded / decoded reference nodes are (P0, P1, ..., Pi-1).

[0359] If i = 0, the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128, 128, 128); for the reflectivity attribute, it can be set to 0). After the encoding / decoding is completed, the current node is added to position 1 of the reference range;

[0360] If i=1, the reference range contains the 0th node P0, then P0 is directly determined as the predicted node. After encoding / decoding is completed, the current node is added to position 0 of the reference range;

[0361] If i=2, P0 and P1 are included in the reference range, and P0 and P1 are directly determined as prediction nodes. After encoding / decoding, the current node is added to position 3 of the reference range.

[0362] If i>=3, then compare in order of index numbers from large to small (or small to large) within the reference range to determine the k nodes (k can be a fixed value of 3 or a range of 3 to 16) closest to the current node among all nodes within the reference range. Use these k points as prediction nodes for the current node. After encoding / decoding is completed, if the index number of the current node is less than 128, add the current node to the reference range based on the parity. If the index number of the current node is greater than or equal to 128, replace the node that entered the reference range earliest with an index number that has the opposite parity to the current node with the current node, thus completing the operation of adding the current node to the reference range.

[0363] The second implementation method: search based on spatial relations (ie spatial relation search method).

[0364] Assume that the current node is Pi and the encoded / decoded reference nodes are (P0, P1, ..., Pi-1).

[0365] If i = 0, the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128, 128, 128); for the reflectivity attribute, it can be set to 0). After the encoding / decoding is completed, the current node is added to position 1 of the reference range;

[0366] If i=1, the reference range contains the 0th node P0, then P0 is directly determined as the predicted node. After encoding / decoding is completed, the current node is added to position 0 of the reference range;

[0367] If i=2, P0 and P1 are included in the reference range, and P0 and P1 are directly determined as prediction nodes. After encoding / decoding, the current node is added to position 3 of the reference range.

[0368] If i>=3, then first search for the parent block of the current node (or the grandparent block of the current node, etc.) and the child nodes in the neighbor blocks that are coplanar, colinear, and co-point with the parent block of the current node (or the grandparent block of the current node, etc.) based on the spatial relationship within the reference range, and determine the k nodes (k can be a fixed value of 3 or a range of 3 to 16) closest to the current node in these child nodes. If k predicted nodes are found, then after completing encoding / decoding through these predicted nodes, the current node is replaced with the index number parity of the current node. The node that enters the reference range earliest with the opposite index is the node that enters the reference range earliest, that is, the operation of adding the current point to the reference range is completed; if k prediction nodes are not found, the global search method is entered to fill 3 to 16 prediction nodes. After the encoding / decoding is completed through these prediction nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity; if the index number of the current node is greater than or equal to 128, the current node is replaced with the node that enters the reference range earliest with the opposite index parity to the current node, that is, the operation of adding the current node to the reference range is completed.

[0369] The third implementation method: depth-first search based on spatial relationships (ie, spatial relationship depth-first search method).

[0370] Assume that the current node is Pi and the encoded / decoded reference nodes are (P0, P1, ..., Pi-1).

[0371] If i = 0, the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128, 128, 128); for the reflectivity attribute, it can be set to 0). After the encoding / decoding is completed, the current node is added to position 1 of the reference range;

[0372] If i=1, the reference range contains the 0th node P0, then P0 is directly determined as the predicted node. After encoding / decoding is completed, the current node is added to position 0 of the reference range;

[0373] If i=2, P0 and P1 are included in the reference range, and P0 and P1 are directly determined as prediction nodes. After encoding / decoding, the current node is added to position 3 of the reference range.

[0374] If i>=3, then first search for the child nodes in the parent block of the current node (or the grandparent block of the current node, etc.) based on the spatial relationship within the reference range, and determine the k nodes (k can be a fixed value of 3 or a range of 3 to 16) closest to the current node in these child nodes. If k predicted nodes are found, after completing encoding / decoding through these predicted nodes, if the index number of the current node is less than 128, the current node is added to the reference range based on the parity. If the index number of the current node is greater than or equal to 128, the current node is replaced with the current node with the parity of the index number. The node with the opposite parity that enters the reference range earliest is the node that completes the operation of adding the current node to the reference range; if there are not enough k predicted nodes, then the child nodes in the neighboring blocks that are coplanar with the parent block of the current node (or the grandparent block of the current node, etc.) are searched based on the spatial relationship within the reference range to fill 3 to 16 predicted nodes. After encoding / decoding is completed through these predicted nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity. If the index number of the current node is greater than or equal to 128, the current node is used to replace the node that enters the reference range earliest with the opposite parity of the index number of the current node. point, that is, the operation of adding the current node to the reference range is completed; if k prediction nodes are still not found, then the child nodes in the neighboring blocks that are collinear with the parent block of the current node (or the grandparent block of the current node, etc.) are searched based on the spatial relationship within the reference range, and 3 to 16 prediction nodes are filled. After encoding / decoding is completed through these prediction nodes, if the index number of the current node is less than 128, the current node is added to the reference range according to the parity. If the index number of the current node is greater than or equal to 128, the current node is replaced with the node that enters the reference range earliest and has the opposite parity to the current node's index number, that is, the current node is added to the reference range. Reference range operation; if the first three steps combined do not find enough k prediction nodes, then search for child nodes in neighboring blocks that have points in common with the parent block of the current node (or the grandparent block of the current node, etc.) based on spatial relationships within the reference range, and fill in 3 to 16 prediction nodes. After completing encoding / decoding through these prediction nodes, if the index number of the current node is less than 128, the current node is added to the reference range based on parity. If the index number of the current node is greater than or equal to 128, the current node is replaced with the node that entered the reference range earliest and has an index number with the opposite parity to the current node, thus completing the operation of adding the current node to the reference range;If the first four steps combined do not find enough k prediction nodes, a global search is performed to complete 3 to 16 prediction nodes. After encoding / decoding these prediction nodes, if the current node's index number is less than 128, the current node is added to the reference range based on its parity. If the current node's index number is greater than or equal to 128, the current node is replaced with the node that entered the reference range earliest and has an index number with the opposite parity to the current node, thus completing the operation of adding the current node to the reference range.

[0375] It should be noted that, in the second and third embodiments, the specific search method based on spatial relationships is described as follows:

[0376] (a) First, based on the current node's position within its parent block (or grandparent block, etc.), determine the neighbor blocks that are coplanar, colinear, or co-pointed with its parent block (or grandparent block, etc.). Figures 8A to 8H illustrate eight patterns for the current node's position, and Figures 9A to 9H illustrate the corresponding distribution of coplanar, colinear, and co-pointed neighbor blocks for each pattern. Taking the Hilbert code (or Morton code, etc.) as an example, the geometric coordinates of the neighbor blocks can be calculated by adding a certain offset to the geometric coordinates of the current node's parent block (or grandparent block, etc.). The corresponding Hilbert code can then be calculated from the geometric coordinates. The offsets corresponding to the eight patterns are detailed above.

[0377] (b) By comparing the Hilbert code of the node within the reference range with the Hilbert code of the neighboring blocks, it can be determined whether the node meets the conditions of coplanarity, colinearity, and copointness.

[0378] It should also be noted that, at the encoder, after predicting the current node based on at least one prediction node and obtaining the attribute prediction value corresponding to the current node, an attribute residual value can be calculated based on the attribute prediction value and the original attribute value corresponding to the current node. This attribute residual value then needs to be written into a bitstream for transmission to the decoder. Therefore, an embodiment of the present application further provides a bitstream generated by bit encoding information to be encoded; wherein the information to be encoded includes at least the attribute residual value corresponding to the current node.

[0379] In this way, after the attribute residual value is written into the bitstream and transmitted from the encoder to the decoder, the decoder receives and parses the bitstream to obtain the attribute residual value; then the decoder uses the same process to predict the attribute prediction value, and adds the attribute prediction value to the attribute residual value to obtain the attribute reconstruction value corresponding to the current node.

[0380] The specific implementation of the aforementioned embodiment is elaborated in detail through the above embodiments. According to the technical scheme of the aforementioned embodiment, it can be seen that the present technical scheme provides a method for determining a reference range, constructs a target reference set including the current node based on the parity characteristics of the index number, and uses the target reference set to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the encoding and decoding performance of the point cloud attributes.

[0381] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG12 , which shows a schematic diagram of the composition structure of an encoder 120 provided in an embodiment of the present application. As shown in FIG12 , the encoder 120 may include: a first determining unit 1201 and an encoding unit 1202; wherein,

[0382] The first determining unit 1201 is configured to determine an index number and an initial reference set corresponding to the current node; and determine a target position corresponding to the current node in the initial reference set based on an even-odd property of the index number;

[0383] The encoding unit 1202 is configured to, after encoding the current node according to the initial reference set, place the current node at a target position to obtain a target reference set.

[0384] In some embodiments, the first determination unit 1201 is further configured to directly place the current node at the target position in the initial reference set when the index number is greater than or equal to 0 and less than a preset constant value; and to replace the reference node at the target position with the current node when the index number is greater than or equal to a preset constant value.

[0385] In some embodiments, the preset constant value represents the maximum number of reference nodes included in the initial reference set, and the target reference set represents the initial reference set corresponding to the next node of the current node in the preset coding order.

[0386] In some embodiments, the initial reference set consists of N encoded reference nodes; accordingly, the first determination unit 1201 is also configured to determine that the value of N is equal to the index number if the index number is greater than or equal to 0 and less than a preset constant value; if the index number is greater than or equal to the preset constant value, determine that the value of N is equal to the preset constant value.

[0387] In some embodiments, referring to FIG12 , the encoder 120 may further include a first prediction unit 1203 configured to obtain an original value of an attribute corresponding to the current node; and determine a predicted value of the attribute corresponding to the current node based on the initial reference set;

[0388] The first determining unit 1201 is further configured to determine the attribute residual value corresponding to the current node according to the attribute original value and the attribute predicted value;

[0389] The encoding unit 1202 is further configured to perform encoding processing on the attribute residual value and write the obtained encoding bits into the bitstream.

[0390] In some embodiments, the first determining unit 1201 is further configured to perform a subtraction calculation on the original value of the attribute and the predicted value of the attribute to obtain the residual value of the attribute corresponding to the current node.

[0391] In some embodiments, the first prediction unit 1203 is further configured to, if the index number is equal to 0, determine that the initial reference set is an empty set, and directly determine the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not equal to 0, determine that the initial reference set is a non-empty set, determine at least one prediction node from the initial reference set, and determine the attribute prediction value corresponding to the current node based on the at least one prediction node.

[0392] In some embodiments, the first determination unit 1201 is further configured to, if the index number is equal to 1, determine a reference node included in the initial reference set as at least one prediction node; if the index number is equal to 2, determine two reference nodes included in the initial reference set as at least one prediction node; if the index number is greater than or equal to 3, obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set, and determine the preset number of reference nodes as at least one prediction node.

[0393] In some embodiments, referring to FIG12 , the encoder 120 may further include a first search unit 1204 configured to obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set using a global search method; or to obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set using a spatial relationship search method; or to obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set using a spatial relationship depth-first search method.

[0394] In some embodiments, the first search unit 1204 is further configured to calculate the distance value between each reference node in the initial reference set and the current node, select a preset number of distance values ​​with relatively small distance values ​​from the obtained N distance values; and determine a preset number of reference nodes based on the preset number of distance values.

[0395] In some embodiments, the first search unit 1204 is further configured to search for reference nodes that meet preset conditions from the initial reference set based on the spatial relationship between nodes to obtain M reference nodes; and calculate the distance value between each of the M reference nodes and the current node, select K distance values ​​with relatively small distance values ​​from the obtained M distance values, and determine K reference nodes based on the K distance values; and if K is equal to a preset number, use the K reference nodes as the preset number of reference nodes; wherein the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in the neighboring block that is coplanar with the upper block of the current node, child nodes in the neighboring block that is colinear with the upper block of the current node, and child nodes in the neighboring block that has a common point with the upper block of the current node.

[0396] In some embodiments, the first search unit 1204 is further configured to calculate the distance value between the reference node in the initial reference set and the current node using a global search method if K is less than a preset number, and determine a preset number of distance values ​​with relatively small distance values ​​based on the comparison result between the distance value and the K distance values, and determine a preset number of reference nodes based on the preset number of distance values.

[0397] In some embodiments, the first search unit 1204 is further configured to search for child nodes in the upper block of the current node from the initial reference set based on the spatial relationship between nodes to obtain K1 reference nodes; and calculate the distance value between each reference node in the K1 reference nodes and the current node, select K2 distance values ​​with relatively small distance values ​​from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values; if the K2 is equal to the preset number, use the K2 reference nodes as the preset number of reference nodes; if the K2 is less than the preset number, continue to search from the initial reference set. The method further comprises the steps of: searching for child nodes in neighboring blocks that are coplanar with the upper block of the current node to obtain K3 reference nodes; calculating the distance value between each reference node in the K3 reference nodes and the current node, and determining K4 distance values ​​with relatively small distance values ​​based on the comparison result of the obtained K3 distance values ​​and the K2 distance values, and determining K4 reference nodes based on the K4 distance values; if the K4 is equal to the preset number, using the K4 reference nodes as the preset number of reference nodes; if the K4 is less than the preset number, continuing to search for child nodes in neighboring blocks that are colinear with the upper block of the current node from the initial reference set to obtain K5 reference nodes. and calculating the distance value between each reference node in the K5 reference nodes and the current node, and determining K6 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K5 distance values ​​and the K4 distance values, and determining K6 reference nodes based on the K6 distance values; if the K6 is equal to the preset number, then using the K6 reference nodes as the preset number of reference nodes; if the K6 is less than the preset number, then continuing to search for child nodes in neighboring blocks that have common points with the upper layer block of the current node from the initial reference set to obtain K7 reference nodes; and calculating the distance between each reference node in the K7 reference nodes and the current node The distance value between the nodes is calculated, and K8 distance values ​​with relatively small distance values ​​are determined based on the comparison results of the obtained K7 distance values ​​and the K6 distance values, and K8 reference nodes are determined based on the K8 distance values; if the K8 is equal to the preset number, the K8 reference nodes are used as the preset number of reference nodes; if the K8 is less than the preset number, the distance value between the reference node in the initial reference set and the current node is calculated by a global search method, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison results of the distance value and the K8 distance values, and the preset number of reference nodes are determined based on the preset number of distance values.

[0398] In some embodiments, the upper block of the current node includes at least one of the following: the parent block of the current node, and the grandparent block of the current node.

[0399] In some embodiments, the first determination unit 1201 is further configured to determine a target reference node from the initial reference set that has an opposite parity characteristic to the index number and is placed earliest in the initial reference set, and determine the position corresponding to the target reference node as the target position.

[0400] In some embodiments, the first determination unit 1201 is further configured to determine a group of candidate reference nodes placed earliest in the initial reference set according to a preset step size; and determine a target reference node with an opposite parity characteristic to the index number from a group of candidate reference nodes, and determine the position corresponding to the target reference node as the target position.

[0401] In some embodiments, the first determining unit 1201 is further configured to determine the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set when the index number is greater than or equal to a preset constant value;

[0402] The encoding unit 1202 is further configured to, after encoding the current node according to the initial reference set, delete the reference node at the first position in the initial reference set and place the current node at the target position to obtain a target reference set.

[0403] In some embodiments, the initial reference set includes a first initial reference set and a second initial reference set; accordingly, the encoding unit 1202 is further configured to obtain a first target reference set after encoding the current node according to the first initial reference set; wherein the first target reference set is obtained based on replacing the reference node at the target position in the first initial reference set with the current node; and / or, after encoding the current node according to the second initial reference set, obtain the second target reference set; wherein the second target reference set is obtained based on deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

[0404] In some embodiments, the encoding unit 1202 is further configured to encode the current node according to the second initial reference set if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, the current node is encoded according to the first initial reference set.

[0405] In some embodiments, the first determination unit 1201 is further configured to, after encoding the current node according to the first initial reference set and / or the second initial reference set, determine that the first target reference set and the second target reference set are both maintained based on deleting the reference node at the head of the queue and placing the current node at the tail of the queue if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, determine that the first target reference set is maintained based on replacing the reference node at the target position with the current node, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the tail of the queue.

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

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

[0408] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 120. 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.

[0409] Based on the composition of the above-mentioned encoder 120 and the computer-readable storage medium, refer to Figure 13, which shows a specific hardware structure diagram of the encoder 120 provided in an embodiment of the present application. As shown in Figure 13, the encoder 120 may include: a first communication interface 1301, a first memory 1302 and a first processor 1303; each component is coupled together through a first bus system 1304. It can be understood that the first bus system 1304 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 1304 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 1304 in Figure 13. Among them,

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

[0411] A first memory 1302 is used to store computer programs that can be run on the first processor 1303;

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

[0413] Determine the index number and initial reference set corresponding to the current node;

[0414] Based on the parity of the index number, determine the target position corresponding to the current node in the initial reference set;

[0415] After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

[0416] It is understood that the first memory 1302 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 1302 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0417] The first processor 1303 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 1303. The above-mentioned first processor 1303 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 as being executed by a hardware decoding processor, or can be executed 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 1302 , and the first processor 1303 reads the information in the first memory 1302 and completes the steps of the above method in combination with its hardware.

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

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

[0420] This embodiment provides an encoder in which a target reference set is constructed based on the parity characteristics of the index sequence number, and then the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the encoding and decoding performance of the point cloud attributes.

[0421] In another embodiment of the present application, based on the same inventive concept as the above embodiment, refer to FIG14 , which shows a schematic diagram of the structure of a decoder 140 provided in an embodiment of the present application. As shown in FIG14 , the decoder 140 may include: a second determining unit 1401 and a decoding unit 1402; wherein,

[0422] The second determining unit 1401 is configured to determine the index number corresponding to the current node and the initial reference set; and determine the target position corresponding to the current node in the initial reference set based on the parity characteristic of the index number;

[0423] The decoding unit 1402 is configured to place the current node at a target position after decoding the current node according to the initial reference set to obtain a target reference set.

[0424] In some embodiments, the second determination unit 1401 is further configured to directly place the current node at the target position in the initial reference set when the index number is greater than or equal to 0 and less than a preset constant value; and to replace the reference node at the target position with the current node when the index number is greater than or equal to a preset constant value.

[0425] In some embodiments, the preset constant value represents the maximum number of reference nodes included in the initial reference set, and the target reference set represents the initial reference set corresponding to the next node of the current node in the preset decoding order.

[0426] In some embodiments, the initial reference set consists of N decoded reference nodes; accordingly, the second determination unit 1401 is also configured to determine that the value of N is equal to the index number if the index number is greater than or equal to 0 and less than a preset constant value; if the index number is greater than or equal to the preset constant value, determine that the value of N is equal to the preset constant value.

[0427] In some embodiments, referring to FIG14 , the decoder 140 may further include a second prediction unit 1403 configured to determine a predicted attribute value corresponding to the current node based on the initial reference set;

[0428] The decoding unit 1402 is further configured to parse the code stream and determine the attribute residual value corresponding to the current node;

[0429] The second determining unit 1401 is further configured to determine the attribute reconstruction value corresponding to the current node according to the attribute residual value and the attribute prediction value.

[0430] In some embodiments, the second determining unit 1401 is further configured to perform addition calculation on the attribute residual value and the attribute prediction value to obtain the attribute reconstruction value corresponding to the current node.

[0431] In some embodiments, the second prediction unit 1403 is further configured to, if the index number is equal to 0, determine that the initial reference set is an empty set, and directly determine the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not equal to 0, determine that the initial reference set is a non-empty set, determine at least one prediction node from the initial reference set, and determine the attribute prediction value corresponding to the current node based on the at least one prediction node.

[0432] In some embodiments, the second determination unit 1401 is further configured to, if the index number is equal to 1, determine a reference node included in the initial reference set as at least one prediction node; if the index number is equal to 2, determine two reference nodes included in the initial reference set as at least one prediction node; if the index number is greater than or equal to 3, obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set, and determine the preset number of reference nodes as at least one prediction node.

[0433] In some embodiments, referring to FIG14 , the decoder 140 may further include a second search unit 1404 configured to obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set using a global search method; or, to obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set using a spatial relationship search method; or, to obtain a preset number of reference nodes with relatively small distance values ​​from the current node from the initial reference set using a spatial relationship depth-first search method.

[0434] In some embodiments, the second search unit 1404 is further configured to calculate the distance value between each reference node in the initial reference set and the current node, select a preset number of distance values ​​with relatively small distance values ​​from the obtained N distance values; and determine a preset number of reference nodes based on the preset number of distance values.

[0435] In some embodiments, the second search unit 1404 is further configured to search for reference nodes that meet preset conditions from the initial reference set based on the spatial relationship between nodes to obtain M reference nodes; and calculate the distance value between each of the M reference nodes and the current node, select K distance values ​​with relatively small distance values ​​from the obtained M distance values, and determine K reference nodes based on the K distance values; and if K is equal to a preset number, use the K reference nodes as the preset number of reference nodes; wherein the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in the neighboring block that is coplanar with the upper block of the current node, child nodes in the neighboring block that is colinear with the upper block of the current node, and child nodes in the neighboring block that has a common point with the upper block of the current node.

[0436] In some embodiments, the second search unit 1404 is further configured to calculate the distance value between the reference node in the initial reference set and the current node using a global search method if K is less than a preset number, and determine a preset number of distance values ​​with relatively small distance values ​​based on the comparison result between the distance value and the K distance values, and determine a preset number of reference nodes based on the preset number of distance values.

[0437] In some embodiments, the second search unit 1404 is further configured to search for child nodes in the upper block of the current node from the initial reference set based on the spatial relationship between nodes to obtain K1 reference nodes; and calculate the distance value between each reference node in the K1 reference nodes and the current node, select K2 distance values ​​with relatively small distance values ​​from the obtained K1 distance values, and determine the K2 reference nodes according to the K2 distance values; if the K2 is equal to the preset number, use the K2 reference nodes as the preset number of reference nodes; if the K2 is less than the preset number, continue to search from the initial reference set. The method further comprises the steps of: searching for child nodes in neighboring blocks that are coplanar with the upper block of the current node to obtain K3 reference nodes; calculating the distance value between each reference node in the K3 reference nodes and the current node, and determining K4 distance values ​​with relatively small distance values ​​based on the comparison result of the obtained K3 distance values ​​and the K2 distance values, and determining K4 reference nodes based on the K4 distance values; if the K4 is equal to the preset number, using the K4 reference nodes as the preset number of reference nodes; if the K4 is less than the preset number, continuing to search for child nodes in neighboring blocks that are colinear with the upper block of the current node from the initial reference set to obtain K5 reference nodes. and calculating the distance value between each reference node in the K5 reference nodes and the current node, and determining K6 distance values ​​with relatively small distance values ​​based on the comparison results of the obtained K5 distance values ​​and the K4 distance values, and determining K6 reference nodes based on the K6 distance values; if the K6 is equal to the preset number, then using the K6 reference nodes as the preset number of reference nodes; if the K6 is less than the preset number, then continuing to search for child nodes in neighboring blocks that have common points with the upper layer block of the current node from the initial reference set to obtain K7 reference nodes; and calculating the distance between each reference node in the K7 reference nodes and the current node The distance value between the nodes is calculated, and K8 distance values ​​with relatively small distance values ​​are determined based on the comparison results of the obtained K7 distance values ​​and the K6 distance values, and K8 reference nodes are determined based on the K8 distance values; if the K8 is equal to the preset number, the K8 reference nodes are used as the preset number of reference nodes; if the K8 is less than the preset number, the distance value between the reference node in the initial reference set and the current node is calculated by a global search method, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison results of the distance value and the K8 distance values, and the preset number of reference nodes are determined based on the preset number of distance values.

[0438] In some embodiments, the upper block of the current node includes at least one of the following: the parent block of the current node, and the grandparent block of the current node.

[0439] In some embodiments, the second determination unit 1401 is further configured to determine a target reference node from the initial reference set that has an opposite parity characteristic to the index number and is placed earliest in the initial reference set, and determine the position corresponding to the target reference node as the target position.

[0440] In some embodiments, the second determination unit 1401 is further configured to determine a group of candidate reference nodes placed earliest in the initial reference set according to a preset step size; and determine a target reference node with an opposite parity characteristic to the index number from a group of candidate reference nodes, and determine the position corresponding to the target reference node as the target position.

[0441] In some embodiments, the second determining unit 1401 is further configured to determine the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set when the index number is greater than or equal to a preset constant value;

[0442] The decoding unit 1402 is further configured to, after decoding the current node according to the initial reference set, delete the reference node at the head position in the initial reference set and place the current node at the target position to obtain a target reference set.

[0443] In some embodiments, the initial reference set includes a first initial reference set and a second initial reference set; accordingly, the decoding unit 1402 is further configured to obtain a first target reference set after decoding the current node according to the first initial reference set; wherein the first target reference set is obtained based on replacing the reference node at the target position in the first initial reference set with the current node; and / or, after decoding the current node according to the second initial reference set, obtain the second target reference set; wherein the second target reference set is obtained based on deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

[0444] In some embodiments, the decoding unit 1402 is further configured to decode the current node according to the second initial reference set if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, the current node is decoded according to the first initial reference set.

[0445] In some embodiments, the second determination unit 1401 is further configured to, after decoding the current node according to the first initial reference set and / or the second initial reference set, determine that the first target reference set and the second target reference set are both maintained based on deleting the reference node at the head of the queue and placing the current node at the tail of the queue if the current node uses a spatial relationship search method or a spatial relationship depth-first search method; if the current node uses a global search method, determine that the first target reference set is maintained based on replacing the reference node at the target position with the current node, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the tail of the queue.

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

[0447] 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 for use in decoder 140. The computer-readable storage medium stores a computer program that, when executed by a second processor, implements any of the methods described in the aforementioned embodiments.

[0448] Based on the composition of the above-mentioned decoder 140 and the computer-readable storage medium, refer to Figure 15, which shows a specific hardware structure diagram of the decoder 140 provided in an embodiment of the present application. As shown in Figure 15, the decoder 140 may include: a second communication interface 1501, a second memory 1502 and a second processor 1503; each component is coupled together through a second bus system 1504. It can be understood that the second bus system 1504 is used to achieve connection and communication between these components. In addition to the data bus, the second 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 second bus system 1504 in Figure 15. Among them,

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

[0450] The second memory 1502 is used to store computer programs that can be run on the second processor 1503;

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

[0452] Determine the index number and initial reference set corresponding to the current node;

[0453] Based on the parity of the index number, determine the target position corresponding to the current node in the initial reference set;

[0454] After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.

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

[0456] It can be understood that the hardware functions of the second memory 1502 are similar to those of the first memory 1302, and the hardware functions of the second processor 1503 are similar to those of the first processor 1303; they will not be described in detail here.

[0457] This embodiment provides a decoder, in which a target reference set is constructed based on the parity characteristics of the index sequence number, and then the target reference set is used to predict the attributes of the point cloud, which can improve the prediction accuracy of the point cloud attributes and improve the encoding and decoding performance of the point cloud attributes.

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

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

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

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

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

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

[0464] In an embodiment of the present application, at the encoding or decoding end, the index number and initial reference set corresponding to the current node are determined; based on the parity of the index number, the target position corresponding to the current node in the initial reference set is determined; after encoding / decoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set. In this way, a target reference set including the current node is constructed based on the parity of the index number, and point cloud attribute prediction is performed using this target reference set, which can improve the prediction accuracy of point cloud attributes and improve the encoding and decoding performance of point cloud attributes.

Claims

1. A decoding method, applied to a decoder, comprising: Determine the index number and initial reference set corresponding to the current node; Determining a target position corresponding to the current node in the initial reference set based on an even-odd property of the index sequence number; After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set.

2. The method according to claim 1, wherein After decoding the current node according to the initial reference set, placing the current node at the target position includes: When the index number is greater than or equal to 0 and less than a preset constant value, directly placing the current node at the target position in the initial reference set; When the index number is greater than or equal to a preset constant value, the reference node at the target position is replaced by the current node.

3. The method according to claim 2, wherein: The preset constant value represents the maximum number of reference nodes included in the initial reference set, and the target reference set represents the initial reference set corresponding to the next node of the current node in a preset decoding order.

4. The method according to claim 2, wherein: The initial reference set is composed of N decoded reference nodes; the method further includes: If the index number is greater than or equal to 0 and less than a preset constant value, then determine that the value of N is equal to the index number; If the index number is greater than or equal to a preset constant value, it is determined that the value of N is equal to the preset constant value.

5. The method according to claim 4, wherein The decoding process on the current node according to the initial reference set includes: Parse the code stream to determine the attribute residual value corresponding to the current node; Determining a predicted attribute value corresponding to the current node according to the initial reference set; Determine the attribute reconstruction value corresponding to the current node according to the attribute residual value and the attribute prediction value.

6. The method according to claim 5, wherein: The determining, according to the attribute residual value and the attribute prediction value, the attribute reconstruction value corresponding to the current node includes: The attribute residual value and the attribute prediction value are added to obtain the attribute reconstruction value corresponding to the current node.

7. The method according to claim 5, wherein: The determining, based on the initial reference set, the attribute prediction value corresponding to the current node includes: If the index number is equal to 0, the initial reference set is determined to be an empty set, and the preset attribute value is directly determined as the attribute prediction value corresponding to the current node; If the index number is not equal to 0, the initial reference set is determined to be a non-empty set, at least one prediction node is determined from the initial reference set, and the attribute prediction value corresponding to the current node is determined according to the at least one prediction node.

8. The method according to claim 7, wherein: When the index number is not equal to 0, determining at least one prediction node from the initial reference set includes: If the index number is equal to 1, determining a reference node included in the initial reference set as the at least one prediction node; If the index number is equal to 2, determining the two reference nodes included in the initial reference set as the at least one prediction node; If the index number is greater than or equal to 3, a preset number of reference nodes having relatively small distance values ​​to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as the at least one prediction node.

9. The method according to claim 8, wherein The acquiring, from the initial reference set, a preset number of reference nodes having relatively small distances to the current node, includes: A preset number of reference nodes having relatively small distances to the current node are obtained from the initial reference set by using a global search method; or From the initial reference set, a preset number of reference nodes having relatively small distances to the current node are obtained by using a spatial relationship search method; or A preset number of reference nodes having relatively small distances to the current node are acquired from the initial reference set using a spatial relationship depth-first search method.

10. The method according to claim 9, wherein: The method of obtaining a preset number of reference nodes having relatively small distances to the current node by using a global search method includes: Calculating the distance between each reference node in the initial reference set and the current node, and selecting a preset number of distance values ​​with relatively small distance values ​​from the obtained N distance values; The preset number of reference nodes is determined according to the preset number of distance values.

11. The method according to claim 9, wherein The method of obtaining a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship search method includes: Based on the spatial relationship between nodes, searching for reference nodes that meet preset conditions from the initial reference set to obtain M reference nodes; Calculating a distance value between each of the M reference nodes and the current node, selecting K distance values ​​with relatively small distance values ​​from the obtained M distance values, and determining K reference nodes based on the K distance values; If K is equal to the preset number, the K reference nodes are used as the preset number of reference nodes; Among them, the reference nodes that meet the preset conditions include at least: child nodes in the upper-layer block of the current node, child nodes in the neighboring block that is coplanar with the upper-layer block of the current node, child nodes in the neighboring block that is colinear with the upper-layer block of the current node, and child nodes in the neighboring block that is co-pointed with the upper-layer block of the current node.

12. The method according to claim 11, wherein The method further comprises: If K is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K distance values, and the preset number of reference nodes are determined based on the preset number of distance values.

13. The method according to claim 9, wherein: The method of obtaining a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship depth-first search method includes: Based on the spatial relationship between nodes, searching for child nodes in the upper layer block of the current node from the initial reference set to obtain K1 reference nodes; Calculating a distance value between each of the K1 reference nodes and the current node, selecting K2 distance values ​​with relatively smaller distance values ​​from the obtained K1 distance values, and determining the K2 reference nodes based on the K2 distance values; If K2 is equal to the preset number, the K2 reference nodes are used as the preset number of reference nodes; If K2 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that are coplanar with the upper layer block of the current node to obtain K3 reference nodes; Calculating the distance between each of the K3 reference nodes and the current node, and determining K4 distance values ​​having relatively smaller distance values ​​based on a comparison result of the obtained K3 distance values ​​and the K2 distance values, and determining K4 reference nodes based on the K4 distance values; If K4 is equal to the preset number, the K4 reference nodes are used as the preset number of reference nodes; If K4 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that are collinear with the upper layer block of the current node to obtain K5 reference nodes; Calculating the distance between each of the K5 reference nodes and the current node, and determining K6 distance values ​​having relatively smaller distance values ​​based on a comparison result of the obtained K5 distance values ​​and the K4 distance values, and determining K6 reference nodes based on the K6 distance values; If K6 is equal to the preset number, the K6 reference nodes are used as the preset number of reference nodes; If K6 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that have common points with the upper layer block of the current node to obtain K7 reference nodes; Calculating the distance between each of the K7 reference nodes and the current node, and determining K8 distance values ​​having relatively smaller distance values ​​based on a comparison result of the obtained K7 distance values ​​and the K6 distance values, and determining K8 reference nodes based on the K8 distance values; If K8 is equal to the preset number, the K8 reference nodes are used as the preset number of reference nodes; If the K8 is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K8 distance values, and the preset number of reference nodes are determined based on the preset number of distance values.

14. The method according to any one of claims 11 to 13, wherein: The upper block of the current node includes at least one of the following: the parent block of the current node and the grandparent block of the current node.

15. The method according to claim 1, wherein The determining, based on the parity characteristic of the index sequence number, a target position corresponding to the current node in the initial reference set includes: A target reference node that has an odd-even characteristic opposite to that of the index number and is placed earliest in the initial reference set is determined from the initial reference set, and a position corresponding to the target reference node is determined as the target position.

16. The method according to claim 1, wherein The determining, based on the parity characteristic of the index sequence number, a target position corresponding to the current node in the initial reference set includes: In the initial reference set, determining a set of candidate reference nodes to be placed earliest according to a preset step size; A target reference node having an odd-even characteristic opposite to that of the index number is determined from the group of candidate reference nodes, and a position corresponding to the target reference node is determined as the target position.

17. The method according to claim 1, wherein The method further comprises: When the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set; After decoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.

18. The method according to claim 1, wherein The initial reference set includes a first initial reference set and a second initial reference set; the method further includes: After decoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and / or After decoding the current node according to the second initial reference set, a second target reference set is obtained; wherein, the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

19. The method according to claim 18, wherein The method further comprises: If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, decoding the current node according to the second initial reference set; If the current node uses a global search method, decoding processing is performed on the current node according to the first initial reference set.

20. The method according to claim 18, wherein The method further comprises: If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue; If the current node uses a global search method, it is determined that the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.

21. A coding method, applied to an encoder, comprising: Determine the index number and initial reference set corresponding to the current node; Determining a target position corresponding to the current node in the initial reference set based on an even-odd property of the index sequence number; After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain a target reference set.

22. The method according to claim 21, wherein After encoding the current node according to the initial reference set, placing the current node at the target position includes: When the index number is greater than or equal to 0 and less than a preset constant value, directly placing the current node at the target position in the initial reference set; When the index number is greater than or equal to a preset constant value, the reference node at the target position is replaced by the current node.

23. The method according to claim 22, wherein The preset constant value represents the maximum number of reference nodes included in the initial reference set, and the target reference set represents the initial reference set corresponding to the next node of the current node in a preset coding order.

24. The method according to claim 22, wherein The initial reference set is composed of N encoded reference nodes; the method further includes: If the index number is greater than or equal to 0 and less than a preset constant value, then determine that the value of N is equal to the index number; If the index number is greater than or equal to a preset constant value, it is determined that the value of N is equal to the preset constant value.

25. The method according to claim 24, wherein The encoding process of the current node according to the initial reference set includes: Get the original value of the attribute corresponding to the current node; Determining a predicted attribute value corresponding to the current node according to the initial reference set; Determine the attribute residual value corresponding to the current node according to the attribute original value and the attribute predicted value; The attribute residual value is coded, and the obtained coded bits are written into a bitstream.

26. The method according to claim 25, wherein The determining, according to the original attribute value and the predicted attribute value, the attribute residual value corresponding to the current node includes: Subtract the attribute original value from the attribute predicted value to obtain the attribute residual value corresponding to the current node.

27. The method according to claim 25, wherein The determining, based on the initial reference set, the attribute prediction value corresponding to the current node includes: If the index number is equal to 0, the initial reference set is determined to be an empty set, and the preset attribute value is directly determined as the attribute prediction value corresponding to the current node; If the index number is not equal to 0, the initial reference set is determined to be a non-empty set, at least one prediction node is determined from the initial reference set, and the attribute prediction value corresponding to the current node is determined according to the at least one prediction node.

28. The method according to claim 27, wherein When the index number is not equal to 0, determining at least one prediction node from the initial reference set includes: If the index number is equal to 1, determining a reference node included in the initial reference set as the at least one prediction node; If the index number is equal to 2, determining the two reference nodes included in the initial reference set as the at least one prediction node; If the index number is greater than or equal to 3, a preset number of reference nodes having relatively small distance values ​​to the current node are obtained from the initial reference set, and the preset number of reference nodes are determined as the at least one prediction node.

29. The method according to claim 28, wherein The acquiring, from the initial reference set, a preset number of reference nodes having relatively small distances to the current node, includes: A preset number of reference nodes having relatively small distances to the current node are obtained from the initial reference set by using a global search method; or From the initial reference set, a preset number of reference nodes having relatively small distances to the current node are obtained by using a spatial relationship search method; or A preset number of reference nodes having relatively small distances to the current node are acquired from the initial reference set using a spatial relationship depth-first search method.

30. The method according to claim 29, wherein The method of obtaining a preset number of reference nodes having relatively small distances to the current node by using a global search method includes: Calculating the distance between each reference node in the initial reference set and the current node, and selecting a preset number of distance values ​​with relatively small distance values ​​from the obtained N distance values; The preset number of reference nodes is determined according to the preset number of distance values.

31. The method according to claim 29, wherein The method of obtaining a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship search method includes: Based on the spatial relationship between nodes, searching for reference nodes that meet preset conditions from the initial reference set to obtain M reference nodes; Calculating a distance value between each of the M reference nodes and the current node, selecting K distance values ​​with relatively small distance values ​​from the obtained M distance values, and determining K reference nodes based on the K distance values; If K is equal to the preset number, the K reference nodes are used as the preset number of reference nodes; Among them, the reference nodes that meet the preset conditions include at least: child nodes in the upper-layer block of the current node, child nodes in the neighboring block that is coplanar with the upper-layer block of the current node, child nodes in the neighboring block that is colinear with the upper-layer block of the current node, and child nodes in the neighboring block that is co-pointed with the upper-layer block of the current node.

32. The method according to claim 31, wherein The method further comprises: If K is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K distance values, and the preset number of reference nodes are determined based on the preset number of distance values.

33. The method of claim 29, wherein: The method of obtaining a preset number of reference nodes having relatively small distances to the current node by using a spatial relationship depth-first search method includes: Based on the spatial relationship between nodes, searching for child nodes in the upper layer block of the current node from the initial reference set to obtain K1 reference nodes; Calculating a distance value between each of the K1 reference nodes and the current node, selecting K2 distance values ​​with relatively smaller distance values ​​from the obtained K1 distance values, and determining the K2 reference nodes based on the K2 distance values; If K2 is equal to the preset number, the K2 reference nodes are used as the preset number of reference nodes; If K2 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that are coplanar with the upper layer block of the current node to obtain K3 reference nodes; Calculating the distance between each of the K3 reference nodes and the current node, and determining K4 distance values ​​having relatively smaller distance values ​​based on a comparison result of the obtained K3 distance values ​​and the K2 distance values, and determining K4 reference nodes based on the K4 distance values; If K4 is equal to the preset number, the K4 reference nodes are used as the preset number of reference nodes; If K4 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that are collinear with the upper layer block of the current node to obtain K5 reference nodes; Calculating the distance between each of the K5 reference nodes and the current node, and determining K6 distance values ​​having relatively smaller distance values ​​based on a comparison result of the obtained K5 distance values ​​and the K4 distance values, and determining K6 reference nodes based on the K6 distance values; If K6 is equal to the preset number, the K6 reference nodes are used as the preset number of reference nodes; If K6 is less than the preset number, continue searching the initial reference set for child nodes in neighboring blocks that have common points with the upper layer block of the current node to obtain K7 reference nodes; Calculating the distance between each of the K7 reference nodes and the current node, and determining K8 distance values ​​having relatively smaller distance values ​​based on a comparison result of the obtained K7 distance values ​​and the K6 distance values, and determining K8 reference nodes based on the K8 distance values; If K8 is equal to the preset number, the K8 reference nodes are used as the preset number of reference nodes; If the K8 is smaller than the preset number, a global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and a preset number of distance values ​​with relatively small distance values ​​are determined based on the comparison result between the distance value and the K8 distance values, and the preset number of reference nodes are determined based on the preset number of distance values.

34. The method according to any one of claims 31 to 33, wherein: The upper block of the current node includes at least one of the following: the parent block of the current node and the grandparent block of the current node.

35. The method of claim 21, wherein The determining, based on the parity characteristic of the index sequence number, a target position corresponding to the current node in the initial reference set includes: A target reference node that has an odd-even characteristic opposite to that of the index number and is placed earliest in the initial reference set is determined from the initial reference set, and a position corresponding to the target reference node is determined as the target position.

36. The method of claim 21, wherein The determining, based on the parity characteristic of the index sequence number, a target position corresponding to the current node in the initial reference set includes: In the initial reference set, determining a set of candidate reference nodes to be placed earliest according to a preset step size; A target reference node having an odd-even characteristic opposite to that of the index number is determined from the group of candidate reference nodes, and a position corresponding to the target reference node is determined as the target position.

37. The method of claim 21, wherein: The method further comprises: When the index number is greater than or equal to a preset constant value, determining the tail position of the initial reference set as the target position corresponding to the current node in the initial reference set; After encoding the current node according to the initial reference set, the reference node at the head position in the initial reference set is deleted, and the current node is placed at the target position to obtain the target reference set.

38. The method of claim 21, wherein The initial reference set includes a first initial reference set and a second initial reference set; the method further includes: After encoding the current node according to the first initial reference set, a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set with the current node; and / or After encoding the current node according to the second initial reference set, a second target reference set is obtained; wherein, the second target reference set is obtained by deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.

39. The method according to claim 38, wherein The method further comprises: If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, encoding the current node according to the second initial reference set; If the current node uses a global search method, the current node is encoded according to the first initial reference set.

40. The method of claim 38, wherein After encoding the current node according to the first initial reference set and / or the second initial reference set, the method further includes: If the current node uses a spatial relationship search method or a spatial relationship depth-first search method, determining that the first target reference set and the second target reference set are both maintained by deleting the reference node at the head of the queue and placing the current node at the tail of the queue; If the current node uses a global search method, it is determined that the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.

41. A code stream, the code stream being generated by bit encoding based on information to be encoded; wherein, The information to be encoded includes at least: an attribute residual value corresponding to the current node.

42. An encoder, comprising a first determining unit and an encoding unit; wherein: The first determining unit is configured to determine the index number corresponding to the current node and the initial reference set; and determining a target position corresponding to the current node in the initial reference set based on the parity characteristic of the index sequence number; The encoding unit is configured to, after encoding the current node according to the initial reference set, place the current node at the target position to obtain a target reference set.

43. 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 21 to 40 when running the computer program.

44. A decoder comprising a second determining unit and a decoding unit; wherein: The second determining unit is configured to determine the index number corresponding to the current node and the initial reference set; and determining a target position corresponding to the current node in the initial reference set based on the parity characteristic of the index sequence number; The decoding unit is configured to place the current node at the target position after decoding the current node according to the initial reference set to obtain a target reference set.

45. 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 20 when running the computer program.

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

Citation Information

Patent Citations

  • Point cloud geometrical information inter-frame encoding and decoding method

    CN112565764A

  • Techniques and apparatus for weighted-median prediction for point-cloud attribute coding

    CN113424547A

  • Improved encoding process using a palette mode

    US20160316214A1

  • Nearest neighbour search method, encoder, decoder and storage medium

    WO2021218509A1