Zero-run value encoding and decoding method and video encoding and decoding method, device and system

Through the zero-run value encoding and decoding method and the entropy coding method with exponential Golomb order adjustment, the storage and transmission bottlenecks in point cloud data compression are solved, and efficient point cloud data management is achieved.

CN118872278BActive Publication Date: 2025-09-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202280092193.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-09-26
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively process and compress massive 3D point cloud data, resulting in storage space and transmission bandwidth limitations, which affects the application and development of point cloud data.

Method used

The zero-run value encoding and decoding method is used to compress point cloud data. The value to be decoded is determined by decoding flags and identifiers. The entropy coding method is adjusted in combination with the exponential Golomb order to achieve efficient encoding and decoding of point cloud attribute information.

Benefits of technology

It improves the compression efficiency of point cloud data, reduces storage requirements and transmission traffic, and reduces server storage costs and transmission time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118872278B_ABST
    Figure CN118872278B_ABST
Patent Text Reader

Abstract

A zero-run value encoding and decoding method, as well as a video encoding and decoding method, device, and system, are disclosed. When encoding and decoding attribute information of points in a video, zero-run values ​​are encoded and decoded. A parity flag is used to indicate the parity of the value to be encoded, combined with three flag bits to complete the encoding of the value to be encoded. During decoding, the parity flag and three flag bits are used to decode the value to obtain the zero-run value. The disclosed embodiments also provide corresponding encoding and decoding devices and systems. The disclosed embodiments can reduce encoding overhead and improve compression efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to, but are not limited to, video technology, and more specifically, to a zero-run value encoding and decoding method and a video encoding and decoding method, device, and system. Background Art

[0002] Point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or scene. Figure 1A and Figure 1B An exemplary 3D point cloud image and a local magnified image are shown, from which it can be seen that the point cloud surface is composed of densely distributed points.

[0003] Point clouds can flexibly and conveniently represent the spatial structure and surface properties of three-dimensional objects or scenes. Furthermore, because point clouds are directly sampled from real objects, they provide a strong sense of realism while maintaining high accuracy. Consequently, they have found widespread application, encompassing virtual reality gaming, computer-aided design, geographic information systems, automated navigation systems, digital cultural heritage, free-viewpoint broadcasting, immersive 3D telepresence, and 3D reconstruction of biological tissues and organs. While innovations in point cloud data acquisition methods have made it possible to acquire massive amounts of point cloud data, the processing of this massive amount of 3D point cloud data is facing storage and transmission bandwidth constraints, necessitating more effective compression methods. SUMMARY OF THE INVENTION

[0005] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0006] An embodiment of the present disclosure provides a zero-run value decoding method, comprising:

[0007] Decoding the first flag bit, and determining that the value to be decoded is equal to 0 according to the first flag bit, decoding is completed, and the value to be decoded is a zero run value or a quotient of the zero run value divided by 2;

[0008] If it is determined according to the first flag bit that the value to be decoded is not equal to 0, continue decoding the second flag bit, and if it is determined according to the second flag bit that the value to be decoded is equal to 1, decoding is completed;

[0009] If it is determined according to the second flag that the value to be decoded is not equal to 1, continue decoding the third flag; if it is determined according to the third flag that the value to be decoded is equal to 2, decoding is completed;

[0010] If it is determined according to the third flag that the value to be decoded is not equal to 2, continue decoding the flag indicating the parity of the value to be decoded and the quotient of the value to be decoded minus 3 and divided by 2; multiply the decoded quotient by 2, add 3, and then add the value of the flag to obtain the decoded value to be decoded;

[0011] The identifier is 0, indicating that the value to be decoded is an odd number; the identifier is 1, indicating that the value to be decoded is an even number.

[0012] An embodiment of the present disclosure further provides a video decoding method, including:

[0013] Decoding zero run values ​​in a video stream according to the zero run value decoding method according to any embodiment of the present disclosure;

[0014] The quantized residual of the attribute information of the point in the video stream is decoded according to the decoded zero-run value.

[0015] An embodiment of the present disclosure further provides a zero-run value encoding method, comprising:

[0016] According to the value to be encoded, encoding a first flag bit for determining whether the value to be encoded is equal to 0, and when the value to be encoded is equal to 0, encoding is completed;

[0017] If the value to be encoded is not equal to 0, continue encoding the second flag bit for determining whether the value to be encoded is equal to 1, and if the value to be encoded is equal to 1, the encoding is completed;

[0018] If the value to be encoded is not equal to 1, continue encoding the third flag bit for determining whether the value to be encoded is equal to 2, and if the value to be encoded is equal to 2, the encoding is completed;

[0019] If the value to be encoded is not equal to 2, continue encoding the identifier indicating the parity of the value to be encoded and the quotient of the value to be encoded minus 3 and divided by 2;

[0020] The value to be decoded is a zero-run value or a quotient of a zero-run value divided by 2;

[0021] The identifier is 0, which indicates that the value to be encoded is an odd number; the identifier is 1, which indicates that the value to be encoded is an even number.

[0022] An embodiment of the present disclosure further provides a video encoding method, including:

[0023] Encode the points in the video point by point, use zero-run values ​​to record the number of consecutive points where the quantization residual of the attribute information is zero, and encode the zero-run values ​​according to the zero-run value encoding method as described in any embodiment of the present disclosure.

[0024] An embodiment of the present disclosure further provides a video code stream, comprising an information unit indicating a zero-run value, wherein the information unit comprises:

[0025] 3 flag bits, used to determine whether the value to be decoded is equal to 0, 1, and 2 respectively;

[0026] A flag, set to indicate the parity of the value to be decoded;

[0027] The quotient value obtained by subtracting 3 from the value to be decoded and then dividing the result by 2; wherein the value to be decoded is the zero-run value or the quotient obtained by dividing the zero-run value by 2.

[0028] An embodiment of the present disclosure further provides a zero-run value decoding device, comprising a processor and a memory storing a computer program, wherein the processor can implement the zero-run value decoding method as described in any embodiment of the present disclosure when executing the computer program.

[0029] An embodiment of the present disclosure further provides a zero-run value encoding device, comprising a processor and a memory storing a computer program, wherein the processor can implement the zero-run value encoding method as described in any embodiment of the present disclosure when executing the computer program.

[0030] An embodiment of the present disclosure further provides a video decoding device, comprising a processor and a memory storing a computer program, wherein the processor can implement the video decoding method as described in any embodiment of the present disclosure when executing the computer program.

[0031] An embodiment of the present disclosure further provides a video encoding device, including a processor and a memory storing a computer program, wherein the processor can implement the video encoding method as described in any embodiment of the present disclosure when executing the computer program.

[0032] An embodiment of the present disclosure further provides a video encoding and decoding system, which includes the video encoding device as described in any embodiment of the present disclosure and the video decoding device as described in any embodiment of the present disclosure.

[0033] An embodiment of the present disclosure also provides a non-volatile computer-readable storage medium, which stores a computer program, wherein the computer program, when executed by a processor, can implement the zero-run value decoding method, zero-run value encoding method, video decoding method or video encoding method as described in any embodiment of the present disclosure.

[0034] Still other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description.

[0035] Summary of the Figures

[0036] The accompanying drawings are used to provide an understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solutions of the present disclosure and do not constitute a limitation to the technical solutions of the present disclosure.

[0037] Figure 1A and Figure 1B They are respectively an exemplary three-dimensional point cloud image and a local magnified image;

[0038] Figure 2A is a schematic diagram of the encoding framework of the point cloud compression platform of the first embodiment;

[0039] Figure 2B is a schematic diagram of a decoding framework of a point cloud compression platform of the first embodiment;

[0040] Figure 3A is a flowchart of a zero-run value encoding method according to an embodiment of the present disclosure. Figure 3B is a flowchart after decomposing step 110 in FIG3 into multiple sub-steps;

[0041] Figure 4 is with Figure 3A Flowchart of a decoding method corresponding to the zero-run value encoding method shown;

[0042] Figure 5 and Figure 6 Flowcharts of a zero-run value encoding method and a zero-run value decoding method according to an embodiment of the present disclosure;

[0043] Figure 7 and Figure 8 Flowcharts of a zero-run value encoding method and a zero-run value decoding method according to another embodiment of the present disclosure;

[0044] Figure 9 and Figure 10 Flowcharts of a zero-run value encoding method and a zero-run value decoding method according to another embodiment of the present disclosure;

[0045] Figure 11 and Figure 12 Flowcharts of a zero-run value encoding method and a zero-run value decoding method according to another embodiment of the present disclosure;

[0046] Figure 13 and Figure 14 They are respectively flowcharts of a video encoding method and a video decoding method according to an embodiment of the present disclosure;

[0047] Figure 15 2 is a schematic diagram of a data structure of a zero-run value in a bitstream according to an embodiment of the present disclosure;

[0048] Figure 16 2 is a schematic diagram of a zero-run value decoding device according to an embodiment of the present disclosure.

[0049] Details

[0050] The present disclosure describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present disclosure.

[0051] In the description of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment described as "exemplary" or "for example" in the present disclosure should not be interpreted as being more preferred or advantageous than other embodiments. "And / or" in this article is a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. "Multiple" refers to two or more than two. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present disclosure, words such as "first" and "second" are used to distinguish between identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0052] When describing representative exemplary embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps in the specific order described. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific sequence of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to the steps performed in the order written, and those skilled in the art can readily understand that these sequences can vary and still remain within the spirit and scope of the disclosed embodiments.

[0053] The embodiments of the present disclosure are described using the scenario of point cloud attribute encoding and decoding as an example. However, the solution of the present disclosure is not only applicable to point cloud attribute encoding and decoding, but can also be applied to similar scenarios of other video encoding and decoding.

[0054] Two-dimensional images contain information at every pixel, and their distribution is regular, so there's no need to record their position. However, the distribution of points in a point cloud in three-dimensional space is random and irregular, so recording the spatial position of each point is necessary to fully represent the point cloud. Similar to two-dimensional images, each point in the acquisition process has corresponding attribute information, typically RGB color values, which reflect the object's color. For point clouds, in addition to color, reflectance is also commonly associated with each point, reflecting the surface texture. Therefore, point cloud data typically includes geometric information (x, y, z) consisting of three-dimensional position information, and attribute information consisting of three-dimensional color information (r, g, b) and one-dimensional reflectance information (r). The corresponding point cloud data storage format consists of a file header and a data portion. The header includes the data format, data representation type, the total number of points in the point cloud, and the content represented by the point cloud. In one example, the point cloud is in a ".ply" format, represented by ASCII codes, has a total of 207242 points, and each point has three-dimensional position information xyz and three-dimensional color information rgb.

[0055] Point cloud acquisition primarily involves computer generation, 3D laser scanning, and 3D photogrammetry. Computers can generate point clouds of virtual 3D objects and scenes; 3D laser scanning can obtain point clouds of static real-world 3D objects or scenes, generating millions of point clouds per second; and 3D photogrammetry can obtain point clouds of dynamic real-world 3D objects or scenes, generating tens of millions of point clouds per second. These technologies reduce the cost and time required to acquire point cloud data while improving data accuracy. However, as application demand grows, processing massive amounts of 3D point cloud data is facing bottlenecks due to storage space and transmission bandwidth limitations.

[0056] Taking a point cloud video with a frame rate of 30 fps (frames per second) as an example, each frame contains 700,000 points, each with coordinate information (xyz, float) and color information (RGB, uchar). Therefore, the data size of a 10-second point cloud video is approximately 0.7 million (4 bytes, 3 + 1 byte, 3) per 30 fps per 10 seconds, which is 3.15 GB. For a 1280×720 2D video with a YUV sampling format of 4:2:0 and a frame rate of 24 fps, the data size is approximately 1280×720, 12 bits per 24 frames per 10 seconds, which is ≈ 0.33 GB. A 10-second two-view 3D video has a data size of approximately 0.33 × 2 = 0.66 GB. Therefore, the data size of a point cloud video far exceeds that of 2D and 3D videos of the same length. To better manage data, conserve server storage space, and reduce the transmission traffic and time between the server and client, point cloud compression has become a key issue in the development of point cloud applications.

[0057] Point cloud compression generally adopts the method of compressing point cloud geometric information and attribute information separately. On the encoding end, 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 to assist in the compression of point cloud attributes; on the decoding end, 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 decompression of point cloud attributes. Figure 2A Shown is a schematic diagram of an exemplary point cloud encoding framework. Figure 2B Shown is a schematic diagram of an exemplary point cloud decoding framework.

[0058] The encoding end of the Point Cloud Compression Reference Model (PCRM) includes a geometry encoder and an attribute encoder. Figure 2A As shown, the geometric encoder includes a coordinate translation module 11, a coordinate quantization module 13, an octree construction module 15, a geometric entropy encoder 17, and a geometric reconstruction module 19. The coordinate translation module 11 and the coordinate quantization module 13 preprocess the original geometric information of the point cloud. The octree construction module 15 and the geometric entropy encoder 17 encode the preprocessed geometric information to obtain a geometric code stream. Among them:

[0059] The coordinate translation module 11 is configured to normalize the geometric origin of the original geometric information to a minimum position in the point cloud space through coordinate translation.

[0060] The coordinate quantization module 13 is configured to convert the geometric information output by the coordinate translation module 11 from floating point numbers to integers through coordinate quantization to facilitate subsequent regularization processing. The regularized geometric information is output to the octree construction module 15 and the attribute encoder.

[0061] The octree construction module 15 is configured to geometrically encode the regularized geometric information, and recursively divide the point cloud space using the octree structure. Each time, the current node is divided into eight sub-blocks of the same size, and the occupancy codeword of each sub-block is judged. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty. The occupancy codeword information of all blocks is recorded and encoded at the last layer of the recursive division; the geometric information expressed by the octree structure is output to the geometric entropy encoder 17 and the geometric reconstruction module 19.

[0062] The geometric entropy encoder 17 is configured to perform entropy encoding on the geometric information expressed by the octree structure to form a geometric code stream.

[0063] The geometry reconstruction module 19 is configured to perform geometry reconstruction processing within the geometry encoder, and output the reconstructed geometry information as additional information to the attribute encoder.

[0064] like Figure 2A As shown, the attribute encoder includes a color space conversion module 21, an attribute recoloring module 23, an attribute prediction module 25, a quantization module 27, and an attribute entropy coding module 29. The color space conversion module 21 and the attribute recoloring module 23 preprocess the original attribute information. Other modules perform attribute encoding on the preprocessed attribute information to obtain an attribute code stream.

[0065] The color space conversion module 21 is configured to perform color space conversion when the processed original attribute information is a color value in RGB format, and convert it into a YUV color space that is more consistent with the visual characteristics of the human eye.

[0066] The attribute recoloring module 23 is configured to reallocate attribute values ​​to each point after geometric encoding based on the geometric information output by the geometric encoder. This process is called attribute recoloring to avoid the influence of the difference between the original geometric information and the geometric information after geometric encoding.

[0067] The attribute prediction module 25 is configured to reorder the point cloud. In one example, the reordering method is Morton code, the traversal order of attribute coding is Morton order, and the attribute prediction method is single-point prediction based on Morton order, that is, tracing back one point from the current point to be encoded according to the Morton order, and the point found is used as the prediction reference point of the current point to be encoded, and the attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual is obtained according to the difference between the attribute value of the current point to be encoded and the attribute prediction value.

[0068] The quantization module 27 is configured to quantize the attribute residual to obtain a quantized residual of the attribute.

[0069] The attribute entropy coding module 29 is configured to perform entropy coding on the quantized residual of the attribute to form an attribute code stream.

[0070] The decoding end of the PCRM platform includes a geometry decoder and an attribute decoder. Figure 2B As shown, the geometry decoder includes a geometry entropy decoder 31, an octree reconstruction module 33, a coordinate inverse quantization module 35 and a coordinate inverse translation module 37.

[0071] The geometric entropy decoder 31 is configured to entropy decode the geometric code stream to obtain geometric information of each node.

[0072] The octree reconstruction module 33 is configured to construct an octree structure based on the geometric information of each node in the same manner as geometric coding, and reconstruct the geometric information after coordinate transformation and expressed by the octree structure in combination with the decoded geometry.

[0073] The coordinate inverse quantization module 35 is configured to perform coordinate inverse quantization on the geometric information output by the octree reconstruction module 33 . The geometric information after coordinate inverse quantization is output to the coordinate inverse translation module 37 and output to the attribute decoder as additional information.

[0074] The coordinate inverse translation module 37 is configured to perform coordinate inverse translation on the geometric information output by the coordinate inverse quantization module 35 to obtain decoded geometric information.

[0075] As shown in the figure, the attribute decoder includes an attribute entropy decoder 41, an inverse quantization module 43, an attribute prediction module 45 and a color space inverse transformation module 47.

[0076] The attribute entropy decoder 41 is configured to perform entropy decoding on the attribute code stream to obtain a quantized residual of the point cloud.

[0077] The dequantization module 43 is configured to dequantize the quantization residual to obtain a residual value of the point cloud attribute.

[0078] The attribute prediction module 45 is configured to construct a Morton sequence based on the geometric information output by the geometric decoder in the same manner as attribute encoding, obtain the attribute prediction value of the current point to be decoded, and then add the attribute prediction value to the residual value to restore the YUV attribute value of the current point to be decoded.

[0079] The color space inverse transformation module is configured to perform color space inverse transformation on the attribute information output by the attribute prediction module 45 to obtain decoded attribute information.

[0080] When compressing and encoding point clouds based on the above-mentioned encoding and decoding frameworks, there are two technical routes distinguished by the algorithm used for attribute compression. One is called the prediction branch, and the other is called the transform branch. The attribute encoding and decoding method used by the prediction branch is described above. The difference between the attribute encoding and decoding method used by the transform branch and the prediction branch is that after obtaining the residual of the attribute of the point through attribute prediction, the residual is first transformed (the transformation algorithm used can be wavelet transform or k-ary discrete cosine transform (DCT: Discrete Cosine Transform) transform, etc.), and then the transformed residual is quantized to obtain a quantized residual. Correspondingly, after entropy decoding and inverse quantization of the attribute code stream to obtain the residual of the attribute, the prediction branch performs attribute prediction based on the residual obtained by inverse quantization, while the transform branch first performs an inverse transform on the residual obtained by inverse quantization, and then performs attribute prediction based on the residual obtained by inverse transformation.

[0081] In the point cloud compression method of the first embodiment, a run-length-based encoding and decoding scheme is used for the quantized residuals of the point cloud attributes. The attribute entropy encoder on the encoding side and the attribute entropy decoder on the decoding side use the same order (such as the original point cloud acquisition order, Morton order, Hilbert order, etc.) to encode and decode the points in the point cloud in sequence.

[0082] Encoding end

[0083] During encoding, the zero-run value is used to count whether the quantization residual of the attribute of the point is 0, and the number of consecutive points whose quantization residual of the attribute is zero is recorded. The zero-run value is an integer and its initial value is set to 0.

[0084] Taking the color attribute as an example, when the encoder encodes the quantized residual of the color of a point in the point cloud, the encoding of all points except the last point is as follows:

[0085] If the quantization residuals of the three color components of the point are all zero, the zero run value is increased by 1 (++run_length), and then the next point is processed. The data expression in the brackets represents the calculation described in the text before the brackets;

[0086] If any one-dimensional quantization residual of the three color components of the point is not zero, encode the zero run value (the zero run value corresponding to the previous point), then reset the zero run value to 0, and encode the quantization residual of the three color components of the point (Res0, Res1, Res2), and then process the next point.

[0087] The encoding process of the last point is as follows:

[0088] If the quantization residuals of the three color components at this point are all 0, then ++run_length and encode the zero run value;

[0089] If any one-dimensional quantization residual of the three color components of the point is not zero, the zero-run value is encoded, and then the zero-run value is reset to 0, and the quantization residual and zero-run value of the three color components of the point are encoded.

[0090] The above process can also be used to encode the quantized residual of the reflectivity of points in the point cloud by changing the attribute from "color three components" to "reflectivity".

[0091] In the first example of the encoding end of this embodiment, encoding the zero run value includes encoding the quotient of the zero run value divided by 2 (run_length / 2) and encoding the remainder of the zero run value divided by 2 (run_length%2). An exemplary encoding process is as follows:

[0092] The first step is to encode the first flag indicating whether the quotient is equal to 0. If the quotient is 0, the encoding is completed and the process goes to the fourth step. Otherwise, the process goes to the second step.

[0093] The second step is to encode the second flag indicating whether the quotient is equal to 1. If the quotient is 1, the encoding is completed and the process goes to the fourth step. Otherwise, the process goes to the third step.

[0094] In the third step, the difference between the encoding quotient and 2 is (run_length / 2-2). The encoding quotient is completed and the fourth step is entered;

[0095] The fourth step is to encode the remainder of the zero run value divided by 2 (runlength%2), and the encoding of the remainder is completed.

[0096] In the second example of the encoding end of this embodiment, the zero run value is directly encoded. An exemplary encoding process is as follows:

[0097] The first step is to encode the first flag bit indicating whether the zero run value is equal to 0. If the zero run value is 0, the encoding is completed, otherwise it goes to the second step;

[0098] The second step is to encode the second flag bit indicating whether the zero run value is equal to 1. If the zero run value is 1, the encoding is completed, otherwise it goes to the third step.

[0099] The third step is to encode the difference between the zero run value and 2 (run_length-2), and the encoding is completed.

[0100] The first flag bit mentioned above can be recorded as "is_run_length_equal_zero", and the second flag bit can be recorded as "is_run_length_equal_one".

[0101] Decoding end

[0102] When the decoding end decodes the quantized residual of the attribute of a point in the attribute code stream of the point cloud, it is necessary to decode the zero run value run_length in the attribute code stream, and decode the quantized residual of the attribute information of the point in the attribute code stream according to the decoded zero run value.

[0103] Taking the quantized residual of the color of a point in the decoded point cloud as an example, the decoding process of all points except the last one includes:

[0104] If run_length>0, it is determined that the quantization residuals of the three color components of the current point are all zero, then the zero run value minus 1 (--run_length) operation is performed, and then the next point is processed;

[0105] If run_length=0, it means that the quantization residuals of the three color components of the current point are not all zero, then decode the quantization residual of the color of the current point, then decode the zero run value corresponding to the next point, update the current zero run value to the decoded zero run value, and then process the next point.

[0106] The zero-run value used for decoding the first point is obtained by decoding the attribute code stream. The zero-run value used for decoding subsequent points is the zero-run value after performing a 1-minus operation on the previous point, or the zero-run value after the previous point is updated.

[0107] For the last point, when the zero run value is greater than 0, the quantization residuals of the three color components of the point are determined to be zero, or when the zero run value is equal to 0, the quantization residuals of the three color components of the point are decoded, and the decoding process can be ended.

[0108] The above process can also be used to decode the quantized residual of the reflectivity of a point in a point cloud.

[0109] In the first example of the decoding end of this embodiment (corresponding to the first example of the encoding end of this embodiment), the above-mentioned decoded zero run value includes the quotient of the decoded zero run value divided by 2 (run_length / 2) and the remainder of the decoded zero run value divided by 2 (run_length%2). The obtained quotient is multiplied by 2 and then added to the remainder to obtain the zero run value.

[0110] The decoding process of the zero run value in this example includes:

[0111] The first step is to decode the flag indicating whether the quotient is 0. If the flag indicates that the quotient is 0, the decoding is completed and the process goes to the fourth step. Otherwise, the process goes to the second step.

[0112] The second step is to decode the flag indicating whether the quotient is 1. If the flag indicates that the quotient is 1, the decoding is completed and the process goes to the fourth step. Otherwise, the process goes to the third step.

[0113] Step 3: Subtract the difference of 2 (run_length / 2-2) from the decoded quotient, and determine that the quotient (run_length / 2) is equal to the difference plus 2. The decoded quotient is complete.

[0114] The fourth step is to decode the remainder of the zero run value divided by 2 (run_length%2). The decoding of the remainder is completed. The decoded zero run value is equal to the decoded quotient multiplied by 2 plus the decoded remainder, which is expressed by the formula run_length=(run_length / 2)*2+(run_length%2).

[0115] In the second example of the decoding end of this embodiment (corresponding to the second example of the encoding end of this embodiment), the zero run value run_length is directly decoded. An exemplary encoding process is as follows:

[0116] The first step is to decode the flag indicating whether the zero run value is 0. If the flag indicates that the zero run value is equal to 0, then run_length = 0 and the decoding is completed. Otherwise, go to the second step.

[0117] The second step is to decode the flag indicating whether the zero run value is 1. If the flag indicates that the zero run value is equal to 1, then run_length = 1 and the decoding is completed. Otherwise, go to the third step.

[0118] The third step is to decode the difference between the zero run value and 2 (run_length-2), and determine that the zero run value is equal to the difference plus 2, and the decoding is completed.

[0119] The zero-run value encoding and decoding methods of the above two examples can be used in the entropy encoding and decoding of point cloud attributes in the prediction branch, and can also be used in the entropy encoding and decoding of point cloud attributes in the transformation branch; and can be used in the entropy encoding and decoding of point cloud color attributes, and can also be used in the entropy encoding and decoding of point cloud reflectivity attributes. Different examples of zero-run value encoding and decoding methods can also be selected for different branches and different attributes. For example, the zero-run value encoding and decoding method of the first example is used in the entropy encoding and decoding of point cloud color attributes in the prediction branch, the zero-run value encoding and decoding method of the second example is used in the entropy encoding and decoding of point cloud color attributes in the transformation branch, and the zero-run value encoding and decoding method of the second example is used in the entropy encoding and decoding of point cloud reflectivity attributes in both the prediction branch and the transformation branch. However, the present disclosure is not limited to this.

[0120] The zero-run value encoding and decoding method in the first embodiment above requires encoding and decoding the value of zero-run value minus 2 for zero-run codes with a length greater than 1. When the zero-run code is longer (the zero-run value is larger), more code words are required.

[0121] In a second embodiment, an adaptive entropy coding method is provided to adjust the entropy coding method of the zero-run value according to the distribution characteristics of the point cloud attributes.

[0122] Encoding end

[0123] In this embodiment, the encoding end first determines the exponential Golomb order corresponding to the attribute, denoted as GolombNum, writes the determined exponential Golomb order into the bitstream, and adjusts the entropy coding method of the zero-run value according to the determined exponential Golomb order.

[0124] The process of determining the exponential Golomb order corresponding to an attribute in this embodiment is as follows:

[0125] a) Calculate the maximum and minimum values ​​of the attribute information of the points in the input point cloud sequence, respectively denoted as attr max and attr min , calculate the difference between the maximum and minimum values ​​Res attr :

[0126] Res attr =attrmax -attr min

[0127] If the attribute type is an attribute with multi-dimensional information (such as a color attribute of a point with three components), in one example, the maximum and minimum values ​​can be taken from the maximum and minimum values ​​of the values ​​of the first dimension, but in other examples, the maximum and minimum values ​​can also be taken from the values ​​of the second or third dimension. For example, when the color attribute is represented in YUV format, the maximum and minimum values ​​can be taken from the values ​​of the Y component, U component, or V component. When the color attribute is represented in RGB format, the maximum and minimum values ​​can be taken from the values ​​of the R component, G component, or B component.

[0128] If the attribute type is an attribute with only single-dimensional information (such as the reflectivity attribute of a point), the maximum and minimum values ​​of the numerical value of the dimension are directly taken.

[0129] b) Calculate Res′ at the current bit rate attr :

[0130]

[0131] This step corrects the difference obtained in step a) according to the current bit rate, where "<<" indicates a left shift operation, attrQuantParam / 8 indicates the number of bits of left shift, and attrQuantParam is the quantization parameter used by the encoder. If the value of attrQuantParam cannot guarantee that attrQuantParam / 8 is an integer, attrQuantParam / 8 can be rounded up or down.

[0132] c) According to Res′ attr Calculate the corresponding Index, namely:

[0133] Index = log2Res′ attr

[0134] In log2 Res′ attr When it is not an integer, log2 Res′ can be attr Perform rounding operation.

[0135] d) Based on the calculated Index, the Golomb order number GolombNum corresponding to the current attribute is searched in the pre-set lookup table. The formula is:

[0136] GolombNum=LUT kthIndex [Index-1]

[0137] In one example, the lookup table is as follows:

[0138] LUT kthIndex ={1,1,1,2,2,2,3,3,3,4,5,6,7}

[0139] For example, when the Index is 2, the GolombNum found is 1; when the Index is 5, the GolombNum found is 2, and so on.

[0140] Through the above steps, the exponential Golomb order (GolombNum) corresponding to the attribute information can be determined based on the maximum and minimum values ​​of the attribute information of the points in the currently input point cloud sequence and the quantization parameter of the attribute information. The determined GolombNum can include the exponential Golomb order (ColorGolombNum) corresponding to the color attribute and the exponential Golomb order (RefGolombNum) corresponding to the reflectivity attribute.

[0141] In the second embodiment, after determining the exponential Golomb order corresponding to the attribute, the encoding end also encodes the determined exponential Golomb order, that is, writes the determined exponential Golomb order (ColorGolombNum and / or RefGolombNum) into the attribute header information (AttributeParameterSet) of the point cloud attribute code stream, and provides it to the decoding end for use.

[0142] In this embodiment, when encoding the zero-run value, the encoding method of adjusting the zero-run value according to the determined Exponential Golomb order can be specifically embodied in at least one of the following aspects:

[0143] The first aspect is to determine whether to split the zero-run value when encoding it based on the exponential Golomb order corresponding to the attribute, that is, to encode it into the quotient and remainder separately.

[0144] In this embodiment, the exponential Golomb order GolombNum corresponding to the attribute is compared with a preset order threshold Threshold (such as set to 1, 2, etc.);

[0145] If GolombNum≤Threshold, when encoding the zero-run value, the zero-run value is divided into the quotient of the zero-run value divided by 2 and the remainder of the zero-run value divided by 2 and encoded separately. For details, see the first example of encoding the zero-run value in the first embodiment;

[0146] If GolombNum>Threshold, when encoding the zero-run value, the zero-run value is directly encoded without dividing it into two parts, the quotient and the remainder. For details, see the second example of encoding the zero-run value in the first embodiment.

[0147] The second aspect is to determine the encoding method of the difference when encoding the zero-run value based on the exponential Golomb order corresponding to the attribute.

[0148] As described in the first embodiment, when encoding the zero-run value directly, the difference of the zero-run value minus 2 is encoded. When encoding the zero-run value separately as a quotient and a remainder, the difference of the quotient minus 2 is encoded. The difference can be encoded using either unary encoding or exponential Golomb encoding.

[0149] In this embodiment, the exponential Golomb order GolombNum corresponding to the attribute is compared with a preset order threshold Threshold (such as set to 1, 2, etc.);

[0150] If GolombNum≤Threshold, encoding the difference using a second-order exponential Golomb coding method during encoding of the zero-run value associated with the attribute;

[0151] If GolombNum>Threshold, the difference value is encoded using a unary encoding method during the attribute-dependent zero-run value encoding process.

[0152] The exponential Golomb orders corresponding to the color attribute and the reflectivity attribute may be different. Therefore, when entropy encoding is performed on the color attribute, whether to split when encoding the zero-run value and / or the method for encoding the difference is determined based on the exponential Golomb order corresponding to the color attribute; and when entropy encoding is performed on the reflectivity attribute, whether to split when encoding the zero-run value and / or the method for encoding the difference is determined based on the exponential Golomb order corresponding to the reflectivity attribute.

[0153] Unary coding is a simple encoding method that can only encode non-negative integers. The unary encoding of any non-negative integer num is num 1s followed by a 0. Accordingly, unary decoding decodes num by reading the bitstream and counting the number of 1s preceding the 0 to obtain the decoded num.

[0154] The code element structure of Exponential Golomb coding (Exp-Golomb) is: [M zeros prefix][1][Offset], where M is the group ID, 1 can be seen as a delimiter, and Offset is the offset within the group. Exp-Golomb requires a non-negative integer K as a parameter, which is called K-order Exp-Golomb. When K = 0, it is called 0-order Exp-Golomb. The currently popular H.264 video coding standard uses 0-order Exp-Golomb. Any order Exp-Golomb can be converted to 0-order Exp-Golomb coding.

[0155] The process of performing 0-order Exp-Golomb encoding on any non-negative integer num includes: calculating the group number m, Indicates downward value; encode the group number m, write m consecutive 0s, and finally write a 1 as the end. Calculate the offset within the group, Offset = num + 1 - 2 m , taking the lower m bits of the binary form of offset as the offset codeword. The length of num after 0-order Exp-Golomb encoding is: 2m+1. Correspondingly, the 0-order Exp-Golomb decoding process includes: reading the bit stream, continuing if it is 0, stopping if it is 1, and then counting the number of 0s m; then reading the m-bit bit, which is offset, and the final decoded value is: num = 2 m -1+offset. Different K results in different starting block sizes during Exp-Golomb coding. Any K-order Exp-Golomb code can be converted to 0-order. Specifically: let the number to be coded be num. When performing K-order Exp-Golomb coding on num, first use 0-order Exp-Golomb code N+2 K -1, and, from the result of the 0th order Exp-Golomb encoding, delete the K high-order zeros. The K-order Exp-Golomb encoding method will not be described in detail.

[0156] In the second embodiment, when the decoding end performs entropy decoding on the attribute code stream, the exponential Golomb order (ColorGolombNum and / or RefGolombNum) corresponding to the attribute can be decoded from the attribute header information (AttributeParameterSet) of the attribute code stream, that is, the exponential Golomb order in the code stream can be read out.

[0157] In this embodiment, when decoding the zero-run value, the decoding method of adjusting the zero-run value according to the decoded Exponential Golomb order can be specifically embodied in at least one of the following aspects:

[0158] In a first aspect, it is determined whether a decoding remainder is required when decoding the zero-run value used for entropy decoding of the attribute according to the Exponential Golomb order corresponding to the attribute.

[0159] In this embodiment, the exponential Golomb order GolombNum corresponding to the attribute is compared with a preset order threshold Threshold (such as set to 1, 2, etc.);

[0160] If GolombNum≤Threshold, when decoding the zero-run value, it is necessary to decode the quotient of the zero-run value divided by 2 and the remainder of the zero-run value divided by 2, and then calculate the zero-run value. For details, see the first example of decoding the zero-run value at the decoding end in the first embodiment.

[0161] If GolombNum>Threshold, when decoding the zero-run value, the zero-run value is directly decoded without dividing it into two parts, namely the quotient and the remainder. For details, see the second example of decoding the zero-run value at the decoding end in the first embodiment.

[0162] The exponential Golomb orders corresponding to the color attribute and the reflectance attribute may be different. When entropy decoding is performed on the color attribute and the reflectance attribute, different decoding methods may be used to decode the zero-run value.

[0163] Secondly, according to the Exponential Golomb order corresponding to the attribute, a method of decoding the difference when decoding the zero-run value used for entropy decoding of the attribute is determined.

[0164] As described in the first embodiment, when directly decoding the zero-run value, the difference value of the zero-run value minus 2 is decoded. When the zero-run value is separated into a quotient and a remainder and decoded separately, the difference value of the quotient minus 2 is decoded. The difference value can be decoded using either unary decoding or exponential Golomb decoding.

[0165] In this embodiment, the exponential Golomb order GolombNum corresponding to the attribute is compared with a preset order threshold Threshold (such as set to 1, 2, etc.); if GolombNum≤Threshold, then in the process of zero-run value decoding, the second-order exponential Golomb decoding method is used to decode the difference; if GolombNum>Threshold, then in the process of zero-run value decoding, the unary decoding method is used to decode the difference.

[0166] In various embodiments of the present disclosure, the quotient of the zero-run value divided by 2 (e.g., run_length / 2) is referred to as the "quotient." When the quotient is a value to be encoded or decoded, the quotient obtained by subtracting a set value (e.g., 1, 2, 3, or 4) from the quotient and then dividing it by 2 is referred to as the "quotient value." This is to facilitate differentiation when the two exist simultaneously. When the zero-run value is a value to be encoded or decoded, the quotient obtained by subtracting a set value (e.g., 1, 2, 3, or 4) from the zero-run value and then dividing it by 2 is referred to as the "quotient value."

[0167] An embodiment of the present disclosure proposes a parity-based zero-run value encoding method and decoding method, using a flag to represent the parity of the zero-run value, using one flag bit.

[0168] The process of the zero run value encoding method of this embodiment is as follows Figure 3AShown, including:

[0169] Step 110, encoding a flag indicating whether the zero-run value is equal to 0 according to the zero-run value to be encoded. If the zero-run value is equal to 0, the encoding is completed; if the zero-run value is not equal to 0, proceed to step 120;

[0170] The flag indicating whether the zero run value is equal to 0 may be recorded as "is_run_length".

[0171] Step, encoding the identifier representing the parity of the zero run value and the zero run value al_minus ze ro"

[0172] The quotient of 1201 divided by 2; wherein, the identifier is 0, which indicates that the zero run value is an odd number, and is 1, which indicates that the zero run value is an even number.

[0173] In an example of the encoding end of this embodiment, the flag bit is 1, indicating that the zero run value is equal to 0; when the flag bit is 0, it indicates that the zero run value is not equal to 0. The process of this example is as follows Figure 3B As shown, step 110 is implemented by dividing it into three steps, namely:

[0174] Step 1101, determine whether the zero run value is equal to 0, if not equal to 0, execute step 1105, if equal to 0, execute step 1103;

[0175] Step 1103: Set the flag indicating whether the zero run value is equal to 0 to 1 and write it into the bitstream, indicating that the zero run value is equal to 0 and the encoding is completed;

[0176] Step 1105 , write the flag indicating whether the zero run value is equal to 0 to the bit stream after position 0, indicating that the zero run value is not equal to 0, and execute step 120 .

[0177] Step 120, encode an identifier representing the parity of the zero run value and a quotient of the zero run value minus 1 divided by 2; wherein, the identifier is 0 to indicate that the zero run value is an odd number, and is 1 to indicate that the zero run value is an even number.

[0178] In the above example, the flag bit is defined as 0 to indicate that the zero run value is not equal to 0, and as 1 to indicate that the zero run value is equal to 0. However, in another example of the encoding end of this embodiment, the flag bit can also be defined as 1 to indicate that the zero run value is not equal to 0, and as 0 to indicate that the zero run value is equal to 0. The process is basically the same as this example, which can be seen in Figure 3B , the difference is that when the zero run value is equal to 0, the flag is set to 0, and when the zero run value is not equal to 0, the flag is set to 1. It is easy to understand that no matter which definition method is used, encoding and decoding can be achieved without changing the number of codeword bits.

[0179] In the above step 120, when encoding the identifier representing the parity of the zero run value and the quotient of the zero run value minus 1 and divided by 2, the identifier can be encoded first and then the quotient, or the quotient can be encoded first and then the identifier.

[0180] In this embodiment, when encoding the flag indicating the parity of the zero-run value, according to the definition of the flag value, "a flag of 0 indicates that the zero-run value is odd, and a flag of 1 indicates that the zero-run value is even," if the zero-run value is odd, the flag is set to 0 during encoding and written into the bitstream. If the zero-run value is even, the flag is set to 1 during encoding and written into the bitstream. If the flag indicating the parity of the zero-run value is denoted as "parity," a parity of 1 indicates that the zero-run value is even, and a parity of 0 indicates that the zero-run value is odd. The zero-run value is denoted as run_length, and thus panty = (run_length - 1) % 2.

[0181] In other embodiments of the present disclosure, the flag indicating the parity of the value to be encoded (such as the zero-run value, the quotient of the zero-run value divided by 2, etc.) is also defined as "a flag of 1 indicates that the zero-run value is odd, and a flag of 0 indicates that the zero-run value is even." It is easy to understand that in this case, when the zero-run value is odd, the flag should be set to 1 during encoding and written into the bitstream, while when the zero-run value is even, the flag should be set to 0 during encoding and written into the bitstream. This will not be further explained below.

[0182] When encoding a flag bit, the present disclosure needs to determine the value of the flag bit according to the value to be encoded and the definition of the value of the flag bit, and write the value of the flag bit into the code stream. The same is true when encoding an identifier.

[0183] In this embodiment, when encoding the quotient of the zero run value minus 1 and then divided by 2, the zero run value is subtracted by 1 and then divided by 2 to obtain the quotient, which is then encoded and written into the bitstream. The formula can be expressed as quotient value = (run_length-1)>>1, where ">>1" indicates a right shift of one bit, i.e., division by 2. The quotient (denoted as value) is written into the bitstream after being unary encoded, or after being written into the bitstream after being N-order exponential Golomb encoded (N is a natural number), or written into the bitstream in a fixed-length binary encoding form.

[0184] The process of the zero run value decoding method of this embodiment is as follows: Figure 4 Shown, including:

[0185] Step 210: decoding a flag indicating whether the zero-run value is equal to 0. If it is determined according to the flag that the zero-run value is equal to 0, decoding is completed; if it is determined according to the flag that the zero-run value is not equal to 0, proceeding to step 220.

[0186] Step 220, decode the identifier representing the parity of the zero run value and the quotient of the zero run value minus 1 and divided by 2; multiply the decoded quotient by 2, add 1, and then add the value of the identifier to obtain the decoded zero run value; wherein, the identifier is 0, indicating that the zero run value is an odd number, and is 1, indicating that the zero run value is an even number.

[0187] In one example of the decoding end of this embodiment, the flag bit is 1 to indicate that the zero run value is equal to 0; and the flag bit is 0 to indicate that the zero run value is not equal to 0. In step 210, when decoding the flag bit indicating whether the zero run value is equal to 0, the flag bit is extracted from the bitstream and the value of the flag bit is determined. When the flag bit is 1, it can be determined that the zero run value is equal to 0; when the flag bit is 0, it can be determined that the zero run value is not equal to 0. In another example of the decoding end of this embodiment, similar to the encoding end, it is defined that the flag bit is 0 to indicate that the zero run value is equal to 0, and the flag bit is 1 to indicate that the zero run value is not equal to 0. When decoding the flag bit, the flag bit is extracted from the bitstream. When the flag bit is equal to 0, it is determined that the zero run value is equal to 0; when the flag bit is not equal to 0, it is determined that the zero run value is not equal to 0. The same is true for other flags in other embodiments. It is necessary to determine whether the value to be decoded (zero-run value, quotient of zero-run value divided by 2, etc.) is equal to the set value based on the definition of the flag value and the decoded value of the flag. In other embodiments, a similar method can also be used to determine whether the value to be decoded is greater than the set value, or less than the set value.

[0188] In step 220, when decoding the zero-run parity indicator and the quotient of the zero-run value minus 1 and divided by 2, the indicator is extracted from the bitstream and the quotient is decoded using a decoding method corresponding to the quotient encoding method (e.g., unary decoding, Exponential Golomb decoding, etc.). The decoded zero-run value can be calculated based on the indicator and the decoded quotient without further reasoning. This can be expressed as: run_length = parity + 1 + value << 1, where "<< 1" indicates a left shift by one bit, i.e., multiplication by 2, and parity, i.e., the value of the indicator, can be 0 or 1.

[0189] Compared with the first embodiment mentioned above, this embodiment replaces the identifier indicating whether the zero run value is equal to 1 used in the first embodiment with an identifier indicating parity, thereby reducing the codewords required for encoding the original information. When the zero run value to be encoded is large, the codeword length required for encoding the zero run value can be reduced, thereby improving encoding efficiency.

[0190] Before encoding, the zero-run value is in numerical form. After encoding, it includes information units such as a flag bit, an identifier, and a numerical value (such as a quotient), which is called a codeword form. In this article, the zero-run value as the value to be encoded, and the zero-run value in "encoded zero-run value", "decoded zero-run value", etc. are zero-run values ​​in numerical form, while the zero-run value as the value to be decoded, and the zero-run value in "decoded zero-run value", "zero-run value in the codestream", etc. are zero-run values ​​in codeword form. In some embodiments, the quotient obtained by dividing the zero-run value by 2 is similar, and the encoding also requires encoding the flag bit, identifier, and quotient value, which also has numerical form and codeword form.

[0191] Table 1 lists the comparison of code words used to encode zero run values ​​of different lengths using the first embodiment (denoted by "A" in the table) and the present embodiment (denoted by "B" in the table):

[0192] Table 1

[0193]

[0194] 0 to 8 in the table represent zero-run values, eq0 represents a flag indicating whether the zero-run value is equal to 0, eq1 represents a flag indicating whether the zero-run value is equal to 1, parity is the value of the flag, and value represents the quotient.

[0195] As can be seen from Table 11, when the zero-run value is 0, 2, or 3, the codewords encoded by this embodiment and the first embodiment have the same number of bits. When the zero-run value is 1, the codeword of this embodiment requires one more bit than the first embodiment. When the zero-run value is greater than 3, the value encoded by the first embodiment is larger than that required by this embodiment, requiring more bits. Moreover, the larger the zero-run value, the greater the difference in values. Therefore, when the zero-run value is large, this embodiment can significantly reduce the codeword length required to represent the zero-run value, thereby improving encoding efficiency and reducing storage space and transmission bandwidth.

[0196] An embodiment of the present disclosure provides a parity-based zero-run value encoding method and decoding method, using a flag to represent the parity of the zero-run value, using one flag bit.

[0197] The zero run value encoding method of this embodiment encodes the quotient and remainder of the zero run value divided by 2 in the code stream respectively when encoding the zero run value. The process of encoding the quotient of the zero run value divided by 2 in the code stream is as follows: Figure 5 Shown, including:

[0198] Step 310: Encode a flag indicating whether the quotient is equal to 0 according to the value of the quotient. If the quotient is equal to 0, encoding the quotient is completed and the process proceeds to step 330; if the quotient is not equal to 0, the process proceeds to step 320.

[0199] Step 320: Encode an identifier indicating the parity of the quotient and the quotient value obtained by subtracting 1 from the quotient and dividing it by 2; wherein the identifier being 0 indicates that the quotient is odd, and being 1 indicates that the quotient is even;

[0200] Step 330: Encode the remainder of the zero run value divided by 2, run_length%2.

[0201] Although the remainder is encoded after encoding the quotient of the zero-run value divided by the first divisor in this embodiment, in other embodiments the remainder may be encoded before or simultaneously with encoding the quotient.

[0202] The specific processing of encoding flag bits, identifiers and quotient values ​​in the above steps can be found in the above embodiments.

[0203] Accordingly, the zero-run value decoding method of this embodiment decodes the quotient and remainder of the zero-run value divided by 2 in the bitstream, respectively. The process of decoding the quotient of the zero-run value divided by 2 in the bitstream is as follows: Figure 6 Shown, including:

[0204] Step 410, decoding a flag indicating whether the quotient is equal to 0. If the quotient is determined to be 0 according to the flag, decoding the quotient is completed and the process proceeds to step 430; if the quotient is determined not to be 0 according to the flag, step 420 is executed.

[0205] Step 420: Decode the flag indicating the parity of the quotient and the quotient value obtained by subtracting 1 from the quotient and dividing it by 2; multiply the decoded quotient value by 2, add 1, and then add the flag value to obtain the decoded quotient; wherein the flag value of 0 indicates that the quotient is an odd number, and a flag value of 1 indicates that the quotient is an even number;

[0206] Step 430: decode the remainder of the zero-run value divided by 2, multiply the decoded quotient by 2 and add the decoded remainder to obtain the decoded zero-run value.

[0207] The specific processing of decoding the flag bit, identifier and quotient value in the above steps can be referred to the above embodiments.

[0208] In this embodiment, decoding the remainder of the zero-run value divided by 2 in the code stream may also be performed before or simultaneously with decoding the quotient of the zero-run value divided by the first divisor.

[0209] To verify the effectiveness of this embodiment, this embodiment was tested on AVS's point cloud compression reference platform PCRM6.0. Tables 21 to 24 show the experimental results of using this embodiment under the prediction branch based on four test conditions.

[0210] Table 2.1 C1-limit-lossy geometry, lossy attributes

[0211]

[0212] Table 2.2 C2-lossless geometry, lossy attributes

[0213]

[0214] Table 2.3 C1-lossless geometry, limit-lossy attributes

[0215]

[0216] Table 2.4 C1-lossless geometry,lossless attnbutes

[0217]

[0218]

[0219] In the table above, "class" represents the class of the general test sequence, "EtE BD-AttrRate" represents the end-to-end rate-distortion ratio, "EtE Hausdorff BD-AttrRate" represents the end-to-end Hausdorff rate-distortion ratio, "bpip ratio" represents the bitrate per input point, "Y", "Cb", and "Cr" represent the three color components, and "Reflectance" represents the reflectance. Experimental results show that the zero-run value encoding and decoding method of this embodiment can achieve significant performance gains.

[0220] An embodiment of the present disclosure provides a parity-based zero-run value encoding method and decoding method, which uses an identifier to represent the parity of a zero-run value or a value calculated based on the zero-run value.

[0221] The zero run value encoding method of this embodiment is as follows Figure 7 Shown, including:

[0222] Step 510: Obtain a value to be encoded, where the value to be encoded is a zero-run value or a quotient of the zero-run value divided by a first divisor, where the first divisor is a positive integer.

[0223] Step 520: Encode at least one of the following information units according to the value to be encoded and in a set encoding order: N flag bits indicating the size relationship between the value to be encoded and the set value, an identifier indicating the parity of the value to be encoded, and a numerical value calculated based on the value to be encoded, where N is a positive integer.

[0224] In an exemplary embodiment of the present disclosure, the coding order of the settings is:

[0225] Encode N of the flag bits, encode the identifier, and encode a value calculated based on the value to be encoded; or

[0226] Encode N of the flag bits, encode a value calculated based on the value to be encoded, and encode the identifier; or

[0227] Encode the identifier, encode N of the flag bits, and encode a value calculated based on the value to be encoded; or

[0228] Encode some of the N flag bits, encode the identifier, encode the remaining flag bits of the N flag bits, and encode a numerical value calculated based on the value to be encoded.

[0229] It should be noted that the encoding order set above does not mean that all encoding processes must be executed. Only some of the processes can be executed. For example, when the encoding order is set as follows: encoding N of the flag bits, encoding the identifier, and encoding the value calculated based on the value to be encoded, only some or all of the N flag bits can be encoded to complete the encoding, and there is no need to encode the identifier and the value. The same is true for other encoding orders. Only one or more of the previous encoding processes can be executed. Some encoding processes, such as encoding N flag bits, can also complete the encoding of only some of the flag bits.

[0230] In an exemplary embodiment of the present disclosure, the value to be encoded is the quotient of the zero-run value divided by a first divisor, and the method further includes: encoding the remainder of the zero-run value divided by the first divisor before, after, or at the same time as encoding the quotient of the zero-run value divided by the first divisor, wherein the first divisor is 2 or 3 or 4 or 8.

[0231] This method separates the zero-run value into a quotient and a remainder, encoding them separately. The quotient is encoded using a parity-based encoding method, and the remainder can be written into the bitstream as a numerical value. Overall, this zero-run value encoding method is still referred to as a parity-based zero-run value encoding method in this article. The present disclosure is not limited to setting the first divisor to 2; other values ​​may also be used.

[0232] In an exemplary embodiment of the present disclosure, the N flag bits indicating the size relationship between the value to be encoded and the set value include any one or more of the following: a flag bit indicating whether the value to be encoded is equal to the set value, a flag bit indicating whether the value to be encoded is greater than the set value, and a flag bit indicating whether the value to be encoded is less than the set value, wherein N=1 or 2 or 3 or 4 or 5, and the set value includes one or more values ​​from 0 to 5.

[0233] In an exemplary embodiment of the present disclosure, the identifier is 1 to indicate that the value to be encoded is an odd number, and 0 to indicate that the value to be encoded is an even number; or the identifier is 0 to indicate that the value to be encoded is an odd number, and 1 to indicate that the value to be encoded is an even number.

[0234] In an exemplary embodiment of the present disclosure, the numerical value calculated based on the value to be encoded is a numerical value obtained by subtracting M from the value to be encoded and then dividing it by a second divisor, wherein M=0 or 1 or 2 or 3 or 3 or 5 or 6, and the second divisor is 2 or 3 or 4 or 8.

[0235] In an exemplary embodiment of the present disclosure, the value to be decoded is the quotient of the zero-run value divided by a first divisor, and the method further includes: decoding the remainder of the zero-run value divided by the first divisor before, after, or at the same time as decoding the quotient of the zero-run value divided by the first divisor; and multiplying the decoded quotient by the first divisor and adding the decoded remainder to obtain the decoded zero-run value, wherein the first divisor is equal to 2 or 3 or 4 or 8.

[0236] Based on the above-mentioned values ​​of N, M, the first divisor, the second divisor, and the set value, many combinations can be made. These values ​​need to cooperate with each other to achieve correct encoding and decoding. In addition to the embodiments given above, multiple embodiments will be given below to illustrate some of these combinations. On this basis, other possible combinations should also be within the scope of protection of this disclosure.

[0237] The zero run value decoding method of this embodiment is as follows: Figure 8 Shown, including:

[0238] Step 610: Receive a code stream containing a value to be decoded, where the code stream may be an attribute code stream of a point cloud, wherein the value to be decoded is a zero-run value or a quotient of a zero-run value divided by a first divisor, where the first divisor is a positive integer.

[0239] Step 620: Decode the information unit included in the value to be decoded according to the set decoding order, where the information unit includes: N flag bits indicating the size relationship between the value to be decoded and the set value, an identifier indicating the parity of the value to be decoded, and a numerical value calculated based on the value to be encoded and decoded, where N is a positive integer.

[0240] In an exemplary embodiment of the present disclosure, the set decoding order is:

[0241] Decoding N of the flag bits, decoding the flag, and decoding a value calculated based on the value to be decoded; or

[0242] Decoding N of the flag bits, decoding a value calculated based on the value to be decoded, and decoding the identifier; or

[0243] Decoding the identifier, decoding N of the flag bits, and decoding a value calculated based on the value to be decoded; or

[0244] Decode some of the N flag bits, decode the identifier, decode the remaining flag bits of the N flag bits, and decode a value calculated based on the value to be decoded.

[0245] Similar to encoding, the decoding order set above does not mean that all decoding processes must be performed, and only part of the processes may be performed.

[0246] In an exemplary embodiment of the present disclosure, the N flag bits indicating the size relationship between the value to be decoded and the set value include any one or more of the following: a flag bit indicating whether the value to be decoded is equal to the set value, a flag bit indicating whether the value to be decoded is greater than the set value, and a flag bit indicating whether the value to be decoded is less than the set value, wherein N=1 or 2 or 3 or 4 or 5, and the set value includes one or more values ​​from 0 to 5.

[0247] In an exemplary embodiment of the present disclosure, the flag is 1 to indicate that the value to be decoded is an odd number, and 0 to indicate that the value to be decoded is an even number; or the flag is 0 to indicate that the value to be decoded is an odd number, and 1 to indicate that the value to be decoded is an even number.

[0248] In an exemplary embodiment of the present disclosure, the numerical value calculated based on the value to be decoded is a numerical value obtained by subtracting M from the value to be decoded and then dividing it by a second divisor, wherein M=0 or 1 or 2 or 3 or 3 or 5 or 6, and the second divisor is 2 or 3 or 4 or 8.

[0249] In an exemplary embodiment of the present disclosure, the value to be decoded is the quotient of the zero-run value divided by a first divisor, and the method further includes: decoding the remainder of the zero-run value divided by the first divisor before, after, or at the same time as decoding the quotient of the zero-run value divided by the first divisor; multiplying the decoded quotient by 2 and adding the decoded remainder to obtain the decoded zero-run value, wherein the first divisor is 2 or 3 or 4 or 8.

[0250] The zero-run value encoding method and decoding method disclosed in the present invention, by coordinating the identifier, flag bit and numerical value representing parity, can reduce the number of bits of the encoded codeword when there are many larger values ​​to be encoded, thereby improving the encoding efficiency, compared with simply using flag bits and numerical values.

[0251] An embodiment of the present disclosure provides a parity-based zero-run value encoding method and decoding method, wherein a parity indicator is used during encoding to improve encoding efficiency.

[0252] The process of encoding the coded value in this embodiment is as follows Figure 9As shown, the value to be encoded is a zero run value or a quotient of a zero run value divided by 2, and the process includes:

[0253] Step 710: Encode the first flag indicating whether the value to be encoded is equal to 0 according to the value to be encoded. If the value to be encoded is equal to 0, the encoding is completed; if the value to be encoded is not equal to 0, proceed to step 720;

[0254] Step 720: Encode the second flag indicating whether the value to be encoded is equal to 1. If the value to be encoded is equal to 1, the encoding is completed; if the value to be encoded is not equal to 1, proceed to step 730.

[0255] Step 730: Encode the identifier representing the parity of the value to be encoded and the quotient of the value to be encoded minus 2 and divided by 2; wherein, the identifier is 1 to indicate that the value to be encoded is an odd number, and is 0 to indicate that the value to be encoded is an even number.

[0256] When encoding the identifier representing the parity of the value to be encoded and the quotient of the value to be encoded minus 2 and then divided by 2, the identifier may be encoded first, or the quotient may be encoded first.

[0257] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2, so the zero run value encoding method also encodes the remainder of the zero run value divided by 2 before, after, or at the same time as encoding the quotient of the zero run value divided by 2.

[0258] The process of decoding the decoded value in this embodiment is as follows Figure 10 As shown, the value to be decoded is a zero run value or a quotient of a zero run value divided by 2, and the process includes:

[0259] Step 810: Decode a first flag indicating whether the value to be decoded is equal to 0. If the value to be decoded is determined to be 0 according to the first flag, decoding is completed. If the value to be decoded is determined not to be 0 according to the first flag, proceed to step 820.

[0260] Step 820: Decode the second flag indicating whether the value to be decoded is equal to 1. If the value to be decoded is determined to be 1 according to the second flag, decoding is completed; if the value to be decoded is determined not to be 1 according to the second flag, proceed to step 830.

[0261] Step 830: Decode the parity indicator of the value to be decoded and the quotient of the value to be decoded minus 2 and divided by 2. Multiply the decoded quotient by 2, add 2, and then add the value of the indicator to obtain the decoded value to be decoded. A 1 in the indicator indicates that the value to be decoded is an odd number, while a 0 in the indicator indicates that the value to be decoded is an even number. In this step, either the indicator or the quotient can be decoded first; this is not limited to this aspect of the present disclosure.

[0262] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2. The zero run value decoding method also decodes the remainder of the zero run value divided by 2 before, after, or at the same time as decoding the quotient of the zero run value divided by 2; and multiplies the decoded quotient by 2 and adds the decoded remainder to obtain the decoded zero run value.

[0263] It is easy to understand that the first flag bit in the above encoding process and decoding process is defined as a flag bit indicating whether the value to be encoded is equal to 1, and the second flag bit is defined as a flag bit indicating whether the value to be encoded is equal to 0. The same effect can be achieved by still following the order of the above process. The specific processing of the encoding flag bit, identifier, and quotient value in each of the above steps can be referred to the previous embodiment and will not be repeated here.

[0264] Table 4 lists the comparison of code words used to encode zero run values ​​of different lengths using the first embodiment (denoted by "A" in the table) and the present embodiment (denoted by "C" in the table):

[0265] Table 3

[0266]

[0267] 0 to 8 in the table represent zero-run values, eq0 represents a flag indicating whether the zero-run value is equal to 0, eq1 represents a flag indicating whether the zero-run value is equal to 1, parity is the value of the flag, and value represents the quotient.

[0268] As can be seen from Table 4, when the zero-run value is 0 or 1, the codewords encoded by this embodiment are the same as those of the first embodiment. When the zero-run value is 2 or 3, this embodiment encodes one more bit than the codeword of the first embodiment. When the zero-run value is greater than 3, the value required to be encoded by the first embodiment is larger than the value required to be encoded by this embodiment. Therefore, when the zero-run value is large, this embodiment can significantly reduce the codeword length required to represent the zero-run value, thereby improving encoding efficiency and reducing storage space and transmission bandwidth.

[0269] This embodiment introduces a codeword that marks parity, which can divide the values ​​to be encoded into two categories, and can save encoding overhead when the values ​​to be encoded are large. Experimental results show that the zero-run value encoding and decoding method of this embodiment can bring significant performance gains.

[0270] An embodiment of the present disclosure provides a parity-based zero-run value encoding method and decoding method. A parity flag is used during encoding to improve encoding efficiency. This embodiment uses three flag bits.

[0271] The process of encoding the coded value in this embodiment is as follows Figure 11 As shown, the value to be encoded is a zero run value or a quotient of a zero run value divided by 2:

[0272] Step 910: Encode the first flag bit used to determine whether the value to be encoded is equal to 0 according to the value to be encoded. If the value to be encoded is equal to 0, the encoding is completed; if the value to be encoded is not equal to 0, proceed to step 920;

[0273] Step 920: Encode the second flag bit for determining whether the value to be encoded is equal to 1. If the value to be encoded is equal to 1, the encoding is completed; if the value to be encoded is not equal to 1, proceed to step 930.

[0274] Step 930: Encode the third flag bit for determining whether the value to be encoded is equal to 2. If the value to be encoded is equal to 2, the encoding is completed; if the value to be encoded is not equal to 2, proceed to step 940.

[0275] Step 940: Encode an identifier representing the parity of the value to be encoded and the quotient of the value to be encoded minus 3 and divided by 2; wherein the identifier is 0 if the value to be encoded is an odd number, and is 1 if the value to be encoded is an even number;

[0276] In this embodiment, the first flag bit, the second flag bit, and the third flag bit are used to determine whether the value to be encoded is equal to 0, 1, or 2, respectively. In other embodiments, the first flag bit, the second flag bit, and the third flag bit can also be used to determine whether the value to be encoded is equal to 0, 2, 1, or 1, 0, 2, or 1, 2, 0, or 2, 0, 1, or 2, 1, 0, respectively. In other words, the order of determining whether the value to be encoded is equal to 0, 1, and 2 can be adjusted without affecting the effect achieved. In this step, the identifier can be encoded first, or the quotient can be encoded first.

[0277] In this embodiment, the first flag bit indicates whether the value to be decoded is equal to 0, the second flag bit indicates whether the value to be decoded is equal to 1, and the third flag bit indicates whether the value to be decoded is equal to 2. In one example, "residual_zero_run_length_equal_zero" is used to mark the first flag bit of whether the value to be decoded is equal to 0, and its value is '0' to indicate that the value to be encoded is not equal to 0, and its value is '1' to indicate that the value to be encoded is equal to 0; "residual_zero_run_length_equal_one" is used to mark the second flag bit of whether the value to be encoded is equal to 1, and its value is '0' to indicate that the value to be encoded is not equal to 1, and its value is '1' to indicate that the value to be encoded is equal to 1; "residual_zero_run_length_equal_tWo" is used to mark the third flag bit of whether the value to be encoded is equal to 2, and its value is '0' to indicate that the value to be encoded is not equal to 2, and its value is '1' to indicate that the value to be encoded is equal to 2.

[0278] However, the present disclosure is not limited thereto. In another embodiment, the first flag bit indicates whether the value to be decoded is greater than 0, the second flag bit indicates whether the value to be decoded is greater than 1, and the third flag bit indicates whether the value to be decoded is greater than 2. "residual_zero_run_length_gt_zero" is used to indicate whether the value to be encoded is greater than 0. Its value is '0', indicating that the value to be encoded is not greater than 0, and its value is '1', indicating that the value to be encoded is greater than 0. When this syntax element does not appear, its default value is 0; "residual_zero_run_length_gt_one" is used to indicate whether the value to be encoded is greater than 1. Its value is '0', indicating that the value to be encoded is not greater than 1, and its value is '1', indicating that the value to be encoded is greater than 1. When this syntax element does not appear, its default value is 0; "residual_zero_run_length_gt_two" is used to indicate whether the value to be encoded is greater than 0. Its value is '0', indicating that the value to be encoded is not greater than 2, and its value is '1', indicating that the value to be encoded is greater than 2. When this syntax element does not appear, its default value is 0; when the parity flag "parity" does not appear, its default value is 0. In another embodiment, the first flag bit indicates whether the value to be decoded is less than 1, the second flag bit indicates whether the value to be decoded is less than 2, and the third flag bit indicates whether the value to be decoded is less than 3. Although the meanings of these flag bits are different, they can be combined to determine whether the value to be encoded is equal to 0, 1, or 2.

[0279] In this embodiment, when encoding the quotient, the quotient may be encoded using an N-order Exponential Golomb coding method, where N is a natural number; or, the quotient may be encoded using a unary coding method. In one example of this embodiment, the distribution characteristics of the point cloud attributes are used to adjust the encoding method of the zero-run value. Specifically, before encoding the quotient, the method further includes: determining an Exponential Golomb order; if the determined Exponential Golomb order is greater than a preset order threshold, encoding the quotient using a unary coding method; if the determined Exponential Golomb order is less than or equal to the preset order threshold, encoding the quotient using an N-order Exponential Golomb coding method. That is, in this embodiment, the Exponential Golomb order is used as the basis for selecting the quotient encoding method. The specific encoding method selected is related to the characteristics of the encoded point cloud attributes. In another example, when the determined exponential Golumbus order is greater than the preset order threshold, the N-order exponential Golumbus decoding method can be used to decode the quotient value; when the determined exponential Golumbus order is less than or equal to the preset order threshold, the unary decoding method can be used to decode the quotient value; wherein N is the determined exponential Golumbus order, or N is a preset order, and the preset order is 0, 1, 2, 3, 4, 5, 6 or 7.

[0280] The method for determining the exponential Golomb order in this embodiment can adopt the method of the second embodiment described above. In the process of encoding the quantized residual of the color of a point in a point cloud, the comparison result of the exponential Golomb order corresponding to the color attribute and the preset order threshold can be used to select the quotient encoding method when encoding the zero-run value. In the process of encoding the quantized residual of the reflectivity of a point in a point cloud, the comparison result of the exponential Golomb order corresponding to the reflectivity attribute and the preset order threshold can be used to select the quotient encoding method when encoding the zero-run value. This embodiment determines whether to use a unary encoding method or an exponential Golomb encoding method to encode the quotient value based on the comparison result of the determined exponential Golomb order and the preset order threshold, and can also be used in other embodiments of zero-run value encoding.

[0281] In this embodiment, the method further includes: determining an Exponential Golomb order; if the determined Exponential Golomb order is greater than a preset order threshold, determining the value to be encoded as a zero-run value, i.e., employing the above-described method of directly encoding the zero-run value; and if the determined Exponential Golomb order is less than or equal to the preset order threshold, determining the value to be encoded as the quotient of the zero-run value divided by 2, i.e., employing the above-described method of encoding the zero-run value as a quotient of the zero-run value divided by 2. If the value to be decoded is the quotient of the zero-run value divided by 2, encoding the remainder of the zero-run value divided by 2 before, after, or simultaneously with encoding the quotient of the zero-run value divided by 2. The method of determining whether to directly encode the zero-run value or to encode the zero-run value as a quotient of the zero-run value divided by 2 and the remainder based on a comparison result between the determined Exponential Golomb order and the preset order threshold when encoding the zero-run value in this embodiment can also be applied to other embodiments of encoding zero-run values.

[0282] The process of decoding the decoded value in this embodiment is as follows Figure 12 As shown, the value to be decoded is a zero-run value or a quotient of a zero-run value divided by 2:

[0283] Step 1010: Decode the first flag bit. If the value to be decoded is determined to be 0 according to the first flag bit, decoding is completed. If the value to be decoded is determined not to be 0 according to the first flag bit, proceed to step 1020.

[0284] Step 1020: Decode the second flag bit. If the value to be decoded is determined to be 1 according to the second flag bit, decoding is completed. If the value to be decoded is determined not to be 1 according to the second flag bit, proceed to step 1030.

[0285] Step 1030: Decode the third flag bit. If it is determined according to the third flag bit that the value to be decoded is equal to 2, decoding is completed. If it is determined according to the third flag bit that the value to be decoded is not equal to 2, proceed to step 1040.

[0286] Step 1040: decode the identifier representing the parity of the value to be decoded and the quotient of the value to be decoded minus 3 and divided by 2; multiply the decoded quotient by 2, add 3, and then add the value of the identifier to obtain the decoded value to be decoded; wherein, the identifier is 0, indicating that the value to be decoded is an odd number, and is 1, indicating that the value to be decoded is an even number.

[0287] In step 1040, the identifier may be decoded first, or the quotient value may be decoded first.

[0288] In this embodiment, the first flag bit indicates whether the value to be decoded is equal to 0, the second flag bit indicates whether the value to be decoded is equal to 1, and the third flag bit indicates whether the value to be decoded is equal to 2. However, the present disclosure is not limited to this. In another embodiment, the first flag bit indicates whether the value to be decoded is greater than 0. When the decoded first flag bit indicates that the value to be decoded is not greater than 0, the value to be decoded is determined to be 0 based on the first flag bit; the second flag bit indicates whether the value to be decoded is greater than 1. When the decoded second flag bit indicates that the value to be decoded is not greater than 1, the value to be decoded is determined to be 1 based on the second flag bit; the third flag bit indicates whether the value to be decoded is greater than 2. When the decoded third flag bit indicates that the value to be decoded is not greater than 2, the value to be decoded is determined to be 2 based on the third flag bit. In another embodiment, the first flag indicates whether the value to be decoded is less than 1. When the decoded first flag indicates that the value to be decoded is less than 1, the value to be decoded is determined to be equal to 0 according to the first flag; the second flag indicates whether the value to be decoded is less than 2. When the decoded second flag indicates that the value to be decoded is less than 2, the value to be decoded is determined to be equal to 1 according to the second flag; the third flag indicates whether the value to be decoded is less than 3. When the decoded third flag indicates that the value to be decoded is less than 3, the value to be decoded is determined to be equal to 2 according to the third flag.

[0289] In addition, in this embodiment, the first flag bit, the second flag bit, and the third flag bit are used to determine whether the value to be encoded is equal to 0, 1, or 2, respectively. In other embodiments, the first flag bit, the second flag bit, and the third flag bit can also be used to determine whether the value to be encoded is equal to 0, 2, 1, or 1, 0, 2, or 1, 2, 0, or 2, 0, 1, or 2, 1, 0, respectively. That is, the order of determining whether the value to be decoded is equal to 0, 1, and 2 can be adjusted.

[0290] In this embodiment, the encoding end determines whether to split the zero-run value encoding (i.e., to encode the quotient and remainder separately) based on the Exponential Golomb order, and determines the encoding method of the quotient. The decoding end needs to decode the Exponential Golomb order and determine the corresponding decoding method based on the decoded Exponential Golomb order. In this embodiment, before decoding the quotient, the method further includes: decoding the Exponential Golomb order; in one example, if the decoded Exponential Golomb order is greater than a preset order threshold, decoding the quotient using a unary decoding method; if the decoded Exponential Golomb order is less than or equal to the preset order threshold, decoding the quotient using an N-order Exponential Golomb decoding method. In another example, when the decoded Exponential Golomb order is greater than a preset order threshold, the quotient is decoded using an N-order Exponential Golomb decoding method; when the decoded Exponential Golomb order is less than or equal to the preset order threshold, the quotient is decoded using a unary decoding method, where N is the decoded order, or N is a preset order, and the preset order is 0, 1, 2, 3, 4, 5, 6, or 7. This embodiment determines whether to use unary decoding or Exponential Golomb decoding to decode the quotient based on a comparison result between the decoded Exponential Golomb order and the preset order threshold, and can also be applied to other zero-run value decoding embodiments.

[0291] In this embodiment, before decoding the value to be decoded, the method further includes: decoding an Exponential Golomb order; if the decoded Exponential Golomb order is greater than a preset order threshold, determining that the value to be decoded is a zero-run value; and if the decoded Exponential Golomb order is less than or equal to the preset order threshold, determining that the value to be decoded is the quotient of the zero-run value divided by 2. In one example of this embodiment, if the value to be decoded is the quotient of the zero-run value divided by 2, then before, after, or simultaneously with decoding the quotient of the zero-run value divided by 2, the remainder of the zero-run value divided by 2 needs to be decoded; and the decoded quotient needs to be multiplied by 2 and then added to the decoded remainder to obtain the decoded zero-run value. This embodiment's method of determining whether the value to be decoded is a zero-run value or a quotient of the zero-run value divided by 2 based on a comparison result of the decoded Exponential Golomb order and the preset order threshold can also be applied to other zero-run value decoding embodiments.

[0292] This embodiment introduces a codeword that marks parity, which can divide the value to be encoded into two categories. When the value to be encoded is large, it can save encoding overhead and improve encoding efficiency, thereby bringing performance gains.

[0293] The syntax table of the entire decoding process of this embodiment is described as follows:

[0294]

[0295] If GolombNum ≤ Threshold, then the zero run length value zero_run_length:

[0296] zero_run_length = [(residual_zero_run_length_equal_zero? 0 :

[0297] (residual_zero_run_length_equal_one? l :

[0298] (residual_zero_run_length_equal_two? 2 :

[0299] (3 + parity + (value << 1)))) << 1] + remainder

[0300] If GolormbNum > Threshold, then the zero run length value zero_run_length:

[0301] zero_run_length = residual_zero_run_length_equal_zero? 0 :

[0302] (residual_zero_run_length_equal_one? l :

[0303] (residual_zero_run_length_equal_two? 2 :

[0304] (3 + parity + (value << 1))))

[0305] In the table above, "residual_zero_run_length_equal_zero" represents the first flag bit that indicates whether the value to be decoded is equal to 0. "if(!residual_zero_run_length_equal_zero)" indicates whether the value to be decoded is not equal to 0. If the value to be decoded is not equal to 0, the statement executed is residual_zero_run_length_equal_one, which decodes the second flag bit that indicates whether the value to be decoded is equal to 1. If the value to be decoded is not equal to 0 (i.e., the value to be decoded is 0), the encoding of the value to be decoded ends. "if(!residual_zero_run_length_equal_one)" indicates whether the value to be decoded is not equal to 1. If the value to be decoded is not equal to 1, the statement executed is residual_zero_run_length_equal_two, which decodes the third flag bit that indicates whether the value to be decoded is equal to 2. If the value to be decoded is not equal to 1 (i.e., the value to be decoded is 1), the encoding of the value to be decoded ends. "if(!residual_zero_run_length_equal_two)" indicates whether the value to be decoded is not equal to 2. If the value to be decoded is not equal to 2 (i.e., the value to be decoded is 2), encoding of the value to be decoded ends. If the value to be decoded is not equal to 2, the statements executed are parity and if(GolombNum<=Threshold). Parity represents the decoded parity indicator of the value to be decoded. If(GolombNum<=Threshold) indicates whether the decoded exponential Golomb order is less than or equal to a preset order threshold. If so, the quotient (value) is decoded using the second-order exponential Golomb decoding method (2order-exp-Golomb). If not, the quotient (value) is decoded using the unary code method (unary code). Thereafter, if(GolombNum<=Threshold) is executed to determine whether the decoded exponential Golomb order is less than or equal to the preset order threshold. If so, remainder is executed to decode the remainder. At this point, the decoded zero-run value is obtained based on the decoded value to be decoded and the decoded remainder. If not, the process ends immediately (i.e., the zero-run value is obtained directly).

[0306] The syntax table of another embodiment is described as follows:

[0307]

[0308]

[0309] Among them, residual_zero_run_length_gt_zero, residual_zero_run_length_gt_one, and residual_zero_run_length_gt_two indicate whether the value to be decoded is greater than 0, 1, and 2, respectively. if(!residual_zero_run_length_gt_zero) indicates whether the value to be decoded is greater than 0. For the meaning of other syntax in the syntax table, see the description of the previous syntax table. The default value of the seven syntaxes in bold in this table is 0.

[0310] If GolombNum≤Threshold, the zero run value is zero_run_length:

[0311] zero_run_length=[(residual_zero_run_length_gt_zero+

[0312] residual_zero_run_length_gt_one+

[0313] residual_zero_run_length_gt_two)+

[0314] parity+(value<<1))<<1]+remainder

[0315] If GolombNum>Threshold, then the zero run value

[0316] zero_run_length=residual_zero_run_length_gt_zero+

[0317] residual_zero_run_length_gt_one+

[0318] residual_zero_run_length_gt_two+

[0319] Parity + (value << 1) has been described above using one, two, and three flag bits. These flag bits are used to indicate that the value to be encoded is equal to a set value, such as 0, 1, or 2. Similarly, more flag bits can be used in conjunction with the parity indicator and quotient value to implement encoding to meet the needs of different scenarios.

[0320] Table 4 lists the comparison of code words used to encode zero run values ​​of different lengths using the first embodiment (denoted by "A" in the table) and the present embodiment (denoted by "B" in the table):

[0321] Table 4

[0322]

[0323] 0 to 8 in the table represent zero-run values, eq0 represents a flag indicating whether the zero-run value is equal to 0, eq1 represents a flag indicating whether the zero-run value is equal to 1, parity is the value of the flag, and value represents the quotient.

[0324] As can be seen from Table 4, when the zero-run value is 0, 1, or 2, the codeword bits encoded by this embodiment are the same as those of the first embodiment (encoding value using the unary encoding method); when the zero-run value is 3, this embodiment requires one more bit than the first embodiment; and when the zero-run value is greater than 3, the value encoded by the first embodiment is larger than that required by this embodiment, requiring more bits, and the larger the zero-run value, the greater the difference in values. Therefore, when the zero-run value is large, this embodiment can significantly reduce the codeword length required to represent the zero-run value, thereby improving encoding efficiency and reducing storage space and transmission bandwidth.

[0325] To verify the effectiveness of this embodiment, this embodiment was tested on the point cloud compression reference platform PCRM6.0 of the Audio Video Coding Standard (AVS), involving the following four test conditions: limit-lossy geometry, lossv attributes, i.e., limited lossy geometry and lossy attributes, i.e., lossless geometry and lossy attributes, i.e., lossless geometry and limit-lossy attributes, i.e., lossless geometry and limited lossy attributes, and lossless geometry and lossless attributes, i.e., lossless geometry and lossless attributes. The test sequences used include five categories of general test sequences: 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 Cat1B point cloud contains both color and reflectivity attribute information.

[0326] Tables 5.1 to 5.4 show the experimental results of four test conditions using this embodiment under predictive branching.

[0327] Table 5.1 C1-limit-lossy geometry, lossy attributes

[0328]

[0329] Table 5.2 C2-lossless geometry, lossy attributes

[0330]

[0331] Table 53 C1-lossless geometry, limit-lossy attributes

[0332]

[0333]

[0334] Table 5.4 C1-lossless geometry, lossless attributes

[0335]

[0336] Tables 61 to 6.4 show the experimental results based on four test conditions using this embodiment under the transformation branch.

[0337] Table 6.1 C1-limit-lossy geometry, lossy attributes

[0338]

[0339] Table 6.2 C2-lossless geometry, lossy attributes

[0340]

[0341] Table 6.3 C1-lossless geometry, limit-lossy attributes

[0342]

[0343] Table 6.4 C1-lossless geometry, lossless attributes

[0344]

[0345] The meanings of the parameters in Tables 5.1 to 5.4 and Tables 6.1 to 6.4 are shown in Tables 2.1 to 2.4. Experimental results show that the zero-run value encoding and decoding method of this embodiment can bring significant performance gains.

[0346] An embodiment of the present disclosure provides a parity-based zero-run value encoding method and decoding method, wherein a parity flag is used during encoding to improve encoding efficiency. This embodiment uses a flag bit indicating whether the value to be encoded is greater than 1.

[0347] The process of encoding the value to be encoded in this embodiment is as follows, where the value to be encoded is a zero run value or a quotient of a zero run value divided by 2:

[0348] In the first step, according to the value to be encoded, an identifier indicating the parity of the value to be encoded and a flag indicating whether the value to be encoded is greater than 1 are encoded. If the value to be encoded is not greater than 1, the encoding is completed; if the value to be encoded is greater than 1, the second step is continued;

[0349] In this step, the flag bit or the identifier may be encoded first.

[0350] The second step is to encode the quotient of the value to be encoded minus 2 and then divided by 2; wherein, the identifier is 1 to indicate that the value to be encoded is an odd number, and is 0 to indicate that the value to be encoded is an even number.

[0351] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2, then before, after, or at the same time as encoding the quotient of the zero run value divided by 2, the remainder of the zero run value divided by 2 is also encoded.

[0352] The process of decoding the to-be-decoded value in this embodiment is as follows, where the to-be-decoded value is a zero-run value or a quotient of a zero-run value divided by 2:

[0353] In the first step, a flag indicating the parity of the value to be decoded and a flag indicating whether the value to be decoded is greater than 1 are decoded. If the value to be decoded is determined to be not greater than 1 according to the flag, the value of the flag is used as the decoded value to be decoded, and decoding is completed. If the value to be decoded is determined to be greater than 1 according to the flag, the second step is continued.

[0354] The second step is to decode the quotient of the value to be decoded minus 2 and divided by 2, multiply the decoded quotient by 2, add 2, and then add the value of the identifier to obtain the decoded value to be decoded; wherein, the identifier is 1, indicating that the value to be decoded is an odd number, and is 0, indicating that the value to be decoded is an even number.

[0355] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2. Before, after, or at the same time as decoding the quotient of the zero run value divided by 2, the remainder of the zero run value divided by 2 is also decoded; and the decoded quotient is multiplied by 2 and then added to the decoded remainder to obtain the decoded zero run value.

[0356] This embodiment introduces a codeword that marks parity, which can divide the value to be encoded into two categories. Combined with a flag bit that determines whether the value to be encoded is greater than 1, when the value to be encoded is large, it can save encoding overhead (it can be easily deduced that when the zero run value is 0 to 8, the codeword encoded according to this embodiment can be determined by comparing it with the first embodiment), improve encoding efficiency, and thus bring performance gains.

[0357] An embodiment of the present disclosure provides a parity-based zero-run value encoding method and decoding method, wherein a parity flag is used during encoding to improve encoding efficiency. This embodiment also uses a flag indicating whether the value to be encoded is greater than 1 and a flag indicating whether the value to be encoded is greater than 3.

[0358] The process of encoding the value to be encoded in this embodiment is as follows, where the value to be encoded is a zero run value or a quotient of a zero run value divided by 2:

[0359] In the first step, according to the value to be encoded, an identifier indicating the parity of the value to be encoded and a first flag indicating whether the value to be encoded is greater than 1 are encoded. If the value to be encoded is not greater than 1, the encoding is completed; if the value to be encoded is greater than 1, the second step is continued;

[0360] The second step is to encode a second flag indicating whether the value to be encoded is greater than 3. If the value to be encoded is not greater than 3, the encoding is completed; if the value to be encoded is greater than 3, the third step is continued.

[0361] The third step is to encode the quotient of the value to be encoded minus 4 and then divided by 2; wherein, the identifier is 1 to indicate that the value to be encoded is an odd number, and is 0 to indicate that the value to be encoded is an even number.

[0362] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2, then before, after, or at the same time as encoding the quotient of the zero run value divided by 2, the remainder of the zero run value divided by 2 is also encoded.

[0363] The process of decoding the to-be-decoded value in this embodiment is as follows, where the to-be-decoded value is a zero-run value or a quotient of a zero-run value divided by 2:

[0364] In the first step, a flag indicating the parity of the value to be decoded and a first flag indicating whether the value to be decoded is greater than 1 are decoded. If the value to be decoded is determined to be not greater than 1 according to the first flag, the value of the flag is used as the decoded value to be decoded, and decoding is completed. If the value to be decoded is determined to be greater than 1 according to the first flag, the second step is continued.

[0365] The second step is to decode the second flag indicating whether the value to be decoded is greater than 3. If the second flag determines that the value to be decoded is not greater than 3, the value of the flag is added by 2 as the decoded value to be decoded, and the decoding is completed. If the second flag determines that the value to be decoded is greater than 3, proceed to the third step.

[0366] The third step is to decode the quotient of the value to be decoded minus 4 and divided by 2, multiply the decoded quotient by 2, add 4, and then add the value of the identifier to obtain the decoded value to be decoded; wherein, the identifier is 1, indicating that the value to be decoded is an odd number, and is 0, indicating that the value to be decoded is an even number.

[0367] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2. Before, after, or at the same time as decoding the quotient of the zero run value divided by 2, the remainder of the zero run value divided by 2 is also decoded; and the decoded quotient is multiplied by 2 and then added to the decoded remainder to obtain the decoded zero run value.

[0368] This embodiment introduces a codeword that marks parity, which can divide the value to be encoded into two categories. In combination with a flag bit for judging whether the value to be encoded is greater than 1 and a flag bit for judging whether the encoded value is greater than 3, when the value to be encoded is large, the encoding overhead can be saved (it can be easily deduced that when the zero run value is 0 to 16, the codeword encoded according to this embodiment can be determined by comparing it with the first embodiment), improving the encoding efficiency, thereby bringing performance gains.

[0369] An embodiment of the present disclosure provides a parity-based zero-run value encoding method and decoding method, wherein a parity flag is used during encoding to improve encoding efficiency. This embodiment also uses a flag indicating whether the value to be encoded is greater than 0 and a flag indicating whether the value to be encoded is greater than 2.

[0370] The process of encoding the value to be encoded in this embodiment is as follows, where the value to be encoded is a zero run value or a quotient of a zero run value divided by 2:

[0371] The first step is to encode the first flag indicating whether the value to be encoded is greater than 0 according to the value to be encoded. If the value to be encoded is not greater than 0, the encoding is completed; if the value to be encoded is greater than 0, proceed to the second step;

[0372] In this step, the first flag indicating whether the value to be encoded is greater than 0 can also be called the first flag indicating whether the value to be encoded is equal to 0, and the two are equivalent.

[0373] The second step is to encode the flag indicating the parity of the value to be encoded and the second flag indicating whether the value to be encoded is greater than 2. If the value to be encoded is not greater than 2, the encoding is completed; if the value to be encoded is greater than 2, continue to the third step;

[0374] The third step is to encode the quotient of the value to be encoded minus 3 and divided by 2;

[0375] The identifier is 0, which indicates that the value to be encoded is an odd number; the identifier is 1, which indicates that the value to be encoded is an even number.

[0376] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2, then before, after, or at the same time as encoding the quotient of the zero run value divided by 2, the remainder of the zero run value divided by 2 is also encoded.

[0377] The process of decoding the to-be-decoded value in this embodiment is as follows, where the to-be-decoded value is a zero-run value or a quotient of a zero-run value divided by 2:

[0378] In the first step, a first flag indicating whether the value to be decoded is greater than 0 is decoded. If the value to be decoded is determined to be not greater than 0 according to the first flag, the decoded value to be decoded is 0, and decoding is completed. If the value to be decoded is determined to be greater than 0 according to the first flag, the second step is continued.

[0379] The second step is to decode the flag indicating the parity of the value to be decoded and the second flag indicating whether the value to be decoded is greater than 2. If the second flag determines that the value to be decoded is not greater than 2, the value of the flag is incremented by 1 as the decoded value to be decoded, and decoding is completed. If the second flag determines that the value to be decoded is greater than 2, proceed to the third step.

[0380] The third step is to decode the quotient of the value to be decoded minus 3 and divided by 2; multiply the decoded quotient by 2, add 3, and then add the value of the identifier to obtain the decoded value to be decoded; wherein, the identifier is 0, indicating that the value to be decoded is an odd number, and is 1, indicating that the value to be decoded is an even number.

[0381] In an example of this embodiment, the value to be decoded is the quotient of the zero run value divided by 2. Before, after, or at the same time as decoding the quotient of the zero run value divided by 2, the remainder of the zero run value divided by 2 is also decoded; and the decoded quotient is multiplied by 2 and then added to the decoded remainder to obtain the decoded zero run value.

[0382] This embodiment introduces a codeword that marks parity, which can divide the value to be encoded into two categories. In combination with a flag bit for judging whether the value to be encoded is greater than 0 and a flag bit for judging whether the encoded value is greater than 2, when the value to be encoded is large, the encoding overhead can be saved (for example, it can be easily deduced that when the zero run value is 0 to 16, the codeword obtained by encoding according to this embodiment can be determined by comparing with the first embodiment), thereby improving the encoding efficiency and thus bringing performance gains.

[0383] The above describes embodiments of encoding zero-run values ​​using one flag bit and two flag bits in combination with an identifier and a numerical value. These flag bits indicate whether the value to be encoded is greater than a set value, which can be 0, 1, 2, 3, etc. It is easy to understand that more such flag bits can be set in combination with appropriate identifiers and numerical values ​​to encode zero-run values, and they are not listed here one by one.

[0384] An embodiment of the present disclosure also provides a video encoding method, such as Figure 13 Shown, including:

[0385] Step 1110, obtaining the quantized residual of the attribute information of the point in the video;

[0386] Step 1120 , encode the points in the video point by point, use zero-run values ​​to record the number of consecutive points where the quantization residual of the attribute information is zero, and encode the zero-run values ​​according to the zero-run value encoding method as described in any embodiment of the present disclosure.

[0387] The zero-run value may be encoded when the quantization residual of the attribute information of the current point is not zero and the quantization residual of the attribute of the last point is zero. Please refer to the first embodiment.

[0388] In this embodiment, the video is a point cloud video, and the attribute information of the points in the video includes at least one of the following: the color of the point in the point cloud; the reflectivity of the point in the point cloud. The process for encoding the quantized residuals of the color and reflectivity of the points in the point cloud attribute stream by the encoder can be found in the description of the first embodiment. This embodiment improves the method for encoding zero-run values.

[0389] In one example of this embodiment, before encoding the zero-run values, the method further includes: determining, based on a flag indicating whether a parity-based zero-run encoding method is enabled, whether a parity-based zero-run encoding method is enabled, and then encoding the zero-run values ​​according to the zero-run encoding method described in any embodiment of the present disclosure. The flag in this example is associated with a switch, which is used to enable (also referred to as activating, using, or revealing) or disable (also referred to as deactivating or disabling) the parity-based zero-run encoding method (i.e., using a flag indicating the parity of the value to be encoded) of the present embodiment. The encoder can then select an appropriate zero-run encoding method based on the characteristics of the video being processed. The flag can be set or generated locally on the encoder. The flag can be encoded into the bitstream, such as by writing the flag into the attribute header information of the point cloud attribute bitstream. Alternatively, the flag can be transmitted to the decoder via other means, so that the decoder can select the corresponding zero-run decoding method based on the flag. In this example, the flag can have one or more bits. When multiple zero-run value encoding modes are configured on the encoding side, this flag can also be used to indicate which zero-run value encoding mode is used.

[0390] In this embodiment, an encoding method for adjusting zero-run values ​​is implemented based on the distribution characteristics of point cloud attributes, i.e., zero-run values ​​employ an adaptive entropy encoding scheme. The method further includes: determining an exponential Golomb order corresponding to the attribute information based on the difference between the maximum and minimum values ​​of the attribute information of the points in the point cloud and a quantization parameter of the attribute information; and writing the determined exponential Golomb order into the attribute header of the point cloud attribute code stream. At least one of the exponential Golomb order corresponding to the color and the exponential Golomb order corresponding to the reflectivity may be written into the attribute header of the point cloud attribute code stream. The method for determining the exponential Golomb order corresponding to the attribute information in this embodiment is described above in the second embodiment. When encoding zero-run values, this embodiment determines whether to directly encode the zero-run value or to separately encode the quotient and remainder of the zero-run value divided by 2 based on a comparison result of the determined exponential Golomb order and a preset order threshold. Furthermore, the comparison result of the determined exponential Golomb order and a preset order threshold determines whether to encode the quotient using unary encoding or exponential Golomb encoding when encoding the zero-run value. See you for sure Figure 11 Corresponding embodiments.

[0391] An embodiment of the present disclosure also provides a video decoding method, such as Figure 14 Shown, including:

[0392] Step 1210: Decode zero-run values ​​in the video stream according to the method described in any embodiment of the present disclosure;

[0393] Step 1220: Decode the quantized residual of the attribute information of the point in the video stream according to the decoded zero-run value.

[0394] In this disclosed embodiment, the video stream is a point cloud attribute stream; the point attribute information includes at least one of the following: point color and point reflectivity. The decoding process for decoding the quantized residuals of point color and point reflectivity in the point cloud attribute stream can be found in the description of the first embodiment above. This embodiment improves the method for decoding zero-run values.

[0395] In this embodiment, before decoding zero-run values ​​in a video stream, the method further includes: decoding from the attribute header information of the point cloud attribute stream to obtain a flag indicating whether parity-based zero-run encoding is enabled; if the flag indicates the enablement of parity-based zero-run encoding, then decoding the zero-run values ​​in the video stream according to the parity-based zero-run encoding method of any embodiment of the present disclosure. In other embodiments, the decoder may also locally configure this flag or receive the flag sent from the encoder through other means, and select a corresponding zero-run value decoding method based on the flag to decode the zero-run values.

[0396] In this embodiment, when the encoding end determines the exponential Golomb order corresponding to the attribute based on the maximum and minimum values ​​of the attribute information and the encoding parameters, and determines the corresponding zero-run value encoding method based on the determined exponential Golomb order, when decoding the quantized residual of the color of the point, the exponential Golomb order used when decoding the zero-run value is the exponential Golomb order corresponding to the color attribute obtained by decoding from the attribute header information of the point cloud attribute code stream; and / or, when decoding the quantized residual of the reflectivity of the point, the exponential Golomb order used when decoding the zero-run value is the exponential Golomb order corresponding to the reflectivity attribute obtained by decoding from the attribute header information of the point cloud attribute code stream.

[0397] Although in the present embodiment, the video is a point cloud video, in other embodiments, the video may also be other two-dimensional videos or three-dimensional videos. When encoding and decoding the quantization residual or other quantization residual with a large number of zero values ​​in these types of videos based on zero-run values, it is easy to understand that the zero-run value encoding and decoding method of any embodiment of the present disclosure can be used to improve the encoding efficiency. That is, the scheme of the embodiment of the present disclosure is applicable to similar scenarios in various video coding standards, which include but are not limited to: H.264 / Advanced Video Coding (AVC), H.265 / High Efficiency Video Coding (HEVC), H.266 / Versatile Video Coding (VVC), MPEG (Moving Picture Experts Group), AOM (Alliance for Open Media), AVS (Audio Video coding Standard) and extensions of these standards, or any other customized standards.

[0398] An embodiment of the present disclosure further provides a video code stream, which includes an information unit indicating a zero run value, such as Figure 14 As shown, the information unit includes at least one of the following:

[0399] N flag bits, set to indicate the magnitude relationship between the value to be decoded and the set value, where N is a positive integer;

[0400] A flag, set to indicate the parity of the value to be decoded;

[0401] A numerical value calculated based on the value to be decoded;

[0402] The value to be decoded is the zero-run value, or is a quotient of the zero-run value divided by a first divisor, and the first divisor is a positive integer.

[0403] In this embodiment, the information unit includes: three flag bits, respectively used to determine whether the value to be decoded is equal to 0, 1, or 2; a flag set to indicate the parity of the value to be decoded; and a quotient of 3 subtracted from the value to be decoded and then divided by 2; wherein the value to be decoded is the zero-run value or the quotient of the zero-run value divided by 2. If the value to be decoded is the quotient of the zero-run value divided by 2, the information unit also includes a remainder of the zero-run value divided by 2.

[0404] In an example of this embodiment, the three flag bits include a first flag bit, a second flag bit, and a third flag bit, wherein: the first flag bit indicates whether the value to be decoded is equal to 0, the second flag bit indicates whether the value to be decoded is equal to 1, and the third flag bit indicates whether the value to be decoded is equal to 2; or, the first flag bit indicates whether the value to be decoded is greater than 0, the second flag bit indicates whether the value to be decoded is greater than 1, and the third flag bit indicates whether the value to be decoded is greater than 2; or, the first flag bit indicates whether the value to be decoded is less than 1, the second flag bit indicates whether the value to be decoded is less than 2, and the third flag bit indicates whether the value to be decoded is less than 3.

[0405] In an example of this embodiment, the video code stream is an attribute code stream of a point cloud, and the zero-run value is used to encode at least one of the following information: a quantized residual of the color of a point in the point cloud, and a quantized residual of the reflectivity of a point in the point cloud.

[0406] In an example of this embodiment, the attribute code stream also includes attribute header information, and the attribute header information includes at least one of the following information: the exponential Golomb order of the color attribute of the point in the point cloud; the exponential Golomb order of the reflectivity attribute of the point in the point cloud; and a flag indicating whether the parity-based zero-run encoding method is turned on.

[0407] In an example of this embodiment, the information units are arranged in the following order: N flag bits, the identifier, and a numerical value calculated based on the to-be-valued value; or, N flag bits, a numerical value calculated based on the to-be-valued value, and the identifier; or, the identifier, N flag bits, and a numerical value calculated based on the to-be-valued value; or, some flag bits of the N flag bits, the identifier, and the remaining flag bits of the N flag bits, and a numerical value calculated based on the to-be-valued value;

[0408] The N flag bits indicating the magnitude relationship between the value to be encoded and the set value include any one or more of the following: a flag bit indicating whether the value to be encoded is equal to the set value, a flag bit indicating whether the value to be encoded is greater than the set value, and a flag bit indicating whether the value to be encoded is less than the set value, wherein N=1 or 2 or 3 or 4 or 5, and the set value includes one or more values ​​from 0 to 5;

[0409] The identifier is 1, indicating that the value to be encoded is an odd number, and is 0, indicating that the value to be encoded is an even number; or the identifier is 0, indicating that the value to be encoded is an odd number, and is 1, indicating that the value to be encoded is an even number;

[0410] The numerical value calculated based on the value to be encoded is a numerical value obtained by subtracting M from the value to be encoded and then dividing it by a second divisor, wherein M=0 or 1 or 2 or 3 or 3 or 5 or 6, and the second divisor is 2 or 3 or 4 or 8.

[0411] An embodiment of the present disclosure further provides a zero-run value decoding device, such as Figure 15 As shown, it includes a processor 5 and a memory 6 storing a computer program, wherein when the processor 5 executes the computer program, it can implement the zero-run value decoding method as described in any embodiment of the present disclosure.

[0412] An embodiment of the present disclosure further provides a zero-run value encoding device, see Figure 15 , comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, it can implement the zero-run value encoding method as described in any embodiment of the present disclosure.

[0413] An embodiment of the present disclosure further provides a video decoding device. Figure 15 , comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, it can implement the video decoding method as described in any embodiment of the present disclosure.

[0414] An embodiment of the present disclosure further provides a video encoding device. Figure 15 , comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, it can implement the video encoding method as described in any embodiment of the present disclosure.

[0415] An embodiment of the present disclosure further provides a video encoding and decoding system, which includes the video encoding device as described in any embodiment of the present disclosure and the video decoding device as described in any embodiment of the present disclosure.

[0416] An embodiment of the present disclosure also provides a non-volatile computer-readable storage medium, which stores a computer program, wherein the computer program, when executed by a processor, implements the zero-run value decoding method, zero-run value encoding method, video decoding method or video encoding method as described in any embodiment of the present disclosure.

[0417] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium, or a communication medium that facilitates the transfer of a computer program from one place to another, such as according to a communication protocol. In this manner, a computer-readable medium may generally correspond to a non-transitory tangible computer-readable storage medium or a communication medium such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.

[0418] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection may also be referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient (transient) media, but rather refer to non-transient tangible storage media. As used herein, disk and optical disk include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, or Blu-ray disc, among others, where disks typically reproduce data magnetically, while optical discs use lasers to reproduce data optically. Combinations of the above should also be included within the scope of computer-readable media.

[0419] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor," as used herein, may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Furthermore, the techniques may be fully implemented in one or more circuits or logic elements.

[0420] The technical solutions of the embodiments of the present disclosure can be implemented in a wide variety of devices or equipment, including wireless mobile phones, integrated circuits (ICs), or a group of ICs (e.g., chipsets). Various components, modules, or units are described in the embodiments of the present disclosure to emphasize the functional aspects of the devices configured to perform the described techniques, but they do not necessarily need to be implemented by different hardware units. Instead, as described above, the various units can be combined in a codec hardware unit or provided by a collection of interoperable hardware units (including one or more processors as described above) in combination with appropriate software and / or firmware.

Claims

1. A zero-run value decoding method, comprising: Decoding the first flag bit, and determining that the value to be decoded is equal to 0 according to the first flag bit, decoding is completed, and the value to be decoded is a zero run value or a quotient of the zero run value divided by 2; If it is determined according to the first flag bit that the value to be decoded is not equal to 0, continue decoding the second flag bit, and if it is determined according to the second flag bit that the value to be decoded is equal to 1, decoding is completed; If it is determined according to the second flag bit that the value to be decoded is not equal to 1, continue decoding the third flag bit, and if it is determined according to the third flag bit that the value to be decoded is equal to 2, decoding is completed; If it is determined according to the third flag that the value to be decoded is not equal to 2, continue decoding the flag indicating the parity of the value to be decoded and the quotient of the value to be decoded minus 3 and divided by 2; multiply the decoded quotient by 2, add 3, and then add the value of the flag to obtain the decoded value to be decoded; The identifier is 0, indicating that the value to be decoded is an odd number; the identifier is 1, indicating that the value to be decoded is an even number.

2. The method according to claim 1, wherein: The first flag bit indicates whether the value to be decoded is equal to 0, the second flag bit indicates whether the value to be decoded is equal to 1, and the third flag bit indicates whether the value to be decoded is equal to 2.

3. The method according to claim 1, wherein: The first flag bit indicates whether the value to be decoded is greater than 0, and when the decoded first flag bit indicates that the value to be decoded is not greater than 0, the value to be decoded is determined to be 0 according to the first flag bit; the second flag bit indicates whether the value to be decoded is greater than 1, and when the decoded second flag bit indicates that the value to be decoded is not greater than 1, the value to be decoded is determined to be 1 according to the second flag bit; the third flag bit indicates whether the value to be decoded is greater than 2, and when the decoded third flag bit indicates that the value to be decoded is not greater than 2, the value to be decoded is determined to be 2 according to the third flag bit; or The first flag indicates whether the value to be decoded is less than 1. When the decoded first flag indicates that the value to be decoded is less than 1, the value to be decoded is determined to be 0 according to the first flag; the second flag indicates whether the value to be decoded is less than 2. When the decoded second flag indicates that the value to be decoded is less than 2, the value to be decoded is determined to be 1 according to the second flag; the third flag indicates whether the value to be decoded is less than 3. When the decoded third flag indicates that the value to be decoded is less than 3, the value to be decoded is determined to be 2 according to the third flag.

4. The method according to claim 1, wherein: Decoding the quotient value includes: decoding the quotient value using an N-order exponential Golomb decoding method, where N is a natural number; or decoding the quotient value using a unary decoding method.

5. The method according to claim 4, wherein: Before decoding the quotient, the method further comprises: decoding the exponential Golomb order; If the decoded Exponential Golomb order is greater than a preset order threshold, decoding the quotient using a unary decoding method; if the decoded Exponential Golomb order is less than or equal to the preset order threshold, decoding the quotient using an N-order Exponential Golomb decoding method; or If the decoded exponential Golomb order is greater than a preset order threshold, decoding the quotient using an N-order exponential Golomb decoding method; if the decoded exponential Golomb order is less than or equal to the preset order threshold, decoding the quotient using a unary decoding method; Wherein, N is the decoded order, or N is a preset order, and the preset order is 0, 1, 2, 3, 4, 5, 6 or 7.

6. The method according to claim 1, wherein: In the case where the value to be decoded is the quotient of the zero run value divided by 2, the method further includes: decoding the remainder of the zero run value divided by 2; and multiplying the decoded value to be decoded by 2 and adding the decoded remainder to obtain the decoded zero run value.

7. The method according to claim 6, wherein: Before decoding the value to be decoded, the method further includes: decoding an exponential Golomb order; When the decoded Exponential Golomb order is greater than a preset order threshold, determining that the value to be decoded is a zero run value; When the decoded Exponential Golomb order is less than or equal to a preset order threshold, the value to be decoded is determined to be a quotient of a zero run value divided by 2.

8. A video decoding method, comprising: Decoding zero run values ​​in a video stream according to the method of any one of claims 1 to 7; The quantized residual of the attribute information of the point in the video stream is decoded according to the decoded zero-run value.

9. The method of claim 8, wherein: The video code stream is an attribute code stream of the point cloud; the attribute information of the point includes at least one of the following: the color of the point, and the reflectivity of the point.

10. The method of claim 9, wherein: The zero-run value is decoded according to the method of claim 5 or 7; In the case of decoding the quantized residual of the color of the point, the exponential Golomb order used when decoding the zero-run value is the exponential Golomb order corresponding to the color attribute obtained by decoding the attribute header information of the point cloud attribute code stream; and / or When decoding the quantized residual of the reflectivity of a point, the exponential Golomb order used when decoding the zero-run value is the exponential Golomb order corresponding to the reflectivity attribute obtained by decoding the attribute header information of the point cloud attribute code stream.

11. The method of claim 9, wherein: Before decoding the zero-run value in the video stream, the method further includes: Decoding the attribute header information of the point cloud attribute code stream to obtain a flag indicating whether a parity-based zero-run encoding method is enabled; When the enable flag indicates enabling of a parity-based zero-run value encoding mode, the zero-run values ​​in the video stream are decoded according to the method according to any one of claims 1 to 7.

12. A zero-run value encoding method, comprising: According to the value to be encoded, encoding is used to determine whether the first flag bit of the value to be encoded is equal to 0, and when the value to be encoded is equal to 0, encoding is completed; If the value to be encoded is not equal to 0, continue encoding the second flag bit for determining whether the value to be encoded is equal to 1, and if the value to be encoded is equal to 1, the encoding is completed; If the value to be encoded is not equal to 1, continue encoding the third flag bit for determining whether the value to be encoded is equal to 2, and if the value to be encoded is equal to 2, the encoding is completed; If the value to be encoded is not equal to 2, continue encoding the identifier indicating the parity of the value to be encoded and the quotient of the value to be encoded minus 3 and divided by 2; The value to be encoded is a zero-run value or a quotient of a zero-run value divided by 2; The identifier is 0, which indicates that the value to be encoded is an odd number; the identifier is 1, which indicates that the value to be encoded is an even number.

13. The method according to claim 12, wherein: The first flag bit indicates whether the value to be decoded is equal to 0, the second flag bit indicates whether the value to be decoded is equal to 1, and the third flag bit indicates whether the value to be decoded is equal to 2; or The first flag bit indicates whether the value to be decoded is greater than 0, the second flag bit indicates whether the value to be decoded is greater than 1, and the third flag bit indicates whether the value to be decoded is greater than 2; or The first flag bit indicates whether the value to be decoded is less than 1, the second flag bit indicates whether the value to be decoded is less than 2, and the third flag bit indicates whether the value to be decoded is less than 3.

14. The method according to claim 12, wherein: The encoding of the quotient value includes: encoding the quotient value using an N-order exponential Golomb coding method, where N is a natural number; or encoding the quotient value using a unary coding method.

15. The method according to claim 14, wherein: Prior to encoding the quotient, the method further comprises: determining an exponential Golomb order; If the determined exponential Golomb order is greater than a preset order threshold, encoding the quotient using a unary encoding method; if the determined exponential Golomb order is less than or equal to the preset order threshold, encoding the quotient using an N-order exponential Golomb encoding method; or If the determined exponential Golomb order is greater than a preset order threshold, decoding the quotient using an N-order exponential Golomb decoding method; if the determined exponential Golomb order is less than or equal to the preset order threshold, decoding the quotient using a unary decoding method; Wherein, N is a determined exponential Golomb order, or N is a preset order, and the preset order is 0, 1, 2, 3, 4, 5, 6 or 7.

16. The method according to claim 12, wherein: In a case where the value to be encoded is a quotient of a zero-run value divided by 2, the method further includes: encoding a remainder of the zero-run value divided by 2.

17. The method according to claim 16, wherein: The method further includes: determining an exponential Golomb order; In a case where the determined exponential Golomb order is greater than a preset order threshold, determining that the value to be encoded is a zero-run value; In a case where the determined Exponential Golomb order is less than or equal to a preset order threshold, the value to be encoded is determined to be a quotient of a zero run value divided by 2.

18. A video encoding method, comprising: Encode points in the video point by point, use zero-run values ​​to record the number of consecutive points where the quantization residual of the attribute information is zero, and encode the zero-run values ​​according to any one of the methods described in claims 12 to 17.

19. The method of claim 18, wherein: The video is a point cloud video; the attribute information of the points in the video includes at least one of the following: the color of the points in the point cloud; the reflectivity of the points in the point cloud.

20. The method of claim 19, wherein: The zero-run value is encoded according to the method of claim 15 or 17; the method further comprising: determining an exponential Golomb order corresponding to the attribute information according to a difference between a maximum value and a minimum value of the attribute information of the point in the point cloud and a quantization parameter of the attribute information; Write the determined exponential Golomb order into the attribute header information of the point cloud attribute code stream.

21. The method of claim 18, wherein: Before encoding the zero-run value, the method further includes: According to a flag indicating whether the parity-based zero-run encoding mode is enabled, determining whether the parity-based zero-run value encoding mode is enabled, and then encoding the zero-run value according to the method according to any one of claims 12 to 17; The flag is written into the attribute header information of the point cloud attribute code stream.

22. A video stream, wherein: An information unit representing a zero-run value is included, the information unit comprising: 3 flag bits, used to determine whether the value to be decoded is equal to 0, 1, or 2; A flag, set to indicate the parity of the value to be decoded; The quotient value obtained by subtracting 3 from the value to be decoded and then dividing the result by 2; wherein the value to be decoded is the zero-run value or the quotient obtained by dividing the zero-run value by 2.

23. The video code stream according to claim 22, wherein: The video code stream is an attribute code stream of the point cloud, and the zero-run value is used to encode at least one of the following information: a quantized residual of the color of the point in the point cloud, and a quantized residual of the reflectivity of the point in the point cloud.

24. The video code stream according to claim 23, wherein: The attribute code stream also includes attribute header information, and the attribute header information includes at least one of the following information: The exponential Columbus order of the color attribute of a point in the point cloud; The exponential Columbus order of the reflectivity property of a point in the point cloud; A flag indicating whether to enable the parity-based zero-run encoding method.

25. The video code stream according to claim 22, wherein: The three flag bits include a first flag bit, a second flag bit, and a third flag bit, wherein: The first flag bit indicates whether the value to be decoded is equal to 0, the second flag bit indicates whether the value to be decoded is equal to 1, and the third flag bit indicates whether the value to be decoded is equal to 2; or The first flag bit indicates whether the value to be decoded is greater than 0, the second flag bit indicates whether the value to be decoded is greater than 1, and the third flag bit indicates whether the value to be decoded is greater than 2; or The first flag bit indicates whether the value to be decoded is less than 1, the second flag bit indicates whether the value to be decoded is less than 2, and the third flag bit indicates whether the value to be decoded is less than 3.

26. The video code stream according to claim 22, wherein: In a case where the value to be decoded is a quotient of the zero-run value divided by 2, the information unit further includes a remainder of the zero-run value divided by 2.

27. A zero-run value decoding device, comprising a processor and a memory storing a computer program, wherein: When the processor executes the computer program, it is capable of implementing the zero-run value decoding method according to any one of claims 1 to 7.

28. A zero-run value encoding device, comprising a processor and a memory storing a computer program, wherein: When the processor executes the computer program, it is capable of implementing the zero-run value encoding method according to any one of claims 12 to 17.

29. A video decoding device comprising a processor and a memory storing a computer program, wherein: When the processor executes the computer program, it is capable of implementing the video decoding method according to any one of claims 8 to 11.

30. A video encoding device comprising a processor and a memory storing a computer program, wherein: When the processor executes the computer program, it can implement the video encoding method according to any one of claims 18 to 21.

31. A video encoding and decoding system, wherein: The method comprises the video encoding device according to claim 30 and the video decoding device according to claim 29.

32. A non-transitory computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, it can implement the zero-run value decoding method as described in any one of claims 1 to 7, or implement the video decoding method as described in any one of claims 8 to 11, or implement the zero-run value encoding method as described in any one of claims 12 to 17, or implement the video encoding method as described in any one of claims 18 to 21.

Citation Information

Patent Citations

  • Image processing apparatus and image processing method

    CN103179389A

  • Data encoding method and device, data decoding method and device and storage medium

    CN112352431A