Point cloud encoding method and apparatus, point cloud decoding method and apparatus, and electronic device

By slicing point cloud frames and applying conditional motion compensation, the problem of low efficiency in point cloud encoding and decoding is solved, achieving a more efficient encoding and decoding process.

WO2025011442A9PCT designated stage expired Publication Date: 2026-02-19VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/103742
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-12
Filing Date
2024-07-05
Publication Date
2026-02-19

AI Technical Summary

Technical Problem

Existing technologies have low point cloud encoding and decoding efficiency, especially in inter-frame predictive coding, which requires motion compensation of all point cloud slices of the point cloud frame to be encoded, resulting in low efficiency.

Method used

The point cloud frame to be encoded is divided into multiple point cloud slices. Motion compensation is performed on the target point cloud slices under the condition of satisfying motion compensation. Inter-frame predictive coding or decoding is only performed on slices that meet the conditions.

Benefits of technology

By determining whether motion compensation should be performed for each point cloud slice, the coding redundancy caused by motion compensation judgment at the point cloud frame level is reduced, and the efficiency of point cloud encoding and decoding is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103742_19022026_PF_FP_ABST
    Figure CN2024103742_19022026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of encoding and decoding, and discloses a point cloud encoding method and apparatus, a point cloud decoding method and apparatus, and an electronic device. The point cloud encoding method in embodiments of the present application comprises: performing point cloud division processing on a target point cloud frame of a point cloud to be encoded, so as to obtain a plurality of point cloud slices (101); when it is determined that a target point cloud slice meets a first motion compensation condition, performing motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice (102), the target point cloud slice being a point cloud slice among the plurality of point cloud slices; and performing inter-frame prediction coding on the target point cloud slice on the basis of the compensated reference point cloud slice (103).
Need to check novelty before this filing date? Find Prior Art

Description

Point cloud encoding method, point cloud decoding method, device and electronic equipment

[0001] Cross-reference to related applications

[0002] The present application claims priority to Chinese Patent Application No. 202310853877.4, filed on July 12, 2023, the contents of which are incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present application belongs to the field of coding and decoding technology, and specifically relates to a point cloud encoding method, a point cloud decoding method, a device and an electronic equipment. BACKGROUND

[0004] A point cloud is a form of representation of a three-dimensional object or scene, which is composed of a set of discrete points that are irregularly distributed in space and express the spatial structure and surface attributes of the three-dimensional object or scene. In order to accurately reflect the information in space, a large number of discrete points are required. In order to reduce the bandwidth occupied by point cloud data storage and transmission, the point cloud data needs to be encoded and compressed. The point cloud data is usually composed of geometric information (such as three-dimensional coordinates (x, y, z)) describing the position and attribute information (such as color (R, G, B)) or reflectivity of the position. In the process of point cloud encoding and compression, the encoding of the geometric information and the attribute information is carried out separately.

[0005] In related technologies, in the process of inter-frame prediction encoding of a point cloud, if motion compensation is enabled for a to-be-encoded point cloud frame, motion compensation needs to be performed on all point cloud slices of the to-be-encoded point cloud frame, resulting in low point cloud encoding and decoding efficiency.

[0006] SUMMARY

[0007] The embodiments of the present application provide a point cloud encoding method, a point cloud decoding method, a device and an electronic equipment, which can solve the problem of low point cloud encoding and decoding efficiency.

[0008] In a first aspect, a point cloud encoding method is provided, which is executed by an encoding end and includes the following steps.

[0009] performing point cloud division processing on a target point cloud frame of a to-be-encoded point cloud to obtain a plurality of point cloud slices;

[0010] in a case where it is determined that a target point cloud slice meets a first motion compensation condition, performing motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices;

[0011] performing inter-frame prediction encoding on the target point cloud slice based on the compensated reference point cloud slice.

[0012] In a second aspect, a point cloud decoding method is provided, which is performed by a decoding end and includes the following steps.

[0013] performing point cloud partitioning processing on a target point cloud frame of a to-be-decoded point cloud to obtain a plurality of point cloud slices;

[0014] when it is determined that the target point cloud slice enables motion compensation, performing motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices;

[0015] performing inter-frame prediction decoding on the target point cloud slice based on the compensated reference point cloud slice.

[0016] In a third aspect, a point cloud encoding apparatus is provided, which includes the following modules:

[0017] a partitioning module, configured to perform point cloud partitioning processing on a target point cloud frame of a to-be-encoded point cloud to obtain a plurality of point cloud slices;

[0018] a first compensation module, configured to, when it is determined that a target point cloud slice meets a first motion compensation condition, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices;

[0019] a first encoding module, configured to perform inter-frame prediction encoding on the target point cloud slice based on the compensated reference point cloud slice.

[0020] In a fourth aspect, a point cloud decoding apparatus is provided, which includes the following modules:

[0021] a partitioning module, configured to perform point cloud partitioning processing on a target point cloud frame of a to-be-decoded point cloud to obtain a plurality of point cloud slices;

[0022] a first compensation module, configured to, when it is determined that the target point cloud slice enables motion compensation, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices;

[0023] a first decoding module, configured to perform inter-frame prediction decoding on the target point cloud slice based on the compensated reference point cloud slice.

[0024] In a fifth aspect, an electronic device is provided, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, the program or instructions being executed by the processor to implement the steps of the method according to the first aspect, or the program or instructions being executed by the processor to implement the steps of the method according to the second aspect.

[0025] In a sixth aspect, an electronic device is provided, including a processor and a communication interface, wherein the processor is configured to: perform point cloud partitioning processing on a target point cloud frame of a point cloud to be encoded to obtain a plurality of point cloud slices; in a case where it is determined that a target point cloud slice satisfies a first motion compensation condition, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; and perform inter-frame predictive encoding on the target point cloud slice based on the compensated reference point cloud slice.

[0026] In a seventh aspect, an electronic device is provided, including a processor and a communication interface, wherein the processor is configured to: perform point cloud partitioning processing on a target point cloud frame of a point cloud to be decoded to obtain a plurality of point cloud slices; in a case where it is determined that the target point cloud slice enables motion compensation, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; and perform inter-frame predictive decoding on the target point cloud slice based on the compensated reference point cloud slice.

[0027] In an eighth aspect, a readable storage medium is provided, the readable storage medium storing a program or instructions, the program or instructions being executed by a processor to implement the steps of the point cloud encoding method according to the first aspect, or the program or instructions being executed by a processor to implement the steps of the point cloud decoding method according to the second aspect.

[0028] In a ninth aspect, a chip is provided, the chip including a processor and a communication interface, the communication interface and the processor being coupled, the processor being configured to run a program or instructions to implement the steps of the method according to the first aspect, or to implement the steps of the method according to the second aspect.

[0029] In a tenth aspect, a computer program / program product is provided, the computer program / program product being stored in a non-volatile storage medium, the program / program product being executed by at least one processor to implement the steps of the method according to the first aspect, or to implement the steps of the method according to the second aspect.

[0030] In the embodiment of the present application, the target point cloud frame to be encoded is subjected to point cloud division processing to obtain a plurality of point cloud slices; in a case where it is determined that a target point cloud slice satisfies a first motion compensation condition, a reference point cloud slice corresponding to the target point cloud slice is subjected to motion compensation to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; and the target point cloud slice is subjected to inter-frame predictive encoding based on the compensated reference point cloud slice. In this way, in a case where it is determined that a target point cloud slice satisfies a first motion compensation condition, the reference point cloud slice corresponding to the target point cloud slice is subjected to motion compensation, it is determined whether to perform motion compensation for each point cloud slice, and encoding redundancy caused by point cloud frame-level motion compensation judgment is reduced, so that point cloud encoding and decoding efficiency can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0031] FIG. 1 is a G-PCC encoder framework diagram in the related art;

[0032] FIG. 2 is a G-PCC decoder framework diagram in the related art;

[0033] FIG. 3 is a point cloud frame schematic diagram provided by an embodiment of the present application;

[0034] FIG. 4 is a schematic diagram of a node correspondence relationship in a reference frame and a current frame in the related art;

[0035] FIG. 5 is a schematic diagram of an octree-based geometry coding inter-frame prediction in the related art;

[0036] FIG. 6 is a schematic diagram of global motion compensation in the related art;

[0037] FIG. 7 is a schematic diagram of point cloud bounding box different height region division in the related art;

[0038] FIG. 8 is a schematic diagram of local motion compensation in the related art;

[0039] FIG. 9 is a schematic diagram of encoding end local motion compensation in the related art;

[0040] FIG. 10 is a schematic diagram of a search window of a reference frame and a current frame in the related art;

[0041] FIG. 11 is a schematic diagram of LPU division in the related art;

[0042] FIG. 12 is a schematic diagram of decoding end local motion compensation in the related art;

[0043] FIG. 13 is a flowchart of a point cloud encoding method provided by an embodiment of the present application;

[0044] FIG. 14 is a flowchart of a point cloud decoding method provided by an embodiment of the present application;

[0045] FIG. 15 is a structural schematic diagram of a point cloud encoding apparatus provided by an embodiment of the present application;

[0046] FIG. 16 is a structural schematic diagram of a point cloud decoding apparatus provided by an embodiment of the present application;

[0047] FIG. 17 is a structural diagram of an electronic device provided by an embodiment of the present application;

[0048] FIG. 18 is a structural diagram of a terminal provided by an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0050] The terms "first", "second", and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second" are generally a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in the present application means at least one of the connected objects. For example, "A or B" covers three schemes, namely, scheme one: including A and not including B; scheme two: including B and not including A; scheme three: including A and including B. The character " / " generally represents that the objects before and after are in an "or" relationship.

[0051] The term "indication" in the present application can be a direct indication (or explicit indication) or an indirect indication (or implicit indication). The direct indication can be understood as that the sender explicitly informs the receiver of specific information, operations to be performed or requested results, etc. in the indication sent by the sender. The indirect indication can be understood as that the receiver determines the corresponding information according to the indication sent by the sender, or judges and determines the operations to be performed or the requested results according to the judgment result.

[0052] The terminal can be a mobile phone, a tablet personal computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a personal digital assistant (Personal Digital Assistant, PDA), a palm computer, a netbook, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device (Wearable Device), or a vehicle user equipment (Vehicle User Equipment, VUE), a pedestrian terminal (Pedestrian User Equipment, PUE), and the like. The wearable device includes a smart watch, a bracelet, earphones, glasses, and the like. It should be noted that the specific type of the terminal is not limited in the embodiments of the present application.

[0053] For the convenience of understanding, some contents related to the embodiments of the present application are described as follows:

[0054] 1. Geometry coding

[0055] As shown in FIG. 1 and FIG. 2, in the geometry point cloud compression (Geometry Point Cloud Compression, G-PCC) encoder framework, the geometry information and the attribute information are encoded separately. The geometry coding of the G-PCC can be divided into: octree-based geometry coding, triangle soup (Triangle Soup, Trisoup)-based geometry coding, and prediction tree-based geometry coding.

[0056] 1.1. Octree-based geometry coding

[0057] Encoding: Firstly, coordinate transformation is performed on the geometry information so that all point clouds are contained in a bounding box. Then quantization (scaling of point clouds), rounding, and removal of duplicate points are performed. Due to quantization rounding, the geometry information of a part of the points is the same, i.e. a part of the points are duplicate points, and whether to remove the duplicate points is determined according to a parameter. Next, the bounding box is continuously divided into a tree (octree / quaternary tree / binary tree) in the order of breadth-first traversal, and an eight-bit placeholder code is used to represent whether each sub-node has a point occupying it. The placeholder code obtained by the division is encoded, and the non-empty (containing points in the point cloud) sub-nodes are continuously divided until the leaf nodes obtained by the division are unit cubes with a size of 1x1x1, and then the number of points contained in the leaf nodes is encoded. Finally, the geometry multi-tree encoding is completed, and a binary code stream is generated.

[0058] Decoding: At the decoding end, the placeholder code of each node is continuously parsed in the order of breadth-first traversal, and the nodes are continuously divided in turn until the division stops when a unit cube with a size of 1x1x1 is obtained. The number of points contained in each leaf node is parsed, and finally the geometry reconstruction point cloud information is recovered.

[0059] 1.2, Trisoup-based geometry encoding and decoding

[0060] Encoding: Firstly, an octree is divided. Unlike the geometry information encoding based on the octree structure, this method does not need to divide the point cloud to the bottom leaf nodes with an edge length of 1x1x1, but divides the leaf nodes with a specified edge length. Then the surface information formed by the nodes is represented by a series of triangle meshes. In GPCC, the block size of the triangle patch is represented by the parameter trisoup node size. When trisoup node size is greater than 0, a geometry patch is used to represent the voxel set in the node, and at most twelve intersection points generated by the twelve edges of the block and the geometry patch are called vertices. The vertex coordinates of each block are encoded in turn to generate a binary code stream.

[0061] Decoding: In order to decode the geometry coordinates of the point cloud from the node triangle patch, it is necessary to check whether each voxel in the node cube intersects with the triangle patch. This technique is called triangle rasterization, and six unit vectors (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1) are used for intersection test. If the unit vectors intersect with the triangle patch, the intersection point is calculated and the decoded cube is output. The number of points generated in the decoder is determined by the grid distance d.

[0062] 1.3 Geometry coding based on prediction tree

[0063] Encoding: Firstly, the input point cloud is sorted, and the currently used sorting methods include unordered, Morton order, azimuth order and radial distance order. At the encoding end, a prediction tree structure is established by using two different ways, including: K-dimensional Tree (KD-Tree) (i.e. high latency slow mode) and using the laser radar calibration information to divide each point into different lasers, and a prediction structure is established according to different lasers (i.e. low latency fast mode). Next, based on the structure of the prediction tree, each node in the prediction tree is traversed, and the geometry position information of the node is predicted by selecting different prediction modes to obtain the prediction residual, and the geometry prediction residual is quantized by using the quantization parameter. Finally, by continuously iterating, the prediction residual of the position information of the prediction tree node, the prediction tree structure and the quantization parameter are encoded, and a binary code stream is generated.

[0064] Decoding: At the decoding end, the prediction tree structure is reconstructed by continuously parsing the code stream, and then the geometry position prediction residual information and the quantization parameter of each prediction node are obtained by parsing, and the prediction residual is dequantized to recover the reconstructed geometry position information of each node, and finally the geometry reconstruction at the decoding end is completed.

[0065] 2. Inter-frame prediction

[0066] Entropy coding is widely used in G-PCC, which is a coding or decoding method based on local context adaptive selection of probability model. When the local context of coding changes, the state of the encoder / decoder engine also changes. According to different contexts, the corresponding coding process is carried out, so that the probability model becomes more effective when coding.

[0067] Purpose of inter-frame prediction:

[0068] Since dynamic point cloud can have high correlation in time and space, as shown in Fig. 3, the left is the point cloud of frame F, and the right is the point cloud of frame F+1. The white filled part on the body of the person is the similar part in the two frames of point cloud, and in each point cloud, there are also many similar parts. Therefore, inter-frame prediction can be used to eliminate the redundant information in the time domain of the multi-frame point cloud sequence.

[0069] In the encoding of the placeholder code obtained by multi-tree partitioning, the inter-frame prediction information is used as the context to encode the placeholder code. The inter-frame prediction process is located in the multi-tree geometry coding process. Specifically, the reference frame is also divided into multi-trees according to the above description, as shown in Fig. 4, which is shown in two dimensions. Let the node in the reference frame which has the same spatial position as the current node in the current frame according to the Morton code order be node refIf partitioning nodes ref If any of the obtained child nodes i (there are eight child nodes, and i takes values ​​from 0 to 7) have a point, then predOccupancy[i] is 1, meaning that the current frame node i is predicted to be occupied. If the node is divided... ref If the number of points in the obtained child node i is greater than the threshold th, then predOccupancyStrong[i] is 1, which means that the current frame node i is predicted to be strongly occupied (the current frame child node i is very likely to be occupied). The obtained predOccupancy[i] and predOccupancyStrong[i] are used as context information to encode whether the current frame child node i is occupied.

[0070] Utilization of inter-frame information:

[0071] The predicted node placeholder code can be obtained directly from the reference frame point cloud or from the compensated point cloud, depending on whether the current node has undergone motion compensation.

[0072] As shown in Figure 5, based on the occupancy of the prediction nodes, the inter-frame prediction information is divided into the following categories:

[0073] (a) No pred: When the predated node placeholder code is zero (bP=0), that is, none of its child nodes are occupied, inter-frame prediction information is not used.

[0074] (b)Pred0: When the predicted child node i is empty, the predicted child node i is not occupied by bPi = 0.

[0075] (c)Pred1: When the predicted child node i is not empty, the predicted child node i is to occupy bPi = 1; at this time, there are two cases depending on the number of points contained in the node:

[0076] predL = 1: When the predicted child node i is not empty and the number of points in it exceeds the threshold th, the child node i is strongly predicted to be occupied.

[0077] predL = 0: When the predicted child node i is not empty and the number of points in it does not exceed the threshold th, the child node i is not strongly predicted.

[0078] Before inter-frame prediction, motion compensation is performed on the reference frame to reduce the difference between the reference frame and the current frame, resulting in more accurate prediction information. Currently, there are two compensation methods: global motion compensation and local motion compensation.

[0079] 2.1 Global Motion Compensation in G-PCC

[0080] Conditions for enabling global motion compensation:

[0081] If the current frame is a non-independently coded frame (I-frame), the global motion compensation is performed only when the inter prediction is enabled and the global motion compensation is enabled.

[0082] As shown in Fig. 6: When the gps layer inter prediction enabled flag gps.interPredictionEnabledFlag is true and the current frame is a non-independently coded frame (e.g. I-frame), the gbh layer inter prediction enabled flag gbh.interPredictionEnabledFlag is true, otherwise false. When gbh.interPredictionEnableFlag is false, no reference frame (or slice) is generated to generate inter information as context to encode the current frame (or slice); when gbh.interPredictionEnableFlag is true, according to gps.globalMotionEnabled to determine whether to compensate the reference frame (or slice) to generate inter information as context to encode the current frame (or slice).

[0083] Encoding end global motion compensation algorithm:

[0084] (a) Acquisition and use of global motion compensation matrix

[0085] Before the point cloud is divided by the multi-tree, according to the parameter params.motionSrc, the global motion compensation matrix (rotation matrix + translation vector) is directly obtained from the outside or calculated from the reference frame and the current frame by using the least mean square (LMS) algorithm, and the global motion compensation matrix is encoded in the gbh layer. The global motion compensation matrix is used to compensate the reference frame to obtain the compensated reference frame. After the global motion compensation of the reference frame, the compensated reference frame is obtained (the points (X, Y, Z) in the reference frame are rotated and translated to obtain the compensated points (X', Y', Z')). The calculation formula is as follows:

[0086] wherein, is a rotation matrix, is a translation vector.

[0087] (b) Compensate the reference frame

[0088] There are two ways to compensate, according to the parameter params.lpuType.

[0089] One is to compensate the points in the reference frame which are determined as not road points, and the compensated reference frame is obtained. When the Z component in the point (X, Y, Z) in the reference point cloud satisfies the following relationship: gbh.gm_thresh.second < Z < gbh.gm_thresh.first, the point is determined as a road point.

[0090] One is to compensate or not compensate the regions with different heights based on the rate-distortion optimization (RDO) according to the Z value (according to the parameter configuration), as shown in FIG. 7, and the compensated reference frame is obtained.

[0091] When encoding the node placeholder code of the current frame, the context is constructed according to the prediction information obtained from the compensated reference frame to encode the placeholder code of the current node.

[0092] The global motion compensation algorithm at the decoding end is as follows:

[0093] Before decoding the placeholder code of each node, the global motion compensation matrix obtained by decoding the gbh layer is used to compensate the reference frame. There are two compensation methods, and one is to compensate the points in the reference frame which are determined as not road points, and the other is to compensate or not compensate the regions with different heights based on the RDO result at the encoding end according to the Z value (according to the parameter configuration).

[0094] When decoding the node placeholder code, the context is constructed according to the information of the compensated reference frame to decode the placeholder code of the current node.

[0095] 2.2, Local motion compensation in G-PCC:

[0096] The starting condition of local motion compensation is as follows:

[0097] If the current frame is a non-independent coding frame (such as an I frame), the reference frame is compensated for local motion compensation only when the inter-frame prediction is enabled and the local motion compensation is enabled.

[0098] As shown in FIG. 8: when the gps.interPredictionEnabledFlag is true and the current frame is a non-independent coding frame (I frame), the gbh.interPredictionEnabledFlag is true, otherwise it is false. When the gbh.interPredictionEnableFlag is false, no reference frame is generated to generate inter-frame information as the context to encode the current frame; when the gbh.interPredictionEnableFlag is true, whether to compensate the reference frame is determined according to the gps.localMotionEnabled, and the reference frame is used to generate inter-frame information as the context to encode the current frame.

[0099] Encoding side local motion compensation algorithm:

[0100] Prediction Unit (PU) is an octree node obtained by octree division of a point cloud frame (or slice) to be encoded;

[0101] PU is a processing unit for local motion compensation of a point cloud frame (or slice) to be encoded;

[0102] Line Processing Unit (LPU) is the largest processing unit for local motion compensation of a point cloud frame (or slice) to be encoded, and its edge length is set by a parameter. LPU is divided at most n times to obtain the smallest PU, and n is set by a parameter.

[0103] (a) The encoding side flowchart is shown in FIG. 9:

[0104] In FIG. 9, the boxed area is the flowchart of the encoding side local motion compensation part, wherein:

[0105] Nodesize[0]: represents the log2 value of the length of the X dimension among the X, Y and Z dimensions of the node;

[0106] LPU: represents the largest node (or the largest prediction unit, the size is set by a parameter) for local motion compensation;

[0107] LPUlog2: represents the log2 value of the edge length of the largest node (or the largest prediction unit) for local motion compensation;

[0108] minPU: represents the smallest node (or the smallest prediction unit, the size is set by a parameter, and LPU is divided n times) for local motion compensation;

[0109] LPU ref : represents the region in the reference frame that is the same as the spatial position of the LPU in the current frame according to the Morton order;

[0110] Enc_split: if 1, it means that the current node needs to encode split_flag, and if 0, it means that the current node does not need to encode split_flag. split_flag is only needed to be encoded when the node to be encoded is a PU (or LPU) (i.e., a prediction unit (or a largest prediction unit)) and the reference node has not been compensated, and is not needed to be encoded when the node to be encoded is not a PU (or LPU) or the PU has been compensated;

[0111] split_flag: if 1, it means that the current node needs to be divided, and if 0, it means that the current node does not need to be divided;

[0112] MV: Based on the reference frame node ref The motion vector calculated from the current frame node is used to compensate the reference frame;

[0113] isCompensated: If it is 1, it indicates that the node in the reference frame is... ref The points within have been compensated; a value of 0 indicates that the node in the reference frame has been compensated. ref The points within were not compensated.

[0114] (b) Local motion compensation at the encoder end is divided into the following three cases:

[0115] (b1) If the node assigned to the multi-branch partition is an LPU:

[0116] As shown in Figure 10, according to LPU ref (As shown in section 10 of the left box in Figure 10) Set up a search window LPUwindow ref (Points within the 20-square box are stored within this area during local motion compensation), when the LPU window... ref If the number of points is greater than 50, local motion compensation is performed, and the code is split_flag.

[0117] If split_flags = 0, the LPU does not split, and the encoding is split_flags = 0 and motion vector MV. LPU According to the MV LPU For LPU ref Perform compensation and tag the LPU. ref The points in the LPU have been compensated; the compensated LPU will be used. ref Points within the bounding box 10 are stored in the compensated reference point cloud (compensatedPointCloud). The prediction information obtained from the compensated reference frame is used as the placeholder code for the current node in the context encoding.

[0118] If split_flags = 1, then the LPU is partitioned, and the encoding split_flags = 1 uses the uncompensated reference frame to obtain prediction information as the placeholder code for the current node in context encoding.

[0119] The calculation process for split_flags is as follows: based on LPU and LPU... ref Calculate MV LPU Used to compensate LPU ref Calculate the compensated LPU ref The difference between D and the current frame node LPU LPU Comprehensive encoding MV LPU and D LPU The overall cost C is obtained. LPUThe LPU is further divided into PUs according to the octree division manner, and the MV of each PU after the division is calculated PU_i , PU_i and C PU_i are compared to determine whether the LPU needs to be divided. If C LPU is small, split_flags = 0; if C is small, split_flags = 1. LPU

[0120] (b2) If the node divided by the multi-way division is a PU:

[0121] If the points in the reference node PU ref of the current node PU need to be compensated but have not been compensated:

[0122] If the PU is a minPU, split_flags does not need to be encoded, and split_flags is inferred to be 0. Only the MV PU is encoded, the PU PU is compensated according to the MV ref , and it is marked that the points in the PU ref have been compensated. The points in the compensated PU ref that are within the range of the block 10 are stored in the compensated reference point cloud, and the prediction information obtained from the compensated reference frame is used as the context to encode the occupancy code of the current node.

[0123] If the PU is not a minPU, split_flags needs to be encoded.

[0124] If split_flags = 0, the PU is not divided.

[0125] split_flags = 0 and the MV PU are encoded, the PU PU is compensated according to the MV ref , and it is marked that the points in the PU ref have been compensated. The points in the compensated PU ref that are within the range of the block 10 are stored in the compensated reference point cloud, and the prediction information obtained from the compensated reference frame is used as the context to encode the occupancy code of the current node.

[0126] If split_flags = 1, the PU is divided, split_flags = 1 is encoded, and the prediction information obtained from the uncompensated reference frame is used as the context to encode the occupancy code of the current node.

[0127] If the points in the reference node PU ref of the current node PU need to be compensated and have been compensated: ​​

[0128] The prediction information from the compensated reference node is used to context code the occupancy of the current node.

[0129] If the reference node PU of the current node PU ref does not need to be compensated:

[0130] The prediction information from the uncompensated reference node is used to context code the occupancy of the current node.

[0131] (b3) If the node partitioned by the multi-tree is not a PU (or LPU).

[0132] Determine if the reference node node ref has been compensated, if node ref has been compensated, the prediction information from the compensated reference frame is used to context code the occupancy of the current node. Otherwise, the prediction information from the uncompensated reference frame is used to context code the occupancy of the current node.

[0133] As shown in FIG. 11, the above process is illustrated with n = 2 (LPU is partitioned at most twice) as an example:

[0134] As shown in FIG. 11, with the leftmost node in each layer as an example, when the multi-tree is partitioned to x layer, the corresponding node is LPU, at this time, LPU judges to be partitioned, and split_flags = 1 is coded, and the prediction information from the uncompensated reference frame is used to context code the occupancy of the current node. The LPU node size is 64; the minPU node size is 64 >> 2 = 16; the LPU is the largest node for local motion compensation; the minPU is the smallest node for local motion compensation. When the multi-tree is partitioned to x layer, split flag: 1; MV: not transmitted; occupancy: 1 0 1 1, the uncompensated reference frame information is used for coding.

[0135] When the multi-tree is partitioned to x + 1 layer, the corresponding node is the PU after the LPU is partitioned once, at this time, PU judges to be partitioned, and split_flags = 1 is coded, and the prediction information from the uncompensated reference frame is used to context code the occupancy of the current node. For the first partitioned node: split flag: 1; MV: not transmitted; occupancy: 1 0 0 1; the uncompensated reference frame information is used for coding. For the third partitioned node: split flag: 1; MV: not transmitted; occupancy: 1 0 0 0. For the fourth partitioned node: split flag: 0; MV: transmitted.

[0136] When the multi-tree partition is to x+2 layers, the corresponding node is minPU, at this time, minPU judges not to partition, split_flags is inferred as 0 (the node is the set minimum PU), and the MV is encoded PU_i , and the MV PU_i is compensated by using the reference frame corresponding to the node PU ref , and the prediction information is generated by using the compensated reference frame as the context to encode the occupancy of the current node. For the first partitioned node: split flag: not transmitted, because the node is minPU, and the compensation is needed; MV: transmitted; occupancy: encoded by using the compensated reference frame information. For the fourth partitioned node: split flag: not transmitted; MV: transmitted.

[0137] The local motion compensation algorithm at the decoding end is as follows:

[0138] (a) The flowchart at the decoding end is as follows:

[0139] In FIG. 12, the area in the dashed box is the flowchart of the local motion compensation part at the decoding end, wherein:

[0140] Nodesize[0]: represents the log2 value of the length of the X dimension of the node X, Y and Z three dimensions;

[0141] LPU: represents the maximum node (or the maximum prediction unit, the size of which is set by the parameter motion_block_size) for which the local motion compensation is performed;

[0142] LPUlog2: represents the log2 value of the side length of the maximum node (or the maximum prediction unit) for which the local motion compensation is performed;

[0143] minPU: represents the minimum node (or the minimum prediction unit, the size of which is set by the parameter motion_min_pu_size, and the LPU is divided n times to obtain the minimum prediction unit, motion_block_size>>n=motion_min_pu_size) for which the local motion compensation is performed;

[0144] LPU ref : represents the region in the reference frame which has the same spatial position as the LPU in the current frame according to the Morton order;

[0145] Dec_split: if 1, it indicates that the split_flag of the current node needs to be decoded, if 0, it indicates that the split_flag of the current node does not need to be decoded, only when the node to be decoded is PU (or LPU) (i.e. the prediction unit (or the maximum prediction unit)) and the reference node has not been compensated, the split_flag needs to be decoded, otherwise, the split_flag does not need to be decoded.

[0146] split_flag: if 1, the current node needs to be split, if 0, the current node does not need to be split;

[0147] MV: motion vector, used to compensate the reference frame

[0148] isCompensated: if 1, the points in the node ref in the reference frame have been compensated, if 0, the points in the node ref in the reference frame have not been compensated;

[0149] (a) The local motion compensation at the decoding end is divided into the following three cases:

[0150] (b1) If the node to be decoded is LPU:

[0151] If the number of points in the LPU ref > 50, local motion compensation is performed, and split_flag is decoded.

[0152] If split_flag = 0, the LPU is not split, MV LPU is decoded, the LPU LPU is compensated according to MV ref , and it is marked that the points in the LPU ref have been compensated. The points in the compensated LPU ref that are within the range of block 10 are stored in the compensated reference point cloud, and the prediction information obtained from the compensated reference frame is used as the context to encode the occupancy code of the current node.

[0153] If split_flag = 1, the LPU is split, and the prediction information obtained from the uncompensated reference frame is used as the context to encode the occupancy code of the current node.

[0154] (b2) If the node to be decoded is PU:

[0155] If the points in the reference node PU ref of the current node PU need to be compensated but have not been compensated:

[0156] If PU is minPU, split_flag does not need to be decoded, and split_flag is inferred to be 0.

[0157] If PU is not minPU, split_flag is decoded.

[0158] If split_flag = 0, the PU is not split, MV PU is decoded, and PU PU is compensated according to MV refCompensate and mark the PU ref The points in the compensated PU ref are stored in the compensated reference point cloud, and the prediction information obtained from the compensated reference frame is used as the context to decode the occupancy code of the current node.

[0159] If split_flags = 1, the PU is split, and the prediction information obtained from the uncompensated reference frame is used as the context to decode the occupancy code of the current node.

[0160] If the points in the reference node PU ref of the current node PU need to be compensated and have been compensated:

[0161] The prediction information obtained from the compensated reference frame is used as the context to decode the occupancy code of the current node.

[0162] (b3) If the node to be decoded is not a PU (or LPU).

[0163] Determine whether the reference node node ref has been compensated, if node ref has been compensated, the prediction information obtained from the compensated reference frame is used as the context to decode the occupancy code of the current node. Otherwise, the prediction information obtained from the uncompensated reference frame is used as the context to decode the occupancy code of the current node.

[0164] The point cloud encoding method, point cloud decoding method and related equipment provided by the embodiments of the present application will be described in detail below in combination with the accompanying drawings and some embodiments and application scenarios.

[0165] Referring to FIG. 13, FIG. 13 is a flowchart of a point cloud encoding method provided by an embodiment of the present application, which can be applied to an encoding end. As shown in FIG. 13, the method comprises the following steps:

[0166] Step 101: Perform point cloud partitioning processing on a target point cloud frame of a point cloud to be encoded to obtain a plurality of point cloud slices.

[0167] The point cloud to be encoded can be a point cloud sequence, and the point cloud sequence can form a plurality of point cloud frames. The target point cloud frame can be any one of the plurality of point cloud frames formed by the point cloud to be encoded. The point cloud slice can also be described as a slice.

[0168] Step 102: In a case where it is determined that a target point cloud slice satisfies a first motion compensation condition, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices.

[0169] The target point cloud slice can be any one of the plurality of point cloud slices. The first motion compensation condition can include a global motion compensation condition or a local motion compensation condition. In a case where it is determined that the target point cloud slice satisfies the first motion compensation condition, the reference point cloud slice corresponding to the target point cloud slice is subjected to motion compensation to obtain a compensated reference point cloud slice. The motion compensation can include global motion compensation or local motion compensation. In a case where it is determined that the target point cloud slice satisfies the global motion compensation condition, the reference point cloud slice corresponding to the target point cloud slice is subjected to global motion compensation to obtain a global motion compensated reference point cloud slice. In a case where it is determined that the target point cloud slice satisfies the local motion compensation condition, the global motion compensated reference point cloud slice is subjected to local motion compensation to obtain the compensated reference point cloud slice. The embodiments are not limited in this regard.

[0170] In addition, the first motion compensation condition can include a global motion compensation condition or a local motion compensation condition. The global motion compensation condition can include that a feature of the target point cloud slice meets a preset global motion compensation feature, or a feature of the reference point cloud slice corresponding to the target point cloud slice meets a preset global motion compensation feature. Different global motion compensation conditions can be set for different scenes, and the embodiments are not limited in this regard. The local motion compensation condition can refer to that a feature of the target point cloud slice meets a preset local motion compensation feature, or a feature of the reference point cloud slice corresponding to the target point cloud slice meets a preset local motion compensation feature. Different local motion compensation conditions can be set for different scenes, and the embodiments are not limited in this regard.

[0171] Step 103, inter-frame predictive encoding of the target point cloud slice based on the compensated reference point cloud slice.

[0172] In addition, the first motion compensation condition can include a global motion compensation condition or a local motion compensation condition. The global motion compensation condition can include that a feature of the target point cloud slice meets a preset global motion compensation feature, or a feature of the reference point cloud slice corresponding to the target point cloud slice meets a preset global motion compensation feature. Different global motion compensation conditions can be set for different scenes, and the embodiments are not limited in this regard. The local motion compensation condition can refer to that a feature of the target point cloud slice meets a preset local motion compensation feature, or a feature of the reference point cloud slice corresponding to the target point cloud slice meets a preset local motion compensation feature. Different local motion compensation conditions can be set for different scenes, and the embodiments are not limited in this regard.

[0173] It should be noted that, after the point cloud partitioning processing is performed on the target point cloud frame of the to-be-encoded point cloud, it is determined whether the target point cloud slice meets the first motion compensation condition; in a case where it is determined that the target point cloud slice meets the first motion compensation condition, motion compensation is performed on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice is a point cloud slice in the plurality of point cloud slices; inter-frame predictive encoding is performed on the target point cloud slice based on the compensated reference point cloud slice; in a case where it is determined that the target point cloud slice does not meet the first motion compensation condition, inter-frame predictive encoding can be performed on the target point cloud slice based on a reference point cloud slice corresponding to the target point cloud slice.

[0174] In an implementation manner, the point cloud encoding method further includes:

[0175] encoding first indication information, the first indication information being used to indicate whether the target point cloud slice enables motion compensation, and a code stream corresponding to the to-be-encoded point cloud including an encoding result of the first indication information;

[0176] In a case where motion compensation is performed on a reference point cloud slice corresponding to the target point cloud slice, the first indication information indicates that the target point cloud slice enables motion compensation.

[0177] In an implementation manner, the encoding of the first indication information includes:

[0178] encoding second indication information, the second indication information being used to indicate whether motion compensation is allowed to be performed on the target point cloud frame, and the code stream further including an encoding result of the second indication information;

[0179] In a case where the second indication information indicates that motion compensation is allowed to be performed on the target point cloud frame, the first indication information is encoded.

[0180] In an implementation manner, the encoding of the first indication information further includes:

[0181] encoding third indication information, the third indication information being used to indicate whether inter-frame prediction is allowed to be performed on the target point cloud slice, and the code stream further including an encoding result of the third indication information;

[0182] The encoding of the first indication information in a case where the second indication information indicates that motion compensation is allowed to be performed on the target point cloud frame includes:

[0183] In a case where the second indication information indicates that motion compensation is allowed for the target point cloud frame and the third indication information indicates that inter-frame prediction is allowed for the target point cloud slice, the first indication information is encoded.

[0184] In an implementation, the second indication information is encoded, including:

[0185] The fourth indication information is encoded, the fourth indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame, and the code stream further includes an encoding result of the fourth indication information.

[0186] The fifth indication information is encoded, the fifth indication information being used for indicating whether motion compensation is allowed for the point cloud to be encoded, and the code stream further includes an encoding result of the fifth indication information.

[0187] In a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame and the fifth indication information indicates that motion compensation is allowed for the point cloud to be encoded, the second indication information is encoded.

[0188] In an implementation, the code stream further includes an encoding result of sixth indication information, the sixth indication information being used for indicating whether inter-frame prediction is allowed for the point cloud to be encoded.

[0189] The fourth indication information is encoded, including: in a case where the sixth indication information indicates that inter-frame prediction is allowed for the point cloud to be encoded, the fourth indication information is encoded.

[0190] Or,

[0191] The fifth indication information is encoded, including: in a case where the sixth indication information indicates that inter-frame prediction is allowed for the point cloud to be encoded, the fifth indication information is encoded.

[0192] In an implementation, the code stream further includes an encoding result of fourth indication information, the fourth indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame, and the third indication information is encoded, including:

[0193] In a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, the third indication information is encoded.

[0194] In an implementation, before the reference point cloud slice corresponding to the target point cloud slice is motion compensated in a case where the target point cloud slice meets the first motion compensation condition, the method further includes:

[0195] In a case where it is determined that the target point cloud frame satisfies a second motion compensation condition, performing motion compensation on a reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame;

[0196] Determining a reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

[0197] In an implementation manner, the encoding the first indication information comprises:

[0198] encoding seventh indication information, the seventh indication information being used to indicate whether inter-frame prediction is allowed on the target point cloud frame, and the code stream further comprising an encoding result of the seventh indication information;

[0199] In a case where the seventh indication information indicates that the inter-frame prediction is allowed on the target point cloud frame, the first indication information is encoded.

[0200] In an implementation manner, the encoding the first indication information further comprises:

[0201] encoding eighth indication information, the eighth indication information being used to indicate whether motion compensation is allowed on the point cloud to be encoded, and the code stream further comprising an encoding result of the eighth indication information;

[0202] The encoding the first indication information in the case where the seventh indication information indicates that the inter-frame prediction is allowed on the target point cloud frame comprises:

[0203] In a case where the eighth indication information indicates that the motion compensation is allowed on the point cloud to be encoded and the seventh indication information indicates that the inter-frame prediction is allowed on the target point cloud frame, the first indication information is encoded.

[0204] In an implementation manner, the method further comprises:

[0205] encoding ninth indication information, the ninth indication information being used to indicate whether motion compensation is enabled on the target point cloud frame;

[0206] In a case where motion compensation is performed on a reference point cloud frame corresponding to the target point cloud frame, the ninth indication information indicates that the motion compensation is enabled on the target point cloud frame.

[0207] In an implementation manner, the code stream further comprises an encoding result of seventh indication information and an encoding result of eighth indication information, the seventh indication information being used to indicate whether inter-frame prediction is performed on the target point cloud frame, and the eighth indication information being used to indicate whether motion compensation is allowed on the point cloud to be encoded;

[0208] The encoding of the ninth indication information includes:

[0209] In a case where the seventh indication information indicates that the target point cloud frame is inter-predicted and the eighth indication information indicates that motion compensation is allowed for the point cloud to be encoded, ninth indication information is encoded.

[0210] It should be noted that the motion compensation in the above embodiments can be global motion compensation, or local motion compensation, or other types of motion compensation.

[0211] In the related art, the global motion high-level syntax element is not flexible enough. The global motion enabling identifier gps.globalMotionEnabled is a frame-level syntax element. When the enabling identifier is true, all slices need to be globally motion compensated. However, in a specific scenario, not all slices need to be globally motion compensated. For example, when a point cloud to be encoded represents a computer-constructed human model, the motion of the model is similar to that of a rigid body. At this time, if only the arms of the human model are moving in consecutive frames, and other parts are not moving, the moving arm part can be divided into a slice when the point cloud is divided into slices, and only the slice is globally motion compensated. Other slices do not need global motion compensation. At this time, a slice-level global motion enabling identifier is needed to indicate whether the slice to be encoded needs to be globally motion compensated. However, in the related art, there is no slice-level global motion enabling identifier syntax element. In addition, because there is only a frame-level global motion enabling identifier in the related art, in the above case, other slices except the arm part need to be globally motion compensated and encode motion compensation information, which transmits redundant information and makes the coding and decoding efficiency low.

[0212] In an embodiment of the present application, a target point cloud frame of a point cloud to be encoded is subjected to point cloud division processing to obtain a plurality of point cloud slices. In a case where a target point cloud slice meets a first motion compensation condition, a reference point cloud slice corresponding to the target point cloud slice is subjected to motion compensation to obtain a compensated reference point cloud slice. The target point cloud slice is a point cloud slice in the plurality of point cloud slices. The target point cloud slice is inter-predicted and encoded based on the compensated reference point cloud slice. In this way, in a case where a target point cloud slice meets a first motion compensation condition, the reference point cloud slice corresponding to the target point cloud slice is subjected to motion compensation, which can determine whether to perform motion compensation for each point cloud slice, can reduce the coding redundancy caused by point cloud frame-level motion compensation judgment, and thus can improve the point cloud coding and decoding efficiency.

[0213] Optionally, the first motion compensation condition comprises a global motion compensation condition, and the motion compensation on the reference point cloud slice corresponding to the target point cloud slice to obtain the compensated reference point cloud slice comprises:

[0214] Optionally, the motion compensation on the reference point cloud slice corresponding to the target point cloud slice to obtain the compensated reference point cloud slice comprises:

[0215] In this embodiment, the motion compensation on the reference point cloud slice corresponding to the target point cloud slice to obtain the compensated reference point cloud slice is performed when it is determined that the target point cloud slice satisfies the global motion compensation condition. Thus, it can be determined whether to perform global motion compensation for each point cloud slice, and the encoding redundancy caused by the point cloud frame-level global motion compensation determination can be reduced, thereby improving the point cloud encoding and decoding efficiency.

[0216] Optionally, the method further comprises:

[0217] Optionally, the method further comprises:

[0218] Optionally, the first indication information indicates that the target point cloud slice enables global motion compensation when the global motion compensation is performed on the reference point cloud slice corresponding to the target point cloud slice.

[0219] Optionally, the first indication information can be a gbh_globalMotionEnabled enabling identifier. The enabling identifier can be a Boolean (bool) type variable, and false or true can be used to represent that the enabling identifier is turned on. The gbh_globalMotionEnabled enabling identifier can be a geometry data unit header (Geometry Data Unit, GDU) parameter.

[0220] In this embodiment, the first indication information is encoded, the first indication information is used to indicate whether the target point cloud slice enables global motion compensation, and the code stream corresponding to the point cloud to be encoded comprises an encoding result of the first indication information. The first indication information is used to indicate whether the target point cloud slice enables global motion compensation, and the decoding end can determine whether to perform global motion compensation on the target point cloud slice according to the first indication information, thereby realizing point cloud slice-level global motion compensation determination and improving the point cloud encoding and decoding efficiency.

[0221] Optionally, the encoding of the first indication information comprises:

[0222] encode second indication information, the second indication information being used for indicating whether global motion compensation is allowed for the target point cloud frame, and the code stream further comprising an encoding result of the second indication information;

[0223] encode the first indication information in a case where the second indication information indicates that the global motion compensation is allowed for the target point cloud frame.

[0224] The second indication information can be a gps_globalMotionEnabled enabling identifier. The enabling identifier can be a Boolean (bool) type variable, and false or true can be used to represent that the enabling identifier is turned on. The gps_globalMotionEnabled enabling identifier can be a geometry parameter set (gps) parameter.

[0225] In this embodiment, the second indication information is encoded, the second indication information being used for indicating whether global motion compensation is allowed for the target point cloud frame, and the code stream further comprises an encoding result of the second indication information; and the first indication information is encoded in a case where the second indication information indicates that the global motion compensation is allowed for the target point cloud frame. In this way, at the decoding end, whether the first indication information needs to be decoded can be determined through the second indication information. For a point cloud frame for which the global motion compensation is not allowed, point cloud slice level global motion compensation judgment is not needed, and frame level global motion compensation judgment can be used to further improve the coding and decoding efficiency.

[0226] Optionally, the encoding of the first indication information further comprises:

[0227] encode third indication information, the third indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud slice, and the code stream further comprising an encoding result of the third indication information;

[0228] The encoding of the first indication information in a case where the second indication information indicates that the global motion compensation is allowed for the target point cloud frame comprises:

[0229] The first indication information is encoded in a case where the second indication information indicates that the global motion compensation is allowed for the target point cloud frame, and the third indication information indicates that the inter-frame prediction is allowed for the target point cloud slice.

[0230] The third indication information can be gbh_interPredictionEnabledFlag. The gbh_interPredictionEnabledFlag can be a bool variable, and false or true can be used to indicate that the gbh_interPredictionEnabledFlag is enabled. The gbh_interPredictionEnabledFlag can be a GDU parameter.

[0231] In the embodiment, when the second indication information indicates that global motion compensation is allowed for the target point cloud frame, and the third indication information indicates that inter-frame prediction is allowed for the target point cloud slice, the first indication information is encoded. In this way, the decoding end can determine whether the first indication information needs to be decoded according to the second indication information and the third indication information. For a point cloud frame that does not allow global motion compensation or a point cloud slice that does not allow inter-frame prediction, point cloud slice level global motion compensation judgment is not needed, and the coding and decoding efficiency can be further improved.

[0232] Optionally, the encoding of the second indication information comprises:

[0233] The fourth indication information is encoded, and the fourth indication information is used to indicate whether inter-frame prediction is allowed for the target point cloud frame. The code stream further comprises an encoding result of the fourth indication information.

[0234] The fifth indication information is encoded, and the fifth indication information is used to indicate whether global motion compensation is allowed for the point cloud to be encoded. The code stream further comprises an encoding result of the fifth indication information.

[0235] In the embodiment, when the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, and the fifth indication information indicates that global motion compensation is allowed for the point cloud to be encoded, the second indication information is encoded.

[0236] The fourth indication information can be gps_inter_frame_prediction_enabled_flag enabling identification. The enabling identification can be a Boolean (bool) type variable, which can be represented by false or true to indicate that the enabling identification is enabled. The gps_inter_frame_prediction_enabled_flag enabling identification can be a gps parameter. The fifth indication information can be sps_globalMotionEnable enabling identification. The enabling identification can be a Boolean (bool) type variable, which can be represented by false or true to indicate that the enabling identification is enabled. The sps_globalMotionEnable enabling identification can be a sequence parameter set (sps) parameter.

[0237] In the embodiment, when the fourth indication information indicates that the inter-frame prediction of the target point cloud frame is allowed, and the fifth indication information indicates that the global motion compensation of the to-be-encoded point cloud is allowed, the second indication information is encoded. In this way, the decoding end can determine whether the second indication information needs to be decoded through the fourth indication information and the fifth indication information. The point cloud frame level global motion compensation judgment is not needed for the to-be-encoded point cloud which is not allowed to be globally compensated or the point cloud frame which is not allowed to be inter-frame predicted, and the coding and decoding efficiency can be further improved.

[0238] Optionally, the code stream further includes an encoding result of sixth indication information, and the sixth indication information is used to indicate whether the inter-frame prediction of the to-be-encoded point cloud is allowed.

[0239] The fourth indication information is encoded, including: when the sixth indication information indicates that the inter-frame prediction of the to-be-encoded point cloud is allowed, the fourth indication information is encoded.

[0240] Or,

[0241] The fifth indication information is encoded, including: when the sixth indication information indicates that the inter-frame prediction of the to-be-encoded point cloud is allowed, the fifth indication information is encoded.

[0242] The sixth indication information can be sps_inter_frame_prediction_enabled_flag enabling identification. The enabling identification can be a Boolean (bool) type variable, which can be represented by false or true to indicate that the enabling identification is enabled. The sps_inter_frame_prediction_enabled_flag enabling identification can be an sps parameter.

[0243] In the embodiment, the fourth indication information is encoded in the case that the sixth indication information indicates that the to-be-encoded point cloud is allowed to be inter-predicted, so that the decoding end can determine whether the fourth indication information needs to be decoded through the sixth indication information, the point cloud frame-level inter-prediction judgment of the to-be-encoded point cloud that is not allowed to be inter-predicted does not need to be performed, and the coding and decoding efficiency can be further improved; or the fifth indication information is encoded in the case that the sixth indication information indicates that the to-be-encoded point cloud is allowed to be inter-predicted, so that the decoding end can determine whether the fifth indication information needs to be decoded through the sixth indication information, the global motion compensation judgment of the to-be-encoded point cloud that is not allowed to be inter-predicted does not need to be performed, and the coding and decoding efficiency can be further improved.

[0244] Optionally, the code stream further includes an encoding result of fourth indication information, the fourth indication information being used to indicate whether the target point cloud frame is allowed to be inter-predicted, and the encoding of the third indication information includes:

[0245] In the case that the fourth indication information indicates that the target point cloud frame is allowed to be inter-predicted, the third indication information is encoded.

[0246] The fourth indication information can be a gps_inter_frame_prediction_enabled_flag identifier. The identifier can be a Boolean (bool) variable, and false or true can be used to represent that the identifier is turned on. The gps_inter_frame_prediction_enabled_flag identifier can be a gps parameter.

[0247] In the embodiment, the third indication information is encoded in the case that the fourth indication information indicates that the target point cloud frame is allowed to be inter-predicted, so that the decoding end can determine whether the third indication information needs to be decoded through the fourth indication information, the point cloud slice-level inter-prediction judgment of the point cloud frame that is not allowed to be inter-predicted does not need to be performed, and the coding and decoding efficiency can be further improved.

[0248] Optionally, before the motion compensation of the reference point cloud slice corresponding to the target point cloud slice is performed in the case that the target point cloud slice meets the first motion compensation condition, the method further includes:

[0249] In the case that the target point cloud frame meets the second motion compensation condition, the global motion compensation of the reference point cloud frame corresponding to the target point cloud frame is performed, and a compensated reference point cloud frame is obtained.

[0250] determine the reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

[0251] The second motion compensation condition can include a global motion compensation condition. The global motion compensation condition can include that a feature of the target point cloud frame meets a preset global motion compensation feature, or a feature of a reference point cloud frame corresponding to the target point cloud frame meets a preset global motion compensation feature. Different global motion compensation conditions can be set for different scenes, and the global motion compensation condition is not limited in this embodiment.

[0252] In addition, the compensated reference point cloud frame can be divided into point cloud slices, and the reference point cloud slice corresponding to the target point cloud slice can be determined from the divided point cloud slices based on a position of the target point cloud slice in the target point cloud frame.

[0253] In this embodiment, in a case where it is determined that the target point cloud frame meets the second motion compensation condition, a global motion compensation is performed on a reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame; and the reference point cloud slice corresponding to the target point cloud slice is determined based on the compensated reference point cloud frame. In this way, through the point cloud frame-level global motion compensation and the point cloud slice-level global motion compensation, two-level global motion compensation is realized, and the global motion compensation effect can be improved.

[0254] Optionally, the encoding of the first indication information includes:

[0255] The seventh indication information is encoded, and the seventh indication information is used to indicate whether the inter-frame prediction is allowed for the target point cloud frame. The code stream further includes an encoding result of the seventh indication information.

[0256] In a case where the seventh indication information indicates that the inter-frame prediction is allowed for the target point cloud frame, the first indication information is encoded.

[0257] The seventh indication information can be a frame_inter_prediction identifier. The identifier can be a Boolean (bool) variable, and false or true can be used to represent that the identifier is turned on. The frame_inter_prediction identifier can be a gps parameter.

[0258] In this embodiment, in a case where the seventh indication information indicates that the inter-frame prediction is allowed for the target point cloud frame, the first indication information is encoded. The decoding end can determine whether the first indication information needs to be decoded through the seventh indication information. The point cloud frame for which the inter-frame prediction is not allowed does not need to be subjected to the point cloud slice-level global motion compensation judgment, and the coding and decoding efficiency can be further improved.

[0259] Optionally, the encoding the first indication information further includes:

[0260] encoding eighth indication information, the eighth indication information being used to indicate whether global motion compensation is allowed for the to-be-encoded point cloud, and the bitstream further including an encoding result of the eighth indication information;

[0261] In a case where the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, the encoding the first indication information includes:

[0262] In a case where the eighth indication information indicates that global motion compensation is allowed for the to-be-encoded point cloud and the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, the encoding the first indication information.

[0263] The eighth indication information can be a sps_globalMotionEnable enabling identifier. The enabling identifier can be a Boolean (bool) variable, and false or true can be used to represent that the enabling identifier is turned on. The sps_globalMotionEnable enabling identifier can be a sps parameter.

[0264] In the embodiment, in a case where the eighth indication information indicates that global motion compensation is allowed for the to-be-encoded point cloud and the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, the encoding the first indication information. In this way, the decoding end can determine whether the first indication information needs to be decoded through the eighth indication information and the seventh indication information. For a point cloud frame for which inter-frame prediction is not allowed or a to-be-encoded point cloud for which global motion compensation is not allowed, point cloud slice level global motion compensation judgment does not need to be performed again, and the coding and decoding efficiency can be further improved.

[0265] Optionally, the method further includes:

[0266] encoding ninth indication information, the ninth indication information being used to indicate whether global motion compensation is enabled for the target point cloud frame;

[0267] In a case where the target point cloud frame is subjected to global motion compensation on a reference point cloud frame corresponding to the target point cloud frame, the ninth indication information indicates that global motion compensation is enabled for the target point cloud frame.

[0268] The ninth indication information can be a gps.globalMotionEnabled enabling identifier. The enabling identifier can be a Boolean (bool) variable, and false or true can be used to represent that the enabling identifier is turned on. The gps.globalMotionEnabled enabling identifier can be a gps parameter.

[0269] In this embodiment, the ninth indication information is encoded, and the ninth indication information is used to indicate whether the target point cloud frame enables global motion compensation. By using the ninth indication information to indicate whether the target point cloud frame enables global motion compensation, the decoding end can determine whether to perform global motion compensation on the target point cloud frame according to the ninth indication information, so that point cloud frame level global motion compensation determination can be realized, and two-level global motion compensation can be realized, and the effect of global motion compensation can be improved.

[0270] Optionally, the code stream further includes an encoding result of seventh indication information and an encoding result of eighth indication information, the seventh indication information is used to indicate whether to perform inter-frame prediction on the target point cloud frame, and the eighth indication information is used to indicate whether to allow global motion compensation on the to-be-encoded point cloud.

[0271] The encoding of the ninth indication information includes:

[0272] In a case where the seventh indication information indicates that the inter-frame prediction is performed on the target point cloud frame, and the eighth indication information indicates that the global motion compensation is allowed on the to-be-encoded point cloud, the ninth indication information is encoded.

[0273] The seventh indication information can be a frame_inter_prediction identifier. The identifier can be a Boolean (bool) variable, and false or true can be used to represent that the identifier is turned on. The frame_inter_prediction identifier can be a gps parameter. The eighth indication information can be a sps_globalMotionEnable enabling identifier. The enabling identifier can be a Boolean (bool) variable, and false or true can be used to represent that the enabling identifier is turned on. The sps_globalMotionEnable enabling identifier can be a sps parameter.

[0274] In the embodiment, the seventh indication information indicates that the target point cloud frame is subjected to inter-frame prediction, and the eighth indication information indicates that the target point cloud frame is allowed to be subjected to global motion compensation. In this case, the ninth indication information is encoded, so that the decoding end can determine whether the ninth indication information needs to be decoded according to the eighth indication information and the seventh indication information. For a point cloud frame that is not allowed to be subjected to inter-frame prediction or a target point cloud that is not allowed to be subjected to global motion compensation, the point cloud frame level global motion compensation judgment is not needed, and the coding and decoding efficiency can be further improved.

[0275] Optionally, the global motion compensation on the reference point cloud frame corresponding to the target point cloud frame comprises:

[0276] determining a global motion compensation matrix corresponding to the target point cloud frame;

[0277] performing global motion compensation on the reference point cloud frame corresponding to the target point cloud frame based on the global motion compensation matrix to obtain a compensated reference point cloud frame;

[0278] The code stream further comprises an encoding result of tenth indication information, and the tenth indication information is used to indicate the global motion compensation matrix.

[0279] The global motion compensation matrix can comprise a global motion rotation matrix and a translation vector.

[0280] In the embodiment, the global motion compensation matrix corresponding to the target point cloud frame is determined, and the global motion compensation on the reference point cloud frame corresponding to the target point cloud frame is performed based on the global motion compensation matrix to obtain a compensated reference point cloud frame. The code stream further comprises an encoding result of tenth indication information, and the tenth indication information is used to indicate the global motion compensation matrix. In this way, the decoding end can perform global motion compensation on the point cloud frame according to the global motion compensation matrix carried in the code stream, so as to realize inter-frame prediction decoding.

[0281] Referring to FIG. 14, FIG. 14 is a flowchart of a point cloud decoding method provided by an embodiment of the present application, which can be applied to a decoding end. As shown in FIG. 14, the point cloud decoding method comprises the following steps:

[0282] Step 201, performing point cloud division processing on a target point cloud frame of a to-be-decoded point cloud to obtain a plurality of point cloud slices;

[0283] Step 202, in a case where it is determined that the target point cloud slice enables motion compensation, performing motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices;

[0284] Step 203, inter-prediction decoding the target point cloud slice based on the compensated reference point cloud slice.

[0285] In an implementation form, before the motion compensation of the reference point cloud slice corresponding to the target point cloud slice in the case that the target point cloud slice enables motion compensation, the method further comprises:

[0286] decoding first indication information in the bitstream, the first indication information being used for indicating whether the target point cloud slice enables motion compensation;

[0287] determining whether the target point cloud slice enables motion compensation based on the first indication information.

[0288] In an implementation form, the decoding of the first indication information in the bitstream comprises:

[0289] decoding second indication information in the bitstream, the second indication information being used for indicating whether motion compensation is allowed for the target point cloud frame;

[0290] decoding the first indication information in the bitstream in the case that the second indication information indicates that motion compensation is allowed for the target point cloud frame.

[0291] In an implementation form, the decoding of the first indication information in the bitstream further comprises:

[0292] decoding third indication information in the bitstream, the third indication information being used for indicating whether inter-prediction is allowed for the target point cloud slice;

[0293] the decoding of the first indication information in the bitstream in the case that the second indication information indicates that motion compensation is allowed for the target point cloud frame comprises:

[0294] decoding the first indication information in the bitstream in the case that the second indication information indicates that motion compensation is allowed for the target point cloud frame and the third indication information indicates that inter-prediction is allowed for the target point cloud slice.

[0295] In an implementation form, the decoding of the second indication information in the bitstream comprises:

[0296] decoding fourth indication information in the bitstream, the fourth indication information being used for indicating whether inter-prediction is allowed for the target point cloud frame;

[0297] decoding fifth indication information in the bitstream, the fifth indication information being used for indicating whether motion compensation is allowed for the to-be-decoded point cloud;

[0298] In a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, and the fifth indication information indicates that motion compensation is allowed for the to-be-decoded point cloud, the second indication information in the bitstream is decoded.

[0299] In an implementation manner, the fourth indication information in the bitstream is decoded in a case where sixth indication information in the bitstream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud.

[0300] Or,

[0301] The fifth indication information in the bitstream is decoded in a case where sixth indication information in the bitstream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud.

[0302] The sixth indication information is used to indicate whether inter-frame prediction is allowed for the to-be-decoded point cloud.

[0303] In an implementation manner, the third indication information in the bitstream is decoded, including:

[0304] In a case where fourth indication information in the bitstream indicates that inter-frame prediction is allowed for the target point cloud frame, the third indication information in the bitstream is decoded, and the fourth indication information is used to indicate whether inter-frame prediction is allowed for the target point cloud frame.

[0305] In an implementation manner, in a case where it is determined that the target point cloud slice enables motion compensation, before the motion compensation is performed on the reference point cloud slice corresponding to the target point cloud slice, the method further includes:

[0306] In a case where it is determined that the target point cloud frame enables motion compensation, motion compensation is performed on a reference point cloud frame corresponding to the target point cloud frame, to obtain a compensated reference point cloud frame.

[0307] The reference point cloud slice corresponding to the target point cloud slice is determined based on the compensated reference point cloud frame.

[0308] In an implementation manner, the first indication information in the bitstream is decoded, including:

[0309] The seventh indication information in the bitstream is decoded, and the seventh indication information is used to indicate whether inter-frame prediction is allowed for the target point cloud frame.

[0310] In a case where the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, the first indication information in the bitstream is decoded.

[0311] In an embodiment, the decoding the first indication information in the bitstream further includes:

[0312] decoding eighth indication information in the bitstream, the eighth indication information being used to indicate whether motion compensation is allowed for the to-be-decoded point cloud;

[0313] the decoding the first indication information in the bitstream when the seventh indication information indicates that inter prediction is allowed for the target point cloud frame includes:

[0314] the decoding the first indication information in the bitstream when the eighth indication information indicates that motion compensation is allowed for the to-be-decoded point cloud and the seventh indication information indicates that inter prediction is allowed for the target point cloud frame.

[0315] In an embodiment, before the performing motion compensation on the reference point cloud frame corresponding to the target point cloud frame, the method further includes:

[0316] decoding ninth indication information in the bitstream, the ninth indication information being used to indicate whether motion compensation is enabled for the target point cloud frame;

[0317] determining whether motion compensation is enabled for the target point cloud frame based on the ninth indication information.

[0318] In an embodiment, the decoding the ninth indication information in the bitstream includes:

[0319] the decoding the ninth indication information in the bitstream when the seventh indication information in the bitstream indicates that inter prediction is performed on the target point cloud frame and the eighth indication information in the bitstream indicates that motion compensation is allowed for the to-be-decoded point cloud;

[0320] wherein the seventh indication information is used to indicate whether inter prediction is performed on the target point cloud frame, and the eighth indication information is used to indicate whether motion compensation is allowed for the to-be-decoded point cloud.

[0321] It should be noted that the motion compensation in the above embodiments can refer to global motion compensation, or local motion compensation, or other types of motion compensation.

[0322] Optionally, the performing motion compensation on the reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice when it is determined that motion compensation is enabled for the target point cloud slice includes:

[0323] In a case where it is determined that the target point cloud slice enables global motion compensation, performing global motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice.

[0324] Optionally, before the performing motion compensation on the reference point cloud slice corresponding to the target point cloud slice in a case where it is determined that the target point cloud slice enables motion compensation, the method further includes:

[0325] decoding first indication information in a bitstream, the first indication information being used to indicate whether the target point cloud slice enables global motion compensation;

[0326] determining whether the target point cloud slice enables global motion compensation based on the first indication information.

[0327] Optionally, the decoding the first indication information in the bitstream includes:

[0328] decoding second indication information in the bitstream, the second indication information being used to indicate whether global motion compensation is allowed for the target point cloud frame;

[0329] in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame, decoding first indication information in a bitstream.

[0330] Optionally, the decoding the first indication information in the bitstream further includes:

[0331] decoding third indication information in the bitstream, the third indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud slice;

[0332] the decoding the first indication information in the bitstream in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame includes:

[0333] in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame and the third indication information indicates that inter-frame prediction is allowed for the target point cloud slice, decoding first indication information in a bitstream.

[0334] Optionally, the decoding the second indication information in the bitstream includes:

[0335] decoding fourth indication information in the bitstream, the fourth indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud frame;

[0336] decode fifth indication information in the code stream, the fifth indication information being used for indicating whether global motion compensation is allowed for the to-be-decoded point cloud;

[0337] decode second indication information in the code stream in a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame and the fifth indication information indicates that global motion compensation is allowed for the to-be-decoded point cloud.

[0338] Optionally, the decoding of the fourth indication information in the code stream comprises: decoding the fourth indication information in the code stream in a case where sixth indication information in the code stream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud.

[0339] or,

[0340] the decoding of the fifth indication information in the code stream comprises: decoding the fifth indication information in the code stream in a case where sixth indication information in the code stream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud.

[0341] The sixth indication information is used for indicating whether inter-frame prediction is allowed for the to-be-decoded point cloud.

[0342] Optionally, the decoding of the third indication information in the code stream comprises:

[0343] decode third indication information in the code stream in a case where fourth indication information in the code stream indicates that inter-frame prediction is allowed for the target point cloud frame, the fourth indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame.

[0344] Optionally, the method further comprises, before the performing of the motion compensation on the reference point cloud slice corresponding to the target point cloud slice in a case where it is determined that the target point cloud slice enables motion compensation:

[0345] perform global motion compensation on a reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame in a case where it is determined that the target point cloud frame enables global motion compensation.

[0346] determine the reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

[0347] Optionally, the decoding of the first indication information in the code stream comprises:

[0348] decode seventh indication information in the code stream, the seventh indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame.

[0349] In a case where the seventh indication information indicates that the inter prediction is allowed for the target point cloud frame, the first indication information in the bitstream is decoded.

[0350] Optionally, the decoding of the first indication information in the bitstream further includes:

[0351] The eighth indication information in the bitstream is decoded, the eighth indication information being used for indicating whether the global motion compensation is allowed for the to-be-decoded point cloud.

[0352] The decoding of the first indication information in the bitstream in a case where the seventh indication information indicates that the inter prediction is allowed for the target point cloud frame includes:

[0353] The decoding of the first indication information in the bitstream in a case where the eighth indication information indicates that the global motion compensation is allowed for the to-be-decoded point cloud and the seventh indication information indicates that the inter prediction is allowed for the target point cloud frame.

[0354] Optionally, before the global motion compensation is performed on the reference point cloud frame corresponding to the target point cloud frame, the method further includes:

[0355] The ninth indication information in the bitstream is decoded, the ninth indication information being used for indicating whether the global motion compensation is enabled for the target point cloud frame.

[0356] It is determined, based on the ninth indication information, whether the global motion compensation is enabled for the target point cloud frame.

[0357] Optionally, the decoding of the ninth indication information in the bitstream includes:

[0358] The ninth indication information in the bitstream is decoded in a case where the seventh indication information in the bitstream indicates that the inter prediction is performed on the target point cloud frame and the eighth indication information in the bitstream indicates that the global motion compensation is allowed for the to-be-decoded point cloud.

[0359] The seventh indication information is used for indicating whether the inter prediction is performed on the target point cloud frame, and the eighth indication information is used for indicating whether the global motion compensation is allowed for the to-be-decoded point cloud.

[0360] Optionally, the global motion compensation is performed on the reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame includes:

[0361] The tenth indication information in the bitstream is decoded to obtain a global motion compensation matrix corresponding to the target point cloud frame, the tenth indication information being used for indicating the global motion compensation matrix.

[0362] perform global motion compensation on a reference point cloud frame corresponding to the target point cloud frame based on the global motion compensation matrix to obtain a compensated reference point cloud frame.

[0363] It should be noted that the embodiment is a decoding side corresponding to the embodiment shown in FIG. 13, and the specific implementation can refer to the related description of the embodiment shown in FIG. 13. To avoid repeated description, the embodiment will not be described again, and the same beneficial effects can be achieved.

[0364] The point cloud coding method is described below through several specific embodiments:

[0365] Embodiment 1:

[0366] Encoding end:

[0367] Each Boolean variable in the following steps can be represented by false or true to indicate that the enable identifier is turned on. In the following description, true indicates that the enable identifier is turned on:

[0368] Step (11): Determine and encode the sequence parameter set (sps) parameters.

[0369] An sps layer inter-frame prediction enable identifier is set and the value is determined. The identifier is a bool type variable, indicating whether the to-be-encoded point cloud sequence allows inter-frame prediction. For example, sps_inter_frame_prediction_enabled_flag can be used to represent it.

[0370] An sps layer global motion enable identifier is set and the value is determined. The identifier is a bool type variable, indicating whether the to-be-encoded point cloud sequence allows global motion compensation. For example, sps_globalMotionEnabled can be used to represent it.

[0371] The sps layer inter-frame prediction enable identifier sps_inter_frame_prediction_enabled_flag is encoded. If sps_inter_frame_prediction_enabled_flag is false, the sps layer global motion enable identifier sps_globalMotionEnable does not need to be encoded, and is set to false in the subsequent determination. Otherwise, the value needs to be determined and encoded.

[0372] Step (12): Determine and encode the geometry parameter set (gps) parameters.

[0373] A gps layer inter frame prediction enabled flag is set and determined, which is a bool variable indicating whether the to-be-encoded point cloud is allowed to perform inter frame prediction, such as gps_inter_frame_prediction_enabled_flag.

[0374] A gps layer global motion enabled flag is set and determined, which is a bool variable indicating whether the to-be-encoded point cloud is allowed to perform global motion compensation, such as gps_globalMotionEnabled.

[0375] A gps layer local motion enabled flag is set and determined, which is a bool variable indicating whether the to-be-encoded point cloud is allowed to perform local motion compensation, such as gps_localMotionEnabled.

[0376] If sps_inter_frame_prediction_enabled_flag is false, gps_inter_frame_prediction_enabled_flag does not need to be encoded, otherwise, the value thereof needs to be determined and encoded; if gps_inter_frame_prediction_enabled_flag or sps_globalMotionEnable is false, gps_globalMotionEnabled does not need to be encoded and is set to false in the subsequent determination, otherwise, the value thereof needs to be determined and encoded; if gps_inter_frame_prediction_enabled_flag is false, gps_localMotionEnabled does not need to be encoded and is set to false in the subsequent determination, otherwise, the value thereof needs to be determined and encoded.

[0377] Step (13): encode the geometry data unit (GDU) parameter.

[0378] A slice layer inter frame prediction enabled flag is set and determined, which is a bool variable indicating whether the to-be-encoded slice can perform inter frame prediction, such as gbh_interPredictionEnabledFlag.

[0379] A slice layer global motion enabled flag is set and determined, which is a bool variable indicating whether the to-be-encoded slice performs global motion compensation, such as gbh_globalMotionEnabled.

[0380] A slice layer global motion matrix variable, such as gbh_gm_matrix, is set, and a slice layer global motion translation vector variable, such as gbh_gm_trans, is set, which are used to compensate the reference slice.

[0381] If gps_inter_frame_prediction_enabled_flag is false, gbh_interPredictionEnabledFlag is not coded and is set to false in the subsequent process, and its value needs to be determined and coded. If gps_globalMotionEnabled or gbh_interPredictionEnabledFlag is false, the value of gbh_globalMotionEnabled is false and does not need to be coded, otherwise its value needs to be determined and coded; if gbh_globalMotionEnabled is false, the global motion rotation matrix and translation vector do not need to be coded, otherwise the values of the global motion rotation matrix gbh_gm_matrix and translation vector gbh_gm_trans need to be determined and coded.

[0382] Step (14): Acquisition and use of global motion compensation matrix.

[0383] If the current slice to be coded enables global motion compensation, the global motion compensation matrix needs to be calculated and coded. When calculating the global motion compensation matrix, the LMS algorithm can be used according to the reference slice and the current slice to obtain the global motion compensation matrix, which is coded in the geometry data unit header (GDU). The reference slice is compensated to obtain the compensated reference slice using the global motion compensation matrix. The reference slice is compensated to obtain the compensated reference slice (all points (X, Y, Z) in the reference slice are rotated and translated to obtain compensated points (X', Y', Z'), and all compensated points constitute the compensated reference slice) after global motion compensation. The calculation formula is as follows:

[0384] wherein, is the rotation matrix, is the translation vector.

[0385] Step (15): Local motion compensation.

[0386] PU (Prediction Unit) is a block obtained by dividing the point cloud frame (or slice) to be coded according to a certain rule, such as an octree node obtained by dividing according to an octree.

[0387] Set PU as the processing unit for local motion compensation of the to-be-encoded point cloud frame (or slice);

[0388] The minimum value of the side length of the PU should be greater than the size of the minimum voxel side length obtained by dividing the to-be-encoded point cloud frame (or slice) according to a certain rule. At this time, the side length of the PU can be represented by min_PU_size. In the following description, when the size of the node to which the to-be-encoded point cloud frame (or slice) is divided according to a certain rule is equal to min_PU_size, the node is referred to as minPU.

[0389] Set LPU as the maximum processing unit for local motion compensation of the to-be-encoded point cloud frame (or slice), and the side length of the LPU is <= the side length of the to-be-encoded point cloud frame (or slice) when no division is performed.

[0390] If local motion compensation is enabled, the reference slice needs to be divided to obtain a reference node.

[0391] When selecting a reference slice, if the reference slice is subjected to global motion compensation, the reference slice subjected to global motion compensation is selected as the reference slice, otherwise the reference slice not subjected to global motion compensation is selected as the reference slice.

[0392] Before encoding the occupancy code of the to-be-encoded node, it is necessary to determine whether local motion compensation is to be performed on the reference node. According to the determination, a reference node subjected to local motion compensation or not subjected to local motion compensation is obtained, and then prediction information is generated according to the reference node as the context information of the occupancy code of the to-be-encoded node. Whether local motion compensation is to be performed on the reference node is determined in the following three cases:

[0393] (1) If the node obtained by multi-branch division is LPU:

[0394] Determine whether local motion compensation is to be performed on the reference node LPU ref of the current LPU. For example, whether the number of points in the reference node LPU ref of the LPU is greater than a threshold th can be used to determine whether the LPU ref needs to be subjected to local motion compensation. If it is greater than th, the LPU ref needs to be subjected to local motion compensation. Otherwise, the LPU

[0395] Set an identifier for whether the LPU is to be divided, such as split_flag, which can be 0 or 1, and both can be used to indicate that the LPU is to be divided. Here, split_flag = 1 indicates that the LPU is to be divided;

[0396] A variable is set to locally motion compensate the reference node, such as using motion vector MV LPU to represent the variable.

[0397] When it is needed to locally motion compensate the reference node LPU ref of LPU, the value of split_flag needs to be determined and coded.

[0398] If split_flag = 0, LPU is not split, in this case, motion vector MV LPU is coded, LPU LPU is compensated according to MV ref , and the points in LPU ref are marked as compensated, and the prediction information from the compensated reference node is used as the context to code the occupancy code of the current node.

[0399] If split_flag = 1, LPU is split, split_flags = 1 is coded, and the prediction information from the uncompensated reference node is used as the context to code the occupancy code of the current node.

[0400] (2) If the node split by multi-tree is PU:

[0401] (a) If the points in the reference node PU ref of the current node PU need to be compensated but are not compensated:

[0402] If PU is minPU, split_flags is not coded, and split_flags is inferred as 0.

[0403] If PU is not minPU, split_flags needs to be coded.

[0404] If split_flags = 0, PU is not split, MV PU is coded, PU PU is compensated according to MV ref , and the points in PU ref are marked as compensated, and the prediction information from the compensated reference node is used as the context to code the occupancy code of the current node.

[0405] If split_flags = 1, PU is split, and the prediction information from the uncompensated reference node is used as the context to code the occupancy code of the current node.

[0406] (b) If the points in the reference node PU ref of the current node PU need to be compensated and are compensated:

[0407] The prediction information obtained from the compensated reference node is used as the occupancy code of the current node in context encoding.

[0408] (c) If the reference node PU of the current node PU ref does not need to be compensated:

[0409] The prediction information obtained from the uncompensated reference node is used as the occupancy code of the current node in context encoding.

[0410] (3) If the node obtained by the multi-ary split is not a PU (or LPU):

[0411] It is determined whether the reference node node ref is compensated or not. If the reference node node ref is compensated, the prediction information obtained from the compensated reference frame is used as the occupancy code of the current node in context encoding. Otherwise, the prediction information obtained from the uncompensated reference node is used as the occupancy code of the current node in context encoding.

[0412] Step (16): Obtaining and using the inter-frame information.

[0413] When the inter-frame prediction is enabled and the current frame (or slice) is encoded, the inter-frame information is used to encode the current frame (or slice).

[0414] The inter-frame information can be the reference node information obtained by the multi-ary split of the reference frame. When the occupancy code of the current frame (or slice) obtained by the multi-ary split is encoded, the reference node information is used to encode the occupancy code.

[0415] The reference node information can be the point number information of the reference node. A variable predOccupancy[i] is set to indicate whether there is a point in the sub-node i of the reference node, and a variable predOccupancyStrong[i] is set to indicate whether the point number in the sub-node i of the reference node is greater than a threshold th. If the reference node of the current node to be encoded is node ref , and there is a point in the sub-node i (i takes values from 0 to 7) obtained by splitting node ref , the variable predOccupancy[i] is set to 1, i.e., the sub-node i of the current node to be encoded is predicted to be occupied. If the point number in the sub-node i obtained by splitting node ref is greater than the threshold th, predOccupancyStrong[i] is 1, i.e., the sub-node i of the current node to be encoded is predicted to be strongly occupied (the possibility of the sub-node i of the current frame being occupied is very large).

[0416] predOccupancy[i] and predOccupancyStrong[i] can be used as context to encode whether the child node i of the node to be encoded is occupied, for example, can be added to the main information of the inter-frame information of the current frame to encode whether the child node i is occupied.

[0417] In the dynamic OBUF, the context information is composed of the coded syntax elements, and can be divided into main information and secondary information according to the importance of the information. Some information in the secondary information will be reduced in the process of dynamic reduction. When inter-frame prediction is performed, the inter-frame information is added to the main information of the dynamic OBUF context information, and the context after recombination of the main information and the reduced secondary information is used as the input of the OBUF, which is mapped to the encoder for encoding. When the binary syntax element is encoded, the probability value corresponding to the encoder is also updated.

[0418] At the decoding end:

[0419] Each Boolean variable in the following steps can be represented by false or true to indicate that the enable identifier is turned on. In the following description, true indicates that the enable identifier is turned on:

[0420] Step (21): decode the parameters of the sequence parameter set (SPS).

[0421] As shown in Table 1, the sps layer inter-frame prediction enable identifier sps_inter_frame_prediction_enabled_flag is decoded, and if sps_inter_frame_prediction_enabled_flag is true, the sps layer global motion enable identifier sps_globalMotionEnable is decoded.

[0422] Table 1

[0423] Step (22): decode the geometry parameter set (GPS) parameters.

[0424] gps_inter_frame_prediction_enabled_flag is true, decode the gps layer global motion enabled flag, gps_globalMotionEnabled, if gps_globalMotionEnabled is true, decode the global motion matrix, gps_gm_matrix, and the global motion vector, gps_gm_trans.

[0425] Table 2

[0426] Step (23): decode the geometry data unit header (GDU) parameters.

[0427] gps_inter_frame_prediction_enabled_flag is true, decode the gbh_interPredictionEnabledFlag;

[0428] gps_globalMotionEnabled and gbh_interPredictionEnabledFlag are true, decode the gbh_globalMotionEnabled, if gbh_globalMotionEnabled is true, decode the global motion matrix, gbh_gm_matrix, and the global motion vector, gbh_gm_trans.

[0429] Table 3

[0430] Step (24): global motion compensation matrix acquisition and utilization.

[0431] If the slice enables global motion compensation, the global motion compensation matrix needs to be decoded, and before decoding the occupancy code of the point cloud, the global motion compensation matrix is used to compensate the reference slice to obtain the compensated reference slice. After the reference slice is compensated by global motion compensation, the compensated reference slice (all points (X, Y, Z) in the reference slice are compensated to compensated points (X', Y', Z') after rotation and translation, and all compensated points constitute the compensated reference slice) is obtained. The calculation formula is as follows:

[0432] wherein, is a rotation matrix, is a translation vector.

[0433] Step (25): Local motion compensation.

[0434] If local motion compensation is enabled, the reference slice needs to be split to get the reference nodes.

[0435] When selecting the reference slice, if the reference slice is compensated by global motion compensation, the reference slice compensated by global motion compensation is selected as the reference slice, otherwise the reference slice not compensated by global motion compensation is selected as the reference slice.

[0436] Before decoding the placeholder code of the node to be decoded, it is needed to judge whether the reference node needs to be compensated by local motion compensation, and the reference node compensated by local motion compensation or not compensated by local motion compensation is obtained according to the judgment, and then prediction information is generated according to the reference node as the context information for decoding the placeholder code of the node to be decoded. Whether the reference node needs to be compensated by local motion compensation is divided into the following three cases:

[0437] (1) If the node to be decoded is LPU:

[0438] It is needed to judge whether the reference node LPU ref of the current LPU needs to be compensated by local motion compensation. For example, it can be judged according to whether the number of points in the reference node LPU ref of the LPU is greater than a threshold th. If it is greater than th, the LPU ref needs to be compensated by local motion compensation. Otherwise, the LPU ref does not need to be compensated by local motion compensation.

[0439] When the reference node LPU ref of the LPU needs to be compensated by local motion compensation, the value of split_flag needs to be decoded.

[0440] If split_flag = 0, the LPU is not split, and in this case, the motion vector MV LPU needs to be decoded, the LPU ref is compensated according to MV LPU , and it is marked that the points in the LPU ref have been compensated, and the prediction information is obtained by using the compensated reference node as the context to decode the placeholder code of the current node.

[0441] If split_flag = 1, the LPU is split, and the prediction information is obtained by using the uncompensated reference node as the context to decode the placeholder code of the current node.

[0442] (2) If the node to be decoded is PU:

[0443] (a) If the points in the reference node PU ref of the current node PU need to be compensated and have not been compensated:

[0444] If PU is minPU, split_flags is not coded, split_flags is inferred to be 0.

[0445] If PU is not minPU, split_flags needs to be decoded.

[0446] If split_flags = 0, PU is not split,

[0447] Decoding MV PU , according to MV PU , compensating PU ref , and marking the points in PU ref as compensated, using the compensated reference node to get the prediction information as the context to decode the occupancy code of the current node.

[0448] If split_flags = 1, PU is split, using the uncompensated reference node to get the prediction information as the context to decode the occupancy code of the current node.

[0449] (b) If the points in the reference node PU ref of the current node PU need to be compensated and have been compensated:

[0450] Using the compensated reference node to get the prediction information as the context to decode the occupancy code of the current node.

[0451] (c) If the points in the reference node PU ref of the current node PU do not need to be compensated:

[0452] Using the uncompensated reference node to get the prediction information as the context to decode the occupancy code of the current node.

[0453] (3) If the node to be decoded is not a PU (or LPU):

[0454] Deciding whether the reference node node ref has been compensated or not, if node ref has been compensated, using the compensated reference node to get the prediction information as the context to decode the occupancy code of the current node. Otherwise, using the uncompensated reference node to get the prediction information as the context to decode the occupancy code of the current node.

[0455] Step (26): Getting and using the inter-frame information.

[0456] When inter-frame prediction is enabled, decoding the current frame (or slice), using the inter-frame information to decode the current frame (or slice).

[0457] The inter-frame information can be reference node information obtained by reference frame multi-ary partitioning. When decoding the placeholder code obtained by multi-ary partitioning the current frame (or slice), the reference node information is used to decode the placeholder code.

[0458] The reference node information can be point number information of the reference node. A variable predOccupancy[i] is set to indicate whether there is a point in the i-th child node of the reference node, and a variable predOccupancyStrong[i] is set to indicate whether the point number in the i-th child node of the reference node is greater than a threshold th. If the reference node of the current node to be decoded is node ref , and there is a point in the i-th child node (i=0, 1, 2, 3, 4, 5, 6, 7) obtained by partitioning node ref , the variable predOccupancy[i] is set to 1, i.e., it is predicted that the i-th child node of the current node to be decoded is occupied. If the point number in the i-th child node obtained by partitioning node ref is greater than the threshold th, predOccupancyStrong[i] is 1, i.e., it is predicted that the i-th child node of the current node to be decoded is strongly occupied (the possibility of the i-th child node of the current frame being occupied is very large).

[0459] predOccupancy[i] and predOccupancyStrong[i] can be used as contexts to decode whether the i-th child node of the node to be decoded is occupied. For example, they can be used as main information of inter-frame information to join the dynamic OBUF context information to decode whether the i-th child node of the current frame is occupied.

[0460] In the dynamic OBUF, the context information is composed of decoded syntax elements, and can be divided into main information and secondary information according to the importance of the information. Some information in the secondary information will be reduced in the dynamic reduction process. When inter-frame prediction is performed, the inter-frame information is added to the main information of the dynamic OBUF context information, and the context obtained by recombining the main information and the reduced secondary information is used as the input of the OBUF, which is mapped to the decoder for decoding. After decoding the binary syntax element, the probability value of the corresponding decoder is also updated.

[0461] Embodiment 2

[0462] Encoding end

[0463] Step (31): Determine and encode sequence parameter set (sps) parameters.

[0464] An sps layer inter-frame prediction enabled flag is set and its value is determined, which is a bool type variable indicating whether the to-be-encoded point cloud sequence is allowed to perform inter-frame prediction, such as sps_inter_frame_prediction_enabled_flag.

[0465] An sps layer global motion enabled flag is set and its value is determined, which is a bool type variable indicating whether the to-be-encoded point cloud sequence is allowed to perform global motion compensation, such as sps_globalMotionEnabled.

[0466] The sps layer inter-frame prediction enabled flag sps_inter_frame_prediction_enabled_flag is encoded, if sps_inter_frame_prediction_enabled_flag is false, the sps layer global motion enabled flag sps_globalMotionEnable is not needed to be encoded and is set to false in the subsequent determination, otherwise its value needs to be determined and encoded.

[0467] Step (32): Determine and encode the geometry parameter set (gps) parameters.

[0468] A gps layer inter-frame prediction enabled flag is set and its value is determined, which is a bool type variable indicating whether the to-be-encoded point cloud is allowed to perform inter-frame prediction, such as gps_inter_frame_prediction_enabled_flag.

[0469] A gps layer inter-frame prediction flag is set and its value is determined, which is a bool type variable indicating whether the to-be-encoded point cloud can perform inter-frame prediction (for example, when the current frame is an independent frame (I frame), inter-frame prediction cannot be performed), such as frame_inter_prediction.

[0470] A gps layer global motion enabled flag is set and its value is determined, which is a bool type variable indicating whether the to-be-encoded point cloud is allowed to perform global motion compensation, such as gps_globalMotionEnabled.

[0471] A gps layer local motion enabled flag is set and its value is determined, which is a bool type variable indicating whether the to-be-encoded point cloud is allowed to perform local motion compensation, such as gps_localMotionEnabled.

[0472] If sps_inter_frame_prediction_enabled_flag is false, gps_inter_frame_prediction_enabled_flag does not need to be coded, otherwise, its value needs to be determined and coded.

[0473] If gps_inter_frame_prediction_enabled_flag is false, frame_inter_prediction does not need to be coded and is set to false in the following decision, otherwise, its value needs to be determined and coded.

[0474] If frame_inter_prediction or sps_globalMotionEnable is false, gps_globalMotionEnabled does not need to be coded and is set to false in the following decision, otherwise, its value needs to be determined and coded. If gps_globalMotionEnabled is true, the values of global motion rotation matrix gps_gm_matrix and translation vector gps_gm_trans need to be determined and coded.

[0475] Step (33): Obtaining and using global motion compensation matrix.

[0476] If gps.globalMotionEnabled is true, the reference frame needs to be compensated by global motion. The global motion compensation matrix can be used to compensate the reference frame. The global motion compensation matrix can be calculated by LMS algorithm according to the reference frame and the current frame. The obtained global motion compensation matrix is coded in the gps layer. The reference frame is compensated by using the global motion compensation matrix to obtain the compensated reference frame. The reference frame is compensated after global motion to obtain the compensated reference frame (all points (X, Y, Z) in the reference frame are rotated and translated to obtain compensated points (X', Y', Z'), and all compensated points constitute the compensated reference frame). The calculation formula is as follows:

[0477] wherein, is a rotation matrix, is a translation vector.

[0478] Step (34): Coding geometry data unit header (GDU) parameters.

[0479] A slice layer global motion enable identifier is set and the value is determined. The identifier is a bool type variable indicating whether the to-be-coded slice is compensated by global motion, such as gbh_globalMotionEnabled.

[0480] A slice layer global motion matrix variable, such as gbh_gm_matrix, is set, and a slice layer global motion translation vector variable, such as gbh_gm_trans, is set. These two variables are used to compensate the reference slice.

[0481] If frame_inter_prediction or sps_globalMotionEnable is false, gbh_globalMotionEnabled does not need to be encoded and is set to false in the subsequent process. Otherwise, the value of gbh_globalMotionEnabled needs to be determined and encoded. If gbh_globalMotionEnabled is false, the global motion rotation matrix gbh.gm_matrix and the translation vector gbh.gm_trans do not need to be encoded. Otherwise, the values of the global motion rotation matrix gbh_gm_matrix and the translation vector gbh_gm_trans need to be determined and encoded.

[0482] Step (35): Obtaining and using the global motion compensation matrix.

[0483] If the current slice to be encoded has enabled global motion compensation, the global motion compensation matrix needs to be calculated and encoded. The global motion compensation matrix can be calculated using the LMS (Least Mean Square) algorithm according to the reference slice and the current slice. When selecting the reference slice, if the reference frame has been subjected to global motion compensation, the slice obtained by dividing the global motion compensated reference frame is used as the reference slice. Otherwise, the slice obtained by dividing the reference frame that has not been subjected to global motion compensation is used as the reference slice. The obtained global motion compensation matrix is encoded in the geometry data unit header (GDU). The reference slice is compensated using the global motion compensation matrix to obtain the compensated reference slice. After the global motion compensation of the reference slice, the compensated reference slice (all points (X, Y, Z) in the reference slice are subjected to rotation and translation to obtain compensated points (X', Y', Z'), and all compensated points constitute the compensated reference slice) is obtained. The calculation formula is as follows:

[0484] wherein, is the rotation matrix, is the translation vector.

[0485] Steps (36) to (37) are consistent with steps (35) to (36) of the encoding end in Embodiment 1.

[0486] Decoding end:

[0487] Step (41): Determine and decode Sequence Parameter Set (SPS) parameters.

[0488] As shown in Table 4, the inter-frame prediction enabled flag sps_inter_frame_prediction_enabled_flag is decoded for the SPS layer, and the global motion enabled flag sps_globalMotionEnable is decoded.

[0489] Table 4

[0490] Step (42): Determine and decode Geometry Parameter Set (GPS) parameters.

[0491] As shown in Table 5, the inter-frame prediction enabled flag gps_inter_frame_prediction_enabled_flag is decoded for the GPS layer if the inter-frame prediction enabled flag sps_inter_frame_prediction_enabled_flag is true, the inter-predictable flag frame_inter_prediction is decoded if the inter-frame prediction enabled flag gps_inter_frame_prediction_enabled_flag is true, the global motion enabled flag gps_globalMotionEnabled is decoded if the inter-predictable flag frame_inter_prediction and the global motion enabled flag sps_globalMotionEnable are true, and the global motion matrix gps_gm_matrix and the global motion vector gps_gm_trans are decoded if the global motion enabled flag gps_globalMotionEnabled is true.

[0492] Table 5

[0493] Step (43): Obtain and use the global motion compensation matrix.

[0494] If the global motion enabled flag gps.globalMotionEnabled is true, global motion compensation is needed for the reference frame. The global motion compensation matrix can be used to compensate the reference frame. The global motion compensation matrix is obtained by decoding, and the compensated reference frame is obtained by using the global motion compensation matrix to compensate the reference frame before the slice is divided. After the global motion compensation of the reference frame, all points (X, Y, Z) in the compensated reference frame are obtained by rotating and translating the compensated points (X', Y', Z'), and all the compensated points constitute the compensated reference frame. The calculation formula is as follows:

[0495] wherein, is a rotation matrix, is a translation vector.

[0496] Step (44): Decoding geometry data unit header (GDU) parameters.

[0497] As shown in Table 6, if frame_inter_prediction and sps_globalMotionEnable are both true, gbh_globalMotionEnabled is decoded. If gbh_globalMotionEnabled is true, the global motion matrix gbh_gm_matrix and the global motion vector gbh_gm_trans at the slice level are decoded.

[0498] Table 6

[0499] Step (45): Obtaining and using the global motion compensation matrix.

[0500] If the slice enables global motion compensation, the global motion compensation matrix needs to be decoded. Before decoding the occupancy code of the point cloud, the global motion compensation matrix is used to compensate the reference slice to obtain the compensated reference slice. When selecting the reference slice, if the reference frame is compensated by global motion compensation, the slice obtained by dividing the global motion compensated reference frame is used as the reference slice, otherwise the slice obtained by dividing the reference frame without global motion compensation is used as the reference slice. After the reference slice is compensated by global motion compensation, the compensated reference slice (all points (X, Y, Z) in the reference slice are compensated to points (X', Y', Z') after rotation and translation, and all compensated points constitute the compensated reference slice) is obtained. The calculation formula is as follows:

[0501] wherein, is a rotation matrix, is a translation vector.

[0502] Steps (36) to (37): consistent with steps (35) to (36) of the decoding end in Embodiment 1.

[0503] In the related art, the global motion advanced syntax element is not flexible enough, and in specific scenarios, not all divided slices need to be globally motion compensated. Meanwhile, because there is only a frame-level global motion enabling identifier, the slices without global motion also need to be globally motion compensated and motion compensation information is encoded, and redundant information is transmitted. Embodiments of the present application set inter prediction, global motion and local motion enabling identifiers at multiple levels, and define the bitstream structure of the to-be-encoded syntax elements related to the added enabling identifiers, so that the syntax elements are more complete and the point cloud inter-frame encoding and decoding process is more complete.

[0504] It should be noted that the point cloud encoding method provided in the embodiments of the present application can be executed by a point cloud encoding device, or a control module in the point cloud encoding device for executing the point cloud encoding method. In the embodiments of the present application, the point cloud encoding method executed by the point cloud encoding device is taken as an example to illustrate the point cloud encoding device provided in the embodiments of the present application.

[0505] Referring to FIG. 15, FIG. 15 is a structural diagram of a point cloud encoding device provided in an embodiment of the present application, as shown in FIG. 15, the point cloud encoding device 300 comprises:

[0506] The division module 301 is configured to perform point cloud division processing on a target point cloud frame of a to-be-encoded point cloud to obtain a plurality of point cloud slices.

[0507] The first compensation module 302 is configured to, in a case where it is determined that a target point cloud slice meets a first motion compensation condition, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices.

[0508] The first encoding module 303 is configured to perform inter prediction encoding on the target point cloud slice based on the compensated reference point cloud slice.

[0509] Optionally, the first motion compensation condition comprises a global motion compensation condition, and the first compensation module is specifically configured to:

[0510] In a case where it is determined that the target point cloud slice meets the global motion compensation condition, perform global motion compensation on the reference point cloud slice corresponding to the target point cloud slice to obtain the compensated reference point cloud slice.

[0511] Optionally, the device further comprises:

[0512] The second encoding module is configured to encode first indication information, the first indication information being used to indicate whether the target point cloud slice enables global motion compensation, and a bitstream corresponding to the to-be-encoded point cloud comprising an encoding result of the first indication information.

[0513] In a case that global motion compensation is performed on a reference point cloud slice corresponding to the target point cloud slice, the first indication information indicates that the target point cloud slice enables the global motion compensation.

[0514] Optionally, the second encoding module comprises:

[0515] a first encoding unit, configured to encode second indication information, the second indication information being used to indicate whether global motion compensation is allowed on the target point cloud frame, and the code stream further comprising an encoding result of the second indication information;

[0516] a second encoding unit, configured to encode the first indication information in a case that the second indication information indicates that the global motion compensation is allowed on the target point cloud frame.

[0517] Optionally, the second encoding module further comprises:

[0518] a third encoding unit, configured to encode third indication information, the third indication information being used to indicate whether inter-frame prediction is allowed on the target point cloud slice, and the code stream further comprising an encoding result of the third indication information;

[0519] The second encoding unit is specifically configured to:

[0520] encode the first indication information in a case that the second indication information indicates that the global motion compensation is allowed on the target point cloud frame, and the third indication information indicates that the inter-frame prediction is allowed on the target point cloud slice.

[0521] Optionally, the first encoding unit comprises:

[0522] a first encoding subunit, configured to encode fourth indication information, the fourth indication information being used to indicate whether inter-frame prediction is allowed on the target point cloud frame, and the code stream further comprising an encoding result of the fourth indication information;

[0523] a second encoding subunit, configured to encode fifth indication information, the fifth indication information being used to indicate whether global motion compensation is allowed on the to-be-encoded point cloud, and the code stream further comprising an encoding result of the fifth indication information;

[0524] a third encoding subunit, configured to encode the second indication information in a case that the fourth indication information indicates that the inter-frame prediction is allowed on the target point cloud frame, and the fifth indication information indicates that the global motion compensation is allowed on the to-be-encoded point cloud.

[0525] Optionally, the code stream further comprises an encoding result of sixth indication information, the sixth indication information being used for indicating whether inter-frame prediction is allowed for the to-be-encoded point cloud.

[0526] The first encoding subunit is specifically configured to: in a case where the sixth indication information indicates that inter-frame prediction is allowed for the to-be-encoded point cloud, encode fourth indication information.

[0527] Or,

[0528] The second encoding subunit is specifically configured to: in a case where the sixth indication information indicates that inter-frame prediction is allowed for the to-be-encoded point cloud, encode fifth indication information.

[0529] Optionally, the code stream further comprises an encoding result of fourth indication information, the fourth indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame, and the third encoding unit is specifically configured to:

[0530] in a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, encode third indication information.

[0531] Optionally, the apparatus further comprises:

[0532] The second compensation module is configured to, in a case where it is determined that the target point cloud frame satisfies a second motion compensation condition, perform global motion compensation on a reference point cloud frame corresponding to the target point cloud frame, to obtain a compensated reference point cloud frame.

[0533] The determination module is configured to determine a reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

[0534] Optionally, the second encoding module comprises:

[0535] The fourth encoding unit is configured to encode seventh indication information, the seventh indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame, and the code stream further comprises an encoding result of the seventh indication information.

[0536] The fifth encoding unit is configured to, in a case where the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, encode the first indication information.

[0537] Optionally, the second encoding module further comprises:

[0538] The sixth encoding unit is configured to encode eighth indication information, the eighth indication information being used for indicating whether global motion compensation is allowed for the to-be-encoded point cloud, and the code stream further comprises an encoding result of the eighth indication information.

[0539] The fifth encoding unit is specifically configured to:

[0540] In a case where the eighth indication information indicates that global motion compensation is allowed for the point cloud to be encoded and the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, the first indication information is encoded.

[0541] Optionally, the apparatus further includes:

[0542] The third encoding module is configured to encode ninth indication information, the ninth indication information being used to indicate whether global motion compensation is enabled for the target point cloud frame.

[0543] In a case where global motion compensation is performed on a reference point cloud frame corresponding to the target point cloud frame, the ninth indication information indicates that global motion compensation is enabled for the target point cloud frame.

[0544] Optionally, the bitstream further includes an encoding result of seventh indication information and an encoding result of eighth indication information, the seventh indication information being used to indicate whether inter-frame prediction is performed on the target point cloud frame, and the eighth indication information being used to indicate whether global motion compensation is allowed for the point cloud to be encoded.

[0545] The third encoding module is specifically configured to:

[0546] In a case where the seventh indication information indicates that inter-frame prediction is performed on the target point cloud frame and the eighth indication information indicates that global motion compensation is allowed for the point cloud to be encoded, the ninth indication information is encoded.

[0547] Optionally, the second compensation module is specifically configured to:

[0548] determine a global motion compensation matrix corresponding to the target point cloud frame;

[0549] perform global motion compensation on a reference point cloud frame corresponding to the target point cloud frame based on the global motion compensation matrix, to obtain a compensated reference point cloud frame;

[0550] The bitstream further includes an encoding result of tenth indication information, the tenth indication information being used to indicate the global motion compensation matrix.

[0551] The point cloud encoding apparatus in the embodiments of the present application can be an apparatus, an apparatus with an operating system, or an electronic device, and can also be a component in a terminal, an integrated circuit, or a chip. The apparatus or the electronic device can be a mobile terminal or a non-mobile terminal. Exemplarily, the mobile terminal can include, but is not limited to, the types of terminals listed above, and the non-mobile terminal can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, which are not limited in the embodiments of the present application.

[0552] The point cloud encoding apparatus provided in the embodiments of the present application can implement each process implemented by the method embodiment of FIG. 13 and achieve the same technical effects. To avoid repetition, details are not described herein.

[0553] It should be noted that the point cloud decoding method provided in the embodiments of the present application can be a point cloud decoding apparatus or a control module in the point cloud decoding apparatus for executing the point cloud decoding method. In the embodiments of the present application, the point cloud decoding apparatus executing the mesh decoding method is taken as an example to illustrate the point cloud decoding apparatus provided in the embodiments of the present application.

[0554] Please refer to FIG. 16, which is a structure diagram of a point cloud decoding apparatus provided in the embodiments of the present application. As shown in FIG. 16, the point cloud decoding apparatus 400 includes:

[0555] A partitioning module 401 is configured to perform point cloud partitioning processing on a target point cloud frame of a point cloud to be decoded to obtain a plurality of point cloud slices.

[0556] A first compensation module 402 is configured to, in a case where it is determined that motion compensation is enabled for the target point cloud slice, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices.

[0557] A first decoding module 403 is configured to perform inter-frame prediction decoding on the target point cloud slice based on the compensated reference point cloud slice.

[0558] Optionally, in the case where it is determined that motion compensation is enabled for the target point cloud slice, the first compensation module is specifically configured to:

[0559] In a case where it is determined that global motion compensation is enabled for the target point cloud slice, perform global motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice.

[0560] Optionally, the apparatus further includes:

[0561] a second decoding module, configured to decode first indication information in the code stream, the first indication information being used to indicate whether the target point cloud slice enables global motion compensation;

[0562] determine, based on the first indication information, whether the target point cloud slice enables global motion compensation.

[0563] Optionally, the second decoding module comprises:

[0564] a first decoding unit, configured to decode second indication information in the code stream, the second indication information being used to indicate whether the target point cloud frame is allowed to be subjected to global motion compensation;

[0565] a second decoding unit, configured to decode first indication information in the code stream in a case where the second indication information indicates that the target point cloud frame is allowed to be subjected to global motion compensation.

[0566] Optionally, the second encoding module further comprises:

[0567] a third decoding unit, configured to decode third indication information in the code stream, the third indication information being used to indicate whether the target point cloud slice is allowed to be subjected to inter-frame prediction;

[0568] the second decoding unit is specifically configured to:

[0569] decode first indication information in the code stream in a case where the second indication information indicates that the target point cloud frame is allowed to be subjected to global motion compensation, and the third indication information indicates that the target point cloud slice is allowed to be subjected to inter-frame prediction.

[0570] Optionally, the first decoding unit comprises:

[0571] a first decoding sub-unit, configured to decode fourth indication information in the code stream, the fourth indication information being used to indicate whether the target point cloud frame is allowed to be subjected to inter-frame prediction;

[0572] a second decoding sub-unit, configured to decode fifth indication information in the code stream, the fifth indication information being used to indicate whether the to-be-decoded point cloud is allowed to be subjected to global motion compensation;

[0573] a third decoding sub-unit, configured to decode second indication information in the code stream in a case where the fourth indication information indicates that the target point cloud frame is allowed to be subjected to inter-frame prediction, and the fifth indication information indicates that the to-be-decoded point cloud is allowed to be subjected to global motion compensation.

[0574] Optionally, the first decoding subunit is specifically configured to: in a case where sixth indication information in the bitstream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud, decode fourth indication information in the bitstream.

[0575] Or,

[0576] The second decoding subunit is specifically configured to: in a case where sixth indication information in the bitstream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud, decode fifth indication information in the bitstream.

[0577] The sixth indication information is used to indicate whether inter-frame prediction is allowed for the to-be-decoded point cloud.

[0578] Optionally, the third decoding unit is specifically configured to:

[0579] In a case where fourth indication information in the bitstream indicates that inter-frame prediction is allowed for the target point cloud frame, decode third indication information in the bitstream, the fourth indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud frame.

[0580] Optionally, the apparatus further includes:

[0581] The second compensation module is configured to, in a case where it is determined that the target point cloud frame enables global motion compensation, perform global motion compensation on a reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame.

[0582] The first determination module is configured to determine a reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

[0583] Optionally, the second decoding module includes:

[0584] The fourth decoding unit is configured to decode seventh indication information in the bitstream, the seventh indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud frame.

[0585] The fifth decoding unit is configured to, in a case where the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, decode first indication information in the bitstream.

[0586] Optionally, the second decoding module further includes:

[0587] The sixth decoding unit is configured to decode eighth indication information in the bitstream, the eighth indication information being used to indicate whether global motion compensation is allowed for the to-be-decoded point cloud.

[0588] The fifth decoding unit is specifically configured to:

[0589] In a case where the eighth indication information indicates that global motion compensation is allowed for the point cloud to be decoded, and the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, the first indication information in the bitstream is decoded.

[0590] Optionally, the apparatus further includes:

[0591] The third decoding module is configured to decode ninth indication information in the bitstream, the ninth indication information being used to indicate whether global motion compensation is enabled for the target point cloud frame.

[0592] The second determining module is configured to determine, based on the ninth indication information, whether global motion compensation is enabled for the target point cloud frame.

[0593] Optionally, the third decoding module is specifically configured to decode the ninth indication information in the bitstream in a case where seventh indication information in the bitstream indicates that inter-frame prediction is performed on the target point cloud frame, and eighth indication information in the bitstream indicates that global motion compensation is allowed for the point cloud to be decoded.

[0594] The seventh indication information is used to indicate whether inter-frame prediction is performed on the target point cloud frame, and the eighth indication information is used to indicate whether global motion compensation is allowed for the point cloud to be decoded.

[0595] Optionally, the second compensation module is specifically configured to decode tenth indication information in the bitstream to obtain a global motion compensation matrix corresponding to the target point cloud frame, the tenth indication information being used to indicate the global motion compensation matrix.

[0596] The reference point cloud frame corresponding to the target point cloud frame is globally motion compensated based on the global motion compensation matrix to obtain a compensated reference point cloud frame.

[0597] The point cloud decoding apparatus in the embodiments of the present application can be an apparatus, an apparatus with an operating system, or an electronic device, and can also be a component in a terminal, an integrated circuit, or a chip. The apparatus or the electronic device can be a mobile terminal or a non-mobile terminal. Exemplarily, the mobile terminal can include, but is not limited to, the types of terminals listed above, and the non-mobile terminal can be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, which are not limited in the embodiments of the present application.

[0598] The point cloud decoding apparatus provided in the embodiments of the present application can implement each process implemented by the method embodiment of FIG. 14 and achieve the same technical effects. To avoid repetition, details are not described herein.

[0599] Optionally, as shown in FIG. 17, the embodiments of the present application further provide an electronic device 500, which includes a processor 501 and a memory 502, and the memory 502 stores programs or instructions executable on the processor 501. For example, when the electronic device 500 is an encoding end device, each step of the above point cloud encoding method embodiment is implemented when the programs or instructions are executed by the processor 501, and the same technical effects can be achieved. When the electronic device 500 is a decoding end device, each step of the above point cloud decoding method embodiment is implemented when the programs or instructions are executed by the processor 501, and the same technical effects can be achieved. To avoid repetition, details are not described herein.

[0600] The embodiments of the present application further provide an electronic device, which includes a processor and a communication interface, and the processor is configured to perform point cloud division processing on a target point cloud frame of a point cloud to be encoded to obtain a plurality of point cloud slices; perform motion compensation on a reference point cloud slice corresponding to a target point cloud slice in a case where it is determined that the target point cloud slice meets a first motion compensation condition, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; and perform inter-frame predictive encoding on the target point cloud slice based on the compensated reference point cloud slice. The electronic device embodiment corresponds to the above point cloud encoding method embodiment, each implementation process and implementation manner of the above point cloud encoding method embodiment can be applied to the electronic device embodiment, and the same technical effects can be achieved.

[0601] The embodiments of the present application further provide an electronic device, which includes a processor and a communication interface, and the processor is configured to perform point cloud division processing on a target point cloud frame of a point cloud to be decoded to obtain a plurality of point cloud slices; perform motion compensation on a reference point cloud slice corresponding to a target point cloud slice in a case where it is determined that the target point cloud slice enables motion compensation, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; and perform inter-frame predictive decoding on the target point cloud slice based on the compensated reference point cloud slice.

[0602] The electronic device embodiment corresponds to the above point cloud decoding method embodiment, each implementation process and implementation manner of the above point cloud decoding method embodiment can be applied to the electronic device embodiment, and the same technical effects can be achieved.

[0603] Specifically, the electronic device can be a terminal. FIG. 18 is a schematic diagram of a hardware structure of a terminal implementing the embodiments of the present application.

[0604] The terminal 600 includes, but is not limited to, at least part of components such as a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.

[0605] Those skilled in the art can understand that the terminal 600 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 610 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The terminal structure shown in FIG. 18 does not constitute a limitation on the terminal, and the terminal can include more or fewer components than those shown, or combine certain components, or different component arrangements, which are not described here.

[0606] It should be understood that in the embodiments of the present application, the input unit 604 can include a graphics processing unit (GPU) 6041 and a microphone 6042. The GPU 6041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 can include a display panel 6061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 can include two parts of a touch detection device and a touch controller. The other input devices 6072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, etc., which are not described here.

[0607] In the embodiments of the present application, after the radio frequency unit 601 receives downlink data from a network side device, the radio frequency unit 601 can transmit the downlink data to the processor 610 for processing. In addition, the radio frequency unit 601 can send uplink data to the network side device. Generally, the radio frequency unit 601 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.

[0608] The memory 609 can be used to store software programs or instructions and various data. The memory 609 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 609 can include a volatile memory or a non-volatile memory, or the memory 609 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 609 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.

[0609] The processor 610 can include one or more processing units; optionally, the processor 610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 610.

[0610] In the case where the terminal is an encoding end device:

[0611] The processor 610 is configured to:

[0612] perform point cloud partitioning processing on a target point cloud frame of the point cloud to be encoded to obtain a plurality of point cloud slices;

[0613] In a case where it is determined that the target point cloud slice meets the first motion compensation condition, the reference point cloud slice corresponding to the target point cloud slice is subjected to motion compensation to obtain a compensated reference point cloud slice.

[0614] The target point cloud slice is subjected to inter-frame prediction encoding based on the compensated reference point cloud slice.

[0615] Optionally, the first motion compensation condition comprises a global motion compensation condition, and the processor 610 is configured to execute the following operation in the case where it is determined that the target point cloud slice meets the first motion compensation condition: the reference point cloud slice corresponding to the target point cloud slice is subjected to global motion compensation to obtain a compensated reference point cloud slice.

[0616] In a case where it is determined that the target point cloud slice meets the global motion compensation condition, the reference point cloud slice corresponding to the target point cloud slice is subjected to global motion compensation to obtain a compensated reference point cloud slice.

[0617] Optionally, the processor 610 is further configured to:

[0618] encode first indication information, the first indication information being used to indicate whether the target point cloud slice enables global motion compensation, and the code stream corresponding to the to-be-encoded point cloud comprising an encoding result of the first indication information;

[0619] In a case where the reference point cloud slice corresponding to the target point cloud slice is subjected to global motion compensation, the first indication information indicates that the target point cloud slice enables global motion compensation.

[0620] Optionally, the processor 610 is configured to execute the following operation in the encoding of the first indication information:

[0621] encode second indication information, the second indication information being used to indicate whether global motion compensation is allowed for the target point cloud frame, and the code stream further comprising an encoding result of the second indication information;

[0622] In a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame, the first indication information is encoded.

[0623] Optionally, the processor 610 is configured to execute the following operation in the encoding of the first indication information:

[0624] encode third indication information, the third indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud slice, and the code stream further comprising an encoding result of the third indication information;

[0625] The processor 610 is configured to encode the first indication information in a case that the second indication information indicates that global motion compensation is allowed for the target point cloud frame.

[0626] The processor 610 is configured to encode the first indication information in a case that the second indication information indicates that global motion compensation is allowed for the target point cloud frame, and the third indication information indicates that inter-frame prediction is allowed for the target point cloud slice.

[0627] Optionally, the processor 610 is configured to encode the second indication information, including:

[0628] encode fourth indication information, the fourth indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud frame, and the code stream further comprising an encoding result of the fourth indication information;

[0629] encode fifth indication information, the fifth indication information being used to indicate whether global motion compensation is allowed for the point cloud to be encoded, and the code stream further comprising an encoding result of the fifth indication information;

[0630] The processor 610 is configured to encode the second indication information in a case that the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, and the fifth indication information indicates that global motion compensation is allowed for the point cloud to be encoded.

[0631] Optionally, the code stream further comprises an encoding result of sixth indication information, the sixth indication information being used to indicate whether inter-frame prediction is allowed for the point cloud to be encoded;

[0632] The processor 610 is configured to encode the fourth indication information, including: encoding the fourth indication information in a case that the sixth indication information indicates that inter-frame prediction is allowed for the point cloud to be encoded.

[0633] Or,

[0634] The processor 610 is configured to encode the fifth indication information, including: encoding the fifth indication information in a case that the sixth indication information indicates that inter-frame prediction is allowed for the point cloud to be encoded.

[0635] Optionally, the code stream further comprises an encoding result of fourth indication information, the fourth indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud frame, and the processor 610 is configured to encode the third indication information, including:

[0636] The processor 610 is configured to encode the third indication information in a case that the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame.

[0637] Optionally, the processor 610 is further configured to:

[0638] In a case where it is determined that the target point cloud frame satisfies a second motion compensation condition, performing global motion compensation on a reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame.

[0639] Determining a reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

[0640] Optionally, the processor 610 is configured to encode the first indication information, and the encoding includes:

[0641] encoding seventh indication information, the seventh indication information being used to indicate whether to allow inter-frame prediction on the target point cloud frame, and the code stream further includes an encoding result of the seventh indication information.

[0642] In a case where the seventh indication information indicates to allow inter-frame prediction on the target point cloud frame, the first indication information is encoded.

[0643] Optionally, the processor 610 is configured to encode the first indication information, and the encoding further includes:

[0644] encoding eighth indication information, the eighth indication information being used to indicate whether to allow global motion compensation on the point cloud to be encoded, and the code stream further includes an encoding result of the eighth indication information.

[0645] The processor 610 is configured to encode the first indication information in a case where the seventh indication information indicates to allow inter-frame prediction on the target point cloud frame, and the encoding includes:

[0646] In a case where the eighth indication information indicates to allow global motion compensation on the point cloud to be encoded and the seventh indication information indicates to allow inter-frame prediction on the target point cloud frame, the first indication information is encoded.

[0647] Optionally, the processor 610 is further configured to:

[0648] encoding ninth indication information, the ninth indication information being used to indicate whether the target point cloud frame enables global motion compensation.

[0649] In a case where the reference point cloud frame corresponding to the target point cloud frame is subjected to global motion compensation, the ninth indication information indicates that the target point cloud frame enables global motion compensation.

[0650] Optionally, the code stream further comprises an encoding result of seventh indication information and an encoding result of eighth indication information, the seventh indication information is used to indicate whether the target point cloud frame is inter-predicted, and the eighth indication information is used to indicate whether global motion compensation is allowed for the to-be-encoded point cloud.

[0651] The processor 610 is configured to perform encoding of the ninth indication information, including:

[0652] In a case where the seventh indication information indicates that the target point cloud frame is inter-predicted and the eighth indication information indicates that global motion compensation is allowed for the to-be-encoded point cloud, the ninth indication information is encoded.

[0653] Optionally, the processor 610 is configured to perform global motion compensation on the reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame, including:

[0654] determining a global motion compensation matrix corresponding to the target point cloud frame;

[0655] performing global motion compensation on the reference point cloud frame corresponding to the target point cloud frame based on the global motion compensation matrix to obtain a compensated reference point cloud frame;

[0656] The code stream further comprises an encoding result of tenth indication information, and the tenth indication information is used to indicate the global motion compensation matrix.

[0657] In a case where the terminal is a decoding end device:

[0658] performing point cloud division processing on a target point cloud frame of a to-be-decoded point cloud to obtain a plurality of point cloud slices;

[0659] In a case where it is determined that the target point cloud slice enables motion compensation, performing motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices;

[0660] performing inter-prediction decoding on the target point cloud slice based on the compensated reference point cloud slice.

[0661] Optionally, the processor 610 is configured to perform, in a case where it is determined that the target point cloud slice enables motion compensation, motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, including:

[0662] In a case where it is determined that the target point cloud slice enables global motion compensation, performing global motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice.

[0663] Optionally, the processor 610 is further configured to:

[0664] decode first indication information in the bitstream, the first indication information being used for indicating whether the target point cloud slice enables global motion compensation;

[0665] determine whether the target point cloud slice enables global motion compensation based on the first indication information.

[0666] Optionally, the processor 610 configured to decode the first indication information in the bitstream includes that the processor 610 is configured to:

[0667] decode second indication information in the bitstream, the second indication information being used for indicating whether global motion compensation is allowed for the target point cloud frame;

[0668] decode the first indication information in the bitstream in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame.

[0669] Optionally, the processor 610 configured to decode the first indication information in the bitstream further includes that the processor 610 is configured to:

[0670] decode third indication information in the bitstream, the third indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud slice;

[0671] The processor 610 configured to decode the first indication information in the bitstream in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame includes that the processor 610 is configured to:

[0672] decode the first indication information in the bitstream in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame, and the third indication information indicates that inter-frame prediction is allowed for the target point cloud slice.

[0673] Optionally, the processor 610 configured to decode the second indication information in the bitstream includes that the processor 610 is configured to:

[0674] decode fourth indication information in the bitstream, the fourth indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame;

[0675] decode fifth indication information in the bitstream, the fifth indication information being used for indicating whether global motion compensation is allowed for the to-be-decoded point cloud;

[0676] In a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, and the fifth indication information indicates that global motion compensation is allowed for the to-be-decoded point cloud, the second indication information in the code stream is decoded.

[0677] Optionally, the decoding, by the processor 610, of the fourth indication information in the code stream includes: in a case where sixth indication information in the code stream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud, the fourth indication information in the code stream is decoded.

[0678] Or,

[0679] The decoding, by the processor 610, of the fifth indication information in the code stream includes: in a case where sixth indication information in the code stream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud, the fifth indication information in the code stream is decoded.

[0680] The sixth indication information is used to indicate whether inter-frame prediction is allowed for the to-be-decoded point cloud.

[0681] Optionally, the decoding, by the processor 610, of the third indication information in the code stream includes:

[0682] In a case where fourth indication information in the code stream indicates that inter-frame prediction is allowed for the target point cloud frame, the third indication information in the code stream is decoded, and the fourth indication information is used to indicate whether inter-frame prediction is allowed for the target point cloud frame.

[0683] Optionally, the method further includes, before the performing, by the processor 610, motion compensation on the reference point cloud slice corresponding to the target point cloud slice in a case where it is determined that the target point cloud slice enables motion compensation:

[0684] In a case where it is determined that the target point cloud frame enables global motion compensation, performing global motion compensation on a reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame.

[0685] Determining the reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

[0686] Optionally, the decoding, by the processor 610, of the first indication information in the code stream includes:

[0687] The seventh indication information in the code stream is decoded, and the seventh indication information is used to indicate whether inter-frame prediction is allowed for the target point cloud frame.

[0688] In a case where the seventh indication information indicates that the inter prediction is allowed for the target point cloud frame, the first indication information in the bitstream is decoded.

[0689] Optionally, the decoding of the first indication information in the bitstream performed by the processor 610 further includes:

[0690] eighth indication information in the bitstream is decoded, the eighth indication information being used for indicating whether the global motion compensation is allowed for the to-be-decoded point cloud;

[0691] The decoding of the first indication information in the bitstream performed by the processor 610 in a case where the seventh indication information indicates that the inter prediction is allowed for the target point cloud frame includes:

[0692] In a case where the eighth indication information indicates that the global motion compensation is allowed for the to-be-decoded point cloud, and the seventh indication information indicates that the inter prediction is allowed for the target point cloud frame, the first indication information in the bitstream is decoded.

[0693] Optionally, before the global motion compensation is performed on the reference point cloud frame corresponding to the target point cloud frame, the method further includes:

[0694] ninth indication information in the bitstream is decoded, the ninth indication information being used for indicating whether the global motion compensation is enabled for the target point cloud frame;

[0695] It is determined whether the global motion compensation is enabled for the target point cloud frame based on the ninth indication information.

[0696] Optionally, the decoding of the ninth indication information in the bitstream performed by the processor 610 includes:

[0697] In a case where the seventh indication information in the bitstream indicates that the inter prediction is performed on the target point cloud frame, and the eighth indication information in the bitstream indicates that the global motion compensation is allowed for the to-be-decoded point cloud, the ninth indication information in the bitstream is decoded;

[0698] The seventh indication information is used for indicating whether the inter prediction is performed on the target point cloud frame, and the eighth indication information is used for indicating whether the global motion compensation is allowed for the to-be-decoded point cloud.

[0699] Optionally, the global motion compensation performed by the processor 610 on the reference point cloud frame corresponding to the target point cloud frame to obtain the compensated reference point cloud frame includes:

[0700] decode the tenth indication information in the code stream to obtain a global motion compensation matrix corresponding to the target point cloud frame, the tenth indication information being used for indicating the global motion compensation matrix;

[0701] perform global motion compensation on a reference point cloud frame corresponding to the target point cloud frame based on the global motion compensation matrix to obtain a compensated reference point cloud frame.

[0702] Specifically, the terminal of the embodiment of the present application further includes instructions or programs stored on the memory 609 and executable on the processor 610, the processor 610 invoking the instructions or programs in the memory 609 to execute the method performed by each module shown in FIG. 15 or FIG. 16 and achieve the same technical effect, and thus the description is omitted here.

[0703] The embodiment of the present application further provides a readable storage medium, the readable storage medium storing programs or instructions, the programs or instructions being executed by a processor to implement each process of the above-mentioned point cloud encoding method embodiment, or the programs or instructions being executed by a processor to implement each process of the above-mentioned point cloud decoding method embodiment and achieve the same technical effect, and thus the description is omitted here.

[0704] The processor is the processor in the terminal in the above-mentioned embodiments. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0705] The embodiment of the present application further provides a chip, the chip including a processor and a communication interface, the communication interface and the processor being coupled, the processor being used for running programs or instructions to implement each process of the above-mentioned point cloud encoding method embodiment or implement each process of the above-mentioned point cloud decoding method embodiment and achieve the same technical effect, and thus the description is omitted here.

[0706] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system chip, a system on chip, a chip system or a system on chip, etc.

[0707] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element. Furthermore, it is to be understood that the method and apparatus of the present application can be carried out by more than one process, method, article, or apparatus either simultaneously, concurrently, or with intervening action that are carried out at the same time, in any order, or in an overlapping manner. For example, the described method can be performed in a different order or simultaneously, and the various steps can be combined or omitted, or additional steps can be added, without departing from the scope of the described method. Also, features described with respect to certain examples can be combined in other examples.

[0708] From the above description of the embodiments, it is apparent that the method of the above-described embodiments can be realized by means of software and general-purpose hardware platforms. Of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such an understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a number of instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present application.

[0709] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-described specific embodiments, which are merely illustrative rather than restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

Claims

1. A point cloud encoding method, executed by an encoding end, comprising: performing point cloud partitioning processing on a target point cloud frame of a point cloud to be encoded to obtain a plurality of point cloud slices; in a case where it is determined that a target point cloud slice meets a first motion compensation condition, performing motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; performing inter-frame predictive encoding on the target point cloud slice based on the compensated reference point cloud slice.

2. The method of claim 1, wherein, The first motion compensation condition comprises a global motion compensation condition, and the performing motion compensation on the reference point cloud slice corresponding to the target point cloud slice to obtain the compensated reference point cloud slice in the case where it is determined that the target point cloud slice meets the first motion compensation condition comprises: in a case where it is determined that the target point cloud slice meets the global motion compensation condition, performing global motion compensation on the reference point cloud slice corresponding to the target point cloud slice to obtain the compensated reference point cloud slice.

3. The method of claim 2, wherein, The method further comprises: encoding first indication information, the first indication information being used to indicate whether the target point cloud slice enables global motion compensation, and a bitstream corresponding to the point cloud to be encoded comprising an encoding result of the first indication information; wherein, in the case where the global motion compensation is performed on the reference point cloud slice corresponding to the target point cloud slice, the first indication information indicates that the target point cloud slice enables global motion compensation.

4. The method of claim 3, wherein, The encoding of the first indication information comprises: encoding second indication information, the second indication information being used to indicate whether global motion compensation is allowed to be performed on the target point cloud frame, and the bitstream further comprising an encoding result of the second indication information; in the case where the second indication information indicates that the global motion compensation is allowed to be performed on the target point cloud frame, the first indication information is encoded.

5. The method of claim 4, wherein, The encoding of the first indication information further comprises: encoding third indication information, the third indication information being used to indicate whether inter-frame prediction is allowed to be performed on the target point cloud slice, and the bitstream further comprising an encoding result of the third indication information; the encoding of the first indication information in the case where the second indication information indicates that the global motion compensation is allowed to be performed on the target point cloud frame comprises: in the case where the second indication information indicates that the global motion compensation is allowed to be performed on the target point cloud frame, and the third indication information indicates that the inter-frame prediction is allowed to be performed on the target point cloud slice, the first indication information is encoded.

6. The method of claim 4 or 5, wherein, The encoding of the second indication information comprises: encoding fourth indication information, the fourth indication information being used to indicate whether inter-frame prediction is allowed to be performed on the target point cloud frame, and the bitstream further comprising an encoding result of the fourth indication information; encoding fifth indication information, the fifth indication information being used to indicate whether global motion compensation is allowed to be performed on the point cloud to be encoded, and the bitstream further comprising an encoding result of the fifth indication information; In a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, and the fifth indication information indicates that global motion compensation is allowed for the to-be-encoded point cloud, the second indication information is encoded.

7. The method of claim 6, wherein, The code stream further includes an encoding result of sixth indication information, the sixth indication information being used to indicate whether inter-frame prediction is allowed for the to-be-encoded point cloud. The encoding of the fourth indication information comprises: in a case where the sixth indication information indicates that inter-frame prediction is allowed for the to-be-encoded point cloud, encoding the fourth indication information. Or, The encoding of the fifth indication information comprises: in a case where the sixth indication information indicates that inter-frame prediction is allowed for the to-be-encoded point cloud, encoding the fifth indication information.

8. The method of claim 5, wherein, The code stream further includes an encoding result of fourth indication information, the fourth indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud frame, and the encoding of the third indication information comprises: In a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, encoding the third indication information.

9. The method of claim 3, wherein, In a case where it is determined that the target point cloud slice meets the first motion compensation condition, before performing motion compensation on the reference point cloud slice corresponding to the target point cloud slice, the method further comprises: In a case where it is determined that the target point cloud frame meets the second motion compensation condition, performing global motion compensation on a reference point cloud frame corresponding to the target point cloud frame to obtain a compensated reference point cloud frame; Determining the reference point cloud slice corresponding to the target point cloud slice based on the compensated reference point cloud frame.

10. The method of claim 9, wherein, The encoding of the first indication information comprises: Encoding seventh indication information, the seventh indication information being used to indicate whether inter-frame prediction is allowed for the target point cloud frame, and the code stream further includes an encoding result of the seventh indication information; In a case where the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, encoding the first indication information.

11. The method of claim 10, wherein, The encoding of the first indication information further comprises: Encoding eighth indication information, the eighth indication information being used to indicate whether global motion compensation is allowed for the to-be-encoded point cloud, and the code stream further includes an encoding result of the eighth indication information; The encoding of the first indication information in a case where the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame comprises: In a case where the eighth indication information indicates that global motion compensation is allowed for the to-be-encoded point cloud, and the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame, encoding the first indication information.

12. The method of claim 9, wherein, The method further comprises: Encoding ninth indication information, the ninth indication information being used to indicate whether global motion compensation is enabled for the target point cloud frame; In a case where global motion compensation is performed on a reference point cloud frame corresponding to the target point cloud frame, the ninth indication information indicates that global motion compensation is enabled for the target point cloud frame.

13. The method of claim 12, wherein, The code stream further includes an encoding result of seventh indication information and an encoding result of eighth indication information, the seventh indication information is used to indicate whether the target point cloud frame is inter-predicted, and the eighth indication information is used to indicate whether global motion compensation is allowed for the to-be-encoded point cloud. The encoding of the ninth indication information includes: In a case where the seventh indication information indicates that the target point cloud frame is inter-predicted and the eighth indication information indicates that global motion compensation is allowed for the to-be-encoded point cloud, the ninth indication information is encoded.

14. The method of any one of claims 9-13, wherein, The global motion compensation of the reference point cloud frame corresponding to the target point cloud frame to obtain the compensated reference point cloud frame includes: determining a global motion compensation matrix corresponding to the target point cloud frame; compensating the reference point cloud frame corresponding to the target point cloud frame based on the global motion compensation matrix to obtain the compensated reference point cloud frame; The code stream further includes an encoding result of tenth indication information, and the tenth indication information is used to indicate the global motion compensation matrix.

15. A point cloud decoding method, performed by a decoding end, including: performing point cloud division processing on a target point cloud frame of a to-be-decoded point cloud to obtain a plurality of point cloud slices; in a case where it is determined that motion compensation is enabled for the target point cloud slice, performing motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; performing inter-prediction decoding on the target point cloud slice based on the compensated reference point cloud slice.

16. The method of claim 15, wherein, The motion compensation of the reference point cloud slice corresponding to the target point cloud slice to obtain the compensated reference point cloud slice in a case where it is determined that motion compensation is enabled for the target point cloud slice includes: in a case where it is determined that global motion compensation is enabled for the target point cloud slice, performing global motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice.

17. The method of claim 16, wherein, Before the motion compensation of the reference point cloud slice corresponding to the target point cloud slice in a case where it is determined that motion compensation is enabled for the target point cloud slice, the method further includes: decoding first indication information in a code stream, the first indication information being used to indicate whether global motion compensation is enabled for the target point cloud slice; determining whether global motion compensation is enabled for the target point cloud slice based on the first indication information.

18. The method of claim 17, wherein, The decoding of the first indication information in the code stream includes: decoding second indication information in the code stream, the second indication information being used to indicate whether global motion compensation is allowed for the target point cloud frame; in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame, decoding first indication information in a code stream.

19. The method of claim 18, wherein, The decoding of the first indication information in the code stream further includes: decoding third indication information in the code stream, the third indication information being used to indicate whether inter-prediction is allowed for the target point cloud slice; The first indication information in the code stream is decoded in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame. The first indication information in the code stream is decoded in a case where the second indication information indicates that global motion compensation is allowed for the target point cloud frame, and the third indication information indicates that inter-frame prediction is allowed for the target point cloud slice.

20. The method of claim 18 or 19, wherein, The second indication information in the code stream is decoded, including: The fourth indication information in the code stream is decoded, the fourth indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame; The fifth indication information in the code stream is decoded, the fifth indication information being used for indicating whether global motion compensation is allowed for the to-be-decoded point cloud; The second indication information in the code stream is decoded in a case where the fourth indication information indicates that inter-frame prediction is allowed for the target point cloud frame, and the fifth indication information indicates that global motion compensation is allowed for the to-be-decoded point cloud.

21. The method of claim 20, wherein, The fourth indication information in the code stream is decoded in a case where sixth indication information in the code stream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud; Or, The fifth indication information in the code stream is decoded in a case where the sixth indication information in the code stream indicates that inter-frame prediction is allowed for the to-be-decoded point cloud; The sixth indication information is used for indicating whether inter-frame prediction is allowed for the to-be-decoded point cloud.

22. The method of claim 19, wherein, The third indication information in the code stream is decoded, including: The third indication information in the code stream is decoded in a case where the fourth indication information in the code stream indicates that inter-frame prediction is allowed for the target point cloud frame, the fourth indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame.

23. The method of claim 22, wherein, In a case where it is determined that the target point cloud slice enables motion compensation, the method further includes: In a case where it is determined that the target point cloud frame enables global motion compensation, a reference point cloud frame corresponding to the target point cloud frame is subjected to global motion compensation to obtain a compensated reference point cloud frame; The reference point cloud slice corresponding to the target point cloud slice is determined based on the compensated reference point cloud frame.

24. The method of claim 23, wherein, The first indication information in the code stream is decoded, including: The seventh indication information in the code stream is decoded, the seventh indication information being used for indicating whether inter-frame prediction is allowed for the target point cloud frame; The first indication information in the code stream is decoded in a case where the seventh indication information indicates that inter-frame prediction is allowed for the target point cloud frame.

25. The method of claim 24, wherein, The first indication information in the code stream is decoded, including: The eighth indication information in the code stream is decoded, the eighth indication information being used for indicating whether global motion compensation is allowed for the to-be-decoded point cloud; The first indication information in the code stream is decoded in a case where the seventh indication information indicates that the target point cloud frame is allowed to be inter-predicted. The first indication information in the code stream is decoded in a case where the eighth indication information indicates that the to-be-decoded point cloud is allowed to be globally motion compensated, and the seventh indication information indicates that the target point cloud frame is allowed to be inter-predicted.

26. The method of claim 23, wherein, Before the reference point cloud frame corresponding to the target point cloud frame is globally motion compensated, the method further comprises: The ninth indication information in the code stream is decoded, the ninth indication information being used to indicate whether the target point cloud frame enables global motion compensation. Whether the target point cloud frame enables global motion compensation is determined based on the ninth indication information.

27. The method of claim 26, wherein, The ninth indication information in the code stream is decoded, comprising: The ninth indication information in the code stream is decoded in a case where seventh indication information in the code stream indicates that the target point cloud frame is inter-predicted, and eighth indication information in the code stream indicates that the to-be-decoded point cloud is allowed to be globally motion compensated. The seventh indication information is used to indicate whether the target point cloud frame is inter-predicted, and the eighth indication information is used to indicate whether the to-be-decoded point cloud is allowed to be globally motion compensated.

28. The method of any one of claims 23-27, wherein, The reference point cloud frame corresponding to the target point cloud frame is globally motion compensated to obtain a compensated reference point cloud frame, comprising: The tenth indication information in the code stream is decoded to obtain a global motion compensation matrix corresponding to the target point cloud frame, the tenth indication information being used to indicate the global motion compensation matrix. The reference point cloud frame corresponding to the target point cloud frame is globally motion compensated based on the global motion compensation matrix to obtain a compensated reference point cloud frame. 29.A point cloud encoding apparatus, comprising: a division module configured to perform point cloud division processing on a target point cloud frame of a to-be-encoded point cloud to obtain a plurality of point cloud slices; a first compensation module configured to, in a case where it is determined that a target point cloud slice meets a first motion compensation condition, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; a first encoding module configured to perform inter-prediction encoding on the target point cloud slice based on the compensated reference point cloud slice. 30.A point cloud decoding apparatus, comprising: a division module configured to perform point cloud division processing on a target point cloud frame of a to-be-decoded point cloud to obtain a plurality of point cloud slices; a first compensation module configured to, in a case where it is determined that a target point cloud slice enables motion compensation, perform motion compensation on a reference point cloud slice corresponding to the target point cloud slice to obtain a compensated reference point cloud slice, the target point cloud slice being a point cloud slice in the plurality of point cloud slices; a first decoding module configured to perform inter-prediction decoding on the target point cloud slice based on the compensated reference point cloud slice.

31. An electronic device, comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implement the steps of the point cloud encoding method according to any one of claims 1 to 14, or the program or instructions, when executed by the processor, implement the steps of the point cloud decoding method according to any one of claims 15 to 28.

32. A chip, comprising a processor and a communication interface, the communication interface and the processor coupled, the processor configured to execute a program or instructions, implement the steps of the point cloud encoding method according to any one of claims 1 to 14, or implement the steps of the point cloud decoding method according to any one of claims 15 to 28.

33. A readable storage medium, the readable storage medium storing a program or instructions, the program or instructions, when executed by a processor, implement the steps of the point cloud encoding method according to any one of claims 1 to 14, or the program or instructions, when executed by a processor, implement the steps of the point cloud decoding method according to any one of claims 15 to 28.