WO2023240662A1 - 编解码方法、编码器、解码器以及存储介质 - Google Patents

编解码方法、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2023240662A1
WO2023240662A1 PCT/CN2022/099640 CN2022099640W WO2023240662A1 WO 2023240662 A1 WO2023240662 A1 WO 2023240662A1 CN 2022099640 W CN2022099640 W CN 2022099640W WO 2023240662 A1 WO2023240662 A1 WO 2023240662A1
Authority
WO
WIPO (PCT)
Prior art keywords
coefficient
coefficients
value
current
group
Prior art date
Application number
PCT/CN2022/099640
Other languages
English (en)
French (fr)
Inventor
魏红莲
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/099640 priority Critical patent/WO2023240662A1/zh
Publication of WO2023240662A1 publication Critical patent/WO2023240662A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/597Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/93Run-length coding

Definitions

  • the embodiments of the present application relate to the field of point cloud compression technology, and in particular, to a coding and decoding method, an encoder, a decoder, and a storage medium.
  • the geometric information and attribute information of the point cloud are encoded separately. After the geometric encoding is completed, the geometric information is reconstructed, and the encoding of attribute information will depend on the reconstructed geometric information.
  • attribute information encoding is mainly aimed at encoding color information, converting it into a YUV color space that is more in line with human visual characteristics, and then performing attribute encoding on the preprocessed attribute information, and finally generating a binary attribute code stream.
  • Point Cloud Compression Reference Platform (Point Cloud Reference Model, PCRM) needs to encode/decode the number of coefficients that are continuously 0 during the attribute encoding process.
  • PCRM Point Cloud Reference Model
  • the coefficients after prediction, transformation, and quantization are smaller, and statistics have found that There are usually continuous coefficients of 0, which increases the complexity of the encoding and decoding process to a certain extent and reduces the encoding and decoding efficiency.
  • Embodiments of the present application provide a coding and decoding method, an encoder, a decoder, and a storage medium, which can improve the coding and decoding efficiency of point cloud attributes.
  • embodiments of the present application provide a decoding method, which is applied to a decoder.
  • the method includes:
  • coefficient identification information indicates that the coefficients to be decoded in the current group are all 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the next one in the at least one coefficient group to be decoded is continued. Coefficient identification information of the coefficient group to be decoded.
  • inventions of the present application provide an encoding method, which is applied to an encoder.
  • the method includes:
  • the coefficient identification information is written into the code stream, and the value of the coefficient identification information is set to the first value; after writing the zero run value into the code stream After streaming, encode the current coefficient and set the zero run value to 0;
  • the value of the coefficient identification information is the first value, then after writing the zero run value into the code stream, encode the current coefficient and set the zero run value to 0;
  • the coefficient to be encoded in the current group is determined. If the coefficients are all 0, then the coefficient identification information is encoded as the first value and written into the code stream; otherwise, the zero run value is written into the code stream.
  • the coefficient identification information is encoded as the first value and written into the code stream; otherwise, the zero run value is written into the code stream.
  • embodiments of the present application provide an encoder, which includes a first determining unit, a setting unit and an encoding unit; wherein,
  • the first determining unit is configured to determine a grouping step parameter; group multiple coefficients to be encoded according to the grouping step parameter to determine at least one coefficient group to be encoded; if the at least one coefficient group to be encoded is If the current coefficient in the current group is not 0, then determine the coefficient identification information of the current group; wherein the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0;
  • the encoding unit is configured to write the coefficient identification information into the code stream if the value of the coefficient identification information is the second value;
  • the setting unit is configured to set the value of the coefficient identification information to the first value if the value of the coefficient identification information is the second value;
  • the encoding unit is also configured to encode the current coefficient after writing the zero run value into the code stream;
  • the setting unit is also configured to set the zero run value to 0;
  • the encoding unit is further configured to encode the current coefficient after writing the zero run value into the code stream if the value of the coefficient identification information is the first value;
  • the setting unit is also configured to set the zero run value to 0;
  • the encoding unit is further configured to continue encoding the next coefficient to be encoded in the current group according to the coefficient identification information and the zero run value.
  • embodiments of the present application provide an encoder, which includes a first memory and a first processor; wherein,
  • the first memory is used to store a computer program capable of running on the first processor
  • the first processor is configured to execute the encoding method as described above when running the computer program.
  • embodiments of the present application provide a decoder, the decoder including a second determination unit; wherein,
  • the second determination unit is configured to determine a grouping step parameter; group a plurality of coefficients to be decoded according to the grouping step parameter to determine at least one coefficient group to be decoded; determine the at least one coefficient group to be decoded.
  • Coefficient identification information of the current group wherein, the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information indicates that the coefficients to be decoded in the current group are all is 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the identification information of the next coefficient group to be decoded in the at least one coefficient group to be decoded is continued.
  • embodiments of the present application provide a decoder, the decoder including a second memory and a second processor; wherein,
  • the second memory is used to store a computer program capable of running on the second processor
  • the second processor is configured to execute the decoding method as described above when running the computer program.
  • embodiments of the present application provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program.
  • the computer program is executed, the decoding method as described above is implemented, or the decoding method as described above is implemented. The encoding method described.
  • Embodiments of the present application provide a coding and decoding method, an encoder, a decoder and a storage medium.
  • a grouping step parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step parameter to determine at least one coefficient to be encoded.
  • Coefficient group if the current coefficient in the current group in at least one coefficient group to be encoded is not 0, determine the coefficient identification information of the current group; wherein the coefficient identification information is used to determine whether the coefficients to be decoded in the current group are all 0 Perform instructions; if the value of the coefficient identification information is the second value, write the coefficient identification information into the code stream, and set the value of the coefficient identification information to the first value; after writing the zero run value into the code stream, Encode the current coefficient and set the zero run value to 0; if the value of the coefficient identification information is the first value, then after writing the zero run value into the code stream, encode the current coefficient and set the zero run value to 0; continue according to The coefficient identification information and the zero run value encode the next coefficient in the current group to be encoded.
  • the grouping step size parameter determines the grouping step size parameter; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one coefficient group to be decoded; determine the coefficient identification information of the current group in at least one coefficient group to be decoded; wherein, The coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information indicates that the coefficients to be decoded in the current group are all 0, then the decoding process of the coefficients to be decoded in the current group is completed. Continue to determine coefficient identification information of a next to-be-decoded coefficient group in at least one to-be-decoded coefficient group.
  • Figure 1A is a schematic diagram of a three-dimensional point cloud image provided by an embodiment of the present application.
  • Figure 1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided by an embodiment of the present application.
  • Figure 2A is a schematic diagram of point cloud images at different viewing angles provided by an embodiment of the present application.
  • Figure 2B is a schematic diagram of the data storage format corresponding to Figure 2A provided by an embodiment of the present application;
  • Figure 3 is a schematic diagram of a point cloud encoding and decoding network architecture provided by an embodiment of the present application
  • Figure 4 is a schematic structural diagram of a point cloud encoder provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a point cloud decoder provided by an embodiment of the present application.
  • Figure 6 is a schematic flow chart of the implementation of the decoding method proposed in the embodiment of the present application.
  • Figure 7 is a schematic flow chart of the implementation of the encoding method proposed in the embodiment of the present application.
  • Figure 8 is a schematic diagram of the structure of the encoder
  • Figure 9 is a schematic diagram 2 of the structure of the encoder
  • Figure 10 is a schematic diagram of the structure of the decoder
  • Figure 11 is a schematic diagram 2 of the structure of the decoder.
  • first ⁇ second ⁇ third involved in the embodiments of this application are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understandable that “first ⁇ second ⁇ The third "specific order or sequence may be interchanged where permitted, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
  • Point Cloud is a three-dimensional representation of the surface of an object.
  • collection equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera, the point cloud (data) of the surface of the object can be collected.
  • Point cloud is a set of discrete points randomly distributed in space that expresses the spatial structure and surface properties of a three-dimensional object or scene.
  • Figure 1A shows a three-dimensional point cloud image
  • Figure 1B shows a partial enlargement of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
  • Two-dimensional images have information expressed in each pixel and are distributed regularly, so there is no need to record additional position information; however, the distribution of points in the point cloud in the three-dimensional space is random and irregular, so each point needs to be recorded Only the position of the point in space can completely express a point cloud.
  • each position in the collection process has corresponding attribute information, usually RGB color values, and the color values reflect the color of the object; for point clouds, the attribute information corresponding to each point is in addition to color information. , and the more common one is the reflectance value, which reflects the surface material of the object. Therefore, points in the point cloud can include point location information and point attribute information.
  • the position information of the point may be the three-dimensional coordinate information (x, y, z) of the point.
  • the position information of a point can also be called the geometric information of the point.
  • the attribute information of a point may include color information (three-dimensional color information) and/or reflectance (one-dimensional reflectance information r), and so on.
  • color information can be information on any color space.
  • the color information may be RGB information. Among them, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B).
  • the color information may be brightness and chromaticity (YCbCr, YUV) information. Among them, Y represents brightness (Luma), Cb(U) represents blue color difference, and Cr(V) represents red color difference.
  • the points in the point cloud can include the three-dimensional coordinate information of the point and the reflectivity value of the point.
  • the points in the point cloud may include the three-dimensional coordinate information of the point and the three-dimensional color information of the point.
  • a point cloud is obtained by combining the principles of laser measurement and photogrammetry. The points in the point cloud may include the three-dimensional coordinate information of the point, the reflectivity value of the point, and the three-dimensional color information of the point.
  • Figure 2A and Figure 2B show a point cloud image and its corresponding data storage format.
  • Figure 2A provides six viewing angles of the point cloud image.
  • Figure 2B is composed of the file header information part and the data part.
  • the header information includes the data format, data representation type, total number of point cloud points, and the content represented by the point cloud. .
  • the point cloud is in ".ply" format and is represented by ASCII code.
  • the total number of points is 207242.
  • Each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).
  • Point clouds can be divided into:
  • Static point cloud that is, the object is stationary and the device that obtains the point cloud is also stationary;
  • Dynamic point cloud The object is moving, but the device that obtains the point cloud is stationary;
  • Dynamically acquire point clouds The device that acquires point clouds is in motion.
  • point clouds are divided into two categories according to their uses:
  • Category 1 Machine perception point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and rescue and disaster relief robots;
  • Category 2 Human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free-viewpoint broadcasting, three-dimensional immersive communication, and three-dimensional immersive interaction.
  • Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes, and because point clouds are obtained by directly sampling real objects, they can provide a strong sense of reality while ensuring accuracy, so they are widely used and their scope Including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free-viewpoint broadcasting, three-dimensional immersive telepresence, three-dimensional reconstruction of biological tissues and organs, etc.
  • Point cloud collection mainly has the following methods: computer generation, 3D laser scanning, 3D photogrammetry, etc.
  • Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second; 3D photogrammetry can obtain dynamic real-world three-dimensional objects or scenes Point clouds can obtain tens of millions of point clouds per second.
  • the number of points in each frame of the point cloud is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar)
  • the data volume of 1280 ⁇ 720 2D video at 24fps for 10s is about 1280 ⁇ 720 ⁇ 12bit ⁇ 24fps ⁇ 10s ⁇ 0.33GB
  • point cloud compression has become a key issue to promote the development of the point cloud industry.
  • the point cloud is a collection of massive points, storing the point cloud will not only consume a lot of memory, but is also not conducive to transmission. There is not such a large bandwidth to support the direct transmission of the point cloud at the network layer without compression. Therefore, , the point cloud needs to be compressed.
  • the point cloud coding framework that can compress point clouds can be the Geometry-based Point Cloud Compression (G-PCC) codec framework provided by the Moving Picture Experts Group (MPEG) Or the Video-based Point Cloud Compression (V-PCC) codec framework, or the AVS-PCC codec framework provided by AVS.
  • G-PCC Geometry-based Point Cloud Compression
  • MPEG Moving Picture Experts Group
  • V-PCC Video-based Point Cloud Compression
  • AVS-PCC codec framework provided by AVS.
  • the G-PCC encoding and decoding framework can be used to compress the first type of static point cloud and the third type of dynamic point cloud
  • the V-PCC encoding and decoding framework can be used to compress the second type of dynamic point cloud.
  • the G-PCC encoding and decoding framework is also called point cloud codec TMC13
  • the V-PCC encoding and decoding framework is also called point cloud codec TMC2.
  • FIG. 3 is a schematic diagram of the network architecture of a point cloud encoding and decoding system provided by an embodiment of the present application.
  • the network architecture includes one or more electronic devices 13 to 1N and a communication network 01 , wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01 .
  • electronic devices may be various types of devices with point cloud encoding and decoding functions.
  • the electronic devices may include mobile phones, tablet computers, personal computers, personal digital assistants, navigators, digital phones, and video phones.
  • televisions, sensing equipment, servers, etc. are not limited by the embodiments of this application.
  • the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
  • the electronic device in the embodiment of the present application has a point cloud encoding and decoding function, and generally includes a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).
  • a point cloud encoder ie, encoder
  • a point cloud decoder ie, decoder
  • the following uses the AVS-PCC encoding and decoding framework as an example to illustrate the point cloud compression technology.
  • point cloud compression generally adopts the method of compressing point cloud geometric information and attribute information separately.
  • the point cloud geometric information is first encoded in the geometry encoder, and then the reconstructed geometric information is input into the attribute encoder as additional information.
  • the point cloud geometric information is first decoded in the geometry decoder, and then the decoded geometric information is input into the attribute decoder as additional information to assist in the compression of point cloud attributes.
  • the entire codec consists of pre-processing/post-processing, geometry encoding/decoding, and attribute encoding/decoding.
  • the embodiment of the present application provides a point cloud encoder.
  • Figure 4 shows the framework of the point cloud compression reference platform PCRM provided by AVS.
  • the point cloud encoder 11 includes a geometric encoder: a coordinate translation unit 111 and a coordinate quantization unit. 112. Octree construction unit 113, geometric entropy encoder 114, geometric reconstruction unit 115. Attribute encoder: attribute recoloring unit 116, color space transform unit 117, first attribute prediction unit 118, quantization unit 119 and attribute entropy encoder 1110.
  • the original geometric information is first preprocessed, the geometric origin is normalized to the minimum position in the point cloud space through the coordinate translation unit 111, and the geometric information is transferred from the float to the point cloud space through the coordinate quantization unit 112.
  • the points are converted into shapes to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and the octree structure is used in the octree construction unit 113 to recursively divide the point cloud space, dividing the current node each time into eight sub-blocks of the same size, and determine the occupied codeword status of each sub-block.
  • the sub-block does not contain points, it is recorded as empty, otherwise it is recorded as non-empty.
  • the occupancy of all blocks is recorded at the last level of recursive division.
  • the codeword information is geometrically encoded; on the one hand, the geometric information expressed through the octree structure is input to the geometric entropy encoder 114 to form a geometric code stream; on the other hand, the geometric reconstruction process is performed in the geometric reconstruction unit 115. The reconstructed geometry The information is input to the attribute encoder as additional information.
  • the original attribute information is first preprocessed. Since the geometric information changes after the geometric encoding, the attribute value is reassigned to each point after the geometric encoding through the attribute recoloring unit 116 to realize the attribute Repaint.
  • the attribute information being processed is color information
  • the original color information needs to be transformed into a color space through the color space transformation unit 117 to convert it into a YUV color space that is more in line with the visual characteristics of the human eye; and then predicted through the first attribute Unit 118 performs attribute encoding on the preprocessed attribute information.
  • the point cloud needs to be reordered.
  • the reordering method is Morton code, so the traversal order of attribute encoding is Morton order.
  • the attribute prediction method in PCRM is a single point prediction based on Morton order, that is, going back one point from the current point to be encoded (current node) according to Morton order, and the node found is the prediction reference point of the current point to be encoded, and then The attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized through the quantization unit 119, and The quantized residual information is input to the attribute entropy encoder 1110 to form an attribute code stream.
  • the embodiment of the present application also provides a point cloud decoder.
  • Figure 5 shows the framework of the point cloud compression reference platform PCRM provided by AVS.
  • the point cloud decoder 12 includes a geometric decoder: a geometric entropy decoder 121, Octree reconstruction unit 122, coordinate inverse quantization unit 123, and coordinate inverse translation unit 124.
  • Attribute decoder attribute entropy decoder 125, inverse quantization unit 126, second attribute prediction unit 127 and color space inverse transform unit 128.
  • geometry and attributes are also decoded separately.
  • the geometry code stream is first entropy decoded through the geometric entropy decoder 121 to obtain the geometric information of each node, and then the octree structure is constructed through the octree reconstruction unit 122 in the same way as the geometry encoding, combined with
  • the decoded geometry reconstructs the geometric information expressed through the octree structure after coordinate transformation.
  • the information is coordinate inverse quantized through the coordinate inverse quantization unit 123 and inversely translated through the coordinate inverse translation unit 124 to obtain the decoded geometry information.
  • it is input to the attribute decoder as additional information.
  • the Morton order is constructed in the same way as the encoding end.
  • the attribute code stream is entropy decoded through the attribute entropy decoder 125 to obtain the quantized residual information; then inverse quantization is performed through the inverse quantization unit 126.
  • Obtain the attribute residual value similarly, in the same manner as attribute encoding, obtain the attribute prediction value of the current to-be-decoded point through the second attribute prediction unit 127, and then add the attribute prediction value and the attribute residual value to recover
  • the attribute reconstruction value of the current point to be decoded (for example, YUV attribute value); finally, the decoding attribute information is obtained through the inverse color space transformation of the color space inverse transformation unit 128 .
  • test conditions There are 4 types of test conditions:
  • Condition 1 The geometric position is limited and lossy, and the attributes are lossy;
  • Condition 3 The geometric position is lossless, and the attributes are limited and lossy
  • Condition 4 The geometric position is lossless and the attributes are lossless.
  • the universal test sequence includes five categories: Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3. Among them, Cat1A and Cat2-frame point clouds only contain reflectivity attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1C point clouds contain both color and reflectance attribute information.
  • Embodiment 1 Prediction branch, attribute compression adopts prediction-based method
  • the points in the point cloud are processed in a certain order (original collection order of point cloud, Morton order, Hilbert order, etc.).
  • the prediction algorithm is first used to obtain the attribute prediction value, and the attribute prediction value is obtained based on the attribute value and attribute prediction value.
  • attribute residuals then quantize the attribute residuals, generate quantized residuals, and finally encode the quantized residuals;
  • the points in the point cloud are processed in a certain order (point cloud original acquisition order, Morton order, Hilbert order, etc.).
  • the prediction algorithm is first used to obtain the attribute prediction value, and then the quantized residual is obtained by decoding, and then The quantized residual is dequantized, and finally the attribute reconstruction value is obtained based on the attribute prediction value and the inverse quantized residual.
  • Attribute compression uses a method based on intra-frame prediction and k-element Discrete Cosine Transform (DCT).
  • DCT Discrete Cosine Transform
  • the points in the point cloud are processed in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), and the entire point cloud is first divided into several groups with a maximum length of Y (such as 2) , then combine these groups into several large groups (the number of points in each large group does not exceed Perform DCT transformation on the attribute residuals in small groups to generate transformation coefficients, then quantize the transformation coefficients to generate quantized transformation coefficients, and finally encode the quantized transformation coefficients in large groups;
  • Y such as 2
  • the points in the point cloud are processed in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), and the entire point cloud is first divided into several groups with a maximum length of Y (such as 2) , then combine these groups into several large groups (the number of points in each large group does not exceed , and then perform inverse quantization and inverse transformation on the quantized transformation coefficients in small groups, and finally obtain the attribute reconstruction value based on the attribute prediction value and the coefficients after inverse quantization and inverse transformation.
  • Y such as 2
  • Embodiment 3 Predictive transform branch—resources are not limited. Attribute compression adopts methods based on intra-frame prediction and DCT transform. When encoding the quantized transform coefficients, there is no limit on the maximum number of points X, that is, all coefficients are encoded together:
  • the points in the point cloud are processed in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), and the entire point cloud is first divided into several groups with a maximum length of Y (such as 2) , then use the prediction algorithm to obtain the attribute prediction value, obtain the attribute residual according to the attribute value and the attribute prediction value, perform DCT transformation on the attribute residual in groups as a unit, generate the transformation coefficient, and then quantize the transformation coefficient to generate the quantized transformation coefficients, and finally encode the quantized transformation coefficients of the entire point cloud;
  • Y such as 2
  • the points in the point cloud are processed in a certain order (point cloud original collection order, Morton order, Hilbert order, etc.), and the entire point cloud is first divided into several groups with a maximum length of Y (such as 2) , decode to obtain the quantized transformation coefficients of the entire point cloud, then use the prediction algorithm to obtain the attribute prediction values, and then perform inverse quantization and inverse transformation on the quantized transformation coefficients in groups, and finally use the attribute prediction values and inverse quantization and inverse transformation Transformed coefficients are used to obtain attribute reconstruction values.
  • Y such as 2
  • Embodiment 4 Multi-layer transform branch, attribute compression adopts a method based on multi-layer wavelet transform:
  • multi-layer wavelet transform is performed on the entire point cloud to generate transform coefficients, then the transform coefficients are quantized, the quantized transform coefficients are generated, and finally the quantized transform coefficients of the entire point cloud are encoded;
  • decoding obtains the quantized transformation coefficients of the entire point cloud, and then performs inverse quantization and inverse transformation on the quantized transformation coefficients to obtain attribute reconstruction values.
  • the coefficients may be quantized residuals, and in Embodiments 2, 3, and 4 described above, the coefficients may be quantized transform coefficients.
  • the current specific implementation steps for encoding and decoding coefficients through the AVS-PCC encoding and decoding framework are as follows:
  • the encoding and decoding end uses the same order (point cloud original collection order, Morton order, Hilbert order, transformation order, etc.) to sequentially calculate the coefficients of each point (including three coefficients, namely the color three components).
  • RGB or YUV for encoding/decoding
  • run_length is used to count whether the coefficients of each point are all 0, which is called the zero run value, and its initial value is set to 0.
  • the encoding and decoding end uses the same order (original collection order of point cloud, Morton order, Hilbert order, transformation order, etc.) to encode/decode each coefficient in turn, and run_length is used to evaluate the coefficients.
  • the count of 0 is called the zero run value, and its initial value is set to 0.
  • the current PCRM needs to encode/decode the number of coefficients that are continuously 0.
  • the coefficients after prediction, transformation, and quantization are smaller.
  • Statistics show that there are usually coefficients that are continuously 0. This is to a certain extent. This increases the complexity of the encoding and decoding process and reduces the encoding and decoding efficiency.
  • the grouping step parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step parameter to determine at least one coefficient group to be encoded; if If the current coefficient in the current group of at least one coefficient group to be encoded is not 0, the coefficient identification information of the current group is determined; where the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if If the value of the coefficient identification information is the second value, then the coefficient identification information is written into the code stream, and the value of the coefficient identification information is set to the first value; after the zero run value is written into the code stream, the current coefficient is encoded, Set the zero run value to 0; if the value of the coefficient identification information is the first value, then after writing the zero run value into the code stream, encode the current coefficient and set the zero run value to 0; continue to use the coefficient identification information and A run-of-zero value
  • the grouping step size parameter determines the grouping step size parameter; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one coefficient group to be decoded; determine the coefficient identification information of the current group in at least one coefficient group to be decoded; wherein, The coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information indicates that the coefficients to be decoded in the current group are all 0, then the decoding process of the coefficients to be decoded in the current group is completed. Continue to determine coefficient identification information of a next to-be-decoded coefficient group in at least one to-be-decoded coefficient group.
  • FIG. 6 is a schematic flow chart of the implementation of the decoding method proposed by the embodiment of the present application.
  • decoding a point cloud may include the following steps:
  • Step 101 Determine the grouping step size parameters.
  • the decoding method in the embodiment of the present application specifically refers to the point cloud decoding method, which can be applied to a point cloud decoder (which may also be referred to as a "decoder" for short).
  • the point cloud to be processed includes at least one node.
  • a node in the point cloud to be processed when decoding the node, it can be used as a node to be decoded in the point cloud to be processed, and there are multiple decoded nodes around the node.
  • the current node is the node to be decoded that currently needs to be decoded among the at least one node.
  • each node in the point cloud to be processed corresponds to a geometric information and an attribute information; wherein, the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point. .
  • the attribute information may be color components, reflectivity or other attributes, which are not specifically limited in the embodiments of this application.
  • the attribute information when it is a color component, it can specifically be color information in any color space.
  • the attribute information may be color information in the RGB space, color information in the YUV space, color information in the YCbCr space, etc., which are not specifically limited in the embodiments of the present application.
  • the decoder can arrange the at least one node according to a preset decoding order in order to determine the index number corresponding to each node. In this way, according to the index number corresponding to each node, the decoder can process each node in the point cloud to be processed according to the preset decoding order.
  • the preset decoding order may be one of the following: point cloud original order, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of this application.
  • the code stream is decoded to determine the group identification information.
  • the group identification information may be used to determine whether to use group processing to decode multiple coefficients to be decoded.
  • the grouping identification information can be understood as a flag bit indicating whether to group multiple coefficients to be decoded in the point cloud.
  • the decoder decodes the code stream and can determine a variable as the group identification information, so that the group identification information can be determined through the value of the variable.
  • the values of the group identification information are different, and the processing methods of multiple coefficients to be decoded in the decoded point cloud are also different.
  • the coefficients to be decoded are grouped.
  • the value of the group identification information can also be set to other numerical values or parameters, and this application does not impose any limitation.
  • a flag bit subBlock can be used to represent the group identification information.
  • subBlock if the value of subBlock is 1, it can mean that multiple coefficients to be decoded are grouped; if the value of subBlock is 0, then it can mean that there are no multiple coefficients to be decoded. deal with.
  • the quantized residual or the quantized transformation coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be decoded of the point. That is to say, the coefficients to be decoded may be quantized residuals or quantized transform coefficients.
  • the coefficients to be decoded for each point in the point cloud may include coefficients of all color components.
  • a coefficient to be decoded may include a coefficient of the R component, a coefficient of the G component, and a coefficient of the B component; or a coefficient to be decoded may include a coefficient of the Y component, a coefficient of the U component, and a coefficient of the V component.
  • the coefficient to be decoded for each point in the point cloud may be the coefficient of reflectivity
  • the grouping step parameter can be further determined. That is, after it is determined that the grouping identification information indicates grouping processing of multiple coefficients to be decoded, the process of determining the coefficient identification information is then executed.
  • the determination of the coefficient identification information may depend on the value of the group identification information, or may be performed independently without relying on the value of the group identification information.
  • the grouping step parameter can be used to group multiple coefficients to be decoded.
  • the grouping step parameter can be directly set to the grouping step, and then multiple coefficients to be decoded are grouped according to the grouping step; or, after the grouping step parameter is determined, First, the grouping step size is determined according to the grouping step size parameter, and then the multiple coefficients to be decoded are grouped according to the grouping step size.
  • the grouping step size parameter may be an integer greater than or equal to 0.
  • the grouping step size parameter when determining the grouping step size parameter, can be obtained by decoding the code stream; or, the preset grouping step size parameter can also be directly obtained.
  • the packet step size parameter can be obtained by parsing from the code stream, or can be directly determined by the decoding end.
  • the grouping step parameter may be predefined in the attribute header information aps, and before encoding and decoding the attribute coefficient, the grouping step parameter may be encoded and decoded first.
  • Step 102 Group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one coefficient group to be decoded.
  • the grouping identification information indicates grouping processing of multiple coefficients to be decoded, then after the grouping step parameter is determined.
  • the plurality of coefficients to be decoded can be further grouped according to the grouping step parameter, so that at least one coefficient group to be decoded can be determined.
  • the grouping step size parameter when grouping multiple coefficients to be decoded, can be directly set to the grouping step size, and then the multiple coefficients to be decoded can be grouped according to the grouping step size. Grouping; alternatively, the grouping step size can also be determined first according to the grouping step size parameter, and then the multiple coefficients to be decoded can be grouped according to the grouping step size.
  • the grouping step size parameter can be an integer greater than or equal to 0.
  • the grouping step size can be set to K; or, the grouping step size can also be determined to be 2 K ; where K is greater than or equal to 0 integer.
  • the grouping step size when the grouping step size is determined according to the grouping step size parameter, the grouping step size can also be set to any function value of the grouping step size parameter, which is not specifically limited in this application. .
  • the coefficients to be decoded are grouped.
  • the grouping step size can be directly set to 512 according to the grouping step size parameter K, and then multiple to-be-listed data can be processed according to the grouping step size.
  • Decoding coefficients are grouped.
  • the value of the grouping step parameter can also be any integer greater than or equal to 0, such as 1024, 2048, 4096, etc., and this application does not impose any limitation.
  • the length of the coefficients to be decoded may be set first.
  • the length of a coefficient to be decoded can be set as a length unit.
  • a coefficient to be decoded includes coefficients of all color components, then the sum of the lengths of the coefficients of all color components of a point can be set to one length unit; for reflection Rate attribute, a coefficient to be decoded includes a reflectivity coefficient, then the reflectivity coefficient of a point can be set to a length unit.
  • the length of the to-be-decoded coefficient of a point can be set to 1. Since the to-be-decoded coefficient of each point can include the coefficients of all color components, the length of all the color components of a point The sum of the lengths of the coefficients can be set to 1. For example, set the sum of the lengths of the coefficients of the R, G, and B color components of a point to 1, or set the sum of the lengths of the coefficients of the Y, U, and V color components of a point to 1.
  • the length of the N coefficients to be decoded at N points can be N, that is, the length of the coefficients to be decoded is the same as the number of points, or in other words, the length of the coefficients to be decoded is the same as the number of points to be decoded.
  • the number of decoding coefficients is the same.
  • the multiple coefficients to be encoded are grouped according to the grouping step size K.
  • K' is an integer less than or equal to K, that is, the number of coefficients to be decoded in the last coefficient group to be decoded is less than or equal to the number of coefficients to be decoded in the first G coefficient groups to be decoded. The number of coefficients to be decoded.
  • Step 103 Determine the coefficient identification information of the current group in at least one coefficient group to be decoded; wherein the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0.
  • the current group after grouping multiple coefficients to be decoded according to the grouping step parameter to determine at least one coefficient group to be decoded, for the current group in at least one group to be decoded, the current group can be further determined.
  • Coefficient identification information wherein the coefficient identification information can be used to indicate whether the coefficients to be decoded in the current group are all 0.
  • the coefficient identification information can be understood as a flag bit indicating whether all the coefficients to be decoded in the coefficient group to be decoded are 0.
  • the decoder when the decoder decodes the code stream, it can determine a variable as the coefficient identification information, so that it can determine whether the coefficients in the corresponding coefficient group to be decoded are all 0 through the value of the variable.
  • the values of the coefficient identification information are different, and the indication information corresponding to the value of the coefficient to be decoded in the coefficient group to be decoded is also different.
  • the value of the coefficient identification information is the first value, it is determined that the coefficient identification information indicates that the coefficients to be decoded in the current group are all 0; if the value of the coefficient identification information is the second value, value, it is determined that the coefficient identification information indicates that the coefficients to be decoded in the current group are not all 0; wherein the first value and the second value are not equal.
  • the first value can be 1 and the second value can be 0.
  • the value of the coefficient identification information is a first value, for example, the value is 1, then it can be considered that the coefficient identification information indicates all the coefficients to be decoded in the corresponding coefficient group to be decoded. are all 0; if the value of the coefficient identification information is the second value, for example, 0, then it can be considered that the coefficient identification information indicates that all the coefficients to be decoded in the corresponding coefficient group to be decoded are not all 0.
  • the value of the coefficient identification information can also be set to other numerical values or parameters, that is, as long as it is ensured that the first value and the second value are not equal, the specific values of the first value and the second value
  • the value can also be other values, and this application does not impose any restrictions.
  • the flag longZero can be used to represent the coefficient identification information.
  • the value of longZero is the first value, for example, the value is 1, it can mean that the coefficients to be decoded in the current group are all 0; if the value of longZero is the second value, For example, if the value is 0, it can mean that the coefficients to be decoded in the current group are not all 0.
  • Step 104 If the coefficient identification information indicates that the coefficients to be decoded in the current group are all 0, complete the decoding process of the coefficients to be decoded in the current group, and continue to determine the next coefficient group to be decoded in at least one coefficient group to be decoded. Coefficient identification information.
  • the decoding process of the to-be-decoded coefficients in at least one to-be-decoded coefficient group continues to determine the coefficient identification information of the next to-be-decoded coefficient group, so as to perform the next to-be-decoded coefficient group according to the coefficient identification information of the next to-be-decoded coefficient group. Decoding processing.
  • the value of the coefficient identification information longZero obtained by decoding is the first value, for example, the value is 1, then it can be determined that the coefficients to be decoded in the current group are all 0, and then It can be considered that there is no need to decode the coefficients to be decoded in the current group.
  • the code stream can be continued to be decoded to determine the next one in at least one coefficient group to be decoded.
  • the coefficient identification information of the coefficient group to be decoded is then decoded according to the coefficient identification information of the coefficient group to be decoded.
  • the code stream still needs to be decoded to determine the corresponding coefficient identification information, and then the value of the coefficient identification information in the next coefficient group to be decoded is determined. Whether the coefficients to be decoded in the next coefficient group to be decoded are all 0, if the coefficients to be decoded in the next coefficient group to be decoded are all 0, then the decoding process of the coefficients to be decoded in the next coefficient group to be decoded is also selected, and the method above is continued. Traverse other to-be-decoded coefficient groups in at least one to-be-decoded coefficient group.
  • the method for decoding the point cloud may also include the following steps:
  • Step 105 If the coefficient identification information indicates that the coefficients to be decoded in the current group are not all 0, decode the code stream, determine the zero run value, and determine the current coefficient in the current group based on the zero run value.
  • the code stream can be continued to be decoded,
  • the zero run value is determined, and the decoding process of the current coefficient in the current group is further performed based on the zero run value.
  • the value of the coefficient identification information longZero obtained by decoding is the second value, for example, the value is 0, then it can be determined that the coefficients to be decoded in the current group are not all 0, and then The coefficients to be decoded in the current group need to be decoded, so the code stream needs to be decoded, the zero run value continues to be determined, and then the current coefficient in the current group is determined based on the zero run value.
  • the current coefficient may be the coefficient of all color components of the current point, and the current coefficient may also be the coefficient of the reflectance of the current point.
  • the zero run value run_length can be used to count whether the coefficient to be decoded is zero.
  • the zero run value run_length is not 0 (or greater than 0)
  • the zero run value run_length is 0, it can be determined that all the color components of the current point are 0.
  • the coefficients of the color components are not all 0.
  • the coefficient of the reflectivity of the current point can be determined to be 0. If the zero run value run_length is 0, then the coefficient of the reflectivity of the current point can be determined to be not 0.
  • the zero run value indicates that the coefficients of all color components of the current point are 0, then the zero run value is After the self-decrement process, determine the next coefficient to be decoded in the current group based on the zero run value; if the zero run value indicates that the coefficients of all color components of the current point are not all 0, decode the code stream and determine all the color components of the current point. coefficients and the new zero run value, and the next coefficient to be decoded in the current group is determined based on the new zero run value.
  • the zero run value run_length indicates that the coefficients of all color components of the current point are 0, then there is no need to decode the current coefficients, but can First, the zero run value is decremented by 1 to update the zero run value, and then the next coefficient to be decoded in the current group is determined based on the zero run value. For the next coefficient to be decoded, continue to judge whether the coefficients of all color components are 0 based on the zero run value run_length to determine whether the coefficients of all color components need to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 3, which is greater than 0, then it can be determined that the coefficients of all color components at the current point are 0, so decoding is not required.
  • the corresponding zero run value run_length is 2, which is greater than 0.
  • the run value is decremented by 1, that is, the --run_length operation is performed, and then other coefficients to be decoded in the current group are determined based on the zero run value.
  • the code stream needs to be decoded to further determine The coefficients of all color components of the current point and the new zero run value are then determined based on the new zero run value to determine the next coefficient to be decoded in the current group. For the next coefficient to be decoded, continue to determine whether the coefficients of all color components are 0 based on the new zero run value run_length to determine whether the coefficients of all color components need to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 0, then it can be determined that the coefficients of all color components at the current point are not all 0, so the current coefficient needs to be decoded, that is All color components of the current point are determined by decoding the code stream.
  • the new zero run value can be determined by decoding the code stream, and then the next to-be-decoded coefficient in the current group is determined based on the new zero run value obtained by decoding.
  • the corresponding zero run value run_length is 3, greater than 0, then it can be determined that the coefficients of all color components at this point are 0, so there is no need to decode the coefficients of all color components at this point, then The zero run value is decremented by 1, that is, the --run_length operation is performed. If the corresponding zero run value run_length is 0, it can be determined that the coefficients of all color components of this point are not all 0, so it is necessary to decode the coefficients of all color components of this point.
  • the current coefficient is the coefficient of the reflectivity of the current point
  • the zero run value indicates that the coefficient of the reflectivity of the current point is 0, then the zero run value is decremented by 1
  • the zero run value run_length indicates that the reflectivity coefficient of the current point is 0, then there is no need to decode the current coefficient, but can first The zero run value is decremented by 1 to update the zero run value, and then the next coefficient to be decoded in the current group is determined based on the zero run value. For the next coefficient to be decoded, continue to determine whether the reflectivity coefficient is 0 based on the zero run value run_length to determine whether the reflectivity coefficient needs to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 3, which is greater than 0, then it can be determined that the coefficient of the reflectivity of the current point is 0, so there is no need to decode the current coefficient.
  • the corresponding zero run value run_length is 2, which is greater than 0.
  • it can be determined that the coefficient of the reflectivity of the point is 0. Therefore, there is no need to decode the coefficient of the reflectivity of the point and continue to process the zero run value. Decrement by 1, that is, perform the --run_length operation, and then determine other coefficients to be decoded in the current group based on the zero run value.
  • the code stream needs to be decoded to further determine The coefficient of the reflectivity of the current point and the new zero run value are then used to determine the next coefficient to be decoded in the current group based on the new zero run value. For the next coefficient to be decoded, continue to determine whether the reflectivity coefficient is 0 based on the new zero run value run_length to determine whether the reflectivity coefficient needs to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 0, then it can be determined that the coefficient of the reflectivity of the current point is not 0, so the current coefficient needs to be decoded, that is, by The decoded code stream determines the reflectivity of the current point.
  • the new zero run value can be determined by decoding the code stream, and then the next to-be-decoded coefficient in the current group is determined based on the new zero run value obtained by decoding.
  • the corresponding zero run value run_length is 3, which is greater than 0, then it can be determined that the coefficient of the reflectivity of the point is 0, so there is no need to decode the coefficient of the reflectivity of the point, then for the zero run value Perform self-decrement processing by 1, that is, perform the --run_length operation. If the corresponding zero run value run_length is 0, it can be determined that the coefficient of the reflectivity of the point is not 0, so the coefficient of the reflectivity of the point needs to be decoded.
  • the method of decoding the point cloud may also include the following steps:
  • Step 106 If the grouping identification information indicates that the multiple coefficients to be decoded are not to be grouped, decode the code stream, determine the zero run value, and determine the current coefficient based on the zero run value.
  • the code stream after decoding the code stream to determine the group identification information, if the group identification information indicates that multiple coefficients to be decoded are not to be grouped, then the code stream needs to be decoded, the zero run value is determined, and then the zero run value is determined based on the group identification information. Determine the current coefficient.
  • the coefficients to be decoded need to be encoded sequentially in a preset order, so it can Continue to decode the code stream, determine the zero run value, and then decode the current coefficient among the multiple coefficients to be decoded based on the zero run value.
  • the current coefficient may be the coefficient of all color components of the current point, and the current coefficient may also be the coefficient of the reflectance of the current point.
  • the zero run value run_length can be used to count whether the coefficient to be decoded is zero.
  • the zero run value run_length is not 0 (or greater than 0)
  • the zero run value run_length is 0, it can be determined that all the color components of the current point are 0.
  • the coefficients of the color components are not all 0.
  • the coefficient of the reflectivity of the current point can be determined to be 0. If the zero run value run_length is 0, then the coefficient of the reflectivity of the current point can be determined to be not 0.
  • the current coefficient is the coefficient of all color components of the current point
  • the zero run value indicates that the coefficients of all color components of the current point are 0, then the zero run value is
  • the next coefficient to be decoded is determined based on the zero run value; if the zero run value indicates that the coefficients of all color components at the current point are not all 0, the code stream is decoded to determine the coefficients of all color components at the current point and the new coefficients.
  • the zero run value of determines the next coefficient to be decoded based on the new zero run value.
  • the zero run value run_length indicates that the coefficients of all color components of the current point are 0, then there is no need to decode the current coefficients, but can First, the zero run value is decremented by 1 to update the zero run value, and then the next coefficient to be decoded is determined based on the zero run value. For the next coefficient to be decoded, continue to determine whether the coefficients of all color components are 0 based on the zero run value run_length to determine whether the coefficients of all color components need to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 3, which is greater than 0, then it can be determined that the coefficients of all color components at the current point are 0, so decoding is not required.
  • the corresponding zero run value run_length is 2, which is greater than 0.
  • the code stream needs to be decoded to further determine The coefficients of all color components of the current point and the new zero run value are then used to determine the next coefficient to be decoded based on the new zero run value. For the next coefficient to be decoded, continue to determine whether the coefficients of all color components are 0 based on the new zero run value run_length to determine whether the coefficients of all color components need to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 0, then it can be determined that the coefficients of all color components at the current point are not all 0, so the current coefficient needs to be decoded, that is All color components of the current point are determined by decoding the code stream.
  • the new zero run value can be determined by decoding the code stream, and then the next coefficient to be decoded can be determined based on the new zero run value obtained by decoding.
  • the corresponding zero run value run_length is 3, greater than 0, then it can be determined that the coefficients of all color components at this point are 0, so there is no need to decode the coefficients of all color components at this point, then The zero run value is decremented by 1, that is, the --run_length operation is performed. If the corresponding zero run value run_length is 0, it can be determined that the coefficients of all color components of this point are not all 0, so it is necessary to decode the coefficients of all color components of this point.
  • the current coefficient is the coefficient of the reflectivity of the current point
  • the zero run value indicates that the coefficient of the reflectivity of the current point is 0
  • the zero run value is decremented by 1
  • the next coefficient to be decoded is determined based on the zero run value; if the zero run value indicates that the reflectivity coefficient of the current point is not 0, then the code stream is decoded to determine the reflectivity coefficient of the current point and the new zero run value. The next coefficient to be decoded is determined based on the new zero run value.
  • the zero run value run_length indicates that the reflectivity coefficient of the current point is 0, then there is no need to decode the current coefficient, but can first The zero run value is decremented by 1 to update the zero run value, and then the next coefficient to be decoded is determined based on the zero run value. For the next coefficient to be decoded, continue to determine whether the reflectivity coefficient is 0 based on the zero run value run_length to determine whether the reflectivity coefficient needs to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 3, which is greater than 0, then it can be determined that the coefficient of the reflectivity of the current point is 0, so there is no need to decode the current coefficient.
  • the corresponding zero run value run_length is 2, which is greater than 0. Then it can be determined that the coefficient of the reflectivity of the point is 0. Therefore, there is no need to decode the coefficient of the reflectivity of the point and continue to process the zero run value. Decrement by 1, that is, perform the --run_length operation, and then determine other coefficients to be decoded based on the zero run value.
  • the code stream needs to be decoded to further determine The coefficient of reflectivity of the current point and the new zero run value are then used to determine the next coefficient to be decoded based on the new zero run value. For the next coefficient to be decoded, continue to determine whether the reflectivity coefficient is 0 based on the new zero run value run_length to determine whether the reflectivity coefficient needs to be decoded.
  • the zero run value run_length of the current coefficient determined by decoding the code stream is 0, then it can be determined that the coefficient of the reflectivity of the current point is not 0, so the current coefficient needs to be decoded, that is, by The decoded code stream determines the reflectivity of the current point.
  • the new zero run value can be determined by decoding the code stream, and then the next coefficient to be decoded can be determined based on the new zero run value obtained by decoding.
  • the corresponding zero run value run_length is 3, which is greater than 0, then it can be determined that the coefficient of the reflectivity of the point is 0, so there is no need to decode the coefficient of the reflectivity of the point, then for the zero run value Perform self-decrement processing by 1, that is, perform the --run_length operation. If the corresponding zero run value run_length is 0, it can be determined that the coefficient of the reflectivity of the point is not 0, so the coefficient of the reflectivity of the point needs to be decoded.
  • the decoding method proposed by the embodiment of the present application can group all coefficients based on the indication of the grouping identification information.
  • the coefficient identification information is introduced, such as a flag bit longZero.
  • the flag bit longZero It can be used to indicate whether the coefficients in each group are all 0, so that when all coefficients in a group are 0, only a 1-bit flag is needed to indicate, which can save some code words and thereby improve coding efficiency. Improve compression performance.
  • Table 1 shows the effect of the decoding method proposed in the embodiment of the present application on the color attribute under the multi-layer transformation branch, in which the value of the grouping step parameter can be set to a fixed value. 1024.
  • Embodiments of the present application provide a decoding method.
  • the grouping step size parameter is determined; multiple coefficients to be decoded are grouped according to the grouping step size parameter to determine at least one coefficient group to be decoded; at least one coefficient group to be decoded is determined.
  • the coefficient identification information of the current group in; wherein, the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information indicates that the coefficients to be decoded in the current group are all 0, then the The decoding process of the coefficients to be decoded in the current group continues to determine the coefficient identification information of the next coefficient group to be decoded in at least one coefficient group to be decoded.
  • FIG. 7 is a schematic flow chart of the implementation of the encoding method proposed in an embodiment of the present application.
  • encoding point clouds may include the following steps:
  • Step 201 Determine the grouping step size parameters.
  • the encoding method in the embodiment of the present application specifically refers to a point cloud encoding method, which can be applied to a point cloud encoder (which may also be referred to as an "encoder" for short).
  • the point cloud to be processed includes at least one node.
  • the node in the point cloud to be processed when encoding the node, it can be used as the node to be encoded in the point cloud to be processed, and there are multiple encoded nodes around the node.
  • the current node is the node to be encoded that currently needs to be encoded among the at least one node.
  • each node in the point cloud to be processed corresponds to a geometric information and an attribute information; wherein, the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point.
  • the attribute information may be color components, reflectivity or other attributes, which are not specifically limited in the embodiments of this application.
  • the encoder can arrange the at least one node according to a preset encoding order to determine the index number corresponding to each node. In this way, according to the index number corresponding to each node, the encoder can process each node in the point cloud to be processed according to the preset encoding order.
  • the preset encoding order may be one of the following: point cloud original order, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of this application.
  • the group identification information may be determined first.
  • the group identification information may be used to determine whether to use group processing to encode multiple coefficients to be encoded.
  • the grouping identification information can be understood as a flag indicating whether to group multiple coefficients to be encoded in the point cloud. Specifically, a variable as the group identification information can be determined first, so that the group identification information can be determined through the value of the variable.
  • the values of the group identification information are different, and the processing methods of multiple coefficients to be encoded in the encoded point cloud are also different.
  • the coefficients to be encoded are grouped.
  • the value of the group identification information can also be set to other numerical values or parameters, and this application does not impose any limitation.
  • a flag bit subBlock can be used to represent the group identification information.
  • subBlock if the value of subBlock is 1, it can mean that multiple coefficients to be coded are grouped; if the value of subBlock is 0, then it can mean that there are no multiple coefficients to be coded. deal with.
  • the quantized residual or the quantized transformation coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be encoded of the point. That is to say, the coefficients to be encoded can be quantized residuals or quantized transform coefficients.
  • the coefficients to be encoded for each point in the point cloud may include coefficients of all color components.
  • a coefficient to be encoded may include a coefficient of the R component, a coefficient of the G component, and a coefficient of the B component; or, a coefficient to be encoded may include a coefficient of the Y component, a coefficient of the U component, and a coefficient of the V component.
  • the coefficient to be encoded for each point in the point cloud may be the coefficient of reflectivity.
  • the grouping step parameter can be further determined. That is, after it is determined that the grouping identification information indicates grouping processing of multiple coefficients to be decoded, the process of determining the coefficient identification information is then executed.
  • the determination of the coefficient identification information may depend on the value of the group identification information, or may be performed independently without relying on the value of the group identification information.
  • the grouping step parameter can be used to group multiple coefficients to be encoded.
  • the grouping step parameter can be directly set to the grouping step, and then multiple coefficients to be decoded are grouped according to the grouping step; or, after the grouping step parameter is determined, First, the grouping step size is determined according to the grouping step size parameter, and then the multiple coefficients to be decoded are grouped according to the grouping step size.
  • the grouping step size parameter may be an integer greater than or equal to 0.
  • the grouping step parameter when determining the grouping step parameter, can be determined directly; or, the preset grouping step parameter can also be directly obtained.
  • the grouping step size parameter can be directly determined by the encoding end, or can be preset by the encoding end.
  • the grouping step parameter may be predefined in the attribute header information aps, and before encoding and decoding the attribute coefficient, the grouping step parameter may be encoded and decoded first.
  • Step 202 Group multiple coefficients to be encoded according to the grouping step size parameter to determine at least one coefficient group to be encoded.
  • the grouping identification information indicates grouping processing of multiple coefficients to be encoded, then after the grouping step parameter is determined.
  • the plurality of coefficients to be encoded can be further grouped according to the grouping step size parameter, so that at least one coefficient group to be encoded can be determined.
  • the grouping step size parameter when grouping multiple coefficients to be encoded, can be directly set to the grouping step size, and then the multiple coefficients to be encoded are grouped according to the grouping step size. Grouping; alternatively, the grouping step size can also be determined first according to the grouping step size parameter, and then the multiple coefficients to be encoded can be grouped according to the grouping step size.
  • the grouping step size parameter can be an integer greater than or equal to 0.
  • the grouping step size can be set to K; or, the grouping step size can also be determined to be 2 K ; where K is greater than or equal to 0 integer.
  • the grouping step size when the grouping step size is determined according to the grouping step size parameter, the grouping step size can also be set to any function value of the grouping step size parameter, which is not specifically limited in this application. .
  • the coefficients to be encoded are grouped.
  • the grouping step size can be directly set to 512 according to the grouping step size parameter K, and then multiple to-be-listed data can be processed according to the grouping step size. Coding coefficients are grouped.
  • the value of the grouping step parameter can also be any integer greater than or equal to 0, such as 1024, 2048, 4096, etc., and this application does not impose any limitation.
  • the length of the coefficients to be encoded may be set first.
  • the length of a coefficient to be encoded can be set as a length unit.
  • a coefficient to be encoded includes coefficients of all color components, then the sum of the lengths of the coefficients of all color components of a point can be set to one length unit; for reflection Reflectance attribute, a coefficient to be encoded includes a reflectivity coefficient, then the reflectivity coefficient of a point can be set to a length unit.
  • the length of the coefficient to be encoded at a point can be set to 1. Since the coefficient to be encoded at each point can include coefficients of all color components, the length of all color components of a point can be The sum of the lengths of the coefficients can be set to 1. For example, set the sum of the lengths of the coefficients of the R, G, and B color components of a point to 1, or set the sum of the lengths of the coefficients of the Y, U, and V color components of a point to 1.
  • the length of the N coefficients to be encoded at N points can be N, that is, the length of the coefficients to be encoded is the same as the number of points, or in other words, the length of the coefficients to be encoded is the same as the number of points to be encoded.
  • the number of coding coefficients is the same.
  • the multiple coefficients to be encoded are processed according to the grouping step size K.
  • K' is an integer less than or equal to K, that is, the number of coefficients to be encoded in the last coefficient group to be encoded is less than or equal to the number of coefficients to be encoded in the first G coefficient groups to be encoded. The number of coefficients to be encoded.
  • Step 203 If the current coefficient in the current group of at least one coefficient group to be encoded is not 0, determine the coefficient identification information of the current group; wherein the coefficient identification information is used to determine whether the coefficients to be encoded in the current group are all 0. Give instructions.
  • the coefficient identification information of the current group can be further determined, wherein the coefficient identification information can be used to indicate whether all the coefficients to be encoded in the current group are 0.
  • the coefficient identification information can be understood as a flag bit indicating whether all the coefficients to be encoded in the coefficient group to be encoded are 0.
  • the encoder can determine a variable as the coefficient identification information, so that it can determine whether the coefficients in the corresponding coefficient group to be encoded are all 0 through the value of the variable.
  • the value of the coefficient identification information is different, and the indication information corresponding to the value of the coefficient to be encoded in the coefficient group to be encoded is also different.
  • the value of the coefficient identification information is the first value, it is determined that the coefficient identification information indicates that the coefficients to be encoded in the current group are all 0; if the value of the coefficient identification information is the second value, value, it is determined that the coefficient identification information indicates that the coefficients to be encoded in the current group are not all 0; wherein the first value and the second value are not equal.
  • the first value can be 1 and the second value can be 0.
  • the value of the coefficient identification information is a first value, for example, the value is 1, then it can be considered that the coefficient identification information indicates all the coefficients to be encoded in the corresponding coefficient group to be encoded. are all 0; if the value of the coefficient identification information is the second value, for example, 0, then it can be considered that the coefficient identification information indicates that all the coefficients to be encoded in the corresponding coefficient group to be encoded are not all 0.
  • the value of the coefficient identification information can also be set to other numerical values or parameters, that is, as long as it is ensured that the first value and the second value are not equal, the specific values of the first value and the second value
  • the value can also be other values, and this application does not impose any restrictions.
  • the flag longZero can be used to represent the coefficient identification information.
  • the value of longZero is the first value, for example, the value is 1, it can mean that the coefficients to be encoded in the current group are all 0; if the value of longZero is the second value, For example, if the value is 0, it can mean that the coefficients to be encoded in the current group are not all 0.
  • the value of the coefficient identification information may be initialized to the second value.
  • the value of the coefficient identification information of the current group may be initialized in advance, and the value of the coefficient identification information of the current group may be initialized to the second value.
  • the coefficient identification information longZero can be initialized to 0.
  • the value of the coefficient identification information of the current group can be referenced in the subsequent encoding process.
  • the current group is The current coefficient in is not 0, and it can be determined whether the coefficient identification information needs to be coded according to the value of the coefficient identification information, thereby ensuring that the coefficient identification information is not repeatedly encoded and code words can be saved.
  • the current coefficient when encoding the coefficients in the current group in a preset order, if the current coefficient is not 0, then it is necessary to first determine the coefficient identification information of the current group, and then refer to the current group's coefficient identification information.
  • the value of the coefficient identification information is used to determine whether to encode the coefficient identification information, and to determine whether to reset the value of the encoding coefficient identification information.
  • the decoder will not directly write the coefficient identification information into the code stream. Instead, it needs to combine the coefficient identification information with the coefficient identification information after determining the coefficient identification information.
  • the value selects whether to encode the coefficient representation information, so that the coefficient representation information can be encoded only once, effectively improving coding efficiency.
  • a coefficient to be decoded includes coefficients of all color components. Therefore, if it is determined that the current coefficient is not 0, then it can be determined that the corresponding coefficients of all color components are not all 0. If it is determined that the current coefficient is 0, then it can be determined that the coefficients of all corresponding color components are 0; for the reflectance attribute, a coefficient to be decoded includes the coefficient of reflectivity, so if it is determined that the current coefficient is not 0, then It can be determined that the corresponding reflectivity coefficient is not 0. If it is determined that the current coefficient is 0, then it can be determined that the corresponding reflectivity coefficient is 0.
  • Step 204 If the value of the coefficient identification information is the second value, write the coefficient identification information into the code stream, and set the value of the coefficient identification information to the first value; after writing the zero run value into the code stream, Encode the current coefficients, setting the zero run value to 0.
  • the current coefficient in the current group of at least one coefficient group to be encoded is not 0, then after determining the coefficient identification information of the current group, if the value of the coefficient identification information is the second value , then you can first write the coefficient identification information into the code stream, and then set the value of the coefficient identification information to the first value; then, after writing the zero run value into the code stream, you can encode the current coefficient, and then set the zero run value to the code stream. Set to 0.
  • the coefficient identification information of the current group is the th Two values. If the value of the coefficient identification information is the second value, then the coefficient identification information needs to be written into the code stream first. Wherein, when the value of the coefficient identification information is the second value, the coefficient identification information may indicate that the coefficients to be encoded in the current group are not all 0.
  • the coefficient identification information of the current group is initialized to the second value (for example, 0) in advance, if the current coefficient is not 0 and the coefficient identification information of the current group is If the value is the second value, it can be explained that the coefficients to be encoded in the current group are not all 0, and the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has not yet been encoded. Therefore, the coefficients to be encoded in the current group can be shown first. Coefficient identification information whose coding coefficients are not all 0 is written into the code stream.
  • the value of the coefficient identification information can be reset to the first value, so that the next time the coefficients of the current group that are not 0 are encoded, the value of the coefficient identification information can be referred to, and the coefficient identification of the current group will not be repeated.
  • information For example, when it is determined again that a coefficient to be encoded in the current group is not 0, and the value of the coefficient identification information of the current group is the first value, it can be determined that although the coefficients to be encoded in the current group are not all 0, it indicates that the current The coefficient identification information of the group whose coefficients to be encoded are not all 0 has already been encoded, so there is no need to repeatedly encode the coefficient identification information of the current group. This can save code words and improve coding efficiency.
  • a zero run value can also be written into the code stream, and then Recode the current coefficients, then set the zero run value to 0.
  • the current coefficient may be the coefficient of all color components of the current point, and the current coefficient may also be the coefficient of the reflectance of the current point.
  • the zero run value run_length can be used to count whether the coefficient to be encoded is zero.
  • the zero run value run_length is not 0 (or greater than 0)
  • the zero run value run_length is 0, it can be determined that all the color components of the current point are 0.
  • the coefficients of the color components are not all 0.
  • the zero run value run_length is not 0, then the coefficient of the reflectivity of the current point can be determined to be 0. If the zero run value run_length is 0, then the coefficient of the reflectivity of the current point can be determined to be not 0.
  • the coefficients in the current group are encoded in a preset order
  • the current coefficient is not 0, that is, the coefficients of the three color components of the current point are not all 0, that is to say , the coefficient of at least one color component among the three color components of the current point is not 0, then it is necessary to first determine whether the value of longZero (coefficient identification information) is 0 (second value), if the value of longZero is 0, then you need to write the value of longZero to 0 into the code stream, that is, write the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 into the code stream, and then set the value of longZero to non-0, for example
  • the value of longZero is set to 1 (the first value), then the zero run value (run_length) can be encoded, and then the current coefficient is encoded, that is, the coefficient of the specific three color components is encoded, and finally the run_length is reset to 0.
  • the coefficient identification information is 0 (second value). If the value of longZero is 0, then the value of longZero of 0 needs to be written into the code stream, which will indicate that the current group of coefficients to be encoded is incomplete. Write the coefficient identification information of 0 into the code stream, and then set the value of longZero to non-0. For example, set the value of longZero to 1 (the first value). Then, you can encode the zero run value (run_length), and then Encode the current coefficient, that is, the coefficient encoding the specific reflectivity, and finally reset run_length to 0.
  • Step 205 If the value of the coefficient identification information is the first value, after writing the zero run value into the code stream, encode the current coefficient and set the zero run value to 0.
  • the current coefficient in the current group of at least one coefficient group to be encoded is not 0, then after determining the coefficient identification information of the current group, if the value of the coefficient identification information is the first value , then you can encode the current coefficient after writing the zero run value into the code stream, and then set the zero run value to 0.
  • the coefficients in the current group are encoded in a preset order
  • the coefficient identification information of 0 has already been encoded, so there is no need to repeatedly encode the coefficient identification information of the current group. This can save code words and improve coding efficiency.
  • the zero run value can be written into the code stream first, and then the current coefficient can be encoded, and then the zero run value can be set to 0.
  • the current coefficient may be the coefficient of all color components of the current point, and the current coefficient may also be the coefficient of the reflectance of the current point.
  • the zero run value run_length can be used to count whether the coefficient to be encoded is zero.
  • the zero run value run_length is not 0 (or greater than 0)
  • the zero run value run_length is 0, it can be determined that all the color components of the current point are 0.
  • the coefficients of the color components are not all 0.
  • the zero run value run_length is not 0, then the coefficient of the reflectivity of the current point can be determined to be 0. If the zero run value run_length is 0, then the coefficient of the reflectivity of the current point can be determined to be not 0.
  • the coefficients in the current group are encoded in a preset order
  • the current coefficient is not 0, that is, the coefficients of the three color components of the current point are not all 0, that is to say , the coefficient of at least one color component among the three color components of the current point is not 0, then it is necessary to first determine whether the value of longZero (coefficient identification information) is 0 (second value), if the value of longZero is not is 0, but is the first value (such as 1), indicating that the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has been written into the code stream, then longZero will no longer be encoded, and then the zero run value (run_length ), then encode the current coefficient, that is, encode the coefficient of the specific three color components, and finally reset run_length to 0.
  • the current coefficient when encoding the coefficients in the current group in a preset order, if the current coefficient is not 0, that is, the coefficient of the reflectance of the current point is not 0, then it is necessary to first Determine whether the value of longZero (coefficient identification information) is 0 (the second value). If the value of longZero is not 0, but the first value (such as 1), it indicates that the coefficients to be encoded in the current group are not all 0.
  • the coefficient identification information has been written into the code stream, so longZero is no longer encoded, and then the zero run value (run_length) can be encoded, and then the current coefficient can be encoded, that is, the coefficient of the specific reflectivity is encoded, and finally the run_length is reset to 0.
  • Step 206 Continue to encode the next coefficient to be encoded in the current group according to the coefficient identification information and the zero run value.
  • the next to-be-encoded coefficient in the current group can be continued to be encoded according to the coefficient identification information and the zero run value until the last to-be-encoded coefficient in the current group.
  • the coefficient to be encoded in the current group can be further determined based on the coefficient identification information or the zero run value. Whether the coding coefficients are all 0. If it is determined that the coefficients to be coded in the current group are all 0, then the coefficient identification information can be set to the first value (for example, 1), that is, the value of the coefficient identification information is set to indicate the value in the current group. The coefficients to be encoded are all 0, and then the coefficient identification information is written into the code stream; if it is determined that the coefficients to be encoded in the current group are not all 0, then the zero run value can be written into the code stream.
  • the first value for example, 1
  • the current coefficient is the last coefficient to be encoded in the current group, then after determining that the current coefficient is 0, it can be determined according to the coefficient identification information whether the coefficient to be encoded in the current group is are all 0, or whether the coefficients to be encoded in the current group are all 0 can be determined based on the zero run value.
  • the coefficient identification information when the current coefficient is the last coefficient to be encoded in the current group, if the value of the coefficient identification information is the second value, it is determined that the coefficients to be encoded in the current group are all is 0, then the coefficient identification information is encoded as the first value and written into the code stream; otherwise, the zero run value is written into the code stream.
  • the coefficient identification information is the second value (for example, 0)
  • the coefficient identification information can be encoded as a first value (for example, 1), and then written into the code stream; if the last coefficient to be encoded is 0, and the coefficient identification information is If the value is the first value (for example, 1), then it can be determined that the coefficients to be encoded in the current group are not all 0, and then the zero run value can be written into the code stream.
  • the coefficient to be encoded in the current group is determined If the coefficients are all 0, then the coefficient identification information is encoded as the first value and written into the code stream. If the zero run value is the same as the number of points in the current group, otherwise the zero run value is written into the code stream.
  • the coefficient identification information can be encoded as the first value (for example, 1), and then written into the code stream; if the last coefficient to be encoded is 0, and the zero run value is smaller than the current group The number of points in , then it can be determined that the coefficients to be encoded in the current group are not all 0, and then the zero run value can be written into the code stream.
  • encoding the point cloud may include the following: step:
  • Step 207 If the current coefficient in the current group of at least one coefficient group to be encoded is 0, after adding 1 to the zero run value, continue to encode the next coefficient to be encoded in the current group.
  • the grouping step parameter to determine at least one coefficient group to be encoded, for the current group in at least one group to be encoded, if the coefficient to be encoded in the current group is If the current coefficient in the encoding coefficient is 0, then the next coefficient to be encoded in the current group can be continued to be encoded after incrementing the zero run value by 1.
  • the zero run value may be initialized to 0.
  • Groups can be pre-initialized to zero run values before they are encoded.
  • the zero run value run_length can be initialized to 0.
  • the current coefficient is the coefficient of all color components of the current point, then if the coefficients of all the color components of the current point in the current group are 0, then the zero run value is performed After the self-increment process, determine the next coefficient to be encoded in the current group.
  • the zero run value can be first An auto-increment process is performed to update the zero run value before determining the next coefficient to be encoded in the current group. For the next coefficient to be encoded, continue to determine whether the coefficients of all color components are 0 to determine whether the coefficients of all color components need to be encoded, and at the same time determine whether the zero run value needs to be incremented by 1.
  • the current coefficient is the coefficient of the reflectance of the current point
  • the coefficient of the reflectivity of the current point in the current group is 0, then 1 is added to the zero run value. After processing, the next coefficient to be encoded in the current group is determined.
  • the zero run value can be performed first. Self-increment processing to update the zero run value before determining the next coefficient to be encoded in the current group. For the next coefficient to be encoded, continue to determine whether the coefficient of reflectivity is 0 to determine whether the coefficient of reflectivity needs to be encoded, and at the same time determine whether the zero run value needs to be incremented by 1.
  • the coefficient of reflectivity of the current point if it is determined that the coefficient of reflectivity of the current point is 0, there is no need to encode the current coefficient. You can choose to first increment the zero run value by 1, that is, perform the ++run_length operation. , and then determine the next coefficient to be encoded in the current group. For the next coefficient to be encoded, if the coefficient of the reflectivity of the point is determined to be 0, there is no need to encode the coefficient of the reflectivity of the point. The zero run value continues to be incremented by 1, that is, the ++run_length operation is performed.
  • encoding the point cloud may include the following steps:
  • Step 208 If the grouping identification information indicates that multiple coefficients to be decoded are not to be grouped, determine whether the current coefficient is 0.
  • the grouping identification information indicates that the multiple coefficients to be encoded are not to be grouped, it can be further determined whether the current coefficient is 0.
  • the current coefficient may be the coefficient of all color components of the current point, and the current coefficient may also be the coefficient of the reflectance of the current point.
  • the coefficients to be encoded need to be encoded sequentially in a preset order. Therefore, multiple coefficients to be encoded can be determined. Whether the current coefficient among the coefficients to be encoded is 0.
  • Step 209 If the current coefficient is 0, after incrementing the zero run value by 1, continue to encode the next coefficient to be encoded among the multiple coefficients to be decoded.
  • Step 210 If the current coefficient is not 0, after writing the zero run value into the code stream, encode the current coefficient, set the zero run value to 0, and continue to encode the next coefficient to be encoded among the multiple coefficients to be decoded.
  • the next coefficient to be encoded among the multiple coefficients to be decoded can be continued to be encoded after incrementing the zero run value by 1; if the current coefficient is not 0, Then, after writing the zero run value into the code stream, the current coefficient can be encoded, the zero run value can be set to 0, and the next coefficient to be encoded among the multiple coefficients to be decoded can be continued to be encoded.
  • the zero run value can be initialized in advance.
  • the zero run value run_length can be initialized to 0.
  • the current coefficient is the coefficient of all color components of the current point, then if the coefficients of all the color components of the current point are 0, then the zero run value is added by 1. After that, determine the next coefficient to be encoded.
  • the zero run value can be first The self-increment process is performed to update the zero run value before determining the next coefficient to be encoded. For the next coefficient to be encoded, continue to determine whether the coefficients of all color components are 0 to determine whether the coefficients of all color components need to be encoded, and at the same time determine whether the zero run value needs to be incremented by 1.
  • the current coefficient is the coefficient of the reflectance of the current point, then if the coefficient of the reflectivity of the current point is 0, then after adding 1 to the zero run value, it is determined The next coefficient to be encoded.
  • the zero run value can be performed first. It is processed by adding 1 to update the zero run value before determining the next coefficient to be encoded. For the next coefficient to be encoded, continue to determine whether the coefficient of reflectivity is 0 to determine whether the coefficient of reflectivity needs to be encoded, and at the same time determine whether the zero run value needs to be incremented by 1.
  • the coefficient of reflectivity of the current point if it is determined that the coefficient of reflectivity of the current point is 0, there is no need to encode the current coefficient. You can choose to first increment the zero run value by 1, that is, perform the ++run_length operation. , and then determine the next coefficient to be encoded. For the next coefficient to be encoded, if the coefficient of the reflectivity of the point is determined to be 0, there is no need to encode the coefficient of the reflectivity of the point. The zero run value continues to be incremented by 1, that is, the ++run_length operation is performed.
  • the encoding method proposed in the embodiment of the present application can group all coefficients based on the indication of the grouping identification information.
  • the coefficient identification information is introduced, such as a flag bit longZero.
  • the flag bit longZero It can be used to indicate whether the coefficients in each group are all 0, so that when all coefficients in a group are 0, only a 1-bit flag is needed to indicate, which can save some code words and thereby improve coding efficiency. Improve compression performance.
  • the embodiment of the present application provides a coding and decoding method.
  • the grouping step parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step parameter to determine at least one coefficient group to be encoded; if at least one coefficient to be encoded is If the current coefficient in the current group in the group is not 0, then the coefficient identification information of the current group is determined; wherein, the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information is value is the second value, then write the coefficient identification information into the code stream, and set the value of the coefficient identification information to the first value; after writing the zero run value into the code stream, encode the current coefficient, and set the zero run value is 0; if the value of the coefficient identification information is the first value, after writing the zero run value into the code stream, encode the current coefficient, and set the zero run value is 0; if the value of the coefficient identification information is the first value, after writing the zero run value into the code stream, encode the current coefficient
  • the quantized residual or the quantized attribute information of all points in the point cloud may first be encoded.
  • the transformation coefficients are grouped, and then a flag bit longZero (coefficient identification information) is introduced to each group.
  • the flag bit longZero can be used to determine whether the quantized residual of the attribute information of the points in each group or the quantized transformation coefficients are uniform. Indicates 0.
  • the quantized residual or the quantized transformation coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be encoded of the point. That is to say, the coefficients to be encoded can be quantized residuals or quantized transform coefficients.
  • the coefficients to be encoded for each point in the point cloud may include coefficients of all color components.
  • a coefficient to be encoded may include a coefficient of the R component, a coefficient of the G component, and a coefficient of the B component; or, a coefficient to be encoded may include a coefficient of the Y component, a coefficient of the U component, and a coefficient of the V component.
  • the longZero flag bit identification information
  • the zero run value run_length is used to count whether the coefficients of all color components of each point are all 0.
  • the coefficients to be encoded at all points can be grouped according to the grouping step size parameter, so that at least one coefficient group to be encoded can be determined.
  • the grouping step parameter can be a fixed length K, where K is an integer greater than or equal to 0, and the grouping step parameter can be any value preset for the point cloud.
  • the grouping step parameter may be predefined in the attribute header information aps, and before encoding and decoding the attribute coefficient, the grouping step parameter may be encoded and decoded first.
  • the grouping step size parameter after determining the grouping step size parameter, can be directly set to the grouping step size, and then multiple coefficients to be encoded can be grouped according to the grouping step size; or , or after determining the grouping step size parameter, first determine the grouping step size according to the grouping step size parameter, and then group multiple coefficients to be encoded according to the grouping step size.
  • the length of the coefficient to be encoded at a point can be set to 1. Since the coefficient to be encoded at each point can include coefficients of all color components, all color components of a point The sum of the lengths of the coefficients can be set to 1. For example, set the sum of the lengths of the coefficients of the R, G, and B color components of a point to 1, or set the sum of the lengths of the coefficients of the Y, U, and V color components of a point to 1.
  • the length of the N coefficients to be encoded at N points can be N, that is, the length of the coefficients to be encoded is the same as the number of points, or in other words, the length of the coefficients to be encoded is the same as the number of points to be encoded.
  • the number of coding coefficients is the same.
  • the multiple coefficients to be encoded are grouped according to the grouping step size K.
  • longZero and run_length can be initialized for the current group in the coefficient group to be encoded.
  • the current group can be initialized.
  • longZero is initialized to 0 (second value), and run_length can also be initialized to 0.
  • the coefficients in the current group are encoded in a preset order, if the current coefficient is not 0, that is, the coefficients of the three color components of the current point are not all 0, that is, Say, among the three color components of the current point, the coefficient of at least one color component is not 0, then you need to first determine whether the value of longZero (coefficient identification information) is 0 (second value).
  • longZero If the value of longZero is 0, then you need to write the value of longZero to 0 into the code stream, that is, write the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 into the code stream, and then set the value of longZero to non-0, for example Set the value of longZero to 1 (the first value), then you can encode the zero run value (run_length), then encode the current coefficient, that is, encode the coefficients of the specific three color components, and finally reset the run_length to 0.
  • the coefficient identification information of the current group is initialized to the second value (for example, 0) in advance, if the current coefficient is not 0 and the coefficient identification information of the current group is If the value is the second value, it can be explained that the coefficients to be encoded in the current group are not all 0, and the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has not yet been encoded. Therefore, the coefficients to be encoded in the current group can be shown first. Coefficient identification information whose coding coefficients are not all 0 is written into the code stream.
  • the value of the coefficient identification information can be reset to the first value, so that the next time the coefficients of the current group that are not 0 are encoded, the value of the coefficient identification information can be referred to, and the coefficient identification of the current group will not be repeated.
  • information For example, when it is determined again that a coefficient to be encoded in the current group is not 0, and the value of the coefficient identification information of the current group is the first value, it can be determined that although the coefficients to be encoded in the current group are not all 0, it indicates that the current The coefficient identification information of the group whose coefficients to be encoded are not all 0 has already been encoded, so there is no need to repeatedly encode the coefficient identification information of the current group. This can save code words and improve coding efficiency.
  • each coefficient to be encoded in the current group is traversed according to the above method, until the last coefficient to be encoded in the current group is determined by the value of longZero or the value of run_length. Whether the coefficients to be encoded in the current group are all 0. For example, after traversing all the coefficients to be encoded in the current group, if the value of longZero is 0, it can be determined that the coefficients to be encoded in the current group are all 0; if the value of longZero is not 0, it can be determined that the current group The coefficients to be encoded in are not all 0.
  • the coefficients to be encoded in the current group are all 0; if the value of run_length is less than If the number of points in the current group is determined, it can be determined that the coefficients to be encoded in the current group are not all 0.
  • the current coefficient is the last coefficient to be encoded in the current group, that is, the current coefficient is the coefficient of all color components of the last point in the current group, then after completing the process according to the above method
  • the value of longZero is 0, it means that all the coefficients to be encoded in the current group are 0, or if the value of run_length is equal to If the number of points in the current group is equal, it means that all the coefficients to be encoded in the current group are 0)
  • the value of longZero can be set to 1 and written into the code stream; if it is determined that all the coefficients to be encoded in the current group are not 0 (If the value of longZero is not 0, it means that all the coefficients to be encoded in the current group are not all 0, or if the value of run_length is less than the number of points in
  • the coefficient to be encoded for each point in the point cloud may be the coefficient of reflectivity.
  • the longZero flag bit when encoding the attribute information of the point cloud, the longZero flag bit (identification information) and the zero run value run_length can be used.
  • the longZero flag bit can indicate whether the coefficients to be encoded in each group are all 0, and the zero run value run_length is used to count whether the reflectivity coefficients of each point are all 0.
  • the coefficients to be encoded at all points can be grouped according to the grouping step size parameter, so that at least one coefficient group to be encoded can be determined.
  • the grouping step parameter can be a fixed length K, where K is an integer greater than or equal to 0, and the grouping step parameter can be any value preset for the point cloud.
  • the grouping step parameter may be predefined in the attribute header information aps, and before encoding and decoding the attribute coefficient, the grouping step parameter may be encoded and decoded first.
  • the grouping step parameter can be directly set to the grouping step, and then multiple coefficients to be decoded can be grouped according to the grouping step; or , or after determining the grouping step size parameter, first determine the grouping step size according to the grouping step size parameter, and then group multiple coefficients to be decoded according to the grouping step size.
  • the length of the coefficient to be encoded at a point can be set to 1, that is, the length of the reflectivity coefficient of a point can be set to 1.
  • the length of the coefficients to be encoded at N points may be N, that is, the length of the coefficients to be encoded is the same as the number of points.
  • the grouping step parameter is K and the length of the coefficient to be encoded is N
  • (G+1) can be determined
  • the number of points in the first G coefficient groups to be encoded is K, that is, the number of coefficients in the first G coefficient groups to be encoded is K, and the number of points in the last coefficient group to be encoded is K', that is, the number of coefficients in the last coefficient group to be encoded is K'.
  • K' is greater than 0 and less than or equal to K.
  • longZero and run_length can be initialized for the current group in the coefficient group to be encoded.
  • the current group can be initialized.
  • longZero is initialized to 0 (second value), and run_length can also be initialized to 0.
  • the coefficients in the current group are encoded in a preset order, if the coefficients of the current point are 0, that is, the coefficients of the reflectivity of the current point are all 0, then the run_length Perform self-add processing, that is, ++run_length, and then continue to process the next coefficient of the current group, that is, process the coefficient of the next reflectivity.
  • the coefficient identification information of the current group is initialized to the second value (for example, 0) in advance, if the current coefficient is not 0 and the coefficient identification information of the current group is If the value is the second value, it can be explained that the coefficients to be encoded in the current group are not all 0, and the coefficient identification information indicating that the coefficients to be encoded in the current group are not all 0 has not yet been encoded. Therefore, the coefficients to be encoded in the current group can be shown first. Coefficient identification information whose coding coefficients are not all 0 is written into the code stream.
  • the value of the coefficient identification information can be reset to the first value, so that the next time the coefficients of the current group that are not 0 are encoded, the value of the coefficient identification information can be referred to, and the coefficient identification of the current group will not be repeated.
  • information For example, when it is determined again that a coefficient to be encoded in the current group is not 0, and the value of the coefficient identification information of the current group is the first value, it can be determined that although the coefficients to be encoded in the current group are not all 0, it indicates that the current The coefficient identification information of the group whose coefficients to be encoded are not all 0 has already been encoded, so there is no need to repeatedly encode the coefficient identification information of the current group. This can save code words and improve coding efficiency.
  • the coefficients to be encoded in the current group are all 0; if the value of run_length is less than If the number of points in the current group is determined, it can be determined that the coefficients to be encoded in the current group are not all 0.
  • the current coefficient is the last coefficient to be encoded in the current group, that is, the current coefficient is the coefficient of the reflectivity of the last point in the current group, then after completing the current coefficient according to the above method
  • the coefficient encoding process if it is determined that all the coefficients to be encoded in the current group are 0 (if the value of longZero is 0, it means that all the coefficients to be encoded in the current group are 0, or if the value of run_length is the same as the current If the number of points in the group is equal, it means that all the coefficients to be encoded in the current group are 0), then the value of longZero can be set to 1 and written into the code stream; if it is determined that all the coefficients to be encoded in the current group are not 0 (If the value of longZero is not 0, it means that all the coefficients to be encoded in the current group are not all 0, or if the value of run_length is less than the number of points in
  • the preset order used by the encoding end can include the original collection order of point clouds, Morton order, Hilbert order, transformation order, etc.
  • the quantized residual or the quantized transform coefficient of the attribute information of all points in the point cloud can be grouped first. , and then introduce a flag bit longZero (coefficient identification information) to each group.
  • the flag bit longZero can be used to indicate whether the quantized residuals or quantized transformation coefficients of the attribute information of the points in each group are all 0. .
  • the quantized residual or the quantized transformation coefficient of the attribute information of a point in the point cloud can be used as the coefficient to be decoded of the point. That is to say, the coefficients to be decoded may be quantized residuals or quantized transform coefficients.
  • the coefficients to be decoded for each point in the point cloud may include coefficients of all color components.
  • a coefficient to be decoded may include a coefficient of the R component, a coefficient of the G component, and a coefficient of the B component; or a coefficient to be decoded may include a coefficient of the Y component, a coefficient of the U component, and a coefficient of the V component.
  • the longZero flag bit (identification information) and the zero run value run_length can be used.
  • the longZero flag bit can indicate whether the coefficients to be decoded in each group are all 0, and the zero run value run_length is used to count whether the coefficients of all color components of each point are all 0.
  • the coefficients to be decoded at all points can be grouped according to the grouping step size parameter, so that at least one coefficient group to be decoded can be determined.
  • the grouping step parameter can be a fixed length K, where K is an integer greater than or equal to 0, and the grouping step parameter can be any value preset for the point cloud.
  • the grouping step parameter may be predefined in the attribute header information aps, and before encoding and decoding the attribute coefficient, the grouping step parameter may be encoded and decoded first.
  • the grouping step parameter can be directly set to the grouping step, and then multiple coefficients to be decoded can be grouped according to the grouping step; or , or after determining the grouping step size parameter, first determine the grouping step size according to the grouping step size parameter, and then group multiple coefficients to be decoded according to the grouping step size.
  • the length of the coefficient to be encoded at a point can be set to 1. Since the coefficient to be encoded at each point can include coefficients of all color components, all color components of a point The sum of the lengths of the coefficients can be set to 1. For example, set the sum of the lengths of the coefficients of the R, G, and B color components of a point to 1, or set the sum of the lengths of the coefficients of the Y, U, and V color components of a point to 1.
  • the length of the N coefficients to be encoded at N points can be N, that is, the length of the coefficients to be encoded is the same as the number of points, or in other words, the length of the coefficients to be encoded is the same as the number of points to be encoded.
  • the number of coding coefficients is the same.
  • the grouping step size determined based on the grouping step size parameter is K and the length of the multiple coefficients to be decoded is N
  • the multiple coefficients to be decoded are grouped according to the grouping step size K.
  • the grouping step size parameter when determining the grouping step size parameter, can be obtained by decoding the code stream; or, the preset grouping step size parameter can also be directly obtained.
  • the value of the coefficient identification information longZero obtained by decoding is the first value, for example, the value is 1, then it can be determined that the coefficients to be decoded in the current group are all 0, and then It can be considered that there is no need to decode the coefficients to be decoded in the current group.
  • the longZero flag is decoded. If the value of longZero is 1, it means that all coefficients of the current group are 0, then continue to decode the next coefficient group to be decoded; if The value of longZero is 0, which means that all coefficients in the current group are not all 0, and the coefficients to be decoded in the current group need to be decoded. Therefore, it is necessary to decode the code stream, continue to determine the zero run value (run_length), and then according to the zero run length The value determines the current coefficients in the current group.
  • run_length the zero run value
  • the longZero flag is decoded. If the value of longZero is 1, it means that all coefficients of the current group are 0, then continue to decode the next coefficient group to be decoded; If the value of longZero is 0, it means that all coefficients in the current group are not all 0, and the coefficients to be decoded in the current group need to be decoded. Therefore, the code stream needs to be decoded, and the zero run value (run_length) needs to be determined, and then based on zero The run value determines the current coefficients in the current group.
  • the preset order used by the decoding end can include the original collection order of point clouds, Morton order, Hilbert order, transformation order, etc.
  • the encoding and decoding method proposed in the embodiment of the present application can group all coefficients based on the indication of the grouping identification information when encoding and decoding coefficients.
  • the coefficient identification information is introduced, such as a flag bit longZero.
  • the bit longZero can be used to indicate whether the coefficients in each group are all 0. Therefore, when all coefficients in a group are 0, only a 1-bit flag is needed to indicate, which can save some code words and thereby improve coding. efficiency and improve compression performance.
  • This embodiment provides a coding and decoding method.
  • coding and decoding attribute information due to the introduction of coefficient identification information, multiple coefficients can be grouped, so that when the coefficients in a coefficient group are all 0, Using one coefficient identification information to indicate the values of multiple coefficients in the group greatly saves code words and improves the encoding and decoding performance of point cloud attributes.
  • Figure 8 is a schematic structural diagram of an encoder.
  • the encoder 120 may include: a first determination Unit 121, setting unit 122 and encoding unit 123; where,
  • the first determining unit 121 is configured to determine a grouping step parameter; group the plurality of coefficients to be encoded according to the grouping step parameter to determine at least one coefficient group to be encoded; if the at least one coefficient to be encoded If the current coefficient in the current group in the group is not 0, then determine the coefficient identification information of the current group; wherein the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0;
  • the encoding unit 123 is configured to write the coefficient identification information into the code stream if the value of the coefficient identification information is the second value;
  • the setting unit 122 is configured to set the value of the coefficient identification information to the first value if the value of the coefficient identification information is the second value;
  • the encoding unit 123 is also configured to encode the current coefficient after writing the zero run value into the code stream;
  • the setting unit 122 is also configured to set the zero run value to 0;
  • the encoding unit 123 is also configured to encode the current coefficient after writing the zero run value into the code stream if the value of the coefficient identification information is the first value;
  • the setting unit 122 is also configured to set the zero run value to 0;
  • the encoding unit 123 is further configured to continue encoding the next coefficient to be encoded in the current group according to the coefficient identification information and the zero run value.
  • the "unit" may be part of a circuit, part of a processor, part of a program or software, etc., and of course may also be a module, or may be non-modular.
  • each component in this embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially either The part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes a number of instructions to make a computer device (can It is a personal computer, server, or network device, etc.) or processor that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage media include: U disk, mobile hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk and other media that can store program code.
  • embodiments of the present application provide a computer-readable storage medium for use in the encoder 120.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed by the first processor, any of the foregoing embodiments can be implemented. method described in one item.
  • Figure 9 is a schematic diagram 2 of the composition of the encoder.
  • the encoder 120 may include: a first memory 124 and a first processor 125. Communication interface 126 and first bus system 127 .
  • the first memory 124 , the first processor 125 , and the first communication interface 126 are coupled together through a first bus system 127 .
  • the first bus system 127 is used to implement connection communication between these components.
  • the first bus system 127 also includes a power bus, a control bus and a status signal bus.
  • various buses are labeled as first bus system 127 in FIG. 9 . in,
  • the first communication interface 126 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the first memory 124 is used to store a computer program capable of running on the first processor
  • the first processor 125 is configured to determine the grouping step size parameter when running the computer program; group multiple coefficients to be encoded according to the grouping step size parameter to determine at least one coefficient group to be encoded; if at least one coefficient to be encoded is If the current coefficient in the current group in the coding coefficient group is not 0, then the coefficient identification information of the current group is determined; wherein, the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information is the second value, then the coefficient identification information is written into the code stream, and the value of the coefficient identification information is set to the first value; after the zero run value is written into the code stream, the current coefficient is encoded, and the zero run value is The value is set to 0; if the value of the coefficient identification information is the first value, then after writing the zero run value into the code stream, encode the current coefficient and set the zero run value to 0; continue to use the coefficient identification information and the zero run value Encode the next coefficient in the current group to be encoded
  • the first memory 124 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDRSDRAM
  • enhanced SDRAM ESDRAM
  • Synchlink DRAM SLDRAM
  • Direct Rambus RAM DRRAM
  • the first memory 124 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
  • the first processor 125 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the first processor 125 .
  • the above-mentioned first processor 125 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA). or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the first memory 124.
  • the first processor 125 reads the information in the first memory 124 and completes the steps of the above method in combination with its hardware.
  • the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic device (Programmable Logic Device, PLD), Field-Programmable Gate Array (FPGA), general-purpose processor, controller, microcontroller, microprocessor, and other devices used to perform the functions described in this application electronic unit or combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device Digital Signal Processing Device
  • DSPD Digital Signal Processing Device
  • PLD programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • the technology described in this application can be implemented through modules (such as procedures, functions, etc.) that perform the functions described in this application.
  • Software code may be stored in memory and executed by a processor.
  • the memory can be implemented in the processor or external to the processor.
  • the first processor 125 is further configured to perform the method described in any one of the preceding embodiments when running the computer program.
  • Figure 10 is a schematic structural diagram of a decoder. As shown in Figure 10, the decoder 130 may include: a second determination unit 131; wherein,
  • the second determining unit 131 is configured to determine the grouping step size parameter; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one coefficient group to be decoded; determine the coefficients in the at least one coefficient group to be decoded.
  • the coefficient identification information of the current group wherein the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information indicates the coefficients to be decoded in the current group are all 0, then the decoding process of the coefficients to be decoded in the current group is completed, and the identification information of the next coefficient group to be decoded in the at least one coefficient group to be decoded is continued.
  • the "unit" may be part of a circuit, part of a processor, part of a program or software, etc., and of course may also be a module, or may be non-modular.
  • each component in this embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially either The part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes a number of instructions to make a computer device (can It is a personal computer, server, or network device, etc.) or processor that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage media include: U disk, mobile hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk and other media that can store program code.
  • embodiments of the present application provide a computer-readable storage medium for use in the decoder 130.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed by the first processor, any of the foregoing embodiments can be implemented. method described in one item.
  • Figure 11 is a schematic diagram 2 of the composition of the decoder.
  • the decoder 130 may include: a second memory 132 and a second processor 133. Communication interface 134 and second bus system 135 .
  • the second memory 132, the second processor 133, and the second communication interface 134 are coupled together through the second bus system 135. It can be understood that the second bus system 135 is used to implement connection communication between these components.
  • the second bus system 135 includes a power bus, a control bus and a status signal bus in addition to the data bus. However, for the sake of clarity, the various buses are labeled as second bus system 135 in FIG. 11 . in,
  • the second communication interface 134 is used for receiving and sending signals during the process of sending and receiving information with other external network elements
  • the second memory 132 is used to store computer programs that can run on the second processor
  • the second processor 133 is configured to determine the grouping step size parameter when running the computer program; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one coefficient group to be decoded; determine at least one coefficient group to be decoded.
  • Coefficient identification information of the current group in the decoding coefficient group wherein, the coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information indicates that the coefficients to be decoded in the current group are all 0, Then, the decoding process of the coefficients to be decoded in the current group is completed, and the coefficient identification information of the next coefficient group to be decoded in at least one coefficient group to be decoded is continued to be determined.
  • the second memory 132 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDRSDRAM
  • enhanced SDRAM ESDRAM
  • Synchlink DRAM SLDRAM
  • Direct Rambus RAM DRRAM
  • the second memory 132 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
  • the second processor 133 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the second processor 133 .
  • the above-mentioned second processor 133 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA). or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the second memory 132.
  • the second processor 133 reads the information in the second memory 132 and completes the steps of the above method in combination with its hardware.
  • the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic device (Programmable Logic Device, PLD), Field-Programmable Gate Array (FPGA), general-purpose processor, controller, microcontroller, microprocessor, and other devices used to perform the functions described in this application electronic unit or combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device Digital Signal Processing Device
  • DSPD Digital Signal Processing Device
  • PLD programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • the technology described in this application can be implemented through modules (such as procedures, functions, etc.) that perform the functions described in this application.
  • Software code may be stored in memory and executed by a processor.
  • the memory can be implemented in the processor or external to the processor.
  • Embodiments of the present application provide an encoder and a decoder.
  • encoding and decoding attribute information due to the introduction of coefficient identification information, multiple coefficients can be grouped, so that the coefficients in a coefficient group are all 0.
  • coefficient identification information can be used to indicate the values of multiple coefficients in the group, which greatly saves code words and improves the encoding and decoding performance of point cloud attributes.
  • Embodiments of the present application provide a coding and decoding method, an encoder, a decoder and a storage medium.
  • a grouping step parameter is determined; multiple coefficients to be encoded are grouped according to the grouping step parameter to determine at least one coefficient to be encoded.
  • Coefficient group if the current coefficient in the current group in at least one coefficient group to be encoded is not 0, determine the coefficient identification information of the current group; wherein the coefficient identification information is used to determine whether the coefficients to be decoded in the current group are all 0 Perform instructions; if the value of the coefficient identification information is the second value, write the coefficient identification information into the code stream, and set the value of the coefficient identification information to the first value; after writing the zero run value into the code stream, Encode the current coefficient and set the zero run value to 0; if the value of the coefficient identification information is the first value, then after writing the zero run value into the code stream, encode the current coefficient and set the zero run value to 0; continue according to The coefficient identification information and the zero run value encode the next coefficient in the current group to be encoded.
  • the grouping step size parameter determines the grouping step size parameter; group multiple coefficients to be decoded according to the grouping step size parameter to determine at least one coefficient group to be decoded; determine the coefficient identification information of the current group in at least one coefficient group to be decoded; wherein, The coefficient identification information is used to indicate whether the coefficients to be decoded in the current group are all 0; if the coefficient identification information indicates that the coefficients to be decoded in the current group are all 0, then the decoding process of the coefficients to be decoded in the current group is completed. Continue to determine coefficient identification information of a next to-be-decoded coefficient group in at least one to-be-decoded coefficient group.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请实施例提供了一种解码方法,在解码端,确定分组步长参数;按照分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定至少一个待解码系数组中的当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息指示当前组中的待解码系数均为0,则完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息。

Description

编解码方法、编码器、解码器以及存储介质 技术领域
本申请实施例涉及点云压缩技术领域,尤其涉及一种编解码方法、编码器、解码器以及存储介质。
背景技术
在基于音视频编码标准提供的点云压缩(Audio Video Standard-Point Cloud Compression,AVS-PCC)编解码框架中,点云的几何信息和属性信息是分开进行编码的。几何编码完成后,对几何信息进行重建,而属性信息的编码将依赖于重建的几何信息。其中,属性信息编码主要针对颜色信息的编码,将其转变成更符合人眼视觉特性的YUV色彩空间,然后对预处理后属性信息进行属性编码,最终生成二进制的属性码流。
目前,点云压缩参考平台(Point Cloud Reference Model,PCRM)在属性编码过程中,需要编码/解码连续为0的系数的数量,然而,经过预测、变换、量化后的系数较小,经统计发现通常存在连续的为0的系数,这就在一定程度上增加了编解码过程的复杂度,降低了编解码效率。
发明内容
本申请实施例提供一种编解码方法、编码器、解码器以及存储介质,能够提高点云属性的编解码效率。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,所述方法包括:
确定分组步长参数;
按照所述分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;
确定所述至少一个待解码系数组中的当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;
若所述系数标识信息指示所述当前组中的待解码系数均为0,则完成对所述当前组中的待解码系数的解码处理,继续确定所述至少一个待解码系数组中的下一个待解码系数组的系数标识信息。
第二方面,本申请实施例提供了一种编码方法,应用于编码器,所述方法包括:
确定分组步长参数;
按照所述分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;
若所述至少一个待编码系数组中的当前组中的当前系数不为0,则确定所述当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;
若所述系数标识信息的取值为第二值,则将所述系数标识信息写入码流,并将所述系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码所述当前系数,将所述零游程值设置为0;
若所述系数标识信息的取值为第一值,则在将零游程值写入码流后,编码所述当前系数,将所述零游程值设置为0;
继续根据所述系数标识信息和所述零游程值编码所述当前组中的下一个待编码系数。
在上述方案中,当所述当前系数为所述当前组中的最后一个待编码系数时,若所述系数标识信息的取值为所述第二值,则确定所述当前组中的待编码系数均为0,则将所述系数标识信息编码为第一值,并写入码流;否则将所述零游程值写入码流。
在上述方案中,当所述当前系数为所述当前组的最后一个待编码系数时,若所述零游程值与所述当前组中的点的个数相同,则确定所述当前组中的待编码系数均为0,则将所述系数标识信息编码为第一值,并写入码流;否则将零游程值写入码流。
第三方面,本申请实施例提供了一种编码器,所述编码器包括第一确定单元,设置单元和编码单元;其中,
所述第一确定单元,配置为确定分组步长参数;按照所述分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;若所述至少一个待编码系数组中的当前组中的当前系数不为0,则确定所述当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行 指示;
所述编码单元,配置为若所述系数标识信息的取值为第二值,则将所述系数标识信息写入码流;
所述设置单元,配置为若所述系数标识信息的取值为第二值,将所述系数标识信息的取值设置为第一值;
所述编码单元,还配置为在将零游程值写入码流后,编码所述当前系数;
所述设置单元,还配置为将所述零游程值设置为0;
所述编码单元,还配置为若所述系数标识信息的取值为第一值,则在将零游程值写入码流后,编码所述当前系数;
所述设置单元,还配置为将所述零游程值设置为0;
所述编码单元,还配置为继续根据所述系数标识信息和所述零游程值编码所述当前组中的下一个待编码系数。
第四方面,本申请实施例提供了一种编码器,所述编码器包括第一存储器和第一处理器;其中,
所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;
所述第一处理器,用于在运行所述计算机程序时,执行如上所述的编码方法。
第五方面,本申请实施例提供了一种解码器,所述解码器包括第二确定单元;其中,
所述第二确定单元,配置为确定分组步长参数;按照所述分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定所述至少一个待解码系数组中的当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;若所述系数标识信息指示所述当前组中的待解码系数均为0,则完成对所述当前组中的待解码系数的解码处理,继续确定所述至少一个待解码系数组中的下一个待解码系数组的标识信息。
第六方面,本申请实施例提供了一种解码器,所述解码器包括第二存储器和第二处理器;其中,
所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;
所述第二处理器,用于在运行所述计算机程序时,执行如上所述的解码方法。
第七方面,本申请实施例提供了一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如上所述的解码方法、或者实现如上所述的编码方法。
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,在编码端,确定分组步长参数;按照分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;若至少一个待编码系数组中的当前组中的当前系数不为0,则确定当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息的取值为第二值,则将系数标识信息写入码流,并将系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码当前系数,将零游程值设置为0;若系数标识信息的取值为第一值,则在将零游程值写入码流后,编码当前系数,将零游程值设置为0;继续根据系数标识信息和零游程值编码当前组中的下一个待编码系数。在解码端,确定分组步长参数;按照分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定至少一个待解码系数组中的当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息指示当前组中的待解码系数均为0,则完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息。由此可见,在本申请的实施例中,在进行属性信息的编解码时,由于引入了系数标识信息,可以对多个系数进行分组处理,从而在一个系数组中的系数均为0时,可以使用一个系数标识信息对该组的多个系数的取值情况进行指示,大大节省了码字,提高了点云属性的编解码性能。
附图说明
图1A为本申请实施例提供的一种三维点云图像示意图;
图1B为本申请实施例提供的一种三维点云图像的局部放大示意图;
图2A为本申请实施例提供的一种不同观看角度下的点云图像示意图;
图2B为本申请实施例提供的一种图2A对应的数据存储格式示意图;
图3为本申请实施例提供的一种点云编解码的网络架构示意图;
图4为本申请实施例提供的一种点云编码器的组成结构示意图;
图5为本申请实施例提供的一种点云解码器的组成结构示意图;
图6为本申请实施例提出的解码方法的实现流程示意图;
图7为本申请实施例提出的编码方法的实现流程示意图;
图8为编码器的组成结构示意图一;
图9为编码器的组成结构示意图二;
图10为解码器的组成结构示意图一;
图11为解码器的组成结构示意图二。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
点云(Point Cloud)是物体表面的三维表现形式,通过光电雷达、激光雷达、激光扫描仪、多视角相机等采集设备,可以采集得到物体表面的点云(数据)。
点云是空间中一组无规则分布的、表达三维物体或场景的空间结构及表面属性的离散点集,图1A展示了三维点云图像和图1B展示了三维点云图像的局部放大图,可以看到点云表面是由分布稠密的点所组成的。
二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地表达一幅点云。与二维图像类似,采集过程中每一个位置均有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于点云来说,每一个点所对应的属性信息除了颜色信息以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。因此,点云中的点可以包括点的位置信息和点的属性信息。例如,点的位置信息可以是点的三维坐标信息(x,y,z)。点的位置信息也可称为点的几何信息。例如,点的属性信息可以包括颜色信息(三维颜色信息)和/或反射率(一维反射率信息r)等等。例如,颜色信息可以是任意一种色彩空间上的信息。例如,颜色信息可以是RGB信息。其中,R表示红色(Red,R),G表示绿色(Green,G),B表示蓝色(Blue,B)。再如,颜色信息可以是亮度色度(YCbCr,YUV)信息。其中,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色色差。
根据激光测量原理得到的点云,点云中的点可以包括点的三维坐标信息和点的反射率值。再如,根据摄影测量原理得到的点云,点云中的点可以可包括点的三维坐标信息和点的三维颜色信息。再如,结合激光测量和摄影测量原理得到点云,点云中的点可以可包括点的三维坐标信息、点的反射率值和点的三维颜色信息。
如图2A和图2B所示为一幅点云图像及其对应的数据存储格式。其中,图2A提供了点云图像的六个观看角度,图2B由文件头信息部分和数据部分组成,头信息包含了数据格式、数据表示类型、点云总点数、以及点云所表示的内容。例如,点云为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维坐标信息(x,y,z)和三维颜色信息(r,g,b)。
点云可以按获取的途径分为:
静态点云:即物体是静止的,获取点云的设备也是静止的;
动态点云:物体是运动的,但获取点云的设备是静止的;
动态获取点云:获取点云的设备是运动的。
例如,按点云的用途分为两大类:
类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;
类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。
点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。
点云的采集主要有以下途径:计算机生成、3D激光扫描、3D摄影测量等。计算机可以生成虚拟三维物体及场景的点云;3D激光扫描可以获得静态现实世界三维物体或场景的点云,每秒可以获取百万级点云;3D摄影测量可以获得动态现实世界三维物体或场景的点云,每秒可以获取千万级点云。这些技术降低了点云数据获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间和传输带宽限制的瓶颈。
示例性地,以帧率为30帧每秒(fps)的点云视频为例,每帧点云的点数为70万,每个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s点云视频的数据量大约为0.7million×(4Byte×3+1Byte×3)×30fps×10s=3.15GB,其中,1Byte为8bit,而YUV采样格式为4:2:0,帧率为24fps的1280×720二维视频,其10s的数据量约为1280×720×12bit×24fps×10s≈0.33GB,10s的两视角三维视频的数据量约为0.33×2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。
也就是说,由于点云是海量点的集合,存储点云不仅会消耗大量的内存,而且不利于传输,也没有这么大的带宽可以支持将点云不经过压缩直接在网络层进行传输,因此,需要对点云进行压缩。
目前,可对点云进行压缩的点云编码框架可以是运动图像专家组(Moving Picture Experts Group,MPEG)提供的基于几何的点云压缩(Geometry-based Point Cloud Compression,G-PCC)编解码框架或基于视频的点云压缩(Video-based Point Cloud Compression,V-PCC)编解码框架,也可以是AVS提供的AVS-PCC编解码框架。G-PCC编解码框架可用于针对第一类静态点云和第三类动态获取点云进行压缩,V-PCC编解码框架可用于针对第二类动态点云进行压缩。G-PCC编解码框架也称为点云编解码器TMC13,V-PCC编解码框架也称为点云编解码器TMC2。
本申请实施例提供了一种包含解码方法和编码方法的点云编解码系统的网络架构,图3为本申请实施例提供的一种点云编解码的网络架构示意图。如图3所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有点云编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限制。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。
其中,本申请实施例中的电子设备具有点云编解码功能,一般包括点云编码器(即编码器)和点云解码器(即解码器)。
下面以AVS-PCC编解码框架为例进行点云压缩技术的说明。
可以理解,点云压缩一般采用点云几何信息和属性信息分别压缩的方式,在编码端,首先在几何编码器中编码点云几何信息,然后将重建几何信息作为附加信息输入到属性编码器中,辅助点云属性的压缩;在解码端,首先在几何解码器中解码点云几何信息,然后将解码后的几何信息作为附加信息输入到属性解码器中,辅助点云属性的压缩。整个编解码器由预处理/后处理、几何编码/解码、属性编码/解码几部分组成。
本申请实施例提供一种点云编码器,如图4所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云编码器11包括几何编码器:坐标平移单元111、坐标量化单元112、八叉树构建单元113、几何熵编码器114、几何重建单元115。属性编码器:属性重上色单元116、颜色空间变换单元117、第一属性预测单元118、量化单元119和属性熵编码器1110。
对于PCRM,在编码端的几何编码部分,首先对原始几何信息进行预处理,通过坐标平移单元111将几何原点归一化到点云空间中的最小值位置,通过坐标量化单元112将几何信息从浮点数转化为整形,便于后续的规则化处理;然后对规则化的几何信息进行几何编码,在八叉树构建单元113中采用八叉树结构对点云空间进行递归划分,每次将当前节点划分成八个相同大小的子块,并判断每个子块的占有码字情况,当子块内不包含点时记为空,否则记为非空,在递归划分的最后一层记录所有块的占有码字信息,并进行几何编码;通过八叉树结构表达的几何信息一方面输入到几何熵编码器114中形成几何码流,另一方面在几何重建单元115进行几何重建处理,重建后的几何信息作为附加信息输入到属性编码器中。
在属性编码部分,首先对原始的属性信息进行预处理,由于几何信息在几何编码之后有所异动,因此,通过属性重上色单元116为几何编码后的每一个点重新分配属性值,实现属性重上色。此外,如果处理的属性信息为颜色信息,还需要将原始的颜色信息通过颜色空间变换单元117进行颜色空间变换,将其转变成更符合人眼视觉特性的YUV色彩空间;然后通过第一属性预测单元118对预处理后属性信息进行属性编码,属性编码首先需要将点云进行重排序,重排序的方式是莫顿码,因此属性编码的遍历顺序为莫顿顺序。PCRM中的属性预测方法为基于莫顿顺序的单点预测,即按照莫顿顺序从当前待编码 点(当前节点)向前回溯一个点,找到的节点为当前待编码点的预测参考点,然后将预测参考点的属性重建值作为属性预测值,属性残差值为当前待编码点的属性原始值与属性预测值之间的差值;最后通过量化单元119对属性残差值进行量化,将量化后的残差信息输入到属性熵编码器1110中形成属性码流。
本申请实施例还提供一种点云解码器,如图5所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云解码器12包括几何解编码器:几何熵解码器121、八叉树重建单元122、坐标反量化单元123、坐标反平移单元124。属性解码器:属性熵解码器125、反量化单元126、第二属性预测单元127和颜色空间反变换单元128。
在解码端,同样采用几何和属性分别解码的方式。在几何解码部分,首先通过几何熵解码器121对几何码流进行熵解码,得到每个节点的几何信息,然后按照和几何编码相同的方式通过八叉树重建单元122构建八叉树结构,结合解码几何重建出坐标变换后的、通过八叉树结构表达的几何信息,一方面将该信息通过坐标反量化单元123进行坐标反量化和通过坐标反平移单元124进行反平移,得到解码几何信息。另一方面作为附加信息输入到属性解码器中。在属性解码部分,按照与编码端相同的方式构建莫顿顺序,先通过属性熵解码器125对属性码流进行熵解码,得到量化后的残差信息;然后通过反量化单元126进行反量化,得到属性残差值;类似的,按照与属性编码相同的方式,通过第二属性预测单元127获得当前待解码点的属性预测值,然后将属性预测值与属性残差值相加,可以恢复出当前待解码点的属性重建值(例如,YUV属性值);最后,经过颜色空间反变换单元128的颜色空间反变换得到解码属性信息。
还可以理解,对于AVS-PCC编解码框架而言,通用测试条件如下:
测试条件共4种:
条件1:几何位置有限度有损、属性有损;
条件2:几何位置无损、属性有损;
条件3:几何位置无损、属性有限度有损;
条件4:几何位置无损、属性无损。
通用测试序列包括Cat1A,Cat1B,Cat1C,Cat2-frame和Cat3共五类。其中,Cat1A、Cat2-frame点云只包含反射率属性信息,Cat1B、Cat3点云只包含颜色属性信息,Cat1C点云同时包含颜色和反射率属性信息。
实施方式共4种,以属性压缩所采用的算法进行区分。
实施方式1:预测分支,属性压缩采用基于预测的方法;
在编码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先采用预测算法得到属性预测值,根据属性值和属性预测值得到属性残差,然后对属性残差进行量化,生成量化残差,最后对量化残差进行编码;
在解码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先采用预测算法得到属性预测值,然后解码获取量化残差,再对量化残差进行反量化,最后根据属性预测值和反量化后的残差,获得属性重建值。
实施方式2:预测变换分支—资源受限,属性压缩采用基于帧内预测和k元离散余弦变换(Discrete Cosine Transform,DCT)变换的方法,在编码量化后的变换系数时,有最大点数X(如4096)的限制,即最多每X点为一组进行编码:
在编码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,然后将这若干个小组组合成若干个大组(每个大组中的点数不超过X,如4096),然后采用预测算法得到属性预测值,根据属性值和属性预测值得到属性残差,以小组为单位对属性残差进行DCT变换,生成变换系数,再对变换系数进行量化,生成量化后的变换系数,最后以大组为单位对量化后的变换系数进行编码;
在解码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,然后将这若干个小组组合成若干个大组(每个大组中的点数不超过X,如4096),以大组为单位解码获取量化后的变换系数,然后采用预测算法得到属性预测值,再以小组为单位对量化后的变换系数进行反量化、反变换,最后根据属性预测值和反量化、反变换后的系数,获得属性重建值。
实施方式3:预测变换分支—资源不受限,属性压缩采用基于帧内预测和DCT变换的方法,在编码量化后的变换系数时,没有最大点数X的限制,即所有系数一起进行编码:
在编码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,然后采用预测算法得到属性预测值,根据属性值和属性预测值得到属性残差,以小组为单位对属性残差进行DCT变换,生成变换系数,再对变换系数 进行量化,生成量化后的变换系数,最后对整个点云的量化后的变换系数进行编码;
在解码端,按照一定的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,解码获取整个点云的量化后的变换系数,然后采用预测算法得到属性预测值,再以小组为单位对量化后的变换系数进行反量化、反变换,最后根据属性预测值和反量化、反变换后的系数,获得属性重建值。
实施方式4:多层变换分支,属性压缩采用基于多层小波变换的方法:
在编码端,对整个点云进行多层小波变换,生成变换系数,然后对变换系数进行量化,生成量化后的变换系数,最后对整个点云的量化后的变换系数进行编码;
在解码端,解码获取整个点云的量化后的变换系数,然后对量化后的变换系数进行反量化、反变换,获得属性重建值。
在实施方式1中,系数可以为量化残差,在上述实施例2、3、4中,系数可以为量化后的变换系数。当前通过AVS-PCC编解码框架对系数进行编解码的具体实施步骤如下:
对于颜色属性,编解码端采用相同的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序、变换顺序等)依次对每个点的系数(包含三个系数,分别是颜色三分量RGB或YUV)进行编码/解码,run_length用于对每个点的系数进行是否均为0的计数,称为零游程值,其初值设为0。
对于每个点的系数,在编码端,若该点的系数均为零,则++run_length,然后处理下一个点的系数;若颜色三分量有任意一维的系数不为零,则先编码零游程值(run_length),然后将run_length重置为0,再编码具体的三个系数值,然后处理下一点的系数。对于最后一点的系数,若均为0,则++run_length,并编码run_length值;否则先编码零游程值(run_length),然后将run_length重置为0,再编码具体的三个系数值,最后再编码run_length值。
在解码端,先解码零游程值(run_length),如果run_length>0,说明当前颜色三分量的三个系数均为零,则进行--run_length操作,然后处理下一点的系数;若run_length==0,说明当前颜色三分量至少有一维的系数不为零,则先解码该点的系数,再解码并更新零游程值(run_length),然后处理下一点的系数。
对于反射率属性,编解码端采用相同的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序、变换顺序等)依次对每个系数进行编码/解码,run_length用于对系数进行是否为0的计数,称为零游程值,其初值设为0。
对于每一个系数,在编码端,若系数为零,则++run_length,然后处理下一个系数;否则,先编码零游程值(run_length),然后将run_length重置为0,再编码具体的系数值,然后处理下一个系数。对于最后一个系数,若为0,则++run_length,并编码run_length值;否则先编码零游程值(run_length),然后将run_length重置为0,再编码具体的系数值,最后再编码run_length值。
在解码端,先解码零游程值(run_length),如果run_length>0,说明当前系数为零,则进行--run_length操作,然后处理下一个系数;若run_length==0,说明当前系数不为零,则先解码该系数,再解码并更新零游程值(run_length),然后处理下一个系数。
当前PCRM在这种情况下需要编码/解码连续为0的系数的数量,然而,经过预测、变换、量化后的系数较小,经统计发现通常存在连续的为0的系数,这就在一定程度上增加了编解码过程的复杂度,降低了编解码效率。
为了解决上述问题,本申请实施例提供了一种编解码方法,在编码端,确定分组步长参数;按照分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;若至少一个待编码系数组中的当前组中的当前系数不为0,则确定当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息的取值为第二值,则将系数标识信息写入码流,并将系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码当前系数,将零游程值设置为0;若系数标识信息的取值为第一值,则在将零游程值写入码流后,编码当前系数,将零游程值设置为0;继续根据系数标识信息和零游程值编码当前组中的下一个待编码系数。在解码端,确定分组步长参数;按照分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定至少一个待解码系数组中的当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息指示当前组中的待解码系数均为0,则完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息。由此可见,在本申请的实施例中,在进行属性信息的编解码时,由于引入了系数标识信息,可以对多个系数进行分组处理,从而在一个系数组中的系数均为0时,可以使用一个系数标识信息对该组的多个系数的取值情况进行指示,大大节省了码字,提高了点云属性的编解码性能。
下面将结合附图对本申请各实施例进行详细说明。
本申请的一个实施例提出的一种解码方法,图6为本申请实施例提出的解码方法的实现流程示意图,如图6所示,在对点云进行解码处理时可以包括以下步骤:
步骤101、确定分组步长参数。
需要说明的是,本申请实施例的解码方法具体是指点云解码方法,该方法可以应用于点云解码器(也可简称为“解码器”)。
还需要说明的是,在本申请实施例中,待处理点云包括至少一个节点。其中,对于待处理点云中的节点,在对该节点进行解码时,其可以作为待处理点云中的待解码节点,而且该节点的周围存在有多个已解码节点。在这里,当前节点即是这至少一个节点中当前需要解码的待解码节点。
进一步地,在本申请实施例中,对于待处理点云中的每一个节点,其对应一个几何信息和一个属性信息;其中,几何信息表征该点的空间关系,属性信息表征该点的属性信息。
在这里,属性信息可以为颜色分量,也可以是反射率或者其它属性,本申请实施例不作具体限定。其中,当属性信息为颜色分量时,具体可以为任意颜色空间的颜色信息。示例性地,属性信息可以为RGB空间的颜色信息,也可以为YUV空间的颜色信息,还可以为YCbCr空间的颜色信息等等,本申请实施例也不作具体限定。
还需要说明的是,在本申请实施例中,解码器可以按照预设解码顺序对这至少一个节点进行排列,以便确定每一节点对应的索引序号。这样,根据每一节点对应的索引序号,解码器能够按照预设解码顺序处理待处理点云中的每一节点。
在一些实施例中,预设解码顺序可以为下述其中之一:点云原始顺序、莫顿顺序、希尔伯特顺序等等,本申请实施例不作具体限定。
在本申请的实施例中,解码码流,可以确定分组标识信息。其中,分组标识信息可以用于确定是否使用分组处理的方式解码多个待解码系数。
需要说明的是,在本申请的实施例中,可以将分组标识信息理解为一个表明是否对点云中的多个待解码系数进行分组处理的标志位。具体地,解码器解码码流,可以确定作为分组标识信息的一个变量,从而可以通过该变量的取值来实现分组标识信息的确定。
也就是说,在本申请的实施例中,分组标识信息的取值不同,解码点云中的多个待解码系数的处理方式也不同。
可以理解的是,在本申请的实施例中,基于分组标识信息的取值,在进行多个待解码系数的解码时,可以选择使用对多个待解码系数进行分组处理,也可以选择不对多个待解码系数进行分组处理。
示例性的,在本申请的实施例中,如果分组标识信息的取值为1,那么可以选择对多个待解码系数进行分组处理;如果分组标识信息的取值为0,那么可以选择不对多个待解码系数进行分组处理。
需要说明的是,在本申请的实施例中,分组标识信息的取值也可以设置为其他数值或参数,本申请不作任何限定。
进一步地,在本申请的实施例中,可以使用一个标志位subBlock来表示分组标识信息。
例如,在本申请的实施例中,如果subBlock的取值为1,那么可以表示对多个待解码系数进行分组处理;如果subBlock的取值为0,那么可以表示不多个待解码系数进行分组处理。
可以理解的是,在本申请的实施例中,可以将点云中的一个点的属性信息的量化残差或量化后的变换系数作为该点的待解码系数。也就是说,待解码系数可以为量化残差,也可以为量化后的变换系数。
进一步地,在本申请的实施例中,在对颜色属性进行解码时,点云中的每一个点的待解码系数可以包括全部颜色分量的系数。例如,一个待解码系数可以包括R分量的系数、G分量的系数、B分量的系数;或者,一个待解码系数可以包括Y分量的系数、U分量的系数、V分量的系数。
进一步地,在本申请的实施例中,在对反射率属性进行解码时,点云中的每一个点的待解码系数可以为反射率的系数。
可以理解的是,在本申请的实施例中,在解码码流确定分组标识信息之后,如果分组标识信息指示对多个待解码系数进行分组处理,那么可以进一步确定分组步长参数。即在确定分组标识信息指示对多个待解码系数进行分组处理之后,再执行系数标识信息的确定流程。
当然,也可以不进行标识信息的确定而直接执行系数标识信息的确定流程。也就是说,系数标识信息的确定可以依赖于分组标识信息的取值,也可以不依赖于分组标识信息的取值而独立执行。
需要说明的是,在本申请的实施例中,分组步长参数可以用于对多个待解码系数进行分组处理。其中,可以在确定分组步长参数之后,直接将分组步长参数设置为分组步长,然后再根据分组步长对多个待解码系数进行分组;或者,也可以在确定分组步长参数之后,先根据分组步长参数确定分组步长,然后根据分组步长对多个待解码系数进行分组。
进一步地,在本申请的实施例中,分组步长参数可以为大于或者等于0的整数。
可以理解的是,在本申请的实施例中,在进行分组步长参数的确定时,可以通过解码码流获得分组步长参数;或者,也可以直接获取预先设置的分组步长参数。
也就是说,在本申请的实施例中,分组步长参数既可以是从码流中解析获得,也可以是由解码端直接确定的。
示例性的,在本申请的实施例中,分组步长参数可以预先定义在属性头信息aps中,在编解码属性系数之前,可以先对分组步长参数进行编解码。
步骤102、按照分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组。
在本申请的实施例中,如果分组标识信息指示对多个待解码系数进行分组处理,那么在确定分组步长参数之后。可以进一步按照分组步长参数对多个待解码系数进行分组处理,从而可以确定至少一个待解码系数组。
可以理解的是,在本申请的实施例中,在对多个待解码系数进行分组时,可以直接将分组步长参数设置为分组步长,然后再根据分组步长对多个待解码系数进行分组;或者,也可以先根据分组步长参数确定分组步长,然后根据分组步长对多个待解码系数进行分组。其中,分组步长参数可以为大于或者等于0的整数。
也就是说,在本申请的实施例中,如果确定的分组步长参数为K,那么可以设置分组步长为K;或者,也可以确定分组步长为2 K;其中,K为大于或者等于0的整数。
需要说明的是,在本申请的实施例中,在根据分组步长参数确定分组步长时,也可以将分组步长设置为分组步长参数的任意函数值,本申请对此不经具体限定。
示例性的,在本申请的实施例中,假设确定的分组步长参数为K=10,可以根据分组步长参数K确定分组步长为2 K=1024,然后再根据分组步长对多个待解码系数进行分组。
示例性的,在本申请的实施例中,假设确定的分组步长参数为K=512,可以直接根据分组步长参数K设定分组步长为512,然后再根据分组步长对多个待解码系数进行分组。当然,分组步长参数的取值也可以为1024、2048、4096等大于或者等于0的任意整数,本申请不作任何限定。
需要说明的是,在本申请的实施例中,在基于分组步长参数对多个待解码系数进行分组之前,可以先对待解码系数的长度进行设置。其中,可以将一个待解码系数的长度设置为一个长度单位。
可以理解的是,在本申请的实施例中,对于颜色属性,一个待解码系数包括全部颜色分量的系数,则一个点的全部颜色分量的系数的长度之和可以设置为一个长度单位;对于反射率属性,一个待解码系数包括反射率的系数,则一个点的反射率的系数可以设置为一个长度单位。
也就是说,在本申请的实施例中,一个点的待解码系数的长度可以设定为1,由于每一个点的待解码系数可以包括全部颜色分量的系数,因此一个点的全部颜色分量的系数的长度之和可以设定为1。例如,将一个点的R、G、B三个颜色分量的系数的长度之和设定为1,或者,将一个点的Y、U、V三个颜色分量的系数的长度之和设定为1。
由此可见,在本申请的实施例中,N个点的N个待解码系数的长度可以为N,即待解码系数的长度与点的个数相同,或者说,待解码系数的长度与待解码系数的个数相同。
示例性的,在本申请的实施例中,如果基于分组步长参数确定的分组步长为K,多个待解码系数的长度为N,那么按照分组步长K对多个待编码系数进行分组之后,可以确定(G+1)个待编码系数组。其中,将N作为被除数,K作为除数进行除法运算后,获得的商为G,余数为K',即N/K=G…K',此时可以确定分组后获得(G+1)个待解码系数组,前G个待解码系数组中的待解码系数的个数为K,最后一个待解码系数组中的待解码系数的个数为K'。
可以理解的是,在本申请的实施例中,K'为小于或者等于K的整数,即最后一个待解码系数组中的待解码系数的个数小于或者等于前G个待解码系数组中的待解码系数的个数。
步骤103、确定至少一个待解码系数组中的当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示。
在本申请的实施例中,在按照分组步长参数对多个待解码系数进行分组,从而确定至少一个待解码系数组之后,对于至少一个待解码组中的当前组,可以进一步确定当前组的系数标识信息,其中,该系数标识信息可以用于对当前组中的待解码系数是否均为0进行指示。
需要说明的是,在本申请的实施例中,可以将系数标识信息理解为一个表明待解码系数组中的全部待解码系数是否均为0的标志位。具体地,解码器解码码流,可以确定作为系数标识信息的一个变量,从而可以通过该变量的取值来实现对应的待解码系数组中的系数是否均为0的确定。
也就是说,在本申请的实施例中,系数标识信息的取值不同,对应待解码系数组中的待解码系数的值的指示信息也不同。
进一步的,在本申请的实施例中,若系数标识信息的取值为第一值,则确定系数标识信息指示当前 组中的待解码系数均为0;若系数标识信息的取值为第二值,则确定系数标识信息指示当前组中的待解码系数不全为0;其中,第一值和第二值不相等。例如,第一值可以为1,第二值可以为0。
示例性的,在本申请的实施例中,如果系数标识信息的取值为第一值,例如取值为1,那么可以认为该系数标识信息指示对应的待解码系数组中的全部待解码系数均为0;如果系数标识信息的取值为第二值,例如为0,那么可以认为该系数标识信息指示对应的待解码系数组中的全部待解码系数不全为0。
需要说明的是,在本申请的实施例中,系数标识信息的取值也可以设置为其他数值或参数,即只要保证第一值和第二值不相等,第一值和第二值的具体取值也可以为其他数值,本申请不作任何限定。
进一步地,在本申请的实施例中,可以使用标志longZero来表示系数标识信息。
例如,在本申请的实施例中,如果longZero的取值为第一值,例如取值为1,那么可以表示当前组中的待解码系数均为0;如果longZero的取值为第二值,例如取值为0,那么可以表示当前组中的待解码系数不全为0。
步骤104、若系数标识信息指示当前组中的待解码系数均为0,则完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息。
在本申请的实施例中,在确定至少一个待解码系数组中的当前组的系数标识信息之后,如果该系数标识信息指示当前组中的待解码系数全部为0,那么可以选择完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息,以根据下一个待解码系数组的系数标识信息对下一个待解码系数组进行解码处理。
可以理解的是,在本申请的实施例中,如果解码获得的系数标识信息longZero的取值为第一值,例如取值为1,那么可以确定当前组中的待解码系数均为0,进而可以认为不需要再对当前组中的待解码系数进行解码处理。
进一步的,在本申请的实施例中,如果基于当前组的系数标识信息选择完成当前组中的待解码系数的解码处理,那么可以继续解码码流,确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息,然后便可以根据下一个待解码系数组的系数标识信息对下一个待解码系数组进行解码处理。
也就是说,在本申请的实施例中,对于下一个待解码系数组,依然需要解码码流来确定对应的系数标识信息,然后根据系数标识信息的取值来确定下一个待解码系数组中的待解码系数是否全部为0,如果下一个待解码系数组中的待解码系数全部为0,那么也选择完成下一个待解码系数组中的待解码系数的解码处理,而是继续按照上述方法遍历至少一个待解码系数组中的其他待解码系数组。
进一步的,在本申请的实施例中,在确定至少一个待解码系数组中的当前组的系数标识信息之后,即步骤103之后,对点云进行解码处理的方法还可以包括以下步骤:
步骤105、若系数标识信息指示当前组中的待解码系数不全为0,则解码码流,确定零游程值,并根据零游程值确定当前组中的当前系数。
在本申请的实施例中,在确定至少一个待解码系数组中的当前组的系数标识信息之后,如果该系数标识信息指示当前组中的待解码系数不全为0,那么可以继续解码码流,确定零游程值,进一步根据零游程值进行当前组中的当前系数的解码处理。
可以理解的是,在本申请的实施例中,如果解码获得的系数标识信息longZero的取值为第二值,例如取值为0,那么可以确定当前组中的待解码系数不全为0,进而需要对当前组中的待解码系数进行解码处理,因此需要解码码流,继续确定零游程值,然后根据零游程值确定当前组中的当前系数。
进一步地,在本申请的实施例中,当前系数可以为当前点的全部颜色分量的系数,当前系数也可以为当前点的反射率的系数。
需要说明的是,在本申请的实施例中,零游程值run_length可以用于对待解码系数进行否为0的计数。其中,对于颜色属性,如果零游程值run_length不为0(或大于0),则可以确定当前点的全部颜色分量的系数均为0,如果零游程值run_length为0,则可以确定当前点的全部颜色分量的系数不全为0。对于反射率属性,如果零游程值run_length不为0,则可以确定当前点的反射率的系数为0,如果零游程值run_length为0,则可以确定当前点的反射率的系数不为0。
进一步地,在本申请的实施例中,如果当前系数为当前点的全部颜色分量的系数,那么,若零游程值指示当前点的全部颜色分量的系数均为0,则在对零游程值进行自减1处理后,根据零游程值确定当前组中的下一个待解码系数;若零游程值指示当前点的全部颜色分量的系数不全为0,则解码码流,确定当前点的全部颜色分量的系数和新的零游程值,根据新的零游程值确定当前组中的下一个待解码系数。
可以理解的是,在本申请的实施例中,对于颜色属性,如果零游程值run_length指示当前点的全部颜色分量的系数均为0,那么便不需要再进行当前系数的解码处理,而是可以先对零游程值进行自减1处理,以更新零游程值,然后再根据零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,继续根据零游程值run_length判断全部颜色分量的系数是否均为0,以确定是否需要对全部颜色分 量的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为3,大于0,那么可以确定当前点的全部颜色分量的系数均为0,因此不需要解码当前系数,可以选择先对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,对应的零游程值run_length为2,大于0,那么可以确定该点的全部颜色分量的系数均为0,因此不需要解码该点的全部颜色分量的系数,继续对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定当前组中的其他待解码系数。
可以理解的是,在本申请的实施例中,对于颜色属性,如果零游程值run_length为0,即零游程值指示当前点的全部颜色分量的系数不全为0,那么需要解码码流,进一步确定当前点的全部颜色分量的系数和新的零游程值,然后根据新的零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,继续根据新的零游程值run_length判断全部颜色分量的系数是否均为0,以确定是否需要对全部颜色分量的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为0,那么可以确定当前点的全部颜色分量的系数不全为0,因此需要解码当前系数,即通过解码码流确定当前点的全部颜色分量,同时可以通过解码码流确定新的零游程值,然后再根据解码获得新的零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,如果对应的零游程值run_length为3,大于0,那么可以确定该点的全部颜色分量的系数均为0,因此不需要解码该点的全部颜色分量的系数,则对零游程值进行自减1处理,即执行--run_length操作。如果对应的零游程值run_length为0,则可以确定该点的全部颜色分量的系数不全为0,因此需要解码该点的全部颜色分量的系数。
进一步地,在本申请的实施例中,如果当前系数为当前点的反射率的系数,那么,若零游程值指示当前点的反射率的系数为0,则在对零游程值进行自减1处理后,根据零游程值确定当前组中的下一个待解码系数;若零游程值指示当前点的反射率的系数不为0,则解码码流,确定当前点的反射率的系数和新的零游程值,根据新的零游程值确定当前组中的下一个待解码系数。
可以理解的是,在本申请的实施例中,对于反射率属性,如果零游程值run_length指示当前点的反射率的系数为0,那么便不需要再进行当前系数的解码处理,而是可以先对零游程值进行自减1处理,以更新零游程值,然后再根据零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,继续根据零游程值run_length判断反射率的系数是否为0,以确定是否需要对反射率的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为3,大于0,那么可以确定当前点的反射率的系数为0,因此不需要解码当前系数,可以选择先对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,对应的零游程值run_length为2,大于0,那么可以确定该点的反射率的系数为0,因此不需要解码该点的反射率的系数,继续对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定当前组中的其他待解码系数。
可以理解的是,在本申请的实施例中,对于反射率属性,如果零游程值run_length为0,即零游程值指示当前点的反射率的系数不为0,那么需要解码码流,进一步确定当前点的反射率的系数和新的零游程值,然后根据新的零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,继续根据新的零游程值run_length判断反射率的系数是否为0,以确定是否需要对反射率的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为0,那么可以确定当前点的反射率的系数不为0,因此需要解码当前系数,即通过解码码流确定当前点的反射率,同时可以通过解码码流确定新的零游程值,然后再根据解码获得新的零游程值确定当前组中的下一个待解码系数。对于下一个待解码系数,如果对应的零游程值run_length为3,大于0,那么可以确定该点的反射率的系数为0,因此不需要解码该点的反射率的系数,则对零游程值进行自减1处理,即执行--run_length操作。如果对应的零游程值run_length为0,则可以确定该点的反射率的系数不为0,因此需要解码该点的反射率的系数。
进一步的,在本申请的实施例中,在解码码流,确定分组标识信息之后,对点云进行解码处理的方法还可以包括以下步骤:
步骤106、若分组标识信息指示不对多个待解码系数进行分组处理,则解码码流,确定零游程值,并根据零游程值确定当前系数。
在本申请的实施例中,在解码码流确定分组标识信息之后,如果分组标识信息指示不对多个待解码系数进行分组处理,那么便需要解码码流,确定零游程值,然后根据零游程值确定当前系数。
可以理解的是,在本申请的实施例中,基于解码获得获得的分组标识信息,如果确定不对多个待解码系数进行分组处理,便需要按照预设顺序依次对待解码系数进行编码处理,因此可以继续解码码流, 确定零游程值,然后基于零游程值的来解码多个待解码系数中的当前系数。
进一步,在本申请的实施例中,当前系数可以为当前点的全部颜色分量的系数,当前系数也可以为当前点的反射率的系数。
需要说明的是,在本申请的实施例中,零游程值run_length可以用于对待解码系数进行否为0的计数。其中,对于颜色属性,如果零游程值run_length不为0(或大于0),则可以确定当前点的全部颜色分量的系数均为0,如果零游程值run_length为0,则可以确定当前点的全部颜色分量的系数不全为0。对于反射率属性,如果零游程值run_length不为0,则可以确定当前点的反射率的系数为0,如果零游程值run_length为0,则可以确定当前点的反射率的系数不为0。
进一步地,在本申请的实施例中,如果当前系数为当前点的全部颜色分量的系数,那么,若零游程值指示当前点的全部颜色分量的系数均为0,则在对零游程值进行自减1处理后,根据零游程值确定当下一个待解码系数;若零游程值指示当前点的全部颜色分量的系数不全为0,则解码码流,确定当前点的全部颜色分量的系数和新的零游程值,根据新的零游程值确定下一个待解码系数。
可以理解的是,在本申请的实施例中,对于颜色属性,如果零游程值run_length指示当前点的全部颜色分量的系数均为0,那么便不需要再进行当前系数的解码处理,而是可以先对零游程值进行自减1处理,以更新零游程值,然后再根据零游程值确定下一个待解码系数。对于下一个待解码系数,继续根据零游程值run_length判断全部颜色分量的系数是否均为0,以确定是否需要对全部颜色分量的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为3,大于0,那么可以确定当前点的全部颜色分量的系数均为0,因此不需要解码当前系数,可以选择先对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定下一个待解码系数。对于下一个待解码系数,对应的零游程值run_length为2,大于0,那么可以确定该点的全部颜色分量的系数均为0,因此不需要解码该点的全部颜色分量的系数,继续对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定其他待解码系数。
可以理解的是,在本申请的实施例中,对于颜色属性,如果零游程值run_length为0,即零游程值指示当前点的全部颜色分量的系数不全为0,那么需要解码码流,进一步确定当前点的全部颜色分量的系数和新的零游程值,然后根据新的零游程值确定下一个待解码系数。对于下一个待解码系数,继续根据新的零游程值run_length判断全部颜色分量的系数是否均为0,以确定是否需要对全部颜色分量的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为0,那么可以确定当前点的全部颜色分量的系数不全为0,因此需要解码当前系数,即通过解码码流确定当前点的全部颜色分量,同时可以通过解码码流确定新的零游程值,然后再根据解码获得新的零游程值确定下一个待解码系数。对于下一个待解码系数,如果对应的零游程值run_length为3,大于0,那么可以确定该点的全部颜色分量的系数均为0,因此不需要解码该点的全部颜色分量的系数,则对零游程值进行自减1处理,即执行--run_length操作。如果对应的零游程值run_length为0,则可以确定该点的全部颜色分量的系数不全为0,因此需要解码该点的全部颜色分量的系数。
进一步地,在本申请的实施例中,如果当前系数为当前点的反射率的系数,那么,若零游程值指示当前点的反射率的系数为0,则在对零游程值进行自减1处理后,根据零游程值确定下一个待解码系数;若零游程值指示当前点的反射率的系数不为0,则解码码流,确定当前点的反射率的系数和新的零游程值,根据新的零游程值确定下一个待解码系数。
可以理解的是,在本申请的实施例中,对于反射率属性,如果零游程值run_length指示当前点的反射率的系数为0,那么便不需要再进行当前系数的解码处理,而是可以先对零游程值进行自减1处理,以更新零游程值,然后再根据零游程值确定下一个待解码系数。对于下一个待解码系数,继续根据零游程值run_length判断反射率的系数是否为0,以确定是否需要对反射率的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为3,大于0,那么可以确定当前点的反射率的系数为0,因此不需要解码当前系数,可以选择先对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定下一个待解码系数。对于下一个待解码系数,对应的零游程值run_length为2,大于0,那么可以确定该点的反射率的系数为0,因此不需要解码该点的反射率的系数,继续对零游程值进行自减1处理,即执行--run_length操作,然后再根据零游程值确定其他待解码系数。
可以理解的是,在本申请的实施例中,对于反射率属性,如果零游程值run_length为0,即零游程值指示当前点的反射率的系数不为0,那么需要解码码流,进一步确定当前点的反射率的系数和新的零游程值,然后根据新的零游程值确定下一个待解码系数。对于下一个待解码系数,继续根据新的零游程 值run_length判断反射率的系数是否为0,以确定是否需要对反射率的系数进行解码处理。
示例性的,在本申请的实施例中,如果解码码流确定的当前系数的零游程值run_length为0,那么可以确定当前点的反射率的系数不为0,因此需要解码当前系数,即通过解码码流确定当前点的反射率,同时可以通过解码码流确定新的零游程值,然后再根据解码获得新的零游程值确定下一个待解码系数。对于下一个待解码系数,如果对应的零游程值run_length为3,大于0,那么可以确定该点的反射率的系数为0,因此不需要解码该点的反射率的系数,则对零游程值进行自减1处理,即执行--run_length操作。如果对应的零游程值run_length为0,则可以确定该点的反射率的系数不为0,因此需要解码该点的反射率的系数。
综上所述,本申请实施例提出的解码方法,在解码系数时,基于分组标识信息的指示,可以将所有系数进行分组,同时,引入系数标识信息,例如一个标志位longZero,该标志位longZero可以用来表示每个组内的系数是否均为0,从而可以在一个组内所有系数均为0时,只需要一个1bit的标志位来进行指示,能够节省一部分码字,进而提高编码效率,提升压缩性能。
示例性的,在本申请的实施例中,下表1为本申请实施例提出的解码方法在多层变换分支下对颜色属性产生的效果,其中分组步长参数的取值可以设为固定值1024。
表1
Figure PCTCN2022099640-appb-000001
本申请实施例提供了一种解码方法,在解码端,确定分组步长参数;按照分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定至少一个待解码系数组中的当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息指示当前组中的待解码系数均为0,则完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息。由此可见,在本申请的实施例中,在进行属性信息的编解码时,由于引入了系数标识信息,可以对多个系数进行分组处理,从而在一个系数组中的系数均为0时,可以使用一个系数标识信息对该组的多个系数的取值情况进行指示,大大节省了码字,提高了点云属性的编解码性能。
本申请的一个实施例提出的一种编码方法,图7为本申请实施例提出的编码方法的实现流程示意图,如图7所示,对点云进行编码处理时可以包括以下步骤:
步骤201、确定分组步长参数。
需要说明的是,本申请实施例的编码方法具体是指点云编码方法,该方法可以应用于点云编码器(也可简称为“编码器”)。
还需要说明的是,在本申请实施例中,待处理点云包括至少一个节点。其中,对于待处理点云中的节点,在对该节点进行编码时,其可以作为待处理点云中的待编码节点,而且该节点的周围存在有多个已编码节点。在这里,当前节点即是这至少一个节点中当前需要编码的待编码节点。
进一步地,在本申请实施例中,对于待处理点云中的每一个节点,其对应一个几何信息和一个属性信息;其中,几何信息表征该点的空间关系,属性信息表征该点的属性信息。在这里,属性信息可以为颜色分量,也可以是反射率或者其它属性,本申请实施例不作具体限定。
还需要说明的是,在本申请实施例中,编码器可以按照预设编码顺序对这至少一个节点进行排列,以便确定每一节点对应的索引序号。这样,根据每一节点对应的索引序号,编码器能够按照预设编码顺序处理待处理点云中的每一节点。
在一些实施例中,预设编码顺序可以为下述其中之一:点云原始顺序、莫顿顺序、希尔伯特顺序等等,本申请实施例不作具体限定。
在本申请的实施例中,可以先确定分组标识信息。其中,分组标识信息可以用于确定是否使用分组处理的方式编码多个待编码系数。
需要说明的是,在本申请的实施例中,可以将分组标识信息理解为一个表明是否对点云中的多个待编码系数进行分组处理的标志位。具体地,可以先确定作为分组标识信息的一个变量,从而可以通过该变量的取值来实现分组标识信息的确定。
也就是说,在本申请的实施例中,分组标识信息的取值不同,编码点云中的多个待编码系数的处理方式也不同。
可以理解的是,在本申请的实施例中,基于分组标识信息的取值,在进行多个待编码系数的编码时,可以选择使用对多个待编码系数进行分组处理,也可以选择不对多个待编码系数进行分组处理。
示例性的,在本申请的实施例中,如果分组标识信息的取值为1,那么可以选择对多个待编码系数进行分组处理;如果分组标识信息的取值为0,那么可以选择不对多个待编码系数进行分组处理。
需要说明的是,在本申请的实施例中,分组标识信息的取值也可以设置为其他数值或参数,本申请不作任何限定。
进一步地,在本申请的实施例中,可以使用一个标志位subBlock来表示分组标识信息。
例如,在本申请的实施例中,如果subBlock的取值为1,那么可以表示对多个待编码系数进行分组处理;如果subBlock的取值为0,那么可以表示不多个待编码系数进行分组处理。
可以理解的是,在本申请的实施例中,可以将点云中的一个点的属性信息的量化残差或量化后的变换系数作为该点的待编码系数。也就是说,待编码系数可以为量化残差,也可以为量化后的变换系数。
进一步地,在本申请的实施例中,在对颜色属性进行编码时,点云中的每一个点的待编码系数可以包括全部颜色分量的系数。例如,一个待编码系数可以包括R分量的系数、G分量的系数、B分量的系数;或者,一个待编码系数可以包括Y分量的系数、U分量的系数、V分量的系数。
进一步地,在本申请的实施例中,在对反射率属性进行编码时,点云中的每一个点的待编码系数可以为反射率的系数。
可以理解的是,在本申请的实施例中,在确定分组标识信息之后,如果分组标识信息指示对多个待编码系数进行分组处理,那么可以进一步确定分组步长参数。即在确定分组标识信息指示对多个待解码系数进行分组处理之后,再执行系数标识信息的确定流程。
当然,也可以不进行标识信息的确定而直接执行系数标识信息的确定流程。也就是说,系数标识信息的确定可以依赖于分组标识信息的取值,也可以不依赖于分组标识信息的取值而独立执行。
需要说明的是,在本申请的实施例中,分组步长参数可以用于对多个待编码系数进行分组处理。其中,可以在确定分组步长参数之后,直接将分组步长参数设置为分组步长,然后再根据分组步长对多个待解码系数进行分组;或者,也可以在确定分组步长参数之后,先根据分组步长参数确定分组步长,然后根据分组步长对多个待解码系数进行分组。
进一步地,在本申请的实施例中,分组步长参数可以为大于或者等于0的整数。
可以理解的是,在本申请的实施例中,在进行分组步长参数的确定时,可以直接确定分组步长参数;或者,也可以直接获取预先设置的分组步长参数。
也就是说,在本申请的实施例中,分组步长参数既可以是由编码端直接确定的,也可以是由编码端预先设置的。
示例性的,在本申请的实施例中,分组步长参数可以预先定义在属性头信息aps中,在编解码属性系数之前,可以先对分组步长参数进行编解码。
步骤202、按照分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组。
在本申请的实施例中,如果分组标识信息指示对多个待编码系数进行分组处理,那么在确定分组步长参数之后。可以进一步按照分组步长参数对多个待编码系数进行分组处理,从而可以确定至少一个待编码系数组。
可以理解的是,在本申请的实施例中,在对多个待编码系数进行分组时,可以直接将分组步长参数设置为分组步长,然后再根据分组步长对多个待编码系数进行分组;或者,也可以先根据分组步长参数确定分组步长,然后根据分组步长对多个待编码系数进行分组。其中,分组步长参数可以为大于或者等于0的整数。
也就是说,在本申请的实施例中,如果确定的分组步长参数为K,那么可以设置分组步长为K;或者,也可以确定分组步长为2 K;其中,K为大于或者等于0的整数。
需要说明的是,在本申请的实施例中,在根据分组步长参数确定分组步长时,也可以将分组步长设置为分组步长参数的任意函数值,本申请对此不经具体限定。
示例性的,在本申请的实施例中,假设确定的分组步长参数为K=10,可以根据分组步长参数K确定分组步长为2 K=1024,然后再根据分组步长对多个待编码系数进行分组。
示例性的,在本申请的实施例中,假设确定的分组步长参数为K=512,可以直接根据分组步长参数K设定分组步长为512,然后再根据分组步长对多个待编码系数进行分组。当然,分组步长参数的取值也可以为1024、2048、4096等大于或者等于0的任意整数,本申请不作任何限定。
需要说明的是,在本申请的实施例中,在基于分组步长参数对多个待编码系数进行分组之前,可以先对待编码系数的长度进行设置。其中,可以将一个待编码系数的长度设置为一个长度单位。
可以理解的是,在本申请的实施例中,对于颜色属性,一个待编码系数包括全部颜色分量的系数, 则一个点的全部颜色分量的系数的长度之和可以设置为一个长度单位;对于反射率属性,一个待编码系数包括反射率的系数,则一个点的反射率的系数可以设置为一个长度单位。
也就是说,在本申请的实施例中,一个点的待编码系数的长度可以设定为1,由于每一个点的待编码系数可以包括全部颜色分量的系数,因此一个点的全部颜色分量的系数的长度之和可以设定为1。例如,将一个点的R、G、B三个颜色分量的系数的长度之和设定为1,或者,将一个点的Y、U、V三个颜色分量的系数的长度之和设定为1。
由此可见,在本申请的实施例中,N个点的N个待编码系数的长度可以为N,即待编码系数的长度与点的个数相同,或者说,待编码系数的长度与待编码系数的个数相同。
示例性的,在本申请的实施例中,如果基于分组步长参数K确定的分组步长为K,多个待编码系数的长度为N,那么按照分组步长K对多个待编码系数进行分组之后,可以确定(G+1)个待编码系数组。其中,将N作为被除数,K作为除数进行除法运算后,获得的商为G,余数为K',即N/K=G…K',此时可以确定分组后获得(G+1)个待编码系数组,前G个待编码系数组中的待编码系数的个数为K,最后一个待编码系数组中的待编码系数的个数为K'。
可以理解的是,在本申请的实施例中,K'为小于或者等于K的整数,即最后一个待编码系数组中的待编码系数的个数小于或者等于前G个待编码系数组中的待编码系数的个数。
步骤203、若至少一个待编码系数组中的当前组中的当前系数不为0,则确定当前组的系数标识信息;其中,系数标识信息用于对当前组中的待编码系数是否均为0进行指示。
在本申请的实施例中,在按照分组步长参数对多个待编码系数进行分组,从而确定至少一个待编码系数组之后,对于至少一个待编码组中的当前组,如果当前组中的待编码系数中的当前系数不为0,那么可以进一步确定当前组的系数标识信息,其中,该系数标识信息可以用于对当前组中的待编码系数是否均为0进行指示。
需要说明的是,在本申请的实施例中,可以将系数标识信息理解为一个表明待编码系数组中的全部待编码系数是否均为0的标志位。具体地,编码器可以确定作为系数标识信息的一个变量,从而可以通过该变量的取值来实现对应的待编码系数组中的系数是否均为0的确定。
也就是说,在本申请的实施例中,系数标识信息的取值不同,对应待编码系数组中的待编码系数的值的指示信息也不同。
进一步的,在本申请的实施例中,若系数标识信息的取值为第一值,则确定系数标识信息指示当前组中的待编码系数均为0;若系数标识信息的取值为第二值,则确定系数标识信息指示当前组中的待编码系数不全为0;其中,第一值和第二值不相等。例如,第一值可以为1,第二值可以为0。
示例性的,在本申请的实施例中,如果系数标识信息的取值为第一值,例如取值为1,那么可以认为该系数标识信息指示对应的待编码系数组中的全部待编码系数均为0;如果系数标识信息的取值为第二值,例如为0,那么可以认为该系数标识信息指示对应的待编码系数组中的全部待编码系数不全为0。
需要说明的是,在本申请的实施例中,系数标识信息的取值也可以设置为其他数值或参数,即只要保证第一值和第二值不相等,第一值和第二值的具体取值也可以为其他数值,本申请不作任何限定。
进一步地,在本申请的实施例中,可以使用标志longZero来表示系数标识信息。
例如,在本申请的实施例中,如果longZero的取值为第一值,例如取值为1,那么可以表示当前组中的待编码系数均为0;如果longZero的取值为第二值,例如取值为0,那么可以表示当前组中的待编码系数不全为0。
需要说明的是,在本申请的实施例中,在对当前组进行编码处理之前,可以初始化系数标识信息的取值为第二值。
可以理解的是,在本申请的实施例中,在按照分组步长参数完成对多个待编码系数的分组,获得至少一个待编码系数组之后,且在对至少一个待编码系数组中的当前组进行编码之前,可以预先对当前组的系数标识信息的取值进行初始化,可以将当前组的系数标识信息的取值初始化为第二值。例如,可以初始化系数标识信息longZero为0。
需要说明的是,在本申请的实施例中,通过将当前组系数标识信息的取值初始化为第二值,可以在后续的编码处理过程中对系数标识信息的取值进行参照,一旦当前组中的当前系数不为0,并可以根据系数标识信息的取值确定是否需要将系数标识信息码流,从而可以保证不重复编码系数标识信息,能够节省码字。
进一步地,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,那么此时需要先确定当前组的系数标识信息,然后参照当前组的系数标识信息的取值来确定是否编码系数标识信息,以及确定是否重置编码系数标识信息的取值。
也就是说,在本申请的实施例中,一旦确定当前系数不为0,解码器并不会直接将系数标识信息写 入码流,而是需要在确定系数标识信息之后,结合系数标识信息的取值选择是否编码系数表示信息,这样便可以仅对系数表示信息编码一次,有效提升编码效率。
可以理解的是,在本申请的实施例中,对于颜色属性,一个待解码系数包括全部颜色分量的系数,因此如果确定当前系数不为0,那么便可以确定对应的全部颜色分量的系数不全为0,如果确定当前系数为0,那么便可以确定对应的全部颜色分量的系数均为0;对于反射率属性,一个待解码系数包括反射率的系数,因此如果确定当前系数不为0,那么便可以确定对应的反射率的系数不为0,如果确定当前系数为0,那么便可以确定对应的反射率的系数为0。
步骤204、若系数标识信息的取值为第二值,则将系数标识信息写入码流,并将系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码当前系数,将零游程值设置为0。
在本申请的实施例中,如果至少一个待编码系数组中的当前组中的当前系数不为0,那么在确定当前组的系数标识信息之后,如果该系数标识信息的取值为第二值,那么可以先将系数标识信息写入码流,然后将系数标识信息的取值设置为第一值;接着,可以在将零游程值写入码流后,编码当前系数,然后将零游程值设置为0。
进一步地,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,那么此时需要先确定当前组的系数标识信息的取值是否为第二值,如果系数标识信息的取值为第二值,那么需要先将系数标识信息写入码流。其中,当系数标识信息的取值为第二值时,系数标识信息可以指示当前组中的待编码系数并不全为0。
需要说明的是,在本申请的实施例中,由于预先将当前组的系数标识信息初始化为第二值(例如0),因此,如果当前系数不为0,且当前组的系数标识信息的取值为第二值,则可以说明当前组的待编码系数并不全为0,且指示当前组的待编码系数不全为0的系数标识信息还没有被编码,因此,可以先将示当前组的待编码系数并不全为0的系数标识信息写入码流。
接着,可以重新将系数标识信息的取值设置为第一值,从而可以在下一次编码当前组的不为0的系数时,可以参照该系数标识信息的取值,不再重复当前组的系数标识信息。例如,当再次确定当前组的一个待编码系数不为0,且当前组的系数标识信息的取值为第一值时,便可以确定虽然当前组的待编码系数并不全为0,但是指示当前组的待编码系数不全为0的系数标识信息已经被编码,因此不需要再重复编码当前组的系数标识信息。从而可以节省码字,提高编码效率。
可以理解的是,在本申请的实施例中,在将系数标识信息写入码流,并将系数标识信息的取值设置为第一值之后,还可以将零游程值写入码流,然后再编码当前系数,接着将零游程值设置为0。
进一步地,在本申请的实施例中,当前系数可以为当前点的全部颜色分量的系数,当前系数也可以为当前点的反射率的系数。
需要说明的是,在本申请的实施例中,零游程值run_length可以用于对待编码系数进行否为0的计数。其中,对于颜色属性,如果零游程值run_length不为0(或大于0),则可以确定当前点的全部颜色分量的系数均为0,如果零游程值run_length为0,则可以确定当前点的全部颜色分量的系数不全为0。对于反射率属性,如果零游程值run_length不为0,则可以确定当前点的反射率的系数为0,如果零游程值run_length为0,则可以确定当前点的反射率的系数不为0。
示例性的,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,即当前点的三个颜色分量的系数不全为0,也就是说,当前点的三个颜色分量中存在至少一个颜色分量的系数不为0,那么此时需要先确定longZero(系数标识信息)的取值是否为0(第二值),如果longZero的取值为0,那么需要将longZero的取值为0写入码流,即将指示当前组的待编码系数不全为0的系数标识信息写入码流,然后再将longZero的取值设置为非0,例如将longZero的取值设置为1(第一值),接着,可以编码零游程值(run_length),再编码当前系数,即编码具体的三个颜色分量的系数,最后将run_length重置为0。
示例性的,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,即当前点的反射率的系数不为0,那么此时需要先确定longZero(系数标识信息)的取值是否为0(第二值),如果longZero的取值为0,那么需要将longZero的取值为0写入码流,即将指示当前组的待编码系数不全为0的系数标识信息写入码流,然后再将longZero的取值设置为非0,例如将longZero的取值设置为1(第一值),接着,可以编码零游程值(run_length),再编码当前系数,即编码具体的反射率的系数,最后将run_length重置为0。
步骤205、若系数标识信息的取值为第一值,则在将零游程值写入码流后,编码当前系数,将零游程值设置为0。
在本申请的实施例中,如果至少一个待编码系数组中的当前组中的当前系数不为0,那么在确定当前组的系数标识信息之后,如果该系数标识信息的取值为第一值,那么可以在将零游程值写入码流后, 编码当前系数,然后将零游程值设置为0。
进一步地,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,那么此时需要先确定当前组的系数标识信息的取值是否为第二值,如果系数标识信息的取值不为第二值,而为第一值(例如1),那么可以确定虽然当前组的待编码系数并不全为0,但是指示当前组的待编码系数不全为0的系数标识信息已经被编码,因此不需要再重复编码当前组的系数标识信息。从而可以节省码字,提高编码效率。
可以理解的是,在本申请的实施例中,在系数标识信息的取值为第一值之后,可以先将零游程值写入码流,然后再编码当前系数,接着将零游程值设置为0。
进一步地,在本申请的实施例中,当前系数可以为当前点的全部颜色分量的系数,当前系数也可以为当前点的反射率的系数。
需要说明的是,在本申请的实施例中,零游程值run_length可以用于对待编码系数进行否为0的计数。其中,对于颜色属性,如果零游程值run_length不为0(或大于0),则可以确定当前点的全部颜色分量的系数均为0,如果零游程值run_length为0,则可以确定当前点的全部颜色分量的系数不全为0。对于反射率属性,如果零游程值run_length不为0,则可以确定当前点的反射率的系数为0,如果零游程值run_length为0,则可以确定当前点的反射率的系数不为0。
示例性的,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,即当前点的三个颜色分量的系数不全为0,也就是说,当前点的三个颜色分量中存在至少一个颜色分量的系数不为0,那么此时需要先确定longZero(系数标识信息)的取值是否为0(第二值),如果longZero的取值不为0,而为第一值(如1),说明指示当前组的待编码系数不全为0的系数标识信息已经被写入码流,那么便不再编码longZero,然后可以编码零游程值(run_length),再编码当前系数,即编码具体的三个颜色分量的系数,最后将run_length重置为0。
示例性的,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,即当前点的反射率的系数不为0,那么此时需要先确定longZero(系数标识信息)的取值是否为0(第二值),如果longZero的取值不为0,而为第一值(如1),说明指示当前组的待编码系数不全为0的系数标识信息已经被写入码流,那么便不再编码longZero,然后可以编码零游程值(run_length),再编码当前系数,即编码具体的反射率的系数,最后将run_length重置为0。
步骤206、继续根据系数标识信息和零游程值编码当前组中的下一个待编码系数。
在本申请的实施例中,可以继续根据系数标识信息和零游程值编码当前组中的下一个待编码系数,直到当前组中的最后一个待编码系数。
可以理解的是,在本申请的实施例中,对于当前组中的最后一个待编码系数,如果最后一个待编码系数为0,那么可以进一步根据系数标识信息或零游程值判断当前组中的待编码系数是否均为0,如果确定当前组中的待编码系数均为0,那么可以将系数标识信息设置为第一值(例如1),即设置将系数标识信息的取值指示当前组中的待编码系数均为0,然后将系数标识信息写入码流;如果确定当前组中的待编码系数不全为0,那么可以将零游程值写入码流。
也就是说,在本申请的实施例中,如果当前系数为当前组中的最后一个待编码系数,那么在确定当前系数为0之后,可以根据系数标识信息确定出当前组中的待编码系数是否均为0,或者,可以根据零游程值定出当前组中的待编码系数是否均为0。
需要说明的是,在本申请的实施例中,当当前系数为当前组中的最后一个待编码系数时,若系数标识信息的取值为第二值,则确定当前组中的待编码系数均为0,则将系数标识信息编码为第一值,并写入码流;否则将零游程值写入码流。
也就是说,在本申请的实施例中,对于当前组中的最后一个待编码系数,如果最后一个待编码系数为0,且系数标识信息的取值为第二值(例如0),那么便可以确定当前组中的待编码系数均为0,进而可以将系数标识信息编码为第一值(例如1),然后写入码流;如果最后一个待编码系数为0,且系数标识信息的取值为第一值(例如1),那么便可以确定当前组中的待编码系数不全为0,进而可以将零游程值写入码流。
需要说明的是,在本申请的实施例中,当当前系数为当前组的最后一个待编码系数时,若零游程值与当前组中的点的个数相同,则确定当前组中的待编码系数均为0,则将系数标识信息编码为第一值,并写入码流,若零游程值与当前组中的点的个数相同,否则将零游程值写入码流。
也就是说,在本申请的实施例中,对于当前组中的最后一个待编码系数,如果最后一个待编码系数为0,且零游程值与当前组中的点的个数相同,那么便可以确定当前组中的待编码系数均为0,进而可以将系数标识信息编码为第一值(例如1),然后写入码流;如果最后一个待编码系数为0,且零游程值小于当前组中的点的个数,那么便可以确定当前组中的待编码系数不全为0,进而可以将零游程值写入 码流。
进一步地,在本申请的实施例中,在按照分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组之后,即步骤202之后,对点云进行编码处理时可以包括以下步骤:
步骤207、若至少一个待编码系数组中的当前组中的当前系数为0,则在对零游程值进行自加1处理之后,继续编码当前组中的下一个待编码系数。
在本申请的实施例中,在按照分组步长参数对多个待编码系数进行分组,从而确定至少一个待编码系数组之后,对于至少一个待编码组中的当前组,如果当前组中的待编码系数中的当前系数为0,那么可以在对零游程值进行自加1处理之后,继续编码当前组中的下一个待编码系数。
需要说明的是,在本申请的实施例中,在对当前组进行编码处理之前,可以初始化零游程值为0。
可以理解的是,在本申请的实施例中,在按照分组步长参数完成对多个待编码系数的分组,获得至少一个待编码系数组之后,且在对至少一个待编码系数组中的当前组进行编码之前,可以预先对零游程值进行初始化。例如,可以初始化零游程值run_length为0。
进一步地,在本申请的实施例中,如果当前系数为当前点的全部颜色分量的系数,那么,若当前组中的当前点的全部颜色分量的系数均为0,则在对零游程值进行自加1处理后,确定当前组中的下一个待编码系数。
可以理解的是,在本申请的实施例中,对于颜色属性,如果当前点的全部颜色分量的系数均为0,那么便不需要再进行当前系数的编码处理,而是可以先对零游程值进行自加1处理,以更新零游程值,然后再确定当前组中的下一个待编码系数。对于下一个待编码系数,继续确定全部颜色分量的系数是否均为0,以确定是否需要对全部颜色分量的系数进行编码处理,同时确定是否需要对零游程值进行自加1处理。
示例性的,在本申请的实施例中,如果确定当前点的全部颜色分量的系数均为0,便不需要编码当前系数,可以选择先对零游程值进行自加1处理,即执行++run_length操作,然后再确定当前组中的下一个待编码系数。对于下一个待编码系数,如果确定该点的全部颜色分量的系数均为0,同样不需要编码该点的全部颜色分量的系数,继续对零游程值进行自加1处理,即执行++run_length操作。
进一步地,在本申请的实施例中,如果当前系数为当前点的反射率的系数,那么,若当前组中的当前点的反射率的系数为0,则在对零游程值进行自加1处理后,确定当前组中的下一个待编码系数。
可以理解的是,在本申请的实施例中,对于反射率属性,如果当前点的反射率的系数为0,那么便不需要再进行当前系数的编码处理,而是可以先对零游程值进行自加1处理,以更新零游程值,然后再确定当前组中的下一个待编码系数。对于下一个待编码系数,继续确定反射率的系数是否为0,以确定是否需要对反射率的系数进行编码处理,同时确定是否需要对零游程值进行自加1处理。
示例性的,在本申请的实施例中,如果确定当前点的反射率的系数为0,便不需要编码当前系数,可以选择先对零游程值进行自加1处理,即执行++run_length操作,然后再确定当前组中的下一个待编码系数。对于下一个待编码系数,如果确定该点的反射率的系数为0,同样不需要编码该点的反射率的系数,继续对零游程值进行自加1处理,即执行++run_length操作。
进一步地,在本申请的实施例中,在确定分组标识信息之后,对点云进行编码处理时可以包括以下步骤:
步骤208、若分组标识信息指示不对多个待解码系数进行分组处理,则确定当前系数是否为0。
在本申请的实施例中,在确定分组标识信息之后,如果分组标识信息指示不对多个待编码系数进行分组处理,那么可以进一步确定当前系数是否为0。
进一步地,在本申请的实施例中,当前系数可以为当前点的全部颜色分量的系数,当前系数也可以为当前点的反射率的系数。
可以理解的是,在本申请的实施例中,基于分组标识信息,如果确定不对多个待编码系数进行分组处理,便需要按照预设顺序依次对待编码系数进行编码处理,因此可以继续确定多个待编码系数中的当前系数是否为0。
步骤209、若当前系数为0,则在对零游程值进行自加1处理之后,继续编码多个待解码系数中的下一个待编码系数。
步骤210、若当前系数不为0,则在将零游程值写入码流后,编码当前系数,将零游程值设置为0,继续编码多个待解码系数中的下一个待编码系数。
在本申请的实施例中,如果当前系数为0,便可以在对零游程值进行自加1处理之后,继续编码多个待解码系数中的下一个待编码系数;如果当前系数不为0,便可以在将零游程值写入码流后,编码当前系数,将零游程值设置为0,继续编码多个待解码系数中的下一个待编码系数。
可以理解的是,在本申请的实施例中,在对多个待编码系数进行编码之前,可以预先对零游程值进 行初始化。例如,可以初始化零游程值run_length为0。
进一步地,在本申请的实施例中,如果当前系数为当前点的全部颜色分量的系数,那么,若当前点的全部颜色分量的系数均为0,则在对零游程值进行自加1处理后,确定下一个待编码系数。
可以理解的是,在本申请的实施例中,对于颜色属性,如果当前点的全部颜色分量的系数均为0,那么便不需要再进行当前系数的编码处理,而是可以先对零游程值进行自加1处理,以更新零游程值,然后再确定下一个待编码系数。对于下一个待编码系数,继续确定全部颜色分量的系数是否均为0,以确定是否需要对全部颜色分量的系数进行编码处理,同时确定是否需要对零游程值进行自加1处理。
示例性的,在本申请的实施例中,如果确定当前点的全部颜色分量的系数均为0,便不需要编码当前系数,可以选择先对零游程值进行自加1处理,即执行++run_length操作,然后再确定下一个待编码系数。对于下一个待编码系数,如果确定该点的全部颜色分量的系数均为0,同样不需要编码该点的全部颜色分量的系数,继续对零游程值进行自加1处理,即执行++run_length操作。
进一步地,在本申请的实施例中,如果当前系数为当前点的反射率的系数,那么,若当前点的反射率的系数为0,则在对零游程值进行自加1处理后,确定下一个待编码系数。
可以理解的是,在本申请的实施例中,对于反射率属性,如果当前点的反射率的系数为0,那么便不需要再进行当前系数的编码处理,而是可以先对零游程值进行自加1处理,以更新零游程值,然后再确定下一个待编码系数。对于下一个待编码系数,继续确定反射率的系数是否为0,以确定是否需要对反射率的系数进行编码处理,同时确定是否需要对零游程值进行自加1处理。
示例性的,在本申请的实施例中,如果确定当前点的反射率的系数为0,便不需要编码当前系数,可以选择先对零游程值进行自加1处理,即执行++run_length操作,然后再确定下一个待编码系数。对于下一个待编码系数,如果确定该点的反射率的系数为0,同样不需要编码该点的反射率的系数,继续对零游程值进行自加1处理,即执行++run_length操作。
综上所述,本申请实施例提出的编码方法,在编码系数时,基于分组标识信息的指示,可以将所有系数进行分组,同时,引入系数标识信息,例如一个标志位longZero,该标志位longZero可以用来表示每个组内的系数是否均为0,从而可以在一个组内所有系数均为0时,只需要一个1bit的标志位来进行指示,能够节省一部分码字,进而提高编码效率,提升压缩性能。
本申请实施例提供了一种编解码方法,在编码端,确定分组步长参数;按照分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;若至少一个待编码系数组中的当前组中的当前系数不为0,则确定当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息的取值为第二值,则将系数标识信息写入码流,并将系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码当前系数,将零游程值设置为0;若系数标识信息的取值为第一值,则在将零游程值写入码流后,编码当前系数,将零游程值设置为0;继续根据系数标识信息和零游程值编码当前组中的下一个待编码系数。由此可见,在本申请的实施例中,在进行属性信息的编解码时,由于引入了系数标识信息,可以对多个系数进行分组处理,从而在一个系数组中的系数均为0时,可以使用一个系数标识信息对该组的多个系数的取值情况进行指示,大大节省了码字,提高了点云属性的编解码性能。
基于上述实施例,在本申请的又一实施例中,在对量化残差或量化后的变换系数进行编码时,可以先将点云中的所有点的属性信息的量化残差或量化后的变换系数进行分组,然后对每一个组引入一个标志位longZero(系数标识信息),该标志位longZero可以用于对每个组内的点的属性信息的量化残差或量化后的变换系数是否均为0进行指示。
可以理解的是,在本申请的实施例中,可以将点云中的一个点的属性信息的量化残差或量化后的变换系数作为该点的待编码系数。也就是说,待编码系数可以为量化残差,也可以为量化后的变换系数。
进一步地,在本申请的实施例中,在对颜色属性进行编码时,点云中的每一个点的待编码系数可以包括全部颜色分量的系数。例如,一个待编码系数可以包括R分量的系数、G分量的系数、B分量的系数;或者,一个待编码系数可以包括Y分量的系数、U分量的系数、V分量的系数。
可以理解的是,在本申请的实施例中,在对点云的属性信息进行编码时,可以使用longZero标志位(标识信息)和零游程值run_length。其中,longZero标志位可以表示每一个组内的待编码系数是否均为0,零游程值run_length则用于对每个点的全部颜色分量的系数进行是否均为0的计数。
进一步地,在本申请的实施例中,在编码端,可以先根据分组步长参数对所有点的待编码系数进行分组,从而可以确定至少一个待编码系数组。其中,分组步长参数可以为固定长度K,其中,K为大于或者等于0的整数,分组步长参数可以为针对点云预先设置的任意数值。
示例性的,在本申请的实施例中,分组步长参数可以预先定义在属性头信息aps中,在编解码属性系数之前,可以先对分组步长参数进行编解码。
可以理解的是,在本申请的实施例中,可以在确定分组步长参数之后,直接将分组步长参数设置为分组步长,然后再根据分组步长对多个待编码系数进行分组;或者,也可以在确定分组步长参数之后,先根据分组步长参数确定分组步长,然后根据分组步长对多个待编码系数进行分组。
需要说明的是,在本申请的实施例中,一个点的待编码系数的长度可以设定为1,由于每一个点的待编码系数可以包括全部颜色分量的系数,因此一个点的全部颜色分量的系数的长度之和可以设定为1。例如,将一个点的R、G、B三个颜色分量的系数的长度之和设定为1,或者,将一个点的Y、U、V三个颜色分量的系数的长度之和设定为1。
也就是说,在本申请的实施例中,N个点的N个待编码系数的长度可以为N,即待编码系数的长度与点的个数相同,或者说,待编码系数的长度与待编码系数的个数相同。
示例性的,在本申请的实施例中,如果基于分组步长参数确定的分组步长为K,多个待解码系数的长度为N,那么按照分组步长K对多个待编码系数进行分组之后,可以确定(G+1)个待编码系数组。其中,将N作为被除数,K作为除数进行除法运算后,获得的商为G,余数为K',即N/K=G…K',此时可以确定分组后获得(G+1)个待解码系数组,前G个待解码系数组中的待解码系数的个数为K,最后一个待解码系数组中的待解码系数的个数为K'。
进一步地,在本申请的实施例中,在依次对每一个待编码系数组进行编码之前,对于待编码系数组中的当前组,可以先对longZero和run_length进行初始化,例如,可以将当前组的longZero初始化为0(第二值),还可以将run_length初始化为0。
可以理解的是,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数为0,即当前点的全部颜色分量的系数均为0,则对run_length进行自加处理,即++run_length,然后再继续处理当前组的下一个系数,即处理下一个全部颜色分量的系数。
可以理解的是,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前系数不为0,即当前点的三个颜色分量的系数不全为0,也就是说,当前点的三个颜色分量中存在至少一个颜色分量的系数不为0,那么此时需要先确定longZero(系数标识信息)的取值是否为0(第二值),如果longZero的取值为0,那么需要将longZero的取值为0写入码流,即将指示当前组的待编码系数不全为0的系数标识信息写入码流,然后再将longZero的取值设置为非0,例如将longZero的取值设置为1(第一值),接着,可以编码零游程值(run_length),再编码当前系数,即编码具体的三个颜色分量的系数,最后将run_length重置为0。
需要说明的是,在本申请的实施例中,由于预先将当前组的系数标识信息初始化为第二值(例如0),因此,如果当前系数不为0,且当前组的系数标识信息的取值为第二值,则可以说明当前组的待编码系数并不全为0,且指示当前组的待编码系数不全为0的系数标识信息还没有被编码,因此,可以先将示当前组的待编码系数并不全为0的系数标识信息写入码流。
接着,可以重新将系数标识信息的取值设置为第一值,从而可以在下一次编码当前组的不为0的系数时,可以参照该系数标识信息的取值,不再重复当前组的系数标识信息。例如,当再次确定当前组的一个待编码系数不为0,且当前组的系数标识信息的取值为第一值时,便可以确定虽然当前组的待编码系数并不全为0,但是指示当前组的待编码系数不全为0的系数标识信息已经被编码,因此不需要再重复编码当前组的系数标识信息。从而可以节省码字,提高编码效率。
进一步地,在本申请的实施例中,按照上述方法遍历完成当前组中的每一个待编码系数,直到当前组的最后一个待编码系数,通过longZero的取值或run_length的取值,便可以确定当前组中的待编码系数是否均为0。例如,在遍历当前组中的全部待编码系数之后,如果longZero的取值为0,则可以确定当前组中的待编码系数均为0;如果longZero的取值不为0,则可以确定当前组中的待编码系数不全为0。或者,在遍历当前组中的全部待编码系数之后,如果run_length的取值与当前组中的点的个数相同,则可以确定当前组中的待编码系数均为0;如果run_length的取值小于当前组中的点的个数,则可以确定当前组中的待编码系数不全为0。
示例性的,在本申请的实施例中,若当前系数是当前组中的最后一个待编码系数,即当前系数为当前组中的最后一个点的全部颜色分量的系数,那么在按照上述方法完成当前系数的编码处理之后,如果确定当前组中的全部待编码系数均为0(若longZero的取值为0则代表当前组中的全部待编码系数均为0,或者,若run_length的取值与当前组内的点数相等则代表当前组中的全部待编码系数均为0),那么可以将longZero的取值设置为1,并写入码流;如果确定当前组中的全部待编码系数不全为0(若longZero的取值不为0则代表当前组中的全部待编码系数不全为0,或者,若run_length的取值小于当前组内的点数则代表当前组中的全部待编码系数均为0),那么将run_length写入码流。
进一步地,在本申请的实施例中,在对反射率属性进行编码时,点云中的每一个点的待编码系数可以为反射率的系数。
可以理解的是,在本申请的实施例中,在对点云的属性信息进行编码时,可以使用longZero标志位(标识信息)和零游程值run_length。其中,longZero标志位可以表示每一个组内的待编码系数是否均为0,零游程值run_length则用于对每个点的反射率的系数进行是否均为0的计数。
进一步地,在本申请的实施例中,在编码端,可以先根据分组步长参数对所有点的待编码系数进行分组,从而可以确定至少一个待编码系数组。其中,分组步长参数可以为固定长度K,其中,K为大于或者等于0的整数,分组步长参数可以为针对点云预先设置的任意数值。
示例性的,在本申请的实施例中,分组步长参数可以预先定义在属性头信息aps中,在编解码属性系数之前,可以先对分组步长参数进行编解码。
可以理解的是,在本申请的实施例中,可以在确定分组步长参数之后,直接将分组步长参数设置为分组步长,然后再根据分组步长对多个待解码系数进行分组;或者,也可以在确定分组步长参数之后,先根据分组步长参数确定分组步长,然后根据分组步长对多个待解码系数进行分组。
需要说明的是,在本申请的实施例中,一个点的待编码系数的长度可以设定为1,即一个点的反射率的系数的长度可以设定为1。
也就是说,在本申请的实施例中,N个点的待编码系数的长度可以为N,即待编码系数的长度与点的个数相同。
示例性的,在本申请的实施例中,如果分组步长参数为K,待编码系数的长度为N,那么按照分组步长参数为K对待编码系数进行分组之后,可以确定(G+1)个待编码系数组。其中,将N作为被除数,K作为除数进行除法运算后,获得的商为G,余数为K',即N/K=G…K',此时可以确定分组后获得(G+1)个待编码系数组,前G个待编码系数组中的点的个数为K,即前G个待编码系数组中的系数的个数为K,最后一个待编码系数组中的点的个数为K',即最后一个待编码系数组中的系数的个数为K'。K'大于0且小于或者等于K。
进一步地,在本申请的实施例中,在依次对每一个待编码系数组进行编码之前,对于待编码系数组中的当前组,可以先对longZero和run_length进行初始化,例如,可以将当前组的longZero初始化为0(第二值),还可以将run_length初始化为0。
可以理解的是,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前点的系数为0,即当前点的反射率的系数均为0,则对run_length进行自加处理,即++run_length,然后再继续处理当前组的下一个系数,即处理下一个反射率的系数。
可以理解的是,在本申请的实施例中,在对当前组内的系数按照预设顺序编码时,若当前点的系数不为0,即当前点的反射率的系数不为0,那么此时需要先确定longZero的取值是否为0,如果longZero的取值为0,那么需要将longZero的取值设置为非0,例如将longZero的取值设置为1,从而使longZero的取值指示当前组中的待编码系数不全为0;如果longZero的取值为不为0,那么可以认为longZero的取值已经指示当前组中的待编码系数不全为0,因此不需要再对longZero的取值进行重设。接着,可以编码零游程值(run_length),再编码当前点的系数,即编码具体的当前点的反射率的系数,最后将run_length重置为0。
需要说明的是,在本申请的实施例中,由于预先将当前组的系数标识信息初始化为第二值(例如0),因此,如果当前系数不为0,且当前组的系数标识信息的取值为第二值,则可以说明当前组的待编码系数并不全为0,且指示当前组的待编码系数不全为0的系数标识信息还没有被编码,因此,可以先将示当前组的待编码系数并不全为0的系数标识信息写入码流。
接着,可以重新将系数标识信息的取值设置为第一值,从而可以在下一次编码当前组的不为0的系数时,可以参照该系数标识信息的取值,不再重复当前组的系数标识信息。例如,当再次确定当前组的一个待编码系数不为0,且当前组的系数标识信息的取值为第一值时,便可以确定虽然当前组的待编码系数并不全为0,但是指示当前组的待编码系数不全为0的系数标识信息已经被编码,因此不需要再重复编码当前组的系数标识信息。从而可以节省码字,提高编码效率。
进一步地,在本申请的实施例中,按照上述方法遍历完成当前组中的每一个待编码系数之后,直到当前组的最后一个待编码系数,通过longZero的取值或run_length的取值,便可以确定当前组中的待编码系数是否均为0。例如,在遍历当前组中的全部待编码系数之后,如果longZero的取值为0,则可以确定当前组中的待编码系数均为0;如果longZero的取值不为0,则可以确定当前组中的待编码系数不全为0。或者,在遍历当前组中的全部待编码系数之后,如果run_length的取值与当前组中的点的个数相同,则可以确定当前组中的待编码系数均为0;如果run_length的取值小于当前组中的点的个数,则可以确定当前组中的待编码系数不全为0。
示例性的,在本申请的实施例中,若当前系数是当前组中的最后一个待编码系数,即当前系数为当前组中的最后一个点的反射率的系数,那么在按照上述方法完成当前系数的编码处理之后,如果确定当 前组中的全部待编码系数均为0(若longZero的取值为0则代表当前组中的全部待编码系数均为0,或者,若run_length的取值与当前组内的点数相等则代表当前组中的全部待编码系数均为0),那么可以将longZero的取值设置为1,并写入码流;如果确定当前组中的全部待编码系数不全为0(若longZero的取值不为0则代表当前组中的全部待编码系数不全为0,或者,若run_length的取值小于当前组内的点数则代表当前组中的全部待编码系数均为0),那么将run_length写入码流。
编码端采用预设顺序可以包括点云原始采集顺序、莫顿顺序、希尔伯特顺序、变换顺序等。
进一步地,在本申请的实施例中,在对量化残差或量化后的变换系数进行解码时,可以先将点云中的所有点的属性信息的量化残差或量化后的变换系数进行分组,然后对每一个组引入一个标志位longZero(系数标识信息),该标志位longZero可以用于对每个组内的点的属性信息的量化残差或量化后的变换系数是否均为0进行指示。
可以理解的是,在本申请的实施例中,可以将点云中的一个点的属性信息的量化残差或量化后的变换系数作为该点的待解码系数。也就是说,待解码系数可以为量化残差,也可以为量化后的变换系数。
进一步地,在本申请的实施例中,在对颜色属性进行解码时,点云中的每一个点的待解码系数可以包括全部颜色分量的系数。例如,一个待解码系数可以包括R分量的系数、G分量的系数、B分量的系数;或者,一个待解码系数可以包括Y分量的系数、U分量的系数、V分量的系数。
可以理解的是,在本申请的实施例中,在对点云的属性信息进行解码时,可以使用longZero标志位(标识信息)和零游程值run_length。其中,longZero标志位可以表示每一个组内的待解码系数是否均为0,零游程值run_length则用于对每个点的全部颜色分量的系数进行是否均为0的计数。
进一步地,在本申请的实施例中,在解码端,可以先根据分组步长参数对所有点的待解码系数进行分组,从而可以确定至少一个待解码系数组。其中,分组步长参数可以为固定长度K,其中,K为大于或者等于0的整数,分组步长参数可以为针对点云预先设置的任意数值。
示例性的,在本申请的实施例中,分组步长参数可以预先定义在属性头信息aps中,在编解码属性系数之前,可以先对分组步长参数进行编解码。
可以理解的是,在本申请的实施例中,可以在确定分组步长参数之后,直接将分组步长参数设置为分组步长,然后再根据分组步长对多个待解码系数进行分组;或者,也可以在确定分组步长参数之后,先根据分组步长参数确定分组步长,然后根据分组步长对多个待解码系数进行分组。
需要说明的是,在本申请的实施例中,一个点的待编码系数的长度可以设定为1,由于每一个点的待编码系数可以包括全部颜色分量的系数,因此一个点的全部颜色分量的系数的长度之和可以设定为1。例如,将一个点的R、G、B三个颜色分量的系数的长度之和设定为1,或者,将一个点的Y、U、V三个颜色分量的系数的长度之和设定为1。
也就是说,在本申请的实施例中,N个点的N个待编码系数的长度可以为N,即待编码系数的长度与点的个数相同,或者说,待编码系数的长度与待编码系数的个数相同。
示例性的,在本申请的实施例中,如果基于分组步长参数确定的分组步长为K,多个待解码系数的长度为N,那么按照分组步长K对多个待解码系数进行分组之后,可以确定(G+1)个待解码系数组。其中,将N作为被除数,K作为除数进行除法运算后,获得的商为G,余数为K',即N/K=G…K',此时可以确定分组后获得(G+1)个待解码系数组,前G个待解码系数组中的待解码系数的个数为K,最后一个待解码系数组中的待解码系数的个数为K'。
可以理解的是,在本申请的实施例中,在进行分组步长参数的确定时,可以通过解码码流获得分组步长参数;或者,也可以直接获取预先设置的分组步长参数。
可以理解的是,在本申请的实施例中,如果解码获得的系数标识信息longZero的取值为第一值,例如取值为1,那么可以确定当前组中的待解码系数均为0,进而可以认为不需要再对当前组中的待解码系数进行解码处理。
示例性的,在本申请的实施例中,对于颜色属性,解码longZero标志位,若longZero的取值为1,则表示当前组所有系数均为0,那么继续解码下一个待解码系数组;若longZero的取值为0,则表示当前组所有系数不全为0,进而需要对当前组中的待解码系数进行解码处理,因此需要解码码流,继续确定零游程值(run_length),然后根据零游程值确定当前组中的当前系数。其中,如果run_length>0,说明当前全部颜色分量的系数均为0,则进行--run_length操作,然后处理下一组全部颜色分量的系数;若run_length==0,则说明当前颜色分量的系数至少有一维的系数不为0,则解码当前颜色分量的系数,再解码并更新零游程值(run_length),然后处理下一组全部颜色分量的系数。
示例性的,在本申请的实施例中,对于反射率属性,解码longZero标志位,若longZero的取值为1,则表示当前组所有系数均为0,那么继续解码下一个待解码系数组;若longZero的取值为0,则表示当前组所有系数不全为0,进而需要对当前组中的待解码系数进行解码处理,因此需要解码码流,继 续确定零游程值(run_length),然后根据零游程值确定当前组中的当前系数。其中,如果run_length>0,说明当前反射率的系数为0,则进行--run_length操作,然后处理下一个反射率的系数;若run_length==0,则说明当前反射率的系数不为0,则解码当前反射率的系数,再解码并更新零游程值(run_length),然后处理下一个反射率的系数。
解码端采用预设顺序可以包括点云原始采集顺序、莫顿顺序、希尔伯特顺序、变换顺序等。
综上所述,本申请实施例提出的编解码方法,在编解码系数时,基于分组标识信息的指示,可以将所有系数进行分组,同时,引入系数标识信息,例如一个标志位longZero,该标志位longZero可以用来表示每个组内的系数是否均为0,从而可以在一个组内所有系数均为0时,只需要一个1bit的标志位来进行指示,能够节省一部分码字,进而提高编码效率,提升压缩性能。
本实施例提供了一种编解码方法,在进行属性信息的编解码时,由于引入了系数标识信息,可以对多个系数进行分组处理,从而在一个系数组中的系数均为0时,可以使用一个系数标识信息对该组的多个系数的取值情况进行指示,大大节省了码字,提高了点云属性的编解码性能。
基于上述实施例,在本申请的再一实施例中,基于前述实施例相同的发明构思,图8为编码器的组成结构示意图一,如图8所示,编码器120可以包括:第一确定单元121,设置单元122和编码单元123;其中,
所述第一确定单元121,配置为确定分组步长参数;按照所述分组步长参数对所述多个待编码系数进行分组,确定至少一个待编码系数组;若所述至少一个待编码系数组中的当前组中的当前系数不为0,则确定所述当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;
所述编码单元123,配置为若所述系数标识信息的取值为第二值,则将所述系数标识信息写入码流;
所述设置单元122,配置为若所述系数标识信息的取值为第二值,将所述系数标识信息的取值设置为第一值;
所述编码单元123,还配置为在将零游程值写入码流后,编码所述当前系数;
所述设置单元122,还配置为将所述零游程值设置为0;
所述编码单元123,还配置为若所述系数标识信息的取值为第一值,则在将零游程值写入码流后,编码所述当前系数;
所述设置单元122,还配置为将所述零游程值设置为0;
所述编码单元123,还配置为继续根据所述系数标识信息和所述零游程值编码所述当前组中的下一个待编码系数。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器120,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。
基于上述编码器120的组成以及计算机可读存储介质,图9为编码器的组成结构示意图二,如图9所示,编码器120可以包括:第一存储器124和第一处理器125,第一通信接口126和第一总线系统127。第一存储器124、第一处理器125、第一通信接口126通过第一总线系统127耦合在一起。可理解,第一总线系统127用于实现这些组件之间的连接通信。第一总线系统127除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图9中将各种总线都标为第一总线系统127。其中,
第一通信接口126,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
所述第一存储器124,用于存储能够在所述第一处理器上运行的计算机程序;
所述第一处理器125,用于在运行所述计算机程序时,确定分组步长参数;按照分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;若至少一个待编码系数组中的当前组中的当前系 数不为0,则确定当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息的取值为第二值,则将系数标识信息写入码流,并将系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码当前系数,将零游程值设置为0;若系数标识信息的取值为第一值,则在将零游程值写入码流后,编码当前系数,将零游程值设置为0;继续根据系数标识信息和零游程值编码当前组中的下一个待编码系数。
可以理解,本申请实施例中的第一存储器124可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器124旨在包括但不限于这些和任意其它适合类型的存储器。
而第一处理器125可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器125中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器125可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器124,第一处理器125读取第一存储器124中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,第一处理器125还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
图10为解码器的组成结构示意图一,如图10所示,解码器130可以包括:第二确定单元131;其中,
所述第二确定单元131,配置为确定分组步长参数;按照所述分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定所述至少一个待解码系数组中的当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;若所述系数标识信息指示所述当前组中的待解码系数均为0,则完成对所述当前组中的待解码系数的解码处理,继续确定所述至少一个待解码系数组中的下一个待解码系数组的标识信息。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、 磁碟或者光盘等各种可以存储程序代码的介质。
因此,本申请实施例提供了一种计算机可读存储介质,应用于解码器130,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。
基于上述解码器130的组成以及计算机可读存储介质,图11为解码器的组成结构示意图二,如图11所示,解码器130可以包括:第二存储器132和第二处理器133,第二通信接口134和第二总线系统135。第二存储器132和第二处理器133,第二通信接口134通过第二总线系统135耦合在一起。可理解,第二总线系统135用于实现这些组件之间的连接通信。第二总线系统135除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图11中将各种总线都标为第二总线系统135。其中,
第二通信接口134,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
所述第二存储器132,用于存储能够在所述第二处理器上运行的计算机程序;
所述第二处理器133,用于在运行所述计算机程序时,确定分组步长参数;按照分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定至少一个待解码系数组中的当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息指示当前组中的待解码系数均为0,则完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息。
可以理解,本申请实施例中的第二存储器132可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第二存储器132旨在包括但不限于这些和任意其它适合类型的存储器。
而第二处理器133可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第二处理器133中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第二处理器133可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第二存储器132,第二处理器133读取第二存储器132中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
本申请实施例提供了一种编码器和解码器,在进行属性信息的编解码时,由于引入了系数标识信息,可以对多个系数进行分组处理,从而在一个系数组中的系数均为0时,可以使用一个系数标识信息对该组的多个系数的取值情况进行指示,大大节省了码字,提高了点云属性的编解码性能。
需要说明的是,在本申请的实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,在编码端,确定分组步长参数;按照分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;若至少一个待编码系数组中的当前组中的当前系数不为0,则确定当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息的取值为第二值,则将系数标识信息写入码流,并将系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码当前系数,将零游程值设置为0;若系数标识信息的取值为第一值,则在将零游程值写入码流后,编码当前系数,将零游程值设置为0;继续根据系数标识信息和零游程值编码当前组中的下一个待编码系数。在解码端,确定分组步长参数;按照分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定至少一个待解码系数组中的当前组的系数标识信息;其中,系数标识信息用于对当前组中的待解码系数是否均为0进行指示;若系数标识信息指示当前组中的待解码系数均为0,则完成对当前组中的待解码系数的解码处理,继续确定至少一个待解码系数组中的下一个待解码系数组的系数标识信息。由此可见,在本申请的实施例中,在进行属性信息的编解码时,由于引入了系数标识信息,可以对多个系数进行分组处理,从而在一个系数组中的系数均为0时,可以使用一个系数标识信息对该组的多个系数的取值情况进行指示,大大节省了码字,提高了点云属性的编解码性能。

Claims (32)

  1. 一种解码方法,应用于解码器,所述方法包括:
    确定分组步长参数;
    按照所述分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;
    确定所述至少一个待解码系数组中的当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;
    若所述系数标识信息指示所述当前组中的待解码系数均为0,则完成对所述当前组中的待解码系数的解码处理,继续确定所述至少一个待解码系数组中的下一个待解码系数组的系数标识信息。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    若所述系数标识信息指示所述当前组中的待解码系数不全为0,则解码码流,确定零游程值,并根据所述零游程值确定所述当前组中的当前系数。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    所述当前系数为当前点的全部颜色分量的系数。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:
    若所述零游程值指示所述当前点的全部颜色分量的系数均为0,则在对所述零游程值进行自减1处理后,根据所述零游程值确定所述当前组中的下一个待解码系数;
    若所述零游程值指示所述当前点的全部颜色分量的系数不全为0,则解码码流,确定所述当前点的全部颜色分量的系数和新的零游程值,根据所述新的零游程值确定所述当前组中的下一个待解码系数。
  5. 根据权利要求2所述的方法,其中,所述方法还包括:
    所述当前系数为当前点的反射率的系数。
  6. 根据权利要求5所述的方法,其中,所述方法还包括:
    若所述零游程值指示所述当前点的反射率的系数为0,则在对所述零游程值进行自减1处理后,根据所述零游程值确定所述当前组中的下一个待解码系数;
    若所述零游程值指示所述当前点的反射率的系数不为0,则解码码流,确定所述当前点的反射率的系数和新的零游程值,根据所述新的零游程值确定所述当前组中的下一个待解码系数。
  7. 根据权利要求4或6所述的方法,其中,所述方法还包括:
    若所述零游程值大于0,则确定所述零游程值指示所述当前系数为0;
    若所述零游程值等于0,则确定所述零游程值指示所述当前系数不为0。
  8. 根据权利要求1所述的方法,其中,所述方法还包括:
    若所述系数标识信息的取值为第一值,则确定所述系数标识信息指示所述当前组中的待解码系数均为0;
    若所述系数标识信息的取值为第二值,则确定所述系数标识信息指示所述当前组中的待解码系数不全为0;其中,所述第一值和所述第二值不相等。
  9. 根据权利要求1-6,8任一项所述的方法,其中,
    所述待解码系数为属性信息的量化残差;或者,
    所述待解码系数为属性信息的量化后的变换系数。
  10. 根据权利要求9所述的方法,其中,所述方法还包括:
    解码码流,确定所述分组步长参数;或者,
    获取预先设置所述分组步长参数。
  11. 根据权利要求1所述的方法,其中,所述方法还包括:
    解码码流,确定分组标识信息;
    若所述分组标识信息指示对所述多个待解码系数进行分组处理,则执行所述分组步长参数的确定流程。
  12. 根据权利要求11所述的方法,其中,所述方法还包括:
    若所述分组标识信息指示不对多个待解码系数进行分组处理,则解码码流,确定零游程值,并根据所述零游程值确定当前系数。
  13. 根据权利要求10所述的方法,其中,所述方法还包括:
    将所述分组步长参数设置为分组步长,并根据所述分组步长对多个待解码系数进行分组;或者,
    根据所述分组步长参数确定分组步长,并根据所述分组步长对多个待解码系数进行分组。
  14. 根据权利要求13所述的方法,其中,所述方法还包括:
    若所述分组步长参数为K,则设置所述分组步长为K;或者,
    若所述分组步长参数为K,则确定所述分组步长为2 K;其中,K为大于或者等于0的整数。
    解码码流,确定分组标识信息;
    若所述分组标识信息指示对多个待解码系数进行分组处理,则确定分组步长参数;
  15. 一种编码方法,应用于编码器,所述方法包括:
    确定分组步长参数;
    按照所述分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;
    若所述至少一个待编码系数组中的当前组中的当前系数不为0,则确定所述当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;
    若所述系数标识信息的取值为第二值,则将所述系数标识信息写入码流,并将所述系数标识信息的取值设置为第一值;在将零游程值写入码流后,编码所述当前系数,将所述零游程值设置为0;
    若所述系数标识信息的取值为第一值,则在将零游程值写入码流后,编码所述当前系数,将所述零游程值设置为0;
    继续根据所述系数标识信息和所述零游程值编码所述当前组中的下一个待编码系数。
  16. 根据权利要求15所述的方法,其中,所述方法还包括:
    若所述至少一个待编码系数组中的当前组中的当前系数为0,则在对零游程值进行自加1处理之后,继续编码所述当前组中的下一个待编码系数。
  17. 根据权利要求16所述的方法,其中,所述方法还包括:
    在对所述当前组进行编码处理之前,初始化所述系数标识信息的取值为所述第二值,初始化所述零游程值为0。
  18. 根据权利要求16所述的方法,其中,所述方法还包括:
    当所述当前系数为所述当前组中的最后一个待编码系数时,若所述系数标识信息的取值为所述第二值,则确定所述当前组中的待编码系数均为0,则将所述系数标识信息编码为第一值,并写入码流;否则将所述零游程值写入码流。
  19. 根据权利要求16所述的方法,其中,所述方法还包括:
    当所述当前系数为所述当前组的最后一个待编码系数时,若所述零游程值与所述当前组中的点的个数相同,则确定所述当前组中的待编码系数均为0,则将所述系数标识信息编码为第一值,并写入码流;否则将零游程值写入码流。
  20. 根据权利要求15所述的方法,其中,所述方法还包括:
    确定分组标识信息;
    若所述分组标识信息指示对所述多个待解码系数进行分组处理,则执行所述分组步长参数的确定流程。
  21. 根据权利要求20所述的方法,其中,所述方法还包括:
    若所述分组标识信息指示不对多个待解码系数进行分组处理,则确定当前系数是否为0;
    若所述当前系数为0,则在对零游程值进行自加1处理之后,继续编码所述多个待解码系数中的下一个待编码系数;
    若所述当前系数不为0,则在将零游程值写入码流后,编码所述当前系数,将所述零游程值设置为0,继续编码所述多个待解码系数中的下一个待编码系数。
  22. 根据权利要求21所述的方法,其中,所述方法还包括:
    所述当前系数为当前点的全部颜色分量的系数;或者,
    所述当前系数为当前点的反射率的系数。
  23. 根据权利要求16所述的方法,其中,所述方法还包括:
    若所述零游程值大于0,则确定所述零游程值指示所述当前系数为0;
    若所述零游程值等于0,则确定所述零游程值指示所述当前系数不为0。
  24. 根据权利要求15-23任一项所述的方法,其中,
    所述待编码系数为属性信息的量化残差;或者,
    所述待编码系数为属性信息的量化后的变换系数。
  25. 根据权利要求15-23任一项所述的方法,其中,
    将所述分组步长参数写入码流。
  26. 根据权利要求25所述的方法,其中,所述方法还包括:
    将所述分组步长参数设置为分组步长,并根据所述分组步长对所述多个待编码系数进行分组;或者,
    根据所述分组步长参数确定分组步长,并根据所述分组步长对所述多个待编码系数进行分组。
  27. 根据权利要求26所述的方法,其中,所述方法还包括:
    若所述分组步长参数为K,则设置所述分组步长为K;或者,
    若所述分组步长参数为K,则确定所述分组步长为2 K;其中,K为大于或者等于0的整数。
  28. 一种编码器,所述编码器包括第一确定单元,设置单元和编码单元;其中,
    所述第一确定单元,配置为确定分组步长参数;按照所述分组步长参数对多个待编码系数进行分组,确定至少一个待编码系数组;若所述至少一个待编码系数组中的当前组中的当前系数不为0,则确定所述当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;
    所述编码单元,配置为若所述系数标识信息的取值为第二值,则将所述系数标识信息写入码流;
    所述设置单元,配置为若所述系数标识信息的取值为第二值,将所述系数标识信息的取值设置为第一值;
    所述编码单元,还配置为在将零游程值写入码流后,编码所述当前系数;
    所述设置单元,还配置为将所述零游程值设置为0;
    所述编码单元,还配置为若所述系数标识信息的取值为第一值,则在将零游程值写入码流后,编码所述当前系数;
    所述设置单元,还配置为将所述零游程值设置为0;
    所述编码单元,还配置为继续根据所述系数标识信息和所述零游程值编码所述当前组中的下一个待编码系数。
  29. 一种编码器,所述编码器包括第一存储器和第一处理器;其中,
    所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求15至27任一项所述的方法。
  30. 一种解码器,所述解码器包括第二确定单元;其中,
    所述第二确定单元,配置为确定分组步长参数;按照所述分组步长参数对多个待解码系数进行分组,确定至少一个待解码系数组;确定所述至少一个待解码系数组中的当前组的系数标识信息;其中,所述系数标识信息用于对所述当前组中的待解码系数是否均为0进行指示;若所述系数标识信息指示所述当前组中的待解码系数均为0,则完成对所述当前组中的待解码系数的解码处理,继续确定所述至少一个待解码系数组中的下一个待解码系数组的标识信息。
  31. 一种解码器,所述解码器包括第二存储器和第二处理器;其中,
    所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至14任一项所述的方法。
  32. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至14任一项所述的方法、或者实现如权利要求15至27任一项所述的方法。
PCT/CN2022/099640 2022-06-17 2022-06-17 编解码方法、编码器、解码器以及存储介质 WO2023240662A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/099640 WO2023240662A1 (zh) 2022-06-17 2022-06-17 编解码方法、编码器、解码器以及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/099640 WO2023240662A1 (zh) 2022-06-17 2022-06-17 编解码方法、编码器、解码器以及存储介质

Publications (1)

Publication Number Publication Date
WO2023240662A1 true WO2023240662A1 (zh) 2023-12-21

Family

ID=89192995

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/099640 WO2023240662A1 (zh) 2022-06-17 2022-06-17 编解码方法、编码器、解码器以及存储介质

Country Status (1)

Country Link
WO (1) WO2023240662A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6529554B1 (en) * 2000-06-29 2003-03-04 Intel Corporation Low branch-mispredict technique for MPEG run length encoding
CN101198054A (zh) * 2006-12-05 2008-06-11 华为技术有限公司 变长编解码方法及其编解码器
CN110545437A (zh) * 2019-08-30 2019-12-06 北京大学 系数编码、解码方法、电子设备及介质
CN112449186A (zh) * 2019-08-30 2021-03-05 腾讯科技(深圳)有限公司 编码方法、解码方法、相应的装置、电子设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6529554B1 (en) * 2000-06-29 2003-03-04 Intel Corporation Low branch-mispredict technique for MPEG run length encoding
CN101198054A (zh) * 2006-12-05 2008-06-11 华为技术有限公司 变长编解码方法及其编解码器
CN110545437A (zh) * 2019-08-30 2019-12-06 北京大学 系数编码、解码方法、电子设备及介质
CN112449186A (zh) * 2019-08-30 2021-03-05 腾讯科技(深圳)有限公司 编码方法、解码方法、相应的装置、电子设备及存储介质

Similar Documents

Publication Publication Date Title
KR102659806B1 (ko) V-pcc용 스케일링 파라미터
US20230351639A1 (en) Point cloud encoding and decoding method, encoder and decoder
JP2024505798A (ja) 点群符号化・復号化方法及びシステム、点群符号器並びに点群復号器
WO2023240662A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2023173237A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023173238A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024103304A1 (zh) 点云编解码方法、编码器、解码器、码流及存储介质
WO2024007144A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023240660A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2024082152A1 (zh) 编解码方法及装置、编解码器、码流、设备、存储介质
WO2024065406A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2022170511A1 (zh) 点云解码方法、解码器及计算机存储介质
WO2023159428A1 (zh) 编码方法、编码器以及存储介质
WO2024065272A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2024060161A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2022217472A1 (zh) 点云编解码方法、编码器、解码器及计算机可读存储介质
WO2024007268A1 (zh) 点云编解码方法、编解码器及计算机存储介质
WO2023197337A1 (zh) 索引确定方法、装置、解码器以及编码器
WO2023103565A1 (zh) 点云属性信息的编解码方法、装置、设备及存储介质
WO2024065270A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2024065408A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023240455A1 (zh) 点云编码方法、编码装置、编码设备以及存储介质
WO2023097694A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2022257155A1 (zh) 解码方法、编码方法、解码器、编码器以及编解码设备
TWI806481B (zh) 點雲中鄰居點的選擇方法及裝置、編碼設備、解碼設備及電腦設備

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22946343

Country of ref document: EP

Kind code of ref document: A1