Point cloud coding method, device and storage medium
By obtaining the point cloud block partitioning information to determine whether to adopt macroblock coding mode, the problem of low coding efficiency in the existing technology is solved, and more efficient point cloud block coding is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2021-08-24
- Publication Date
- 2026-07-24
AI Technical Summary
Existing macroblock coding modes are inefficient when they are not suitable for certain point cloud blocks.
By acquiring point cloud block partitioning information, such as partitioning depth, bounding box size, and point density, it is possible to accurately determine whether to adopt macroblock coding mode, thereby improving coding efficiency.
It improves the encoding efficiency of point cloud blocks, ensures that appropriate blocks use appropriate encoding methods, and avoids inefficient encoding.
Smart Images

Figure CN115733990B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video encoding and decoding technology, and in particular to a point cloud encoding and decoding method, device and storage medium. Background Technology
[0002] Point cloud data is generated by collecting data from the surface of an object using acquisition devices. This data consists of hundreds of thousands or even more points. During video production, this point cloud data is transmitted between the video production equipment and the video encoding equipment as a point cloud media file. However, the sheer volume of points presents a challenge for transmission; therefore, the video production equipment needs to compress the point cloud data before transmission.
[0003] Point cloud compression is achieved through point cloud encoding. Point cloud encoding methods include block structure encoding methods, such as macroblock encoding mode, which divides the point cloud into at least one point cloud block and encodes the point cloud block separately.
[0004] However, when encoding point clouds, the macroblock encoding mode is not applicable to all point cloud blocks. When using the macroblock encoding mode to encode point cloud blocks that are not suitable for macroblock encoding, it will cause low encoding efficiency. Summary of the Invention
[0005] This application provides a point cloud encoding method, device, and storage medium, which can accurately determine whether the current block is suitable for macroblock encoding mode, thereby improving the encoding efficiency of point clouds.
[0006] Firstly, this application provides a point cloud encoding method, including:
[0007] Acquire a point cloud and divide the point cloud into blocks to obtain the current block;
[0008] Obtain first information of the current block, wherein the first information is used to indicate the block partitioning information of the current block;
[0009] Based on the first information of the current block, it is determined whether to use macroblock encoding mode to encode the current block, wherein macroblock encoding mode is an encoding method that encodes the current block separately.
[0010] Secondly, this application provides a point cloud encoding method, including:
[0011] Decode the point cloud bitstream to obtain the current block to be decoded;
[0012] Determine whether the current block is encoded using a macroblock encoding mode, where the macroblock encoding mode is an encoding method that encodes the current block separately.
[0013] Thirdly, an encoding device is provided for executing the methods described in the first aspect or its implementations. Specifically, the encoding device includes functional modules for executing the methods described in the first aspect or its implementations.
[0014] Fourthly, a decoding device is provided for executing the methods in the second aspect or their implementations described above. Specifically, the decoding device includes functional modules for executing the methods in the second aspect or their implementations described above.
[0015] Fifthly, an encoding device is provided, including a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the methods in the first aspect or its implementations described above.
[0016] Sixthly, a decoding device is provided, including a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the methods in the second aspect or its implementations described above.
[0017] A seventh aspect provides an electronic device including a processor and a memory. The memory stores a computer program, and the processor invokes and runs the computer program stored in the memory to perform the methods described in the first aspect and / or the second aspect or their respective implementations.
[0018] Eighthly, a coding / decoding system is provided, including an encoding device in any one of the second and fifth aspects or in any implementation thereof, and a decoding device in any one of the third and sixth aspects or in any implementation thereof.
[0019] A ninth aspect provides a chip for implementing the methods of any one of the first to second aspects or their respective implementations. Specifically, the chip includes a processor for calling and running a computer program from a memory, causing a device on which the chip is mounted to perform the methods of any one of the first to second aspects or their respective implementations.
[0020] In a tenth aspect, a computer-readable storage medium is provided for storing a computer program that causes a computer to perform the methods of any one of the first to second aspects or their respective implementations.
[0021] Eleventhly, a computer program product is provided, including computer program instructions that cause a computer to perform the methods of any one of the first to second aspects or their respective implementations.
[0022] In a twelfth aspect, a computer program is provided that, when run on a computer, causes the computer to perform the methods of any one of the first to second aspects or their respective implementations.
[0023] In summary, this application obtains a point cloud and divides it into blocks to obtain the current block; it obtains the first information of the current block and determines whether to use macroblock encoding mode to encode the current block based on the first information. The first information packet is used to indicate the block division information of the current block, such as at least one of the following: the division depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block. In this way, based on the block division information of the current block, it is possible to accurately determine whether the current block is encoded using macroblock encoding mode, thereby improving the encoding efficiency of the current block. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a schematic block diagram of a point cloud video encoding and decoding system according to an embodiment of this application;
[0026] Figure 2 This is a schematic block diagram of the coding framework provided in the embodiments of this application;
[0027] Figure 3 This is a schematic block diagram of the decoding framework provided in the embodiments of this application;
[0028] Figure 4 This is a schematic diagram of a point cloud bounding box involved in an embodiment of this application;
[0029] Figure 5A This is a schematic diagram of octree encoding involved in an embodiment of this application;
[0030] Figure 5B This is a schematic diagram of quadtree encoding involved in an embodiment of this application;
[0031] Figure 5C This is a schematic diagram of binary tree encoding involved in an embodiment of this application;
[0032] Figure 5D This is a schematic diagram of macroblock encoding involved in an embodiment of this application;
[0033] Figure 6 A flowchart illustrating a point cloud encoding method provided in an embodiment of this application;
[0034] Figure 7 A flowchart illustrating a point cloud encoding method provided in an embodiment of this application;
[0035] Figure 8 A flowchart illustrating a point cloud decoding method provided in an embodiment of this application;
[0036] Figure 9 A flowchart illustrating a point cloud decoding method provided in an embodiment of this application;
[0037] Figure 10 This is a schematic block diagram of an encoding device according to an embodiment of this application;
[0038] Figure 11 This is a schematic block diagram of a decoding device according to an embodiment of this application;
[0039] Figure 12 This is a schematic block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0040] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0041] It should be understood that, in the embodiments of the present invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0042] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0043] Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. To facilitate understanding of the embodiments of this application, the relevant concepts involved in the embodiments of this application are briefly introduced as follows:
[0044] A point cloud is a set of discrete points in space that are randomly distributed and represent the spatial structure and surface properties of a three-dimensional object or scene.
[0045] Point cloud data is a specific record of a point cloud. Points in a point cloud can include their location information and attribute information. For example, the location information can be the point's three-dimensional coordinates. This location information can also be referred to as the point's geometric information. Attribute information can include color information and / or reflectivity, etc. For example, the color information can be information in any color space. For example, the color information can be (RGB). Alternatively, the color information can be luminance / chromaticity (YcbCr, YUV) information. For example, Y represents luminance (Luma), Cb(U) represents blue color difference, Cr(V) represents red, and U and V represent chromaticity (Chroma) used to describe color difference information. For example, a point cloud obtained based on laser measurement principles can include the point's three-dimensional coordinate information and the point's laser reflection intensity. Similarly, a point cloud obtained based on photogrammetry principles can include the point's three-dimensional coordinate information and the point's color information. For example, point clouds can be obtained by combining laser measurement and photogrammetry principles. The points in the point cloud may include the three-dimensional coordinate information of the points, the laser reflection intensity of the points, and the color information of the points.
[0046] Point cloud data can be acquired through at least one of the following methods: (1) Computer-generated data. Computer-generated data can be generated based on virtual 3D objects and virtual 3D scenes. (2) 3D laser scanning. Point cloud data of static real-world 3D objects or 3D scenes can be acquired through 3D laser scanning, with millions of point cloud data acquired per second. (3) 3D photogrammetry. Point cloud data of real-world visual scenes can be acquired by collecting data from real-world visual scenes using 3D photography equipment (i.e., a set of cameras or a camera device with multiple lenses and sensors). Point cloud data of dynamic real-world 3D objects or 3D scenes can be acquired through 3D photography. (4) Point cloud data of biological tissues and organs can be acquired through medical equipment. In the medical field, point cloud data of biological tissues and organs can be acquired through medical equipment such as magnetic resonance imaging (MRI), computed tomography (CT), and electromagnetic positioning information.
[0047] Point clouds can be classified into dense point clouds and sparse point clouds according to the acquisition method.
[0048] Point clouds are classified according to the temporal type of the data as follows:
[0049] The first static point cloud: that is, the object is stationary and the device acquiring the point cloud is also stationary;
[0050] The second type of dynamic point cloud: The object is in motion, but the device acquiring the point cloud is stationary;
[0051] The third type of dynamic point cloud acquisition: The device acquiring the point cloud is in motion.
[0052] Point clouds can be divided into two main categories based on their uses:
[0053] Category 1: Machine-perceived point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and disaster relief robots;
[0054] Category 2: Human eye-perceived point clouds, which can be used in point cloud application scenarios such as digital cultural heritage, free-viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
[0055] Figure 1 This is a schematic block diagram of a point cloud video encoding and decoding system according to an embodiment of this application. It should be noted that... Figure 1 This is merely an example; the point cloud video encoding and decoding system in this application includes, but is not limited to, [other examples]. Figure 1 As shown. Figure 1 As shown, the point cloud video encoding and decoding system 100 includes an encoding device 110 and a decoding device 120. The encoding device encodes (can be understood as compressing) the point cloud data to generate a bitstream, and transmits the bitstream to the decoding device. The decoding device decodes the bitstream generated by the encoding device to obtain the decoded point cloud data.
[0056] The encoding device 110 in this application embodiment can be understood as a device with video encoding function, and the decoding device 120 can be understood as a device with video decoding function. That is, the encoding device 110 and the decoding device 120 in this application embodiment include a wider range of devices, such as smartphones, desktop computers, mobile computing devices, laptops (e.g., laptop computers), tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, vehicle computers, etc.
[0057] In some embodiments, encoding device 110 may transmit encoded point cloud data (such as a bitstream) to decoding device 120 via channel 130. Channel 130 may include one or more media and / or means capable of transmitting encoded point cloud data from encoding device 110 to decoding device 120.
[0058] In one example, channel 130 includes one or more communication media that enable encoding device 110 to directly transmit encoded point cloud data to decoding device 120 in real time. In this example, encoding device 110 can modulate the encoded point cloud data according to a communication standard and transmit the modulated point cloud data to decoding device 120. The communication media includes wireless communication media, such as radio frequency spectrum; optionally, the communication media may also include wired communication media, such as one or more physical transmission lines.
[0059] In another example, channel 130 includes a storage medium that can store point cloud data encoded by encoding device 110. The storage medium includes various local access data storage media, such as optical discs, DVDs, flash memory, etc. In this example, decoding device 120 can retrieve the encoded point cloud data from this storage medium.
[0060] In another example, channel 130 may include a storage server that stores the point cloud data encoded by encoding device 110. In this example, decoding device 120 can download the stored encoded point cloud data from the storage server. Optionally, the storage server can store the encoded point cloud data and transmit the encoded point cloud data to decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
[0061] In some embodiments, the encoding device 110 includes a video encoder 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.
[0062] In some embodiments, the encoding device 110 may include a video source 111 in addition to the video encoder 112 and the input interface 113.
[0063] The video source 111 may include at least one of a video acquisition device (e.g., a video camera), a video archive, a video input interface, and a computer graphics system, wherein the video input interface is used to receive point cloud data from a video content provider, and the computer graphics system is used to generate the point cloud data.
[0064] The video encoder 112 encodes the point cloud data from the video source 111 to generate a bitstream. The video encoder 112 transmits the encoded point cloud data directly or indirectly to the decoding device 120 via the output interface 113. The encoded point cloud data can also be stored on a storage medium or a storage server for subsequent retrieval by the decoding device 120.
[0065] In some embodiments, the decoding device 120 includes an input interface 121 and a video decoder 122.
[0066] In some embodiments, in addition to the input interface 121 and the video decoder 122, the decoding device 120 may also include a display device 123.
[0067] The input interface 121 includes a receiver and / or a modem. The input interface 121 can receive encoded point cloud data through channel 130.
[0068] The video decoder 122 is used to decode the encoded point cloud data to obtain the decoded point cloud data, and transmit the decoded point cloud data to the display device 123.
[0069] Display device 123 displays the decoded point cloud data. Display device 123 may be integrated with decoding device 120 or external to decoding device 120. Display device 123 may include various display devices, such as liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, or other types of display devices.
[0070] also, Figure 1 This is merely an example; the technical solutions in the embodiments of this application are not limited to... Figure 1 For example, the technology of this application can also be applied to one-sided video encoding or one-sided video decoding.
[0071] Since point clouds are collections of massive points, storing them not only consumes a lot of memory but also hinders transmission. Furthermore, there is not enough bandwidth to support the direct transmission of point clouds at the network layer without compression. Therefore, compressing point clouds is essential.
[0072] Currently, point clouds can be compressed using a point cloud encoding framework.
[0073] Point cloud coding frameworks can be either the Geometry Point Cloud Compression (G-PCC) or Video Point Cloud Compression (V-PCC) framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC framework provided by the Audio Video Standard (AVS) organization. Both G-PCC and AVS-PCC are designed for static, sparse point clouds, and their coding frameworks are largely the same. The G-PCC framework can be used to compress first-type static point clouds and third-type dynamically acquired point clouds, while the V-PCC framework can be used to compress second-type dynamic point clouds. The G-PCC framework is also known as the point cloud codec TMC13, and the V-PCC framework is also known as the point cloud codec TMC2.
[0074] The following describes the applicable encoding and decoding frameworks for the embodiments of this application using the G-PCC encoding and decoding framework.
[0075] Figure 2 This is a schematic block diagram of the coding framework provided in the embodiments of this application.
[0076] like Figure 2 As shown, the encoding framework 200 can acquire the location information (also known as geometric information or geometric location) and attribute information of the point cloud from the acquisition device. The encoding of the point cloud includes location encoding and attribute encoding.
[0077] The location encoding process includes: preprocessing the original point cloud by performing coordinate transformation and quantization to remove duplicate points; and then encoding the octree to form a geometric bitstream.
[0078] The attribute encoding process includes: using the reconstructed information of the location information and the true values of the attribute information of the given input point cloud, selecting one of three prediction modes to perform point cloud prediction, quantizing the prediction results, and performing arithmetic encoding to form an attribute code stream.
[0079] like Figure 2 As shown, position encoding can be implemented using the following units:
[0080] Coordinate translation and quantization unit 201, octree construction unit 202, octree reconstruction unit 203, entropy coding unit 204.
[0081] The coordinate translation and quantization unit 201 can be used to transform the world coordinates of points in a point cloud into relative coordinates and quantize the coordinates, which can reduce the number of coordinates; after quantization, previously different points may be assigned the same coordinates.
[0082] The octree building unit 202 can encode the position information of quantized points using octree encoding. For example, the point cloud can be divided into octrees, so that the position of a point can correspond one-to-one with the position of the octree. By counting the positions of points in the octree and marking their flags as 1, geometric encoding can be performed.
[0083] The octree reconstruction unit 203 is used to reconstruct the geometric position of each point in the point cloud, thus obtaining the reconstructed geometric position of the point.
[0084] Entropy coding unit 204 can use entropy coding to perform arithmetic coding on the position information output by octree construction unit 202, that is, use arithmetic coding to generate a geometric bitstream from the position information output by octree construction unit 202; the geometric bitstream can also be called a geometric bitstream.
[0085] Attribute encoding can be implemented through the following units:
[0086] The system includes a spatial transformation unit 210, an attribute interpolation unit 211, an attribute prediction unit 212, a residual quantization unit 213, and an entropy coding unit 214.
[0087] The spatial transformation unit 210 can be used to transform the RGB color space of points in a point cloud into YCbCr format or other formats.
[0088] The attribute transformation unit 211 can be used to transform the attribute information of points in a point cloud to minimize attribute distortion. For example, the attribute transformation unit 211 can be used to obtain the true values of the point's attribute information. For example, the attribute information may be the color information of the point.
[0089] The attribute prediction unit 212 can be used to predict the attribute information of points in the point cloud to obtain the predicted value of the point's attribute information, and then obtain the residual value of the point's attribute information based on the predicted value of the point's attribute information. For example, the residual value of the point's attribute information can be the actual value of the point's attribute information minus the predicted value of the point's attribute information.
[0090] The residual quantization unit 213 can be used to quantize the residual value of the attribute information of the point.
[0091] Entropy coding unit 214 can use zero-run-length coding to entropy code the residual values of the attribute information of the points to obtain an attribute bitstream. The attribute bitstream can be bitstream information.
[0092] Combination Figure 2 The main operations and processing for geometric structure encoding in this application are as follows:
[0093] (1) Pre-processing: This includes coordinate transformation and voxelization. By scaling and translation, the point cloud data in 3D space is converted into integer form, and its smallest geometric position is moved to the origin.
[0094] (2) Geometry encoding: Geometry encoding includes two modes that can be used under different conditions.
[0095] (a) Octree-based geometric coding: An octree is a tree-like data structure used in 3D spatial partitioning to uniformly divide a predefined bounding box, with each node having eight child nodes. By using '1' and '0' to indicate whether each child node of the octree is occupied, occupancy code information is obtained as the bitstream of point cloud geometric information.
[0096] (b) Trisoup-based geometric coding: The point cloud is divided into blocks of a certain size, and the intersection points of the point cloud surface with the edges of the blocks are located and triangles are constructed. Geometric information is compressed by encoding the intersection points.
[0097] (3) Geometry quantization: The fineness of quantization is usually determined by the quantization parameter (QP). A larger QP value means that coefficients with a wider range of values will be quantized into the same output, which usually leads to greater distortion and a lower bit rate. Conversely, a smaller QP value means that coefficients with a smaller range of values will be quantized into the same output, which usually leads to less distortion and a higher bit rate. In point cloud coding, quantization is performed directly on the coordinate information of the points.
[0098] (4) Geometric entropy encoding: This method uses statistical compression encoding on the occupancy code information of the octet to output a binary (0 or 1) compressed bitstream. Statistical coding is a lossless coding method that can effectively reduce the bit rate required to express the same signal. A commonly used statistical coding method is context-adaptive binary arithmetic coding (CABAC).
[0099] The main operations and processing for attribute information encoding are as follows:
[0100] (1) Attribute Recoloring: In lossy encoding, after the geometric information is encoded, the encoding end needs to decode and reconstruct the geometric information, that is, restore the coordinate information of each point in the 3D point cloud. The attribute information of one or more neighboring points in the original point cloud is found and used as the attribute information of the reconstructed point.
[0101] (2) Attribute prediction coding: In attribute prediction coding, one or more points are selected as predicted values by considering the proximity relationship of geometric information or attribute information, and a weighted average is calculated to obtain the final attribute prediction value. The difference between the true value and the predicted value is encoded.
[0102] (3) Attribute Transform Coding: Attribute transformation coding includes three modes that can be used under different conditions.
[0103] (a) Predicting Transform Coding: A subset of points is selected based on distance, dividing the point cloud into multiple different Levels of Detail (LoD) to achieve a point cloud representation from coarse to fine. Bottom-up prediction can be achieved between adjacent layers, i.e., the attribute information of points introduced in the fine layer is predicted from neighboring points in the coarse layer, obtaining the corresponding residual signal. The points at the lowest level are encoded as reference information.
[0104] (b) Lifting Transform: Based on the prediction of the neighboring layer of LoD, a weight update strategy for neighboring points is introduced to finally obtain the predicted attribute values of each point and obtain the corresponding residual signal.
[0105] (c) Region Adaptive Hierarchical Transform (RAHT): The attribute information is transformed by RAHT to convert the signal into the transform domain, which is called the transform coefficient.
[0106] (4) Attribute quantization: The fineness of quantization is usually determined by the quantization parameter (QP). In predictive transform coding and boost transform coding, the residual values are quantized and then entropy encoded; in RAHT, the transform coefficients are quantized and then entropy encoded.
[0107] (5) Attribute entropy coding: The quantized attribute residual signal or transform coefficients are generally compressed using run-length coding and arithmetic coding. The corresponding coding method, quantization parameters, and other information are also encoded using an entropy encoder.
[0108] Figure 3 This is a schematic block diagram of the decoding framework provided in the embodiments of this application.
[0109] like Figure 3 As shown, the decoding framework 300 can acquire the bitstream of the point cloud from the encoding device and obtain the position and attribute information of the points in the point cloud through the parsing code. Point cloud decoding includes position decoding and attribute decoding.
[0110] The location decoding process includes: performing arithmetic decoding on the geometric bitstream; constructing and merging octrees to reconstruct the point location information; and performing coordinate transformation on the reconstructed point location information to obtain the point's actual location information. The point's location information can also be referred to as its geometric information.
[0111] The attribute decoding process includes: obtaining the residual values of the attribute information of points in the point cloud by parsing the attribute code stream; obtaining the residual values of the attribute information of points by inverse quantization; selecting one of three prediction modes to predict the point cloud based on the reconstructed information of the position information of points obtained in the position decoding process, and obtaining the reconstructed values of the attribute information of points; and performing color space inverse conversion on the reconstructed values of the attribute information of points to obtain the decoded point cloud.
[0112] like Figure 3 As shown, position decoding can be implemented using the following unit:
[0113] Entropy decoding unit 301, octree reconstruction unit 302, inverse coordinate quantization unit 303, and inverse coordinate translation unit 304.
[0114] Attribute encoding can be implemented through the following units:
[0115] Entropy decoding unit 310, inverse quantization unit 311, attribute reconstruction unit 312, and inverse space transformation unit 313.
[0116] Decompression is the reverse process of compression. Similarly, the functions of each unit in the decoding frame 300 can be found in the functions of the corresponding units in the encoding frame 200.
[0117] At the decoding end, after obtaining the compressed bitstream, the decoding device first performs entropy decoding to obtain various mode information, quantized geometric information, and attribute information. First, the geometric information undergoes inverse quantization to obtain the reconstructed 3D point position information. On the other hand, the attribute information undergoes inverse quantization to obtain residual information, and the reference signal is confirmed according to the adopted transform mode to obtain the reconstructed attribute information. This reconstructed attribute information is then sequentially matched with the geometric information to generate the output reconstructed point cloud data.
[0118] For example, the decoding framework 300 can divide the point cloud into multiple LoDs based on the Euclidean distance between points in the point cloud; then, it can sequentially decode the attribute information of the points in the LoDs; for example, it can calculate the number of zeros (zero_cnt) in zero-run-length coding to decode the residuals based on zero_cnt; next, the decoding framework 300 can perform inverse quantization based on the decoded residual values, and add the inverse-quantized residual value to the predicted value of the current point to obtain the reconstructed value of the point cloud, until all point clouds have been decoded. The current point will be used as the nearest neighbor of subsequent LoDs, and the reconstructed value of the current point will be used to predict the attribute information of subsequent points.
[0119] The relevant technologies involved in the embodiments of this application are described below.
[0120] 1. Pretreatment
[0121] Determine the origin and dimensions of the bounding box.
[0122] The floating-point coordinates of the k-th points of the input point cloud are represented as (x k y k , z k ), k = 0, ..., K-1, where K is the number of points in the point cloud, and the coordinates of the points are (x, y, k). min y min , z min ) and (x max y max , z max The following is represented:
[0123] x min =min(x 0 x 1 , ..., x K-1 )
[0124] y min =min(y 0 y 1 , ..., y K-1 )
[0125] z min =min(z) 0 , z 1 , ..., zK-1 )
[0126] x max =max(x 0 x 1 , ..., x K-1 )
[0127] y max =max(y 0 y 1 , ..., y K-1 )
[0128] z max =max(z) 0 , z 1 , ..., z K-1 )
[0129] function min(s) 0 s 1 , ..., s K-1 ), max(s 0 s 1 , ..., s K-1 () indicates taking the minimum and maximum values of the current input.
[0130] as follows Figure 4 As shown, the bounding box represents the smallest cuboid containing all points in the input point cloud.
[0131] The origin of the bounding box (x origin y origin , z origin The following can be calculated:
[0132] x origin =int(floor(x) min ))
[0133] y origin =int(floor(y) min ))
[0134] z origin =int(floor(z) min ))
[0135] The dimensions of the bounding box in the x, y, and z directions can be calculated as follows:
[0136] BoudingBoxSize x =int(x max -x origin )+1
[0137] BoudingBoxSize y =int(ymax -y origin )+1
[0138] BoudingBoxSize z =int(z max -z origin )+1
[0139] int(s) is the floor function, and floor(s) returns the largest integer value less than or equal to s.
[0140] 2. Octree coding
[0141] An octree is a tree-like data structure, currently primarily used in G-PCC or AVS-PCC for point cloud partitioning. For point cloud data in 3D space, the octree partitioning method uniformly divides a predefined bounding box hierarchically, with each node having eight child nodes. The occupancy of each child node is indicated by '1' and '0', such as... Figure 5A As shown, the occupancy code information is obtained as the bitstream of point cloud geometric information.
[0142] The octree construction is based on Morton's order, which involves converting the 3D coordinate information of point cloud data into corresponding Morton codes by querying the Morton order table. The corresponding points of each octree level are obtained according to the order of each Morton code. Currently, mainstream point cloud encoding techniques utilize octree partitioning to represent point cloud data, employing different processing flows for geometric and attribute information.
[0143] 3. Implicit quadtree and binary tree encoding methods
[0144] If the bounding box of the 3D scene is a (2 N-1 ,2 N-1 ,2 N-1 A cube is partitioned using an octree: each cube is recursively divided into 8 sub-cubes, corresponding to the 8 child nodes of the octree. If one of the child nodes contains at least one 3D point, then that child node will be further divided into 8 smaller child nodes (sub-cubes), until the smallest unit, i.e., a 1×1×1 sub-cube, is reached. Here, N represents the maximum number of octree partitioning levels.
[0145] If the bounding box of a 3D scene is asymmetrical in length, width, and height, i.e., its size is... Where (d) x ≠d y ≠d z In some cases, an octree can be simplified to a quaternary tree or a binary tree. For example... Figure 5BAs shown, quadtree encoding only requires encoding 4 bits, saving 4 bits compared to octree encoding; for example... Figure 5C As shown, the binary tree encoding method only requires encoding 2 bits, saving 6 bits. The skipped bits can be inferred as 0 at the decoding end.
[0146] 4. Block structure encoding
[0147] Block-based coding methods introduce a concept similar to coding blocks in video coding, dividing the three-dimensional space into several blocks. Non-overlapping coded macroblocks of varying sizes, each macroblock serving as a basic coding unit. Users can set the octree partitioning depth *d* or control the size of the 3D macroblocks via the parameter *nodeSizeLog2*. When the octree partitions to the size of each node... And when the following conditions are met:
[0148] nodeSizeLog2>max(d x d y d z )
[0149] Each node is encoded according to a macroblock (LCU). For example... Figure 5D As shown, encoding begins at the second level of the 2D quadtree partitioning in the order of macroblocks (LCUs), where each macroblock can be viewed as a separate tree partitioning structure.
[0150] In the current implementation, breadth-first traversal is used within each coded macroblock, replacing the existing depth-first traversal method. This block-structured encoding method offers great flexibility; different geometric encoding methods can be used for each macroblock based on its characteristics, and attribute encoding can be performed after the geometric encoding of a macroblock is completed. This eliminates the need to wait for the entire point cloud to be geometrically encoded before attribute encoding can begin.
[0151] As mentioned above, current point cloud coding using block structure encoding determines whether a macroblock should enter macroblock encoding mode by initially setting a limit on the macroblock size. Parallel encoding can be achieved by selecting a different geometric encoding method for each macroblock. However, the current condition for determining whether a macroblock should enter macroblock encoding mode is relatively singular and inaccurate. This leads to low encoding efficiency when macroblocks unsuitable for macroblock encoding are encoded using macroblock encoding mode.
[0152] To address the aforementioned technical problems, this application embodiment obtains first information about the current block and determines whether to use macroblock encoding mode to encode the current block based on the first information. The first information is used to indicate the block partitioning information of the current block, such as at least one of the partitioning depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block. In this way, based on the block partitioning information of the current block, it is possible to accurately determine whether the current block is to use macroblock encoding mode for encoding, thereby improving the encoding efficiency of the current block.
[0153] The technical solution of this application will be described in detail below:
[0154] First, taking the encoding end as an example, the point cloud encoding method provided in the embodiments of this application will be described.
[0155] Figure 6 This is a flowchart illustrating a point cloud encoding method provided in an embodiment of this application. The execution subject of this method is an encoding device, also known as an encoder. Figure 6 As shown, the method includes the following steps:
[0156] S601. Obtain the point cloud and divide the point cloud into blocks to obtain the current block.
[0157] The solution shown in this application embodiment can be directly applied to the overall 3D point cloud data, and can realize differentiated point cloud geometry and attribute encoding in parallel in different blocks, and can be applied to 3D point cloud encoding products.
[0158] Encoding devices can acquire point clouds in the following ways:
[0159] Method 1: If the encoding device has a point cloud acquisition function, then the point cloud can be acquired by the encoding device.
[0160] Method 2: The point cloud is obtained by the encoding device from other storage devices. For example, the point cloud acquisition device stores the acquired point cloud in a storage device, and the encoding device reads the point cloud from that storage device.
[0161] Method 3: The point cloud mentioned above is obtained by the encoding device from the point cloud acquisition device. For example, the point cloud acquisition device sends the acquired point cloud to the encoding device.
[0162] After the encoding device acquires the point cloud in the above manner, it divides the acquired point cloud into blocks, for example, by using an octree, quadtree, binary tree or other block division methods. For the current block, the following steps S602 and S603 are executed.
[0163] S602, Get the first information of the current block.
[0164] The first piece of information mentioned above is used to indicate the block partitioning information of the current block, wherein the block partitioning information of the current block can be the characteristic information of the current block, such as the size of the current block, the position of the current block, etc.
[0165] In one example, the first information of the current block includes at least one of the following: the partitioning depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0166] S603. Based on the first information of the current block, determine whether to use macroblock encoding mode to encode the current block.
[0167] Among them, macroblock encoding mode is an encoding method that encodes the current block separately.
[0168] The methods for determining whether to use macroblock encoding mode to encode the current block based on the first information of the current block in S602 above include, but are not limited to, the following:
[0169] Method 1: Determine whether to use macroblock encoding mode to encode the current block based on the current block's partitioning depth.
[0170] In Method 1, the methods for determining whether to use macroblock encoding mode to encode the current block based on the current block's partitioning depth include, but are not limited to, the following sub-methods:
[0171] In the first sub-method, if the partition depth corresponding to the current block is equal to or greater than the first preset partition depth, then the macroblock encoding mode is determined to be used to encode the current block.
[0172] This application does not impose any restrictions on the specific value of the first preset division depth mentioned above; the value shall be determined according to actual needs.
[0173] In one possible implementation, the first preset partitioning depth is a preset lower limit of the partitioning depth of the point cloud, where the lower limit of the partitioning depth of the point cloud can be understood as the minimum number of partitioning layers of the point cloud.
[0174] The second sub-method involves determining whether to use macroblock encoding mode to encode the current block if the current block's partitioning depth is equal to or greater than the first preset partitioning depth, based on at least one of the current block's bounding box size, the number of points in the current block, and the point density in the current block.
[0175] The third sub-method is to determine that the current block will not be encoded using the macroblock encoding mode if the current block's partitioning depth is equal to the second preset partitioning depth.
[0176] If the current block's partition depth is too deep, i.e., the current block is too small, using macroblock encoding mode to encode the current block would actually reduce encoding efficiency. Therefore, if the partition depth of the current block is determined to be equal to the second preset partition depth, then it is determined not to use macroblock encoding mode to encode the current block.
[0177] This application does not impose any restrictions on the specific value of the second preset division depth mentioned above; the value shall be determined according to actual needs.
[0178] In one possible implementation, the second preset partitioning depth is the upper limit of the partitioning depth of the point cloud, where the upper limit of the partitioning depth of the point cloud can be understood as the maximum number of partitioning layers of the point cloud.
[0179] Method 2: Determine whether to use macroblock coding mode to encode the current block based on at least one of the following: the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0180] In the first example, in the second method described above, the decision to encode the current block using macroblock encoding mode can be determined based on any one of the following: the bounding box size of the current block, the number of points within the current block, or the point density within the current block. For example, if the bounding box size L of the current block is within a first threshold range, then macroblock encoding mode is used; or, if the number of points N within the current block is within a second threshold range, then macroblock encoding mode is used; or, if the point density D within the current block is within a third threshold range, then macroblock encoding mode is used.
[0181] In the second example, in Method 2 above, the decision to encode the current block using macroblock encoding mode can be determined based on any two of the following: the bounding box size L of the current block, the number of points N in the current block, and the point density D in the current block. For example, if the bounding box size L of the current block is within a first threshold range and the number of points N in the current block is within a second threshold range, then macroblock encoding mode is used to encode the current block; or, if the bounding box size L of the current block is within a first threshold range and the point density D in the current block is within a third threshold range, then macroblock encoding mode is used to encode the current block; or, if the number of points N in the current block is within a second threshold range and the point density D in the current block is within a third threshold range, then macroblock encoding mode is used to encode the current block.
[0182] In the third example, in Method 2 above, it can be determined whether to use macroblock encoding mode to encode the current block based on the bounding box size, the number of points in the current block, and the point density in the current block. For example, if the bounding box size L of the current block is within a first threshold range, the number of points N in the current block is within a second threshold range, and the point density D in the current block is within a third threshold range, then it is determined that macroblock encoding mode should be used to encode the current block.
[0183] It should be noted that this application does not impose any restrictions on the specific values of the first threshold range, the second threshold range, and the third threshold range mentioned above; the specific values shall be determined according to actual needs.
[0184] In the fourth example, the above method two includes: obtaining block partitioning index information of the point cloud, which includes at least one of the following: the bounding box size of the partitioned node, the number of points in the partitioned node, and the point density in the partitioned node; comparing at least one of the bounding box size, the number of points in the current block, and the point density in the current block with at least one of the bounding box size, the number of points in the partitioned node, and the point density in the partitioned node to determine whether to use macroblock coding mode to encode the current block.
[0185] For example, the bounding box size of the current block is compared with the bounding box size of the partitioned nodes. If the bounding box size of the current block is equal to or less than the bounding box size of the partitioned nodes, the macroblock encoding mode is used to encode the current block.
[0186] For example, the number of points in the current block is compared with the number of points in the nodes after the partition. If the number of points in the current block is equal to or less than the number of points in the nodes after the partition, the macroblock encoding mode is used to encode the current block.
[0187] For example, the point density in the current block is compared with the point density in the nodes after partitioning. If the point density in the current block is equal to or less than the point density in the nodes after partitioning, the macroblock encoding mode is used to encode the current block.
[0188] For example, the bounding box size of the current block is compared with the bounding box size of the partitioned nodes, and the number of points in the current block is compared with the number of points in the partitioned nodes. If the bounding box size of the current block is equal to or less than the bounding box size of the partitioned nodes, and the number of points in the current block is equal to or less than the number of points in the partitioned nodes, then the macroblock encoding mode is determined to be used to encode the current block.
[0189] For example, the bounding box size of the current block is compared with the bounding box size of the partitioned nodes, and the point density in the current block is compared with the point density in the partitioned nodes. If the bounding box size of the current block is equal to or less than the bounding box size of the partitioned nodes, and the point density in the current block is equal to or less than the point density in the partitioned nodes, then the macroblock encoding mode is determined to be used to encode the current block.
[0190] For example, the number of points in the current block is compared with the number of points in the nodes after partitioning, and the point density in the current block is compared with the point density in the nodes after partitioning. If the number of points in the current block is equal to or less than the number of points in the nodes after partitioning, and the point density in the current block is equal to or less than the point density in the nodes after partitioning, then the macroblock encoding mode is determined to be used to encode the current block.
[0191] For example, the bounding box size of the current block is compared with the bounding box size of the partitioned nodes, the number of points in the current block is compared with the number of points in the partitioned nodes, and the point density in the current block is compared with the point density in the partitioned nodes. If the bounding box size of the current block is equal to or less than the bounding box size of the partitioned nodes, the number of points in the current block is equal to or less than the number of points in the partitioned nodes, and the point density in the current block is equal to or less than the point density in the partitioned nodes, then the macroblock encoding mode is determined to be used to encode the current block.
[0192] In some embodiments, before executing S603 above, the encoding device obtains a macroblock encoding flag. If the value of the macroblock encoding flag is a first value, such as 1, it is determined that the macroblocks in the point cloud can be encoded using macroblock encoding. Then, S603 above is executed.
[0193] If the value of the macroblock encoding flag is the second value, for example, 0, then it is determined whether the macroblock in the point cloud can be encoded using the macroblock encoding method, and the above step S603 is not executed.
[0194] The point cloud encoding method provided in this application obtains a point cloud and divides it into blocks to obtain a current block; it obtains the first information of the current block and determines whether to use macroblock encoding mode to encode the current block based on the first information of the current block. The first information is used to indicate the block division information of the current block, such as at least one of the following: the division depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block. In this way, based on the block division information of the current block, it is possible to accurately determine whether the current block is encoded using macroblock encoding mode, thereby improving the encoding efficiency of the current block.
[0195] Figure 7The flowchart of a point cloud encoding method provided in an embodiment of this application is as follows: Based on the above embodiment, when it is determined that the current block is encoded using the macroblock encoding mode, this application also includes a process of macroblock encoding the current encoding block.
[0196] like Figure 7 As shown, the method in this application embodiment includes:
[0197] S701. Obtain the point cloud and divide the point cloud into blocks to obtain the current block;
[0198] S702. Obtain the first information of the current block, which is used to indicate the block partitioning information of the current block;
[0199] S703. Based on the first information of the current block, determine whether to use macroblock encoding mode to encode the current block.
[0200] Among them, macroblock encoding mode is an encoding method that encodes the current block separately.
[0201] The implementation methods of S701 to S703 are basically the same as those of S601 to S603. Referring to the description of S701 to S703, they will not be repeated here.
[0202] In some embodiments, if it is determined that a macroblock encoding mode is used to encode the current block, this embodiment further includes: sending first indication information to a decoding device, the first indication information being used to instruct the current block to be encoded using a macroblock encoding mode. Thus, the decoding device can decode the current block using a macroblock decoding mode according to the first indication information.
[0203] Optionally, the aforementioned first indication information is information sent separately by the encoding device to the decoding device through other communication protocols.
[0204] Optionally, the aforementioned first indication information is included in the bitstream of the point cloud and sent to the decoding device.
[0205] S704. If it is determined that the current block will be encoded using the macroblock encoding mode, determine the target encoding method for the current block.
[0206] The methods for determining the target encoding method of the current block in S704 above include, but are not limited to, the following:
[0207] Method 1: Determine the prediction tree coding method as the target coding method for the current block.
[0208] Method 2 uses rate-distortion optimization to determine the target encoding method for the current block from a set of M preset encoding methods, where M is a positive integer greater than 1.
[0209] For example, the current block is encoded using each of the M preset encoding methods to obtain the encoding cost corresponding to each encoding method, and the encoding method with the lowest encoding cost is determined as the target encoding method for the current block.
[0210] Method 3: Set the default encoding method as the target encoding method for the current block.
[0211] Method 2: Determine the target encoding method for the current block based on the first information of the current block.
[0212] In this second method, the first information includes at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block. This allows the target encoding method of the current block to be determined based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0213] For example, if at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block satisfies the corresponding preset conditions, then the target encoding method for the current block is determined to be the prediction tree encoding method.
[0214] This application does not impose any restrictions on the specific content of the aforementioned preset conditions.
[0215] Optionally, the number of points in the current block may satisfy the following preset conditions: the number of points in the current block is greater than a first preset value, or the number of points in the current block is less than a second preset value, or the number of points in the current block is greater than the first preset value and less than the second preset value.
[0216] Optionally, the point density within the current block may satisfy the following preset conditions: the point density within the current block is greater than a third preset value, or the point density within the current block is less than a fourth preset value, or the point density within the current block is greater than a third preset value and less than a fourth preset value.
[0217] Optionally, the bounding box size of the current block satisfies the corresponding preset conditions, including: the bounding box size of the current block is greater than the fifth preset value, or the bounding box size of the current block is less than the sixth preset value, or the bounding box size of the current block is greater than the fifth preset value and less than the sixth preset value.
[0218] In one example, assuming the number of points in the current block is N, the first preset value is N1, and the second preset value is N2, then when N2 < N < N1, the target encoding method for the current block is determined to be the prediction tree encoding method.
[0219] In one example, assuming the point density in the current block is D, the third preset value is D1, and the fourth preset value is D2, then when D2 < D < D1, the target encoding method for the current block is determined to be the prediction tree encoding method.
[0220] In one example, assuming the bounding box size of the current block is L, the fifth preset value is L1, and the sixth preset value is L2, then when L2 < D < L1, the target encoding method for the current block is determined to be the prediction tree encoding method.
[0221] In one example, when N2 < N < N1 and D2 < D < D1, the target encoding method for the current block is determined to be the prediction tree encoding method.
[0222] In one example, when N2 < N < N1 and L2 < D < L1, the target encoding method for the current block is determined to be the prediction tree encoding method.
[0223] In one example, when D2 < D < D1 and L2 < D < L1, the target encoding method for the current block is determined to be the prediction tree encoding method.
[0224] In one example, when N2 < N < N1, D2 < D < D1, and L2 < D < L1, the target encoding method for the current block is determined to be the prediction tree encoding method.
[0225] After determining the target encoding method for the current block using the above method, execute S705 to encode the current block.
[0226] S705. Encode the first information of the current block using the target encoding method.
[0227] The first information includes at least one of geometric information and attribute information.
[0228] In this step, the encoding device may encode the first information of the current block using existing technologies according to the target encoding method, and this application does not impose any restrictions on this.
[0229] In some embodiments, this application further includes: the encoding device sending the target encoding mode of the current block to the decoding device, for example, the encoding device sending second indication information to the decoding device, the second indication information being used to indicate the target encoding mode of the current block. In this way, the decoding device directly determines the target encoding mode of the current block based on the second indication information, and then decodes the current block according to the target encoding mode, thereby improving decoding efficiency.
[0230] Optionally, the second indication information mentioned above is information sent separately by the encoding device to the decoding device through other communication protocols.
[0231] Optionally, the aforementioned second indication information is included in the bitstream of the point cloud and sent to the decoding device.
[0232] This embodiment not only proposes a scheme for determining whether to use macroblock coding mode to encode the current block based on the first information of the current block, but also proposes a scheme for determining the target coding method of the current block when determining to use macroblock coding mode to encode the current block, thereby further improving the coding efficiency of point clouds.
[0233] The above describes the point cloud encoding method provided in this application embodiment using the encoding end as an example. The following section will combine... Figure 8 Taking the decoding end as an example, the technical solution of this application will be introduced.
[0234] Figure 8 This is a flowchart illustrating a point cloud decoding method provided in an embodiment of this application. The execution entity of this method is a decoding device, also known as a decoder. Figure 8 As shown, it includes:
[0235] S801, Decode the point cloud bitstream to obtain the current block to be decoded.
[0236] Specifically, the geometric bitstream of the point cloud is decoded by reconstructing the geometric positions of the point cloud according to the block partitioning method. For example, if the block partitioning method of the point cloud is octree, then the octree is reconstructed according to the geometric bitstream of the point cloud to obtain the current block to be decoded.
[0237] It should be noted that the current block to be decoded can be obtained from the point cloud code stream using existing technology, and this will not be elaborated further in the embodiments of this application.
[0238] S802. Determine whether the current block is encoded using macroblock encoding mode.
[0239] Among them, macroblock encoding mode is an encoding method that encodes the current block separately.
[0240] The methods for determining whether the current block should be encoded using macroblock encoding mode in S802 above include, but are not limited to, the following:
[0241] Method 1: Obtain first indication information and determine, based on the first indication information, that the current block is encoded using macroblock encoding mode. The first indication information is used to instruct the current block to be encoded using macroblock encoding mode.
[0242] Optionally, the aforementioned first indication information is sent separately by the encoding device.
[0243] Optionally, the point cloud stream can be decoded to obtain the first indication information.
[0244] Method 2: Obtain the first information of the current block, and determine whether the current block should be encoded using macroblock encoding mode based on the first information of the current block.
[0245] The first piece of information is used to indicate the block partitioning information of the current block.
[0246] In one example, the first information of the current block includes at least one of the following: the partitioning depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0247] In Method 2 above, the methods for determining whether to use macroblock encoding mode for encoding the current block based on the first information of the current block include, but are not limited to, the following sub-methods:
[0248] The first sub-method determines whether the current block should be encoded using macroblock encoding mode based on the current block's partitioning depth.
[0249] In one example of the first sub-mode, if the partition depth corresponding to the current block is equal to or greater than the first preset partition depth, then it is determined that the current block is encoded using macroblock encoding mode.
[0250] Optionally, the first preset segmentation depth is the lower limit of the segmentation depth of the point cloud.
[0251] In another example of the first sub-method, if the partition depth of the current block is equal to or greater than the first preset partition depth, then it is determined whether the current block should be encoded using macroblock encoding mode based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0252] In another example of the first sub-method, if the partition depth of the current block is equal to the second preset partition depth, it is determined that the current block was not encoded using macroblock encoding mode.
[0253] Optionally, the second preset segmentation depth is the upper limit of the segmentation depth of the point cloud.
[0254] The second sub-method determines whether the current block should be encoded using macroblock encoding mode based on at least one of the following: the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0255] The implementation of determining whether the current block should be encoded using macroblock encoding mode based on at least one of the following steps, as described in the second sub-method and another example of the first sub-method: the second sub-method, and the third sub-method, can include the following steps:
[0256] Step 1: Obtain the block partitioning index information of the point cloud. The block partitioning index information of the point cloud includes at least one of the following: the bounding box size of the partitioned node, the number of points in the partitioned node, and the point density in the partitioned node.
[0257] Step 2: Compare at least one of the bounding box size, the number of points in the current block, and the point density in the current block with at least one of the bounding box size, the number of points in the divided node, and the point density in the divided node to determine whether the current block is encoded using macroblock encoding mode.
[0258] The point cloud decoding method provided in this application provides a current block to be decoded by decoding the point cloud bitstream. It determines whether the current block is encoded using a macroblock encoding mode. For example, it determines whether the current block is encoded using a macroblock encoding mode based on at least one of the current block's partitioning depth, bounding box size, number of points in the current block, and point density in the current block. This allows for accurate determination of whether the current block is encoded using a macroblock encoding mode, thereby achieving accurate decoding of the current block and improving the decoding efficiency of the current block.
[0259] Figure 9 A flowchart of a point cloud decoding method provided in an embodiment of this application is shown below. Figure 9 As shown, the decoding process includes:
[0260] S901. Decode the point cloud bitstream to obtain the current block to be decoded.
[0261] S902. Determine whether the current block is encoded using macroblock encoding mode.
[0262] The implementation processes of S901 and S902 are basically the same as those of S801 and S802. Referring to the descriptions of S801 and S802 above, they will not be repeated here.
[0263] S903. If it is determined that the current block is encoded using macroblock encoding mode, then the target encoding method for the current block is determined.
[0264] The methods for determining the target encoding method of the current block in S903 above include, but are not limited to, the following:
[0265] Method 1: Obtain the second indication information and determine the target encoding method of the current block based on the second indication information. The second indication information is used to indicate the target encoding method of the current block.
[0266] Optionally, the second instruction information is sent separately by the encoding device to the decoding device.
[0267] Optionally, the second indication information is carried in the bitstream, and the decoding device obtains the second indication information by decoding the point cloud bitstream.
[0268] Method 2: Determine the prediction tree coding method as the target coding method for the current block.
[0269] Method 3: Determine the target encoding method for the current block based on the first information of the current block.
[0270] The first information of the current block includes at least one of the following: the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0271] The decoding device determines the target encoding method of the current block based on at least one of the bounding box size, the number of points in the current block, and the point density in the current block.
[0272] For example, if at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block satisfies the corresponding preset conditions, then the target encoding method for the current block is determined to be the prediction tree encoding method.
[0273] Optionally, the number of points in the current block may satisfy the following preset conditions: the number of points in the current block is greater than a first preset value, or the number of points in the current block is less than a second preset value, or the number of points in the current block is greater than the first preset value and less than the second preset value.
[0274] Optionally, the point density within the current block may satisfy the following preset conditions: the point density within the current block is greater than a third preset value, or the point density within the current block is less than a fourth preset value, or the point density within the current block is greater than a third preset value and less than a fourth preset value.
[0275] Optionally, the bounding box size of the current block satisfies the corresponding preset conditions, including: the bounding box size of the current block is greater than the fifth preset value, or the bounding box size of the current block is less than the sixth preset value, or the bounding box size of the current block is greater than the fifth preset value and less than the sixth preset value.
[0276] S904. Decode the first information of the current block according to the target encoding method of the current block.
[0277] The first piece of information includes geometric information and attribute information.
[0278] For example, if the target encoding method is prediction tree encoding, decoding begins from the starting point in the prediction tree corresponding to the current block, obtaining the first information of the starting point. Next, the bitstream is decoded to obtain the residual value of the first information of the second point in the prediction tree. The sum of this residual value and the first information of the starting point is used as the reconstructed value of the second point's first information. Then, the bitstream is decoded to obtain the residual value of the first information of the third point. The sum of this residual value and the reconstructed value of the second point's first information is used as the reconstructed value of the third point's first information. This process continues until the decoding of the last point in the prediction tree corresponding to the current block is completed.
[0279] It should be noted that the above decoding process may also include steps such as inverse quantization and coordinate transformation. For details, please refer to the descriptions of existing technologies, which will not be repeated here.
[0280] It should be understood that the point cloud decoding method is the reverse process of the point cloud encoding method described above. The steps in the point cloud decoding method can be referred to the corresponding steps in the point cloud encoding method, and will not be repeated here to avoid repetition.
[0281] The preferred embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solutions of this application, and these simple modifications all fall within the protection scope of this application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this application will not describe the various possible combinations separately. Furthermore, various different embodiments of this application can also be arbitrarily combined, as long as they do not violate the spirit of this application, they should also be considered as the content disclosed in this application.
[0282] It should also be understood that, in the various method embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0283] The above text combined Figures 1 to 9 The method embodiments of this application are described in detail below, in conjunction with... Figures 10 to 12 The following describes in detail the device embodiments of this application.
[0284] Figure 10 This is a schematic block diagram of an encoding device according to an embodiment of this application.
[0285] like Figure 10 As shown, the encoding device 10 may include:
[0286] The first acquisition unit 11 is used to acquire a point cloud and divide the point cloud into blocks to obtain the current block;
[0287] The second acquisition unit 12 is used to acquire the first information of the current block, wherein the first information is used to indicate the block partitioning information of the current block;
[0288] The determining unit 13 is used to determine whether to use a macroblock encoding mode to encode the current block based on the first information of the current block, wherein the macroblock encoding mode is an encoding method that encodes the current block separately.
[0289] Optionally, the first information of the current block includes at least one of the following: the partitioning depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0290] In some embodiments, the determining unit 13 is specifically configured to determine whether to encode the current block using a macroblock coding mode based on the partitioning depth of the current block; or,
[0291] Based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block, determine whether to use macroblock encoding mode to encode the current block.
[0292] In some embodiments, the determining unit 13 is specifically configured to determine, if the partitioning depth corresponding to the current block is equal to or greater than a first preset partitioning depth, to encode the current block using the macroblock encoding mode; or...
[0293] If the partitioning depth of the current block is equal to or greater than the first preset partitioning depth, then it is determined whether to use macroblock coding mode to encode the current block based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block; or,
[0294] If the partitioning depth of the current block is equal to the second preset partitioning depth, then it is determined that the macroblock encoding mode will not be used to encode the current block.
[0295] Optionally, the first preset segmentation depth is the lower limit of the segmentation depth of the point cloud.
[0296] Optionally, the second preset segmentation depth is the upper limit of the segmentation depth of the point cloud.
[0297] In some embodiments, the determining unit 13 is specifically used to obtain block partitioning index information of the point cloud, the block partitioning index information of the point cloud including at least one of the bounding box size of the partitioned node, the number of points in the partitioned node, and the point density in the partitioned node; and to compare at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block with at least one of the bounding box size of the partitioned node, the number of points in the partitioned node, and the point density in the partitioned node to determine whether to use macroblock coding mode to encode the current block.
[0298] In some embodiments, the determining unit 13 is further configured to determine the target encoding method of the current block if it is determined that the current block is encoded using a macroblock encoding mode; and to encode the first information of the current block using the target encoding method, wherein the first information includes at least one of geometric information and attribute information.
[0299] In some embodiments, the determining unit 13 is further configured to determine the prediction tree coding method as the target coding method for the current block; or,
[0300] Based on the first information of the current block, determine the target encoding method of the current block; or,
[0301] A rate-distortion optimization method is used to determine the target encoding method of the current block from M preset encoding methods, where M is a positive integer greater than 1.
[0302] In some embodiments, the determining unit 13 is further configured to determine that the target encoding method of the current block is the predictive tree encoding method if at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block satisfies the corresponding preset conditions.
[0303] Optionally, the number of points in the current block satisfying the corresponding preset conditions includes: the number of points in the current block is greater than a first preset value, or the number of points in the current block is less than a second preset value, or the number of points in the current block is greater than the first preset value and less than the second preset value.
[0304] Optionally, the point density within the current block satisfies the corresponding preset conditions, including: the point density within the current block is greater than a third preset value, or the point density within the current block is less than a fourth preset value, or the point density within the current block is greater than the third preset value and less than the fourth preset value.
[0305] Optionally, the bounding box size of the current block satisfies the corresponding preset conditions, including: the bounding box size of the current block is greater than a fifth preset value, or the bounding box size of the current block is less than a sixth preset value, or the bounding box size of the current block is greater than the fifth preset value and less than the sixth preset value.
[0306] Optionally, the encoding device further includes a sending unit 14, which is used to send first indication information to the decoding device when the current block is encoded using macroblock encoding mode. The first indication information is used to indicate that the current block is encoded using macroblock encoding mode.
[0307] Optionally, the bitstream of the point cloud includes the first indication information.
[0308] Optionally, the sending unit 14 is further configured to send second indication information to the decoding device, the second indication information being used to indicate the target encoding method of the current block.
[0309] Optionally, the bitstream of the point cloud includes the second indication information.
[0310] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 10 The apparatus 10 shown can execute the above-described encoding method embodiments, and the foregoing and other operations and / or functions of each module in the apparatus 10 are respectively for implementing the method embodiments corresponding to the encoding device. For the sake of brevity, they will not be described in detail here.
[0311] Figure 11 This is a schematic block diagram of a decoding device according to an embodiment of this application.
[0312] like Figure 11 As shown, the decoding device 20 may include:
[0313] Decoding unit 21 is used to decode the point cloud code stream to obtain the current block to be decoded;
[0314] The determining unit 22 is used to determine whether the current block is encoded using a macroblock encoding mode, wherein the macroblock encoding mode is an encoding method that encodes the current block separately.
[0315] In some embodiments, the determining unit 22 is specifically configured to obtain first information of the current block, and determine whether the current block is encoded using macroblock encoding mode based on the first information of the current block, wherein the first information includes block partitioning information of the current block; or,
[0316] The first indication information is obtained, and based on the first indication information, it is determined that the current block is encoded using macroblock encoding mode. The first indication information is used to instruct the current block to be encoded using macroblock encoding mode.
[0317] Optionally, the first information of the current block includes at least one of the following: the partitioning depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
[0318] In some embodiments, the determining unit 22 is specifically configured to determine, based on the partitioning depth of the current block, whether the current block is encoded using a macroblock encoding mode; or,
[0319] Based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block, determine whether the current block is encoded using macroblock encoding mode.
[0320] In some embodiments, the determining unit 22 is specifically configured to determine that the current block is encoded using the macroblock encoding mode if the partition depth corresponding to the current block is equal to or greater than a first preset partition depth; or,
[0321] If the partition depth of the current block is equal to or greater than the first preset partition depth, then it is determined whether the current block should be encoded using macroblock encoding mode based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block; or,
[0322] If the partition depth of the current block is equal to the second preset partition depth, then it is determined that the current block was not encoded using macroblock encoding mode.
[0323] Optionally, the first preset segmentation depth is the lower limit of the segmentation depth of the point cloud.
[0324] Optionally, the second preset segmentation depth is the upper limit of the segmentation depth of the point cloud.
[0325] In some embodiments, the determining unit 22 is specifically used to obtain block partitioning index information of the point cloud, the block partitioning index information of the point cloud including at least one of: the bounding box size of the partitioned node, the number of points in the partitioned node, and the point density in the partitioned node.
[0326] At least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block is compared with at least one of the bounding box size, the number of points in the partitioned node, and the point density in the partitioned node to determine whether the current block is encoded using macroblock encoding mode.
[0327] In some embodiments, the determining unit 22 is further configured to determine the target encoding method of the current block if it is determined that the current block is encoded using a macroblock encoding mode; and to decode the first information of the current block according to the target encoding method of the current block, wherein the first information includes geometric information and attribute information.
[0328] In some embodiments, the determining unit 22 is specifically configured to acquire second indication information and determine the target encoding method of the current block based on the second indication information, wherein the second indication information is used to indicate the target encoding method of the current block; or...
[0329] The prediction tree coding method is determined as the target coding method for the current block; or...
[0330] The target encoding method of the current block is determined based on the first information of the current block.
[0331] In some embodiments, the determining unit 22 is specifically used to determine that the target encoding method of the current block is the predictive tree encoding method if at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block satisfies the corresponding preset conditions.
[0332] Optionally, the number of points in the current block satisfying the corresponding preset conditions includes: the number of points in the current block is greater than a first preset value, or the number of points in the current block is less than a second preset value, or the number of points in the current block is greater than the first preset value and less than the second preset value.
[0333] Optionally, the point density within the current block satisfies the corresponding preset conditions, including: the point density within the current block is greater than a third preset value, or the point density within the current block is less than a fourth preset value, or the point density within the current block is greater than the third preset value and less than the fourth preset value.
[0334] Optionally, the bounding box size of the current block satisfies the corresponding preset conditions, including: the bounding box size of the current block is greater than a fifth preset value, or the bounding box size of the current block is less than a sixth preset value, or the bounding box size of the current block is greater than the fifth preset value and less than the sixth preset value.
[0335] In some embodiments, the decoding unit 21 is further configured to decode the point cloud code stream to obtain the first indication information.
[0336] In some embodiments, the decoding unit 21 is further configured to decode the point cloud code stream to obtain the second indication information.
[0337] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 11 The apparatus 20 shown can execute the decoding method embodiment, and the foregoing and other operations and / or functions of each module in the apparatus 20 are respectively for implementing the method embodiment corresponding to the decoding device. For the sake of brevity, they will not be described in detail here.
[0338] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0339] Figure 12 This is a schematic block diagram of the electronic device provided in the embodiments of this application. Figure 12 The electronic device 900 can be either the video encoding device or the video decoding device mentioned above.
[0340] like Figure 12 As shown, the electronic device 900 may include:
[0341] The system includes a memory 910 and a processor 920. The memory 910 stores a computer program 911 and transfers the program code 911 to the processor 920. In other words, the processor 920 can retrieve and run the computer program 911 from the memory 910 to implement the methods described in the embodiments of this application.
[0342] For example, the processor 920 can be used to execute the steps in the method 200 described above according to the instructions in the computer program 911.
[0343] In some embodiments of this application, the processor 920 may include, but is not limited to:
[0344] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0345] In some embodiments of this application, the memory 910 includes, but is not limited to:
[0346] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0347] In some embodiments of this application, the computer program 911 may be divided into one or more modules, which are stored in the memory 910 and executed by the processor 920 to complete the page recording method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 911 in the electronic device 900.
[0348] like Figure 12 As shown, the electronic device 900 may further include:
[0349] Transceiver 930, which can be connected to processor 920 or memory 910.
[0350] The processor 920 can control the transceiver 930 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 930 may include a transmitter and a receiver. The transceiver 930 may further include antennas, and the number of antennas may be one or more.
[0351] It should be understood that the various components in the electronic device 900 are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0352] According to one aspect of this application, a computer storage medium is provided that stores a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0353] According to another aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method described in the above-described method embodiments.
[0354] In other words, when implemented using software, it can be implemented wholly or partially in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0355] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0356] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0357] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0358] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A point cloud encoding method, characterized in that, include: Acquire a point cloud and divide the point cloud into blocks to obtain the current block; Obtain first information of the current block, the first information being used to indicate the block partitioning information of the current block, the first information of the current block including at least one of: the partitioning depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block; Based on the first information of the current block, it is determined whether to use the macroblock encoding mode to encode the current block. The macroblock encoding mode is an encoding method that encodes the current block separately, wherein each macroblock is encoded as a separate tree partitioning structure. The step of determining whether to encode the current block using macroblock coding mode based on the first information of the current block includes: If the partition depth corresponding to the current block is equal to or greater than the first preset partition depth, then it is determined that the macroblock encoding mode will be used to encode the current block; or, If the partitioning depth of the current block is equal to or greater than the first preset partitioning depth, then it is determined whether to use macroblock coding mode to encode the current block based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block; or, If the partitioning depth of the current block is equal to the second preset partitioning depth, then it is determined that the macroblock encoding mode will not be used to encode the current block.
2. The method according to claim 1, characterized in that, The step of determining whether to encode the current block using macroblock encoding mode based on the first information of the current block includes: Based on the current block's partitioning depth, determine whether to use macroblock coding mode to encode the current block; or, Based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block, determine whether to use macroblock encoding mode to encode the current block.
3. The method according to claim 1, characterized in that, The first preset segmentation depth is the lower limit of the segmentation depth of the point cloud, and / or the second preset segmentation depth is the upper limit of the segmentation depth of the point cloud.
4. The method according to claim 1 or 2, characterized in that, The step of determining whether to use macroblock coding mode to encode the current block based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block includes: Obtain the block partitioning index information of the point cloud, which includes at least one of the following: the bounding box size of the partitioned node, the number of points in the partitioned node, and the point density in the partitioned node. At least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block is compared with at least one of the bounding box size, the number of points in the partitioned node, and the point density in the partitioned node to determine whether to use macroblock encoding mode to encode the current block.
5. The method according to any one of claims 2-3, characterized in that, The method further includes: If it is determined that the current block will be encoded using a macroblock encoding mode, the target encoding method for the current block will be determined. The first information of the current block is encoded using the target encoding method, wherein the first information includes at least one of geometric information and attribute information.
6. The method according to claim 5, characterized in that, Determining the target encoding method for the current block includes: The prediction tree coding method is determined as the target coding method for the current block; or... Based on the first information of the current block, determine the target encoding method of the current block; or, A rate-distortion optimization method is used to determine the target encoding method of the current block from M preset encoding methods, where M is a positive integer greater than 1.
7. The method according to claim 6, characterized in that, The step of determining the target encoding method of the current block based on the first information of the current block includes: If at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block satisfies the corresponding preset conditions, then the target encoding method of the current block is determined to be the predictive tree encoding method.
8. The method according to claim 7, characterized in that, The number of points in the current block satisfies the following preset conditions: The number of points in the current block is greater than a first preset value, or the number of points in the current block is less than a second preset value, or the number of points in the current block is greater than the first preset value and less than the second preset value.
9. The method according to claim 7, characterized in that, The point density within the current block satisfies the following preset conditions: The point density within the current block is greater than a third preset value, or the point density within the current block is less than a fourth preset value, or the point density within the current block is greater than the third preset value and less than the fourth preset value.
10. The method according to claim 7, characterized in that, The bounding box size of the current block satisfies the following preset conditions: The bounding box size of the current block is greater than a fifth preset value, or the bounding box size of the current block is less than a sixth preset value, or the bounding box size of the current block is greater than the fifth preset value and less than the sixth preset value.
11. The method according to claim 5, characterized in that, The method further includes: If the current block is encoded using macroblock encoding mode, a first indication message is sent to the decoding device. The first indication message is used to indicate that the current block is encoded using macroblock encoding mode.
12. The method according to claim 11, characterized in that, The method further includes: Send a second indication message to the decoding device, the second indication message being used to indicate the target encoding method of the current block.
13. The method according to claim 12, characterized in that, The bitstream of the point cloud includes the first indication information and / or the second indication information.
14. A point cloud decoding method, characterized in that, include: Decode the point cloud bitstream to obtain the current block to be decoded; Determine whether the current block is encoded using a macroblock encoding mode, wherein the macroblock encoding mode is an encoding method that encodes the current block separately; Determining whether the current block is encoded using macroblock encoding mode includes: If the partition depth corresponding to the current block is equal to or greater than the first preset partition depth, then it is determined that the current block is encoded using the macroblock encoding mode; or, If the partition depth of the current block is equal to or greater than the first preset partition depth, then it is determined whether the current block should be encoded using macroblock encoding mode based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block; or, If the partition depth of the current block is equal to the second preset partition depth, then it is determined that the current block was not encoded using macroblock encoding mode.
15. The method according to claim 14, characterized in that, Determining whether the current block is encoded using macroblock encoding mode includes: Obtain the first information of the current block, and based on the first information of the current block, determine whether the current block is encoded using macroblock encoding mode, wherein the first information is used to indicate the block partitioning information of the current block; or, Obtain first indication information, and determine, based on the first indication information, that the current block is encoded using macroblock encoding mode. The first indication information is used to instruct the current block to be encoded using macroblock encoding mode.
16. The method according to claim 15, characterized in that, The first information of the current block includes at least one of the following: the partitioning depth of the current block, the bounding box size of the current block, the number of points in the current block, and the point density in the current block.
17. The method according to claim 16, characterized in that, The step of determining whether the current block is encoded using macroblock encoding mode based on the first information of the current block includes: Based on the current block's partitioning depth, determine whether the current block should be encoded using macroblock encoding mode; or, Based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block, determine whether the current block is encoded using macroblock encoding mode.
18. The method according to claim 14, characterized in that, The first preset segmentation depth is the lower limit of the segmentation depth of the point cloud, and / or the second preset segmentation depth is the upper limit of the segmentation depth of the point cloud.
19. The method according to claim 14 or 17, characterized in that, Determining whether the current block is encoded using macroblock coding mode based on at least one of the bounding box size, the number of points within the current block, and the point density within the current block includes: Obtain the block partitioning index information of the point cloud, which includes at least one of the following: the bounding box size of the partitioned node, the number of points in the partitioned node, and the point density in the partitioned node. At least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block is compared with at least one of the bounding box size, the number of points in the partitioned node, and the point density in the partitioned node to determine whether the current block is encoded using macroblock encoding mode.
20. The method according to any one of claims 16-18, characterized in that, The method further includes: If it is determined that the current block is encoded using macroblock encoding mode, then the target encoding method for the current block is determined. According to the target encoding method of the current block, the first information of the current block is decoded, and the first information includes geometric information and attribute information.
21. The method according to claim 20, characterized in that, Determining the target encoding method for the current block includes: Obtain second indication information and determine the target encoding method of the current block based on the second indication information, wherein the second indication information is used to indicate the target encoding method of the current block; or, The prediction tree coding method is determined as the target coding method for the current block; or... The target encoding method of the current block is determined based on the first information of the current block.
22. The method according to claim 21, characterized in that, The step of determining the target encoding method of the current block based on the first information of the current block includes: If at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block satisfies the corresponding preset conditions, then the target encoding method of the current block is determined to be the predictive tree encoding method.
23. The method according to claim 22, characterized in that, The number of points in the current block satisfies the following preset conditions: The number of points in the current block is greater than a first preset value, or the number of points in the current block is less than a second preset value, or the number of points in the current block is greater than the first preset value and less than the second preset value.
24. The method according to claim 22, characterized in that, The point density within the current block satisfies the following preset conditions: The point density within the current block is greater than a third preset value, or the point density within the current block is less than a fourth preset value, or the point density within the current block is greater than the third preset value and less than the fourth preset value.
25. The method according to claim 22, characterized in that, The bounding box size of the current block satisfies the following preset conditions: The bounding box size of the current block is greater than a fifth preset value, or the bounding box size of the current block is less than a sixth preset value, or the bounding box size of the current block is greater than the fifth preset value and less than the sixth preset value.
26. An encoding device, characterized in that, include: The first acquisition unit is used to acquire a point cloud and divide the point cloud into blocks to obtain the current block; The second acquisition unit is used to acquire first information of the current block. The first information is used to indicate the block partitioning information of the current block. The first information of the current block includes at least one of the following: partitioning depth of the current block, bounding box size of the current block, number of points in the current block, and point density in the current block. The determining unit is configured to determine, based on the first information of the current block, whether to use a macroblock encoding mode to encode the current block, wherein the macroblock encoding mode is an encoding method that encodes the current block separately; The determining unit is further configured to: if the partitioning depth corresponding to the current block is equal to or greater than a first preset partitioning depth, determine whether to use the macroblock encoding mode to encode the current block; or, if the partitioning depth of the current block is equal to or greater than the first preset partitioning depth, determine whether to use the macroblock encoding mode to encode the current block based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block; or, if the partitioning depth of the current block is equal to a second preset partitioning depth, determine not to use the macroblock encoding mode to encode the current block.
27. A decoding device, characterized in that, include: The decoding unit is used to decode the point cloud code stream to obtain the current block to be decoded; The determining unit is used to determine whether the current block is encoded using a macroblock encoding mode, wherein the macroblock encoding mode is an encoding method that encodes the current block separately; The determining unit is further configured to: if the partitioning depth corresponding to the current block is equal to or greater than the first preset partitioning depth, determine whether the current block is encoded using the macroblock encoding mode; or, if the partitioning depth of the current block is equal to or greater than the first preset partitioning depth, determine whether the current block is encoded using the macroblock encoding mode based on at least one of the bounding box size of the current block, the number of points in the current block, and the point density in the current block; or, if the partitioning depth of the current block is equal to the second preset partitioning depth, determine that the current block is not encoded using the macroblock encoding mode.
28. An encoding device, characterized in that, include: A processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the method according to any one of claims 1 to 13.
29. A decoding device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the method of any one of claims 14 to 25.
30. An electronic device, characterized in that, include: A processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the method of any one of claims 1 to 13 or 14 to 25.
31. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 13 or 14 to 25.