Point cloud coding method, point cloud decoding method, and code stream, coder, decoder and storage medium
By adopting bypass decoding and bypass encoding in the point cloud encoding and decoding process, the problem of low hardware throughput in the existing technology is solved, and the encoding and decoding efficiency of point cloud data is significantly improved.
Patent Information
- Application Number
- PCT/CN2023/081468
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2024-09-19
AI Technical Summary
The existing point cloud encoding method results in low hardware throughput and affects the encoding and decoding efficiency of the point cloud.
Using bypass decoding and bypass encoding methods, when the resources to be decoded or to be encoded at the current point are smaller than the preset resources, bypass decoding and bypass encoding are used respectively to improve hardware throughput.
The hardware throughput of the decoder and encoder is improved, and the encoding and decoding efficiency of point cloud data is improved.
Smart Images

Figure CN2023081468_19092024_PF_FP_ABST
Abstract
Description
Point cloud encoding and decoding methods, code streams, encoders, decoders, and storage media Technical Field
[0001] The embodiments of the present application relate to the field of point cloud encoding and decoding technology, and in particular to a point cloud encoding and decoding method, bit stream, encoder, decoder and storage medium. Background Art
[0002] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Moreover, since point clouds are obtained by directly sampling real objects, they can provide a strong sense of reality while ensuring accuracy. Therefore, point clouds are widely used.
[0003] The surface of an object is collected by an acquisition device to form point cloud data. Point cloud data includes hundreds of thousands or even more points. Point cloud data is usually transmitted between point cloud encoding devices and point cloud decoding devices in the form of point cloud media files. However, such a large number of points poses a challenge to transmission. Therefore, the point cloud encoding device needs to compress the point cloud data before transmission.
[0004] Currently, in the point cloud compression process, it is usually necessary to encode the quantized codewords. However, the existing encoding method will lead to low hardware throughput, thus affecting the encoding / decoding efficiency of the point cloud.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a point cloud encoding and decoding method, code stream, encoder, decoder and storage medium, which can improve the hardware throughput of the encoder / decoder, thereby improving the encoding / decoding efficiency of point cloud data.
[0007] The technical solution of the embodiment of the present application can be implemented as follows:
[0008] The present application provides a point cloud decoding method, which is applied to a decoder. The method includes:
[0009] Determine first syntax element information of attribute information to be decoded at the current point;
[0010] When the first syntax element information indicates that the allocated first context decoding resource is less than the preset second context decoding resource, a bypass decoding method is adopted to decode the attribute information to be decoded at the current point; the second context decoding resource is related to the codeword of the syntax element to be decoded at the current point.
[0011] The present application provides a point cloud encoding method, which is applied to an encoder. The method includes:
[0012] Determine a quantized residual of the attribute information to be encoded at the current point, and a first context coding resource allocated to the current point;
[0013] When the first context coding resource is smaller than a preset second context coding resource, a bypass coding method is used to encode the quantized residual of the current point; the second context coding resource is related to the codeword to be encoded at the current point.
[0014] The embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded, and the information to be encoded includes at least one of the following:
[0015] The first to eleventh syntax element information, the first context encoding / decoding resources allocated to each attribute information to be encoded, and N and K, where N and K are positive integers greater than 1; the sign bit of the quantized residual at the current point; wherein,
[0016] The first syntax element information is used to indicate the allocated first context decoding resource;
[0017] The second syntax element information is used to indicate whether the first quantized residual of the first color component is a first value;
[0018] The third syntax element information is used to indicate whether the second quantized residual of the second color component is the first value;
[0019] The fourth syntax element information is used to indicate whether the encoding / decoding value of the quantized residual of each color component is the first value;
[0020] The fifth syntax element information is used to indicate whether the encoding / decoding value of the quantized residual of each color component is the second value;
[0021] The sixth syntax element information is used to indicate the parity of the encoding / decoding value of the quantized residual of each color component;
[0022] The seventh syntax element information is used to indicate whether the quotient of the encoded / decoded value of the quantized residual of each color component minus the third preset value and then divided by two is the first target value;
[0023] The eighth syntax element information is used to indicate the quotient of the encoding / decoding value of the quantized residual of each color component minus the fourth preset value and divided by two;
[0024] The ninth syntax element information is used to indicate the parity of the encoding / decoding value of the fourth quantized residual of the reflectivity attribute information;
[0025] The tenth syntax element information is used to indicate whether the quotient of the encoded / decoded value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value;
[0026] The eleventh syntax element information is used to indicate a quotient of a coding / decoding value of the fourth quantized residual minus a seventh preset value divided by two.
[0027] An embodiment of the present application provides a decoder, including:
[0028] A first determining part is configured to determine first syntax element information of the attribute information to be decoded at the current point; and
[0029] The decoding part is configured to use a bypass decoding method to decode the attribute information to be decoded at the current point when the first syntax element information indicates that the allocated first context decoding resource is less than the preset second context decoding resource; the second context decoding resource is related to the codeword of the syntax element to be decoded at the current point.
[0030] An embodiment of the present application provides a decoder, comprising: a first memory and a first processor; wherein,
[0031] The first memory is used to store a computer program that can be run on the first processor;
[0032] The first processor is configured to execute a point cloud decoding method on a decoder side when running the computer program.
[0033] An embodiment of the present application provides an encoder, including:
[0034] The second determining part is configured to determine the quantized residual of the attribute information to be encoded at the current point and the first context coding resource allocated to the current point; and
[0035] The encoding part is configured to use a bypass encoding method to encode the quantized residual of the current point when the first context coding resource is less than a preset second context coding resource; the second context coding resource is related to the codeword to be encoded at the current point.
[0036] An embodiment of the present application provides an encoder, comprising: a second memory and a second processor; wherein,
[0037] The second memory is used to store a computer program that can be run on the second processor;
[0038] The second processor is configured to execute a point cloud encoding method on the encoder side when running the computer program.
[0039] An embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a first processor, it implements a point cloud decoding method on the decoder side, or when the computer program is executed by a second processor, it implements a point cloud encoding method on the encoder side.
[0040] In an embodiment of the present application, a point cloud encoding and decoding method is provided. On the decoder side, the decoder determines first syntax element information of attribute information to be decoded at the current point. When the first syntax element information indicates that the allocated first context decoding resource is less than a preset second context decoding resource, the decoder uses a bypass decoding method to decode the attribute information to be decoded at the current point. The second context decoding resource is related to the codeword of the syntax element to be decoded at the current point. On the encoder side, the encoder first determines the quantized residual of the attribute information to be encoded at the current point and the first context coding resource allocated to the current point. Then, when the first context coding resource is less than a preset second context coding resource, the encoder uses a bypass coding method to encode the quantized residual of the current point. The second context coding resource is related to the codeword to be encoded at the current point. On the one hand, by determining the first syntax element information of the attribute information to be decoded at the current point, the decoder uses bypass decoding to decode the attribute information to be decoded at the current point when the allocated first context decoding resource is indicated to be less than the preset second context decoding resource. Bypass decoding has a higher throughput than context decoding. Therefore, when the decoder indicates that the allocated first context decoding resource is less than the preset second context decoding resource, changing the decoding mode to bypass decoding can improve the decoder's hardware throughput, thereby improving the decoder's decoding efficiency. On the other hand, by determining the first context coding resource allocated to the current point, the encoder uses bypass coding to encode the binarized quantized residual at the current point when the first context coding resource is less than the preset second context coding resource. Since bypass coding has a higher throughput than context coding, when the encoder indicates that the allocated first context coding resource is less than the preset second context coding resource, changing the encoding mode to bypass coding can improve the encoder's hardware throughput, thereby improving the encoder's coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings herein are incorporated into and constitute a part of this specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, serve to illustrate the technical solutions of the present application. Obviously, the drawings described below are merely some embodiments of the present application. Those skilled in the art can, without inventive effort, derive other drawings from these drawings.
[0042] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0043] FIG1a is a schematic diagram of an optional overall point cloud image provided in an embodiment of the present application;
[0044] FIG1b is a partially enlarged schematic diagram of an optional point cloud image provided in an embodiment of the present application;
[0045] FIG2a is a schematic diagram of six optional viewing angles of a point cloud image provided in an embodiment of the present application;
[0046] FIG2 b is a schematic diagram of an optional data storage format of a point cloud image provided in an embodiment of the present application;
[0047] FIG3 is a schematic structural diagram of an optional point cloud coding system provided in an embodiment of the present application;
[0048] FIG4 is a schematic diagram of the structure of an optional point cloud encoder provided in an embodiment of the present application;
[0049] FIG5 is a schematic diagram of the structure of an optional point cloud decoder provided in an embodiment of the present application;
[0050] FIG6 is a flowchart diagram 1 of an optional point cloud decoding method provided in an embodiment of the present application;
[0051] FIG7 is a second flow chart of an optional point cloud decoding method provided in an embodiment of the present application;
[0052] FIG8 is a third flow chart of an optional point cloud decoding method provided in an embodiment of the present application;
[0053] FIG9 is a schematic diagram of a flow chart of an optional point cloud encoding method provided in an embodiment of the present application;
[0054] FIG10 is a first structural diagram of an optional decoder provided in an embodiment of the present application;
[0055] FIG11 is a second structural diagram of an optional decoder provided in an embodiment of the present application;
[0056] FIG12 is a first structural diagram of an optional encoder provided in an embodiment of the present application;
[0057] FIG13 is a second structural diagram of an optional encoder provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0059] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used in this application are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] In the following description, reference is made to "some embodiments," which describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first, second, and third" in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first, second, and third" may be interchanged in a specific order or sequential order where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0061] If similar descriptions of "first / second" appear in the application documents, the following explanation is added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0062] To facilitate understanding of the embodiments of the present application, the following briefly introduces the relevant concepts involved in the embodiments of the present application:
[0063] A point cloud is a set of irregularly distributed discrete points in space that represent the spatial structure and surface properties of a two-dimensional object or three-dimensional scene. For example, referring to Figures 1a and 1b, Figure 1a shows an overall schematic diagram of an optional point cloud image provided in an embodiment of the present application, and Figure 1b shows a partially enlarged schematic diagram of an optional point cloud image provided in an embodiment of the present application. It can be seen that the surface of the three-dimensional point cloud image is composed of densely distributed points.
[0064] Point cloud data is a specific form of point cloud data. Points in a point cloud can include both their positional information (also known as geometric information) and their attribute information. Two-dimensional images have information expressed at each pixel, and their distribution is regular, so there's no need to record their positional information. 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 a point cloud image. Similar to two-dimensional images, each point in a point cloud image has corresponding attribute information during acquisition, typically in the form of RGB color values, which reflect the object's color. For point clouds, in addition to color information, reflectance values are also commonly associated with each point, reflecting the object's surface texture. Therefore, point cloud data typically includes geometric information (x, y, z) consisting of three-dimensional positional information, and attribute information consisting of three-dimensional color information (r, g, b) and one-dimensional reflectance information (r). The color information can be in any color space, for example, RGB information. For another example, color information can be brightness and chromaticity (YcbCr, YUV) information. For example, Y represents brightness (Luma), Cb (U) represents blue component information, Cr (V) represents red component information, and U and V represent chromaticity (Chroma) for describing color difference information. For example, according to the point cloud obtained by the laser measurement principle, the points in the point cloud can include the three-dimensional coordinate information of the points and the laser reflection intensity (reflectance) of the points. For another example, according to the point cloud obtained by the photogrammetry principle, the points in the point cloud can include the three-dimensional coordinate information of the points and the color information of the points. For another example, by combining the laser measurement and photogrammetry principles to obtain a point cloud, the points in the point cloud can include the three-dimensional coordinate information of the points, the laser reflection intensity (reflectance) of the points, and the color information of the points.
[0065] For example, Figures 2a and 2b show a point cloud image and its corresponding data storage format, where Figure 2a shows six viewing angles of a point cloud image, and Figure 2b shows the data storage format corresponding to the point cloud image. It can be seen that the data storage format corresponding to the point cloud image consists of a file header information part and a data part, where the header information part includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud. Taking the data storage format shown in Figure 2b as an example, the data format of the point cloud image is the ".ply" format, the data representation type of the point cloud image is ASCII code representation, the total number of points in the point cloud image is 207242, and each point has three-dimensional position information xyz and three-dimensional color information rgb. For example, the three-dimensional position information of one of the points in the point cloud image shown in Figure 2b is (75, 328, 0), and the corresponding three-dimensional color information is (0, 142, 0).
[0066] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Moreover, since point clouds are obtained by directly sampling real objects, they can provide extremely strong realism while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.
[0067] Point clouds are primarily collected through 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. While changes in point cloud data acquisition methods have made it possible to acquire large amounts of point cloud data, the processing of this massive amount of 3D point cloud data is facing bottlenecks due to storage space and transmission bandwidth constraints, as application demands grow.
[0068] Point clouds can be divided into dense point clouds and sparse point clouds according to the acquisition method.
[0069] Point clouds are divided into the following categories according to the time series type of the data: the first category is static point cloud: the object is stationary and the device that acquires the point cloud is also stationary; the second category is dynamic point cloud: the object is moving, but the device that acquires the point cloud is stationary; the second category is dynamically acquired point cloud: the device that acquires the point cloud is moving.
[0070] Point clouds are divided into two categories according to their uses: Category 1: machine perception point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and emergency rescue robots; Category 2: human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive communication, and three-dimensional immersive interaction.
[0071] 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 type) and color information (RGB, uchar, string type). Therefore, the data volume of a 10-second point cloud video is approximately 0.7 million (4 bytes 3 + 1 byte 3) 30 fps 10 seconds = 3.15 GB. For a 1280 x 720 2D video with a YUV sampling format of 4:2:0 and a frame rate of 24 fps, the data volume for 10 seconds is approximately 1280 x 720 12-bit 24 frames 10 seconds = 0.33 GB. A 10-second two-view 3D video has a data volume of approximately 0.33 x 2 = 0.66 GB. Therefore, point cloud video data volume far exceeds that of 2D and 3D videos of the same length. Therefore, point cloud compression has become a key issue in promoting the development of the point cloud industry to better manage data, save server storage space, and reduce transmission traffic and time between servers and clients.
[0072] In an embodiment of the present application, a point cloud encoding / decoding method is provided that can be applied to a point cloud encoding and decoding framework to compress point cloud data. Point cloud compression generally uses a method of separately compressing point cloud geometry information and attribute information. On the encoding side, the point cloud geometry information is first encoded in the geometry encoder, and then the reconstructed geometry information is input as additional information to the attribute encoder to assist in compressing the point cloud attributes. On the decoding side, the point cloud geometry information is first decoded in the geometry decoder, and then the decoded geometry information is input as additional information to the attribute decoder to assist in compressing the point cloud attributes.
[0073] Figure 3 is a schematic structural diagram of an optional point cloud coding system provided in an embodiment of the present application. It should be noted that Figure 3 is only an example, and the point cloud coding and decoding system of the embodiment of the present application includes but is not limited to that shown in Figure 3. As shown in Figure 3, the point cloud coding and decoding system 100 includes an encoding device 110 and a decoding device 120. The encoding device is used to encode (which can be understood as compression) the point cloud data to generate a code stream, and transmit the code stream to the decoding device. The decoding device decodes the code stream generated by the encoding device to obtain decoded point cloud data.
[0074] The encoding device 110 of the embodiment of the present application can be understood as a device with a point cloud encoding function, and the decoding device 120 can be understood as a device with a point cloud decoding function. That is, the embodiment of the present application includes a wider range of devices for the encoding device 110 and the decoding device 120, such as smartphones, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, point cloud game consoles, vehicle-mounted computers, etc.
[0075] In some embodiments, the encoding device 110 may transmit the encoded point cloud data (such as the geometry code stream and the attribute code stream) to the decoding device 120 via the channel 130. The channel 130 may include one or more media and / or devices capable of transmitting the encoded point cloud data from the encoding device 110 to the decoding device 120.
[0076] In one example, the channel 130 includes one or more communication media that enable the encoding device 110 to transmit the encoded point cloud data directly to the decoding device 120 in real time. In this example, the encoding device 110 can modulate the encoded point cloud data according to a communication standard and transmit the modulated point cloud data to the decoding device 120. The communication media includes wireless communication media, such as radio frequency spectrum. Optionally, the communication media can also include wired communication media, such as one or more physical transmission lines.
[0077] In another example, channel 130 includes a storage medium that can store the point cloud data encoded by encoding device 110. The storage medium includes various locally accessible data storage media, such as optical disks, DVDs, and flash memory. In this example, decoding device 120 can retrieve the encoded point cloud data from the storage medium.
[0078] In another example, the channel 130 may include a storage server that can store the point cloud data encoded by the encoding device 110. In this example, the decoding device 120 can download the stored encoded point cloud data from the storage server. Alternatively, the storage server can store the encoded point cloud data and transmit the encoded point cloud data to the decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
[0079] In some embodiments, the encoding device 110 may transmit the encoded point cloud data (e.g., geometry code stream and attribute code stream) to the decoding device 120 via a network. The network may be any number of networks that transmit the encoded point cloud data between the encoding device 110 and the decoding device 120, including, for example, wired and / or wireless communication networks. The communication network may exchange data using circuit switching and / or packet switching channels. Representative networks include telecommunication networks, local area networks, wide area networks, and / or the Internet, and this application does not impose any limitations thereto.
[0080] In some embodiments, the encoding device 110 includes a point cloud encoder 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.
[0081] In some embodiments, the encoding device 110 may further include a point cloud source 111 in addition to the point cloud encoder 112 and the input interface 113 .
[0082] The point cloud source 111 may include at least one of a point cloud acquisition device (e.g., a scanner), a point cloud archive, a point cloud input interface, and a computer graphics system, wherein the point cloud input interface is used to receive point cloud data from a point cloud content provider, and the computer graphics system is used to generate point cloud data.
[0083] The point cloud encoder 112 encodes the point cloud data from the point cloud source 111 to generate a code stream. The point cloud encoder 112 transmits the encoded point cloud data directly to the decoding device 120 via the output interface 113. The encoded point cloud data can also be stored on a storage medium or storage server for subsequent reading by the decoding device 120.
[0084] In some embodiments, the decoding device 120 includes an input interface 121 and a point cloud decoder 122 .
[0085] In some embodiments, the decoding device 120 may further include a display device 123 in addition to the input interface 121 and the point cloud decoder 122 .
[0086] The input interface 121 includes a receiver and / or a modem and can receive the encoded point cloud data via the channel 130 .
[0087] The point cloud decoder 122 is used to decode the encoded point cloud data to obtain decoded point cloud data, and transmit the decoded point cloud data to the display device 123.
[0088] The decoded point cloud data is displayed on the display device 123. The display device 123 may be integrated with the decoding device 120 or external to the decoding device 120. The display device 123 may include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
[0089] In addition, Figure 3 is only an example, and the technical solution of the embodiment of the present application is not limited to Figure 3. For example, the technology of the embodiment of the present application can also be applied to unilateral point cloud encoding or unilateral point cloud decoding.
[0090] The current point cloud encoder can adopt the geometry-based point cloud compression (G-PCC) codec framework or the video-based point cloud compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG), or the AVS PCC codec framework provided by the Audio Video Standard (AVS). The G-PCC codec framework and the AVS PCC codec framework are both aimed at static sparse point clouds, and their encoding frameworks are roughly the same. The G-PCC codec framework can be used to compress the first static point cloud and the second type of dynamically acquired point cloud, and the V-PCC codec framework can be used to compress the second type of dynamic point cloud. The G-PCC codec framework is also called the point cloud codec TMC13, and the V-PCC codec framework is also called the point cloud codec TMC2.
[0091] Point cloud compression generally uses a method that compresses point cloud geometry and attribute information separately. On the encoding side (encoder, i.e., point cloud encoder), the point cloud geometry is first encoded in the geometry encoder, and then the reconstructed geometry is input as additional information into the attribute encoder to assist in the compression of point cloud attributes. On the decoding side (decoder, i.e., point cloud decoder), the point cloud geometry is first decoded in the geometry decoder, and then the decoded geometry is input as additional information into the attribute decoder to assist in the compression of point cloud attributes. The entire codec consists of pre-processing / post-processing, geometry encoding / decoding, and attribute encoding / decoding.
[0092] The following describes the point cloud encoder and point cloud decoder applicable to the embodiments of the present application, taking the encoding and decoding framework shown in Figures 4 and 5 as an example.
[0093] FIG4 is a schematic structural diagram of an optional point cloud encoder 200 provided in an embodiment of the present application.
[0094] From the above, it can be seen that the points in the point cloud can include the geometric information of the points and the attribute information of the points. Therefore, the encoding of the points in the point cloud mainly includes geometric encoding and attribute encoding.
[0095] The geometric encoding process involves preprocessing the points in the point cloud, such as coordinate transformation, quantization, and duplicate point removal. Next, geometric encoding is performed on the preprocessed point cloud, such as constructing an octree. This octree is then used to perform geometric encoding to form a geometric bitstream. Simultaneously, the geometric information of each point in the point cloud is reconstructed based on the geometric information output by the constructed octree, yielding a reconstructed value for each point.
[0096] The attribute encoding process includes: given the reconstruction information of the geometric information of the input point cloud and the original value of the attribute information, selecting a prediction mode for point cloud prediction, quantizing the predicted results, and performing arithmetic coding to form an attribute code stream.
[0097] As shown in Figure 4, geometric encoding can be implemented through the following units:
[0098] A coordinate conversion unit 211 , a quantization unit 212 , an octree analysis unit 213 , a geometry reconstruction unit 214 , and a first encoding unit 215 .
[0099] Coordinate conversion unit 211 is used for coordinate translation, that is, for converting the world coordinates of a point in the point cloud into relative coordinates. Specifically, coordinate conversion unit 211 normalizes the geometric origin to the minimum position in the point cloud space through coordinate translation and converts the geometric information from floating-point numbers to integers through coordinate quantization to facilitate subsequent regularization processing. For example, the geometric coordinates of a point are respectively subtracted from the minimum value of the x, y, and z coordinate axes, which is equivalent to a DC removal operation, to convert the coordinates of a point in the point cloud from world coordinates to relative coordinates.
[0100] Quantization unit 212 is used for coordinate quantization, also known as regularization, which reduces the number of coordinates through quantization. After quantization, previously different points may be assigned the same coordinates. Based on this, duplicate points can be removed through deduplication. For example, multiple clouds with the same quantization bit and different attribute information can be merged into a single cloud through attribute conversion. In some embodiments of the present application, quantization unit 212 is an optional unit module.
[0101] The octree analysis unit 213 is used to construct an octree, that is, to encode the geometric information of the quantized points using an octree encoding method. For example, the octree structure is used to perform a reverse partitioning of the point cloud space, each time dividing the current sub-block into eight sub-blocks of equal size. This allows a one-to-one correspondence between the point position and the octree position. The occupancy codeword of each sub-block is determined. If 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 at the last level of the recursive partitioning for geometric encoding.
[0102] The geometric reconstruction unit 214 may be used to perform position reconstruction based on the position information output by the octree analysis unit 213 to obtain a reconstructed value of the position information of each point in the point cloud data.
[0103] The first coding unit 215 may be configured to perform arithmetic coding on the position information output by the octree analysis unit 213 using entropy coding. That is, the position information output by the octree analysis unit 213 may be arithmetic coded to generate a geometry bitstream. The geometry bitstream may also be referred to as a geometry bitstream.
[0104] It should be noted that the geometric information expressed by the octree structure is input into the geometric entropy encoder to form a geometric code stream, and is geometrically reconstructed in the encoder. The reconstructed geometric information is input into the attribute encoder as additional information.
[0105] As shown in Figure 4, attribute encoding can be achieved through the following units:
[0106] A color space transform (Transform colors) unit 221 , an attribute conversion (Transfer attributes) unit 222 , an attribute prediction unit 223 , a quantization coefficient (Quantize coefficients) unit 224 and a second encoding unit 225 .
[0107] It should be noted that the point cloud encoder 200 may include more, fewer, or different functional components than those shown in FIG. 4 .
[0108] The color space conversion unit 221 can be used to convert the RGB color space of the point in the point cloud into YCbCr format or other formats. If the attribute information being processed is color information, the original color also needs to be converted into a YUV color space that is more consistent with the visual characteristics of the human eye.
[0109] Attribute conversion unit 222 is used for attribute recoloring, that is, for converting the attribute information of points in the point cloud to minimize attribute distortion. Because geometric information changes after geometry encoding, it is necessary to reassign attribute values to each geometrically encoded point. For example, attribute conversion unit 222 can be used to obtain the original value of the attribute information of the point (attribute original value). For example, the attribute information can be the color information of the point.
[0110] After the original value of the attribute information of the point is converted by the attribute conversion unit 222 (attribute recoloring), the point in the point cloud is predicted.
[0111] The attribute prediction unit 223 can be used to perform attribute prediction on the attribute information. First, the point cloud needs to be reordered using the Morton code (of course, other ordering methods can also be used). Therefore, the traversal order of the attribute coding is the Morton order (or the order corresponding to other ordering methods). In this embodiment, the attribute prediction method can be a single-point prediction based on the 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 the prediction reference point of the current point to be encoded, and then the attribute reconstruction value of the prediction reference point is used as the attribute prediction value.
[0112] The quantization coefficient unit 224 may be used to quantize the residual value of the attribute information of the point. For example, if the quantization coefficient unit 224 is connected to the attribute prediction unit 212, the quantization coefficient unit 224 may be used to quantize the residual value of the attribute information of the point output by the attribute prediction unit 223.
[0113] For example, the residual value of the attribute information of the point output by the attribute prediction unit 223 is quantized using a quantization step size to improve system performance.
[0114] The second encoding unit 225 may be configured to perform entropy encoding on the residual value of the attribute information of the point to obtain an attribute code stream, wherein the attribute code stream may be bit stream information.
[0115] According to the above description, in the geometric encoding part of the encoder, the original geometric information is first preprocessed, the geometric origin is normalized to the minimum position in the point cloud space through coordinate translation, and the geometric information is converted from floating point numbers to integers through coordinate quantization to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and the point cloud space is recursively divided and encoded using an octree structure; the geometric information expressed by the octree structure is input into the geometric entropy encoder to form a geometric code stream, and on the other hand, geometric reconstruction is performed in the encoder, and the reconstructed geometric information is input into the attribute encoder as additional information. In the attribute coding part, the original attribute information is first preprocessed. Since the geometric information changes after geometric coding, it is necessary to reallocate the attribute value for each point after geometric coding. This process is called attribute recoloring. In addition, if the processed attribute information is color information, the original color needs to be transformed into a YUV color space that is more in line with the visual characteristics of the human eye. Then, the attribute information after preprocessing is attribute encoded. Attribute encoding first requires reordering the point cloud. The reordering method is Morton code, so the traversal order of attribute encoding is Morton order. The attribute prediction method in PCRM 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. The point found is the prediction reference point of the current point to be encoded. Then the attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual is the difference between the attribute value of the current point to be encoded and the attribute prediction value. Finally, the residual is quantized and the quantized residual is input into the attribute entropy encoder to form an attribute code stream.
[0116] FIG5 is a schematic structural diagram of an optional point cloud decoder 300 provided in an embodiment of the present application.
[0117] As shown in Figure 5, the decoder 300 can obtain the point cloud code stream from the encoding device and obtain the geometric information and attribute information of the points in the point cloud by parsing the code. The decoding of the point cloud includes geometric decoding and attribute decoding.
[0118] The process of geometric decoding includes: performing arithmetic decoding on the geometric code stream; constructing an octree and then merging it to reconstruct the geometric information of the point to obtain the reconstructed geometric information of the point; performing coordinate transformation on the reconstructed geometric information of the point to obtain the geometric information of the point.
[0119] The attribute decoding process includes: obtaining the residual value of the attribute information of the point in the point cloud by parsing the attribute code stream; obtaining the residual value of the attribute information of the point after dequantization by dequantizing the residual value of the attribute information of the point; reconstructing the information based on the position information of the point obtained in the geometric decoding process, and performing point cloud prediction to obtain the predicted value, and adding the predicted value to the residual value to obtain the reconstructed value of the attribute information of the point; performing color space deconversion on the reconstructed value of the attribute information of the point to obtain the decoded point cloud.
[0120] As shown in Figure 5, geometric decoding can be achieved through the following units:
[0121] a first decoding unit 311 , an octree synthesizing unit 312 , a geometry reconstruction unit 313 , and an inverse transform coordinates unit 314 .
[0122] As shown in Figure 5, attribute decoding can be achieved through the following units:
[0123] The second decoding unit 321 , the inverse quantization coefficient unit 322 , the attribute prediction unit 323 and the inverse color space transformation unit 324 .
[0124] The decoder also adopts the method of decoding geometry and attributes separately. In the geometry decoding part, the geometry code stream is first entropy decoded by the first decoding unit 311 to obtain the geometric information of each point cloud node, and then the octree structure is constructed by the octree analysis unit 312 in the same way as the geometry encoding. The decoded geometry is combined to reconstruct the coordinate transformed geometry information expressed by the octree structure. On the one hand, the geometry information is dequantized and detranslated respectively by the geometry reconstruction unit 313 and the coordinate inverse conversion unit 314 to obtain the decoded geometry information. On the other hand, the geometry information expressed by the octree structure is input into the attribute decoder as additional information.
[0125] In the attribute decoding part, the Morton order is constructed in the same way as the encoding end, and the attribute code stream is entropy decoded by the second decoding unit 321 to obtain the quantized residual information; then the quantized residual information is dequantized by the dequantization coefficient unit 322 to obtain the point cloud residual; in the same way as the attribute encoding, the attribute prediction value of the current point to be decoded is obtained by the attribute prediction unit 323, and then the attribute prediction value is added to the residual value to restore the YUV attribute value of the current point to be decoded; finally, the color space inverse transformation is performed by the color space inverse conversion unit 324 to obtain the decoded attribute information.
[0126] It should be noted that decompression is the inverse process of compression. Similarly, the functions of each unit in the decoder 300 can refer to the functions of the corresponding units in the encoder 200. In addition, the point cloud decoder 300 may include more, fewer, or different functional components than those in Figure 5.
[0127] The above is the basic process of the point cloud codec under the codec framework. With the development of technology, some modules or steps of the framework or process may be optimized. This application is applicable to the basic process of the point cloud codec based on the G-PCC codec framework, but is not limited to this framework and process.
[0128] Before introducing the specific point cloud encoding / decoding method proposed in the embodiment of the present application, the encoding / decoding method of the color component and attribute component in the point cloud is first introduced.
[0129] Taking the algorithm used for attribute compression as an example, the technical routes for attribute encoding / decoding can be divided into the following two types:
[0130] Technical Route 1: Prediction branch, that is, attribute compression adopts a prediction-based method;
[0131] Technical route 2: Transformation branch, that is, attribute compression adopts a transformation-based method, which includes two transformation algorithms, one is wavelet transform and the other is k-ary discrete cosine transform (DCT).
[0132] In related technologies, the AVS PCC platform is usually used to encode / decode attribute residuals. The specific implementation steps are as follows:
[0133] The encoder / decoder sequentially encodes / decodes the quantized residuals of the attributes of each point in the point cloud using the same preset order. The preset order can be the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the point attributes can be color, reflectivity, etc., which are not limited in this application.
[0134] It should be noted that, in the embodiment of the present application, the color attribute of a point can be in any format that represents color components, such as RGB format, YUV format, YUV format, UVY format, etc. In addition, the present application does not impose any restrictions on the order of the various color components.
[0135] When the color attribute of the point cloud is at the encoding end, the encoding end encodes the quantized residual of the color component of the encoding point, including the following steps:
[0136] When the quantization residuals of the three color components of the point to be coded are not all zero:
[0137] a) Using the "color_first_comp_zero" syntax element to indicate whether the quantization of the first color component of the point to be encoded is 0, the "color_first_comp_zero" flag is encoded. If the quantization residual of the first color component of the point to be encoded is 0, the "color_first_comp_zero" flag is encoded to 1, and step b) is executed; if the quantization of the first color component of the point to be encoded is not 0, the "color_first_comp_zero" flag is encoded to 0, and step e) is executed;
[0138] b) using the "color_second_comp_zero" syntax element to indicate whether the quantization residuals of the first color component and the second color component of the point to be encoded are both 0, and encoding the "color_second_comp_zero" flag. If the quantization residuals of the first color component and the second color component of the point to be encoded are both 0, then encoding the "color_second_comp_zero" flag as 1, and executing step c); if the quantization residuals of the first color component and the second color component of the point to be encoded are both not 0, then encoding the "color_second_comp_zero" flag as 0, and executing step d);
[0139] c) Encode the quantized residual of the third color component of the point to be encoded, and the encoding ends;
[0140] d) respectively encode the quantized residuals of the second color component and the third color component of the point to be encoded, and the encoding ends;
[0141] e) Encode the quantized residuals of the first color component, the second color component, and the third color component of the point to be encoded respectively, and the encoding ends.
[0142] The encoding process of the color component to be encoded (value to be encoded) of each point to be encoded includes the following steps:
[0143] a) Use the "color_level_equal_zero" syntax element to indicate whether the value to be encoded is equal to 0, and encode the "color_level_equal_zero" flag. If the value to be encoded is 0, the "color_level_equal_zero" flag is coded to 1, and the encoding of the value to be encoded is completed; if the value to be encoded is not 0, the "color_level_equal_zero" flag is 0, and step b) is executed;
[0144] b) Use the "color_level_equal_one" syntax element to indicate whether the value to be encoded is equal to 1, and encode the "color_level_equal_one" flag. If the value to be encoded is 1, the "color_level_equal_one" flag is 1, and the encoding of the value to be encoded is complete; if the value to be encoded is not 1, the "color_level_equal_one" flag is 0, and step b) is executed;
[0145] c) Using the "color_level_parity" syntax element to mark the parity of the value to be encoded, that is, the "color_level_parity" syntax element represents the remainder of the value to be encoded divided by 2, and using the "color_level_minus2_div2_eq0" syntax element to mark whether the quotient of the value to be encoded minus 1 and then divided by 2 is equal to 0, encoding the "color_level_parity" flag and the "color_level_minus2_div2_eq0" flag. If the quotient of the value to be encoded minus 1 and then divided by 2 is equal to 0, then the "color_level_minus2_div2_eq0" flag is coded to 1, and the encoding of the value to be encoded is completed; if the quotient of the value to be encoded minus 1 and then divided by 2 is not equal to 0, then the "color_level_minus2_div2_eq0" flag is coded to 0, and step d) is executed;
[0146] d) Use the "color_level_minus4_div2" syntax element to mark the quotient of the value to be encoded minus 4 and divided by 2, encode the value of "color_level_minus4_div2", and the encoding of the value to be encoded is completed.
[0147] It should be noted that the value to be encoded here is the absolute value of the color quantization residual or the value obtained by subtracting 1 from the absolute value of the color quantization residual.
[0148] Exemplarily, when it is determined that the quantization residual of the first color component of the point to be encoded is not 0, when encoding the quantization residual of the first color component, the absolute value of the quantization residual of the first color component can be subtracted by 1 first, and then the quantization residual of the first color component after subtraction by 1 can be encoded; similarly, when it is determined that the quantization residual of the second color component of the point to be encoded is not 0, when encoding the quantization residual of the second color component, the absolute value of the quantization residual of the second color component can be subtracted by 1 first, and then the quantization residual of the second color component after subtraction by 1 can be encoded; when it is determined that the quantization residual of the first color component and the second color component of the point to be encoded is 0, indicating that the quantization residual of the third color component of the point to be encoded is not 0, then when encoding the quantization residual of the third color component, the absolute value of the quantization residual of the third color component can be subtracted by 1 first, and then the quantization residual of the third color component after subtraction by 1 can be encoded.
[0149] When the color attribute of the point cloud is at the decoding end, the decoding end encodes the quantized residual of the color component of the encoding point, including the following steps:
[0150] a) decoding the "color_first_comp_zero" flag; if the "color_first_comp_zero" flag is 1, it indicates that the quantization residual of the first color component of the point to be encoded is 0, and step b) is executed; if the "color_first_comp_zero" flag is 0, it indicates that the quantization residual of the first color component of the point to be encoded is not 0, and step d) is executed;
[0151] b) decoding the "color_second_comp_zero" flag; if the "color_second_comp_zero" flag is 1, it indicates that the quantization residual of the second color component of the point to be encoded is 0, and the quantization residual of the third color component of the point to be encoded is decoded, and the decoding of the point to be encoded is completed; if the "color_second_comp_zero" flag is 0, it indicates that the quantization residual of the second color component of the point to be encoded is not 0, and step c) is executed;
[0152] c) respectively decoding the quantized residuals of the second color component and the third color component of the point to be encoded, and decoding of the point to be encoded is completed;
[0153] d) respectively decoding the quantized residuals of the first color component, the second color component, and the third color component of the point to be encoded, and decoding of the point to be encoded is completed.
[0154] The decoding process of the quantized residual (to-be-decoded value) of the to-be-decoded color component of each to-be-encoded point includes the following steps:
[0155] a) Decode the "color_level_equal_zero" flag. If the "color_level_equal_zero" flag is 1, the value to be decoded is 0, and the decoding of the value to be decoded is completed; if the "color_level_equal_zero" flag is 0, execute step b);
[0156] b) decoding the "color_level_equal_one" flag. If the "color_level_equal_one" flag is 1, the value to be decoded is 1, and the decoding of the value to be decoded is completed. If the "color_level_equal_one" flag is 1, executing step c);
[0157] c) Decode the "color_level_parity" flag and the "color_level_minus2_div2_eq0" flag. If the "color_level_minus2_div2_eq0" flag is 1, it means that the quotient of the value to be encoded minus 1 and then divided by 2 is equal to 0, that is, parity = 0, then the value to be decoded is (2+parity), and the decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq0" flag is 0, it means that the quotient of the value to be encoded minus 1 and then divided by 2 is not equal to 0, then execute step d).
[0158] For example, assuming that the "color_level_parity" flag of the value to be decoded is 0 and the "color_level_minus2_div2_eq0" flag of the value to be decoded is 0, the value of the value to be decoded is (2+0)=2; assuming that the "color_level_parity" flag of the value to be decoded is 1 and the "color_level_minus2_div2_eq0" flag of the value to be decoded is 0, the value of the value to be decoded is (2+1)=3.
[0159] d) Decode the "color_level_minus4_div2" flag. The value to be decoded is (4+parity+(color_level_minus4_div2<<1)). The decoding of the value to be decoded is completed. The operator "<<" indicates a left shift of color_level_minus2_div2_eq0, that is, the value of color_level_minus2_div2_eq0 is multiplied by 2.
[0160] For example, assuming that the “color_level_parity” flag of the value to be decoded is 1 and the “color_level_minus4_div2” flag of the value to be decoded is 0, the value to be decoded is (4+1+0)=5; assuming that the “color_level_parity” flag of the value to be decoded is 0 and the “color_level_minus4_div2” flag of the value to be decoded is 1, the value to be decoded is (4+0+1×2)=6; assuming that the “color_level_parity” flag of the value to be decoded is 1 and the “color_level_minus4_div2” flag of the value to be decoded is 1, the value to be decoded is (4+1+1×2)=7.
[0161] When the reflectivity attribute of the point cloud is at the encoding end, the encoding end encodes the quantized residual of the reflectivity of the encoding point, including the following steps:
[0162] When the quantization residual of the reflectivity of the point to be coded is not all zero:
[0163] a) Use the "abs_level_minus1_parity" syntax element to mark the parity of the value to be encoded (the absolute value of the quantized residual of the reflectivity) minus 1, that is, the "abs_level_minus1_parity" flag is the remainder after the value to be encoded is subtracted by 1 and then divided by 2, and use the "abs_level_minus1_div2_eq0" syntax element to mark whether the quotient of the value to be encoded is subtracted by 1 and then divided by 2 is equal to 0, and encode the "abs_level_minus1_parity" flag and the "abs_level_minus1_div2_eq0" flag. If the quotient of the value to be encoded is subtracted by 1 and then divided by 2 is equal to 0, then encode the "abs_level_minus1_div2_eq0" flag to 1, and the encoding of the value to be encoded is completed; if the quotient of the value to be encoded is subtracted by 1 and then divided by 2 is not equal to 0, then execute step b);
[0164] b) Use the "abs_level_minus1_div2_eq1" syntax element to indicate whether the quotient of the value to be encoded after subtracting 1 and then dividing by 2 is equal to 1, and encode the "abs_level_minus1_div2_eq1" flag. If the quotient of the value to be encoded after subtracting 1 and then dividing by 2 is equal to 1, then encode the "abs_level_minus1_div2_eq1" flag to 1, and the encoding of the value to be encoded is completed; if the quotient of the value to be encoded after subtracting 1 and then dividing by 2 is not equal to 1, then encode the "abs_level_minus1_div2_eq1" flag to 0, and execute step c);
[0165] c) Use the "abs_level_minu5_div2" syntax element to mark the quotient of the value to be encoded minus 5 and divided by 2, encode the value of "abs_level_minu5_div2", and the encoding of the value to be encoded is completed.
[0166] When the reflectivity attribute of the point cloud is at the decoding end, the decoding end decodes the quantized residual (to-be-decoded value) of the reflectivity of the coded point, including the following steps:
[0167] a) decoding the "abs_level_minus1_parity" flag and the "abs_level_minus1_div2_eq0" flag of the value to be decoded. If the decoded value of the "abs_level_minus1_div2_eq0" flag is 1, the value to be decoded is (1+parity), and the decoding of the value to be encoded is completed; if the decoded value of the "abs_level_minus1_div2_eq0" flag is not 1, executing step b);
[0168] For example, assuming that the "abs_level_minus1_parity" flag of the value to be decoded is 0 and the "abs_level_minus1_div2_eq0" flag is 1, the value to be decoded is (1+0)=1; assuming that the "abs_level_minus1_parity" flag of the value to be decoded is 1 and the "abs_level_minus1_div2_eq0" flag is 1, the value to be decoded is (1+1)=2;
[0169] b) decoding the "abs_level_minus1_div2_eq1" flag of the value to be decoded. If the decoded value of the "abs_level_minus1_div2_eq1" flag is 1, the value to be decoded is (3+parity); if the decoded value of the "abs_level_minus1_div2_eq1" flag is not 1, executing step c);
[0170] For example, assuming that the "abs_level_minus1_parity" flag of the to-be-decoded value is 0 and the "abs_level_minus1_div2_eq1" flag is 0, the to-be-decoded value is (3+0)=3; assuming that the "abs_level_minus1_parity" flag of the to-be-decoded value is 1 and the "abs_level_minus1_div2_eq1" flag is 0, the to-be-decoded value is (3+1)=4;
[0171] c) Decode the "abs_level_minu5_div2" flag of the value to be decoded. The value to be decoded is (5+parity+(abs_level_minu5_div2<<1)), and the decoding of the value to be encoded is completed.
[0172] For example, assuming that the “abs_level_minus1_parity” flag of the value to be decoded is 0 and the decoding value of “abs_level_minu5_div2” is 0, the value to be decoded is (5+0+0)=5; assuming that the “abs_level_minus1_parity” flag of the value to be decoded is 1 and the decoding value of “abs_level_minu5_div2” is 0, the value to be decoded is (5+1+0)=6; assuming that the “abs_level_minus1_parity” flag of the value to be decoded is 0 and the decoding value of “abs_level_minu5_div2” is 1, the value to be decoded is (5+0+1×2)=7, and so on.
[0173] The current Point Cloud Compression Reference Model (PCRM) uses a context-based encoding / decoding approach for all binarized codewords when encoding / decoding non-zero attribute quantization residuals. For example, if the reflectivity attribute of the point to be encoded has a quantization residual of 12, the binarization process for the value to be encoded is:
[0174] 1) The remainder of the value to be encoded (12) minus 1 and then divided by 2 is 1, so the "abs_level_minus1_parity" flag of the value to be encoded is 1;
[0175] 2) The quotient of the value to be encoded (12) minus 1 and then divided by 2 is not 0, so the "abs_level_minus1_div2_eq0" flag of the value to be encoded is 0;
[0176] 3) The quotient of the value to be encoded (12) minus 1 and then divided by 2 is not 1, so the "abs_level_minus1_div2_eq1" flag of the value to be encoded is 0;
[0177] 4) The quotient of the value to be encoded (12) minus 5 and then divided by 2 is 3. 3 is further binarized. Taking the second-order exponential Golomb coding as an example, the result of binarization of 3 is 011.
[0178] 5) Combining steps 1) to 4), for the value to be encoded with a reflectivity quantization residual of 12, the codeword result after binarization of the value to be encoded is 100011.
[0179] Currently, PCRM platforms use context-based coding for all codewords after binarization of the quantized residual. This presents significant challenges for hardware implementation, as hardware can typically process 4-6 bypass-coded bits (bins) per clock cycle, but only one context-coded bit. From a hardware throughput perspective, using context coding for all bits results in low hardware throughput efficiency.
[0180] In an embodiment of the present application, a point cloud encoding method and a point cloud decoding method are proposed, which specifically involve the attribute prediction part, and the specific design of the second encoding unit 225 of Figure 4 and the corresponding part of the second decoding unit 321 of Figure 5 can improve the hardware throughput of the encoder / decoder, thereby improving the encoding / decoding efficiency.
[0181] In the attribute prediction part of point cloud compression technology, for color attributes, at the encoding end, the current node (current point) is mainly predicted with reference to its adjacent nodes to obtain the attribute prediction value. The predicted attribute prediction value is used to calculate the residual information, and the residual information is transmitted to the decoding end; after the decoding end receives and parses the bit stream, the residual information is obtained through inverse transformation and inverse quantization. The decoding end predicts the attribute prediction value using the same process, and superimposes it with the residual information to obtain the attribute reconstruction value of the current node.
[0182] The following is a detailed description of a point cloud decoding method proposed in an embodiment of the present application in conjunction with the attribute prediction part.
[0183] The present application provides a point cloud decoding method, which is applied to a decoder. As shown in FIG6 , the method may include:
[0184] S101: Determine first syntax element information of attribute information to be decoded at a current point.
[0185] In an embodiment of the present application, after receiving the bitstream transmitted by the encoder, the decoder parses the bitstream to obtain the initial first context decoding resource (corresponding to the initial first context coding resource). If the current point is not the first point, the decoder can obtain the first syntax element information of the attribute information to be decoded at the current point by obtaining the latest first context coding resource decoded from the previous point. Alternatively, during encoding, the encoder uses the first context coding resource corresponding to each point, and the decoder directly parses the bitstream to obtain the first syntax element information of the attribute information to be decoded at the current point, which is not limited in this embodiment of the present application.
[0186] In the embodiment of the present application, the current point is at least one point in the point cloud currently to be decoded, and may also be a combination of multiple points, which is not limited in the present application.
[0187] In this embodiment of the present application, the attribute information to be decoded can be the color attribute information and reflectivity attribute information of the current point. The color attribute information represents the color, brightness, color difference, and other information of the current point. The reflectivity attribute information represents the reflection intensity of the point cloud and can reflect the surface properties of the point cloud.
[0188] It should be noted that the color attribute information can be information in any color space. For example, the color attribute information can be RGB information. For another example, the color attribute information can be luminance and chrominance (YCbCr, YUV) information. For example, Y represents brightness (Luma), Cb (U) represents blue component information, Cr (V) represents red component information, U and V represent chrominance (Chroma) for describing color difference information, or other color component representations, which are not limited in the embodiments of the present application.
[0189] In an embodiment of the present application, a color component may include at least one of the following: a first color component, a second color component, and a third color component. For example, the first color component may be a luminance color component, and the second and third color components may be chrominance color components. For example, the second color component may be a blue chrominance color component, and the third color component may be a red chrominance color component; alternatively, the second color component may be a red chrominance color component, and the third color component may be a blue chrominance color component. This application does not impose any limitation on this.
[0190] It should be noted that in the embodiments of the present application, the first color component is the first, the second color component is the second, and the third color component is the third. However, the order of the color components is not limited. Therefore, for YUV, the first color component can be Y, the second color component can be U, and the third color component can be V. For UVY, the first color component can be U, the second color component can be V, and the third color component can be Y. For UYV, the first color component can be U, the second color component can be Y, and the third color component can be V, and so on. This embodiment of the present application does not limit this.
[0191] In an embodiment of the present application, the first syntax element information is used to indicate the budget of the allocatable first context decoding resource. For example, the first syntax element information may be 224, which is not limited in the embodiment of the present application.
[0192] In an embodiment of the present application, the first syntax element information is determined by parsing the code stream sent by the encoder to the decoder, or by obtaining the decoding resources after decoding of the previous point. This embodiment of the present application does not impose any restrictions. The initial first context decoding resources can be determined by decoder allocation, and this embodiment of the present application does not impose any restrictions on this.
[0193] It should be noted that, each time the decoder decodes a bit or a codeword, the first context decoding resource will be reduced accordingly, and the remaining decoding resources will continue to be used in subsequent decoding processes.
[0194] In the embodiment of the present application, there may be multiple pieces of attribute information to be decoded, and there may be multiple pieces of first syntax element information, and the first syntax element information corresponds one-to-one to the attribute information to be decoded. That is, each piece of attribute information to be decoded corresponds to one piece of first syntax element information.
[0195] Exemplarily, after receiving the code stream transmitted by the encoder, the decoder parses the code stream to obtain the first syntax element information corresponding to the color attribute information and the first syntax element information corresponding to the reflectivity attribute information.
[0196] In the embodiment of the present application, there may be multiple pieces of attribute information to be decoded, and there may be one first syntax element information. That is, multiple pieces of attribute information to be decoded share one first syntax element information.
[0197] Exemplarily, after receiving the code stream transmitted by the encoder, the decoder parses the code stream to obtain first syntax element information corresponding to both the color attribute information and the reflectance attribute information.
[0198] In an embodiment of the present application, the first syntax element information can also be used to indicate the budget level of the allocatable first context decoding resources. The decoder determines the budget of the allocatable first context decoding resources based on the budget level of the allocatable first context decoding resources indicated by the first syntax element information and a preset budget base.
[0199] For example, the first syntax element information indicates that the budget level of the allocable first context decoding resource is 24, then the decoder determines that the budget of the allocable first context decoding resource is 2 according to the budget base (such as 2) of the allocable first context decoding resource indicated by the first syntax element and the budget level (such as 24). 24 .
[0200] It can be understood that, in the case where the first syntax element information indicates the budget level of the first context decoding resource that can be allocated, the decoder can determine the budget of the first context decoding resource that can be allocated (for example, 2) according to the preset budget base (for example, 2) and the budget level (for example, 24) indicated by the first syntax element information. 24 ). In this way, compared with the budget of the first context decoding resource that can be allocated by the decoder directly decoding (such as 2 24 ), the budget level of the first context decoding resources that can be allocated to the decoder for decoding can improve the decoding efficiency of the decoder.
[0201] Exemplarily, the first syntax element information is represented as remBinsPass1, and remBinsPass1 is used to indicate the budget of the allocable first context decoding resources.
[0202] S102. When the first syntax element information indicates that the allocated first context decoding resource is less than the preset second context decoding resource, a bypass decoding method is used to decode the attribute information to be decoded at the current point; the second context decoding resource is related to the codeword of the syntax element to be decoded at the current point.
[0203] In an embodiment of the present application, when the first syntax element information indicates that the allocated first context decoding resource is smaller than the preset second context decoding resource, all codewords of the attribute information to be decoded at the current point are decoded using a bypass decoding method.
[0204] In an embodiment of the present application, the second context decoding resource is a pre-set value, which is consistent with the number of codewords of the syntax element to be decoded at the current point. For example, the second context decoding resource is 26 or 38, etc., which is not limited in this embodiment of the present application.
[0205] In the embodiment of the present application, the second context decoding resource is related to the number of codewords of the syntax elements to be decoded in the current point to be decoded.
[0206] Exemplarily, when the first syntax element information indicates that the allocated first context decoding resource (such as 20) is smaller than the preset second context decoding resource (such as 26), all codewords of the attribute information to be decoded at the current point are decoded using a bypass decoding method.
[0207] In some embodiments of the present application, when the first syntax element information indicates that the allocated first context decoding resource is greater than or equal to the preset second context decoding resource, at least context decoding is used to decode the attribute information to be decoded at the current point.
[0208] In the embodiment of the present application, the first context decoding resource (such as 2 24 ) is greater than or equal to a preset second context decoding resource (such as 26), the codeword of the attribute information to be decoded at the current point is decoded using at least a context decoding method.
[0209] In the embodiment of the present application, the first context decoding resource (such as 2 24 ) is greater than or equal to a preset second context decoding resource (such as 26), the context decoding method is used to decode part of the codewords of the attribute information to be decoded at the current point, and the bypass decoding method is used to decode the codewords other than the context decoding method.
[0210] In some embodiments of the present application, when the first syntax element information indicates that the allocated first context decoding resources are greater than or equal to the preset second context decoding resources, the first syntax element information to be decoded is decoded in a context decoding manner with a quantity less than or equal to the second context decoding resources; the first syntax element information to be decoded corresponds to the attribute information to be decoded.
[0211] In the embodiment of the present application, the first context decoding resource (such as 2 24 ) is greater than or equal to the preset second context decoding resources (for example, 26), when the number of first grammatical element information to be decoded of the attribute information to be decoded at the current point (for example, 20) is less than or equal to the number of second context decoding resources (for example, 26), the first grammatical element information to be decoded of the attribute information to be decoded at the current point is decoded using the context decoding method.
[0212] In some embodiments of the present application, when the first syntax element information indicates that the allocated first context decoding resources are greater than or equal to the preset second context decoding resources, the first syntax element information to be decoded is decoded in a context decoding manner, and the second syntax element information to be decoded is decoded in a bypass decoding manner; the second syntax element information to be decoded is the syntax element information to be decoded after the decoding of the first syntax element information to be decoded is completed; the first syntax element information to be decoded and the second syntax element information to be decoded both correspond to the attribute information to be decoded.
[0213] In the embodiment of the present application, the first context decoding resource (such as 2 24 ) is greater than or equal to the preset second context decoding resources (for example, 26), when the number of first grammatical element information to be decoded in the attribute information to be decoded at the current point (for example, 28) is greater than the number of second context decoding resources (for example, 26), the first grammatical element information to be decoded that is equal to the number of second context decoding resources (for example, 26) in the attribute information to be decoded at the current point is decoded using context decoding, and the second grammatical element information to be decoded in the attribute information to be decoded at the current point is decoded using bypass decoding. It should be noted that the number of second grammatical element information to be decoded (for example, 28-26=2) is the number of grammatical element information to be decoded after the decoding of the first grammatical element information to be decoded is completed.
[0214] In an embodiment of the present application, a method for decoding a point cloud is provided. On the decoder side, the decoder determines first syntax element information of attribute information to be decoded at the current point. When the first syntax element information indicates that the allocated first context decoding resource is less than the preset second context decoding resource, the decoder uses a bypass decoding method to decode the attribute information to be decoded at the current point. The second context decoding resource is related to the codeword of the syntax element to be decoded at the current point. The first syntax element information of the attribute information to be decoded at the current point is determined by parsing the bitstream, so that when the decoder indicates that the allocated first context decoding resource is less than the preset second context decoding resource, the decoder uses a bypass decoding method to decode the attribute information to be decoded at the current point. The bypass decoding method has a higher throughput than context decoding. Therefore, when the decoder indicates that the allocated first context decoding resource is less than the preset second context decoding resource, changing the decoding method to the bypass decoding method can improve the hardware throughput of the decoder, thereby improving the decoding efficiency of the decoder.
[0215] It can be understood that when the decoder indicates that the allocated first context decoding resource is greater than or equal to the preset second context decoding resource, it at least uses the context decoding method to decode the attribute information to be decoded at the current point. In the presence of the second syntax element information to be decoded, it can also use the context decoding method for part of the decoding information and the bypass decoding method for part of the decoding information. Through the combination of the context decoding method and the bypass decoding method, the hardware throughput of the decoder is improved during the decoding process, thereby improving the decoding efficiency of the decoder.
[0216] In the embodiment of the present application, whether the context decoding method is used (when the first syntax element information indicates that the allocated first context decoding resource is greater than or equal to the preset second context decoding resource) or the bypass decoding method is used (when the first syntax element information indicates that the allocated first context decoding resource is less than the preset second context decoding resource), the specific decoding process and principle of the current point are consistent. The difference is that when decoding the codeword, the decoding method used is different, and in the process of at least using context decoding, specifically in the process of decoding a specific quantized residual of each attribute information, there is also a process of using bypass decoding for part of the quantized residual.
[0217] The following describes the specific process of decoding the current point. In this embodiment of the present application, the attribute information to be decoded can be color attribute information or reflectivity attribute information, or other attribute information, which is not limited in this embodiment of the present application. The following description uses color attribute information and reflectivity attribute information as examples.
[0218] In some embodiments of the present application, the attribute information to be decoded includes: color attribute information; the color attribute information includes: a first color component, a second color component, and a third color component.
[0219] In some embodiments of the present application, when the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, as shown in FIG7 , decoding the to-be-decoded attribute information of the current point includes S201 to S205:
[0220] S201: parse a bitstream to determine second syntax element information of a first color component.
[0221] In an embodiment of the present application, when the first quantization residual of the first color component of the point to be encoded, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, the decoder obtains the second syntax element information of the first color component by parsing the bit stream.
[0222] In an embodiment of the present application, the first color component may be a luminance color component or a chrominance color component. When the first color component is a chrominance color component, the first color component may be a blue chrominance color component, a red chrominance color component, and the like. This embodiment of the present application does not impose any limitation on this.
[0223] In an embodiment of the present application, the second syntax element information indicates whether the first quantized residual of the first color component of the to-be-decoded point (i.e., the current point) is equal to 0. The second syntax element information may represent a color_first_comp_zero flag. The color_first_comp_zero flag may be a flag indicating whether the first quantized residual of the first color component is 0.
[0224] In an embodiment of the present application, the value of the second syntax element information may be a first preset value or a second preset value.
[0225] In some embodiments of the present application, if the second syntax element information (the value of the second syntax element information) is a first preset value, the first quantized residual representing the first color component is not the first value; if the second syntax element information is a second preset value, the first quantized residual representing the first color component is the first value. In this embodiment of the present application, the first value may be 0.
[0226] In the embodiment of the present application, the first preset value and the second preset value are different, and the first preset value and the second preset value can be in parameter form or in digital form, which is not specifically limited here.
[0227] The second syntax element information may be a parameter written in a profile, or may be a value of a flag, which is not specifically limited here.
[0228] For example, taking flag as an example, there are two ways to set the flag: an enable flag (enable_flag) and a disable flag (disable_flag). Assuming that the value of the enable flag is the second preset value and the value of the disable flag is the first preset value; then for the first preset value and the second preset value, the first preset value can be set to 0 and the second preset value can be set to 1; or, the second preset value can also be set to true (true) and the first preset value can also be set to false (false); however, this is not specifically limited in the embodiments of the present application.
[0229] That is, when the first preset value is 0, it indicates that the first quantization residual of the first color component is not the first value; when the second preset value is 1, it indicates that the first quantization residual of the first color component is the first value. Alternatively, when the first preset value is false, it indicates that the first quantization residual of the first color component is not the first value; when the second preset value is true, it indicates that the first quantization residual of the first color component is the first value.
[0230] It should be noted that the embodiment of the present application does not limit the expression form of the first preset value and the second preset value.
[0231] S202 : When the second syntax element information indicates that the first quantized residual of the first color component is not the first value, decode the first quantized residual, the second quantized residual of the second color component, and the third quantized residual of the third color component respectively.
[0232] In the embodiment of the present application, if the value of the second syntax element information is 0 or the value of the second syntax element information is false, it is determined that the second syntax element information indicates that the first quantized residual of the first color component is not the first value.
[0233] In an embodiment of the present application, the decoder can decode different color components in sequence during the process of decoding color components, first determining whether the first color component is non-zero. When the second syntax element information indicates that the first color component is non-zero, the decoder can decode the first color component, the second color component, and the third color component in sequence. However, when the second syntax element information indicates that the first color component is zero, since the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, the decoder needs to continue decoding the second color component and the third color component. In addition, since the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, when the first color component and the second color component are both 0, the third color component must be non-zero, and the decoder needs to further decode the third color component.
[0234] Exemplarily, when the second syntax element information indicates that the first quantized residual of the first color component is not zero, the decoder decodes the first quantized residual, the second quantized residual of the second color component, and the third quantized residual of the third color component respectively, which can be expressed as: if (!color_first_comp_zero) { color_component[0] = color_component_code(true) color_component[1] = color_component_code(false) color_component[2] = color_component_code(false)
[0235] Wherein, color_first_comp_zero indicates that the first quantized residual of the first color component is not the first value (zero). color_component[0] indicates the decoding of the first quantized residual of the first color component; color_component[1] indicates the decoding of the second quantized residual of the second color component; and color_component[2] indicates the decoding of the third quantized residual of the third color component.
[0236] It should be noted that the detailed process of decoding each color component will be described in the following embodiments.
[0237] In an embodiment of the present application, for color attribute information, when the encoder encodes the non-zero quantization residual, it can first deduct the fifth preset value from the quantization residual or the absolute value of the quantization residual before encoding. It can be the encoding after deducting the fifth preset value from the absolute value of the first non-zero quantization residual in the first color component, the second color component, and the third color component, or it can be the encoding after deducting the fifth preset value from the absolute value of each non-zero quantization residual. Then, relatively, when the decoder is decoding, color_component_code(true) indicates that the corresponding quantization residual needs to consider the fifth preset value subtracted during encoding after decoding the codeword. And color_component_code(false) indicates that the corresponding quantization residual needs to consider the fifth preset value subtracted during encoding after decoding the codeword.
[0238] In some embodiments of the present application, if the absolute value of the quantized residual is encoded during encoding, its sign also needs to be encoded. At the same time, during decoding, the sign bits of each quantized residual also need to be decoded to restore its correct decoded value. This process will be explained in subsequent embodiments.
[0239] S203 : When the second syntax element information indicates that the first quantized residual of the first color component is a first value, determine third syntax element information of the second color component.
[0240] In an embodiment of the present application, if the value of the second syntax element information is 1 or the value of the second syntax element information is true, it is determined that the second syntax element information indicates that the first quantized residual of the first color component is the first value, then the third syntax element information of the second color component is determined by parsing the code stream.
[0241] In an embodiment of the present application, after determining that the first quantization residual of the first color component is zero, the decoder needs to determine whether the second quantization residual is zero again to determine which quantization residuals need to be decoded subsequently. The decoder determines this based on the third syntax element information, that is, whether the second quantization residual of the second color component is zero.
[0242] In the embodiment of the present application, the third syntax element information indicates whether the second quantized residual of the second color component of the to-be-coded point is equal to 0. The third syntax element information may represent a flag bit of color_second_comp_zero.
[0243] In the embodiment of the present application, the value of the third syntax element information, that is, the value of the flag bit of color_second_comp_zero can be the first preset value or the second preset value.
[0244] In some embodiments of the present application, if the third syntax element information (the value of the third syntax element information) is a first preset value, the second quantized residual representing the second color component is not the first value; if the third syntax element information is a second preset value, the second quantized residual representing the second color component is the first value.
[0245] Exemplarily, when the first preset value is 0, the second quantization residual of the second color component is not the first value; when the second preset value is 1, the second quantization residual of the second color component is the first value. Alternatively, when the first preset value is false, the second quantization residual of the second color component is not the first value; when the second preset value is true, the second quantization residual of the second color component is the first value.
[0246] S204: When the third syntax element information indicates that the second quantized residual of the second color component is not the first value, decode the second quantized residual of the second color component and the third quantized residual of the third color component respectively.
[0247] In this embodiment of the present application, if the value of the third syntax element information is 0 or the value of the second syntax element information is false, it is determined that the third syntax element information indicates that the second quantized residual of the second color component is not the first value.
[0248] In an embodiment of the present application, when the decoder determines that the first quantization residual of the first color component is zero, it needs to determine whether the second quantization residual is zero again to determine which quantization residuals need to be decoded subsequently. The decoder determines this through the third syntax element information, that is, whether the second quantization residual of the second color component is 0. If the second quantization residual of the second color component is not 0, it means that the encoder encoded both the second color component and the third color component during encoding. In this case, the decoder needs to decode the second quantization residual and the third quantization residual separately to obtain the second quantization residual and the third quantization residual.
[0249] Exemplarily, when the third syntax element information indicates that the second quantized residual of the second color component is not zero, the decoder decodes the second quantized residual of the second color component and the third quantized residual of the third color component respectively, which can be expressed as: if (!color_second_comp_zero) { color_component[1] = color_component_code(true) color_component[2] = color_component_code(false)
[0250] Wherein, !color_second_comp_zero indicates that the second quantized residual of the second color component is not the first value (zero).
[0251] S205 . When the third syntax element information indicates that the second quantized residual of the second color component is the first value, decode the third quantized residual of the third color component.
[0252] In an embodiment of the present application, if the value of the third syntax element information is 1 and the value of the second syntax element information is true, when the first quantization residual, the second quantization residual and the third quantization parameter are not all zero, since the first quantization residual and the second quantization residual are both zero, the third quantization residual of the third color component must not be the first value (0).
[0253] That is, when the decoder determines that the first quantization residual and the second quantization residual are both zero through parsing the second syntax element information and the third syntax element information, the third quantization residual representing the third color component is non-zero, and the decoder needs to decode the third quantization residual.
[0254] Exemplarily, when the third syntax element information indicates that the second quantized residual of the second color component is the first value, the decoder decodes the third quantized residual of the third color component, which can be expressed as:
[0255] Among them, color_component[1]=0 is determined based on the value of the third syntax element information.
[0256] It can be understood that although the decoding process or principle for the current point is consistent, since the decoder can use different decoding methods for the decoding codewords in the decoding process after comparing the first context decoding resources with the second context decoding resources, the decoding process can use different combinations of decoding methods based on different situations, thereby improving the flexibility of decoding.
[0257] It should be noted that the principles for decoding the first, second, and third quantized residuals are the same; the difference lies in the specific information of the color components and quantized residuals. Therefore, the decoding process of the quantized residual of each color component is described below using the current color component representing any color component and the current quantized residual representing the decoded value of the quantized residual corresponding to any color component as an example.
[0258] In some embodiments of the present application, the current color component is any one of the first color component, the second color component, and the third color component; the current quantization residual is the decoded value of any one of the first quantization residual, the second quantization residual, and the third quantization residual; and the current quantization residual corresponds to the current color component.
[0259] In the embodiment of the present application, the decoded value of the quantized residual is the absolute value of the quantized residual, or the value obtained by subtracting a fifth preset value from the absolute value of the quantized residual. In the embodiment of the present application, the fifth preset value may be 1.
[0260] The decoded value of the quantized residual of the color attribute information is the absolute value of the quantized residual of each color component, or the value obtained by subtracting the fifth preset value from the absolute value of the quantized residual. The decoded value of the quantized residual of the reflectivity attribute information is the absolute value of the quantized residual.
[0261] It should be noted that the decoded value of the quantized residual corresponding to the first non-zero color component in the quantized residual of the color attribute information may be the value obtained by subtracting the fifth preset value from the absolute value of the quantized residual; alternatively, the decoded value of the quantized residual corresponding to any non-zero color component in the quantized residual of the color attribute information may be the value obtained by subtracting the fifth preset value from the absolute value of the quantized residual; alternatively, the quantized residuals of the color attribute information may all be the absolute values of the quantized residuals. This is not limited in the embodiments of the present application.
[0262] It should be noted that in an embodiment of the present application, in the process of decoding any color component among the first color component, the second color component and the third color component, the decoding value of any color component can be first decoded to determine the decoding value, that is, the current quantization residual (the absolute value of the quantization residual of any color component minus the fifth preset value, or the absolute value of the quantization residual of any color component), and then the first quantization residual, the second quantization residual and the third quantization residual are restored based on the obtained decoding value (current quantization residual).
[0263] Decoding the current quantized residual of the current color component includes S301 to S302:
[0264] S301. Parse a bitstream to determine fourth syntax element information of a current color component; the fourth syntax element information indicates whether a current quantized residual is a first value.
[0265] In the embodiment of the present application, when the current color component is any one of the first color component, the second color component, and the third color component, the decoder determines the fourth syntax element information of the current color component by parsing the bitstream.
[0266] In an embodiment of the present application, the fourth syntax element information indicates whether the value of the current color component (eg, the absolute value of the quantized residual of the current color component) is equal to the first value. The fourth syntax element information may represent a flag bit of color_level_equal_zero.
[0267] In the embodiment of the present application, the value of the fourth syntax element information, that is, the value of the flag bit of color_level_equal_zero can be the first preset value or the second preset value.
[0268] In an embodiment of the present application, if the fourth syntax element information (the value of the fourth syntax element information) is the first preset value, the value representing the current quantization residual is not equal to the first value; if the fourth syntax element information is the second preset value, the value representing the quantization residual of the current color component is equal to the first value.
[0269] For example, when the first preset value is 0, it indicates that the current quantization residual is not equal to the first value; when the second preset value is 1, it indicates that the current quantization residual is equal to the first value. Alternatively, when the first preset value is false, it indicates that the current quantization residual is not equal to the first value; when the second preset value is true, it indicates that the current quantization residual is equal to the first value.
[0270] S302: When the fourth syntax element information is a second preset value, determine that the current quantized residual is a first value.
[0271] In the embodiment of the present application, the first value may be 0.
[0272] Exemplarily, if the value of the fourth syntax element information is a second preset value (such as 1), it is determined that the current quantization residual is 0.
[0273] It should be noted that when decoding the current color component, it indicates that the current color component is non-zero or that the current color component previously had a non-zero value. Otherwise, the first quantization residual or the second quantization residual value of the first color component and the second color component can be directly determined using the second syntax element information or the third syntax element information. If the first quantization residual and the second quantization residual are both zero, then if the quantization residuals are not all zero, the third quantization residual will definitely be non-zero after decoding.
[0274] In some embodiments of the present application, decoding the current quantized residual of the current color component further includes S303 to S304:
[0275] S303: When the fourth syntax element information is the first preset value, determine fifth syntax element information; the fifth syntax element information indicates whether the current quantized residual is the second value.
[0276] In the embodiment of the present application, when the fourth syntax element information is the first preset value, that is, when the current quantization residual is not zero, it is necessary to continue decoding to determine the value of the current quantization residual. The decoder can continue to determine whether the current quantization residual is the second value.
[0277] In the embodiment of the present application, the fifth syntax element information indicates whether the current quantized residual of the current color component is equal to the second value. The fifth syntax element information may represent a flag bit of color_level_equal_one.
[0278] In the embodiment of the present application, the value of the fifth syntax element information, that is, the value of the flag bit of color_level_equal_one, can be the first preset value or the second preset value.
[0279] For example, when the first preset value is 0, it indicates that the current quantization residual is not the second value; when the second preset value is 1, it indicates that the current quantization residual is the second value. Alternatively, when the first preset value is false, it indicates that the current quantization residual is not the second value; when the second preset value is true, it indicates that the current quantization residual is the second value.
[0280] In this embodiment of the present application, the second value may be 1.
[0281] S304: When the fifth syntax element information is a second preset value, determine that the current quantized residual is a second value.
[0282] In this embodiment of the present application, when the fifth syntax element information is a second preset value (such as 1 or true), the current quantized residual is determined to be a second value (such as 1).
[0283] In the embodiment of the present application, when the fifth syntax element information is the second preset value, the current quantized residual is decoded as 1, the current quantized residual decoding is completed, and the decoding process of the next color component can be performed.
[0284] In some embodiments of the present application, decoding the current quantized residual of the current color component further includes S305 to S306:
[0285] S305. When the fifth syntax element information is the first preset value, determine the sixth syntax element information and the seventh syntax element information; the sixth syntax element information represents the parity of the decoded value of the current quantized residual; the seventh syntax element information represents whether the quotient of the decoded value of the current quantized residual minus the third preset value and then divided by two is the first target value; the seventh syntax element information includes: M syntax element information; where M is a positive integer greater than or equal to 1.
[0286] In an embodiment of the present application, when the fifth syntax element information is a first preset value (such as 0 or false), that is, the current quantization residual is neither 0 nor 1, and it is necessary to continue decoding and determine, first parse the bit stream, and determine the sixth syntax element information and the seventh syntax element information.
[0287] In an embodiment of the present application, the sixth syntax element information represents the parity of the decoded value of the current quantized residual, wherein the sixth syntax element information may represent the flag bit of color_level_parity.
[0288] In the embodiment of the present application, the value of the sixth syntax element information, that is, the value of the flag bit of color_level_parity, can be a first preset value or a second preset value. There is no limitation on how the first preset value and the second preset value express odd and even.
[0289] It should be noted that if the current quantization residual is an even number, then the remainder when the current quantization residual is divided by 2 is 0; if the current quantization residual is an odd number, then the remainder when the current quantization residual is divided by 2 is 1.
[0290] Exemplarily, when the sixth syntax element information is the first preset value, it indicates that the current quantization residual is an even number; when the sixth syntax element information is the second preset value, it indicates that the current quantization residual is an odd number. Alternatively, when the sixth syntax element information is the first preset value (false), it indicates that the current quantization residual is an even number; when the sixth syntax element information is the second preset value (true), it indicates that the current quantization residual is an odd number. Alternatively,
[0291] Exemplarily, when the sixth syntax element information is a first preset value, it indicates that the current quantization residual is an odd number; when the sixth syntax element information is a second preset value, it indicates that the current quantization residual is an even number. Alternatively, when the sixth syntax element information is a first preset value (false), it indicates that the current quantization residual is an odd number; when the sixth syntax element information is a second preset value (true), it indicates that the current quantization residual is an even number.
[0292] Exemplarily, in the embodiment of the present application, the seventh syntax element information represents whether the quotient of the current quantized residual value minus the third preset value and divided by two is the first target value.
[0293] Exemplarily, when the first preset value is 0 or false, it means that the quotient of the current quantization residual value minus the third preset value divided by two is not the first target value; when the first preset value is 1 or true, it means that the quotient of the current quantization residual value minus the third preset value divided by two is the first target value.
[0294] In an embodiment of the present application, the seventh syntax element information includes: M syntax element information.
[0295] In the embodiment of the present application, the third preset value is 2, 3, 4, 5, etc., and the present application does not impose any limitation on this.
[0296] In an embodiment of the present application, the first target value is a natural number greater than or equal to 1, for example, the first target value is 0, 1, 2, 3, 4, etc., and the present application does not impose any limitation on this.
[0297] In this embodiment of the present application, the first target value corresponds to M syntax element information in the seventh syntax element information, that is, the first target value corresponds to each syntax element information in the seventh syntax element information.
[0298] Exemplarily, the third preset value is 2, and the first target value is 0. The corresponding syntax element information can represent whether the quotient of the current quantized residual minus 2 and then divided by 2 is 0. At this time, the syntax element information can represent the flag bit of color_level_minus2_div2_eq0.
[0299] Exemplarily, the third preset value is 2, the first target value is 1, and the corresponding syntax element information can represent whether the quotient of the current quantized residual minus 2 and then divided by 2 is 1. At this time, the syntax element information can represent the flag bit of color_level_minus2_div2_eq1.
[0300] Exemplarily, the third preset value is 2, the first target value is 2, and the corresponding syntax element information can represent whether the quotient of the current quantized residual minus 2 and then divided by 2 is 2. At this time, the syntax element information can represent the flag bit of color_level_minus2_div2_eq2.
[0301] Exemplarily, the third preset value is 2, and the first target value is 3. The corresponding syntax element information can represent whether the quotient of the current quantized residual minus 2 and then divided by 2 is 3. At this time, the syntax element information can represent the flag bit of color_level_minus2_div2_eq3.
[0302] Exemplarily, the third preset value is 2, and the first target value is 4. The corresponding syntax element information can represent whether the quotient of the current quantized residual minus 2 and then divided by 2 is 4. At this time, the syntax element information can represent the flag bit of color_level_minus2_div2_eq4.
[0303] It should be noted that the "minus" number is the value of the third preset value. The "eq" number is the value of the first target value. The "div" number is the value of the divisor. The embodiment herein uses division by two as an example, i.e., the divisor is 2. However, this application does not limit the value of the divisor, as long as it is consistent with the principles used by the encoder during encoding.
[0304] S306: When any syntax element information in the seventh syntax element information has a second preset value, determine a current quantized residual according to any syntax element information in the sixth syntax element information and the seventh syntax element information.
[0305] In an embodiment of the present application, when any syntax element information in the seventh syntax element information is a second preset value, the current quantized residual is expressed as (third preset value + parity + (first target value × 2)), where parity is the value of the remainder determined according to the parity of the sixth syntax element information. That is, if the value of the color_level_parity flag indicates that the current quantized residual is an even number, then the remainder when the current quantized residual is divided by 2 is 0, that is, the parity is 0; if the value of the color_level_parity flag indicates that the current quantized residual is an odd number, then the remainder when the current quantized residual is divided by 2 is 1, that is, the parity is 1.
[0306] Exemplarily, when the third preset value is 2 and the first target value is 0, when the seventh syntax element information is the second preset value (1 or true), the current quantized residual is determined to be (2+parity) according to the parity indicated by the sixth syntax element information and the seventh syntax element information.
[0307] It should be noted that, at most one syntax element information among the M syntax element information is true, or, all of the M syntax element information are false. That is to say, the current quantization residual may be one of the M first target values, or, the current quantization residual is not a value among the M first target values. The decoder can first determine whether the current quantization residual is one of the M first target values. If so, the first target value corresponding to the syntax element information with the second preset value among the M syntax element information is used as the current quantization residual. If the currently decoded quantization residuals are not values among the M first target values, the decoder continues to decode the eighth syntax element information to determine the current quantization residual.
[0308] In some embodiments of the present application, the process of the decoder decoding the M syntax element information in the seventh syntax element information, that is, S306, includes S3061 to S3063:
[0309] S3061. When the i-th syntax element information is a second preset value, determine a current quantized residual according to the sixth syntax element information and the i-th syntax element information; wherein i is a positive integer greater than or equal to 1 and less than M.
[0310] S3062. When the i-th syntax element information is a first preset value, continue to determine the value of the i+1-th syntax element information until the j-th syntax element information is determined to be a second preset value; or until the value of the M-th syntax element information is determined; where j is a positive integer greater than i and less than or equal to M.
[0311] S3063: When the j-th syntax element information is a second preset value, determine a current quantized residual according to the sixth syntax element information and the j-th syntax element information.
[0312] In the embodiment of the present application, the i-th syntax element information is any one of the M syntax element information in the seventh syntax element information, and i is executed cyclically starting from 1.
[0313] In this embodiment of the present application, when the i-th syntax element information is the second preset value (1 or true), the current quantized residual is determined based on the remainder parity indicated by the sixth syntax element information and the first target value corresponding to the i-th syntax element information: (the third preset value + parity + (the first target value corresponding to i × 2)). The first target value corresponding to i is the i-th first target value.
[0314] In an embodiment of the present application, when the i-th syntax element information is a first preset value (0 or false), it indicates that the current quantization value is not the first target value corresponding to i, and the value of the i+1-th syntax element information is continued to be determined until the j-th syntax element information is determined to be a second preset value, or until the value of the M-th syntax element information is determined.
[0315] It should be noted that the condition for the decoder to stop iterating is that a syntax element information with a second preset value is found from the M syntax element information, or the decoder fails to find a syntax element information with the second preset value after searching the M syntax element information.
[0316] In this embodiment of the present application, the j-th syntax element information is any one of the M syntax element information in the seventh syntax element information.
[0317] In an embodiment of the present application, when the j-th syntax element information is the second preset value (1 or true), the current quantized residual is determined based on the remainder parity indicated by the sixth syntax element information and the j-th first target value corresponding to the j-th syntax element information (the third preset value + parity + (the first target value corresponding to j × 2)). Wherein, 2 is the value after div and is not limited by this application.
[0318] In some embodiments of the present application, decoding the current quantized residual of the current color component further includes S307 to S308:
[0319] S307: When the seventh syntax element information is all the first preset value, determine the eighth syntax element information; the eighth syntax element information represents the quotient of the decoded value of the current quantized residual minus the fourth preset value divided by two; wherein the fourth preset value is the initial value plus 2(M-1);
[0320] In the embodiment of the present application, when the seventh syntax element information is all the first preset value (0 or false), the eighth syntax element information is determined.
[0321] In this embodiment of the present application, the fourth preset value is related to the number (M) of syntax element information included in the seventh syntax element information.
[0322] In the embodiment of the present application, the fourth preset value is the initial value plus 2(M-1). For example, if the initial value is 4 and M is 5, the fourth preset value is 4+2(5-1)=12. If the initial value is 4 and M is 1, the fourth preset value is 4+2(1-1)=4.
[0323] It should be noted that when the fourth preset value is X, it is expressed as minus X. X=initial value plus 2(M-1).
[0324] In an embodiment of the present application, when the fourth preset value is 4, the eighth syntax element information represents the quotient of the decoded value of the current quantized residual minus 4 and then divided by two, which can be represented as the flag bit of color_level_minus4_div2. When the fourth preset value is 12, the eighth syntax element information represents the quotient of the encoded value of the current quantized residual minus 12 and then divided by two, which can be represented as the flag bit of color_level_minus12_div2.
[0325] S308: Determine a current quantized residual based on the eighth syntax element information.
[0326] In the embodiment of the present application, the current quantized residual is determined according to the value of the eighth syntax element information (color_level_minus12_div2) and the remainder (parity) indicated by the sixth syntax element information.
[0327] Exemplarily, the current quantized residual is determined according to (the fourth preset value+parity+(color_level_minus12_div2<<1)), where color_level_minus12_div2 represents the value of the eighth syntax element information, for example, color_level_minus12_div2 is 0, 1, 2, and so on.
[0328] For example, assuming that the fourth preset value is 4, "color_level_parity" is 1, when representing an odd number, the remainder is 1, and "color_level_minus4_div2" is 0, the current quantization residual is (4+1+0)=5; assuming that "color_level_parity" is 0, when representing an even number, the remainder is 0, and "color_level_minus4_div2" is 1, the current quantization residual is (4+0+1×2)=6; assuming that "color_level_parity" is 1, when representing an odd number, the remainder is 1, and "color_level_minus4_div2" is 1, the current quantization residual is (4+1+1×2)=7.
[0329] It should be noted that, in the process of decoding the eighth syntax element information, if the first context decoding resource at the current point decoding is greater than or equal to the second context decoding resource, the decoder may use context decoding for part of the codewords (for example, the first N codewords) of the eighth syntax element information and bypass decoding for another part of the codewords.
[0330] In some embodiments of the present application, the first syntax element information to be decoded includes at least one of the following: second syntax element information, third syntax element information, fourth syntax element information corresponding to each color component, fifth syntax element information corresponding to each color component, sixth syntax element information corresponding to each color component, seventh syntax element information corresponding to each color component, and first N information of eighth syntax element information corresponding to each color component, where N is a positive integer greater than 1. N is preset or parsed from the bitstream.
[0331] In some embodiments of the present application, the second syntax element information to be decoded includes: information other than the first N information in the eighth syntax element information corresponding to each color component.
[0332] In the embodiment of the present application, N is a preset value, for example, N is 4.
[0333] In the embodiment of the present application, N represents the number of codewords.
[0334] It should be noted that N can be obtained by parsing the code stream or can be predetermined in advance, and this embodiment of the present application does not limit this.
[0335] Exemplarily, when N is 4, when the attribute information to be decoded is color attribute information, and the color attribute information includes a first color component, a second color component, and a third color component, the first syntax element information to be decoded includes one second syntax element information, one third syntax element information, three fourth syntax element information, three fifth syntax element information, three sixth syntax element information, three seventh syntax element information, and the first four of the three eighth syntax element information in the attribute information to be decoded of the current point.
[0336] Exemplarily, when N is 4, the second syntax element information to be decoded is information other than the first 4 pieces of information in the eighth syntax element information corresponding to each color component.
[0337] In some embodiments of the present application, the number of second context decoding resources is the total number of decoding resources occupied by the first N pieces of information: the second syntax element information, the third syntax element information, the fourth syntax element information corresponding to each color component, the fifth syntax element information corresponding to each color component, the sixth syntax element information corresponding to each color component, the seventh syntax element information corresponding to each color component, and the eighth syntax element information corresponding to each color component.
[0338] Exemplarily, when N is 4, and the attribute information to be decoded is color attribute information, and the color attribute information includes a first color component, a second color component, and a third color component, the second context decoding resources include one second syntax element information, one third syntax element information, three fourth syntax element information, three fifth syntax element information, three sixth syntax element information, three seventh syntax element information (including one syntax element information), and the first four of the three eighth syntax element information. That is, the number of second context decoding resources is 26.
[0339] Exemplarily, when N is 4, and the attribute information to be decoded is color attribute information, and the color attribute information includes a first color component, a second color component, and a third color component, the second context decoding resources include one second syntax element information, one third syntax element information, three fourth syntax element information, three fifth syntax element information, three sixth syntax element information, three seventh syntax element information (including five syntax element information), and the first four of the three eighth syntax element information. That is, the number of second context decoding resources is 38.
[0340] It is understood that during decoding of the eighth syntax element information, if the first context decoding resource at the current point decoding is greater than or equal to the second context decoding resource, the decoder may employ context decoding for a portion of the codewords (e.g., the first N codewords) of the eighth syntax element information and bypass decoding for another portion of the codewords. Since bypass decoding has a higher throughput than context decoding, combining bypass decoding with context decoding can improve throughput, thereby improving decoding efficiency.
[0341] In some embodiments of the present application, if the number of codewords for decoding the eighth syntax element information is less than N, the eighth syntax element information is decoded entirely using a context decoding method.
[0342] In some embodiments of the present application, decoding the to-be-decoded attribute information of the current point includes at least one of S206 to S208:
[0343] S206 : After decoding the first quantized residual to determine the first quantized residual, parse the bitstream to determine a sign bit of the first quantized residual.
[0344] In the embodiment of the present application, the sign bit of the first quantized residual includes a positive sign or a negative sign.
[0345] In the embodiment of the present application, the sign bit of the decoded first quantized residual can be expressed as color_first_component_sign.
[0346] S207 : After decoding the second quantized residual to determine the second quantized residual, parse the bitstream to determine a sign bit of the second quantized residual.
[0347] In the embodiment of the present application, the sign bit of the second quantized residual includes a positive sign or a negative sign.
[0348] In the embodiment of the present application, the sign bit of the decoded second quantized residual can be expressed as color_second_component_sign.
[0349] S208 : After decoding the third quantized residual and determining the third quantized residual, parse the bitstream to determine a sign bit of the third quantized residual.
[0350] In the embodiment of the present application, the sign bit of the third quantized residual includes a positive sign or a negative sign.
[0351] In the embodiment of the present application, the sign bit of the decoded third quantized residual can be expressed as color_third_component_sign.
[0352] It should be noted that when the quantization residual is zero, the sign bit may not be decoded.
[0353] In an embodiment of the present application, when the second syntax element information (color_first_comp_zero) indicates that the first quantized residual of the first color component is not the first value (0), after respectively decoding the first quantized residual, the second quantized residual of the second color component, and the third quantized residual of the third color component, first, the code stream is parsed to determine the sign bit of the first quantized residual, then, if the second quantized residual is not 0, the code stream is parsed to determine the sign bit of the second quantized residual, and finally, if the third quantized residual is not 0, the code stream is parsed to determine the sign bit of the third quantized residual. The above process can be expressed as:
[0354] In an embodiment of the present application, when the second syntax element information indicates that the first quantized residual of the first color component is the first value (0), and the third syntax element information (color_second_comp_zero) indicates that the second quantized residual of the second color component is not the first value, after respectively decoding the second quantized residual of the second color component and the third quantized residual of the third color component, first, the bitstream is parsed to determine the sign bit of the second quantized residual, and then, when the third quantized residual is not 0, the bitstream is parsed to determine the sign bit of the third quantized residual. The above process can be expressed as follows:
[0355] In the embodiment of the present application, when the second syntax element information indicates that the first quantized residual of the first color component is the first value (0), and when the third syntax element information (color_second_comp_zero) indicates that the second quantized residual of the second color component is the first value, after decoding the third quantized residual of the third color component, the bitstream is parsed to determine the sign bit of the third quantized residual. The above process can be expressed as follows:
[0356] In some embodiments of the present application, when the current quantization residual is the absolute value of any one of the first quantization residual, the second quantization residual and the third quantization residual minus the fifth preset value, the fifth preset value is added to the decoded current quantization residual, and the corresponding quantization residual is obtained in combination with its sign bit.
[0357] In some embodiments of the present application, the fifth preset value is a pre-set value that is subtracted by the encoder during encoding and then encoded. Therefore, during the decoding process, it is necessary to add the current quantized residual (i.e., the decoded value) after decoding to restore the result. For example, the fifth preset value is 1.
[0358] In an embodiment of the present application, if the current quantization residual (decoded value) is encoded after subtracting the fifth preset value, then after decoding to obtain the current quantization residual, it is necessary to combine the fifth preset value and the parsed sign bit to determine the quantization residual. If the current quantization residual (decoded value) is not encoded after subtracting the fifth preset value, then the current quantization residual is represented by the absolute value of the quantization residual, and it is necessary to combine the parsed sign bit to determine the quantization residual.
[0359] In some embodiments of the present application, when the second syntax element information indicates that the first quantized residual of the first color component is not the first value (e.g., 0), after decoding the first quantized residual, the decoded value of the decoded first quantized residual is added to the fifth preset value (e.g., 1) to obtain the latest first quantized residual, and the latest first quantized residual is combined with its sign bit as the final decoded first quantized residual. The above process can be expressed as:
[0360] color_component[0]=color_component_code(true)
[0361] In some embodiments of the present application, when the third syntax element information indicates that the second quantized residual of the second color component is not the first value (e.g., 0), after decoding the second quantized residual, the decoded value of the decoded second quantized residual is added to the fifth preset value (e.g., 1) to obtain the latest second quantized residual, and the latest second quantized residual is combined with its sign bit as the final decoded second quantized residual. The above process can be expressed as:
[0362] color_component[1]=color_component_code(true)
[0363] In some embodiments of the present application, when the third syntax element information indicates that the second quantized residual of the second color component is a first value (e.g., 0), after decoding the third quantized residual, a fifth preset value (e.g., 1) is added to the decoded value of the decoded third quantized residual to obtain the latest third quantized residual, and the latest third quantized residual is combined with its sign bit as the final decoded third quantized residual. The above process can be expressed as:
[0364] color_component[2]=color_component_code(true)
[0365] In some embodiments of the present application, the attribute information to be decoded includes reflectivity attribute information, wherein the reflectivity attribute information can reflect the surface material of the point.
[0366] In some embodiments of the present application, when the fourth quantized residual of the reflectivity attribute information is non-zero, the attribute information to be decoded at the current point is decoded, as shown in FIG8 , including S401 to S402:
[0367] S401. Parse the code stream to determine ninth and tenth syntax element information of the fourth quantized residual corresponding to the reflectivity attribute information; the ninth syntax element information represents the parity of the decoded value of the fourth quantized residual of the reflectivity attribute information; the tenth syntax element information represents whether the quotient of the decoded value of the fourth quantized residual minus the sixth preset value divided by two is the second target value; wherein the tenth syntax element information includes: H syntax element information; wherein H is a positive integer greater than or equal to 2.
[0368] In an embodiment of the present application, when the fourth quantized residual of the reflectivity attribute information of the point to be encoded is not zero, the decoder obtains the ninth syntax element information and the tenth syntax element information of the fourth quantized residual corresponding to the reflectivity attribute information by parsing the bitstream.
[0369] In an embodiment of the present application, the ninth syntax element information represents the parity of the decoded value of the fourth quantized residual of the reflectivity attribute information, that is, the remainder after dividing the decoded value of the fourth quantized residual by the sixth preset value by two, wherein the ninth syntax element information can represent the flag bit of abs_level_minus1_parity.
[0370] The remainder after subtracting the sixth preset value from the decoded value of the fourth quantized residual and dividing it by 2 is 0, indicating that the decoded value of the fourth quantized residual of the first color component is an odd number; the remainder after subtracting the sixth preset value from the decoded value of the fourth quantized residual and dividing it by 2 is 1, indicating that the decoded value of the fourth quantized residual of the first color component is an even number. The sixth preset value may be 1. In abs_level_minus1_parity, the Z in minusZ represents the sixth preset value.
[0371] In this embodiment of the present application, the ninth syntax element information may be a first preset value or a second preset value.
[0372] Exemplarily, when the ninth syntax element information is a first preset value, the decoded value of the fourth quantized residual of the first color component is an odd number; when the ninth syntax element information is a second preset value, the decoded value of the fourth quantized residual of the first color component is an even number. Alternatively, when the ninth syntax element information is a first preset value, the decoded value of the fourth quantized residual of the first color component is an even number; when the ninth syntax element information is a second preset value, the decoded value of the fourth quantized residual of the first color component is an odd number. This is not limited in this embodiment of the present application.
[0373] In the embodiment of the present application, the tenth syntax element information represents whether the quotient of the decoded value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value.
[0374] In the embodiment of the present application, the sixth preset value is a pre-set value, for example, the sixth preset value is 1.
[0375] Exemplarily, when the tenth syntax element information is the first preset value, the quotient of the decoded value of the fourth quantized residual minus the sixth preset value and then divided by two is not the second target value; when the tenth syntax element information is the second preset value, the quotient of the decoded value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value.
[0376] In this embodiment of the present application, the tenth syntax element information includes: H syntax element information.
[0377] In the embodiment of the present application, the second target value is a natural number greater than or equal to 0. For example, the second target value is 0, 1, 2, 3, 4, 5, 6, etc., and the present application does not impose any limitation on this. That is, the quotient of the decoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 0, 1, 2, 3, 4, 5, 6, etc., and the present application does not impose any limitation on this.
[0378] In this embodiment of the present application, the second target value corresponds to H syntax element information in the tenth syntax element information, that is, the second target value corresponds to each syntax element information in the tenth syntax element information.
[0379] When n=6, it is as follows:
[0380] Exemplarily, the sixth preset value is 1 and the second target value is 0. The corresponding syntax element information can represent whether the quotient of the decoded value of the fourth quantized residual minus 1 and divided by two is 0. At this time, the syntax element information can represent the flag bit of abs_level_minus1_div2_eq0.
[0381] Exemplarily, the sixth preset value is 1, the second target value is 1, and the corresponding syntax element information can represent whether the quotient of the decoded value of the fourth quantized residual minus 1 and divided by two is 1. At this time, the syntax element information can represent the flag bit of abs_level_minus1_div2_eq1.
[0382] Exemplarily, the sixth preset value is 1 and the second target value is 2. The corresponding syntax element information can represent whether the quotient of the decoded value of the fourth quantized residual minus 1 and divided by two is 2. At this time, the syntax element information can represent the flag bit of abs_level_minus1_div2_eq2.
[0383] Exemplarily, the sixth preset value is 1 and the second target value is 3. The corresponding syntax element information can represent whether the quotient of the decoded value of the fourth quantized residual minus 1 and divided by two is 3. At this time, the syntax element information can represent the flag bit of abs_level_minus1_div2_eq3.
[0384] Exemplarily, the sixth preset value is 1 and the second target value is 4. The corresponding syntax element information can represent whether the quotient of the decoded value of the fourth quantized residual minus 1 and divided by two is 4. At this time, the syntax element information can represent the flag bit of abs_level_minus1_div2_eq4.
[0385] Exemplarily, the sixth preset value is 1 and the second target value is 5. The corresponding syntax element information can represent whether the quotient of the decoded value of the fourth quantized residual minus 1 and divided by two is 5. At this time, the syntax element information can represent the flag bit of abs_level_minus1_div2_eq5.
[0386] Exemplarily, the sixth preset value is 1 and the second target value is 6. The corresponding syntax element information can represent whether the quotient of the decoded value of the fourth quantized residual minus 1 and divided by two is 6. At this time, the syntax element information can represent the flag bit of abs_level_minus1_div2_eq6.
[0387] It should be noted that the "minus" number is the sixth preset value. The "eq" number is the second target value. The "div" number is the divisor. While the embodiment herein uses division by two as an example, i.e., the divisor is 2, this application does not limit the divisor value, as long as it is consistent with the principles used by the encoder during encoding.
[0388] S402: When any syntax element information in the tenth syntax element information has a second preset value, determine a fourth quantized residual according to any syntax element information in the ninth syntax element information and the tenth syntax element information.
[0389] In the embodiment of the present application, the sixth preset value is a pre-set value, for example, the sixth preset value is 1.
[0390] In this embodiment of the present application, when any syntax element information in the tenth syntax element information has the second preset value, the fourth quantized residual can be expressed as (sixth preset value+parity+(second target value×2)).
[0391] Here, parity is the value of the remainder determined according to the parity of the ninth syntax element information.
[0392] Exemplarily, when the sixth preset value is 1 and the second target value is 0 (i.e., abs_level_minus1_div2_eq0 is true), when the ninth syntax element information is the second preset value (1 or true), the current quantized residual is determined to be (1+parity) according to the parity indicated by the ninth syntax element information and the tenth syntax element information.
[0393] It should be noted that at most one syntax element information among the H syntax element information is true, or all M syntax element information are false. That is, the decoded value of the fourth quantized residual may be one of the H second target values, or the decoded value of the fourth quantized residual is not a value among the H second target values. The decoder can first determine whether the decoded value of the currently decoded fourth quantized residual is one of the H second target values. If so, the second target value corresponding to the syntax element information with the second preset value among the H syntax element information is used as the decoded value of the fourth quantized residual. If the currently decoded fourth quantized residual is not a value among the H second target values, the decoder continues to decode the eleventh syntax element information to determine the decoded value of the fourth quantized residual.
[0394] In some embodiments of the present application, the process of the decoder decoding H syntax element information in the tenth syntax element information, that is, S402, includes S4011 to S4013:
[0395] S4011. When the nth syntax element information is a second preset value, determine a fourth quantized residual according to the ninth syntax element information and the nth syntax element information; wherein n is a positive integer greater than or equal to 1 and less than H.
[0396] S4012. When the nth syntax element information is a first preset value, continue to determine the value of the n+1th syntax element information until the hth syntax element information is determined to be a second preset value; or until the value of the Hth syntax element information is determined; where h is a positive integer greater than n and less than or equal to H.
[0397] S4013: When the h-th syntax element information is a second preset value, determine a fourth quantized residual according to the ninth syntax element information and the h-th syntax element information.
[0398] In the embodiment of the present application, the nth syntax element information is any one of the H syntax element information in the tenth syntax element information, and j is executed cyclically starting from 1.
[0399] In an embodiment of the present application, when the nth syntax element information is the second preset value (1 or true), the fourth quantized residual is determined as: (sixth preset value + parity + (nth second target value × 2)) based on the remainder parity indicated by the tenth syntax element information and the second target value corresponding to the nth syntax element information.
[0400] In an embodiment of the present application, when the nth syntax element information is a first preset value (0 or false), the value of the n+1th syntax element information is continued to be determined until the hth syntax element information is determined to be a second preset value; or until the value of the Hth syntax element information is determined.
[0401] It should be noted that the condition for the decoder to stop iteration is that a syntax element information with a second preset value is found from the H syntax element information, or the decoder does not find syntax element information with the second preset value after searching the H syntax element information.
[0402] In this embodiment of the present application, the hth syntax element information is any one of the H syntax element information in the tenth syntax element information.
[0403] In an embodiment of the present application, when the h-th syntax element information is the second preset value (1 or true), the fourth quantized residual is determined as follows: (sixth preset value + parity + (n-th second target value × 2)) based on the remainder parity indicated by the ninth syntax element information and the h-th second target value corresponding to the h-th syntax element information. Wherein, 2 is the value after div and is not limited by this application.
[0404] In some embodiments of the present application, decoding the current quantized residual of the current color component further includes S403 to S404:
[0405] S403. When the tenth syntax element information is all the first preset value, determine the eleventh syntax element information; the eleventh syntax element information represents the quotient of the decoded value of the fourth quantized residual minus the seventh preset value divided by two; wherein the seventh preset value is the initial value plus 2(H-2).
[0406] In the embodiment of the present application, when the tenth syntax element information is all the first preset value (0 or false), the eleventh syntax element information is determined.
[0407] In the embodiment of the present application, the seventh preset value is related to the number (H) of syntax element information included in the tenth syntax element information.
[0408] In the embodiment of the present application, the seventh preset value is the initial value plus 2 (H-2). For example, if the initial value is 5 and H is 2, the seventh preset value is 5+2(2-2)=5; if the initial value is 5 and H is 7, the seventh preset value is 5+2(7-2)=15.
[0409] It should be noted that when the seventh preset value is Y, it is expressed as minus Y. Y=initial value plus 2 (Y-2).
[0410] In an embodiment of the present application, when the seventh preset value is 5, the eleventh syntax element information represents the quotient of the decoded value of the fourth quantized residual minus 5 and divided by two, which can be expressed as the value of the flag bit of abs_level_minus5_div2; when the seventh preset value is 15, the eleventh syntax element information represents the quotient of the decoded value of the fourth quantized residual minus 15 and divided by two, which can be expressed as the value of the flag bit of abs_level_minus15_div2.
[0411] S404: Determine a fourth quantized residual based on the eleventh syntax element information.
[0412] In the embodiment of the present application, the fourth quantized residual is determined according to the value of the eleventh syntax element information (such as abs_level_minu5_div2) and the remainder (parity) indicated by the ninth syntax element information.
[0413] Exemplarily, the fourth quantized residual is determined according to (the seventh preset value+parity+(abs_level_minu5_div2<<1)).
[0414] It should be noted that, in the process of decoding the eleventh syntax element information, if the first context decoding resource at the current point decoding is greater than or equal to the second context decoding resource, the decoder may use context decoding for part of the codewords of the eleventh syntax element information (for example, the first K codewords) and bypass decoding for another part of the codewords.
[0415] In some embodiments of the present application, the first syntax element information to be decoded includes at least one of the following: ninth syntax element information, tenth syntax element information, and first K pieces of information of the eleventh syntax element information, where K is a positive integer greater than 1. K is preset or parsed from the bitstream.
[0416] In some embodiments of the present application, the second syntax element information to be decoded includes: information other than the first K information in the eleventh syntax element information.
[0417] In the embodiment of the present application, K is a preset value, for example, K is 4.
[0418] In the embodiment of the present application, K represents the number of codewords.
[0419] It should be noted that K can be obtained by parsing the code stream or can be predetermined in advance, and this embodiment of the present application does not limit this.
[0420] Exemplarily, when K is 4, when the attribute information to be decoded is reflectivity attribute information, the first syntax element information to be decoded includes a ninth syntax element information, a tenth syntax element information, and the first four information in the eleventh syntax element information in the attribute information to be decoded at the current point.
[0421] Exemplarily, when K is 4, the second syntax element information to be decoded is the information in the eleventh syntax element information except the first four information.
[0422] In some embodiments of the present application, the number of second context decoding resources is the total number of decoding resources occupied by the ninth syntax element information, the tenth syntax element information, and the first K pieces of information of the eleventh syntax element information.
[0423] Exemplarily, when K is 4, when the attribute information to be decoded is reflectivity attribute information, the second context decoding resource includes one ninth syntax element information, one tenth syntax element information (including two syntax elements), and the first four pieces of information of the eleventh syntax element information. That is, the number of second context decoding resources is 7.
[0424] Exemplarily, when K is 4, when the attribute information to be decoded is reflectivity attribute information, the second context decoding resource includes one ninth syntax element information, one tenth syntax element information (including seven syntax elements), and the first four pieces of information of the eleventh syntax element information. That is, the number of second context decoding resources is 12.
[0425] It is understood that during decoding of the eleventh syntax element information, if the first context decoding resource at the current decoding point is greater than or equal to the second context decoding resource, the decoder may employ context decoding for a portion of the codewords (e.g., the first K codewords) of the eleventh syntax element information and bypass decoding for another portion of the codewords. Since bypass decoding has a higher throughput than context decoding, combining bypass decoding with context decoding can improve throughput, thereby improving decoding efficiency.
[0426] In some embodiments of the present application, if the number of codewords for decoding the eleventh syntax element information is less than K, the eleventh syntax element information is decoded entirely using a context decoding method.
[0427] In some embodiments of the present application, after determining each first syntax element information to be decoded, the decoding resources occupied by the first syntax element information to be decoded are subtracted from the first context decoding resources to obtain the latest first context decoding resources; the latest first context decoding resources are used in the decoding process of the next point, that is, the first context decoding resources allocated to the next point are obtained.
[0428] In an embodiment of the present application, after determining each first syntax element information to be decoded, the decoding resources occupied by the first syntax element information to be decoded are subtracted from the first context decoding resources, such as performing the remBinsPass1-- operation, to obtain the latest first context decoding resources.
[0429] Exemplarily, after parsing the second syntax element information color_first_comp_zero, the remBinsPass1 operation is performed.
[0430] It can be understood that the decoder will subtract a decoding resource accordingly after using it for each decoding. In this way, after completing the decoding of the current point, the first context decoding resource that can still be used can be determined, and then the decoding of the next point can be performed based on the latest first context decoding resource. In this way, when decoding the next point, the decoding resource can be determined without occupying the codeword through the code stream transmission, thereby improving the decoding efficiency.
[0431] An embodiment of the present application provides a point cloud encoding method, which is applied to an encoder. As shown in FIG9 , the method may include:
[0432] S501: Determine a quantized residual of attribute information to be encoded at a current point and a first context coding resource allocated to the current point.
[0433] In an embodiment of the present application, during the encoding process of the point cloud, after the encoder obtains the quantization information of the current point, it compares the difference with the quantization residual of the initial point to obtain the quantization residual of the current point, and completes the encoding of the current point by encoding the quantization residual of the current point.
[0434] In the embodiment of the present application, the first context coding resource is used to indicate the budget of the resources using context decoding at the current point that can be allocated. For example, the first context decoding resource may be 224.
[0435] In the embodiment of the present application, the quantized residual includes the quantized residual of the color attribute information and the quantized residual of the reflectivity attribute information.
[0436] In an embodiment of the present application, the quantized residual of the color attribute information includes a first quantized residual of the first color component, a second quantized residual of the second color component, and a third quantized residual of the third color component, and the quantized residual of the reflectivity attribute information includes a fourth quantized residual of the reflectivity attribute information.
[0437] In this embodiment of the present application, when the current point is the first point, the first context coding resources (i.e., the initial first context decoding resources) allocated to it can be set. When the current point is not the first point, it is determined by obtaining the remaining coding resources after encoding the previous point, or by parsing the bitstream, which is not limited in this embodiment of the present application. In other words, the initial first context decoding resources can be determined by encoder allocation, which is not limited in this embodiment of the present application.
[0438] In the embodiment of the present application, the encoder needs to write the initial first context decoding resource into the bitstream.
[0439] In some embodiments of the present application, after each point encoding is completed, the encoder may write the latest first context coding resource obtained into the bitstream, or may not write the latest first context coding resource into the bitstream and only write the initial first context decoding resource into the bitstream. This embodiment of the present application does not limit this.
[0440] S502 : When the first context coding resource is less than a preset second context coding resource, encode the quantized residual of the current point using a bypass coding method; the second context coding resource is related to the codeword to be encoded at the current point.
[0441] In the embodiment of the present application, the quantized residual is binarized according to a preset coding rule to obtain a codeword, and then the codeword is encoded using a bypass coding method.
[0442] In some embodiments of the present application, when the attribute information to be encoded is color attribute information, the preset encoding rules may include: whether the quantization residual is equal to 0, whether the quantization residual is equal to 1, the remainder of the quantization residual code value divided by 2, whether the quotient of the quantization residual code value minus the third preset value and then divided by two is equal to the first target value, the quotient of the quantization residual code value minus the fourth preset value and then divided by two, and second-order exponential Golomb coding, which is not limited in the embodiments of the present application. When the attribute information to be encoded is reflectivity attribute information, the preset encoding rules may include: whether the quantization residual is equal to 0, whether the quantization residual is equal to 1, the remainder of the quantization residual code value (e.g., the absolute value of the quantization residual) divided by 2, whether the quotient of the quantization residual code value (e.g., the absolute value of the quantization residual) minus the sixth preset value and then divided by two is equal to the second target value, the quotient of the quantization residual code value (e.g., the absolute value of the quantization residual) minus the seventh preset value and then divided by two, and second-order exponential Golomb coding, which is not limited in the embodiments of the present application.
[0443] In an embodiment of the present application, the second context coding resource is a pre-set value, which is consistent with the number of codewords of the syntax element of the quantized residual to be encoded at the current point. For example, the second context coding resource is 26 or 38, etc., which is not limited in this embodiment of the present application.
[0444] In this embodiment of the present application, the second context coding resource is related to the number of codewords of the syntax elements to be encoded in the current point to be encoded.
[0445] Exemplarily, when the allocated first context coding resource (eg, 20) is smaller than the preset second context coding resource (eg, 26), the codeword of the quantized residual at the current point is encoded using a bypass coding method.
[0446] In some embodiments of the present application, when the first context coding resource is greater than or equal to the preset second context coding resource, at least a context coding method is used to encode the quantized residual of the current point.
[0447] In the embodiment of the present application, in the allocated first context coding resource (for example, 2 24 ) is greater than or equal to a preset second context coding resource (such as 26), the codeword of the attribute information to be encoded at the current point is encoded using at least context coding.
[0448] In the embodiment of the present application, in the allocated first context coding resource (for example, 2 24 ) is greater than or equal to a preset second context coding resource (for example, 26), the context coding method is used to encode part of the codewords of the attribute information to be encoded at the current point, and the bypass coding method is used to encode the codewords other than the context coding method.
[0449] In an embodiment of the present application, when the first upper and lower context coding resources are greater than or equal to the preset second context coding resources, a context coding method is used to encode the first syntax element information to be encoded, which is less than or equal to the second context coding resources; the first syntax element information to be encoded corresponds to the quantized residual of the attribute information to be encoded.
[0450] In some embodiments of the present application, when the first context coding resource is greater than or equal to the preset second context coding resource, the first grammatical element information to be encoded, which is equal to the number of the second context coding resources, is encoded using a context coding method, and the second grammatical element information to be encoded is encoded using a bypass decoding method; the second grammatical element information to be encoded is the grammatical element information to be encoded after the encoding of the first grammatical element information to be encoded is completed; the first grammatical element information to be encoded and the second grammatical element information to be encoded both correspond to the quantized residual of the attribute information to be encoded.
[0451] In the embodiment of the present application, the first coding resource (eg 2 24 ) is greater than or equal to the preset second context coding resources (for example, 26), when the number of first grammatical element information to be encoded of the attribute information to be encoded at the current point (for example, 20) is less than or equal to the number of second context coding resources (for example, 26), the first grammatical element information to be encoded of the attribute information to be encoded at the current point (quantized residual) is encoded using the context coding method.
[0452] In the embodiment of the present application, in the allocated first context coding resource (for example, 2 24 ) is greater than or equal to the preset second context coding resources (for example, 26), when the number of first grammatical element information to be encoded in the attribute information to be encoded at the current point (for example, 28) is greater than the number of second context coding resources (for example, 26), the first grammatical element information to be encoded that is equal to the number of second context coding resources (for example, 26) in the attribute information to be encoded at the current point is encoded using context coding, and the second grammatical element information to be encoded in the attribute information to be encoded at the current point is encoded using bypass coding. It should be noted that the number of second grammatical element information to be encoded (for example, 28-26=2) is the number of grammatical element information to be encoded after the encoding of the first grammatical element information to be encoded is completed.
[0453] In an embodiment of the present application, a point cloud encoding method is provided. On the encoder side, the encoder first determines an initial quantized residual of attribute information to be encoded at a current point and a first context coding resource allocated to the current point. Then, when the first context coding resource is less than a preset second context coding resource, the encoder encodes the quantized residual at the current point using bypass coding. The second context coding resource is associated with the codeword to be encoded at the current point. By determining the first context coding resource allocated to the current point, the encoder encodes the quantized residual at the current point using bypass coding when the first context coding resource is less than a preset second context coding resource. Because bypass coding has a higher throughput than context coding, switching the encoding mode to bypass coding when the encoder indicates that the allocated first context coding resource is less than the preset second context coding resource can improve the encoder's hardware throughput, thereby improving the encoder's coding efficiency.
[0454] It can be understood that when the allocated first context coding resource of the encoder is greater than or equal to the preset second context coding resource, at least when the context coding method is used to encode the attribute information to be encoded at the current point, in the presence of the second syntax element information to be encoded, the context coding method can also be used for part of the coding information (part of the codewords of the quantized residual), and the bypass coding method can be used for part of the coding information (the remaining codewords of the quantized residual). Through the combination of the context coding method and the bypass coding method, the hardware throughput of the encoder is improved during the encoding process, thereby improving the encoding efficiency of the encoder.
[0455] In the embodiments of the present application, regardless of whether context coding is used (when the allocated first context coding resource is greater than or equal to the preset second context coding resource) or bypass coding is used (when the allocated first context coding resource is less than the preset second context coding resource), the specific encoding process and principles for the current point are the same. The difference lies in the different encoding methods used when encoding the codewords, and in the process of at least using context coding, specifically, in the process of encoding a specific quantized residual codeword for each piece of attribute information, there is also a process of also using bypass coding for a portion of the codeword of the quantized residual.
[0456] The following describes the specific process of encoding the current point. In the embodiment of the present application, the attribute information to be encoded can be color attribute information or reflectivity attribute information, or other attribute information, which is not limited in the embodiment of the present application. The following description uses color attribute information and reflectivity attribute information as examples.
[0457] In some embodiments of the present application, the attribute information to be encoded includes: color attribute information; the color attribute information includes: a first color component, a second color component, and a third color component; the quantization residual includes: a first quantization residual of the first color component, a second quantization residual of the second color component, and a third quantization residual of the third color component.
[0458] In some embodiments of the present application, when the first quantization residual, the second quantization residual, and the third quantization residual are not all zero, encoding the quantization residual of the current point includes S601 to S603:
[0459] S601 : When the first quantized residual is not a first value, encode the first quantized residual, the second quantized residual, and the third quantized residual respectively.
[0460] In the embodiment of the present application, the first value may be 0.
[0461] In the embodiment of the present application, when the first quantization residual is not 0, the first quantization residual, the second quantization residual, and the third quantization residual are encoded respectively.
[0462] In some embodiments of the present application, second syntax element information of the first color component is determined based on the first quantized residual, and the second syntax element information is encoded.
[0463] It should be noted that during the encoding process, before encoding the quantized residual, the encoder needs to use the first context coding resource and the second context coding resource to determine whether the encoding method is a context coding method or a bypass coding method, and then use the context coding method or the bypass coding method to compile the codeword or syntax element information after the quantized residual is binarized.
[0464] In an embodiment of the present application, the second syntax element information indicates whether the first quantization residual of the first color component of the point to be encoded (i.e., the current point) is equal to 0. The second syntax element information may represent a color_first_comp_zero flag. The color_first_comp_zero flag may be a flag indicating whether the first quantization residual of the first color component is 0.
[0465] In an embodiment of the present application, the value of the second syntax element information may be a first preset value or a second preset value.
[0466] In some embodiments of the present application, if the first quantization residual of the first color component is not the first value (0), the information representing the second syntax element is a first preset value (0 or false); if the first quantization residual of the first color component is the first value (0), the information representing the second syntax element is a second preset value (1 or true).
[0467] In the embodiment of the present application, the first preset value and the second preset value are different, and the first preset value and the second preset value can be in parameter form or in digital form, which is not specifically limited here.
[0468] The second syntax element information may be a parameter written in a profile, or may be a value of a flag, which is not specifically limited here.
[0469] For example, taking flag as an example, there are two ways to set flag: enable flag (enable_flag) and disable flag (disable_flag). Assume that the value of the enable flag is the second preset value and the value of the disable flag is the first preset value; then for the first preset value and the second preset value, the first preset value can be set to 0 and the second preset value can be set to 1; or, the second preset value can also be set to true (true) and the first preset value can also be set to false (false); however, this embodiment of the present application does not specifically limit this. In this embodiment of the present application, 0 and 1 are used to represent the second syntax element information to complete the binarization of the first quantized residual.
[0470] S602: When the first quantized residual is a first value and the second quantized residual is not the first value, encode the second quantized residual and the third quantized residual respectively.
[0471] In an embodiment of the present application, when the encoder determines that the first quantization residual is zero, it needs to continue to determine whether the second quantization residual is zero. When the second quantization residual is not zero, the encoder directly encodes the second quantization residual and the third quantization residual.
[0472] It should be noted that during the encoding process, the color_first_comp_zero flag represented by the second syntax element information is 1, which implements binarization of the first quantized residual and writes it into the bitstream for the decoder to determine that the decoded value of the first quantized residual is zero.
[0473] In some embodiments of the present application, if the second quantized residual of the second color component is not the first value (0), the information representing the third syntax element is the first preset value (0 or false); if the second quantized residual of the second color component is the first value, the information representing the third syntax element is the second preset value (1 or true).
[0474] In the embodiment of the present application, when the first quantization residual is 0 and the second quantization residual is not 0, the second quantization residual and the third quantization residual are encoded separately.
[0475] In some embodiments of the present application, when the first quantized residual is a first value, third syntax element information (color_second_comp_zero) of the second color component is determined based on the second quantized residual, and the third syntax element information is encoded.
[0476] S603 : When the first quantized residual is the first value and the second quantized residual is the first value, encode the third quantized residual.
[0477] In an embodiment of the present application, when the encoder determines that the first quantization residual of the first color component is zero, it needs to determine whether the second quantization residual is zero again to determine which quantization residuals need to be encoded subsequently. When the encoder's second quantization residual is the first value, that is, zero, because the first quantization residual, the second quantization residual, and the third quantization residual are not all zero, the third quantization residual of the third color component is non-zero, and the encoder needs to encode the third quantization residual.
[0478] In the embodiment of the present application, when the first quantized residual and the second quantized residual are 0, the third quantized residual is encoded.
[0479] It can be understood that although the encoding process or principle for the current point is consistent, since the encoder can use different encoding methods for the encoded codewords in the encoding process after comparing the first context coding resource with the second context coding resource, the encoding process can be based on different situations and use different combinations of encoding methods for encoding, thereby improving the flexibility of encoding.
[0480] It should be noted that the principles for encoding the first, second, and third quantized residuals are the same; the difference lies in the specific information of the color components and quantized residuals. Therefore, the following uses the current color component representing any color component and the current quantized residual representing the quantized residual corresponding to any color component as an example to illustrate the encoding process of the quantized residual of each color component.
[0481] In the embodiment of the present application, the encoding value of the quantized residual is the absolute value of the quantized residual, or the value obtained by subtracting a fifth preset value from the absolute value of the quantized residual. In the embodiment of the present application, the fifth preset value may be 1.
[0482] The coded value of the quantized residual of the color attribute information is the absolute value of the quantized residual of each color component, or the value obtained by subtracting the fifth preset value from the absolute value of the quantized residual. The coded value of the quantized residual of the reflectivity attribute information is the absolute value of the quantized residual.
[0483] It should be noted that the encoded value of the quantized residual corresponding to the first non-zero color component in the quantized residual of the color attribute information may be the value obtained by subtracting the fifth preset value from the absolute value of the quantized residual; alternatively, the encoded value of the quantized residual corresponding to any non-zero color component in the quantized residual of the color attribute information may be the value obtained by subtracting the fifth preset value from the absolute value of the quantized residual; alternatively, the quantized residuals of the color attribute information may all be the absolute values of the quantized residuals. This is not limited in the embodiments of the present application.
[0484] It can be understood that the process of encoding the quantized residual by the encoder as the absolute value minus the fifth preset value and then encoding it can save encoding code words and improve encoding efficiency.
[0485] It should be noted that in an embodiment of the present application, the process of encoding any color component among the first color component, the second color component and the third color component can first determine the encoding value of any color component (the absolute value of the quantization residual of any color component minus the fifth preset value, or the absolute value of the quantization residual of any color component), and then encode the encoding value corresponding to the color component.
[0486] In some embodiments of the present application, the current color component is any one of the first color component, the second color component, and the third color component; the current quantization residual is the encoded value of any one of the first quantization residual, the second quantization residual, and the third quantization residual; and the current quantization residual corresponds to the current color component.
[0487] In some embodiments of the present application, encoding the current quantized residual of the current color component includes:
[0488] When the current quantization residual is the first value (0), the fourth syntax element information (color_level_equal_zero) of the current color component is determined to be a second preset value (1 or true), and the fourth syntax element information is encoded; the fourth syntax element information represents whether the current quantization residual is the first value (0).
[0489] It should be noted that when the fourth syntax element information is the second preset value (1 or true), the value representing the current quantization residual is the first value. Therefore, there is no need to continue to use other encoding rules to continue encoding the current quantization residual, and the encoding of the fourth syntax element information is completed.
[0490] In some embodiments of the present application, when the current quantization residual is the second value (1), the fourth syntax element information (color_level_equal_zero) is determined to be a first preset value (0 or false), and the fifth syntax element information (color_level_equal_one) is determined to be a second preset value (1 or true); and the fourth syntax element information and the fifth syntax element information are encoded; the fifth syntax element information represents whether the current quantization residual is the second value.
[0491] It should be noted that when the fifth syntax element information is the second preset value (1 or true), the value representing the current quantization residual is the second value. Therefore, there is no need to continue to use other encoding rules to continue encoding the current quantization residual, and the encoding of the fourth syntax element information and the fifth syntax element information that have been determined is completed.
[0492] In some embodiments of the present application, when the current quantized residual is not the second value (1) and the first value (0), the fourth syntax element information (color_level_equal_zero) is determined to be the first preset value (0 or false), and the fifth syntax element information (color_level_equal_one) is determined to be the first preset value (0 or false).
[0493] In some embodiments of the present application, based on the current quantized residual, six syntax element information (color_level_parity) and seventh syntax element information are determined; the sixth syntax element information represents the parity of the encoded value of the current quantized residual; the seventh syntax element information represents whether the quotient of the encoded value of the current quantized residual minus a third preset value (for example, 2) and then divided by two is a first target value (for example, 0); the seventh syntax element information includes: M syntax element information; wherein M is a positive integer greater than or equal to 1.
[0494] It should be noted that when the current quantization residual is neither 0 nor 1, the parity of the current quantization residual is determined based on the remainder when the current quantization residual is divided by 2. If the remainder when the current quantization residual is divided by 2 is 0, the current quantization residual is determined to be an even number; if the remainder when the current quantization residual is divided by 2 is 1, the current quantization residual is determined to be an odd number. The sixth syntax element information is determined based on the parity of the current quantization residual.
[0495] In the embodiment of the present application, the sixth syntax element information may represent a flag bit of color_level_parity.
[0496] In the embodiment of the present application, the value of the sixth syntax element information, that is, the value of the flag bit of color_level_parity, can be a first preset value or a second preset value. There is no limitation on how the first preset value and the second preset value express odd and even.
[0497] Exemplarily, when the current quantization residual is an even number, the sixth syntax element information is a first preset value; when the current quantization residual is an odd number, the sixth syntax element information is a second preset value. Alternatively, when the current quantization residual is an odd number, the sixth syntax element information is the first preset value; when the current quantization residual is an even number, the sixth syntax element information is the second preset value.
[0498] In some embodiments of the present application, when any syntax element information in the seventh syntax element information is a second preset value (1 or true), the fourth syntax element information, the fifth syntax element information, the sixth syntax element information and the seventh syntax element information are encoded.
[0499] It should be noted that when any syntax element information in the seventh syntax element information is the second preset value (1 or true), the quotient of the value representing the current quantized residual minus the third preset value and then divided by two is the first target value. Therefore, there is no need to continue to use other encoding rules to continue encoding the current quantized residual, and the encoding of the fourth syntax element information, the fifth syntax element information, the sixth syntax element information, and the seventh syntax element information is completed.
[0500] In some embodiments of the present application, when the seventh syntax element information is all the first preset value (0 or false), the eighth syntax element information (color_level_minus4_div2) is determined based on the current quantized residual; the eighth syntax element information represents the quotient of the encoded value of the current quantized residual minus the fourth preset value and then divided by two; wherein the fourth preset value is the initial value plus 2(M-1).
[0501] In some embodiments of the present application, the fourth syntax element information, the fifth syntax element information, the sixth syntax element information, the seventh syntax element information, and the eighth syntax element information are encoded.
[0502] It should be noted that when the seventh syntax element information is all the first preset value (0 or false), the representation encoder needs to continue to use other coding rules to continue the encoding process. The encoder determines the quotient of the current quantized residual coding value minus the fourth preset value and then divided by two to obtain the eighth syntax element information, and uses the second-order exponential Golomb coding (the binarization method is not limited here) to perform binarization encoding on the eighth syntax element information.
[0503] The encoder completes encoding of the determined fourth syntax element information, fifth syntax element information, sixth syntax element information, seventh syntax element information, and eighth syntax element information.
[0504] In the embodiment of the present application, the second to eighth syntax element information corresponding to each color component is a codeword corresponding to the quantized residual corresponding to each color component.
[0505] In some embodiments of the present application, the sixth syntax element information (color_level_parity) is determined according to a remainder obtained by dividing the current quantized residual by 2.
[0506] In the embodiment of the present application, the sixth syntax element information represents the parity of the coded value of the current quantized residual.
[0507] Exemplarily, if the current quantization residual is 2, the sixth syntax element information is 0; if the current quantization residual is 5, the sixth syntax element information is 1.
[0508] In some embodiments of the present application, the first target value is a natural number greater than or equal to 0; the number of the first target values is M; and the first target value corresponds to M syntax element information.
[0509] In some embodiments of the present application, determining seventh syntax element information based on the current quantized residual includes:
[0510] When a quotient of the current quantized residual obtained by subtracting the third preset value and dividing by two is the i-th first target value, determining that the i-th syntax element information corresponding to the i-th first target value is the second preset value; where i is a positive integer greater than or equal to 1 and less than M;
[0511] When a quotient of the current quantized residual obtained by subtracting the third preset value and then dividing by two is not the i-th first target value, determining the i-th syntax element information corresponding to the i-th first target value to be the first preset value;
[0512] Continue determining the value of the (i+1)th syntax element information until the jth syntax element information is determined to be the second preset value; or until the value of the Mth syntax element information is determined; where j is a positive integer greater than i and less than or equal to M;
[0513] When the j-th syntax element information is the second preset value, it is determined that the j+1-th syntax element information to the M-th syntax element information are all the first preset values.
[0514] When the quotient of the current quantized residual subtracting the third preset value and dividing it by two is the i-th first target value, the i-th syntax element information (color_level_minus2_div2_eq0, etc.) corresponding to the i-th first target value is determined to be the second preset value; where i is a positive integer greater than or equal to 1 and less than M.
[0515] In an embodiment of the present application, the first target value is a natural number greater than or equal to 1. For example, the first target value is 0, 1, 2, 3, 4, etc. This application does not impose any limitation on this.
[0516] When i=5, it is as follows:
[0517] Exemplarily, the third preset value is 2, the first target value is 0, and if the quotient of the current quantized residual coding value minus 2 and then divided by two is 0, the corresponding syntax element information color_level_minus2_div2_eq0 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0518] Exemplarily, the third preset value is 2, the first target value is 1, and if the quotient of the current quantized residual coding value minus 2 and then divided by two is 1, the corresponding syntax element information color_level_minus2_div2_eq1 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0519] Exemplarily, the third preset value is 2, the first target value is 2, if the quotient of the current quantized residual coding value minus 2 and then divided by 2 is 2, then the corresponding syntax element information color_level_minus2_div2_eq2 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0520] Exemplarily, the third preset value is 2, the first target value is 3, and if the quotient of the current quantized residual coding value minus 2 and then divided by two is 3, the corresponding syntax element information color_level_minus2_div2_eq3 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0521] Exemplarily, the third preset value is 2, the first target value is 4, and if the quotient of the current quantized residual coding value minus 2 and then divided by two is 4, the corresponding syntax element information color_level_minus2_div2_eq4 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0522] It should be noted that the "minus" number is the third preset value. The "eq" number is the first target value. The "div" number is the divisor. While the embodiment herein uses division by two as an example, i.e., the divisor is 2, this application does not limit the divisor value, as long as it is consistent with the principles used by the decoder during decoding.
[0523] In some embodiments of the present application, when the quotient of the current quantized residual obtained by subtracting a third preset value and then dividing it by two is not the i-th first target value, the i-th syntax element information corresponding to the i-th first target value (for example, color_level_minus2_div2_eqX, where X is the i-th first target value) is determined to be the first preset value; the value of the i+1-th syntax element information is continued to be determined until the j-th syntax element information is determined to be the second preset value; or until the value of the M-th syntax element information is determined; where j is a positive integer greater than i and less than or equal to M.
[0524] In some embodiments of the present application, when the jth syntax element information is the second preset value, it is determined that the j+1th syntax element information to the Mth syntax element information are all the first preset values.
[0525] It should be noted that, at most one syntax element information among the M syntax element information is true, or, all the M syntax element information are false. That is to say, the current quantization residual may be one of the M first target values, or, the current quantization residual is not a value among the M first target values. The encoder can first determine whether the currently encoded quantization residual is one of the M first target values. If so, the syntax element information corresponding to the first target value among the M syntax element information will be determined as the second preset value based on the current quantization residual, and the other syntax element information will be the first preset value. If none of the currently encoded quantization residuals are values among the M first target values, then the M syntax element information of the encoder are all first preset values, and the eighth syntax element information will continue to be determined based on the current quantization residual.
[0526] In some embodiments of the present application, the first syntax element information to be encoded includes at least one of the following: second syntax element information, third syntax element information, fourth syntax element information corresponding to each color component, fifth syntax element information corresponding to each color component, sixth syntax element information corresponding to each color component, seventh syntax element information corresponding to each color component, and first N information of eighth syntax element information corresponding to each color component, where N is a positive integer greater than 1.
[0527] Exemplarily, when N is 4, when the attribute information to be encoded is color attribute information, and the color attribute information includes a first color component, a second color component, and a third color component, the first syntax element information to be encoded includes one second syntax element information, one third syntax element information, three fourth syntax element information, three fifth syntax element information, three sixth syntax element information, three seventh syntax element information, and the first four of the three eighth syntax element information in the attribute information to be encoded of the current point.
[0528] In some embodiments of the present application, the second syntax element information to be encoded includes: information other than the first N information in the eighth syntax element information corresponding to each color component.
[0529] It should be noted that it can be predetermined in advance, and N can be written into the code stream.
[0530] Exemplarily, when N is 4, the second syntax element information to be encoded is information other than the first 4 pieces of information in the eighth syntax element information corresponding to each color component.
[0531] In some embodiments of the present application, the number of second context coding resources is the total number of coding resources occupied by the first N pieces of information: the second syntax element information, the third syntax element information, the fourth syntax element information corresponding to each color component, the fifth syntax element information corresponding to each color component, the sixth syntax element information corresponding to each color component, the seventh syntax element information corresponding to each color component, and the eighth syntax element information corresponding to each color component.
[0532] Exemplarily, when N is 4, and the attribute information to be encoded is color attribute information, and the color attribute information includes a first color component, a second color component, and a third color component, the second context coding resource includes one second syntax element information, one third syntax element information, three fourth syntax element information, three fifth syntax element information, three sixth syntax element information, three seventh syntax element information (including one syntax element information), and the first four of the three eighth syntax element information. That is, the number of second context coding resources is 26.
[0533] Exemplarily, when N is 4, and the attribute information to be encoded is color attribute information, and the color attribute information includes a first color component, a second color component, and a third color component, the second context coding resource includes one second syntax element information, one third syntax element information, three fourth syntax element information, three fifth syntax element information, three sixth syntax element information, three seventh syntax element information (including five syntax element information), and the first four of the three eighth syntax element information. That is, the number of second context coding resources is 38.
[0534] It is understood that during the encoding process of the eighth syntax element information, if the first context decoding resource at the current point encoding is greater than or equal to the second context coding resource, the encoder may use context coding for some codewords (e.g., the first N codewords) of the eighth syntax element information, and bypass coding for another portion of the codewords. Since bypass coding has a higher throughput than context coding, the combination of bypass coding and context coding can improve throughput, thereby improving coding efficiency.
[0535] In some embodiments of the present application, if the number of codewords encoding the eighth syntax element information is less than N, the eighth syntax element information is encoded entirely using context coding.
[0536] In some embodiments of the present application, encoding the quantized residual of the current point further includes at least one of the following:
[0537] When encoding the first quantized residual, a sign bit corresponding to the first quantized residual is encoded.
[0538] When encoding the second quantized residual, a sign bit corresponding to the second quantized residual is encoded.
[0539] When encoding the third quantized residual, a sign bit corresponding to the third quantized residual is encoded.
[0540] In the embodiment of the present application, the sign bit of the first quantized residual, the sign bit of the second quantized residual, and the sign bit of the third quantized residual include a positive sign or a negative sign.
[0541] It should be noted that the encoder can obtain and encode the corresponding sign bit of each color component when the quantization residual is non-zero, and may not encode the sign bit when the quantization residual is zero.
[0542] In some embodiments of the present application, the attribute information to be encoded includes: reflectivity attribute information; the attribute information to be encoded includes: reflectivity attribute information; the quantized residual includes: a fourth quantized residual of the reflectivity attribute information.
[0543] In some embodiments of the present application, when the fourth quantized residual is non-zero, encoding the quantized residual of the current point includes S701 to S704:
[0544] S701. Determine, based on the fourth quantized residual, ninth syntax element information (abs_level_minus1_parity) and tenth syntax element information; the ninth syntax element information represents the parity of the coded value of the fourth quantized residual of the reflectivity attribute information; the tenth syntax element information represents whether the quotient of the coded value of the fourth quantized residual minus the sixth preset value and then divided by two is a second target value; wherein the tenth syntax element information includes: H syntax element information; wherein H is a positive integer greater than or equal to 2.
[0545] In an embodiment of the present application, the ninth syntax element information represents the parity of the coding value of the fourth quantized residual of the reflectivity attribute information, that is, the remainder after dividing the coding value of the fourth quantized residual by the sixth preset value by two, wherein the ninth syntax element information can represent the flag bit of abs_level_minus1_parity.
[0546] In some embodiments of the present application, the ninth syntax element information is determined based on a remainder obtained by dividing the coded value of the fourth quantized residual by 2 after subtracting a sixth preset value from the coded value of the fourth quantized residual. If the remainder obtained by dividing the coded value of the fourth quantized residual by 2 is 0, it indicates that the coded value of the fourth quantized residual of the first color component is an odd number; if the remainder obtained by dividing the coded value of the fourth quantized residual by 2 is 1, it indicates that the coded value of the fourth quantized residual of the first color component is an even number.
[0547] In this embodiment of the present application, the ninth syntax element information may be a first preset value or a second preset value.
[0548] Exemplarily, when the encoding value of the fourth quantized residual of the first color component is an odd number, the ninth syntax element information is determined to be a first preset value; when the encoding value of the fourth quantized residual of the first color component is an even number, the ninth syntax element information is determined to be a second preset value. Alternatively, when the encoding value of the fourth quantized residual of the first color component is an even number, the ninth syntax element information is determined to be a first preset value; when the encoding value of the fourth quantized residual of the first color component is an odd number, the ninth syntax element information is determined to be a second preset value. This is not limited in the present embodiment.
[0549] In the embodiment of the present application, the tenth syntax element information represents whether the quotient of the coding value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value.
[0550] In the embodiment of the present application, the sixth preset value is a pre-set value, for example, the sixth preset value is 1.
[0551] Exemplarily, when the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is not the second target value, the tenth syntax element information is determined to be the first preset value; when the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value, the tenth syntax element information is determined to be the second preset value.
[0552] S702: When any syntax element information in the tenth syntax element information has a second preset value (1 or true), encode the ninth syntax element information and the tenth syntax element information.
[0553] In some embodiments of the present application, the second target value is a natural number greater than or equal to 0; the number of the second target values is H; and the second target value corresponds to H syntax element information.
[0554] In some embodiments of the present application, when the quotient of the encoded value of the fourth quantized residual subtracted from the sixth preset value and then divided by two is the nth second target value, the nth syntax element information (abs_level_minus1_div2_eq0, etc.) corresponding to the nth second target value is determined to be the second preset value; wherein n is a positive integer greater than or equal to 1 and less than H.
[0555] In some embodiments of the present application, when the nth syntax element information (abs_level_minus1_div2_eq0, etc.) is a first preset value, the value of the n+1th syntax element information continues to be determined until the hth syntax element information is determined to be a second preset value; or until the value of the Hth syntax element information is determined; where h is a positive integer greater than n and less than or equal to H.
[0556] In some embodiments of the present application, when the hth syntax element information is a second preset value (1 or true), it is determined that the h+1th syntax element information to the Hth syntax element information are all first preset values (0 or false).
[0557] Exemplarily, the quotient of the coding value of the fourth quantized residual minus the sixth preset value and then divided by two is 0, 1, 2, 3, 4, 5, 6, etc., and this application does not impose any limitation on this.
[0558] In this embodiment of the present application, the second target value corresponds to H syntax element information in the tenth syntax element information, that is, the second target value corresponds one-to-one to each syntax element information in the tenth syntax element information.
[0559] When n=6, it is as follows:
[0560] Exemplarily, the sixth preset value is 1 and the second target value is 0. If the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 0, then the corresponding syntax element information abs_level_minus1_div2_eq0 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0561] Exemplarily, the sixth preset value is 1, the second target value is 1, if the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 1, then the corresponding syntax element information abs_level_minus1_div2_eq1 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0562] Exemplarily, the sixth preset value is 1, the second target value is 2, and if the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 2, then the corresponding syntax element information abs_level_minus1_div2_eq2 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0563] Exemplarily, the sixth preset value is 1, the second target value is 3, and if the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 3, then the corresponding syntax element information abs_level_minus1_div2_eq3 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0564] Exemplarily, the sixth preset value is 1, the second target value is 4, if the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 4, then the corresponding syntax element information abs_level_minus1_div2_eq4 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0565] Exemplarily, the sixth preset value is 1, the second target value is 5, if the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 5, then the corresponding syntax element information abs_level_minus1_div2_eq5 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0566] Exemplarily, the sixth preset value is 1, the second target value is 6, if the quotient of the encoded value of the fourth quantized residual minus the sixth preset value and then divided by two is 6, then the corresponding syntax element information abs_level_minus1_div2_eq6 is determined to be the second preset value (1 or true), otherwise it is the first preset value.
[0567] It should be noted that the "minus" number is the sixth preset value. The "eq" number is the second target value. The "div" number is the divisor. While the embodiment herein uses division by two as an example, i.e., the divisor is 2, this application does not limit the divisor value, as long as it is consistent with the principles used by the encoder during encoding.
[0568] S703: When the tenth syntax element information is all the first preset value, determine the eleventh syntax element information based on the fourth quantized residual; the eleventh syntax element information represents the quotient of the coded value of the fourth quantized residual minus the seventh preset value divided by two; wherein the seventh preset value is the initial value plus 2(H-2);
[0569] S704: Encode the ninth syntax element information, the tenth syntax element information, and the eleventh syntax element information.
[0570] In the embodiment of the present application, when the tenth syntax element information is all the first preset value (0 or false), it is necessary to continue to determine the eleventh syntax element information based on the encoding value of the fourth quantized residual.
[0571] In the embodiment of the present application, the seventh preset value is related to the number (H) of syntax element information included in the tenth syntax element information.
[0572] In the embodiment of the present application, the seventh preset value is the initial value plus 2 (H-2). For example, if the initial value is 5 and H is 2, the seventh preset value is 5+2(2-2)=5; if the initial value is 5 and H is 7, the seventh preset value is 5+2(7-2)=15.
[0573] It should be noted that when the seventh preset value is Y, it is expressed as minus Y. Y=initial value plus 2 (Y-2).
[0574] In an embodiment of the present application, when the seventh preset value is 5, the eleventh syntax element information represents the quotient of the encoded value of the fourth quantized residual minus 5 and divided by two, which can be expressed as the value of the flag bit of abs_level_minus5_div2; when the seventh preset value is 15, the eleventh syntax element information represents the quotient of the encoded value of the fourth quantized residual minus 15 and divided by two, which can be expressed as the value of the flag bit of abs_level_minus15_div2.
[0575] In the embodiment of the present application, after determining the syntax element information, the encoder encodes the ninth syntax element information, the tenth syntax element information, and the eleventh syntax element information.
[0576] It should be noted that, in the process of encoding the eleventh syntax element information, if the first context coding resource at the current point coding is greater than or equal to the second context coding resource, the encoder may use context coding for part of the codewords of the eleventh syntax element information (for example, the first K codewords), and bypass coding for the remaining part of the codewords.
[0577] In some embodiments of the present application, the first syntax element information to be encoded includes at least one of the following: ninth syntax element information, tenth syntax element information, and first K pieces of information of eleventh syntax element information, where K is a positive integer greater than 1;
[0578] In some embodiments of the present application, the second syntax element information to be encoded includes: information other than the first K information in the eleventh syntax element information.
[0579] In the embodiment of the present application, K is a preset value, for example, K is 4.
[0580] In the embodiment of the present application, K represents the number of codewords.
[0581] It should be noted that K can be predetermined in advance and can be written into the code stream.
[0582] Exemplarily, when K is 4, when the attribute information to be encoded is reflectivity attribute information, the first syntax element information to be encoded includes a ninth syntax element information, a tenth syntax element information, and the first four information in the eleventh syntax element information in the attribute information to be encoded at the current point.
[0583] Exemplarily, when K is 4, the second syntax element information to be encoded is the information in the eleventh syntax element information except the first four information.
[0584] In some embodiments of the present application, the number of second context coding resources is the total number of coding resources occupied by the ninth syntax element information, the tenth syntax element information, and the first K pieces of information of the eleventh syntax element information.
[0585] Exemplarily, when K is 4, when the attribute information to be encoded is reflectivity attribute information, the second context coding resource includes one ninth syntax element information, one tenth syntax element information (including two syntax elements), and the first four pieces of information of the eleventh syntax element information. That is, the number of second context coding resources is seven.
[0586] Exemplarily, when K is 4, when the attribute information to be encoded is reflectivity attribute information, the second context coding resource includes one ninth syntax element information, one tenth syntax element information (including seven syntax elements), and the first four pieces of information of the eleventh syntax element information. That is, the number of second context coding resources is 12.
[0587] It is understood that during the encoding process of the eleventh syntax element information, if the first context coding resource during the current point coding is greater than or equal to the second context coding resource, the encoder may use context coding for a portion of the codewords of the eleventh syntax element information (e.g., the first K codewords) and bypass coding for another portion of the codewords. Since bypass coding has a higher throughput than context coding, combining bypass coding and context coding can improve throughput, thereby improving coding efficiency.
[0588] In some embodiments of the present application, if the number of codewords encoding the eleventh syntax element information is less than K, the eleventh syntax element information is encoded entirely using context coding.
[0589] In some embodiments of the present application, after determining each first syntax element to be encoded, the coding resources occupied by the first syntax element to be encoded are subtracted from the first context coding resources to obtain the latest first context coding resources. The latest first context coding resources are used in the encoding process of the next point. In other words, the first context coding resources allocated to the next point are obtained.
[0590] Exemplarily, after encoding the second syntax element information color_first_comp_zero, a remBinsPass1 operation is performed.
[0591] In some embodiments of the present application, the initial first context coding resource is written into the codestream.
[0592] In some embodiments of the present application, at least one of the following is performed:
[0593] Writing the latest first context coding resource corresponding to each point in the coding process into the bitstream;
[0594] Writing the second context coding resource into a bitstream;
[0595] Write N into the code stream;
[0596] Write K into the bitstream.
[0597] Exemplarily, the latest first context coding resources corresponding to each point in the encoding process are written into the bitstream. After determining each first syntax element to be encoded, the decoding resources occupied by the first syntax element to be encoded are subtracted from the first context coding resources, for example, by performing a remBinsPass1-- operation, thereby obtaining the latest first context coding resources, and writing the latest first context coding resources into the bitstream.
[0598] In some embodiments of the present application, the second context coding resource is written into the bitstream. Exemplarily, a preset value of the second context coding resource (T=26) is written into the bitstream.
[0599] It should be noted that the latest first context coding resources, N and K corresponding to each point in the encoding process can also be agreed upon by the decoder and the encoder, and not written into the bitstream, so as to reduce the transmission bit rate.
[0600] In an embodiment of the present application, on the one hand, by parsing the bitstream to determine the first syntax element information of the attribute information to be decoded at the current point, the decoder uses a bypass decoding method to decode the attribute information to be decoded at the current point when the allocated first context decoding resource is less than the preset second context decoding resource, thereby improving the decoder's hardware throughput and thus the decoder's decoding efficiency. On the other hand, by determining the first context coding resource allocated to the current point, the encoder uses a bypass coding method to encode the quantized residual of the current point when the first context coding resource is less than the preset second context coding resource, thereby improving the encoder's hardware throughput and thus the encoder's coding efficiency.
[0601] It should be noted that the point cloud encoding method provided in the embodiment of the present application is the corresponding side method of the point cloud decoding method. For the parts with the same principles, you can refer to the relevant description of the point cloud decoding method in the embodiment of the present application, which will not be repeated here.
[0602] The above point cloud encoding and decoding method is explained in detail below in some specific embodiments.
[0603] Example 1:
[0604] In the embodiments of the present application, when the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, the encoding end (encoder) encodes the quantization residual of the color attribute (color attribute information) of the point to be encoded (current point), including the following steps:
[0605] Step 1: The encoder allocates a codeword budget (first syntax element information) remBinsPass1 based on context coding for the quantization residual of the color attribute of the point to be encoded. For example, the initial value can be set to 2 24 ;
[0606] Step 2: Before starting to encode the quantization residual of the color attribute of the point to be encoded, the encoder needs to determine whether remBinsPass1 is greater than or equal to T (second context decoding resource), where T is a pre-set value (for example, T is 26);
[0607] Step 3: When remBinsPass1 ≥ T, the encoder uses context-based coding for the first 4 (N pieces of information) codewords (a total of 12 codewords) after binarization of one possible color_first_comp_zero flag bit (second syntax element information), one color_second_comp_zero flag bit (third syntax element information), three color_level_equal_zero flag bits (fourth syntax element information), three color_level_equal_one flag bits (fifth syntax element information), three color_level_parity flag bits (sixth syntax element information), three color_level_minus_ two_div2_eq0 flag bits (seventh syntax element information), and the first 4 codewords of the color_level_minus4_div2 flag bits of the three components (eighth syntax element information). And after encoding each codeword, perform the operation of remBinsPass1-- (subtract 1 from the first context decoding resource), while the codewords after the first 4 codewords after binarization of the color_level_minus4_div2 of the three components are encoded using the bypass coding method;
[0608] Step 4: When remBinsPass1 < T, the encoder encodes all the binarized codewords of the quantization residual of the color attribute of the point to be encoded using the bypass coding method.
[0609] In an embodiment of the present application, when the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, the decoding end (decoder) decodes the quantization residual of the color attribute of the point to be decoded, including the following steps:
[0610] Step 1: The decoder allocates a codeword budget remBinsPass1 based on context decoding for the quantization residual of the color attribute of the point to be decoded (for example, the initial value can be set to 2 24 );
[0611] Step 2: Before starting to decode the quantization residual of the color attribute of the point to be encoded, the decoder needs to determine whether remBinsPass1 is greater than or equal to T, where T is a pre-set value (for example, T is 26);
[0612] Step 3: When remBinsPass1 ≥ T, the decoder performs context-based decoding on the first 4 (N) codewords (a total of 12 codewords) after binarization of one possible color_first_comp_zero flag bit (second syntax element information), one color_second_comp_zero flag bit (third syntax element information), three color_level_equal_zero flag bits (fourth syntax element information), three color_level_equal_one flag bits (fifth syntax element information), three color_level_parity flag bits (sixth syntax element information), three color_level_minus2_div2_eq0 flag bits (seventh syntax element information), and the first 4 codewords of the color_level_minus4_div2 flag bits of the three components (eighth syntax element information), and for each decoded codeword, perform the operation of remBinsPass1-- (subtract 1 from the first context decoding resource), while the codewords after the first 4 codewords of the binarized color_level_minus4_div2 of the three components are decoded using the bypass decoding method;
[0613] Step 4: When remBinsPass1 < T, the decoder decodes all the binarized codewords of the quantization residual of the color attribute of the point to be decoded using the bypass decoding method.
[0614] In an embodiment of the present application, the syntax table description of the decoder decoding the quantization residual of the color attribute of the point to be decoded is shown in Table 1, where the bold font indicates the syntax elements to be parsed.
[0615] Table 1
[0616] In the embodiment of the present application, the syntax table description of the decoding process of the quantization residuals (to-be-decoded values) (the first quantization residual, the second quantization residual, or the third quantization residual) of each color component by the decoder is shown in Table 2, where the bold font indicates the syntax elements that need to be parsed.
[0617] Table 2
[0618] As shown in Table 1, when the quantization residuals of the three color components of the to-be-decoded point are not all zero, the decoder decodes the quantization residuals of the color components of the to-be-encoded point (the current point), including the following steps:
[0619] Step 1: The decoder allocates a context-based decoding codeword budget (the first syntax element information) remBinsPass1 (for example, the initial value can be set to 2 24 ) for the quantization residuals (the first quantization residual, the second quantization residual, or the third quantization residual) of the color attribute of the to-be-decoded point;
[0620] Step 2: Before starting to decode the quantization residuals of the color attribute of the to-be-decoded point, the decoder needs to determine whether remBinsPass1 is greater than or equal to T (the preset second context decoding resource), where T is a preset value (for example, T is 26); if remBinsPass1 ≥ T, then execute Steps 3 to 7; if remBinsPass1 < T, then execute Steps 8 to 12;
[0621] Step 3: Decode the "color_first_comp_zero" flag bit (the second syntax element information) in a context-based decoding manner. If the "color_first_comp_zero" flag bit is 1 (the second preset value), it means that the quantization residual (the first quantization residual) of the first color component of the to-be-decoded point is 0 (the first value), and the codeword budget remBinsPass1 is decremented by 1, and then continue to execute Step 4; if the "color_first_comp_zero" flag bit is 0 (the first preset value), it means that the quantization residual of the first color component of the to-be-encoded point is not 0, remBinsPass1 is decremented by 1, and then continue to execute Step 7;
[0622] Step 4: Decode the "color_second_comp_zero" flag (third syntax element information) using a context-based decoding method, subtract 1 from remBinsPass1, and if the "color_second_comp_zero" flag is 1 (the second preset value), it indicates that the quantization residual (second quantization residual) of the second color component of the point to be encoded is 0, and proceed to step 5; if the "color_second_comp_zero" flag is 0 (the first preset value), it indicates that the quantization residual of the second color component of the point to be encoded is not 0, and proceed to step 6;
[0623] Step 5: Decoding the quantized residual of the third color component using a context-based decoding method and a bypass decoding method, thereby completing the decoding of the quantized residual of the color attribute of the point to be decoded;
[0624] Step 6: Decode the quantized residual of the second color component using a context-based decoding method and a bypass decoding method, and decode the quantized residual of the third color component using a context-based decoding method and a bypass decoding method. The quantized residual decoding of the color attribute of the point to be decoded is completed.
[0625] Step 7: Decode the quantized residual of the first color component using the context-based decoding method and the bypass decoding method, decode the quantized residual of the second color component using the context-based decoding method and the bypass decoding method, and decode the quantized residual of the third color component (third quantized residual) using the context-based decoding method and the bypass decoding method. The quantized residual decoding of the color attribute of the point to be decoded is completed.
[0626] Among them, when remBinsPass1≥T, in combination with Table 2, the decoding process of the color component to be decoded (the first quantized residual, the second quantized residual, or the third quantized residual) (i.e., the value to be decoded or the current quantized residual) of each point to be decoded includes the following steps:
[0627] a) decoding the "color_level_equal_zero" flag (fourth syntax element information) using a context-based decoding method; if the "color_level_equal_zero" flag is 1 (second preset value), the value to be decoded is 0 (first value), and decoding of the value to be decoded is completed; if the "color_level_equal_zero" flag is 0 (first preset value), executing step b);
[0628] b) decoding the "color_level_equal_one" flag (fifth syntax element information) using a context-based decoding method; if the "color_level_equal_one" flag is 1 (second preset value), the value to be decoded is 1 (second value), and decoding of the value to be decoded is completed; if the "color_level_equal_one" flag is 1 (second preset value), executing step c);
[0629] c) decoding the "color_level_parity" flag (sixth syntax element information) and the "color_level_minus2_div2_eq0" flag (seventh syntax element information) in a context-based decoding manner; if the "color_level_minus2_div2_eq0" flag is 1 (second preset value), indicating that the quotient of the value to be decoded minus 2 (third preset value) and then divided by 2 is equal to 0 (first target value), then the value to be decoded is (third preset value + parity + first target value × 2), that is, the value to be decoded is (2 + parity), where parity represents the remainder indicated by the sixth syntax element information, and decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq0" flag is 0, indicating that the quotient of the value to be decoded minus 1 (third preset value) and then divided by 2 is not equal to 0 (first target value), executing step d;
[0630] d) Use context-based decoding to decode the first four codewords (N) of the "color_level_minus4_div2" flag (eighth syntax element information), and use bypass decoding to decode the codewords after the fourth codeword of the "color_level_minus4_div2" flag, where the 4 in minus4 is the fourth preset value (the initial value plus 2(M-1)), the initial value is 4, M represents the number of seventh syntax element information, M=1, the value to be decoded is (fourth preset value+parity+(color_level_minus4_div2×2)), that is, the value to be decoded is ((4+parity+(color_level_minus4_div2×2))), and the decoding of the value to be decoded is completed.
[0631] Step 8: Decode the "color_first_comp_zero" flag (the second syntax element information) using the bypass decoding method. If the "color_first_comp_zero" flag is 1, it means that the quantization residual of the first color component of the point to be decoded is 0. Decrease the codeword budget remBinsPass1 by 1 and continue with Step 9. If the "color_first_comp_zero" flag is 0 (the first preset value), it means that the quantization residual of the first color component of the point to be encoded is not 0. Decrease remBinsPass1 by 1 and continue with Step 12;
[0632] Step 9: Decode the "color_second_comp_zero" flag (the third syntax element information) using the bypass decoding method. Decrease remBinsPass1 by 1. If the "color_second_comp_zero" flag is 1 (the second preset value), it means that the quantization residual (the first quantization residual) of the second color component of the point to be encoded is 0, and continue with Step 10. If the "color_second_comp_zero" flag is 0, it means that the quantization residual of the second color component of the point to be encoded is not 0, and continue with Step 11;
[0633] Step 10: Decode the quantization residual of the third color component using the bypass decoding method, and the decoding of the quantization residual of the color attribute of the point to be decoded is completed;
[0634] Step 11: Decode the quantization residual of the second color component using the bypass decoding method, and decode the quantization residual of the third color component using the context-based decoding method and the bypass decoding method. The decoding of the quantization residual of the color attribute of the point to be decoded is completed;
[0635] Step 12: Decode the quantization residual of the first color component using the bypass decoding method, decode the quantization residual of the second color component using the bypass decoding method, and decode the quantization residual (the third quantization residual) of the third color component using the bypass decoding method. The decoding of the quantization residual of the color attribute of the point to be decoded is completed.
[0636] Among them, when remBinsPass1 < T, in combination with Table 2, the decoding process of the color component to be decoded (i.e., the value to be decoded or the current quantization residual) for each point to be decoded includes the following steps:
[0637] a) Decode the "color_level_equal_zero" flag (the fourth syntax element information) using bypass decoding. If the "color_level_equal_zero" flag is 1, the value to be decoded is 0, and the decoding of the value to be decoded is completed; if the "color_level_equal_zero" flag is 0, execute step b);
[0638] b) Decode the "color_level_equal_one" flag (fifth syntax element information) using bypass decoding. If the "color_level_equal_one" flag is 1, the value to be decoded is 1, and the decoding of the value to be decoded is completed; if the "color_level_equal_one" flag is 1, execute step c);
[0639] c) Decode the "color_level_parity" flag (sixth syntax element information) and the "color_level_minus2_div2_eq0" flag (seventh syntax element information) using bypass decoding. If the "color_level_minus2_div2_eq0" flag is 1, indicating that the quotient of the value to be decoded minus 2 (the third preset value) and then divided by 2 is equal to 0 (the first target value), then the value to be decoded is (the third preset value + parity + the first target value × 2), that is, the value to be decoded is (2 + parity), and the decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq0" flag is 0, indicating that the quotient of the value to be decoded minus 1 and then divided by 2 is not equal to 0, then execute step d).
[0640] d) Use bypass decoding to decode all codewords of the "color_level_minus4_div2" flag (the eighth syntax element information), where the 4 in minus4 is the fourth preset value (the initial value plus 2(M-1)), the initial value is 4, M=1, and the value to be decoded is (fourth preset value+parity+(color_level_minus4_div2×2)), that is, the value to be decoded is ((4+parity+(color_level_minus4_div2×2))), and the decoding of the value to be decoded is completed.
[0641] Example 2:
[0642] In this embodiment of the present application, when the quantized residual of the reflectivity attribute of the to-be-encoded point (current point) (the fourth quantized residual of the reflectivity attribute information) is non-zero, the encoding end (encoder) encodes the quantized residual of the reflectivity attribute of the to-be-encoded point, including the following steps:
[0643] Step 1: The encoder allocates a context-based coding word budget (the first syntax element) remBinsPass1 (for example, the initial value can be set to 2) for the quantization residual of the reflectivity attribute of the point to be encoded (the fourth quantization residual of the reflectivity attribute). 24 )
[0644] Step 2: Before starting to encode the quantization residual of the reflectivity attribute of the point to be encoded, the encoder needs to determine whether remBinsPass1 is greater than or equal to T (the second context decoding resource), where T is a pre-set value (for example, T is 26).
[0645] Step 3: When remBinsPass1 ≥ T, the encoder uses a context-based coding method for the first 4 (K) codewords after binarization of the possible abs_level_minus1_parity flag bit (the ninth syntax element information), abs_level_minus1_div2_eq0 flag bit (the first syntax element in the tenth syntax element information), abs_level_minus1_div2_eq1 flag bit (the second syntax element in the tenth syntax element information), and abs_level_minu5_div2 flag bit (the eleventh syntax element information). After encoding each codeword, perform the operation of remBinsPass1-- (decrease the first context decoding resource by 1), and use a bypass coding method for the codewords after the first 4 codewords after binarization of abs_level_minu5_div2.
[0646] Step 4: When remBinsPass1 < T, the encoder uses a bypass coding method for all the codewords after binarization of the quantization residual of the reflectivity attribute of the point to be encoded.
[0647] In the embodiment of the present application, when the quantization residual of the reflectivity attribute of the point to be decoded (the current point) (the fourth quantization residual of the reflectivity attribute) is non-zero, the decoding end decodes the quantization residual of the reflectivity attribute of the point to be decoded, including the following steps:
[0648] Step 1: The decoder allocates a context-based decoding word budget (the first syntax element) remBinsPass1 (for example, the initial value can be set to 2) for the quantization residual of the reflectivity attribute of the point to be decoded. 24 )
[0649] Step 2: Before starting to decode the quantization residual of the reflectivity attribute of the point to be decoded, the decoder needs to determine whether remBinsPass1 is greater than or equal to T (the second context decoding resource), where T is a pre-set value (for example, T is 26).
[0650] Step 3: When remBinsPass1 ≥ T, the decoder performs context-based decoding on the first 4 coded words after binarization of the possibly present abs_level_minus1_parity flag (the ninth syntax element information), abs_level_minus1_div2_eq0 flag (the first syntax element in the tenth syntax element information), abs_level_minus1_div2_eq1 flag (the second syntax element in the tenth syntax element information), and abs_level_minu5_div2 flag (the eleventh syntax element information). After decoding each coded word, the operation remBinsPass1-- is performed. For the coded words after the first 4 (K) coded words after binarization of the abs_level_minu5_div2 flag, bypass decoding is used;
[0651] Step 4: When remBinsPass1 < T, the decoder uses bypass decoding for all coded words after binarization of the quantization residuals of the reflectance attribute of the decoding point.
[0652] In the embodiment of the present application, the syntax table description for the decoder to decode the quantization residuals of the reflectance attribute of the decoding point is shown in Table 3. Among them, the bold font indicates the syntax elements that need to be parsed.
[0653] Table 3
[0654] As shown in Table 3, when the quantization residuals of the reflectance attribute of the encoding point (the fourth quantization residuals) are not all zero, the decoder decodes the quantization residuals of the reflectance attribute (reflectance attribute information) of the decoding point (the current point), including the following steps:
[0655] Step 1: The decoder allocates a context-based decoding codeword budget (the first syntax element information) remBinsPass1 (for example, the initial value can be set to 2 24 ) for the quantization residuals of the reflectance attribute of the decoding point (the fourth quantization residuals);
[0656] Step 2: Before starting to decode the quantization residuals of the reflectance attribute of the decoding point, the decoder needs to determine whether remBinsPass1 is greater than or equal to T (the preset second context decoding resource), where T is a preset value (for example, T is 26); if remBinsPass1 ≥ T, then steps 3 to 5 are executed; if remBinsPass1 < T, then steps 6 to 8 are executed;
[0657] Step 3. Decode the "abs_level_minus1_parity" flag (ninth syntax element information) and the "abs_level_minus1_div2_eq0" flag (first syntax element information in the tenth syntax element information) of the value to be decoded using a context-based decoding method. If the "abs_level_minus1_div2_eq0" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (sixth preset value) divided by two is 0 (first second target value), and the value to be decoded is (sixth preset value + parity + (first second target value × 2)). Then, the value to be decoded is (1 + parity), and the decoding of the value to be encoded is completed; if the decoded value of the "abs_level_minus1_div2_eq0" flag is not 1, it indicates that the quotient of the value to be decoded minus 1 divided by two is not 0, and proceed to step 4;
[0658] Step 4. Decode the "abs_level_minus1_div2_eq1" flag of the value to be decoded (the second syntax element information in the tenth syntax element information) using the context-based decoding method. If the decoded value of the "abs_level_minus1_div2_eq1" flag is 1, it means that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by two is 1 (the second second target value), and the value to be decoded is (3+parity); if the decoded value of the "abs_level_minus1_div2_eq1" flag is not 1, it means that the quotient of the value to be decoded minus 1 divided by two is not 1, and continue to step 5;
[0659] Step 5. Use context-based decoding to decode the first four (K) codewords of the "abs_level_minu5_div2" flag (the eleventh syntax element information) of the value to be decoded, and use bypass decoding to decode the codewords after the fourth codeword of the "abs_level_minu5_div2" flag of the value to be decoded, where 5 in minu5 is the seventh preset value, the seventh preset value is the initial value plus 2(H-2), the initial value is 5, H is the number of syntax elements included in the tenth syntax element information, H is 2, the value to be decoded is (seventh preset value + parity + (abs_level_minu5_div2<<1)), then the value to be decoded is (5 + parity + (abs_level_minu5_div2<<1)), and the decoding of the value to be encoded is completed;
[0660] Step 6. Decode the "abs_level_minus1_parity" flag (ninth syntax element information) and the "abs_level_minus1_div2_eq0" flag (first syntax element information in the tenth syntax element information) of the value to be decoded using a bypass decoding method. If the decoded value of the "abs_level_minus1_div2_eq0" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (sixth preset value) divided by two is 0 (first second target value), and the value to be decoded is (sixth preset value + parity + (first second target value × 2)). Then, the value to be decoded is (1 + parity), and decoding of the value to be encoded is completed. If the decoded value of the "abs_level_minus1_div2_eq0" flag is not 1, it indicates that the quotient of the value to be decoded minus 1 divided by two is not 0, and proceed to step 7.
[0661] Step 7: Decode the "abs_level_minus1_div2_eq1" flag of the value to be decoded (the second syntax element information in the tenth syntax element information) using bypass decoding. If the decoded value of the "abs_level_minus1_div2_eq1" flag is 1, indicating that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by two is 1 (the second second target value), then the value to be decoded is (3+parity); if the decoded value of the "abs_level_minus1_div2_eq1" flag is not 1, indicating that the quotient of the value to be decoded minus 1 divided by two is not 1, proceed to step 8.
[0662] Step 8. Use bypass decoding to decode all codewords of the "abs_level_minu5_div2" flag of the value to be decoded, where 5 in minu5 is the seventh preset value, the seventh preset value is the initial value plus 2(H-2), the initial value is 5, H is the number of syntax elements included in the tenth syntax element information, H is 2, and the value to be decoded is (seventh preset value + parity + (abs_level_minu5_div2<<1)), then the value to be decoded is (5+parity+(abs_level_minu5_div2<<1)), and the decoding of the value to be encoded is completed.
[0663] Example 3:
[0664] In an embodiment of the present application, when the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, the encoder encodes the quantization residual of the color attribute of the coding point, including the following steps:
[0665] Step 1: The encoder allocates the codeword budget (the first syntax element information) remBinsPass1 based on context coding for the quantization residuals of the color attributes of the points to be encoded. For example, the initial value can be set to 2 24 ;
[0666] Step 2: Before starting to encode the quantization residuals of the color attributes of the points to be encoded, the encoder needs to determine whether remBinsPass1 is greater than or equal to T (the second context decoding resource), where T is a pre-set value (for example, T is 26);
[0667] Step 3: When remBinsPass1 ≥ T, the encoder uses context-based coding for the first 4 (N) codewords (a total of 12 codewords) after binarization of a possible color_first_comp_zero flag bit (the second syntax element information), a color_second_comp_zero flag bit (the third syntax element information), three color_level_equal_zero flag bits (the fourth syntax element information), three color_level_equal_one flag bits (the fifth syntax element information), three color_level_parity flag bits (the sixth syntax element information), three color_level_minus2_div2_eq0 flag bits (the first syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq1 flag bits (the second syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq2 flag bits (the third syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq3 flag bits (the fourth syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq4 flag bits (the fifth syntax element information in the seventh syntax element information), and three color_level_minus12_div2 flag bits (the eighth syntax element information). And after encoding each codeword, perform the operation remBinsPass1-- (decrease the first context decoding resource by 1). For the codewords after the first 4 codewords of the binarization of color_level_minus4_div2 of the three components, bypass coding is used;
[0668] Step 4: When remBinsPass1 < T, the encoder uses bypass coding for all the binarized codewords of the quantization residuals of the color attributes of the points to be encoded.
[0669] In an embodiment of the present application, when the first quantization residue of the first color component, the second quantization residue of the second color component, and the third quantization residue of the third color component are not all zero, the decoding end decodes the quantization residue of the color attribute of the point to be decoded, including the following steps:
[0670] Step 1: The decoder allocates a codeword budget remBinsPass1 (e.g., the initial value can be set to 2 24 ) for the quantization residue of the color attribute of the point to be decoded using context-based decoding;
[0671] Step 2: Before starting to decode the quantization residue of the color attribute of the point to be encoded, the decoder needs to determine whether remBinsPass1 is greater than or equal to T, where T is a pre-set value (e.g., T is 38);
[0672] Step 3: When remBinsPass1 ≥ T, the decoder performs context-based decoding on the first 4 binarized codewords (a total of 12 codewords) of a possible color_first_comp_zero flag bit, a color_second_comp_zero flag bit, three color_level_equal_zero flag bits, three color_level_equal_one flag bits, three color_level_parity flag bits (sixth syntax element information), three color_level_minus2_div2_eq0 flag bits (the first syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq1 flag bits (the second syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq2 flag bits (the third syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq3 flag bits (the fourth syntax element information in the seventh syntax element information), three color_level_minus2_div2_eq4 flag bits (the fifth syntax element information in the seventh syntax element information), and three color_level_minus12_div2 flag bits (eighth syntax element information), and performs a remBinsPass1-- operation after decoding each codeword. The codewords after the first 4 binarized codewords of the color_level_minus12_div2 of the three components are decoded using the bypass decoding method;
[0673] Step 4: When remBinsPass1 < T, the decoder decodes all binarized codewords of the quantization residue of the color attribute of the point to be decoded using the bypass decoding method.
[0674] In the embodiments of the present application, the syntax table description of the decoding of the quantization residual of the color attribute of the point to be decoded at the decoding end is shown in Table 4, where the bold font indicates the syntax elements to be parsed.
[0675] Table 4
[0676] In the embodiments of the present application, the syntax table description of the decoding process of the quantization residual (value to be decoded) of each color component at the decoding end is shown in Table 5, where the bold font indicates the syntax elements to be parsed.
[0677] Table 5
[0678] As shown in Table 4, when the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, the decoding end decodes the quantization residual of the color component of the point to be decoded (the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component), including the following steps:
[0679] Step 1: The decoder allocates a context-based decoding codeword budget (first syntax element information) remBinsPass1 (for example, the initial value can be set to 2 24 ) for the quantization residual of the color attribute of the point to be decoded (the first quantization residual, the second quantization residual, or the third quantization residual);
[0680] Step 2: Before starting to decode the quantization residual of the color attribute of the point to be decoded, the decoder needs to determine whether remBinsPass1 is greater than or equal to T (the preset second context decoding resource), where T is a preset value (for example, T is 26); if remBinsPass1 ≥ T, then execute Steps 3 to 7; if remBinsPass1 < T, then execute Steps 8 to 12;
[0681] Step 3: Decode the "color_first_comp_zero" flag bit (second syntax element information) using the context-based decoding method. If the "color_first_comp_zero" flag bit is 1, it means that the quantization residual of the first color component of the point to be decoded (the first quantization residual) is 0, and the codeword budget remBinsPass1 is decremented by 1, and continue to execute Step 4; if the "color_first_comp_zero" flag bit is 0, it means that the quantization residual of the first color component of the point to be encoded is not 0, remBinsPass1 is decremented by 1, and continue to execute Step 7;
[0682] Step 4: Decode the "color_second_comp_zero" flag (third syntax element information) using a context-based decoding method, subtract 1 from remBinsPass1, and if the "color_second_comp_zero" flag is 1 (the second preset value), it indicates that the quantization residual (second quantization residual) of the second color component of the point to be encoded is 0, and proceed to step 5; if the "color_second_comp_zero" flag is 0 (the first preset value), it indicates that the quantization residual of the second color component of the point to be encoded is not 0, and proceed to step 6;
[0683] Step 5: Decoding the quantized residual of the third color component using a context-based decoding method and a bypass decoding method, thereby completing the decoding of the quantized residual of the color attribute of the point to be decoded;
[0684] Step 6: Decode the quantized residual of the second color component using a context-based decoding method and a bypass decoding method, and decode the quantized residual of the third color component using a context-based decoding method and a bypass decoding method. The quantized residual decoding of the color attribute of the point to be decoded is completed.
[0685] Step 7: Decode the quantized residual of the first color component using the context-based decoding method and the bypass decoding method, decode the quantized residual of the second color component using the context-based decoding method and the bypass decoding method, and decode the quantized residual of the third color component (third quantized residual) using the context-based decoding method and the bypass decoding method. The quantized residual decoding of the color attribute of the point to be decoded is completed.
[0686] Wherein, in the case of remBinsPass1≥T, in combination with Table 5, the decoding process of the to-be-decoded color component (to-be-decoded value) of each to-be-decoded point includes the following steps:
[0687] a) decoding the "color_level_equal_zero" flag (fourth syntax element information) using a context-based decoding method; if the "color_level_equal_zero" flag is 1, the value to be decoded is 0, and the decoding of the value to be decoded is completed, then the value to be decoded is 0; if the "color_level_equal_zero" flag is 0, executing step b);
[0688] b) decoding the "color_level_equal_one" flag (fifth syntax element information) using a context-based decoding method. If the "color_level_equal_one" flag is 1, the value to be decoded is 1, and the decoding of the value to be decoded is completed; if the "color_level_equal_one" flag is 1, executing step c);
[0689] c) Decode the "color_level_parity" flag (sixth syntax element information) and the "color_level_minus2_div2_eq0" flag (the first syntax element in the seventh syntax element information) using a context-based decoding method. If the "color_level_minus2_div2_eq0" flag is 1, indicating that the quotient of the value to be decoded minus 2 (the third preset value) and then divided by 2 is equal to 0 (the first first target value), then the value to be decoded is (third preset value + parity + the first first target value × 2), then the value to be decoded is (2 + parity), and the decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq0" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 0, then execute step d).
[0690] d) decoding the "color_level_minus2_div2_eq1" flag (the second syntax element in the seventh syntax element information) using a context-based decoding method. If the "color_level_minus2_div2_eq1" flag is 1, indicating that the quotient of the value to be decoded minus 2 (the third preset value) and then divided by 2 is equal to 1 (the second first target value), then the value to be decoded is (the third preset value + parity + the second first target value × 2), then the value to be decoded is (4 + parity), and decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq1" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 2, and continuing to step f);
[0691] f) decoding the "color_level_minus2_div2_eq2" flag (the third syntax element in the seventh syntax element information) using a context-based decoding method; if the "color_level_minus2_div2_eq2" flag is 1, indicating that the quotient of the value to be decoded minus 2 (the third preset value) and then divided by 2 is equal to 2 (the third first target value), then the value to be decoded is (the third preset value + parity + the third first target value × 2), then the value to be decoded is (6 + parity), and decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq2" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 2, and continuing to step g);
[0692] g) decoding the "color_level_minus2_div2_eq3" flag (the fourth syntax element in the seventh syntax element information) using a context-based decoding method; if the "color_level_minus2_div2_eq3" flag is 1, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is equal to 3, then the value to be decoded is (the third preset value + parity + the fourth first target value × 2), then the value to be decoded is (8 + parity), and decoding of the value to be decoded is complete; if the "color_level_minus2_div2_eq3" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 3, and continuing to step h);
[0693] h) decoding the "color_level_minus2_div2_eq4" flag (the fifth syntax element in the seventh syntax element information) using a context-based decoding method; if the "color_level_minus2_div2_eq4" flag is 1, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is equal to 4, then the value to be decoded is (the third preset value + parity + the fourth first target value × 2), then the value to be decoded is (10 + parity), and decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq0" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 4, and continuing to step i);
[0694] i) Decode the first four codewords (N) of the "color_level_minus12_div2" flag (eighth syntax element information) using a context-based decoding method, and decode the codewords after the fourth codeword of the "color_level_minus12_div2" flag using a bypass decoding method, where 12 in minus12 is a fourth preset value, the fourth preset value is the initial value plus 2(M-1), the initial value is 4, M is the number of syntax elements included in the seventh syntax element information, M=5, the value to be decoded is (fourth preset value+parity+(color_level_minus12_div2<<1)), then the value to be decoded is (12+parity+(color_level_minus12_div2<<1)), and the decoding of the value to be decoded is completed.
[0695] Step 8: Decode the "color_first_comp_zero" flag (second syntax element information) using bypass decoding. If the "color_first_comp_zero" flag is 1, it indicates that the quantization residual (first quantization residual) of the first color component of the point to be decoded is 0, the codeword budget remBinsPass1 is reduced by 1, and step 9 is continued; if the "color_first_comp_zero" flag is 0, it indicates that the quantization residual of the first color component of the point to be encoded is not 0, remBinsPass1 is reduced by 1, and step 12 is continued;
[0696] Step 9: Decode the "color_second_comp_zero" flag (third syntax element information) using bypass decoding, subtract 1 from remBinsPass1, and if the "color_second_comp_zero" flag is 1 (the second preset value), it indicates that the quantization residual (second quantization residual) of the second color component of the point to be encoded is 0, and proceed to step 10; if the "color_second_comp_zero" flag is 0 (the first preset value), it indicates that the quantization residual of the second color component of the point to be encoded is not 0, and proceed to step 11;
[0697] Step 10: Decoding the quantized residual of the third color component using a bypass decoding method, thereby completing the decoding of the quantized residual of the color attribute of the point to be decoded;
[0698] Step 11: Decode the quantized residual of the second color component using a bypass decoding method, and decode the quantized residual of the third color component using a context-based decoding method and a bypass decoding method. The decoding of the quantized residual of the color attribute of the point to be decoded is completed.
[0699] Step 12: Decode the quantization residuals of the first color component using the by - pass decoding method, decode the quantization residuals of the second color component using the by - pass decoding method, and decode the quantization residuals of the third color component (the third quantization residual) using the by - pass decoding method. The decoding of the quantization residuals of the color attributes of the point to be decoded is completed.
[0700] Among them, when remBinsPass1 < T, in combination with Table 2, the decoding process of the color component to be decoded (the value to be decoded) for each point to be decoded includes the following steps:
[0701] a) Decode the "color_level_equal_zero" flag bit (the fourth syntax element information) using the by - pass decoding method. If the "color_level_equal_zero" flag bit is 1, the value to be decoded is 0, and the decoding of this value to be decoded is completed; if the "color_level_equal_zero" flag bit is 0, execute step b).
[0702] b) Decode the "color_level_equal_one" flag bit (the fifth syntax element information) using the by - pass decoding method. If the "color_level_equal_one" flag bit is 1, the value to be decoded is 1, and the decoding of this value to be decoded is completed; if the "color_level_equal_one" flag bit is 1, execute step c).
[0703] c) Decode the "color_level_parity" flag bit (the sixth syntax element information) and the "color_level_minus2_div2_eq0" flag bit (the first syntax element in the seventh syntax element information). If the "color_level_minus2_div2_eq0" flag bit is 1, indicating that the quotient of the value to be decoded minus 2 (the third preset value) and then divided by 2 is equal to 0 (the first target value), then the value to be decoded is (the third preset value + parity + the first target value × 2), that is, (2 + parity), and the decoding of this value to be decoded is completed; if the "color_level_minus2_div2_eq0" flag bit is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 0, then execute step d).
[0704] d) Decoding the "color_level_minus2_div2_eq1" flag (the second syntax element in the seventh syntax element information) using bypass decoding. If the "color_level_minus2_div2_eq1" flag is 1, indicating that the quotient of the value to be decoded minus 2 (the third preset value) and then divided by 2 is equal to 1 (the second first target value), then the value to be decoded is (the third preset value + parity + the second first target value × 2), then the value to be decoded is (4 + parity), and decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq1" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 2, proceeding to step f);
[0705] f) decoding the "color_level_minus2_div2_eq2" flag (the third syntax element in the seventh syntax element information) using bypass decoding. If the "color_level_minus2_div2_eq2" flag is 1, indicating that the quotient of the value to be decoded minus 2 (the third preset value) and then divided by 2 is equal to 2 (the third first target value), then the value to be decoded is (the third preset value + parity + the third first target value × 2), then the value to be decoded is (6 + parity), and decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq2" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 2, and continuing to step g);
[0706] g) decoding the "color_level_minus2_div2_eq3" flag (the fourth syntax element in the seventh syntax element information) using bypass decoding. If the "color_level_minus2_div2_eq3" flag is 1, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is equal to 3, then the value to be decoded is (third preset value + parity + the fourth first target value × 2), then the value to be decoded is (8 + parity), and decoding of the value to be decoded is complete; if the "color_level_minus2_div2_eq3" flag is 0, indicating that the quotient of the value to be decoded minus 2 and then divided by 2 is not equal to 3, and continuing to step h);
[0707] h) decoding the "color_level_minus2_div2_eq4" flag (the fifth syntax element in the seventh syntax element information) using bypass decoding. If the "color_level_minus2_div2_eq4" flag is 1, indicating that the quotient of the value to be decoded after subtracting 2 and then dividing by 2 is equal to 4, then the value to be decoded is (the third preset value + parity + the fourth first target value × 2), then the value to be decoded is (10 + parity), and decoding of the value to be decoded is completed; if the "color_level_minus2_div2_eq4" flag is 0, indicating that the quotient of the value to be decoded after subtracting 2 and then dividing by 2 is not equal to 4, and continuing to step i);
[0708] i) Use bypass decoding to decode all codewords of the "color_level_minus12_div2" flag, where 12 in minus12 is a fourth preset value, the fourth preset value is the initial value plus 2(M-1), the initial value is 4, M is the number of syntax elements included in the seventh syntax element information, M=5, the value to be decoded is (fourth preset value+parity+(color_level_minus12_div2<<1)), then the value to be decoded is (12+parity+(color_level_minus12_div2<<1)), and the decoding of the value to be decoded is completed.
[0709] Example 4:
[0710] In this embodiment of the present application, when the quantized residual of the reflectivity attribute of the point to be encoded (the current point) (the fourth quantized residual of the reflectivity attribute information) is non-zero, the encoding end encodes the quantized residual of the reflectivity attribute of the point to be encoded (the fourth quantized residual), including the following steps:
[0711] Step 1: The encoder allocates the quantized residual of the reflectivity attribute of the point to be coded using the codeword budget (first syntax element) remBinsPass1 based on context coding (for example, the initial value can be set to 2 24 );
[0712] Step 2: Before the encoder starts encoding the quantized residual of the reflectivity attribute of the coding point, it needs to determine whether remBinsPass1 is greater than or equal to T (the second context decoding resource), where T is a preset value (for example, T is 12);
[0713] Step 3: When remBinsPass1≥T, the encoder performs context-based coding on the first 4 (K) codewords after binarization of the possible abs_level_minus1_parity flag (the ninth syntax element information), abs_level_minus1_div2_eq0 flag (the first syntax element in the tenth syntax element information), abs_level_minus1_div2_eq1 flag (the second syntax element in the tenth syntax element information), abs_level_minus1_div2_eq2 flag (the third syntax element in the tenth syntax element information), abs_level_minus1_div2_eq3 flag (the fourth syntax element in the tenth syntax element information), abs_level_minus1_div2_eq4 flag (the fifth syntax element in the tenth syntax element information), abs_level_minus1_div2_eq5 flag (the sixth syntax element in the tenth syntax element information), and abs_level_minu15_div2 flag (the eleventh syntax element information). After encoding each codeword, perform the operation of remBinsPass1-- (decrease the first context decoding resource by 1). The codewords after the first 4 codewords of the binarized abs_level_minu15_div2 are encoded using the bypass coding method;
[0714] Step 4: When remBinsPass1<T, the encoder uses the bypass coding method for all the binarized codewords of the quantization residual of the reflectivity attribute of the encoding point to be encoded.
[0715] In the embodiment of the present application, when the quantization residual of the reflectivity attribute of the decoding point to be decoded (the current point) (the fourth quantization residual of the reflectivity attribute information) is non-zero, the decoding end decodes the quantization residual of the reflectivity attribute of the decoding point to be decoded, including the following steps:
[0716] Step 1: The decoder allocates a codeword budget remBinsPass1 (the first syntax element) for the quantization residual of the reflectivity attribute of the decoding point to be decoded using context-based decoding (for example, the initial value can be set to 2 24 )
[0717] Step 2: Before starting to decode the quantization residual of the reflectivity attribute of the decoding point to be decoded, the decoder needs to determine whether remBinsPass1 is greater than or equal to T (the second context decoding resource), where T is a pre-set value (for example, T is 26);
[0718] Step 3: When remBinsPass1 ≥ T, the encoder performs context-based decoding on the first 4 (K) codewords after binarization of the possible abs_level_minus1_parity flag (the ninth syntax element information), abs_level_minus1_div2_eq0 flag (the first syntax element in the tenth syntax element information), abs_level_minus1_div2_eq1 flag (the second syntax element in the tenth syntax element information), abs_level_minus1_div2_eq2 flag (the third syntax element in the tenth syntax element information), abs_level_minus1_div2_eq3 flag (the fourth syntax element in the tenth syntax element information), abs_level_minus1_div2_eq4 flag (the fifth syntax element in the tenth syntax element information), abs_level_minus1_div2_eq5 flag (the sixth syntax element in the tenth syntax element information), and abs_level_minu15_div2 flag (the eleventh syntax element information). And after decoding each codeword, perform the operation of remBinsPass1-- (decrease the first context decoding resource by 1). The codewords after the first 4 codewords of the binarized abs_level_minu15_div2 are decoded using the bypass decoding method;
[0719] Step 4: When remBinsPass1 < T, the decoder decodes all the binarized codewords of the quantization residual of the reflectivity attribute of the point to be decoded using the bypass decoding method.
[0720] In the embodiment of the present application, the syntax table description for decoding the quantization residual of the reflectivity attribute of the point to be decoded at the decoding end is shown in Table 6. Among them, the bold font indicates the syntax elements that need to be parsed.
[0721] Table 6
[0722] As shown in Table 6, when the quantization residual of the reflectivity attribute of the point to be decoded (the current point) (the fourth quantization residual of the reflectivity attribute information) is non-zero, the decoder decodes the quantization residual of the reflectivity attribute of the point to be decoded (the fourth quantization residual), including the following steps:
[0723] Step 1: The decoder allocates a codeword budget (the first syntax element information) remBinsPass1 (for example, the initial value can be set to 2^24) for the quantization residual of the reflectivity attribute of the point to be decoded (the fourth quantization residual) using context-based decoding;
[0724] Step 2. Before starting the quantization residual decoding of the reflectivity attribute of the point to be decoded, the decoder needs to determine whether remBinsPass1 is greater than or equal to T (the preset second context decoding resource), where T is a preset value (for example, T = 12); if remBinsPass1 ≥ T, then execute Steps 3 to 10; if remBinsPass1 < T, then execute Steps 11 to 18;
[0725] Step 3. Decode the "abs_level_minus1_parity" flag bit (the ninth syntax element information) and the "abs_level_minus1_div2_eq0" flag bit (the first syntax element information in the tenth syntax element information) of the value to be decoded in a context-based decoding manner. If the decoded value of the "abs_level_minus1_div2_eq0" flag bit is 1, it means that the quotient of the value to be decoded minus 1 (the sixth preset value) and then divided by 2 (the first second target value) is equal to 0, and the value to be decoded is (the sixth preset value + parity + (the first second target value × 2)), then the value to be decoded is (1 + parity), and the decoding of this value to be encoded is completed; if the decoded value of the "abs_level_minus1_div2_eq0" flag bit is 0, it means that the quotient of the value to be decoded minus 1 and then divided by 2 is not equal to 0, and continue to execute Step 4;
[0726] Step 4. Decode the "abs_level_minus1_div2_eq1" flag bit (the second syntax element information in the tenth syntax element information) of the value to be decoded in a context-based decoding manner. If the decoded value of the "abs_level_minus1_div2_eq1" flag bit is 1, it means that the quotient of the value to be decoded minus 1 (the sixth preset value) and then divided by 2 is equal to 1 (the second second target value), and the value to be decoded is (the sixth preset value + parity + (the second second target value × 2)), then the value to be decoded is (3 + parity), and the decoding of this value to be encoded is completed; if the decoded value of the "abs_level_minus1_div2_eq1" flag bit is 0, it means that the quotient of the value to be decoded minus 1 and then divided by 2 is not equal to 1, and continue to execute Step 5;
[0727] Step 5. Decode the "abs_level_minus1_div2_eq2" flag of the value to be decoded (the third syntax element information in the tenth syntax element information) using the context-based decoding method. If the decoded value of the "abs_level_minus1_div2_eq1" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 2 (the third second target value), and the value to be decoded is (sixth preset value + parity + (the third second target value × 2)). The value to be decoded is (5 + parity), and the decoding of the value to be decoded is completed; if the decoded value of the "abs_level_minus1_div2_eq2" flag is 0, it indicates that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 2, and continue to step 6;
[0728] Step 6. Decode the "abs_level_minus1_div2_eq3" flag of the value to be decoded (the fourth syntax element information in the tenth syntax element information) using the context-based decoding method. If the decoded value of the "abs_level_minus1_div2_eq3" flag is 1, it means that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 3 (the fourth second target value), and the value to be decoded is (sixth preset value + parity + (the fourth second target value × 2)). The value to be decoded is (7 + parity), and the decoding of the value to be decoded is completed; if the decoded value of the "abs_level_minus1_div2_eq3" flag is 0, it means that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 3, and continue to step 7;
[0729] Step 7. Decode the "abs_level_minus1_div2_eq4" flag of the value to be decoded (the fifth syntax element information in the tenth syntax element information) using the context-based decoding method. If the decoded value of the "abs_level_minus1_div2_eq4" flag is 4, it means that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 4 (the fifth second target value), and the value to be decoded is (sixth preset value + parity + (fifth second target value × 2)). The value to be decoded is (9 + parity), and the decoding of the value to be decoded is completed; if the decoded value of the "abs_level_minus1_div2_eq4" flag is 0, it means that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 4, and continue to step 8;
[0730] Step 8. Decode the "abs_level_minus1_div2_eq5" flag of the value to be decoded (the sixth syntax element information in the tenth syntax element information) using a context-based decoding method. If the decoded value of the "abs_level_minus1_div2_eq5" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 5 (the sixth second target value), and the value to be decoded is (sixth preset value + parity + (sixth second target value × 2)). The value to be decoded is (11 + parity), and the decoding of the value to be decoded is completed; if the decoded value of the "abs_level_minus1_div2_eq5" flag is 0, it indicates that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 5, and continue to step 9;
[0731] Step 9. Decode the "abs_level_minus1_div2_eq6" flag of the value to be decoded (the 7th syntax element information in the tenth syntax element information) using the context-based decoding method. If the decoded value of the "abs_level_minus1_div2_eq6" flag is 1, it means that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 6 (the 7th second target value), and the value to be decoded is (sixth preset value + parity + (7th second target value × 2)). The value to be decoded is (13 + parity), and the decoding of the value to be decoded is completed; if the decoded value of the "abs_level_minus1_div2_eq6" flag is 0, it means that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 6, and continue to step 10;
[0732] Step 10: Use context-based decoding to decode the first four (K) codewords of the "abs_level_minu15_div2" flag (the eleventh syntax element information) of the value to be decoded, and use bypass decoding to decode the codewords after the fourth codeword of the "abs_level_minu15_div2" flag of the value to be decoded, where 15 in minu15 is the seventh preset value, the seventh preset value is the initial value plus 2(H-2), the initial value is 5, H is the number of syntax elements included in the tenth syntax element information, H is 7, the value to be decoded is (seventh preset value + parity + (abs_level_minu5_div2<<1)), then the value to be decoded is (15 + parity + (abs_level_minu5_div2<<1)), and decoding of the value to be encoded is completed;
[0733] Step 11: Use bypass decoding to decode the "abs_level_minus1_parity" flag (ninth syntax element information) and the "abs_level_minus1_div2_eq0" flag (first syntax element information in the tenth syntax element information) of the value to be decoded. If the decoded value of the "abs_level_minus1_div2_eq0" flag is 1, it means that the quotient of the value to be decoded minus 1 (sixth preset value) divided by 2 is equal to 0 (first second target value), and the value to be decoded is (sixth preset value + parity + (first second target value × 2)). The value to be decoded is (1 + parity), and decoding of the value to be encoded is completed; if the decoded value of the "abs_level_minus1_div2_eq0" flag is 0, it means that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 0, and continue to step 12;
[0734] Step 12: Decode the "abs_level_minus1_div2_eq1" flag of the value to be decoded (the second syntax element information in the tenth syntax element information) using a bypass decoding method. If the decoded value of the "abs_level_minus1_div2_eq1" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 1 (the second second target value), and the value to be decoded is (sixth preset value + parity + (the second second target value × 2)). The value to be decoded is (3 + parity), and decoding of the value to be encoded is complete. If the decoded value of the "abs_level_minus1_div2_eq1" flag is 0, it indicates that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 1, and proceed to step 13.
[0735] Step 13: Use bypass decoding for the "abs_level_minus1_div2_eq2" flag of the value to be decoded (the third syntax element information in the tenth syntax element information). If the decoded value of the "abs_level_minus1_div2_eq1" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 2 (the third second target value), and the value to be decoded is (sixth preset value + parity + (the third second target value × 2)). The value to be decoded is (5 + parity), and decoding of the value to be decoded is completed. If the decoded value of the "abs_level_minus1_div2_eq2" flag is 0, it indicates that the quotient of the value to be decoded minus 1 divided by 2 is equal to 2, and step 14 is continued.
[0736] Step 14: Decode the "abs_level_minus1_div2_eq3" flag of the value to be decoded (the fourth syntax element information in the tenth syntax element information) using a bypass decoding method. If the decoded value of the "abs_level_minus1_div2_eq3" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 3 (the fourth second target value), and the value to be decoded is (sixth preset value + parity + (the fourth second target value × 2)). The value to be decoded is (7 + parity), and decoding of the value to be decoded is completed. If the decoded value of the "abs_level_minus1_div2_eq3" flag is 0, it indicates that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 3, and continue to step 15.
[0737] Step 15: Decode the "abs_level_minus1_div2_eq4" flag of the value to be decoded (the fifth syntax element information in the tenth syntax element information) using a bypass decoding method. If the decoded value of the "abs_level_minus1_div2_eq4" flag is 4, it means that the quotient of the value to be decoded minus 1 (the sixth preset value) and then divided by 2 is equal to 4 (the fifth second target value), and the value to be decoded is (sixth preset value + parity + (fifth second target value × 2)). The value to be decoded is (9 + parity), and decoding of the value to be decoded is completed. If the decoded value of the "abs_level_minus1_div2_eq4" flag is 0, it means that the quotient of the value to be decoded minus 1 and then divided by 2 is not equal to 4, and continue to step 16.
[0738] Step 16: Decode the "abs_level_minus1_div2_eq5" flag of the value to be decoded (the sixth syntax element information in the tenth syntax element information) using bypass decoding. If the decoded value of the "abs_level_minus1_div2_eq5" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 5 (the sixth second target value), and the value to be decoded is (sixth preset value + parity + (sixth second target value × 2)). The value to be decoded is (11 + parity), and decoding of the value to be decoded is complete. If the decoded value of the "abs_level_minus1_div2_eq5" flag is 0, it indicates that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 5, and proceed to step 17.
[0739] Step 17: Decode the "abs_level_minus1_div2_eq6" flag of the value to be decoded (the seventh syntax element information in the tenth syntax element information) using a bypass decoding method. If the decoded value of the "abs_level_minus1_div2_eq6" flag is 1, it indicates that the quotient of the value to be decoded minus 1 (the sixth preset value) divided by 2 is equal to 6 (the seventh second target value), and the value to be decoded is (sixth preset value + parity + (the seventh second target value × 2)). The value to be decoded is (13 + parity), and decoding of the value to be decoded is completed. If the decoded value of the "abs_level_minus1_div2_eq6" flag is 0, it indicates that the quotient of the value to be decoded minus 1 divided by 2 is not equal to 6, and proceed to step 18.
[0740] Step 18: Use bypass decoding to decode all codewords of the "abs_level_minu15_div2" flag (the eleventh syntax element information) of the value to be decoded, where 15 in minu15 is the seventh preset value, the seventh preset value is the initial value plus 2(H-2), the initial value is 5, H is the number of syntax elements included in the tenth syntax element information, H is 7, and the value to be decoded is (seventh preset value + parity + (abs_level_minu5_div2<<1)), then the value to be decoded is (15 + parity + (abs_level_minu5_div2<<1)), and the decoding of the value to be encoded is completed.
[0741] To further illustrate the technical effects of the embodiments of the present application, the solution proposed in the embodiments of the present application was tested on AVS's latest point cloud compression platform PCRM. The general test conditions of AVS PCC include the following four:
[0742] Test condition 1 (C1): limit-lossy geometry, lossy attributes;
[0743] Test condition 2 (C2): lossless geometry, lossy attributes;
[0744] Test condition 3 (C3): lossless geometry, limit-lossy attributes;
[0745] Test condition 4 (C4): lossless geometry and lossless attributes.
[0746] AVS PCC's general test sequences include five categories: Cat1A, Cat1B, Cat1C, Cat2-frame, and Cat3. Cat1A and Cat2-frame point clouds only contain reflectance attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1C point clouds contain both color and reflectance attribute information.
[0747] AVS PCC has two technical approaches, differentiated by the algorithm used for attribute compression:
[0748] Technical Route 1: Prediction branch, attribute compression adopts prediction-based method;
[0749] Technical route 2: Transformation branch. Attribute compression adopts a transformation-based method, which includes two transformation algorithms: wavelet transform and k-ary DCT transform.
[0750] The specific test results are shown in the following table.
[0751] Table 8-1
[0752] Table 8-2
[0753] Among them, Table 8-1 and Table 8-2 are the test results of the solution proposed in Example 2 in the prediction branch. Table 8-1 shows the end-to-end attribute rate distortion test results (EtE Hausdorff BD-AttrRate) of five common test sequences. Y, Cb, and Cr represent the color components of the color attribute, refl represents the reflectivity attribute, and color represents the color attribute. It can be seen that although the solution proposed in Example 2 has attribute rate distortion in the test results of the prediction branch, the distortion loss of the attribute rate distortion is not large and is therefore within an acceptable range. Table 8-1 shows the bit rate test results (bpip ratio) of five common test sequences. It can be seen that the bit rate of the solution proposed in Example 2 in the test results of the prediction branch is comparable. In summary, although the solution proposed in Example 2 has attribute rate distortion, the solution proposed in Example 2 can effectively improve the encoding / decoding efficiency of the encoder / decoder compared to the related art, effectively improving the hardware throughput. Therefore, the solution proposed in Example 2 can provide a more hardware-friendly implementation method compared to the related art.
[0754] Table 9-1
[0755] Table 9-2
[0756] Table 9-3
[0757] Table 9-4
[0758] Tables 9-1 and 9-4 show the test results of the related art and the solution proposed in Example 2 for multi-layer transform branches. Table 9-1 shows the end-to-end attribute rate-distortion test results for five common test sequences under test conditions of limited geometric loss and attribute loss. It can be seen that the attribute rate-distortion loss of the multi-layer transform branch test results of the solution proposed in Example 2 under test conditions of limited geometric loss and attribute loss is within an acceptable range. Table 9-2 shows the attribute rate-distortion test results for five common test sequences under test conditions of lossless geometry and attribute loss. It can be seen that the attribute rate-distortion loss of the multi-layer transform branch test results of the solution proposed in Example 2 under test conditions of lossless geometry and attribute loss is within an acceptable range. Table 9-3 shows the attribute rate-distortion test results for the Cat1A common test sequence under test conditions of lossless geometry and limited attribute loss. It can be seen that the attribute rate-distortion loss of the multi-layer transform branch test results of the solution proposed in Example 2 under test conditions of lossless geometry and limited attribute loss is within an acceptable range. Table 9-4 shows the bit rate test results of the Cat1A general test sequence under the test conditions of geometric position lossless and attribute lossless. It can be seen that the solution proposed in Example 2 has a similar bit rate in the test results of the prediction branch.
[0759] In summary, although the scheme proposed in Example 2 has attribute rate distortion under the four test conditions, the attribute rate distortion loss of the scheme proposed in Example 2 is within an acceptable range. Moreover, compared with the related art, the scheme proposed in Example 2 can effectively improve the encoding / decoding efficiency of the encoder / decoder and effectively improve the hardware throughput.
[0760] Table 10-1
[0761] Table 10-2
[0762] Among them, Table 10-1 and Table 10-2 are the test results of the solution proposed in Example 2 under the resource-constrained prediction transformation branch. Table 10-1 shows the end-to-end attribute rate-distortion test results of 5 general test sequences under the test conditions of limited loss in geometric position and loss in attribute. It can be seen that the loss of attribute rate distortion of the test results of the multi-layer transformation branch of the solution proposed in Example 2 under the test conditions of limited loss in geometric position and loss in attribute is within an acceptable range. Table 10-2 shows the end-to-end attribute rate-distortion test results of 5 general test sequences under the test conditions of lossless geometric position and loss in attribute. It can be seen that the loss of attribute rate distortion of the test results of the multi-layer transformation branch of the solution proposed in Example 2 under the test conditions of lossless geometric position and loss in attribute is within an acceptable range.
[0763] Table 11-1
[0764] Table 11-2
[0765] Among them, Table 11-1 and Table 11-2 are the test results of the prediction transformation branch of the solution proposed in Example 2 with unlimited resources. Table 11-1 shows the end-to-end attribute rate-distortion test results of 5 general test sequences under the test conditions of limited loss in geometric position and loss in attribute. It can be seen that the loss of attribute rate distortion of the test results of the multi-layer transformation branch of the solution proposed in Example 2 under the test conditions of limited loss in geometric position and loss in attribute is within an acceptable range. Table 11-2 shows the end-to-end attribute rate-distortion test results of 5 general test sequences under the test conditions of lossless geometric position and loss in attribute. It can be seen that the loss of attribute rate distortion of the test results of the multi-layer transformation branch of the solution proposed in Example 2 under the test conditions of lossless geometric position and loss in attribute is within an acceptable range.
[0766] In summary, although the solution proposed in Example 2 may have attribute rate distortion under different resource-constrained or resource-unconstrained conditions, the attribute rate distortion loss of the solution proposed in Example 2 is within an acceptable range. Moreover, compared with the related technology, the solution proposed in Example 2 can effectively improve the encoding / decoding efficiency of the encoder / decoder and effectively improve the hardware throughput.
[0767] In an embodiment of the present application, a budget value is set to limit the number of context-based coding codewords used in attribute residual coding, thereby improving throughput and providing a more hardware-friendly implementation method.
[0768] In one embodiment of the present application, a code stream is provided. The code stream is generated by bit encoding information to be encoded, and the information to be encoded includes at least one of the following:
[0769] The first to eleventh syntax element information, the first context encoding / decoding resources allocated to each attribute information to be encoded, and N and K, where N and K are positive integers greater than 1; the sign bit of the quantized residual at the current point; wherein,
[0770] The first syntax element information is used to indicate the allocated first context decoding resource;
[0771] The second syntax element information is used to indicate whether the first quantized residual of the first color component is a first value;
[0772] The third syntax element information is used to indicate whether the second quantized residual of the second color component is the first value;
[0773] The fourth syntax element information is used to indicate whether the encoding / decoding value of the quantized residual of each color component is the first value;
[0774] The fifth syntax element information is used to indicate whether the encoding / decoding value of the quantized residual of each color component is the second value;
[0775] The sixth syntax element information is used to indicate the parity of the encoding / decoding value of the quantized residual of each color component;
[0776] The seventh syntax element information is used to indicate whether the quotient of the encoded / decoded value of the quantized residual of each color component minus the third preset value and then divided by two is the first target value;
[0777] The eighth syntax element information is used to indicate the quotient of the encoding / decoding value of the quantized residual of each color component minus the fourth preset value and divided by two;
[0778] The ninth syntax element information is used to indicate the parity of the encoding / decoding value of the fourth quantized residual of the reflectivity attribute information;
[0779] The tenth syntax element information is used to indicate whether the quotient of the encoded / decoded value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value;
[0780] The eleventh syntax element information is used to indicate a quotient of a coding / decoding value of the fourth quantized residual minus a seventh preset value divided by two.
[0781] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG10 , which shows a schematic structural diagram of a decoder 10 provided by the embodiment of the present application. As shown in FIG10 , the decoder 10 may include: a first determining part 11 and a decoding part 12; wherein,
[0782] The first determining part 11 is configured to determine first syntax element information of the attribute information to be decoded at the current point;
[0783] The decoding part 12 is configured to use a bypass decoding method to decode the attribute information to be decoded at the current point when the first syntax element information indicates that the allocated first context decoding resource is less than the preset second context decoding resource; the second context decoding resource is related to the codeword of the syntax element to be decoded at the current point.
[0784] In one embodiment, the decoding part 12 is further configured to decode the attribute information to be decoded at the current point by at least using a context decoding method when the first syntax element information indicates that the...
Claims
1. A point cloud decoding method, applied to a decoder, the method comprising: Determine first syntax element information of attribute information to be decoded at the current point; When the first syntax element information indicates that the allocated first context decoding resources are less than the preset second context decoding resources, a bypass decoding method is used to decode the attribute information to be decoded at the current point; the second context decoding resources are related to the codeword of the syntax element to be decoded at the current point.
2. The method according to claim 1, wherein: The method further comprises: When the first syntax element information indicates that the allocated first context decoding resource is greater than or equal to the preset second context decoding resource, at least a context decoding method is used to decode the attribute information to be decoded at the current point.
3. The method according to claim 2, wherein: When the first syntax element information indicates that the allocated first context decoding resource is greater than or equal to the preset second context decoding resource, at least a context decoding method is used to decode the current point, including: When the first syntax element information indicates that the allocated first context decoding resources are greater than or equal to the preset second context decoding resources, the first syntax element information to be decoded is decoded in a context decoding manner whose quantity is less than or equal to the second context decoding resources; the first syntax element information to be decoded corresponds to the attribute information to be decoded.
4. The method according to claim 2, wherein: When the first syntax element information indicates that the allocated first context decoding resource is greater than or equal to the preset second context decoding resource, at least a context decoding method is used to decode the current point, including: When the first grammatical element information indicates that the allocated first context decoding resources are greater than or equal to the preset second context decoding resources, the first grammatical element information to be decoded that is equal to the number of the second context decoding resources is decoded using a context decoding method, and the second grammatical element information to be decoded is decoded using a bypass decoding method; the second grammatical element information to be decoded is the grammatical element information to be decoded after the first grammatical element information to be decoded is decoded; the first grammatical element information to be decoded and the second grammatical element information to be decoded both correspond to the attribute information to be decoded.
5. The method according to any one of claims 1 to 4, wherein: The attribute information to be decoded includes: color attribute information; the color attribute information includes: a first color component, a second color component and a third color component; When the first quantization residual of the first color component, the second quantization residual of the second color component, and the third quantization residual of the third color component are not all zero, decoding the to-be-decoded attribute information of the current point includes: Parse the code stream to determine second syntax element information of the first color component; When the second syntax element information indicates that the first quantized residual of the first color component is not a first value, respectively decoding the first quantized residual, the second quantized residual of the second color component, and the third quantized residual of the third color component; When the second syntax element information indicates that the first quantized residual of the first color component is a first value, determining third syntax element information of the second color component; When the third syntax element information indicates that the second quantized residual of the second color component is not the first value, respectively decoding the second quantized residual of the second color component and the third quantized residual of the third color component; When the third syntax element information indicates that the second quantized residual of the second color component is a first value, a third quantized residual of the third color component is decoded.
6. The method according to claim 5, wherein: If the second syntax element information is a first preset value, the first quantized residual representing the first color component is not a first value; If the second syntax element information is a second preset value, the first quantized residual representing the first color component is a first value; If the third syntax element information is a first preset value, the second quantized residual representing the second color component is not a first value; If the third syntax element information is a second preset value, the second quantization residual representing the second color component is a first value.
7. The method according to claim 5 or 6, wherein: The current color component is any one of the first color component, the second color component, and the third color component; The current quantized residual is a decoded value of any one of the first quantized residual, the second quantized residual, and the third quantized residual; The current quantization residual corresponds to the current color component; Decoding the current quantized residual of the current color component comprises: Parse the bitstream to determine fourth syntax element information of the current color component; the fourth syntax element information indicates whether the current quantization residual is the first value; When the fourth syntax element information is a second preset value, determining the current quantization residual to be a first value.
8. The method according to claim 7, wherein: The method further comprises: When the fourth syntax element information is a first preset value, determining fifth syntax element information; the fifth syntax element information indicates whether the current quantized residual is a second value; When the fifth syntax element information is a second preset value, determining the current quantization residual to be a second value.
9. The method according to claim 8, wherein: The method further comprises: When the fifth syntax element information is the first preset value, determine the sixth syntax element information and the seventh syntax element information; the sixth syntax element information represents the parity of the decoded value of the current quantized residual; the seventh syntax element information represents whether the quotient of the decoded value of the current quantized residual minus the third preset value and then divided by two is the first target value; the seventh syntax element information includes: M syntax element information; wherein M is a positive integer greater than or equal to 1; When any syntax element information in the seventh syntax element information has a second preset value, the current quantized residual is determined according to any syntax element information in the sixth syntax element information and the seventh syntax element information.
10. The method according to claim 9, wherein: The method further comprises: When the seventh syntax element information is all the first preset value, determining the eighth syntax element information; the eighth syntax element information represents the quotient of the decoded value of the current quantized residual minus the fourth preset value and then divided by two; wherein the fourth preset value is the initial value plus 2(M-1); The current quantized residual is determined based on the eighth syntax element information.
11. The method according to claim 9 or 10, wherein: The first target value is a natural number greater than or equal to 0; the number of the first target values is M; the first target value corresponds to the M syntax element information; When any syntax element information in the seventh syntax element information is a second preset value, determining the current quantized residual according to the sixth syntax element information and any syntax element information includes: When the i-th syntax element information is a second preset value, determining the current quantized residual according to the sixth syntax element information and the i-th syntax element information; wherein i is a positive integer greater than or equal to 1 and less than M; When the i-th syntax element information is a first preset value, continue to determine the value of the i+1-th syntax element information until the j-th syntax element information is determined to be a second preset value; or until the value of the M-th syntax element information is determined; wherein j is a positive integer greater than i and less than or equal to M; When the j-th syntax element information is a second preset value, the current quantized residual is determined according to the sixth syntax element information and the j-th syntax element information.
12. The method according to any one of claims 5 to 11, wherein: The first syntax element information to be decoded includes at least one of the following: second syntax element information, third syntax element information, fourth syntax element information corresponding to each color component, fifth syntax element information corresponding to each color component, sixth syntax element information corresponding to each color component, seventh syntax element information corresponding to each color component, and first N information of eighth syntax element information corresponding to each color component, wherein N is a positive integer greater than 1, and N is preset or parsed from a bitstream; The second syntax element information to be decoded includes: information other than first N information in the eighth syntax element information corresponding to each color component.
13. The method according to any one of claims 5 to 12, wherein: The number of the second context decoding resources is the total number of decoding resources occupied by the first N pieces of second syntax element information, third syntax element information, fourth syntax element information corresponding to each color component, fifth syntax element information corresponding to each color component, sixth syntax element information corresponding to each color component, seventh syntax element information corresponding to each color component, and eighth syntax element information corresponding to each color component.
14. The method according to any one of claims 5 to 13, wherein: The method further comprises at least one of the following: After decoding the first quantized residual to determine the first quantized residual, parsing the bit stream to determine a sign bit of the first quantized residual; After decoding the second quantized residual to determine the second quantized residual, parsing the bitstream to determine a sign bit of the second quantized residual; After decoding the third quantized residual to determine the third quantized residual, parsing the bitstream to determine the sign bit of the third quantized residual.
15. The method according to any one of claims 7 to 11, wherein: The method further comprises: When the current quantization residual is the absolute value of any one of the first quantization residual, the second quantization residual and the third quantization residual minus the fifth preset value, the fifth preset value is added to the decoded current quantization residual, and the corresponding quantization residual is obtained in combination with its sign bit.
16. The method according to any one of claims 1 to 4, wherein: The attribute information to be decoded includes: reflectivity attribute information; When the fourth quantization residual is non-zero, decoding the to-be-decoded attribute information of the current point includes: Parse the bitstream to determine ninth and tenth syntax element information of the fourth quantized residual corresponding to the reflectivity attribute information; the ninth syntax element information represents the parity of the decoded value of the fourth quantized residual of the reflectivity attribute information; the tenth syntax element information represents whether the quotient of the decoded value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value; wherein the tenth syntax element information includes: H syntax element information; wherein H is a positive integer greater than or equal to 2; When any syntax element information in the tenth syntax element information has a second preset value, the fourth quantized residual is determined according to any syntax element information in the ninth syntax element information and the tenth syntax element information.
17. The method according to claim 16, wherein: The method further comprises: When the tenth grammatical element information is all the first preset value, determining the eleventh grammatical element information; the eleventh grammatical element information A quotient of a decoded value representing a fourth quantized residual subtracted from a seventh preset value and divided by two; wherein the seventh preset value is the initial value plus 2(H-2); The fourth quantized residual is determined based on the eleventh syntax element information.
18. The method according to claim 16 or 17, wherein: The second target value is a natural number greater than or equal to 0; the number of the second target values is H; the second target value corresponds to the H syntax element information; When any syntax element information in the tenth syntax element information is a second preset value, determining the fourth quantized residual according to any syntax element information in the ninth syntax element information and the tenth syntax element information, comprising: When the nth syntax element information is a second preset value, determining the fourth quantized residual according to the ninth syntax element information and the nth syntax element information; wherein n is a positive integer greater than or equal to 1 and less than H; When the nth syntax element information is the first preset value, continue to determine the value of the n+1th syntax element information until the hth syntax element information is determined to be the second preset value; or until the value of the Hth syntax element information is determined; wherein h is a positive integer greater than n and less than or equal to H; When the h-th syntax element information is a second preset value, the fourth quantized residual is determined according to the ninth syntax element information and the h-th syntax element information.
19. The method according to any one of claims 16 to 18, wherein: The first syntax element information to be decoded includes at least one of the following: the ninth syntax element information, the tenth syntax element information, and the first K pieces of information of the eleventh syntax element information, where K is a positive integer greater than 1; K is preset or parsed from a bitstream; The second syntax element information to be decoded includes: information in the eleventh syntax element information except the first K information.
20. The method according to any one of claims 16 to 19, wherein: The number of the second context decoding resources is the total number of decoding resources occupied by the ninth grammar element information, the tenth grammar element information, and the first K pieces of information of the eleventh grammar element information.
21. The method according to any one of claims 2 to 20, wherein: In the process of decoding the current point by using the context decoding method, the method further includes: After determining each first syntax element information to be decoded, the decoding resources occupied by the first syntax element information to be decoded are subtracted from the first context decoding resources to obtain the latest first context decoding resources; the latest first context decoding resources are used in the decoding process of the next point.
22. A point cloud encoding method, applied to an encoder, the method comprising: Determine a quantized residual of the attribute information to be encoded at the current point, and a first context coding resource allocated to the current point; When the first context coding resource is less than a preset second context coding resource, a bypass coding method is used to encode the quantized residual of the current point; The second context coding resource is related to the codeword to be encoded at the current point.
23. The method according to claim 22, wherein: The method further comprises: When the first context coding resource is greater than or equal to a preset second context coding resource, at least a context coding method is used to encode the quantized residual of the current point.
24. The method according to claim 23, wherein: When the first context coding resource is greater than or equal to a preset second context coding resource, at least using a context coding method to encode the quantized residual of the current point includes: When the first context coding resource is greater than or equal to a preset second context coding resource, a context coding method is used to encode the first syntax element information to be encoded, which is less than or equal to the second context coding resource; the first syntax element information to be encoded corresponds to the quantized residual of the attribute information to be encoded.
25. The method according to claim 23, wherein: When the first context coding resource is greater than or equal to a preset second context coding resource, at least using a context coding method to encode the quantized residual of the current point includes: When the first context coding resource is greater than or equal to a preset second context coding resource, a context coding method is used to encode first grammatical element information to be encoded, the number of which is equal to the second context coding resource, and a bypass decoding method is used to encode second grammatical element information to be encoded; the second grammatical element information to be encoded is grammatical element information to be encoded after the first grammatical element information to be encoded is encoded; the first grammatical element information to be encoded and the second grammatical element information to be encoded both correspond to a quantized residual of the attribute information to be encoded.
26. The method according to any one of claims 22 to 25, wherein: The attribute information to be encoded includes: color attribute information; the color attribute information includes: a first color component, a second color component and a third color component; the quantized residual includes: a first quantized residual of the first color component, a second quantized residual of the second color component and a third quantized residual of the third color component; When the first quantization residual, the second quantization residual, and the third quantization residual are not all zero, encoding the quantization residual of the current point includes: When the first quantized residual is not a first value, encoding the first quantized residual, the second quantized residual, and the third quantized residual respectively; When the first quantized residual is a first value and the second quantized residual is not a first value, the second quantized residual and the first The three quantized residuals are encoded separately; When the first quantized residual is a first value and the second quantized residual is a first value, the third quantized residual is encoded.
27. The method according to claim 26, wherein: The method further comprises: Determine second syntax element information of the first color component based on the first quantized residual, and encode the second syntax element information; When the first quantized residual is a first value, third syntax element information of the second color component is determined based on the second quantized residual, and the third syntax element information is encoded; wherein, If the first quantization residual of the first color component is not the first value, then indicating that the second syntax element information is a first preset value; If the first quantized residual of the first color component is a first value, then the information representing the second syntax element is a second preset value; If the second quantized residual of the second color component is not the first value, then indicating that the third syntax element information is a first preset value; If the second quantized residual of the second color component is a first value, it indicates that the third syntax element information is a second preset value.
28. The method according to claim 26 or 27, wherein: The current color component is any one of the first color component, the second color component, and the third color component; the current quantization residual is the encoding value of any one of the first quantization residual, the second quantization residual, and the third quantization residual; The current quantization residual corresponds to the current color component; Encoding the encoded value of the current quantized residual of the current color component, comprising: When the current quantization residual is the first value, determining that fourth syntax element information of the current color component is a second preset value, and encoding the fourth syntax element information; The fourth syntax element information represents whether the current quantized residual is a first value.
29. The method according to claim 28, wherein: The method further comprises: When the current quantization residual is a second value, determine that the fourth syntax element information is a first preset value, and determine that the fifth syntax element information is a second preset value; and encode the fourth syntax element information and the fifth syntax element information; the fifth syntax element information represents whether the current quantization residual is the second value.
30. The method of claim 29, wherein: The method further comprises: When the current quantized residual is not the second value and the first value, determining that the fourth syntax element information is the first preset value, and determining that the fifth syntax element information is the first preset value; Based on the current quantized residual, sixth grammatical element information and seventh grammatical element information are determined; the sixth grammatical element information represents the parity of the coded value of the current quantized residual; the seventh grammatical element information represents whether the quotient of the coded value of the current quantized residual minus the third preset value and then divided by two is a first target value; the seventh grammatical element information includes: M grammatical element information; wherein M is a positive integer greater than or equal to 1; When any syntax element information in the seventh syntax element information has a second preset value, the fourth syntax element information, the fifth syntax element information, the sixth syntax element information and the seventh syntax element information are encoded.
31. The method according to claim 30, wherein: The method further comprises: When the seventh syntax element information is all the first preset value, determining the eighth syntax element information based on the current quantized residual; the eighth syntax element information represents the quotient of the coding value of the current quantized residual minus the fourth preset value and then divided by two; wherein the fourth preset value is the initial value plus 2(M-1); The fourth syntax element information, the fifth syntax element information, the sixth syntax element information, the seventh syntax element information, and the eighth syntax element information are encoded.
32. The method according to claim 30 or 31, wherein: The first target value is a natural number greater than or equal to 0; the number of the first target values is M; the first target value corresponds to the M syntax element information; The determining, based on the current quantized residual, sixth grammar element information and seventh grammar element information comprises: Determine the sixth syntax element information according to a remainder obtained by dividing the current quantization residual by 2; When the quotient of the current quantized residual obtained by subtracting the third preset value and then dividing by two is the i-th first target value, determining that the i-th syntax element information corresponding to the i-th first target value is the second preset value; wherein i is a positive integer greater than or equal to 1 and less than M; When a quotient obtained by subtracting a third preset value from the current quantized residual and then dividing by two is not an i-th first target value, determining that the i-th syntax element information corresponding to the i-th first target value is a first preset value; Continue to determine the value of the i+1th syntax element information until it is determined that the jth syntax element information is the second preset value; or until the value of the Mth syntax element information is determined; where j is a positive integer greater than i and less than or equal to M; When the j-th syntax element information is the second preset value, it is determined that the j+1-th syntax element information to the M-th syntax element information are all the first preset values.
33. The method according to any one of claims 26 to 32, wherein: The first syntax element information to be encoded includes at least one of the following: second syntax element information, third syntax element information, fourth syntax element information corresponding to each color component, fifth syntax element information corresponding to each color component, sixth syntax element information corresponding to each color component, seventh syntax element information corresponding to each color component, and first N information of eighth syntax element information corresponding to each color component, where N is a positive integer greater than 1; The second syntax element information to be encoded includes: information except first N information in the eighth syntax element information corresponding to each color component.
34. The method according to any one of claims 26 to 33, wherein: The number of the second context coding resources is the total number of coding resources occupied by the first N information of the second syntax element information, the third syntax element information, the fourth syntax element information corresponding to each color component, the fifth syntax element information corresponding to each color component, the sixth syntax element information corresponding to each color component, the seventh syntax element information corresponding to each color component, and the eighth syntax element information corresponding to each color component.
35. The method according to any one of claims 26 to 33, wherein: The method further comprises at least one of the following: When encoding the first quantized residual, encoding a sign bit corresponding to the first quantized residual; When encoding the second quantized residual, encoding a sign bit corresponding to the second quantized residual; When encoding the third quantized residual, a sign bit corresponding to the third quantized residual is encoded.
36. The method according to any one of claims 22 to 25, wherein: The attribute information to be encoded includes: reflectivity attribute information; the attribute information to be encoded includes: reflectivity attribute information; the quantized residual includes: a fourth quantized residual of the reflectivity attribute information; When the fourth quantization residual is non-zero, encoding the quantization residual of the current point includes: According to the fourth quantized residual, ninth syntax element information and tenth syntax element information are determined; the ninth syntax element information represents the parity of the encoding value of the fourth quantized residual of the reflectivity attribute information; the tenth syntax element information represents whether the quotient of the encoding value of the fourth quantized residual minus the sixth preset value and then divided by two is a second target value; wherein the tenth syntax element information includes: H syntax element information; wherein H is a positive integer greater than or equal to 2; When any syntax element information in the tenth syntax element information has a second preset value, the ninth syntax element information and the tenth syntax element information are encoded.
37. The method of claim 36, wherein: The method further comprises: When the tenth syntax element information is all the first preset value, determining the eleventh syntax element information based on the fourth quantized residual; the eleventh syntax element information represents the quotient of the coding value of the fourth quantized residual minus the seventh preset value and then divided by two; wherein the seventh preset value is the initial value plus 2(H-2); The ninth syntax element information, the tenth syntax element information, and the eleventh syntax element information are encoded.
38. The method according to claim 36 or 37, wherein: The second target value is a natural number greater than or equal to 0; the number of the second target values is H; the second target value corresponds to the H syntax element information; The determining, according to the fourth quantized residual, ninth syntax element information and tenth syntax element information, comprises: Determine the ninth syntax element information according to a remainder obtained by dividing the encoded value of the fourth quantized residual by 2; When the quotient of the coding value of the fourth quantized residual subtracting the sixth preset value and then dividing by two is the nth second target value, determining that the nth syntax element information corresponding to the nth second target value is the second preset value; wherein n is a positive integer greater than or equal to 1 and less than H; When the nth syntax element information is the first preset value, continue to determine the value of the n+1th syntax element information until the hth syntax element information is determined to be the second preset value; or until the value of the Hth syntax element information is determined; wherein h is a positive integer greater than n and less than or equal to H; When the hth syntax element information is the second preset value, it is determined that the h+1th syntax element information to the Hth syntax element information are all the first preset values.
39. The method according to any one of claims 36 to 38, wherein: The first syntax element information to be encoded includes at least one of the following: ninth syntax element information, tenth syntax element information, and first K pieces of information of the eleventh syntax element information, where K is a positive integer greater than 1; The second syntax element information to be encoded includes: information in the eleventh syntax element information except the first K information.
40. The method according to any one of claims 36 to 39, wherein: The number of the second context coding resources is the total number of coding resources occupied by the ninth grammar element information, the tenth grammar element information, and the first K pieces of information of the eleventh grammar element information.
41. A method according to any one of claims 23 to 40, wherein: In the process of encoding the current point by adopting the context decoding method, the method further includes: After determining each first syntax element information to be encoded, the first context coding resources are subtracted from the coding resources occupied by the first syntax element information to obtain the latest first context coding resources; the latest first context coding resources are used in the encoding process of the next point.
42. The method according to any one of claims 23 to 41, wherein: Writing the initial first context coding resource into the bitstream; and do at least one of the following: Writing the latest first context coding resource corresponding to each point in the coding process into the bitstream; Writing the second context coding resource into a bitstream; Write N into the bitstream; Write K to the bitstream.
43. A code stream, wherein the code stream is generated by bit encoding according to information to be encoded, wherein the information to be encoded includes at least one of the following: The first syntax element information to the eleventh syntax element information, the first context encoding / decoding resources allocated to each attribute information to be encoded, and N and K, where N and K are positive integers greater than 1; the sign bit of the quantized residual of the current point; wherein, The first syntax element information is used to indicate the allocated first context decoding resource; The second syntax element information is used to indicate whether the first quantized residual of the first color component is a first value; The third syntax element information is used to indicate whether the second quantized residual of the second color component is a first value; The fourth syntax element information is used to indicate whether the encoding / decoding value of the quantized residual of each color component is the first value; The fifth syntax element information is used to indicate whether the encoding / decoding value of the quantized residual of each color component is a second value; The sixth syntax element information is used to indicate the parity of the encoding / decoding value of the quantized residual of each color component; The seventh syntax element information is used to indicate whether the quotient of the encoding / decoding value of the quantized residual of each color component minus the third preset value and then divided by two is the first target value; The eighth syntax element information is used to indicate the quotient of the encoding / decoding value of the quantized residual of each color component minus the fourth preset value and then divided by two; The ninth syntax element information is used to indicate the parity of the encoding / decoding value of the fourth quantized residual of the reflectivity attribute information; The tenth syntax element information is used to indicate whether the quotient of the encoding / decoding value of the fourth quantized residual minus the sixth preset value and then divided by two is the second target value; The eleventh syntax element information is used to indicate the quotient of the encoding / decoding value of the fourth quantized residual minus the seventh preset value and divided by two.
44. A decoder comprising: A first determining part is configured to determine first syntax element information of the attribute information to be decoded at a current point; as well as, The decoding part is configured to use a bypass decoding method to decode the attribute information to be decoded at the current point when the first syntax element information indicates that the allocated first context decoding resource is less than a preset second context decoding resource; the second context decoding resource is related to the codeword of the syntax element to be decoded at the current point.
45. A decoder, the decoder comprising: a first memory and a first processor; wherein, The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 1 to 21 when running the computer program.
46. An encoder comprising: A second determining part is configured to determine a quantized residual of the attribute information to be encoded at the current point and a first context coding resource allocated to the current point; as well as, The encoding part is configured to encode the quantized residual of the current point by adopting a bypass encoding method when the first context coding resource is less than a preset second context coding resource; The second context coding resource is related to the codeword to be encoded at the current point.
47. An encoder, comprising: A second memory and a second processor; wherein, The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 22 to 42 when running the computer program.
48. A computer storage medium, wherein: The computer storage medium stores a computer program, which, when executed by a first processor, implements the method according to any one of claims 1 to 21, or, when executed by a second processor, implements the method according to any one of claims 22 to 42.
Citation Information
Patent Citations
Data sequence decoding method, data decoding device, and video receiver
CN109257048A
Method and apparatus for video coding, computer device and storage medium
CN111988617A
Resource constrained video coding
CN115086671A
Methods, systems, and computer readable media for decoding video using rate sorted entropy coding
US20200389647A1
Bypass alignment in video coding
WO2022232061A1
