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

By constructing a target reference set, the problem of inaccurate attribute prediction in point cloud compression is solved, and the prediction accuracy of point cloud attributes and the encoding and decoding performance are improved.

CN118743219BActive Publication Date: 2025-10-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202280092180.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-12
Publication Date
2025-10-14
Estimated Expiration
2042-03-12

AI Technical Summary

Technical Problem

In existing point cloud compression technologies, the reference range for attribute prediction is not constructed accurately, resulting in low attribute prediction accuracy and encoding and decoding performance.

Method used

By determining the index number of the current node and the initial reference set, based on the distance between the reference node and the current node, the target position with the maximum distance value is found, and the current node is placed at this position to construct the target reference set for predicting point cloud attributes.

Benefits of technology

The prediction accuracy of point cloud attributes and encoding and decoding performance are improved, and the overall effect of point cloud compression is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118743219B_ABST
    Figure CN118743219B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a coding method, a code stream, an encoder, a decoder and a storage medium, and are applied to the decoder. The method comprises the following steps: determining an index serial number corresponding to a current node and an initial reference set; determining a target position corresponding to a maximum distance value in the initial reference set based on distances between reference nodes in the initial reference set and the current node; and placing the current node at the target position to obtain a target reference set after decoding the current node according to the initial reference set. In this way, the target reference set is constructed by replacing the reference node corresponding to the maximum distance value with the current node, and the prediction accuracy of point cloud attributes can be improved by using the target reference set, and the coding and decoding performance of the point cloud attributes can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

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 focuses on 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. Summary of the Invention

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

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

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

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

[0008] Based on the distance between the reference nodes in the initial reference set and the current node, determining the target position corresponding to the maximum distance value in the initial reference set;

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

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

[0011] determine an index sequence number corresponding to the current node and an initial reference set;

[0012] determine a target position corresponding to a maximum distance value in the initial reference set based on distances between reference nodes in the initial reference set and the current node;

[0013] place the current node at the target position to obtain a target reference set after encoding processing of the current node based on the initial reference set.

[0014] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding of to-be-encoded information; wherein the to-be-encoded information at least comprises an attribute residual value corresponding to a current node.

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

[0016] the first determining unit is configured to determine an index sequence number corresponding to the current node and an initial reference set; and determine a target position corresponding to a maximum distance value in the initial reference set based on distances between reference nodes in the initial reference set and the current node;

[0017] the encoding unit is configured to place the current node at the target position to obtain a target reference set after encoding processing of the current node based on the initial reference set.

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

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

[0020] the first processor is used for executing the method in the second aspect when the computer program is running.

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

[0022] the second determining unit is configured to determine an index sequence number corresponding to the current node and an initial reference set; and determine a target position corresponding to a maximum distance value in the initial reference set based on distances between reference nodes in the initial reference set and the current node;

[0023] the decoding unit is configured to place the current node at the target position to obtain a target reference set after decoding processing of the current node based on the initial reference set.

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

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

[0026] The second processor is configured to execute the method of the first aspect when running the computer program.

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

[0028] 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 corresponding to the current node and the initial reference set are determined; based on the distance between the reference node in the initial reference set and the current node, the target position corresponding to the maximum distance value 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 the target reference set. At the decoding end, the index number corresponding to the current node and the initial reference set are determined; based on the distance between the reference node in the initial reference set and the current node, the target position corresponding to the maximum distance value 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 the target reference set. In this way, the target reference set is constructed by replacing the reference node corresponding to the maximum distance value with the current node, and the attribute prediction of the point cloud is performed using the target reference set, 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

[0029] Figure 1A A schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;

[0030] Figure 1B A partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;

[0031] Figure 2A A schematic diagram of a point cloud image at different viewing angles provided in an embodiment of the present application;

[0032] Figure 2B A method provided in the embodiment of this application Figure 2A Schematic diagram of the corresponding data storage format;

[0033] Figure 3 A schematic diagram of a point cloud encoding and decoding network architecture provided in an embodiment of the present application;

[0034] Figure 4 A schematic diagram of the structure of a point cloud encoder provided in an embodiment of the present application;

[0035] Figure 5 A schematic diagram of the structure of a point cloud decoder provided in an embodiment of the present application;

[0036] Figure 6A A schematic diagram of the distribution of the current node and coplanar nodes provided in an embodiment of the present application;

[0037] Figure 6B A schematic diagram of the distribution of the current node and collinear nodes provided in an embodiment of the present application;

[0038] Figure 6C A schematic diagram of the distribution of current nodes and common nodes provided in an embodiment of the present application;

[0039] Figure 7 A flowchart of a decoding method provided in an embodiment of the present application;

[0040] Figures 8A to 8H A schematic diagram of eight modes corresponding to the current node orientation provided in an embodiment of the present application;

[0041] Figures 9A to 9H A schematic diagram of the distribution of coplanar, colinear, and co-point neighbor blocks corresponding to the current node in eight modes provided by an embodiment of the present application;

[0042] Figure 10 A schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0043] Figure 11 A schematic diagram of a reference range determination process provided in an embodiment of the present application;

[0044] Figure 12 A schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0045] Figure 13 A schematic diagram of the specific hardware structure of an encoder provided in an embodiment of the present application;

[0046] Figure 14 A schematic diagram of the structure of a decoder provided in an embodiment of the present application;

[0047] Figure 15 A schematic diagram of the specific hardware structure of a decoder provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those 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 herein only and are not intended to limit this application.

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

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

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

[0053] 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 Displays 3D point cloud images and Figure 1B A local enlarged image of the 3D point cloud image is shown, and it can be seen that the point cloud surface is composed of densely distributed points.

[0054] A two-dimensional image has information expressed at each pixel point, and the distribution is regular, so it does not need to record the position information. However, the distribution of points in a point cloud in a three-dimensional space has randomness and irregularity, so the position of each point in the space needs to be recorded to completely express a point cloud. Similar to a two-dimensional image, each position has corresponding attribute information during the acquisition process, which is usually an RGB color value, and the color value reflects the color of the object. For a point cloud, the attribute information corresponding to each point, in addition to color information, also includes a commonly seen reflectance value, which reflects the surface material of the object. Therefore, the points in the point cloud can include the position information of the points and the attribute information of the points. For example, the position information of the points can be three-dimensional coordinate information (x, y, z) of the points. The position information of the points can also be referred to as the geometric information of the points. For example, the attribute information of the points can include color information (three-dimensional color information) and / or reflectance (one-dimensional reflectance information r), and the like. For example, the color information can be information on any color space. For example, the color information can be RGB information. Among them, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B). For another example, the color information can be luminance chrominance (YCbCr, YUv) information. Among them, Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (v) represents red color difference.

[0055] According to the principle of laser measurement, the points in the point cloud can include three-dimensional coordinate information of the points and reflectance values of the points. For another example, according to the principle of photogrammetry, the points in the point cloud can include three-dimensional coordinate information of the points and three-dimensional color information of the points. For another example, the point cloud obtained by combining the principles of laser measurement and photogrammetry can include three-dimensional coordinate information of the points, reflectance values of the points, and three-dimensional color information of the points.

[0056] As shown in Figure 2A and Figure 2B , a point cloud image and its corresponding data storage format are shown. Among them, Figure 2A six viewing angles of the point cloud image are provided, Figure 2B which is composed of a file header information part and a data part. The header information includes data format, data representation type, total number of points of the point cloud, and content represented by the point cloud. For example, the point cloud is in a “.ply” format, represented by ASCII code, with a total of 207242 points, each point having three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).

[0057] The point cloud can be divided into the following categories according to the way of acquisition:

[0058] Static point cloud: the object is static, and the device for acquiring the point cloud is also static;

[0059] Dynamic point cloud: the object is moving, but the device that acquires the point cloud is static;

[0060] Dynamic acquisition of point cloud: the device that acquires the point cloud is moving.

[0061] For example, point clouds are divided into two categories according to their use:

[0062] Category one: machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, disaster relief robots, etc.

[0063] Category two: human eye perception point cloud, which can be used in digital cultural heritage, free-view broadcast, three-dimensional immersive communication, three-dimensional immersive interaction, etc.

[0064] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes, and can provide strong realism under the premise of ensuring accuracy because point clouds are obtained by directly sampling real objects. Therefore, point clouds are widely used in virtual reality games, computer-aided design, geographic information systems, autonomous navigation systems, digital cultural heritage, free-view broadcast, three-dimensional immersive remote presentation, three-dimensional reconstruction of biological tissues and organs, etc.

[0065] The acquisition of point clouds mainly has the following ways: computer generation, 3D laser scanning, 3D photogrammetry, etc. Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can acquire millions of point clouds per second; 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can acquire tens of millions of point clouds per second. These technologies reduce the cost and time period of point cloud data acquisition and improve the accuracy of data. The change in point cloud data acquisition methods makes it possible to acquire a large amount of point cloud data, and with the growth of application demand, the processing of massive 3D point cloud data encounters the bottleneck of storage space and transmission bandwidth limitation.

[0066] Exemplarily, taking a point cloud video with a frame rate of 30 frames per second (fps) as an example, the number of points of each frame of point cloud is 700,000, each point has coordinate information xyz (float) and color information RGB (uchar), and the data volume of a 10s point cloud video is about 0.7 million x (4 Byte x 3 + 1 Byte x 3) x 30 fps x 10s = 3.15 GB, wherein 1 Byte is 8 bits, and the YUv sampling format is 4:2:0, the data volume of a 10s 1280x720 two-dimensional video with a frame rate of 24 fps is about 1280x720x12bitx24fpsx10s≈0.33GB, and the data volume of a 10s two-view three-dimensional video is about 0.33x2 = 0.66GB. As can be seen, the data volume of the point cloud video far exceeds that of the two-dimensional video and the three-dimensional video with the same length. Therefore, in order to better realize data management, save server storage space, and reduce transmission flow and transmission time between the server and the client, point cloud compression has become a key problem to promote the development of the point cloud industry.

[0067] That is, since the point cloud is a collection of a large number of points, storing the point cloud not only consumes a large amount of memory, but also is not conducive to transmission, and there is no such large bandwidth to support the transmission of the point cloud directly on the network layer without compression, therefore, the point cloud needs to be compressed.

[0068] At present, the point cloud encoding framework that can compress the point cloud can be a geometry-based point cloud compression (G-PCC) coding framework or a video-based point cloud compression (V-PCC) coding framework provided by the Moving Picture Experts Group (MPEG), or an AVS-PCC coding framework provided by the AVS. The G-PCC coding framework can be used for compression of the first type of static point cloud and the third type of dynamically acquired point cloud, and the V-PCC coding framework can be used for compression of the second type of dynamic point cloud. The G-PCC coding framework is also called point cloud codec TMC13, and the V-PCC coding framework is also called point cloud codec TMC2.

[0069] The embodiment of the present application provides a network architecture of a point cloud coding and decoding system comprising a decoding method and an encoding method, Figure 3 A network architecture of a point cloud coding and decoding provided by the embodiment of the present application is shown in the figure. Figure 3As shown, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic devices can be various types of devices with point cloud encoding and decoding functions. For example, the electronic devices can include mobile phones, tablet computers, personal computers, personal digital assistants, navigators, digital phones, video phones, televisions, sensor devices, servers, etc., and the embodiments of the present application are not limited thereto. Among them, the decoder or encoder in the embodiments of the present application can be the above-mentioned electronic devices.

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

[0071] The following describes point cloud compression technology using the AVS-PCC encoding and decoding framework as an example.

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

[0073] The embodiment of the present application provides a point cloud encoder, such as Figure 4 The figure shows 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. The attribute encoder includes 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.

[0074] For PCRM, in the geometry coding part at the encoding end, first, the original geometry information is preprocessed, the geometry origin is normalized to the minimum position in the point cloud space through the coordinate translation unit 111, and the geometry information is converted from floating point number to integer shape through the coordinate quantization unit 112, so as to facilitate subsequent regularization processing; then the regularized geometry information is geometry coded, the point cloud space is recursively divided by adopting an octree structure in the octree construction unit 113, each time the current node is divided into eight subblocks of the same size, and it is judged whether each subblock contains points or not, when the subblock does not contain points, it is recorded as empty, otherwise it is recorded as non-empty, the occupancy code word information of all blocks is recorded in the last layer of recursive division, and geometry coding is performed; the geometry information expressed by the octree structure is input into the geometry entropy encoder 114 to form a geometry code stream on the one hand, and is input into the geometry reconstruction unit 115 for geometry reconstruction processing on the other hand, and the reconstructed geometry information is input into the attribute encoder as additional information.

[0075] In the attribute coding part, first, the original attribute information is preprocessed, because the geometry information is changed after geometry coding, therefore, the attribute values of each point after geometry coding are redistributed through the attribute recoloring unit 116 to realize attribute recoloring. In addition, if the processed attribute information is color information, the original color information also needs to be color space transformed through the color space transformation unit 117 to be converted into a YUV color space which is more in line with the visual characteristics of the human eye; then the preprocessed attribute information is attribute coded through the first attribute prediction unit 118, and the attribute coding first needs to reorder the point cloud, and the reordering manner is Morton code, therefore the traversal order of the attribute coding is the Morton order. The attribute prediction method in PCRM is a single-point prediction based on the Morton order, that is, a point found by backtracking from the current to-be-coded point (current node) according to the Morton order is the prediction reference point of the current to-be-coded point, then the attribute reconstructed value of the prediction reference point is taken as the attribute prediction value, and the attribute residual value is the difference between the attribute original value of the current to-be-coded point and the attribute prediction value; finally, the attribute residual value is quantized through the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form an attribute code stream.

[0076] The application embodiment further provides a point cloud decoder, as shown in the figure. Figure 5 The figure shows the framework of the point cloud compression reference platform PCRM provided by AVS, the point cloud decoder 12 includes a geometry decoding part: a geometry entropy decoder 121, an octree reconstruction unit 122, a coordinate dequantization unit 123 and a coordinate de-translation unit 124. An attribute decoding part: an attribute entropy decoder 125, a dequantization unit 126, a second attribute prediction unit 127 and a color space inverse transformation unit 128.

[0077] At the decoding end, the geometry and attribute are decoded separately. In the geometry decoding part, the geometry code stream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometry information of each node, and then the octree structure is constructed by the octree reconstruction unit 122 in the same way as the geometry encoding, and the geometry information reconstructed by the octree structure after coordinate transformation is combined to obtain the decoded geometry information. On the one hand, the information is subjected to coordinate dequantization by the coordinate dequantization unit 123 and inverse translation by the coordinate inverse translation unit 124 to obtain the decoded geometry 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 the inverse quantization unit 126 is used for inverse quantization to obtain the attribute residual value; similarly, the attribute prediction value of the current to-be-decoded point is obtained by the second attribute prediction unit 127 in the same way as the attribute encoding, and then the attribute prediction value and the attribute residual value are added to restore the attribute reconstruction value (for example, YUV attribute value) of the current to-be-decoded point; finally, the decoded attribute information is obtained through the color space inverse transformation of the color space inverse transformation unit 128.

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

[0079] (1) There are four kinds of test conditions:

[0080] Condition 1: geometry position limited lossy, attribute lossy;

[0081] Condition 2: geometry position lossless, attribute lossy;

[0082] Condition 3: geometry position lossless, attribute limited lossy;

[0083] Condition 4: geometry position lossless, attribute lossless.

[0084] (2) The general test sequences include Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3, a total of five categories. Among them, Cat1A and Cat2-frame point clouds only contain reflectance attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1C point clouds contain color and reflectance attribute information.

[0085] (3) Implementation: 2 kinds, distinguished by the algorithm used for attribute compression.

[0086] Implementation 1: prediction branch, attribute compression uses a prediction-based method;

[0087] Embodiment 2: Transform branch, attribute compression adopts a transform-based method, which includes two transform algorithms: one is a wavelet transform algorithm, and the other is a k-ary discrete cosine transform (DCT) transform algorithm.

[0088] (4) For the attribute encoding part in point cloud compression, specifically, the intra prediction part, the current node is mainly predicted by referring to the neighboring nodes of the current node. After calculating the attribute residual value according to the attribute prediction value and the attribute original value of the current node, the attribute residual value is transmitted to the decoding end after the processes such as quantization and transform. After receiving and analyzing the code stream, the decoding end obtains the attribute residual value through the steps of inverse transform and inverse quantization. The decoding end obtains the attribute prediction value by predicting in the same process. The attribute prediction value and the attribute residual value are superimposed to obtain the attribute reconstruction value corresponding to the current node.

[0089] Among them, the same operation is implemented at the encoding end and the decoding end to determine the attribute prediction value. The specific attribute prediction process mainly includes the following two kinds:

[0090] The first one is a global search method based on the coding order. Assuming that the current node is Pi, the reference nodes that have been coded / decoded are (P0, P1, …, Pi-1).

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

[0092] If i = 1, P0 is taken as the prediction node;

[0093] If i = 2, P0 and P1 are taken as the prediction nodes;

[0094] If i >= 3, if i < maxNumOfNeighbours, then searchRange = i, otherwise searchRange = maxNumOfNeighbours (where maxNumOfNeighbours is a specific value, for example, 128).

[0095] In this way, the searchRange points before the current node in the Hilbert order, for example, (Pi-searchRange, …, Pi-2, Pi-1), are searched one by one in the Hilbert order, and the k nearest points to the current node are taken as the prediction nodes of the current node. The specific process is as follows:

[0096] (a) When the first three nodes in the Hilbert order of the current node are processed, the three nodes are inserted into the prediction point set in order, and after each node is inserted, the points in the prediction point set are sorted in ascending order 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), so that the distances of the three points after sorting satisfy d1<=d2<=d3. The distance d is calculated by using the Manhattan distance calculation method, which is defined as:

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

[0098] (b) Continue to search for the jth node, and when the number of points in the prediction point set is equal to three, if the distance dj between the jth node and the current node is dj=d3, the jth node is added to the equidistant point set;

[0099] If the distance dj between the jth node and the current node is dj

[0100] (c) Until the point Pi-searchRange is searched, three closest points are obtained as prediction nodes, and at most 13 equidistant points are obtained.

[0101] The second search method is based on the spatial relationship. The geometric relationship (i.e., the spatial relationship) between nodes is used, and the geometric coplanar, collinear, and coincident nodes of the current node are used as prediction nodes. The prediction nodes need to satisfy the condition that they have been encoded / decoded before the current node. Then the weight value is set to the reciprocal of the geometric Manhattan distance between the prediction node and the current node, i.e., the coplanar node weight is 1, the collinear node weight is 1 / 2, and the coincident node weight is 1 / 3. The weighted average value of the attribute reconstruction values of all prediction nodes is the attribute prediction value of the current node (especially, for the first encoded node, there is no reference node for prediction, and the attribute prediction value can be directly set to 0).

[0102] In short, two conditions need to be met: (a) the current node satisfies the coplanar, collinear, and coincident relationship; and (b) the current node has been encoded / decoded before.

[0103] Exemplarily, Figure 6AA distribution diagram of a current node and its coplanar nodes is shown, Figure 6B A distribution diagram of a current node and its collinear nodes is shown, Figure 6C A distribution diagram of a current node and its copoint nodes is shown. As shown, Figures 6A-6C the serial number of the current node O is 7, there are 6 faces, 12 edges, and 8 points. Among them, Figure 6A the coplanar nodes are 3, 5, 6, 14, 21, and 35; in Figure 6B the collinear nodes are 1, 2, 4, 10, 12, 17, 20, 28, 33, 34, 42, and 49; and in Figure 6C the copoint nodes are 0, 8, 16, 24, 32, 40, 48, and 56.

[0104] Among all these coplanar nodes, collinear nodes, and copoint nodes, regardless of the position of the current node, the nodes that may satisfy the "encoded / decoded before the current node" condition include the coplanar nodes 3, 5, and 6, the collinear nodes 1, 2, 4, 10, 12, 17, 20, 33, and 34, and the copoint nodes 0, 8, 16, 24, 32, 40, and 48; therefore, the prediction node will be generated among the coplanar nodes 3, 5, and 6, the collinear nodes 1, 2, 4, 10, 12, 17, 20, 33, and 34, and the copoint nodes 0, 8, 16, 24, 32, 40, and 48.

[0105] However, the search method based on spatial relationship can quickly locate the nodes near the current node, but cannot necessarily find the closest prediction node to the current node, and therefore cannot maximize the accuracy of intra-frame prediction.

[0106] Therefore, the embodiments of the present application provide a coding method. At the encoding end, the serial number of the current node and an initial reference set are determined; based on the distance between the reference nodes in the initial reference set and the current node, the target position corresponding to the maximum distance value in the initial reference set is determined; after the current node is encoded based on the initial reference set, the current node is placed in the target position to obtain a target reference set. At the decoding end, the serial number of the current node and an initial reference set are determined; based on the distance between the reference nodes in the initial reference set and the current node, the target position corresponding to the maximum distance value in the initial reference set is determined; after the current node is decoded based on the initial reference set, the current node is placed in the target position to obtain a target reference set. In this way, the target reference set is constructed by replacing the reference node corresponding to the maximum distance value, and the attribute prediction of the point cloud is performed using the target reference set, which can improve the prediction accuracy of the point cloud attribute and improve the coding performance of the point cloud attribute.

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

[0108] In one embodiment of the present application, see Figure 7 , which shows a flowchart of a decoding method provided by an embodiment of the present application. Figure 7 As shown, the method may include:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0123] S702: Based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set.

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

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

[0126] It should also be noted that, in some embodiments, 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, determining the target position corresponding to the current node in the initial reference set according to a preset decoding order;

[0127] Accordingly, 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] That is to say, if the index number of the current node is greater than or equal to 0 and less than a preset constant value, then after the current node is decoded according to the initial reference set, the current node can be placed in the initial reference set according to the preset decoding order to obtain the target reference set; if the index number of the current node is greater than or equal to the preset constant value, then after the current node is decoded according to the initial reference set, the target position corresponding to the current node in the initial reference set can be determined based on the maximum distance value, and then the current node can be used to replace the reference node at the target position to obtain the target reference set.

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

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

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

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

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

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

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

[0138] That is, 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 of the queue in the initial reference set according to the preset decoding order. 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.

[0139] 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:

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

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

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

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

[0144] 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:

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

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

[0147] 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, obtaining a first number of reference nodes before the current node in a preset decoding order from the initial reference set, and determining the first number of reference nodes as at least one prediction node;

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

[0149] It should be noted that the first number and the second number may be the same or different. For example, the first number may be set to 3, and the second number may be set to k; where k may be a fixed value (e.g., 3) or a range (e.g., 3 to 16), and this embodiment of the application does not specifically limit this.

[0150] It should also be noted that, assuming that the first number is 3, the second number is k, and i represents the index number of the current node, then for the predicted node, if i=0, there is no predicted node; if i=1, the initial reference set includes the 0th node, and the 0th node can be directly determined as the predicted 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 predicted nodes; if i>=3 and i<128, the first 3 reference nodes of the current node in the preset decoding order are obtained from the initial reference set, and these 3 reference nodes are determined as predicted nodes; if i=128, the first 3 reference nodes of the current node in the preset decoding order are obtained from the initial reference set, and these 3 reference nodes are determined as predicted nodes; if i>128, k reference nodes with relatively small distance values ​​from the current node are obtained from the initial reference set, and the k reference nodes are determined as predicted nodes.

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

[0152] A second number of reference nodes having relatively small distances to the current node are obtained from the initial reference set using a global search method; or

[0153] From the initial reference set, a second number of reference nodes having relatively small distances to the current node are obtained by using a spatial relationship search method; or

[0154] A second 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.

[0155] That is to say, in an embodiment of the present application, the second 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., and no specific limitations are given here.

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

[0157] Calculating the distance between each reference node in the initial reference set and the current node, and selecting a second number of distance values ​​with relatively small distance values ​​from the obtained N distance values;

[0158] A second number of reference nodes is determined according to the second number of distance values.

[0159] Accordingly, in some embodiments, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: determining the maximum distance value from the N distance values ​​obtained, and taking the position corresponding to the maximum distance value in the initial reference set as the target position.

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

[0161] It should also be noted that the second number is represented by k. In this way, since the initial reference set includes N reference nodes, N distance values ​​can be calculated; k distance values ​​with relatively small distance values ​​and the maximum distance value are selected from these N distance values, and then the reference nodes determined according to these k distance values ​​are the k reference nodes closest to the current node, which are used as k prediction nodes; the position corresponding to the maximum distance value in the initial reference set is used as the target position to determine the farthest distance point, so that after the decoding is completed, the farthest distance point is replaced with the current node to obtain the target reference set including the current node. It should be noted that "selecting the k distance values ​​with the smallest distance values ​​and the maximum distance value from these N distance values" can be performed simultaneously, but can also be performed at different times, and the embodiments of the present application do not make specific limitations.

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

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

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

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

[0166] Accordingly, in some embodiments, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: determining the maximum distance value from the M distance values ​​obtained, and taking the position corresponding to the maximum distance value in the initial reference set as the target position.

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

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

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

[0170] 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 and the farthest distance point farthest from the current node are determined from these M reference nodes, and these k reference nodes are used as k prediction nodes for attribute prediction. After decoding is completed, the farthest distance point is replaced with the current node to obtain the target reference set including the current node.

[0171] 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:

[0172] If K is less than the second number, calculating the distance values ​​between the reference nodes in the initial reference set and the current node using a global search method, and determining a second number of distance values ​​with relatively small distance values ​​based on a comparison result of the distance value and the K distance values, and determining a second number of reference nodes based on the second number of distance values;

[0173] Accordingly, based on the distance between the reference node in the initial reference set and the current node, determining the target position corresponding to the maximum distance value in the initial reference set includes:

[0174] Determine an initial maximum distance value from the obtained M distance values;

[0175] After calculating the distance value between the reference node in the initial reference set and the current node using a global search method, if the distance between the reference node in the initial reference set and the current node is greater than the initial maximum distance value, then updating the initial maximum distance value;

[0176] The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

[0177] It should be noted that after using the spatial relationship search method to determine the farthest distance points corresponding to the M reference nodes and the initial maximum distance value, 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 satisfied, then it is necessary to enter the global search method, by calculating the distance value between the reference nodes in the initial reference set and the current node, and determining the second 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 fill the k prediction nodes, and at the same time, it is necessary to update the initial maximum distance value to update the farthest distance point; after decoding is completed, the farthest distance point is replaced with the current node to obtain the target reference set including the current node.

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

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

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

[0181] If K2 is equal to the second number, K2 reference nodes are used as the second number of reference nodes, and the initial maximum distance value is used as the maximum distance value;

[0182] If K2 is less than the second 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;

[0183] Calculate the distance between each of the K3 reference nodes and the current node, determine K4 distance values ​​with relatively smaller distance values ​​based on the comparison results of the obtained K3 distance values ​​and the K2 distance values, determine K4 reference nodes based on the K4 distance values, and update the initial maximum distance value based on the K3 distance values;

[0184] If K4 is equal to the second number, then K4 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;

[0185] If K4 is less than the second 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;

[0186] Calculate the distance between each of the K5 reference nodes and the current node, and determine K6 distance values ​​with relatively smaller distance values ​​based on the comparison results of the obtained K5 distance values ​​and the K4 distance values, determine K6 reference nodes based on the K6 distance values, and continue to update the initial maximum distance value based on the K5 distance values;

[0187] If K6 is equal to the second number, K6 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;

[0188] If K6 is less than the second 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, and obtain K7 reference nodes;

[0189] Calculate the distance between each of the K7 reference nodes and the current node, and determine Kg distance values ​​with relatively smaller distance values ​​based on the comparison results of the obtained K7 distance values ​​and the K6 distance values, determine Kg reference nodes based on the Kg distance values, and continue to update the initial maximum distance value based on the K7 distance values;

[0190] If Kg is equal to the second number, then the Kg reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;

[0191] If Kg is less than the second 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 second number of distance values ​​with relatively smaller distance values ​​are determined based on the comparison result between the distance value and the Kg distance values, and a second number of reference nodes are determined based on the second number of distance values;

[0192] Accordingly, based on the distance between the reference node in the initial reference set and the current node, determining the target position corresponding to the maximum distance value in the initial reference set includes:

[0193] After calculating the distance between the reference node in the initial reference set and the current node using a global search method, if the distance between the reference node in the initial reference set and the current node is greater than the initial maximum distance value, then continue to update the initial maximum distance value;

[0194] The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

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

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

[0197] It should also be noted that in the 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 three coplanar neighboring blocks, then these three 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 the second number of reference nodes, then the search will not be continued; if the second number of reference nodes is not satisfied, then search in the second coplanar neighboring block. If the search completes the second number of 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.

[0198] In this way, 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, and determine the farthest distance point corresponding to the initial maximum distance value; if the k prediction nodes are not satisfied, then the second step is to search the child nodes in the coplanar neighboring blocks of the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set, and update the initial maximum distance value to update the farthest distance point; if the k prediction nodes are still not satisfied, then the third step is to search the child nodes in the colinear neighboring blocks of the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set, and update the initial maximum distance value. The farthest distance point is updated by using the initial maximum distance value; if k prediction nodes are still not satisfied, then in the fourth step, the child nodes in the neighboring blocks that have the same points as the parent block of the current node (or the grandparent block of the current node, etc.) can be searched from the initial reference set, and the initial maximum distance value is updated to update the farthest distance point; if the sum of the previous four steps does not satisfy k prediction nodes, then in the fifth step, the global search mode is entered again, and the distance values ​​between the reference nodes in the initial reference set and the current node are calculated to fill the k prediction nodes, while the initial maximum distance value still needs to be updated to update the farthest distance point; after decoding is completed, the farthest distance point is replaced with the current node to obtain the target reference set including the current node.

[0199] 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:

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

[0201] 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:

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

[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] {{0, 1, 0}, {-1, 0, 0}, {0, 0, 1}, {-1, 1, 0}, {-1, 0, 1}, {0, 1, 1}, {-1, 1, 1}},

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

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

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

[0210] {{0, 1, 0}, {1, 0, 0}, {0, 0, 1}, {1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}}

[0211] }

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

[0213] It can be understood that the embodiment of the present application provides a method for predicting point cloud attributes, which combines spatial relationship and global search, and constructs a target reference set by replacing the farthest distance point, so as to perform intra-frame prediction of point cloud attributes, so as to achieve a good compromise between coding efficiency and performance.

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

[0215] Accordingly, the method may further include: after decoding the current node according to the initial reference set, deleting the reference node at the head position in the initial reference set, and placing the current node at the target position to obtain a target reference set.

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

[0217] 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 team in the initial reference set is removed, and the current node is added to the tail of the team; only when entering the global search will the current node be used to replace the farthest distance point to obtain the target reference set.

[0218] 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:

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

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

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

[0222] 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 replacing the farthest distance point with the current node, and reference range 2 is maintained by deleting the farthest distance point 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 a predicted node based on a spatial relationship, a search is performed in reference range 2; when entering a global search to determine a predicted node, a search is performed in reference range 1.

[0223] In addition, in some embodiments, the method may further include:

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

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

[0226] It should be noted that the embodiments of the present application can maintain two reference ranges. If k predicted nodes are found based on spatial relationships, 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 a global search, reference range 1 is maintained by replacing the farthest point with the current node, while reference range 2 is maintained by removing the farthest point and adding the current node to the tail.

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

[0228] The embodiment provides a decoding method, through which the determination of a reference range can be realized. Specifically, the reference range is constructed by replacing the farthest distance point with the current node, and a prediction node is searched in the reference range to perform the intra-frame prediction of the point cloud attribute. The intra-frame prediction accuracy can be improved through global search, and the coding efficiency can be reduced based on the spatial relationship, so that a good compromise between coding efficiency and performance is achieved, thereby improving the coding performance of the point cloud attribute.

[0229] In another embodiment of the present application, referring to Figure 10 , a flowchart of an encoding method provided by the embodiment of the present application is shown.

[0230] As shown in Figure 10 , the method can include:

[0231] S1001: determining an index sequence number corresponding to a current node and an initial reference set.

[0232] It should be noted that the encoding method described in the embodiment of the present application specifically refers to a point cloud encoding method, more specifically, an intra-frame prediction method of a point cloud attribute, which is used to construct a reference range for determining a prediction node. The method can be applied to a point cloud encoder (which can also be referred to as an "encoder" for short).

[0233] It should also be noted that in the embodiment of the present application, the point cloud to be processed includes at least one node. For the nodes in the point cloud to be processed, when the nodes are encoded, they can be used as the nodes to be encoded in the point cloud to be processed, and there are a plurality of encoded nodes around the nodes. Here, the current node is the node to be encoded in the at least one node that needs to be encoded.

[0234] Further, in the 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. Here, the attribute information can be a color component, or reflectivity or other attributes, which are not limited in the embodiment of the present application.

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

[0236] In some embodiments, the preset encoding order can be one of the following: point cloud original order, Morton order, Hilbert order, etc., which are not limited in the embodiment of the present application.

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

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

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

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

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

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

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

[0244] S1002: Based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set.

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

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

[0247] It should also be noted that, in some embodiments, 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, determining the target position corresponding to the current node in the initial reference set according to a preset coding order;

[0248] Accordingly, after encoding the current node according to the initial reference set, placing the current node at the target position may include:

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

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

[0251] That is to say, if the index number of the current node is greater than or equal to 0 and less than a preset constant value, then after the current node is encoded according to the initial reference set, the current node can be placed in the initial reference set according to the preset encoding order to obtain the target reference set; if the index number of the current node is greater than or equal to the preset constant value, then after the current node is encoded according to the initial reference set, the target position corresponding to the current node in the initial reference set can be determined based on the maximum distance value, and then the current node is used to replace the reference node at the target position to obtain the target reference set.

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

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

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

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

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

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

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

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

[0260] It should be noted that when the index number is 0, the initial reference set is empty. At this time, there are no prediction nodes. 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 current node is encoded, it can be placed at the head of the queue in the initial reference set according to the preset encoding order.

[0261] 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:

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

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

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

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

[0266] 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:

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

[0268] If the 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;

[0269] If the at least one prediction node includes at least two prediction nodes, the attribute reconstruction values of the at least two prediction nodes are weightedly averaged to obtain the attribute prediction value corresponding to the current node.

[0270] Here, for the weighted average calculation, in a possible implementation, if the weight values are all set as 1, the weighted average calculation of the attribute reconstruction values of the at least two prediction nodes is actually the average value calculation of the attribute reconstruction values of the at least two prediction nodes.

[0271] It should be further noted that the first quantity and the second quantity can be the same or different. Exemplarily, the first quantity can be set as 3, and the second quantity can be set as k; where k can be a fixed value (for example, 3) or a range (for example, 3-16), and the embodiments of the present application are not limited specifically.

[0272] Further, in some embodiments, in the case that the index sequence number of the current node is greater than a preset constant value, the second quantity of reference nodes with relatively smaller distance values from the current node obtained from the initial reference set can include:

[0273] the second quantity of reference nodes with relatively smaller distance values from the current node are obtained from the initial reference set by using a global search method; or

[0274] the second quantity of reference nodes with relatively smaller distance values from the current node are obtained from the initial reference set by using a spatial relationship search method; or

[0275] the second quantity of reference nodes with relatively smaller distance values from the current node are obtained from the initial reference set by using a spatial relationship depth-first search method.

[0276] In a possible implementation, the second quantity of reference nodes with relatively smaller distance values from the current node obtained by using the global search method can include:

[0277] calculating the distance values between each reference node in the initial reference set and the current node, and selecting the second quantity of distance values with relatively smaller distance values from the obtained N distance values;

[0278] determining the second quantity of reference nodes according to the second quantity of distance values.

[0279] Accordingly, in some embodiments, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: determining the maximum distance value from the N distance values ​​obtained, and taking the position corresponding to the maximum distance value in the initial reference set as the target position.

[0280] It should be noted that the second number is represented by k. Thus, since the initial reference set includes N reference nodes, N distance values ​​can be calculated; k distance values ​​with relatively small distance values ​​and the maximum distance value are selected from these N distance values, and the reference nodes determined based on these k distance values ​​are the k reference nodes closest to the current node, serving as the k prediction nodes; the position corresponding to the maximum distance value in the initial reference set is used as the target position to determine the farthest distance point, so that after encoding is completed, the farthest distance point can be replaced with the current node to obtain the target reference set including the current node.

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

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

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

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

[0285] Accordingly, in some embodiments, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: determining the maximum distance value from the M distance values ​​obtained, and taking the position corresponding to the maximum distance value in the initial reference set as the target position.

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

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

[0288] 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 and the farthest distance point farthest from the current node are determined from these M reference nodes, and these k reference nodes are used as k prediction nodes for attribute prediction. After the encoding is completed, the farthest distance point is replaced with the current node to obtain the target reference set including the current node.

[0289] 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:

[0290] If K is less than the second number, calculating the distance values ​​between the reference nodes in the initial reference set and the current node using a global search method, and determining a second number of distance values ​​with relatively small distance values ​​based on a comparison result of the distance value and the K distance values, and determining a second number of reference nodes based on the second number of distance values;

[0291] Accordingly, based on the distance between the reference node in the initial reference set and the current node, determining the target position corresponding to the maximum distance value in the initial reference set includes:

[0292] Determine an initial maximum distance value from the obtained M distance values;

[0293] After calculating the distance value between the reference node in the initial reference set and the current node using a global search method, if the distance between the reference node in the initial reference set and the current node is greater than the initial maximum distance value, then updating the initial maximum distance value;

[0294] The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

[0295] It should be noted that after using the spatial relationship search method to determine the farthest distance points corresponding to the M reference nodes and the initial maximum distance value, 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 satisfied, then it is necessary to enter the global search method, by calculating the distance value between the reference nodes in the initial reference set and the current node, and determining the second number of distance values ​​with relatively small distance values ​​based on the comparison result of the calculated distance value and the K distance values, so as to fill the k prediction nodes, and at the same time, it is necessary to update the initial maximum distance value to update the farthest distance point; after decoding is completed, the farthest distance point is replaced with the current node to obtain the target reference set including the current node.

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

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

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

[0299] If K2 is equal to the second number, K2 reference nodes are used as the second number of reference nodes, and the initial maximum distance value is used as the maximum distance value;

[0300] If K2 is less than the second 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;

[0301] Calculate the distance between each of the K3 reference nodes and the current node, determine K4 distance values ​​with relatively smaller distance values ​​based on the comparison results of the obtained K3 distance values ​​and the K2 distance values, determine K4 reference nodes based on the K4 distance values, and update the initial maximum distance value based on the K3 distance values;

[0302] If K4 is equal to the second number, then K4 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;

[0303] If K4 is less than the second 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;

[0304] Calculate the distance between each of the K5 reference nodes and the current node, and determine K6 distance values ​​with relatively smaller distance values ​​based on the comparison results of the obtained K5 distance values ​​and the K4 distance values, determine K6 reference nodes based on the K6 distance values, and continue to update the initial maximum distance value based on the K5 distance values;

[0305] If K6 is equal to the second number, K6 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;

[0306] If K6 is less than the second 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, and obtain K7 reference nodes;

[0307] Calculate the distance between each of the K7 reference nodes and the current node, and determine K8 distance values ​​with relatively smaller distance values ​​based on the comparison results of the obtained K7 distance values ​​and the K6 distance values, determine K8 reference nodes based on the K8 distance values, and continue to update the initial maximum distance value based on the K7 distance values;

[0308] If K8 is equal to the second number, K8 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;

[0309] If K8 is less than the second number, calculate the distance value between the reference node in the initial reference set and the current node using a global search method, and determine a second number of distance values ​​with relatively small distance values ​​based on the comparison result of the distance value and the K8 distance values, and determine a second number of reference nodes based on the second number of distance values;

[0310] Accordingly, based on the distance between the reference node in the initial reference set and the current node, determining the target position corresponding to the maximum distance value in the initial reference set includes:

[0311] After calculating the distance between the reference node in the initial reference set and the current node using a global search method, if the distance between the reference node in the initial reference set and the current node is greater than the initial maximum distance value, then continue to update the initial maximum distance value;

[0312] The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

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

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

[0315] It should also be noted that in the 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 three coplanar neighboring blocks, then these three 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 the second number of reference nodes, then the search will not be continued; if the second number of reference nodes is not satisfied, then search in the second coplanar neighboring block. If the search completes the second number of 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.

[0316] In this way, in the spatial relationship depth-first search method, based on the spatial relationship between nodes, the first step can be 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, and determine the farthest distance point corresponding to the initial maximum distance value; if the k prediction nodes are not satisfied, then the second step can be 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, and update the initial maximum distance value to update the farthest distance point; if the k prediction nodes are still not satisfied, then the third step can be to search the child nodes in the colinear neighboring blocks of the parent block of the current node (or the grandparent block of the current node, etc.) from the initial reference set. point, and update the initial maximum distance value to update the farthest distance point; if the k prediction nodes are still not satisfied, then the fourth step can search the initial reference set for the child nodes in the neighboring blocks that have the same points as the parent block of the current node (or the grandparent block of the current node, etc.), and update the initial maximum distance value to update the farthest distance point; if the sum of the previous four steps does not meet the k prediction nodes, then the fifth step enters the global search mode again, by calculating the distance value between the reference node in the initial reference set and the current node, in order to fill the k prediction nodes, and at the same time, it is still necessary to update the initial maximum distance value to update the farthest distance point; after the encoding is completed, the farthest distance point is replaced with the current node to obtain the target reference set including the current node.

[0317] It can be understood that the embodiment of the present application provides a method for predicting point cloud attributes, which combines spatial relationship and global search, and constructs a target reference set by replacing the farthest distance point, so as to perform intra-frame prediction of point cloud attributes, so as to achieve a good compromise between coding efficiency and performance.

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

[0319] Accordingly, the method may further include: after encoding the current node according to the initial reference set, deleting the reference node at the head position in the initial reference set, and placing the current node at the target position to obtain a target reference set.

[0320] In a specific embodiment, if k prediction nodes are searched based on spatial relationships, the current node is encoded, and then the point at the head of the team in the initial reference set is removed, and the current node is added to the tail of the team; only when entering the global search will the current node be used to replace the farthest distance point to obtain the target reference set.

[0321] 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 encoding processing 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.

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

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

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

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

[0326] 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. 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 replacing the farthest distance point with the current node, and reference range 2 is maintained by deleting the farthest distance point 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 a predicted node based on a spatial relationship, a search is performed in reference range 2; when entering a global search to determine a predicted node, a search is performed in reference range 1.

[0327] In addition, in some embodiments, the method may further include:

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

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

[0330] It should be noted that the embodiments of the present application can maintain two reference ranges. If k predicted nodes are found based on spatial relationships, 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 a global search, reference range 1 is maintained by replacing the farthest point 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.

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

[0332] This embodiment provides an encoding method, through which a reference range can be determined. Specifically, a reference range is constructed by replacing the farthest distance point with 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.

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

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

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

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

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

[0338] It should also be noted that Figure 11 The reference range determination process shown 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:

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

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

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

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

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

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

[0345] 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 the reference range in sequence;

[0346] 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 the reference range in sequence;

[0347] 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 is completed, the current node is added to the reference range in order;

[0348] If i>=3 and i<128, directly determine the first three points of the current node as the predicted node. After completing encoding / decoding, add the current node to the reference range in order.

[0349] If i = 128, directly determine the first three points of the current node as the predicted nodes, complete the encoding / decoding, compare the index numbers in descending order (or descending order) within the reference range, determine the point with the farthest distance (Manhattan distance, Euclidean distance, etc.) from the current node among all the nodes in the reference range, and replace the position of the farthest point with the current node, thus completing the operation of adding the current node to the reference range;

[0350] If i>128, then compare the index numbers in descending order (or descending order) 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 and the farthest point among all nodes within the reference range. Use these k points as the predicted nodes of the current node. After encoding / decoding is completed, replace the position of the farthest point with the current node, and the operation of adding the current node to the reference range is completed.

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

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

[0353] 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 the reference range in sequence;

[0354] If i=1, and 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 the reference range in sequence;

[0355] If i=2, P0 and Pl are included in the reference range, and P0 and Pl are directly determined as prediction nodes. After encoding / decoding is completed, the current node is added to the reference range in sequence;

[0356] If i>=3 and i<128, directly determine the first three points of the current node as the predicted node. After completing encoding / decoding, add the current node to the reference range in order.

[0357] If i = 128, the first three points of the current node are directly determined as the prediction nodes, the encoding / decoding is completed, and in the reference range, all nodes are compared in descending (or ascending) order according to the index number to determine the node farthest from the current node (Manhattan distance, Euclidean distance, etc.), and the current node is used to replace the position of the farthest node, that is, the operation of adding the current node to the reference range is completed.

[0358] If i > 128, the parent block of the current node (or the grandparent block of the current node, etc.) and the child nodes in the neighbor block coplanar, collinear, and coincident with the parent block of the current node (or the grandparent block of the current node, etc.) are first searched in the reference range based on the spatial relationship, the k nodes (k can be a fixed value of 3, or a range of 3-16) closest to the current node (Manhattan distance, Euclidean distance, etc.) and the farthest node in these child nodes are determined, if 3-16 prediction nodes are found, the encoding / decoding is completed through these prediction nodes, and the current node is used to replace the position of the farthest node, that is, the operation of adding the current node to the reference range is completed; if 3-16 prediction nodes are not found, the global search mode is entered, 3-16 prediction nodes are supplemented, and the farthest node is updated, the encoding / decoding is completed through these prediction nodes, and the current node is used to replace the position of the farthest node, that is, the operation of adding the current node to the reference range is completed.

[0359] The third embodiment is a depth-first search based on spatial relationship (i.e., a spatial relationship depth-first search mode).

[0360] It is assumed that the current node is Pi, and the reference nodes that have been encoded / decoded are (P0, P1, …, Pi-1).

[0361] 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 color attributes, it can be set to (128, 128, 128); for reflectivity attributes, it can be set to 0), the encoding / decoding is completed, and the current node is sequentially added to the reference range;

[0362] If i = 1, the reference range contains the 0th node P0, P0 is directly determined as the prediction node, the encoding / decoding is completed, and the current node is sequentially added to the reference range;

[0363] If i = 2, the reference range contains P0 and P1, P0 and P1 are directly determined as the prediction nodes, the encoding / decoding is completed, and the current node is sequentially added to the reference range;

[0364] If i >= 3 and i < 128, the first three points of the current node are directly determined as the prediction nodes, the encoding / decoding is completed, and the current node is sequentially added to the reference range.

[0365] If i = 128, directly determine the first three points of the current node as the predicted nodes, complete the encoding / decoding, compare the index numbers in descending order (or descending order) within the reference range, determine the point with the farthest distance (Manhattan distance, Euclidean distance, etc.) from the current node among all the nodes in the reference range, and replace the position of the farthest point with the current node, thus completing the operation of adding the current node to the reference range;

[0366] If i>128, then within the reference range, based on the spatial relationship, first search for the child nodes in the parent block of the current node (or the grandparent block of the current node, etc.), 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 and the farthest point. If 3 to 16 prediction nodes are found, then after encoding / decoding is completed through these prediction nodes, the position of the farthest point is replaced with the current node, and the operation of adding the current node to the reference range is completed. If 3 to 16 prediction nodes are not found, then within the reference range, search for the child nodes in the neighboring blocks that are coplanar with the parent block (or the grandparent block of the current node, etc.) of the current node based on the spatial relationship, fill in the 3 to 16 prediction nodes, and update the farthest point. After encoding / decoding is completed through these prediction nodes, the position of the farthest point is replaced with the current node, and the operation of adding the current node to the reference range is completed. If 3 to 16 prediction nodes are still not found, then search for the child nodes in the neighboring blocks that are coplanar with the parent block (or the grandparent block of the current node, etc.) of the current node based on the spatial relationship, fill in the 3 to 16 prediction nodes, and update the farthest point. After encoding / decoding is completed through these prediction nodes, the position of the farthest point is replaced with the current node, and the operation of adding the current node to the reference range is completed. For the child nodes in the neighboring blocks that are collinear with the parent block (or the grandparent block of the current node, etc.), 3 to 16 prediction nodes are filled and the farthest point is updated. After encoding / decoding is completed using these prediction nodes, the position of the farthest point is replaced with the current node, thereby completing the operation of adding the current node to the reference range. If the first three steps do not find enough 3 to 16 prediction nodes, then the reference range is searched for child nodes in the neighboring blocks that have points in common with the parent block (or the grandparent block of the current node, etc.) based on the spatial relationship, 3 to 16 prediction nodes are filled and the farthest point is updated. After encoding / decoding is completed using these prediction nodes, the position of the farthest point is replaced with the current node, thereby completing the operation of adding the current node to the reference range. If the first four steps do not find enough 3 to 16 prediction nodes, then a global search method is entered to fill 3 to 16 prediction nodes and update the farthest point. After encoding / decoding is completed using these prediction nodes, the position of the farthest point is replaced with the current node, thereby completing the operation of adding the current node to the reference range.

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

[0368] (a) Firstly, according to the position of the current node in the parent block (or grandparent block, etc.), the neighbor blocks coplanar, collinear, or coincident with the parent block (or grandparent block, etc.) are determined, such as Figures 8A to 8H There are eight modes of the position of the current node, Figures 9A to 9H The distribution of the neighbor blocks coplanar, collinear, or coincident in each mode is shown. Taking the Hilbert code (or Morden 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 parent block (or grandparent block, etc.) of the current node, and the corresponding Hilbert code can be calculated by the geometric coordinates. The offset corresponding to the eight modes is described above.

[0369] (b) By comparing the Hilbert code of the nodes in the reference range with the Hilbert code of the neighbor blocks, it can be determined whether the nodes meet the coplanar, collinear, or coincident conditions.

[0370] Briefly, in the embodiments of the present application, the spatial relationship and global search are combined, the reference range is maintained by replacing the farthest distance point, and then the reference range is used for intra prediction of point cloud attributes.

[0371] Further, in the embodiments of the present application, for the second and third embodiments, if 3-16 prediction nodes are found based on the spatial relationship, the encoding / decoding is performed, then the point at the head position in the reference range is removed, the current node is added to the tail position, and only when the global search is entered, the current node replaces the farthest distance point.

[0372] Further, in the embodiments of the present application, for the second and third embodiments, two reference ranges (reference range 1 and reference range 2) can be maintained, and the contents in the reference range 1 and the reference range 2 are consistent, but the orders are inconsistent. The reference range 1 is maintained by replacing the farthest distance point with the current node; and the reference range 2 is maintained by removing the farthest distance point and adding the current node to the tail position. In this way, the nodes in the reference range 2 can be arranged in Hilbert order, which can speed up the search based on the spatial relationship; when the prediction nodes are determined based on the spatial relationship, the search can be performed in the reference range 2.

[0373] Further, in the embodiments of the present application, for the second and third embodiments, if 3-16 prediction nodes are found based on the spatial relationship, the encoding / decoding is performed, then the point at the head position in the reference range 1 and the reference range 2 is removed, the current node is added to the tail position of the reference range 1 and the reference range 2; when the global search is entered, the reference range 1 is maintained by replacing the farthest distance point with the current node, and the reference range 2 is maintained by removing the farthest distance point and adding the current node to the tail position.

[0374] It should be further noted that, at the encoding end, after predicting the current node according to at least one prediction node to obtain an attribute prediction value corresponding to the current node, an attribute residual value can be calculated according to the attribute prediction value and an attribute original value corresponding to the current node, and then the attribute residual value needs to be written into a bitstream for transmission to the decoding end. Therefore, the embodiment of the present application further provides a bitstream, which is generated by bit encoding of to-be-encoded information; wherein the to-be-encoded information at least includes an attribute residual value corresponding to the current node.

[0375] In this way, after the attribute residual value written into the bitstream is transmitted from the encoding end to the decoding end, the decoding end can obtain the attribute residual value after receiving and parsing the bitstream; and then the decoding end can obtain an attribute reconstruction value corresponding to the current node by predicting the attribute prediction value in the same process and adding the attribute prediction value and the attribute residual value.

[0376] Through the above embodiment, the specific implementation of the foregoing embodiment is described in detail, and according to the technical solution of the foregoing embodiment, it can be seen that the technical solution provides a point cloud attribute prediction method, which combines spatial relationship-based and global search, and maintains a reference range by replacing the farthest distance point, can reduce the coding efficiency by the spatial relationship-based, and can improve the intra-frame prediction accuracy by the global search, and a good compromise between coding efficiency and performance is achieved.

[0377] In still another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, referring to Figure 12 which shows a constituent structure schematic diagram of an encoder 120 provided by an embodiment of the present application. As shown in Figure 12 , the encoder 120 can include a first determination unit 1201 and an encoding unit 1202; wherein

[0378] The first determination unit 1201 is configured to determine an index sequence number corresponding to the current node and an initial reference set; and determine a target position corresponding to a maximum distance value in the initial reference set based on the distance between the reference nodes in the initial reference set and the current node;

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

[0380] In some embodiments, the first determination unit 1201 is further configured to determine the target position of the current node in the initial reference set according to the preset encoding order in the case that the index sequence number is greater than or equal to 0 and less than a preset constant value;

[0381] The encoding unit 1202 is further configured to, after encoding the current node according to the initial reference set, place the current node at a target position in the initial reference set directly if the index sequence number is greater than or equal to 0 and less than a preset constant value, and replace a reference node at the target position with the current node if the index sequence number is greater than or equal to the preset constant value.

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

[0383] In some embodiments, the initial reference set is composed of N encoded reference nodes, and accordingly, the first determining unit 1201 is further configured to determine that the value of N is equal to the index sequence number if the index sequence number is greater than or equal to 0 and less than the preset constant value, and determine that the value of N is equal to the preset constant value if the index sequence number is greater than or equal to the preset constant value.

[0384] In some embodiments, referring to Figure 12 , the encoder 120 can further include a first prediction unit 1203 configured to obtain an attribute original value corresponding to the current node, and determine an attribute prediction value corresponding to the current node according to the initial reference set.

[0385] The first determining unit 1201 is further configured to determine an attribute residual value corresponding to the current node according to the attribute original value and the attribute prediction value.

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

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

[0388] In some embodiments, the first prediction unit 1203 is further configured to, if the index sequence number is equal to 0, determine that the initial reference set is an empty set, and determine a preset attribute value as the attribute prediction value corresponding to the current node directly, and if the index sequence 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 according to the at least one prediction node.

[0389] In some embodiments, the first determining unit 1201 is further configured to determine one reference node included in the initial reference set as the at least one prediction node if the index number is equal to 1; determine two reference nodes included in the initial reference set as the at least one prediction node if the index number is equal to 2; obtain the first quantity of reference nodes in the preset coding order from the initial reference set if the index number is greater than or equal to 3 and less than or equal to a preset constant value, and determine the first quantity of reference nodes as the at least one prediction node; and obtain the second quantity of reference nodes with relatively smaller distance values from the initial reference set if the index number is greater than the preset constant value, and determine the second quantity of reference nodes as the at least one prediction node.

[0390] In some embodiments, referring to Figure 12 , the encoder 120 can further include a first searching unit 1204 configured to obtain the second quantity of reference nodes with relatively smaller distance values from the initial reference set by using a global search manner; or obtain the second quantity of reference nodes with relatively smaller distance values from the initial reference set by using a spatial relationship search manner; or obtain the second quantity of reference nodes with relatively smaller distance values from the initial reference set by using a spatial relationship depth-first search manner.

[0391] In some embodiments, the first searching unit 1204 is further configured to calculate the distance values between each reference node in the initial reference set and the current node, select the second quantity of distance values with relatively smaller distance values from the obtained N distance values, and determine the second quantity of reference nodes according to the second quantity of distance values.

[0392] The first determining unit 1201 is further configured to determine the maximum distance value from the obtained N distance values, and take the position corresponding to the maximum distance value in the initial reference set as the target position.

[0393] In some embodiments, the first searching unit 1204 is further configured to search for the reference nodes meeting the preset condition from the initial reference set based on the spatial relationship between the nodes, obtain M reference nodes, calculate the distance values between each reference node in the M reference nodes and the current node, select the K distance values with relatively smaller distance values from the obtained M distance values, and determine the K reference nodes according to the K distance values; and if K is equal to the second quantity, take the K reference nodes as the second quantity of reference nodes.

[0394] The first determining unit 1201 is further configured to determine the maximum distance value from the obtained M distance values, and take the position corresponding to the maximum distance value in the initial reference set as the target position.

[0395] Among them, the reference nodes that meet the preset conditions include at least: sub-nodes in the upper-layer block of the current node, sub-nodes in the neighboring block that is coplanar with the upper-layer block of the current node, sub-nodes in the neighboring block that is colinear with the upper-layer block of the current node, and sub-nodes in the neighboring block that is co-pointed with the upper-layer block of the current node.

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

[0397] The first determination unit 1201 is further configured to determine an initial maximum distance value from the M distance values ​​obtained; and after calculating the distance value between the reference node in the initial reference set and the current node using a global search method, if there is a reference node in the initial reference set and the distance between the current node is greater than the initial maximum distance value, then update the initial maximum distance value; and determine the maximum distance value based on the updated initial maximum distance value, and use the position corresponding to the maximum distance value in the initial reference set as the target position.

[0398] 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 ​​and the initial maximum distance value from the obtained K1 distance values, and determine K2 reference nodes based on the K2 distance values; if K2 is equal to the second number, use the K2 reference nodes as the second number of reference nodes, and use the initial maximum distance value as the maximum distance value; if K2 is less than the second number, continue to search for the reference nodes that are coplanar with the upper block of the current node from the initial reference set. and calculating the distance 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 results of the obtained K3 distance values ​​and the K2 distance values, determining K4 reference nodes based on the K4 distance values, and updating the initial maximum distance value based on the K3 distance values; if K4 is equal to the second number, using the K4 reference nodes as the second number of reference nodes, and using the updated initial maximum distance value as the maximum distance value; if K4 is less than the second number, continuing to search for the child nodes in the neighboring blocks that are collinear with the upper block of the current node from the initial reference set to obtain K5 reference nodes; and calculating K5 The distance value between each reference node in the reference nodes and the current node is determined, and K6 distance values ​​with relatively small distance values ​​are determined based on the comparison results of the obtained K5 distance values ​​and the K4 distance values, K6 reference nodes are determined based on the K6 distance values, and the initial maximum distance value is continued to be updated based on the K5 distance values; if K6 is equal to the second number, the K6 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value; if K6 is less than the second number, the child nodes in the neighboring blocks that have common points with the upper block of the current node are continued to be searched from the initial reference set to obtain K7 reference nodes; and the distance between each reference node in the K7 reference nodes and the current node is calculated. value, 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, determine K8 reference nodes based on the K8 distance values, and continue to update the initial maximum distance value based on the K7 distance value; if K8 is equal to the second number, use the K8 reference nodes as the second number of reference nodes, and use the updated initial maximum distance value as the maximum distance value; if K8 is less than the second number, calculate the distance values ​​between the reference nodes in the initial reference set and the current node by using a global search method, and determine a second number of distance values ​​with relatively small distance values ​​based on the comparison results of the distance values ​​and the K8 distance values, and determine a second number of reference nodes based on the second number of distance values;

[0399] The first determination unit 1201 is further configured to, after calculating the distance value between the reference node in the initial reference set and the current node using a global search method, continue to update the initial maximum distance value if the distance between the reference node and the current node in the initial reference set is greater than the initial maximum distance value; and determine the maximum distance value based on the updated initial maximum distance value, and use the position corresponding to the maximum distance value in the initial reference set as the target position.

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

[0401] In some embodiments, the first determining unit 1201 is further configured to determine the tail position in the initial reference set as the target position 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 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.

[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, if the current node uses a spatial relationship search method or a spatial relationship depth-first search method, 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 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 in the form of 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 part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of 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: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.

[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 above-mentioned composition of the encoder 120 and the computer-readable storage medium, see Figure 13 , which shows a schematic diagram of the specific hardware structure of the encoder 120 provided in the embodiment of the present application. Figure 13As shown, the encoder 120 can 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 communication between the components. In addition to including a data bus, the first bus system 1304 also includes a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the first bus system 1304 in the figure. Figure 13

[0410] Among them,

[0411] The first communication interface 1301 is used for receiving and sending signals in the process of transmitting information with other external network elements;

[0412] The first memory 1302 is used for storing computer programs capable of running on the first processor 1303;

[0413] The first processor 1303 is used for executing the following when running the computer programs:

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

[0415] Determine the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference nodes in the initial reference set and the current node;

[0416] After the current node is encoded by the initial reference set, the current node is placed in the target position to obtain the target reference set.

[0417] ​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.

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

[0419] It is 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 (DSPDevice, 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.

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

[0421] This embodiment provides an encoder in which a target reference set is constructed based on the farthest distance point, 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.

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

[0423] 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 maximum distance value in the initial reference set based on the distance between the reference nodes in the initial reference set and the current node;

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

[0425] In some embodiments, the second determining unit 1401 is further configured to determine the target position corresponding to the current node in the initial reference set according to a preset decoding order when the index number is greater than or equal to 0 and less than a preset constant value;

[0426] The decoding unit 1402 is also configured to, after decoding the current node according to the initial reference set, 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 use the current node to replace the reference node at the target position when the index number is greater than or equal to the preset constant value.

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

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

[0429] In some embodiments, referring to Figure 14 , the decoder 140 can further include a second prediction unit 1403 configured to determine an attribute prediction value corresponding to the current node according to the initial reference set;

[0430] The decoding unit 1402 is further configured to parse the bitstream to determine an attribute residual value corresponding to the current node;

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

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

[0433] In some embodiments, the second prediction unit 1403 is further configured to, if the index sequence number is equal to 0, determine that the initial reference set is an empty set, and directly determine a preset attribute value as the attribute prediction value corresponding to the current node; if the index sequence 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 according to the at least one prediction node.

[0434] In some embodiments, the second determination unit 1401 is further configured to, if the index sequence number is equal to 1, determine one reference node included in the initial reference set as the at least one prediction node; if the index sequence number is equal to 2, determine two reference nodes included in the initial reference set as the at least one prediction node; if the index sequence number is greater than or equal to a preset constant value and less than or equal to a preset constant value, obtain a first number of reference nodes in front of the current node in a preset decoding order from the initial reference set, and determine the first number of reference nodes as the at least one prediction node; if the index sequence number is greater than the preset constant value, obtain a second number of reference nodes with a relatively small distance value from the current node from the initial reference set, and determine the second number of reference nodes as the at least one prediction node.

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

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

[0437] The second determining unit 1401 is further configured to determine a maximum distance value from the obtained N distance values, and use a position corresponding to the maximum distance value in the initial reference set as the target position.

[0438] 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 spatial relationships between nodes to obtain M reference nodes; calculate a 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 the second number, use the K reference nodes as the second number of reference nodes;

[0439] The second determining unit 1401 is further configured to determine a maximum distance value from the obtained M distance values, and use a position corresponding to the maximum distance value in the initial reference set as a target position;

[0440] Among them, the reference nodes that meet the preset conditions include at least: sub-nodes in the upper-layer block of the current node, sub-nodes in the neighboring block that is coplanar with the upper-layer block of the current node, sub-nodes in the neighboring block that is colinear with the upper-layer block of the current node, and sub-nodes in the neighboring block that is co-pointed with the upper-layer block of the current node.

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

[0442] The second determination unit 1401 is further configured to determine an initial maximum distance value from the M distance values ​​obtained; and after calculating the distance value between the reference node in the initial reference set and the current node using a global search method, if there is a reference node in the initial reference set and the distance between the current node is greater than the initial maximum distance value, then update the initial maximum distance value; and determine the maximum distance value based on the updated initial maximum distance value, and use the position corresponding to the maximum distance value in the initial reference set as the target position.

[0443] In some embodiments, the second searching unit 1404 is further configured to search, based on the spatial relationship between the nodes, the child nodes in the neighbor block coplanar with the upper block of the current node from the initial reference set to obtain K1 reference nodes; and calculate the distance value between each of the K1 reference nodes and the current node, select K2 distance values with relatively smaller distance values from the obtained K1 distance values and the initial maximum distance value, and determine K2 reference nodes according to the K2 distance values; if K2 is equal to the second number, the K2 reference nodes are taken as the second number of reference nodes, and the initial maximum distance value is taken as the maximum distance value; if K2 is less than the second number, the child nodes in the neighbor block coplanar with the upper block of the current node are continuously searched from the initial reference set to obtain K3 reference nodes; and the distance value between each of the K3 reference nodes and the current node is calculated, and K4 distance values with relatively smaller distance values are determined according to the comparison result of the obtained K3 distance values and the K2 distance values, K4 reference nodes are determined according to the K4 distance values, and the initial maximum distance value is updated based on the K3 distance values; if K4 is equal to the second number, the K4 reference nodes are taken as the second number of reference nodes, and the updated initial maximum distance value is taken as the maximum distance value; if K4 is less than the second number, the child nodes in the neighbor block collinear with the upper block of the current node are continuously searched from the initial reference set to obtain K5 reference nodes; and the distance value between each of the K5 reference nodes and the current node is calculated, and K6 distance values with relatively smaller distance values are determined according to the comparison result of the obtained K5 distance values and the K4 distance values, K6 reference nodes are determined according to the K6 distance values, and the initial maximum distance value is continuously updated based on the K5 distance values; if K6 is equal to the second number, the K6 reference nodes are taken as the second number of reference nodes, and the updated initial maximum distance value is taken as the maximum distance value; if K6 is less than the second number, the child nodes in the neighbor block copoint with the upper block of the current node are continuously searched from the initial reference set to obtain K7 reference nodes; and the distance value between each of the K7 reference nodes and the current node is calculated, and K8 distance values with relatively smaller distance values are determined according to the comparison result of the obtained K7 distance values and the K6 distance values, K8 reference nodes are determined according to the K8 distance values, and the initial maximum distance value is continuously updated based on the K7 distance values; if K8 is equal to the second number, the K8 reference nodes are taken as the second number of reference nodes, and the updated initial maximum distance value is taken as the maximum distance value; if K8 is less than the second number, the distance value between the reference nodes in the initial reference set and the current node is calculated by using a global search mode, and the second number of distance values with relatively smaller distance values are determined according to the comparison result of the distance values and the K8 distance values, the second number of reference nodes are determined according to the second number of distance values;

[0444] The second determining unit 1401 is further configured to, after calculating the distance value between the reference node in the initial reference set and the current node by using the global search manner, continue to update the initial maximum distance value if there is a reference node in the initial reference set and the distance between the reference node and the current node is greater than the initial maximum distance value; and determine the maximum distance value according to the updated initial maximum distance value, and take the position corresponding to the maximum distance value in the initial reference set as the target position.

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

[0446] In some embodiments, the second determining unit 1401 is further configured to, in a case where the index sequence number is greater than or equal to a preset constant value, determine the tail position in the initial reference set as the target position.

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

[0448] 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, after decoding the current node according to the first initial reference set, obtain a first target reference set; 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, obtain a second target reference set; 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 tail position.

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

[0450] In some embodiments, the second determination unit 1401 is further configured to determine that if the current node uses a spatial relationship search method or a spatial relationship depth-first search method, 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 global search method, 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.

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

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

[0453] Based on the above-mentioned components of the decoder 140 and the computer-readable storage medium, see Figure 15 , which shows a schematic diagram of the specific hardware structure of the decoder 140 provided in the embodiment of the present application. Figure 15 As shown, decoder 140 may include a second communication interface 1501, a second memory 1502, and a second processor 1503. These components are coupled together via a second bus system 1504. It will be appreciated that second bus system 1504 is used to enable communication between these components. In addition to a data bus, second bus system 1504 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in FIG15 , all of these buses are labeled as second bus system 1504.

[0454] in,

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

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

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

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

[0459] Based on the distance between the reference nodes in the initial reference set and the current node, determining the target position corresponding to the maximum distance value in the initial reference set;

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

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

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

[0463] This embodiment provides a decoder, in which a target reference set is constructed based on the farthest distance point, 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.

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

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

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

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

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

[0469] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0470] Industrial Applicability

[0471] In the embodiments of the present application, at the encoding end or the decoding end, the index sequence number corresponding to the current node and the initial reference set are determined; based on the distance between the reference nodes in the initial reference set and the current node, the target position corresponding to the maximum distance value in the initial reference set is determined; after the current node is encoded / decoded by the initial reference set, the current node is placed in the target position to obtain a target reference set. In this way, the target reference set is constructed by replacing the reference node corresponding to the maximum distance value with the current node, and the attribute prediction of the point cloud is performed by using the target reference set, which can improve the prediction accuracy of the point cloud attribute and improve the coding and decoding performance of the point cloud attribute.

Claims

1. A decoding method, applied to a decoder, comprising: Determine the index number and initial reference set corresponding to the current node; Determining, based on the distances between the reference nodes in the initial reference set and the current node, a target position corresponding to a maximum distance value in the initial reference set; 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 The method further comprises: When the index number is greater than or equal to 0 and less than a preset constant value, determining a target position corresponding to the current node in the initial reference set according to a preset decoding order; Accordingly, 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 and less than or equal to a preset constant value, obtaining a first number of reference nodes preceding the current node in a preset decoding order from the initial reference set, and determining the first number of reference nodes as the at least one prediction node; If the index number is greater than a preset constant value, a second number of reference nodes having relatively small distances to the current node are obtained from the initial reference set, and the second 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 second number of reference nodes having relatively small distance values ​​to the current node, comprises: Acquire a second number of reference nodes having relatively small distances to the current node from the initial reference set using a global search method; or Acquire a second number of reference nodes having relatively small distances to the current node from the initial reference set by using a spatial relationship search method; or A second 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 acquiring a second number of reference nodes having relatively small distances to the current node by using a global search method includes: Calculating the distance value between each reference node in the initial reference set and the current node, and selecting a second number of distance values ​​with relatively small distance values ​​from the obtained N distance values; determining the second number of reference nodes according to the second number of distance values; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: The maximum distance value is determined from the obtained N distance values, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

11. The method according to claim 9, wherein The acquiring a second 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 second number, using the K reference nodes as the second number of reference nodes; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: Determine the maximum distance value from the obtained M distance values, and use the position corresponding to the maximum distance value in the initial reference set as the target position; 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 less than the second number, calculating the distance values ​​between the reference nodes in the initial reference set and the current node using a global search method, and determining a second number of distance values ​​with relatively smaller distance values ​​based on a comparison result of the distance values ​​with the K distance values, and determining the second number of reference nodes based on the second number of distance values; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: Determine an initial maximum distance value from the obtained M distance values; After calculating the distance between the reference node in the initial reference set and the current node using a global search method, if there is a reference node in the initial reference set with a distance between the current node greater than the initial maximum distance value, updating the initial maximum distance value; The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

13. The method according to claim 9, wherein: The acquiring a second 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 the distance between each of the K1 reference nodes and the current node, selecting K2 distance values ​​with relatively smaller distance values ​​and an initial maximum distance value from the obtained K1 distance values, and determining the K2 reference nodes according to the K2 distance values; If K2 is equal to the second number, using the K2 reference nodes as the second number of reference nodes and using the initial maximum distance value as the maximum distance value; If K2 is less than the second number, continue searching the initial reference set for child nodes in neighboring blocks coplanar with the upper-layer block of the current node to obtain K3 reference nodes; Calculating a distance value 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, determining K4 reference nodes based on the K4 distance values, and updating the initial maximum distance value based on the K3 distance values; If K4 is equal to the second number, using the K4 reference nodes as the second number of reference nodes, and using the updated initial maximum distance value as the maximum distance value; If K4 is less than the second 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 a distance value 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, determining K6 reference nodes based on the K6 distance values, and continuing to update the initial maximum distance value based on the K5 distance values; If K6 is equal to the second number, using the K6 reference nodes as the second number of reference nodes, and using the updated initial maximum distance value as the maximum distance value; If K6 is less than the second 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 a distance value 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, determining K8 reference nodes based on the K8 distance values, and continuing to update the initial maximum distance value based on the K7 distance values; If K8 is equal to the second number, using the K8 reference nodes as the second number of reference nodes, and using the updated initial maximum distance value as the maximum distance value; If K8 is less than the second number, calculating the distance between the reference nodes in the initial reference set and the current node using a global search method, and determining a second number of distance values ​​with relatively smaller distance values ​​based on a comparison result of the distance value and the K8 distance values, and determining the second number of reference nodes based on the second number of distance values; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: After calculating the distance value between the reference node in the initial reference set and the current node by using a global search method, if the distance between the reference node in the initial reference set and the current node is greater than the initial maximum distance value, then continuing to update the initial maximum distance value; The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

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 method further comprises: When the index number is greater than or equal to a preset constant value, determining the tail position in the initial reference set as the target position; Correspondingly, the method further includes: after decoding the current node according to the initial reference set, deleting the reference node at the head position in the initial reference set, and placing the current node at the target position to obtain the target reference set.

16. 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.

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

18. The method according to claim 16, 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.

19. A coding method, applied to an encoder, comprising: Determine the index number and initial reference set corresponding to the current node; Determining, based on the distance between the reference nodes in the initial reference set and the current node, a target position corresponding to a maximum distance value in the initial reference set; 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.

20. The method according to claim 19, wherein The method further comprises: When the index number is greater than or equal to 0 and less than a preset constant value, determining a target position corresponding to the current node in the initial reference set according to a preset coding order; Accordingly, 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.

21. The method according to claim 20, 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.

22. The method according to claim 20, 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.

23. The method according to claim 22, 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.

24. The method according to claim 23, 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.

25. The method according to claim 23, 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.

26. The method according to claim 25, 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 and less than or equal to a preset constant value, obtaining a first number of reference nodes preceding the current node in a preset coding order from the initial reference set, and determining the first number of reference nodes as the at least one prediction node; If the index number is greater than a preset constant value, a second number of reference nodes having relatively small distances to the current node are obtained from the initial reference set, and the second number of reference nodes are determined as the at least one prediction node.

27. The method according to claim 26, wherein The acquiring, from the initial reference set, a second number of reference nodes having relatively small distance values ​​to the current node, comprises: Acquire a second number of reference nodes having relatively small distances to the current node from the initial reference set using a global search method; or Acquire a second number of reference nodes having relatively small distances to the current node from the initial reference set by using a spatial relationship search method; or A second 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.

28. The method according to claim 27, wherein The acquiring a second number of reference nodes having relatively small distances to the current node by using a global search method includes: Calculating the distance value between each reference node in the initial reference set and the current node, and selecting a second number of distance values ​​with relatively small distance values ​​from the obtained N distance values; determining the second number of reference nodes according to the second number of distance values; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: The maximum distance value is determined from the obtained N distance values, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

29. The method according to claim 27, wherein The acquiring a second 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 second number, using the K reference nodes as the second number of reference nodes; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: Determine the maximum distance value from the obtained M distance values, and use the position corresponding to the maximum distance value in the initial reference set as the target position; 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.

30. The method according to claim 29, wherein The method further comprises: If K is less than the second number, calculating the distance values ​​between the reference nodes in the initial reference set and the current node using a global search method, and determining a second number of distance values ​​with relatively smaller distance values ​​based on a comparison result of the distance values ​​with the K distance values, and determining the second number of reference nodes based on the second number of distance values; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: Determine an initial maximum distance value from the obtained M distance values; After calculating the distance between the reference node in the initial reference set and the current node using a global search method, if there is a reference node in the initial reference set with a distance between the current node greater than the initial maximum distance value, updating the initial maximum distance value; The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

31. The method of claim 27, wherein: The acquiring a second 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 the distance between each of the K1 reference nodes and the current node, selecting K2 distance values ​​with relatively smaller distance values ​​and an initial maximum distance value from the obtained K1 distance values, and determining the K2 reference nodes according to the K2 distance values; If K2 is equal to the second number, using the K2 reference nodes as the second number of reference nodes and using the initial maximum distance value as the maximum distance value; If K2 is less than the second number, continue searching the initial reference set for child nodes in neighboring blocks coplanar with the upper-layer block of the current node to obtain K3 reference nodes; Calculating a distance value 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, determining K4 reference nodes based on the K4 distance values, and updating the initial maximum distance value based on the K3 distance values; If K4 is equal to the second number, using the K4 reference nodes as the second number of reference nodes, and using the updated initial maximum distance value as the maximum distance value; If K4 is less than the second 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 a distance value 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, determining K6 reference nodes based on the K6 distance values, and continuing to update the initial maximum distance value based on the K5 distance values; If K6 is equal to the second number, using the K6 reference nodes as the second number of reference nodes, and using the updated initial maximum distance value as the maximum distance value; If K6 is less than the second 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 a distance value 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, determining K8 reference nodes based on the K8 distance values, and continuing to update the initial maximum distance value based on the K7 distance values; If K8 is equal to the second number, using the K8 reference nodes as the second number of reference nodes, and using the updated initial maximum distance value as the maximum distance value; If K8 is less than the second number, calculating the distance between the reference nodes in the initial reference set and the current node using a global search method, and determining a second number of distance values ​​with relatively smaller distance values ​​based on a comparison result of the distance value and the K8 distance values, and determining the second number of reference nodes based on the second number of distance values; Accordingly, determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node includes: After calculating the distance value between the reference node in the initial reference set and the current node by using a global search method, if the distance between the reference node in the initial reference set and the current node is greater than the initial maximum distance value, then continuing to update the initial maximum distance value; The maximum distance value is determined according to the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.

32. The method according to any one of claims 29 to 31, 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.

33. The method of claim 19, wherein: The method further comprises: When the index number is greater than or equal to a preset constant value, determining the tail position in the initial reference set as the target position; Correspondingly, the method further includes: after encoding the current node according to the initial reference set, deleting the reference node at the head position in the initial reference set, and placing the current node at the target position to obtain the target reference set.

34. The method of claim 19, 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.

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

36. The method of claim 34, 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.

37. A method for transmitting a code stream, characterized in that: Execute the encoding method according to any one of claims 19 to 36 to generate a code stream; and transmit the code stream.

38. An encoder, comprising a first determining unit and an encoding unit; wherein: The first 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 a maximum distance value in the initial reference set based on the distance between the reference nodes in the initial reference set and the current node; 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.

39. 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 19 to 36 when running the computer program.

40. 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, based on the distance between the reference nodes in the initial reference set and the current node, a target position corresponding to a maximum distance value in the initial reference set; 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.

41. 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 18 when running the computer program.

42. 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 18 or the method according to any one of claims 19 to 36 is implemented.

Citation Information

Patent Citations

  • Coding method and decoding method of point cloud attribute information, storage medium and terminal equipment

    CN111405281A

  • Coding method, device, decoding method, device, equipment and readable storage medium

    CN113766229A